diff options
Diffstat (limited to 'tests/ui/generic-associated-types/issue-86218-2.rs')
-rw-r--r-- | tests/ui/generic-associated-types/issue-86218-2.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/generic-associated-types/issue-86218-2.rs b/tests/ui/generic-associated-types/issue-86218-2.rs new file mode 100644 index 000000000..63c839ea8 --- /dev/null +++ b/tests/ui/generic-associated-types/issue-86218-2.rs @@ -0,0 +1,23 @@ +// check-pass + +#![feature(type_alias_impl_trait)] + +pub trait Stream { + type Item; +} + +impl Stream for () { + type Item = i32; +} + +trait Yay<AdditionalValue> { + type InnerStream<'s>: Stream<Item = i32> + 's; + fn foo<'s>() -> Self::InnerStream<'s>; +} + +impl<T> Yay<T> for () { + type InnerStream<'s> = impl Stream<Item = i32> + 's; + fn foo<'s>() -> Self::InnerStream<'s> { () } +} + +fn main() {} |