2022-02-18 00:02:22 -06:00
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:59:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match mutex.lock().unwrap().foo() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::significant-drop-in-scrutinee` implied by `-D warnings`
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = mutex.lock().unwrap().foo();
|
|
|
|
LL ~ match value {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:132:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match s.lock_m().get_the_value() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = s.lock_m().get_the_value();
|
|
|
|
LL ~ match value {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:153:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match s.lock_m_m().get_the_value() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = s.lock_m_m().get_the_value();
|
|
|
|
LL ~ match value {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:201:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match counter.temp_increment().len() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = counter.temp_increment().len();
|
|
|
|
LL ~ match value {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:224:16
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match (mutex1.lock().unwrap().s.len(), true) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = mutex1.lock().unwrap().s.len();
|
|
|
|
LL ~ match (value, true) {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:233:22
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match (true, mutex1.lock().unwrap().s.len(), true) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = mutex1.lock().unwrap().s.len();
|
|
|
|
LL ~ match (true, value, true) {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:243:16
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match (mutex1.lock().unwrap().s.len(), true, mutex2.lock().unwrap().s.len()) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = mutex1.lock().unwrap().s.len();
|
|
|
|
LL ~ match (value, true, mutex2.lock().unwrap().s.len()) {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:243:54
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match (mutex1.lock().unwrap().s.len(), true, mutex2.lock().unwrap().s.len()) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = mutex2.lock().unwrap().s.len();
|
|
|
|
LL ~ match (mutex1.lock().unwrap().s.len(), true, value) {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:254:15
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match mutex3.lock().unwrap().s.as_str() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:264:22
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match (true, mutex3.lock().unwrap().s.as_str()) {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:283:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match mutex.lock().unwrap().s.len() > 1 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = mutex.lock().unwrap().s.len() > 1;
|
|
|
|
LL ~ match value {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:290:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match 1 < mutex.lock().unwrap().s.len() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = 1 < mutex.lock().unwrap().s.len();
|
|
|
|
LL ~ match value {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:308:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match mutex1.lock().unwrap().s.len() < mutex2.lock().unwrap().s.len() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = mutex1.lock().unwrap().s.len() < mutex2.lock().unwrap().s.len();
|
|
|
|
LL ~ match value {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:319:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match mutex1.lock().unwrap().s.len() >= mutex2.lock().unwrap().s.len() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = mutex1.lock().unwrap().s.len() >= mutex2.lock().unwrap().s.len();
|
|
|
|
LL ~ match value {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:354:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match get_mutex_guard().s.len() > 1 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ let value = get_mutex_guard().s.len() > 1;
|
|
|
|
LL ~ match value {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:371:11
|
2022-05-20 13:37:38 -05:00
|
|
|
|
|
|
|
|
LL | match match i {
|
|
|
|
| ___________^
|
|
|
|
LL | | 100 => mutex1.lock().unwrap(),
|
|
|
|
LL | | _ => mutex2.lock().unwrap(),
|
|
|
|
LL | | }
|
|
|
|
LL | | .s
|
|
|
|
LL | | .len()
|
|
|
|
LL | | > 1
|
|
|
|
| |___________^
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
2022-05-20 13:37:38 -05:00
|
|
|
LL ~ let value = match i {
|
|
|
|
LL + 100 => mutex1.lock().unwrap(),
|
|
|
|
LL + _ => mutex2.lock().unwrap(),
|
|
|
|
LL + }
|
|
|
|
LL + .s
|
|
|
|
LL + .len()
|
|
|
|
...
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:397:11
|
2022-05-20 13:37:38 -05:00
|
|
|
|
|
|
|
|
LL | match if i > 1 {
|
|
|
|
| ___________^
|
|
|
|
LL | | mutex1.lock().unwrap()
|
|
|
|
LL | | } else {
|
|
|
|
LL | | mutex2.lock().unwrap()
|
|
|
|
... |
|
|
|
|
LL | | .len()
|
|
|
|
LL | | > 1
|
|
|
|
| |___________^
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
2022-05-20 13:37:38 -05:00
|
|
|
LL ~ let value = if i > 1 {
|
|
|
|
LL + mutex1.lock().unwrap()
|
|
|
|
LL + } else {
|
|
|
|
LL + mutex2.lock().unwrap()
|
|
|
|
LL + }
|
|
|
|
LL + .s
|
|
|
|
...
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:451:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match s.lock().deref().deref() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match and create a copy
|
|
|
|
|
|
|
|
|
LL ~ let value = *s.lock().deref().deref();
|
|
|
|
LL ~ match value {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:479:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match s.lock().deref().deref() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:498:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match mutex.lock().unwrap().i = i {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ mutex.lock().unwrap().i = i;
|
|
|
|
LL ~ match () {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:504:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match i = mutex.lock().unwrap().i {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ i = mutex.lock().unwrap().i;
|
|
|
|
LL ~ match () {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:510:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match mutex.lock().unwrap().i += 1 {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ mutex.lock().unwrap().i += 1;
|
|
|
|
LL ~ match () {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: temporary with significant drop in match scrutinee
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:516:11
|
2022-02-18 00:02:22 -06:00
|
|
|
|
|
|
|
|
LL | match i += mutex.lock().unwrap().i {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
help: try moving the temporary above the match
|
|
|
|
|
|
|
|
|
LL ~ i += mutex.lock().unwrap().i;
|
|
|
|
LL ~ match () {
|
|
|
|
|
|
|
|
|
|
2022-05-24 02:06:33 -05:00
|
|
|
error: temporary with significant drop in match scrutinee
|
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:579:11
|
|
|
|
|
|
|
|
|
LL | match rwlock.read().unwrap().to_number() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2022-06-02 03:23:42 -05:00
|
|
|
error: temporary with significant drop in for loop
|
2022-05-24 02:06:33 -05:00
|
|
|
--> $DIR/significant_drop_in_scrutinee.rs:589:14
|
|
|
|
|
|
|
|
|
LL | for s in rwlock.read().unwrap().iter() {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 25 previous errors
|
2022-02-18 00:02:22 -06:00
|
|
|
|