Skip to content

Commit 327768c

Browse files
committed
Auto merge of #8387 - Jarcho:ptr_arg_8386, r=flip1995
Fix ICE in `ptr_arg` fixes: #8386 changelog: None
2 parents b8c80dd + e4f45c2 commit 327768c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

clippy_lints/src/ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -649,7 +649,7 @@ fn check_ptr_arg_usage<'tcx>(cx: &LateContext<'tcx>, body: &'tcx Body<'_>, args:
649649
},
650650
_ => {
651651
skip_count += 1;
652-
results[arg.idx].skip = true;
652+
results[i].skip = true;
653653
None
654654
},
655655
}

tests/ui/crashes/ice-8386.rs

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn f(x: u32, mut arg: &String) {}
2+
3+
fn main() {}

0 commit comments

Comments
 (0)