|
1 | 1 | error: assigning the result of `Clone::clone()` may be inefficient
|
2 |
| - --> tests/ui/assigning_clones.rs:24:5 |
| 2 | + --> tests/ui/assigning_clones.rs:25:5 |
3 | 3 | |
|
4 | 4 | LL | *mut_thing = value_thing.clone();
|
5 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `mut_thing.clone_from(&value_thing)` |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `(*mut_thing).clone_from(&value_thing)` |
6 | 6 | |
|
7 | 7 | = note: `-D clippy::assigning-clones` implied by `-D warnings`
|
8 | 8 | = help: to override `-D warnings` add `#[allow(clippy::assigning_clones)]`
|
9 | 9 |
|
10 | 10 | error: assigning the result of `Clone::clone()` may be inefficient
|
11 |
| - --> tests/ui/assigning_clones.rs:28:5 |
| 11 | + --> tests/ui/assigning_clones.rs:29:5 |
12 | 12 | |
|
13 | 13 | LL | *mut_thing = ref_thing.clone();
|
14 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `mut_thing.clone_from(ref_thing)` |
| 14 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `(*mut_thing).clone_from(ref_thing)` |
15 | 15 |
|
16 | 16 | error: assigning the result of `Clone::clone()` may be inefficient
|
17 |
| - --> tests/ui/assigning_clones.rs:32:5 |
| 17 | + --> tests/ui/assigning_clones.rs:33:5 |
18 | 18 | |
|
19 | 19 | LL | mut_thing = ref_thing.clone();
|
20 | 20 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `mut_thing.clone_from(ref_thing)`
|
21 | 21 |
|
22 | 22 | error: assigning the result of `Clone::clone()` may be inefficient
|
23 |
| - --> tests/ui/assigning_clones.rs:36:5 |
| 23 | + --> tests/ui/assigning_clones.rs:37:5 |
24 | 24 | |
|
25 | 25 | LL | *mut_thing = Clone::clone(ref_thing);
|
26 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `Clone::clone_from(mut_thing, ref_thing)` |
| 26 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `Clone::clone_from(&mut (*mut_thing), ref_thing)` |
27 | 27 |
|
28 | 28 | error: assigning the result of `Clone::clone()` may be inefficient
|
29 |
| - --> tests/ui/assigning_clones.rs:40:5 |
| 29 | + --> tests/ui/assigning_clones.rs:41:5 |
30 | 30 | |
|
31 | 31 | LL | mut_thing = Clone::clone(ref_thing);
|
32 | 32 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `Clone::clone_from(&mut mut_thing, ref_thing)`
|
33 | 33 |
|
34 | 34 | error: assigning the result of `Clone::clone()` may be inefficient
|
35 |
| - --> tests/ui/assigning_clones.rs:44:5 |
| 35 | + --> tests/ui/assigning_clones.rs:45:5 |
36 | 36 | |
|
37 | 37 | LL | *mut_thing = Clone::clone(ref_thing);
|
38 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `Clone::clone_from(mut_thing, ref_thing)` |
| 38 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `Clone::clone_from(&mut (*mut_thing), ref_thing)` |
39 | 39 |
|
40 | 40 | error: assigning the result of `Clone::clone()` may be inefficient
|
41 |
| - --> tests/ui/assigning_clones.rs:48:5 |
| 41 | + --> tests/ui/assigning_clones.rs:49:5 |
42 | 42 | |
|
43 | 43 | LL | *mut_thing = HasCloneFrom::clone(ref_thing);
|
44 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `Clone::clone_from(mut_thing, ref_thing)` |
| 44 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `Clone::clone_from(&mut (*mut_thing), ref_thing)` |
45 | 45 |
|
46 | 46 | error: assigning the result of `Clone::clone()` may be inefficient
|
47 |
| - --> tests/ui/assigning_clones.rs:52:5 |
| 47 | + --> tests/ui/assigning_clones.rs:53:5 |
48 | 48 | |
|
49 | 49 | LL | *mut_thing = <HasCloneFrom as Clone>::clone(ref_thing);
|
50 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `Clone::clone_from(mut_thing, ref_thing)` |
| 50 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `Clone::clone_from(&mut (*mut_thing), ref_thing)` |
51 | 51 |
|
52 | 52 | error: assigning the result of `Clone::clone()` may be inefficient
|
53 |
| - --> tests/ui/assigning_clones.rs:57:5 |
| 53 | + --> tests/ui/assigning_clones.rs:58:5 |
54 | 54 | |
|
55 | 55 | LL | *(mut_thing + &mut HasCloneFrom) = ref_thing.clone();
|
56 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `(mut_thing + &mut HasCloneFrom).clone_from(ref_thing)` |
| 56 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `(*(mut_thing + &mut HasCloneFrom)).clone_from(ref_thing)` |
57 | 57 |
|
58 | 58 | error: assigning the result of `Clone::clone()` may be inefficient
|
59 |
| - --> tests/ui/assigning_clones.rs:62:5 |
| 59 | + --> tests/ui/assigning_clones.rs:63:5 |
60 | 60 | |
|
61 | 61 | LL | *mut_thing = (ref_thing + ref_thing).clone();
|
62 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `mut_thing.clone_from(ref_thing + ref_thing)` |
| 62 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `(*mut_thing).clone_from(ref_thing + ref_thing)` |
63 | 63 |
|
64 | 64 | error: assigning the result of `Clone::clone()` may be inefficient
|
65 |
| - --> tests/ui/assigning_clones.rs:68:9 |
| 65 | + --> tests/ui/assigning_clones.rs:69:9 |
66 | 66 | |
|
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:146:5 |
| 72 | + | |
| 73 | +LL | *prev = cx.waker().clone(); |
| 74 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `(*prev).clone_from(cx.waker())` |
| 75 | + |
| 76 | +error: assigning the result of `Clone::clone()` may be inefficient |
| 77 | + --> tests/ui/assigning_clones.rs:151:5 |
| 78 | + | |
| 79 | +LL | *prev = Clone::clone(cx.waker()); |
| 80 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `Clone::clone_from(&mut (*prev), cx.waker())` |
| 81 | + |
70 | 82 | error: assigning the result of `ToOwned::to_owned()` may be inefficient
|
71 |
| - --> tests/ui/assigning_clones.rs:145:5 |
| 83 | + --> tests/ui/assigning_clones.rs:157:5 |
72 | 84 | |
|
73 | 85 | LL | *mut_string = ref_str.to_owned();
|
74 | 86 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(mut_string)`
|
75 | 87 |
|
76 | 88 | error: assigning the result of `ToOwned::to_owned()` may be inefficient
|
77 |
| - --> tests/ui/assigning_clones.rs:149:5 |
| 89 | + --> tests/ui/assigning_clones.rs:161:5 |
78 | 90 | |
|
79 | 91 | LL | mut_string = ref_str.to_owned();
|
80 | 92 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(&mut mut_string)`
|
81 | 93 |
|
82 | 94 | error: assigning the result of `ToOwned::to_owned()` may be inefficient
|
83 |
| - --> tests/ui/assigning_clones.rs:170:5 |
| 95 | + --> tests/ui/assigning_clones.rs:182:5 |
84 | 96 | |
|
85 | 97 | LL | **mut_box_string = ref_str.to_owned();
|
86 | 98 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ref_str.clone_into(&mut (*mut_box_string))`
|
87 | 99 |
|
88 | 100 | error: assigning the result of `ToOwned::to_owned()` may be inefficient
|
89 |
| - --> tests/ui/assigning_clones.rs:174:5 |
| 101 | + --> tests/ui/assigning_clones.rs:186: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:178:5 |
| 107 | + --> tests/ui/assigning_clones.rs:190:5 |
96 | 108 | |
|
97 | 109 | LL | *mut_thing = ToOwned::to_owned(ref_str);
|
98 | 110 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ToOwned::clone_into(ref_str, mut_thing)`
|
99 | 111 |
|
100 | 112 | error: assigning the result of `ToOwned::to_owned()` may be inefficient
|
101 |
| - --> tests/ui/assigning_clones.rs:182:5 |
| 113 | + --> tests/ui/assigning_clones.rs:194: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 mut_thing)`
|
105 | 117 |
|
106 |
| -error: aborting due to 17 previous errors |
| 118 | +error: aborting due to 19 previous errors |
107 | 119 |
|
0 commit comments