summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/redundant_pattern_matching_drop_order.stderr
blob: 23f08103f358fc573fedd169ea182f44cac5f27d (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
error: redundant pattern matching, consider using `is_ok()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:12:12
   |
LL |     if let Ok(_) = m.lock() {}
   |     -------^^^^^----------- help: try this: `if m.lock().is_ok()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important
   = note: `-D clippy::redundant-pattern-matching` implied by `-D warnings`

error: redundant pattern matching, consider using `is_err()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:13:12
   |
LL |     if let Err(_) = Err::<(), _>(m.lock().unwrap().0) {}
   |     -------^^^^^^------------------------------------ help: try this: `if Err::<(), _>(m.lock().unwrap().0).is_err()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important

error: redundant pattern matching, consider using `is_ok()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:16:16
   |
LL |         if let Ok(_) = Ok::<_, std::sync::MutexGuard<()>>(()) {}
   |         -------^^^^^----------------------------------------- help: try this: `if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important

error: redundant pattern matching, consider using `is_ok()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:18:12
   |
LL |     if let Ok(_) = Ok::<_, std::sync::MutexGuard<()>>(()) {
   |     -------^^^^^----------------------------------------- help: try this: `if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important

error: redundant pattern matching, consider using `is_ok()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:21:12
   |
LL |     if let Ok(_) = Ok::<_, std::sync::MutexGuard<()>>(()) {}
   |     -------^^^^^----------------------------------------- help: try this: `if Ok::<_, std::sync::MutexGuard<()>>(()).is_ok()`

error: redundant pattern matching, consider using `is_err()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:22:12
   |
LL |     if let Err(_) = Err::<std::sync::MutexGuard<()>, _>(()) {}
   |     -------^^^^^^------------------------------------------ help: try this: `if Err::<std::sync::MutexGuard<()>, _>(()).is_err()`

error: redundant pattern matching, consider using `is_ok()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:24:12
   |
LL |     if let Ok(_) = Ok::<_, ()>(String::new()) {}
   |     -------^^^^^----------------------------- help: try this: `if Ok::<_, ()>(String::new()).is_ok()`

error: redundant pattern matching, consider using `is_err()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:25:12
   |
LL |     if let Err(_) = Err::<(), _>((String::new(), ())) {}
   |     -------^^^^^^------------------------------------ help: try this: `if Err::<(), _>((String::new(), ())).is_err()`

error: redundant pattern matching, consider using `is_some()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:28:12
   |
LL |     if let Some(_) = Some(m.lock()) {}
   |     -------^^^^^^^----------------- help: try this: `if Some(m.lock()).is_some()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important

error: redundant pattern matching, consider using `is_some()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:29:12
   |
LL |     if let Some(_) = Some(m.lock().unwrap().0) {}
   |     -------^^^^^^^---------------------------- help: try this: `if Some(m.lock().unwrap().0).is_some()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important

error: redundant pattern matching, consider using `is_none()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:32:16
   |
LL |         if let None = None::<std::sync::MutexGuard<()>> {}
   |         -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important

error: redundant pattern matching, consider using `is_none()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:34:12
   |
LL |     if let None = None::<std::sync::MutexGuard<()>> {
   |     -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important

error: redundant pattern matching, consider using `is_none()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:38:12
   |
LL |     if let None = None::<std::sync::MutexGuard<()>> {}
   |     -------^^^^------------------------------------ help: try this: `if None::<std::sync::MutexGuard<()>>.is_none()`

error: redundant pattern matching, consider using `is_some()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:40:12
   |
LL |     if let Some(_) = Some(String::new()) {}
   |     -------^^^^^^^---------------------- help: try this: `if Some(String::new()).is_some()`

error: redundant pattern matching, consider using `is_some()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:41:12
   |
LL |     if let Some(_) = Some((String::new(), ())) {}
   |     -------^^^^^^^---------------------------- help: try this: `if Some((String::new(), ())).is_some()`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:44:12
   |
LL |     if let Ready(_) = Ready(m.lock()) {}
   |     -------^^^^^^^^------------------ help: try this: `if Ready(m.lock()).is_ready()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:45:12
   |
LL |     if let Ready(_) = Ready(m.lock().unwrap().0) {}
   |     -------^^^^^^^^----------------------------- help: try this: `if Ready(m.lock().unwrap().0).is_ready()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important

error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:48:16
   |
LL |         if let Pending = Pending::<std::sync::MutexGuard<()>> {}
   |         -------^^^^^^^--------------------------------------- help: try this: `if Pending::<std::sync::MutexGuard<()>>.is_pending()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important

error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:50:12
   |
LL |     if let Pending = Pending::<std::sync::MutexGuard<()>> {
   |     -------^^^^^^^--------------------------------------- help: try this: `if Pending::<std::sync::MutexGuard<()>>.is_pending()`
   |
   = note: this will change drop order of the result, as well as all temporaries
   = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important

error: redundant pattern matching, consider using `is_pending()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:54:12
   |
LL |     if let Pending = Pending::<std::sync::MutexGuard<()>> {}
   |     -------^^^^^^^--------------------------------------- help: try this: `if Pending::<std::sync::MutexGuard<()>>.is_pending()`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:56:12
   |
LL |     if let Ready(_) = Ready(String::new()) {}
   |     -------^^^^^^^^----------------------- help: try this: `if Ready(String::new()).is_ready()`

error: redundant pattern matching, consider using `is_ready()`
  --> $DIR/redundant_pattern_matching_drop_order.rs:57:12
   |
LL |     if let Ready(_) = Ready((String::new(), ())) {}
   |     -------^^^^^^^^----------------------------- help: try this: `if Ready((String::new(), ())).is_ready()`

error: aborting due to 22 previous errors