blob: ec1045d5fae370cb38a74272051af6ea9c0d0d1a [file] [log] [blame]
error[E0621]: explicit lifetime required in the type of `y`
--> $DIR/mismatched.rs:4:42
|
LL | fn foo(x: &'a u32, y: &u32) -> &'a u32 { y }
| ---- ^ lifetime `'a` required
| |
| help: add explicit lifetime `'a` to the type of `y`: `&'a u32`
error[E0623]: lifetime mismatch
--> $DIR/mismatched.rs:6:46
|
LL | fn foo2(x: &'a u32, y: &'b u32) -> &'a u32 { y }
| ------- ------- ^ ...but data from `y` is returned here
| |
| this parameter and the return type are declared with different lifetimes...
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0621`.