diff options
author | Aleksey Kladov <[email protected]> | 2020-08-19 16:31:26 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-08-19 16:31:26 +0100 |
commit | 422ac441c29de730fe0adccc7bb3152ad5559039 (patch) | |
tree | d36799aa736dc1e51cf8c566c2c1053ceb960443 /crates/ide | |
parent | 5da1dc9a8b6b568add92c30dca0341328c138b31 (diff) |
Minor cleanups
Diffstat (limited to 'crates/ide')
-rw-r--r-- | crates/ide/src/syntax_highlighting.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/syntax_highlighting.rs b/crates/ide/src/syntax_highlighting.rs index a87a9be7e..549c5efe7 100644 --- a/crates/ide/src/syntax_highlighting.rs +++ b/crates/ide/src/syntax_highlighting.rs | |||
@@ -520,7 +520,6 @@ fn highlight_element( | |||
520 | NAME_REF => { | 520 | NAME_REF => { |
521 | let name_ref = element.into_node().and_then(ast::NameRef::cast).unwrap(); | 521 | let name_ref = element.into_node().and_then(ast::NameRef::cast).unwrap(); |
522 | highlight_func_by_name_ref(sema, &name_ref).unwrap_or_else(|| { | 522 | highlight_func_by_name_ref(sema, &name_ref).unwrap_or_else(|| { |
523 | let possibly_unsafe = is_possibly_unsafe(&name_ref); | ||
524 | match classify_name_ref(sema, &name_ref) { | 523 | match classify_name_ref(sema, &name_ref) { |
525 | Some(name_kind) => match name_kind { | 524 | Some(name_kind) => match name_kind { |
526 | NameRefClass::ExternCrate(_) => HighlightTag::Module.into(), | 525 | NameRefClass::ExternCrate(_) => HighlightTag::Module.into(), |
@@ -532,6 +531,7 @@ fn highlight_element( | |||
532 | binding_hash = Some(calc_binding_hash(&name, *shadow_count)) | 531 | binding_hash = Some(calc_binding_hash(&name, *shadow_count)) |
533 | } | 532 | } |
534 | }; | 533 | }; |
534 | let possibly_unsafe = is_possibly_unsafe(&name_ref); | ||
535 | highlight_def(sema, db, def, Some(name_ref), possibly_unsafe) | 535 | highlight_def(sema, db, def, Some(name_ref), possibly_unsafe) |
536 | } | 536 | } |
537 | NameRefClass::FieldShorthand { .. } => HighlightTag::Field.into(), | 537 | NameRefClass::FieldShorthand { .. } => HighlightTag::Field.into(), |