4
4
use std:: ptr:: NonNull ;
5
5
6
6
fn foo ( s : & mut Vec < u32 > , b : & u32 , x : & mut u32 ) {
7
- //~^ ERROR: this argument is a mutable reference, but not used mutably
7
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
8
8
* x += * b + s. len ( ) as u32 ;
9
9
}
10
10
@@ -29,7 +29,7 @@ fn foo5(s: &mut Vec<u32>) {
29
29
}
30
30
31
31
fn foo6 ( s : & mut Vec < u32 > ) {
32
- //~^ ERROR: this argument is a mutable reference, but not used mutably
32
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
33
33
non_mut_ref ( s) ;
34
34
}
35
35
@@ -42,12 +42,12 @@ impl Bar {
42
42
fn bar ( & mut self ) { }
43
43
44
44
fn mushroom ( & self , vec : & mut Vec < i32 > ) -> usize {
45
- //~^ ERROR: this argument is a mutable reference, but not used mutably
45
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
46
46
vec. len ( )
47
47
}
48
48
49
49
fn badger ( & mut self , vec : & mut Vec < i32 > ) -> usize {
50
- //~^ ERROR: this argument is a mutable reference, but not used mutably
50
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
51
51
vec. len ( )
52
52
}
53
53
}
@@ -124,35 +124,35 @@ async fn f7(x: &mut i32, y: i32, z: &mut i32, a: i32) {
124
124
}
125
125
126
126
async fn a1 ( x : & mut i32 ) {
127
- //~^ ERROR: this argument is a mutable reference, but not used mutably
127
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
128
128
println ! ( "{:?}" , x) ;
129
129
}
130
130
async fn a2 ( x : & mut i32 , y : String ) {
131
- //~^ ERROR: this argument is a mutable reference, but not used mutably
131
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
132
132
println ! ( "{:?}" , x) ;
133
133
}
134
134
async fn a3 ( x : & mut i32 , y : String , z : String ) {
135
- //~^ ERROR: this argument is a mutable reference, but not used mutably
135
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
136
136
println ! ( "{:?}" , x) ;
137
137
}
138
138
async fn a4 ( x : & mut i32 , y : i32 ) {
139
- //~^ ERROR: this argument is a mutable reference, but not used mutably
139
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
140
140
println ! ( "{:?}" , x) ;
141
141
}
142
142
async fn a5 ( x : i32 , y : & mut i32 ) {
143
- //~^ ERROR: this argument is a mutable reference, but not used mutably
143
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
144
144
println ! ( "{:?}" , x) ;
145
145
}
146
146
async fn a6 ( x : i32 , y : & mut i32 ) {
147
- //~^ ERROR: this argument is a mutable reference, but not used mutably
147
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
148
148
println ! ( "{:?}" , x) ;
149
149
}
150
150
async fn a7 ( x : i32 , y : i32 , z : & mut i32 ) {
151
- //~^ ERROR: this argument is a mutable reference, but not used mutably
151
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
152
152
println ! ( "{:?}" , z) ;
153
153
}
154
154
async fn a8 ( x : i32 , a : & mut i32 , y : i32 , z : & mut i32 ) {
155
- //~^ ERROR: this argument is a mutable reference, but not used mutably
155
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
156
156
println ! ( "{:?}" , z) ;
157
157
}
158
158
@@ -186,14 +186,14 @@ fn lint_attr(s: &mut u32) {}
186
186
187
187
#[ cfg( not( feature = "a" ) ) ]
188
188
fn cfg_warn ( s : & mut u32 ) { }
189
- //~^ ERROR: this argument is a mutable reference, but not used mutably
190
- //~| NOTE: this is cfg-gated and may require further changes
189
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
190
+ //~| NOTE: this is ` cfg` -gated and may require further changes
191
191
192
192
#[ cfg( not( feature = "a" ) ) ]
193
193
mod foo {
194
194
fn cfg_warn ( s : & mut u32 ) { }
195
- //~^ ERROR: this argument is a mutable reference, but not used mutably
196
- //~| NOTE: this is cfg-gated and may require further changes
195
+ //~^ ERROR: this argument is a mutable reference, but never used mutably
196
+ //~| NOTE: this is ` cfg` -gated and may require further changes
197
197
}
198
198
199
199
fn main ( ) {
0 commit comments