]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/checked_unwrap/complex_conditionals_nested.stderr
Auto merge of #102418 - citrus-it:illumos-strip-debug, r=nagisa
[rust.git] / src / tools / clippy / tests / ui / checked_unwrap / complex_conditionals_nested.stderr
1 error: called `unwrap` on `x` after checking its variant with `is_some`
2   --> $DIR/complex_conditionals_nested.rs:8:13
3    |
4 LL |         if x.is_some() {
5    |         -------------- help: try: `if let Some(..) = x`
6 LL |             x.unwrap(); // unnecessary
7    |             ^^^^^^^^^^
8    |
9 note: the lint level is defined here
10   --> $DIR/complex_conditionals_nested.rs:1:35
11    |
12 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
13    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^
14
15 error: this call to `unwrap()` will always panic
16   --> $DIR/complex_conditionals_nested.rs:10:13
17    |
18 LL |         if x.is_some() {
19    |            ----------- because of this check
20 ...
21 LL |             x.unwrap(); // will panic
22    |             ^^^^^^^^^^
23    |
24 note: the lint level is defined here
25   --> $DIR/complex_conditionals_nested.rs:1:9
26    |
27 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
28    |         ^^^^^^^^^^^^^^^^^^^^^^^^
29
30 error: aborting due to 2 previous errors
31