Skip to content

Commit f03107b

Browse files
committed
Fix pp bug on native modules.
1 parent bd3e2eb commit f03107b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/comp/pretty/pprust.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ fn print_item(&ps s, &@ast::item item) {
297297
word_nbsp(s, id);
298298
bopen(s);
299299
for (@ast::native_item item in nmod.items) {
300+
hardbreak(s.s);
300301
ibox(s, indent_unit);
301302
maybe_print_comment(s, item.span.lo);
302303
alt (item.node) {
@@ -307,13 +308,14 @@ fn print_item(&ps s, &@ast::item item) {
307308
case (ast::native_item_fn(?id,?lname,?decl,
308309
?typarams,_,_)) {
309310
print_fn(s, decl, ast::proto_fn, id, typarams);
310-
end(s); // end head-ibox
311311
alt (lname) {
312312
case (none) {}
313313
case (some(?ss)) {
314314
print_string(s, ss);
315315
}
316316
}
317+
end(s); // end head-ibox
318+
end(s); // end the outer fn box
317319
}
318320
}
319321
word(s.s, ";");

0 commit comments

Comments
 (0)