mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-31 00:53:48 +00:00
Fix pretty-printing of empty impl items
This commit is contained in:
parent
79e78c4b0c
commit
7173b9d1b8
@ -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 T;
|
||||
|
||||
trait Y { }
|
||||
impl Y for T;
|
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 T;
|
||||
|
||||
trait Y { }
|
||||
impl Y for T;
|
Loading…
Reference in New Issue
Block a user