Skip to content

Commit

Permalink
rustc: de-@ ty::type_err.
Browse files Browse the repository at this point in the history
  • Loading branch information
eddyb committed Apr 22, 2014
1 parent 3fbc578 commit 8f3cfe0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
5 changes: 0 additions & 5 deletions src/librustc/middle/ty.rs
Expand Up @@ -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>),
Expand Down Expand Up @@ -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),
Expand Down
13 changes: 0 additions & 13 deletions src/librustc/middle/typeck/infer/combine.rs
Expand Up @@ -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))
}
Expand Down

0 comments on commit 8f3cfe0

Please sign in to comment.