From 32b3d3e9ebd8dbc1073445b3be9676da85b6410c Mon Sep 17 00:00:00 2001 From: Tim Chevalier Date: Fri, 3 May 2013 13:03:01 -0700 Subject: [PATCH] tidy --- src/librustc/middle/typeck/check/_match.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/librustc/middle/typeck/check/_match.rs b/src/librustc/middle/typeck/check/_match.rs index 3937e54853efa..a139a26a597fc 100644 --- a/src/librustc/middle/typeck/check/_match.rs +++ b/src/librustc/middle/typeck/check/_match.rs @@ -120,12 +120,12 @@ pub fn check_pat_variant(pcx: &pat_ctxt, pat: @ast::pat, path: @ast::Path, let enum_tpt = ty::lookup_item_type(tcx, enm); instantiate_path(pcx.fcx, path, enum_tpt, pat.span, pat.id, pcx.block_region); - + // check that the type of the value being matched is a subtype // of the type of the pattern: let pat_ty = fcx.node_ty(pat.id); demand::subtype(fcx, pat.span, expected, pat_ty); - + // Get the expected types of the arguments. arg_types = { let vinfo = @@ -143,7 +143,7 @@ pub fn check_pat_variant(pcx: &pat_ctxt, pat: @ast::pat, path: @ast::Path, } }) }; - + kind_name = "variant"; } None => { @@ -151,10 +151,10 @@ pub fn check_pat_variant(pcx: &pat_ctxt, pat: @ast::pat, path: @ast::Path, fcx.infcx().ty_to_str(fcx.infcx().resolve_type_vars_if_possible(expected)); fcx.infcx().type_error_message_str(pat.span, |actual| { - fmt!("mismatched types: expected `%s` but found %s", - resolved_expected, actual)}, - ~"a structure pattern", - None); + fmt!("mismatched types: expected `%s` but found %s", + resolved_expected, actual)}, + ~"a structure pattern", + None); fcx.write_error(pat.id); kind_name = "[error]"; arg_types = (copy subpats).get_or_default(~[]).map(|_|