Format macros in trait item position

This commit is contained in:
Sheng Hau 2017-05-04 00:10:03 +08:00
parent 89f6aa2996
commit 51815effbe
3 changed files with 8 additions and 2 deletions

View File

@ -382,8 +382,8 @@ impl<'a> FmtVisitor<'a> {
self.block_indent);
self.push_rewrite(ti.span, rewrite);
}
ast::TraitItemKind::Macro(..) => {
// FIXME(#1158) Macros in trait item position
ast::TraitItemKind::Macro(ref mac) => {
self.visit_mac(mac, Some(ti.ident), MacroPosition::Item);
}
}
}

View File

@ -0,0 +1,3 @@
trait T {
itemmacro!(this, is.now() .formatted(yay));
}

View File

@ -0,0 +1,3 @@
trait T {
itemmacro!(this, is.now().formatted(yay));
}