@@ -14,190 +14,206 @@ LL | 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:50:29
17+ --> tests/ui/needless_pass_by_ref_mut.rs:47:12
1818 |
19- LL | fn mushroom(&self, vec: & mut Vec<i32>) -> usize {
20- | ^^^^^^^^^^^^^ help: consider changing to: `&Vec<i32> `
19+ LL | fn bar(& mut self) {}
20+ | ^^^^^^^^^ 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:55:31
23+ --> tests/ui/needless_pass_by_ref_mut.rs:50:29
2424 |
25- LL | fn badger(&mut self, vec: &mut Vec<i32>) -> usize {
26- | ^^^^^^^^^^^^^ help: consider changing to: `&Vec<i32>`
25+ LL | fn mushroom(& self, vec: &mut Vec<i32>) -> usize {
26+ | ^^^^^^^^^^^^^ 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:127 :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:136 :16
35+ --> tests/ui/needless_pass_by_ref_mut.rs:131 :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:140 :16
41+ --> tests/ui/needless_pass_by_ref_mut.rs:135 :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:144 :16
47+ --> tests/ui/needless_pass_by_ref_mut.rs:139 :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:148 :24
53+ --> tests/ui/needless_pass_by_ref_mut.rs:143 :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:152 :24
59+ --> tests/ui/needless_pass_by_ref_mut.rs:147 :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:156 :32
65+ --> tests/ui/needless_pass_by_ref_mut.rs:151 :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:160 :24
71+ --> tests/ui/needless_pass_by_ref_mut.rs:155 :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:160 :45
77+ --> tests/ui/needless_pass_by_ref_mut.rs:155 :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:194 :16
83+ --> tests/ui/needless_pass_by_ref_mut.rs:189 :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:200 :20
91+ --> tests/ui/needless_pass_by_ref_mut.rs:195 :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:214 :39
99+ --> tests/ui/needless_pass_by_ref_mut.rs:209 :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:222 :26
105+ --> tests/ui/needless_pass_by_ref_mut.rs:217 :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:241 :34
111+ --> tests/ui/needless_pass_by_ref_mut.rs:236 :34
112112 |
113113LL | pub async fn call_in_closure1(n: &mut str) {
114114 | ^^^^^^^^ help: consider changing to: `&str`
115115 |
116116 = warning: changing this function will impact semver compatibility
117117
118118error: this argument is a mutable reference, but not used mutably
119- --> tests/ui/needless_pass_by_ref_mut.rs:253:25
120- |
121- LL | pub async fn closure(n: &mut usize) -> impl '_ + FnMut() {
122- | ^^^^^^^^^^ help: consider changing to: `&usize`
123- |
124- = warning: changing this function will impact semver compatibility
125-
126- error: this argument is a mutable reference, but not used mutably
127- --> tests/ui/needless_pass_by_ref_mut.rs:260:20
119+ --> tests/ui/needless_pass_by_ref_mut.rs:255:20
128120 |
129121LL | pub fn closure2(n: &mut usize) -> impl '_ + FnMut() -> usize {
130122 | ^^^^^^^^^^ help: consider changing to: `&usize`
131123 |
132124 = warning: changing this function will impact semver compatibility
133125
134126error: this argument is a mutable reference, but not used mutably
135- --> tests/ui/needless_pass_by_ref_mut.rs:271 :26
127+ --> tests/ui/needless_pass_by_ref_mut.rs:266 :26
136128 |
137129LL | pub async fn closure4(n: &mut usize) {
138130 | ^^^^^^^^^^ help: consider changing to: `&usize`
139131 |
140132 = warning: changing this function will impact semver compatibility
141133
142134error: this argument is a mutable reference, but not used mutably
143- --> tests/ui/needless_pass_by_ref_mut.rs:311:18
135+ --> tests/ui/needless_pass_by_ref_mut.rs:315:12
136+ |
137+ LL | fn bar(&mut self) {}
138+ | ^^^^^^^^^ help: consider changing to: `&self`
139+
140+ error: this argument is a mutable reference, but not used mutably
141+ --> tests/ui/needless_pass_by_ref_mut.rs:317:18
142+ |
143+ LL | async fn foo(&mut self, u: &mut i32, v: &mut u32) {
144+ | ^^^^^^^^^ help: consider changing to: `&self`
145+
146+ error: this argument is a mutable reference, but not used mutably
147+ --> tests/ui/needless_pass_by_ref_mut.rs:317:45
148+ |
149+ LL | async fn foo(&mut self, u: &mut i32, v: &mut u32) {
150+ | ^^^^^^^^ help: consider changing to: `&u32`
151+
152+ error: this argument is a mutable reference, but not used mutably
153+ --> tests/ui/needless_pass_by_ref_mut.rs:325:46
154+ |
155+ LL | async fn foo2(&mut self, u: &mut i32, v: &mut u32) {
156+ | ^^^^^^^^ help: consider changing to: `&u32`
157+
158+ error: this argument is a mutable reference, but not used mutably
159+ --> tests/ui/needless_pass_by_ref_mut.rs:341:18
144160 |
145161LL | fn _empty_tup(x: &mut (())) {}
146162 | ^^^^^^^^^ help: consider changing to: `&()`
147163
148164error: this argument is a mutable reference, but not used mutably
149- --> tests/ui/needless_pass_by_ref_mut.rs:312 :19
165+ --> tests/ui/needless_pass_by_ref_mut.rs:342 :19
150166 |
151167LL | fn _single_tup(x: &mut ((i32,))) {}
152168 | ^^^^^^^^^^^^^ help: consider changing to: `&(i32,)`
153169
154170error: this argument is a mutable reference, but not used mutably
155- --> tests/ui/needless_pass_by_ref_mut.rs:313 :18
171+ --> tests/ui/needless_pass_by_ref_mut.rs:343 :18
156172 |
157173LL | fn _multi_tup(x: &mut ((i32, u32))) {}
158174 | ^^^^^^^^^^^^^^^^^ help: consider changing to: `&(i32, u32)`
159175
160176error: this argument is a mutable reference, but not used mutably
161- --> tests/ui/needless_pass_by_ref_mut.rs:314 :11
177+ --> tests/ui/needless_pass_by_ref_mut.rs:344 :11
162178 |
163179LL | fn _fn(x: &mut (fn())) {}
164180 | ^^^^^^^^^^^ help: consider changing to: `&fn()`
165181
166182error: this argument is a mutable reference, but not used mutably
167- --> tests/ui/needless_pass_by_ref_mut.rs:316 :23
183+ --> tests/ui/needless_pass_by_ref_mut.rs:346 :23
168184 |
169185LL | fn _extern_rust_fn(x: &mut extern "Rust" fn()) {}
170186 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "Rust" fn()`
171187
172188error: this argument is a mutable reference, but not used mutably
173- --> tests/ui/needless_pass_by_ref_mut.rs:317 :20
189+ --> tests/ui/needless_pass_by_ref_mut.rs:347 :20
174190 |
175191LL | fn _extern_c_fn(x: &mut extern "C" fn()) {}
176192 | ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "C" fn()`
177193
178194error: this argument is a mutable reference, but not used mutably
179- --> tests/ui/needless_pass_by_ref_mut.rs:318 :18
195+ --> tests/ui/needless_pass_by_ref_mut.rs:348 :18
180196 |
181197LL | fn _unsafe_fn(x: &mut unsafe fn()) {}
182198 | ^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe fn()`
183199
184200error: this argument is a mutable reference, but not used mutably
185- --> tests/ui/needless_pass_by_ref_mut.rs:319 :25
201+ --> tests/ui/needless_pass_by_ref_mut.rs:349 :25
186202 |
187203LL | fn _unsafe_extern_fn(x: &mut unsafe extern "C" fn()) {}
188204 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn()`
189205
190206error: this argument is a mutable reference, but not used mutably
191- --> tests/ui/needless_pass_by_ref_mut.rs:320 :20
207+ --> tests/ui/needless_pass_by_ref_mut.rs:350 :20
192208 |
193209LL | fn _fn_with_arg(x: &mut unsafe extern "C" fn(i32)) {}
194210 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn(i32)`
195211
196212error: this argument is a mutable reference, but not used mutably
197- --> tests/ui/needless_pass_by_ref_mut.rs:321 :20
213+ --> tests/ui/needless_pass_by_ref_mut.rs:351 :20
198214 |
199215LL | fn _fn_with_ret(x: &mut unsafe extern "C" fn() -> (i32)) {}
200216 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn() -> (i32)`
201217
202- error: aborting due to 31 previous errors
218+ error: aborting due to 34 previous errors
203219
0 commit comments