summaryrefslogtreecommitdiffstats
path: root/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs')
-rw-r--r--tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs b/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs
new file mode 100644
index 000000000..6330242ce
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/outlives-in-nested-rpit.rs
@@ -0,0 +1,11 @@
+// check-pass
+
+#![feature(return_position_impl_trait_in_trait)]
+
+trait Foo {
+ fn early<'a, T: 'a>(x: &'a T) -> impl Iterator<Item = impl Into<&'a T>>;
+
+ fn late<'a, T>(x: &'a T) -> impl Iterator<Item = impl Into<&'a T>>;
+}
+
+fn main() {}