summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/checked_unwrap/complex_conditionals_nested.stderr
blob: 049a69d93bfe93d51a77f22a2f3d813ae7416069 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
error: called `unwrap` on `x` after checking its variant with `is_some`
  --> $DIR/complex_conditionals_nested.rs:12:13
   |
LL |         if x.is_some() {
   |         -------------- help: try: `if let Some(..) = x`
LL |             x.unwrap(); // unnecessary
   |             ^^^^^^^^^^
   |
note: the lint level is defined here
  --> $DIR/complex_conditionals_nested.rs:1:35
   |
LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: this call to `unwrap()` will always panic
  --> $DIR/complex_conditionals_nested.rs:14:13
   |
LL |         if x.is_some() {
   |            ----------- because of this check
...
LL |             x.unwrap(); // will panic
   |             ^^^^^^^^^^
   |
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