Change decl to local in expr_for and expr_for_each

Since the decl in a for or for-each loop must always be a local
decl, I changed the AST to express this. Fewer potential match
failures and "the impossible happened" error messages = yay!
This commit is contained in:
Tim Chevalier
2011-06-13 17:04:15 -07:00
parent ff8af3c2db
commit d65ad8c31c
15 changed files with 149 additions and 222 deletions

View File

@@ -224,7 +224,7 @@ fn has_nonlocal_exits(&ast::block b) -> bool {
ret *has_exits;
}
fn local_rhs_span(&@ast::local l, &span def) -> span {
fn local_rhs_span(&@ast::local_ l, &span def) -> span {
alt (l.init) {
case (some(?i)) { ret i.expr.span; }
case (_) { ret def; }