1
1
error: 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
3
3
|
4
4
LL | fn foo(s: &mut Vec<u32>, b: &u32, x: &mut u32) {
5
5
| ^^^^^^^^^^^^^ help: consider changing to: `&Vec<u32>`
@@ -8,203 +8,203 @@ LL | fn foo(s: &mut Vec<u32>, b: &u32, x: &mut u32) {
8
8
= help: to override `-D warnings` add `#[allow(clippy::needless_pass_by_ref_mut)]`
9
9
10
10
error: 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
12
12
|
13
13
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:51 :12
17
+ --> tests/ui/needless_pass_by_ref_mut.rs:49 :12
18
18
|
19
19
LL | fn bar(&mut self) {}
20
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:54 :29
23
+ --> tests/ui/needless_pass_by_ref_mut.rs:52 :29
24
24
|
25
25
LL | fn mushroom(&self, vec: &mut Vec<i32>) -> usize {
26
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:130 :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:137 :16
35
+ --> tests/ui/needless_pass_by_ref_mut.rs:135 :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:142 :16
41
+ --> tests/ui/needless_pass_by_ref_mut.rs:140 :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:147 :16
47
+ --> tests/ui/needless_pass_by_ref_mut.rs:145 :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:152 :24
53
+ --> tests/ui/needless_pass_by_ref_mut.rs:150 :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:157 :24
59
+ --> tests/ui/needless_pass_by_ref_mut.rs:155 :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:162 :32
65
+ --> tests/ui/needless_pass_by_ref_mut.rs:160 :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:167 :24
71
+ --> tests/ui/needless_pass_by_ref_mut.rs:165 :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:167 :45
77
+ --> tests/ui/needless_pass_by_ref_mut.rs:165 :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:203 :16
83
+ --> tests/ui/needless_pass_by_ref_mut.rs:201 :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:208 :20
91
+ --> tests/ui/needless_pass_by_ref_mut.rs:206 :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:221 :39
99
+ --> tests/ui/needless_pass_by_ref_mut.rs:219 :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:230 :26
105
+ --> tests/ui/needless_pass_by_ref_mut.rs:228 :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:250 :30
111
+ --> tests/ui/needless_pass_by_ref_mut.rs:248 :30
112
112
|
113
113
LL | async fn call_in_closure1(n: &mut str) {
114
114
| ^^^^^^^^ help: consider changing to: `&str`
115
115
116
116
error: 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
118
118
|
119
119
LL | fn closure2(n: &mut usize) -> impl '_ + FnMut() -> usize {
120
120
| ^^^^^^^^^^ help: consider changing to: `&usize`
121
121
122
122
error: 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
124
124
|
125
125
LL | async fn closure4(n: &mut usize) {
126
126
| ^^^^^^^^^^ help: consider changing to: `&usize`
127
127
128
128
error: 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
130
130
|
131
131
LL | fn bar(&mut self) {}
132
132
| ^^^^^^^^^ help: consider changing to: `&self`
133
133
134
134
error: 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
136
136
|
137
137
LL | async fn foo(&mut self, u: &mut i32, v: &mut u32) {
138
138
| ^^^^^^^^^ help: consider changing to: `&self`
139
139
140
140
error: 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
142
142
|
143
143
LL | async fn foo(&mut self, u: &mut i32, v: &mut u32) {
144
144
| ^^^^^^^^ help: consider changing to: `&u32`
145
145
146
146
error: 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
148
148
|
149
149
LL | async fn foo2(&mut self, u: &mut i32, v: &mut u32) {
150
150
| ^^^^^^^^ help: consider changing to: `&u32`
151
151
152
152
error: 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
154
154
|
155
155
LL | fn _empty_tup(x: &mut (())) {}
156
156
| ^^^^^^^^^ help: consider changing to: `&()`
157
157
158
158
error: 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
160
160
|
161
161
LL | fn _single_tup(x: &mut ((i32,))) {}
162
162
| ^^^^^^^^^^^^^ help: consider changing to: `&(i32,)`
163
163
164
164
error: 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
166
166
|
167
167
LL | fn _multi_tup(x: &mut ((i32, u32))) {}
168
168
| ^^^^^^^^^^^^^^^^^ help: consider changing to: `&(i32, u32)`
169
169
170
170
error: 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
172
172
|
173
173
LL | fn _fn(x: &mut (fn())) {}
174
174
| ^^^^^^^^^^^ help: consider changing to: `&fn()`
175
175
176
176
error: 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
178
178
|
179
179
LL | fn _extern_rust_fn(x: &mut extern "Rust" fn()) {}
180
180
| ^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "Rust" fn()`
181
181
182
182
error: 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
184
184
|
185
185
LL | fn _extern_c_fn(x: &mut extern "C" fn()) {}
186
186
| ^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&extern "C" fn()`
187
187
188
188
error: 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
190
190
|
191
191
LL | fn _unsafe_fn(x: &mut unsafe fn()) {}
192
192
| ^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe fn()`
193
193
194
194
error: 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
196
196
|
197
197
LL | fn _unsafe_extern_fn(x: &mut unsafe extern "C" fn()) {}
198
198
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn()`
199
199
200
200
error: 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
202
202
|
203
203
LL | fn _fn_with_arg(x: &mut unsafe extern "C" fn(i32)) {}
204
204
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn(i32)`
205
205
206
206
error: 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
208
208
|
209
209
LL | fn _fn_with_ret(x: &mut unsafe extern "C" fn() -> (i32)) {}
210
210
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider changing to: `&unsafe extern "C" fn() -> (i32)`
0 commit comments