Add new regression test for needless_pass_by_ref_mut

This commit is contained in:
Guillaume Gomez 2023-08-17 14:24:04 +02:00
parent 1d01f1bac1
commit 7e46217362

View file

@ -221,6 +221,16 @@ async fn inner_async3(x: &mut i32, y: &mut u32) {
.await;
}
// Should not warn.
async fn async_vec(b: &mut Vec<bool>) {
b.append(&mut vec![]);
}
// Should not warn.
async fn async_vec2(b: &mut Vec<bool>) {
b.push(true);
}
fn main() {
let mut u = 0;
let mut v = vec![0];