|
1 | 1 | error: the function `takes_ref` doesn't need a mutable reference
|
2 |
| - --> tests/ui/unnecessary_mut_passed.rs:56:15 |
| 2 | + --> tests/ui/unnecessary_mut_passed.rs:57:15 |
3 | 3 | |
|
4 | 4 | LL | takes_ref(&mut 42);
|
5 |
| - | ^^^^^^^ help: remove this `mut`: `&42` |
| 5 | + | ^^^^^^^ |
6 | 6 | |
|
7 | 7 | = note: `-D clippy::unnecessary-mut-passed` implied by `-D warnings`
|
8 | 8 | = help: to override `-D warnings` add `#[allow(clippy::unnecessary_mut_passed)]`
|
| 9 | +help: remove this `mut` |
| 10 | + | |
| 11 | +LL - takes_ref(&mut 42); |
| 12 | +LL + takes_ref(&42); |
| 13 | + | |
9 | 14 |
|
10 | 15 | error: the function `takes_ref_ref` doesn't need a mutable reference
|
11 |
| - --> tests/ui/unnecessary_mut_passed.rs:58:19 |
| 16 | + --> tests/ui/unnecessary_mut_passed.rs:59:19 |
12 | 17 | |
|
13 | 18 | LL | takes_ref_ref(&mut &42);
|
14 |
| - | ^^^^^^^^ help: remove this `mut`: `&&42` |
| 19 | + | ^^^^^^^^ |
| 20 | + | |
| 21 | +help: remove this `mut` |
| 22 | + | |
| 23 | +LL - takes_ref_ref(&mut &42); |
| 24 | +LL + takes_ref_ref(&&42); |
| 25 | + | |
15 | 26 |
|
16 | 27 | error: the function `takes_ref_refmut` doesn't need a mutable reference
|
17 |
| - --> tests/ui/unnecessary_mut_passed.rs:60:22 |
| 28 | + --> tests/ui/unnecessary_mut_passed.rs:61:22 |
18 | 29 | |
|
19 | 30 | LL | takes_ref_refmut(&mut &mut 42);
|
20 |
| - | ^^^^^^^^^^^^ help: remove this `mut`: `&&mut 42` |
| 31 | + | ^^^^^^^^^^^^ |
| 32 | + | |
| 33 | +help: remove this `mut` |
| 34 | + | |
| 35 | +LL - takes_ref_refmut(&mut &mut 42); |
| 36 | +LL + takes_ref_refmut(&&mut 42); |
| 37 | + | |
21 | 38 |
|
22 | 39 | error: the function `takes_raw_const` doesn't need a mutable reference
|
23 |
| - --> tests/ui/unnecessary_mut_passed.rs:62:21 |
| 40 | + --> tests/ui/unnecessary_mut_passed.rs:63:21 |
24 | 41 | |
|
25 | 42 | LL | takes_raw_const(&mut 42);
|
26 |
| - | ^^^^^^^ help: remove this `mut`: `&42` |
| 43 | + | ^^^^^^^ |
| 44 | + | |
| 45 | +help: remove this `mut` |
| 46 | + | |
| 47 | +LL - takes_raw_const(&mut 42); |
| 48 | +LL + takes_raw_const(&42); |
| 49 | + | |
27 | 50 |
|
28 | 51 | error: the function `as_ptr` doesn't need a mutable reference
|
29 |
| - --> tests/ui/unnecessary_mut_passed.rs:66:12 |
| 52 | + --> tests/ui/unnecessary_mut_passed.rs:67:12 |
30 | 53 | |
|
31 | 54 | LL | as_ptr(&mut 42);
|
32 |
| - | ^^^^^^^ help: remove this `mut`: `&42` |
| 55 | + | ^^^^^^^ |
| 56 | + | |
| 57 | +help: remove this `mut` |
| 58 | + | |
| 59 | +LL - as_ptr(&mut 42); |
| 60 | +LL + as_ptr(&42); |
| 61 | + | |
33 | 62 |
|
34 | 63 | error: the function `as_ptr` doesn't need a mutable reference
|
35 |
| - --> tests/ui/unnecessary_mut_passed.rs:69:12 |
| 64 | + --> tests/ui/unnecessary_mut_passed.rs:70:12 |
36 | 65 | |
|
37 | 66 | LL | as_ptr(&mut &42);
|
38 |
| - | ^^^^^^^^ help: remove this `mut`: `&&42` |
| 67 | + | ^^^^^^^^ |
| 68 | + | |
| 69 | +help: remove this `mut` |
| 70 | + | |
| 71 | +LL - as_ptr(&mut &42); |
| 72 | +LL + as_ptr(&&42); |
| 73 | + | |
39 | 74 |
|
40 | 75 | error: the function `as_ptr` doesn't need a mutable reference
|
41 |
| - --> tests/ui/unnecessary_mut_passed.rs:72:12 |
| 76 | + --> tests/ui/unnecessary_mut_passed.rs:73:12 |
42 | 77 | |
|
43 | 78 | LL | as_ptr(&mut &mut 42);
|
44 |
| - | ^^^^^^^^^^^^ help: remove this `mut`: `&&mut 42` |
| 79 | + | ^^^^^^^^^^^^ |
| 80 | + | |
| 81 | +help: remove this `mut` |
| 82 | + | |
| 83 | +LL - as_ptr(&mut &mut 42); |
| 84 | +LL + as_ptr(&&mut 42); |
| 85 | + | |
45 | 86 |
|
46 | 87 | error: the function `as_ptr` doesn't need a mutable reference
|
47 |
| - --> tests/ui/unnecessary_mut_passed.rs:75:12 |
| 88 | + --> tests/ui/unnecessary_mut_passed.rs:76:12 |
48 | 89 | |
|
49 | 90 | LL | as_ptr(&mut 42);
|
50 |
| - | ^^^^^^^ help: remove this `mut`: `&42` |
| 91 | + | ^^^^^^^ |
| 92 | + | |
| 93 | +help: remove this `mut` |
| 94 | + | |
| 95 | +LL - as_ptr(&mut 42); |
| 96 | +LL + as_ptr(&42); |
| 97 | + | |
51 | 98 |
|
52 | 99 | error: the method `takes_ref` doesn't need a mutable reference
|
53 |
| - --> tests/ui/unnecessary_mut_passed.rs:80:25 |
| 100 | + --> tests/ui/unnecessary_mut_passed.rs:81:25 |
54 | 101 | |
|
55 | 102 | LL | my_struct.takes_ref(&mut 42);
|
56 |
| - | ^^^^^^^ help: remove this `mut`: `&42` |
| 103 | + | ^^^^^^^ |
| 104 | + | |
| 105 | +help: remove this `mut` |
| 106 | + | |
| 107 | +LL - my_struct.takes_ref(&mut 42); |
| 108 | +LL + my_struct.takes_ref(&42); |
| 109 | + | |
57 | 110 |
|
58 | 111 | error: the method `takes_ref_ref` doesn't need a mutable reference
|
59 |
| - --> tests/ui/unnecessary_mut_passed.rs:82:29 |
| 112 | + --> tests/ui/unnecessary_mut_passed.rs:83:29 |
60 | 113 | |
|
61 | 114 | LL | my_struct.takes_ref_ref(&mut &42);
|
62 |
| - | ^^^^^^^^ help: remove this `mut`: `&&42` |
| 115 | + | ^^^^^^^^ |
| 116 | + | |
| 117 | +help: remove this `mut` |
| 118 | + | |
| 119 | +LL - my_struct.takes_ref_ref(&mut &42); |
| 120 | +LL + my_struct.takes_ref_ref(&&42); |
| 121 | + | |
63 | 122 |
|
64 | 123 | error: the method `takes_ref_refmut` doesn't need a mutable reference
|
65 |
| - --> tests/ui/unnecessary_mut_passed.rs:84:32 |
| 124 | + --> tests/ui/unnecessary_mut_passed.rs:85:32 |
66 | 125 | |
|
67 | 126 | LL | my_struct.takes_ref_refmut(&mut &mut 42);
|
68 |
| - | ^^^^^^^^^^^^ help: remove this `mut`: `&&mut 42` |
| 127 | + | ^^^^^^^^^^^^ |
| 128 | + | |
| 129 | +help: remove this `mut` |
| 130 | + | |
| 131 | +LL - my_struct.takes_ref_refmut(&mut &mut 42); |
| 132 | +LL + my_struct.takes_ref_refmut(&&mut 42); |
| 133 | + | |
69 | 134 |
|
70 | 135 | error: the method `takes_raw_const` doesn't need a mutable reference
|
71 |
| - --> tests/ui/unnecessary_mut_passed.rs:86:31 |
| 136 | + --> tests/ui/unnecessary_mut_passed.rs:87:31 |
72 | 137 | |
|
73 | 138 | LL | my_struct.takes_raw_const(&mut 42);
|
74 |
| - | ^^^^^^^ help: remove this `mut`: `&42` |
| 139 | + | ^^^^^^^ |
| 140 | + | |
| 141 | +help: remove this `mut` |
| 142 | + | |
| 143 | +LL - my_struct.takes_raw_const(&mut 42); |
| 144 | +LL + my_struct.takes_raw_const(&42); |
| 145 | + | |
| 146 | + |
| 147 | +error: the method `takes_nothing` doesn't need a mutable reference |
| 148 | + --> tests/ui/unnecessary_mut_passed.rs:175:5 |
| 149 | + | |
| 150 | +LL | (&mut my_struct).takes_nothing(); |
| 151 | + | ^^^^^^^^^^^^^^^^ |
| 152 | + | |
| 153 | +help: remove this `mut` |
| 154 | + | |
| 155 | +LL - (&mut my_struct).takes_nothing(); |
| 156 | +LL + (&my_struct).takes_nothing(); |
| 157 | + | |
| 158 | + |
| 159 | +error: the method `takes_ref` doesn't need a mutable reference |
| 160 | + --> tests/ui/unnecessary_mut_passed.rs:180:5 |
| 161 | + | |
| 162 | +LL | (&mut my_struct).takes_ref(&mut 42); |
| 163 | + | ^^^^^^^^^^^^^^^^ |
| 164 | + | |
| 165 | +help: remove this `mut` |
| 166 | + | |
| 167 | +LL - (&mut my_struct).takes_ref(&mut 42); |
| 168 | +LL + (&my_struct).takes_ref(&mut 42); |
| 169 | + | |
| 170 | + |
| 171 | +error: the method `takes_ref` doesn't need a mutable reference |
| 172 | + --> tests/ui/unnecessary_mut_passed.rs:180:32 |
| 173 | + | |
| 174 | +LL | (&mut my_struct).takes_ref(&mut 42); |
| 175 | + | ^^^^^^^ |
| 176 | + | |
| 177 | +help: remove this `mut` |
| 178 | + | |
| 179 | +LL - (&mut my_struct).takes_ref(&mut 42); |
| 180 | +LL + (&mut my_struct).takes_ref(&42); |
| 181 | + | |
| 182 | + |
| 183 | +error: the method `takes_ref` doesn't need a mutable reference |
| 184 | + --> tests/ui/unnecessary_mut_passed.rs:184:5 |
| 185 | + | |
| 186 | +LL | (&mut my_struct).takes_ref((&mut 42)); |
| 187 | + | ^^^^^^^^^^^^^^^^ |
| 188 | + | |
| 189 | +help: remove this `mut` |
| 190 | + | |
| 191 | +LL - (&mut my_struct).takes_ref((&mut 42)); |
| 192 | +LL + (&my_struct).takes_ref((&mut 42)); |
| 193 | + | |
| 194 | + |
| 195 | +error: the method `takes_ref` doesn't need a mutable reference |
| 196 | + --> tests/ui/unnecessary_mut_passed.rs:184:32 |
| 197 | + | |
| 198 | +LL | (&mut my_struct).takes_ref((&mut 42)); |
| 199 | + | ^^^^^^^^^ |
| 200 | + | |
| 201 | +help: remove this `mut` |
| 202 | + | |
| 203 | +LL - (&mut my_struct).takes_ref((&mut 42)); |
| 204 | +LL + (&mut my_struct).takes_ref((&42)); |
| 205 | + | |
| 206 | + |
| 207 | +error: the method `takes_ref` doesn't need a mutable reference |
| 208 | + --> tests/ui/unnecessary_mut_passed.rs:188:25 |
| 209 | + | |
| 210 | +LL | my_struct.takes_ref((&mut 42)); |
| 211 | + | ^^^^^^^^^ |
| 212 | + | |
| 213 | +help: remove this `mut` |
| 214 | + | |
| 215 | +LL - my_struct.takes_ref((&mut 42)); |
| 216 | +LL + my_struct.takes_ref((&42)); |
| 217 | + | |
75 | 218 |
|
76 |
| -error: aborting due to 12 previous errors |
| 219 | +error: aborting due to 18 previous errors |
77 | 220 |
|
0 commit comments