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

Better lifetime error message #56479

Open
wants to merge 6 commits into
base: master
from

Conversation

Projects
None yet
5 participants
@mark-i-m
Contributor

mark-i-m commented Dec 3, 2018

I propose the following error message as more user-friendly

r? @nikomatsakis

@Centril

This comment has been minimized.

Contributor

Centril commented Dec 3, 2018

Hmm... Is this necessarily about proving that references are valid, or whether the lifetimes are the correct ones? The new error message seems less accurate in some cases that what we have right now.

@mark-i-m

This comment has been minimized.

Contributor

mark-i-m commented Dec 3, 2018

An unsatisfied lifetime constraint usually (always?) indicates that there may be a reference somewhere that may cause memory unsafety (e.g. by living too long). Or am I missing something?

@Centril

This comment has been minimized.

Contributor

Centril commented Dec 3, 2018

@mark-i-m sure; but that reference may be baked into some struct which is then baked into another struct... such that the lifetime that caused the error is actually used quite deeply in the type? In other words it's far removed?

@mark-i-m

This comment has been minimized.

Contributor

mark-i-m commented Dec 3, 2018

Hmm... I can see your point, but I'm not sure how to fix it. Should we make the message more vague (e.g. "unable to prove memory safety")?

@Centril

This comment has been minimized.

Contributor

Centril commented Dec 3, 2018

@mark-i-m My point is that the current diagnostic talks about lifetimes whereas the proposed one talks about references; talking about lifetimes seems more direct here; could we reword it to retain lifetimes somehow but still make it more friendly?

For example:

unable to use a lifetime which fits the expected one

This one is probably not great, but do you see what I mean?

@rust-highfive

This comment has been minimized.

Collaborator

rust-highfive commented Dec 3, 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.
travis_time:end:05109c63:start=1543872225285282425,finish=1543872226455712808,duration=1170430383
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
[00:47:41] .................................................................................................... 3000/5105
[00:47:44] ............................................................................i....................... 3100/5105
[00:47:47] .................................................................................................... 3200/5105
[00:47:50] .......................................ii..i..ii.................................................... 3300/5105
[00:47:54] ...........F...FF...FFF...FFF.............................F....F........F......F...........F........ 3400/5105
[00:47:57] ......FFFF............................FF..F..........F........FFFFFF...F..................FFFF...... 3500/5105
[00:48:02] ......................................i............................................................. 3700/5105
[00:48:03] ..............................................................................................i..... 3800/5105
[00:48:04] .................................................................................................... 3900/5105
[00:48:11] .................................................................................................... 4000/5105
[00:48:11] .................................................................................................... 4000/5105
[00:48:14] .................................................................................................... 4100/5105
[00:48:17] ........................................................................F........................... 4200/5105
[00:48:26] .................................................................................................... 4400/5105
[00:48:30] .................................................................................................... 4500/5105
[00:48:33] .................................................................................................... 4600/5105
[00:48:36] ....................................................................i............................... 4700/5105
---
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/closure-requirements/escape-argument-callee.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] 9                for<'r, 's, 't0> extern "rust-call" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) i32))
[00:48:48] 11 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 13   --> $DIR/escape-argument-callee.rs:36:45
[00:48:48] 13   --> $DIR/escape-argument-callee.rs:36:45
[00:48:48] 14    |
[00:48:48] 15 LL |         let mut closure = expect_sig(|p, y| *p = y);
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/escape-argument-callee/escape-argument-callee.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/closure-requirements/escape-argument-callee.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/escape-argument-callee.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/escape-argument-callee/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/escape-argument-callee/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/escape-argument-callee.rs","byte_start":1353,"byte_end":1366,"line_start":36,"line_end":36,"column_start":38,"column_end":51,"is_primary":true,"text":[{"text":"        let mut closure = expect_sig(|p, y| *p = y);","highlight_start":38,"highlight_end":51}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:9 ~ escape_argument_callee[317d]::test[0]::{{closure}}[0]) with closure substs [\n    i16,\n    for<'r, 's, 't0> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) mut &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 't0)) i32))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure,"byte_start":1360,"byte_end":1366,"line_start":36,"line_end":36,"column_start":45,"column_end":51,"is_primary":true,"text":[{"text":"        let mut closure = expect_sig(|p, y| *p = y);","highlight_start":45,"highlight_end":51}],"label":"assignment requires that `'1` must outlive `'2`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/closure-requirements/escape-argument-callee.rs:36:45\n   |\nLL |         let mut closure = expect_sig(|p, y| *p = y);\n   |                                       -  -  ^^^^^^ assignment requires that `'1` must outlive `'2`\n   |                                       |  |\n   |                                       |  has type `&'1 i32`\n   |                                       has type `&mut &'2 i32`\n\n"}
[00:48:48] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/escape-argument-callee.rs","byte_start":1241,"byte_end":1439,"line_start":30,"line_end":42,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn test() {","highlight_start":1,"highlight_end":12},{"text":"    let x = 44;","highlight_start":1,"highlight_end":16},{"text":"    let mut p = &x;","highlight_start":1,"highlight_end":20},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    {","highlight_start":1,"highlight_end":6},{"text":"        let y = 22;","highlight_start":1,"highlight_end":20},{"text":"        let mut closure = expect_sig(|p, y| *p = y);","highlight_start":1,"highlight_end":53},{"text":"        //~^ ERROR","highlight_start":1,"highlight_end":19},{"text":"        closure(&mut p, &y);","highlight_start":1,"highlight_end":29},{"text":"    }","highlight_start":1,"highlight_end":6},{"text":"","highlight_start":1,"highlight_end":1},{"text":"    deref(p);","highlight_start":1,"highlight_end":14},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:3 ~ escape_argument_callee[317d]::test[0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/escape-argument-callee.rs:30:1\n   |\nLL | / fn test() {\nLL | |     let x = 44;\nLL | |     let mut p = &x;\nLL | |\n...  |\nLL | |     deref(p);\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:3 ~ escape_argument_callee[317d]::test[0]) with substs []\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/closure-requirements/escape-argument-callee.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:48:48] note: Run with `RUST_BACKTRACE=1` for a backtrace.
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] 16    = note: late-bound region is '_#5r
[00:48:48] 17    = note: late-bound region is '_#6r
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 20   --> $DIR/propagate-approximated-fail-no-postdom.rs:56:13
[00:48:48] 21    |
[00:48:48] 21    |
[00:48:48] 22 LL |         |_outlives1, _outlives2, _outlives3, x, y| {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] 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:48:48] 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:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-fail-no-postdom.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] 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-fai: late-bound region is '_#6r\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs","byte_start":1570,"byte_end":1580,"line_start":53,"line_end":53,"column_start":10,"column_end":20,"is_primary":false,"text":[{"text":"        |_outlives1, _outlives2, _outlives3, x, y| {","highlight_start":10,"highlight_end":20}],"label":"has type `std::cell::Cell<&&'1 u32>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs","byte_start":1594,"byte_end":1604,"line_start":53,"line_end":53,"column_start":34,"column_end":44,"is_primary":false,"text":[{"text":"        |_outlives1, _outlives2, _outlives3, x, y| {","highlight_start":34,"highlight_end":44}],"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-approximated-fail-no-postdom.rs","byte_start":1692,"byte_end":1709,"line_start":56,"line_end":56,"column_start":13,"column_end":30,"is_primary":true,"text":[{"text":"            demand_y(x, y, p) //~ ERROR","highlight_start":13,"highlight_end":30}],"label":"argument requires that `'1` must outlive `'2`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[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-fail-no-postdom.rs:48:1\n   |\nLL | / fn supply<'a, 'b, 'c>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>, cell_c: Cell<&'c u32>) {\nLL | |     establish_relationships(\nLL | |         cell_a,\nLL | |         cell_b,\n...  |\nLL | |     );\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_approximated_fail_no_postdom[317d]::supply[0]) with substs []\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/closure-requirements/propagate-approximated-ref.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] 33    |
[00:48:48] 34    = note: defining type: DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]) with substs []
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 37   --> $DIR/propagate-approximated-ref.rs:56:9
[00:48:48] 38    |
[00:48:48] 38    |
[00:48:48] 39 LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] 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:48:48] 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:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-ref.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] 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:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"External requirements","code":null,"leveldex(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},{"message":"number of external vids: 5","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs:53:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {\n   |  _______________________________________________^\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |         //~^ ERROR unsatisfied lifetime constraints\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:48:48] {"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":"","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":"        //~^ ERROR unsatisfied lifetime constraints","highlight_start":1,"highlight_end":52},{"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 | |\nLL | |         // Only works if 'x: 'y:\n...  |\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_approximated_ref[317d]::supply[0]) with substs []\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs","byte_start":1759,"byte_end":1761,"line_start":52,"line_end":52,"column_start":11,"column_end":13,"is_primary":false,"text":[{"text":"fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":11,"highlight_end":13}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs","byte_start":1763,"byte_end":1765,"line_start":52,"line_end":52,"column_start":15,"column_end":17,"is_primary":false,"text":[{"text":"fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":15,"highlight_end":17}],"label":"lifetime `'b` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs","byte_start":1936,"byte_end":1959,"line_start":56,"line_end":56,"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 `'a` must outlive `'b`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-ref.rs:56:9\n   |\nLL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {\n   |           --  -- lifetime `'b` defined here\n   |           |\n   |           lifetime `'a` defined here\n...\nLL |         demand_y(x, y, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'a` must outlive `'b`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/closure-requirements/propagate-approximated-ref.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/closure-requirements/propagate-approximated-val.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] 33    |
[00:48:48] 34    = note: defining type: DefId(0/0:6 ~ propagate_approximated_val[317d]::test[0]) with substs []
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 37   --> $DIR/propagate-approximated-val.rs:49:9
[00:48:48] 38    |
[00:48:48] 38    |
[00:48:48] 39 LL | fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-val/propagate-approximated-val.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-approximated-val/propagate-approximated-val.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-approximated-val.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-val.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-val/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-val/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propull,"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/closure-requirements/propagate-approximated-val.rs:46:45\n   |\nLL |       establish_relationships(cell_a, cell_b, |outlives1, outlives2, x, y| {\n   |  _____________________________________________^\nLL | |\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(outlives1, outlives2, x.get())\nLL | |         //~^ ERROR unsatisfied lifetime constraints\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:18 ~ propagate_approximated_val[317d]::test[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<&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:48:48] {"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_primarted-val.rs","byte_start":1326,"byte_end":1328,"line_start":45,"line_end":45,"column_start":9,"column_end":11,"is_primary":false,"text":[{"text":"fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":9,"highlight_end":11}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs","byte_start":1330,"byte_end":1332,"line_start":45,"line_end":45,"column_start":13,"column_end":15,"is_primary":false,"text":[{"text":"fn test<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {","highlight_start":13,"highlight_end":15}],"label":"lifetime `'b` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs","byte_start":1499,"byte_end":1538,"line_start":49,"line_end":49,"column_start":9,"column_end":48,"is_primary":true,"text":[{"text":"        demand_y(outlives1, outlives2, x.get())","highlight_start":9,"highlight_end":48}],"label":"argument requires that `'a` must outlive `'b`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-approximated-val.rs:49:9\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\n...\nLL |         demand_y(outlives1, outlives2, x.get())\n   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'a` must outlive `'b`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/closure-requirements/propagate-approximated-val.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] 16    = note: late-bound region is '_#2r
[00:48:48] 17    = note: late-bound region is '_#3r
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 20   --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9
[00:48:48] 21    |
[00:48:48] 21    |
[00:48:48] 22 LL |     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds/propagate-fail-to-approximate-longer-no-bounds.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds/propagate-fail-to-approximate-longer-no-bounds.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs","byte_start":1575,"byte_end":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":[],"children":[],"rendered":null},{"message":"late-bound region is '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs:45:47\n   |\nLL |       establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\n   |  _______________________________________________^\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |         //~^ ERROR\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: Defsupply<'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>, cell_b: Cell<&'b u32>) {\nLL | |     establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |         //~^ ERROR\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]) with substs []\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] 
[00:48:48] ---------------------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:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"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   |  _______________________________________________^\nLL | |         // Only works if 'x: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |         //~^ ERROR\nLL | |     });\n   | |_____^\n   |\n   = note: defining type: DefId(0/1:18 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supp,"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: unable to prove that references are valid\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:48:48] {"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: 'y:\nLL | |         demand_y(x, y, x.get())\nLL | |         //~^ ERROR\nLL | |     });\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:6 ~ propagate_fail_to_approximate_longer_wrong_bounds[317d]::supply[0]) with substs []\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/closure-requirements/propagate-fail-to-approximate-longer-wrong-bounds.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/region-lbr-named-does-not-outlive-static.rs:19:5
[00:48:48] 3    |
[00:48:48] 4 LL | fn foo<'a>(x: &'a u32) -> &'static u32 {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static/region-lbr-named-does-not-outlive-static.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static/region-lbr-named-does-not-outlive-static.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.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/region-lbr-named-does-not-outlive-static/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/region-lbr-named-does-not-outlive-static/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs","byte_start":779,"byte_end":781,"line_start":18,"line_end":18,"column_start":8,"column_end":10,"is_primary":false,"text":[{"text":"fn foo<'a>(x: &'a u32) -> &'static u32 {","highlight_start":8,"highlight_end":10}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs","byte_start":817,"byte_end":820,"line_start":19,"line_end":19,"column_start":5,"column_end":8,"is_primary":true,"text":[{"text":"    &*x","highlight_start":5,"highlight_end":8}],"label":"returning this value requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs:19:5\n   |\nLL | fn foo<'a>(x: &'a u32) -> &'static u32 {\n   |        -- lifetime `'a` defined here\nLL |     &*x\n   |     ^^^ returning this value requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/closure-requirements/region-lbr-named-does-not-outlive-static.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/region-lbr1-does-not-outlive-ebr2.rs:19:5
[00:48:48] 3    |
[00:48:48] 4 LL | fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2/region-lbr1-does-not-outlive-ebr2.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this sp"/checkout/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs","byte_start":783,"byte_end":785,"line_start":18,"line_end":18,"column_start":12,"column_end":14,"is_primary":false,"text":[{"text":"fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 {","highlight_start":12,"highlight_end":14}],"label":"lifetime `'b` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs","byte_start":828,"byte_end":831,"line_start":19,"line_end":19,"column_start":5,"column_end":8,"is_primary":true,"text":[{"text":"    &*x","highlight_start":5,"highlight_end":8}],"label":"function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/closure-requirements/region-lbr1-does-not-outlive-ebr2.rs:19:5\n   |\nLL | fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> &'b u32 {\n   |        --  -- lifetime `'b` defined here\n   |        |\n   |        lifetime `'a` defined here\nLL |     &*x\n   |     ^^^ function was supposed to return data with lifetime `'b` but it is returning data with lifetime `'a`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/closure-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/closure-requirements/return-wrong-bound-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/return-wrong-bound-region/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs","byte_start":736,"byte_end":744,"line_start":21,"line_end":21,"column_start":16,"column_end":24,"is_primary":true,"text":[{"text":"    expect_sig(|a, b| b); // ought to return `a`","highlight_start":16,"highlight_end":24}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]) with closure substs [\n    i16,\n    for<'r, 's> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32)) -> &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs:21:16\n   |\nLL |     expect_sig(|a, b| b); // ought to return `a`\n   |                ^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:9 ~ return_wrong_bound_region[317d]::test[0]::{{closure}}[0]) with closure substs [\n               i16,\n               for<'r, 's> extern \"rust-call\" fn((&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32, &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) i32)) -> &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) i32\n           ]\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs","byte_start":740,"byte_end":741,"line_start":21,"line_end":21,"column_start":20,"column_end":21,"is_primary":false,"text":[{"text":"    expect_sig(|a, b| b); // ought to return `a`","highlight_start":20,"highlight_end":21}],"label":"has type `&'1 i32`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs","byte_start":737,"byte_end":738,"line_start":21,"line_end":21,"column_start":17,"column_end":18,"is_primary":false,"text":[{"text":"    expect_sig(|a, b| b); // ought to return `a`","highlight_start":17,"highlight_end":18}],"label":"has type `&'2 i32`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/closure-requirements/return-wrong-bound-r0]) with substs []","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/closure-requirements/return-wrong-bound-region.rs:20:1\n   |\nLL | / fn test() {\nLL | |     expect_sig(|a, b| b); // ought to return `a`\nLL | |     //~^ ERROR\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:3 ~ return_wrong_bound_region[317d]::test[0]) with substs []\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/closure-requirements/return-wrong-bound-region.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/issue-48238.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/issue-48238.rs:21:13
[00:48:48] 3    |
[00:48:48] 4 LL |     move || use_val(&orig); //~ ERROR
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-48238/issue-48238.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-48238/issue-48238.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/issue-48238.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/issue-48238.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/issue-48238/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-48238/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/issue-48238.rs","byte_start":611,"byte_end":618,"line_start":21,"line_end":21,"column_start":5,"column_end":12,"is_primary":false,"text":[{"text":"    move || use_val(&orig); //~ ERROR","highlight_start":5,"highlight_end":12}],"label":"lifetime `'1` represents this closure's body","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/issue-48238.rs","byte_start":617,"byte_end":618,"line_start":21,"line_end":21,"column_start":11,"column_end":12,"is_primary":false,"text":[{"text":"    move || use_val(&orig); //~ ERROR","highlight_start":11,"highlight_end":12}],"label":"return type of closure is &'2 u8","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/issue-48238.rs","byte_start":619,"byte_end":633,"line_start":21,"line_end":21,"column_start":13,"column_end":27,"is_primary":true,"text":[{"text":"    move || use_val(&orig); //~ ERROR","highlight_start":13,"highlight_end":27}],"label":"returning this value requires that `'1` must outlive `'2`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"closure implements `Fn`, so references to captured variables can't escape the closure","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/issue-48238.rs:21:13\n   |\nLL |     move || use_val(&orig); //~ ERROR\n   |     ------- ^^^^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2`\n   |     |     |\n   |     |     return type of closure is &'2 u8\n   |     lifetime `'1` represents this closure's body\n   |\n   = note: closure implements `Fn`, so references to captured variables can't escape the closure\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/issue-48238.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/issue-50716.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/issue-50716.rs:25:14
[00:48:48] 3    |
[00:48:48] 4 LL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-50716/issue-50716.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-50716/issue-50716.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/issue-50716.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/issue-50716.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/issue-50716/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-50716/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/issue-50716.rs","byte_start":635,"byte_end":637,"line_start":20,"line_end":20,"column_start":8,"column_end":10,"is_primary":false,"text":[{"text":"fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)","highlight_start":8,"highlight_end":10}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/issue-50716.rs","byte_start":751,"byte_end":753,"line_start":25,"line_end":25,"column_start":14,"column_end":16,"is_primary":true,"text":[{"text":"    let _x = *s; //~ ERROR","highlight_start":14,"highlight_end":16}],"label":"proving this value is `Sized` requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/issue-50716.rs:25:14\n   |\nLL | fn foo<'a, T: 'static>(s: Box<<&'a T as A>::X>)\n   |        -- lifetime `'a` defined here\n...\nLL |     let _x = *s; //~ ERROR\n   |              ^^ proving this value is `Sized` requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/issue-50716.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/issue-52113.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/xt":[{"text":"fn produce_err<'a, 'b: 'a>(data: &'b mut Vec<&'b u32>, value: &'a u32) -> impl Bazinga + 'b {","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/issue-52113.rs","byte_start":1074,"byte_end":1076,"line_start":42,"line_end":42,"column_start":20,"column_end":22,"is_primary":false,"text":[{"text":"fn produce_err<'a, 'b: 'a>(data: &'b mut Vec<&'b u32>, value: &'a u32) -> impl Bazinga + 'b {","highlight_start":20,"highlight_end":22}],"label":"lifetime `'b` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/issue-52113.rs","byte_start":1244,"byte_end":1245,"line_start":47,"line_end":47,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":"    x   //~ ERROR unsatisfied lifetime constraints","highlight_start":5,"highlight_end":6}],"label":"returning this value requires that `'a` must outlive `'b`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/issue-52113.rs:47:5\n   |\nLL | fn produce_err<'a, 'b: 'a>(data: &'b mut Vec<&'b u32>, value: &'a u32) -> impl Bazinga + 'b {\n   |                --  -- lifetime `'b` defined here\n   |                |\n   |                lifetime `'a` defined here\n...\nLL |     x   //~ ERROR unsatisfied lifetime constraints\n   |     ^ returning this value requires that `'a` must outlive `'b`\n\n"}
[00:48:48] {"messu/test/ui/nll/issue-52742/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/issue-52742.rs","byte_start":660,"byte_end":662,"line_start":24,"line_end":24,"column_start":35,"column_end":37,"is_primary":false,"text":[{"text":"    fn take_bar(&mut self, b: Bar<'_>) {","highlight_start":35,"highlight_end":37}],"label":"let's call this `'1`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/issue-52742.rs","byte_start":642,"byte_end":651,"line_start":24,"line_end":24,"column_start":17,"column_end":26,"is_primary":false,"text":[{"text":"    fn take_bar(&mut self, b: Bar<'_>) {","highlight_start":17,"highlight_end":26}],"label":"has type `&mut Foo<'_, '2>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/issue-52742.rs","byte_start":675,"byte_end":687,"line_start":25,"line_end":25,"column_start":9,"column_end":21,"is_primary":true,"text":[{"text":"        self.y = b.z","highlight_start":9,"highlight_end":21}],"label":"assignment requires that `'1` must outlive `'2`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/issue-52742.rs:25:9\n   |\nLL |     fn take_bar(&mut self, b: Bar<'_>) {\n   |                 ---------         -- let's call this `'1`\n   |                 |\n   |                 has type `&mut Foo<'_, '2>`\nLL |         self.y = b.z\n   |         ^^^^^^^^^^^^ assignment requires that `'1` must outlive `'2`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/issue-52742.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/issue-55394.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/issue-55394.rs:21:9
[00:48:48] 3    |
[00:48:48] 4 LL |     fn new(bar: &mut Bar) -> Self {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-55394/issue-55394.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-55394/issue-55394.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/issue-55394.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/issue-55394.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/issue-55394/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-55394/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/issue-55394.rs","byte_start":571,"byte_end":572,"line_start":20,"line_end":20,"column_start":17,"column_end":18,"is_primary":false,"text":[{"text":"    fn new(bar: &mut Bar) -> Self {","highlight_start":17,"highlight_end":18}],"label":"let's call the lifetime of this reference `'1`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/issue-55394.rs","byte_start":584,"byte_end":588,"line_start":20,"line_end":20,"column_start":30,"column_end":34,"is_primary":false,"text":[{"text":"    fn new(bar: &mut Bar) -> Self {","highlight_start":30,"highlight_end":34}],"label":"return type is Foo<'2>","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/issue-55394.rs","byte_start":599,"byte_end":610,"line_start":21,"line_end":21,"column_start":9,"column_end":20,"is_primary":true,"text":[{"text":"        Foo { bar }","highlight_start":9,"highlight_end":20}],"label":"returning this value requires that `'1` must outlive `'2`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/issue-55394.rs:21:9\n   |\nLL |     fn new(bar: &mut Bar) -> Self {\n   |                 -            ---- return type is Foo<'2>\n   |                 |\n   |                 let's call the lifetime of this reference `'1`\nLL |         Foo { bar }\n   |         ^^^^^^^^^^^ returning this value requires that `'1` must outlive `'2`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/issue-55394.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/mir_check_cast_reify.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/mir_check_cast_reify.rs:47:5
[00:48:48] 3    |
[00:48:48] 4 LL | fn bar<'a>(x: &'a u32) -> &'static u32 {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/mir_check_cast_reify/mir_check_cast_reify.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/mir_check_cast_reify/mir_check_cast_reify.stderr
[00:48:48] To updat, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/mir_check_cast_closure.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/mir_check_cast_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/mir_check_cast_closure/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Z" "borrowck=mir" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/mir_check_cast_closure/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/mir_check_cast_closure.rs","byte_start":535,"byte_end":537,"line_start":15,"line_end":15,"column_start":12,"column_end":14,"is_primary":false,"text":[{"text":"fn bar<'a, 'b>() -> fn(&'a u32, &'b u32) -> &'a u32 {","highlight_start":12,"highlight_end":14}],"label":"lifetime `'b` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/mir_check_cast_closure.rs","byte_start":531,"byte_end":5338] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 3    |
[00:48:48] 3    |
[00:48:48] 4 LL | fn bar<'a>(input: &'a u32, f: fn(&'a u32) -> &'a u32) -> &'static u32 {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/mir_check_cast_unsafe_fn/mir_check_cast_unsafe_fn.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/mir_check_cast_unsafe_fn/mir_check_cast_unsafe_fn.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/mir_check_cast_unsafe_fn.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/mir_check_cast_unsafe_fn.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/mir_check_cast_unsafe_fn/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/mir_check_cast_unsafe_fn/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/mir_check_cast_unsafe_fn.rs","byte_start":530,"byte_end":532,"line_start":15,"line_end":15,"column_start":8,"column_end":10,"is_primary":false,"text":[{"text":"fn bar<'a>(input: &'a u32, f: fn(&'a u32) -> &'a u32) -> &'static u32 {","highlight_start":8,"highlight_end":10}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/mir_check_cast_unsafe_fn.rs","byte_start":777,"byte_end":785,"line_start":19,"line_end":19,"column_start":14,"column_end":22,"is_primary":true,"text":[{"text":"    unsafe { g(input) }","highlight_start":14,"highlight_end":22}],"label":"returning this value requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/mir_check_cast_unsafe_fn.rs:19:14\n   |\nLL | fn bar<'a>(input: &'a u32, f: fn(&'a u32) -> &'a u32) -> &'static u32 {\n   |        -- lifetime `'a` defined here\n...\nLL |     unsafe { g(input) }\n   |              ^^^^^^^^ returning this value requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/mir_check_cast_unsafe_fn.rs' panicked at 'explicit panic', src/tools/compiletest:48] ------------------------------------------
[00:48:48] thread '[ui] ui/nll/mir_check_cast_unsafe_fn.rs' panicked at 'explicit panic', src/tools/compiletest:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/mir_check_cast_unsize.rs","byte_start":553,"byte_end":555,"line_start":17,"line_end":17,"column_start":8,"column_end":10,"is_primary":false,"text":[{"text":"fn bar<'a>(x: &'a u32) -> &'static dyn Debug {","highlight_start":8,"highlight_end":10}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/mir_check_cast_unsize.rs","byte_start":597,"byte_end":598,"line_start":18,"line_end":18,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":"    x","highlight_start":5,"highlight_end":6}],"label":"returning this value requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/mir_check_cast_unsize.rs:18:5\n   |\nLL | fn bar<'a>(x: &'a u32) -> &'static dyn Debug {\n   |        -- lifetime `'a` defined here\nLL |     x\n   |     ^ returning this value requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/mir_check_cast_unsize.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/ty-outlives/projection-one-region-closure.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] 40    |
[00:48:48] 41    = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`...
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 44   --> $DIR/projection-one-region-closure.rs:55:39
[00:48:48] 45    |
[00:48:48] 45    |
[00:48:48] 46 LL | fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
[00:48:48] 94    |
[00:48:48] 94    |
[00:48:48] 95    = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 98   --> $DIR/projection-one-region-closure.rs:66:39
[00:48:48] 99    |
[00:48:48] 99    |
[00:48:48] 100 LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-closure/projection-one-region-closure.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-closure/projection-one-region-closure.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/ty-outlives/projection-one-region-closure.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs" "--target=x86_64-unknown-linux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-closure/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-closure/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1572,"byte_end":1598,"line_start":55,"line_end":55,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:19 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"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: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:55:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:19 ~ projection_one_region_closure[317d]::no_relationships_late[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: late-bound region is '_#3r\n   = note: number of external vids: 4\n   = note: where T: '_#2r\n   = note: where '_#1r: '_#2r\n\n"}
[00:48:48] {"message":"No external requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1453,"byte_end":1680,"line_start":51,"line_end":58,"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 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:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [\n    '_#1r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:51:1\n   |\nLL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | | {\n...  |\nLL | |     //~| ERROR\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:48:48] {"message":"the parameter type `T` may not live long enough","code":{"code":"E0309","explanation":"\nThe type definition contains some field whose type\nrequires an outlives annotation. Outlives annotations\n(e.g., `T: 'a`) are used to guarantee that all the data in T is valid\nfor at least the lifetime `'a`. This scenario most commonly\narises when the type contains an associated type reference\nlike `<T as SomeTrait<'a>>::Outui/nll/ty-outlives/projection-one-region-closure.rs:55:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `T: ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))`...\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1482,"byte_end":1484,"line_start":51,"line_end":51,"column_start":30,"column_end":32,"is_primary":false,"text":[{"text":"fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":30,"highlight_end":32}],"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-closure.rs","byte_start":1478,"byte_end":1480,"line_start":51,"line_end":51,"column_start":26,"column_end":28,"is_primary":false,"text":[{"text":"fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":26,"highlight_end":28}],"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":1582,"byte_end":1598,"line_start":55,"line_end":55,"column_start":39,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highldren":[],"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:66:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:23 ~ projection_one_region_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where T: '_#3r\n   = note: where '_#2r: '_#3r\n\n"}
[00:48:48] {"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":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_region_closure[317d]::no_relationships_early[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:48] {"message":"the parameter type `T` may not live long enough","code":{"code":"E0309","explanation":"\nThe type definition contains some field whose type\nrequires an outlives annotation. Outlives annotations\n(e.g., `T: 'a`) are used to guarantee that all the data in T is valid\nfor at least the lifetime `'a`. This scenario most commonly\narises when the type contains an associated type reference\nlike `<T as SomeTrait<'a>>::Output`, as shown in this example:\n\n```compile_fail,E0309\n// This won't compile because the applicable impl of\n// `SomeTrait` (below) requires that `T: 'a`, but the struct does\n// not have a matching where-clause.\nstruct Foo<'a, T> {\n    foo: <T as SomeTrait<'a>>::Output,\n}\n\ntrait SomeTrait<'a> {\n    type Output;\n}\n\nimpl<'a, T> SomeTrait<'a> for T\nwhere\n    T: 'a,\n{\n    type Output = u32;\n}\n```\n\nHere, the where clause `T: 'a` that appears on the impl is not known to be\nsatisfied on the struct. To make this example compile, you have to add\na where-clause like `T: 'a` to the struct definition:\n\n```\nstruct Foo<'a, T>\nwhere\n    T: 'a,\n{\n    foo: <T as SomeTrait<'a>>::Output\n}\n\ntrait SomeTrait<'a> {\n    type Output;\n}\n\nimpl<'a, T> SomeTrait<'a> for T\nwhere\n    T: 'a,\n{\n    type Output = u32;\n}\n```\n"},"level":"error","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, 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:66:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":1729,"byte_end":1731,"line_start":61,"line_end":61,"column_start":31,"column_end":33,"is_primary":false,"text":[{"text":"fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":31,"highlight_end":33}],"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-closure.rs","byte_start":1725,"byte_end":1727,"line_start":61,"line_end":61,"column_start":27,"column_end":29,"is_primary":false,"text":[{"text":"fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":27,"highlight_end":29}],"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":1841,"byte_end":1857,"line_start":66,"line_end":66,"column_start":39,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":55}],"label":"argument requires that `'b` must outlive `'a`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closur"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:10 ~ projection_one_region_closure[317d]::projection_outlives[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:72: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_closure[317d]::projection_outlives[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:48] {"message":"External requirements","code":null,"level":"note","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs","byte_start":2415,"byte_end":2441,"line_start":90,"line_end":90,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:31 ~ projection_one_region_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,"light_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs:84:1\n   |\nLL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     T: 'a,\n...  |\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:11 ~ projection_one_region_closure[317d]::elements_outlive[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:48] {"message":"aborting due to 4 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 4 previous errors\n\n"}
[00:48:48] {"message":"For more information about this error, try `rustc --explain E0309`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0309`.\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/ty-outlives/projection-one-region-closure.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
---
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 35   --> $DIR/projection-one-region-trait-bound-closure.rs:47:39
[00:48:48] 36    |
[00:48:48] 37 LL | fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
[00:48:48] 76                T
[00:48:48] 77            ]
[00:48:48] 78 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 80   --> $DIR/projection-one-region-trait-bound-closure.rs:57:39
[00:48:48] 81    |
[00:48:48] 82 LL | fn no_relationships_early<'a, 'b, T>(cell: Cell<&'a ()>, t: T)
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure/projection-one-region-trait-bound-closure.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure/projection-one-region-trait-bound-closure.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/ty-outlives/projection-one-region-trait-bound-closure.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86[],"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: '_#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: number of external vids: 4\n   = note: where '_#1r: '_#2r\n\n"}
[00:48:48] {"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_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:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [\n    '_#1r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:43:1\n   |\nLL | / fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | |     //~^ ERROR\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs","byte_start":1221,"byte_end":1223,"line_start":43,"line_end":43,"column_start":30,"column_end":32,"is_primary":false,"text":[{"text":"fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":30,"highlight_end":32}],"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":1217,"byte_end":1219,"line_start":43,"line_end":43,"column_start":26,"column_end":28,"is_primary":false,"text":[{"text":"fn no_relationships_late<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":26,"highlight_end":28}],"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":1321,"byte_end":1337,"line_start":47,"line_end":47,"column_start":39,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":39,"highlight_end":55}],"label":"argument requires that `'b` must outlive `'a`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:47:39\n   |\nLL | fn no_relationships_late<'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:48:48] {"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":1507,"byte_end":1533,"line_start":57,"line_end":57,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:23 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs: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: number of external vids: 4\n   = note: where '_#2r: '_#3r\n\n"}
[00:48:48] {"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":1375,"byte_end":1552,"line_start":52,"line_end":59,"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","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_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:52: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_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n           i/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:57:39\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:48:48] {"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":1842,"byte_end":1868,"line_start":70,"line_end":70,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:27 ~ projection_one_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r)>>::AssocType: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test(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: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 | |     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_closure[317d]::projection_outlives[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:48] {"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":2017,"byte_end":2043,"line_start":79,"line_end":79,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#2r: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:79:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:31 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where '_#2r: '_#3r\n\n"}
[00:48:48] {"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":1891,"byte_end":2047,"line_start":74,"line_end":80,"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:74:1\n   |\nLL | / fn elements_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b>,\nLL | |     'b: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:11 ~ projection_one_region_trait_bound_closure[317d]::elements_outlive[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:48] {"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":2388,"byte_end":2414,"line_start":91,"line_end":91,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where '_#1r: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs:91:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:34 ~ projection_one_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where '_#1r: '_#2r\n\n"}
[00:48:48] {"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":2066,"byte_end":2418,"line_start":83,"line_end":92,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":47},{"text":"where","highlight_stux-gnu" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-Zverbose" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"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":nullght_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ ERROR associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough","highlight_start":1,"highlight_end":99},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [\n    '_#1r,\n    '_#2r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:44:1\n   |\nLL | / fn no_relationships_late<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'c>,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | |     //~^ ERROR associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_late[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:48] {"message":"the associated type `<T as Anything<'_#5r, '_#6r>>::AssocType` may not live long enough","code":{"code":"E0309","explanation":"\nThe type definition contains some field whose type\nrequires an outlives annotation. Outlives annotations\n(e.g., `T: 'a`) are used to guarantee that all the data in T is valid\nfor at least the lifetime `'a`. This scenario most commonly\narises when the type contains an associated type reference\nlike `<T as SomeTrait<'a>>::Output`, as shown in this example:\n\n```compile_fail,E0309\n// This won't compile because the applicable impl of\n// `SomeTrait` (below) requires that `T: 'a`, but the struct does\n// not have a matching where-clause.\nstruct Foo<'a, T> {\n    foo: <T as SomeTrait<'a>>::Output,\n}\n\ntrait SomeTrait<'a> {\n    type Output;\n}\n\nimpl<'a, T> SomeTrait<'a> for T\nwhere\n    T: 'a,\n{\n    type Output = u32;\n}\n```\n\nHere, the where clause `T: 'a` that appears on the impl is not known to be\nsatisfied on the struct. To make this example compile, you have to add\na where-clause like `T: 'a` to the struct definition:\n\n```\nstruct Foo<'a, T>\nwhere\n    T: 'a,\n{\n    foo: <T as SomeTrait<'a>>::Output\n}\n\ntrait SomeTrait<'a> {\n    type Output;\n}\n\nimpl<'a, T> SomeTrait<'a> for T\nwhere\n    T: 'a,\n{\n    type Output = u32;\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1368,"byte_end":1394,"line_start":48,"line_end":48,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `<T as Anything<'_#5r, '_#6r>>::AssocType: ReFree(DefId(0/0:8 ~ projection_two_region_trait_bound_closure[317d]ote","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:58:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:27 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n           ]\n   = note: number of external vids: 5\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:48:48] {"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":1516,"byte_end":1785,"line_start":53,"line_end":60,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn no_relationships_early<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":67},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'c>,","highlight_start":1,"highlight_end":25},{"text":"    'a: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ ERROR associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough","highlight_start":1,"highlight_end":99},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs: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<'_#6r, '_#7r>>::AssocType` may not live long enough\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:9 ~ projection_two_region_trait_bound_closure[317d]::no_relationships_early[0]) with substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T\n           ]\n\n"}
[00:48:48] {"message":"the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough","code":{"code":"E0309","explanation":"\nThe type definition contains some field whose type\nrequires an outlives annotation. Outlives annotations\n(e.g., `T: 'a`) are used to guarantee that all the data in T is valid\nfor at least the lifetime `'a`. This scenario most commonly\narises when the type contains an associated type reference\nlike `<T as SomeTrait<'a>>::Output`, as shown in this example:\n\n```compile_fail,E0309\n// This won't compile because the applicable impl of\n// `SomeTrait` (below) requires that `T: 'a`, but the struct does\n// not have a matching where-clause.\nstruct Foo<'a, T> {\n    foo: <T as SomeTrait<'a>>::Output,\n}\n\ntrait SomeTrait<'a> {\n    type Output;\n}\n\nimpl<'a, T> SomeTrait<'a> for T\nwhere\n    T: 'a,\n{\n    type Output = u32;\n}\n```\n\nHere, the where clause `T: 'a` that appears on the impl is not known to be\nsatisfied on the struct. To make this example compile, you have to add\na where-clause like `T: 'a` to the struct definition:\n\n```\nstruct Foo<'a, T>\nwhere\n    T: 'a,\n{\n    foo: <T as SomeTrait<'a>>::Output\n}\n\ntrait SomeTrait<'a> {\n    type Output;\n}\n\nimpl<'a, T> SomeTrait<'a> for T\nwhere\n    T: 'a,\n{\n    type Output = u32;\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":1656,"byte_end":1682,"line_start":58,"line_end":58,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReEarlyBound(0, 'a)`...","code":null,"level":"help","spans":[],"children":[],"rendered":null}],"rendered":"error[E0309]: the associated type `<T as Anything<'_#6r, '_#7r>>::AssocType` may not live long enough\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:58:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = help: consider adding an explicit lifetime bound `<T as Anything<'_#6r, '_#7r>>::AssocType: ReEarlyBound(0, 'a)`...\n\n"}
[00:48:48] {"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":2083,"byte_end":2109,"line_start":71,"line_end":71,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:71:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:32 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n           ]\n   = note: number of external vids: 5\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:48:48] {"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":2113,"line_start":63,"line_end":72,"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":"    // We are projecting `<T as Anything<'b>>::AssocType`, and we know","highlight_start":1,"highlight_end":71},{"text":"    // that this outlives `'a` because of the where-clause.","highlight_start":1,"highlight_end":60},{"text":"","highlight_start":1,"highlight_end":1},{"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:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:63:1\n   |\nLL | / fn projection_outlives<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'c>,\nLL | |     T::AssocType: 'a,\n...  |\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:10 ~ projection_two_region_trait_bound_closure[317d]::projection_outlives[0]) with substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T\n           ]\n\n"}
[00:48:48] {"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":2267,"byte_end":2293,"line_start":80,"line_end":80,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 5","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:80:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:37 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive1[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               '_#3r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#4r ()>, T))\n           ]\n   = note: number of external vids: 5\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:48:48] {"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":2132,"byte_end":2297,"line_start":75,"line_enote: number of external vids: 5\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#3r)>>::AssocType: '_#4r\n\n"}
[00:48:48] {"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":2316,"byte_end":2481,"line_start":84,"line_end":90,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":62},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'c>,","highlight_start":1,"highlight_end":25},{"text":"    'c: 'a,","highlight_start":1,"highlight_end":12},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:12 ~ projection_two_region_trait_bound_closure[317d]::elements_outlive2[0]) with substs [\n    '_#1r,\n    '_#2r,\n    '_#3r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:84:1\n   |\nLL | / fn elements_outlive2<'a, 'b, 'c, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'c>,\nLL | |     'c: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(celll, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:46 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: late-bound region is '_#3r\n   = note: number of external vids: 4\n   = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r\n\n"}
[00:48:48] {"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":2500,"byte_end":2691,"line_start":93,"line_end":99,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":52},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'b, 'b>,","highlight_start":1,"highlight_end":25},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"    //~^ ERROR unsatisfied lifetime constraints","highlight_start":1,"highlight_end":48},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [\n    '_#1r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:93:1\n   |\nLL | / fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'b>,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | |     //~^ ERROR unsatisfied lifetime constraints\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs","byte_start":2519,"byte_end":2521,"line_start":93,"line_end":93,"column_start":20,"column_end":22,"is_primary":false,"text":[{"text":"fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":20,"highlight_end":22}],"label":"lifetime `'b` 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":2515,"byte_end":2517,"line_start":93,"line_end":93,"column_start":16,"column_end":18,"is_primary":false,"text":[{"text":"fn two_regions<'a, 'b, T>(cell: Cell<&'a ()>, t: T)","highlight_start":16,"highlight_end":18}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":nullegions_outlive[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    '_#2r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 4","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#2r)>>::AssocType: '_#3r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:107:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:50 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               '_#2r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#3r ()>, T))\n           ]\n   = note: number of external vids: 4\n   = note: where <T as Anything<ReClosureBound('_#2r), ReClosureBound('_#2r)>>::AssocType: '_#3r\n\n"}
[00:48:48] {"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":2710,"byte_end":2873,"line_start":102,"line_end":108,"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:102:1\n   |\nLL | / fn two_regions_outlive<'a, 'b, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'b, 'b>,\nLL | |     'b: 'a,\nLL | | {\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:14 ~ projection_two_region_trait_bound_closure[317d]::two_regions_outlive[0]) with substs [\n               '_#1r,\n               '_#2r,\n               T\n           ]\n\n"}
[00:48:48] {"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":3218,"byte_end":3244,"line_start":119,"line_end":119,"column_start":29,"column_end":55,"is_primary":true,"text":[{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":29,"highlight_end":55}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n    '_#1r,\n    T,\n    i32,\n    extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"number of external vids: 3","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: External requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:119:29\n   |\nLL |     with_signature(cell, t, |cell, t| require(cell, t));\n   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^\n   |\n   = note: defining type: DefId(0/1:53 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]::{{closure}}[0]) with closure substs [\n               '_#1r,\n               T,\n               i32,\n               extern \"rust-call\" fn((std::cell::Cell<&'_#2r ()>, T))\n           ]\n   = note: number of external vids: 3\n   = note: where <T as Anything<ReClosureBound('_#1r), ReClosureBound('_#1r)>>::AssocType: '_#2r\n\n"}
[00:48:48] {"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":2892,"byte_end":3248,"line_start":111,"line_end":120,"column_start":1,"column_end":2,"is_primary":true,"text":[{"text":"fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)","highlight_start":1,"highlight_end":47},{"text":"where","highlight_start":1,"highlight_end":6},{"text":"    T: Anything<'a, 'a>,","highlight_start":1,"highlight_end":25},{"text":"{","highlight_start":1,"highlight_end":2},{"text":"    // Note that in this case the closure still propagates an external","highlight_start":1,"highlight_end":71},{"text":"    // requirement between two variables in its signature, but the","highlight_start":1,"highlight_end":67},{"text":"    // creator maps both those two region variables to `'a` on its","highlight_start":1,"highlight_end":67},{"text":"    // side.","highlight_start":1,"highlight_end":13},{"text":"    with_signature(cell, t, |cell, t| require(cell, t));","highlight_start":1,"highlight_end":57},{"text":"}","highlight_start":1,"highlight_end":2}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [\n    '_#1r,\n    T\n]","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"note: No external requirements\n  --> /checkout/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs:111:1\n   |\nLL | / fn one_region<'a, T>(cell: Cell<&'a ()>, t: T)\nLL | | where\nLL | |     T: Anything<'a, 'a>,\nLL | | {\n...  |\nLL | |     with_signature(cell, t, |cell, t| require(cell, t));\nLL | | }\n   | |_^\n   |\n   = note: defining type: DefId(0/0:15 ~ projection_two_region_trait_bound_closure[317d]::one_region[0]) with substs [\n               '_#1r,\n               T\n           ]\n\n"}
[00:48:48] {"message":"aborting due to 3 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 3 previous errors\n\n"}
[00:48:48] {"message":"For more information about this error, try `rustc --explain E0309`.","code":null,"level":"","spans":[],"children":[],"rendered":"For more information about this error, try `rustc --explain E0309`.\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/type-alias-free-regions.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/type-alias-free-regions.rs:19:9
[00:48:48] 3    |
[00:48:48] 4 LL | impl<'a> FromBox<'a> for c<'a> {
[00:48:48] 
[00:48:48] 8 LL |         c { f: b } //~ ERROR
[00:48:48] 9    |         ^^^^^^^^^^ returning this value requires that `'1` must outlive `'a`
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 12   --> $DIR/type-alias-free-regions.rs:29:9
[00:48:48] 13    |
[00:48:48] 13    |
[00:48:48] 14 LL | impl<'a> FromTuple<'a> fort_start":17,"highlight_end":18}],"label":"has type `std::boxed::Box<std::boxed::Box<&'1 isize>>`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/type-alias-free-regions.rs","byte_start":305,"byte_end":307,"line_start":17,"line_end":17,"column_start":6,"column_end":8,"is_primary":false,"text":[{"text":"impl<'a> FromBox<'a> for c<'a> {","highlight_start":6,"highlight_end":8}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/type-alias-free-regions.rs","byte_start":378,"byte_end":388,"line_start":19,"line_end":19,"column_start":9,"column_end":19,"is_primary":true,"text":[{"text":"        c { f: b } //~ ERROR","highlight_start":9,"highlight_end":19}],"label":"returning this value requires that `'1` must outlive `'a`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/type-alias-free-regions.rs:19:9\n   |\nLL | impl<'a> FromBox<'a> for c<'a> {\n   |      -- lifetime `'a` defined here\nLL |     fn from_box(b: Box<b>) -> Self {\n   |                 - has type `std::boxed::Box<std::boxed::Box<&'1 isize>>`\nLL |         c { f: b } //~ ERROR\n   |         ^^^^^^^^^^ returning this value requires that `'1` must outlive `'a`\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/type-alias-free-regions.rs","byte_start":523,"byte_end"due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/type-alias-free-regions.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/user-annotations/closure-substs.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/closure-substs.rs:18:16
[00:48:48] 3    |
[00:48:48] 4 LL | fn foo<'a>() {
[00:48:48] 
[00:48:48] 7 LL |         return x; //~ ERROR unsatisfied lifetime constraints
[00:48:48] 8    |                ^ returning this value requires that `'a` must outlive `'static`
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 11   --> $DIR/closure-substs.rs:25:16
[00:48:48] 12    |
[00:48:48] 12    |
[00:48:48] 13 LL |     |x: &i32| -> &'static i32 {
[00:48:48] 
[00:48:48] 15 LL |         return x; //~ ERROR unsatisfied lifetime constraints
[00:48:48] 16    |                ^ returning this value requires that `'1` must outlive `'static`
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 19   --> $DIR/closure-substs.rs:32:9
[00:48:48] 20    |
[00:48:48] 20    |
[00:48:48] 21 LL | fn bar<'a>() {
[00:48:48] 
[00:48:48] 
[00:48:48] The actual stderr differed from the ","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/closure-substs.rs","byte_start":663,"byte_end":664,"line_start":18,"line_end":18,"column_start":16,"column_end":17,"is_primary":true,"text":[{"text":"        return x; //~ ERROR unsatisfied lifetime constraints","highlight_start":16,"highlight_end":17}],"label":"returning this value requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/user-annotations/closure-substs.rs:18:16\n   |\nLL | fn foo<'a>() {\n   |        -- lifetime `'a` defined here\n...\nLL |         return x; //~ ERROR unsatisfied lifetime constraints\n   |                ^ returning this value requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/closure-substs.rs","byte_start":784,"byte_end":785,"line_start":24,"line_end":24,"column_start":9,"column_end":10,"is_primary":false,"text":[{"text":"    |x: &i32| -> &'static i32 {","highlight_start":9,"highlight_end":10}],"label":"let's call the lifetime of this reference `'1`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/closure-substs.rs","byte_start":823,"byte_end":824,"line_start":25,"line_end":25,"column_start":16,"column_end":17,"is_primary":true,"text":[{"text":"        return x; //~ ERROR unsatisfied lifetime constraints","highlight_start":16,"highlight_end":17}],"label":"returning this value requires that `'1` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/user-annotations/closure-substs.rs:25:16\n   |\nLL |     |x: &i32| -> &'static i32 {\n   |         - let's call the lifetime of this reference `'1`\nLL |         return x; //~ ERROR unsatisfied lifetime constraints\n   |                ^ returning this value requires that `'1` must outlive `'static`\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/closure-substs.rs","byte_start":886,"byte_end":888,"line_start":29,"line_end":29,"column_start":8,"column_end":10,"is_primary":false,"text":[{"text":"fn bar<'a>() {","highlight_start":8,"highlight_end":10}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/closure-substs.rs","byte_start":986,"byte_end":990,"line_start":32,"line_end":32,"column_start":9,"column_end":13,"is_primary":true,"text":[{"text":"        b(x); //~ ERROR unsatisfied lifetime constraints","highlight_start":9,"highlight_end":13}],"label":"argument requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.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/user-annotations/constant-in-expr-inherent-1/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/constant-in-expr-inherent-1/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs","byte_start":106,"byte_end":108,"line_start":9,"line_end":9,"column_start":8,"column_end":10,"is_primary":false,"text":[{"text":"fn foo<'a>(_: &'a u32) -> &'static u32 {","highlight_start":8,"highlight_end":10}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/constant-in-expr-inherent-1.rs","byte_start":144,"byte_end":156,"line_start":10,"line_end":10,"column_start":5,"column_end":17,"is_primary":true,"text":[{"text":"    <Foo<'a>>::C //~ ERROR","highlight_start":5,"highlight_end":17}],"labend pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/user-annotations/constant-in-expr-trait-item-1.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.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/user-annotations/constant-in-expr-trait-item-1/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/constant-in-expr-trait-item-1/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs","byte_start":125,"byte_end":127,"line_start":11,"line_end":11,"column_start":8,"column_end":10,"is_primary":false,"text":[{"text":"fn foo<'a>(_: &'a u32) -> &'static u32 {","highlight_start":8,"highlight_end":10}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs","byte_start":163,"byte_end":181,"line_start":12,"line_end":12,"column_start":5,"column_end":23,"is_primary":true,"text":[{"text":"    <() as Foo<'a>>::C //~ ERROR","highlight_start":5,"highlight_end":23}],"label":"returning this value requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-1.rs:12:5\n   |\nLL | fn foo<'a>(_: &'a u32) -> &'static u32 {\n   |        -- lifetime `'a` defined here\nLL |     <() as Foo<'a>>::C //~ ERROR\n   |     ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/user-annotations/constant-in-expr-trait-item-1.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/user-annotations/constant-in-expr-normalize.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/constant-in-expr-normalize.rs:20:5
[00:48:48] 3    |
[00:48:48] 4 LL | fn foo<'a>(_: &'a u32) -> &'static u32 {
[00:48:48] 
[00:48:48] 
[00:48:48] Try":false,"text":[{"text":"fn foo<'a>(_: &'a u32) -> &'static u32 {","highlight_start":8,"highlight_end":10}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/constant-in-expr-normalize.rs","byte_start":253,"byte_end":271,"line_start":20,"line_end":20,"column_start":5,"column_end":23,"is_primary":true,"text":[{"text":"    <() as Foo<'a>>::C //~ ERROR","highlight_start":5,"highlight_end":23}],"label":"returning this value requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/user-annotations/constant-in-expr-normalize.rs:20:5\n   |\nLL | fn foo<'a>(_: &'a u32) -> &'static u32 {\n   |        -- lifetime `'a` defined here\nLL |     <() as Foo<'a>>::C //~ ERROR\n   |     ^^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/user-annotations/constant-in-expr-normalize.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/user-annotations/constant-in-expr-trait-item-2.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/constant-in-expr-trait-item-2.rs:12:5
[00:48:48] 3    |
[00:48:48] 4 LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/constant-in-expr-trait-item-2/constant-in-expr-trait-item-2.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/user-annotations/constant-in-expr-trait-item-2.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.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/user-annotations/constant-in-expr-trait-item-2/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/constant-in-expr-trait-item-2/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs","byte_start":125,"byte_end":127,"line_start":11,"line_end":11,"column_start":8,"column_end":10,"is_primary":false,"text":[{"text":"fn foo<'a, T: Foo<'a>>() -> &'static u32 {","highlight_start":8,"highlight_end":10}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs","byte_start":165,"byte_end":182,"line_start":12,"line_end":12,"column_start":5,"column_end":22,"is_primary":true,"text":[{"text":"    <T as Foo<'a>>::C //~ ERROR","highlight_start":5,"highlight_end":22}],"label":"returning this value requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-2.rs:12:5\n   |\nLL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {\n   |        -- lifetime `'a` defined here\nLL |     <T as Foo<'a>>::C //~ ERROR\n   |     ^^^^^^^^^^^^^^^^^ returning this value requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/user-annotations/constant-in-expr-trait-item-2.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/user-annotations/constant-in-expr-trait-item-3.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/constant-in-expr-trait-item-3.rs:12:5
[00:48:48] 3    |
[00:48:48] 4 LL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/constant-in-expr-trait-item-3/constant-in-expr-trait-item-3.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/user-annotations/constant-in-expr-trait-item-3.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.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/user-annotations/constant-in-expr-trait-item-3/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/constant-in-expr-trait-item-3/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs","byte_start":125,"byte_end":127,"line_start":11,"line_end":11,"column_start":8,"column_end":10,"is_primary":false,"text":[{"text":"fn foo<'a, T: Foo<'a>>() -> &'static u32 {","highlight_start":8,"highlight_end":10}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs","byte_start":165,"byte_end":169,"line_start":12,"line_end":12,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":"    T::C //~ ERROR","highlight_start":5,"highlight_end":9}],"label":"returning this value requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/user-annotations/constant-in-expr-trait-item-3.rs:12:5\n   |\nLL | fn foo<'a, T: Foo<'a>>() -> &'static u32 {\n   |        -- lifetime `'a` defined here\nLL |     T::C //~ ERROR\n   |     ^^^^ returning this value requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"aborting due to previous error",ustc" "/checkout/src/test/ui/nll/user-annotations/issue-54124.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/user-annotations/issue-54124/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/issue-54124/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/issue-54124.rs","byte_start":57,"byte_end":58,"line_start":4,"line_end":4,"column_start":24,"column_end":25,"is_primary":false,"text":[{"text":"    let _:fn(&()) = |_:&'a ()| {};","highlight_start":24,"highlight_end":25}],"label":"let's call the lifetime of this reference `'1`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/issue-54124.rs","byte_start":26,"byte_end":28,"line_start":3,"line_end":3,"column_start":9,"column_end":11,"is_primary":false,"text":[{"text":"fn test<'a>() {","highlight_start":9,"highlight_end":11}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annot:null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/user-annotations/issue-54124.rs:4:22\n   |\nLL | fn test<'a>() {\n   |         -- lifetime `'a` defined here\nLL |     let _:fn(&()) = |_:&'a ()| {};\n   |                      ^ requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"aborting due to 2 previous errors","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to 2 previous errors\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/user-annotations/issue-54124.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/user-annotations/wf-self-type.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/wf-self-type.rs:22:5
[00:48:48] 3    |
[00:48:48] 4 LL | pub fn foo<'a, 'b>(u: &'b ()) -> &'a () {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/wf-self-type/wf-self-type.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/wf-self-type/wf-self-type.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/user-annotations/wf-self-type.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48]gestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/wf-self-type.rs","byte_start":663,"byte_end":676,"line_start":22,"line_end":22,"column_start":5,"column_end":18,"is_primary":true,"text":[{"text":"    Foo::xmute(u) //~ ERROR unsatisfied lifetime constraints","highlight_start":5,"highlight_end":18}],"label":"returning this value requires that `'b` must outlive `'a`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/user-annotations/wf-self-type.rs:22:5\n   |\nLL | pub fn foo<'a, 'b>(u: &'b ()) -> &'a () {\n   |            --  -- lifetime `'b` defined here\n   |            |\n   |            lifetime `'a` defined here\nLL |     Foo::xmute(u) //~ ERROR unsatisfied lifetime constraints\n   |     ^^^^^^^^^^^^^ returning this value requires that `'b` must outlive `'a`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/user-annotations/wf-self-type.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/user-annotations/patterns.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] 148 LL | }
[00:48:48] 149    | - `x` dropped here while still borrowed
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 152   --> $DIR/patterns.rs:113:5
[00:48:48] 153    |
[00:48:48] 153    |
[00:48:48] 154 LL | fn static_to_a_to_static_through_variable<'a>(x: &'a u32) -> &'static u32 {
[00:48:48] 
[00:48:48] 157 LL |     y //~ ERROR
[00:48:48] 158    |     ^ returning this value requires that `'a` must outlive `'static`
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 161   --> $DIR/patterns.rs:125:5
[00:48:48] 162    |
[00:48:48] 162    |
[00:48:48] 163 LL | fn static_to_a_to_static_through_tuple<'a>(x: &'a u32) -> &'static u32 {
[00:48:48] 
[00:48:48] 166 LL |     y //~ ERROR
[00:48:48] 167    |     ^ returning this value requires that `'a` must outlive `'static`
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 170   --> $DIR/patterns.rs:130:5
[00:48:48] 171    |
[00:48:48] 171    |
[00:48:48] 172 LL | fn static_to_a_to_static_through_struct<'a>(_x: &'a u32) -> &'static u32 {
[00:48:48] 
[00:48:48] 175 LL |     y //~ ERROR
[00:48:48] 176    |     ^ returning this value requires that `'a` must outlive `'static`
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 179   --> $DIR/patterns.rs:134:18
[00:48:48] 180    |
[00:48:48] 180    |
[00:48:48] 181 LL | fn a_to_static_then_static<'a>(x: &'a u32) -> &'static u32 {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64c u32;\n   |            ------------ type annotation requires that `x` is borrowed for `'static`\nLL |     y = &x; //~ ERROR\n   |         ^^ borrowed value does not live long enough\nLL | }\n   | - `x` dropped here while still borrowed\n\n"}
[00:48:48] {"message":"`x` does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":266,"byte_end":268,"line_start":16,"line_end":16,"column_start":9,"column_end":11,"is_primary":true,"text":[{"text":"    y = &x; //~ ERROR","highlight_start":9,"highlight_end":11}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":280,"byte_end":281,"line_start":17,"line_end":17,"column_start":1,"column_end":2,"is_primary":false,"text":ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":402,"byte_end":404,"line_start":22,"line_end":22,"column_start":13,"column_end":15,"is_primary":true,"text":[{"text":"    let y = &x; //~ ERROR","highlight_start":13,"highlight_end":15}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":457,"byte_end":458,"line_start":25,"line_end":25,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"`x` dropped here while still borrowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":431,"byte_end":443,"line_start":23,"line_end":23,"column_start":16,"column_end":28,"is_primary":false,"text":[{"text":"    let ref z: &'static u32 = y;","highlight_start":16,"highlight_end":28}],"label":"type annotation requires that `x` is borrowed for `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0597]: `x` does not live long enough\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:22:13\n   |\nLL |     let y = &x; //~ ERROR\n   |             ^^ borrowed value does not live long enough\nLL |     let ref z: &'static u32 = y;\n   |                ------------ type annotation requires that `x` is borrowed for `'static`\nLL |     **z\nLL | }\n   | - `x` dropped here while still borrowed\n\n"}
[00:48:48] {"message":"`x` does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":706,"byte_end":708,"line_start":41,"line_end":41,"column_start":9,"column_end":11,"is_primary":true,"text":[{"text":"    y = &x; //~ ERROR","highlight_start":9,"highlight_end":11}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":720,"byte_end":721,"line_start":42,"line_end":42,"column_start":1,"column_end":2,"is_primary":false,"text":[{"texthey are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1035,"byte_end":1037,"line_start":53,"line_end":53,"column_start":10,"column_end":12,"is_primary":true,"text":[{"text":"    _y = &x; //~ ERROR","highlight_start":10,"highlight_end":12}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1049,"byte_end":1050,"line_start":54,"line_end":54,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"`x` dropped here while still borrowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1006,"byte_end":1024,"line_start":52,"line_end":52,"column_start":36,"column_end":54,"is_primary":false,"text":[{"text":"    let Single2 { value: mut _y }: Single2<StaticU32>;","highlight_start":36,"highlight_end":54}],"label":"type annotation requires that `x` is borrowed for `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0597]: `x` does not live long enough\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:53:10\n   |\nLL |     let Single2 { value: mut _y }: Single2<StaticU32>;\n   |                                    ------------------ type annotation requires that `x` is borrowed for `'static`\nLL |     _y = &x; //~ ERROR\n   |          ^^ borrowed value does not live long enough\nLL | }\n   | - `x` dropped here while still borrowed\n\n"}
[00:48:48] {"message":"`x` does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1127,"byte_end":1129,"line_start":58,"line_end":58,"column_start":27,"column_end":29,"is_primary":true,"text":[{"text":"    let y: &'static u32 = &x; //~ ERROR","highlight_start":27,"highlight_end":29}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1141,"byte_end":1142,"line_start":59,"line_end":59,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"`x` dropped here while still borrowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1112,"byte_end":1124,"line_start":58,"line_end":58,"column_start":12,"column_end":24,"is_primary":false,"text":[{"text":"    let y: &'static u32 = &x; //~ ERROR","highlight_start":12,"highlight_end":24}],"label":"type annotation requires that `x` is borrowed for `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0597]: `x` does not live long enough\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:58:27\n   |\nLL |     let y: &'static u32 = &x; //~ ERROR\n   |            ------------   ^^ borrowed value does not live long enough\n   |            |\n   |            type annotation requires that `x` is borrowed for `'static`\nLL | }\n   | - `x` dropped here while still borrowed\n\n"}
[00:48:48] {"message":"`x` does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1221,"byte_end":1223,"line_start":63,"line_end":63,"column_start":27,"column_end":29,"is_primary":true,"text":[{"text":"    let _: &'static u32 = &x; //~ ERROR","highlight_start":27,"highlight_end":29}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1625,"byte_end":1626,"line_start":73,"line_end":73,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"`x` dropped here while still borrowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1206,"byte_end":1218,"line_start":63,"line_end":63,"column_start":12,"column_end":24,"is_primary":false,"text":[{"text":"    let _: &'static u32 = &x; //~ ERROR","highlight_start":12,"highlight_end":24}],"label":"type annotation requires that `x` is borrowed for `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0597]: `x` does not live long enough\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:63:27\n   |\nLL |     let _: &'static u32 = &x; //~ ERROR\n   |            ------------   ^^ borrowed value does not live long enough\n   |            |\n   |            type annotation requires that `x` is borrowed for `'static`\n...\nLL | }\n   | - `x` dropped here while still borrowed\n\n"}
[00:48:48] {"message":"temporary value dropped while borrowed","code":{"code":"E0716","explanation":"\nThis error indicates that a temporary value is being dropped\nwhile a borrow is still in active use.\n\nErroneous code example:\n\n```compile_fail,E0716\n# #![feature(nll)]\nfn foo() -> i32 { 22 }\nfn bar(x: &i32) -> &i32 { x }\nlet p = bar(&foo());\n         // ------ creates a temporary\nlet q = *p;\n```\n\nHere, the expression `&foo()` is borrowing the expression\n`foo()`. As `foo()` is call to a function, and not the name of\na variable, this creates a **temporary** -- that temporary stores\nthe return value from `foo()` so that it can be borrowed.\nSo you might imagine that `let p = bar(&foo())` is equivalent\nto this:\n\n```compile_fail,E0597\n# fn foo() -> i32 { 22 }\n# fn bar(x: &i32) -> &i32 { x }\nlet p = {\n  let tmp = foo(); // the temporary\n  bar(&tmp)\n}; // <-- tmp is freed as we exit this block\nlet q = p;\n```\n\nWhenever a temporary is created, it is automatically dropped (freed)\naccording to fixed rules. Ordinarily, the temporary is dropped\nat the end of the enclosing statement -- in this case, after the `let`.\nThis is illustrated in the example above by showing that `tmp` would\nbe freed as we exit the block.\n\nTo fix this problem, you need to create a local variable\nto store the value in rather than relying on a te_start":65,"line_end":65,"column_start":41,"column_end":54,"is_primary":true,"text":[{"text":"    let _: Vec<&'static String> = vec![&String::new()];","highlight_start":41,"highlight_end":54}],"label":"creates a temporary which is freed while still in use","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1290,"byte_end":1291,"line_start":65,"line_end":65,"column_start":55,"column_end":56,"is_primary":false,"text":[{"text":"    let _: Vec<&'static String> = vec![&String::new()];","highlight_start":55,"highlight_end":56}],"label":"temporary value is freed at the end of this statement","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1247,"byte_end":1267,"line_start":65,"line_end":65,"column_start":12,"column_end":32,"is_primary":false,"text":[{"text":"    let _: Vec<&'static String> = vec![&String::new()];","highlight_start":12,"highlight_end":32}],"label":"type annotation requires that borrow lasts for `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0716]: temporary value dropped while borrowed\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:65:41\n   |\nLL |     let _: Vec<&'static String> = vec![&String::new()];\n   |            --------------------         ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement\n   |            |                            |\n   |            |                       lue = foo(); // dropped at the end of the enclosing block\nlet p = bar(&value);\nlet q = *p;\n```\n\nBy introducing the explicit `let value`, we allocate storage\nthat will last until the end of the enclosing block (when `value`\ngoes out of scope). When we borrow `&value`, we are borrowing a\nlocal variable that already exists, and hence no temporary is created.\n\nTemporaries are not always dropped at the end of the enclosing\nstatement. In simple cases where the `&` expression is immediately\nstored into a variable, the compiler will automatically extend\nthe lifetime of the temporary until the end of the enclosinb\nblock. Therefore, an alternative way to fix the original\nprogram is to write `let tmp = &foo()` and not `let tmp = foo()`:\n\n```\nfn foo() -> i32 { 22 }\nfn bar(x: &i32) -> &i32 { x }\nlet value = &foo();\nlet p = bar(value);\nlet q = *p;\n```\n\nHere, we are still borrowing `foo()`, but as the borrow is assigned\ndirectly into a variable, the temporary will not be dropped until\nthe end of the enclosing block. Similar rules apply when temporaries\nare stored into aggregate structures like a tuple or struct:\n\n```\n// Here, two temporaries are created, but\n// as they are stored directly into `value`,\n// they are not dropped until the end of the\n// enclosing block.\nfn foo() -> i32 { 22 }\nlet value = (&foo(), &foo());\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1406,"byte_end":1419,"line_start":68,"line_end":68,"column_start":52,"column_end":65,"is_primary":true,"text":[{"text":"    let (_, a): (Vec<&'static String>, _) = (vec![&Striill in use\n   |                 type annotation requires that borrow lasts for `'static`\n\n"}
[00:48:48] {"message":"temporary value dropped while borrowed","code":{"code":"E0716","explanation":"\nThis error indicates that a temporary value is being dropped\nwhile a borrow is still in active use.\n\nErroneous code example:\n\n```compile_fail,E0716\n# #![feature(nll)]\nfn foo() -> i32 { 22 }\nfn bar(x: &i32) -> &i32 { x }\nlet p = bar(&foo());\n         // ------ creates a temporary\nlet q = *p;\n```\n\nHere, the expression `&foo()` is borrowing the expression\n`foo()`. As `foo()` is call to a function, and not the name of\na variable, this creates a **temporary** -- that temporary stores\nthe return value from `foo()` so that it can be borrowed.\nSo you might imagine that `let p = bar(&foo())` is equivalent\nto this:\n\n```compile_fail,E0597\n# fn foo() -> i32 { 22 }\n# fn bar(x: &i32) -> &i32 { x }\nlet p = {\n  let tmp = foo(); // the temporary\n  bar(&tmp)\n}; // <-- tmp is freed as we exit this block\nlet q = p;\n```\n\nWhenever a temporary is created, it is automatically dropped (freed)\naccording to fixed rules. Ordinarily, the temporary is dropped\nat the end of the enclosing statement -- in this case, after the `let`.\nThis is illustrated in the example above by showing that `tmp` would\nbe freed as we exit the block.\n\nTo fix this problem, you need to create a local variable\nto store the value in rather than relying on a temporary.\nFor example, you might change the original program to\nthe following:\n\n```\nfn foo() -> i32 { 22 }\nfn bar(x: &i32) -> &i32 { x }\nlet value = foo(); // dropped at the end of the enclosing block\nlet p = bar(&value);\nlet q = *p;\n```\n\nBy introducing the explicit `let value`, we allocate storage\nthat will last until the end of the enclosing block (when `value`\ngoes out of scope). When we borrow `&value`, we are borrowing a\nlocal variable that already exists, and hence no temporary is created.\n\nTemporaries are not always dropped at the end of the enclosing\nstatement. In simple cases where the `&` expression is immediately\nstored into a variable, the compiler will automatically extend\nthe lifetime of the temporary until the end of the enclosinb\nblock. Therefore, an alternative way to fix the original\nprogram is to write `let tmp = &foo()` and not `let tmp = foo()`:\n\n```\nfn foo() -> i32 { 22 }\nfn bar(x: &i32) -> &i32 { x }\nlet value = &foo();\nlet p = bar(value);\nlet q = *p;\n```\n\nHere, we are still borrowing `foo()`, but as the borrow is assigned\ndirectly into a variable, the temporary will not be dropped until\nthe end of the enclosing block. Similar rules apply when temporaries\nare stored into aggregate structures like a tuple or struct:\n\n```\n// Here, two temporaries are created, but\n// as they are stored directly into `value`,\n// they are not dropped until the end of the\n// enclosing block.\nfn foo() -> i32 { 22 }\nlet value = (&foo(), &foo());\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1542,"byte_end":1555,"line_start":71,"line_end":71,"column_start":53,"column_end":66,"is_primary":true,"text":[{"text":"    let (_a, b): (Vec<&'static String>, _) = (vec![&String::new()], 44);","highlight_start":53,"hin_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1701,"byte_end":1720,"line_start":77,"line_end":77,"column_start":17,"column_end":36,"is_primary":false,"text":[{"text":"    let (_, _): (&'static u32, u32) = (&x, 44); //~ ERROR","highlight_start":17,"highlight_end":36}],"label":"type annotation requires that `x` is borrowed for `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0597]: `x` does not live long enough\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:77:40\n   |\nLL |     let (_, _): (&'static u32, u32) = (&x, 44); //~ ERROR\n   |                 -------------------    ^^ borrowed value does not live long enough\n   |                 |\n   |                 type annotation requires that `x` is borrowed for `'static`\nLL | }\n   | - `x` dropped here while still borrowed\n\n"}
[00:48:48] {"message":"`x` does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Fowed value does not live long enough\n   |                 |\n   |                 type annotation requires that `x` is borrowed for `'static`\nLL | }\n   | - `x` dropped here while still borrowed\n\n"}
[00:48:48] {"message":"`x` does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1998,"byte_end":2000,"line_start":87,"line_end":87,"column_start":69,"column_end":71,"is_primary":true,"text":[{"text":"    let Single { value: y }: Single<&'static u32> = Single { value: &x }; //~ ERROR","highlight_start":69,"highlight_end":71}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2014,"byte_end":2015,"line_start":88,"line_end":88,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"`x` dropped here while still borrowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":1959,"byte_end":1979,"line_start":87,"line_end":87,"column_start":30,"column_end":50,"is_primary":false,"text":[{"text":"    let Single { value: y }: Single<&'static u32> = Single { value: &x }; //~ ERROR","highlight_start":30,"highlight_end":50}],"label":"type annotation requires that `x` is borrowed for `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0597]: `x` does not live long enough\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:87:69\n   |\nLL |     let Single { value: y }: Single<&'static u32> = Single { value: &x }; //~ ERROR\n   |                              --------------------                   ^^ borrowed value does not live long enough\n   |                              |\n   |                              type annotation requires that `x` is borrowed for `'static`\nLL | }\n   | - `x` dropped here while still borrowed\n\n"}
[00:48:48] {"message":"`x` does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0597]: `x` does not live long enough\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:92:69\n   |\nLL |     let Single { value: _ }: Single<&'static u32> = Single { value: &x }; //~ ERROR\n   |                              --------------------                   ^^ borrowed value does not live long enough\n   |                              |\n   |                              type annotation requires that `x` is borrowed for `'static`\nLL | }\n   | - `x` dropped here while still borrowed\n\n"}
[00:48:48] {"message":"`x` does not live long enough","code":{"code":"E0597","explanation":"\nThis error occurs because a borrow was made inside a variable which has a\ngreater lifetime than the borrowed one.\n\nExample of erroneous code:\n\n```compile_fail,E0597\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet mut x = Foo { x: None };\nlet y = 0;\nx.x = Some(&y); // error: `y` does not live long enough\n```\n\nIn here, `x` is created before `y` and therefore has a greater lifetime. Always\nkeep in mind that values in a scope are dropped in the opposite order they are\ncreated. So to fix the previous example, just make the `y` lifetime greater than\nthe `x`'s one:\n\n```\nstruct Foo<'a> {\n    x: Option<&'a u32>,\n}\n\nlet y = 0;\nlet mut x = Foo { x: None };\nx.x = Some(&y);\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2378,"byte_end":2380,"line_start":100,"line_end":100,"column_start":17,"column_end":19,"is_primary":true,"text":[{"text":"        value1: &x, //~ ERROR","highlight_start":17,"highlight_end":19}],"label":"borrowed value does not live long enough","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2420,"byte_end":2421,"line_start":103,"line_end":103,"column_start":1,"column_end":2,"is_primary":false,"text":[{"text":"}","highlight_start":1,"highlight_end":2}],"label":"`x` dropped here while still borrowed","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2330,"byte_end":2350,"line_start":99,"line_end":99,"column_start":42,"column_end":62,"is_primary":false,"text":[{"text":"    let Double { value1: _, value2: _ }: Double<&'static u32> = Double {","highlight_start":42,"highlight_end":62}],"label":"type annotation requires that `x` is borrowed for `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error[E0597]: `x` does not live long enough\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:100:17\n   |\nLL |     let Double { value1: _, value2: _ }: Double<&'static u32> = Double {\n   |                                          -------------------- type annotation requires that `x` is borrowed for `'static`\nLL |         value1: &x, //~ ERROR\n   |                 ^^ borrowed value does not live long enough\n...\nLL | }\n   | - `x` dropped here while still borrowed\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2465,"byte_end":2467,"line_start":105,"line_end":105,"column_start":43,"column_end":45,"is_primary":false,"text":[{"text":"fn static_to_a_to_static_through_variable<'a>(x: &'a u32) -> &'static u32 {","highlight_start":43,"highlight_end":45}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2535,"byte_end":2536,"line_start":113,"line_end":113,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":"    y //~ ERROR","highlight_start":5,"highlight_end":6}],"label":"returning this value requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:113:5\n   |\nLL | fn static_to_a_to_static_through_variable<'a>(x: &'a u32) -> &'static u32 {\n   |                                           -- lifetime `'a` defined here\n...\nLL |     y //~ ERROR\n   |     ^ returning this value requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2589,"byte_end":2591,"line_start":116,"line_end":116,"column_start":40,"column_end":42,"is_primary":false,"text":[{"text":"fn static_to_a_to_static_through_tuple<'a>(x: &'a u32) -> &'static u32 {","highlight_start":40,"highlight_end":42}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2679,"byte_end":2680,"line_start":125,"line_end":125,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":"    y //~ ERROR","highlight_start":5,"highlight_end":6}],"label":"returning this value requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:125:5\n   |\nLL | fn static_to_a_to_static_through_tuple<'a>(x: &'a u32) -> &'static u32 {\n   |                                        -- lifetime `'a` defined here\n...\nLL |     y //~ ERROR\n   |     ^ returning this value requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2734,"byte_end":2736,"line_start":128,"line_end":128,"column_start":41,"column_end":43,"is_primary":false,"text":[{"text":"fn static_to_a_to_static_through_struct<'a>(_x: &'a u32) -> &'static u32 {","highlight_start":41,"highlight_end":43}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2843,"byte_end":2844,"line_start":130,"line_end":130,"column_start":5,"column_end":6,"is_primary":true,"text":[{"text":"    y //~ ERROR","highlight_start":5,"highlight_end":6}],"label":"returning this value requires that `'a` must outlive `'static`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/user-annotations/patterns.rs:130:5\n   |\nLL | fn static_to_a_to_static_through_struct<'a>(_x: &'a u32) -> &'static u32 {\n   |                                         -- lifetime `'a` defined here\nLL |     let Single { value: y }: Single<&'a u32> = Single { value: &22 };\nLL |     y //~ ERROR\n   |     ^ returning this value requires that `'a` must outlive `'static`\n\n"}
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2885,"byte_end":2887,"line_start":133,"line_end":133,"column_start":28,"column_end":30,"is_primary":false,"text":[{"text":"fn a_to_static_then_static<'a>(x: &'a u32) -> &'static u32 {","highlight_start":28,"highlight_end":30}],"label":"lifetime `'a` defined here","suggested_replacement":null,"suggestion_applicability":null,"expansion":null},{"file_name":"/checkout/src/test/ui/nll/user-annotations/patterns.rs","byte_start":2936,"byte_end":2955,"line_start":134,"line_end":134,"column_start":18,"column_end":37,"is_primary":true,"text":[{"text":"    let (y, _z): (&'static u32, u32) = (x, 44); //~ ERROR","highlight_start":18,"highlight_end":37}],"label":"type annotation requires that `[00:48:48] 4 LL | fn bar<'a, 'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/where_clauses_in_functions/where_clauses_in_functions.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/where_clauses_in_functions/where_clauses_in_functions.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/where_clauses_in_functions.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/where_clauses_in_functions.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/where_clauses_in_functions/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/where_clauses_in_functions/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/nll/where_clauses_in_functions.rs","byte_start":625,"byte_end":627,"line_start":22,"line_end":22,"column due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/where_clauses_in_functions.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/nll/where_clauses_in_structs.rs stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/where_clauses_in_structs.rs:23:11
[00:48:48] 3    |
[00:48:48] 4 LL | fn bar<'a, 'b>(x: Cell<&'a u32>, y: Cell<&'b u32>) {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/where_clauses_in_structs/where_clauses_in_structs.stderr
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/where_clauses_in_structs/where_clauses_in_structs.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args nll/where_clauses_in_structs.rs`
[00:48:48] error: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/where_clauses_in_structs.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/where_clauses_in_structs/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/b_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"error: unable to prove that references are valid\n  --> /checkout/src/test/ui/nll/where_clauses_in_structs.rs:23:11\n   |\nLL | fn bar<'a, 'b>(x: Cell<&'a u32>, y: Cell<&'b u32>) {\n   |        --  -- lifetime `'b` defined here\n   |        |\n   |        lifetime `'a` defined here\nLL |     Foo { x, y };\n   |           ^ requires that `'a` must outlive `'b`\n\n"}
[00:48:48] {"message":"aborting due to previous error","code":null,"level":"error","spans":[],"children":[],"rendered":"error: aborting due to previous error\n\n"}
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] thread '[ui] ui/nll/where_clauses_in_structs.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] 
[00:48:48] ---- [ui] ui/regions/regions-static-bound.rs#nll stdout ----
[00:48:48] diff of stderr:
[00:48:48] 
[00:48:48] - error: unsatisfied lifetime constraints
[00:48:48] + error: unable to prove that references are valid
[00:48:48] 2   --> $DIR/regions-static-bound.rs:19:5
[00:48:48] 3    |
[00:48:48] 4 LL | fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a {
[00:48:48] 
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] The actual stderr differed from the expected stderr.
[00:48:48] Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/regions/regions-static-bound.nll/regions-static-bound.nll.stderr
[00:48:48] To update references, rerun the tests and pass the `--bless` flag
[00:48:48] To only update this specific test, also pass `--test-args regions/regions-static-bound.rs`
[00:48:48] 
[00:48:48] error in revision `nll`: 1 errors occurred comparing output.
[00:48:48] status: exit code: 1
[00:48:48] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/regions/regions-static-bound.rs" "--target=x86_64-unknown-linux-gnu" "--cfg" "nll" "--error-format" "json" "-Zui-testing" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/regions/regions-static-bound.nll/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-Zborrowck=mir" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/regions/regions-static-bound.nll/auxiliary" "-A" "unused"
[00:48:48] ------------------------------------------
[00:48:48] 
[00:48:48] ------------------------------------------
[00:48:48] stderr:
[00:48:48] stderr:
[00:48:48] ------------------------------------------
[00:48:48] {"message":"unable to prove that references are valid","code":null,"level":"error","spans":[{"file_name":"/checkout/src/test/ui/regions/regions-static-bound.rs","byte_start":714,"byte_end":716,"line_start":18,"line_end":18,"column_start":24,"column_end":26,"is_primary":false,"text":[{"text":"fn static_id_wrong_way<'a>(t: &'a ()) -> &'static () where 'static: 'a {","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/regions/regions-static-bound.rs","byte_start":768,"byte_end":769,"line_start":19,"line_end":19,"column_start":5,"columnE0621]\n   |     ^^^^^^^^^^^^^ lifetime `'static` required\n\n"}
[00:48:48] {"message":"explicit lifetime required in the type of `v`","code":{"code":"E0621","explanation":"\nThis error code indicates a mismatch between the lifetimes appearing in the\nfunction signature (i.e., the parameter types and the return type) and the\ndata-flow found in the function body.\n\nErroneous code example:\n\n```compile_fail,E0621\nfn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 { // error: explicit lifetime\n                                             //        required in the type of\n                                             //        `y`\n    if x > y { x } else { y }\n}\n```\n\nIn the code above, the function is returning data borrowed from either `x` or\n`y`, but the `'a` annotation indicates that it is returning data only from `x`.\nTo fix the error, the signature and the body must be made to match. Typically,\nthis is done by updating the function signature. So, in this case, we change\nthe type of `y` to `&'a i32`, like so:\n\n```\nfn foo<'a>(x: &'a i32, y: &'a i32) -> &'a i32 {\n    if x > y { x } else { y }\n}\n```\n\nNow the signature indicates that the function data borrowed from either `x` or\n`y`. Alternatively, you could change the body to not return data from `y`:\n\n```\nfn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 {\n    x\n}\n```\n"},"level":"error","spans":[{"file_name":"/checkout/src/test/ui/regions/regions-static-bound.rs","byte_start":1042,"byte_end":1064,"line_start":26,"line_end":26,"column_start":5,"column_end":27,"is_primary":true,"text":[{"text":"    static_id_indirect(&v); //[ll]~ ERROR explicit lifetime required ithread '[ui] ui/regions/regions-static-bound.rs#nll' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:3282:9
[00:48:48] 
[00:48:48] failures:
[00:48:48]     [ui] ui/nll/closure-requirements/escape-argument-callee.rs
[00:48:48]     [ui] ui/nll/closure-requirements/propagate-approximated-fail-no-postdom.rs
---
[00:48:48] 
[00:48:48] thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:503:22
[00:48:48] 
[00:48:48] 
[00:48:48] command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "uitravis_time:end:103e95d0:start=1543872235140474500,finish=1543875164088868595,duration=2928948394095
travis_time:start:188ec392
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Mon Dec  3 22:12:44 UTC 2018
Mon, 03 Dec 2018 22:12:44 GMT

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)

@mark-i-m

This comment has been minimized.

Contributor

mark-i-m commented Dec 3, 2018

How about some of the following?

lifetime may not live long enough

lifetime may live too long

inferred lifetime constraint must be explicit

implementation does not satisfy lifetime restrictions from function header

bro, you're lifetimes are all wonky

@Centril

This comment has been minimized.

Contributor

Centril commented Dec 3, 2018

Of the top of my head I like:

implementation does not satisfy lifetime restrictions from function header

(assuming there is a function header...? ^.^)

but... I have sucked up too much air; I'll defer to @estebank's judgement on diagnostics :)

@estebank

This comment has been minimized.

Contributor

estebank commented Dec 3, 2018

Although I'm partial to "bro, you're lifetimes are all wonky", I'd prefer "lifetime may not live long enough" as it's closer to the wording elsewhere for other cases.

My ideal solution would be to rework the message depending on which of the possible situations we're facing. For example, I'd like it to be something along the lines of "borrow being returned doesn't live long enough". In context:

error: borrow being returned doesn't live long enough
  --> $DIR/escape-argument-callee.rs:36:45
   |
LL |         let mut closure = expect_sig(|p, y| *p = y);
   |                                       -  -  ^^^^^^ requires that `'1` must outlive `'2`
   |                                       |  |
   |                                       |  has type `&'1 i32`
   |                                       has type `&mut &'2 i32`
@mark-i-m

This comment has been minimized.

Contributor

mark-i-m commented Dec 8, 2018

My ideal solution would be to rework the message depending on which of the possible situations we're facing. For example, I'd like it to be something along the lines of "borrow being returned doesn't live long enough".

So we do that currently, but this is the fallback message if we can do one of the more specialized messages.

@nikomatsakis

This comment has been minimized.

Contributor

nikomatsakis commented Dec 11, 2018

In general, it would be helpful to me if you would run ./x.py test --bless so we can judge the impact of the message in context.

@mark-i-m

This comment has been minimized.

Contributor

mark-i-m commented Dec 11, 2018

@Centril After thinking about it, "implementation does not satisfy lifetime restrictions from function header" seems perhaps a bit context-dependent. It might be possible to change some errors to do that, but I'm not sure all unsatisfied constraints come from a function header.

So for now, I will stick with @estebank's suggestion.

@nikomatsakis Ah, that's a good idea. I will run ./x.py test --bless and push when it finishes.

@mark-i-m

This comment has been minimized.

Contributor

mark-i-m commented Dec 11, 2018

@nikomatsakis Pushed.

@estebank

This comment has been minimized.

Contributor

estebank commented Dec 11, 2018

We need to keep iterating over these error messages, but I'm happy with this PR as is as I find the new wording less jargon-ny. @nikomatsakis what do you think?

@rust-highfive

This comment has been minimized.

Collaborator

rust-highfive commented Dec 11, 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.
travis_time:end:313d2edb:start=1544565133629305681,finish=1544565327666977381,duration=194037671700
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
[00:49:26] .....................................................................................i.............. 3100/5170
[00:49:29] .................................................................................................... 3200/5170
[00:49:32] ................................................ii..i..ii........................................... 3300/5170
[00:49:36] .................................................................................................... 3400/5170
[00:49:39] .F...............................................................................F.................. 3500/5170
[00:49:44] ...................................................i................................................ 3700/5170
[00:49:45] .................................................................................................... 3800/5170
[00:49:47] .......i............................................................................................ 3900/5170
[00:49:51] .................................................................................................... 4000/5170
---
[00:50:36] failures:
[00:50:36] 
[00:50:36] ---- [ui] ui/nll/issue-55394.rs stdout ----
[00:50:36] 
[00:50:36] error: /checkout/src/test/ui/nll/issue-55394.rs:21: unexpected error: '21:9: 21:20: lifetime may not live long enough'
[00:50:36] error: /checkout/src/test/ui/nll/issue-55394.rs:21: expected error not found: unsatisfied lifetime constraints
[00:50:36] 
[00:50:36] error: 1 unexpected errors found, 1 expected errors not found
[00:50:36] status: exit code: 1
[00:50:36] status: exit code: 1
[00:50:36] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/issue-55394.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/issue-55394/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/issue-55394/auxiliary" "-A" "unused"
[00:50:36]     Error {
[00:50:36]         line_num: 21,
[00:50:36]         kind: Some(
[00:50:36]             Error
[00:50:36]             Error
[00:50:36]         ),
[00:50:36]         msg: "21:9: 21:20: lifetime may not live long enough"
[00:50:36] ]
[00:50:36] 
[00:50:36] not found errors (from test file): [
[00:50:36]     Error {
---
[00:50:36] thread '[ui] ui/nll/issue-55394.rs' panicked at 'explicit panic', src/tools/compiletest/src/runtest.rs:1349:13
[00:50:36] 
[00:50:36] ---- [ui] ui/nll/user-annotations/issue-54124.rs stdout ----
[00:50:36] 
[00:50:36] error: /checkout/src/test/ui/nll/user-annotations/issue-54124.rs:4: unexpected error: '4:22: 4:23: lifetime may not live long enough'
[00:50:36] 
[00:50:36] error: /checkout/src/test/ui/nll/user-annotations/issue-54124.rs:4: unexpected error: '4:22: 4:23: lifetime may not live long enough'
[00:50:36] error: /checkout/src/test/ui/nll/user-annotations/issue-54124.rs:4: expected error not found: unsatisfied lifetime constraints
[00:50:36] 
[00:50:36] error: /checkout/src/test/ui/nll/user-annotations/issue-54124.rs:4: expected error not found: unsatisfied lifetime constraints
[00:50:36] 
[00:50:36] 
[00:50:36] error: 2 unexpected errors found, 2 expected errors not found
[00:50:36] status: exit code: 1
[00:50:36] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/user-annotations/issue-54124.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/user-annotations/issue-54124/a" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/nll/user-annotations/issue-54124/auxiliary" "-A" "unused"
[00:50:36]     Error {
[00:50:36]         line_num: 4,
[00:50:36]         kind: Some(
[00:50:36]             Error
[00:50:36]             Error
[00:50:36]         ),
[00:50:36]         msg: "4:22: 4:23: lifetime may not live long enough"
[00:50:36]     Error {
[00:50:36]         line_num: 4,
[00:50:36]         kind: Some(
[00:50:36]             Error
[00:50:36]             Error
[00:50:36]         ),
[00:50:36]         msg: "4:22: 4:23: lifetime may not live long enough"
[00:50:36] ]
[00:50:36] 
[00:50:36] not found errors (from test file): [
[00:50:36]     Error {
---
[00:50:36]         line_num: 4,
[00:50:36]         kind: Some(
[00:50:36]             Error
[00:50:36]         ),
[00:ython" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "5.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:50:36] 
[00:50:36] 
[00:50:36] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:50:36] Build completed unsuccessfully in 0:03:58
[00:50:36] Build completed unsuccessfully in 0:03:58
[00:50:36] Makefile:58: recipe for target 'check' failed
[00:50:36] make: *** [check] Error 1
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:079cf6bc
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Tue Dec 11 22:46:12 UTC 2018

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)

@mark-i-m

This comment has been minimized.

Contributor

mark-i-m commented Dec 12, 2018

I don't understand the CI failure. Everything is passing locally. Don't I just need to rebase or something?

@mark-i-m

This comment has been minimized.

Contributor

mark-i-m commented Dec 12, 2018

The weird thing is that the corresponding .rs file doesn’t have any //ERROR comments.

@mark-i-m

This comment has been minimized.

Contributor

mark-i-m commented Dec 12, 2018

Or maybe I just missed it or did a weird rebase or something

mark-i-m and others added some commits Dec 3, 2018

@mark-i-m mark-i-m force-pushed the mark-i-m:unsat branch from b9fc062 to d3b9aae Dec 15, 2018

@mark-i-m mark-i-m changed the title from [WIP] Better lifetime error message to Better lifetime error message Dec 15, 2018

@rust-highfive

This comment has been minimized.

Collaborator

rust-highfive commented Dec 15, 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.
travis_time:end:04b00954:start=1544835015758491123,finish=1544835016969221473,duration=1210730350
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0
---
    100% |████████████████████████████████| 61kB 9.5MB/s 
Collecting botocore==1.12.66 (from awscli)
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Downloading https://files.pythonhosted.org/packages/51/da/3ed787b6ca3d33f626c1ba4e014449825db0d557981c4bef71f886fb1424/botocore-1.12.66-py2.py3-none-any.whl (5.1MB)
    0% |                                | 10kB 44.4MB/s eta 0:00:01
    0% |▏                               | 20kB 38.9MB/s eta 0:00:01
    0% |▏                               | 30kB 32.8MB/s eta 0:00:01
    0% |▎                               | 40kB 36.8MB/s eta 0:00:01
---
[00:47:04] failures:
[00:47:04] 
[00:47:04] ---- [ui] ui/nll/issue-55394.rs stdout ----
[00:47:04] 
[00:47:04] error: /checkout/src/test/ui/nll/issue-55394.rs:21: unexpected error: '21:9: 21:20: lifetime may not live long enough'
[00:47:04] 
[00:47:04] error: /checkout/src/test/ui/nll/issue-55394.rs:21: expected error not found: lifetimes may not live long enough
[00:47:04] error: 1 unexpected errors found, 1 expected errors not found
[00:47:04] status: exit code: 1
[00:47:04] status: exit code: 1
[00:47:04] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/nll/issue-55394.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/issue-55394/a" "-Crp_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-5.0/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "5.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
[00:47:04] 
[00:47:04] 
[00:47:04] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
[00:47:04] Build completed unsuccessfully in 0:03:49
[00:47:04] Build completed unsuccessfully in 0:03:49
[00:47:04] make: *** [check] Error 1
[00:47:04] Makefile:58: recipe for target 'check' failed
The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:14a49a34
$ date && (curl -fs --head https://google.com | grep ^Date: | sed 's/Date: //g' || true)
Sat Dec 15 01:37:31 UTC 2018

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment