@@ -108,109 +108,103 @@ LL | 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:235:34
111+ --> tests/ui/needless_pass_by_ref_mut.rs:235:30
112112 |
113- LL | pub async fn call_in_closure1(n: &mut str) {
114- | ^^^^^^^^ help: consider changing to: `&str`
115- |
116- = warning: changing this function will impact semver compatibility
113+ LL | async fn call_in_closure1(n: &mut str) {
114+ | ^^^^^^^^ help: consider changing to: `&str`
117115
118116error: this argument is a mutable reference, but not used mutably
119- --> tests/ui/needless_pass_by_ref_mut.rs:254:20
120- |
121- LL | pub fn closure2(n: &mut usize) -> impl '_ + FnMut() -> usize {
122- | ^^^^^^^^^^ help: consider changing to: `&usize`
117+ --> tests/ui/needless_pass_by_ref_mut.rs:254:16
123118 |
124- = warning: changing this function will impact semver compatibility
119+ LL | fn closure2(n: &mut usize) -> impl '_ + FnMut() -> usize {
120+ | ^^^^^^^^^^ help: consider changing to: `&usize`
125121
126122error: this argument is a mutable reference, but not used mutably
127- --> tests/ui/needless_pass_by_ref_mut.rs:265:26
128- |
129- LL | pub async fn closure4(n: &mut usize) {
130- | ^^^^^^^^^^ help: consider changing to: `&usize`
123+ --> tests/ui/needless_pass_by_ref_mut.rs:265:22
131124 |
132- = warning: changing this function will impact semver compatibility
125+ LL | async fn closure4(n: &mut usize) {
126+ | ^^^^^^^^^^ help: consider changing to: `&usize`
133127
134128error: this argument is a mutable reference, but not used mutably
135- --> tests/ui/needless_pass_by_ref_mut.rs:314 :12
129+ --> tests/ui/needless_pass_by_ref_mut.rs:319 :12
136130 |
137131LL | fn bar(&mut self) {}
138132 | ^^^^^^^^^ help: consider changing to: `&self`
139133
140134error: this argument is a mutable reference, but not used mutably
141- --> tests/ui/needless_pass_by_ref_mut.rs:316 :18
135+ --> tests/ui/needless_pass_by_ref_mut.rs:321 :18
142136 |
143137LL | async fn foo(&mut self, u: &mut i32, v: &mut u32) {
144138 | ^^^^^^^^^ help: consider changing to: `&self`
145139
146140error: this argument is a mutable reference, but not used mutably
147- --> tests/ui/needless_pass_by_ref_mut.rs:316 :45
141+ --> tests/ui/needless_pass_by_ref_mut.rs:321 :45
148142 |
149143LL | async fn foo(&mut self, u: &mut i32, v: &mut u32) {
150144 | ^^^^^^^^ help: consider changing to: `&u32`
151145
152146error: this argument is a mutable reference, but not used mutably
153- --> tests/ui/needless_pass_by_ref_mut.rs:324 :46
147+ --> tests/ui/needless_pass_by_ref_mut.rs:329 :46
154148 |
155149LL | async fn foo2(&mut self, u: &mut i32, v: &mut u32) {
156150 | ^^^^^^^^ help: consider changing to: `&u32`
157151
158152error: this argument is a mutable reference, but not used mutably
159- --> tests/ui/needless_pass_by_ref_mut.rs:340 :18
153+ --> tests/ui/needless_pass_by_ref_mut.rs:345 :18
160154 |
161155LL | fn _empty_tup(x: &mut (())) {}
162156 | ^^^^^^^^^ help: consider changing to: `&()`
163157
164158error: this argument is a mutable reference, but not used mutably
165- --> tests/ui/needless_pass_by_ref_mut.rs:341 :19
159+ --> tests/ui/needless_pass_by_ref_mut.rs:346 :19
166160 |
167161LL | fn _single_tup(x: &mut ((i32,))) {}
168162 | ^^^^^^^^^^^^^ help: consider changing to: `&(i32,)`
169163
170164error: this argument is a mutable reference, but not used mutably
171- --> tests/ui/needless_pass_by_ref_mut.rs:342 :18
165+ --> tests/ui/needless_pass_by_ref_mut.rs:347 :18
172166 |
173167LL | fn _multi_tup(x: &mut ((i32, u32))) {}
174168 | ^^^^^^^^^^^^^^^^^ help: consider changing to: `&(i32, u32)`
175169
176170error: this argument is a mutable reference, but not used mutably
177- --> tests/ui/needless_pass_by_ref_mut.rs:343 :11
171+ --> tests/ui/needless_pass_by_ref_mut.rs:348 :11
178172 |
179173LL | fn _fn(x: &mut (fn())) {}
180174 | ^^^^^^^^^^^ help: consider changing to: `&fn()`
181175
182176error: this argument is a mutable reference, but not used mutably
183- --> tests/ui/needless_pass_by_ref_mut.rs:345 :23
177+ --> tests/ui/needless_pass_by_ref_mut.rs:350 :23
184178 |
185179LL | fn _extern_rust_fn(x: &mut extern "Rust" fn()) {}
186180 | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "Rust" fn()`
187181
188182error: this argument is a mutable reference, but not used mutably
189- --> tests/ui/needless_pass_by_ref_mut.rs:346 :20
183+ --> tests/ui/needless_pass_by_ref_mut.rs:351 :20
190184 |
191185LL | fn _extern_c_fn(x: &mut extern "C" fn()) {}
192186 | ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "C" fn()`
193187
194188error: this argument is a mutable reference, but not used mutably
195- --> tests/ui/needless_pass_by_ref_mut.rs:347 :18
189+ --> tests/ui/needless_pass_by_ref_mut.rs:352 :18
196190 |
197191LL | fn _unsafe_fn(x: &mut unsafe fn()) {}
198192 | ^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe fn()`
199193
200194error: this argument is a mutable reference, but not used mutably
201- --> tests/ui/needless_pass_by_ref_mut.rs:348 :25
195+ --> tests/ui/needless_pass_by_ref_mut.rs:353 :25
202196 |
203197LL | fn _unsafe_extern_fn(x: &mut unsafe extern "C" fn()) {}
204198 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn()`
205199
206200error: this argument is a mutable reference, but not used mutably
207- --> tests/ui/needless_pass_by_ref_mut.rs:349 :20
201+ --> tests/ui/needless_pass_by_ref_mut.rs:354 :20
208202 |
209203LL | fn _fn_with_arg(x: &mut unsafe extern "C" fn(i32)) {}
210204 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn(i32)`
211205
212206error: this argument is a mutable reference, but not used mutably
213- --> tests/ui/needless_pass_by_ref_mut.rs:350 :20
207+ --> tests/ui/needless_pass_by_ref_mut.rs:355 :20
214208 |
215209LL | fn _fn_with_ret(x: &mut unsafe extern "C" fn() -> (i32)) {}
216210 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn() -> (i32)`
0 commit comments