Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- error[E0621]: explicit lifetime required in the type of `y`
- --> ../../ex1-return-one-existing-name-if-else.rs:12:8
- |
- 11 | fn foo<'a>(t: bool, x: &'a i32, y: &i32) -> &'a i32 {
- | - consider changing the type of `y` to `&'a i32`
- 12 | if t { x } else { y } //~ ERROR explicit lifetime
- | ^ lifetime `'a` required
Add Comment
Please, Sign In to add comment