From 78f10fcdc41d5c58e386bc99a94b34a2bdbaa4cd Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 25 Feb 2019 13:38:52 +0300 Subject: rename type to type_alias in the AST as well --- crates/ra_syntax/src/ast/generated.rs | 94 +++++++++++----------- crates/ra_syntax/src/grammar.ron | 8 +- crates/ra_syntax/src/parsing/text_tree_sink.rs | 2 +- .../inline/err/0001_array_type_missing_semi.txt | 2 +- .../inline/err/0003_pointer_type_no_mutability.txt | 2 +- .../inline/err/0005_fn_pointer_type_missing_fn.txt | 2 +- .../data/parser/inline/ok/0001_trait_item_list.txt | 2 +- .../ok/0004_value_parameters_no_patterns.txt | 2 +- .../inline/ok/0012_type_item_where_clause.txt | 2 +- .../parser/inline/ok/0013_pointer_type_mut.txt | 4 +- .../data/parser/inline/ok/0014_never_type.txt | 2 +- .../data/parser/inline/ok/0017_array_type.txt | 2 +- .../data/parser/inline/ok/0021_impl_item_list.txt | 2 +- .../parser/inline/ok/0023_placeholder_type.txt | 2 +- .../data/parser/inline/ok/0025_slice_type.txt | 2 +- .../data/parser/inline/ok/0028_impl_trait_type.txt | 2 +- .../data/parser/inline/ok/0032_fn_pointer_type.txt | 6 +- .../data/parser/inline/ok/0033_reference_type;.txt | 6 +- .../data/parser/inline/ok/0037_qual_paths.txt | 2 +- .../tests/data/parser/inline/ok/0039_type_arg.txt | 2 +- .../parser/inline/ok/0046_singleton_tuple_type.txt | 2 +- .../tests/data/parser/inline/ok/0051_unit_type.txt | 2 +- .../tests/data/parser/inline/ok/0052_path_type.txt | 8 +- .../data/parser/inline/ok/0065_dyn_trait_type.txt | 2 +- .../inline/ok/0073_type_item_type_params.txt | 2 +- .../tests/data/parser/inline/ok/0078_type_item.txt | 2 +- .../tests/data/parser/inline/ok/0081_for_type.txt | 2 +- .../data/parser/inline/ok/0084_paren_type.txt | 2 +- .../inline/ok/0092_fn_pointer_type_with_ret.txt | 2 +- .../parser/inline/ok/0104_path_fn_trait_args.txt | 2 +- .../data/parser/inline/ok/0117_macro_call_type.txt | 4 +- 31 files changed, 89 insertions(+), 89 deletions(-) (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index aa88b1e28..4e2705d09 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -1508,7 +1508,7 @@ unsafe impl TransparentNewType for ImplItem { #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum ImplItemKind<'a> { FnDef(&'a FnDef), - TypeDef(&'a TypeDef), + TypeAliasDef(&'a TypeAliasDef), ConstDef(&'a ConstDef), } impl<'a> From<&'a FnDef> for &'a ImplItem { @@ -1516,8 +1516,8 @@ impl<'a> From<&'a FnDef> for &'a ImplItem { ImplItem::cast(&n.syntax).unwrap() } } -impl<'a> From<&'a TypeDef> for &'a ImplItem { - fn from(n: &'a TypeDef) -> &'a ImplItem { +impl<'a> From<&'a TypeAliasDef> for &'a ImplItem { + fn from(n: &'a TypeAliasDef) -> &'a ImplItem { ImplItem::cast(&n.syntax).unwrap() } } @@ -1532,7 +1532,7 @@ impl AstNode for ImplItem { fn cast(syntax: &SyntaxNode) -> Option<&Self> { match syntax.kind() { | FN_DEF - | TYPE_DEF + | TYPE_ALIAS_DEF | CONST_DEF => Some(ImplItem::from_repr(syntax.into_repr())), _ => None, } @@ -1549,7 +1549,7 @@ impl ImplItem { pub fn kind(&self) -> ImplItemKind { match self.syntax.kind() { FN_DEF => ImplItemKind::FnDef(FnDef::cast(&self.syntax).unwrap()), - TYPE_DEF => ImplItemKind::TypeDef(TypeDef::cast(&self.syntax).unwrap()), + TYPE_ALIAS_DEF => ImplItemKind::TypeAliasDef(TypeAliasDef::cast(&self.syntax).unwrap()), CONST_DEF => ImplItemKind::ConstDef(ConstDef::cast(&self.syntax).unwrap()), _ => unreachable!(), } @@ -2359,7 +2359,7 @@ pub enum ModuleItemKind<'a> { EnumDef(&'a EnumDef), FnDef(&'a FnDef), TraitDef(&'a TraitDef), - TypeDef(&'a TypeDef), + TypeAliasDef(&'a TypeAliasDef), ImplBlock(&'a ImplBlock), UseItem(&'a UseItem), ExternCrateItem(&'a ExternCrateItem), @@ -2387,8 +2387,8 @@ impl<'a> From<&'a TraitDef> for &'a ModuleItem { ModuleItem::cast(&n.syntax).unwrap() } } -impl<'a> From<&'a TypeDef> for &'a ModuleItem { - fn from(n: &'a TypeDef) -> &'a ModuleItem { +impl<'a> From<&'a TypeAliasDef> for &'a ModuleItem { + fn from(n: &'a TypeAliasDef) -> &'a ModuleItem { ModuleItem::cast(&n.syntax).unwrap() } } @@ -2431,7 +2431,7 @@ impl AstNode for ModuleItem { | ENUM_DEF | FN_DEF | TRAIT_DEF - | TYPE_DEF + | TYPE_ALIAS_DEF | IMPL_BLOCK | USE_ITEM | EXTERN_CRATE_ITEM @@ -2456,7 +2456,7 @@ impl ModuleItem { ENUM_DEF => ModuleItemKind::EnumDef(EnumDef::cast(&self.syntax).unwrap()), FN_DEF => ModuleItemKind::FnDef(FnDef::cast(&self.syntax).unwrap()), TRAIT_DEF => ModuleItemKind::TraitDef(TraitDef::cast(&self.syntax).unwrap()), - TYPE_DEF => ModuleItemKind::TypeDef(TypeDef::cast(&self.syntax).unwrap()), + TYPE_ALIAS_DEF => ModuleItemKind::TypeAliasDef(TypeAliasDef::cast(&self.syntax).unwrap()), IMPL_BLOCK => ModuleItemKind::ImplBlock(ImplBlock::cast(&self.syntax).unwrap()), USE_ITEM => ModuleItemKind::UseItem(UseItem::cast(&self.syntax).unwrap()), EXTERN_CRATE_ITEM => ModuleItemKind::ExternCrateItem(ExternCrateItem::cast(&self.syntax).unwrap()), @@ -4273,6 +4273,43 @@ impl TupleType { } } +// TypeAliasDef +#[derive(Debug, PartialEq, Eq, Hash)] +#[repr(transparent)] +pub struct TypeAliasDef { + pub(crate) syntax: SyntaxNode, +} +unsafe impl TransparentNewType for TypeAliasDef { + type Repr = rowan::SyntaxNode; +} + +impl AstNode for TypeAliasDef { + fn cast(syntax: &SyntaxNode) -> Option<&Self> { + match syntax.kind() { + TYPE_ALIAS_DEF => Some(TypeAliasDef::from_repr(syntax.into_repr())), + _ => None, + } + } + fn syntax(&self) -> &SyntaxNode { &self.syntax } +} + +impl ToOwned for TypeAliasDef { + type Owned = TreeArc; + fn to_owned(&self) -> TreeArc { TreeArc::cast(self.syntax.to_owned()) } +} + + +impl ast::VisibilityOwner for TypeAliasDef {} +impl ast::NameOwner for TypeAliasDef {} +impl ast::TypeParamsOwner for TypeAliasDef {} +impl ast::AttrsOwner for TypeAliasDef {} +impl ast::DocCommentsOwner for TypeAliasDef {} +impl TypeAliasDef { + pub fn type_ref(&self) -> Option<&TypeRef> { + super::child_opt(self) + } +} + // TypeArg #[derive(Debug, PartialEq, Eq, Hash)] #[repr(transparent)] @@ -4345,43 +4382,6 @@ impl TypeArgList { } } -// TypeDef -#[derive(Debug, PartialEq, Eq, Hash)] -#[repr(transparent)] -pub struct TypeDef { - pub(crate) syntax: SyntaxNode, -} -unsafe impl TransparentNewType for TypeDef { - type Repr = rowan::SyntaxNode; -} - -impl AstNode for TypeDef { - fn cast(syntax: &SyntaxNode) -> Option<&Self> { - match syntax.kind() { - TYPE_DEF => Some(TypeDef::from_repr(syntax.into_repr())), - _ => None, - } - } - fn syntax(&self) -> &SyntaxNode { &self.syntax } -} - -impl ToOwned for TypeDef { - type Owned = TreeArc; - fn to_owned(&self) -> TreeArc { TreeArc::cast(self.syntax.to_owned()) } -} - - -impl ast::VisibilityOwner for TypeDef {} -impl ast::NameOwner for TypeDef {} -impl ast::TypeParamsOwner for TypeDef {} -impl ast::AttrsOwner for TypeDef {} -impl ast::DocCommentsOwner for TypeDef {} -impl TypeDef { - pub fn type_ref(&self) -> Option<&TypeRef> { - super::child_opt(self) - } -} - // TypeParam #[derive(Debug, PartialEq, Eq, Hash)] #[repr(transparent)] diff --git a/crates/ra_syntax/src/grammar.ron b/crates/ra_syntax/src/grammar.ron index b1775d0f8..c7acbbd6c 100644 --- a/crates/ra_syntax/src/grammar.ron +++ b/crates/ra_syntax/src/grammar.ron @@ -132,7 +132,7 @@ Grammar( "CONST_DEF", "TRAIT_DEF", "IMPL_BLOCK", - "TYPE_DEF", + "TYPE_ALIAS_DEF", "MACRO_CALL", "TOKEN_TREE", @@ -312,7 +312,7 @@ Grammar( ], options: ["TypeRef"] ), - "TypeDef": ( + "TypeAliasDef": ( traits: [ "VisibilityOwner", "NameOwner", @@ -363,11 +363,11 @@ Grammar( ], ), "ModuleItem": ( - enum: ["StructDef", "EnumDef", "FnDef", "TraitDef", "TypeDef", "ImplBlock", + enum: ["StructDef", "EnumDef", "FnDef", "TraitDef", "TypeAliasDef", "ImplBlock", "UseItem", "ExternCrateItem", "ConstDef", "StaticDef", "Module" ] ), "ImplItem": ( - enum: ["FnDef", "TypeDef", "ConstDef"] + enum: ["FnDef", "TypeAliasDef", "ConstDef"] ), "TupleExpr": ( diff --git a/crates/ra_syntax/src/parsing/text_tree_sink.rs b/crates/ra_syntax/src/parsing/text_tree_sink.rs index 961a91d41..b17d06c61 100644 --- a/crates/ra_syntax/src/parsing/text_tree_sink.rs +++ b/crates/ra_syntax/src/parsing/text_tree_sink.rs @@ -143,7 +143,7 @@ fn n_attached_trivias<'a>( trivias: impl Iterator, ) -> usize { match kind { - CONST_DEF | TYPE_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN_DEF | TRAIT_DEF + CONST_DEF | TYPE_ALIAS_DEF | STRUCT_DEF | ENUM_DEF | ENUM_VARIANT | FN_DEF | TRAIT_DEF | MODULE | NAMED_FIELD_DEF => { let mut res = 0; for (i, (kind, text)) in trivias.enumerate() { diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt b/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt index 036363587..f02027972 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0001_array_type_missing_semi.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 18) - TYPE_DEF@[0; 12) + TYPE_ALIAS_DEF@[0; 12) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt b/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt index 189aa563e..b11171fd0 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0003_pointer_type_no_mutability.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 14) - TYPE_DEF@[0; 13) + TYPE_ALIAS_DEF@[0; 13) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt b/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt index f97db4bff..ab879db03 100644 --- a/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt +++ b/crates/ra_syntax/tests/data/parser/inline/err/0005_fn_pointer_type_missing_fn.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 20) - TYPE_DEF@[0; 15) + TYPE_ALIAS_DEF@[0; 15) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt index de7df7312..7c9e1e621 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0001_trait_item_list.txt @@ -11,7 +11,7 @@ SOURCE_FILE@[0; 83) ITEM_LIST@[7; 82) L_CURLY@[7; 8) WHITESPACE@[8; 13) - TYPE_DEF@[13; 27) + TYPE_ALIAS_DEF@[13; 27) TYPE_KW@[13; 17) WHITESPACE@[17; 18) NAME@[18; 19) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0004_value_parameters_no_patterns.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0004_value_parameters_no_patterns.txt index f2d7e866b..90284a2aa 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0004_value_parameters_no_patterns.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0004_value_parameters_no_patterns.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 54) - TYPE_DEF@[0; 53) + TYPE_ALIAS_DEF@[0; 53) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt index dbb705acf..9a5f46bab 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0012_type_item_where_clause.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 31) - TYPE_DEF@[0; 30) + TYPE_ALIAS_DEF@[0; 30) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 8) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0013_pointer_type_mut.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0013_pointer_type_mut.txt index 149cd571d..8f1d9ca98 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0013_pointer_type_mut.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0013_pointer_type_mut.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 36) - TYPE_DEF@[0; 17) + TYPE_ALIAS_DEF@[0; 17) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) @@ -16,7 +16,7 @@ SOURCE_FILE@[0; 36) R_PAREN@[15; 16) SEMI@[16; 17) WHITESPACE@[17; 18) - TYPE_DEF@[18; 35) + TYPE_ALIAS_DEF@[18; 35) TYPE_KW@[18; 22) WHITESPACE@[22; 23) NAME@[23; 24) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0014_never_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0014_never_type.txt index e0cae644d..eaa6eb1c0 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0014_never_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0014_never_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 16) - TYPE_DEF@[0; 15) + TYPE_ALIAS_DEF@[0; 15) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 10) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0017_array_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0017_array_type.txt index 2c2b615fc..de09902bb 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0017_array_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0017_array_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 19) - TYPE_DEF@[0; 18) + TYPE_ALIAS_DEF@[0; 18) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.txt index 50426bdfe..08a0b786d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0021_impl_item_list.txt @@ -11,7 +11,7 @@ SOURCE_FILE@[0; 89) ITEM_LIST@[7; 88) L_CURLY@[7; 8) WHITESPACE@[8; 13) - TYPE_DEF@[13; 26) + TYPE_ALIAS_DEF@[13; 26) TYPE_KW@[13; 17) WHITESPACE@[17; 18) NAME@[18; 19) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0023_placeholder_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0023_placeholder_type.txt index 43ada95d4..bb9bb57ea 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0023_placeholder_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0023_placeholder_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 22) - TYPE_DEF@[0; 21) + TYPE_ALIAS_DEF@[0; 21) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 16) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0025_slice_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0025_slice_type.txt index db18c7139..c5f70ca3a 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0025_slice_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0025_slice_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 15) - TYPE_DEF@[0; 14) + TYPE_ALIAS_DEF@[0; 14) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt index efd4dd42a..3b676fb4c 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0028_impl_trait_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 43) - TYPE_DEF@[0; 42) + TYPE_ALIAS_DEF@[0; 42) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0032_fn_pointer_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0032_fn_pointer_type.txt index 0c508ec27..d0aa429fd 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0032_fn_pointer_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0032_fn_pointer_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 70) - TYPE_DEF@[0; 14) + TYPE_ALIAS_DEF@[0; 14) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) @@ -14,7 +14,7 @@ SOURCE_FILE@[0; 70) R_PAREN@[12; 13) SEMI@[13; 14) WHITESPACE@[14; 15) - TYPE_DEF@[15; 36) + TYPE_ALIAS_DEF@[15; 36) TYPE_KW@[15; 19) WHITESPACE@[19; 20) NAME@[20; 21) @@ -31,7 +31,7 @@ SOURCE_FILE@[0; 70) R_PAREN@[34; 35) SEMI@[35; 36) WHITESPACE@[36; 37) - TYPE_DEF@[37; 69) + TYPE_ALIAS_DEF@[37; 69) TYPE_KW@[37; 41) WHITESPACE@[41; 42) NAME@[42; 43) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0033_reference_type;.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0033_reference_type;.txt index 7f35254d1..c015dddeb 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0033_reference_type;.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0033_reference_type;.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 54) - TYPE_DEF@[0; 13) + TYPE_ALIAS_DEF@[0; 13) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) @@ -14,7 +14,7 @@ SOURCE_FILE@[0; 54) R_PAREN@[11; 12) SEMI@[12; 13) WHITESPACE@[13; 14) - TYPE_DEF@[14; 35) + TYPE_ALIAS_DEF@[14; 35) TYPE_KW@[14; 18) WHITESPACE@[18; 19) NAME@[19; 20) @@ -31,7 +31,7 @@ SOURCE_FILE@[0; 54) R_PAREN@[33; 34) SEMI@[34; 35) WHITESPACE@[35; 36) - TYPE_DEF@[36; 53) + TYPE_ALIAS_DEF@[36; 53) TYPE_KW@[36; 40) WHITESPACE@[40; 41) NAME@[41; 42) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0037_qual_paths.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0037_qual_paths.txt index 394fc7f5b..fbc548695 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0037_qual_paths.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0037_qual_paths.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 71) - TYPE_DEF@[0; 26) + TYPE_ALIAS_DEF@[0; 26) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0039_type_arg.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0039_type_arg.txt index ccef7188f..cef13b6aa 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0039_type_arg.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0039_type_arg.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 36) - TYPE_DEF@[0; 35) + TYPE_ALIAS_DEF@[0; 35) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0046_singleton_tuple_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0046_singleton_tuple_type.txt index 173c325d0..33549028b 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0046_singleton_tuple_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0046_singleton_tuple_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 17) - TYPE_DEF@[0; 16) + TYPE_ALIAS_DEF@[0; 16) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0051_unit_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0051_unit_type.txt index 9fd19ba4a..5a6a2a829 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0051_unit_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0051_unit_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 13) - TYPE_DEF@[0; 12) + TYPE_ALIAS_DEF@[0; 12) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0052_path_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0052_path_type.txt index b72b96e95..0531b8fba 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0052_path_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0052_path_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 71) - TYPE_DEF@[0; 13) + TYPE_ALIAS_DEF@[0; 13) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) @@ -14,7 +14,7 @@ SOURCE_FILE@[0; 71) IDENT@[9; 12) "Foo" SEMI@[12; 13) WHITESPACE@[13; 14) - TYPE_DEF@[14; 29) + TYPE_ALIAS_DEF@[14; 29) TYPE_KW@[14; 18) WHITESPACE@[18; 19) NAME@[19; 20) @@ -30,7 +30,7 @@ SOURCE_FILE@[0; 71) IDENT@[25; 28) "Foo" SEMI@[28; 29) WHITESPACE@[29; 30) - TYPE_DEF@[30; 49) + TYPE_ALIAS_DEF@[30; 49) TYPE_KW@[30; 34) WHITESPACE@[34; 35) NAME@[35; 36) @@ -49,7 +49,7 @@ SOURCE_FILE@[0; 71) IDENT@[45; 48) "Foo" SEMI@[48; 49) WHITESPACE@[49; 50) - TYPE_DEF@[50; 70) + TYPE_ALIAS_DEF@[50; 70) TYPE_KW@[50; 54) WHITESPACE@[54; 55) NAME@[55; 56) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt index d07fe70b2..f6a0967f2 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0065_dyn_trait_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 42) - TYPE_DEF@[0; 41) + TYPE_ALIAS_DEF@[0; 41) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0073_type_item_type_params.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0073_type_item_type_params.txt index 89b34d4f1..49ce9ad5e 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0073_type_item_type_params.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0073_type_item_type_params.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 21) - TYPE_DEF@[0; 20) + TYPE_ALIAS_DEF@[0; 20) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 11) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0078_type_item.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0078_type_item.txt index 4b66a05a6..a62a9d1e7 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0078_type_item.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0078_type_item.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 16) - TYPE_DEF@[0; 15) + TYPE_ALIAS_DEF@[0; 15) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 8) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt index 843cc4973..6e7e6bda1 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0081_for_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 29) - TYPE_DEF@[0; 28) + TYPE_ALIAS_DEF@[0; 28) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0084_paren_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0084_paren_type.txt index bd5feb6b3..76b52bf89 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0084_paren_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0084_paren_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 16) - TYPE_DEF@[0; 15) + TYPE_ALIAS_DEF@[0; 15) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0092_fn_pointer_type_with_ret.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0092_fn_pointer_type_with_ret.txt index f092c6df7..dc42a5c00 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0092_fn_pointer_type_with_ret.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0092_fn_pointer_type_with_ret.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 21) - TYPE_DEF@[0; 20) + TYPE_ALIAS_DEF@[0; 20) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0104_path_fn_trait_args.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0104_path_fn_trait_args.txt index ba1163c2d..0254c998d 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0104_path_fn_trait_args.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0104_path_fn_trait_args.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 32) - TYPE_DEF@[0; 31) + TYPE_ALIAS_DEF@[0; 31) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.txt b/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.txt index b2d95451c..608b4a5f0 100644 --- a/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.txt +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0117_macro_call_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 41) - TYPE_DEF@[0; 16) + TYPE_ALIAS_DEF@[0; 16) TYPE_KW@[0; 4) WHITESPACE@[4; 5) NAME@[5; 6) @@ -18,7 +18,7 @@ SOURCE_FILE@[0; 41) R_PAREN@[14; 15) SEMI@[15; 16) WHITESPACE@[16; 17) - TYPE_DEF@[17; 40) + TYPE_ALIAS_DEF@[17; 40) TYPE_KW@[17; 21) WHITESPACE@[21; 22) NAME@[22; 23) -- cgit v1.2.3