提交 4070b759 编写于 作者: G Graydon Hoare

Prohibit breaking between "let" and "=" in local decls.

上级 e1769ab7
......@@ -147,7 +147,9 @@ fn box(&ps s, uint u, pp::breaks b) {
pp::box(s.s, u, b);
}
fn word_nbsp(&ps s, str w) { word(s.s, w); word(s.s, " "); }
fn nbsp(&ps s) { word(s.s, " "); }
fn word_nbsp(&ps s, str w) { word(s.s, w); nbsp(s); }
fn word_space(&ps s, str w) { word(s.s, w); space(s.s); }
......@@ -1064,7 +1066,7 @@ fn print_local(&ps s, &@ast::local loc) {
}
alt loc.node.init {
some(?init) {
space(s.s);
nbsp(s);
alt init.op {
ast::init_assign { word_space(s, "="); }
ast::init_move { word_space(s, "<-"); }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册