]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/typeck/check/_match.rs
auto merge of #15809 : pcwalton/rust/dedesugar-for, r=pnkfelix
[rust.git] / src / librustc / middle / typeck / check / _match.rs
index a7e1979669bce79034d44241b981744ba82bb6c0..a238c207696a1873013eecc836289dbd8e06cd89 100644 (file)
@@ -21,6 +21,7 @@
 use middle::typeck::check::{structure_of, valid_range_bounds};
 use middle::typeck::infer;
 use middle::typeck::require_same_types;
+use util::ppaux;
 
 use std::collections::{HashMap, HashSet};
 use std::gc::Gc;
@@ -486,7 +487,10 @@ pub fn check_pat(pcx: &pat_ctxt, pat: &ast::Pat, expected: ty::t) {
         }
         fcx.write_ty(pat.id, typ);
 
-        debug!("(checking match) writing type for pat id {}", pat.id);
+        debug!("(checking match) writing type {} (expected {}) for pat id {}",
+               ppaux::ty_to_string(tcx, typ),
+               ppaux::ty_to_string(tcx, expected),
+               pat.id);
 
         match sub {
           Some(ref p) => check_pat(pcx, &**p, expected),