diff --git a/src/comp/pretty/pp.rs b/src/comp/pretty/pp.rs index 3ae3eafa5b0..ef3a87585c4 100644 --- a/src/comp/pretty/pp.rs +++ b/src/comp/pretty/pp.rs @@ -502,7 +502,9 @@ fn word(printer p, str wrd) { p.pretty_print(STRING(wrd, str::char_len(wrd) as int)); } -fn huge_word(printer p, str wrd) { p.pretty_print(STRING(wrd, 0xffff)); } +fn huge_word(printer p, str wrd) { + p.pretty_print(STRING(wrd, size_infinity)); +} fn zero_word(printer p, str wrd) { p.pretty_print(STRING(wrd, 0)); } @@ -512,10 +514,10 @@ fn zerobreak(printer p) { spaces(p, 0u); } fn space(printer p) { spaces(p, 1u); } -fn hardbreak(printer p) { spaces(p, 0xffffu); } +fn hardbreak(printer p) { spaces(p, size_infinity as uint); } fn hardbreak_tok() -> token { - ret BREAK(rec(offset=0, blank_space=0xffff)); + ret BREAK(rec(offset=0, blank_space=size_infinity)); } // diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs index cf32d5535f1..d47ab331f77 100644 --- a/src/comp/pretty/pprust.rs +++ b/src/comp/pretty/pprust.rs @@ -183,8 +183,8 @@ fn print_mod(&ps s, ast::_mod _mod) { } for (@ast::item item in _mod.items) { // Mod-level item printing we're a little more space-y about. - - hardbreak_if_not_bol(s); + hardbreak(s.s); + hardbreak(s.s); print_item(s, item); } print_remaining_comments(s);