]> git.proxmox.com Git - rustc.git/blame - src/test/ui/generator/type-mismatch-signature-deduction.rs
New upstream version 1.43.0+dfsg1
[rustc.git] / src / test / ui / generator / type-mismatch-signature-deduction.rs
CommitLineData
48663c56
XL
1#![feature(generators, generator_trait)]
2
3use std::ops::Generator;
4
74b04a01 5fn foo() -> impl Generator<Return = i32> { //~ ERROR type mismatch
48663c56
XL
6 || {
7 if false {
74b04a01 8 return Ok(6);
48663c56
XL
9 }
10
11 yield ();
12
74b04a01 13 5 //~ ERROR mismatched types [E0308]
48663c56
XL
14 }
15}
16
17fn main() {}