Skip to content

Commit 5da9b2a

Browse files
committed
---
yaml --- r: 13045 b: refs/heads/master c: f7cb7b0 h: refs/heads/master i: 13043: 74c5791 v: v3
1 parent d0be862 commit 5da9b2a

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 7c2e9813816f00d6802fb9a25fe8b0f53491eba2
2+
refs/heads/master: f7cb7b06d53b653b3f9cb585f01605d04ea9fc7d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
55
refs/heads/try: 2898dcc5d97da9427ac367542382b6239d9c0bbf

trunk/src/rustc/middle/typeck/check/alt.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -128,37 +128,37 @@ fn check_pat(pcx: pat_ctxt, pat: @ast::pat, expected: ty::t) {
128128
fcx.write_ty(pat.id, expected);
129129
}
130130
ast::pat_lit(lt) {
131-
check_expr_with(pcx.fcx, lt, expected);
131+
check_expr_with(fcx, lt, expected);
132132
fcx.write_ty(pat.id, fcx.expr_ty(lt));
133133
}
134134
ast::pat_range(begin, end) {
135-
check_expr_with(pcx.fcx, begin, expected);
136-
check_expr_with(pcx.fcx, end, expected);
137-
let b_ty = resolve_type_vars_if_possible(pcx.fcx,
135+
check_expr_with(fcx, begin, expected);
136+
check_expr_with(fcx, end, expected);
137+
let b_ty = resolve_type_vars_if_possible(fcx,
138138
fcx.expr_ty(begin));
139139
if !require_same_types(
140140
tcx, pat.span, b_ty,
141141
resolve_type_vars_if_possible(
142-
pcx.fcx, fcx.expr_ty(end)),
142+
fcx, fcx.expr_ty(end)),
143143
{|| "mismatched types in range" }) {
144144
// no-op
145145
} else if !ty::type_is_numeric(b_ty) {
146146
tcx.sess.span_err(pat.span, "non-numeric type used in range");
147-
} else if !valid_range_bounds(pcx.fcx.ccx, begin, end) {
147+
} else if !valid_range_bounds(fcx.ccx, begin, end) {
148148
tcx.sess.span_err(begin.span, "lower range bound must be less \
149149
than upper");
150150
}
151151
fcx.write_ty(pat.id, b_ty);
152152
}
153153
ast::pat_ident(name, sub) if !pat_is_variant(tcx.def_map, pat) {
154-
let vid = lookup_local(pcx.fcx, pat.span, pat.id);
154+
let vid = lookup_local(fcx, pat.span, pat.id);
155155
let mut typ = ty::mk_var(tcx, vid);
156-
demand::suptype(pcx.fcx, pat.span, expected, typ);
156+
demand::suptype(fcx, pat.span, expected, typ);
157157
let canon_id = pcx.map.get(ast_util::path_to_ident(name));
158158
if canon_id != pat.id {
159-
let tv_id = lookup_local(pcx.fcx, pat.span, canon_id);
159+
let tv_id = lookup_local(fcx, pat.span, canon_id);
160160
let ct = ty::mk_var(tcx, tv_id);
161-
demand::suptype(pcx.fcx, pat.span, ct, typ);
161+
demand::suptype(fcx, pat.span, ct, typ);
162162
}
163163
fcx.write_ty(pat.id, typ);
164164
alt sub {
@@ -173,7 +173,7 @@ fn check_pat(pcx: pat_ctxt, pat: @ast::pat, expected: ty::t) {
173173
check_pat_variant(pcx, pat, path, subpats, expected);
174174
}
175175
ast::pat_rec(fields, etc) {
176-
let ex_fields = alt structure_of(pcx.fcx, pat.span, expected) {
176+
let ex_fields = alt structure_of(fcx, pat.span, expected) {
177177
ty::ty_rec(fields) { fields }
178178
_ {
179179
tcx.sess.span_fatal
@@ -210,7 +210,7 @@ fn check_pat(pcx: pat_ctxt, pat: @ast::pat, expected: ty::t) {
210210
fcx.write_ty(pat.id, expected);
211211
}
212212
ast::pat_tup(elts) {
213-
let ex_elts = alt structure_of(pcx.fcx, pat.span, expected) {
213+
let ex_elts = alt structure_of(fcx, pat.span, expected) {
214214
ty::ty_tup(elts) { elts }
215215
_ {
216216
tcx.sess.span_fatal
@@ -235,7 +235,7 @@ fn check_pat(pcx: pat_ctxt, pat: @ast::pat, expected: ty::t) {
235235
fcx.write_ty(pat.id, expected);
236236
}
237237
ast::pat_box(inner) {
238-
alt structure_of(pcx.fcx, pat.span, expected) {
238+
alt structure_of(fcx, pat.span, expected) {
239239
ty::ty_box(e_inner) {
240240
check_pat(pcx, inner, e_inner.ty);
241241
fcx.write_ty(pat.id, expected);
@@ -244,13 +244,13 @@ fn check_pat(pcx: pat_ctxt, pat: @ast::pat, expected: ty::t) {
244244
tcx.sess.span_fatal(
245245
pat.span,
246246
"mismatched types: expected `" +
247-
pcx.fcx.ty_to_str(expected) +
247+
fcx.ty_to_str(expected) +
248248
"` found box");
249249
}
250250
}
251251
}
252252
ast::pat_uniq(inner) {
253-
alt structure_of(pcx.fcx, pat.span, expected) {
253+
alt structure_of(fcx, pat.span, expected) {
254254
ty::ty_uniq(e_inner) {
255255
check_pat(pcx, inner, e_inner.ty);
256256
fcx.write_ty(pat.id, expected);
@@ -259,7 +259,7 @@ fn check_pat(pcx: pat_ctxt, pat: @ast::pat, expected: ty::t) {
259259
tcx.sess.span_fatal(
260260
pat.span,
261261
"mismatched types: expected `" +
262-
pcx.fcx.ty_to_str(expected) +
262+
fcx.ty_to_str(expected) +
263263
"` found uniq");
264264
}
265265
}

0 commit comments

Comments
 (0)