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:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user