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
@ -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…
x
Reference in New Issue
Block a user