Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clear obligations-added flag with nested fulfillcx #36461

Merged
merged 1 commit into from
Sep 15, 2016

Conversation

nikomatsakis
Copy link
Contributor

This flag is a debugging measure designed to detect cases where we start
a snapshot, create type variables, register obligations involving those
type variables in the fulfillment cx, and then have to unroll the
snapshot, leaving "dangling type variables" behind. HOWEVER, in some
cases the flag is wrong. In particular, we sometimes create a
"mini-fulfilment-cx" in which we enroll obligations. As long as this
fulfillment cx is fully drained before we return, this is not a problem,
as there won't be any escaping obligations in the main cx. So we add a
fn to save/restore the flag.

Fixes #36053.

r? @arielb1

@arielb1
Copy link
Contributor

arielb1 commented Sep 14, 2016


error: /build/src/test/compile-fail/issue-36053-2.rs:17: expected error not found: E0281

error: 1 unexpected errors found, 1 expected errors not found
status: exit code: 101
command: /build/build/x86_64-unknown-linux-gnu/stage2/bin/rustc /build/src/test/compile-fail/issue-36053-2.rs -L /build/build/x86_64-unknown-linux-gnu/test/compile-fail --target=x86_64-unknown-linux-gnu --error-format json -L /build/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-36053-2.stage2-x86_64-unknown-linux-gnu.compile-fail.libaux -C prefer-dynamic -o /build/build/x86_64-unknown-linux-gnu/test/compile-fail/issue-36053-2.stage2-x86_64-unknown-linux-gnu -Crpath -O -Lnative=/build/build/x86_64-unknown-linux-gnu/rust-test-helpers
unexpected errors (from JSON output): [
    Error {
        line_num: 17,
        kind: Some(
            Error
        ),
        msg: "17:55: 17:60: no method named `count` found for type `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@/build/src/test/compile-fail/issue-36053-2.rs:17:39: 17:53]>` in the current scope"
    }
]

not found errors (from test file): [
    Error {
        line_num: 17,
        kind: Some(
            Error
        ),
        msg: "E0281"
    }
]

thread '[compile-fail] compile-fail/issue-36053-2.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1084
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    [compile-fail] compile-fail/issue-36053-2.rs

test result: FAILED. 2565 passed; 1 failed; 12 ignored; 0 measured

This flag is a debugging measure designed to detect cases where we start
a snapshot, create type variables, register obligations involving those
type variables in the fulfillment cx, and then have to unroll the
snapshot, leaving "dangling type variables" behind.  HOWEVER, in some
cases the flag is wrong. In particular, we sometimes create a
"mini-fulfilment-cx" in which we enroll obligations. As long as this
fulfillment cx is fully drained before we return, this is not a problem,
as there won't be any escaping obligations in the main cx. So we add a
fn to save/restore the flag.
@nikomatsakis
Copy link
Contributor Author

@arielb1 fixed (I think).

@arielb1
Copy link
Contributor

arielb1 commented Sep 14, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Sep 14, 2016

📌 Commit 6353e30 has been approved by arielb1

Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 15, 2016
clear obligations-added flag with nested fulfillcx

This flag is a debugging measure designed to detect cases where we start
a snapshot, create type variables, register obligations involving those
type variables in the fulfillment cx, and then have to unroll the
snapshot, leaving "dangling type variables" behind.  HOWEVER, in some
cases the flag is wrong. In particular, we sometimes create a
"mini-fulfilment-cx" in which we enroll obligations. As long as this
fulfillment cx is fully drained before we return, this is not a problem,
as there won't be any escaping obligations in the main cx. So we add a
fn to save/restore the flag.

Fixes rust-lang#36053.

r? @arielb1
bors added a commit that referenced this pull request Sep 15, 2016
Rollup of 9 pull requests

- Successful merges: #36384, #36405, #36425, #36429, #36438, #36454, #36459, #36461, #36463
- Failed merges: #36444
@bors bors merged commit 6353e30 into rust-lang:master Sep 15, 2016
@nikomatsakis nikomatsakis deleted the issue-36053 branch April 14, 2017 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants