Skip to content

Commit 222f8ce

Browse files
committed
---
yaml --- r: 3635 b: refs/heads/master c: 066bcc6 h: refs/heads/master i: 3633: 4691fa4 3631: ebeab8b v: v3
1 parent 42ecfd0 commit 222f8ce

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 5c20a8aa9c377f339bda7f16e8701070d23e6b4e
2+
refs/heads/master: 066bcc6c79cb464b5a91ab30293d98e3ec2dbcca

trunk/src/comp/middle/typeck.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,8 @@ mod writeback {
10761076
type wb_ctxt = rec(@fn_ctxt fcx,
10771077
// A flag to ignore contained items and lambdas
10781078
mutable bool ignore,
1079+
// As soon as we hit an error we have to stop resolving
1080+
// the entire function
10791081
mutable bool success);
10801082

10811083
fn visit_stmt_pre(@wb_ctxt wbcx, &@ast::stmt s) {
@@ -1101,9 +1103,10 @@ mod writeback {
11011103
write::ty_only(wbcx.fcx.ccx.tcx, l.node.id, lty);
11021104
}
11031105
case (fix_err(_)) {
1104-
wbcx.fcx.ccx.tcx.sess.span_fatal(l.span,
1105-
"cannot determine a type \
1106-
for this local variable");
1106+
wbcx.fcx.ccx.tcx.sess.span_err(l.span,
1107+
"cannot determine a type \
1108+
for this local variable");
1109+
wbcx.success = false;
11071110
}
11081111
}
11091112
}

0 commit comments

Comments
 (0)