| error: called `unwrap` on `x` after checking its variant with `is_some` |
| --> tests/ui/checked_unwrap/complex_conditionals_nested.rs:9:13 |
| | |
| LL | if x.is_some() { |
| | -------------- help: try: `if let Some(<item>) = x` |
| LL | x.unwrap(); |
| | ^^^^^^^^^^ |
| | |
| = note: `-D clippy::unnecessary-unwrap` implied by `-D warnings` |
| = help: to override `-D warnings` add `#[allow(clippy::unnecessary_unwrap)]` |
| |
| error: this call to `unwrap()` will always panic |
| --> tests/ui/checked_unwrap/complex_conditionals_nested.rs:12:13 |
| | |
| LL | if x.is_some() { |
| | ----------- because of this check |
| ... |
| LL | x.unwrap(); |
| | ^^^^^^^^^^ |
| | |
| = note: `-D clippy::panicking-unwrap` implied by `-D warnings` |
| = help: to override `-D warnings` add `#[allow(clippy::panicking_unwrap)]` |
| |
| error: aborting due to 2 previous errors |
| |