1
Fork 0

Shrink ast::Attribute.

This commit is contained in:
Nicholas Nethercote 2022-08-11 21:06:11 +10:00
parent 40336865fe
commit 85a6cd6a47
15 changed files with 167 additions and 149 deletions

View file

@ -442,12 +442,12 @@ pub trait PrintState<'a>: std::ops::Deref<Target = pp::Printer> + std::ops::Dere
}
self.maybe_print_comment(attr.span.lo());
match attr.kind {
ast::AttrKind::Normal(ref item, _) => {
ast::AttrKind::Normal(ref normal) => {
match attr.style {
ast::AttrStyle::Inner => self.word("#!["),
ast::AttrStyle::Outer => self.word("#["),
}
self.print_attr_item(&item, attr.span);
self.print_attr_item(&normal.item, attr.span);
self.word("]");
}
ast::AttrKind::DocComment(comment_kind, data) => {