]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generator/type-mismatch-signature-deduction.rs
Rollup merge of #94577 - RalfJung:simd-miri, r=scottmcm
[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> { //~ ERROR type mismatch
6     || {
7         if false {
8             return Ok(6);
9         }
10
11         yield ();
12
13         5 //~ ERROR mismatched types [E0308]
14     }
15 }
16
17 fn main() {}