| error[E0308]: mismatched types |
| --> $DIR/pat-type-err-let-stmt.rs:6:29 |
| | |
| LL | let Ok(0): Option<u8> = 42u8; |
| | ---------- ^^^^ |
| | | | |
| | | expected enum `Option`, found `u8` |
| | | help: try using a variant of the expected enum: `Some(42u8)` |
| | expected due to this |
| | |
| = note: expected enum `Option<u8>` |
| found type `u8` |
| |
| error[E0308]: mismatched types |
| --> $DIR/pat-type-err-let-stmt.rs:6:9 |
| | |
| LL | let Ok(0): Option<u8> = 42u8; |
| | ^^^^^ ---------- expected due to this |
| | | |
| | expected enum `Option`, found enum `Result` |
| | |
| = note: expected enum `Option<u8>` |
| found enum `Result<_, _>` |
| |
| error[E0308]: mismatched types |
| --> $DIR/pat-type-err-let-stmt.rs:11:9 |
| | |
| LL | let Ok(0): Option<u8>; |
| | ^^^^^ ---------- expected due to this |
| | | |
| | expected enum `Option`, found enum `Result` |
| | |
| = note: expected enum `Option<u8>` |
| found enum `Result<_, _>` |
| |
| error[E0308]: mismatched types |
| --> $DIR/pat-type-err-let-stmt.rs:15:9 |
| | |
| LL | let Ok(0) = 42u8; |
| | ^^^^^ ---- this expression has type `u8` |
| | | |
| | expected `u8`, found enum `Result` |
| | |
| = note: expected type `u8` |
| found enum `Result<_, _>` |
| |
| error: aborting due to 4 previous errors |
| |
| For more information about this error, try `rustc --explain E0308`. |