1
1
error: this argument is a mutable reference, but not used mutably
2
- --> $DIR/needless_pass_by_ref_mut.rs:7 :11
2
+ --> $DIR/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,131 +8,131 @@ 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
- --> $DIR/needless_pass_by_ref_mut.rs:32 :12
11
+ --> $DIR/needless_pass_by_ref_mut.rs:37 :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
- --> $DIR/needless_pass_by_ref_mut.rs:45 :29
17
+ --> $DIR/needless_pass_by_ref_mut.rs:50 :29
18
18
|
19
19
LL | fn mushroom(&self, vec: &mut Vec<i32>) -> usize {
20
20
| ^^^^^^^^^^^^^ help: consider changing to: `&Vec<i32>`
21
21
22
22
error: this argument is a mutable reference, but not used mutably
23
- --> $DIR/needless_pass_by_ref_mut.rs:50 :31
23
+ --> $DIR/needless_pass_by_ref_mut.rs:55 :31
24
24
|
25
25
LL | fn badger(&mut 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
- --> $DIR/needless_pass_by_ref_mut.rs:127 :16
29
+ --> $DIR/needless_pass_by_ref_mut.rs:132 :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
- --> $DIR/needless_pass_by_ref_mut.rs:131 :16
35
+ --> $DIR/needless_pass_by_ref_mut.rs:136 :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
- --> $DIR/needless_pass_by_ref_mut.rs:135 :16
41
+ --> $DIR/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
- --> $DIR/needless_pass_by_ref_mut.rs:139 :16
47
+ --> $DIR/needless_pass_by_ref_mut.rs:144 :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
- --> $DIR/needless_pass_by_ref_mut.rs:143 :24
53
+ --> $DIR/needless_pass_by_ref_mut.rs:148 :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
- --> $DIR/needless_pass_by_ref_mut.rs:147 :24
59
+ --> $DIR/needless_pass_by_ref_mut.rs:152 :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
- --> $DIR/needless_pass_by_ref_mut.rs:151 :32
65
+ --> $DIR/needless_pass_by_ref_mut.rs:156 :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
- --> $DIR/needless_pass_by_ref_mut.rs:155 :24
71
+ --> $DIR/needless_pass_by_ref_mut.rs:160 :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
- --> $DIR/needless_pass_by_ref_mut.rs:155 :45
77
+ --> $DIR/needless_pass_by_ref_mut.rs:160 :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
- --> $DIR/needless_pass_by_ref_mut.rs:189 :16
83
+ --> $DIR/needless_pass_by_ref_mut.rs:194 :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
- --> $DIR/needless_pass_by_ref_mut.rs:195 :20
91
+ --> $DIR/needless_pass_by_ref_mut.rs:200 :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
- --> $DIR/needless_pass_by_ref_mut.rs:209 :39
99
+ --> $DIR/needless_pass_by_ref_mut.rs:214 :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
- --> $DIR/needless_pass_by_ref_mut.rs:217 :26
105
+ --> $DIR/needless_pass_by_ref_mut.rs:222 :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
- --> $DIR/needless_pass_by_ref_mut.rs:236 :34
111
+ --> $DIR/needless_pass_by_ref_mut.rs:241 :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
- --> $DIR/needless_pass_by_ref_mut.rs:248 :25
119
+ --> $DIR/needless_pass_by_ref_mut.rs:253 :25
120
120
|
121
121
LL | pub async fn closure(n: &mut usize) -> impl '_ + FnMut() {
122
122
| ^^^^^^^^^^ help: consider changing to: `&usize`
123
123
|
124
124
= warning: changing this function will impact semver compatibility
125
125
126
126
error: this argument is a mutable reference, but not used mutably
127
- --> $DIR/needless_pass_by_ref_mut.rs:255 :20
127
+ --> $DIR/needless_pass_by_ref_mut.rs:260 :20
128
128
|
129
129
LL | pub fn closure2(n: &mut usize) -> impl '_ + FnMut() -> usize {
130
130
| ^^^^^^^^^^ help: consider changing to: `&usize`
131
131
|
132
132
= warning: changing this function will impact semver compatibility
133
133
134
134
error: this argument is a mutable reference, but not used mutably
135
- --> $DIR/needless_pass_by_ref_mut.rs:266 :26
135
+ --> $DIR/needless_pass_by_ref_mut.rs:271 :26
136
136
|
137
137
LL | pub async fn closure4(n: &mut usize) {
138
138
| ^^^^^^^^^^ help: consider changing to: `&usize`
0 commit comments