Skip to content

Commit

Permalink
auto merge of rust-lang#9061 : jakub-/rust/pretty-print-empty-impl, r…
Browse files Browse the repository at this point in the history
…=huonw
  • Loading branch information
bors committed Sep 12, 2013
2 parents 91ab8a3 + de79972 commit 6216661
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libsyntax/print/pprust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,13 @@ pub fn print_item(s: @ps, item: &ast::item) {
};

print_type(s, ty);
space(s.s);

if methods.len() == 0 {
word(s.s, ";");
end(s); // end the head-ibox
end(s); // end the outer cbox
} else {
space(s.s);
bopen(s);
for meth in methods.iter() {
print_method(s, *meth);
Expand Down
5 changes: 5 additions & 0 deletions src/test/pretty/empty-impl.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
trait X { }
impl X for uint;

trait Y { }
impl Y for uint;
5 changes: 5 additions & 0 deletions src/test/pretty/empty-impl.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
trait X { }
impl X for uint;

trait Y { }
impl Y for uint;

0 comments on commit 6216661

Please sign in to comment.