= note: the matched value is of type `Option<i32>`
help: you might want to use `if let` to ignore the variant that isn't matched
|
-LL | if let Some(y) = x { /* */ }
- | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL | let y = if let Some(y) = x { y } else { todo!() };
+ | ++++++++++ ++++++++++++++++++++++
+help: alternatively, on nightly, you might want to use `#![feature(let_else)]` to handle the variant that isn't matched
+ |
+LL | let Some(y) = x else { todo!() };
+ | ++++++++++++++++
error: aborting due to previous error