aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 16:56:53 +0100
committerAleksey Kladov <[email protected]>2020-07-30 16:56:53 +0100
commit1766aae145c6925a33e427f2fe6ef2a56c301665 (patch)
treedfcf22990794a5990602a468b862d544fbe63f0a /crates/ra_ide
parent609680ef97dbf82c07b6b06e21aa366423892304 (diff)
Rename EnumVariant -> Variant
Diffstat (limited to 'crates/ra_ide')
-rw-r--r--crates/ra_ide/src/display/navigation_target.rs4
-rw-r--r--crates/ra_ide/src/display/short_label.rs2
-rw-r--r--crates/ra_ide/src/extend_selection.rs2
-rw-r--r--crates/ra_ide/src/file_structure.rs6
-rw-r--r--crates/ra_ide/src/folding_ranges.rs2
-rw-r--r--crates/ra_ide/src/references.rs2
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs2
7 files changed, 10 insertions, 10 deletions
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
388 ast::ConstDef(it) => it.doc_comment_text(), 388 ast::ConstDef(it) => it.doc_comment_text(),
389 ast::StaticDef(it) => it.doc_comment_text(), 389 ast::StaticDef(it) => it.doc_comment_text(),
390 ast::RecordField(it) => it.doc_comment_text(), 390 ast::RecordField(it) => it.doc_comment_text(),
391 ast::EnumVariant(it) => it.doc_comment_text(), 391 ast::Variant(it) => it.doc_comment_text(),
392 ast::MacroCall(it) => it.doc_comment_text(), 392 ast::MacroCall(it) => it.doc_comment_text(),
393 _ => None, 393 _ => None,
394 } 394 }
@@ -413,7 +413,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) ->
413 ast::ConstDef(it) => it.short_label(), 413 ast::ConstDef(it) => it.short_label(),
414 ast::StaticDef(it) => it.short_label(), 414 ast::StaticDef(it) => it.short_label(),
415 ast::RecordField(it) => it.short_label(), 415 ast::RecordField(it) => it.short_label(),
416 ast::EnumVariant(it) => it.short_label(), 416 ast::Variant(it) => it.short_label(),
417 _ => None, 417 _ => None,
418 } 418 }
419 } 419 }
diff --git a/crates/ra_ide/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs
index 5bf70937f..ddf1059ee 100644
--- a/crates/ra_ide/src/display/short_label.rs
+++ b/crates/ra_ide/src/display/short_label.rs
@@ -71,7 +71,7 @@ impl ShortLabel for ast::RecordField {
71 } 71 }
72} 72}
73 73
74impl ShortLabel for ast::EnumVariant { 74impl ShortLabel for ast::Variant {
75 fn short_label(&self) -> Option<String> { 75 fn short_label(&self) -> Option<String> {
76 Some(self.name()?.text().to_string()) 76 Some(self.name()?.text().to_string())
77 } 77 }
diff --git a/crates/ra_ide/src/extend_selection.rs b/crates/ra_ide/src/extend_selection.rs
index 04a7f0ac4..fc81b48cc 100644
--- a/crates/ra_ide/src/extend_selection.rs
+++ b/crates/ra_ide/src/extend_selection.rs
@@ -42,7 +42,7 @@ fn try_extend_selection(
42 RECORD_FIELD_LIST, 42 RECORD_FIELD_LIST,
43 TUPLE_FIELD_LIST, 43 TUPLE_FIELD_LIST,
44 RECORD_EXPR_FIELD_LIST, 44 RECORD_EXPR_FIELD_LIST,
45 ENUM_VARIANT_LIST, 45 VARIANT_LIST,
46 USE_TREE_LIST, 46 USE_TREE_LIST,
47 GENERIC_PARAM_LIST, 47 GENERIC_PARAM_LIST,
48 TYPE_ARG_LIST, 48 TYPE_ARG_LIST,
diff --git a/crates/ra_ide/src/file_structure.rs b/crates/ra_ide/src/file_structure.rs
index c909f96aa..43202499d 100644
--- a/crates/ra_ide/src/file_structure.rs
+++ b/crates/ra_ide/src/file_structure.rs
@@ -129,7 +129,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
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::Enum(it) => decl(it), 131 ast::Enum(it) => decl(it),
132 ast::EnumVariant(it) => decl(it), 132 ast::Variant(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),
135 ast::TypeAlias(it) => { 135 ast::TypeAlias(it) => {
@@ -319,7 +319,7 @@ fn very_obsolete() {}
319 label: "X", 319 label: "X",
320 navigation_range: 169..170, 320 navigation_range: 169..170,
321 node_range: 169..170, 321 node_range: 169..170,
322 kind: ENUM_VARIANT, 322 kind: VARIANT,
323 detail: None, 323 detail: None,
324 deprecated: false, 324 deprecated: false,
325 }, 325 },
@@ -330,7 +330,7 @@ fn very_obsolete() {}
330 label: "Y", 330 label: "Y",
331 navigation_range: 172..173, 331 navigation_range: 172..173,
332 node_range: 172..178, 332 node_range: 172..178,
333 kind: ENUM_VARIANT, 333 kind: VARIANT,
334 detail: None, 334 detail: None,
335 deprecated: false, 335 deprecated: false,
336 }, 336 },
diff --git a/crates/ra_ide/src/folding_ranges.rs b/crates/ra_ide/src/folding_ranges.rs
index 8dcce9f56..5a6e17936 100644
--- a/crates/ra_ide/src/folding_ranges.rs
+++ b/crates/ra_ide/src/folding_ranges.rs
@@ -93,7 +93,7 @@ fn fold_kind(kind: SyntaxKind) -> Option<FoldKind> {
93 | USE_TREE_LIST 93 | USE_TREE_LIST
94 | BLOCK_EXPR 94 | BLOCK_EXPR
95 | MATCH_ARM_LIST 95 | MATCH_ARM_LIST
96 | ENUM_VARIANT_LIST 96 | VARIANT_LIST
97 | TOKEN_TREE => Some(FoldKind::Block), 97 | TOKEN_TREE => Some(FoldKind::Block),
98 _ => None, 98 _ => None,
99 } 99 }
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs
index 2a62dab6c..519e4bf1a 100644
--- a/crates/ra_ide/src/references.rs
+++ b/crates/ra_ide/src/references.rs
@@ -390,7 +390,7 @@ enum Foo {
390} 390}
391"#, 391"#,
392 ); 392 );
393 check_result(refs, "B ENUM_VARIANT FileId(1) 22..23 22..23 Other", &[]); 393 check_result(refs, "B VARIANT FileId(1) 22..23 22..23 Other", &[]);
394 } 394 }
395 395
396 #[test] 396 #[test]
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index 7e2833bd5..ce890c816 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -716,7 +716,7 @@ fn highlight_name_by_syntax(name: ast::Name) -> Highlight {
716 FN => HighlightTag::Function, 716 FN => HighlightTag::Function,
717 CONST_DEF => HighlightTag::Constant, 717 CONST_DEF => HighlightTag::Constant,
718 STATIC_DEF => HighlightTag::Static, 718 STATIC_DEF => HighlightTag::Static,
719 ENUM_VARIANT => HighlightTag::EnumVariant, 719 VARIANT => HighlightTag::EnumVariant,
720 BIND_PAT => HighlightTag::Local, 720 BIND_PAT => HighlightTag::Local,
721 _ => default, 721 _ => default,
722 }; 722 };