aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-07-30 17:07:32 +0100
committerGitHub <[email protected]>2020-07-30 17:07:32 +0100
commit8de0eb904baf1fa261a7825402bb3adf0c23b843 (patch)
tree34296539101d8db4a484c472a45a1e30503791ef /crates/ra_ide
parent97df465391f50521c5102474d7e0ee2ea61ef48e (diff)
parent609680ef97dbf82c07b6b06e21aa366423892304 (diff)
Merge #5603
5603: Rename EnumDef -> Enum r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs8
-rw-r--r--crates/ra_ide/src/display/short_label.rs2
-rw-r--r--crates/ra_ide/src/file_structure.rs4
-rw-r--r--crates/ra_ide/src/goto_implementation.rs2
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs2
5 files changed, 9 insertions, 9 deletions
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
381 match node { 381 match node {
382 ast::Fn(it) => it.doc_comment_text(), 382 ast::Fn(it) => it.doc_comment_text(),
383 ast::Struct(it) => it.doc_comment_text(), 383 ast::Struct(it) => it.doc_comment_text(),
384 ast::EnumDef(it) => it.doc_comment_text(), 384 ast::Enum(it) => it.doc_comment_text(),
385 ast::TraitDef(it) => it.doc_comment_text(), 385 ast::TraitDef(it) => it.doc_comment_text(),
386 ast::Module(it) => it.doc_comment_text(), 386 ast::Module(it) => it.doc_comment_text(),
387 ast::TypeAlias(it) => it.doc_comment_text(), 387 ast::TypeAlias(it) => it.doc_comment_text(),
@@ -406,7 +406,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) ->
406 match node { 406 match node {
407 ast::Fn(it) => it.short_label(), 407 ast::Fn(it) => it.short_label(),
408 ast::Struct(it) => it.short_label(), 408 ast::Struct(it) => it.short_label(),
409 ast::EnumDef(it) => it.short_label(), 409 ast::Enum(it) => it.short_label(),
410 ast::TraitDef(it) => it.short_label(), 410 ast::TraitDef(it) => it.short_label(),
411 ast::Module(it) => it.short_label(), 411 ast::Module(it) => it.short_label(),
412 ast::TypeAlias(it) => it.short_label(), 412 ast::TypeAlias(it) => it.short_label(),
@@ -446,7 +446,7 @@ fn foo() { enum FooInner { } }
446 5..13, 446 5..13,
447 ), 447 ),
448 name: "FooInner", 448 name: "FooInner",
449 kind: ENUM_DEF, 449 kind: ENUM,
450 container_name: None, 450 container_name: None,
451 description: Some( 451 description: Some(
452 "enum FooInner", 452 "enum FooInner",
@@ -462,7 +462,7 @@ fn foo() { enum FooInner { } }
462 34..42, 462 34..42,
463 ), 463 ),
464 name: "FooInner", 464 name: "FooInner",
465 kind: ENUM_DEF, 465 kind: ENUM,
466 container_name: Some( 466 container_name: Some(
467 "foo", 467 "foo",
468 ), 468 ),
diff --git a/crates/ra_ide/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs
index 504b884c5..5bf70937f 100644
--- a/crates/ra_ide/src/display/short_label.rs
+++ b/crates/ra_ide/src/display/short_label.rs
@@ -25,7 +25,7 @@ impl ShortLabel for ast::Union {
25 } 25 }
26} 26}
27 27
28impl ShortLabel for ast::EnumDef { 28impl ShortLabel for ast::Enum {
29 fn short_label(&self) -> Option<String> { 29 fn short_label(&self) -> Option<String> {
30 short_label_from_node(self, "enum ") 30 short_label_from_node(self, "enum ")
31 } 31 }
diff --git a/crates/ra_ide/src/file_structure.rs b/crates/ra_ide/src/file_structure.rs
index 6f198fcbc..c909f96aa 100644
--- a/crates/ra_ide/src/file_structure.rs
+++ b/crates/ra_ide/src/file_structure.rs
@@ -128,7 +128,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
128 }, 128 },
129 ast::Struct(it) => decl(it), 129 ast::Struct(it) => decl(it),
130 ast::Union(it) => decl(it), 130 ast::Union(it) => decl(it),
131 ast::EnumDef(it) => decl(it), 131 ast::Enum(it) => decl(it),
132 ast::EnumVariant(it) => decl(it), 132 ast::EnumVariant(it) => decl(it),
133 ast::TraitDef(it) => decl(it), 133 ast::TraitDef(it) => decl(it),
134 ast::Module(it) => decl(it), 134 ast::Module(it) => decl(it),
@@ -308,7 +308,7 @@ fn very_obsolete() {}
308 label: "E", 308 label: "E",
309 navigation_range: 165..166, 309 navigation_range: 165..166,
310 node_range: 160..180, 310 node_range: 160..180,
311 kind: ENUM_DEF, 311 kind: ENUM,
312 detail: None, 312 detail: None,
313 deprecated: false, 313 deprecated: false,
314 }, 314 },
diff --git a/crates/ra_ide/src/goto_implementation.rs b/crates/ra_ide/src/goto_implementation.rs
index 699fad57d..e2f7e6373 100644
--- a/crates/ra_ide/src/goto_implementation.rs
+++ b/crates/ra_ide/src/goto_implementation.rs
@@ -45,7 +45,7 @@ fn impls_for_def(
45) -> Option<Vec<NavigationTarget>> { 45) -> Option<Vec<NavigationTarget>> {
46 let ty = match node { 46 let ty = match node {
47 ast::AdtDef::Struct(def) => sema.to_def(def)?.ty(sema.db), 47 ast::AdtDef::Struct(def) => sema.to_def(def)?.ty(sema.db),
48 ast::AdtDef::EnumDef(def) => sema.to_def(def)?.ty(sema.db), 48 ast::AdtDef::Enum(def) => sema.to_def(def)?.ty(sema.db),
49 ast::AdtDef::Union(def) => sema.to_def(def)?.ty(sema.db), 49 ast::AdtDef::Union(def) => sema.to_def(def)?.ty(sema.db),
50 }; 50 };
51 51
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index ba1fd6242..7e2833bd5 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -706,7 +706,7 @@ fn highlight_name_by_syntax(name: ast::Name) -> Highlight {
706 706
707 let tag = match parent.kind() { 707 let tag = match parent.kind() {
708 STRUCT => HighlightTag::Struct, 708 STRUCT => HighlightTag::Struct,
709 ENUM_DEF => HighlightTag::Enum, 709 ENUM => HighlightTag::Enum,
710 UNION => HighlightTag::Union, 710 UNION => HighlightTag::Union,
711 TRAIT_DEF => HighlightTag::Trait, 711 TRAIT_DEF => HighlightTag::Trait,
712 TYPE_ALIAS => HighlightTag::TypeAlias, 712 TYPE_ALIAS => HighlightTag::TypeAlias,