1 use crate::infer::canonical::{Canonical, CanonicalQueryResponse};
2 use crate::traits::query::Fallible;
3 use rustc_middle::ty::{ParamEnvAnd, TyCtxt};
5 pub use rustc_middle::traits::query::type_op::Eq;
7 impl<'tcx> super::QueryTypeOp<'tcx> for Eq<'tcx> {
8 type QueryResponse = ();
12 key: &ParamEnvAnd<'tcx, Eq<'tcx>>,
13 ) -> Option<Self::QueryResponse> {
14 if key.value.a == key.value.b { Some(()) } else { None }
19 canonicalized: Canonical<'tcx, ParamEnvAnd<'tcx, Self>>,
20 ) -> Fallible<CanonicalQueryResponse<'tcx, ()>> {
21 tcx.type_op_eq(canonicalized)