Query modifier
This commit is contained in:
parent
8cd168f6a6
commit
42963f4d50
5 changed files with 72 additions and 0 deletions
|
@ -880,6 +880,7 @@ rustc_queries! {
|
|||
key: ty::ParamEnvAnd<'tcx, ConstAlloc<'tcx>>
|
||||
) -> Option<ty::ValTree<'tcx>> {
|
||||
desc { "destructure constant" }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
/// Destructure a constant ADT or array into its variant index and its
|
||||
|
@ -888,6 +889,7 @@ rustc_queries! {
|
|||
key: ty::ParamEnvAnd<'tcx, &'tcx ty::Const<'tcx>>
|
||||
) -> mir::DestructuredConst<'tcx> {
|
||||
desc { "destructure constant" }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
/// Dereference a constant reference or raw pointer and turn the result into a constant
|
||||
|
@ -896,6 +898,7 @@ rustc_queries! {
|
|||
key: ty::ParamEnvAnd<'tcx, &'tcx ty::Const<'tcx>>
|
||||
) -> &'tcx ty::Const<'tcx> {
|
||||
desc { "deref constant" }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
query const_caller_location(key: (rustc_span::Symbol, u32, u32)) -> ConstValue<'tcx> {
|
||||
|
@ -1100,26 +1103,32 @@ rustc_queries! {
|
|||
/// `ty.is_copy()`, etc, since that will prune the environment where possible.
|
||||
query is_copy_raw(env: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool {
|
||||
desc { "computing whether `{}` is `Copy`", env.value }
|
||||
remap_env_constness
|
||||
}
|
||||
/// Query backing `TyS::is_sized`.
|
||||
query is_sized_raw(env: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool {
|
||||
desc { "computing whether `{}` is `Sized`", env.value }
|
||||
remap_env_constness
|
||||
}
|
||||
/// Query backing `TyS::is_freeze`.
|
||||
query is_freeze_raw(env: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool {
|
||||
desc { "computing whether `{}` is freeze", env.value }
|
||||
remap_env_constness
|
||||
}
|
||||
/// Query backing `TyS::is_unpin`.
|
||||
query is_unpin_raw(env: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool {
|
||||
desc { "computing whether `{}` is `Unpin`", env.value }
|
||||
remap_env_constness
|
||||
}
|
||||
/// Query backing `TyS::needs_drop`.
|
||||
query needs_drop_raw(env: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool {
|
||||
desc { "computing whether `{}` needs drop", env.value }
|
||||
remap_env_constness
|
||||
}
|
||||
/// Query backing `TyS::has_significant_drop_raw`.
|
||||
query has_significant_drop_raw(env: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool {
|
||||
desc { "computing whether `{}` has a significant drop", env.value }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
/// Query backing `TyS::is_structural_eq_shallow`.
|
||||
|
@ -1158,6 +1167,7 @@ rustc_queries! {
|
|||
key: ty::ParamEnvAnd<'tcx, Ty<'tcx>>
|
||||
) -> Result<ty::layout::TyAndLayout<'tcx>, ty::layout::LayoutError<'tcx>> {
|
||||
desc { "computing layout of `{}`", key.value }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
/// Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers.
|
||||
|
@ -1168,6 +1178,7 @@ rustc_queries! {
|
|||
key: ty::ParamEnvAnd<'tcx, (ty::PolyFnSig<'tcx>, &'tcx ty::List<Ty<'tcx>>)>
|
||||
) -> Result<&'tcx abi::call::FnAbi<'tcx, Ty<'tcx>>, ty::layout::FnAbiError<'tcx>> {
|
||||
desc { "computing call ABI of `{}` function pointers", key.value.0 }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
/// Compute a `FnAbi` suitable for declaring/defining an `fn` instance, and for
|
||||
|
@ -1179,6 +1190,7 @@ rustc_queries! {
|
|||
key: ty::ParamEnvAnd<'tcx, (ty::Instance<'tcx>, &'tcx ty::List<Ty<'tcx>>)>
|
||||
) -> Result<&'tcx abi::call::FnAbi<'tcx, Ty<'tcx>>, ty::layout::FnAbiError<'tcx>> {
|
||||
desc { "computing call ABI of `{}`", key.value.0 }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
query dylib_dependency_formats(_: CrateNum)
|
||||
|
@ -1463,6 +1475,7 @@ rustc_queries! {
|
|||
key: ty::ParamEnvAnd<'tcx, Ty<'tcx>>
|
||||
) -> ty::inhabitedness::DefIdForest {
|
||||
desc { "computing the inhabitedness of `{:?}`", key }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
query dep_kind(_: CrateNum) -> CrateDepKind {
|
||||
|
@ -1654,6 +1667,7 @@ rustc_queries! {
|
|||
goal: ParamEnvAnd<'tcx, GenericArg<'tcx>>
|
||||
) -> GenericArg<'tcx> {
|
||||
desc { "normalizing `{}`", goal.value }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
/// Do not call this query directly: invoke `normalize_erasing_regions` instead.
|
||||
|
@ -1661,6 +1675,7 @@ rustc_queries! {
|
|||
goal: ParamEnvAnd<'tcx, mir::ConstantKind<'tcx>>
|
||||
) -> mir::ConstantKind<'tcx> {
|
||||
desc { "normalizing `{}`", goal.value }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
/// Do not call this query directly: invoke `try_normalize_erasing_regions` instead.
|
||||
|
@ -1668,6 +1683,7 @@ rustc_queries! {
|
|||
goal: ParamEnvAnd<'tcx, GenericArg<'tcx>>
|
||||
) -> Result<GenericArg<'tcx>, NoSolution> {
|
||||
desc { "normalizing `{}`", goal.value }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
/// Do not call this query directly: invoke `try_normalize_erasing_regions` instead.
|
||||
|
@ -1675,6 +1691,7 @@ rustc_queries! {
|
|||
goal: ParamEnvAnd<'tcx, mir::ConstantKind<'tcx>>
|
||||
) -> Result<mir::ConstantKind<'tcx>, NoSolution> {
|
||||
desc { "normalizing `{}`", goal.value }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
query implied_outlives_bounds(
|
||||
|
@ -1836,6 +1853,7 @@ rustc_queries! {
|
|||
key: ty::ParamEnvAnd<'tcx, (DefId, SubstsRef<'tcx>)>
|
||||
) -> Result<Option<ty::Instance<'tcx>>, ErrorReported> {
|
||||
desc { "resolving instance `{}`", ty::Instance::new(key.value.0, key.value.1) }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
query resolve_instance_of_const_arg(
|
||||
|
@ -1845,6 +1863,7 @@ rustc_queries! {
|
|||
"resolving instance of the const argument `{}`",
|
||||
ty::Instance::new(key.value.0.to_def_id(), key.value.2),
|
||||
}
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
query normalize_opaque_types(key: &'tcx ty::List<ty::Predicate<'tcx>>) -> &'tcx ty::List<ty::Predicate<'tcx>> {
|
||||
|
@ -1859,6 +1878,7 @@ rustc_queries! {
|
|||
/// size, to account for partial initialisation. See #49298 for details.)
|
||||
query conservative_is_privately_uninhabited(key: ty::ParamEnvAnd<'tcx, Ty<'tcx>>) -> bool {
|
||||
desc { "conservatively checking if {:?} is privately uninhabited", key }
|
||||
remap_env_constness
|
||||
}
|
||||
|
||||
query limits(key: ()) -> Limits {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue