1 error[E0308]: mismatched types
2 --> $DIR/typeck.rs:9:22
4 LL | Ok(x) if let Err(_) = x => {},
5 | ^^^^^^ expected enum `Option`, found enum `Result`
7 = note: expected enum `Option<bool>`
8 found enum `Result<_, _>`
10 error[E0308]: mismatched types
11 --> $DIR/typeck.rs:11:22
13 LL | Ok(x) if let 0 = x => {},
14 | ^ expected enum `Option`, found integer
16 = note: expected enum `Option<bool>`
17 found type `{integer}`
19 error: aborting due to 2 previous errors
21 For more information about this error, try `rustc --explain E0308`.