1 error: redundant pattern matching, consider using `is_ok()`
2 --> $DIR/redundant_pattern_matching_drop_order.rs:12:12
4 LL | if let Ok(_) = m.lock() {}
5 | -------^^^^^----------- help: try this: `if m.lock().is_ok()`
7 = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`
8 = note: this will change drop order of the result, as well as all temporaries
9 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
11 error: redundant pattern matching, consider using `is_err()`
12 --> $DIR/redundant_pattern_matching_drop_order.rs:13:12
14 LL | if let Err(_) = Err::<(), _>(m.lock().unwrap().0) {}
15 | -------^^^^^^------------------------------------ help: try this: `if Err::<(), _>(m.lock().unwrap().0).is_err()`
17 = note: this will change drop order of the result, as well as all temporaries
18 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
20 error: redundant pattern matching, consider using `is_ok()`
21 --> $DIR/redundant_pattern_matching_drop_order.rs:16:16
23 LL | if let Ok(_) = Ok::<_, std::sync::MutexGuard<()>>(()) {}
24 | -------^^^^^----------------------------------------- help: try this: `if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok()`
26 = note: this will change drop order of the result, as well as all temporaries
27 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
29 error: redundant pattern matching, consider using `is_ok()`
30 --> $DIR/redundant_pattern_matching_drop_order.rs:18:12
32 LL | if let Ok(_) = Ok::<_, std::sync::MutexGuard<()>>(()) {
33 | -------^^^^^----------------------------------------- help: try this: `if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok()`
35 = note: this will change drop order of the result, as well as all temporaries
36 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
38 error: redundant pattern matching, consider using `is_ok()`
39 --> $DIR/redundant_pattern_matching_drop_order.rs:21:12
41 LL | if let Ok(_) = Ok::<_, std::sync::MutexGuard<()>>(()) {}
42 | -------^^^^^----------------------------------------- help: try this: `if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok()`
44 error: redundant pattern matching, consider using `is_err()`
45 --> $DIR/redundant_pattern_matching_drop_order.rs:22:12
47 LL | if let Err(_) = Err::<std::sync::MutexGuard<()>, _>(()) {}
48 | -------^^^^^^------------------------------------------ help: try this: `if Err::<std::sync::MutexGuard<()>, _>(()).is_err()`
50 error: redundant pattern matching, consider using `is_ok()`
51 --> $DIR/redundant_pattern_matching_drop_order.rs:24:12
53 LL | if let Ok(_) = Ok::<_, ()>(String::new()) {}
54 | -------^^^^^----------------------------- help: try this: `if Ok::<_, ()>(String::new()).is_ok()`
56 error: redundant pattern matching, consider using `is_err()`
57 --> $DIR/redundant_pattern_matching_drop_order.rs:25:12
59 LL | if let Err(_) = Err::<(), _>((String::new(), ())) {}
60 | -------^^^^^^------------------------------------ help: try this: `if Err::<(), _>((String::new(), ())).is_err()`
62 error: redundant pattern matching, consider using `is_some()`
63 --> $DIR/redundant_pattern_matching_drop_order.rs:28:12
65 LL | if let Some(_) = Some(m.lock()) {}
66 | -------^^^^^^^----------------- help: try this: `if Some(m.lock()).is_some()`
68 = note: this will change drop order of the result, as well as all temporaries
69 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
71 error: redundant pattern matching, consider using `is_some()`
72 --> $DIR/redundant_pattern_matching_drop_order.rs:29:12
74 LL | if let Some(_) = Some(m.lock().unwrap().0) {}
75 | -------^^^^^^^---------------------------- help: try this: `if Some(m.lock().unwrap().0).is_some()`
77 = note: this will change drop order of the result, as well as all temporaries
78 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
80 error: redundant pattern matching, consider using `is_none()`
81 --> $DIR/redundant_pattern_matching_drop_order.rs:32:16
83 LL | if let None = None::<std::sync::MutexGuard<()>> {}
84 | -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()`
86 = note: this will change drop order of the result, as well as all temporaries
87 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
89 error: redundant pattern matching, consider using `is_none()`
90 --> $DIR/redundant_pattern_matching_drop_order.rs:34:12
92 LL | if let None = None::<std::sync::MutexGuard<()>> {
93 | -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()`
95 = note: this will change drop order of the result, as well as all temporaries
96 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
98 error: redundant pattern matching, consider using `is_none()`
99 --> $DIR/redundant_pattern_matching_drop_order.rs:38:12
101 LL | if let None = None::<std::sync::MutexGuard<()>> {}
102 | -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()`
104 error: redundant pattern matching, consider using `is_some()`
105 --> $DIR/redundant_pattern_matching_drop_order.rs:40:12
107 LL | if let Some(_) = Some(String::new()) {}
108 | -------^^^^^^^---------------------- help: try this: `if Some(String::new()).is_some()`
110 error: redundant pattern matching, consider using `is_some()`
111 --> $DIR/redundant_pattern_matching_drop_order.rs:41:12
113 LL | if let Some(_) = Some((String::new(), ())) {}
114 | -------^^^^^^^---------------------------- help: try this: `if Some((String::new(), ())).is_some()`
116 error: redundant pattern matching, consider using `is_ready()`
117 --> $DIR/redundant_pattern_matching_drop_order.rs:44:12
119 LL | if let Ready(_) = Ready(m.lock()) {}
120 | -------^^^^^^^^------------------ help: try this: `if Ready(m.lock()).is_ready()`
122 = note: this will change drop order of the result, as well as all temporaries
123 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
125 error: redundant pattern matching, consider using `is_ready()`
126 --> $DIR/redundant_pattern_matching_drop_order.rs:45:12
128 LL | if let Ready(_) = Ready(m.lock().unwrap().0) {}
129 | -------^^^^^^^^----------------------------- help: try this: `if Ready(m.lock().unwrap().0).is_ready()`
131 = note: this will change drop order of the result, as well as all temporaries
132 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
134 error: redundant pattern matching, consider using `is_pending()`
135 --> $DIR/redundant_pattern_matching_drop_order.rs:48:16
137 LL | if let Pending = Pending::<std::sync::MutexGuard<()>> {}
138 | -------^^^^^^^--------------------------------------- help: try this: `if Pending::<std::sync::MutexGuard<()>>.is_pending()`
140 = note: this will change drop order of the result, as well as all temporaries
141 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
143 error: redundant pattern matching, consider using `is_pending()`
144 --> $DIR/redundant_pattern_matching_drop_order.rs:50:12
146 LL | if let Pending = Pending::<std::sync::MutexGuard<()>> {
147 | -------^^^^^^^--------------------------------------- help: try this: `if Pending::<std::sync::MutexGuard<()>>.is_pending()`
149 = note: this will change drop order of the result, as well as all temporaries
150 = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
152 error: redundant pattern matching, consider using `is_pending()`
153 --> $DIR/redundant_pattern_matching_drop_order.rs:54:12
155 LL | if let Pending = Pending::<std::sync::MutexGuard<()>> {}
156 | -------^^^^^^^--------------------------------------- help: try this: `if Pending::<std::sync::MutexGuard<()>>.is_pending()`
158 error: redundant pattern matching, consider using `is_ready()`
159 --> $DIR/redundant_pattern_matching_drop_order.rs:56:12
161 LL | if let Ready(_) = Ready(String::new()) {}
162 | -------^^^^^^^^----------------------- help: try this: `if Ready(String::new()).is_ready()`
164 error: redundant pattern matching, consider using `is_ready()`
165 --> $DIR/redundant_pattern_matching_drop_order.rs:57:12
167 LL | if let Ready(_) = Ready((String::new(), ())) {}
168 | -------^^^^^^^^----------------------------- help: try this: `if Ready((String::new(), ())).is_ready()`
170 error: aborting due to 22 previous errors