]> git.proxmox.com Git - rustc.git/blobdiff - src/librustc/traits/query/type_op/subtype.rs
New upstream version 1.41.1+dfsg1
[rustc.git] / src / librustc / traits / query / type_op / subtype.rs
index c89a55daa095e1763d1f43baa7aca9eeea687286..76292f9dea085cc29425c9e2a7da6c07c52e2b09 100644 (file)
@@ -2,7 +2,7 @@ use crate::infer::canonical::{Canonicalized, CanonicalizedQueryResponse};
 use crate::traits::query::Fallible;
 use crate::ty::{ParamEnvAnd, Ty, TyCtxt};
 
-#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
+#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq, HashStable, TypeFoldable, Lift)]
 pub struct Subtype<'tcx> {
     pub sub: Ty<'tcx>,
     pub sup: Ty<'tcx>,
@@ -35,22 +35,3 @@ impl<'tcx> super::QueryTypeOp<'tcx> for Subtype<'tcx> {
         tcx.type_op_subtype(canonicalized)
     }
 }
-
-BraceStructTypeFoldableImpl! {
-    impl<'tcx> TypeFoldable<'tcx> for Subtype<'tcx> {
-        sub,
-        sup,
-    }
-}
-
-BraceStructLiftImpl! {
-    impl<'a, 'tcx> Lift<'tcx> for Subtype<'a> {
-        type Lifted = Subtype<'tcx>;
-        sub,
-        sup,
-    }
-}
-
-impl_stable_hash_for! {
-    struct Subtype<'tcx> { sub, sup }
-}