]> git.proxmox.com Git - rustc.git/blob - src/test/ui/lifetime-errors/ex3-both-anon-regions-self-is-anon.nll.stderr
New upstream version 1.29.0+dfsg1
[rustc.git] / src / test / ui / lifetime-errors / ex3-both-anon-regions-self-is-anon.nll.stderr
1 warning: not reporting region error due to nll
2 --> $DIR/ex3-both-anon-regions-self-is-anon.rs:17:19
3 |
4 LL | if true { x } else { self } //~ ERROR lifetime mismatch
5 | ^
6
7 error[E0623]: lifetime mismatch
8 --> $DIR/ex3-both-anon-regions-self-is-anon.rs:17:9
9 |
10 LL | fn foo<'a>(&self, x: &Foo) -> &Foo {
11 | ---- ----
12 | |
13 | this parameter and the return type are declared with different lifetimes...
14 LL | if true { x } else { self } //~ ERROR lifetime mismatch
15 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...but data from `x` is returned here
16
17 error: aborting due to previous error
18
19 For more information about this error, try `rustc --explain E0623`.