auto merge of #9061 : jakub-/rust/pretty-print-empty-impl, r=huonw
This commit is contained in:
commit
62166611e7
@ -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);
|
||||
|
5
src/test/pretty/empty-impl.pp
Normal file
5
src/test/pretty/empty-impl.pp
Normal file
@ -0,0 +1,5 @@
|
||||
trait X { }
|
||||
impl X for uint;
|
||||
|
||||
trait Y { }
|
||||
impl Y for uint;
|
5
src/test/pretty/empty-impl.rs
Normal file
5
src/test/pretty/empty-impl.rs
Normal file
@ -0,0 +1,5 @@
|
||||
trait X { }
|
||||
impl X for uint;
|
||||
|
||||
trait Y { }
|
||||
impl Y for uint;
|
Loading…
x
Reference in New Issue
Block a user