blob: db72c20697108a8d9b1e450aeb9df8a2f27c0370 [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
Some errors have detailed explanations: E0621, E0623.
For more information about an error, try `rustc --explain E0621`.