mirror of
https://github.com/rust-lang/rust-clippy
synced 2025-02-17 06:28:42 +00:00
Add regression test for #11610 about mutable usage of argument in async function for the needless_pass_by_ref_mut
lint
This commit is contained in:
parent
9554e477c2
commit
ddd1564e5d
1 changed files with 6 additions and 0 deletions
|
@ -270,6 +270,12 @@ pub async fn closure4(n: &mut usize) {
|
|||
})();
|
||||
}
|
||||
|
||||
// Should not warn.
|
||||
async fn _f(v: &mut Vec<()>) {
|
||||
let x = || v.pop();
|
||||
_ = || || x;
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let mut u = 0;
|
||||
let mut v = vec![0];
|
||||
|
|
Loading…
Add table
Reference in a new issue