1error[E0308]: mismatched types
2  --> $DIR/pat-type-err-let-stmt.rs:6:29
3   |
4LL |     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`
11help: try wrapping the expression in `Some`
12   |
13LL |     let Ok(0): Option<u8> = Some(42u8);
14   |                             +++++    +
15
16error[E0308]: mismatched types
17  --> $DIR/pat-type-err-let-stmt.rs:6:9
18   |
19LL |     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
27error[E0308]: mismatched types
28  --> $DIR/pat-type-err-let-stmt.rs:11:9
29   |
30LL |     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
38error[E0308]: mismatched types
39  --> $DIR/pat-type-err-let-stmt.rs:15:9
40   |
41LL |     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
49error: aborting due to 4 previous errors
50
51For more information about this error, try `rustc --explain E0308`.
52