@@ -67,47 +67,59 @@ error: assigning the result of `Clone::clone()` may be inefficient
67
67
LL | a = b.clone();
68
68
| ^^^^^^^^^^^^^ help: use `clone_from()`: `a.clone_from(&b)`
69
69
70
+ error: assigning the result of `Clone::clone()` may be inefficient
71
+ --> tests/ui/assigning_clones.rs:133:5
72
+ |
73
+ LL | a = b.clone();
74
+ | ^^^^^^^^^^^^^ help: use `clone_from()`: `a.clone_from(&b)`
75
+
76
+ error: assigning the result of `Clone::clone()` may be inefficient
77
+ --> tests/ui/assigning_clones.rs:140:5
78
+ |
79
+ LL | a = b.clone();
80
+ | ^^^^^^^^^^^^^ help: use `clone_from()`: `a.clone_from(&b)`
81
+
70
82
error: assigning the result of `ToOwned::to_owned()` may be inefficient
71
- --> tests/ui/assigning_clones.rs:139 :5
83
+ --> tests/ui/assigning_clones.rs:141 :5
72
84
|
73
- LL | a = b .to_owned();
74
- | ^^^^^^^^^^^^^^^^ help: use `clone_into()`: `b .clone_into(&mut a)`
85
+ LL | a = c .to_owned();
86
+ | ^^^^^^^^^^^^^^^^ help: use `clone_into()`: `c .clone_into(&mut a)`
75
87
76
88
error: assigning the result of `ToOwned::to_owned()` may be inefficient
77
- --> tests/ui/assigning_clones.rs:156 :5
89
+ --> tests/ui/assigning_clones.rs:158 :5
78
90
|
79
91
LL | *mut_string = ref_str.to_owned();
80
92
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(mut_string)`
81
93
82
94
error: assigning the result of `ToOwned::to_owned()` may be inefficient
83
- --> tests/ui/assigning_clones.rs:160 :5
95
+ --> tests/ui/assigning_clones.rs:162 :5
84
96
|
85
97
LL | mut_string = ref_str.to_owned();
86
98
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(&mut mut_string)`
87
99
88
100
error: assigning the result of `ToOwned::to_owned()` may be inefficient
89
- --> tests/ui/assigning_clones.rs:181 :5
101
+ --> tests/ui/assigning_clones.rs:183 :5
90
102
|
91
103
LL | **mut_box_string = ref_str.to_owned();
92
104
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(&mut (*mut_box_string))`
93
105
94
106
error: assigning the result of `ToOwned::to_owned()` may be inefficient
95
- --> tests/ui/assigning_clones.rs:185 :5
107
+ --> tests/ui/assigning_clones.rs:187 :5
96
108
|
97
109
LL | **mut_box_string = ref_str.to_owned();
98
110
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(&mut (*mut_box_string))`
99
111
100
112
error: assigning the result of `ToOwned::to_owned()` may be inefficient
101
- --> tests/ui/assigning_clones.rs:189 :5
113
+ --> tests/ui/assigning_clones.rs:191 :5
102
114
|
103
115
LL | *mut_thing = ToOwned::to_owned(ref_str);
104
116
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(ref_str, mut_thing)`
105
117
106
118
error: assigning the result of `ToOwned::to_owned()` may be inefficient
107
- --> tests/ui/assigning_clones.rs:193 :5
119
+ --> tests/ui/assigning_clones.rs:195 :5
108
120
|
109
121
LL | mut_thing = ToOwned::to_owned(ref_str);
110
122
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(ref_str, &mut mut_thing)`
111
123
112
- error: aborting due to 18 previous errors
124
+ error: aborting due to 20 previous errors
113
125
0 commit comments