blob: 961f9de6614afad2bcc45414eb4851db8a87af34 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
error[E0621]: explicit lifetime required in the type of `x`
--> $DIR/ex1-return-one-existing-name-if-else-using-impl-3.rs:8:36
|
LL | fn foo<'a>(&'a self, x: &i32) -> &i32 {
| ---- help: add explicit lifetime `'a` to the type of `x`: `&'a i32`
LL |
LL | if true { &self.field } else { x }
| ^ lifetime `'a` required
error: aborting due to previous error
For more information about this error, try `rustc --explain E0621`.
|