Skip to content

Commit 4070b75

Browse files
committed
Prohibit breaking between "let" and "=" in local decls.
1 parent e1769ab commit 4070b75

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/comp/syntax/print/pprust.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ fn box(&ps s, uint u, pp::breaks b) {
147147
pp::box(s.s, u, b);
148148
}
149149

150-
fn word_nbsp(&ps s, str w) { word(s.s, w); word(s.s, " "); }
150+
fn nbsp(&ps s) { word(s.s, " "); }
151+
152+
fn word_nbsp(&ps s, str w) { word(s.s, w); nbsp(s); }
151153

152154
fn word_space(&ps s, str w) { word(s.s, w); space(s.s); }
153155

@@ -1064,7 +1066,7 @@ fn print_decl(&ps s, &@ast::decl decl) {
10641066
}
10651067
alt loc.node.init {
10661068
some(?init) {
1067-
space(s.s);
1069+
nbsp(s);
10681070
alt init.op {
10691071
ast::init_assign { word_space(s, "="); }
10701072
ast::init_move { word_space(s, "<-"); }

0 commit comments

Comments
 (0)