mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-30 11:37:31 +00:00
In highlight_related, when on an unsafe block, don't highlight unsafe operations of other unsafe blocks
This commit is contained in:
parent
1f4e5e82ff
commit
1efff4677e
4 changed files with 44 additions and 10 deletions
|
|
@ -1283,7 +1283,7 @@ impl<'db> SourceAnalyzer<'db> {
|
|||
{
|
||||
let mut is_unsafe = false;
|
||||
let mut walk_expr = |expr_id| {
|
||||
unsafe_operations(db, infer, def, body, expr_id, &mut |inside_unsafe_block| {
|
||||
unsafe_operations(db, infer, def, body, expr_id, &mut |_, inside_unsafe_block| {
|
||||
is_unsafe |= inside_unsafe_block == InsideUnsafeBlock::No
|
||||
})
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue