diff options
Diffstat (limited to 'crates/syntax')
-rw-r--r-- | crates/syntax/src/ast/node_ext.rs | 1 | ||||
-rw-r--r-- | crates/syntax/src/parsing/text_tree_sink.rs | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/crates/syntax/src/ast/node_ext.rs b/crates/syntax/src/ast/node_ext.rs index 2772d7364..ae98dbd26 100644 --- a/crates/syntax/src/ast/node_ext.rs +++ b/crates/syntax/src/ast/node_ext.rs | |||
@@ -40,6 +40,7 @@ fn text_of_first_token(node: &SyntaxNode) -> TokenText { | |||
40 | TokenText(first_token) | 40 | TokenText(first_token) |
41 | } | 41 | } |
42 | 42 | ||
43 | #[derive(Debug, PartialEq, Eq, Clone)] | ||
43 | pub enum Macro { | 44 | pub enum Macro { |
44 | MacroRules(ast::MacroRules), | 45 | MacroRules(ast::MacroRules), |
45 | MacroDef(ast::MacroDef), | 46 | MacroDef(ast::MacroDef), |
diff --git a/crates/syntax/src/parsing/text_tree_sink.rs b/crates/syntax/src/parsing/text_tree_sink.rs index bb10f20c9..1934204ea 100644 --- a/crates/syntax/src/parsing/text_tree_sink.rs +++ b/crates/syntax/src/parsing/text_tree_sink.rs | |||
@@ -147,8 +147,8 @@ fn n_attached_trivias<'a>( | |||
147 | trivias: impl Iterator<Item = (SyntaxKind, &'a str)>, | 147 | trivias: impl Iterator<Item = (SyntaxKind, &'a str)>, |
148 | ) -> usize { | 148 | ) -> usize { |
149 | match kind { | 149 | match kind { |
150 | MACRO_CALL | MACRO_RULES | CONST | TYPE_ALIAS | STRUCT | UNION | ENUM | VARIANT | FN | 150 | MACRO_CALL | MACRO_RULES | MACRO_DEF | CONST | TYPE_ALIAS | STRUCT | UNION | ENUM |
151 | | TRAIT | MODULE | RECORD_FIELD | STATIC | USE => { | 151 | | VARIANT | FN | TRAIT | MODULE | RECORD_FIELD | STATIC | USE => { |
152 | let mut res = 0; | 152 | let mut res = 0; |
153 | let mut trivias = trivias.enumerate().peekable(); | 153 | let mut trivias = trivias.enumerate().peekable(); |
154 | 154 | ||