Skip to content

Commit 0a3ecc3

Browse files
committed
---
yaml --- r: 42476 b: refs/heads/try c: 532c94d h: refs/heads/master v: v3
1 parent 3004f0e commit 0a3ecc3

File tree

4 files changed

+113
-79
lines changed

4 files changed

+113
-79
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 19dfec2aaf746535de1521f68421f9980dbf25de
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 2f46b763da2c098913884f101b6d71d69af41b49
5-
refs/heads/try: 9fed56ed9035912a2657b07ab1b7671706bd9576
5+
refs/heads/try: 532c94d0f12cb2c56870c283947aa12ce2c9b9b6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: a810c03263670238bccd64cabb12a23a46e3a278

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use middle::pat_util::{PatIdMap, pat_id_map, pat_is_binding, pat_is_const};
1414
use middle::pat_util::{pat_is_variant_or_struct};
1515
use middle::ty;
1616
use middle::typeck::check::demand;
17-
use middle::typeck::check::{check_block, check_expr_with, fn_ctxt};
17+
use middle::typeck::check::{check_block, check_expr_has_type, fn_ctxt};
1818
use middle::typeck::check::{instantiate_path, lookup_def, lookup_local};
1919
use middle::typeck::check::{structure_of, valid_range_bounds};
2020
use middle::typeck::require_same_types;
@@ -35,7 +35,7 @@ fn check_match(fcx: @fn_ctxt,
3535
let mut bot;
3636

3737
let pattern_ty = fcx.infcx().next_ty_var();
38-
bot = check_expr_with(fcx, discrim, pattern_ty);
38+
bot = check_expr_has_type(fcx, discrim, pattern_ty);
3939

4040
// Typecheck the patterns first, so that we get types for all the
4141
// bindings.
@@ -55,7 +55,7 @@ fn check_match(fcx: @fn_ctxt,
5555
let mut arm_non_bot = false;
5656
for arms.each |arm| {
5757
match arm.guard {
58-
Some(e) => { check_expr_with(fcx, e, ty::mk_bool(tcx)); },
58+
Some(e) => { check_expr_has_type(fcx, e, ty::mk_bool(tcx)); },
5959
None => ()
6060
}
6161
if !check_block(fcx, arm.body) { arm_non_bot = true; }
@@ -334,12 +334,12 @@ fn check_pat(pcx: pat_ctxt, pat: @ast::pat, expected: ty::t) {
334334
fcx.write_ty(pat.id, expected);
335335
}
336336
ast::pat_lit(lt) => {
337-
check_expr_with(fcx, lt, expected);
337+
check_expr_has_type(fcx, lt, expected);
338338
fcx.write_ty(pat.id, fcx.expr_ty(lt));
339339
}
340340
ast::pat_range(begin, end) => {
341-
check_expr_with(fcx, begin, expected);
342-
check_expr_with(fcx, end, expected);
341+
check_expr_has_type(fcx, begin, expected);
342+
check_expr_has_type(fcx, end, expected);
343343
let b_ty =
344344
fcx.infcx().resolve_type_vars_if_possible(fcx.expr_ty(begin));
345345
let e_ty =

0 commit comments

Comments
 (0)