]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generator/type-mismatch-signature-deduction.rs
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[rust.git] / src / test / ui / generator / type-mismatch-signature-deduction.rs
1 #![feature(generators, generator_trait)]
2
3 use std::ops::Generator;
4
5 fn foo() -> impl Generator<Return = i32> {
6     //~^ ERROR type mismatch
7     || {
8         if false {
9             return Ok(6);
10         }
11
12         yield ();
13
14         5 //~ ERROR mismatched types [E0308]
15     }
16 }
17
18 fn main() {}