1 error[E0308]: mismatched types
2 --> $DIR/type-mismatch-signature-deduction.rs:14:9
5 | ^ expected enum `Result`, found integer
7 = note: expected enum `Result<{integer}, _>`
9 note: return type inferred to be `Result<{integer}, _>` here
10 --> $DIR/type-mismatch-signature-deduction.rs:9:20
14 help: try wrapping the expression in a variant of `Result`
21 error[E0271]: type mismatch resolving `<[generator@$DIR/type-mismatch-signature-deduction.rs:7:5: 7:7] as Generator>::Return == i32`
22 --> $DIR/type-mismatch-signature-deduction.rs:5:13
24 LL | fn foo() -> impl Generator<Return = i32> {
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `Result`, found `i32`
27 = note: expected enum `Result<{integer}, _>`
30 error: aborting due to 2 previous errors
32 Some errors have detailed explanations: E0271, E0308.
33 For more information about an error, try `rustc --explain E0271`.