1 error: temporary with significant drop in match scrutinee
2 --> $DIR/significant_drop_in_scrutinee.rs:59:11
4 LL | match mutex.lock().unwrap().foo() {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::significant-drop-in-scrutinee` implied by `-D warnings`
8 help: try moving the temporary above the match
10 LL ~ let value = mutex.lock().unwrap().foo();
14 error: temporary with significant drop in match scrutinee
15 --> $DIR/significant_drop_in_scrutinee.rs:132:11
17 LL | match s.lock_m().get_the_value() {
18 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
20 help: try moving the temporary above the match
22 LL ~ let value = s.lock_m().get_the_value();
26 error: temporary with significant drop in match scrutinee
27 --> $DIR/significant_drop_in_scrutinee.rs:153:11
29 LL | match s.lock_m_m().get_the_value() {
30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 help: try moving the temporary above the match
34 LL ~ let value = s.lock_m_m().get_the_value();
38 error: temporary with significant drop in match scrutinee
39 --> $DIR/significant_drop_in_scrutinee.rs:201:11
41 LL | match counter.temp_increment().len() {
42 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
44 help: try moving the temporary above the match
46 LL ~ let value = counter.temp_increment().len();
50 error: temporary with significant drop in match scrutinee
51 --> $DIR/significant_drop_in_scrutinee.rs:224:16
53 LL | match (mutex1.lock().unwrap().s.len(), true) {
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
56 help: try moving the temporary above the match
58 LL ~ let value = mutex1.lock().unwrap().s.len();
59 LL ~ match (value, true) {
62 error: temporary with significant drop in match scrutinee
63 --> $DIR/significant_drop_in_scrutinee.rs:233:22
65 LL | match (true, mutex1.lock().unwrap().s.len(), true) {
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68 help: try moving the temporary above the match
70 LL ~ let value = mutex1.lock().unwrap().s.len();
71 LL ~ match (true, value, true) {
74 error: temporary with significant drop in match scrutinee
75 --> $DIR/significant_drop_in_scrutinee.rs:243:16
77 LL | match (mutex1.lock().unwrap().s.len(), true, mutex2.lock().unwrap().s.len()) {
78 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80 help: try moving the temporary above the match
82 LL ~ let value = mutex1.lock().unwrap().s.len();
83 LL ~ match (value, true, mutex2.lock().unwrap().s.len()) {
86 error: temporary with significant drop in match scrutinee
87 --> $DIR/significant_drop_in_scrutinee.rs:243:54
89 LL | match (mutex1.lock().unwrap().s.len(), true, mutex2.lock().unwrap().s.len()) {
90 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92 help: try moving the temporary above the match
94 LL ~ let value = mutex2.lock().unwrap().s.len();
95 LL ~ match (mutex1.lock().unwrap().s.len(), true, value) {
98 error: temporary with significant drop in match scrutinee
99 --> $DIR/significant_drop_in_scrutinee.rs:254:15
101 LL | match mutex3.lock().unwrap().s.as_str() {
102 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
104 error: temporary with significant drop in match scrutinee
105 --> $DIR/significant_drop_in_scrutinee.rs:264:22
107 LL | match (true, mutex3.lock().unwrap().s.as_str()) {
108 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
110 error: temporary with significant drop in match scrutinee
111 --> $DIR/significant_drop_in_scrutinee.rs:283:11
113 LL | match mutex.lock().unwrap().s.len() > 1 {
114 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
116 help: try moving the temporary above the match
118 LL ~ let value = mutex.lock().unwrap().s.len() > 1;
122 error: temporary with significant drop in match scrutinee
123 --> $DIR/significant_drop_in_scrutinee.rs:290:11
125 LL | match 1 < mutex.lock().unwrap().s.len() {
126 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128 help: try moving the temporary above the match
130 LL ~ let value = 1 < mutex.lock().unwrap().s.len();
134 error: temporary with significant drop in match scrutinee
135 --> $DIR/significant_drop_in_scrutinee.rs:308:11
137 LL | match mutex1.lock().unwrap().s.len() < mutex2.lock().unwrap().s.len() {
138 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140 help: try moving the temporary above the match
142 LL ~ let value = mutex1.lock().unwrap().s.len() < mutex2.lock().unwrap().s.len();
146 error: temporary with significant drop in match scrutinee
147 --> $DIR/significant_drop_in_scrutinee.rs:319:11
149 LL | match mutex1.lock().unwrap().s.len() >= mutex2.lock().unwrap().s.len() {
150 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
152 help: try moving the temporary above the match
154 LL ~ let value = mutex1.lock().unwrap().s.len() >= mutex2.lock().unwrap().s.len();
158 error: temporary with significant drop in match scrutinee
159 --> $DIR/significant_drop_in_scrutinee.rs:354:11
161 LL | match get_mutex_guard().s.len() > 1 {
162 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
164 help: try moving the temporary above the match
166 LL ~ let value = get_mutex_guard().s.len() > 1;
170 error: temporary with significant drop in match scrutinee
171 --> $DIR/significant_drop_in_scrutinee.rs:371:11
175 LL | | 100 => mutex1.lock().unwrap(),
176 LL | | _ => mutex2.lock().unwrap(),
183 help: try moving the temporary above the match
185 LL ~ let value = match i {
186 LL + 100 => mutex1.lock().unwrap(),
187 LL + _ => mutex2.lock().unwrap(),
193 error: temporary with significant drop in match scrutinee
194 --> $DIR/significant_drop_in_scrutinee.rs:397:11
196 LL | match if i > 1 {
198 LL | | mutex1.lock().unwrap()
200 LL | | mutex2.lock().unwrap()
206 help: try moving the temporary above the match
208 LL ~ let value = if i > 1 {
209 LL + mutex1.lock().unwrap()
211 LL + mutex2.lock().unwrap()
216 error: temporary with significant drop in match scrutinee
217 --> $DIR/significant_drop_in_scrutinee.rs:451:11
219 LL | match s.lock().deref().deref() {
220 | ^^^^^^^^^^^^^^^^^^^^^^^^
222 help: try moving the temporary above the match and create a copy
224 LL ~ let value = *s.lock().deref().deref();
228 error: temporary with significant drop in match scrutinee
229 --> $DIR/significant_drop_in_scrutinee.rs:479:11
231 LL | match s.lock().deref().deref() {
232 | ^^^^^^^^^^^^^^^^^^^^^^^^
234 error: temporary with significant drop in match scrutinee
235 --> $DIR/significant_drop_in_scrutinee.rs:498:11
237 LL | match mutex.lock().unwrap().i = i {
238 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
240 help: try moving the temporary above the match
242 LL ~ mutex.lock().unwrap().i = i;
246 error: temporary with significant drop in match scrutinee
247 --> $DIR/significant_drop_in_scrutinee.rs:504:11
249 LL | match i = mutex.lock().unwrap().i {
250 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
252 help: try moving the temporary above the match
254 LL ~ i = mutex.lock().unwrap().i;
258 error: temporary with significant drop in match scrutinee
259 --> $DIR/significant_drop_in_scrutinee.rs:510:11
261 LL | match mutex.lock().unwrap().i += 1 {
262 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
264 help: try moving the temporary above the match
266 LL ~ mutex.lock().unwrap().i += 1;
270 error: temporary with significant drop in match scrutinee
271 --> $DIR/significant_drop_in_scrutinee.rs:516:11
273 LL | match i += mutex.lock().unwrap().i {
274 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
276 help: try moving the temporary above the match
278 LL ~ i += mutex.lock().unwrap().i;
282 error: temporary with significant drop in match scrutinee
283 --> $DIR/significant_drop_in_scrutinee.rs:579:11
285 LL | match rwlock.read().unwrap().to_number() {
286 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
288 error: temporary with significant drop in for loop
289 --> $DIR/significant_drop_in_scrutinee.rs:589:14
291 LL | for s in rwlock.read().unwrap().iter() {
292 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
294 error: aborting due to 25 previous errors