@@ -120,12 +120,12 @@ pub fn check_pat_variant(pcx: &pat_ctxt, pat: @ast::pat, path: @ast::Path,
120
120
let enum_tpt = ty:: lookup_item_type ( tcx, enm) ;
121
121
instantiate_path ( pcx. fcx , path, enum_tpt, pat. span , pat. id ,
122
122
pcx. block_region ) ;
123
-
123
+
124
124
// check that the type of the value being matched is a subtype
125
125
// of the type of the pattern:
126
126
let pat_ty = fcx. node_ty ( pat. id ) ;
127
127
demand:: subtype ( fcx, pat. span , expected, pat_ty) ;
128
-
128
+
129
129
// Get the expected types of the arguments.
130
130
arg_types = {
131
131
let vinfo =
@@ -143,18 +143,18 @@ pub fn check_pat_variant(pcx: &pat_ctxt, pat: @ast::pat, path: @ast::Path,
143
143
}
144
144
} )
145
145
} ;
146
-
146
+
147
147
kind_name = "variant" ;
148
148
}
149
149
None => {
150
150
let resolved_expected =
151
151
fcx. infcx ( ) . ty_to_str ( fcx. infcx ( ) . resolve_type_vars_if_possible ( expected) ) ;
152
152
fcx. infcx ( ) . type_error_message_str ( pat. span ,
153
153
|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 ) ;
158
158
fcx. write_error ( pat. id ) ;
159
159
kind_name = "[error]" ;
160
160
arg_types = ( copy subpats) . get_or_default ( ~[ ] ) . map ( |_|
0 commit comments