diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 3d8e6f40d5d6..c44e37909fd9 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -473,7 +473,7 @@ fn print_item(s: &ps, item: &@ast::item) { } else { bopen(s); for v: ast::variant in variants { - space(s.s); + space_if_not_bol(s); maybe_print_comment(s, v.span.lo); word(s.s, v.node.name); if vec::len(v.node.args) > 0u { diff --git a/src/test/pretty/tag-blank-lines.rs b/src/test/pretty/tag-blank-lines.rs new file mode 100644 index 000000000000..b6e440bbf478 --- /dev/null +++ b/src/test/pretty/tag-blank-lines.rs @@ -0,0 +1,8 @@ +// pp-exact + +tag foo { + foo; // a foo. + bar; +} + +fn main() { }