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