From 1142112c70b705f59b7d559d9d72cdc831865158 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 14:51:08 +0200 Subject: Rename FnDef -> Fn --- crates/ra_ide_db/src/defs.rs | 2 +- crates/ra_ide_db/src/symbol_index.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide_db') diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index 1464c5f2a..234d3175a 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, name: &ast::Name) -> Option let def: hir::EnumVariant = sema.to_def(&it)?; Some(NameClass::Definition(Definition::ModuleDef(def.into()))) }, - ast::FnDef(it) => { + ast::Fn(it) => { let def: hir::Function = sema.to_def(&it)?; Some(NameClass::Definition(Definition::ModuleDef(def.into()))) }, diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index 131e2a128..c6e1ad432 100644 --- a/crates/ra_ide_db/src/symbol_index.rs +++ b/crates/ra_ide_db/src/symbol_index.rs @@ -397,7 +397,7 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { } match_ast! { match node { - ast::FnDef(it) => decl(it), + ast::Fn(it) => decl(it), ast::StructDef(it) => decl(it), ast::EnumDef(it) => decl(it), ast::TraitDef(it) => decl(it), -- cgit v1.2.3 From eb2f8063444b11257111f4f8ade990ec810e0361 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 15:25:46 +0200 Subject: Rename TypeAliasDef -> TypeAlias --- crates/ra_ide_db/src/defs.rs | 2 +- crates/ra_ide_db/src/symbol_index.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'crates/ra_ide_db') diff --git a/crates/ra_ide_db/src/defs.rs b/crates/ra_ide_db/src/defs.rs index 234d3175a..0e73a8932 100644 --- a/crates/ra_ide_db/src/defs.rs +++ b/crates/ra_ide_db/src/defs.rs @@ -182,7 +182,7 @@ pub fn classify_name(sema: &Semantics, name: &ast::Name) -> Option let def: hir::Const = sema.to_def(&it)?; Some(NameClass::Definition(Definition::ModuleDef(def.into()))) }, - ast::TypeAliasDef(it) => { + ast::TypeAlias(it) => { let def: hir::TypeAlias = sema.to_def(&it)?; Some(NameClass::Definition(Definition::ModuleDef(def.into()))) }, diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index c6e1ad432..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 { } fn is_type(kind: SyntaxKind) -> bool { - matches!(kind, STRUCT_DEF | ENUM_DEF | TRAIT_DEF | TYPE_ALIAS_DEF) + matches!(kind, STRUCT_DEF | ENUM_DEF | TRAIT_DEF | TYPE_ALIAS) } /// The actual data that is stored in the index. It should be as compact as @@ -402,7 +402,7 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { ast::EnumDef(it) => decl(it), ast::TraitDef(it) => decl(it), ast::Module(it) => decl(it), - ast::TypeAliasDef(it) => decl(it), + ast::TypeAlias(it) => decl(it), ast::ConstDef(it) => decl(it), ast::StaticDef(it) => decl(it), ast::MacroCall(it) => { -- cgit v1.2.3