]> git.lizzy.rs Git - rust.git/blob - tests/ui/rfc-2294-if-let-guard/typeck.stderr
Rollup merge of #106644 - alexcrichton:update-wasi-toolchain, r=cuviper
[rust.git] / tests / ui / rfc-2294-if-let-guard / typeck.stderr
1 error[E0308]: mismatched types
2   --> $DIR/typeck.rs:9:22
3    |
4 LL |         Ok(x) if let Err(_) = x => {},
5    |                      ^^^^^^   - this expression has type `Option<bool>`
6    |                      |
7    |                      expected enum `Option`, found enum `Result`
8    |
9    = note: expected enum `Option<bool>`
10               found enum `Result<_, _>`
11
12 error[E0308]: mismatched types
13   --> $DIR/typeck.rs:11:22
14    |
15 LL |         Ok(x) if let 0 = x => {},
16    |                      ^   - this expression has type `Option<bool>`
17    |                      |
18    |                      expected enum `Option`, found integer
19    |
20    = note: expected enum `Option<bool>`
21               found type `{integer}`
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0308`.