11error: this argument is a mutable reference, but not used mutably
2- --> tests/ui/needless_pass_by_ref_mut.rs:14 :11
2+ --> tests/ui/needless_pass_by_ref_mut.rs:12 :11
33 |
44LL | fn foo(s: &mut Vec<u32>, b: &u32, x: &mut u32) {
55 | ^^^^^^^^^^^^^ help: consider changing to: `&Vec<u32>`
@@ -8,203 +8,203 @@ LL | fn foo(s: &mut Vec<u32>, b: &u32, x: &mut u32) {
88 = help: to override `-D warnings` add `#[allow(clippy::needless_pass_by_ref_mut)]`
99
1010error: this argument is a mutable reference, but not used mutably
11- --> tests/ui/needless_pass_by_ref_mut.rs:40 :12
11+ --> tests/ui/needless_pass_by_ref_mut.rs:38 :12
1212 |
1313LL | fn foo6(s: &mut Vec<u32>) {
1414 | ^^^^^^^^^^^^^ help: consider changing to: `&Vec<u32>`
1515
1616error: this argument is a mutable reference, but not used mutably
17- --> tests/ui/needless_pass_by_ref_mut.rs:51 :12
17+ --> tests/ui/needless_pass_by_ref_mut.rs:49 :12
1818 |
1919LL | fn bar(&mut self) {}
2020 | ^^^^^^^^^ help: consider changing to: `&self`
2121
2222error: this argument is a mutable reference, but not used mutably
23- --> tests/ui/needless_pass_by_ref_mut.rs:54 :29
23+ --> tests/ui/needless_pass_by_ref_mut.rs:52 :29
2424 |
2525LL | fn mushroom(&self, vec: &mut Vec<i32>) -> usize {
2626 | ^^^^^^^^^^^^^ help: consider changing to: `&Vec<i32>`
2727
2828error: this argument is a mutable reference, but not used mutably
29- --> tests/ui/needless_pass_by_ref_mut.rs:132 :16
29+ --> tests/ui/needless_pass_by_ref_mut.rs:130 :16
3030 |
3131LL | async fn a1(x: &mut i32) {
3232 | ^^^^^^^^ help: consider changing to: `&i32`
3333
3434error: this argument is a mutable reference, but not used mutably
35- --> tests/ui/needless_pass_by_ref_mut.rs:137 :16
35+ --> tests/ui/needless_pass_by_ref_mut.rs:135 :16
3636 |
3737LL | async fn a2(x: &mut i32, y: String) {
3838 | ^^^^^^^^ help: consider changing to: `&i32`
3939
4040error: this argument is a mutable reference, but not used mutably
41- --> tests/ui/needless_pass_by_ref_mut.rs:142 :16
41+ --> tests/ui/needless_pass_by_ref_mut.rs:140 :16
4242 |
4343LL | async fn a3(x: &mut i32, y: String, z: String) {
4444 | ^^^^^^^^ help: consider changing to: `&i32`
4545
4646error: this argument is a mutable reference, but not used mutably
47- --> tests/ui/needless_pass_by_ref_mut.rs:147 :16
47+ --> tests/ui/needless_pass_by_ref_mut.rs:145 :16
4848 |
4949LL | async fn a4(x: &mut i32, y: i32) {
5050 | ^^^^^^^^ help: consider changing to: `&i32`
5151
5252error: this argument is a mutable reference, but not used mutably
53- --> tests/ui/needless_pass_by_ref_mut.rs:152 :24
53+ --> tests/ui/needless_pass_by_ref_mut.rs:150 :24
5454 |
5555LL | async fn a5(x: i32, y: &mut i32) {
5656 | ^^^^^^^^ help: consider changing to: `&i32`
5757
5858error: this argument is a mutable reference, but not used mutably
59- --> tests/ui/needless_pass_by_ref_mut.rs:157 :24
59+ --> tests/ui/needless_pass_by_ref_mut.rs:155 :24
6060 |
6161LL | async fn a6(x: i32, y: &mut i32) {
6262 | ^^^^^^^^ help: consider changing to: `&i32`
6363
6464error: this argument is a mutable reference, but not used mutably
65- --> tests/ui/needless_pass_by_ref_mut.rs:162 :32
65+ --> tests/ui/needless_pass_by_ref_mut.rs:160 :32
6666 |
6767LL | async fn a7(x: i32, y: i32, z: &mut i32) {
6868 | ^^^^^^^^ help: consider changing to: `&i32`
6969
7070error: this argument is a mutable reference, but not used mutably
71- --> tests/ui/needless_pass_by_ref_mut.rs:167 :24
71+ --> tests/ui/needless_pass_by_ref_mut.rs:165 :24
7272 |
7373LL | async fn a8(x: i32, a: &mut i32, y: i32, z: &mut i32) {
7474 | ^^^^^^^^ help: consider changing to: `&i32`
7575
7676error: this argument is a mutable reference, but not used mutably
77- --> tests/ui/needless_pass_by_ref_mut.rs:167 :45
77+ --> tests/ui/needless_pass_by_ref_mut.rs:165 :45
7878 |
7979LL | async fn a8(x: i32, a: &mut i32, y: i32, z: &mut i32) {
8080 | ^^^^^^^^ help: consider changing to: `&i32`
8181
8282error: this argument is a mutable reference, but not used mutably
83- --> tests/ui/needless_pass_by_ref_mut.rs:203 :16
83+ --> tests/ui/needless_pass_by_ref_mut.rs:201 :16
8484 |
8585LL | fn cfg_warn(s: &mut u32) {}
8686 | ^^^^^^^^ help: consider changing to: `&u32`
8787 |
8888 = note: this is cfg-gated and may require further changes
8989
9090error: this argument is a mutable reference, but not used mutably
91- --> tests/ui/needless_pass_by_ref_mut.rs:208 :20
91+ --> tests/ui/needless_pass_by_ref_mut.rs:206 :20
9292 |
9393LL | fn cfg_warn(s: &mut u32) {}
9494 | ^^^^^^^^ help: consider changing to: `&u32`
9595 |
9696 = note: this is cfg-gated and may require further changes
9797
9898error: this argument is a mutable reference, but not used mutably
99- --> tests/ui/needless_pass_by_ref_mut.rs:221 :39
99+ --> tests/ui/needless_pass_by_ref_mut.rs:219 :39
100100 |
101101LL | async fn inner_async2(x: &mut i32, y: &mut u32) {
102102 | ^^^^^^^^ help: consider changing to: `&u32`
103103
104104error: this argument is a mutable reference, but not used mutably
105- --> tests/ui/needless_pass_by_ref_mut.rs:230 :26
105+ --> tests/ui/needless_pass_by_ref_mut.rs:228 :26
106106 |
107107LL | async fn inner_async3(x: &mut i32, y: &mut u32) {
108108 | ^^^^^^^^ help: consider changing to: `&i32`
109109
110110error: this argument is a mutable reference, but not used mutably
111- --> tests/ui/needless_pass_by_ref_mut.rs:250 :30
111+ --> tests/ui/needless_pass_by_ref_mut.rs:248 :30
112112 |
113113LL | async fn call_in_closure1(n: &mut str) {
114114 | ^^^^^^^^ help: consider changing to: `&str`
115115
116116error: this argument is a mutable reference, but not used mutably
117- --> tests/ui/needless_pass_by_ref_mut.rs:270 :16
117+ --> tests/ui/needless_pass_by_ref_mut.rs:268 :16
118118 |
119119LL | fn closure2(n: &mut usize) -> impl '_ + FnMut() -> usize {
120120 | ^^^^^^^^^^ help: consider changing to: `&usize`
121121
122122error: this argument is a mutable reference, but not used mutably
123- --> tests/ui/needless_pass_by_ref_mut.rs:282 :22
123+ --> tests/ui/needless_pass_by_ref_mut.rs:280 :22
124124 |
125125LL | async fn closure4(n: &mut usize) {
126126 | ^^^^^^^^^^ help: consider changing to: `&usize`
127127
128128error: this argument is a mutable reference, but not used mutably
129- --> tests/ui/needless_pass_by_ref_mut.rs:337 :12
129+ --> tests/ui/needless_pass_by_ref_mut.rs:335 :12
130130 |
131131LL | fn bar(&mut self) {}
132132 | ^^^^^^^^^ help: consider changing to: `&self`
133133
134134error: this argument is a mutable reference, but not used mutably
135- --> tests/ui/needless_pass_by_ref_mut.rs:340 :18
135+ --> tests/ui/needless_pass_by_ref_mut.rs:338 :18
136136 |
137137LL | async fn foo(&mut self, u: &mut i32, v: &mut u32) {
138138 | ^^^^^^^^^ help: consider changing to: `&self`
139139
140140error: this argument is a mutable reference, but not used mutably
141- --> tests/ui/needless_pass_by_ref_mut.rs:340 :45
141+ --> tests/ui/needless_pass_by_ref_mut.rs:338 :45
142142 |
143143LL | async fn foo(&mut self, u: &mut i32, v: &mut u32) {
144144 | ^^^^^^^^ help: consider changing to: `&u32`
145145
146146error: this argument is a mutable reference, but not used mutably
147- --> tests/ui/needless_pass_by_ref_mut.rs:349 :46
147+ --> tests/ui/needless_pass_by_ref_mut.rs:347 :46
148148 |
149149LL | async fn foo2(&mut self, u: &mut i32, v: &mut u32) {
150150 | ^^^^^^^^ help: consider changing to: `&u32`
151151
152152error: this argument is a mutable reference, but not used mutably
153- --> tests/ui/needless_pass_by_ref_mut.rs:366 :18
153+ --> tests/ui/needless_pass_by_ref_mut.rs:364 :18
154154 |
155155LL | fn _empty_tup(x: &mut (())) {}
156156 | ^^^^^^^^^ help: consider changing to: `&()`
157157
158158error: this argument is a mutable reference, but not used mutably
159- --> tests/ui/needless_pass_by_ref_mut.rs:368 :19
159+ --> tests/ui/needless_pass_by_ref_mut.rs:366 :19
160160 |
161161LL | fn _single_tup(x: &mut ((i32,))) {}
162162 | ^^^^^^^^^^^^^ help: consider changing to: `&(i32,)`
163163
164164error: this argument is a mutable reference, but not used mutably
165- --> tests/ui/needless_pass_by_ref_mut.rs:370 :18
165+ --> tests/ui/needless_pass_by_ref_mut.rs:368 :18
166166 |
167167LL | fn _multi_tup(x: &mut ((i32, u32))) {}
168168 | ^^^^^^^^^^^^^^^^^ help: consider changing to: `&(i32, u32)`
169169
170170error: this argument is a mutable reference, but not used mutably
171- --> tests/ui/needless_pass_by_ref_mut.rs:372 :11
171+ --> tests/ui/needless_pass_by_ref_mut.rs:370 :11
172172 |
173173LL | fn _fn(x: &mut (fn())) {}
174174 | ^^^^^^^^^^^ help: consider changing to: `&fn()`
175175
176176error: this argument is a mutable reference, but not used mutably
177- --> tests/ui/needless_pass_by_ref_mut.rs:375 :23
177+ --> tests/ui/needless_pass_by_ref_mut.rs:373 :23
178178 |
179179LL | fn _extern_rust_fn(x: &mut extern "Rust" fn()) {}
180180 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "Rust" fn()`
181181
182182error: this argument is a mutable reference, but not used mutably
183- --> tests/ui/needless_pass_by_ref_mut.rs:377 :20
183+ --> tests/ui/needless_pass_by_ref_mut.rs:375 :20
184184 |
185185LL | fn _extern_c_fn(x: &mut extern "C" fn()) {}
186186 | ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "C" fn()`
187187
188188error: this argument is a mutable reference, but not used mutably
189- --> tests/ui/needless_pass_by_ref_mut.rs:379 :18
189+ --> tests/ui/needless_pass_by_ref_mut.rs:377 :18
190190 |
191191LL | fn _unsafe_fn(x: &mut unsafe fn()) {}
192192 | ^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe fn()`
193193
194194error: this argument is a mutable reference, but not used mutably
195- --> tests/ui/needless_pass_by_ref_mut.rs:381 :25
195+ --> tests/ui/needless_pass_by_ref_mut.rs:379 :25
196196 |
197197LL | fn _unsafe_extern_fn(x: &mut unsafe extern "C" fn()) {}
198198 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn()`
199199
200200error: this argument is a mutable reference, but not used mutably
201- --> tests/ui/needless_pass_by_ref_mut.rs:383 :20
201+ --> tests/ui/needless_pass_by_ref_mut.rs:381 :20
202202 |
203203LL | fn _fn_with_arg(x: &mut unsafe extern "C" fn(i32)) {}
204204 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn(i32)`
205205
206206error: this argument is a mutable reference, but not used mutably
207- --> tests/ui/needless_pass_by_ref_mut.rs:385 :20
207+ --> tests/ui/needless_pass_by_ref_mut.rs:383 :20
208208 |
209209LL | fn _fn_with_ret(x: &mut unsafe extern "C" fn() -> (i32)) {}
210210 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn() -> (i32)`
0 commit comments