diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-30 14:26:15 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-30 14:26:15 +0100 |
commit | ee00679331b87dacc5fe608f153be160c1cb144c (patch) | |
tree | f80ef7823490a6904b3f7bf57a4609ca4c4743dc /crates/ra_ide_db | |
parent | 96c3ff1c573f97e5089fc0ba01ede6fe43693668 (diff) | |
parent | eb2f8063444b11257111f4f8ade990ec810e0361 (diff) |
Merge #5591
5591: Rename TypeAliasDef -> TypeAlias 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 | 4 | ||||
-rw-r--r-- | crates/ra_ide_db/src/symbol_index.rs | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index 1464c5f2a..0e73a8932 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs | |||
@@ -174,7 +174,7 @@ pub fn classify_name(sema: &Semantics<RootDatabase>, name: &ast::Name) -> Option | |||
174 | let def: hir::EnumVariant = sema.to_def(&it)?; | 174 | let def: hir::EnumVariant = sema.to_def(&it)?; |
175 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) | 175 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) |
176 | }, | 176 | }, |
177 | ast::FnDef(it) => { | 177 | ast::Fn(it) => { |
178 | let def: hir::Function = sema.to_def(&it)?; | 178 | let def: hir::Function = sema.to_def(&it)?; |
179 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) | 179 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) |
180 | }, | 180 | }, |
@@ -182,7 +182,7 @@ pub fn classify_name(sema: &Semantics<RootDatabase>, name: &ast::Name) -> Option | |||
182 | let def: hir::Const = sema.to_def(&it)?; | 182 | let def: hir::Const = sema.to_def(&it)?; |
183 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) | 183 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) |
184 | }, | 184 | }, |
185 | ast::TypeAliasDef(it) => { | 185 | ast::TypeAlias(it) => { |
186 | let def: hir::TypeAlias = sema.to_def(&it)?; | 186 | let def: hir::TypeAlias = sema.to_def(&it)?; |
187 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) | 187 | Some(NameClass::Definition(Definition::ModuleDef(def.into()))) |
188 | }, | 188 | }, |
diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index 131e2a128..b4e85b88e 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_DEF | ENUM_DEF | TRAIT_DEF | TYPE_ALIAS_DEF) | 347 | matches!(kind, STRUCT_DEF | ENUM_DEF | TRAIT_DEF | 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 |
@@ -397,12 +397,12 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { | |||
397 | } | 397 | } |
398 | match_ast! { | 398 | match_ast! { |
399 | match node { | 399 | match node { |
400 | ast::FnDef(it) => decl(it), | 400 | ast::Fn(it) => decl(it), |
401 | ast::StructDef(it) => decl(it), | 401 | ast::StructDef(it) => decl(it), |
402 | ast::EnumDef(it) => decl(it), | 402 | ast::EnumDef(it) => decl(it), |
403 | ast::TraitDef(it) => decl(it), | 403 | ast::TraitDef(it) => decl(it), |
404 | ast::Module(it) => decl(it), | 404 | ast::Module(it) => decl(it), |
405 | ast::TypeAliasDef(it) => decl(it), | 405 | ast::TypeAlias(it) => decl(it), |
406 | ast::ConstDef(it) => decl(it), | 406 | ast::ConstDef(it) => decl(it), |
407 | ast::StaticDef(it) => decl(it), | 407 | ast::StaticDef(it) => decl(it), |
408 | ast::MacroCall(it) => { | 408 | ast::MacroCall(it) => { |