Auto merge of #8387 - Jarcho:ptr_arg_8386, r=flip1995

Fix ICE in `ptr_arg`

fixes: #8386

changelog: None
This commit is contained in:
bors 2022-02-01 20:48:07 +00:00
commit 327768cfb0
2 changed files with 4 additions and 1 deletions

View File

@ -649,7 +649,7 @@ fn check_ptr_arg_usage<'tcx>(cx: &LateContext<'tcx>, body: &'tcx Body<'_>, args:
},
_ => {
skip_count += 1;
results[arg.idx].skip = true;
results[i].skip = true;
None
},
}

View File

@ -0,0 +1,3 @@
fn f(x: u32, mut arg: &String) {}
fn main() {}