Handle printing 'auto' occurring in loop-variable context.

This commit is contained in:
Graydon Hoare 2011-07-26 15:38:34 -07:00
parent 1c97510a16
commit ba626779de

View file

@ -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);
}