@@ -68,40 +68,46 @@ LL | a = b.clone();
6868 | ^^^^^^^^^^^^^ help: use `clone_from()`: `a.clone_from(&b)`
6969
7070error: 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
7278 |
7379LL | *mut_string = ref_str.to_owned();
7480 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(mut_string)`
7581
7682error: 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
7884 |
7985LL | mut_string = ref_str.to_owned();
8086 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(&mut mut_string)`
8187
8288error: 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
8490 |
8591LL | **mut_box_string = ref_str.to_owned();
8692 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(&mut (*mut_box_string))`
8793
8894error: 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
9096 |
9197LL | **mut_box_string = ref_str.to_owned();
9298 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(&mut (*mut_box_string))`
9399
94100error: 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
96102 |
97103LL | *mut_thing = ToOwned::to_owned(ref_str);
98104 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(ref_str, mut_thing)`
99105
100106error: 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
102108 |
103109LL | mut_thing = ToOwned::to_owned(ref_str);
104110 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(ref_str, &mut mut_thing)`
105111
106- error: aborting due to 17 previous errors
112+ error: aborting due to 18 previous errors
107113
0 commit comments