Handle printing 'auto' occurring in loop-variable context.
This commit is contained in:
parent
1c97510a16
commit
ba626779de
1 changed files with 4 additions and 1 deletions
|
@ -1086,7 +1086,10 @@ fn print_decl(&ps s, &@ast::decl decl) {
|
|||
fn print_ident(&ps s, &ast::ident ident) { word(s.s, ident); }
|
||||
|
||||
fn print_for_decl(&ps s, @ast::local loc) {
|
||||
print_type(s, *option::get(loc.node.ty));
|
||||
alt (loc.node.ty) {
|
||||
none { word(s.s, "auto"); }
|
||||
some (?t) { print_type(s, *t); }
|
||||
}
|
||||
space(s.s);
|
||||
word(s.s, loc.node.ident);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue