From a1e18695548b5cd6661f26a985b34c8b105e1896 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 29 Feb 2020 21:24:40 +0100 Subject: Rename ast::ImplBlock -> ast::ImplDef --- crates/ra_syntax/src/ast/extensions.rs | 2 +- crates/ra_syntax/src/ast/generated.rs | 28 +++++++++++----------- crates/ra_syntax/src/validation.rs | 5 ++-- .../test_data/parser/err/0018_incomplete_fn.txt | 2 +- .../test_data/parser/err/0022_bad_exprs.txt | 2 +- .../test_data/parser/err/0026_imp_recovery.txt | 4 ++-- .../parser/err/0037_visibility_in_traits.txt | 2 +- .../parser/inline/err/0002_misplaced_label_err.txt | 2 +- .../test_data/parser/inline/err/0004_impl_type.txt | 12 +++++----- .../parser/inline/ok/0001_trait_item_list.txt | 2 +- .../test_data/parser/inline/ok/0006_self_param.txt | 2 +- .../parser/inline/ok/0018_arb_self_types.txt | 2 +- .../parser/inline/ok/0021_impl_item_list.txt | 2 +- .../parser/inline/ok/0047_unsafe_default_impl.txt | 2 +- .../parser/inline/ok/0063_impl_block_neg.rs | 1 - .../parser/inline/ok/0063_impl_block_neg.txt | 23 ------------------ .../parser/inline/ok/0063_impl_def_neg.rs | 1 + .../parser/inline/ok/0063_impl_def_neg.txt | 23 ++++++++++++++++++ .../test_data/parser/inline/ok/0079_impl_block.rs | 1 - .../test_data/parser/inline/ok/0079_impl_block.txt | 14 ----------- .../test_data/parser/inline/ok/0079_impl_def.rs | 1 + .../test_data/parser/inline/ok/0079_impl_def.txt | 14 +++++++++++ .../parser/inline/ok/0087_unsafe_impl.txt | 2 +- .../parser/inline/ok/0097_default_impl.txt | 2 +- .../inline/ok/0118_impl_inner_attributes.txt | 2 +- .../parser/inline/ok/0132_default_fn_type.txt | 2 +- .../parser/inline/ok/0150_impl_type_params.txt | 2 +- .../parser/inline/ok/0152_fn_patterns.txt | 2 +- .../test_data/parser/ok/0042_ufcs_call_list.txt | 2 +- .../test_data/parser/ok/0045_block_inner_attrs.txt | 2 +- .../test_data/parser/ok/0051_parameter_attrs.txt | 2 +- 31 files changed, 82 insertions(+), 83 deletions(-) delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.txt create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rs create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.txt delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.rs delete mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.txt create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rs create mode 100644 crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.txt (limited to 'crates/ra_syntax') diff --git a/crates/ra_syntax/src/ast/extensions.rs b/crates/ra_syntax/src/ast/extensions.rs index 44de4af89..d5986e8b4 100644 --- a/crates/ra_syntax/src/ast/extensions.rs +++ b/crates/ra_syntax/src/ast/extensions.rs @@ -169,7 +169,7 @@ impl ast::UseTreeList { } } -impl ast::ImplBlock { +impl ast::ImplDef { pub fn target_type(&self) -> Option { match self.target() { (Some(t), None) | (_, Some(t)) => Some(t), diff --git a/crates/ra_syntax/src/ast/generated.rs b/crates/ra_syntax/src/ast/generated.rs index 8eb240801..150893e39 100644 --- a/crates/ra_syntax/src/ast/generated.rs +++ b/crates/ra_syntax/src/ast/generated.rs @@ -552,13 +552,13 @@ impl TypeAliasDef { } } #[derive(Debug, Clone, PartialEq, Eq, Hash)] -pub struct ImplBlock { +pub struct ImplDef { pub(crate) syntax: SyntaxNode, } -impl AstNode for ImplBlock { +impl AstNode for ImplDef { fn can_cast(kind: SyntaxKind) -> bool { match kind { - IMPL_BLOCK => true, + IMPL_DEF => true, _ => false, } } @@ -573,9 +573,9 @@ impl AstNode for ImplBlock { &self.syntax } } -impl ast::TypeParamsOwner for ImplBlock {} -impl ast::AttrsOwner for ImplBlock {} -impl ImplBlock { +impl ast::TypeParamsOwner for ImplDef {} +impl ast::AttrsOwner for ImplDef {} +impl ImplDef { pub fn item_list(&self) -> Option { AstChildren::new(&self.syntax).next() } @@ -3524,7 +3524,7 @@ pub enum ModuleItem { FnDef(FnDef), TraitDef(TraitDef), TypeAliasDef(TypeAliasDef), - ImplBlock(ImplBlock), + ImplDef(ImplDef), UseItem(UseItem), ExternCrateItem(ExternCrateItem), ConstDef(ConstDef), @@ -3561,9 +3561,9 @@ impl From for ModuleItem { ModuleItem::TypeAliasDef(node) } } -impl From for ModuleItem { - fn from(node: ImplBlock) -> ModuleItem { - ModuleItem::ImplBlock(node) +impl From for ModuleItem { + fn from(node: ImplDef) -> ModuleItem { + ModuleItem::ImplDef(node) } } impl From for ModuleItem { @@ -3594,8 +3594,8 @@ impl From for ModuleItem { impl AstNode for ModuleItem { fn can_cast(kind: SyntaxKind) -> bool { match kind { - STRUCT_DEF | UNION_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | TYPE_ALIAS_DEF - | IMPL_BLOCK | USE_ITEM | EXTERN_CRATE_ITEM | CONST_DEF | STATIC_DEF | MODULE => true, + STRUCT_DEF | UNION_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | TYPE_ALIAS_DEF | IMPL_DEF + | USE_ITEM | EXTERN_CRATE_ITEM | CONST_DEF | STATIC_DEF | MODULE => true, _ => false, } } @@ -3607,7 +3607,7 @@ impl AstNode for ModuleItem { FN_DEF => ModuleItem::FnDef(FnDef { syntax }), TRAIT_DEF => ModuleItem::TraitDef(TraitDef { syntax }), TYPE_ALIAS_DEF => ModuleItem::TypeAliasDef(TypeAliasDef { syntax }), - IMPL_BLOCK => ModuleItem::ImplBlock(ImplBlock { syntax }), + IMPL_DEF => ModuleItem::ImplDef(ImplDef { syntax }), USE_ITEM => ModuleItem::UseItem(UseItem { syntax }), EXTERN_CRATE_ITEM => ModuleItem::ExternCrateItem(ExternCrateItem { syntax }), CONST_DEF => ModuleItem::ConstDef(ConstDef { syntax }), @@ -3625,7 +3625,7 @@ impl AstNode for ModuleItem { ModuleItem::FnDef(it) => &it.syntax, ModuleItem::TraitDef(it) => &it.syntax, ModuleItem::TypeAliasDef(it) => &it.syntax, - ModuleItem::ImplBlock(it) => &it.syntax, + ModuleItem::ImplDef(it) => &it.syntax, ModuleItem::UseItem(it) => &it.syntax, ModuleItem::ExternCrateItem(it) => &it.syntax, ModuleItem::ConstDef(it) => &it.syntax, diff --git a/crates/ra_syntax/src/validation.rs b/crates/ra_syntax/src/validation.rs index 863859dca..7915cf8cb 100644 --- a/crates/ra_syntax/src/validation.rs +++ b/crates/ra_syntax/src/validation.rs @@ -203,12 +203,11 @@ fn validate_visibility(vis: ast::Visibility, errors: &mut Vec) { _ => return, } - let impl_block = match parent.parent().and_then(|it| it.parent()).and_then(ast::ImplBlock::cast) - { + let impl_def = match parent.parent().and_then(|it| it.parent()).and_then(ast::ImplDef::cast) { Some(it) => it, None => return, }; - if impl_block.target_trait().is_some() { + if impl_def.target_trait().is_some() { errors.push(SyntaxError::new("Unnecessary visibility qualifier", vis.syntax.text_range())); } } diff --git a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt index b9e60f6c1..4b13a7236 100644 --- a/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt +++ b/crates/ra_syntax/test_data/parser/err/0018_incomplete_fn.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 183) - IMPL_BLOCK@[0; 182) + IMPL_DEF@[0; 182) IMPL_KW@[0; 4) "impl" WHITESPACE@[4; 5) " " PATH_TYPE@[5; 13) diff --git a/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt index bb87022b0..9f50c85e5 100644 --- a/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt +++ b/crates/ra_syntax/test_data/parser/err/0022_bad_exprs.txt @@ -77,7 +77,7 @@ SOURCE_FILE@[0; 112) ERROR@[54; 55) COMMA@[54; 55) "," WHITESPACE@[55; 56) " " - IMPL_BLOCK@[56; 60) + IMPL_DEF@[56; 60) IMPL_KW@[56; 60) "impl" EXPR_STMT@[60; 61) ERROR@[60; 61) diff --git a/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt b/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt index 3942e0904..f239b7b1e 100644 --- a/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt +++ b/crates/ra_syntax/test_data/parser/err/0026_imp_recovery.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 38) - IMPL_BLOCK@[0; 14) + IMPL_DEF@[0; 14) IMPL_KW@[0; 4) "impl" TYPE_PARAM_LIST@[4; 14) L_ANGLE@[4; 5) "<" @@ -17,7 +17,7 @@ SOURCE_FILE@[0; 38) IDENT@[8; 13) "Clone" R_ANGLE@[13; 14) ">" WHITESPACE@[14; 15) "\n" - IMPL_BLOCK@[15; 37) + IMPL_DEF@[15; 37) IMPL_KW@[15; 19) "impl" TYPE_PARAM_LIST@[19; 22) L_ANGLE@[19; 20) "<" diff --git a/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.txt b/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.txt index d0a128a5f..d8622d45f 100644 --- a/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.txt +++ b/crates/ra_syntax/test_data/parser/err/0037_visibility_in_traits.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 118) - IMPL_BLOCK@[0; 117) + IMPL_DEF@[0; 117) IMPL_KW@[0; 4) "impl" WHITESPACE@[4; 5) " " PATH_TYPE@[5; 6) diff --git a/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt index 0187d872d..01a853d63 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0002_misplaced_label_err.txt @@ -18,7 +18,7 @@ SOURCE_FILE@[0; 30) LIFETIME@[16; 21) "\'loop" COLON@[21; 22) ":" WHITESPACE@[22; 23) " " - IMPL_BLOCK@[23; 27) + IMPL_DEF@[23; 27) IMPL_KW@[23; 27) "impl" WHITESPACE@[27; 28) "\n" R_CURLY@[28; 29) "}" diff --git a/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.txt b/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.txt index d5aea05c2..124f0a891 100644 --- a/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/err/0004_impl_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 87) - IMPL_BLOCK@[0; 12) + IMPL_DEF@[0; 12) IMPL_KW@[0; 4) "impl" WHITESPACE@[4; 5) " " PATH_TYPE@[5; 9) @@ -12,7 +12,7 @@ SOURCE_FILE@[0; 87) L_CURLY@[10; 11) "{" R_CURLY@[11; 12) "}" WHITESPACE@[12; 13) "\n" - IMPL_BLOCK@[13; 33) + IMPL_DEF@[13; 33) IMPL_KW@[13; 17) "impl" WHITESPACE@[17; 18) " " PATH_TYPE@[18; 24) @@ -33,10 +33,10 @@ SOURCE_FILE@[0; 87) L_CURLY@[31; 32) "{" R_CURLY@[32; 33) "}" WHITESPACE@[33; 34) "\n" - IMPL_BLOCK@[34; 38) + IMPL_DEF@[34; 38) IMPL_KW@[34; 38) "impl" WHITESPACE@[38; 39) " " - IMPL_BLOCK@[39; 54) + IMPL_DEF@[39; 54) IMPL_KW@[39; 43) "impl" WHITESPACE@[43; 44) " " PATH_TYPE@[44; 51) @@ -49,7 +49,7 @@ SOURCE_FILE@[0; 87) L_CURLY@[52; 53) "{" R_CURLY@[53; 54) "}" WHITESPACE@[54; 55) "\n" - IMPL_BLOCK@[55; 70) + IMPL_DEF@[55; 70) IMPL_KW@[55; 59) "impl" WHITESPACE@[59; 60) " " PATH_TYPE@[60; 66) @@ -60,7 +60,7 @@ SOURCE_FILE@[0; 87) WHITESPACE@[66; 67) " " FOR_KW@[67; 70) "for" WHITESPACE@[70; 71) " " - IMPL_BLOCK@[71; 86) + IMPL_DEF@[71; 86) IMPL_KW@[71; 75) "impl" WHITESPACE@[75; 76) " " PATH_TYPE@[76; 83) diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.txt b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.txt index d4e710dd4..ad9f0965e 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0001_trait_item_list.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 83) - IMPL_BLOCK@[0; 82) + IMPL_DEF@[0; 82) IMPL_KW@[0; 4) "impl" WHITESPACE@[4; 5) " " PATH_TYPE@[5; 6) diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.txt b/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.txt index 0ccd12b0a..757ac092a 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0006_self_param.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 128) - IMPL_BLOCK@[0; 127) + IMPL_DEF@[0; 127) IMPL_KW@[0; 4) "impl" WHITESPACE@[4; 5) " " PATH_TYPE@[5; 6) diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.txt b/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.txt index d0beeb81e..89caee543 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0018_arb_self_types.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 69) - IMPL_BLOCK@[0; 68) + IMPL_DEF@[0; 68) IMPL_KW@[0; 4) "impl" WHITESPACE@[4; 5) " " PATH_TYPE@[5; 6) diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.txt b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.txt index 0768f0518..b1af67976 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0021_impl_item_list.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 89) - IMPL_BLOCK@[0; 88) + IMPL_DEF@[0; 88) IMPL_KW@[0; 4) "impl" WHITESPACE@[4; 5) " " PATH_TYPE@[5; 6) diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.txt b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.txt index 8f3dcaf88..0a768a8e3 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0047_unsafe_default_impl.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 27) - IMPL_BLOCK@[0; 26) + IMPL_DEF@[0; 26) UNSAFE_KW@[0; 6) "unsafe" WHITESPACE@[6; 7) " " DEFAULT_KW@[7; 14) "default" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.rs b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.rs deleted file mode 100644 index b7527c870..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.rs +++ /dev/null @@ -1 +0,0 @@ -impl !Send for X {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.txt b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.txt deleted file mode 100644 index dfff947fe..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_block_neg.txt +++ /dev/null @@ -1,23 +0,0 @@ -SOURCE_FILE@[0; 20) - IMPL_BLOCK@[0; 19) - IMPL_KW@[0; 4) "impl" - WHITESPACE@[4; 5) " " - EXCL@[5; 6) "!" - PATH_TYPE@[6; 10) - PATH@[6; 10) - PATH_SEGMENT@[6; 10) - NAME_REF@[6; 10) - IDENT@[6; 10) "Send" - WHITESPACE@[10; 11) " " - FOR_KW@[11; 14) "for" - WHITESPACE@[14; 15) " " - PATH_TYPE@[15; 16) - PATH@[15; 16) - PATH_SEGMENT@[15; 16) - NAME_REF@[15; 16) - IDENT@[15; 16) "X" - WHITESPACE@[16; 17) " " - ITEM_LIST@[17; 19) - L_CURLY@[17; 18) "{" - R_CURLY@[18; 19) "}" - WHITESPACE@[19; 20) "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rs b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rs new file mode 100644 index 000000000..b7527c870 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.rs @@ -0,0 +1 @@ +impl !Send for X {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.txt b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.txt new file mode 100644 index 000000000..0cc3ac085 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0063_impl_def_neg.txt @@ -0,0 +1,23 @@ +SOURCE_FILE@[0; 20) + IMPL_DEF@[0; 19) + IMPL_KW@[0; 4) "impl" + WHITESPACE@[4; 5) " " + EXCL@[5; 6) "!" + PATH_TYPE@[6; 10) + PATH@[6; 10) + PATH_SEGMENT@[6; 10) + NAME_REF@[6; 10) + IDENT@[6; 10) "Send" + WHITESPACE@[10; 11) " " + FOR_KW@[11; 14) "for" + WHITESPACE@[14; 15) " " + PATH_TYPE@[15; 16) + PATH@[15; 16) + PATH_SEGMENT@[15; 16) + NAME_REF@[15; 16) + IDENT@[15; 16) "X" + WHITESPACE@[16; 17) " " + ITEM_LIST@[17; 19) + L_CURLY@[17; 18) "{" + R_CURLY@[18; 19) "}" + WHITESPACE@[19; 20) "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.rs b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.rs deleted file mode 100644 index d6337f6b3..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.rs +++ /dev/null @@ -1 +0,0 @@ -impl Foo {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.txt b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.txt deleted file mode 100644 index bda3435e8..000000000 --- a/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.txt +++ /dev/null @@ -1,14 +0,0 @@ -SOURCE_FILE@[0; 12) - IMPL_BLOCK@[0; 11) - IMPL_KW@[0; 4) "impl" - WHITESPACE@[4; 5) " " - PATH_TYPE@[5; 8) - PATH@[5; 8) - PATH_SEGMENT@[5; 8) - NAME_REF@[5; 8) - IDENT@[5; 8) "Foo" - WHITESPACE@[8; 9) " " - ITEM_LIST@[9; 11) - L_CURLY@[9; 10) "{" - R_CURLY@[10; 11) "}" - WHITESPACE@[11; 12) "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rs b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rs new file mode 100644 index 000000000..d6337f6b3 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rs @@ -0,0 +1 @@ +impl Foo {} diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.txt b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.txt new file mode 100644 index 000000000..4c2863ba7 --- /dev/null +++ b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.txt @@ -0,0 +1,14 @@ +SOURCE_FILE@[0; 12) + IMPL_DEF@[0; 11) + IMPL_KW@[0; 4) "impl" + WHITESPACE@[4; 5) " " + PATH_TYPE@[5; 8) + PATH@[5; 8) + PATH_SEGMENT@[5; 8) + NAME_REF@[5; 8) + IDENT@[5; 8) "Foo" + WHITESPACE@[8; 9) " " + ITEM_LIST@[9; 11) + L_CURLY@[9; 10) "{" + R_CURLY@[10; 11) "}" + WHITESPACE@[11; 12) "\n" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.txt b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.txt index 590e2a88f..e614acc6f 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0087_unsafe_impl.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 19) - IMPL_BLOCK@[0; 18) + IMPL_DEF@[0; 18) UNSAFE_KW@[0; 6) "unsafe" WHITESPACE@[6; 7) " " IMPL_KW@[7; 11) "impl" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.txt b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.txt index ada94a824..af9077270 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0097_default_impl.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 20) - IMPL_BLOCK@[0; 19) + IMPL_DEF@[0; 19) DEFAULT_KW@[0; 7) "default" WHITESPACE@[7; 8) " " IMPL_KW@[8; 12) "impl" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.txt b/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.txt index 0e9e9b95b..5053ebde7 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0118_impl_inner_attributes.txt @@ -8,7 +8,7 @@ SOURCE_FILE@[0; 94) L_CURLY@[6; 7) "{" R_CURLY@[7; 8) "}" WHITESPACE@[8; 9) "\n" - IMPL_BLOCK@[9; 93) + IMPL_DEF@[9; 93) IMPL_KW@[9; 13) "impl" WHITESPACE@[13; 14) " " PATH_TYPE@[14; 15) diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.txt b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.txt index 022070b0c..e1734224b 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0132_default_fn_type.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 69) - IMPL_BLOCK@[0; 68) + IMPL_DEF@[0; 68) IMPL_KW@[0; 4) "impl" WHITESPACE@[4; 5) " " PATH_TYPE@[5; 6) diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.txt b/crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.txt index 47fadef85..2d46eebb3 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0150_impl_type_params.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 29) - IMPL_BLOCK@[0; 28) + IMPL_DEF@[0; 28) IMPL_KW@[0; 4) "impl" TYPE_PARAM_LIST@[4; 18) L_ANGLE@[4; 5) "<" diff --git a/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.txt b/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.txt index 933f5b7bd..b30030de3 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0152_fn_patterns.txt @@ -1,5 +1,5 @@ SOURCE_FILE@[0; 137) - IMPL_BLOCK@[0; 136) + IMPL_DEF@[0; 136) IMPL_KW@[0; 4) "impl" WHITESPACE@[4; 5) " " PATH_TYPE@[5; 6) diff --git a/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.txt b/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.txt index 72f053dfc..341e02704 100644 --- a/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.txt +++ b/crates/ra_syntax/test_data/parser/ok/0042_ufcs_call_list.txt @@ -8,7 +8,7 @@ SOURCE_FILE@[0; 199) IDENT@[69; 72) "Foo" SEMI@[72; 73) ";" WHITESPACE@[73; 75) "\n\n" - IMPL_BLOCK@[75; 141) + IMPL_DEF@[75; 141) IMPL_KW@[75; 79) "impl" WHITESPACE@[79; 80) " " PATH_TYPE@[80; 83) diff --git a/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.txt b/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.txt index 3d9aab500..e15447ca7 100644 --- a/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.txt +++ b/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.txt @@ -92,7 +92,7 @@ SOURCE_FILE@[0; 686) WHITESPACE@[461; 463) "\n\n" COMMENT@[463; 523) "// https://github.com ..." WHITESPACE@[523; 524) "\n" - IMPL_BLOCK@[524; 685) + IMPL_DEF@[524; 685) IMPL_KW@[524; 528) "impl" WHITESPACE@[528; 529) " " PATH_TYPE@[529; 537) diff --git a/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.txt b/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.txt index bfd47d2e1..719c99c17 100644 --- a/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.txt +++ b/crates/ra_syntax/test_data/parser/ok/0051_parameter_attrs.txt @@ -253,7 +253,7 @@ SOURCE_FILE@[0; 519) WHITESPACE@[234; 235) "\n" R_CURLY@[235; 236) "}" WHITESPACE@[236; 238) "\n\n" - IMPL_BLOCK@[238; 519) + IMPL_DEF@[238; 519) IMPL_KW@[238; 242) "impl" WHITESPACE@[242; 243) " " PATH_TYPE@[243; 244) -- cgit v1.2.3