Skip to content

Commit 7535479

Browse files
committed
auto merge of #9463 : pnkfelix/rust/fsk-syntax-visit-refactor-rest-of-typeck, r=huonw
r? anyone Also got rid of a bit of `@mut` allocation. (Though not the monster that is `@mut FnCtxt`; that case is documented already on #7081; if we attack it, it will probably be its own ticket, not part of #7081.)
2 parents b6fe27c + 0e95c34 commit 7535479

File tree

4 files changed

+101
-111
lines changed

4 files changed

+101
-111
lines changed

src/librustc/middle/typeck/check/_match.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ pub fn check_match(fcx: @mut FnCtxt,
3737
// Typecheck the patterns first, so that we get types for all the
3838
// bindings.
3939
for arm in arms.iter() {
40-
let pcx = pat_ctxt {
40+
let mut pcx = pat_ctxt {
4141
fcx: fcx,
4242
map: pat_id_map(tcx.def_map, arm.pats[0]),
4343
};
4444

45-
for p in arm.pats.iter() { check_pat(&pcx, *p, discrim_ty);}
45+
for p in arm.pats.iter() { check_pat(&mut pcx, *p, discrim_ty);}
4646
}
4747

4848
// The result of the match is the common supertype of all the

0 commit comments

Comments
 (0)