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/src/display/navigation_target.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/display/navigation_target.rs') diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index fd245705c..222cb3502 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -379,7 +379,7 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option match_ast! { match node { - ast::FnDef(it) => it.doc_comment_text(), + ast::Fn(it) => it.doc_comment_text(), ast::StructDef(it) => it.doc_comment_text(), ast::EnumDef(it) => it.doc_comment_text(), ast::TraitDef(it) => it.doc_comment_text(), @@ -404,7 +404,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> match_ast! { match node { - ast::FnDef(it) => it.short_label(), + ast::Fn(it) => it.short_label(), ast::StructDef(it) => it.short_label(), ast::EnumDef(it) => it.short_label(), ast::TraitDef(it) => it.short_label(), -- 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/src/display/navigation_target.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/display/navigation_target.rs') diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index 222cb3502..4f19c7ed4 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -384,7 +384,7 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option ast::EnumDef(it) => it.doc_comment_text(), ast::TraitDef(it) => it.doc_comment_text(), ast::Module(it) => it.doc_comment_text(), - ast::TypeAliasDef(it) => it.doc_comment_text(), + ast::TypeAlias(it) => it.doc_comment_text(), ast::ConstDef(it) => it.doc_comment_text(), ast::StaticDef(it) => it.doc_comment_text(), ast::RecordFieldDef(it) => it.doc_comment_text(), @@ -409,7 +409,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> ast::EnumDef(it) => it.short_label(), ast::TraitDef(it) => it.short_label(), ast::Module(it) => it.short_label(), - ast::TypeAliasDef(it) => it.short_label(), + ast::TypeAlias(it) => it.short_label(), ast::ConstDef(it) => it.short_label(), ast::StaticDef(it) => it.short_label(), ast::RecordFieldDef(it) => it.short_label(), -- cgit v1.2.3 From 0a9e3ccc262fbcbd4cdaab30384f8cb71584544b Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 16:49:13 +0200 Subject: Rename FieldDef -> Field --- crates/ra_ide/src/display/navigation_target.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/display/navigation_target.rs') diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index 4f19c7ed4..797d2d8e3 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -387,7 +387,7 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option ast::TypeAlias(it) => it.doc_comment_text(), ast::ConstDef(it) => it.doc_comment_text(), ast::StaticDef(it) => it.doc_comment_text(), - ast::RecordFieldDef(it) => it.doc_comment_text(), + ast::RecordField(it) => it.doc_comment_text(), ast::EnumVariant(it) => it.doc_comment_text(), ast::MacroCall(it) => it.doc_comment_text(), _ => None, @@ -412,7 +412,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> ast::TypeAlias(it) => it.short_label(), ast::ConstDef(it) => it.short_label(), ast::StaticDef(it) => it.short_label(), - ast::RecordFieldDef(it) => it.short_label(), + ast::RecordField(it) => it.short_label(), ast::EnumVariant(it) => it.short_label(), _ => None, } -- cgit v1.2.3 From 216a5344c8ef3c3e430d2761dc8b1a7b60250a15 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 17:50:40 +0200 Subject: Rename StructDef -> Struct --- crates/ra_ide/src/display/navigation_target.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/display/navigation_target.rs') diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index 797d2d8e3..5686faaab 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -380,7 +380,7 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option match_ast! { match node { ast::Fn(it) => it.doc_comment_text(), - ast::StructDef(it) => it.doc_comment_text(), + ast::Struct(it) => it.doc_comment_text(), ast::EnumDef(it) => it.doc_comment_text(), ast::TraitDef(it) => it.doc_comment_text(), ast::Module(it) => it.doc_comment_text(), @@ -405,7 +405,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> match_ast! { match node { ast::Fn(it) => it.short_label(), - ast::StructDef(it) => it.short_label(), + ast::Struct(it) => it.short_label(), ast::EnumDef(it) => it.short_label(), ast::TraitDef(it) => it.short_label(), ast::Module(it) => it.short_label(), -- cgit v1.2.3 From 609680ef97dbf82c07b6b06e21aa366423892304 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 17:52:53 +0200 Subject: Rename EnumDef -> Enum --- crates/ra_ide/src/display/navigation_target.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_ide/src/display/navigation_target.rs') diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index 5686faaab..02fefd6bb 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -381,7 +381,7 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option match node { ast::Fn(it) => it.doc_comment_text(), ast::Struct(it) => it.doc_comment_text(), - ast::EnumDef(it) => it.doc_comment_text(), + ast::Enum(it) => it.doc_comment_text(), ast::TraitDef(it) => it.doc_comment_text(), ast::Module(it) => it.doc_comment_text(), ast::TypeAlias(it) => it.doc_comment_text(), @@ -406,7 +406,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> match node { ast::Fn(it) => it.short_label(), ast::Struct(it) => it.short_label(), - ast::EnumDef(it) => it.short_label(), + ast::Enum(it) => it.short_label(), ast::TraitDef(it) => it.short_label(), ast::Module(it) => it.short_label(), ast::TypeAlias(it) => it.short_label(), @@ -446,7 +446,7 @@ fn foo() { enum FooInner { } } 5..13, ), name: "FooInner", - kind: ENUM_DEF, + kind: ENUM, container_name: None, description: Some( "enum FooInner", @@ -462,7 +462,7 @@ fn foo() { enum FooInner { } } 34..42, ), name: "FooInner", - kind: ENUM_DEF, + kind: ENUM, container_name: Some( "foo", ), -- cgit v1.2.3 From 1766aae145c6925a33e427f2fe6ef2a56c301665 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 17:56:53 +0200 Subject: Rename EnumVariant -> Variant --- crates/ra_ide/src/display/navigation_target.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/display/navigation_target.rs') diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index 02fefd6bb..c30b91fe0 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -388,7 +388,7 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option ast::ConstDef(it) => it.doc_comment_text(), ast::StaticDef(it) => it.doc_comment_text(), ast::RecordField(it) => it.doc_comment_text(), - ast::EnumVariant(it) => it.doc_comment_text(), + ast::Variant(it) => it.doc_comment_text(), ast::MacroCall(it) => it.doc_comment_text(), _ => None, } @@ -413,7 +413,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> ast::ConstDef(it) => it.short_label(), ast::StaticDef(it) => it.short_label(), ast::RecordField(it) => it.short_label(), - ast::EnumVariant(it) => it.short_label(), + ast::Variant(it) => it.short_label(), _ => None, } } -- cgit v1.2.3 From 3cd4112bdc924c132cb0eab9d064511a215421ec Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 18:02:20 +0200 Subject: Finalize const&static grammar --- crates/ra_ide/src/display/navigation_target.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_ide/src/display/navigation_target.rs') diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index c30b91fe0..9e2c01245 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -385,8 +385,8 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option ast::TraitDef(it) => it.doc_comment_text(), ast::Module(it) => it.doc_comment_text(), ast::TypeAlias(it) => it.doc_comment_text(), - ast::ConstDef(it) => it.doc_comment_text(), - ast::StaticDef(it) => it.doc_comment_text(), + ast::Const(it) => it.doc_comment_text(), + ast::Static(it) => it.doc_comment_text(), ast::RecordField(it) => it.doc_comment_text(), ast::Variant(it) => it.doc_comment_text(), ast::MacroCall(it) => it.doc_comment_text(), @@ -410,8 +410,8 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> ast::TraitDef(it) => it.short_label(), ast::Module(it) => it.short_label(), ast::TypeAlias(it) => it.short_label(), - ast::ConstDef(it) => it.short_label(), - ast::StaticDef(it) => it.short_label(), + ast::Const(it) => it.short_label(), + ast::Static(it) => it.short_label(), ast::RecordField(it) => it.short_label(), ast::Variant(it) => it.short_label(), _ => None, -- cgit v1.2.3 From c83467796b6c7365ea4f41900d74444384a9e618 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 18:17:28 +0200 Subject: Finalize Trait grammar --- crates/ra_ide/src/display/navigation_target.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/display/navigation_target.rs') diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index 9e2c01245..45fbc86ef 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -382,7 +382,7 @@ pub(crate) fn docs_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> Option ast::Fn(it) => it.doc_comment_text(), ast::Struct(it) => it.doc_comment_text(), ast::Enum(it) => it.doc_comment_text(), - ast::TraitDef(it) => it.doc_comment_text(), + ast::Trait(it) => it.doc_comment_text(), ast::Module(it) => it.doc_comment_text(), ast::TypeAlias(it) => it.doc_comment_text(), ast::Const(it) => it.doc_comment_text(), @@ -407,7 +407,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) -> ast::Fn(it) => it.short_label(), ast::Struct(it) => it.short_label(), ast::Enum(it) => it.short_label(), - ast::TraitDef(it) => it.short_label(), + ast::Trait(it) => it.short_label(), ast::Module(it) => it.short_label(), ast::TypeAlias(it) => it.short_label(), ast::Const(it) => it.short_label(), -- cgit v1.2.3 From 98181087984157e27faba0b969e384f3c62c39d5 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 20:09:09 +0200 Subject: Rename BindPat -> IdentPat --- crates/ra_ide/src/display/navigation_target.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/display/navigation_target.rs') diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index 45fbc86ef..d70e33e72 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -7,7 +7,7 @@ use ra_ide_db::{defs::Definition, RootDatabase}; use ra_syntax::{ ast::{self, DocCommentsOwner, NameOwner}, match_ast, AstNode, SmolStr, - SyntaxKind::{self, BIND_PAT, TYPE_PARAM}, + SyntaxKind::{self, IDENT_PAT, TYPE_PARAM}, TextRange, }; @@ -339,7 +339,7 @@ impl ToNav for hir::Local { NavigationTarget { file_id: full_range.file_id, name, - kind: BIND_PAT, + kind: IDENT_PAT, full_range: full_range.range, focus_range: None, container_name: None, -- cgit v1.2.3 From af53d5f4b081ad50d8fe08fc1e107aa6025b2491 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 31 Jul 2020 20:23:52 +0200 Subject: Rename --- crates/ra_ide/src/display/navigation_target.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_ide/src/display/navigation_target.rs') diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index d70e33e72..fdbf75abd 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -253,7 +253,7 @@ impl ToNav for hir::ImplDef { let focus_range = if derive_attr.is_some() { None } else { - src.value.target_type().map(|ty| original_range(db, src.with_value(ty.syntax())).range) + src.value.self_ty().map(|ty| original_range(db, src.with_value(ty.syntax())).range) }; NavigationTarget::from_syntax( -- cgit v1.2.3