Handle semicolons in macro statements

Fixes #1279
This commit is contained in:
Nick Cameron 2017-01-18 10:38:46 +13:00
parent 923423fa32
commit 49e86a1e65
3 changed files with 9 additions and 1 deletions

View File

@ -61,12 +61,12 @@ impl<'a> FmtVisitor<'a> {
let rewrite = stmt.rewrite(&self.get_context(),
self.config.max_width - self.block_indent.width(),
self.block_indent);
self.push_rewrite(stmt.span, rewrite);
}
ast::StmtKind::Mac(ref mac) => {
let (ref mac, _macro_style, _) = **mac;
self.visit_mac(mac, None, MacroPosition::Statement);
self.format_missing(stmt.span.hi);
}
}
}

View File

@ -75,3 +75,7 @@ gfx_pipeline!(pipe {
vbuf: gfx::VertexBuffer<Vertex> = (),
out: gfx::RenderTarget<ColorFormat> = "Target0",
});
fn issue_1279() {
println!("dsfs"); // a comment
}

View File

@ -76,3 +76,7 @@ gfx_pipeline!(pipe {
vbuf: gfx::VertexBuffer<Vertex> = (),
out: gfx::RenderTarget<ColorFormat> = "Target0",
});
fn issue_1279() {
println!("dsfs"); // a comment
}