]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/pat-type-err-let-stmt.stderr
Auto merge of #100845 - timvermeulen:iter_compare, r=scottmcm
[rust.git] / src / test / ui / pattern / pat-type-err-let-stmt.stderr
1 error[E0308]: mismatched types
2   --> $DIR/pat-type-err-let-stmt.rs:6:29
3    |
4 LL |     let Ok(0): Option<u8> = 42u8;
5    |                ----------   ^^^^ expected enum `Option`, found `u8`
6    |                |
7    |                expected due to this
8    |
9    = note: expected enum `Option<u8>`
10               found type `u8`
11 help: try wrapping the expression in `Some`
12    |
13 LL |     let Ok(0): Option<u8> = Some(42u8);
14    |                             +++++    +
15
16 error[E0308]: mismatched types
17   --> $DIR/pat-type-err-let-stmt.rs:6:9
18    |
19 LL |     let Ok(0): Option<u8> = 42u8;
20    |         ^^^^^  ---------- expected due to this
21    |         |
22    |         expected enum `Option`, found enum `Result`
23    |
24    = note: expected enum `Option<u8>`
25               found enum `Result<_, _>`
26
27 error[E0308]: mismatched types
28   --> $DIR/pat-type-err-let-stmt.rs:11:9
29    |
30 LL |     let Ok(0): Option<u8>;
31    |         ^^^^^  ---------- expected due to this
32    |         |
33    |         expected enum `Option`, found enum `Result`
34    |
35    = note: expected enum `Option<u8>`
36               found enum `Result<_, _>`
37
38 error[E0308]: mismatched types
39   --> $DIR/pat-type-err-let-stmt.rs:15:9
40    |
41 LL |     let Ok(0) = 42u8;
42    |         ^^^^^   ---- this expression has type `u8`
43    |         |
44    |         expected `u8`, found enum `Result`
45    |
46    = note: expected type `u8`
47               found enum `Result<_, _>`
48
49 error: aborting due to 4 previous errors
50
51 For more information about this error, try `rustc --explain E0308`.