summaryrefslogtreecommitdiffstats
path: root/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr')
-rw-r--r--src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr
new file mode 100644
index 000000000..29a706957
--- /dev/null
+++ b/src/test/ui/lifetimes/lifetime-errors/ex1-return-one-existing-name-if-else.stderr
@@ -0,0 +1,11 @@
+error[E0621]: explicit lifetime required in the type of `y`
+ --> $DIR/ex1-return-one-existing-name-if-else.rs:2:27
+ |
+LL | fn foo<'a>(x: &'a i32, y: &i32) -> &'a i32 {
+ | ---- help: add explicit lifetime `'a` to the type of `y`: `&'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`.