mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
Auto merge of #11622 - GuillaumeGomez:needless_pass_by_ref_mut-regression-test-11610, r=blyxyas
Add regression test for #11610 about mutable usage of argument in async function for the `needless_pass_by_ref_mut` lint Fixes https://github.com/rust-lang/rust-clippy/issues/11610. This was already fixed. I simply added a regression test. changelog: 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:
commit
2640d5cc85
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…
Reference in a new issue