diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index bd68471e043..771cd619663 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -820,7 +820,6 @@ pub enum type_err { terr_regions_overly_polymorphic(BoundRegion, Region), terr_vstores_differ(terr_vstore_kind, expected_found), terr_trait_stores_differ(terr_vstore_kind, expected_found), - terr_in_field(@type_err, ast::Ident), terr_sorts(expected_found), terr_integer_as_char, terr_int_mismatch(expected_found), @@ -3407,10 +3406,6 @@ pub fn type_err_to_str(cx: &ctxt, err: &type_err) -> ~str { trait_store_to_str(cx, (*values).expected), trait_store_to_str(cx, (*values).found)) } - terr_in_field(err, fname) => { - format!("in field `{}`, {}", token::get_ident(fname), - type_err_to_str(cx, err)) - } terr_sorts(values) => { format!("expected {} but found {}", ty_sort_str(cx, values.expected), diff --git a/src/librustc/middle/typeck/infer/combine.rs b/src/librustc/middle/typeck/infer/combine.rs index bd3bb18fa33..098a3e278e7 100644 --- a/src/librustc/middle/typeck/infer/combine.rs +++ b/src/librustc/middle/typeck/infer/combine.rs @@ -235,19 +235,6 @@ pub trait Combine { fn fn_sigs(&self, a: &ty::FnSig, b: &ty::FnSig) -> cres; - fn flds(&self, a: ty::field, b: ty::field) -> cres { - if a.ident == b.ident { - self.mts(&a.mt, &b.mt) - .and_then(|mt| Ok(ty::field {ident: a.ident, mt: mt}) ) - .or_else(|e| Err(ty::terr_in_field(@e, a.ident)) ) - } else { - Err(ty::terr_record_fields( - expected_found(self, - a.ident, - b.ident))) - } - } - fn args(&self, a: ty::t, b: ty::t) -> cres { self.contratys(a, b).and_then(|t| Ok(t)) }