diff options
Diffstat (limited to 'crates/ra_ide_api')
-rw-r--r-- | crates/ra_ide_api/src/completion.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_api/src/goto_definition.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide_api/src/hover.rs | 4 | ||||
-rw-r--r-- | crates/ra_ide_api/src/symbol_index.rs | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/crates/ra_ide_api/src/completion.rs b/crates/ra_ide_api/src/completion.rs index c8022f94f..639942f7b 100644 --- a/crates/ra_ide_api/src/completion.rs +++ b/crates/ra_ide_api/src/completion.rs | |||
@@ -102,7 +102,7 @@ pub fn const_label(node: &ast::ConstDef) -> String { | |||
102 | label.trim().to_owned() | 102 | label.trim().to_owned() |
103 | } | 103 | } |
104 | 104 | ||
105 | pub fn type_label(node: &ast::TypeDef) -> String { | 105 | pub fn type_label(node: &ast::TypeAliasDef) -> String { |
106 | let label: String = node | 106 | let label: String = node |
107 | .syntax() | 107 | .syntax() |
108 | .children() | 108 | .children() |
diff --git a/crates/ra_ide_api/src/goto_definition.rs b/crates/ra_ide_api/src/goto_definition.rs index 4dac96bfe..1833e57d5 100644 --- a/crates/ra_ide_api/src/goto_definition.rs +++ b/crates/ra_ide_api/src/goto_definition.rs | |||
@@ -141,7 +141,7 @@ fn named_target(file_id: FileId, node: &SyntaxNode) -> Option<NavigationTarget> | |||
141 | .visit(|node: &ast::EnumDef| NavigationTarget::from_named(file_id, node)) | 141 | .visit(|node: &ast::EnumDef| NavigationTarget::from_named(file_id, node)) |
142 | .visit(|node: &ast::EnumVariant| NavigationTarget::from_named(file_id, node)) | 142 | .visit(|node: &ast::EnumVariant| NavigationTarget::from_named(file_id, node)) |
143 | .visit(|node: &ast::FnDef| NavigationTarget::from_named(file_id, node)) | 143 | .visit(|node: &ast::FnDef| NavigationTarget::from_named(file_id, node)) |
144 | .visit(|node: &ast::TypeDef| NavigationTarget::from_named(file_id, node)) | 144 | .visit(|node: &ast::TypeAliasDef| NavigationTarget::from_named(file_id, node)) |
145 | .visit(|node: &ast::ConstDef| NavigationTarget::from_named(file_id, node)) | 145 | .visit(|node: &ast::ConstDef| NavigationTarget::from_named(file_id, node)) |
146 | .visit(|node: &ast::StaticDef| NavigationTarget::from_named(file_id, node)) | 146 | .visit(|node: &ast::StaticDef| NavigationTarget::from_named(file_id, node)) |
147 | .visit(|node: &ast::TraitDef| NavigationTarget::from_named(file_id, node)) | 147 | .visit(|node: &ast::TraitDef| NavigationTarget::from_named(file_id, node)) |
@@ -327,7 +327,7 @@ mod tests { | |||
327 | //- /lib.rs | 327 | //- /lib.rs |
328 | type Thing<|> = Option<()>; | 328 | type Thing<|> = Option<()>; |
329 | "#, | 329 | "#, |
330 | "Thing TYPE_DEF FileId(1) [0; 24) [5; 10)", | 330 | "Thing TYPE_ALIAS_DEF FileId(1) [0; 24) [5; 10)", |
331 | ); | 331 | ); |
332 | 332 | ||
333 | check_goto( | 333 | check_goto( |
diff --git a/crates/ra_ide_api/src/hover.rs b/crates/ra_ide_api/src/hover.rs index c62683ad4..364bf9f74 100644 --- a/crates/ra_ide_api/src/hover.rs +++ b/crates/ra_ide_api/src/hover.rs | |||
@@ -105,7 +105,7 @@ impl NavigationTarget { | |||
105 | .visit(doc_comments::<ast::EnumDef>) | 105 | .visit(doc_comments::<ast::EnumDef>) |
106 | .visit(doc_comments::<ast::TraitDef>) | 106 | .visit(doc_comments::<ast::TraitDef>) |
107 | .visit(doc_comments::<ast::Module>) | 107 | .visit(doc_comments::<ast::Module>) |
108 | .visit(doc_comments::<ast::TypeDef>) | 108 | .visit(doc_comments::<ast::TypeAliasDef>) |
109 | .visit(doc_comments::<ast::ConstDef>) | 109 | .visit(doc_comments::<ast::ConstDef>) |
110 | .visit(doc_comments::<ast::StaticDef>) | 110 | .visit(doc_comments::<ast::StaticDef>) |
111 | .accept(&node)? | 111 | .accept(&node)? |
@@ -135,7 +135,7 @@ impl NavigationTarget { | |||
135 | .visit(|node: &ast::EnumDef| visit_node(node, "enum ")) | 135 | .visit(|node: &ast::EnumDef| visit_node(node, "enum ")) |
136 | .visit(|node: &ast::TraitDef| visit_node(node, "trait ")) | 136 | .visit(|node: &ast::TraitDef| visit_node(node, "trait ")) |
137 | .visit(|node: &ast::Module| visit_node(node, "mod ")) | 137 | .visit(|node: &ast::Module| visit_node(node, "mod ")) |
138 | .visit(|node: &ast::TypeDef| visit_node(node, "type ")) | 138 | .visit(|node: &ast::TypeAliasDef| visit_node(node, "type ")) |
139 | .visit(|node: &ast::ConstDef| visit_node(node, "const ")) | 139 | .visit(|node: &ast::ConstDef| visit_node(node, "const ")) |
140 | .visit(|node: &ast::StaticDef| visit_node(node, "static ")) | 140 | .visit(|node: &ast::StaticDef| visit_node(node, "static ")) |
141 | .accept(&node)? | 141 | .accept(&node)? |
diff --git a/crates/ra_ide_api/src/symbol_index.rs b/crates/ra_ide_api/src/symbol_index.rs index 93bdf05d8..414327ac2 100644 --- a/crates/ra_ide_api/src/symbol_index.rs +++ b/crates/ra_ide_api/src/symbol_index.rs | |||
@@ -196,7 +196,7 @@ impl Query { | |||
196 | 196 | ||
197 | fn is_type(kind: SyntaxKind) -> bool { | 197 | fn is_type(kind: SyntaxKind) -> bool { |
198 | match kind { | 198 | match kind { |
199 | STRUCT_DEF | ENUM_DEF | TRAIT_DEF | TYPE_DEF => true, | 199 | STRUCT_DEF | ENUM_DEF | TRAIT_DEF | TYPE_ALIAS_DEF => true, |
200 | _ => false, | 200 | _ => false, |
201 | } | 201 | } |
202 | } | 202 | } |
@@ -253,7 +253,7 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { | |||
253 | .visit(decl::<ast::EnumDef>) | 253 | .visit(decl::<ast::EnumDef>) |
254 | .visit(decl::<ast::TraitDef>) | 254 | .visit(decl::<ast::TraitDef>) |
255 | .visit(decl::<ast::Module>) | 255 | .visit(decl::<ast::Module>) |
256 | .visit(decl::<ast::TypeDef>) | 256 | .visit(decl::<ast::TypeAliasDef>) |
257 | .visit(decl::<ast::ConstDef>) | 257 | .visit(decl::<ast::ConstDef>) |
258 | .visit(decl::<ast::StaticDef>) | 258 | .visit(decl::<ast::StaticDef>) |
259 | .accept(node)? | 259 | .accept(node)? |