diff options
Diffstat (limited to 'crates/ra_syntax')
28 files changed, 46 insertions, 47 deletions
diff --git a/crates/ra_syntax/src/ast.rs b/crates/ra_syntax/src/ast.rs index 9cc7930f7..4a70c712f 100644 --- a/crates/ra_syntax/src/ast.rs +++ b/crates/ra_syntax/src/ast.rs | |||
@@ -59,7 +59,7 @@ pub trait AstToken { | |||
59 | } | 59 | } |
60 | 60 | ||
61 | /// An iterator over `SyntaxNode` children of a particular AST type. | 61 | /// An iterator over `SyntaxNode` children of a particular AST type. |
62 | #[derive(Debug)] | 62 | #[derive(Debug, Clone)] |
63 | pub struct AstChildren<N> { | 63 | pub struct AstChildren<N> { |
64 | inner: SyntaxNodeChildren, | 64 | inner: SyntaxNodeChildren, |
65 | ph: PhantomData<N>, | 65 | ph: PhantomData<N>, |
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 { | |||
169 | } | 169 | } |
170 | } | 170 | } |
171 | 171 | ||
172 | impl ast::ImplBlock { | 172 | impl ast::ImplDef { |
173 | pub fn target_type(&self) -> Option<ast::TypeRef> { | 173 | pub fn target_type(&self) -> Option<ast::TypeRef> { |
174 | match self.target() { | 174 | match self.target() { |
175 | (Some(t), None) | (_, Some(t)) => Some(t), | 175 | (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 { | |||
552 | } | 552 | } |
553 | } | 553 | } |
554 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] | 554 | #[derive(Debug, Clone, PartialEq, Eq, Hash)] |
555 | pub struct ImplBlock { | 555 | pub struct ImplDef { |
556 | pub(crate) syntax: SyntaxNode, | 556 | pub(crate) syntax: SyntaxNode, |
557 | } | 557 | } |
558 | impl AstNode for ImplBlock { | 558 | impl AstNode for ImplDef { |
559 | fn can_cast(kind: SyntaxKind) -> bool { | 559 | fn can_cast(kind: SyntaxKind) -> bool { |
560 | match kind { | 560 | match kind { |
561 | IMPL_BLOCK => true, | 561 | IMPL_DEF => true, |
562 | _ => false, | 562 | _ => false, |
563 | } | 563 | } |
564 | } | 564 | } |
@@ -573,9 +573,9 @@ impl AstNode for ImplBlock { | |||
573 | &self.syntax | 573 | &self.syntax |
574 | } | 574 | } |
575 | } | 575 | } |
576 | impl ast::TypeParamsOwner for ImplBlock {} | 576 | impl ast::TypeParamsOwner for ImplDef {} |
577 | impl ast::AttrsOwner for ImplBlock {} | 577 | impl ast::AttrsOwner for ImplDef {} |
578 | impl ImplBlock { | 578 | impl ImplDef { |
579 | pub fn item_list(&self) -> Option<ItemList> { | 579 | pub fn item_list(&self) -> Option<ItemList> { |
580 | AstChildren::new(&self.syntax).next() | 580 | AstChildren::new(&self.syntax).next() |
581 | } | 581 | } |
@@ -3524,7 +3524,7 @@ pub enum ModuleItem { | |||
3524 | FnDef(FnDef), | 3524 | FnDef(FnDef), |
3525 | TraitDef(TraitDef), | 3525 | TraitDef(TraitDef), |
3526 | TypeAliasDef(TypeAliasDef), | 3526 | TypeAliasDef(TypeAliasDef), |
3527 | ImplBlock(ImplBlock), | 3527 | ImplDef(ImplDef), |
3528 | UseItem(UseItem), | 3528 | UseItem(UseItem), |
3529 | ExternCrateItem(ExternCrateItem), | 3529 | ExternCrateItem(ExternCrateItem), |
3530 | ConstDef(ConstDef), | 3530 | ConstDef(ConstDef), |
@@ -3561,9 +3561,9 @@ impl From<TypeAliasDef> for ModuleItem { | |||
3561 | ModuleItem::TypeAliasDef(node) | 3561 | ModuleItem::TypeAliasDef(node) |
3562 | } | 3562 | } |
3563 | } | 3563 | } |
3564 | impl From<ImplBlock> for ModuleItem { | 3564 | impl From<ImplDef> for ModuleItem { |
3565 | fn from(node: ImplBlock) -> ModuleItem { | 3565 | fn from(node: ImplDef) -> ModuleItem { |
3566 | ModuleItem::ImplBlock(node) | 3566 | ModuleItem::ImplDef(node) |
3567 | } | 3567 | } |
3568 | } | 3568 | } |
3569 | impl From<UseItem> for ModuleItem { | 3569 | impl From<UseItem> for ModuleItem { |
@@ -3594,8 +3594,8 @@ impl From<Module> for ModuleItem { | |||
3594 | impl AstNode for ModuleItem { | 3594 | impl AstNode for ModuleItem { |
3595 | fn can_cast(kind: SyntaxKind) -> bool { | 3595 | fn can_cast(kind: SyntaxKind) -> bool { |
3596 | match kind { | 3596 | match kind { |
3597 | STRUCT_DEF | UNION_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | TYPE_ALIAS_DEF | 3597 | STRUCT_DEF | UNION_DEF | ENUM_DEF | FN_DEF | TRAIT_DEF | TYPE_ALIAS_DEF | IMPL_DEF |
3598 | | IMPL_BLOCK | USE_ITEM | EXTERN_CRATE_ITEM | CONST_DEF | STATIC_DEF | MODULE => true, | 3598 | | USE_ITEM | EXTERN_CRATE_ITEM | CONST_DEF | STATIC_DEF | MODULE => true, |
3599 | _ => false, | 3599 | _ => false, |
3600 | } | 3600 | } |
3601 | } | 3601 | } |
@@ -3607,7 +3607,7 @@ impl AstNode for ModuleItem { | |||
3607 | FN_DEF => ModuleItem::FnDef(FnDef { syntax }), | 3607 | FN_DEF => ModuleItem::FnDef(FnDef { syntax }), |
3608 | TRAIT_DEF => ModuleItem::TraitDef(TraitDef { syntax }), | 3608 | TRAIT_DEF => ModuleItem::TraitDef(TraitDef { syntax }), |
3609 | TYPE_ALIAS_DEF => ModuleItem::TypeAliasDef(TypeAliasDef { syntax }), | 3609 | TYPE_ALIAS_DEF => ModuleItem::TypeAliasDef(TypeAliasDef { syntax }), |
3610 | IMPL_BLOCK => ModuleItem::ImplBlock(ImplBlock { syntax }), | 3610 | IMPL_DEF => ModuleItem::ImplDef(ImplDef { syntax }), |
3611 | USE_ITEM => ModuleItem::UseItem(UseItem { syntax }), | 3611 | USE_ITEM => ModuleItem::UseItem(UseItem { syntax }), |
3612 | EXTERN_CRATE_ITEM => ModuleItem::ExternCrateItem(ExternCrateItem { syntax }), | 3612 | EXTERN_CRATE_ITEM => ModuleItem::ExternCrateItem(ExternCrateItem { syntax }), |
3613 | CONST_DEF => ModuleItem::ConstDef(ConstDef { syntax }), | 3613 | CONST_DEF => ModuleItem::ConstDef(ConstDef { syntax }), |
@@ -3625,7 +3625,7 @@ impl AstNode for ModuleItem { | |||
3625 | ModuleItem::FnDef(it) => &it.syntax, | 3625 | ModuleItem::FnDef(it) => &it.syntax, |
3626 | ModuleItem::TraitDef(it) => &it.syntax, | 3626 | ModuleItem::TraitDef(it) => &it.syntax, |
3627 | ModuleItem::TypeAliasDef(it) => &it.syntax, | 3627 | ModuleItem::TypeAliasDef(it) => &it.syntax, |
3628 | ModuleItem::ImplBlock(it) => &it.syntax, | 3628 | ModuleItem::ImplDef(it) => &it.syntax, |
3629 | ModuleItem::UseItem(it) => &it.syntax, | 3629 | ModuleItem::UseItem(it) => &it.syntax, |
3630 | ModuleItem::ExternCrateItem(it) => &it.syntax, | 3630 | ModuleItem::ExternCrateItem(it) => &it.syntax, |
3631 | ModuleItem::ConstDef(it) => &it.syntax, | 3631 | 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<SyntaxError>) { | |||
203 | _ => return, | 203 | _ => return, |
204 | } | 204 | } |
205 | 205 | ||
206 | let impl_block = match parent.parent().and_then(|it| it.parent()).and_then(ast::ImplBlock::cast) | 206 | let impl_def = match parent.parent().and_then(|it| it.parent()).and_then(ast::ImplDef::cast) { |
207 | { | ||
208 | Some(it) => it, | 207 | Some(it) => it, |
209 | None => return, | 208 | None => return, |
210 | }; | 209 | }; |
211 | if impl_block.target_trait().is_some() { | 210 | if impl_def.target_trait().is_some() { |
212 | errors.push(SyntaxError::new("Unnecessary visibility qualifier", vis.syntax.text_range())); | 211 | errors.push(SyntaxError::new("Unnecessary visibility qualifier", vis.syntax.text_range())); |
213 | } | 212 | } |
214 | } | 213 | } |
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 @@ | |||
1 | SOURCE_FILE@[0; 183) | 1 | SOURCE_FILE@[0; 183) |
2 | IMPL_BLOCK@[0; 182) | 2 | IMPL_DEF@[0; 182) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
5 | PATH_TYPE@[5; 13) | 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) | |||
77 | ERROR@[54; 55) | 77 | ERROR@[54; 55) |
78 | COMMA@[54; 55) "," | 78 | COMMA@[54; 55) "," |
79 | WHITESPACE@[55; 56) " " | 79 | WHITESPACE@[55; 56) " " |
80 | IMPL_BLOCK@[56; 60) | 80 | IMPL_DEF@[56; 60) |
81 | IMPL_KW@[56; 60) "impl" | 81 | IMPL_KW@[56; 60) "impl" |
82 | EXPR_STMT@[60; 61) | 82 | EXPR_STMT@[60; 61) |
83 | ERROR@[60; 61) | 83 | 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 @@ | |||
1 | SOURCE_FILE@[0; 38) | 1 | SOURCE_FILE@[0; 38) |
2 | IMPL_BLOCK@[0; 14) | 2 | IMPL_DEF@[0; 14) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | TYPE_PARAM_LIST@[4; 14) | 4 | TYPE_PARAM_LIST@[4; 14) |
5 | L_ANGLE@[4; 5) "<" | 5 | L_ANGLE@[4; 5) "<" |
@@ -17,7 +17,7 @@ SOURCE_FILE@[0; 38) | |||
17 | IDENT@[8; 13) "Clone" | 17 | IDENT@[8; 13) "Clone" |
18 | R_ANGLE@[13; 14) ">" | 18 | R_ANGLE@[13; 14) ">" |
19 | WHITESPACE@[14; 15) "\n" | 19 | WHITESPACE@[14; 15) "\n" |
20 | IMPL_BLOCK@[15; 37) | 20 | IMPL_DEF@[15; 37) |
21 | IMPL_KW@[15; 19) "impl" | 21 | IMPL_KW@[15; 19) "impl" |
22 | TYPE_PARAM_LIST@[19; 22) | 22 | TYPE_PARAM_LIST@[19; 22) |
23 | L_ANGLE@[19; 20) "<" | 23 | 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 @@ | |||
1 | SOURCE_FILE@[0; 118) | 1 | SOURCE_FILE@[0; 118) |
2 | IMPL_BLOCK@[0; 117) | 2 | IMPL_DEF@[0; 117) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
5 | PATH_TYPE@[5; 6) | 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) | |||
18 | LIFETIME@[16; 21) "\'loop" | 18 | LIFETIME@[16; 21) "\'loop" |
19 | COLON@[21; 22) ":" | 19 | COLON@[21; 22) ":" |
20 | WHITESPACE@[22; 23) " " | 20 | WHITESPACE@[22; 23) " " |
21 | IMPL_BLOCK@[23; 27) | 21 | IMPL_DEF@[23; 27) |
22 | IMPL_KW@[23; 27) "impl" | 22 | IMPL_KW@[23; 27) "impl" |
23 | WHITESPACE@[27; 28) "\n" | 23 | WHITESPACE@[27; 28) "\n" |
24 | R_CURLY@[28; 29) "}" | 24 | 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 @@ | |||
1 | SOURCE_FILE@[0; 87) | 1 | SOURCE_FILE@[0; 87) |
2 | IMPL_BLOCK@[0; 12) | 2 | IMPL_DEF@[0; 12) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
5 | PATH_TYPE@[5; 9) | 5 | PATH_TYPE@[5; 9) |
@@ -12,7 +12,7 @@ SOURCE_FILE@[0; 87) | |||
12 | L_CURLY@[10; 11) "{" | 12 | L_CURLY@[10; 11) "{" |
13 | R_CURLY@[11; 12) "}" | 13 | R_CURLY@[11; 12) "}" |
14 | WHITESPACE@[12; 13) "\n" | 14 | WHITESPACE@[12; 13) "\n" |
15 | IMPL_BLOCK@[13; 33) | 15 | IMPL_DEF@[13; 33) |
16 | IMPL_KW@[13; 17) "impl" | 16 | IMPL_KW@[13; 17) "impl" |
17 | WHITESPACE@[17; 18) " " | 17 | WHITESPACE@[17; 18) " " |
18 | PATH_TYPE@[18; 24) | 18 | PATH_TYPE@[18; 24) |
@@ -33,10 +33,10 @@ SOURCE_FILE@[0; 87) | |||
33 | L_CURLY@[31; 32) "{" | 33 | L_CURLY@[31; 32) "{" |
34 | R_CURLY@[32; 33) "}" | 34 | R_CURLY@[32; 33) "}" |
35 | WHITESPACE@[33; 34) "\n" | 35 | WHITESPACE@[33; 34) "\n" |
36 | IMPL_BLOCK@[34; 38) | 36 | IMPL_DEF@[34; 38) |
37 | IMPL_KW@[34; 38) "impl" | 37 | IMPL_KW@[34; 38) "impl" |
38 | WHITESPACE@[38; 39) " " | 38 | WHITESPACE@[38; 39) " " |
39 | IMPL_BLOCK@[39; 54) | 39 | IMPL_DEF@[39; 54) |
40 | IMPL_KW@[39; 43) "impl" | 40 | IMPL_KW@[39; 43) "impl" |
41 | WHITESPACE@[43; 44) " " | 41 | WHITESPACE@[43; 44) " " |
42 | PATH_TYPE@[44; 51) | 42 | PATH_TYPE@[44; 51) |
@@ -49,7 +49,7 @@ SOURCE_FILE@[0; 87) | |||
49 | L_CURLY@[52; 53) "{" | 49 | L_CURLY@[52; 53) "{" |
50 | R_CURLY@[53; 54) "}" | 50 | R_CURLY@[53; 54) "}" |
51 | WHITESPACE@[54; 55) "\n" | 51 | WHITESPACE@[54; 55) "\n" |
52 | IMPL_BLOCK@[55; 70) | 52 | IMPL_DEF@[55; 70) |
53 | IMPL_KW@[55; 59) "impl" | 53 | IMPL_KW@[55; 59) "impl" |
54 | WHITESPACE@[59; 60) " " | 54 | WHITESPACE@[59; 60) " " |
55 | PATH_TYPE@[60; 66) | 55 | PATH_TYPE@[60; 66) |
@@ -60,7 +60,7 @@ SOURCE_FILE@[0; 87) | |||
60 | WHITESPACE@[66; 67) " " | 60 | WHITESPACE@[66; 67) " " |
61 | FOR_KW@[67; 70) "for" | 61 | FOR_KW@[67; 70) "for" |
62 | WHITESPACE@[70; 71) " " | 62 | WHITESPACE@[70; 71) " " |
63 | IMPL_BLOCK@[71; 86) | 63 | IMPL_DEF@[71; 86) |
64 | IMPL_KW@[71; 75) "impl" | 64 | IMPL_KW@[71; 75) "impl" |
65 | WHITESPACE@[75; 76) " " | 65 | WHITESPACE@[75; 76) " " |
66 | PATH_TYPE@[76; 83) | 66 | 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 @@ | |||
1 | SOURCE_FILE@[0; 83) | 1 | SOURCE_FILE@[0; 83) |
2 | IMPL_BLOCK@[0; 82) | 2 | IMPL_DEF@[0; 82) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
5 | PATH_TYPE@[5; 6) | 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 @@ | |||
1 | SOURCE_FILE@[0; 128) | 1 | SOURCE_FILE@[0; 128) |
2 | IMPL_BLOCK@[0; 127) | 2 | IMPL_DEF@[0; 127) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
5 | PATH_TYPE@[5; 6) | 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 @@ | |||
1 | SOURCE_FILE@[0; 69) | 1 | SOURCE_FILE@[0; 69) |
2 | IMPL_BLOCK@[0; 68) | 2 | IMPL_DEF@[0; 68) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
5 | PATH_TYPE@[5; 6) | 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 @@ | |||
1 | SOURCE_FILE@[0; 89) | 1 | SOURCE_FILE@[0; 89) |
2 | IMPL_BLOCK@[0; 88) | 2 | IMPL_DEF@[0; 88) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
5 | PATH_TYPE@[5; 6) | 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 @@ | |||
1 | SOURCE_FILE@[0; 27) | 1 | SOURCE_FILE@[0; 27) |
2 | IMPL_BLOCK@[0; 26) | 2 | IMPL_DEF@[0; 26) |
3 | UNSAFE_KW@[0; 6) "unsafe" | 3 | UNSAFE_KW@[0; 6) "unsafe" |
4 | WHITESPACE@[6; 7) " " | 4 | WHITESPACE@[6; 7) " " |
5 | DEFAULT_KW@[7; 14) "default" | 5 | 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_def_neg.rs index b7527c870..b7527c870 100644 --- 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_def_neg.rs | |||
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_def_neg.txt index dfff947fe..0cc3ac085 100644 --- 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_def_neg.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | SOURCE_FILE@[0; 20) | 1 | SOURCE_FILE@[0; 20) |
2 | IMPL_BLOCK@[0; 19) | 2 | IMPL_DEF@[0; 19) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
5 | EXCL@[5; 6) "!" | 5 | EXCL@[5; 6) "!" |
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_def.rs index d6337f6b3..d6337f6b3 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.rs +++ b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.rs | |||
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_def.txt index bda3435e8..4c2863ba7 100644 --- a/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_block.txt +++ b/crates/ra_syntax/test_data/parser/inline/ok/0079_impl_def.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | SOURCE_FILE@[0; 12) | 1 | SOURCE_FILE@[0; 12) |
2 | IMPL_BLOCK@[0; 11) | 2 | IMPL_DEF@[0; 11) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
5 | PATH_TYPE@[5; 8) | 5 | PATH_TYPE@[5; 8) |
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 @@ | |||
1 | SOURCE_FILE@[0; 19) | 1 | SOURCE_FILE@[0; 19) |
2 | IMPL_BLOCK@[0; 18) | 2 | IMPL_DEF@[0; 18) |
3 | UNSAFE_KW@[0; 6) "unsafe" | 3 | UNSAFE_KW@[0; 6) "unsafe" |
4 | WHITESPACE@[6; 7) " " | 4 | WHITESPACE@[6; 7) " " |
5 | IMPL_KW@[7; 11) "impl" | 5 | 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 @@ | |||
1 | SOURCE_FILE@[0; 20) | 1 | SOURCE_FILE@[0; 20) |
2 | IMPL_BLOCK@[0; 19) | 2 | IMPL_DEF@[0; 19) |
3 | DEFAULT_KW@[0; 7) "default" | 3 | DEFAULT_KW@[0; 7) "default" |
4 | WHITESPACE@[7; 8) " " | 4 | WHITESPACE@[7; 8) " " |
5 | IMPL_KW@[8; 12) "impl" | 5 | 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) | |||
8 | L_CURLY@[6; 7) "{" | 8 | L_CURLY@[6; 7) "{" |
9 | R_CURLY@[7; 8) "}" | 9 | R_CURLY@[7; 8) "}" |
10 | WHITESPACE@[8; 9) "\n" | 10 | WHITESPACE@[8; 9) "\n" |
11 | IMPL_BLOCK@[9; 93) | 11 | IMPL_DEF@[9; 93) |
12 | IMPL_KW@[9; 13) "impl" | 12 | IMPL_KW@[9; 13) "impl" |
13 | WHITESPACE@[13; 14) " " | 13 | WHITESPACE@[13; 14) " " |
14 | PATH_TYPE@[14; 15) | 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 @@ | |||
1 | SOURCE_FILE@[0; 69) | 1 | SOURCE_FILE@[0; 69) |
2 | IMPL_BLOCK@[0; 68) | 2 | IMPL_DEF@[0; 68) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
5 | PATH_TYPE@[5; 6) | 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 @@ | |||
1 | SOURCE_FILE@[0; 29) | 1 | SOURCE_FILE@[0; 29) |
2 | IMPL_BLOCK@[0; 28) | 2 | IMPL_DEF@[0; 28) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | TYPE_PARAM_LIST@[4; 18) | 4 | TYPE_PARAM_LIST@[4; 18) |
5 | L_ANGLE@[4; 5) "<" | 5 | 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 @@ | |||
1 | SOURCE_FILE@[0; 137) | 1 | SOURCE_FILE@[0; 137) |
2 | IMPL_BLOCK@[0; 136) | 2 | IMPL_DEF@[0; 136) |
3 | IMPL_KW@[0; 4) "impl" | 3 | IMPL_KW@[0; 4) "impl" |
4 | WHITESPACE@[4; 5) " " | 4 | WHITESPACE@[4; 5) " " |
5 | PATH_TYPE@[5; 6) | 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) | |||
8 | IDENT@[69; 72) "Foo" | 8 | IDENT@[69; 72) "Foo" |
9 | SEMI@[72; 73) ";" | 9 | SEMI@[72; 73) ";" |
10 | WHITESPACE@[73; 75) "\n\n" | 10 | WHITESPACE@[73; 75) "\n\n" |
11 | IMPL_BLOCK@[75; 141) | 11 | IMPL_DEF@[75; 141) |
12 | IMPL_KW@[75; 79) "impl" | 12 | IMPL_KW@[75; 79) "impl" |
13 | WHITESPACE@[79; 80) " " | 13 | WHITESPACE@[79; 80) " " |
14 | PATH_TYPE@[80; 83) | 14 | 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) | |||
92 | WHITESPACE@[461; 463) "\n\n" | 92 | WHITESPACE@[461; 463) "\n\n" |
93 | COMMENT@[463; 523) "// https://github.com ..." | 93 | COMMENT@[463; 523) "// https://github.com ..." |
94 | WHITESPACE@[523; 524) "\n" | 94 | WHITESPACE@[523; 524) "\n" |
95 | IMPL_BLOCK@[524; 685) | 95 | IMPL_DEF@[524; 685) |
96 | IMPL_KW@[524; 528) "impl" | 96 | IMPL_KW@[524; 528) "impl" |
97 | WHITESPACE@[528; 529) " " | 97 | WHITESPACE@[528; 529) " " |
98 | PATH_TYPE@[529; 537) | 98 | 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) | |||
253 | WHITESPACE@[234; 235) "\n" | 253 | WHITESPACE@[234; 235) "\n" |
254 | R_CURLY@[235; 236) "}" | 254 | R_CURLY@[235; 236) "}" |
255 | WHITESPACE@[236; 238) "\n\n" | 255 | WHITESPACE@[236; 238) "\n\n" |
256 | IMPL_BLOCK@[238; 519) | 256 | IMPL_DEF@[238; 519) |
257 | IMPL_KW@[238; 242) "impl" | 257 | IMPL_KW@[238; 242) "impl" |
258 | WHITESPACE@[242; 243) " " | 258 | WHITESPACE@[242; 243) " " |
259 | PATH_TYPE@[243; 244) | 259 | PATH_TYPE@[243; 244) |