Try to keep the local and its type together when wrapping a long decl.
This commit is contained in:
parent
4070b75914
commit
797cd9fd0e
@ -1056,13 +1056,17 @@ fn print_decl(&ps s, &@ast::decl decl) {
|
||||
ibox(s, indent_unit);
|
||||
word_nbsp(s, "let");
|
||||
fn print_local(&ps s, &@ast::local loc) {
|
||||
word(s.s, loc.node.ident);
|
||||
alt (loc.node.ty) {
|
||||
alt loc.node.ty {
|
||||
some(?ty) {
|
||||
ibox(s, indent_unit);
|
||||
word(s.s, loc.node.ident);
|
||||
word_space(s, ":");
|
||||
print_type(s, *ty);
|
||||
end(s);
|
||||
}
|
||||
_ {
|
||||
word(s.s, loc.node.ident);
|
||||
}
|
||||
_ {}
|
||||
}
|
||||
alt loc.node.init {
|
||||
some(?init) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user