summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/where_clauses_in_functions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/nll/where_clauses_in_functions.rs')
-rw-r--r--tests/ui/nll/where_clauses_in_functions.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/nll/where_clauses_in_functions.rs b/tests/ui/nll/where_clauses_in_functions.rs
new file mode 100644
index 000000000..826065d02
--- /dev/null
+++ b/tests/ui/nll/where_clauses_in_functions.rs
@@ -0,0 +1,15 @@
+#![allow(dead_code)]
+
+fn foo<'a, 'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32)
+where
+ 'a: 'b,
+{
+ (x, y)
+}
+
+fn bar<'a, 'b>(x: &'a u32, y: &'b u32) -> (&'a u32, &'b u32) {
+ foo(x, y)
+ //~^ ERROR lifetime may not live long enough
+}
+
+fn main() {}