]> git.lizzy.rs Git - rust.git/blob - src/test/ui/lifetime-errors/ex1-return-one-existing-name-return-type-is-anon.nll.stderr
Account for --remap-path-prefix in save-analysis
[rust.git] / src / test / ui / lifetime-errors / ex1-return-one-existing-name-return-type-is-anon.nll.stderr
1 warning: not reporting region error due to nll
2   --> $DIR/ex1-return-one-existing-name-return-type-is-anon.rs:18:5
3    |
4 LL |     x //~ ERROR lifetime mismatch
5    |     ^
6
7 error[E0623]: lifetime mismatch
8   --> $DIR/ex1-return-one-existing-name-return-type-is-anon.rs:18:5
9    |
10 LL |   fn foo<'a>(&self, x: &'a i32) -> &i32 {
11    |                        -------     ----
12    |                        |
13    |                        this parameter and the return type are declared with different lifetimes...
14 LL | 
15 LL |     x //~ ERROR lifetime mismatch
16    |     ^ ...but data from `x` is returned here
17
18 error: aborting due to previous error
19
20 For more information about this error, try `rustc --explain E0623`.