mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 07:14:28 +00:00
Auto merge of #8464 - Jarcho:ptr_arg_8463, r=camsteffen
Fix `ptr_arg` fixes: #8463 changelog: Fix `ptr_arg` when multiple arguments are being checked in one function
This commit is contained in:
commit
e329249b6a
@ -547,7 +547,7 @@ fn check_ptr_arg_usage<'tcx>(cx: &LateContext<'tcx>, body: &'tcx Body<'_>, args:
|
||||
|
||||
// Helper function to handle early returns.
|
||||
let mut set_skip_flag = || {
|
||||
if result.skip {
|
||||
if !result.skip {
|
||||
self.skip_count += 1;
|
||||
}
|
||||
result.skip = true;
|
||||
|
@ -186,3 +186,11 @@ pub trait Trait {
|
||||
fn f(v: &mut Vec<i32>);
|
||||
fn f2(v: &mut Vec<i32>) {}
|
||||
}
|
||||
|
||||
// Issue #8463
|
||||
fn two_vecs(a: &mut Vec<u32>, b: &mut Vec<u32>) {
|
||||
a.push(0);
|
||||
a.push(0);
|
||||
a.push(0);
|
||||
b.push(1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user