mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-02 19:53:46 +00:00
Format macros in trait item position
This commit is contained in:
parent
89f6aa2996
commit
51815effbe
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
3
tests/source/issue-1158.rs
Normal file
3
tests/source/issue-1158.rs
Normal file
@ -0,0 +1,3 @@
|
||||
trait T {
|
||||
itemmacro!(this, is.now() .formatted(yay));
|
||||
}
|
3
tests/target/issue-1158.rs
Normal file
3
tests/target/issue-1158.rs
Normal file
@ -0,0 +1,3 @@
|
||||
trait T {
|
||||
itemmacro!(this, is.now().formatted(yay));
|
||||
}
|
Loading…
Reference in New Issue
Block a user