[−][src]Trait rustc::traits::query::type_op::QueryTypeOp
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
"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 QueryResult: TypeFoldable<'tcx> + Lift<'gcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Required Methods
fn try_fast_path(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResult>
tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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.
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, Self::QueryResult>>
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, Self::QueryResult>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
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.
fn shrink_to_tcx_lifetime<'a>(
lifted_query_result: &'a CanonicalizedQueryResult<'gcx, Self::QueryResult>
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self::QueryResult>>
lifted_query_result: &'a CanonicalizedQueryResult<'gcx, Self::QueryResult>
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self::QueryResult>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Casts a lifted query result (which is in the gcx lifetime)
into the tcx lifetime. This is always just an identity cast,
but the generic code doesn't realize it -- put another way, in
the generic code, we have a Lifted<'gcx, Self::QueryResult>
and we want to convert that to a Self::QueryResult
. This is
not a priori valid, so we can't do it -- but in practice, it
is always a no-op (e.g., the lifted form of a type,
Ty<'gcx>
, is a subtype of Ty<'tcx>
). So we have to push
the operation into the impls that know more specifically what
QueryResult
is. This operation would (maybe) be nicer with
something like HKTs or GATs, since then we could make
QueryResult
parametric and 'gcx
and 'tcx
etc.
Provided Methods
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Implementors
impl<'gcx, 'tcx> QueryTypeOp<'gcx, 'tcx> for DropckOutlives<'tcx> where
'gcx: 'tcx,
[src]
impl<'gcx, 'tcx> QueryTypeOp<'gcx, 'tcx> for DropckOutlives<'tcx> where
'gcx: 'tcx,
type QueryResult = DropckOutlivesResult<'tcx>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn try_fast_path(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResult>
[src]
fn try_fast_path(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, Self::QueryResult>>
[src]
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, Self::QueryResult>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn shrink_to_tcx_lifetime<'a>(
lifted_query_result: &'a CanonicalizedQueryResult<'gcx, Self::QueryResult>
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self::QueryResult>>
[src]
fn shrink_to_tcx_lifetime<'a>(
lifted_query_result: &'a CanonicalizedQueryResult<'gcx, Self::QueryResult>
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self::QueryResult>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
[src]
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'gcx: 'tcx, 'tcx> QueryTypeOp<'gcx, 'tcx> for Eq<'tcx>
[src]
impl<'gcx: 'tcx, 'tcx> QueryTypeOp<'gcx, 'tcx> for Eq<'tcx>
type QueryResult = ()
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn try_fast_path(
_tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Eq<'tcx>>
) -> Option<Self::QueryResult>
[src]
fn try_fast_path(
_tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Eq<'tcx>>
) -> Option<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, ()>>
[src]
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, ()>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn shrink_to_tcx_lifetime<'a>(
v: &'a CanonicalizedQueryResult<'gcx, ()>
) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>>
[src]
fn shrink_to_tcx_lifetime<'a>(
v: &'a CanonicalizedQueryResult<'gcx, ()>
) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
[src]
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'gcx: 'tcx, 'tcx> QueryTypeOp<'gcx, 'tcx> for ImpliedOutlivesBounds<'tcx>
[src]
impl<'gcx: 'tcx, 'tcx> QueryTypeOp<'gcx, 'tcx> for ImpliedOutlivesBounds<'tcx>
type QueryResult = Vec<OutlivesBound<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn try_fast_path(
_tcx: TyCtxt<'_, 'gcx, 'tcx>,
_key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResult>
[src]
fn try_fast_path(
_tcx: TyCtxt<'_, 'gcx, 'tcx>,
_key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, Self::QueryResult>>
[src]
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, Self::QueryResult>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn shrink_to_tcx_lifetime<'a>(
v: &'a CanonicalizedQueryResult<'gcx, Self::QueryResult>
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self::QueryResult>>
[src]
fn shrink_to_tcx_lifetime<'a>(
v: &'a CanonicalizedQueryResult<'gcx, Self::QueryResult>
) -> &'a Canonical<'tcx, QueryResult<'tcx, Self::QueryResult>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
[src]
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'gcx: 'tcx, 'tcx> QueryTypeOp<'gcx, 'tcx> for ProvePredicate<'tcx>
[src]
impl<'gcx: 'tcx, 'tcx> QueryTypeOp<'gcx, 'tcx> for ProvePredicate<'tcx>
type QueryResult = ()
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn try_fast_path(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResult>
[src]
fn try_fast_path(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, ()>>
[src]
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, ()>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn shrink_to_tcx_lifetime<'a>(
v: &'a CanonicalizedQueryResult<'gcx, ()>
) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>>
[src]
fn shrink_to_tcx_lifetime<'a>(
v: &'a CanonicalizedQueryResult<'gcx, ()>
) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
[src]
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'gcx: 'tcx, 'tcx> QueryTypeOp<'gcx, 'tcx> for Subtype<'tcx>
[src]
impl<'gcx: 'tcx, 'tcx> QueryTypeOp<'gcx, 'tcx> for Subtype<'tcx>
type QueryResult = ()
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn try_fast_path(
_tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<()>
[src]
fn try_fast_path(
_tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<()>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, ()>>
[src]
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, ()>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn shrink_to_tcx_lifetime<'a>(
v: &'a CanonicalizedQueryResult<'gcx, ()>
) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>>
[src]
fn shrink_to_tcx_lifetime<'a>(
v: &'a CanonicalizedQueryResult<'gcx, ()>
) -> &'a Canonical<'tcx, QueryResult<'tcx, ()>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
[src]
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl<'gcx: 'tcx, 'tcx, T> QueryTypeOp<'gcx, 'tcx> for Normalize<T> where
T: Normalizable<'gcx, 'tcx>,
[src]
impl<'gcx: 'tcx, 'tcx, T> QueryTypeOp<'gcx, 'tcx> for Normalize<T> where
T: Normalizable<'gcx, 'tcx>,
type QueryResult = T
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn try_fast_path(
_tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<T>
[src]
fn try_fast_path(
_tcx: TyCtxt<'_, 'gcx, 'tcx>,
key: &ParamEnvAnd<'tcx, Self>
) -> Option<T>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, Self::QueryResult>>
[src]
fn perform_query(
tcx: TyCtxt<'_, 'gcx, 'tcx>,
canonicalized: Canonicalized<'gcx, ParamEnvAnd<'tcx, Self>>
) -> Fallible<CanonicalizedQueryResult<'gcx, Self::QueryResult>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn shrink_to_tcx_lifetime<'a>(
v: &'a CanonicalizedQueryResult<'gcx, T>
) -> &'a Canonical<'tcx, QueryResult<'tcx, T>>
[src]
fn shrink_to_tcx_lifetime<'a>(
v: &'a CanonicalizedQueryResult<'gcx, T>
) -> &'a Canonical<'tcx, QueryResult<'tcx, T>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
[src]
fn fully_perform_into(
query_key: ParamEnvAnd<'tcx, Self>,
infcx: &InferCtxt<'_, 'gcx, 'tcx>,
output_query_region_constraints: &mut Vec<QueryRegionConstraint<'tcx>>
) -> Fallible<Self::QueryResult>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?