Guest User

Untitled

a guest
Jun 21st, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. error[E0621]: explicit lifetime required in the type of `y`
  2. --> ../../ex1-return-one-existing-name-if-else.rs:12:8
  3. |
  4. 11 | fn foo<'a>(t: bool, x: &'a i32, y: &i32) -> &'a i32 {
  5. | - consider changing the type of `y` to `&'a i32`
  6. 12 | if t { x } else { y } //~ ERROR explicit lifetime
  7. | ^ lifetime `'a` required
Add Comment
Please, Sign In to add comment