mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
Add new regression test for needless_pass_by_ref_mut
This commit is contained in:
parent
1d01f1bac1
commit
7e46217362
1 changed files with 10 additions and 0 deletions
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue