1 error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
2 --> $DIR/simple_conditionals.rs:39:9
5 | ----------- the check is happening here
6 LL | x.unwrap(); // unnecessary
9 note: the lint level is defined here
10 --> $DIR/simple_conditionals.rs:1:35
12 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
15 error: this call to `unwrap()` will always panic
16 --> $DIR/simple_conditionals.rs:41:9
19 | ----------- because of this check
21 LL | x.unwrap(); // will panic
24 note: the lint level is defined here
25 --> $DIR/simple_conditionals.rs:1:9
27 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
28 | ^^^^^^^^^^^^^^^^^^^^^^^^
30 error: this call to `unwrap()` will always panic
31 --> $DIR/simple_conditionals.rs:44:9
34 | ----------- because of this check
35 LL | x.unwrap(); // will panic
38 error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
39 --> $DIR/simple_conditionals.rs:46:9
42 | ----------- the check is happening here
44 LL | x.unwrap(); // unnecessary
47 error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
48 --> $DIR/simple_conditionals.rs:7:13
50 LL | if $a.is_some() {
51 | ------------ the check is happening here
52 LL | $a.unwrap(); // unnecessary
56 | ------ in this macro invocation
58 = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
60 error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
61 --> $DIR/simple_conditionals.rs:54:9
64 | --------- the check is happening here
65 LL | x.unwrap(); // unnecessary
68 error: this call to `unwrap_err()` will always panic
69 --> $DIR/simple_conditionals.rs:55:9
72 | --------- because of this check
73 LL | x.unwrap(); // unnecessary
74 LL | x.unwrap_err(); // will panic
77 error: this call to `unwrap()` will always panic
78 --> $DIR/simple_conditionals.rs:57:9
81 | --------- because of this check
83 LL | x.unwrap(); // will panic
86 error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
87 --> $DIR/simple_conditionals.rs:58:9
90 | --------- the check is happening here
92 LL | x.unwrap_err(); // unnecessary
95 error: this call to `unwrap()` will always panic
96 --> $DIR/simple_conditionals.rs:61:9
99 | ---------- because of this check
100 LL | x.unwrap(); // will panic
103 error: you checked before that `unwrap_err()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
104 --> $DIR/simple_conditionals.rs:62:9
107 | ---------- the check is happening here
108 LL | x.unwrap(); // will panic
109 LL | x.unwrap_err(); // unnecessary
112 error: you checked before that `unwrap()` cannot fail, instead of checking and unwrapping, it's better to use `if let` or `match`
113 --> $DIR/simple_conditionals.rs:64:9
116 | ---------- the check is happening here
118 LL | x.unwrap(); // unnecessary
121 error: this call to `unwrap_err()` will always panic
122 --> $DIR/simple_conditionals.rs:65:9
125 | ---------- because of this check
127 LL | x.unwrap_err(); // will panic
130 error: aborting due to 13 previous errors