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

NLL: bad error message when converting anonymous lifetime to 'static #51536

Merged

Conversation

davidtwco
Copy link
Member

@davidtwco davidtwco commented Jun 13, 2018

Contributes to #46983. This PR doesn't introduce fantastic errors, but it should hopefully lay some groundwork for diagnostic improvements.
r? @nikomatsakis

@davidtwco davidtwco changed the title NLL: bad error message when converting anonymous lifetime to 'static WIP: NLL: bad error message when converting anonymous lifetime to 'static Jun 13, 2018
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 13, 2018
@davidtwco
Copy link
Member Author

This PR isn't ready yet (at time of writing and creating the WIP PR), but it completes the majority of the initial steps for this. A function has been added that computes all the constraint paths from a region - the shortest of these paths is then categorized, sorted and labelled onto an error.

Improvements are required with the categorization, I was unsure what categories were required and how best to work them out.

Discussion related to this PR can be found on Zulip, in #wg-nll on topic ui/underscore-lifetime/dyn-trait-underscore.rs

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:47:19] ....................................................................................................
[00:47:23] ....................................................................................................
[00:47:29] ....................................................................................................
[00:47:35] ....................................................................................................
[00:47:40] ....i.......................FFF.F.......................................FF.F.......i................
[00:47:51] ....................................................................................................
[00:47:57] ....................................................................................................
[00:48:03] .................i..................................................................................
[00:48:03] ..
[00:48:03] ..
[00:48:03] failures:
[00:48:03] 
[00:48:03] ---- [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs stdout ----
[00:48:03] diff of stderr:
[00:48:03] 
[00:48:03] 4 LL |     foo(cell, |cell_a, cell_x| {
[00:48:03] 6 
[00:48:03] 6 
[00:48:03] - error: free region `ReFree(DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]), BrAnon(1))` does not outlive free region `'_#1r`
[00:48:03] + error: CallArgument
[00:48:03] +   --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:20
[00:48:03] 9    |
[00:48:03] 9    |
[00:48:03] 10 LL |         cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
[00:48:03] +    |                    ^^^^^^^^^^^^
[00:48:03] 12 
[00:48:03] 13 note: No external requirements
[00:48:03] 14   --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15
[00:48:03] 14   --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15
[00:48:03] 
[00:48:03] 
[00:48:03] The actual stderr differed from the expected stderr.
[00:48:03] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free/propagate-approximated-shorter-to-static-comparing-against-free.stderr
[00:48:03] To update references, rerun the tests and pass the `--bless` flag
[00:48:03] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs`
[00:48:03] error: 1 errors occurred comparing output.
[00:48:03] status: exit code: 101
[00:48:03] status: exit code: 101
[00:48:03] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free/auxiliary" "-A" "unused"
[00:48:03] ------------------------------------------
[00:48:03] 
[00:48:03] ------------------------------------------
[00:48:03] stderr:
[00:48:03] stderr:
[00:48:03] ------------------------------------------
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":933,"byte_end":936,"line_start":31,"line_end":31,"column_start":5,"column_end":8,"is_primary":true,"text":[{"text":"    foo(cell, |cell_a, cell_x| {","highlight_start":5,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:5\n   |\nLL |     foo(cell, |cell_a, cell_x| {\n   |     ^^^\n\n"}
[00:48:03] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":1040,"byte_end":1052,"line_start":33,"line_end":33,"column_start":20,"column_end":32,"is_primary":true,"text":[{"text":"        cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure","highlight_start":20,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:20\n   |\nLL |         cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure\n   |                    ^^^^^^^^^^^^\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":943,"byte_end":1143,"line_start":31,"line_end":35,"column_start":15,"column_end":6,"is_primary":true,"text":[{"text":"    foo(cell, |cell_a, cell_x| {","highlight_start":15,"highlight_end":33},{"text":"        //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"        cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure","highlight_start":1,"highlight_end":69},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]) with closure substs [\n    i32,\n    for<'r> extern \"rust-call\" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15\n   |\nLL |       foo(cell, |cell_a, cell_x| {\n   |  _______________^\nLL | |         //~^ WARNING not reporting region error due to nll\nLL | |         cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure\nLL | |         //~^ ERROR does not outlive free region\nLL | |     })\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]) with closure substs [\n               i32,\n               for<'r> extern \"rust-call\" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>))\n           ]\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":871,"byte_end":1146,"line_start":28,"line_end":36,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn case1() {","highlight_start":1,"highlight_end":13},{"text":"    let a = 0;","highlight_start":1,"highlight_end":15},{"text":"    let cell = Cell::new(&a);","highlight_start":1,"highlight_end":30},{"text":"    foo(cell, |cell_a, cell_x| {","highlight_start":1,"highlight_end":33},{"text":"        //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"        cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure","highlight_start":1,"highlight_end":69},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:5 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1\n   |\nLL | / fn case1() {\nLL | |     let a = 0;\nLL | |     let cell = Cell::new(&a);\nLL | |     foo(cell, |cell_a, cell_x| {\n...  |\nLL | |     })\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:5 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs []\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":1393,"byte_end":1506           for<'r> extern \"rust-call\" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) u32>))\n           ]\n   = note: number of external vids: 2\n   = note: where '_#1r: '_#0r\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":1165,"byte_end":1509,"line_start":39,"line_end":49,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn case2() {","highlight_start":1,"highlight_end":13},{"text":"    let a = 0;","highlight_start":1,"highlight_end":15},{"text":"    let cell = Cell::new(&a);","highlight_start":1,"highlight_end":30},{"text":"    //~^ ERROR `a` does not live long enough","highlight_start":1,"highlight_end":45},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    // As you can see in the stderr output, this closure propoagates a","highlight_start":1,"highlight_end":71},{"text":"    // requirement that `'a: 'static'.","highlight_start":1,"highlight_end":39},{"text":"    foo(cell, |cell_a, cell_x| {","highlight_start":1,"highlight_end":33},{"text":"        cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error","highlight_start":1,"highlight_end":89},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs:39:1\n   |\nLL | / fn case2() {\nLL | |     let a = 0;\nLL | |     let cell = Cell::new(&a);\nLL | |     //~^ ERROR `a` does not live long enough\n...  |\nLL | |     })\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]) with substs []\n\n"}
[00:48:03] {"message":"`a` does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":1218,"byte_end":1220,"line_start":41,"line_end":41,"column_start":26,"column_end":28,"is_primary":true,"text":[{"text":"    let cell = Cell::new(&a);","highlight_start":26,"highlight_end":28}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":1508,"byte_end":1509,"line_start":49,"line_end":49,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"borrowed value only lives until here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"borrowed value must be valid for the static lifetime...","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error[E0597]: `a` does not live long enough\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs:41:26\n   |\nLL |     let cell = Cell::new(&a);\n   |                          ^^ borrowed value does not live long enough\n...\nLL | }\n   | - borrowed value only lives until here\n   |\n   = note: borrowed value must be valid for the static lifetime...\n\n"}
[00:48:03] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:48:03] {"message":"For more information about this error, try `rustc --explain E0597`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0597`.\n"}
[00:48:03] ------------------------------------------
[00:48:03] 
[00:48:03] thread '[ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:48:03] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:48:03] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:48:03] 
[00:48:03] ---- [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs stdout ----
[00:48:03] diff of stderr:
[00:48:03] 
[00:48:03] 23    = note: number of external vids: 2
[00:48:03] 24    = note: where '_#1r: '_#0r
[00:48:03] 25 
[00:48:03] - error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic`
[00:48:03] + error: CallArgument
[00:48:03] +   --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:5
[00:48:03] 28    |
[00:48:03] 28    |
[00:48:03] - LL |       establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
[00:48:03] -    |  _______________________________________________^
[00:48:03] + LL | /     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
[00:48:03] 31 LL | |         //~^ ERROR does not outlive free region
[00:48:03] 32 LL | |
[00:48:03] 33 LL | |         // Only works if 'x: 'y:
[00:48:03] 
[00:48:03] 34 LL | |         demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll
[00:48:03] 35 LL | |     });
[00:48:03] -    | |_48:03] ------------------------------------------
[00:48:03] ------------------------------------------
[00:48:03] ------------------------------------------
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1638,"byte_end":1661,"line_start":49,"line_end":49,"column_start":9,"column_end":32,"is_primary":true,"text":[{"text":"        demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll","highlight_start":9,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:49:9\n   |\nLL |         demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll\n   |         ^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1528,"byte_end":1717,"line_start":45,"line_end":50,"column_start":47,"column_end":6,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":47,"highlight_end":66},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":82},{"text":"    });","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [\n    i16,\n    for<'r, 's, 't0, 't1, 't2> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't2)) u32>))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 2","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#0r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:45:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\n   |  _______________________________________________^\nLL | |         //~^ ERROR does not outlive free region\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [\n               i16,\n               for<'r, 's, 't0, 't1, 't2> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't2)) u32>))\n           ]\n   = note: number of external vids: 2\n   = note: where '_#1r: '_#0r\n\n"}
[00:48:03] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1486,"byte_end":1718,"line_start":45,"line_end":50,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":5,"highlight_end":66},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":82},{"text":"    });","highlight_start":1,"highlight_end":7}],"label":"CallArgument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:45:5\n   |\nLL | /     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\nLL | |         //~^ ERROR does not outlive free region\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll\nLL | |     });\n   | |______^ CallArgument\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1416,"byte_end":1721,"line_start":44,"line_end":51,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":1,"highlight_end":66},{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":1,"highlight_end":66},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":82},{"text":"    });","highlight_start":1,"highlight_end":8},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:44:1\n   |\nLL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\nLL | |     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\nLL | |         //~^ ERROR does not outlive free region\nLL | |\n...  |\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs []\n\n"}
[00:48:03] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:03] ------------------------------------------
[00:48:03] 
[00:48:03] thread '[ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:48:03] 
[00:48:03] 
[00:48:03] ---- [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs stdout ----
[00:48:03] diff of stderr:
[00:48:03] 
[00:48:03] 23    = note: number of external vids: 3
[00:48:03] 24    = note: where '_#1r: '_#0r
[00:48:03] 25 
[00:48:03] - error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic`
[00:48:03] + error: CallArgument
[00:48:03] +   --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:5
[00:48:03] 28    |
[00:48:03] 28    |
[00:48:03] - LL |       establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
[00:48:03] -    |  _______________________________________________^
[00:48:03] + LL | /     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
[00:48:03] 31 LL | |         //~^ ERROR does not outlive free region
[00:48:03] 32 LL | |         // Only works if 'x: 'y:
[00:48:03] 33 LL | |         demand_y(x, y, x.get())
[00:48:03] 
[00:48:03] 34 LL | |         //~^ WARNING not reporting region error due to nll
[00:48:03] 35 LL | |     });
[00:48:03] +    | |______^ CallArgument
[00:48:03] 37 
[00:48:03] 38 note: No external requirements
[00:48:03] 39   --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1
[00:48:03] 39   --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1
[00:48:03] 
[00:48:03] 
[00:48:03] The actual stderr differed from the expected stderr.
[00:48:03] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound/propagate-approximated-shorter-to-static-wrong-bound.stderr
[00:48:03] To update references, rerun the tests and pass the `--bless` flag
[00:48:03] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs`
[00:48:03] error: 1 errors occurred comparing output.
[00:48:03] status: exit code: 101
[00:48:03] status: exit code: 101
[00:48:03] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound/auxiliary" "-A" "unused"
[00:48:03] ------------------------------------------
[00:48:03] 
[00:48:03] ------------------------------------------
[00:48:03] stderr:
[00:48:03] stderr:
[00:48:03] ------------------------------------------
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1725,"byte_end":1748,"line_start":51,"line_end":51,"column_start":9,"column_end":32,"is_primary":true,"text":[{"text":"        demand_y(x, y, x.get())","highlight_start":9,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs:51:9\n   |\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1603,"byte_end":1813,"line_start":48,"line_end":53,"column_start":47,"column_end":6,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {","highlight_start":47,"highlight_end":79},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"highlight_end":32},{"text":"        //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"    });","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [\n    i16,\n    for<'r, 's, 't0, 't1, 't2, 't3> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) u32>))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#0r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\n   |  _______________________________________________^\nLL | |         //~^ ERROR does not outlive free region\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |         //~^ WARNING not reporting region error due to nll\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [\n               i16,\n               for<'r, 's, 't0, 't1, 't2, 't3> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) u32>))\n           ]\n   = note: number of external vids: 3\n   = note: where '_#1r: '_#0r\n\n"}
[00:48:03] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1561,"byte_end":1814,"line_start":48,"line_end":53,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {","highlight_start":5,"highlight_end":79},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"hiRNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"    });","highlight_start":1,"highlight_end":8},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1\n   |\nLL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\nLL | |     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\nLL | |         //~^ ERROR does not outlive free region\nLL | |         // Only works if 'x: 'y:\n...  |\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs []\n\n"}
[00:48:03] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:03] ------------------------------------------
[00:48:03] 
[00:48:03] thread '[ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:48:03] 
[00:48:03] 
[00:48:03] ---- [ui] ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs stdout ----
[00:48:03] diff of stderr:
[00:48:03] 
[00:48:03] 4 LL |         demand_y(x, y, x.get())
[00:48:03] 6 
[00:48:03] 6 
[00:48:03] - error: free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(4))` does not outlive free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(2))`
[00:48:03] + error: CallArgument
[00:48:03] +   --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9
[00:48:03] 9    |
[00:48:03] 9    |
[00:48:03] 10 LL |         demand_y(x, y, x.get())
[00:48:03] +    |         ^^^^^^^^^^^^^^^^^^^^^^^
[00:48:03] 12 
[00:48:03] 13 note: No external requirements
[00:48:03] 14   --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47
[00:48:03] 14   --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47
[00:48:03] 
[00:48:03] 
[00:48:03] The actual stderr differed from the expected stderr.
[00:48:03] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds/propagate-fail-to-approximate-longer-no-bounds.stderr
[00:48:03] To update references, rerun the tests and pass the `--bless` flag
[00:48:03] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs`
[00:48:03] error: 1 errors occurred comparing output.
[00:48:03] status: exit code: 101
[00:48:03] status: exit code: 101
[00:48:03] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds/auxiliary" "-A" "unused"
[00:48:03] ------------------------------------------
[00:48:03] 
[00:48:03] ------------------------------------------
[00:48:03] stderr:
[00:48:03] stderr:
[00:48:03] ------------------------------------------
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs","byte_start":1636,"byte_end":1659,"line_start":47,"line_end":47,"column_start":9,"column_end":32,"is_primary":true,"text":[{"text":"        demand_y(x, y, x.get())","highlight_start":9,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs:47:9\n   |\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:48:03] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs","byte_start":1636,"byte_end":1659,"line_start":47,"line_end":47,"column_start":9,"column_end":32,"is_primary":true,"text":[{"text":"        demand_y(x, y, x.get())","highlight_start":9,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs:47:9\n   |\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs","byte_start":1575,"byte_end":1769,"line_start":45,"line_end":50,"column_start":47,"column_end":6,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":47,"highlight_end":66},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"highlight_end":32},{"text":"        //~^ WARN not reporting region error due to nll","highlight_start":1,"highlight_end":56},{"text":"        //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"    });","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [\n    i16,\n    for<'r, 's, 't0, 't1, 't2> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs:45:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\n   |  _______________________________________________^\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |         //~^ WARN not reporting region error due to nll\nLL | |         //~| ERROR does not outlive free region\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [\n               i16,\n               for<'r, 's, 't0, 't1, 't2> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex { index: 0 }, BrNamed(crate0:DefIndex(0:0), 's)) u32>))\n           ]\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs","byte_start":1463,"byte_end":1773,"line_start":44,"line_end":51,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":1,"highlight_end":66},{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":1,"highlight_end":66},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"highlight_end":32},{"text":"        //~^ WARN not reporting region error due to nll","highlight_start":1,"highlight_end":56},{"text":"        //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"    });","highlight_start":1,"highlight_end":8},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"childre/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`
[00:48:03] + error: CallArgument
[00:48:03] +   --> $DIR/projection-one-region-closure.rs:55:5
[00:48:03] 45    |
[00:48:03] 45    |
[00:48:03] 46 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:48:03] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:48:03] 48 
[00:48:03] 49 note: No external requirements
[00:48:03] 50   --> $DIR/projection-one-region-closure.rs:51:1
[00:48:03] 50   --> $DIR/projection-one-region-closure.rs:51:1
[00:48:03] 
[00:48:03] 88    |
[00:48:03] 89    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
[00:48:03] 90 
[00:48:03] - error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
[00:48:03] + error: CallArgument
[00:48:03] +   --> $DIR/projection-one-region-closure.rs:67:5
[00:48:03] 93    |
[00:48:03] 93    |
[00:48:03] 94 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:48:03] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:48:03] 96 
[00:48:03] 97 note: No external requirements
[00:48:03] 98   --> $DIR/projection-one-region-closure.rs:62:1
[00:48:03] 98   --> $DIR/projection-one-region-closure.rs:62:1
[00:48:03] 
[00:48:03] 137    |
[00:48:03] 138    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
[00:48:03] 139 
[00:48:03] - error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
[00:48:03] + error: CallArgument
[00:48:03] +   --> $DIR/projection-one-region-closure.rs:89:5
[00:48:03] 142    |
[00:48:03] 142    |
[00:48:03] 143 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:48:03] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:48:03] 145 
[00:48:03] 146 note: No external requirements
[00:48:03] 147   --> $DIR/projection-one-region-closure.rs:74:1
[00:48:03] 147   --> $DIR/projection-one-region-closure.rs:74:1
[00:48:03] 
[00:48:03] 
[00:48:03] The actual stderr differed from the expected stderr.
[00:48:03] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-closure/projection-one-region-closure.stderr
[00:48:03] To update references, rerun the tests and pass the `--bless` flag
[00:48:03] To only update this specific test, also pass `--test-args nll/ty-outlives/projection-one-region-closure.rs`
[00:48:03] error: 1 errors occurred comparing output.
[00:48:03] status: exit code: 101
[00:48:03] status: exit code: 101
[00:48:03] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-closure/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-closure/auxiliary" "-A" "unused"
[00:48:03] ------------------------------------------
[00:48:03] 
[00:48:03] ------------------------------------------
[00:48:03] stderr:
[00:48:03] stderr:
[00:48:03] ------------------------------------------
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1582,"byte_end":1589,"line_start":55,"line_end":55,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:55:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1925,"byte_end":1932,"line_start":67,"line_end":67,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:67:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2869,"byte_end":2876,"line_start":89,"line_end":89,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:89:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1572,"byte_end":1598,"line_start":55,"line_end":55,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:19 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where T: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:55:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:19 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where T: '_#2r\n   = note: where '_#1r: '_#2r\n\n"}
[00:48:03] {"message":"the parameter type `T` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associated with them that represent\nhow long the data stored within them is guaranteed to be live. This lifetime\nmust be as long as the data needs to be alive, and missing the constraint that\ndenotes this will cause this error.\n\n```compile_fail,E0309\n// This won't compile because T is not constrained, meaning the data\n// stored in it is not guaranteed to last as long as the reference\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n```\n\nThis will compile, because it has the constraint on the type parameter:\n\n```\nstruct Foo<'a, T: 'a> {\n    foo: &'a T\n}\n```\n\nTo see why this is important, consider the case where `T` is itself a reference\n(e.g., `T = &str`). If we don't include the restriction that `T: 'a`, the\nfollowing code would be perfectly legal:\n\n```compile_fail,E0309\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n\nfn main() {\n    let v = \"42\".to_string();\n    let f = Foo{foo: &v};\n    drop(v);\n    println!(\"{}\", f.foo); // but we've already dropped v!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1572,"byte_end":1598,"line_start":55,"line_end":55,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the parameter type `T` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:55:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`...\n\n"}
[00:48:03] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1548,"byte_end":1599,"line_start":55,"line_end":55,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:55:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1453,"byte_end":1764,"line_start":51,"line_end":59,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":62},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highling type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where T: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:67:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where T: '_#3r\n   = note: where '_#2r: '_#3r\n\n"}
[00:48:03] {"message":"the parameter type `T` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associated with them that represent\nhow long the data stored within them is guaranteed to be live. This lifetime\nmust be as long as the data needs to be alive, and missing the constraint that\ndenotes this will cause this error.\n\n```compile_fail,E0309\n// This won't compile because T is not constrained, meaning the data\n// stored in it is not guaranteed to last as long as the reference\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n```\n\nThis will compile, because it has the constraint on the type parameter:\n\n```\nstruct Foo<'a, T: 'a> {\n    foo: &'a T\n}\n```\n\nTo see why this is important, consider the case where `T` is itself a reference\n(e.g., `T = &str`). If we don't include the restriction that `T: 'a`, the\nfollowing code would be perfectly legal:\n\n```compile_fail,E0309\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n\nfn main() {\n    let v = \"42\".to_string();\n    let f = Foo{foo: &v};\n    drop(v);\n    println!(\"{}\", f.foo); // but we've already dropped v!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1915,"byte_end":1941,"line_start":67,"line_end":67,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the parameter type `T` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:67:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...\n\n"}
[00:48:03] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1891,"byte_end":1942,"line_start":67,"line_end":67,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:67:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1783,"byte_end":2107,"line_start":62,"line_end":71,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":63},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"    'a: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":63},{"text":"    //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":44},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:62:1\n   |\nLL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     'a: 'a,\n...  |\nLL | |     //~| ERROR does not outlive free region\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2859,"byte_end":2885,"line_start":89,"line_end":89,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where T: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:89:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where T: '_#3r\n   = note: where '_#2r: '_#3r\n\n"}
[00:48:03] {"message":"the parameter type `T` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associated with them that represent\nhow long the data stored within them is guaranteed to be live. This lifetime\nmust   with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...\n\n"}
[00:48:03] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2835,"byte_end":2886,"line_start":89,"line_end":89,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:89:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2126,"byte_end":3107,"line_start":74,"line_end":93,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":60},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"    T::AssocType: 'a,","highlight_start":1,"highlight_end":22},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    // This error is unfortunate. This code ought to type-check: we","highlight_start":1,"highlight_end":68},{"text":"    // are projecting `<T as Anything<'b>>::AssocType`, and we know","highlight_start":1,"highlight_end":68},{"text":"    // that this outlives `'a` because of the where-clause. However,","highlight_start":1,"highlight_end":69},{"text":"    // the way the region checker works, we don't register this","highlight_start":1,"highlight_end":64},{"text":"    // outlives obligation, and hence we get an error: this is because","highlight_start":1,"highlight_end":71},{"text":"    // what we see is a projection like `<T as","highlight_start":1,"highlight_end":47},{"text":"    // Anything<'?0>>::AssocType`, and we don't yet know if `?0` will","highlight_start":1,"highlight_end":70},{"text":"    // equal `'b` or not, so we ignore the where-clause. Obviously we","highlight_start":1,"highlight_end":70},{"text":"    // can do better here with a more involved verification step.","highlight_start":1,"highlight_end":66},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":63},{"text":"    //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`","highlight_start":1,"highlight_end":100},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:74:1\n   |\nLL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     T::AssocType: 'a,\n...  |\nLL | |     //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":3263,"byte_end":3289,"line_start":102,"line_end":102,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where T: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:102:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where T: '_#3r\n   = note: where '_#2r: '_#3r\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":3126,"byte_end":3293,"line_start":96,"line_end":103,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":57},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"    T: 'a,","highlight_start":1,"highlight_end":11},{"text":"    'b: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:96:1\n   |\nLL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     T: 'a,\n...  |\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"aborting due to 6 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 6 previous errors\n\n"}
[00:48:03] {"message":"For more information about this error, try `rustc --explain E0309`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0309`.\n"}
[00:48:03] ------------------------------------------
[00:48:03] 
[00:48:03] thread '[ui] ui/nll/ty-outlives/projection-one-region-closure.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:48:03] 
[00:48:03] 
[00:48:03] ---- [ui] ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs stdout ----
[00:48:03] diff of stderr:
[00:48:03] 
[00:48:03] 31    = note: number of external vids: 3
[00:48:03] 32    = note: where '_#1r: '_#2r
[00:48:03] 33 
[00:48:03] - error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`
[00:48:03] + error: CallArgument
[00:48:03] +   --> $DIR/projection-one-region-trait-bound-closure.rs:47:5
[00:48:03] 36    |
[00:48:03] 36    |
[00:48:03] 37 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:48:03] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:48:03] 39 
[00:48:03] 40 note: No external requirements
[00:48:03] 41   --> $DIR/projection-one-region-trait-bound-closure.rs:43:1
[00:48:03] 41   --> $DIR/projection-one-region-trait-bound-closure.rs:43:1
[00:48:03] 
[00:48:03] 70    = note: number of external vids: 4
[00:48:03] 71    = note: where '_#2r: '_#3r
[00:48:03] 72 
[00:48:03] - error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
[00:48:03] + error: CallArgument
[00:48:03] +   --> $DIR/projection-one-region-trait-bound-closure.rs:58:5
[00:48:03] 75    |
[00:48:03] 75    |
[00:48:03] 76 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:48:03] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:48:03] 78 
[00:48:03] 79 note: No external requirements
[00:48:03] 80   --> $DIR/projection-one-region-trait-bound-closure.rs:53:1
[00:48:03] 80   --> $DIR/projection-one-region-trait-bound-closure.rs:53:1
[00:48:03] 
[00:48:03] 110    = note: number of external vids: 4
[00:48:03] 111    = note: where '_#2r: '_#3r
[00:48:03] 112 
[00:48:03] - error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
[00:48:03] + error: CallArgument
[00:48:03] +   --> $DIR/projection-one-region-trait-bound-closure.rs:79:5
[00:48:03] 115    |
[00:48:03] 115    |
[00:48:03] 116 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:48:03] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:48:03] 118 
[00:48:03] 119 note: No external requirements
[00:48:03] 120   --> $DIR/projection-one-region-trait-bound-closure.rs:64:1
[00:48:03] 120   --> $DIR/projection-one-region-trait-bound-closure.rs:64:1
[00:48:03] 
[00:48:03] 
[00:48:03] The actual stderr differed from the expected stderr.
[00:48:03] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure/projection-one-region-trait-bound-closure.stderr
[00:48:03] To update references, rerun the tests and pass the `--bless` flag
[00:48:03] To only update this specific test, also pass `--test-args nll/ty-outlives/projection-one-region-trait-bound-closure.rs`
[00:48:03] error: 1 errors occurred comparing output.
[00:48:03] status: exit code: 101
[00:48:03] status: exit code: 101
[00:48:03] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure/auxiliary" "-A" "unused"
[00:48:03] ------------------------------------------
[00:48:03] 
[00:48:03] ------------------------------------------
[00:48:03] stderr:
[00:48:03] stderr:
[00:48:03] ------------------------------------------
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1321,"byte_end":1328,"line_start":47,"line_end":47,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:47:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1601,"byte_end":1608,"line_start":58,"line_end":58,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:58:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2482,"byte_end":2489,"line_start":79,"line_end":79,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:79:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1311,"byte_end":1337,"line_start":47,"line_end":47,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:47:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where '_#1r: '_#2r\n\n"}
[00:48:03] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:48:03] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1287,"byte_end":1338,"line_start":47,"line_end":47,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:47:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1192,"byte_end":1440,"line_start":43,"line_end":50,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":62},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNI/1:23 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:58:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where '_#2r: '_#3r\n\n"}
[00:48:03] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1567,"byte_end":1618,"line_start":58,"line_end":58,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:58:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1459,"byte_end":1720,"line_start":53,"line_end":61,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":63},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"    'a: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":44},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:53:1\n   |\nLL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     'a: 'a,\n...  |\nLL | |     //~| ERROR does not outlive free region\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2472,"byte_end":2498,"line_start":79,"line_end":79,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:79:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where '_#2r: '_#3r\n\n"}
[00:48:03] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2448,"byte_end":2499,"line_start":79,"line_end":79,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:79:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1739,"byd":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":44},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:64:1\n   |\nLL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     T::AssocType: 'a,\n...  |\nLL | |     //~| ERROR does not outlive free region\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2746,"byte_end":2772,"line_start":90,"line_end":90,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:90:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where '_#2r: '_#3r\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2620,"byte_end":2776,"line_start":85,"line_end":91,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":57},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"    'b: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:85:1\n   |\nLL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     'b: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":3117,"byte_end":3143,"line_start":102,"line_end":102,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:102:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where '_#1r: '_#2r\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2795,"byte_end":3147,"line_start":94,"line_end":103,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":47},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'a>,","highlight_start":1,"highlight_end":21},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    // Note that in this case the closure still propagates an external","highlight_start":1,"highlight_end":71},{"text":"    // requirement between two variables in its signature, but the","highlight_start":1,"highlight_end":67},{"text":"    // creator maps both those two region variables to `'a` on its","highlight_start":1,"highlight_end":67},{"text":"    // side.","highlight_start":1,"highlight_end":13},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [\n    '_#1r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:94:1\n   |\nLL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'a>,\nLL | | {\n...  |\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
[00:48:03] ------------------------------------------
[00:48:03] 
[00:48:03] thread '[ui] ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:48:03] 
[00:48:03] 
[00:48:03] ---- [ui] ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs stdout ----
[00:48:03] diff of stderr:
[00:48:03] 
[00:48:03] 239    = note: number of external vids: 3
[00:48:03] 240    = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r
[00:48:03] 241 
[00:48:03] - error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a))`
[00:48:03] + error: CallArgument
[00:48:03] +   --> $DIR/projection-two-region-trait-bound-closure.rs:108:5
[00:48:03] 244    |
[00:48:03] 244    |
[00:48:03] 245 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:48:03] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:48:03] 247 
[00:48:03] 248 note: No external requirements
[00:48:03] 249   --> $DIR/projection-two-region-trait-bound-closure.rs:104:1
[00:48:03] 249   --> $DIR/projection-two-region-trait-bound-closure.rs:104:1
[00:48:03] 
[00:48:03] 
[00:48:03] The actual stderr differed from the expected t":48,"line_end":48,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:48:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1721,"byte_end":1728,"line_start":59,"line_end":59,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:59:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":2665,"byte_end":2672,"line_start":80,"line_end":80,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:80:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:48:03] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3349,"byte_end":3356,"line_start":108,"line_end":108,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:108:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1368,"byte_end":1394,"line_start":48,"line_end":48,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:22 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#2r)>>::AssocType: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:48:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:22 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#2r)>>::AssocType: '_#3r\n\n"}
[00:48:03] {"message":"the associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associated with them that represent\nhow long the data stored within them is guaranteed to be live. This lifetime\nmust be as long as the data needs to be alive, and missing the constraint that\ndenotes this will cause this error.\n\n```compile_fail,E0309\n// This won't compile because T is not constrained, meaning the data\n// stored in it is not guaranteed to last as long as the reference\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n```\n\nThis will compile, because it has the constraint on the type parameter:\n\n```\nstruct Foo<'a, T: 'a> {\n    foo: &'a T\n}\n```\n\nTo see why this is important, consider the case where `T` is itself a reference\n(e.g., `T = &str`). If we don't include the restriction that `T: 'a`, the\nfollowing code would be perfectly legal:\n\n```compile_fail,E0309\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n\nfn main() {\n    let v = \"42\".to_string();\n    let f = Foo{foo: &v};\n    drop(v);\n    println!(\"{}\", f.foo); // but we've already dropped v!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1368,"byte_end":1394,"line_start":48,"line_end":48,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `<T as Anything<'_#5r, '_#6r>>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:48:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `<T as Anything<'_#5r, '_#6r>>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`...\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1241,"byte_end":1552,"line_start":44,"line_end":51,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":66},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'c>,","highlight_start":1,"highlight_end":25},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough","highlight_start":1,"highlight_end":99},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:44:1\n   |\nLL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'c>,\nLL | | {\n...  |\nLL | |     //~| ERROR associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1711,"byte_end":1737,"line_start":59,"line_end":59,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:27 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:59:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:27 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n           ]\n   = note: number of external vids: 5\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:48:03] {"message":"the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associated with tE0309]: the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:59:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReEarlyBound(0, 'a)`...\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1571,"byte_end":1895,"line_start":54,"line_end":62,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":67},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'c>,","highlight_start":1,"highlight_end":25},{"text":"    'a: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough","highlight_start":1,"highlight_end":99},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:54:1\n   |\nLL | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'c>,\nLL | |     'a: 'a,\n...  |\nLL | |     //~| ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":2655,"byte_end":2681,"line_start":80,"line_end":80,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:80:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n           ]\n   = note: number of external vids: 5\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:48:03] {"message":"the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associated with them that represent\nhow long the data stored within them is guaranteed to be live. This lifetime\nmust be as long as the data needs to be alive, and missing the constraint that\ndenotes this will cause this error.\n\n```compile_fail,E0309\n// This won't compile because T is not constrained, meaning the data\n// stored in it is not guaranteed to last as long as the reference\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n```\n\nThis will compile, because it has the constraint on the type parameter:\n\n```\nstruct Foo<'a, T: 'a> {\n    foo: &'a T\n}\n```\n\nTo see why this is important, consider the case where `T` is itself a reference\n(e.g., `T = &str`). If we don't include the restriction that `T: 'a`, the\nfollowing code would be perfectly legal:\n\n```compile_fail,E0309\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n\nfn main() {\n    let v = \"42\".to_string();\n    let f = Foo{foo: &v};\n    drop(v);\n    println!(\"{}\", f.foo); // but we've already dropped v!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":2655,"byte_end":2681,"line_start":80,"line_end":80,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReEarlyBound(0, 'a)`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:80:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReEarlyBound(0, 'a)`...\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1914,"byte_end":2839,"line_start":65,"line_end":83,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":64},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'c>,","highlight_start":1,"highlight_end":25},{"text":"    T::AssocType: 'a,","highlight_start":1,"highlight_end":22},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    // This error is unfortunate. This code ought to type-check: we","highlight_start":1,"highlight_end":68},{"text":"    // are projecting `<T as Anything<'b>>::AssocType`, and we know","highlight_start":1,"highlight_end":68},{"text":"    // that this outlives `'a` because of the where-clause. However,","highlight_start":1,"highlight_end":69},{"text":"    // the way the region checker works, we don't register this","highlight_start":1,"highlight_end":64},{"text":"    // outlives obligation, and hence we get an error: this is because","highlight_start":1,"highlight_end":71},{"text":"    // what we see is a projection like `<T as","highlight_start":1,"highlight_end":47},{"text":"    // Anything<'?0>>::AssocType`, and we don't yet know if `?0` will","highlight_start":1,"highlight_end":70},{"text":"    // equal `'b` or not, so we ignore the where-clause. Obviously we","highlight_start":1,"highlight_end":70},{"text":"    // can do better here with a more involved verification step.","highlight_start":1,"highlight_end":66},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough","highlight_start":1,"highlight_end":99},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:65:1\n   |\nLL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'c>,\nLL | |     T::AssocType: 'a,\n...  |\nLL | |     //~| ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":2993,"byte_end":3019,"line_start":91,"line_end":91,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:91:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n           ]\n   = note: number of external vids: 5\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":2858,"byte_end":3023,"line_start":86,"line_end":92,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":62},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'c>,","highlight_start":1,"highlight_end":25},{"text":"    'b: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:11 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]) with substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:86:1\n   |\nLL | / fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'c>,\nLL | |     'b: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:11 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]) with substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3177,"byte_end":3203,"line_start":100,"line_end":100,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:42 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:100:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:42 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n           ]\n   = note: number of external vids: 5\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3042,"byte_end":3207,"line_start":95,"line_end":101,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":62},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'c>,","highlight_start":1,"highlight_end":25},{"text":"    'c: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:95:1\n   |\nLL | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'c>,\nLL | |     'c: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3339,"byte_end":3365,"line_start":108,"line_end":108,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:108:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r\n\n"}
[00:48:03] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3315,"byte_end":3366,"line_start":108,"line_end":108,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:108:5\n   |\nLL |     with_signat  |\n   = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#2r)>>::AssocType: '_#3r\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3487,"byte_end":3650,"line_start":114,"line_end":120,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":60},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'b>,","highlight_start":1,"highlight_end":25},{"text":"    'b: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:114:1\n   |\nLL | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'b>,\nLL | |     'b: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3995,"byte_end":4021,"line_start":131,"line_end":131,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:131:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r\n\n"}
[00:48:03] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3669,"byte_end":4025,"line_start":123,"line_end":132,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":47},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'a, 'a>,","highlight_start":1,"highlight_end":25},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    // Note that in this case the closure still propagates an external","highlight_start":1,"highlight_end":71},{"text":"    // requirement between two variables in its signature, but the","highlight_start":1,"highlight_end":67},{"text":"    // creator maps both those two region variables to `'a` on its","highlight_start":1,"highlight_end":67},{"text":"    // side.","highlight_start":1,"highlight_end":13},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [\n    '_#1r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:123:1\n   |\nLL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'a, 'a>,\nLL | | {\n...  |\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:48:03] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:48:03] {"message":"For more information about this error, try `rustc --explain E0309`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0309`.\n"}
[00:48:03] ------------------------------------------
[00:48:03] 
[00:48:03] 
[00:48:03] thread '[ui] ui/nll/ty-outlives/projection-two-region-trait-bst-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:48:03] 
[00:48:03] 
[00:48:03] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:48:03] Build completed unsuccessfully in 0:02:44
[00:48:03] Build completed unsuccessfully in 0:02:44
[00:48:03] Makefile:58: recipe for target 'check' failed
[00:48:03] make: *** [check] Error 1
2583500 ./obj
2583468 ./obj/build
1823248 ./obj/build/x86_64-unknown-linux-gnu
728788 ./src
---
146760 ./.git/modules/src
143112 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu
143108 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release
123420 ./obj/build/bootstrap/debug/incremental/bootstrap-1r3bppl29tbrj
123416 ./obj/build/bootstrap/debug/incremental/bootstrap-1r3bppl29tbrj/s-f1y8iem6lq-7x7gd2-bfrkfwrvh0tv
107596 ./obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release
103932 .travis_time:start:09a2a7ac
$ ls -lat $HOME/Library/Logs/DiagnosticReports/
ls: cannot access /home/travis/Library/Logs/DiagnosticReports/: No such file or directory
---
travis_time:end:2dd66068:start=1528906114532747189,finish=1528906114540578842,duration=7831653
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:00e77dfa
$ head -30 ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
head: cannot open ‘./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers’ for reading: No such file or directory
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:19dd02de
$ dmesg | grep -i kill

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@pietroalbini
Copy link
Member

Ping from triage @nikomatsakis! This PR needs your review.

@bors
Copy link
Contributor

bors commented Jun 18, 2018

☔ The latest upstream changes (presumably #51460) made this pull request unmergeable. Please resolve the merge conflicts.

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great so far! I guess the question we have to answer now is to focus in on some specific tests and try to push the output to something we are happy with.

let mut end_regions: Vec<RegionVid> = Vec::new();

// When we've still got points to visit...
while !next.is_empty() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: while let Some(current) = next.pop() { is nicer :)

return Ordering::Equal;
}

match (self, other) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we not just #[derive(Ord)] here? I think that would work fine...?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(We would want to comment that the order is significant)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered doing that, but it would have meant that variants at the top of the definition were considered most significant - which seemed a little too implicit? - so I went with this instead. I'll change it to #[derive(Ord)].

@@ -1096,6 +1136,32 @@ impl<'tcx> RegionInferenceContext<'tcx> {
}).is_some()
}

/// This function classifies a constraint from a location.
fn classify_constraint(&self, location: Location, mir: &Mir<'tcx>) -> ConstraintCategory {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as an aside, it feels pretty clear we should think about breaking this logic out into its own module at some point. Doesn't have to be in this PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll make an error_reporting module and move relevant functions into it.

if categorized_path.len() > 0 {
let blame_constraint = &categorized_path[0];

let mut diag = infcx.tcx.sess.struct_span_err(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can I see the output of this code for any of our tests?

Copy link
Member Author

@davidtwco davidtwco Jun 20, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the test we focused on in the pair programming session, this is the current output - it just labels spans with the assigned categories as you had suggested as a first step:

error: Cast
  --> src/test/ui/underscore-lifetime/dyn-trait-underscore.rs:18:5
   |
16 |   fn a<T>(items: &[T]) -> Box<dyn Iterator<Item=&T>> {
   |  ____________________________________________________-
17 | |     //                      ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `'static`
18 | |     Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime
   | |     ^^^^^^^^^^^^^^^^^^^^^^
   | |     |
   | |     Cast
   | |     Cast
19 | | }
   | |_- Cast

I don't know if it's great, because we end up with a lot of Cast. Though, not all tests are like that.

@davidtwco davidtwco force-pushed the nll-dyn-trait-underscore-error-improvements branch from c34548b to c28eebd Compare June 20, 2018 22:11
@davidtwco
Copy link
Member Author

Rebased and addressed the above comments.

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/46/ad/28647c5e1f4bb4094af886e203cfde5543fafd6a5bf830a85909d2058f9f/awscli-1.15.42-py2.py3-none-any.whl (1.3MB)
    0% |▎                               | 10kB 14.2MB/s eta 0:00:01
    1% |▌                               | 20kB 1.9MB/s eta 0:00:01
    2% |▉                               | 30kB 2.2MB/s eta 0:00:01
    3% |█                               | 40kB 2.0MB/s eta 0:00:01
---
[00:42:39] ....................................................................................................
[00:42:43] ....................................................................................................
[00:42:49] ....................................................................................................
[00:42:54] ....................................................................................................
[00:43:00] ......i.......................FFF.F........................................FFF........i.............
[00:43:10] ....................................................................................................
[00:43:16] ....................................................................................................
[00:43:22] .....................i..............................................................................
[00:43:22] ......
[00:43:22] ......
[00:43:22] failures:
[00:43:22] 
[00:43:22] ---- [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs stdout ----
[00:43:22] diff of stderr:
[00:43:22] 
[00:43:22] 4 LL |     foo(cell, |cell_a, cell_x| {
[00:43:22] 6 
[00:43:22] 6 
[00:43:22] - error: free region `ReFree(DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]), BrAnon(1))` does not outlive free region `'_#1r`
[00:43:22] + error: CallArgument
[00:43:22] +   --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:20
[00:43:22] 9    |
[00:43:22] 9    |
[00:43:22] 10 LL |         cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
[00:43:22] +    |                    ^^^^^^^^^^^^
[00:43:22] 12 
[00:43:22] 13 note: No external requirements
[00:43:22] 14   --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15
[00:43:22] 14   --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15
[00:43:22] 
[00:43:22] 
[00:43:22] The actual stderr differed from the expected stderr.
[00:43:22] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free/propagate-approximated-shorter-to-static-comparing-against-free.stderr
[00:43:22] To update references, rerun the tests and pass the `--bless` flag
[00:43:22] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs`
[00:43:22] error: 1 errors occurred comparing output.
[00:43:22] status: exit code: 101
[00:43:22] status: exit code: 101
[00:43:22] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free/auxiliary" "-A" "unused"
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] ------------------------------------------
[00:43:22] stderr:
[00:43:22] stderr:
[00:43:22] ------------------------------------------
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":933,"byte_end":936,"line_start":31,"line_end":31,"column_start":5,"column_end":8,"is_primary":true,"text":[{"text":"    foo(cell, |cell_a, cell_x| {","highlight_start":5,"highlight_end":8}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:5\n   |\nLL |     foo(cell, |cell_a, cell_x| {\n   |     ^^^\n\n"}
[00:43:22] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":1040,"byte_end":1052,"line_start":33,"line_end":33,"column_start":20,"column_end":32,"is_primary":true,"text":[{"text":"        cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure","highlight_start":20,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:20\n   |\nLL |         cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure\n   |                    ^^^^^^^^^^^^\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":943,"byte_end":1143,"line_start":31,"line_end":35,"column_start":15,"column_end":6,"is_primary":true,"text":[{"text":"    foo(cell, |cell_a, cell_x| {","highlight_start":15,"highlight_end":33},{"text":"        //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"        cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure","highlight_start":1,"highlight_end":69},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]) with closure substs [\n    i32,\n    for<'r> extern \"rust-call\" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15\n   |\nLL |       foo(cell, |cell_a, cell_x| {\n   |  _______________^\nLL | |         //~^ WARNING not reporting region error due to nll\nLL | |         cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure\nLL | |         //~^ ERROR does not outlive free region\nLL | |     })\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]) with closure substs [\n               i32,\n               for<'r> extern \"rust-call\" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>))\n           ]\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":871,"byte_end":1146,"line_start":28,"line_end":36,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn case1() {","highlight_start":1,"highlight_end":13},{"text":"    let a = 0;","highlight_start":1,"highlight_end":15},{"text":"    let cell = Cell::new(&a);","highlight_start":1,"highlight_end":30},{"text":"    foo(cell, |cell_a, cell_x| {","highlight_start":1,"highlight_end":33},{"text":"        //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"        cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure","highlight_start":1,"highlight_end":69},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:5 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1\n   |\nLL | / fn case1() {\nLL | |     let a = 0;\nLL | |     let cell = Cell::new(&a);\nLL | |     foo(cell, |cell_a, cell_x| {\n...  |\nLL | |     })\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:5 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]) with substs []\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":1393,"byte_end":1506,"line_start":46,"line_end":48,"column_start":15,"column_end":6,"is_primary":true,"text":[{"text":"    foo(cell, |cell_a, cell_x| {","highlight_start":15,"highlight_end":33},{"text":"        cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error","highlight_start":1,"highlight_end":89},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:13 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]::{{closure}}[0]) with closure substs [\n    i32,\n    for<'r> extern \"rust-call\" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 2","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#0r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs:46:15\n   |\nLL |       foo(cell, |cell_a, cell_x| {\n   |  _______________^\nLL | |         cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error\nLL | |     })\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:13 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case2[0]::{{closure}}[0]) with closure substs [\n               i32,\n               for<'r> extern \"rust-call\" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>))\n           ]\n   = note: number of external vids: 2\n   = note: where '_#1r: '_#0r\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs","byte_start":1165,"byte_end":1509,"line_start":39,"line_end":49,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn case2() {","highlight_start":1,"highlight_end":13},{"text":"    let a = 0;","highlight_start":1,"highlight_end":15},{"text":"    let cell = Cell::new(&a);","highlight_start":1,"highlight_end":30},{"text":"    //~^ ERROR `a` does not live long enough","highlight_start":1,"highlight_end":45},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    // As you can see in the stderr output, this closure propoagates a","highlight_start":1,"highlight_end":71},{"text":"    // requirement that `'a: 'static'.","highlight_start":1,"highlight_end":39},{"text":"    foo(cell, |cell_a, cell_x| {","highlight_start":1,"highlight_end":33},{"text":"        cell_x.set(cell_a.get()); // forces 'a: 'x, implies 'a = 'static -> borrow error","highlight_start":1,"highlight_end":89},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:6 ~ propagainformation about this error, try `rustc --explain E0597`.\n"}
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] thread '[ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:43:22] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:43:22] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:43:22] 
[00:43:22] ---- [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs stdout ----
[00:43:22] diff of stderr:
[00:43:22] 
[00:43:22] 23    = note: number of external vids: 2
[00:43:22] 24    = note: where '_#1r: '_#0r
[00:43:22] 25 
[00:43:22] - error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic`
[00:43:22] + error: CallArgument
[00:43:22] 28    |
[00:43:22] 28    |
[00:43:22] 29 LL | /     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
[00:43:22] 
[00:43:22] 32 LL | |         // Only works if 'x: 'y:
[00:43:22] 33 LL | |         demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll
[00:43:22] 34 LL | |     });
[00:43:22] +    | |______^ CallArgument
[00:43:22] 36 
[00:43:22] 37 note: No external requirements
[00:43:22] 38   --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:44:1
[00:43:22] 38   --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:44:1
[00:43:22] 
[00:43:22] 
[00:43:22] The actual stderr differed from the expected stderr.
[00:43:22] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound/propagate-approximated-shorter-to-static-no-bound.stderr
[00:43:22] To update references, rerun the tests and pass the `--bless` flag
[00:43:22] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs`
[00:43:22] error: 1 errors occurred comparing output.
[00:43:22] status: exit code: 101
[00:43:22] status: exit code: 101
[00:43:22] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound/auxiliary" "-A" "unused"
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] ------------------------------------------
[00:43:22] stderr:
[00:43:22] stderr:
[00:43:22] ------------------------------------------
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1638,"byte_end":1661,"line_start":49,"line_end":49,"column_start":9,"column_end":32,"is_primary":true,"text":[{"text":"        demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll","highlight_start":9,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:49:9\n   |\nLL |         demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll\n   |         ^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1528,"byte_end":1717,"line_start":45,"line_end":50,"column_start":47,"column_end":6,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":47,"highlight_end":66},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":82},{"text":"    });","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [\n    i16,\n    for<'r, 's, 't0, 't1, 't2> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) u32>))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 2","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#0r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:45:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\n   |  _______________________________________________^\nLL | |         //~^ ERROR does not outlive free region\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [\n               i16,\n               for<'r, 's, 't0, 't1, 't2> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) u32>))\n           ]\n   = note: number of external vids: 2\n   = note: where '_#1r: '_#0r\n\n"}
[00:43:22] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1486,"byte_end":1718,"line_start":45,"line_end":50,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":5,"highlight_end":66},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":82},{"text":"    });","highlight_start":1,"highlight_end":7}],"label":"CallArgument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:45:5\n   |\nLL | /     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\nLL | |         //~^ ERROR does not outlive free region\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll\nLL | |     });\n   | |______^ CallArgument\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1416,"byte_end":1721,"line_start":44,"line_end":51,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":1,"highlight_end":66},{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":1,"highlight_end":66},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":82},{"text":"    });","highlight_start":1,"highlight_end":8},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:44:1\n   |\nLL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\nLL | |     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\nLL | |         //~^ ERROR does not outlive free region\nLL | |\n...  |\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs []\n\n"}
[00:43:22] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] thread '[ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:43:22] 
[00:43:22] 
[00:43:22] ---- [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs stdout ----
[00:43:22] diff of stderr:
[00:43:22] 
[00:43:22] 23    = note: number of external vids: 3
[00:43:22] 24    = note: where '_#1r: '_#0r
[00:43:22] 25 
[00:43:22] - error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic`
[00:43:22] + error: CallArgument
[00:43:22] 28    |
[00:43:22] 28    |
[00:43:22] 29 LL | /     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
[00:43:22] 
[00:43:22] 32 LL | |         demand_y(x, y, x.get())
[00:43:22] 33 LL | |         //~^ WARNING not reporting region error due to nll
[00:43:22] 34 LL | |     });
[00:43:22] +    | |______^ CallArgument
[00:43:22] 36 
[00:43:22] 37 note: No external requirements
[00:43:22] 38   --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1
[00:43:22] 38   --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1
[00:43:22] 
[00:43:22] 
[00:43:22] The actual stderr differed from the expected stderr.
[00:43:22] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound/propagate-approximated-shorter-to-static-wrong-bound.stderr
[00:43:22] To update references, rerun the tests and pass the `--bless` flag
[00:43:22] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs`
[00:43:22] error: 1 errors occurred comparing output.
[00:43:22] status: exit code: 101
[00:43:22] status: exit code: 101
[00:43:22] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound/auxiliary" "-A" "unused"
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] ------------------------------------------
[00:43:22] stderr:
[00:43:22] stderr:
[00:43:22] ------------------------------------------
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1725,"byte_end":1748,"line_start":51,"line_end":51,"column_start":9,"column_end":32,"is_primary":true,"text":[{"text":"        demand_y(x, y, x.get())","highlight_start":9,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs:51:9\n   |\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1603,"byte_end":1813,"line_start":48,"line_end":53,"column_start":47,"column_end":6,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {","highlight_start":47,"highlight_end":79},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"highlight_end":32},{"text":"        //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"    });","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [\n    i16,\n    for<'r, 's, 't0, 't1, 't2, 't3> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#0r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\n   |  _______________________________________________^\nLL | |         //~^ ERROR does not outlive free region\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |         //~^ WARNING not reporting region error due to nll\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [\n               i16,\n               for<'r, 's, 't0, 't1, 't2, 't3> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't3)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>))\n           ]\n   = note: number of external vids: 3\n   = note: where '_#1r: '_#0r\n\n"}
[00:43:22] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1561,"byte_end":1814,"line_start":48,"line_end":53,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {","highlight_start":5,"highlight_end":79},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"highlight_end":32},{"text":"        //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"    });","highlight_start":1,"highlight_end":7}],"label":"CallArgument","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs:48:5\n   |\nLL | /     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\nLL | |         //~^ ERROR does not outlive free region\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |         //~^ WARNING not reporting region error due to nll\nLL | |     });\n   | |______^ CallArgument\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1491,"byte_end":1817,"line_start":47,"line_end":54,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":1,"highlight_end":66},{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {","highlight_start":1,"highlight_end":79},{"text":"        //~^ ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"highlight_end":32},{"text":"        //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"    });","highlight_start":1,"highlight_end":8},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1\n   |\nLL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\nLL | |     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\nLL | |         //~^ ERROR does not outlive free region\nLL | |         // Only works if 'x: 'y:\n...  |\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs []\n\n"}
[00:43:22] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] thread '[ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:43:22] 
[00:43:22] 
[00:43:22] ---- [ui] ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs stdout ----
[00:43:22] diff of stderr:
[00:43:22] 
[00:43:22] 4 LL |         demand_y(x, y, x.get())
[00:43:22] 6 
[00:43:22] 6 
[00:43:22] - error: free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(4))` does not outlive free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(2))`
[00:43:22] + error: CallArgument
[00:43:22] +   --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9
[00:43:22] 9    |
[00:43:22] 9    |
[00:43:22] 10 LL |         demand_y(x, y, x.get())
[00:43:22] +    |         ^^^^^^^^^^^^^^^^^^^^^^^
[00:43:22] 12 
[00:43:22] 13 note: No external requirements
[00:43:22] 14   --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47
[00:43:22] 14   --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47
[00:43:22] 
[00:43:22] 
[00:43:22] The actual stderr differed from the expected stderr.
[00:43:22] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds/propagate-fail-to-approximate-longer-no-bounds.stderr
[00:43:22] To update references, rerun the tests and pass the `--bless` flag
[00:43:22] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs`
[00:43:22] error: 1 errors occurred comparing output.
[00:43:22] status: exit code: 101
[00:43:22] status: exit code: 101
[00:43:22] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds/auxiliary" "-A" "unused"
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] ------------------------------------------
[00:43:22] stderr:
[00:43:22] stderr:
[00:43:22] ------------------------------------------
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs","byte_start":1636,"byte_end":1659,"line_start":47,"line_end":47,"column_start":9,"column_end":32,"is_primary":true,"text":[{"text":"        demand_y(x, y, x.get())","highlight_start":9,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs:47:9\n   |\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:43:22] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs","byte_start":1636,"byte_end":1659,"line_start":47,"line_end":47,"column_start":9,"column_end":32,"is_primary":true,"text":[{"text":"        demand_y(x, y, x.get())","highlight_start":9,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs:47:9\n   |\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs","byte_start":1575,"byte_end":1769,"line_start":45,"line_end":50,"column_start":47,"column_end":6,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":47,"highlight_end":66},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"highlight_end":32},{"text":"        //~^ WARN not reporting region error due to nll","highlight_start":1,"highlight_end":56},{"text":"        //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"    });","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [\n    i16,\n    for<'r, 's, 't0, 't1, 't2> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs:45:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\n   |  _______________________________________________^\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |         //~^ WARN not reporting region error due to nll\nLL | |         //~| ERROR does not outlive free region\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]) with closure substs [\n               i16,\n               for<'r, 's, 't0, 't1, 't2> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#1r u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) u32>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>))\n           ]\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs","byte_start":1463,"byte_end":1773,"line_start":44,"line_end":51,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":1,"highlight_end":66},{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":1,"highlight_end":66},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"highlight_end":32},{"text":"        //~^ WARN not reporting region error due to nll","highlight_start":1,"highlight_end":56},{"text":"        //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":48},{"text":"    });","highlight_start":1,"highlight_end":8},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs:44:1\n   |\nLL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\nLL | |     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\n...  |\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]) with substs []\n\n"}
[00:43:22] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] thread '[ui] ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:43:22] 
[00:43:22] 
[00:43:22] ---- [ui] ui/nll/ty-outlives/projection-one-region-closure.rs stdout ----
[00:43:22] diff of stderr:
[00:43:22] 
[00:43:22] 40    |
[00:43:22] 41    = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`...
[00:43:22] 42 
[00:43:22] - error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`
[00:43:22] + error: CallArgument
[00:43:22] +   --> $DIR/projection-one-region-closure.rs:55:5
[00:43:22] 45    |
[00:43:22] 45    |
[00:43:22] 46 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:43:22] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:43:22] 48 
[00:43:22] 49 note: No external requirements
[00:43:22] 50   --> $DIR/projection-one-region-closure.rs:51:1
[00:43:22] 50   --> $DIR/projection-one-region-closure.rs:51:1
[00:43:22] 
[00:43:22] 88    |
[00:43:22] 89    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
[00:43:22] 90 
[00:43:22] - error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
[00:43:22] + error: CallArgument
[00:43:22] +   --> $DIR/projection-one-region-closure.rs:67:5
[00:43:22] 93    |
[00:43:22] 93    |
[00:43:22] 94 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:43:22] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:43:22] 96 
[00:43:22] 97 note: No external requirements
[00:43:22] 98   --> $DIR/projection-one-region-closure.rs:62:1
[00:43:22] 98   --> $DIR/projection-one-region-closure.rs:62:1
[00:43:22] 
[00:43:22] 137    |
[00:43:22] 138    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
[00:43:22] 139 
[00:43:22] - error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`
[00:43:22] + error: CallArgument
[00:43:22] +   --> $DIR/projection-one-region-closure.rs:89:5
[00:43:22] 142    |
[00:43:22] 142    |
[00:43:22] 143 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:43:22] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:43:22] 145 
[00:43:22] 146 note: No external requirements
[00:43:22] 147   --> $DIR/projection-one-region-closure.rs:74:1
[00:43:22] 147   --> $DIR/projection-one-region-closure.rs:74:1
[00:43:22] 
[00:43:22] 
[00:43:22] The actual stderr differed from the expected stderr.
[00:43:22] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-closure/projection-one-region-closure.stderr
[00:43:22] To update references, rerun the tests and pass the `--bless` flag
[00:43:22] To only update this specific test, also pass `--test-args nll/ty-outlives/projection-one-region-closure.rs`
[00:43:22] error: 1 errors occurred comparing output.
[00:43:22] status: exit code: 101
[00:43:22] status: exit code: 101
[00:43:22] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-closure/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-closure/auxiliary" "-A" "unused"
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] ------------------------------------------
[00:43:22] stderr:
[00:43:22] stderr:
[00:43:22] ------------------------------------------
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1582,"byte_end":1589,"line_start":55,"line_end":55,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:55:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1925,"byte_end":1932,"line_start":67,"line_end":67,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:67:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2869,"byte_end":2876,"line_start":89,"line_end":89,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:89:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1572,"byte_end":1598,"line_start":55,"line_end":55,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:19 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where T: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:55:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:19 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where T: '_#2r\n   = note: where '_#1r: '_#2r\n\n"}
[00:43:22] {"message":"the parameter type `T` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associated with them that represent\nhow long the data stored within them is guaranteed to be live. This lifetime\nmust be as long as the data needs to be alive, and missing the constraint that\ndenotes this will cause this error.\n\n```compile_fail,E0309\n// This won't compile because T is not constrained, meaning the data\n// stored in it is not guaranteed to last as long as the reference\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n```\n\nThis will compile, because it has the constraint on the type parameter:\n\n```\nstruct Foo<'a, T: 'a> {\n    foo: &'a T\n}\n```\n\nTo see why this is important, consider the case where `T` is itself a reference\n(e.g., `T = &str`). If we don't include the restriction that `T: 'a`, the\nfollowing code would be perfectly legal:\n\n```compile_fail,E0309\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n\nfn main() {\n    let v = \"42\".to_string();\n    let f = Foo{foo: &v};\n    drop(v);\n    println!(\"{}\", f.foo); // but we've already dropped v!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1572,"byte_end":1598,"line_start":55,"line_end":55,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the parameter type `T` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:55:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`...\n\n"}
[00:43:22] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1548,"byte_end":1599,"line_start":55,"line_end":55,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:55:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1453,"byte_end":1764,"line_start":51,"line_end":59,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":62},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":63},{"text":"    //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":44},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [\n    '_#1r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:51:1\n   |\nLL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | | {\n...  |\nLL | |     //~| ERROR does not outlive free region\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1915,"byte_end":1941,"line_start":67,"line_end":67,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where T: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:67:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i3ine_end":71,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":63},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"    'a: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":63},{"text":"    //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":44},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:62:1\n   |\nLL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     'a: 'a,\n...  |\nLL | |     //~| ERROR does not outlive free region\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2859,"byte_end":2885,"line_start":89,"line_end":89,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where T: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:89:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:27 ~ projection_one_region_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where T: '_#3r\n   = note: where '_#2r: '_#3r\n\n"}
[00:43:22] {"message":"the parameter type `T` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associated with them that represent\nhow long the data stored within them is guaranteed to be live. This lifetime\nmust be as long as the data needs to be alive, and missing the constraint that\ndenotes this will cause this error.\n\n```compile_fail,E0309\n// This won't compile because T is not constrained, meaning the data\n// stored in it is not guaranteed to last as long as the reference\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n```\n\nThis will compile, because it has the constraint on the type parameter:\n\n```\nstruct Foo<'a, T: 'a> {\n    foo: &'a T\n}\n```\n\nTo see why this is important, consider the case where `T` is itself a reference\n(e.g., `T = &str`). If we don't include the restriction that `T: 'a`, the\nfollowing code would be perfectly legal:\n\n```compile_fail,E0309\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n\nfn main() {\n    let v = \"42\".to_string();\n    let f = Foo{foo: &v};\n    drop(v);\n    println!(\"{}\", f.foo); // but we've already dropped v!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2859,"byte_end":2885,"line_start":89,"line_end":89,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the parameter type `T` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:89:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...\n\n"}
[00:43:22] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2835,"byte_end":2886,"line_start":89,"line_end":89,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:89:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2126,"byte_end":3107,"line_start":74,"line_end":93,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":60},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"    T::AssocType: 'a,","highlight_start":1,"highlight_end":22},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    // This error is unfortunate. This code ought to type-check: we","highlight_start":1,"highlight_end":68},{"text":"    // are projecting `<T as Anything<'b>>::AssocType`, and we know","highlight_start":1,"highlight_end":68},{"text":"    // that this outlives `'a` because of the where-clause. However,","highlight_start":1,"highlight_end":69},{"text":"    // the way the region checker works, we don't register this","highlight_start":1,"highlight_end":64},{"text":"    // outlives obligation, and hence we get an error: this is because","highlight_start":1,"highlight_end":71},{"text":"    // what we see is a projection like `<T as","highlight_start":1,"highlight_end":47},{"text":"    // Anything<'?0>>::AssocType`, and we don't yet know if `?0` will","highlight_start":1,"highlight_end":70},{"text":"    // equal `'b` or not, so we ignore the where-clause. Obviously we","highlight_start":1,"highlight_end":70},{"text":"    // can do better here with a more involved verification step.","highlight_start":1,"highlight_end":66},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":63},{"text":"    //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`","highlight_start":1,"highlight_end":100},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:74:1\n   |\nLL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     T::AssocType: 'a,\n...  |\nLL | |     //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)`\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":3263,"byte_end":3289,"line_start":102,"line_end":102,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where T: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:102:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:31 ~ projection_one_region_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where T: '_#3r\n   = note: where '_#2r: '_#3r\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":3126,"byte_end":3293,"line_start":96,"line_end":103,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":57},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"    T: 'a,","highlight_start":1,"highlight_end":11},{"text":"    'b: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:96:1\n   |\nLL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     T: 'a,\n...  |\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"aborting due to 6 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 6 previous errors\n\n"}
[00:43:22] {"message":"For more information about this error, try `rustc --explain E0309`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0309`.\n"}
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] thread '[ui] ui/nll/ty-outlives/projection-one-region-closure.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:43:22] 
[00:43:22] 
[00:43:22] ---- [ui] ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs stdout ----
[00:43:22] diff of stderr:
[00:43:22] 
[00:43:22] 31    = note: number of external vids: 3
[00:43:22] 32    = note: where '_#1r: '_#2r
[00:43:22] 33 
[00:43:22] - error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`
[00:43:22] + error: CallArgument
[00:43:22] +   --> $DIR/projection-one-region-trait-bound-closure.rs:47:5
[00:43:22] 36    |
[00:43:22] 36    |
[00:43:22] 37 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:43:22] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:43:22] 39 
[00:43:22] 40 note: No external requirements
[00:43:22] 41   --> $DIR/projection-one-region-trait-bound-clos
[00:43:22] 41   --> $DIR/projection-one-region-trait-bound-clos
[00:43:22] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure/projection-one-region-trait-bound-closure.stderr
[00:43:22] To update references, rerun the tests and pass the `--bless` flag
[00:43:22] To only update this specific test, also pass `--test-args nll/ty-outlives/projection-one-region-trait-bound-closure.rs`
[00:43:22] error: 1 errors occurred comparing output.
[00:43:22] status: exit code: 101
[00:43:22] status: exit code: 101
[00:43:22] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure/auxiliary" "-A" "unused"
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] ------------------------------------------
[00:43:22] stderr:
[00:43:22] stderr:
[00:43:22] ------------------------------------------
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1321,"byte_end":1328,"line_start":47,"line_end":47,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:47:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1601,"byte_end":1608,"line_start":58,"line_end":58,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:58:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2482,"byte_end":2489,"line_start":79,"line_end":79,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:79:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1311,"byte_end":1337,"line_start":47,"line_end":47,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:47:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:19 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where '_#1r: '_#2r\n\n"}
[00:43:22] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1287,"byte_end":1338,"line_start":47,"line_end":47,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:47:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1192,"byte_end":1440,"line_start":43,"line_end":50,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":62},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":44},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [\n    '_#1r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:43:1\n   |\nLL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | | {\n...  |\nLL | |     //~| ERROR does not outlive free region\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1591,"byte_end":1617,"line_start":58,"line_end":58,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:58:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where '_#2r: '_#3r\n\n"}
[00:43:22] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1567,"byte_end":1618,"line_start":58,"line_end":58,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:58:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1459,"byte_end":1720,"line_start":53,"line_end":61,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":63},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"    'a: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":44},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:53:1\n   |\nLL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     'a: 'a,\n...  |\nLL | |     //~| ERROR does not outlive free region\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2472,"byte_end":2498,"line_start":79,"line_end":79,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:79:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where '_#2r: '_#3r\n\n"}
[00:43:22] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2448,"byte_end":2499,"line_start":79,"line_end":79,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:79:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1739,"byte_end":2601,"line_start":64,"line_end":82,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":60},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"    T::AssocType: 'a,","highlight_start":1,"highlight_end":22},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    // This error is unfortunate. This code ought to type-check: we","highlight_start":1,"highlight_end":68},{"text":"    // are projecting `<T as Anything<'b>>::AssocType`, and we know","highlight_start":1,"highlight_end":68},{"text":"    // that this outlives `'a` because of the where-clause. However,","highlight_start":1,"highlight_end":69},{"text":"    // the way the region checker works, we don't register this","highlight_start":1,"highlight_end":64},{"text":"    // outlives obligation, and hence we get an error: this is because","highlight_start":1,"highlight_end":71},{"text":"    // what we see is a projection like `<T as","highlight_start":1,"highlight_end":47},{"text":"    // Anything<'?0>>::AssocType`, and we don't yet know if `?0` will","highlight_start":1,"highlight_end":70},{"text":"    // equal `'b` or not, so we ignore the where-clause. Obviously we","highlight_start":1,"highlight_end":70},{"text":"    // can do better here with a more involved verification step.","highlight_start":1,"highlight_end":66},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":44},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:64:1\n   |\nLL | / fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     T::AssocType: 'a,\n...  |\nLL | |     //~| ERROR does not outlive free region\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2746,"byte_end":2772,"line_start":90,"line_end":90,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:90:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where '_#2r: '_#3r\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2620,"byte_end":2776,"line_start":85,"line_end":91,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":57},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b>,","highlight_start":1,"highlight_end":21},{"text":"    'b: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:85:1\n   |\nLL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     'b: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":3117,"byte_end":3143,"line_start":102,"line_end":102,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:102:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where '_#1r: '_#2r\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2795,"byte_end":3147,"line_start":94,"line_end":103,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":47},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'a>,","highlight_start":1,"highlight_end":21},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    // Note that in this case the closure still propagates an external","highlight_start":1,"highlight_end":71},{"text":"    // requirement between two variables in its signature, but the","highlight_start":1,"highlight_end":67},{"text":"    // creator maps both those two region variables to `'a` on its","highlight_start":1,"highlight_end":67},{"text":"    // side.","highlight_start":1,"highlight_end":13},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [\n    '_#1r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:94:1\n   |\nLL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'a>,\nLL | | {\n...  |\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] thread '[ui] ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:43:22] 
[00:43:22] 
[00:43:22] ---- [ui] ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs stdout ----
[00:43:22] diff of stderr:
[00:43:22] 
[00:43:22] 239    = note: number of external vids: 3
[00:43:22] 240    = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r
[00:43:22] 241 
[00:43:22] - error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a))`
[00:43:22] + error: CallArgument
[00:43:22] +   --> $DIR/projection-two-region-trait-bound-closure.rs:108:5
[00:43:22] 244    |
[00:43:22] 244    |
[00:43:22] 245 LL |     with_signature(cell, t, |cell, t| require(cell, t));
[00:43:22] +    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[00:43:22] 247 
[00:43:22] 248 note: No external requirements
[00:43:22] 249   --> $DIR/projection-two-region-trait-bound-closure.rs:104:1
[00:43:22] 249   --> $DIR/projection-two-region-trait-bound-closure.rs:104:1
[00:43:22] 
[00:43:22] 
[00:43:22] The actual stderr differed from the expected stderr.
[00:43:22] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure/projection-two-region-trait-bound-closure.stderr
[00:43:22] To update references, rerun the tests and pass the `--bless` flag
[00:43:22] To only update this specific test, also pass `--test-args nll/ty-outlives/projection-two-region-trait-bound-closure.rs`
[00:43:22] error: 1 errors occurred comparing output.
[00:43:22] status: exit code: 101
[00:43:22] status: exit code: 101
[00:43:22] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure/auxiliary" "-A" "unused"
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] ------------------------------------------
[00:43:22] stderr:
[00:43:22] stderr:
[00:43:22] ------------------------------------------
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1378,"byte_end":1385,"line_start":48,"line_end":48,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:48:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1721,"byte_end":1728,"line_start":59,"line_end":59,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:59:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":2665,"byte_end":2672,"line_start":80,"line_end":80,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:80:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:43:22] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3349,"byte_end":3356,"line_start":108,"line_end":108,"column_start":39,"column_end":46,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":46}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:108:39\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                                       ^^^^^^^\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1368,"byte_end":1394,"line_start":48,"line_end":48,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:22 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#2r)>>::AssocType: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:48:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:22 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#2r)>>::AssocType: '_#3r\n\n"}
[00:43:22] {"message":"the associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associated with them that represent\nhow long the data stored within them is guaranteed to be live. This lifetime\nmust be as long as the data needs to be alive, and missing the constraint that\ndenotes this will cause this error.\n\n```compile_fail,E0309\n// This won't compile because T is not constrained, meaning the data\n// stored in it is not guaranteed to last as long as the reference\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n```\n\nThis will compile, because it has the constraint on the type parameter:\n\n```\nstruct Foo<'a, T: 'a> {\n    foo: &'a T\n}\n```\n\nTo see why this is important, consider the case where `T` is itself a reference\n(e.g., `T = &str`). If we don't include the restriction that `T: 'a`, the\nfollowing code would be perfectly legal:\n\n```compile_fail,E0309\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n\nfn main() {\n    let v = \"42\".to_string();\n    let f = Foo{foo: &v};\n    drop(v);\n    println!(\"{}\", f.foo); // but we've already dropped v!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1368,"byte_end":1394,"line_start":48,"line_end":48,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `<T as Anything<'_#5r, '_#6r>>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:48:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `<T as Anything<'_#5r, '_#6r>>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), 'a))`...\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1241,"byte_end":1552,"line_start":44,"line_end":51,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_late<'a2] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1711,"byte_end":1737,"line_start":59,"line_end":59,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:27 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:59:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:27 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n           ]\n   = note: number of external vids: 5\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:43:22] {"message":"the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associated with them that represent\nhow long the data stored within them is guaranteed to be live. This lifetime\nmust be as long as the data needs to be alive, and missing the constraint that\ndenotes this will cause this error.\n\n```compile_fail,E0309\n// This won't compile because T is not constrained, meaning the data\n// stored in it is not guaranteed to last as long as the reference\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n```\n\nThis will compile, because it has the constraint on the type parameter:\n\n```\nstruct Foo<'a, T: 'a> {\n    foo: &'a T\n}\n```\n\nTo see why this is important, consider the case where `T` is itself a reference\n(e.g., `T = &str`). If we don't include the restriction that `T: 'a`, the\nfollowing code would be perfectly legal:\n\n```compile_fail,E0309\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n\nfn main() {\n    let v = \"42\".to_string();\n    let f = Foo{foo: &v};\n    drop(v);\n    println!(\"{}\", f.foo); // but we've already dropped v!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1711,"byte_end":1737,"line_start":59,"line_end":59,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReEarlyBound(0, 'a)`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:59:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReEarlyBound(0, 'a)`...\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1571,"byte_end":1895,"line_start":54,"line_end":62,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":67},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'c>,","highlight_start":1,"highlight_end":25},{"text":"    'a: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough","highlight_start":1,"highlight_end":99},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:54:1\n   |\nLL | / fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'c>,\nLL | |     'a: 'a,\n...  |\nLL | |     //~| ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":2655,"byte_end":2681,"line_start":80,"line_end":80,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:80:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n           ]\n   = note: number of external vids: 5\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:43:22] {"message":"the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associated with them that represent\nhow long the data stored within them is guaranteed to be live. This lifetime\nmust be as long as the data needs to be alive, and missing the constraint that\ndenotes this will cause this error.\n\n```compile_fail,E0309\n// This won't compile because T is not constrained, meaning the data\n// stored in it is not guaranteed to last as long as the reference\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n```\n\nThis will compile, because it has the constraint on the type parameter:\n\n```\nstruct Foo<'a, T: 'a> {\n    foo: &'a T\n}\n```\n\nTo see why this is important, consider the case where `T` is itself a reference\n(e.g., `T = &str`). If we don't include the restriction that `T: 'a`, the\nfollowing code would be perfectly legal:\n\n```compile_fail,E0309\nstruct Foo<'a, T> {\n    foo: &'a T\n}\n\nfn main() {\n    let v = \"42\".to_string();\n    let f = Foo{foo: &v};\n    drop(v);\n    println!(\"{}\", f.foo); // but we've already dropped v!\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":2655,"byte_end":2681,"line_start":80,"line_end":80,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReEarlyBound(0, 'a)`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:80:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReEarlyBound(0, 'a)`...\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1914,"byte_end":2839,"line_start":65,"line_end":83,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":64},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'c>,","highlight_start":1,"highlight_end":25},{"text":"    T::AssocType: 'a,","highlight_start":1,"highlight_end":22},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    // This error is unfortunate. This code ought to type-check: we","highlight_start":1,"highlight_end":68},{"text":"    // are projecting `<T as Anything<'b>>::AssocType`, and we know","highlight_start":1,"highlight_end":68},{"text":"    // that this outlives `'a` because of the where-clause. However,","highlight_start":1,"highlight_end":69},{"text":"    // the way the region checker works, we don't register this","highlight_start":1,"highlight_end":64},{"text":"    // outlives obligation, and hence we get an error: this is because","highlight_start":1,"highlight_end":71},{"text":"    // what we see is a projection like `<T as","highlight_start":1,"highlight_end":47},{"text":"    // Anything<'?0>>::AssocType`, and we don't yet know if `?0` will","highlight_start":1,"highlight_end":70},{"text":"    // equal `'b` or not, so we ignore the where-clause. Obviously we","highlight_start":1,"highlight_end":70},{"text":"    // can do better here with a more involved verification step.","highlight_start":1,"highlight_end":66},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough","highlight_start":1,"highlight_end":99},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:65:1\n   |\nLL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'c>,\nLL | |     T::AssocType: 'a,\n...  |\nLL | |     //~| ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":2993,"byte_end":3019,"line_start":91,"line_end":91,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:91:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n           ]\n   = note: number of external vids: 5\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":2858,"byte_end":3023,"line_start":86,"line_end":92,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn elements_outlive1<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":62},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'c>,","highlight_start":1,"highlight_end":25},{"text":"    'b: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":nuhighlight_start":1,"highlight_end":25},{"text":"    'c: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:95:1\n   |\nLL | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'c>,\nLL | |     'c: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3339,"byte_end":3365,"line_start":108,"line_end":108,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:108:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r\n\n"}
[00:43:22] {"message":"CallArgument","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3315,"byte_end":3366,"line_start":108,"line_end":108,"column_start":5,"column_end":56,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":5,"highlight_end":56}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: CallArgument\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:108:5\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3226,"byte_end":3468,"line_start":104,"line_end":111,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":52},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'b>,","highlight_start":1,"highlight_end":25},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":55},{"text":"    //~| ERROR does not outlive free region","highlight_start":1,"highlight_end":44},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [\n    '_#1r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:104:1\n   |\nLL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'b>,\nLL | | {\n...  |\nLL | |     //~| ERROR does not outlive free region\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3620,"byte_end":3646,"line_start":119,"line_end":119,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#2r)>>::AssocType: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:119:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#2r)>>::AssocType: '_#3r\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3487,"byte_end":3650,"line_start":114,"line_end":120,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":60},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'b>,","highlight_start":1,"highlight_end":25},{"text":"    'b: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:114:1\n   |\nLL | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'b>,\nLL | |     'b: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3995,"byte_end":4021,"line_start":131,"line_end":131,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:131:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r\n\n"}
[00:43:22] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3669,"byte_end":4025,"line_start":123,"line_end":132,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":47},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'a, 'a>,","highlight_start":1,"highlight_end":25},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    // Note that in this case the closure still propagates an external","highlight_start":1,"highlight_end":71},{"text":"    // requirement between two variables in its signature, but the","highlight_start":1,"highlight_end":67},{"text":"    // creator maps both those two region variables to `'a` on its","highlight_start":1,"highlight_end":67},{"text":"    // side.","highlight_start":1,"highlight_end":13},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [\n    '_#1r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:123:1\n   |\nLL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'a, 'a>,\nLL | | {\n...  |\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:43:22] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:43:22] {"message":"For more information about this error, try `rustc --explain E0309`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0309`.\n"}
[00:43:22] ------------------------------------------
[00:43:22] 
[00:43:22] thread '[ui] ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3139:9
[00:43:22] 
---
[00:43:22] test result: FAILED. 1494 passed; 7 failed; 5 ignored; 0 measured; 0 filtered out
[00:43:22] 
[00:43:22] 
[00:43:22] 
[00:43:22] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-3.9/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "3.9.1\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:43:22] thread 'main' panicked at 'Some tests failed', tools/compiletest/src/main.rs:498:22
[00:43:22] 
[00:43:22] 
[00:43:22] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:43:22] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:43:22] Build completed unsuccessfully in 0:02:00
[00:43:22] Makefile:58: recipe for target 'check' failed
[00:43:22] make: *** [check] Error 1

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:23e5ca1d
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@pietroalbini pietroalbini added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 25, 2018
@pietroalbini
Copy link
Member

Ping from triage @davidtwco! There are test failures you should fix.

@davidtwco davidtwco changed the title WIP: NLL: bad error message when converting anonymous lifetime to 'static NLL: bad error message when converting anonymous lifetime to 'static Jun 27, 2018
@pietroalbini pietroalbini added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 27, 2018
Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good but for the nit that error messages in compiler should begin with lowercase letter

@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jun 27, 2018

📌 Commit 06b35ef87cadb18366d119496239bb1a75ac7a4f has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 27, 2018
@bors
Copy link
Contributor

bors commented Jun 27, 2018

☔ The latest upstream changes (presumably #51139) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jun 27, 2018
@nikomatsakis
Copy link
Contributor

@davidtwco needs rebase :(

@nikomatsakis nikomatsakis force-pushed the nll-dyn-trait-underscore-error-improvements branch from 06b35ef to ac8aef2 Compare June 28, 2018 20:15
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:49:33] .........................i......................test [ui] ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs has been running for over 60 seconds
[00:49:33] test [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs has been running for over 60 seconds
[00:49:33] test [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs has been running for over 60 seconds
[00:49:33] test [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs has been running for over 60 seconds
[00:50:55] F..test [ui] ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs has been running for over 60 seconds
[00:52:08] FF........................test [ui] ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs has been running for over 60 seconds
[00:52:18] test [ui] ui/nll/issue-50716.rs has been running for over 60 seconds
[00:53:32] F.................test [ui] ui/nll/ty-outlives/projection-one-region-closure.rs has been running for over 60 seconds

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-3.9 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:45:41] ....................................................................................................
[00:45:46] ....................................................................................................
[00:45:52] ....................................................................................................
[00:45:57] ....................................................................................................
[00:46:04] .........................i........................FF..........................F.....................
[00:46:14] ....................................................................................................
[00:46:20] ....................................................................................................
[00:46:27] .................................................i..................................................
[00:46:29] ..................................
[00:46:29] ..................................
[00:46:29] failures:
[00:46:29] 
[00:46:29] ---- [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs stdout ----
[00:46:29] diff of stderr:
[00:46:29] 
[00:46:29] 32 LL | |         // Only works if 'x: 'y:
[00:46:29] 33 LL | |         demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll
[00:46:29] 34 LL | |     });
[00:46:29] +    | |______^
[00:46:29] 36 
[00:46:29] 37 note: No external requirements
[00:46:29] 38   --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:44:1
[00:46:29] 38   --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:44:1
[00:46:29] 
[00:46:29] 
[00:46:29] The actual stderr differed from the expected stderr.
[00:46:29] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound/propagate-approximated-shorter-to-static-no-bound.stderr
[00:46:29] To update references, rerun the tests and pass the `--bless` flag
[00:46:29] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs`
[00:46:29] error: 1 errors occurred comparing output.
[00:46:29] status: exit code: 101
[00:46:29] status: exit code: 101
[00:46:29] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound/auxiliary" "-A" "unused"
[00:46:29] ------------------------------------------
[00:46:29] 
[00:46:29] ------------------------------------------
[00:46:29] stderr:
[00:46:29] stderr:
[00:46:29] ------------------------------------------
[00:46:29] {"message":"not reporting region error due to nll","code":null,"level":"warning","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1662,"byte_end":1685,"line_start":49,"line_end":49,"column_start":9,"column_end":32,"is_primary":true,"text":[{"text":"        demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll","highlight_start":9,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorll<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't2)) u32>))\n           ]\n   = note: number of external vids: 2\n   = note: where '_#1r: '_#0r\n\n"}
[00:46:29] {"message":"argument requires that data must outlive free region `ReStatic`","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1486,"byte_end":1742,"line_start":45,"line_end":50,"column_start":5,"column_end":7,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":5,"highlight_end":66},{"text":"        //~^ ERROR argument requires that data must outlive free region","highlight_start":1,"highlight_end":72},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":82},{"text":"    });","highlight_start":1,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: argument requires that data must outlive free region `ReStatic`\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:45:5\n   |\nLL | /     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\nLL | |         //~^ ERROR argument requires that data must outlive free region\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll\nLL | |     });\n   | |______^\n\n"}
[00:46:29] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1416,"byte_end":1745,"line_start":44,"line_end":51,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":1,"highlight_end":66},{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {","highlight_start":1,"highlight_end":66},{"text":"        //~^ ERROR argument requires that data must outlive free region","highlight_start":1,"highlight_end":72},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":82},{"text":"    });","highlight_start":1,"highlight_end":8},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:44:1\n   |\nLL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\nLL | |     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\nLL | |         //~^ ERROR argument requires that data must outlive free region\nLL | |\n...  |\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs []\n\n"}
[00:46:29] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:46:29] ------------------------------------------
[00:46:29] 
[00:46:29] thread '[ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3140:9
[00:46:29] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:46:29] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:46:29] 
[00:46:29] ---- [ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs stdout ----
[00:46:29] diff of stderr:
[00:46:29] 
[00:46:29] 32 LL | |         demand_y(x, y, x.get())
[00:46:29] 33 LL | |         //~^ WARNING not reporting region error due to nll
[00:46:29] 34 LL | |     });
[00:46:29] +    | |______^
[00:46:29] 36 
[00:46:29] 37 note: No external requirements
[00:46:29] 38   --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1
[00:46:29] 38   --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1
[00:46:29] 
[00:46:29] 
[00:46:29] The actual stderr differed from the expected stderr.
[00:46:29] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound/propagate-approximary":true,"text":[{"text":"        demand_y(x, y, x.get())","highlight_start":9,"highlight_end":32}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"warning: not reporting region error due to nll\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs:51:9\n   |\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^\n\n"}
[00:46:29] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1603,"byte_end":1837,"line_start":48,"line_end":53,"column_start":47,"column_end":6,"is_primary":true,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {","highlight_start":47,"highlight_end":79},{"text":"        //~^ ERROR argument requires that data must outlive free region","highlight_start":1,"highlight_end":72},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"highlight_end":32},{"text":"        //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"    });","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:18 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]::{{closure}}[0]) with closure substs [\n    i16,\n    for<3},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"highlight_end":32},{"text":"        //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"    });","highlight_start":1,"highlight_end":7}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: argument requires that data must outlive free region `ReStatic`\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs:48:5\n   |\nLL | /     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\nLL | |         //~^ ERROR argument requires that data must outlive free region\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |         //~^ WARNING not reporting region error due to nll\nLL | |     });\n   | |______^\n\n"}
[00:46:29] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1491,"byte_end":1841,"line_start":47,"line_end":54,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":1,"highlight_end":66},{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {","highlight_start":1,"highlight_end":79},{"text":"        //~^ ERROR argument requires that data must outlive free region","highlight_start":1,"highlight_end":72},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(x, y, x.get())","highlight_start":1,"highlight_end":32},{"text":"        //~^ WARNING not reporting region error due to nll","highlight_start":1,"highlight_end":59},{"text":"    });","highlight_start":1,"highlight_end":8},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1\n   |\nLL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\nLL | |     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\nLL | |         //~^ ERROR argument requires that data must outlive free region\nLL | |         // Only works if 'x: 'y:\n...  |\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs []\n\n"}
[00:46:29] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:46:29] ------------------------------------------
[00:46:29] 
[00:46:29] thread '[ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs' panicked at 'explicit panic00:46:29] ------------------------------------------
[00:46:29] thread '[ui] ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs' panicked at 'explicit panic00:46:29] ------------------------------------------
[00:46:29] {"message":"assignment requires that data must outlive free region `'static`","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/issue-50716.rs","byte_start":751,"byte_end":753,"line_start":25,"line_end":25,"column_start":14,"column_end":16,"is_primary":true,"text":[{"text":"    let _x = *s; //~ ERROR free region `'a` does not outlive free region `'static`","highlight_start":14,"highlight_end":16}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: assignment requires that data must outlive free region `'static`\n  --> /checkout/src/test/ui/nll/issue-50716.rs:25:14\n   |\nLL |     let _x = *s; //~ ERROR free region `'a` does not outlive free region `'static`\n   |              ^^\n\n"}
[00:46:29] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:46:29] ------------------------------------------
[00:46:29] 
[00:46:29] thread '[ui] ui/nll/issue-50716.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3140:9
[00:46:29] 
---
144088 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu
144084 ./obj/build/x86_64-unknown-linux-gnu/stage1-rustc/x86_64-unknown-linux-gnu/release
138748 ./obj/build/bootstrap/debug/incremental
124176 ./obj/build/bootstrap/debug/incremental/bootstrap-1r3bppl29tbrj
124172 ./obj/build/bootstrap/debug/incremental/bootstrap-1r3bppl29tbrj/s-f2g5m2h0cs-1nabiy0-38adk87dv7782
107256 ./obj/build/x86_64-unknown-linux-gnu/stage1-std/x86_64-unknown-linux-gnu/release
103608

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@lqd lqd removed the A-NLL Area: Non-lexical lifetimes (NLL) label Jun 30, 2018
@bors
Copy link
Contributor

bors commented Jul 1, 2018

☔ The latest upstream changes (presumably #51855) made this pull request unmergeable. Please resolve the merge conflicts.

@davidtwco davidtwco force-pushed the nll-dyn-trait-underscore-error-improvements branch from 37b0cc6 to c0c4741 Compare July 1, 2018 15:14
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented Jul 1, 2018

📌 Commit c0c4741 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 1, 2018
@bors
Copy link
Contributor

bors commented Jul 1, 2018

⌛ Testing commit c0c4741 with merge 6af9f91...

bors added a commit that referenced this pull request Jul 1, 2018
…vements, r=nikomatsakis

NLL: bad error message when converting anonymous lifetime to `'static`

Contributes to #46983. This PR doesn't introduce fantastic errors, but it should hopefully lay some groundwork for diagnostic improvements.
r? @nikomatsakis
@bors
Copy link
Contributor

bors commented Jul 1, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: nikomatsakis
Pushing 6af9f91 to master...

@bors bors merged commit c0c4741 into rust-lang:master Jul 1, 2018
@bors bors mentioned this pull request Jul 1, 2018
11 tasks
bors added a commit that referenced this pull request Jul 6, 2018
refactor and cleanup region errors for NLL

This is a WIP commit. It simplifies some of the code from #51536 and extends a few more steps towards the errors that @davidtwco and I were shooting for. These are intended as a replacement for the general "unable to infer lifetime" messages -- one that is actually actionable. We're certainly not there yet, but the overall shape hopefully gets a bit clearer.

I'm thinking about trying to open up an internals thread to sketch out the overall plan and perhaps discuss how to get the wording right, which special cases to handle, etc.

r? @estebank
cc @davidtwco
@davidtwco davidtwco deleted the nll-dyn-trait-underscore-error-improvements branch August 14, 2018 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants