mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 12:33:33 +00:00
Simplify unsafe expr collection match
This commit is contained in:
parent
b7e25ba854
commit
68a649d547
1 changed files with 3 additions and 4 deletions
|
@ -108,13 +108,12 @@ fn walk_unsafe(
|
||||||
unsafe_exprs.push(UnsafeExpr { expr: current, inside_unsafe_block });
|
unsafe_exprs.push(UnsafeExpr { expr: current, inside_unsafe_block });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Expr::Unsafe { body: child } => {
|
||||||
|
return walk_unsafe(unsafe_exprs, db, infer, body, *child, true);
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let &Expr::Unsafe { body: child } = expr {
|
|
||||||
return walk_unsafe(unsafe_exprs, db, infer, body, child, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
expr.walk_child_exprs(|child| {
|
expr.walk_child_exprs(|child| {
|
||||||
walk_unsafe(unsafe_exprs, db, infer, body, child, inside_unsafe_block);
|
walk_unsafe(unsafe_exprs, db, infer, body, child, inside_unsafe_block);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue