@@ -68,40 +68,46 @@ LL | a = b.clone();
68
68
| ^^^^^^^^^^^^^ help: use `clone_from()`: `a.clone_from(&b)`
69
69
70
70
error: assigning the result of `ToOwned::to_owned()` may be inefficient
71
- --> tests/ui/assigning_clones.rs:145:5
71
+ --> tests/ui/assigning_clones.rs:139:5
72
+ |
73
+ LL | a = b.to_owned();
74
+ | ^^^^^^^^^^^^^^^^ help: use `clone_into()`: `b.clone_into(&mut a)`
75
+
76
+ error: assigning the result of `ToOwned::to_owned()` may be inefficient
77
+ --> tests/ui/assigning_clones.rs:156:5
72
78
|
73
79
LL | *mut_string = ref_str.to_owned();
74
80
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(mut_string)`
75
81
76
82
error: assigning the result of `ToOwned::to_owned()` may be inefficient
77
- --> tests/ui/assigning_clones.rs:149 :5
83
+ --> tests/ui/assigning_clones.rs:160 :5
78
84
|
79
85
LL | mut_string = ref_str.to_owned();
80
86
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(&mut mut_string)`
81
87
82
88
error: assigning the result of `ToOwned::to_owned()` may be inefficient
83
- --> tests/ui/assigning_clones.rs:170 :5
89
+ --> tests/ui/assigning_clones.rs:181 :5
84
90
|
85
91
LL | **mut_box_string = ref_str.to_owned();
86
92
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(&mut (*mut_box_string))`
87
93
88
94
error: assigning the result of `ToOwned::to_owned()` may be inefficient
89
- --> tests/ui/assigning_clones.rs:174 :5
95
+ --> tests/ui/assigning_clones.rs:185 :5
90
96
|
91
97
LL | **mut_box_string = ref_str.to_owned();
92
98
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(&mut (*mut_box_string))`
93
99
94
100
error: assigning the result of `ToOwned::to_owned()` may be inefficient
95
- --> tests/ui/assigning_clones.rs:178 :5
101
+ --> tests/ui/assigning_clones.rs:189 :5
96
102
|
97
103
LL | *mut_thing = ToOwned::to_owned(ref_str);
98
104
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(ref_str, mut_thing)`
99
105
100
106
error: assigning the result of `ToOwned::to_owned()` may be inefficient
101
- --> tests/ui/assigning_clones.rs:182 :5
107
+ --> tests/ui/assigning_clones.rs:193 :5
102
108
|
103
109
LL | mut_thing = ToOwned::to_owned(ref_str);
104
110
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(ref_str, &mut mut_thing)`
105
111
106
- error: aborting due to 17 previous errors
112
+ error: aborting due to 18 previous errors
107
113
0 commit comments