diff options
| author | David Wood <david@davidtw.co> | 2018-10-17 00:57:32 +0200 |
|---|---|---|
| committer | David Wood <david@davidtw.co> | 2018-10-17 00:57:32 +0200 |
| commit | 539404b77d1e443793c653ae03b207c62b3b1ae0 (patch) | |
| tree | 3c79f2fa470dd27c0bd24547b4ac221c1257eca0 /src/test/ui/lifetimes/lifetime-errors | |
| parent | 8b34881e972906545d030318006478c1986fa0aa (diff) | |
Update output for borrowck=migrate compare mode.
This commit updates the test output for the updated NLL compare mode that uses `-Z borrowck=migrate` rather than `-Z borrowck=mir`. The previous commit changes `compiletest` and this commit only updates `.nll.stderr` files.
Diffstat (limited to 'src/test/ui/lifetimes/lifetime-errors')
28 files changed, 0 insertions, 379 deletions
diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr deleted file mode 100644 index 4e3193ccbfd..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex1-return-one-existing-name-if-else-using-impl.rs:21:20 - | -LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { - | -- - let's call the lifetime of this reference `'1` - | | - | lifetime `'a` defined here -LL | -LL | if x > y { x } else { y } //~ ERROR lifetime mismatch - | ^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr deleted file mode 100644 index 3413203fa7f..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex1-return-one-existing-name-return-type-is-anon.rs:18:5 - | -LL | fn foo<'a>(&self, x: &'a i32) -> &i32 { - | -- - let's call the lifetime of this reference `'1` - | | - | lifetime `'a` defined here -LL | -LL | x //~ ERROR lifetime mismatch - | ^ function was supposed to return data with lifetime `'1` but it is returning data with lifetime `'a` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr deleted file mode 100644 index 239419967f6..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex1-return-one-existing-name-self-is-anon.rs:18:30 - | -LL | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo { - | -- - let's call the lifetime of this reference `'1` - | | - | lifetime `'a` defined here -LL | -LL | if true { x } else { self } //~ ERROR lifetime mismatch - | ^^^^ function was supposed to return data with lifetime `'a` but it is returning data with lifetime `'1` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.nll.stderr deleted file mode 100644 index 709d9f84db3..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-2.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0621]: explicit lifetime required in the type of `x` - --> $DIR/ex2a-push-one-existing-name-2.rs:16:5 - | -LL | fn foo<'a>(x: Ref<i32>, y: &mut Vec<Ref<'a, i32>>) { - | -------- help: add explicit lifetime `'a` to the type of `x`: `Ref<'a, i32>` -LL | y.push(x); //~ ERROR explicit lifetime - | ^^^^^^^^^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr deleted file mode 100644 index 1e608fe16e4..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name-early-bound.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error[E0621]: explicit lifetime required in the type of `y` - --> $DIR/ex2a-push-one-existing-name-early-bound.rs:17:5 - | -LL | fn baz<'a, 'b, T>(x: &mut Vec<&'a T>, y: &T) - | -- help: add explicit lifetime `'a` to the type of `y`: `&'a T` -... -LL | x.push(y); //~ ERROR explicit lifetime required - | ^^^^^^^^^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.nll.stderr deleted file mode 100644 index 14194352093..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex2a-push-one-existing-name.nll.stderr +++ /dev/null @@ -1,11 +0,0 @@ -error[E0621]: explicit lifetime required in the type of `y` - --> $DIR/ex2a-push-one-existing-name.rs:16:5 - | -LL | fn foo<'a>(x: &mut Vec<Ref<'a, i32>>, y: Ref<i32>) { - | -------- help: add explicit lifetime `'a` to the type of `y`: `Ref<'a, i32>` -LL | x.push(y); //~ ERROR explicit lifetime - | ^^^^^^^^^ lifetime `'a` required - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0621`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr deleted file mode 100644 index fc5f02fbc72..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex2b-push-no-existing-names.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex2b-push-no-existing-names.rs:16:5 - | -LL | fn foo(x: &mut Vec<Ref<i32>>, y: Ref<i32>) { - | - - has type `Ref<'1, i32>` - | | - | has type `&mut std::vec::Vec<Ref<'2, i32>>` -LL | x.push(y); //~ ERROR lifetime mismatch - | ^^^^^^^^^ argument requires that `'1` must outlive `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr deleted file mode 100644 index a5053244dc1..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex2c-push-inference-variable.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex2c-push-inference-variable.rs:17:5 - | -LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) { - | -- -- lifetime `'c` defined here - | | - | lifetime `'b` defined here -LL | let z = Ref { data: y.data }; -LL | x.push(z); //~ ERROR lifetime mismatch - | ^^^^^^^^^ argument requires that `'c` must outlive `'b` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.nll.stderr deleted file mode 100644 index 361fb708d40..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex2d-push-inference-variable-2.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex2d-push-inference-variable-2.rs:18:5 - | -LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) { - | -- -- lifetime `'c` defined here - | | - | lifetime `'b` defined here -... -LL | a.push(b); - | ^^^^^^^^^ argument requires that `'c` must outlive `'b` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.nll.stderr deleted file mode 100644 index 5d0f07054df..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex2e-push-inference-variable-3.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex2e-push-inference-variable-3.rs:18:5 - | -LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) { - | -- -- lifetime `'c` defined here - | | - | lifetime `'b` defined here -... -LL | Vec::push(a, b); - | ^^^^^^^^^^^^^^^ argument requires that `'c` must outlive `'b` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.nll.stderr deleted file mode 100644 index e4aafd7b66e..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-2.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-2.rs:12:5 - | -LL | fn foo(&mut (ref mut v, w): &mut (&u8, &u8), x: &u8) { - | - - let's call the lifetime of this reference `'1` - | | - | let's call the lifetime of this reference `'2` -LL | *v = x; //~ ERROR lifetime mismatch - | ^^^^^^ assignment requires that `'1` must outlive `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.nll.stderr deleted file mode 100644 index e1872dcf777..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-3.nll.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-3.rs:12:5 - | -LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { - | - - let's call the lifetime of this reference `'1` - | | - | let's call the lifetime of this reference `'2` -LL | z.push((x,y)); //~ ERROR lifetime mismatch - | ^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2` - -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-3.rs:12:5 - | -LL | fn foo(z: &mut Vec<(&u8,&u8)>, (x, y): (&u8, &u8)) { - | - - let's call the lifetime of this reference `'1` - | | - | let's call the lifetime of this reference `'2` -LL | z.push((x,y)); //~ ERROR lifetime mismatch - | ^^^^^^^^^^^^^ argument requires that `'1` must outlive `'2` - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr deleted file mode 100644 index 934cdcd2ef2..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-2.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-both-are-structs-2.rs:16:5 - | -LL | fn foo(mut x: Ref, y: Ref) { - | ----- - has type `Ref<'_, '1>` - | | - | has type `Ref<'_, '2>` -LL | x.b = y.b; //~ ERROR lifetime mismatch - | ^^^^^^^^^ assignment requires that `'1` must outlive `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr deleted file mode 100644 index cbfd9d47809..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-3.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-both-are-structs-3.rs:16:5 - | -LL | fn foo(mut x: Ref) { - | ----- - | | - | has type `Ref<'_, '1>` - | has type `Ref<'2, '_>` -LL | x.a = x.b; //~ ERROR lifetime mismatch - | ^^^^^^^^^ assignment requires that `'1` must outlive `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.nll.stderr deleted file mode 100644 index 7f814b730ff..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-earlybound-regions.nll.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-both-are-structs-earlybound-regions.rs:18:5 - | -LL | fn foo<'a, 'b>(mut x: Vec<Ref<'a>>, y: Ref<'b>) - | -- -- lifetime `'b` defined here - | | - | lifetime `'a` defined here -... -LL | x.push(y); //~ ERROR lifetime mismatch - | ^^^^^^^^^ argument requires that `'b` must outlive `'a` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.nll.stderr deleted file mode 100644 index f38dceb331b..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs-latebound-regions.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-both-are-structs-latebound-regions.rs:15:5 - | -LL | fn foo<'a, 'b>(mut x: Vec<Ref<'a>>, y: Ref<'b>) { - | -- -- lifetime `'b` defined here - | | - | lifetime `'a` defined here -LL | x.push(y); //~ ERROR lifetime mismatch - | ^^^^^^^^^ argument requires that `'b` must outlive `'a` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr deleted file mode 100644 index 39a7154c8e9..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-both-are-structs.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-both-are-structs.rs:15:5 - | -LL | fn foo(mut x: Vec<Ref>, y: Ref) { - | ----- - has type `Ref<'1>` - | | - | has type `std::vec::Vec<Ref<'2>>` -LL | x.push(y); //~ ERROR lifetime mismatch - | ^^^^^^^^^ argument requires that `'1` must outlive `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.nll.stderr deleted file mode 100644 index d59480cefcc..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-latebound-regions.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-latebound-regions.rs:12:5 - | -LL | fn foo<'a,'b>(x: &mut Vec<&'a u8>, y: &'b u8) { - | -- -- lifetime `'b` defined here - | | - | lifetime `'a` defined here -LL | x.push(y); //~ ERROR lifetime mismatch - | ^^^^^^^^^ argument requires that `'b` must outlive `'a` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr deleted file mode 100644 index fc1fab7aab5..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-2.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-one-is-struct-2.rs:14:5 - | -LL | fn foo(mut x: Ref, y: &u32) { - | ----- - let's call the lifetime of this reference `'2` - | | - | has type `Ref<'_, '1>` -LL | y = x.b; //~ ERROR lifetime mismatch - | ^^^^^^^ assignment requires that `'1` must outlive `'2` - -error[E0384]: cannot assign to immutable argument `y` - --> $DIR/ex3-both-anon-regions-one-is-struct-2.rs:14:5 - | -LL | fn foo(mut x: Ref, y: &u32) { - | - help: make this binding mutable: `mut y` -LL | y = x.b; //~ ERROR lifetime mismatch - | ^^^^^^^ cannot assign to immutable argument - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0384`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr deleted file mode 100644 index 8100fa89c2d..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-3.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-one-is-struct-3.rs:14:5 - | -LL | fn foo(mut y: Ref, x: &u32) { - | ----- - let's call the lifetime of this reference `'1` - | | - | has type `Ref<'_, '2>` -LL | y.b = x; //~ ERROR lifetime mismatch - | ^^^^^^^ assignment requires that `'1` must outlive `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr deleted file mode 100644 index 1c4a8b66589..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct-4.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-one-is-struct-4.rs:14:5 - | -LL | fn foo(mut y: Ref, x: &u32) { - | ----- - let's call the lifetime of this reference `'1` - | | - | has type `Ref<'_, '2>` -LL | y.b = x; //~ ERROR lifetime mismatch - | ^^^^^^^ assignment requires that `'1` must outlive `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr deleted file mode 100644 index 2a4c5a685f1..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-one-is-struct.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-one-is-struct.rs:17:5 - | -LL | fn foo(mut x: Ref, y: &u32) { - | ----- - let's call the lifetime of this reference `'1` - | | - | has type `Ref<'_, '2>` -LL | x.b = y; //~ ERROR lifetime mismatch - | ^^^^^^^ assignment requires that `'1` must outlive `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr deleted file mode 100644 index 898f997779d..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-return-type-is-anon.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-return-type-is-anon.rs:17:5 - | -LL | fn foo<'a>(&self, x: &i32) -> &i32 { - | - - let's call the lifetime of this reference `'1` - | | - | let's call the lifetime of this reference `'2` -LL | x //~ ERROR lifetime mismatch - | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr deleted file mode 100644 index bdb9b306cda..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-self-is-anon.rs:17:19 - | -LL | fn foo<'a>(&self, x: &Foo) -> &Foo { - | - - let's call the lifetime of this reference `'1` - | | - | let's call the lifetime of this reference `'2` -LL | if true { x } else { self } //~ ERROR lifetime mismatch - | ^ function was supposed to return data with lifetime `'2` but it is returning data with lifetime `'1` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr deleted file mode 100644 index 2e4df170d6c..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-fn-items.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable - --> $DIR/ex3-both-anon-regions-using-fn-items.rs:11:3 - | -LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { - | - help: consider changing this to be mutable: `mut y` -LL | y.push(z); //~ ERROR lifetime mismatch - | ^ cannot borrow as mutable - -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-using-fn-items.rs:11:3 - | -LL | fn foo(x:fn(&u8, &u8), y: Vec<&u8>, z: &u8) { - | - - let's call the lifetime of this reference `'1` - | | - | let's call the lifetime of this reference `'2` -LL | y.push(z); //~ ERROR lifetime mismatch - | ^^^^^^^^^ argument requires that `'1` must outlive `'2` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.nll.stderr deleted file mode 100644 index 8d743608438..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-impl-items.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-using-impl-items.rs:15:9 - | -LL | fn foo(x: &mut Vec<&u8>, y: &u8) { - | - - let's call the lifetime of this reference `'1` - | | - | let's call the lifetime of this reference `'2` -LL | x.push(y); //~ ERROR lifetime mismatch - | ^^^^^^^^^ argument requires that `'1` must outlive `'2` - -error: aborting due to previous error - diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr deleted file mode 100644 index a2dc0e4bda3..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions-using-trait-objects.nll.stderr +++ /dev/null @@ -1,21 +0,0 @@ -error[E0596]: cannot borrow `y` as mutable, as it is not declared as mutable - --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:11:3 - | -LL | fn foo(x:Box<Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) { - | - help: consider changing this to be mutable: `mut y` -LL | y.push(z); //~ ERROR lifetime mismatch - | ^ cannot borrow as mutable - -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions-using-trait-objects.rs:11:3 - | -LL | fn foo(x:Box<Fn(&u8, &u8)> , y: Vec<&u8>, z: &u8) { - | - - let's call the lifetime of this reference `'1` - | | - | let's call the lifetime of this reference `'2` -LL | y.push(z); //~ ERROR lifetime mismatch - | ^^^^^^^^^ argument requires that `'1` must outlive `'2` - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0596`. diff --git a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.nll.stderr b/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.nll.stderr deleted file mode 100644 index 0d674162eea..00000000000 --- a/src/test/ui/lifetimes/lifetime-errors/ex3-both-anon-regions.nll.stderr +++ /dev/null @@ -1,12 +0,0 @@ -error: unsatisfied lifetime constraints - --> $DIR/ex3-both-anon-regions.rs:12:5 - | -LL | fn foo(x: &mut Vec<&u8>, y: &u8) { - | - - let's call the lifetime of this reference `'1` - | | - | let's call the lifetime of this reference `'2` -LL | x.push(y); //~ ERROR lifetime mismatch - | ^^^^^^^^^ argument requires that `'1` must outlive `'2` - -error: aborting due to previous error - |
