Skip to content

Commit

Permalink
Updated affected tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidtwco committed Jul 1, 2018
1 parent e01e883 commit 59e64e9
Show file tree
Hide file tree
Showing 17 changed files with 65 additions and 71 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/issue-45983.nll.stderr
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion src/test/ui/borrowck/regions-escape-bound-fn-2.nll.stderr
Expand Up @@ -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));
Expand Down
Expand Up @@ -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
})
}

Expand Down
Expand Up @@ -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
Expand All @@ -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 | | })
| |_____^
|
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 | | });
Expand Down
Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 | | });
Expand Down
Expand Up @@ -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
});
}

Expand Down
Expand Up @@ -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
Expand All @@ -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 | | });
| |_____^
|
Expand Down
6 changes: 3 additions & 3 deletions src/test/ui/nll/ty-outlives/projection-one-region-closure.rs
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand Down
24 changes: 12 additions & 12 deletions src/test/ui/nll/ty-outlives/projection-one-region-closure.stderr
Expand Up @@ -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
Expand All @@ -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 | | }
| |_^
|
Expand Down Expand Up @@ -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
Expand All @@ -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 | | }
| |_^
|
Expand Down Expand Up @@ -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
Expand All @@ -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 | | }
| |_^
|
Expand Down
Expand Up @@ -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]
Expand All @@ -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]
Expand All @@ -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]
Expand Down
Expand Up @@ -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
Expand All @@ -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 | | }
| |_^
|
Expand All @@ -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
Expand All @@ -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 | | }
| |_^
|
Expand All @@ -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
Expand All @@ -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 | | }
| |_^
|
Expand Down
Expand Up @@ -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]
Expand Down

0 comments on commit 59e64e9

Please sign in to comment.