diff options
Diffstat (limited to 'tests/ui/type-alias-impl-trait/issue-94429.rs')
-rw-r--r-- | tests/ui/type-alias-impl-trait/issue-94429.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/ui/type-alias-impl-trait/issue-94429.rs b/tests/ui/type-alias-impl-trait/issue-94429.rs new file mode 100644 index 000000000..2c965b875 --- /dev/null +++ b/tests/ui/type-alias-impl-trait/issue-94429.rs @@ -0,0 +1,23 @@ +#![feature(type_alias_impl_trait, generator_trait, generators)] +use std::ops::Generator; + +trait Runnable { + type Gen: Generator<Yield = (), Return = ()>; + + fn run(&mut self) -> Self::Gen; +} + +struct Implementor {} + +impl Runnable for Implementor { + type Gen = impl Generator<Yield = (), Return = ()>; + + fn run(&mut self) -> Self::Gen { + //~^ ERROR: type mismatch resolving + move || { + yield 1; + } + } +} + +fn main() {} |