@@ -108,109 +108,103 @@ LL | async fn inner_async3(x: &mut i32, y: &mut u32) {
108
108
| ^^^^^^^^ help: consider changing to: `&i32`
109
109
110
110
error: 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
112
112
|
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`
117
115
118
116
error: 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
123
118
|
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`
125
121
126
122
error: 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
131
124
|
132
- = warning: changing this function will impact semver compatibility
125
+ LL | async fn closure4(n: &mut usize) {
126
+ | ^^^^^^^^^^ help: consider changing to: `&usize`
133
127
134
128
error: 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
136
130
|
137
131
LL | fn bar(&mut self) {}
138
132
| ^^^^^^^^^ help: consider changing to: `&self`
139
133
140
134
error: 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
142
136
|
143
137
LL | async fn foo(&mut self, u: &mut i32, v: &mut u32) {
144
138
| ^^^^^^^^^ help: consider changing to: `&self`
145
139
146
140
error: 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
148
142
|
149
143
LL | async fn foo(&mut self, u: &mut i32, v: &mut u32) {
150
144
| ^^^^^^^^ help: consider changing to: `&u32`
151
145
152
146
error: 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
154
148
|
155
149
LL | async fn foo2(&mut self, u: &mut i32, v: &mut u32) {
156
150
| ^^^^^^^^ help: consider changing to: `&u32`
157
151
158
152
error: 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
160
154
|
161
155
LL | fn _empty_tup(x: &mut (())) {}
162
156
| ^^^^^^^^^ help: consider changing to: `&()`
163
157
164
158
error: 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
166
160
|
167
161
LL | fn _single_tup(x: &mut ((i32,))) {}
168
162
| ^^^^^^^^^^^^^ help: consider changing to: `&(i32,)`
169
163
170
164
error: 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
172
166
|
173
167
LL | fn _multi_tup(x: &mut ((i32, u32))) {}
174
168
| ^^^^^^^^^^^^^^^^^ help: consider changing to: `&(i32, u32)`
175
169
176
170
error: 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
178
172
|
179
173
LL | fn _fn(x: &mut (fn())) {}
180
174
| ^^^^^^^^^^^ help: consider changing to: `&fn()`
181
175
182
176
error: 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
184
178
|
185
179
LL | fn _extern_rust_fn(x: &mut extern "Rust" fn()) {}
186
180
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "Rust" fn()`
187
181
188
182
error: 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
190
184
|
191
185
LL | fn _extern_c_fn(x: &mut extern "C" fn()) {}
192
186
| ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "C" fn()`
193
187
194
188
error: 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
196
190
|
197
191
LL | fn _unsafe_fn(x: &mut unsafe fn()) {}
198
192
| ^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe fn()`
199
193
200
194
error: 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
202
196
|
203
197
LL | fn _unsafe_extern_fn(x: &mut unsafe extern "C" fn()) {}
204
198
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn()`
205
199
206
200
error: 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
208
202
|
209
203
LL | fn _fn_with_arg(x: &mut unsafe extern "C" fn(i32)) {}
210
204
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn(i32)`
211
205
212
206
error: 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
214
208
|
215
209
LL | fn _fn_with_ret(x: &mut unsafe extern "C" fn() -> (i32)) {}
216
210
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn() -> (i32)`
0 commit comments