diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-30 17:29:24 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-30 17:29:24 +0100 |
commit | 0f5805541be90a2789b0bc34c5d829042ac3b0ad (patch) | |
tree | 27effc491f45f7bd907cb0b24a5b0d907298d169 /crates/ra_ide_db | |
parent | c8e2d67dd4462904f2803d64c651f4630ee595f4 (diff) | |
parent | c5798c4d75aa807aec47208a49101bdec3affcca (diff) |
Merge #5606
5606: Finalize impl Grammar r=matklad a=matklad
bors r+
🤖
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_db')
-rw-r--r-- | crates/ra_ide_db/src/defs.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_db/src/symbol_index.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index b908bd741..df56f2d9e 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs | |||
@@ -162,7 +162,7 @@ pub fn classify_name(sema: &Semantics<RootDatabase>, name: &ast::Name) -> Option | |||
162 | let def: hir::Enum = sema.to_def(&it)?; | 162 | let def: hir::Enum = sema.to_def(&it)?; |
163 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) | 163 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) |
164 | }, | 164 | }, |
165 | ast::TraitDef(it) => { | 165 | ast::Trait(it) => { |
166 | let def: hir::Trait = sema.to_def(&it)?; | 166 | let def: hir::Trait = sema.to_def(&it)?; |
167 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) | 167 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) |
168 | }, | 168 | }, |
diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index 41b8d07f4..35a2c5be3 100644 --- a/crates/ra_ide_db/src/symbol_index.rs +++ b/crates/ra_ide_db/src/symbol_index.rs | |||
@@ -344,7 +344,7 @@ impl Query { | |||
344 | } | 344 | } |
345 | 345 | ||
346 | fn is_type(kind: SyntaxKind) -> bool { | 346 | fn is_type(kind: SyntaxKind) -> bool { |
347 | matches!(kind, STRUCT | ENUM | TRAIT_DEF | TYPE_ALIAS) | 347 | matches!(kind, STRUCT | ENUM | TRAIT | TYPE_ALIAS) |
348 | } | 348 | } |
349 | 349 | ||
350 | /// The actual data that is stored in the index. It should be as compact as | 350 | /// The actual data that is stored in the index. It should be as compact as |
@@ -400,7 +400,7 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { | |||
400 | ast::Fn(it) => decl(it), | 400 | ast::Fn(it) => decl(it), |
401 | ast::Struct(it) => decl(it), | 401 | ast::Struct(it) => decl(it), |
402 | ast::Enum(it) => decl(it), | 402 | ast::Enum(it) => decl(it), |
403 | ast::TraitDef(it) => decl(it), | 403 | ast::Trait(it) => decl(it), |
404 | ast::Module(it) => decl(it), | 404 | ast::Module(it) => decl(it), |
405 | ast::TypeAlias(it) => decl(it), | 405 | ast::TypeAlias(it) => decl(it), |
406 | ast::Const(it) => decl(it), | 406 | ast::Const(it) => decl(it), |