summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else-using-impl-2.stderr
blob: 64f4bd0fc706100ec80f566bb4959b746fa5046a (plain)
1
2
3
4
5
6
7
8
9
10
11
error[E0621]: explicit lifetime required in the type of `x`
  --> $DIR/ex1-return-one-existing-name-if-else-using-impl-2.rs:4:15
   |
LL | fn foo<'a>(x: &i32, y: &'a i32) -> &'a i32 {
   |               ---- help: add explicit lifetime `'a` to the type of `x`: `&'a i32`
LL |    if x > y { x } else { y }
   |               ^ lifetime `'a` required

error: aborting due to previous error

For more information about this error, try `rustc --explain E0621`.