diff options
| author | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-25 02:01:39 +0300 |
|---|---|---|
| committer | Vadim Petrochenkov <vadim.petrochenkov@gmail.com> | 2018-02-26 20:24:42 +0300 |
| commit | 7ba5fd168a20cbead2afb800e638159e11bb79da (patch) | |
| tree | 285649d5d4c3e8366d319df727c7b858db69db50 /src/test/ui/lifetime-errors | |
| parent | 99b1054d9f4442fd5cc535d5ad90f3542791a547 (diff) | |
Update UI tests
Diffstat (limited to 'src/test/ui/lifetime-errors')
5 files changed, 5 insertions, 5 deletions
diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr index 9a254d0ba72..9efdb33f7e5 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-3.stderr @@ -3,7 +3,7 @@ error[E0621]: explicit lifetime required in the type of `x` | LL | fn foo<'a>(&'a self, x: &i32) -> &i32 { | - consider changing the type of `x` to `&'a i32` -17 | +LL | LL | if true { &self.field } else { x } //~ ERROR explicit lifetime | ^ lifetime `'a` required diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr index c109c977098..f27d869a4d4 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl.stderr @@ -5,7 +5,7 @@ LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 { | ---- ------- | | | this parameter and the return type are declared with different lifetimes... -20 | +LL | LL | if x > y { x } else { y } //~ ERROR lifetime mismatch | ^ ...but data from `x` is returned here diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr index 08cf06bcbfb..c72d25fe2a9 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.stderr @@ -5,7 +5,7 @@ LL | fn foo<'a>(&self, x: &'a i32) -> &i32 { | ------- ---- | | | this parameter and the return type are declared with different lifetimes... -17 | +LL | LL | x //~ ERROR lifetime mismatch | ^ ...but data from `x` is returned here diff --git a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr index 9e96623f5b3..4d9e26c0632 100644 --- a/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr +++ b/src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.stderr @@ -5,7 +5,7 @@ LL | fn foo<'a>(&self, x: &'a Foo) -> &'a Foo { | ----- ------- | | | this parameter and the return type are declared with different lifetimes... -17 | +LL | LL | if true { x } else { self } //~ ERROR lifetime mismatch | ^^^^ ...but data from `self` is returned here diff --git a/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr b/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr index 6e6794ce37c..bba52f408b0 100644 --- a/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr +++ b/src/test/ui/lifetime-errors/ex2c-push-inference-variable.stderr @@ -3,7 +3,7 @@ error[E0623]: lifetime mismatch | LL | fn foo<'a, 'b, 'c>(x: &'a mut Vec<Ref<'b, i32>>, y: Ref<'c, i32>) { | ------------ ------------ these two types are declared with different lifetimes... -16 | let z = Ref { data: y.data }; +LL | let z = Ref { data: y.data }; LL | x.push(z); //~ ERROR lifetime mismatch | ^ ...but data from `y` flows into `x` here |
