1 error: called `unwrap` on `x` after checking its variant with `is_some`
2 --> $DIR/simple_conditionals.rs:40:9
5 | -------------- help: try: `if let Some(..) = x`
6 LL | x.unwrap(); // unnecessary
9 note: the lint level is defined here
10 --> $DIR/simple_conditionals.rs:2:35
12 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
15 error: called `expect` on `x` after checking its variant with `is_some`
16 --> $DIR/simple_conditionals.rs:41:9
19 | -------------- help: try: `if let Some(..) = x`
20 LL | x.unwrap(); // unnecessary
21 LL | x.expect("an error message"); // unnecessary
22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
24 error: this call to `unwrap()` will always panic
25 --> $DIR/simple_conditionals.rs:43:9
28 | ----------- because of this check
30 LL | x.unwrap(); // will panic
33 note: the lint level is defined here
34 --> $DIR/simple_conditionals.rs:2:9
36 LL | #![deny(clippy::panicking_unwrap, clippy::unnecessary_unwrap)]
37 | ^^^^^^^^^^^^^^^^^^^^^^^^
39 error: this call to `expect()` will always panic
40 --> $DIR/simple_conditionals.rs:44:9
43 | ----------- because of this check
45 LL | x.expect("an error message"); // will panic
46 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48 error: this call to `unwrap()` will always panic
49 --> $DIR/simple_conditionals.rs:47:9
52 | ----------- because of this check
53 LL | x.unwrap(); // will panic
56 error: called `unwrap` on `x` after checking its variant with `is_none`
57 --> $DIR/simple_conditionals.rs:49:9
60 | -------------- help: try: `if let Some(..) = x`
62 LL | x.unwrap(); // unnecessary
65 error: called `unwrap` on `x` after checking its variant with `is_some`
66 --> $DIR/simple_conditionals.rs:8:13
68 LL | if $a.is_some() {
69 | --------------- help: try: `if let Some(..) = x`
70 LL | $a.unwrap(); // unnecessary
74 | ----- in this macro invocation
76 = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
78 error: called `unwrap` on `x` after checking its variant with `is_ok`
79 --> $DIR/simple_conditionals.rs:57:9
82 | ------------ help: try: `if let Ok(..) = x`
83 LL | x.unwrap(); // unnecessary
86 error: called `expect` on `x` after checking its variant with `is_ok`
87 --> $DIR/simple_conditionals.rs:58:9
90 | ------------ help: try: `if let Ok(..) = x`
91 LL | x.unwrap(); // unnecessary
92 LL | x.expect("an error message"); // unnecessary
93 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95 error: this call to `unwrap_err()` will always panic
96 --> $DIR/simple_conditionals.rs:59:9
99 | --------- because of this check
101 LL | x.unwrap_err(); // will panic
104 error: this call to `unwrap()` will always panic
105 --> $DIR/simple_conditionals.rs:61:9
108 | --------- because of this check
110 LL | x.unwrap(); // will panic
113 error: this call to `expect()` will always panic
114 --> $DIR/simple_conditionals.rs:62:9
117 | --------- because of this check
119 LL | x.expect("an error message"); // will panic
120 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
122 error: called `unwrap_err` on `x` after checking its variant with `is_ok`
123 --> $DIR/simple_conditionals.rs:63:9
126 | ------------ help: try: `if let Err(..) = x`
128 LL | x.unwrap_err(); // unnecessary
131 error: this call to `unwrap()` will always panic
132 --> $DIR/simple_conditionals.rs:66:9
135 | ---------- because of this check
136 LL | x.unwrap(); // will panic
139 error: called `unwrap_err` on `x` after checking its variant with `is_err`
140 --> $DIR/simple_conditionals.rs:67:9
143 | ------------- help: try: `if let Err(..) = x`
144 LL | x.unwrap(); // will panic
145 LL | x.unwrap_err(); // unnecessary
148 error: called `unwrap` on `x` after checking its variant with `is_err`
149 --> $DIR/simple_conditionals.rs:69:9
152 | ------------- help: try: `if let Ok(..) = x`
154 LL | x.unwrap(); // unnecessary
157 error: this call to `unwrap_err()` will always panic
158 --> $DIR/simple_conditionals.rs:70:9
161 | ---------- because of this check
163 LL | x.unwrap_err(); // will panic
166 error: aborting due to 17 previous errors