]> git.lizzy.rs Git - rust.git/blob - tests/ui/type-alias-impl-trait/issue-94429.rs
Rollup merge of #105795 - nicholasbishop:bishop-stabilize-efiapi, r=joshtriplett
[rust.git] / tests / ui / type-alias-impl-trait / issue-94429.rs
1 #![feature(type_alias_impl_trait, generator_trait, generators)]
2 use std::ops::Generator;
3
4 trait Runnable {
5     type Gen: Generator<Yield = (), Return = ()>;
6
7     fn run(&mut self) -> Self::Gen;
8 }
9
10 struct Implementor {}
11
12 impl Runnable for Implementor {
13     type Gen = impl Generator<Yield = (), Return = ()>;
14
15     fn run(&mut self) -> Self::Gen {
16     //~^ ERROR: type mismatch resolving
17         move || {
18             yield 1;
19         }
20     }
21 }
22
23 fn main() {}