error[E0308]: mismatched types --> $DIR/pat-type-err-let-stmt.rs:6:29 | LL | let Ok(0): Option = 42u8; | ---------- ^^^^ expected `Option`, found `u8` | | | expected due to this | = note: expected enum `Option` found type `u8` help: try wrapping the expression in `Some` | LL | let Ok(0): Option = Some(42u8); | +++++ + error[E0308]: mismatched types --> $DIR/pat-type-err-let-stmt.rs:6:9 | LL | let Ok(0): Option = 42u8; | ^^^^^ ---------- expected due to this | | | expected `Option`, found `Result<_, _>` | = note: expected enum `Option` found enum `Result<_, _>` error[E0308]: mismatched types --> $DIR/pat-type-err-let-stmt.rs:11:9 | LL | let Ok(0): Option; | ^^^^^ ---------- expected due to this | | | expected `Option`, found `Result<_, _>` | = note: expected enum `Option` 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 `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`.