]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/infer/combine.rs
Remove many unnecessary trait derivations.
[rust.git] / src / librustc / infer / combine.rs
index 966c5810171af34535fbe00e289ae9486bf45b05..f06dbc72cd9611c71f7ae383813ebca1f55df0a7 100644 (file)
@@ -53,7 +53,7 @@ pub struct CombineFields<'infcx, 'tcx> {
     pub obligations: PredicateObligations<'tcx>,
 }
 
-#[derive(Copy, Clone, Eq, PartialEq, Hash, Debug)]
+#[derive(Copy, Clone, Debug)]
 pub enum RelationDir {
     SubtypeOf, SupertypeOf, EqTo
 }
@@ -70,7 +70,7 @@ pub fn super_combine_tys<R>(
     {
         let a_is_expected = relation.a_is_expected();
 
-        match (&a.sty, &b.sty) {
+        match (&a.kind, &b.kind) {
             // Relate integral variables to other types
             (&ty::Infer(ty::IntVar(a_id)), &ty::Infer(ty::IntVar(b_id))) => {
                 self.int_unification_table
@@ -486,7 +486,7 @@ fn tys(&mut self, t: Ty<'tcx>, t2: Ty<'tcx>) -> RelateResult<'tcx, Ty<'tcx>> {
         // any other type variable related to `vid` via
         // subtyping. This is basically our "occurs check", preventing
         // us from creating infinitely sized types.
-        match t.sty {
+        match t.kind {
             ty::Infer(ty::TyVar(vid)) => {
                 let mut variables = self.infcx.type_variables.borrow_mut();
                 let vid = variables.root_var(vid);