diff options
Diffstat (limited to 'crates/ra_ide_api/src')
-rw-r--r-- | crates/ra_ide_api/src/symbol_index.rs | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs index 100df8279..afb10fa92 100644 --- a/crates/ra_ide_api/src/symbol_index.rs +++ b/crates/ra_ide_api/src/symbol_index.rs | |||
@@ -200,16 +200,6 @@ fn is_type(kind: SyntaxKind) -> bool { | |||
200 | } | 200 | } |
201 | } | 201 | } |
202 | 202 | ||
203 | fn is_symbol_def(kind: SyntaxKind) -> bool { | ||
204 | match kind { | ||
205 | FN_DEF | STRUCT_DEF | ENUM_DEF | TRAIT_DEF | MODULE | TYPE_DEF | CONST_DEF | STATIC_DEF => { | ||
206 | true | ||
207 | } | ||
208 | |||
209 | _ => false, | ||
210 | } | ||
211 | } | ||
212 | |||
213 | /// The actual data that is stored in the index. It should be as compact as | 203 | /// The actual data that is stored in the index. It should be as compact as |
214 | /// possible. | 204 | /// possible. |
215 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 205 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
@@ -236,7 +226,7 @@ fn source_file_to_file_symbols(source_file: &SourceFile, file_id: FileId) -> Vec | |||
236 | } | 226 | } |
237 | 227 | ||
238 | WalkEvent::Leave(node) => { | 228 | WalkEvent::Leave(node) => { |
239 | if is_symbol_def(node.kind()) { | 229 | if to_symbol(node).is_some() { |
240 | stack.pop(); | 230 | stack.pop(); |
241 | } | 231 | } |
242 | } | 232 | } |