From 59e64e908504a6ce6cd549acd735e38871f88368 Mon Sep 17 00:00:00 2001 From: David Wood Date: Tue, 26 Jun 2018 23:30:52 +0100 Subject: [PATCH] Updated affected tests. --- src/test/ui/borrowck/issue-45983.nll.stderr | 2 +- .../regions-escape-bound-fn-2.nll.stderr | 2 +- ...horter-to-static-comparing-against-free.rs | 2 +- ...er-to-static-comparing-against-free.stderr | 8 +++---- ...approximated-shorter-to-static-no-bound.rs | 2 +- ...oximated-shorter-to-static-no-bound.stderr | 13 +++++----- ...roximated-shorter-to-static-wrong-bound.rs | 2 +- ...mated-shorter-to-static-wrong-bound.stderr | 13 +++++----- ...te-fail-to-approximate-longer-no-bounds.rs | 2 +- ...ail-to-approximate-longer-no-bounds.stderr | 8 +++---- .../projection-one-region-closure.rs | 6 ++--- .../projection-one-region-closure.stderr | 24 +++++++++---------- ...ojection-one-region-trait-bound-closure.rs | 6 ++--- ...tion-one-region-trait-bound-closure.stderr | 24 +++++++++---------- ...ojection-two-region-trait-bound-closure.rs | 2 +- ...tion-two-region-trait-bound-closure.stderr | 8 +++---- .../dyn-trait-underscore.nll.stderr | 12 ++++------ 17 files changed, 65 insertions(+), 71 deletions(-) diff --git a/src/test/ui/borrowck/issue-45983.nll.stderr b/src/test/ui/borrowck/issue-45983.nll.stderr index a008a408d971..9b5fcbc56d5c 100644 --- a/src/test/ui/borrowck/issue-45983.nll.stderr +++ b/src/test/ui/borrowck/issue-45983.nll.stderr @@ -4,7 +4,7 @@ warning: not reporting region error due to nll LL | give_any(|y| x = Some(y)); | ^ -error: free region `` does not outlive free region `'_#2r` +error: Assignment requires that data must outlive free region `'_#2r` --> $DIR/issue-45983.rs:17:27 | LL | give_any(|y| x = Some(y)); diff --git a/src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr b/src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr index ee3970aa8fd8..91161d6820c3 100644 --- a/src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr +++ b/src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr @@ -4,7 +4,7 @@ warning: not reporting region error due to nll LL | with_int(|y| x = Some(y)); | ^ -error: free region `` does not outlive free region `'_#2r` +error: Assignment requires that data must outlive free region `'_#2r` --> $DIR/regions-escape-bound-fn-2.rs:18:27 | LL | with_int(|y| x = Some(y)); diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs index 84bfd6ea4f25..248933fc39e1 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.rs @@ -31,7 +31,7 @@ fn case1() { foo(cell, |cell_a, cell_x| { //~^ WARNING not reporting region error due to nll cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure - //~^ ERROR does not outlive free region + //~^ ERROR Argument requires that data must outlive free region }) } diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr index ac4efecc8ac0..7b1cba1d937f 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-comparing-against-free.stderr @@ -4,11 +4,11 @@ warning: not reporting region error due to nll LL | foo(cell, |cell_a, cell_x| { | ^^^ -error: free region `ReFree(DefId(0/1:12 ~ propagate_approximated_shorter_to_static_comparing_against_free[317d]::case1[0]::{{closure}}[0]), BrAnon(1))` does not outlive free region `'_#1r` - --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:9 +error: Argument requires that data must outlive free region `'_#1r` + --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:20 | LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure - | ^^^^^^ + | ^^^^^^^^^^^^ note: No external requirements --> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15 @@ -17,7 +17,7 @@ LL | foo(cell, |cell_a, cell_x| { | _______________^ LL | | //~^ WARNING not reporting region error due to nll LL | | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure -LL | | //~^ ERROR does not outlive free region +LL | | //~^ ERROR Argument requires that data must outlive free region LL | | }) | |_____^ | diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs index df715c52921a..4c8c2b1b95bb 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.rs @@ -43,7 +43,7 @@ fn demand_y<'x, 'y>(_cell_x: &Cell<&'x u32>, _cell_y: &Cell<&'y u32>, _y: &'y u3 #[rustc_regions] fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { - //~^ ERROR does not outlive free region + //~^ ERROR Argument requires that data must outlive free region // Only works if 'x: 'y: demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr index 122e393f97a5..8a18af90e195 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-no-bound.stderr @@ -9,7 +9,7 @@ note: External requirements | LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { | _______________________________________________^ -LL | | //~^ ERROR does not outlive free region +LL | | //~^ ERROR Argument requires that data must outlive free region LL | | LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll @@ -23,12 +23,11 @@ LL | | }); = note: number of external vids: 2 = note: where '_#1r: '_#0r -error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic` - --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:47 +error: Argument requires that data must outlive free region `ReStatic` + --> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:5 | -LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { - | _______________________________________________^ -LL | | //~^ ERROR does not outlive free region +LL | / establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { +LL | | //~^ ERROR Argument requires that data must outlive free region LL | | LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll @@ -40,7 +39,7 @@ note: No external requirements | LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { LL | | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { -LL | | //~^ ERROR does not outlive free region +LL | | //~^ ERROR Argument requires that data must outlive free region LL | | ... | LL | | }); diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs index fdbb312572f8..d9cfea4c891c 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.rs @@ -46,7 +46,7 @@ fn demand_y<'x, 'y>(_cell_x: &Cell<&'x u32>, _cell_y: &Cell<&'y u32>, _y: &'y u3 #[rustc_regions] fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { - //~^ ERROR does not outlive free region + //~^ ERROR Argument requires that data must outlive free region // Only works if 'x: 'y: demand_y(x, y, x.get()) //~^ WARNING not reporting region error due to nll diff --git a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr index 8cdbc2645815..dda1c44b4d8b 100644 --- a/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-approximated-shorter-to-static-wrong-bound.stderr @@ -9,7 +9,7 @@ note: External requirements | LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { | _______________________________________________^ -LL | | //~^ ERROR does not outlive free region +LL | | //~^ ERROR Argument requires that data must outlive free region LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) LL | | //~^ WARNING not reporting region error due to nll @@ -23,12 +23,11 @@ LL | | }); = note: number of external vids: 3 = note: where '_#1r: '_#0r -error: free region `ReFree(DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]), BrNamed(crate0:DefIndex(1:16), 'a))` does not outlive free region `ReStatic` - --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:47 +error: Argument requires that data must outlive free region `ReStatic` + --> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:5 | -LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { - | _______________________________________________^ -LL | | //~^ ERROR does not outlive free region +LL | / establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { +LL | | //~^ ERROR Argument requires that data must outlive free region LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) LL | | //~^ WARNING not reporting region error due to nll @@ -40,7 +39,7 @@ note: No external requirements | LL | / fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { LL | | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| { -LL | | //~^ ERROR does not outlive free region +LL | | //~^ ERROR Argument requires that data must outlive free region LL | | // Only works if 'x: 'y: ... | LL | | }); diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs index 7699d1017349..480461b6b639 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.rs @@ -46,7 +46,7 @@ fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) { // Only works if 'x: 'y: demand_y(x, y, x.get()) //~^ WARN not reporting region error due to nll - //~| ERROR does not outlive free region + //~| ERROR Argument requires that data must outlive free region }); } diff --git a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr index 8b6cd2ea432d..00e4c289e7eb 100644 --- a/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr +++ b/src/test/ui/nll/closure-requirements/propagate-fail-to-approximate-longer-no-bounds.stderr @@ -4,11 +4,11 @@ warning: not reporting region error due to nll LL | demand_y(x, y, x.get()) | ^^^^^^^^^^^^^^^^^^^^^^^ -error: free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(4))` does not outlive free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(2))` - --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:18 +error: Argument requires that data must outlive free region `ReFree(DefId(0/1:18 ~ propagate_fail_to_approximate_longer_no_bounds[317d]::supply[0]::{{closure}}[0]), BrAnon(2))` + --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9 | LL | demand_y(x, y, x.get()) - | ^ + | ^^^^^^^^^^^^^^^^^^^^^^^ note: No external requirements --> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47 @@ -18,7 +18,7 @@ LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| { LL | | // Only works if 'x: 'y: LL | | demand_y(x, y, x.get()) LL | | //~^ WARN not reporting region error due to nll -LL | | //~| ERROR does not outlive free region +LL | | //~| ERROR Argument requires that data must outlive free region LL | | }); | |_____^ | diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs b/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs index 77024c4119ff..5e695f3f7c7d 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.rs @@ -55,7 +55,7 @@ where with_signature(cell, t, |cell, t| require(cell, t)); //~^ WARNING not reporting region error due to nll //~| ERROR the parameter type `T` may not live long enough - //~| ERROR does not outlive free region + //~| ERROR Argument requires that data must outlive free region } #[rustc_regions] @@ -67,7 +67,7 @@ where with_signature(cell, t, |cell, t| require(cell, t)); //~^ WARNING not reporting region error due to nll //~| ERROR the parameter type `T` may not live long enough - //~| ERROR does not outlive free region + //~| ERROR Argument requires that data must outlive free region } #[rustc_regions] @@ -89,7 +89,7 @@ where with_signature(cell, t, |cell, t| require(cell, t)); //~^ WARNING not reporting region error due to nll //~| ERROR the parameter type `T` may not live long enough - //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` + //~| ERROR Argument requires that data must outlive free region } #[rustc_regions] diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr index e1218830dbb6..fac0a0b0064c 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr @@ -40,11 +40,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); | = 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))`... -error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))` - --> $DIR/projection-one-region-closure.rs:55:20 +error: Argument requires that data must outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))` + --> $DIR/projection-one-region-closure.rs:55:5 | LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: No external requirements --> $DIR/projection-one-region-closure.rs:51:1 @@ -54,7 +54,7 @@ LL | | where LL | | T: Anything<'b>, LL | | { ... | -LL | | //~| ERROR does not outlive free region +LL | | //~| ERROR Argument requires that data must outlive free region LL | | } | |_^ | @@ -88,11 +88,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... -error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-closure.rs:67:20 +error: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)` + --> $DIR/projection-one-region-closure.rs:67:5 | LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: No external requirements --> $DIR/projection-one-region-closure.rs:62:1 @@ -102,7 +102,7 @@ LL | | where LL | | T: Anything<'b>, LL | | 'a: 'a, ... | -LL | | //~| ERROR does not outlive free region +LL | | //~| ERROR Argument requires that data must outlive free region LL | | } | |_^ | @@ -137,11 +137,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); | = help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`... -error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-closure.rs:89:20 +error: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)` + --> $DIR/projection-one-region-closure.rs:89:5 | LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: No external requirements --> $DIR/projection-one-region-closure.rs:74:1 @@ -151,7 +151,7 @@ LL | | where LL | | T: Anything<'b>, LL | | T::AssocType: 'a, ... | -LL | | //~| ERROR free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` +LL | | //~| ERROR Argument requires that data must outlive free region LL | | } | |_^ | diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs index fb1009c9cc8e..24d1753eea82 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.rs @@ -46,7 +46,7 @@ where { with_signature(cell, t, |cell, t| require(cell, t)); //~^ WARNING not reporting region error due to nll - //~| ERROR does not outlive free region + //~| ERROR Argument requires that data must outlive free region } #[rustc_regions] @@ -57,7 +57,7 @@ where { with_signature(cell, t, |cell, t| require(cell, t)); //~^ WARNING not reporting region error due to nll - //~| ERROR does not outlive free region + //~| ERROR Argument requires that data must outlive free region } #[rustc_regions] @@ -78,7 +78,7 @@ where with_signature(cell, t, |cell, t| require(cell, t)); //~^ WARNING not reporting region error due to nll - //~| ERROR does not outlive free region + //~| ERROR Argument requires that data must outlive free region } #[rustc_regions] diff --git a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr index 76554e29f62e..07e65fb40515 100644 --- a/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-one-region-trait-bound-closure.stderr @@ -31,11 +31,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: number of external vids: 3 = note: where '_#1r: '_#2r -error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))` - --> $DIR/projection-one-region-trait-bound-closure.rs:47:20 +error: Argument requires that data must outlive free region `ReFree(DefId(0/0:8 ~ projection_one_region_trait_bound_closure[317d]::no_relationships_late[0]), BrNamed(crate0:DefIndex(1:16), 'a))` + --> $DIR/projection-one-region-trait-bound-closure.rs:47:5 | LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:43:1 @@ -45,7 +45,7 @@ LL | | where LL | | T: Anything<'b>, LL | | { ... | -LL | | //~| ERROR does not outlive free region +LL | | //~| ERROR Argument requires that data must outlive free region LL | | } | |_^ | @@ -70,11 +70,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: number of external vids: 4 = note: where '_#2r: '_#3r -error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-trait-bound-closure.rs:58:20 +error: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)` + --> $DIR/projection-one-region-trait-bound-closure.rs:58:5 | LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:53:1 @@ -84,7 +84,7 @@ LL | | where LL | | T: Anything<'b>, LL | | 'a: 'a, ... | -LL | | //~| ERROR does not outlive free region +LL | | //~| ERROR Argument requires that data must outlive free region LL | | } | |_^ | @@ -110,11 +110,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: number of external vids: 4 = note: where '_#2r: '_#3r -error: free region `ReEarlyBound(1, 'b)` does not outlive free region `ReEarlyBound(0, 'a)` - --> $DIR/projection-one-region-trait-bound-closure.rs:79:20 +error: Argument requires that data must outlive free region `ReEarlyBound(0, 'a)` + --> $DIR/projection-one-region-trait-bound-closure.rs:79:5 | LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: No external requirements --> $DIR/projection-one-region-trait-bound-closure.rs:64:1 @@ -124,7 +124,7 @@ LL | | where LL | | T: Anything<'b>, LL | | T::AssocType: 'a, ... | -LL | | //~| ERROR does not outlive free region +LL | | //~| ERROR Argument requires that data must outlive free region LL | | } | |_^ | diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs index 5307d0880d4d..8129f93736b6 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.rs @@ -107,7 +107,7 @@ where { with_signature(cell, t, |cell, t| require(cell, t)); //~^ WARNING not reporting region error due to nll - //~| ERROR does not outlive free region + //~| ERROR Argument requires that data must outlive free region } #[rustc_regions] diff --git a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr index c7f456929609..c778f23a2c45 100644 --- a/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr +++ b/src/test/ui/nll/ty-outlives/projection-two-region-trait-bound-closure.stderr @@ -239,11 +239,11 @@ LL | with_signature(cell, t, |cell, t| require(cell, t)); = note: number of external vids: 3 = note: where >::AssocType: '_#2r -error: free region `ReEarlyBound(0, 'b)` does not outlive free region `ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a))` - --> $DIR/projection-two-region-trait-bound-closure.rs:108:20 +error: Argument requires that data must outlive free region `ReFree(DefId(0/0:13 ~ projection_two_region_trait_bound_closure[317d]::two_regions[0]), BrNamed(crate0:DefIndex(1:43), 'a))` + --> $DIR/projection-two-region-trait-bound-closure.rs:108:5 | LL | with_signature(cell, t, |cell, t| require(cell, t)); - | ^^^^ + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: No external requirements --> $DIR/projection-two-region-trait-bound-closure.rs:104:1 @@ -253,7 +253,7 @@ LL | | where LL | | T: Anything<'b, 'b>, LL | | { ... | -LL | | //~| ERROR does not outlive free region +LL | | //~| ERROR Argument requires that data must outlive free region LL | | } | |_^ | diff --git a/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr b/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr index cdc0c78e6941..681c0dce7d17 100644 --- a/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr +++ b/src/test/ui/underscore-lifetime/dyn-trait-underscore.nll.stderr @@ -22,15 +22,11 @@ warning: not reporting region error due to nll LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime | ^^^^^^^^^^^^^^^^^^^^^^ -error: free region `` does not outlive free region `'static` - --> $DIR/dyn-trait-underscore.rs:16:52 +error: Cast requires that data must outlive free region `'static` + --> $DIR/dyn-trait-underscore.rs:18:5 | -LL | fn a(items: &[T]) -> Box> { - | ____________________________________________________^ -LL | | // ^^^^^^^^^^^^^^^^^^^^^ bound *here* defaults to `'static` -LL | | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime -LL | | } - | |_^ +LL | Box::new(items.iter()) //~ ERROR cannot infer an appropriate lifetime + | ^^^^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error