Attach trivia to ast::Union nodes

This commit is contained in:
Lukas Wirth 2021-03-14 11:11:01 +01:00
parent c0459c5357
commit 6e6d75bbdc

View file

@ -147,8 +147,8 @@ fn n_attached_trivias<'a>(
trivias: impl Iterator<Item = (SyntaxKind, &'a str)>,
) -> usize {
match kind {
MACRO_CALL | MACRO_RULES | CONST | TYPE_ALIAS | STRUCT | ENUM | VARIANT | FN | TRAIT
| MODULE | RECORD_FIELD | STATIC | USE => {
MACRO_CALL | MACRO_RULES | CONST | TYPE_ALIAS | STRUCT | UNION | ENUM | VARIANT | FN
| TRAIT | MODULE | RECORD_FIELD | STATIC | USE => {
let mut res = 0;
let mut trivias = trivias.enumerate().peekable();