]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetime-errors/ex1-return-one-existing-name-self-is-anon.nll.stderr
Auto merge of #53134 - alexcrichton:tweak-travis, r=Mark-Simulacrum
[rust.git] / src / test / ui / lifetime-errors / ex1-return-one-existing-name-self-is-anon.nll.stderr
1 warning: not reporting region error due to nll
2   --> $DIR/ex1-return-one-existing-name-self-is-anon.rs:18:30
3    |
4 LL |         if true { x } else { self } //~ ERROR lifetime mismatch
5    |                              ^^^^
6
7 error: unsatisfied lifetime constraints
8   --> $DIR/ex1-return-one-existing-name-self-is-anon.rs:18:9
9    |
10 LL |     fn foo<'a>(&self, x: &'a Foo) -> &'a Foo {
11    |            --  - let's call the lifetime of this reference `'1`
12    |            |
13    |            lifetime `'a` defined here
14 LL | 
15 LL |         if true { x } else { self } //~ ERROR lifetime mismatch
16    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'1` must outlive `'a`
17
18 error: aborting due to previous error
19