diff options
Diffstat (limited to 'tests/ui/impl-trait/in-trait/issue-102301.rs')
-rw-r--r-- | tests/ui/impl-trait/in-trait/issue-102301.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/ui/impl-trait/in-trait/issue-102301.rs b/tests/ui/impl-trait/in-trait/issue-102301.rs new file mode 100644 index 000000000..a93714a65 --- /dev/null +++ b/tests/ui/impl-trait/in-trait/issue-102301.rs @@ -0,0 +1,18 @@ +// check-pass + +#![feature(return_position_impl_trait_in_trait)] +#![allow(incomplete_features)] + +trait Foo<T> { + fn foo<F2: Foo<T>>(self) -> impl Foo<T>; +} + +struct Bar; + +impl Foo<u8> for Bar { + fn foo<F2: Foo<u8>>(self) -> impl Foo<u8> { + self + } +} + +fn main() {} |