[−][src]Trait rustc_trait_selection::traits::query::type_op::QueryTypeOp
"Query type ops" are type ops that are implemented using a
canonical query. The Self type here contains the kernel of
information needed to do the operation -- TypeOp is actually
implemented for ParamEnvAnd<Self>, since we always need to bring
along a parameter environment as well. For query type-ops, we will
first canonicalize the key and then invoke the query on the tcx,
which produces the resulting query region constraints.
Associated Types
type QueryResponse: TypeFoldable<'tcx>[src]
Required methods
pub fn try_fast_path(
tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResponse>[src]
tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResponse>
Give query the option for a simple fast path that never
actually hits the tcx cache lookup etc. Return Some(r) with
a final result or None to do the full path.
pub fn perform_query(
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, Self::QueryResponse>>[src]
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, Self::QueryResponse>>
Performs the actual query with the canonicalized key -- the
real work happens here. This method is not given an infcx
because it shouldn't need one -- and if it had access to one,
it might do things like invoke sub_regions, which would be
bad, because it would create subregion relationships that are
not captured in the return value.
Provided methods
pub fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'tcx>,
output_query_region_constraints: &mut QueryRegionConstraints<'tcx>
) -> Fallible<Self::QueryResponse>[src]
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'tcx>,
output_query_region_constraints: &mut QueryRegionConstraints<'tcx>
) -> Fallible<Self::QueryResponse>
Implementors
impl<'tcx> QueryTypeOp<'tcx> for AscribeUserType<'tcx>[src]
type QueryResponse = ()
pub fn try_fast_path(
_tcx: TyCtxt<'tcx>,
_key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResponse>[src]
_tcx: TyCtxt<'tcx>,
_key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResponse>
pub fn perform_query(
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, ()>>[src]
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, ()>>
impl<'tcx> QueryTypeOp<'tcx> for Eq<'tcx>[src]
type QueryResponse = ()
pub fn try_fast_path(
_tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Eq<'tcx>>
) -> Option<Self::QueryResponse>[src]
_tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Eq<'tcx>>
) -> Option<Self::QueryResponse>
pub fn perform_query(
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, ()>>[src]
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, ()>>
impl<'tcx> QueryTypeOp<'tcx> for ImpliedOutlivesBounds<'tcx>[src]
type QueryResponse = Vec<OutlivesBound<'tcx>>
pub fn try_fast_path(
_tcx: TyCtxt<'tcx>,
_key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResponse>[src]
_tcx: TyCtxt<'tcx>,
_key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResponse>
pub fn perform_query(
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, Self::QueryResponse>>[src]
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, Self::QueryResponse>>
impl<'tcx> QueryTypeOp<'tcx> for DropckOutlives<'tcx>[src]
type QueryResponse = DropckOutlivesResult<'tcx>
pub fn try_fast_path(
tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResponse>[src]
tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResponse>
pub fn perform_query(
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, Self::QueryResponse>>[src]
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, Self::QueryResponse>>
impl<'tcx> QueryTypeOp<'tcx> for ProvePredicate<'tcx>[src]
type QueryResponse = ()
pub fn try_fast_path(
tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResponse>[src]
tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResponse>
pub fn perform_query(
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, ()>>[src]
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, ()>>
impl<'tcx> QueryTypeOp<'tcx> for Subtype<'tcx>[src]
type QueryResponse = ()
pub fn try_fast_path(
_tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<()>[src]
_tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<()>
pub fn perform_query(
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, ()>>[src]
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, ()>>
impl<'tcx, T> QueryTypeOp<'tcx> for Normalize<T> where
T: Normalizable<'tcx> + 'tcx, [src]
T: Normalizable<'tcx> + 'tcx,
type QueryResponse = T
pub fn try_fast_path(
_tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<T>[src]
_tcx: TyCtxt<'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<T>
pub fn perform_query(
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, Self::QueryResponse>>[src]
tcx: TyCtxt<'tcx>,
canonicalized: Canonicalized<'tcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResponse<'tcx, Self::QueryResponse>>