Skip to content

Commit 371c256

Browse files
committed
Break methods in obj types.
1 parent 1676c67 commit 371c256

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/comp/pretty/pprust.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ fn print_type(ps s, &@ast::ty ty) {
235235
head(s, "obj");
236236
bopen(s);
237237
for (ast::ty_method m in methods) {
238+
hardbreak(s.s);
238239
cbox(s.s, indent_unit);
239240
print_ty_fn(s, m.proto, option::some[str](m.ident),
240241
m.inputs, m.output, m.cf);
@@ -1045,6 +1046,7 @@ fn print_string(ps s, str st) {
10451046
fn print_ty_fn(ps s, ast::proto proto, option::t[str] id,
10461047
vec[ast::ty_arg] inputs, @ast::ty output,
10471048
ast::controlflow cf) {
1049+
ibox(s.s, indent_unit);
10481050
if (proto == ast::proto_fn) {word(s.s, "fn");}
10491051
else {word(s.s, "iter");}
10501052
alt (id) {
@@ -1074,6 +1076,7 @@ fn print_ty_fn(ps s, ast::proto proto, option::t[str] id,
10741076
}
10751077
end(s.s);
10761078
}
1079+
end(s.s);
10771080
}
10781081

10791082
fn next_comment(ps s) -> option::t[lexer::cmnt] {

0 commit comments

Comments
 (0)