1 use crate::infer::canonical::{Canonicalized, CanonicalizedQueryResponse};
2 use crate::traits::query::Fallible;
3 use rustc_middle::ty::{ParamEnvAnd, TyCtxt};
5 pub use rustc_middle::traits::query::type_op::Subtype;
7 impl<'tcx> super::QueryTypeOp<'tcx> for Subtype<'tcx> {
8 type QueryResponse = ();
10 fn try_fast_path(_tcx: TyCtxt<'tcx>, key: &ParamEnvAnd<'tcx, Self>) -> Option<()> {
11 if key.value.sub == key.value.sup { Some(()) } else { None }
16 canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>,
17 ) -> Fallible<CanonicalizedQueryResponse<'tcx, ()>> {
18 tcx.type_op_subtype(canonicalized)