rustc: de-@ ty::type_err.

This commit is contained in:
Eduard Burtescu 2014-04-20 20:19:58 +03:00
parent 3fbc57894a
commit 8f3cfe064b
2 changed files with 0 additions and 18 deletions
src/librustc/middle
ty.rs
typeck/infer

View File

@ -820,7 +820,6 @@ pub enum type_err {
terr_regions_overly_polymorphic(BoundRegion, Region),
terr_vstores_differ(terr_vstore_kind, expected_found<Vstore>),
terr_trait_stores_differ(terr_vstore_kind, expected_found<TraitStore>),
terr_in_field(@type_err, ast::Ident),
terr_sorts(expected_found<t>),
terr_integer_as_char,
terr_int_mismatch(expected_found<IntVarValue>),
@ -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),

View File

@ -235,19 +235,6 @@ pub trait Combine {
fn fn_sigs(&self, a: &ty::FnSig, b: &ty::FnSig) -> cres<ty::FnSig>;
fn flds(&self, a: ty::field, b: ty::field) -> cres<ty::field> {
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<ty::t> {
self.contratys(a, b).and_then(|t| Ok(t))
}