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>,
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 }
-}