Skip to content

Commit fe97131

Browse files
committed
---
yaml --- r: 140434 b: refs/heads/try2 c: 32b3d3e h: refs/heads/master v: v3
1 parent 3b214b8 commit fe97131

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 13df2ea69c332d7a20c7ab394020430a09dad507
8+
refs/heads/try2: 32b3d3e9ebd8dbc1073445b3be9676da85b6410c
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ pub fn check_pat_variant(pcx: &pat_ctxt, pat: @ast::pat, path: @ast::Path,
120120
let enum_tpt = ty::lookup_item_type(tcx, enm);
121121
instantiate_path(pcx.fcx, path, enum_tpt, pat.span, pat.id,
122122
pcx.block_region);
123-
123+
124124
// check that the type of the value being matched is a subtype
125125
// of the type of the pattern:
126126
let pat_ty = fcx.node_ty(pat.id);
127127
demand::subtype(fcx, pat.span, expected, pat_ty);
128-
128+
129129
// Get the expected types of the arguments.
130130
arg_types = {
131131
let vinfo =
@@ -143,18 +143,18 @@ pub fn check_pat_variant(pcx: &pat_ctxt, pat: @ast::pat, path: @ast::Path,
143143
}
144144
})
145145
};
146-
146+
147147
kind_name = "variant";
148148
}
149149
None => {
150150
let resolved_expected =
151151
fcx.infcx().ty_to_str(fcx.infcx().resolve_type_vars_if_possible(expected));
152152
fcx.infcx().type_error_message_str(pat.span,
153153
|actual| {
154-
fmt!("mismatched types: expected `%s` but found %s",
155-
resolved_expected, actual)},
156-
~"a structure pattern",
157-
None);
154+
fmt!("mismatched types: expected `%s` but found %s",
155+
resolved_expected, actual)},
156+
~"a structure pattern",
157+
None);
158158
fcx.write_error(pat.id);
159159
kind_name = "[error]";
160160
arg_types = (copy subpats).get_or_default(~[]).map(|_|

0 commit comments

Comments
 (0)