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

do not propagate closure requirements if we can prove them locally #53745

Merged
merged 5 commits into from Sep 8, 2018

Conversation

Projects
None yet
8 participants
@nikomatsakis
Contributor

nikomatsakis commented Aug 27, 2018

Fixes #53570

cc @mikhail-m1 -- you're the one who last touched this code

r? @pnkfelix

@TimNN

This comment has been minimized.

Show comment
Hide comment
@TimNN

TimNN Sep 4, 2018

Contributor

Ping from triage @pnkfelix / @rust-lang/compiler: This PR requires your review.

Contributor

TimNN commented Sep 4, 2018

Ping from triage @pnkfelix / @rust-lang/compiler: This PR requires your review.

@estebank

This comment has been minimized.

Show comment
Hide comment
@estebank

estebank Sep 5, 2018

Contributor

@bors r+

Contributor

estebank commented Sep 5, 2018

@bors r+

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 5, 2018

Contributor

📌 Commit dacd8b3 has been approved by estebank

Contributor

bors commented Sep 5, 2018

📌 Commit dacd8b3 has been approved by estebank

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 5, 2018

Contributor

⌛️ Testing commit dacd8b3 with merge 25e0704...

Contributor

bors commented Sep 5, 2018

⌛️ Testing commit dacd8b3 with merge 25e0704...

bors added a commit that referenced this pull request Sep 5, 2018

Auto merge of #53745 - nikomatsakis:nll-issue-53570, r=estebank
do not propagate closure requirements if we can prove them locally

Fixes #53570

cc @mikhail-m1 -- you're the one who last touched this code

r? @pnkfelix
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 5, 2018

Contributor

💔 Test failed - status-appveyor

Contributor

bors commented Sep 5, 2018

💔 Test failed - status-appveyor

@estebank

This comment has been minimized.

Show comment
Hide comment
@estebank

estebank Sep 5, 2018

Contributor

@bors r-

@nikomatsakis the nll errors are not stable :-/

Contributor

estebank commented Sep 5, 2018

@bors r-

@nikomatsakis the nll errors are not stable :-/

@Mark-Simulacrum

This comment has been minimized.

Show comment
Hide comment
@Mark-Simulacrum

Mark-Simulacrum Sep 7, 2018

Member

@bors p=1 on RC milestone

Member

Mark-Simulacrum commented Sep 7, 2018

@bors p=1 on RC milestone

@rust-highfive

This comment has been minimized.

Show comment
Hide comment
@rust-highfive

rust-highfive Sep 7, 2018

Collaborator

The job x86_64-gnu-llvm-5.0 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:46:39] ....................................................................................................
[00:46:42] ....................................................................................................
[00:46:45] ...........................................................................i........................
[00:46:48] ....................................................................................................
[00:46:51] .........................i.i..ii.................................................................FF.
[00:46:55] FFFFFFF..........................................................................F.FFFFFF..F........
[00:47:01] ....................................................................................................
[00:47:03] ....................................................................................................
[00:47:06] ....................................................................................................
[00:47:09] ..................................................................i.................................
---
[00:51:57] ---- [ui] ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs stdout ----
[00:51:57] diff of stderr:
[00:51:57] 
[00:51:57] 12                i16,
[00:51:57] 13                for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>))
[00:51:57] 14            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]), BrNamed(crate0:DefIndex(1:17), 'a)) is '_#4r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]), BrNamed(crate0:DefIndex(1:19), 'c)) is '_#5r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]), BrNamed(crate0:DefIndex(1:18), 'b)) is '_#6r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] +    = note: late-bound region is '_#5r
[00:51:57] +    = note: late-bound region is '_#6r
[00:51:57] 19 error: unsatisfied lifetime constraints
[00:51:57] 20   --> $DIR/propagate-approximated-fail-no-postdom.rs:56:13
[00:51:57] 
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom/propagate-approximated-fail-no-postdom.stderr
[00:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-fail-no-postdom.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.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-fail-no-postdom/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-fail-no-postdom/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs","byte_start":1569,"byte_end":1729,"line_start":53,"line_end":57,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"        |_outlives1, _outlives2, _outlives3, x, y| {","highlight_start":9,"highlight_end":53},{"text":"            // Only works if 'x: 'y:","highlight_start":1,"highlight_end":37},{"text":"            let p = x.get();","highlight_start":1,"highlight_end":29},{"text":"            demand_y(x, y, p) //~ ERROR","highlight_start":1,"highlight_end":40},{"text":"        },","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]) with closure substs [\n    i16,\n    for<'r, 's> extern \"rust-call\" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#5r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#6r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs:53:9\n   |\nLL | /         |_outlives1, _outlives2, _outlives3, x, y| {\nLL | |             // Only works if 'x: 'y:\nLL | |             let p = x.get();\nLL | |             demand_y(x, y, p) //~ ERROR\nLL | |         },\n   | |_________^\n   |\n   = note: defining type: DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]) with closure substs [\n               i16,\n               for<'r, 's> extern \"rust-call\" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndl}],"children":[],"rendered":"error: unsatisfied lifetime constraints\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs:56:13\n   |\nLL |         |_outlives1, _outlives2, _outlives3, x, y| {\n   |          ----------              ---------- has type `std::cell::Cell<&'2 &u32>`\n   |          |\n   |          has type `std::cell::Cell<&&'1 u32>`\n...\nLL |             demand_y(x, y, p) //~ ERROR\n   |             ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs","byte_start":1391,"byte_end":1739,"line_start":48,"line_end":59,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {","highlight_start":1,"highlight_end":93},{"text":"    establish_relationships(","highlight_start":1,"highlight_end":29},{"text":"        cell_a,","highlight_start":1,"highlight_end":16},{"text":"        cell_b,","highlight_start":1,"highlight_end":16},{"text":"        cell_c,","highlight_start":1,"highlight_end":16},{"text":"        |_outlives1, _outlives2, _outlives3, x, y| {","highlight_start":1,"highlight_end":53},{"text":"            // Only works if 'x: 'y:","highlight_start":1,"highlight_end":37},{"text":"            let p = x.get();","highlight_start":1,"highlight_end":29},{"text":"            demand_y(x, y, p) //~ ERROR","highlight_start":1,"highlight_end":40},{"text":"        },","highlighern "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), 't1)) &'_#2r 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>))
[00:51:57] 16            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]), BrNamed(crate0:DefIndex(1:17), 'b)) is '_#3r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 19    = note: number of external vids: 5
[00:51:57] 20    = note: where '_#1r: '_#2r
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-ref/propagate-approximated-ref.stderr
[00:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-ref.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-ref.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-ref/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-ref/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs","byte_start":1861,"byte_end":2017,"line_start":53,"line_end":58,"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 unsatisfied lifetime constraints","highlight_start":1,"highlight_end":52},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlc/test/ui/nll/closure-requirements/propagate-approximated-ref.rs:53:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\n   |  _______________________________________________^\nLL | |         //~^ ERROR unsatisfied lifetime constraints\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:18 ~ propagate_approximated_ref[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<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r 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: late-bound region is '_#3r\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#1r: '_#2r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs","byte_start":1749,"byte_end":2021,"line_start":52,"line_end":59,"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 unsatisfied lifetime constraints","highlight_start":1,"highlight_end":52},{"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())","highlight_start":1,"highlight_end":32},{"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_ref[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-ref.rs:52: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 unsatisfied lifetime constraints\nLL | |\n...  |\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]) with substs []\n\n"}
[00:51:57] {"message":"unsatisfied lifetime constraints","code":null,"level":"error","spans":[{"file_name"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":"late-bound region is '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","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\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |     });\n   | |____/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1486,"byte_end":1639,"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","highlight_start":1,"highlight_end":19},{"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())","highlight_start":1,"highlight_end":32},{"text":"    });","highlight_start":1,"highlight_end":7}],"label":"`cell_a` escapes the function body here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: borrowed data escapes outside of function\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:45:5\n   |\nLL |   fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\n   |                     ------ `cell_a` is a reference that is only valid in the function body\nLL | /     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\nLL | |         //~^ ERROR\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |     });\n   | |______^ `cell_a` escapes the function body here\n\n"}
[00:51:57] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:51:57] 
[00:51:57] ---------------------------------------xternal vids: 5
[00:51:57] 19    = note: where '_#1r: '_#0r
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] 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:51:57] 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:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] 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:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"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":1725,"line_start":48,"line_end":52,"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","highlight_start":1,"highlight_end":19},{"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":"    });","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::celdex(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: late-bound region is '_#3r\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#1r: '_#0r\n\n"}
[00:51:57] {"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":1729,"line_start":47,"line_end":53,"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","highlight_start":1,"highlight_end":19},{"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":"    });","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\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\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:51:57] {"message":"borrowed data escapes outside of function","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1509,"byte_end":1515,"line_start":47,"line_end":47,"column_start":19,"column_end":25,"is_primary":false,"text":[{"text":"fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":19,"highlight_end":25}],"label":"`cell_a` is a reference that is only valid in the function body","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1561,"byte_end":1726,"line_start":48,"line_end":52,"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","highlight_start":1,"highlight_end":,\n               for<'r, 's> extern \"rust-call\" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>))\n           ]\n   = note: late-bound region is '_#3r\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#1r: '_#2r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs","byte_start":1318,"byte_end":1600,"line_start":45,"line_end":52,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":1,"highlight_end":64},{"text":"    establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {","highlight_start":1,"highlight_end":75},{"text":"        //~^ ERROR unsatisfied lifetime constraints","highlight_start":1,"highlight_end":52},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(outlives1, outlives2, x.get())","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,"expansiggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs","byte_start":1386,"byte_end":1597,"line_start":46,"line_end":51,"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":75},{"text":"        //~^ ERROR unsatisfied lifetime constraints","highlight_start":1,"highlight_end":52},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(outlives1, outlives2, x.get())","highlight_start":1,"highlight_end":48},{"text":"    });","highlight_start":1,"highlight_end":7}],"label":"argument requires that `'a` must outlive `'b`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unsatisfied lifetime constraints\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs:46:5\n   |\nLL |   fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\n   |           --  -- lifetime `'b` defined here\n   |           |\n   |           lifetime `'a` defined here\nLL | /     establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {\nLL | |         //~^ ERROR unsatisfied lifetime constraints\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(outlives1, outlives2, x.get())\nLL | |     });\n   | |______^ argument requires that `'a` must outlive `'b`\n\n"}
[00:51:57] {"message":"aborting due to previous error","code":nuage":"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":1684,"line_start":45,"line_end":49,"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":"        //~^ ERROR","highlight_start":1,"highlight_end":19},{"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},{"message":"late-bound region is '_#2r","code":null,"level":"note","spans":[],|                                                has type `&std::cell::Cell<&'2 &u32>`\nLL |         // Only works if 'x: 'y:\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`\n\n"}
[00:51:57] {"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":1688,"line_start":44,"line_end":50,"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":"        //~^ ERROR","highlight_start":1,"highlight_end":19},{"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>, 7] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-from-trait-match.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-from-trait-match.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-from-trait-match/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-from-trait-match/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs","byte_start":1164,"byte_end":1461,"line_start":42,"line_end":56,"column_start":36,"column_end":6,"is_primary":true,"text":[{"text":"    establish_relationships(value, |value| {","highlight_start":36,"highlight_end":45},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // This function call requires that","highlight_start":1,"highlight_end":44},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // (a) T: Trait<'a>","highlight_start":1,"highlight_end":28},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // and","highlight_start":1,"highlight_end":15},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // (b) T: 'a","highlight_start":1,"highlight_end":21},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // The latter does not hold.","highlight_start":1,"highlight_end":37},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        require(value);","highlight_start":1,"highlight_end":24},{"text":"    });","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:16 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((T,))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#2r","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: '_#1r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs:42:36\n   |\nLL |       establish_relationships(value, |value| {\n   |  ____________________________________^\nLL | |         //~^ ERROR the parameter type `T` may not live long enough\nLL | |\nLL | |         // This function call requires that\n...  |\nLL | |         require(value);\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:16 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((T,))\n           ]\n   = note: late-bound region is '_#2r\n   = note: number of external vids: 3\n   = note: where T: '_#1r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs","byte_start":1076,"byte_end":1465,"line_start":38,"line_end":57,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn supply<'a, T>(value: T)","highlight_start":1,"highlight_end":27},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Trait<'a>,","highlight_start":1,"highlight_end":18},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    establish_relationships(value, |value| {","highlight_start":1,"highlight_end":45},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // This function call requires that","highlight_start":1,"highlight_end":44},{"text":"  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/closure-requirements/propagate-from-trait-match.rs","byte_start":1164,"byte_end":1461,"line_start":42,"line_end":56,"column_start":36,"column_end":6,"is_primary":true,"text":[{"text":"    establish_relationships(value, |value| {","highlight_start":36,"highlight_end":45},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // This function call requires that","highlight_start":1,"highlight_end":44},{"text":"        //","highlight_start":1,"highlight_end":1pagate-despite-same-free-region/propagate-despite-same-free-region.stderr
[00:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-despite-same-free-region.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 0
[00:51:57] status: exit code: 0
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.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-despite-same-free-region/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-despite-same-free-region/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs","byte_start":1620,"byte_end":1758,"line_start":52,"line_end":56,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"        |_outlives1, _outlives2, x, y| {","highlighthighlight_end":30},{"text":"        },","highlight_start":1,"highlight_end":11},{"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_despite_same_free_region[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-despite-same-free-region.rs:49:1\n   |\nLL | / fn supply<'a>(cell_a: Cell<&'a u32>) {\nLL | |     establish_relationships(\nLL | |         cell_a,\nLL | |         |_outlives1, _outlives2, x, y| {\n...  |\nLL | |     );\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_despite_same_free_region[317d]::supply[0]) with substs []\n\n"}
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] thread '[ui] ui/nll/closure-requirements/propagate-despite-same-free-region.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:51:57] 
[00:51:57] 
[00:51:57] ---- [ui] ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs stdout ----
[00:51:57] diff of stderr:
[00:51:57] 
[00:51:57] 13                i16,
[00:51:57] 14                for<'r, 's, 't0, 't1, 't2, 't3> 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(Debruij:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-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-wrong-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-wrong-bounds/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs","byte_start":1751,"byte_end":1873,"line_start":49,"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":"        // 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":"        //~^ ERROR","highlight_start":1,"highlight_end":19},{"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_wrong_bounds[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<&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)) &'_#2r 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":"late-bound region is '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","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-wrong-bounds.rs:49:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\n   |  _______________________u32>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs","byte_start":1764,"byte_end":1774,"line_start":49,"line_end":49,"column_start":60,"column_end":70,"is_primary":false,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {","highlight_start":60,"highlight_end":70}],"label":"has type `&std::cell::Cell<&'2 &u32>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs","byte_start":1825,"byte_end":1848,"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":"argument requires that `'1` must outlive `'2`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unsatisfied lifetime constraints\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:9\n   |\nLL |     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\n   |                                                ----------  ---------- has type `&std::cell::Cell<&'2 &u32>`\n   |                                                |\n   |                                                has type `&std::cell::Cell<&'1 &u32>`\nLL |         // Only works if 'x: 'y:\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs","byte_start":1639,"byte_end":1877,"line_start":48,"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":"        // 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":"        //~^ ERROR","highlight_start":1,"highlight_end":19},{"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_wrong_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-wrong-bounds.rs:48: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 | |         // Only works if 'x:n<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>","highlight_start":1,"highlight_end":57},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Iterator,","highlight_start":1,"highlight_end":17},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(x, |mut y| Box::new(y.next()))","highlight_start":1,"highlight_end":50},{"text":"    //~^ ERROR the associated type `<T as std::iter::Iterator>::Item` may not live long enough","highlight_start":1,"highlight_end":95},{"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 ~ projection_no_regions_closure[317d]::no_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-no-regions-closure.rs:31:1\n   |\nLL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>\nLL | | where\nLL | |     T: Iterator,\nLL | | {\nLL | |     with_signature(x, |mut y| Box::new(y.next()))\nLL | |     //~^ ERROR the associated type `<T as std::iter::Iterator>::Item` may not live long enough\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ projection_no_regions_closure[317d]::no_region[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:51:57] {"message":"the associated type `<T as std::iter::Iterator>::Item` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associciated type `<T as std::iter::Iterator>::Item` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs:35:23\n   |\nLL |     with_signature(x, |mut y| Box::new(y.next()))\n   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...\n\n"}
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs","byte_start":1295,"byte_end":1321,"line_start":44,"line_end":44,"column_start":23,"column_end":49,"is_primary":true,"text":[{"text":"    with_signature(x, |mut y| Box::new(y.next()))","highlight_start":23,"highlight_end":49}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:18 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#3r","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 std::iter::Iterator>::Item: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/'_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs:52:23\n   |\nLL |     with_signature(x, |mut y| Box::new(y.next()))\n   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:22 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>\n           ]\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where <T as std::iter::Iterator>::Item: '_#3r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs","byte_start":1343,"byte_end":1583,"line_start":48,"line_end":54,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>","highlight_start":1,"highlight_end":64},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: 'b + Iterator,","highlight_start":1,"highlight_end":22},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(x, |mut y| Box::new(y.next()))","highlight_start":1,"highlight_end":50},{"text":"    //~^ ERROR the associated type `<T as std::iter::Iterator>::Item` may not live long enough","highlight_start":1,"highlight_end":95},{"text":"}","higote","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs","byte_start":1733,"byte_end":1759,"line_start":62,"line_end":62,"column_start":23,"column_end":49,"is_primary":true,"text":[{"text":"    with_signature(x, |mut y| Box::new(y.next()))","highlight_start":23,"highlight_end":49}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","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 std::iter::Iterator>::Item: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs:62:23\n   |\nLL |     with_signature(x, |mut y| Box::new(y.next()))\n   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::boxed::Box<Tnew(y.next()))\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_no_regions_closure[317d]::outlives_region[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:51:57] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:51:57] {"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:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] thread '[ui] ui/nll/ty-outlives/projection-no-regions-closure.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:51:57] 
[00:51:57] 
[00:51:57] ---- [ui] ui/nll/ty-outlives/projection-one-region-closure.rs stdout ----
[00:51:57] diff of stderr:
[00:51:57] 
[00:51:57] 10                i32,
[00:51:57] 11                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 12            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a)) is '_#3r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 15    = note: number of external vids: 5
[00:51:57] 16    = note: where T: '_#2r
[00:51:57] 17    = note: where '_#1r: '_#2r
[00:51:57] 65                i32,
[00:51:57] 65                i32,
[00:51:57] 66                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
[00:51:57] 67            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]), BrNamed(crate0:DefIndex(1:22), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 69    = note: number of external vids: 5
[00:51:57] 70    = note: where T: '_#3r
[00:51:57] 71    = note: where '_#2r: '_#3r
[00:51:57] 120                i32,
[00:51:57] 120                i32,
[00:51:57] 121                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
[00:51:57] 122            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]), BrNamed(crate0:DefIndex(1:26), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 124    = note: number of external vids: 5
[00:51:57] 125    = note: where T: '_#3r
[00:51:57] 126    = note: where '_#2r: '_#3r
[00:51:57] 175                i32,
[00:51:57] 175                i32,
[00:51:57] 176                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
[00:51:57] 177            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]), BrNamed(crate0:DefIndex(1:30), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 179    = note: number of external vids: 5
[00:51:57] 180    = note: where T: '_#3r
[00:51:57] 181    = note: where '_#2r: '_#3r
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] 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:51:57] 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:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/ty-outlives/projection-one-region-closure.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] 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:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"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,"linlet 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:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1831,"byte_end":1857,"line_start":66,"line_end":66,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, tents","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1699,"byte_end":1939,"line_start":61,"line_end":69,"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":"    //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":63},{"text":"    //~| ERROR","highlight_start":1,"highlight_end":15},{"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:61: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\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_one_regionut/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:66:5\n   |\nLL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\n   |                           --  -- lifetime `'b` defined here\n   |                           |\n   |                           lifetime `'a` defined here\n...\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`\n\n"}
[00:51:57] {"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",  i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","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: '_#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:87: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: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where T: '_#3r\n   = note: where '_#2r: '_#3r\n\n"}
[00:51:57] {"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":1958,"byte_end":2799,"line_start":72,"line_end":90,"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":"    //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":63},{"text":"    //~| ERROR","highlight_start":1,"highlight_end":15},:[{"text":"fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":24,"highlight_end":26}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2667,"byte_end":2718,"line_start":87,"line_end":87,"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":"argument requires that `'b` must outlive `'a`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unsatisfied lifetime constraints\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:87:5\n   |\nLL | fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\n   |                        --  -- lifetime `'b` defined here\n   |                        |\n   |                        lifetime `'a` defined here\n...\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`\n\n"}
[00:51:57] {"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":2691,"byte_end":2717,"line_start":87,"line_end":87,"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:87:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider te0:DefIndex(1:30), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 152    = note: number of external vids: 5
[00:51:57] 153    = note: where '_#2r: '_#3r
[00:51:57] 
[00:51:57] 182                i32,
[00:51:57] 182                i32,
[00:51:57] 183                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 184            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]), BrNamed(crate0:DefIndex(1:33), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 186    = note: number of external vids: 4
[00:51:57] 187    = note: where '_#1r: '_#2r
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] 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:51:57] 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:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/ty-outlives/projection-one-region-trait-bound-closure.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] 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/projel,"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: late-bound region is '_#3r\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#1r: '_#2r\n\n"}
[00:51:57] {"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":1356,"line_start":43,"line_end":49,"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":"    //~^ ERROR","highlight_start":1,"highlight_endxt":"    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":"late-bound region is '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","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:57: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: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#2r: '_#3r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"notbound-closure.rs:57:5\n   |\nLL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\n   |                           --  -- lifetime `'b` defined here\n   |                           |\n   |                           lifetime `'a` defined here\n...\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`\n\n"}
[00:51:57] {"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":2304,"byte_end":2330,"line_start":77,"line_end":77,"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":"late-bound region is '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","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  -->ight_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":"    //~^ ERROR","highlight_start":1,"highlight_end":15},{"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:62: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\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:51:57] {"message":"unsatisfied lifetime constraints","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1598,"byte_end":1600,"line_start":62,"line_end":62,"column_start":28,"column_end":30,"is_primary":false,"text":[{"text":"fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":28,"highlight_end":30}],"label":"lifetime `'b` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1594,"byte_end":1596,"line_start":62,"line_end":62,"column_start":24,"column_end":26,"is_primary":false,"text":[{"text":"fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":24,"highlight_end":26}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2280,"byte_end":2331,"line_start":77,"line_end":77,"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":"argument requires that `'b` must outlive `'a`","suggested_replacement":null,"sugg":[],"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:87: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: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#2r: '_#3r\n\n"}
[00:51:57] {"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":2368,"byte_end":2524,"line_start":82,"line_end":88,"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:82: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:51:57] {"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":2865,"byte_end":2891,"line_start":99,"line_end":99,"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<&'_ 187    = note: number of external vids: 6
[00:51:57] 188    = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r
[00:51:57] 
[00:51:57] 218                i32,
[00:51:57] 218                i32,
[00:51:57] 219                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 220            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a)) is '_#3r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:45), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 223    = note: number of external vids: 5
[00:51:57] 224    = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r
[00:51:57] 
[00:51:57] 264                i32,
[00:51:57] 264                i32,
[00:51:57] 265                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
[00:51:57] 266            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]), BrNamed(crate0:DefIndex(1:49), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 268    = note: number of external vids: 5
[00:51:57] 269    = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#2r)>>::AssocType: '_#3r
[00:51:57] 
[00:51:57] 298                i32,
[00:51:57] 298                i32,
[00:51:57] 299                extern "rust-cnux-gnu/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"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":"late-bound region is '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#5r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 6","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":[],"render 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<'_#6r, '_#7r>>::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<'_#6r, '_#7r>>::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_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:53: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<'_#7r, '_#8r>>::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:51:57] {"message":"the associated type `<T as Anything<'_#7r, '_#8r>>::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 guaranteensider adding an explicit lifetime bound `<T as Anything<'_#7r, '_#8r>>::AssocType: ReEarlyBound(0, 'a)`...\n\n"}
[00:51:57] {"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":2545,"byte_end":2571,"line_start":78,"line_end":78,"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":"late-bound region is '_#5r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 6","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:78: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: late-bound region is '_#5r\n   = note: number of external vids: 6\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:51:57] {"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":1804,"byte_end":2674,"line_start":63,"line_end":80,"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}ne_start":78,"line_end":78,"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<'_#7r, '_#8r>>::AssocType: ReEarlyBound(0, 'a)`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the associated type `<T as Anything<'_#7r, '_#8r>>::AssocType` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:78: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<'_#7r, '_#8r>>::AssocType: ReEarlyBound(0, 'a)`...\n\n"}
[00:51:57] {"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":2828,"byte_end":2854,"line_start":88,"line_end":88,"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  ":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:83: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:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trng<'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:51:57] {"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":3174,"byte_end":3200,"line_start":105,"line_end":105,"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":"late-bound region is '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","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('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r","code":null,"level":"note","sions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":16,"highlight_end":18}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3150,"byte_end":3201,"line_start":105,"line_end":105,"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":"argument requires that `'b` must outlive `'a`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unsatisfied lifetime constraints\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:105:5\n   |\nLL | fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\n   |                --  -- lifetime `'b` defined here\n   |                |\n   |                lifetime `'a` defined here\n...\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`\n\n"}
[00:51:57] {"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":3371,"byte_end":3397,"line_start":115,"line_end":115,"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[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3238,"byte_end":3401,"line_start":110,"line_end":116,"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:110: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:51:57] {"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":3746,"byte_end":3772,"line_start":127,"line_end":127,"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":"late-bound region is '_#3r","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('_#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:127: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   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:119: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:51:57] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:51:57] {"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:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] thread '[ui] ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:51:57] 
[00:51:57] 
[00:51:57] ---- [ui] ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs stdout ----
[00:51:57] diff of stderr:
[00:51:57] 
[00:51:57] 9                i16,
[00:51:57] 10                for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))
[00:51:57] 11            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:5 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]), BrNamed(crate0:DefIndex(1:13), T)) is '_#2r
[00:51:57] +    = note: late-bound region is '_#2r
[00:51:57] 13    = note: number of external vids: 3
[00:51:57] 14    = note: where T: '_#1r
[00:51:57] 
[00:51:57] 37                i16,
[00:51:57] 37                i16,
[00:51:57] 38                for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))
[00:51:57] 39            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(1:15), 'a)) is '_#2r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(1:16), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#2r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 42    = note: number of external vids: 4
[00:51:57] 43    = note: where T: '_#1r
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound/ty-param-closure-approximate-lower-bound.stderr
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound/ty-param-closure-approximate-lower-bound.stderr
[00:51:5nvoke(a, b));","highlight_start":24,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [\n    T,\n    i16,\n    for<'r, 's> extern \"rust-call\" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#3r","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: '_#1r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs:39:24\n   |\nLL |     twice(cell, value, |a, b| invoke(a, b));\n   |                        ^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [\n               T,\n               i16,\n               for<'r, 's> extern \"rust-call\" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &Reeneric_fail[0]) with substs [\n               T\n           ]\n\n"}
[00:51:57] {"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/ty-param-closure-approximate-lower-bound.rs","byte_start":1085,"byte_end":1104,"line_start":39,"line_end":39,"column_start":24,"column_end":43,"is_primary":true,"text":[{"text":"    twice(cell, value, |a, b| invoke(a, b));","highlight_start":24,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null external requirements
[00:51:57] 
[00:51:57] 108                i32,
[00:51:57] 108                i32,
[00:51:57] 109                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
[00:51:57] 110            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:11 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]), BrNamed(crate0:DefIndex(1:30), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 113 note: No external requirements
[00:51:57] 114   --> $DIR/projection-one-region-trait-bound-static-closure.rs:78:1
[00:51:57] 
[00:51:57] 140                i32,
[00:51:57] 140                i32,
[00:51:57] 141                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 142            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:12 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]), BrNamed(crate0:DefIndex(1:33), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 145 note: No external requirements
[00:51:57] 146   --> $DIR/projection-one-region-trait-bound-static-closure.rs:87:1
[00:51:57] 
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure/projection-one-region-trait-bound-static-closure.stderr
[00:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nllend":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":"}","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_static_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-static-closure.rs:42:1\n   |\nLL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs","byte_start":1404,"byte_end":1430,"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,: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":"}","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_static_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-static-closure.rs:50:1\n   |\nLL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     'a: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs","byte_start":2186,"byte_end":2212,"line_start":74,"line_end":74,"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_static_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":"late-bound region is '_#4r","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-static-closure.rs:74: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_static_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: late-bound region is '_#4r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs","byte_start":1453,"byte_end":2216,"line_start":59,"line_end":75,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn projection_outlives<'a, 'b, T>(cell: Cell<ildren":[{"message":"defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_static_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-static-closure.rs:59: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 | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs","byte_start":2361,"byte_end":2387,"line_start":83,"line_end":83,"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_static_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":"late-bound region is '_#4r","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-static-closure.rs:83: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_static_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: late-bound region is '_#4r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs","byte_start":2235,"byte_end":2391,"line_start":78,"line_end":84,"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] 
[00:51:57] 10                i32,
[00:51:57] 11                extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn std::fmt::Debug + '_#2r)>
[00:51:57] 12            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:5 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:13), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 14    = note: number of external vids: 4
[00:51:57] 15    = note: where T: '_#2r
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type/ty-param-closure-outlives-from-return-type.stderr
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type/ty-param-closure-outlives-from-return-type.stderr
[00:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.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/ty-param-closure-outlives-from-return-type/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zvdenotes 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/ty-param-closure-outlives-from-return-type.rs","byte_start":1221,"byte_end":1226,"line_start":36,"line_end":36,"column_start":23,"column_end":28,"is_primary":true,"text":[{"text":"    with_signature(x, |y| y)","highlight_start":23,"highlight_end":28}],"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/ty-param-closure-outlives-from-return-type.rs:36:23\n   |\nLL |     with_signature(x, |y| y)\n   |                       ^^^^^\n   |\n   = helpuse[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:15), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#2r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 21    = note: number of external vids: 4
[00:51:57] 22    = note: where T: '_#1r
[00:51:57] 
[00:51:57] 71                i32,
[00:51:57] 71                i32,
[00:51:57] 72                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 73            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:7 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]), BrNamed(crate0:DefIndex(1:18), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 75    = note: number of external vids: 4
[00:51:57] 76    = note: where T: '_#2r
[00:51:57] 
[00:51:57] 109                i32,
[00:51:57] 109                i32,
[00:51:57] 110                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 111            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a)) is '_#3r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:22), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 114    = note: number of external vids: 5
[00:51:57] 115    = note: where T: '_#2r
[00:51:57] 
[00:51:57] 161                i32,
[00:51:57] 161                i32,
[00:51:57] 162                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs","byte_start":1011,"byte_end":1394,"line_start":37,"line_end":45,"column_start":26,"column_end":6,"is_primary":true,"text":[{"text":"    with_signature(a, b, |x, y| {","highlight_start":26,"highlight_end":34},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // See `correct_region`, which explains the point of this","highlight_start":1,"highlight_end":66},{"text":"        // test.  The only difference is that, in the case of this","highlight_start":1,"highlight_end":67},{"text":"        // function, there is no where clause *anywhere*, and hence we","highlight_start":1,"highlight_end":71},{"text":"        // get an error (but reported by the closure creator).","highlight_start":1,"highlight_end":63},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#1r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#3r","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: '_#1r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs:37:26\n   |\nLL |       with_signature(a, b, |x, y| {\n   |  __________________________^\nLL | |         //~^ ERROR the parameter type `T` may not live long enough\nLL | |         //\nLL | |         // See `correct_region`, which explains the point of this\n...  |\nLL | |         require(&x, &y)\nLL | |     })\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#1r ()>, T))\n           ]\n   = note: late-bound region is '_#2r\n   = note: late-bound region is '_#3r\n   = note: number of external vids: 4\n   = note: where T: '_#1r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs","byte_start"olumn_start":26,"column_end":6,"is_primary":true,"text":[{"text":"    with_signature(a, b, |x, y| {","highlight_start":26,"highlight_end":34},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // See `correct_region`, which explains the point of this","highlight_start":1,"highlight_end":66},{"text":"        // test.  The only difference is that, in the case of this","highlight_start":1,"highlight_end":67},{"text":"        // function, there is no where clause *anywhere*, and hence we","highlight_start":1,"highlight_end":71},{"text":"        // get an error (but reported by the closure creator).","highlight_start":1,"highlight_end":63},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:14), '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/ty-param-closure-outlives-from-where-clause.rs:37:26\n   |\nLL |       with_signature(a, b, |x, y| {\n   |  __________________________^\nLL | |         //~^ ERROR the parameter type `T` may not live long enough\nLL | |         //\nLL | |         // See `ect_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: late-bound region is '_#3r\n   = note: number of external vids: 4\n   = note: where T: '_#2r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs","byte_start":1416,"byte_end":2197,"line_start":49,"line_end":67,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)","highlight_start":1,"highlight_end":48},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: 'a,","highlight_start":1,"highlight_end":11},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(a, b, |x, y| {","highlight_start":1,"highlight_end":34},{"text":"        // Key point of this test:","highlight_start":1,"highlight_end":35},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // The *closure* is being type-checked with all of its free","highlight_start":1,"highlight_end":68},{"text":"        // regions \"universalized\". In particular, it does not know","highlight_start":1,"highlight_end":68},{"text":"        // that `x` has the type `Cell<&'a ()>`, but rather treats it","highlight_start":1,"highlight_end":70},{"text":"        // as if the type of `x` is `Cell<&'A ()>`, where `'A` is some","highlight_start":1,"highlight_end":71},{"text":"        // fresh, independent region distinct fre-outlives-from-where-clause.rs","byte_start":2310,"byte_end":2447,"line_start":74,"line_end":78,"column_start":26,"column_end":6,"is_primary":true,"text":[{"text":"    with_signature(a, b, |x, y| {","highlight_start":26,"highlight_end":34},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"        // See `correct_region`","highlight_start":1,"highlight_end":32},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_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":"late-bound region is '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","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: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs:74:26\n   |\nLL |       with_signature(a, b, |x, y| {\n   |  __________________________^\nLL | |         //~^ ERROR the parameter type `T` may not live long enough\nLL | |         // See `correct_region`\nLL | |         require(&x, &y)\nLL | |     })\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_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: late-bound region is '_#3r\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where T: '_#2r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs","byte_start":2216,"byte_end":2450,"line_start":70,"line_end":79,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)","highlight_start":1,"highlight_end":50},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: 'b,","highlight_start":1,"highlight_end":11},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(a, b, |x, y| {","highlight_start":1,"highlight_end":34},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"        // See `correct_region`","highlight_start":1,"highlight_end":32},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"estriction 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/ty-param-closure-outlives-from-where-clause.rs","byte_start":2310,"byte_end":2447,"line_start":74,"line_end":78,"column_start":26,"column_end":6,"is_primary":true,"text":[{"text":"    with_signature(a, b, |x, y| {","highlight_start":26,"highlight_end":34},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"        // See `correct_region`","highlight_start":1,"highlight_end":32},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), '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/ty-param-closure-outlives-from-where-clause.rs:74:26\n   |\nLL |       with_signature(a, b, |x, y| {\n   |  __________________________^\nLL | |         //~^ ERROR the parameter type `T` may not live long enough\nLL | |         // See `correct_region`\nLL | |         require(&x, &y)\nLL | |     })\n   | |_____^\n   |\n   = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a))`...\n\n"}
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs","byte_start":2578,"byte_end":2648,"line_start":87,"line_end":90,"column_start":26,"column_end":6,"is_primary":true,"text":[{"text":"    with_signature(a, b, |x, y| {","highlight_start":26,"highlight_end":34},{"text":"        // See `correct_region`","highlight_start":1,"highlight_end":32},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:27 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[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":"late-bound region is '_#4r","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: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":n=1536345004453140630,duration=3117486411874
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0d7cba99
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Fri Sep  7 18:30:04 UTC 2018
---
travis_time:end:04ad7c3a:start=1536345005801560132,finish=1536345005827720746,duration=26160614
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:01a3d9d1
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:06d5f894
$ 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)

Collaborator

rust-highfive commented Sep 7, 2018

The job x86_64-gnu-llvm-5.0 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:46:39] ....................................................................................................
[00:46:42] ....................................................................................................
[00:46:45] ...........................................................................i........................
[00:46:48] ....................................................................................................
[00:46:51] .........................i.i..ii.................................................................FF.
[00:46:55] FFFFFFF..........................................................................F.FFFFFF..F........
[00:47:01] ....................................................................................................
[00:47:03] ....................................................................................................
[00:47:06] ....................................................................................................
[00:47:09] ..................................................................i.................................
---
[00:51:57] ---- [ui] ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs stdout ----
[00:51:57] diff of stderr:
[00:51:57] 
[00:51:57] 12                i16,
[00:51:57] 13                for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>))
[00:51:57] 14            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]), BrNamed(crate0:DefIndex(1:17), 'a)) is '_#4r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]), BrNamed(crate0:DefIndex(1:19), 'c)) is '_#5r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]), BrNamed(crate0:DefIndex(1:18), 'b)) is '_#6r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] +    = note: late-bound region is '_#5r
[00:51:57] +    = note: late-bound region is '_#6r
[00:51:57] 19 error: unsatisfied lifetime constraints
[00:51:57] 20   --> $DIR/propagate-approximated-fail-no-postdom.rs:56:13
[00:51:57] 
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom/propagate-approximated-fail-no-postdom.stderr
[00:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-fail-no-postdom.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.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-fail-no-postdom/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-fail-no-postdom/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs","byte_start":1569,"byte_end":1729,"line_start":53,"line_end":57,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"        |_outlives1, _outlives2, _outlives3, x, y| {","highlight_start":9,"highlight_end":53},{"text":"            // Only works if 'x: 'y:","highlight_start":1,"highlight_end":37},{"text":"            let p = x.get();","highlight_start":1,"highlight_end":29},{"text":"            demand_y(x, y, p) //~ ERROR","highlight_start":1,"highlight_end":40},{"text":"        },","highlight_start":1,"highlight_end":10}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]) with closure substs [\n    i16,\n    for<'r, 's> extern \"rust-call\" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#5r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#6r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs:53:9\n   |\nLL | /         |_outlives1, _outlives2, _outlives3, x, y| {\nLL | |             // Only works if 'x: 'y:\nLL | |             let p = x.get();\nLL | |             demand_y(x, y, p) //~ ERROR\nLL | |         },\n   | |_________^\n   |\n   = note: defining type: DefId(0/1:20 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]::{{closure}}[0]) with closure substs [\n               i16,\n               for<'r, 's> extern \"rust-call\" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndl}],"children":[],"rendered":"error: unsatisfied lifetime constraints\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs:56:13\n   |\nLL |         |_outlives1, _outlives2, _outlives3, x, y| {\n   |          ----------              ---------- has type `std::cell::Cell<&'2 &u32>`\n   |          |\n   |          has type `std::cell::Cell<&&'1 u32>`\n...\nLL |             demand_y(x, y, p) //~ ERROR\n   |             ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs","byte_start":1391,"byte_end":1739,"line_start":48,"line_end":59,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {","highlight_start":1,"highlight_end":93},{"text":"    establish_relationships(","highlight_start":1,"highlight_end":29},{"text":"        cell_a,","highlight_start":1,"highlight_end":16},{"text":"        cell_b,","highlight_start":1,"highlight_end":16},{"text":"        cell_c,","highlight_start":1,"highlight_end":16},{"text":"        |_outlives1, _outlives2, _outlives3, x, y| {","highlight_start":1,"highlight_end":53},{"text":"            // Only works if 'x: 'y:","highlight_start":1,"highlight_end":37},{"text":"            let p = x.get();","highlight_start":1,"highlight_end":29},{"text":"            demand_y(x, y, p) //~ ERROR","highlight_start":1,"highlight_end":40},{"text":"        },","highlighern "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), 't1)) &'_#2r 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>))
[00:51:57] 16            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]), BrNamed(crate0:DefIndex(1:17), 'b)) is '_#3r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 19    = note: number of external vids: 5
[00:51:57] 20    = note: where '_#1r: '_#2r
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-ref/propagate-approximated-ref.stderr
[00:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-ref.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-ref.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-ref/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-ref/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs","byte_start":1861,"byte_end":2017,"line_start":53,"line_end":58,"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 unsatisfied lifetime constraints","highlight_start":1,"highlight_end":52},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlc/test/ui/nll/closure-requirements/propagate-approximated-ref.rs:53:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\n   |  _______________________________________________^\nLL | |         //~^ ERROR unsatisfied lifetime constraints\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:18 ~ propagate_approximated_ref[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<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't1)) &'_#2r 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: late-bound region is '_#3r\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#1r: '_#2r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs","byte_start":1749,"byte_end":2021,"line_start":52,"line_end":59,"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 unsatisfied lifetime constraints","highlight_start":1,"highlight_end":52},{"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())","highlight_start":1,"highlight_end":32},{"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_ref[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-ref.rs:52: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 unsatisfied lifetime constraints\nLL | |\n...  |\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]) with substs []\n\n"}
[00:51:57] {"message":"unsatisfied lifetime constraints","code":null,"level":"error","spans":[{"file_name"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":"late-bound region is '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","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\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |     });\n   | |____/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs","byte_start":1486,"byte_end":1639,"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","highlight_start":1,"highlight_end":19},{"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())","highlight_start":1,"highlight_end":32},{"text":"    });","highlight_start":1,"highlight_end":7}],"label":"`cell_a` escapes the function body here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: borrowed data escapes outside of function\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs:45:5\n   |\nLL |   fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\n   |                     ------ `cell_a` is a reference that is only valid in the function body\nLL | /     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\nLL | |         //~^ ERROR\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |     });\n   | |______^ `cell_a` escapes the function body here\n\n"}
[00:51:57] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:51:57] 
[00:51:57] ---------------------------------------xternal vids: 5
[00:51:57] 19    = note: where '_#1r: '_#0r
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] 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:51:57] 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:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] 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:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"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":1725,"line_start":48,"line_end":52,"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","highlight_start":1,"highlight_end":19},{"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":"    });","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::celdex(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: late-bound region is '_#3r\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#1r: '_#0r\n\n"}
[00:51:57] {"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":1729,"line_start":47,"line_end":53,"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","highlight_start":1,"highlight_end":19},{"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":"    });","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\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\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:51:57] {"message":"borrowed data escapes outside of function","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1509,"byte_end":1515,"line_start":47,"line_end":47,"column_start":19,"column_end":25,"is_primary":false,"text":[{"text":"fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":19,"highlight_end":25}],"label":"`cell_a` is a reference that is only valid in the function body","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs","byte_start":1561,"byte_end":1726,"line_start":48,"line_end":52,"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","highlight_start":1,"highlight_end":,\n               for<'r, 's> extern \"rust-call\" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#2r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>))\n           ]\n   = note: late-bound region is '_#3r\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#1r: '_#2r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs","byte_start":1318,"byte_end":1600,"line_start":45,"line_end":52,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":1,"highlight_end":64},{"text":"    establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {","highlight_start":1,"highlight_end":75},{"text":"        //~^ ERROR unsatisfied lifetime constraints","highlight_start":1,"highlight_end":52},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(outlives1, outlives2, x.get())","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,"expansiggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs","byte_start":1386,"byte_end":1597,"line_start":46,"line_end":51,"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":75},{"text":"        //~^ ERROR unsatisfied lifetime constraints","highlight_start":1,"highlight_end":52},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // Only works if 'x: 'y:","highlight_start":1,"highlight_end":33},{"text":"        demand_y(outlives1, outlives2, x.get())","highlight_start":1,"highlight_end":48},{"text":"    });","highlight_start":1,"highlight_end":7}],"label":"argument requires that `'a` must outlive `'b`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unsatisfied lifetime constraints\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs:46:5\n   |\nLL |   fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\n   |           --  -- lifetime `'b` defined here\n   |           |\n   |           lifetime `'a` defined here\nLL | /     establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {\nLL | |         //~^ ERROR unsatisfied lifetime constraints\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(outlives1, outlives2, x.get())\nLL | |     });\n   | |______^ argument requires that `'a` must outlive `'b`\n\n"}
[00:51:57] {"message":"aborting due to previous error","code":nuage":"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":1684,"line_start":45,"line_end":49,"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":"        //~^ ERROR","highlight_start":1,"highlight_end":19},{"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},{"message":"late-bound region is '_#2r","code":null,"level":"note","spans":[],|                                                has type `&std::cell::Cell<&'2 &u32>`\nLL |         // Only works if 'x: 'y:\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`\n\n"}
[00:51:57] {"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":1688,"line_start":44,"line_end":50,"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":"        //~^ ERROR","highlight_start":1,"highlight_end":19},{"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>, 7] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-from-trait-match.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-from-trait-match.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-from-trait-match/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-from-trait-match/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs","byte_start":1164,"byte_end":1461,"line_start":42,"line_end":56,"column_start":36,"column_end":6,"is_primary":true,"text":[{"text":"    establish_relationships(value, |value| {","highlight_start":36,"highlight_end":45},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // This function call requires that","highlight_start":1,"highlight_end":44},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // (a) T: Trait<'a>","highlight_start":1,"highlight_end":28},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // and","highlight_start":1,"highlight_end":15},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // (b) T: 'a","highlight_start":1,"highlight_end":21},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // The latter does not hold.","highlight_start":1,"highlight_end":37},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        require(value);","highlight_start":1,"highlight_end":24},{"text":"    });","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:16 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((T,))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#2r","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: '_#1r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs:42:36\n   |\nLL |       establish_relationships(value, |value| {\n   |  ____________________________________^\nLL | |         //~^ ERROR the parameter type `T` may not live long enough\nLL | |\nLL | |         // This function call requires that\n...  |\nLL | |         require(value);\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:16 ~ propagate_from_trait_match[317d]::supply[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((T,))\n           ]\n   = note: late-bound region is '_#2r\n   = note: number of external vids: 3\n   = note: where T: '_#1r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-from-trait-match.rs","byte_start":1076,"byte_end":1465,"line_start":38,"line_end":57,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn supply<'a, T>(value: T)","highlight_start":1,"highlight_end":27},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Trait<'a>,","highlight_start":1,"highlight_end":18},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    establish_relationships(value, |value| {","highlight_start":1,"highlight_end":45},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // This function call requires that","highlight_start":1,"highlight_end":44},{"text":"  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/closure-requirements/propagate-from-trait-match.rs","byte_start":1164,"byte_end":1461,"line_start":42,"line_end":56,"column_start":36,"column_end":6,"is_primary":true,"text":[{"text":"    establish_relationships(value, |value| {","highlight_start":36,"highlight_end":45},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"","highlight_start":1,"highlight_end":1},{"text":"        // This function call requires that","highlight_start":1,"highlight_end":44},{"text":"        //","highlight_start":1,"highlight_end":1pagate-despite-same-free-region/propagate-despite-same-free-region.stderr
[00:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-despite-same-free-region.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 0
[00:51:57] status: exit code: 0
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.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-despite-same-free-region/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-despite-same-free-region/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-despite-same-free-region.rs","byte_start":1620,"byte_end":1758,"line_start":52,"line_end":56,"column_start":9,"column_end":10,"is_primary":true,"text":[{"text":"        |_outlives1, _outlives2, x, y| {","highlighthighlight_end":30},{"text":"        },","highlight_start":1,"highlight_end":11},{"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_despite_same_free_region[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-despite-same-free-region.rs:49:1\n   |\nLL | / fn supply<'a>(cell_a: Cell<&'a u32>) {\nLL | |     establish_relationships(\nLL | |         cell_a,\nLL | |         |_outlives1, _outlives2, x, y| {\n...  |\nLL | |     );\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_despite_same_free_region[317d]::supply[0]) with substs []\n\n"}
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] thread '[ui] ui/nll/closure-requirements/propagate-despite-same-free-region.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:51:57] 
[00:51:57] 
[00:51:57] ---- [ui] ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs stdout ----
[00:51:57] diff of stderr:
[00:51:57] 
[00:51:57] 13                i16,
[00:51:57] 14                for<'r, 's, 't0, 't1, 't2, 't3> 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(Debruij:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-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-wrong-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-wrong-bounds/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs","byte_start":1751,"byte_end":1873,"line_start":49,"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":"        // 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":"        //~^ ERROR","highlight_start":1,"highlight_end":19},{"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_wrong_bounds[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<&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)) &'_#2r 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":"late-bound region is '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","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-wrong-bounds.rs:49:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\n   |  _______________________u32>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs","byte_start":1764,"byte_end":1774,"line_start":49,"line_end":49,"column_start":60,"column_end":70,"is_primary":false,"text":[{"text":"    establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {","highlight_start":60,"highlight_end":70}],"label":"has type `&std::cell::Cell<&'2 &u32>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs","byte_start":1825,"byte_end":1848,"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":"argument requires that `'1` must outlive `'2`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unsatisfied lifetime constraints\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:9\n   |\nLL |     establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\n   |                                                ----------  ---------- has type `&std::cell::Cell<&'2 &u32>`\n   |                                                |\n   |                                                has type `&std::cell::Cell<&'1 &u32>`\nLL |         // Only works if 'x: 'y:\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs","byte_start":1639,"byte_end":1877,"line_start":48,"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":"        // 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":"        //~^ ERROR","highlight_start":1,"highlight_end":19},{"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_wrong_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-wrong-bounds.rs:48: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 | |         // Only works if 'x:n<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>","highlight_start":1,"highlight_end":57},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Iterator,","highlight_start":1,"highlight_end":17},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(x, |mut y| Box::new(y.next()))","highlight_start":1,"highlight_end":50},{"text":"    //~^ ERROR the associated type `<T as std::iter::Iterator>::Item` may not live long enough","highlight_start":1,"highlight_end":95},{"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 ~ projection_no_regions_closure[317d]::no_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-no-regions-closure.rs:31:1\n   |\nLL | / fn no_region<'a, T>(x: Box<T>) -> Box<dyn Anything + 'a>\nLL | | where\nLL | |     T: Iterator,\nLL | | {\nLL | |     with_signature(x, |mut y| Box::new(y.next()))\nLL | |     //~^ ERROR the associated type `<T as std::iter::Iterator>::Item` may not live long enough\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ projection_no_regions_closure[317d]::no_region[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:51:57] {"message":"the associated type `<T as std::iter::Iterator>::Item` may not live long enough","code":{"code":"E0309","explanation":"\nTypes in type definitions have lifetimes associciated type `<T as std::iter::Iterator>::Item` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs:35:23\n   |\nLL |     with_signature(x, |mut y| Box::new(y.next()))\n   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...\n\n"}
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs","byte_start":1295,"byte_end":1321,"line_start":44,"line_end":44,"column_start":23,"column_end":49,"is_primary":true,"text":[{"text":"    with_signature(x, |mut y| Box::new(y.next()))","highlight_start":23,"highlight_end":49}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:18 ~ projection_no_regions_closure[317d]::correct_region[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#2r)>\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#3r","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 std::iter::Iterator>::Item: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/'_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs:52:23\n   |\nLL |     with_signature(x, |mut y| Box::new(y.next()))\n   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:22 ~ projection_no_regions_closure[317d]::wrong_region[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>\n           ]\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where <T as std::iter::Iterator>::Item: '_#3r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs","byte_start":1343,"byte_end":1583,"line_start":48,"line_end":54,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn wrong_region<'a, 'b, T>(x: Box<T>) -> Box<dyn Anything + 'a>","highlight_start":1,"highlight_end":64},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: 'b + Iterator,","highlight_start":1,"highlight_end":22},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(x, |mut y| Box::new(y.next()))","highlight_start":1,"highlight_end":50},{"text":"    //~^ ERROR the associated type `<T as std::iter::Iterator>::Item` may not live long enough","highlight_start":1,"highlight_end":95},{"text":"}","higote","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs","byte_start":1733,"byte_end":1759,"line_start":62,"line_end":62,"column_start":23,"column_end":49,"is_primary":true,"text":[{"text":"    with_signature(x, |mut y| Box::new(y.next()))","highlight_start":23,"highlight_end":49}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn Anything + '_#3r)>\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","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 std::iter::Iterator>::Item: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-no-regions-closure.rs:62:23\n   |\nLL |     with_signature(x, |mut y| Box::new(y.next()))\n   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:26 ~ projection_no_regions_closure[317d]::outlives_region[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::boxed::Box<Tnew(y.next()))\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_no_regions_closure[317d]::outlives_region[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:51:57] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:51:57] {"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:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] thread '[ui] ui/nll/ty-outlives/projection-no-regions-closure.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:51:57] 
[00:51:57] 
[00:51:57] ---- [ui] ui/nll/ty-outlives/projection-one-region-closure.rs stdout ----
[00:51:57] diff of stderr:
[00:51:57] 
[00:51:57] 10                i32,
[00:51:57] 11                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 12            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a)) is '_#3r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:18), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 15    = note: number of external vids: 5
[00:51:57] 16    = note: where T: '_#2r
[00:51:57] 17    = note: where '_#1r: '_#2r
[00:51:57] 65                i32,
[00:51:57] 65                i32,
[00:51:57] 66                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
[00:51:57] 67            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:9 ~ projection_one_region_closure[317d]::no_relationships_early[0]), BrNamed(crate0:DefIndex(1:22), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 69    = note: number of external vids: 5
[00:51:57] 70    = note: where T: '_#3r
[00:51:57] 71    = note: where '_#2r: '_#3r
[00:51:57] 120                i32,
[00:51:57] 120                i32,
[00:51:57] 121                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
[00:51:57] 122            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]), BrNamed(crate0:DefIndex(1:26), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 124    = note: number of external vids: 5
[00:51:57] 125    = note: where T: '_#3r
[00:51:57] 126    = note: where '_#2r: '_#3r
[00:51:57] 175                i32,
[00:51:57] 175                i32,
[00:51:57] 176                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
[00:51:57] 177            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]), BrNamed(crate0:DefIndex(1:30), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 179    = note: number of external vids: 5
[00:51:57] 180    = note: where T: '_#3r
[00:51:57] 181    = note: where '_#2r: '_#3r
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] 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:51:57] 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:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/ty-outlives/projection-one-region-closure.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] 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:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"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,"linlet 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:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1831,"byte_end":1857,"line_start":66,"line_end":66,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, tents","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1699,"byte_end":1939,"line_start":61,"line_end":69,"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":"    //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":63},{"text":"    //~| ERROR","highlight_start":1,"highlight_end":15},{"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:61: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\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_one_regionut/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:66:5\n   |\nLL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\n   |                           --  -- lifetime `'b` defined here\n   |                           |\n   |                           lifetime `'a` defined here\n...\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`\n\n"}
[00:51:57] {"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",  i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","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: '_#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:87: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: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where T: '_#3r\n   = note: where '_#2r: '_#3r\n\n"}
[00:51:57] {"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":1958,"byte_end":2799,"line_start":72,"line_end":90,"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":"    //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":63},{"text":"    //~| ERROR","highlight_start":1,"highlight_end":15},:[{"text":"fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":24,"highlight_end":26}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2667,"byte_end":2718,"line_start":87,"line_end":87,"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":"argument requires that `'b` must outlive `'a`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unsatisfied lifetime constraints\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:87:5\n   |\nLL | fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\n   |                        --  -- lifetime `'b` defined here\n   |                        |\n   |                        lifetime `'a` defined here\n...\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`\n\n"}
[00:51:57] {"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":2691,"byte_end":2717,"line_start":87,"line_end":87,"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:87:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider te0:DefIndex(1:30), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 152    = note: number of external vids: 5
[00:51:57] 153    = note: where '_#2r: '_#3r
[00:51:57] 
[00:51:57] 182                i32,
[00:51:57] 182                i32,
[00:51:57] 183                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 184            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:12 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]), BrNamed(crate0:DefIndex(1:33), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 186    = note: number of external vids: 4
[00:51:57] 187    = note: where '_#1r: '_#2r
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] 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:51:57] 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:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/ty-outlives/projection-one-region-trait-bound-closure.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] 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/projel,"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: late-bound region is '_#3r\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#1r: '_#2r\n\n"}
[00:51:57] {"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":1356,"line_start":43,"line_end":49,"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":"    //~^ ERROR","highlight_start":1,"highlight_endxt":"    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":"late-bound region is '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","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:57: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: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#2r: '_#3r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"notbound-closure.rs:57:5\n   |\nLL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\n   |                           --  -- lifetime `'b` defined here\n   |                           |\n   |                           lifetime `'a` defined here\n...\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`\n\n"}
[00:51:57] {"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":2304,"byte_end":2330,"line_start":77,"line_end":77,"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":"late-bound region is '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","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  -->ight_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":"    //~^ ERROR","highlight_start":1,"highlight_end":15},{"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:62: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\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:51:57] {"message":"unsatisfied lifetime constraints","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1598,"byte_end":1600,"line_start":62,"line_end":62,"column_start":28,"column_end":30,"is_primary":false,"text":[{"text":"fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":28,"highlight_end":30}],"label":"lifetime `'b` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1594,"byte_end":1596,"line_start":62,"line_end":62,"column_start":24,"column_end":26,"is_primary":false,"text":[{"text":"fn projection_outlives<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":24,"highlight_end":26}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":2280,"byte_end":2331,"line_start":77,"line_end":77,"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":"argument requires that `'b` must outlive `'a`","suggested_replacement":null,"sugg":[],"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:87: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: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where '_#2r: '_#3r\n\n"}
[00:51:57] {"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":2368,"byte_end":2524,"line_start":82,"line_end":88,"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:82: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:51:57] {"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":2865,"byte_end":2891,"line_start":99,"line_end":99,"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<&'_ 187    = note: number of external vids: 6
[00:51:57] 188    = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r
[00:51:57] 
[00:51:57] 218                i32,
[00:51:57] 218                i32,
[00:51:57] 219                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 220            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a)) is '_#3r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:45), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 223    = note: number of external vids: 5
[00:51:57] 224    = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r
[00:51:57] 
[00:51:57] 264                i32,
[00:51:57] 264                i32,
[00:51:57] 265                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
[00:51:57] 266            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]), BrNamed(crate0:DefIndex(1:49), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 268    = note: number of external vids: 5
[00:51:57] 269    = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#2r)>>::AssocType: '_#3r
[00:51:57] 
[00:51:57] 298                i32,
[00:51:57] 298                i32,
[00:51:57] 299                extern "rust-cnux-gnu/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure/auxiliary" "-A" "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"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":"late-bound region is '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#5r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 6","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":[],"render 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<'_#6r, '_#7r>>::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<'_#6r, '_#7r>>::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_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:53: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<'_#7r, '_#8r>>::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:51:57] {"message":"the associated type `<T as Anything<'_#7r, '_#8r>>::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 guaranteensider adding an explicit lifetime bound `<T as Anything<'_#7r, '_#8r>>::AssocType: ReEarlyBound(0, 'a)`...\n\n"}
[00:51:57] {"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":2545,"byte_end":2571,"line_start":78,"line_end":78,"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":"late-bound region is '_#5r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 6","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:78: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: late-bound region is '_#5r\n   = note: number of external vids: 6\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:51:57] {"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":1804,"byte_end":2674,"line_start":63,"line_end":80,"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}ne_start":78,"line_end":78,"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<'_#7r, '_#8r>>::AssocType: ReEarlyBound(0, 'a)`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the associated type `<T as Anything<'_#7r, '_#8r>>::AssocType` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:78: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<'_#7r, '_#8r>>::AssocType: ReEarlyBound(0, 'a)`...\n\n"}
[00:51:57] {"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":2828,"byte_end":2854,"line_start":88,"line_end":88,"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  ":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:83: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:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trng<'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:51:57] {"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":3174,"byte_end":3200,"line_start":105,"line_end":105,"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":"late-bound region is '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","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('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r","code":null,"level":"note","sions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":16,"highlight_end":18}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3150,"byte_end":3201,"line_start":105,"line_end":105,"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":"argument requires that `'b` must outlive `'a`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unsatisfied lifetime constraints\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:105:5\n   |\nLL | fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\n   |                --  -- lifetime `'b` defined here\n   |                |\n   |                lifetime `'a` defined here\n...\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'b` must outlive `'a`\n\n"}
[00:51:57] {"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":3371,"byte_end":3397,"line_start":115,"line_end":115,"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[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":3238,"byte_end":3401,"line_start":110,"line_end":116,"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:110: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:51:57] {"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":3746,"byte_end":3772,"line_start":127,"line_end":127,"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":"late-bound region is '_#3r","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('_#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:127: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   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:119: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:51:57] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:51:57] {"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:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] thread '[ui] ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs' panicked at 'explicit panic', tools/compiletest/src/runtest.rs:3196:9
[00:51:57] 
[00:51:57] 
[00:51:57] ---- [ui] ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs stdout ----
[00:51:57] diff of stderr:
[00:51:57] 
[00:51:57] 9                i16,
[00:51:57] 10                for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))
[00:51:57] 11            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:5 ~ ty_param_closure_approximate_lower_bound[317d]::generic[0]), BrNamed(crate0:DefIndex(1:13), T)) is '_#2r
[00:51:57] +    = note: late-bound region is '_#2r
[00:51:57] 13    = note: number of external vids: 3
[00:51:57] 14    = note: where T: '_#1r
[00:51:57] 
[00:51:57] 37                i16,
[00:51:57] 37                i16,
[00:51:57] 38                for<'r, 's> extern "rust-call" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))
[00:51:57] 39            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(1:15), 'a)) is '_#2r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:6 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]), BrNamed(crate0:DefIndex(1:16), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#2r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 42    = note: number of external vids: 4
[00:51:57] 43    = note: where T: '_#1r
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound/ty-param-closure-approximate-lower-bound.stderr
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound/ty-param-closure-approximate-lower-bound.stderr
[00:51:5nvoke(a, b));","highlight_start":24,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [\n    T,\n    i16,\n    for<'r, 's> extern \"rust-call\" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#3r","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: '_#1r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/ty-param-closure-approximate-lower-bound.rs:39:24\n   |\nLL |     twice(cell, value, |a, b| invoke(a, b));\n   |                        ^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:17 ~ ty_param_closure_approximate_lower_bound[317d]::generic_fail[0]::{{closure}}[0]) with closure substs [\n               T,\n               i16,\n               for<'r, 's> extern \"rust-call\" fn((std::option::Option<std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) ()>>, &Reeneric_fail[0]) with substs [\n               T\n           ]\n\n"}
[00:51:57] {"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/ty-param-closure-approximate-lower-bound.rs","byte_start":1085,"byte_end":1104,"line_start":39,"line_end":39,"column_start":24,"column_end":43,"is_primary":true,"text":[{"text":"    twice(cell, value, |a, b| invoke(a, b));","highlight_start":24,"highlight_end":43}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null external requirements
[00:51:57] 
[00:51:57] 108                i32,
[00:51:57] 108                i32,
[00:51:57] 109                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, T))
[00:51:57] 110            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:11 ~ projection_one_region_trait_bound_static_closure[317d]::elements_outlive[0]), BrNamed(crate0:DefIndex(1:30), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 113 note: No external requirements
[00:51:57] 114   --> $DIR/projection-one-region-trait-bound-static-closure.rs:78:1
[00:51:57] 
[00:51:57] 140                i32,
[00:51:57] 140                i32,
[00:51:57] 141                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 142            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:12 ~ projection_one_region_trait_bound_static_closure[317d]::one_region[0]), BrNamed(crate0:DefIndex(1:33), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 145 note: No external requirements
[00:51:57] 146   --> $DIR/projection-one-region-trait-bound-static-closure.rs:87:1
[00:51:57] 
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure/projection-one-region-trait-bound-static-closure.stderr
[00:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nllend":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":"}","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_static_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-static-closure.rs:42:1\n   |\nLL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_late[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs","byte_start":1404,"byte_end":1430,"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,: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":"}","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_static_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-static-closure.rs:50:1\n   |\nLL | / fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     'a: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_one_region_trait_bound_static_closure[317d]::no_relationships_early[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs","byte_start":2186,"byte_end":2212,"line_start":74,"line_end":74,"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_static_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":"late-bound region is '_#4r","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-static-closure.rs:74: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_static_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: late-bound region is '_#4r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs","byte_start":1453,"byte_end":2216,"line_start":59,"line_end":75,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn projection_outlives<'a, 'b, T>(cell: Cell<ildren":[{"message":"defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_static_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-static-closure.rs:59: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 | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:10 ~ projection_one_region_trait_bound_static_closure[317d]::projection_outlives[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs","byte_start":2361,"byte_end":2387,"line_start":83,"line_end":83,"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_static_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":"late-bound region is '_#4r","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-static-closure.rs:83: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_static_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: late-bound region is '_#4r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-static-closure.rs","byte_start":2235,"byte_end":2391,"line_start":78,"line_end":84,"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] 
[00:51:57] 10                i32,
[00:51:57] 11                extern "rust-call" fn((std::boxed::Box<T>,)) -> std::boxed::Box<(dyn std::fmt::Debug + '_#2r)>
[00:51:57] 12            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:5 ~ ty_param_closure_outlives_from_return_type[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:13), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 14    = note: number of external vids: 4
[00:51:57] 15    = note: where T: '_#2r
[00:51:57] 
[00:51:57] 
[00:51:57] The actual stderr differed from the expected stderr.
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type/ty-param-closure-outlives-from-return-type.stderr
[00:51:57] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type/ty-param-closure-outlives-from-return-type.stderr
[00:51:57] To update references, rerun the tests and pass the `--bless` flag
[00:51:57] To only update this specific test, also pass `--test-args nll/ty-outlives/ty-param-closure-outlives-from-return-type.rs`
[00:51:57] error: 1 errors occurred comparing output.
[00:51:57] status: exit code: 1
[00:51:57] status: exit code: 1
[00:51:57] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-return-type.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/ty-param-closure-outlives-from-return-type/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zvdenotes 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/ty-param-closure-outlives-from-return-type.rs","byte_start":1221,"byte_end":1226,"line_start":36,"line_end":36,"column_start":23,"column_end":28,"is_primary":true,"text":[{"text":"    with_signature(x, |y| y)","highlight_start":23,"highlight_end":28}],"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/ty-param-closure-outlives-from-return-type.rs:36:23\n   |\nLL |     with_signature(x, |y| y)\n   |                       ^^^^^\n   |\n   = helpuse[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:15), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#2r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 21    = note: number of external vids: 4
[00:51:57] 22    = note: where T: '_#1r
[00:51:57] 
[00:51:57] 71                i32,
[00:51:57] 71                i32,
[00:51:57] 72                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 73            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:7 ~ ty_param_closure_outlives_from_where_clause[317d]::correct_region[0]), BrNamed(crate0:DefIndex(1:18), T)) is '_#3r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] 75    = note: number of external vids: 4
[00:51:57] 76    = note: where T: '_#2r
[00:51:57] 
[00:51:57] 109                i32,
[00:51:57] 109                i32,
[00:51:57] 110                extern "rust-call" fn((std::cell::Cell<&'_#2r ()>, T))
[00:51:57] 111            ]
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a)) is '_#3r
[00:51:57] -    = note: late-bound region ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:22), T)) is '_#4r
[00:51:57] +    = note: late-bound region is '_#3r
[00:51:57] +    = note: late-bound region is '_#4r
[00:51:57] 114    = note: number of external vids: 5
[00:51:57] 115    = note: where T: '_#2r
[00:51:57] 
[00:51:57] 161                i32,
[00:51:57] 161                i32,
[00:51:57] 162                extern "rust-call" fn((std::cell::Cell<&'_#3r ()>, "unused"
[00:51:57] ------------------------------------------
[00:51:57] 
[00:51:57] ------------------------------------------
[00:51:57] stderr:
[00:51:57] stderr:
[00:51:57] ------------------------------------------
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs","byte_start":1011,"byte_end":1394,"line_start":37,"line_end":45,"column_start":26,"column_end":6,"is_primary":true,"text":[{"text":"    with_signature(a, b, |x, y| {","highlight_start":26,"highlight_end":34},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // See `correct_region`, which explains the point of this","highlight_start":1,"highlight_end":66},{"text":"        // test.  The only difference is that, in the case of this","highlight_start":1,"highlight_end":67},{"text":"        // function, there is no where clause *anywhere*, and hence we","highlight_start":1,"highlight_end":71},{"text":"        // get an error (but reported by the closure creator).","highlight_start":1,"highlight_end":63},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#1r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#3r","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: '_#1r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs:37:26\n   |\nLL |       with_signature(a, b, |x, y| {\n   |  __________________________^\nLL | |         //~^ ERROR the parameter type `T` may not live long enough\nLL | |         //\nLL | |         // See `correct_region`, which explains the point of this\n...  |\nLL | |         require(&x, &y)\nLL | |     })\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:16 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]::{{closure}}[0]) with closure substs [\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#1r ()>, T))\n           ]\n   = note: late-bound region is '_#2r\n   = note: late-bound region is '_#3r\n   = note: number of external vids: 4\n   = note: where T: '_#1r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs","byte_start"olumn_start":26,"column_end":6,"is_primary":true,"text":[{"text":"    with_signature(a, b, |x, y| {","highlight_start":26,"highlight_end":34},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // See `correct_region`, which explains the point of this","highlight_start":1,"highlight_end":66},{"text":"        // test.  The only difference is that, in the case of this","highlight_start":1,"highlight_end":67},{"text":"        // function, there is no where clause *anywhere*, and hence we","highlight_start":1,"highlight_end":71},{"text":"        // get an error (but reported by the closure creator).","highlight_start":1,"highlight_end":63},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:6 ~ ty_param_closure_outlives_from_where_clause[317d]::no_region[0]), BrNamed(crate0:DefIndex(1:14), '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/ty-param-closure-outlives-from-where-clause.rs:37:26\n   |\nLL |       with_signature(a, b, |x, y| {\n   |  __________________________^\nLL | |         //~^ ERROR the parameter type `T` may not live long enough\nLL | |         //\nLL | |         // See `ect_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: late-bound region is '_#3r\n   = note: number of external vids: 4\n   = note: where T: '_#2r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs","byte_start":1416,"byte_end":2197,"line_start":49,"line_end":67,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn correct_region<'a, T>(a: Cell<&'a ()>, b: T)","highlight_start":1,"highlight_end":48},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: 'a,","highlight_start":1,"highlight_end":11},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(a, b, |x, y| {","highlight_start":1,"highlight_end":34},{"text":"        // Key point of this test:","highlight_start":1,"highlight_end":35},{"text":"        //","highlight_start":1,"highlight_end":11},{"text":"        // The *closure* is being type-checked with all of its free","highlight_start":1,"highlight_end":68},{"text":"        // regions \"universalized\". In particular, it does not know","highlight_start":1,"highlight_end":68},{"text":"        // that `x` has the type `Cell<&'a ()>`, but rather treats it","highlight_start":1,"highlight_end":70},{"text":"        // as if the type of `x` is `Cell<&'A ()>`, where `'A` is some","highlight_start":1,"highlight_end":71},{"text":"        // fresh, independent region distinct fre-outlives-from-where-clause.rs","byte_start":2310,"byte_end":2447,"line_start":74,"line_end":78,"column_start":26,"column_end":6,"is_primary":true,"text":[{"text":"    with_signature(a, b, |x, y| {","highlight_start":26,"highlight_end":34},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"        // See `correct_region`","highlight_start":1,"highlight_end":32},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_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":"late-bound region is '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"late-bound region is '_#4r","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: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs:74:26\n   |\nLL |       with_signature(a, b, |x, y| {\n   |  __________________________^\nLL | |         //~^ ERROR the parameter type `T` may not live long enough\nLL | |         // See `correct_region`\nLL | |         require(&x, &y)\nLL | |     })\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:23 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_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: late-bound region is '_#3r\n   = note: late-bound region is '_#4r\n   = note: number of external vids: 5\n   = note: where T: '_#2r\n\n"}
[00:51:57] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs","byte_start":2216,"byte_end":2450,"line_start":70,"line_end":79,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn wrong_region<'a, 'b, T>(a: Cell<&'a ()>, b: T)","highlight_start":1,"highlight_end":50},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: 'b,","highlight_start":1,"highlight_end":11},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(a, b, |x, y| {","highlight_start":1,"highlight_end":34},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"        // See `correct_region`","highlight_start":1,"highlight_end":32},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":7},{"text":"}","highlight_start":1,"highlight_end":2}],"estriction 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/ty-param-closure-outlives-from-where-clause.rs","byte_start":2310,"byte_end":2447,"line_start":74,"line_end":78,"column_start":26,"column_end":6,"is_primary":true,"text":[{"text":"    with_signature(a, b, |x, y| {","highlight_start":26,"highlight_end":34},{"text":"        //~^ ERROR the parameter type `T` may not live long enough","highlight_start":1,"highlight_end":67},{"text":"        // See `correct_region`","highlight_start":1,"highlight_end":32},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), '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/ty-param-closure-outlives-from-where-clause.rs:74:26\n   |\nLL |       with_signature(a, b, |x, y| {\n   |  __________________________^\nLL | |         //~^ ERROR the parameter type `T` may not live long enough\nLL | |         // See `correct_region`\nLL | |         require(&x, &y)\nLL | |     })\n   | |_____^\n   |\n   = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ ty_param_closure_outlives_from_where_clause[317d]::wrong_region[0]), BrNamed(crate0:DefIndex(1:20), 'a))`...\n\n"}
[00:51:57] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/ty-param-closure-outlives-from-where-clause.rs","byte_start":2578,"byte_end":2648,"line_start":87,"line_end":90,"column_start":26,"column_end":6,"is_primary":true,"text":[{"text":"    with_signature(a, b, |x, y| {","highlight_start":26,"highlight_end":34},{"text":"        // See `correct_region`","highlight_start":1,"highlight_end":32},{"text":"        require(&x, &y)","highlight_start":1,"highlight_end":24},{"text":"    })","highlight_start":1,"highlight_end":6}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:27 ~ ty_param_closure_outlives_from_where_clause[317d]::outlives_region[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":"late-bound region is '_#4r","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: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":n=1536345004453140630,duration=3117486411874
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:0d7cba99
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Fri Sep  7 18:30:04 UTC 2018
---
travis_time:end:04ad7c3a:start=1536345005801560132,finish=1536345005827720746,duration=26160614
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:01a3d9d1
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:06d5f894
$ 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)

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 7, 2018

Contributor

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

Contributor

bors commented Sep 7, 2018

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

nikomatsakis added some commits Aug 27, 2018

move `annotate` onto a method of `UniversalRegions`
This allows it to print out the "late-bound regions" from the closure
context more easily. Besides, all the state that is being printed it
is private to the `UniversalRegions`.
@nikomatsakis

This comment has been minimized.

Show comment
Hide comment
@nikomatsakis

nikomatsakis Sep 7, 2018

Contributor

@bors r=pnkfelix

Contributor

nikomatsakis commented Sep 7, 2018

@bors r=pnkfelix

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 7, 2018

Contributor

📌 Commit bb8c4c0 has been approved by pnkfelix

Contributor

bors commented Sep 7, 2018

📌 Commit bb8c4c0 has been approved by pnkfelix

@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 7, 2018

Contributor

⌛️ Testing commit bb8c4c0 with merge 295ad30...

Contributor

bors commented Sep 7, 2018

⌛️ Testing commit bb8c4c0 with merge 295ad30...

bors added a commit that referenced this pull request Sep 7, 2018

Auto merge of #53745 - nikomatsakis:nll-issue-53570, r=pnkfelix
do not propagate closure requirements if we can prove them locally

Fixes #53570

cc @mikhail-m1 -- you're the one who last touched this code

r? @pnkfelix
@bors

This comment has been minimized.

Show comment
Hide comment
@bors

bors Sep 8, 2018

Contributor

☀️ Test successful - status-appveyor, status-travis
Approved by: pnkfelix
Pushing 295ad30 to master...

Contributor

bors commented Sep 8, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: pnkfelix
Pushing 295ad30 to master...

@bors bors merged commit bb8c4c0 into rust-lang:master Sep 8, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment