diff options
Diffstat (limited to 'src/test/ui/impl-trait/in-trait/deep-match-works.rs')
-rw-r--r-- | src/test/ui/impl-trait/in-trait/deep-match-works.rs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/ui/impl-trait/in-trait/deep-match-works.rs b/src/test/ui/impl-trait/in-trait/deep-match-works.rs new file mode 100644 index 000000000..772da845e --- /dev/null +++ b/src/test/ui/impl-trait/in-trait/deep-match-works.rs @@ -0,0 +1,16 @@ +// check-pass + +#![feature(return_position_impl_trait_in_trait)] +#![allow(incomplete_features)] + +struct Wrapper<T>(T); + +trait Foo { + fn bar() -> Wrapper<impl Sized>; +} + +impl Foo for () { + fn bar() -> Wrapper<i32> { Wrapper(0) } +} + +fn main() {} |