2021-08-18 20:33:50 +00:00
|
|
|
error: called `unwrap` on `x` after checking its variant with `is_some`
|
2023-07-28 18:40:44 +00:00
|
|
|
--> $DIR/complex_conditionals_nested.rs:13:13
|
2020-03-18 14:24:48 +00:00
|
|
|
|
|
|
|
|
LL | if x.is_some() {
|
2021-08-18 20:33:50 +00:00
|
|
|
| -------------- help: try: `if let Some(..) = x`
|
2023-07-28 18:40:44 +00:00
|
|
|
LL | // unnecessary
|
|
|
|
LL | x.unwrap();
|
2020-03-18 14:24:48 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/complex_conditionals_nested.rs:1:35
|
|
|
|
|
|
|
|
|
LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2020-07-23 15:06:29 +00:00
|
|
|
error: this call to `unwrap()` will always panic
|
2023-07-28 19:35:48 +00:00
|
|
|
--> $DIR/complex_conditionals_nested.rs:17:13
|
2020-03-18 14:24:48 +00:00
|
|
|
|
|
|
|
|
LL | if x.is_some() {
|
|
|
|
| ----------- because of this check
|
|
|
|
...
|
2023-07-28 18:40:44 +00:00
|
|
|
LL | x.unwrap();
|
2020-03-18 14:24:48 +00:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
|
|
|
|
|
note: the lint level is defined here
|
|
|
|
--> $DIR/complex_conditionals_nested.rs:1:9
|
|
|
|
|
|
|
|
|
LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|