@@ -14,190 +14,206 @@ LL | fn foo6(s: &mut Vec<u32>) {
14
14
| ^^^^^^^^^^^^^ help: consider changing to: `&Vec<u32>`
15
15
16
16
error: 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
18
18
|
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 `
21
21
22
22
error: 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
24
24
|
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>`
27
27
28
28
error: 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
30
30
|
31
31
LL | async fn a1(x: &mut i32) {
32
32
| ^^^^^^^^ help: consider changing to: `&i32`
33
33
34
34
error: 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
36
36
|
37
37
LL | async fn a2(x: &mut i32, y: String) {
38
38
| ^^^^^^^^ help: consider changing to: `&i32`
39
39
40
40
error: 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
42
42
|
43
43
LL | async fn a3(x: &mut i32, y: String, z: String) {
44
44
| ^^^^^^^^ help: consider changing to: `&i32`
45
45
46
46
error: 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
48
48
|
49
49
LL | async fn a4(x: &mut i32, y: i32) {
50
50
| ^^^^^^^^ help: consider changing to: `&i32`
51
51
52
52
error: 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
54
54
|
55
55
LL | async fn a5(x: i32, y: &mut i32) {
56
56
| ^^^^^^^^ help: consider changing to: `&i32`
57
57
58
58
error: 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
60
60
|
61
61
LL | async fn a6(x: i32, y: &mut i32) {
62
62
| ^^^^^^^^ help: consider changing to: `&i32`
63
63
64
64
error: 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
66
66
|
67
67
LL | async fn a7(x: i32, y: i32, z: &mut i32) {
68
68
| ^^^^^^^^ help: consider changing to: `&i32`
69
69
70
70
error: 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
72
72
|
73
73
LL | async fn a8(x: i32, a: &mut i32, y: i32, z: &mut i32) {
74
74
| ^^^^^^^^ help: consider changing to: `&i32`
75
75
76
76
error: 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
78
78
|
79
79
LL | async fn a8(x: i32, a: &mut i32, y: i32, z: &mut i32) {
80
80
| ^^^^^^^^ help: consider changing to: `&i32`
81
81
82
82
error: 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
84
84
|
85
85
LL | fn cfg_warn(s: &mut u32) {}
86
86
| ^^^^^^^^ help: consider changing to: `&u32`
87
87
|
88
88
= note: this is cfg-gated and may require further changes
89
89
90
90
error: 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
92
92
|
93
93
LL | fn cfg_warn(s: &mut u32) {}
94
94
| ^^^^^^^^ help: consider changing to: `&u32`
95
95
|
96
96
= note: this is cfg-gated and may require further changes
97
97
98
98
error: 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
100
100
|
101
101
LL | async fn inner_async2(x: &mut i32, y: &mut u32) {
102
102
| ^^^^^^^^ help: consider changing to: `&u32`
103
103
104
104
error: 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
106
106
|
107
107
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:241 :34
111
+ --> tests/ui/needless_pass_by_ref_mut.rs:236 :34
112
112
|
113
113
LL | pub async fn call_in_closure1(n: &mut str) {
114
114
| ^^^^^^^^ help: consider changing to: `&str`
115
115
|
116
116
= warning: changing this function will impact semver compatibility
117
117
118
118
error: 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
128
120
|
129
121
LL | pub fn closure2(n: &mut usize) -> impl '_ + FnMut() -> usize {
130
122
| ^^^^^^^^^^ help: consider changing to: `&usize`
131
123
|
132
124
= warning: changing this function will impact semver compatibility
133
125
134
126
error: 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
136
128
|
137
129
LL | pub async fn closure4(n: &mut usize) {
138
130
| ^^^^^^^^^^ help: consider changing to: `&usize`
139
131
|
140
132
= warning: changing this function will impact semver compatibility
141
133
142
134
error: 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
144
160
|
145
161
LL | fn _empty_tup(x: &mut (())) {}
146
162
| ^^^^^^^^^ help: consider changing to: `&()`
147
163
148
164
error: 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
150
166
|
151
167
LL | fn _single_tup(x: &mut ((i32,))) {}
152
168
| ^^^^^^^^^^^^^ help: consider changing to: `&(i32,)`
153
169
154
170
error: 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
156
172
|
157
173
LL | fn _multi_tup(x: &mut ((i32, u32))) {}
158
174
| ^^^^^^^^^^^^^^^^^ help: consider changing to: `&(i32, u32)`
159
175
160
176
error: 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
162
178
|
163
179
LL | fn _fn(x: &mut (fn())) {}
164
180
| ^^^^^^^^^^^ help: consider changing to: `&fn()`
165
181
166
182
error: 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
168
184
|
169
185
LL | fn _extern_rust_fn(x: &mut extern "Rust" fn()) {}
170
186
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "Rust" fn()`
171
187
172
188
error: 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
174
190
|
175
191
LL | fn _extern_c_fn(x: &mut extern "C" fn()) {}
176
192
| ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "C" fn()`
177
193
178
194
error: 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
180
196
|
181
197
LL | fn _unsafe_fn(x: &mut unsafe fn()) {}
182
198
| ^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe fn()`
183
199
184
200
error: 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
186
202
|
187
203
LL | fn _unsafe_extern_fn(x: &mut unsafe extern "C" fn()) {}
188
204
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn()`
189
205
190
206
error: 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
192
208
|
193
209
LL | fn _fn_with_arg(x: &mut unsafe extern "C" fn(i32)) {}
194
210
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn(i32)`
195
211
196
212
error: 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
198
214
|
199
215
LL | fn _fn_with_ret(x: &mut unsafe extern "C" fn() -> (i32)) {}
200
216
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn() -> (i32)`
201
217
202
- error: aborting due to 31 previous errors
218
+ error: aborting due to 34 previous errors
203
219
0 commit comments