Skip to content

Commit 31fcc1f

Browse files
committed
---
yaml --- r: 3718 b: refs/heads/master c: 381505f h: refs/heads/master v: v3
1 parent 855a40d commit 31fcc1f

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 022363a6747c50007a991aef82621b70441d25d9
2+
refs/heads/master: 381505f947e69e09efe449b96496ca7d050b74be

trunk/src/comp/middle/typeck.rs

+2-6
Original file line numberDiff line numberDiff line change
@@ -2425,26 +2425,22 @@ fn check_decl_initializer(&@fn_ctxt fcx, ast::node_id nid,
24252425
}
24262426
}
24272427

2428-
fn check_decl_local(&@fn_ctxt fcx, &@ast::local local) -> @ast::local {
2428+
fn check_decl_local(&@fn_ctxt fcx, &@ast::local local) {
24292429
auto a_id = local.node.id;
24302430
alt (fcx.locals.find(a_id)) {
24312431
case (none) {
2432-
24332432
fcx.ccx.tcx.sess.bug("check_decl_local: local id not found " +
24342433
local.node.ident);
24352434
}
24362435
case (some(?i)) {
24372436
auto t = ty::mk_var(fcx.ccx.tcx, i);
24382437
write::ty_only_fixup(fcx, a_id, t);
2439-
auto initopt = local.node.init;
2440-
alt (initopt) {
2438+
alt (local.node.init) {
24412439
case (some(?init)) {
24422440
check_decl_initializer(fcx, local.node.id, init);
24432441
}
24442442
case (_) {/* fall through */ }
24452443
}
2446-
auto newlocal = rec(init=initopt with local.node);
2447-
ret @rec(node=newlocal, span=local.span);
24482444
}
24492445
}
24502446
}

0 commit comments

Comments
 (0)