Skip to content

Commit

Permalink
Blindly update the #[rustc_region] tests which got touched by the N…
Browse files Browse the repository at this point in the history
…LL diagnostic change.
  • Loading branch information
pnkfelix committed Jul 31, 2018
1 parent e8c2995 commit 6787e25
Show file tree
Hide file tree
Showing 16 changed files with 254 additions and 254 deletions.
Expand Up @@ -4,15 +4,6 @@ warning: not reporting region error due to nll
LL | let mut closure = expect_sig(|p, y| *p = y);
| ^

error: unsatisfied lifetime constraints
--> $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`

note: No external requirements
--> $DIR/escape-argument-callee.rs:36:38
|
Expand All @@ -24,6 +15,15 @@ LL | let mut closure = expect_sig(|p, y| *p = y);
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))
]

error: unsatisfied lifetime constraints
--> $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`

note: No external requirements
--> $DIR/escape-argument-callee.rs:30:1
|
Expand Down
Expand Up @@ -4,17 +4,6 @@ warning: not reporting region error due to nll
LL | let p = x.get();
| ^^^^^^^

error: unsatisfied lifetime constraints
--> $DIR/propagate-approximated-fail-no-postdom.rs:57:13
|
LL | |_outlives1, _outlives2, _outlives3, x, y| {
| ---------- ---------- has type `std::cell::Cell<&'2 &u32>`
| |
| has type `std::cell::Cell<&&'1 u32>`
...
LL | demand_y(x, y, p) //~ ERROR
| ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`

note: No external requirements
--> $DIR/propagate-approximated-fail-no-postdom.rs:53:9
|
Expand All @@ -31,6 +20,17 @@ LL | | },
for<'r, 's> extern "rust-call" fn((std::cell::Cell<&'_#1r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&'_#2r &ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) &'_#3r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 's)) u32>))
]

error: unsatisfied lifetime constraints
--> $DIR/propagate-approximated-fail-no-postdom.rs:57:13
|
LL | |_outlives1, _outlives2, _outlives3, x, y| {
| ---------- ---------- has type `std::cell::Cell<&'2 &u32>`
| |
| has type `std::cell::Cell<&&'1 u32>`
...
LL | demand_y(x, y, p) //~ ERROR
| ^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`

note: No external requirements
--> $DIR/propagate-approximated-fail-no-postdom.rs:48:1
|
Expand Down
Expand Up @@ -4,17 +4,6 @@ warning: not reporting region error due to nll
LL | foo(cell, |cell_a, cell_x| {
| ^^^

error: borrowed data escapes outside of closure
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:9
|
LL | foo(cell, |cell_a, cell_x| {
| ------ ------ `cell_x` is a reference that is only valid in the closure body
| |
| `cell_a` is declared here, outside of the closure body
LL | //~^ WARNING not reporting region error due to nll
LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
| ^^^^^^^^^^^^^^^^^^^^^^^^ `cell_x` escapes the closure body here

note: No external requirements
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:31:15
|
Expand All @@ -31,6 +20,17 @@ LL | | })
for<'r> extern "rust-call" fn((std::cell::Cell<&'_#1r u32>, std::cell::Cell<&ReLateBound(DebruijnIndex(0), BrNamed(crate0:DefIndex(0:0), 'r)) u32>))
]

error: borrowed data escapes outside of closure
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:33:9
|
LL | foo(cell, |cell_a, cell_x| {
| ------ ------ `cell_x` is a reference that is only valid in the closure body
| |
| `cell_a` is declared here, outside of the closure body
LL | //~^ WARNING not reporting region error due to nll
LL | cell_a.set(cell_x.get()); // forces 'x: 'a, error in closure
| ^^^^^^^^^^^^^^^^^^^^^^^^ `cell_x` escapes the closure body here

note: No external requirements
--> $DIR/propagate-approximated-shorter-to-static-comparing-against-free.rs:28:1
|
Expand Down
Expand Up @@ -23,19 +23,6 @@ LL | | });
= note: number of external vids: 4
= note: where '_#1r: '_#0r

error: borrowed data escapes outside of function
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:5
|
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
| ------ `cell_a` is a reference that is only valid in the function body
LL | / establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
LL | | //~^ ERROR
LL | |
LL | | // Only works if 'x: 'y:
LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll
LL | | });
| |______^ `cell_a` escapes the function body here

note: No external requirements
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:44:1
|
Expand All @@ -50,5 +37,18 @@ LL | | }
|
= note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_no_bound[317d]::supply[0]) with substs []

error: borrowed data escapes outside of function
--> $DIR/propagate-approximated-shorter-to-static-no-bound.rs:45:5
|
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
| ------ `cell_a` is a reference that is only valid in the function body
LL | / establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
LL | | //~^ ERROR
LL | |
LL | | // Only works if 'x: 'y:
LL | | demand_y(x, y, x.get()) //~ WARNING not reporting region error due to nll
LL | | });
| |______^ `cell_a` escapes the function body here

error: aborting due to previous error

Expand Up @@ -23,19 +23,6 @@ LL | | });
= note: number of external vids: 5
= note: where '_#1r: '_#0r

error: borrowed data escapes outside of function
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:5
|
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
| ------ `cell_a` is a reference that is only valid in the function body
LL | / establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
LL | | //~^ ERROR
LL | | // Only works if 'x: 'y:
LL | | demand_y(x, y, x.get())
LL | | //~^ WARNING not reporting region error due to nll
LL | | });
| |______^ `cell_a` escapes the function body here

note: No external requirements
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:47:1
|
Expand All @@ -50,5 +37,18 @@ LL | | }
|
= note: defining type: DefId(0/0:6 ~ propagate_approximated_shorter_to_static_wrong_bound[317d]::supply[0]) with substs []

error: borrowed data escapes outside of function
--> $DIR/propagate-approximated-shorter-to-static-wrong-bound.rs:48:5
|
LL | fn supply<'a, 'b>(cell_a: Cell<&'a u32>, cell_b: Cell<&'b u32>) {
| ------ `cell_a` is a reference that is only valid in the function body
LL | / establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
LL | | //~^ ERROR
LL | | // Only works if 'x: 'y:
LL | | demand_y(x, y, x.get())
LL | | //~^ WARNING not reporting region error due to nll
LL | | });
| |______^ `cell_a` escapes the function body here

error: aborting due to previous error

Expand Up @@ -4,17 +4,6 @@ warning: not reporting region error due to nll
LL | demand_y(x, y, x.get())
| ^^^^^^^^^^^^^^^^^^^^^^^

error: unsatisfied lifetime constraints
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9
|
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
| --------- - has type `&std::cell::Cell<&'1 u32>`
| |
| has type `&std::cell::Cell<&'2 &u32>`
LL | // Only works if 'x: 'y:
LL | demand_y(x, y, x.get())
| ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`

note: No external requirements
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:45:47
|
Expand All @@ -32,6 +21,17 @@ LL | | });
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>))
]

error: unsatisfied lifetime constraints
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:47:9
|
LL | establish_relationships(&cell_a, &cell_b, |_outlives, x, y| {
| --------- - has type `&std::cell::Cell<&'1 u32>`
| |
| has type `&std::cell::Cell<&'2 &u32>`
LL | // Only works if 'x: 'y:
LL | demand_y(x, y, x.get())
| ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`

note: No external requirements
--> $DIR/propagate-fail-to-approximate-longer-no-bounds.rs:44:1
|
Expand Down
Expand Up @@ -4,17 +4,6 @@ warning: not reporting region error due to nll
LL | demand_y(x, y, x.get())
| ^^^^^^^^^^^^^^^^^^^^^^^

error: unsatisfied lifetime constraints
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:9
|
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
| ---------- ---------- has type `&std::cell::Cell<&'2 &u32>`
| |
| has type `&std::cell::Cell<&'1 &u32>`
LL | // Only works if 'x: 'y:
LL | demand_y(x, y, x.get())
| ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`

note: No external requirements
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:49:47
|
Expand All @@ -32,6 +21,17 @@ LL | | });
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>))
]

error: unsatisfied lifetime constraints
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:51:9
|
LL | establish_relationships(&cell_a, &cell_b, |_outlives1, _outlives2, x, y| {
| ---------- ---------- has type `&std::cell::Cell<&'2 &u32>`
| |
| has type `&std::cell::Cell<&'1 &u32>`
LL | // Only works if 'x: 'y:
LL | demand_y(x, y, x.get())
| ^^^^^^^^^^^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2`

note: No external requirements
--> $DIR/propagate-fail-to-approximate-longer-wrong-bounds.rs:48:1
|
Expand Down
Expand Up @@ -26,21 +26,6 @@ LL | | });
= note: number of external vids: 3
= note: where T: '_#1r

error[E0309]: the parameter type `T` may not live long enough
--> $DIR/propagate-from-trait-match.rs:42:36
|
LL | establish_relationships(value, |value| {
| ____________________________________^
LL | | //~^ ERROR the parameter type `T` may not live long enough
LL | |
LL | | // This function call requires that
... |
LL | | //~^ WARNING not reporting region error due to nll
LL | | });
| |_____^
|
= help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...

note: No external requirements
--> $DIR/propagate-from-trait-match.rs:38:1
|
Expand All @@ -58,6 +43,21 @@ LL | | }
T
]

error[E0309]: the parameter type `T` may not live long enough
--> $DIR/propagate-from-trait-match.rs:42:36
|
LL | establish_relationships(value, |value| {
| ____________________________________^
LL | | //~^ ERROR the parameter type `T` may not live long enough
LL | |
LL | | // This function call requires that
... |
LL | | //~^ WARNING not reporting region error due to nll
LL | | });
| |_____^
|
= help: consider adding an explicit lifetime bound `T: ReEarlyBound(0, 'a)`...

error: aborting due to previous error

For more information about this error, try `rustc --explain E0309`.
Expand Up @@ -4,15 +4,6 @@ warning: not reporting region error due to nll
LL | expect_sig(|a, b| b); // ought to return `a`
| ^

error: unsatisfied lifetime constraints
--> $DIR/return-wrong-bound-region.rs:21:23
|
LL | expect_sig(|a, b| b); // ought to return `a`
| - - ^ closure was supposed to return data with lifetime `'1` but it is returning data with lifetime `'2`
| | |
| | has type `&'1 i32`
| has type `&'2 i32`

note: No external requirements
--> $DIR/return-wrong-bound-region.rs:21:16
|
Expand All @@ -24,6 +15,15 @@ LL | expect_sig(|a, b| b); // ought to return `a`
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
]

error: unsatisfied lifetime constraints
--> $DIR/return-wrong-bound-region.rs:21:23
|
LL | expect_sig(|a, b| b); // ought to return `a`
| - - ^ closure was supposed to return data with lifetime `'1` but it is returning data with lifetime `'2`
| | |
| | has type `&'1 i32`
| has type `&'2 i32`

note: No external requirements
--> $DIR/return-wrong-bound-region.rs:20:1
|
Expand Down
32 changes: 16 additions & 16 deletions src/test/ui/nll/ty-outlives/projection-no-regions-closure.stderr
Expand Up @@ -25,14 +25,6 @@ LL | with_signature(x, |mut y| Box::new(y.next()))
= note: number of external vids: 4
= note: where <T as std::iter::Iterator>::Item: '_#2r

error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
--> $DIR/projection-no-regions-closure.rs:35:23
|
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...

note: No external requirements
--> $DIR/projection-no-regions-closure.rs:31:1
|
Expand All @@ -50,6 +42,14 @@ LL | | }
T
]

error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
--> $DIR/projection-no-regions-closure.rs:35:23
|
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...

note: External requirements
--> $DIR/projection-no-regions-closure.rs:45:23
|
Expand Down Expand Up @@ -97,14 +97,6 @@ LL | with_signature(x, |mut y| Box::new(y.next()))
= note: number of external vids: 5
= note: where <T as std::iter::Iterator>::Item: '_#3r

error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
--> $DIR/projection-no-regions-closure.rs:53:23
|
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...

note: No external requirements
--> $DIR/projection-no-regions-closure.rs:49:1
|
Expand All @@ -123,6 +115,14 @@ LL | | }
T
]

error[E0309]: the associated type `<T as std::iter::Iterator>::Item` may not live long enough
--> $DIR/projection-no-regions-closure.rs:53:23
|
LL | with_signature(x, |mut y| Box::new(y.next()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding an explicit lifetime bound `<T as std::iter::Iterator>::Item: ReEarlyBound(0, 'a)`...

note: External requirements
--> $DIR/projection-no-regions-closure.rs:64:23
|
Expand Down

0 comments on commit 6787e25

Please sign in to comment.