summaryrefslogtreecommitdiffstats
path: root/src/test/ui/impl-trait/multiple-lifetimes.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/impl-trait/multiple-lifetimes.rs')
-rw-r--r--src/test/ui/impl-trait/multiple-lifetimes.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/multiple-lifetimes.rs b/src/test/ui/impl-trait/multiple-lifetimes.rs
new file mode 100644
index 000000000..5407fb6dd
--- /dev/null
+++ b/src/test/ui/impl-trait/multiple-lifetimes.rs
@@ -0,0 +1,12 @@
+// Test that multiple lifetimes are allowed in impl trait types.
+// build-pass (FIXME(62277): could be check-pass?)
+
+trait X<'x>: Sized {}
+
+impl<U> X<'_> for U {}
+
+fn multiple_lifeteimes<'a, 'b, T: 'static>(x: &'a mut &'b T) -> impl X<'b> + 'a {
+ x
+}
+
+fn main() {}