Skip to content

Commit 7e46217

Browse files
Add new regression test for needless_pass_by_ref_mut
1 parent 1d01f1b commit 7e46217

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/ui/needless_pass_by_ref_mut.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,16 @@ async fn inner_async3(x: &mut i32, y: &mut u32) {
221221
.await;
222222
}
223223

224+
// Should not warn.
225+
async fn async_vec(b: &mut Vec<bool>) {
226+
b.append(&mut vec![]);
227+
}
228+
229+
// Should not warn.
230+
async fn async_vec2(b: &mut Vec<bool>) {
231+
b.push(true);
232+
}
233+
224234
fn main() {
225235
let mut u = 0;
226236
let mut v = vec![0];

0 commit comments

Comments
 (0)