aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-07-30 14:25:46 +0100
committerAleksey Kladov <[email protected]>2020-07-30 14:25:46 +0100
commiteb2f8063444b11257111f4f8ade990ec810e0361 (patch)
tree999cef9fc647293699515f1e0ac59492e64c1116 /crates
parent1142112c70b705f59b7d559d9d72cdc831865158 (diff)
Rename TypeAliasDef -> TypeAlias
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_assists/src/handlers/add_missing_impl_members.rs8
-rw-r--r--crates/ra_assists/src/handlers/change_visibility.rs4
-rw-r--r--crates/ra_assists/src/utils.rs2
-rw-r--r--crates/ra_hir/src/has_source.rs4
-rw-r--r--crates/ra_hir/src/semantics.rs2
-rw-r--r--crates/ra_hir/src/semantics/source_to_def.rs9
-rw-r--r--crates/ra_hir_def/src/body/lower.rs2
-rw-r--r--crates/ra_hir_def/src/item_tree.rs4
-rw-r--r--crates/ra_hir_def/src/item_tree/lower.rs8
-rw-r--r--crates/ra_hir_def/src/item_tree/tests.rs2
-rw-r--r--crates/ra_hir_def/src/keys.rs2
-rw-r--r--crates/ra_ide/src/completion/complete_trait_impl.rs6
-rw-r--r--crates/ra_ide/src/display.rs2
-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/file_structure.rs4
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs2
-rw-r--r--crates/ra_ide_db/src/defs.rs2
-rw-r--r--crates/ra_ide_db/src/symbol_index.rs4
-rw-r--r--crates/ra_parser/src/grammar/items.rs2
-rw-r--r--crates/ra_parser/src/syntax_kind/generated.rs2
-rw-r--r--crates/ra_syntax/src/ast/edit.rs4
-rw-r--r--crates/ra_syntax/src/ast/generated/nodes.rs92
-rw-r--r--crates/ra_syntax/src/ast/node_ext.rs2
-rw-r--r--crates/ra_syntax/src/parsing/text_tree_sink.rs2
-rw-r--r--crates/ra_syntax/src/validation.rs4
-rw-r--r--crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast8
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast8
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rast6
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rast8
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast6
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast4
-rw-r--r--crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast2
-rw-r--r--crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast2
-rw-r--r--crates/rust-analyzer/src/to_proto.rs2
63 files changed, 139 insertions, 148 deletions
diff --git a/crates/ra_assists/src/handlers/add_missing_impl_members.rs b/crates/ra_assists/src/handlers/add_missing_impl_members.rs
index 4f377e37f..1e4d4748c 100644
--- a/crates/ra_assists/src/handlers/add_missing_impl_members.rs
+++ b/crates/ra_assists/src/handlers/add_missing_impl_members.rs
@@ -119,7 +119,7 @@ fn add_missing_impl_members_inner(
119 let def_name = |item: &ast::AssocItem| -> Option<SmolStr> { 119 let def_name = |item: &ast::AssocItem| -> Option<SmolStr> {
120 match item { 120 match item {
121 ast::AssocItem::Fn(def) => def.name(), 121 ast::AssocItem::Fn(def) => def.name(),
122 ast::AssocItem::TypeAliasDef(def) => def.name(), 122 ast::AssocItem::TypeAlias(def) => def.name(),
123 ast::AssocItem::ConstDef(def) => def.name(), 123 ast::AssocItem::ConstDef(def) => def.name(),
124 ast::AssocItem::MacroCall(_) => None, 124 ast::AssocItem::MacroCall(_) => None,
125 } 125 }
@@ -130,7 +130,7 @@ fn add_missing_impl_members_inner(
130 .iter() 130 .iter()
131 .map(|i| match i { 131 .map(|i| match i {
132 hir::AssocItem::Function(i) => ast::AssocItem::Fn(i.source(ctx.db()).value), 132 hir::AssocItem::Function(i) => ast::AssocItem::Fn(i.source(ctx.db()).value),
133 hir::AssocItem::TypeAlias(i) => ast::AssocItem::TypeAliasDef(i.source(ctx.db()).value), 133 hir::AssocItem::TypeAlias(i) => ast::AssocItem::TypeAlias(i.source(ctx.db()).value),
134 hir::AssocItem::Const(i) => ast::AssocItem::ConstDef(i.source(ctx.db()).value), 134 hir::AssocItem::Const(i) => ast::AssocItem::ConstDef(i.source(ctx.db()).value),
135 }) 135 })
136 .filter(|t| def_name(&t).is_some()) 136 .filter(|t| def_name(&t).is_some())
@@ -159,9 +159,7 @@ fn add_missing_impl_members_inner(
159 .map(|it| ast_transform::apply(&*ast_transform, it)) 159 .map(|it| ast_transform::apply(&*ast_transform, it))
160 .map(|it| match it { 160 .map(|it| match it {
161 ast::AssocItem::Fn(def) => ast::AssocItem::Fn(add_body(def)), 161 ast::AssocItem::Fn(def) => ast::AssocItem::Fn(add_body(def)),
162 ast::AssocItem::TypeAliasDef(def) => { 162 ast::AssocItem::TypeAlias(def) => ast::AssocItem::TypeAlias(def.remove_bounds()),
163 ast::AssocItem::TypeAliasDef(def.remove_bounds())
164 }
165 _ => it, 163 _ => it,
166 }) 164 })
167 .map(|it| edit::remove_attrs_and_docs(&it)); 165 .map(|it| edit::remove_attrs_and_docs(&it));
diff --git a/crates/ra_assists/src/handlers/change_visibility.rs b/crates/ra_assists/src/handlers/change_visibility.rs
index 67b46376e..c3e1f2803 100644
--- a/crates/ra_assists/src/handlers/change_visibility.rs
+++ b/crates/ra_assists/src/handlers/change_visibility.rs
@@ -1,9 +1,7 @@
1use ra_syntax::{ 1use ra_syntax::{
2 ast::{self, NameOwner, VisibilityOwner}, 2 ast::{self, NameOwner, VisibilityOwner},
3 AstNode, 3 AstNode,
4 SyntaxKind::{ 4 SyntaxKind::{CONST_DEF, ENUM_DEF, FN, MODULE, STATIC_DEF, STRUCT_DEF, TRAIT_DEF, VISIBILITY},
5 CONST_DEF, ENUM_DEF, FN, MODULE, STATIC_DEF, STRUCT_DEF, TRAIT_DEF, VISIBILITY,
6 },
7 T, 5 T,
8}; 6};
9use test_utils::mark; 7use test_utils::mark;
diff --git a/crates/ra_assists/src/utils.rs b/crates/ra_assists/src/utils.rs
index 4478ea0e2..748be011b 100644
--- a/crates/ra_assists/src/utils.rs
+++ b/crates/ra_assists/src/utils.rs
@@ -72,7 +72,7 @@ pub fn get_missing_assoc_items(
72 } 72 }
73 } 73 }
74 74
75 ast::AssocItem::TypeAliasDef(t) => { 75 ast::AssocItem::TypeAlias(t) => {
76 if let Some(n) = t.name() { 76 if let Some(n) = t.name() {
77 impl_type.insert(n.syntax().to_string()); 77 impl_type.insert(n.syntax().to_string());
78 } 78 }
diff --git a/crates/ra_hir/src/has_source.rs b/crates/ra_hir/src/has_source.rs
index f32b8cbb9..1557b7c83 100644
--- a/crates/ra_hir/src/has_source.rs
+++ b/crates/ra_hir/src/has_source.rs
@@ -105,8 +105,8 @@ impl HasSource for Trait {
105 } 105 }
106} 106}
107impl HasSource for TypeAlias { 107impl HasSource for TypeAlias {
108 type Ast = ast::TypeAliasDef; 108 type Ast = ast::TypeAlias;
109 fn source(self, db: &dyn HirDatabase) -> InFile<ast::TypeAliasDef> { 109 fn source(self, db: &dyn HirDatabase) -> InFile<ast::TypeAlias> {
110 self.id.lookup(db.upcast()).source(db.upcast()) 110 self.id.lookup(db.upcast()).source(db.upcast())
111 } 111 }
112} 112}
diff --git a/crates/ra_hir/src/semantics.rs b/crates/ra_hir/src/semantics.rs
index 0b634f23e..054405966 100644
--- a/crates/ra_hir/src/semantics.rs
+++ b/crates/ra_hir/src/semantics.rs
@@ -582,7 +582,7 @@ to_def_impls![
582 (crate::Union, ast::UnionDef, union_to_def), 582 (crate::Union, ast::UnionDef, union_to_def),
583 (crate::Trait, ast::TraitDef, trait_to_def), 583 (crate::Trait, ast::TraitDef, trait_to_def),
584 (crate::ImplDef, ast::ImplDef, impl_to_def), 584 (crate::ImplDef, ast::ImplDef, impl_to_def),
585 (crate::TypeAlias, ast::TypeAliasDef, type_alias_to_def), 585 (crate::TypeAlias, ast::TypeAlias, type_alias_to_def),
586 (crate::Const, ast::ConstDef, const_to_def), 586 (crate::Const, ast::ConstDef, const_to_def),
587 (crate::Static, ast::StaticDef, static_to_def), 587 (crate::Static, ast::StaticDef, static_to_def),
588 (crate::Function, ast::Fn, fn_to_def), 588 (crate::Function, ast::Fn, fn_to_def),
diff --git a/crates/ra_hir/src/semantics/source_to_def.rs b/crates/ra_hir/src/semantics/source_to_def.rs
index 4118de2e2..d23a1974b 100644
--- a/crates/ra_hir/src/semantics/source_to_def.rs
+++ b/crates/ra_hir/src/semantics/source_to_def.rs
@@ -89,10 +89,7 @@ impl SourceToDefCtx<'_, '_> {
89 pub(super) fn const_to_def(&mut self, src: InFile<ast::ConstDef>) -> Option<ConstId> { 89 pub(super) fn const_to_def(&mut self, src: InFile<ast::ConstDef>) -> Option<ConstId> {
90 self.to_def(src, keys::CONST) 90 self.to_def(src, keys::CONST)
91 } 91 }
92 pub(super) fn type_alias_to_def( 92 pub(super) fn type_alias_to_def(&mut self, src: InFile<ast::TypeAlias>) -> Option<TypeAliasId> {
93 &mut self,
94 src: InFile<ast::TypeAliasDef>,
95 ) -> Option<TypeAliasId> {
96 self.to_def(src, keys::TYPE_ALIAS) 93 self.to_def(src, keys::TYPE_ALIAS)
97 } 94 }
98 pub(super) fn record_field_to_def( 95 pub(super) fn record_field_to_def(
@@ -195,7 +192,7 @@ impl SourceToDefCtx<'_, '_> {
195 let def = self.const_to_def(container.with_value(it))?; 192 let def = self.const_to_def(container.with_value(it))?;
196 DefWithBodyId::from(def).into() 193 DefWithBodyId::from(def).into()
197 }, 194 },
198 ast::TypeAliasDef(it) => { 195 ast::TypeAlias(it) => {
199 let def = self.type_alias_to_def(container.with_value(it))?; 196 let def = self.type_alias_to_def(container.with_value(it))?;
200 def.into() 197 def.into()
201 }, 198 },
@@ -217,7 +214,7 @@ impl SourceToDefCtx<'_, '_> {
217 ast::StructDef(it) => self.struct_to_def(container.with_value(it))?.into(), 214 ast::StructDef(it) => self.struct_to_def(container.with_value(it))?.into(),
218 ast::EnumDef(it) => self.enum_to_def(container.with_value(it))?.into(), 215 ast::EnumDef(it) => self.enum_to_def(container.with_value(it))?.into(),
219 ast::TraitDef(it) => self.trait_to_def(container.with_value(it))?.into(), 216 ast::TraitDef(it) => self.trait_to_def(container.with_value(it))?.into(),
220 ast::TypeAliasDef(it) => self.type_alias_to_def(container.with_value(it))?.into(), 217 ast::TypeAlias(it) => self.type_alias_to_def(container.with_value(it))?.into(),
221 ast::ImplDef(it) => self.impl_to_def(container.with_value(it))?.into(), 218 ast::ImplDef(it) => self.impl_to_def(container.with_value(it))?.into(),
222 _ => continue, 219 _ => continue,
223 } 220 }
diff --git a/crates/ra_hir_def/src/body/lower.rs b/crates/ra_hir_def/src/body/lower.rs
index 6b13f013d..f463997e7 100644
--- a/crates/ra_hir_def/src/body/lower.rs
+++ b/crates/ra_hir_def/src/body/lower.rs
@@ -634,7 +634,7 @@ impl ExprCollector<'_> {
634 def.name(), 634 def.name(),
635 ) 635 )
636 } 636 }
637 ast::Item::TypeAliasDef(def) => { 637 ast::Item::TypeAlias(def) => {
638 let id = self.find_inner_item(&def)?; 638 let id = self.find_inner_item(&def)?;
639 ( 639 (
640 TypeAliasLoc { container: container.into(), id }.intern(self.db).into(), 640 TypeAliasLoc { container: container.into(), id }.intern(self.db).into(),
diff --git a/crates/ra_hir_def/src/item_tree.rs b/crates/ra_hir_def/src/item_tree.rs
index 34fc9ff8e..ea61ac217 100644
--- a/crates/ra_hir_def/src/item_tree.rs
+++ b/crates/ra_hir_def/src/item_tree.rs
@@ -421,7 +421,7 @@ mod_items! {
421 Static in statics -> ast::StaticDef, 421 Static in statics -> ast::StaticDef,
422 Trait in traits -> ast::TraitDef, 422 Trait in traits -> ast::TraitDef,
423 Impl in impls -> ast::ImplDef, 423 Impl in impls -> ast::ImplDef,
424 TypeAlias in type_aliases -> ast::TypeAliasDef, 424 TypeAlias in type_aliases -> ast::TypeAlias,
425 Mod in mods -> ast::Module, 425 Mod in mods -> ast::Module,
426 MacroCall in macro_calls -> ast::MacroCall, 426 MacroCall in macro_calls -> ast::MacroCall,
427} 427}
@@ -592,7 +592,7 @@ pub struct TypeAlias {
592 pub bounds: Box<[TypeBound]>, 592 pub bounds: Box<[TypeBound]>,
593 pub generic_params: GenericParamsId, 593 pub generic_params: GenericParamsId,
594 pub type_ref: Option<TypeRef>, 594 pub type_ref: Option<TypeRef>,
595 pub ast_id: FileAstId<ast::TypeAliasDef>, 595 pub ast_id: FileAstId<ast::TypeAlias>,
596} 596}
597 597
598#[derive(Debug, Clone, Eq, PartialEq)] 598#[derive(Debug, Clone, Eq, PartialEq)]
diff --git a/crates/ra_hir_def/src/item_tree/lower.rs b/crates/ra_hir_def/src/item_tree/lower.rs
index 2764d8674..4cfc68f53 100644
--- a/crates/ra_hir_def/src/item_tree/lower.rs
+++ b/crates/ra_hir_def/src/item_tree/lower.rs
@@ -79,7 +79,7 @@ impl Ctx {
79 | ast::Item::UnionDef(_) 79 | ast::Item::UnionDef(_)
80 | ast::Item::EnumDef(_) 80 | ast::Item::EnumDef(_)
81 | ast::Item::Fn(_) 81 | ast::Item::Fn(_)
82 | ast::Item::TypeAliasDef(_) 82 | ast::Item::TypeAlias(_)
83 | ast::Item::ConstDef(_) 83 | ast::Item::ConstDef(_)
84 | ast::Item::StaticDef(_) 84 | ast::Item::StaticDef(_)
85 | ast::Item::MacroCall(_) => { 85 | ast::Item::MacroCall(_) => {
@@ -104,7 +104,7 @@ impl Ctx {
104 ast::Item::UnionDef(ast) => self.lower_union(ast).map(Into::into), 104 ast::Item::UnionDef(ast) => self.lower_union(ast).map(Into::into),
105 ast::Item::EnumDef(ast) => self.lower_enum(ast).map(Into::into), 105 ast::Item::EnumDef(ast) => self.lower_enum(ast).map(Into::into),
106 ast::Item::Fn(ast) => self.lower_function(ast).map(Into::into), 106 ast::Item::Fn(ast) => self.lower_function(ast).map(Into::into),
107 ast::Item::TypeAliasDef(ast) => self.lower_type_alias(ast).map(Into::into), 107 ast::Item::TypeAlias(ast) => self.lower_type_alias(ast).map(Into::into),
108 ast::Item::StaticDef(ast) => self.lower_static(ast).map(Into::into), 108 ast::Item::StaticDef(ast) => self.lower_static(ast).map(Into::into),
109 ast::Item::ConstDef(ast) => Some(self.lower_const(ast).into()), 109 ast::Item::ConstDef(ast) => Some(self.lower_const(ast).into()),
110 ast::Item::Module(ast) => self.lower_module(ast).map(Into::into), 110 ast::Item::Module(ast) => self.lower_module(ast).map(Into::into),
@@ -156,7 +156,7 @@ impl Ctx {
156 fn lower_assoc_item(&mut self, item: &ast::AssocItem) -> Option<AssocItem> { 156 fn lower_assoc_item(&mut self, item: &ast::AssocItem) -> Option<AssocItem> {
157 match item { 157 match item {
158 ast::AssocItem::Fn(ast) => self.lower_function(ast).map(Into::into), 158 ast::AssocItem::Fn(ast) => self.lower_function(ast).map(Into::into),
159 ast::AssocItem::TypeAliasDef(ast) => self.lower_type_alias(ast).map(Into::into), 159 ast::AssocItem::TypeAlias(ast) => self.lower_type_alias(ast).map(Into::into),
160 ast::AssocItem::ConstDef(ast) => Some(self.lower_const(ast).into()), 160 ast::AssocItem::ConstDef(ast) => Some(self.lower_const(ast).into()),
161 ast::AssocItem::MacroCall(ast) => self.lower_macro_call(ast).map(Into::into), 161 ast::AssocItem::MacroCall(ast) => self.lower_macro_call(ast).map(Into::into),
162 } 162 }
@@ -348,7 +348,7 @@ impl Ctx {
348 348
349 fn lower_type_alias( 349 fn lower_type_alias(
350 &mut self, 350 &mut self,
351 type_alias: &ast::TypeAliasDef, 351 type_alias: &ast::TypeAlias,
352 ) -> Option<FileItemTreeId<TypeAlias>> { 352 ) -> Option<FileItemTreeId<TypeAlias>> {
353 let name = type_alias.name()?.as_name(); 353 let name = type_alias.name()?.as_name();
354 let type_ref = type_alias.type_ref().map(|it| self.lower_type_ref(&it)); 354 let type_ref = type_alias.type_ref().map(|it| self.lower_type_ref(&it));
diff --git a/crates/ra_hir_def/src/item_tree/tests.rs b/crates/ra_hir_def/src/item_tree/tests.rs
index 4e2f6008b..a8f5da1c1 100644
--- a/crates/ra_hir_def/src/item_tree/tests.rs
+++ b/crates/ra_hir_def/src/item_tree/tests.rs
@@ -236,7 +236,7 @@ fn smoke() {
236 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("on_trait"))] }, input: None }]) }] 236 #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("on_trait"))] }, input: None }]) }]
237 Trait { name: Name(Text("Tr")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(0), auto: false, items: [TypeAlias(Idx::<TypeAlias>(0)), Const(Idx::<Const>(0)), Function(Idx::<Function>(0)), Function(Idx::<Function>(1))], ast_id: FileAstId::<ra_syntax::ast::generated::nodes::TraitDef>(2) } 237 Trait { name: Name(Text("Tr")), visibility: RawVisibilityId("pub(self)"), generic_params: GenericParamsId(0), auto: false, items: [TypeAlias(Idx::<TypeAlias>(0)), Const(Idx::<Const>(0)), Function(Idx::<Function>(0)), Function(Idx::<Function>(1))], ast_id: FileAstId::<ra_syntax::ast::generated::nodes::TraitDef>(2) }
238 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_ty"))] }, input: None }]) }] 238 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_ty"))] }, input: None }]) }]
239 > TypeAlias { name: Name(Text("AssocTy")), visibility: RawVisibilityId("pub(self)"), bounds: [Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Tr"))] }, generic_args: [Some(GenericArgs { args: [Type(Tuple([]))], has_self_type: false, bindings: [] })] })], generic_params: GenericParamsId(4294967295), type_ref: None, ast_id: FileAstId::<ra_syntax::ast::generated::nodes::TypeAliasDef>(8) } 239 > TypeAlias { name: Name(Text("AssocTy")), visibility: RawVisibilityId("pub(self)"), bounds: [Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("Tr"))] }, generic_args: [Some(GenericArgs { args: [Type(Tuple([]))], has_self_type: false, bindings: [] })] })], generic_params: GenericParamsId(4294967295), type_ref: None, ast_id: FileAstId::<ra_syntax::ast::generated::nodes::TypeAlias>(8) }
240 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_const"))] }, input: None }]) }] 240 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_const"))] }, input: None }]) }]
241 > Const { name: Some(Name(Text("CONST"))), visibility: RawVisibilityId("pub(self)"), type_ref: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("u8"))] }, generic_args: [None] }), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::ConstDef>(9) } 241 > Const { name: Some(Name(Text("CONST"))), visibility: RawVisibilityId("pub(self)"), type_ref: Path(Path { type_anchor: None, mod_path: ModPath { kind: Plain, segments: [Name(Text("u8"))] }, generic_args: [None] }), ast_id: FileAstId::<ra_syntax::ast::generated::nodes::ConstDef>(9) }
242 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_method"))] }, input: None }]) }] 242 > #[Attrs { entries: Some([Attr { path: ModPath { kind: Plain, segments: [Name(Text("assoc_method"))] }, input: None }]) }]
diff --git a/crates/ra_hir_def/src/keys.rs b/crates/ra_hir_def/src/keys.rs
index 7fed5523e..f627eab1f 100644
--- a/crates/ra_hir_def/src/keys.rs
+++ b/crates/ra_hir_def/src/keys.rs
@@ -17,7 +17,7 @@ pub type Key<K, V> = crate::dyn_map::Key<InFile<K>, V, AstPtrPolicy<K, V>>;
17pub const FUNCTION: Key<ast::Fn, FunctionId> = Key::new(); 17pub const FUNCTION: Key<ast::Fn, FunctionId> = Key::new();
18pub const CONST: Key<ast::ConstDef, ConstId> = Key::new(); 18pub const CONST: Key<ast::ConstDef, ConstId> = Key::new();
19pub const STATIC: Key<ast::StaticDef, StaticId> = Key::new(); 19pub const STATIC: Key<ast::StaticDef, StaticId> = Key::new();
20pub const TYPE_ALIAS: Key<ast::TypeAliasDef, TypeAliasId> = Key::new(); 20pub const TYPE_ALIAS: Key<ast::TypeAlias, TypeAliasId> = Key::new();
21pub const IMPL: Key<ast::ImplDef, ImplId> = Key::new(); 21pub const IMPL: Key<ast::ImplDef, ImplId> = Key::new();
22pub const TRAIT: Key<ast::TraitDef, TraitId> = Key::new(); 22pub const TRAIT: Key<ast::TraitDef, TraitId> = Key::new();
23pub const STRUCT: Key<ast::StructDef, StructId> = Key::new(); 23pub const STRUCT: Key<ast::StructDef, StructId> = Key::new();
diff --git a/crates/ra_ide/src/completion/complete_trait_impl.rs b/crates/ra_ide/src/completion/complete_trait_impl.rs
index dbb9eecc6..7d9050a6b 100644
--- a/crates/ra_ide/src/completion/complete_trait_impl.rs
+++ b/crates/ra_ide/src/completion/complete_trait_impl.rs
@@ -2,7 +2,7 @@
2//! 2//!
3//! This module adds the completion items related to implementing associated 3//! This module adds the completion items related to implementing associated
4//! items within a `impl Trait for Struct` block. The current context node 4//! items within a `impl Trait for Struct` block. The current context node
5//! must be within either a `FN`, `TYPE_ALIAS_DEF`, or `CONST_DEF` node 5//! must be within either a `FN`, `TYPE_ALIAS`, or `CONST_DEF` node
6//! and an direct child of an `IMPL_DEF`. 6//! and an direct child of an `IMPL_DEF`.
7//! 7//!
8//! # Examples 8//! # Examples
@@ -75,7 +75,7 @@ pub(crate) fn complete_trait_impl(acc: &mut Completions, ctx: &CompletionContext
75 } 75 }
76 } 76 }
77 77
78 SyntaxKind::TYPE_ALIAS_DEF => { 78 SyntaxKind::TYPE_ALIAS => {
79 for missing_fn in get_missing_assoc_items(&ctx.sema, &impl_def) 79 for missing_fn in get_missing_assoc_items(&ctx.sema, &impl_def)
80 .into_iter() 80 .into_iter()
81 .filter_map(|item| match item { 81 .filter_map(|item| match item {
@@ -107,7 +107,7 @@ pub(crate) fn complete_trait_impl(acc: &mut Completions, ctx: &CompletionContext
107fn completion_match(ctx: &CompletionContext) -> Option<(SyntaxNode, ImplDef)> { 107fn completion_match(ctx: &CompletionContext) -> Option<(SyntaxNode, ImplDef)> {
108 let (trigger, impl_def_offset) = ctx.token.ancestors().find_map(|p| match p.kind() { 108 let (trigger, impl_def_offset) = ctx.token.ancestors().find_map(|p| match p.kind() {
109 SyntaxKind::FN 109 SyntaxKind::FN
110 | SyntaxKind::TYPE_ALIAS_DEF 110 | SyntaxKind::TYPE_ALIAS
111 | SyntaxKind::CONST_DEF 111 | SyntaxKind::CONST_DEF
112 | SyntaxKind::BLOCK_EXPR => Some((p, 2)), 112 | SyntaxKind::BLOCK_EXPR => Some((p, 2)),
113 SyntaxKind::NAME_REF => Some((p, 5)), 113 SyntaxKind::NAME_REF => Some((p, 5)),
diff --git a/crates/ra_ide/src/display.rs b/crates/ra_ide/src/display.rs
index e4effc66c..6d93726bf 100644
--- a/crates/ra_ide/src/display.rs
+++ b/crates/ra_ide/src/display.rs
@@ -65,7 +65,7 @@ pub(crate) fn const_label(node: &ast::ConstDef) -> String {
65 label.trim().to_owned() 65 label.trim().to_owned()
66} 66}
67 67
68pub(crate) fn type_label(node: &ast::TypeAliasDef) -> String { 68pub(crate) fn type_label(node: &ast::TypeAlias) -> String {
69 let label: String = node 69 let label: String = node
70 .syntax() 70 .syntax()
71 .children_with_tokens() 71 .children_with_tokens()
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
384 ast::EnumDef(it) => it.doc_comment_text(), 384 ast::EnumDef(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::TypeAliasDef(it) => it.doc_comment_text(), 387 ast::TypeAlias(it) => it.doc_comment_text(),
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::RecordFieldDef(it) => it.doc_comment_text(), 390 ast::RecordFieldDef(it) => it.doc_comment_text(),
@@ -409,7 +409,7 @@ pub(crate) fn description_from_symbol(db: &RootDatabase, symbol: &FileSymbol) ->
409 ast::EnumDef(it) => it.short_label(), 409 ast::EnumDef(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::TypeAliasDef(it) => it.short_label(), 412 ast::TypeAlias(it) => it.short_label(),
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::RecordFieldDef(it) => it.short_label(), 415 ast::RecordFieldDef(it) => it.short_label(),
diff --git a/crates/ra_ide/src/display/short_label.rs b/crates/ra_ide/src/display/short_label.rs
index 63863943a..e2c95be06 100644
--- a/crates/ra_ide/src/display/short_label.rs
+++ b/crates/ra_ide/src/display/short_label.rs
@@ -47,7 +47,7 @@ impl ShortLabel for ast::Module {
47 } 47 }
48} 48}
49 49
50impl ShortLabel for ast::TypeAliasDef { 50impl ShortLabel for ast::TypeAlias {
51 fn short_label(&self) -> Option<String> { 51 fn short_label(&self) -> Option<String> {
52 short_label_from_node(self, "type ") 52 short_label_from_node(self, "type ")
53 } 53 }
diff --git a/crates/ra_ide/src/file_structure.rs b/crates/ra_ide/src/file_structure.rs
index 41603480e..8ef977761 100644
--- a/crates/ra_ide/src/file_structure.rs
+++ b/crates/ra_ide/src/file_structure.rs
@@ -132,7 +132,7 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
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),
135 ast::TypeAliasDef(it) => { 135 ast::TypeAlias(it) => {
136 let ty = it.type_ref(); 136 let ty = it.type_ref();
137 decl_with_type_ref(it, ty) 137 decl_with_type_ref(it, ty)
138 }, 138 },
@@ -339,7 +339,7 @@ fn very_obsolete() {}
339 label: "T", 339 label: "T",
340 navigation_range: 186..187, 340 navigation_range: 186..187,
341 node_range: 181..193, 341 node_range: 181..193,
342 kind: TYPE_ALIAS_DEF, 342 kind: TYPE_ALIAS,
343 detail: Some( 343 detail: Some(
344 "()", 344 "()",
345 ), 345 ),
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index 5198727d9..8d52fb6e4 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -709,7 +709,7 @@ fn highlight_name_by_syntax(name: ast::Name) -> Highlight {
709 ENUM_DEF => HighlightTag::Enum, 709 ENUM_DEF => HighlightTag::Enum,
710 UNION_DEF => HighlightTag::Union, 710 UNION_DEF => HighlightTag::Union,
711 TRAIT_DEF => HighlightTag::Trait, 711 TRAIT_DEF => HighlightTag::Trait,
712 TYPE_ALIAS_DEF => HighlightTag::TypeAlias, 712 TYPE_ALIAS => HighlightTag::TypeAlias,
713 TYPE_PARAM => HighlightTag::TypeParam, 713 TYPE_PARAM => HighlightTag::TypeParam,
714 RECORD_FIELD_DEF => HighlightTag::Field, 714 RECORD_FIELD_DEF => HighlightTag::Field,
715 MODULE => HighlightTag::Module, 715 MODULE => HighlightTag::Module,
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<RootDatabase>, name: &ast::Name) -> Option
182 let def: hir::Const = sema.to_def(&it)?; 182 let def: hir::Const = sema.to_def(&it)?;
183 Some(NameClass::Definition(Definition::ModuleDef(def.into()))) 183 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
184 }, 184 },
185 ast::TypeAliasDef(it) => { 185 ast::TypeAlias(it) => {
186 let def: hir::TypeAlias = sema.to_def(&it)?; 186 let def: hir::TypeAlias = sema.to_def(&it)?;
187 Some(NameClass::Definition(Definition::ModuleDef(def.into()))) 187 Some(NameClass::Definition(Definition::ModuleDef(def.into())))
188 }, 188 },
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 {
344} 344}
345 345
346fn is_type(kind: SyntaxKind) -> bool { 346fn is_type(kind: SyntaxKind) -> bool {
347 matches!(kind, STRUCT_DEF | ENUM_DEF | TRAIT_DEF | TYPE_ALIAS_DEF) 347 matches!(kind, STRUCT_DEF | ENUM_DEF | TRAIT_DEF | TYPE_ALIAS)
348} 348}
349 349
350/// The actual data that is stored in the index. It should be as compact as 350/// 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)> {
402 ast::EnumDef(it) => decl(it), 402 ast::EnumDef(it) => decl(it),
403 ast::TraitDef(it) => decl(it), 403 ast::TraitDef(it) => decl(it),
404 ast::Module(it) => decl(it), 404 ast::Module(it) => decl(it),
405 ast::TypeAliasDef(it) => decl(it), 405 ast::TypeAlias(it) => decl(it),
406 ast::ConstDef(it) => decl(it), 406 ast::ConstDef(it) => decl(it),
407 ast::StaticDef(it) => decl(it), 407 ast::StaticDef(it) => decl(it),
408 ast::MacroCall(it) => { 408 ast::MacroCall(it) => {
diff --git a/crates/ra_parser/src/grammar/items.rs b/crates/ra_parser/src/grammar/items.rs
index 7f8a51ddb..664b23f6a 100644
--- a/crates/ra_parser/src/grammar/items.rs
+++ b/crates/ra_parser/src/grammar/items.rs
@@ -380,7 +380,7 @@ fn type_def(p: &mut Parser, m: Marker) {
380 types::type_(p); 380 types::type_(p);
381 } 381 }
382 p.expect(T![;]); 382 p.expect(T![;]);
383 m.complete(p, TYPE_ALIAS_DEF); 383 m.complete(p, TYPE_ALIAS);
384} 384}
385 385
386pub(crate) fn mod_item(p: &mut Parser, m: Marker) { 386pub(crate) fn mod_item(p: &mut Parser, m: Marker) {
diff --git a/crates/ra_parser/src/syntax_kind/generated.rs b/crates/ra_parser/src/syntax_kind/generated.rs
index 1390fa407..b84c3fc79 100644
--- a/crates/ra_parser/src/syntax_kind/generated.rs
+++ b/crates/ra_parser/src/syntax_kind/generated.rs
@@ -135,7 +135,7 @@ pub enum SyntaxKind {
135 CONST_DEF, 135 CONST_DEF,
136 TRAIT_DEF, 136 TRAIT_DEF,
137 IMPL_DEF, 137 IMPL_DEF,
138 TYPE_ALIAS_DEF, 138 TYPE_ALIAS,
139 MACRO_CALL, 139 MACRO_CALL,
140 TOKEN_TREE, 140 TOKEN_TREE,
141 MACRO_DEF, 141 MACRO_DEF,
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs
index 4a67fd44a..0110300af 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -192,9 +192,9 @@ impl ast::RecordFieldList {
192 } 192 }
193} 193}
194 194
195impl ast::TypeAliasDef { 195impl ast::TypeAlias {
196 #[must_use] 196 #[must_use]
197 pub fn remove_bounds(&self) -> ast::TypeAliasDef { 197 pub fn remove_bounds(&self) -> ast::TypeAlias {
198 let colon = match self.colon_token() { 198 let colon = match self.colon_token() {
199 Some(it) => it, 199 Some(it) => it,
200 None => return self.clone(), 200 None => return self.clone(),
diff --git a/crates/ra_syntax/src/ast/generated/nodes.rs b/crates/ra_syntax/src/ast/generated/nodes.rs
index 4fc35585d..ad8ccf1ce 100644
--- a/crates/ra_syntax/src/ast/generated/nodes.rs
+++ b/crates/ra_syntax/src/ast/generated/nodes.rs
@@ -183,15 +183,15 @@ impl TraitDef {
183 pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) } 183 pub fn assoc_item_list(&self) -> Option<AssocItemList> { support::child(&self.syntax) }
184} 184}
185#[derive(Debug, Clone, PartialEq, Eq, Hash)] 185#[derive(Debug, Clone, PartialEq, Eq, Hash)]
186pub struct TypeAliasDef { 186pub struct TypeAlias {
187 pub(crate) syntax: SyntaxNode, 187 pub(crate) syntax: SyntaxNode,
188} 188}
189impl ast::AttrsOwner for TypeAliasDef {} 189impl ast::AttrsOwner for TypeAlias {}
190impl ast::NameOwner for TypeAliasDef {} 190impl ast::NameOwner for TypeAlias {}
191impl ast::VisibilityOwner for TypeAliasDef {} 191impl ast::VisibilityOwner for TypeAlias {}
192impl ast::TypeParamsOwner for TypeAliasDef {} 192impl ast::TypeParamsOwner for TypeAlias {}
193impl ast::TypeBoundsOwner for TypeAliasDef {} 193impl ast::TypeBoundsOwner for TypeAlias {}
194impl TypeAliasDef { 194impl TypeAlias {
195 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) } 195 pub fn default_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![default]) }
196 pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) } 196 pub fn type_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![type]) }
197 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) } 197 pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
@@ -384,6 +384,13 @@ impl SelfParam {
384 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) } 384 pub fn colon_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![:]) }
385} 385}
386#[derive(Debug, Clone, PartialEq, Eq, Hash)] 386#[derive(Debug, Clone, PartialEq, Eq, Hash)]
387pub struct TypeBoundList {
388 pub(crate) syntax: SyntaxNode,
389}
390impl TypeBoundList {
391 pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) }
392}
393#[derive(Debug, Clone, PartialEq, Eq, Hash)]
387pub struct RecordFieldDefList { 394pub struct RecordFieldDefList {
388 pub(crate) syntax: SyntaxNode, 395 pub(crate) syntax: SyntaxNode,
389} 396}
@@ -444,13 +451,6 @@ impl EnumVariant {
444 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) } 451 pub fn expr(&self) -> Option<Expr> { support::child(&self.syntax) }
445} 452}
446#[derive(Debug, Clone, PartialEq, Eq, Hash)] 453#[derive(Debug, Clone, PartialEq, Eq, Hash)]
447pub struct TypeBoundList {
448 pub(crate) syntax: SyntaxNode,
449}
450impl TypeBoundList {
451 pub fn bounds(&self) -> AstChildren<TypeBound> { support::children(&self.syntax) }
452}
453#[derive(Debug, Clone, PartialEq, Eq, Hash)]
454pub struct AssocItemList { 454pub struct AssocItemList {
455 pub(crate) syntax: SyntaxNode, 455 pub(crate) syntax: SyntaxNode,
456} 456}
@@ -1284,7 +1284,7 @@ pub enum Item {
1284 StaticDef(StaticDef), 1284 StaticDef(StaticDef),
1285 StructDef(StructDef), 1285 StructDef(StructDef),
1286 TraitDef(TraitDef), 1286 TraitDef(TraitDef),
1287 TypeAliasDef(TypeAliasDef), 1287 TypeAlias(TypeAlias),
1288 UnionDef(UnionDef), 1288 UnionDef(UnionDef),
1289 Use(Use), 1289 Use(Use),
1290} 1290}
@@ -1365,7 +1365,7 @@ pub enum Expr {
1365#[derive(Debug, Clone, PartialEq, Eq, Hash)] 1365#[derive(Debug, Clone, PartialEq, Eq, Hash)]
1366pub enum AssocItem { 1366pub enum AssocItem {
1367 Fn(Fn), 1367 Fn(Fn),
1368 TypeAliasDef(TypeAliasDef), 1368 TypeAlias(TypeAlias),
1369 ConstDef(ConstDef), 1369 ConstDef(ConstDef),
1370 MacroCall(MacroCall), 1370 MacroCall(MacroCall),
1371} 1371}
@@ -1543,8 +1543,8 @@ impl AstNode for TraitDef {
1543 } 1543 }
1544 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1544 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1545} 1545}
1546impl AstNode for TypeAliasDef { 1546impl AstNode for TypeAlias {
1547 fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ALIAS_DEF } 1547 fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_ALIAS }
1548 fn cast(syntax: SyntaxNode) -> Option<Self> { 1548 fn cast(syntax: SyntaxNode) -> Option<Self> {
1549 if Self::can_cast(syntax.kind()) { 1549 if Self::can_cast(syntax.kind()) {
1550 Some(Self { syntax }) 1550 Some(Self { syntax })
@@ -1752,6 +1752,17 @@ impl AstNode for SelfParam {
1752 } 1752 }
1753 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1753 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1754} 1754}
1755impl AstNode for TypeBoundList {
1756 fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND_LIST }
1757 fn cast(syntax: SyntaxNode) -> Option<Self> {
1758 if Self::can_cast(syntax.kind()) {
1759 Some(Self { syntax })
1760 } else {
1761 None
1762 }
1763 }
1764 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1765}
1755impl AstNode for RecordFieldDefList { 1766impl AstNode for RecordFieldDefList {
1756 fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF_LIST } 1767 fn can_cast(kind: SyntaxKind) -> bool { kind == RECORD_FIELD_DEF_LIST }
1757 fn cast(syntax: SyntaxNode) -> Option<Self> { 1768 fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -1818,17 +1829,6 @@ impl AstNode for EnumVariant {
1818 } 1829 }
1819 fn syntax(&self) -> &SyntaxNode { &self.syntax } 1830 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1820} 1831}
1821impl AstNode for TypeBoundList {
1822 fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND_LIST }
1823 fn cast(syntax: SyntaxNode) -> Option<Self> {
1824 if Self::can_cast(syntax.kind()) {
1825 Some(Self { syntax })
1826 } else {
1827 None
1828 }
1829 }
1830 fn syntax(&self) -> &SyntaxNode { &self.syntax }
1831}
1832impl AstNode for AssocItemList { 1832impl AstNode for AssocItemList {
1833 fn can_cast(kind: SyntaxKind) -> bool { kind == ASSOC_ITEM_LIST } 1833 fn can_cast(kind: SyntaxKind) -> bool { kind == ASSOC_ITEM_LIST }
1834 fn cast(syntax: SyntaxNode) -> Option<Self> { 1834 fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -2808,8 +2808,8 @@ impl From<StructDef> for Item {
2808impl From<TraitDef> for Item { 2808impl From<TraitDef> for Item {
2809 fn from(node: TraitDef) -> Item { Item::TraitDef(node) } 2809 fn from(node: TraitDef) -> Item { Item::TraitDef(node) }
2810} 2810}
2811impl From<TypeAliasDef> for Item { 2811impl From<TypeAlias> for Item {
2812 fn from(node: TypeAliasDef) -> Item { Item::TypeAliasDef(node) } 2812 fn from(node: TypeAlias) -> Item { Item::TypeAlias(node) }
2813} 2813}
2814impl From<UnionDef> for Item { 2814impl From<UnionDef> for Item {
2815 fn from(node: UnionDef) -> Item { Item::UnionDef(node) } 2815 fn from(node: UnionDef) -> Item { Item::UnionDef(node) }
@@ -2821,9 +2821,7 @@ impl AstNode for Item {
2821 fn can_cast(kind: SyntaxKind) -> bool { 2821 fn can_cast(kind: SyntaxKind) -> bool {
2822 match kind { 2822 match kind {
2823 CONST_DEF | ENUM_DEF | EXTERN_BLOCK | EXTERN_CRATE | FN | IMPL_DEF | MACRO_CALL 2823 CONST_DEF | ENUM_DEF | EXTERN_BLOCK | EXTERN_CRATE | FN | IMPL_DEF | MACRO_CALL
2824 | MODULE | STATIC_DEF | STRUCT_DEF | TRAIT_DEF | TYPE_ALIAS_DEF | UNION_DEF | USE => { 2824 | MODULE | STATIC_DEF | STRUCT_DEF | TRAIT_DEF | TYPE_ALIAS | UNION_DEF | USE => true,
2825 true
2826 }
2827 _ => false, 2825 _ => false,
2828 } 2826 }
2829 } 2827 }
@@ -2840,7 +2838,7 @@ impl AstNode for Item {
2840 STATIC_DEF => Item::StaticDef(StaticDef { syntax }), 2838 STATIC_DEF => Item::StaticDef(StaticDef { syntax }),
2841 STRUCT_DEF => Item::StructDef(StructDef { syntax }), 2839 STRUCT_DEF => Item::StructDef(StructDef { syntax }),
2842 TRAIT_DEF => Item::TraitDef(TraitDef { syntax }), 2840 TRAIT_DEF => Item::TraitDef(TraitDef { syntax }),
2843 TYPE_ALIAS_DEF => Item::TypeAliasDef(TypeAliasDef { syntax }), 2841 TYPE_ALIAS => Item::TypeAlias(TypeAlias { syntax }),
2844 UNION_DEF => Item::UnionDef(UnionDef { syntax }), 2842 UNION_DEF => Item::UnionDef(UnionDef { syntax }),
2845 USE => Item::Use(Use { syntax }), 2843 USE => Item::Use(Use { syntax }),
2846 _ => return None, 2844 _ => return None,
@@ -2860,7 +2858,7 @@ impl AstNode for Item {
2860 Item::StaticDef(it) => &it.syntax, 2858 Item::StaticDef(it) => &it.syntax,
2861 Item::StructDef(it) => &it.syntax, 2859 Item::StructDef(it) => &it.syntax,
2862 Item::TraitDef(it) => &it.syntax, 2860 Item::TraitDef(it) => &it.syntax,
2863 Item::TypeAliasDef(it) => &it.syntax, 2861 Item::TypeAlias(it) => &it.syntax,
2864 Item::UnionDef(it) => &it.syntax, 2862 Item::UnionDef(it) => &it.syntax,
2865 Item::Use(it) => &it.syntax, 2863 Item::Use(it) => &it.syntax,
2866 } 2864 }
@@ -3258,8 +3256,8 @@ impl AstNode for Expr {
3258impl From<Fn> for AssocItem { 3256impl From<Fn> for AssocItem {
3259 fn from(node: Fn) -> AssocItem { AssocItem::Fn(node) } 3257 fn from(node: Fn) -> AssocItem { AssocItem::Fn(node) }
3260} 3258}
3261impl From<TypeAliasDef> for AssocItem { 3259impl From<TypeAlias> for AssocItem {
3262 fn from(node: TypeAliasDef) -> AssocItem { AssocItem::TypeAliasDef(node) } 3260 fn from(node: TypeAlias) -> AssocItem { AssocItem::TypeAlias(node) }
3263} 3261}
3264impl From<ConstDef> for AssocItem { 3262impl From<ConstDef> for AssocItem {
3265 fn from(node: ConstDef) -> AssocItem { AssocItem::ConstDef(node) } 3263 fn from(node: ConstDef) -> AssocItem { AssocItem::ConstDef(node) }
@@ -3270,14 +3268,14 @@ impl From<MacroCall> for AssocItem {
3270impl AstNode for AssocItem { 3268impl AstNode for AssocItem {
3271 fn can_cast(kind: SyntaxKind) -> bool { 3269 fn can_cast(kind: SyntaxKind) -> bool {
3272 match kind { 3270 match kind {
3273 FN | TYPE_ALIAS_DEF | CONST_DEF | MACRO_CALL => true, 3271 FN | TYPE_ALIAS | CONST_DEF | MACRO_CALL => true,
3274 _ => false, 3272 _ => false,
3275 } 3273 }
3276 } 3274 }
3277 fn cast(syntax: SyntaxNode) -> Option<Self> { 3275 fn cast(syntax: SyntaxNode) -> Option<Self> {
3278 let res = match syntax.kind() { 3276 let res = match syntax.kind() {
3279 FN => AssocItem::Fn(Fn { syntax }), 3277 FN => AssocItem::Fn(Fn { syntax }),
3280 TYPE_ALIAS_DEF => AssocItem::TypeAliasDef(TypeAliasDef { syntax }), 3278 TYPE_ALIAS => AssocItem::TypeAlias(TypeAlias { syntax }),
3281 CONST_DEF => AssocItem::ConstDef(ConstDef { syntax }), 3279 CONST_DEF => AssocItem::ConstDef(ConstDef { syntax }),
3282 MACRO_CALL => AssocItem::MacroCall(MacroCall { syntax }), 3280 MACRO_CALL => AssocItem::MacroCall(MacroCall { syntax }),
3283 _ => return None, 3281 _ => return None,
@@ -3287,7 +3285,7 @@ impl AstNode for AssocItem {
3287 fn syntax(&self) -> &SyntaxNode { 3285 fn syntax(&self) -> &SyntaxNode {
3288 match self { 3286 match self {
3289 AssocItem::Fn(it) => &it.syntax, 3287 AssocItem::Fn(it) => &it.syntax,
3290 AssocItem::TypeAliasDef(it) => &it.syntax, 3288 AssocItem::TypeAlias(it) => &it.syntax,
3291 AssocItem::ConstDef(it) => &it.syntax, 3289 AssocItem::ConstDef(it) => &it.syntax,
3292 AssocItem::MacroCall(it) => &it.syntax, 3290 AssocItem::MacroCall(it) => &it.syntax,
3293 } 3291 }
@@ -3525,7 +3523,7 @@ impl std::fmt::Display for TraitDef {
3525 std::fmt::Display::fmt(self.syntax(), f) 3523 std::fmt::Display::fmt(self.syntax(), f)
3526 } 3524 }
3527} 3525}
3528impl std::fmt::Display for TypeAliasDef { 3526impl std::fmt::Display for TypeAlias {
3529 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3527 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3530 std::fmt::Display::fmt(self.syntax(), f) 3528 std::fmt::Display::fmt(self.syntax(), f)
3531 } 3529 }
@@ -3620,6 +3618,11 @@ impl std::fmt::Display for SelfParam {
3620 std::fmt::Display::fmt(self.syntax(), f) 3618 std::fmt::Display::fmt(self.syntax(), f)
3621 } 3619 }
3622} 3620}
3621impl std::fmt::Display for TypeBoundList {
3622 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3623 std::fmt::Display::fmt(self.syntax(), f)
3624 }
3625}
3623impl std::fmt::Display for RecordFieldDefList { 3626impl std::fmt::Display for RecordFieldDefList {
3624 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3627 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3625 std::fmt::Display::fmt(self.syntax(), f) 3628 std::fmt::Display::fmt(self.syntax(), f)
@@ -3650,11 +3653,6 @@ impl std::fmt::Display for EnumVariant {
3650 std::fmt::Display::fmt(self.syntax(), f) 3653 std::fmt::Display::fmt(self.syntax(), f)
3651 } 3654 }
3652} 3655}
3653impl std::fmt::Display for TypeBoundList {
3654 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3655 std::fmt::Display::fmt(self.syntax(), f)
3656 }
3657}
3658impl std::fmt::Display for AssocItemList { 3656impl std::fmt::Display for AssocItemList {
3659 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 3657 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
3660 std::fmt::Display::fmt(self.syntax(), f) 3658 std::fmt::Display::fmt(self.syntax(), f)
diff --git a/crates/ra_syntax/src/ast/node_ext.rs b/crates/ra_syntax/src/ast/node_ext.rs
index 9fb6b7268..a7a301d6b 100644
--- a/crates/ra_syntax/src/ast/node_ext.rs
+++ b/crates/ra_syntax/src/ast/node_ext.rs
@@ -485,6 +485,6 @@ impl ast::DocCommentsOwner for ast::TraitDef {}
485impl ast::DocCommentsOwner for ast::Module {} 485impl ast::DocCommentsOwner for ast::Module {}
486impl ast::DocCommentsOwner for ast::StaticDef {} 486impl ast::DocCommentsOwner for ast::StaticDef {}
487impl ast::DocCommentsOwner for ast::ConstDef {} 487impl ast::DocCommentsOwner for ast::ConstDef {}
488impl ast::DocCommentsOwner for ast::TypeAliasDef {} 488impl ast::DocCommentsOwner for ast::TypeAlias {}
489impl ast::DocCommentsOwner for ast::ImplDef {} 489impl ast::DocCommentsOwner for ast::ImplDef {}
490impl ast::DocCommentsOwner for ast::MacroCall {} 490impl ast::DocCommentsOwner for ast::MacroCall {}
diff --git a/crates/ra_syntax/src/parsing/text_tree_sink.rs b/crates/ra_syntax/src/parsing/text_tree_sink.rs
index 2a0f95d15..87a7acd09 100644
--- a/crates/ra_syntax/src/parsing/text_tree_sink.rs
+++ b/crates/ra_syntax/src/parsing/text_tree_sink.rs
@@ -146,7 +146,7 @@ fn n_attached_trivias<'a>(
146 trivias: impl Iterator<Item = (SyntaxKind, &'a str)>, 146 trivias: impl Iterator<Item = (SyntaxKind, &'a str)>,
147) -> usize { 147) -> usize {
148 match kind { 148 match kind {
149 MACRO_CALL | CONST_DEF | TYPE_ALIAS_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN 149 MACRO_CALL | CONST_DEF | TYPE_ALIAS | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN
150 | TRAIT_DEF | MODULE | RECORD_FIELD_DEF | STATIC_DEF => { 150 | TRAIT_DEF | MODULE | RECORD_FIELD_DEF | STATIC_DEF => {
151 let mut res = 0; 151 let mut res = 0;
152 let mut trivias = trivias.enumerate().peekable(); 152 let mut trivias = trivias.enumerate().peekable();
diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs
index 2714d102a..6a2749381 100644
--- a/crates/ra_syntax/src/validation.rs
+++ b/crates/ra_syntax/src/validation.rs
@@ -4,7 +4,7 @@ mod block;
4 4
5use crate::{ 5use crate::{
6 ast, match_ast, AstNode, SyntaxError, 6 ast, match_ast, AstNode, SyntaxError,
7 SyntaxKind::{BYTE, BYTE_STRING, CHAR, CONST_DEF, FN, INT_NUMBER, STRING, TYPE_ALIAS_DEF}, 7 SyntaxKind::{BYTE, BYTE_STRING, CHAR, CONST_DEF, FN, INT_NUMBER, STRING, TYPE_ALIAS},
8 SyntaxNode, SyntaxToken, TextSize, T, 8 SyntaxNode, SyntaxToken, TextSize, T,
9}; 9};
10use rustc_lexer::unescape::{ 10use rustc_lexer::unescape::{
@@ -200,7 +200,7 @@ fn validate_visibility(vis: ast::Visibility, errors: &mut Vec<SyntaxError>) {
200 None => return, 200 None => return,
201 }; 201 };
202 match parent.kind() { 202 match parent.kind() {
203 FN | CONST_DEF | TYPE_ALIAS_DEF => (), 203 FN | CONST_DEF | TYPE_ALIAS => (),
204 _ => return, 204 _ => return,
205 } 205 }
206 206
diff --git a/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast b/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast
index f180616f1..c0ba4fba9 100644
--- a/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast
+++ b/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.rast
@@ -46,7 +46,7 @@ [email protected]
46 [email protected] "{" 46 [email protected] "{"
47 [email protected] "}" 47 [email protected] "}"
48 [email protected] "\n " 48 [email protected] "\n "
49 TYPE_ALIAS_DEF@56..81 49 [email protected]
50 [email protected] 50 [email protected]
51 [email protected] "pub" 51 [email protected] "pub"
52 [email protected] "(" 52 [email protected] "("
diff --git a/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast b/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast
index 5f59c3bc2..19b3540e9 100644
--- a/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast
+++ b/crates/ra_syntax/test_data/parser/err/0044_unexpected_for_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..30 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -26,7 +26,7 @@ [email protected]
26 [email protected] "u32" 26 [email protected] "u32"
27 [email protected] ";" 27 [email protected] ";"
28 [email protected] "\n" 28 [email protected] "\n"
29 TYPE_ALIAS_DEF@31..64 29 [email protected]
30 [email protected] "type" 30 [email protected] "type"
31 [email protected] " " 31 [email protected] " "
32 [email protected] 32 [email protected]
@@ -57,7 +57,7 @@ [email protected]
57 [email protected] ")" 57 [email protected] ")"
58 [email protected] ";" 58 [email protected] ";"
59 [email protected] "\n" 59 [email protected] "\n"
60 TYPE_ALIAS_DEF@65..95 60 [email protected]
61 [email protected] "type" 61 [email protected] "type"
62 [email protected] " " 62 [email protected] " "
63 [email protected] 63 [email protected]
@@ -83,7 +83,7 @@ [email protected]
83 [email protected] "]" 83 [email protected] "]"
84 [email protected] ";" 84 [email protected] ";"
85 [email protected] "\n" 85 [email protected] "\n"
86 TYPE_ALIAS_DEF@96..149 86 [email protected]
87 [email protected] "type" 87 [email protected] "type"
88 [email protected] " " 88 [email protected] " "
89 [email protected] 89 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast b/crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast
index bf70ebca4..0b9bbec07 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0001_array_type_missing_semi.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..12 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast b/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast
index 95bcc3c0a..2409eefe7 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0003_pointer_type_no_mutability.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..13 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast b/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast
index 90202d764..776022fd9 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0005_fn_pointer_type_missing_fn.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..15 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast
index b31195281..22c7c5f0d 100644
--- a/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/err/0014_default_fn_type.rast
@@ -14,7 +14,7 @@ [email protected]
14 [email protected] 14 [email protected]
15 [email protected] "default" 15 [email protected] "default"
16 [email protected] " " 16 [email protected] " "
17 TYPE_ALIAS_DEF@22..35 17 [email protected]
18 [email protected] "type" 18 [email protected] "type"
19 [email protected] " " 19 [email protected] " "
20 [email protected] 20 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast
index 7847ba65a..a62ce23e6 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.rast
@@ -11,7 +11,7 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 TYPE_ALIAS_DEF@13..27 14 [email protected]
15 [email protected] "type" 15 [email protected] "type"
16 [email protected] " " 16 [email protected] " "
17 [email protected] 17 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast b/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast
index 20eba09f5..ace8ad050 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0004_value_parameters_no_patterns.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..38 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast b/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast
index 283442a8b..28c94bfd6 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0012_type_item_where_clause.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..30 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast b/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast
index e2e871dda..845b32e6d 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0013_pointer_type_mut.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..17 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -16,7 +16,7 @@ [email protected]
16 [email protected] ")" 16 [email protected] ")"
17 [email protected] ";" 17 [email protected] ";"
18 [email protected] "\n" 18 [email protected] "\n"
19 TYPE_ALIAS_DEF@18..35 19 [email protected]
20 [email protected] "type" 20 [email protected] "type"
21 [email protected] " " 21 [email protected] " "
22 [email protected] 22 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rast
index a60940fcf..b1d5106ce 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0014_never_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..15 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rast
index 61a0b22f4..c131df1c9 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0017_array_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..18 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast
index daa55ec6c..3ae870e17 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.rast
@@ -11,7 +11,7 @@ [email protected]
11 [email protected] 11 [email protected]
12 [email protected] "{" 12 [email protected] "{"
13 [email protected] "\n " 13 [email protected] "\n "
14 TYPE_ALIAS_DEF@13..26 14 [email protected]
15 [email protected] "type" 15 [email protected] "type"
16 [email protected] " " 16 [email protected] " "
17 [email protected] 17 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast
index 17687617b..57008e5fe 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0023_placeholder_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..21 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rast
index 0a6d77f45..fd819ea37 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0025_slice_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..14 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast
index 93f5c738c..f45f3cab8 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0028_impl_trait_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..42 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast
index 72705e148..79a5ee339 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0032_fn_pointer_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..14 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -14,7 +14,7 @@ [email protected]
14 [email protected] ")" 14 [email protected] ")"
15 [email protected] ";" 15 [email protected] ";"
16 [email protected] "\n" 16 [email protected] "\n"
17 TYPE_ALIAS_DEF@15..36 17 [email protected]
18 [email protected] "type" 18 [email protected] "type"
19 [email protected] " " 19 [email protected] " "
20 [email protected] 20 [email protected]
@@ -31,7 +31,7 @@ [email protected]
31 [email protected] ")" 31 [email protected] ")"
32 [email protected] ";" 32 [email protected] ";"
33 [email protected] "\n" 33 [email protected] "\n"
34 TYPE_ALIAS_DEF@37..69 34 [email protected]
35 [email protected] "type" 35 [email protected] "type"
36 [email protected] " " 36 [email protected] " "
37 [email protected] 37 [email protected]
@@ -53,7 +53,7 @@ [email protected]
53 [email protected] ")" 53 [email protected] ")"
54 [email protected] ";" 54 [email protected] ";"
55 [email protected] "\n" 55 [email protected] "\n"
56 TYPE_ALIAS_DEF@70..112 56 [email protected]
57 [email protected] "type" 57 [email protected] "type"
58 [email protected] " " 58 [email protected] " "
59 [email protected] 59 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rast b/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rast
index 784fbb592..c522f76cf 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0033_reference_type;.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..13 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -14,7 +14,7 @@ [email protected]
14 [email protected] ")" 14 [email protected] ")"
15 [email protected] ";" 15 [email protected] ";"
16 [email protected] "\n" 16 [email protected] "\n"
17 TYPE_ALIAS_DEF@14..35 17 [email protected]
18 [email protected] "type" 18 [email protected] "type"
19 [email protected] " " 19 [email protected] " "
20 [email protected] 20 [email protected]
@@ -31,7 +31,7 @@ [email protected]
31 [email protected] ")" 31 [email protected] ")"
32 [email protected] ";" 32 [email protected] ";"
33 [email protected] "\n" 33 [email protected] "\n"
34 TYPE_ALIAS_DEF@36..53 34 [email protected]
35 [email protected] "type" 35 [email protected] "type"
36 [email protected] " " 36 [email protected] " "
37 [email protected] 37 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast b/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast
index 8f6cd2e2f..b6379e62f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0037_qual_paths.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..26 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rast b/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rast
index e92ea2bf2..2185d3c91 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0039_type_arg.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..45 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast
index c28dc9d61..e89284c14 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0046_singleton_tuple_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..16 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rast
index 798ef2a48..6330dbf9e 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0051_unit_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..12 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rast
index 0d2f5ff56..9bc36bea7 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0052_path_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..13 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -14,7 +14,7 @@ [email protected]
14 [email protected] "Foo" 14 [email protected] "Foo"
15 [email protected] ";" 15 [email protected] ";"
16 [email protected] "\n" 16 [email protected] "\n"
17 TYPE_ALIAS_DEF@14..29 17 [email protected]
18 [email protected] "type" 18 [email protected] "type"
19 [email protected] " " 19 [email protected] " "
20 [email protected] 20 [email protected]
@@ -30,7 +30,7 @@ [email protected]
30 [email protected] "Foo" 30 [email protected] "Foo"
31 [email protected] ";" 31 [email protected] ";"
32 [email protected] "\n" 32 [email protected] "\n"
33 TYPE_ALIAS_DEF@30..49 33 [email protected]
34 [email protected] "type" 34 [email protected] "type"
35 [email protected] " " 35 [email protected] " "
36 [email protected] 36 [email protected]
@@ -49,7 +49,7 @@ [email protected]
49 [email protected] "Foo" 49 [email protected] "Foo"
50 [email protected] ";" 50 [email protected] ";"
51 [email protected] "\n" 51 [email protected] "\n"
52 TYPE_ALIAS_DEF@50..70 52 [email protected]
53 [email protected] "type" 53 [email protected] "type"
54 [email protected] " " 54 [email protected] " "
55 [email protected] 55 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast
index 8e10f3673..629fea99d 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0065_dyn_trait_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..41 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast b/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast
index cc871ac0c..0123cb108 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0073_type_item_type_params.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..20 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rast b/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rast
index a08e16fab..2befc8388 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0078_type_item.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..15 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast
index b26ac2d36..175ec9844 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0081_for_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..28 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -29,7 +29,7 @@ [email protected]
29 [email protected] ")" 29 [email protected] ")"
30 [email protected] ";" 30 [email protected] ";"
31 [email protected] "\n" 31 [email protected] "\n"
32 TYPE_ALIAS_DEF@29..81 32 [email protected]
33 [email protected] "type" 33 [email protected] "type"
34 [email protected] " " 34 [email protected] " "
35 [email protected] 35 [email protected]
@@ -74,7 +74,7 @@ [email protected]
74 [email protected] ")" 74 [email protected] ")"
75 [email protected] ";" 75 [email protected] ";"
76 [email protected] "\n" 76 [email protected] "\n"
77 TYPE_ALIAS_DEF@82..120 77 [email protected]
78 [email protected] "type" 78 [email protected] "type"
79 [email protected] " " 79 [email protected] " "
80 [email protected] 80 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rast
index 9cd8910d4..ee8894966 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0084_paren_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..15 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast b/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast
index 1e2d7db7c..95686977f 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0092_fn_pointer_type_with_ret.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..20 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast b/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast
index e3c4cfeb3..3f53d60c0 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0104_path_fn_trait_args.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..28 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rast
index ddfcf974e..f3d4ad72c 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0117_macro_call_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..16 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -18,7 +18,7 @@ [email protected]
18 [email protected] ")" 18 [email protected] ")"
19 [email protected] ";" 19 [email protected] ";"
20 [email protected] "\n" 20 [email protected] "\n"
21 TYPE_ALIAS_DEF@17..40 21 [email protected]
22 [email protected] "type" 22 [email protected] "type"
23 [email protected] " " 23 [email protected] " "
24 [email protected] 24 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rast
index 4a1c2b3a4..d47071a91 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0131_existential_type.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..36 2 [email protected]
3 [email protected] "existential" 3 [email protected] "existential"
4 [email protected] " " 4 [email protected] " "
5 [email protected] "type" 5 [email protected] "type"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast
index 9fc724f3f..de02238df 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.rast
@@ -19,7 +19,7 @@ [email protected]
19 [email protected] 19 [email protected]
20 [email protected] "{" 20 [email protected] "{"
21 [email protected] "\n " 21 [email protected] "\n "
22 TYPE_ALIAS_DEF@21..42 22 [email protected]
23 [email protected] "default" 23 [email protected] "default"
24 [email protected] " " 24 [email protected] " "
25 [email protected] "type" 25 [email protected] "type"
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast b/crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast
index 861065362..69b4d73d7 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0154_fn_pointer_param_ident_path.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..24 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
@@ -25,7 +25,7 @@ [email protected]
25 [email protected] ")" 25 [email protected] ")"
26 [email protected] ";" 26 [email protected] ";"
27 [email protected] "\n" 27 [email protected] "\n"
28 TYPE_ALIAS_DEF@25..54 28 [email protected]
29 [email protected] "type" 29 [email protected] "type"
30 [email protected] " " 30 [email protected] " "
31 [email protected] 31 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast b/crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast
index fad9df007..ccca045b6 100644
--- a/crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast
+++ b/crates/ra_syntax/test_data/parser/inline/ok/0157_fn_pointer_unnamed_arg.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..22 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast b/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast
index 1c893180c..7447d516e 100644
--- a/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast
+++ b/crates/ra_syntax/test_data/parser/ok/0055_dot_dot_dot.rast
@@ -1,5 +1,5 @@
1[email protected] 1[email protected]
2 TYPE_ALIAS_DEF@0..12 2 [email protected]
3 [email protected] "type" 3 [email protected] "type"
4 [email protected] " " 4 [email protected] " "
5 [email protected] 5 [email protected]
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index f86e55d39..34a0d039c 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -38,7 +38,7 @@ pub(crate) fn symbol_kind(syntax_kind: SyntaxKind) -> lsp_types::SymbolKind {
38 SyntaxKind::TRAIT_DEF => lsp_types::SymbolKind::Interface, 38 SyntaxKind::TRAIT_DEF => lsp_types::SymbolKind::Interface,
39 SyntaxKind::MACRO_CALL => lsp_types::SymbolKind::Function, 39 SyntaxKind::MACRO_CALL => lsp_types::SymbolKind::Function,
40 SyntaxKind::MODULE => lsp_types::SymbolKind::Module, 40 SyntaxKind::MODULE => lsp_types::SymbolKind::Module,
41 SyntaxKind::TYPE_ALIAS_DEF => lsp_types::SymbolKind::TypeParameter, 41 SyntaxKind::TYPE_ALIAS => lsp_types::SymbolKind::TypeParameter,
42 SyntaxKind::RECORD_FIELD_DEF => lsp_types::SymbolKind::Field, 42 SyntaxKind::RECORD_FIELD_DEF => lsp_types::SymbolKind::Field,
43 SyntaxKind::STATIC_DEF => lsp_types::SymbolKind::Constant, 43 SyntaxKind::STATIC_DEF => lsp_types::SymbolKind::Constant,
44 SyntaxKind::CONST_DEF => lsp_types::SymbolKind::Constant, 44 SyntaxKind::CONST_DEF => lsp_types::SymbolKind::Constant,