diff options
Diffstat (limited to 'crates/ide/src/annotations.rs')
-rw-r--r-- | crates/ide/src/annotations.rs | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/crates/ide/src/annotations.rs b/crates/ide/src/annotations.rs index 2e8e82b70..8e0a8fd8d 100644 --- a/crates/ide/src/annotations.rs +++ b/crates/ide/src/annotations.rs | |||
@@ -11,7 +11,7 @@ use crate::{ | |||
11 | goto_implementation::goto_implementation, | 11 | goto_implementation::goto_implementation, |
12 | references::find_all_refs, | 12 | references::find_all_refs, |
13 | runnables::{runnables, Runnable}, | 13 | runnables::{runnables, Runnable}, |
14 | NavigationTarget, RunnableKind, | 14 | NavigationTarget, RunnableKind, StructureNodeKind, |
15 | }; | 15 | }; |
16 | 16 | ||
17 | // Feature: Annotations | 17 | // Feature: Annotations |
@@ -80,15 +80,17 @@ pub(crate) fn annotations( | |||
80 | .filter(|node| { | 80 | .filter(|node| { |
81 | matches!( | 81 | matches!( |
82 | node.kind, | 82 | node.kind, |
83 | SymbolKind::Trait | 83 | StructureNodeKind::SymbolKind(SymbolKind::Trait) |
84 | | SymbolKind::Struct | 84 | | StructureNodeKind::SymbolKind(SymbolKind::Struct) |
85 | | SymbolKind::Enum | 85 | | StructureNodeKind::SymbolKind(SymbolKind::Enum) |
86 | | SymbolKind::Union | 86 | | StructureNodeKind::SymbolKind(SymbolKind::Union) |
87 | | SymbolKind::Const | 87 | | StructureNodeKind::SymbolKind(SymbolKind::Const) |
88 | ) | 88 | ) |
89 | }) | 89 | }) |
90 | .for_each(|node| { | 90 | .for_each(|node| { |
91 | if config.annotate_impls && node.kind != SymbolKind::Const { | 91 | if config.annotate_impls |
92 | && node.kind != StructureNodeKind::SymbolKind(SymbolKind::Const) | ||
93 | { | ||
92 | annotations.push(Annotation { | 94 | annotations.push(Annotation { |
93 | range: node.node_range, | 95 | range: node.node_range, |
94 | kind: AnnotationKind::HasImpls { | 96 | kind: AnnotationKind::HasImpls { |