mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 02:00:00 +03:00
Try to keep the local and its type together when wrapping a long decl.
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user