lift to spaces in ann_lift_to_node default case

This commit is contained in:
Joshua Warner 2024-12-12 22:13:41 -08:00
parent d3426ebce1
commit f233c5328d
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
5 changed files with 79 additions and 6 deletions

View file

@ -427,7 +427,6 @@ fn lower<'a, 'b: 'a>(
fn fmt_ty_collection(
buf: &mut Buf<'_>,
indent: u16,
braces: Braces,
items: Collection<'_, Loc<TypeAnnotation<'_>>>,
@ -1215,11 +1214,14 @@ fn ann_lift_to_node<'a, 'b: 'a>(
inner
}
}
_ => Spaces {
before: &[],
item: Node::TypeAnnotation(*ann),
after: &[],
},
_ => {
let lifted = ann_lift_spaces(arena, ann);
Spaces {
before: lifted.before,
item: Node::TypeAnnotation(lifted.item),
after: lifted.after,
}
}
}
}