Rollup merge of #103182 - Nilstrieb:query-desc-cleanup, r=oli-obk

Clean up query descriptions

Use the same tense everywhere and prefer display over debug, as these descriptions are user facing.
This commit is contained in:
Dylan DPC 2022-10-19 14:05:53 +05:30 committed by GitHub
commit 02d6135b5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 104 additions and 101 deletions

View file

@ -20,19 +20,19 @@
// as they will raise an fatal error on query cycles instead.
rustc_queries! {
query trigger_delay_span_bug(key: DefId) -> () {
desc { "trigger a delay span bug" }
desc { "triggering a delay span bug" }
}
query resolutions(_: ()) -> &'tcx ty::ResolverOutputs {
eval_always
no_hash
desc { "get the resolver outputs" }
desc { "getting the resolver outputs" }
}
query resolver_for_lowering(_: ()) -> &'tcx Steal<ty::ResolverAstLowering> {
eval_always
no_hash
desc { "get the resolver for lowering" }
desc { "getting the resolver for lowering" }
}
/// Return the span for a definition.
@ -40,7 +40,7 @@
/// This span is meant for dep-tracking rather than diagnostics. It should not be used outside
/// of rustc_middle::hir::source_map.
query source_span(key: LocalDefId) -> Span {
desc { "get the source span" }
desc { "getting the source span" }
}
/// Represents crate as a whole (as distinct from the top-level crate module).
@ -52,14 +52,14 @@
query hir_crate(key: ()) -> Crate<'tcx> {
arena_cache
eval_always
desc { "get the crate HIR" }
desc { "getting the crate HIR" }
}
/// All items in the crate.
query hir_crate_items(_: ()) -> rustc_middle::hir::ModuleItems {
arena_cache
eval_always
desc { "get HIR crate items" }
desc { "getting HIR crate items" }
}
/// The items in a module.
@ -68,7 +68,7 @@
/// Avoid calling this query directly.
query hir_module_items(key: LocalDefId) -> rustc_middle::hir::ModuleItems {
arena_cache
desc { |tcx| "HIR module items in `{}`", tcx.def_path_str(key.to_def_id()) }
desc { |tcx| "getting HIR module items in `{}`", tcx.def_path_str(key.to_def_id()) }
cache_on_disk_if { true }
}
@ -77,7 +77,7 @@
/// This can be conveniently accessed by methods on `tcx.hir()`.
/// Avoid calling this query directly.
query hir_owner(key: hir::OwnerId) -> Option<crate::hir::Owner<'tcx>> {
desc { |tcx| "HIR owner of `{}`", tcx.def_path_str(key.to_def_id()) }
desc { |tcx| "getting HIR owner of `{}`", tcx.def_path_str(key.to_def_id()) }
}
/// Gives access to the HIR ID for the given `LocalDefId` owner `key`.
@ -85,7 +85,7 @@
/// This can be conveniently accessed by methods on `tcx.hir()`.
/// Avoid calling this query directly.
query local_def_id_to_hir_id(key: LocalDefId) -> hir::HirId {
desc { |tcx| "HIR ID of `{}`", tcx.def_path_str(key.to_def_id()) }
desc { |tcx| "getting HIR ID of `{}`", tcx.def_path_str(key.to_def_id()) }
}
/// Gives access to the HIR node's parent for the HIR owner `key`.
@ -93,7 +93,7 @@
/// This can be conveniently accessed by methods on `tcx.hir()`.
/// Avoid calling this query directly.
query hir_owner_parent(key: hir::OwnerId) -> hir::HirId {
desc { |tcx| "HIR parent of `{}`", tcx.def_path_str(key.to_def_id()) }
desc { |tcx| "getting HIR parent of `{}`", tcx.def_path_str(key.to_def_id()) }
}
/// Gives access to the HIR nodes and bodies inside the HIR owner `key`.
@ -101,7 +101,7 @@
/// This can be conveniently accessed by methods on `tcx.hir()`.
/// Avoid calling this query directly.
query hir_owner_nodes(key: hir::OwnerId) -> hir::MaybeOwner<&'tcx hir::OwnerNodes<'tcx>> {
desc { |tcx| "HIR owner items in `{}`", tcx.def_path_str(key.to_def_id()) }
desc { |tcx| "getting HIR owner items in `{}`", tcx.def_path_str(key.to_def_id()) }
}
/// Gives access to the HIR attributes inside the HIR owner `key`.
@ -109,7 +109,7 @@
/// This can be conveniently accessed by methods on `tcx.hir()`.
/// Avoid calling this query directly.
query hir_attrs(key: hir::OwnerId) -> &'tcx hir::AttributeMap<'tcx> {
desc { |tcx| "HIR owner attributes in `{}`", tcx.def_path_str(key.to_def_id()) }
desc { |tcx| "getting HIR owner attributes in `{}`", tcx.def_path_str(key.to_def_id()) }
}
/// Computes the `DefId` of the corresponding const parameter in case the `key` is a
@ -138,7 +138,7 @@
/// Given the def_id of a const-generic parameter, computes the associated default const
/// parameter. e.g. `fn example<const N: usize=3>` called on `N` would return `3`.
query const_param_default(param: DefId) -> ty::Const<'tcx> {
desc { |tcx| "compute const default for a given parameter `{}`", tcx.def_path_str(param) }
desc { |tcx| "computing const default for a given parameter `{}`", tcx.def_path_str(param) }
cache_on_disk_if { param.is_local() }
separate_provide_extern
}
@ -167,7 +167,7 @@
query collect_trait_impl_trait_tys(key: DefId)
-> Result<&'tcx FxHashMap<DefId, Ty<'tcx>>, ErrorGuaranteed>
{
desc { "compare an impl and trait method signature, inferring any hidden `impl Trait` types in the process" }
desc { "comparing an impl and trait method signature, inferring any hidden `impl Trait` types in the process" }
cache_on_disk_if { key.is_local() }
separate_provide_extern
}
@ -290,11 +290,11 @@
query parent_module_from_def_id(key: LocalDefId) -> LocalDefId {
eval_always
desc { |tcx| "parent module of `{}`", tcx.def_path_str(key.to_def_id()) }
desc { |tcx| "getting the parent module of `{}`", tcx.def_path_str(key.to_def_id()) }
}
query expn_that_defined(key: DefId) -> rustc_span::ExpnId {
desc { |tcx| "expansion that defined `{}`", tcx.def_path_str(key) }
desc { |tcx| "getting the expansion that defined `{}`", tcx.def_path_str(key) }
separate_provide_extern
}
@ -306,7 +306,7 @@
/// Checks whether a type is representable or infinitely sized
query representability(_: LocalDefId) -> rustc_middle::ty::Representability {
desc { "checking if {:?} is representable", tcx.def_path_str(key.to_def_id()) }
desc { "checking if `{}` is representable", tcx.def_path_str(key.to_def_id()) }
// infinitely sized types will cause a cycle
cycle_delay_bug
// we don't want recursive representability calls to be forced with
@ -317,7 +317,7 @@
/// An implementation detail for the `representability` query
query representability_adt_ty(_: Ty<'tcx>) -> rustc_middle::ty::Representability {
desc { "checking if {:?} is representable", key }
desc { "checking if `{}` is representable", key }
cycle_delay_bug
anon
}
@ -383,7 +383,7 @@
/// See the README for the `mir` module for details.
query mir_const(key: ty::WithOptConstParam<LocalDefId>) -> &'tcx Steal<mir::Body<'tcx>> {
desc {
|tcx| "processing MIR for {}`{}`",
|tcx| "preparing {}`{}` for borrow checking",
if key.const_param_did.is_some() { "the const argument " } else { "" },
tcx.def_path_str(key.did.to_def_id()),
}
@ -395,7 +395,7 @@
key: DefId
) -> Result<Option<&'tcx [ty::abstract_const::Node<'tcx>]>, ErrorGuaranteed> {
desc {
|tcx| "building an abstract representation for {}", tcx.def_path_str(key),
|tcx| "building an abstract representation for `{}`", tcx.def_path_str(key),
}
separate_provide_extern
}
@ -405,7 +405,7 @@
) -> Result<Option<&'tcx [ty::abstract_const::Node<'tcx>]>, ErrorGuaranteed> {
desc {
|tcx|
"building an abstract representation for the const argument {}",
"building an abstract representation for the const argument `{}`",
tcx.def_path_str(key.0.to_def_id()),
}
}
@ -414,7 +414,7 @@
ty::ParamEnvAnd<'tcx, (ty::UnevaluatedConst<'tcx>, ty::UnevaluatedConst<'tcx>
)>) -> bool {
desc {
|tcx| "trying to unify the generic constants {} and {}",
|tcx| "trying to unify the generic constants `{}` and `{}`",
tcx.def_path_str(key.value.0.def.did), tcx.def_path_str(key.value.1.def.did)
}
}
@ -436,7 +436,7 @@
query mir_for_ctfe_of_const_arg(key: (LocalDefId, DefId)) -> &'tcx mir::Body<'tcx> {
desc {
|tcx| "MIR for CTFE of the const argument `{}`",
|tcx| "caching MIR for CTFE of the const argument `{}`",
tcx.def_path_str(key.0.to_def_id())
}
}
@ -448,7 +448,7 @@
) {
no_hash
desc {
|tcx| "processing {}`{}`",
|tcx| "processing MIR for {}`{}`",
if key.const_param_did.is_some() { "the const argument " } else { "" },
tcx.def_path_str(key.did.to_def_id()),
}
@ -459,7 +459,7 @@
) -> Vec<rustc_span::Symbol> {
arena_cache
desc {
|tcx| "symbols for captures of closure `{}` in `{}`",
|tcx| "finding symbols for captures of closure `{}` in `{}`",
tcx.def_path_str(key.1.to_def_id()),
tcx.def_path_str(key.0.to_def_id())
}
@ -521,12 +521,12 @@
// queries). Making it anonymous avoids hashing the result, which
// may save a bit of time.
anon
desc { "erasing regions from `{:?}`", ty }
desc { "erasing regions from `{}`", ty }
}
query wasm_import_module_map(_: CrateNum) -> FxHashMap<DefId, String> {
arena_cache
desc { "wasm import module map" }
desc { "getting wasm import module map" }
}
/// Maps from the `DefId` of an item (trait/struct/enum/fn) to the
@ -706,7 +706,7 @@
/// Collects the associated items defined on a trait or impl.
query associated_items(key: DefId) -> ty::AssocItems<'tcx> {
arena_cache
desc { |tcx| "collecting associated items of {}", tcx.def_path_str(key) }
desc { |tcx| "collecting associated items of `{}`", tcx.def_path_str(key) }
}
/// Maps from associated items on a trait to the corresponding associated
@ -732,7 +732,7 @@
///`{ trait_f: impl_f, trait_g: impl_g }`
query impl_item_implementor_ids(impl_id: DefId) -> FxHashMap<DefId, DefId> {
arena_cache
desc { |tcx| "comparing impl items against trait for {}", tcx.def_path_str(impl_id) }
desc { |tcx| "comparing impl items against trait for `{}`", tcx.def_path_str(impl_id) }
}
/// Given an `impl_id`, return the trait it implements.
@ -804,7 +804,7 @@
/// Note that we've liberated the late bound regions of function signatures, so
/// this can not be used to check whether these types are well formed.
query assumed_wf_types(key: DefId) -> &'tcx ty::List<Ty<'tcx>> {
desc { |tcx| "computing the implied bounds of {}", tcx.def_path_str(key) }
desc { |tcx| "computing the implied bounds of `{}`", tcx.def_path_str(key) }
}
/// Computes the signature of the function.
@ -853,7 +853,7 @@
}
query check_liveness(key: DefId) {
desc { |tcx| "checking liveness of variables in {}", tcx.def_path_str(key) }
desc { |tcx| "checking liveness of variables in `{}`", tcx.def_path_str(key) }
}
/// Return the live symbols in the crate for dead code check.
@ -865,7 +865,7 @@
FxHashMap<LocalDefId, Vec<(DefId, DefId)>>
) {
arena_cache
desc { "find live symbols in crate" }
desc { "finding live symbols in crate" }
}
query check_mod_deathness(key: LocalDefId) -> () {
@ -913,7 +913,7 @@
}
query used_trait_imports(key: LocalDefId) -> &'tcx FxHashSet<LocalDefId> {
desc { |tcx| "used_trait_imports `{}`", tcx.def_path_str(key.to_def_id()) }
desc { |tcx| "finding used_trait_imports `{}`", tcx.def_path_str(key.to_def_id()) }
cache_on_disk_if { true }
}
@ -942,7 +942,7 @@
/// Not meant to be used directly outside of coherence.
query crate_inherent_impls(k: ()) -> CrateInherentImpls {
arena_cache
desc { "all inherent impls defined in crate" }
desc { "finding all inherent impls defined in crate" }
}
/// Checks all types in the crate for overlap in their inherent impls. Reports errors.
@ -1032,7 +1032,7 @@
query try_destructure_mir_constant(
key: ty::ParamEnvAnd<'tcx, mir::ConstantKind<'tcx>>
) -> Option<mir::DestructuredConstant<'tcx>> {
desc { "destructuring mir constant"}
desc { "destructuring MIR constant"}
remap_env_constness
}
@ -1041,12 +1041,12 @@
query deref_mir_constant(
key: ty::ParamEnvAnd<'tcx, mir::ConstantKind<'tcx>>
) -> mir::ConstantKind<'tcx> {
desc { "dereferencing mir constant" }
desc { "dereferencing MIR constant" }
remap_env_constness
}
query const_caller_location(key: (rustc_span::Symbol, u32, u32)) -> ConstValue<'tcx> {
desc { "get a &core::panic::Location referring to a span" }
desc { "getting a &core::panic::Location referring to a span" }
}
// FIXME get rid of this with valtrees
@ -1068,7 +1068,7 @@
/// Performs part of the privacy check and computes "access levels".
query privacy_access_levels(_: ()) -> &'tcx AccessLevels {
eval_always
desc { "privacy access levels" }
desc { "checking privacy access levels" }
}
query check_private_in_public(_: ()) -> () {
eval_always
@ -1196,12 +1196,12 @@
}
query is_ctfe_mir_available(key: DefId) -> bool {
desc { |tcx| "checking if item has ctfe mir available: `{}`", tcx.def_path_str(key) }
desc { |tcx| "checking if item has CTFE MIR available: `{}`", tcx.def_path_str(key) }
cache_on_disk_if { key.is_local() }
separate_provide_extern
}
query is_mir_available(key: DefId) -> bool {
desc { |tcx| "checking if item has mir available: `{}`", tcx.def_path_str(key) }
desc { |tcx| "checking if item has MIR available: `{}`", tcx.def_path_str(key) }
cache_on_disk_if { key.is_local() }
separate_provide_extern
}
@ -1209,16 +1209,16 @@
query own_existential_vtable_entries(
key: ty::PolyExistentialTraitRef<'tcx>
) -> &'tcx [DefId] {
desc { |tcx| "finding all existential vtable entries for trait {}", tcx.def_path_str(key.def_id()) }
desc { |tcx| "finding all existential vtable entries for trait `{}`", tcx.def_path_str(key.def_id()) }
}
query vtable_entries(key: ty::PolyTraitRef<'tcx>)
-> &'tcx [ty::VtblEntry<'tcx>] {
desc { |tcx| "finding all vtable entries for trait {}", tcx.def_path_str(key.def_id()) }
desc { |tcx| "finding all vtable entries for trait `{}`", tcx.def_path_str(key.def_id()) }
}
query vtable_trait_upcasting_coercion_new_vptr_slot(key: (Ty<'tcx>, Ty<'tcx>)) -> Option<usize> {
desc { |tcx| "finding the slot within vtable for trait object {} vtable ptr during trait upcasting coercion from {} vtable",
desc { |tcx| "finding the slot within vtable for trait object `{}` vtable ptr during trait upcasting coercion from `{}` vtable",
key.1, key.0 }
}
@ -1238,13 +1238,13 @@
/// Return all `impl` blocks in the current crate.
query all_local_trait_impls(_: ()) -> &'tcx rustc_data_structures::fx::FxIndexMap<DefId, Vec<LocalDefId>> {
desc { "local trait impls" }
desc { "finding local trait impls" }
}
/// Given a trait `trait_id`, return all known `impl` blocks.
query trait_impls_of(trait_id: DefId) -> ty::trait_def::TraitImpls {
arena_cache
desc { |tcx| "trait impls of `{}`", tcx.def_path_str(trait_id) }
desc { |tcx| "finding trait impls of `{}`", tcx.def_path_str(trait_id) }
}
query specialization_graph_of(trait_id: DefId) -> specialization_graph::Graph {
@ -1253,7 +1253,7 @@
cache_on_disk_if { true }
}
query object_safety_violations(trait_id: DefId) -> &'tcx [traits::ObjectSafetyViolation] {
desc { |tcx| "determine object safety of trait `{}`", tcx.def_path_str(trait_id) }
desc { |tcx| "determining object safety of trait `{}`", tcx.def_path_str(trait_id) }
}
/// Gets the ParameterEnvironment for a given item; this environment
@ -1311,7 +1311,7 @@
/// correctly.
query has_structural_eq_impls(ty: Ty<'tcx>) -> bool {
desc {
"computing whether `{:?}` implements `PartialStructuralEq` and `StructuralEq`",
"computing whether `{}` implements `PartialStructuralEq` and `StructuralEq`",
ty
}
}
@ -1370,13 +1370,13 @@
query dylib_dependency_formats(_: CrateNum)
-> &'tcx [(CrateNum, LinkagePreference)] {
desc { "dylib dependency formats of crate" }
desc { "getting dylib dependency formats of crate" }
separate_provide_extern
}
query dependency_formats(_: ()) -> Lrc<crate::middle::dependency_format::Dependencies> {
arena_cache
desc { "get the linkage format of all dependencies" }
desc { "getting the linkage format of all dependencies" }
}
query is_compiler_builtins(_: CrateNum) -> bool {
@ -1398,31 +1398,31 @@
}
query is_profiler_runtime(_: CrateNum) -> bool {
fatal_cycle
desc { "query a crate is `#![profiler_runtime]`" }
desc { "checking if a crate is `#![profiler_runtime]`" }
separate_provide_extern
}
query has_ffi_unwind_calls(key: LocalDefId) -> bool {
desc { |tcx| "check if `{}` contains FFI-unwind calls", tcx.def_path_str(key.to_def_id()) }
desc { |tcx| "checking if `{}` contains FFI-unwind calls", tcx.def_path_str(key.to_def_id()) }
cache_on_disk_if { true }
}
query required_panic_strategy(_: CrateNum) -> Option<PanicStrategy> {
fatal_cycle
desc { "query a crate's required panic strategy" }
desc { "getting a crate's required panic strategy" }
separate_provide_extern
}
query panic_in_drop_strategy(_: CrateNum) -> PanicStrategy {
fatal_cycle
desc { "query a crate's configured panic-in-drop strategy" }
desc { "getting a crate's configured panic-in-drop strategy" }
separate_provide_extern
}
query is_no_builtins(_: CrateNum) -> bool {
fatal_cycle
desc { "test whether a crate has `#![no_builtins]`" }
desc { "getting whether a crate has `#![no_builtins]`" }
separate_provide_extern
}
query symbol_mangling_version(_: CrateNum) -> SymbolManglingVersion {
fatal_cycle
desc { "query a crate's symbol mangling version" }
desc { "getting a crate's symbol mangling version" }
separate_provide_extern
}
@ -1437,7 +1437,7 @@
}
query in_scope_traits_map(_: hir::OwnerId)
-> Option<&'tcx FxHashMap<ItemLocalId, Box<[TraitCandidate]>>> {
desc { "traits in scope at a block" }
desc { "getting traits in scope at a block" }
}
query module_reexports(def_id: LocalDefId) -> Option<&'tcx [ModChild]> {
@ -1588,17 +1588,17 @@
}
query is_dllimport_foreign_item(def_id: DefId) -> bool {
desc { |tcx| "is_dllimport_foreign_item({})", tcx.def_path_str(def_id) }
desc { |tcx| "checking if `{}` is a a dylib", tcx.def_path_str(def_id) }
}
query is_statically_included_foreign_item(def_id: DefId) -> bool {
desc { |tcx| "is_statically_included_foreign_item({})", tcx.def_path_str(def_id) }
desc { |tcx| "checking if `{}` is a staticlib", tcx.def_path_str(def_id) }
}
query native_library_kind(def_id: DefId)
-> Option<NativeLibKind> {
desc { |tcx| "native_library_kind({})", tcx.def_path_str(def_id) }
desc { |tcx| "getting the native library kind of `{}`", tcx.def_path_str(def_id) }
}
query native_library(def_id: DefId) -> Option<&'tcx NativeLib> {
desc { |tcx| "native_library({})", tcx.def_path_str(def_id) }
desc { |tcx| "getting the native library for `{}`", tcx.def_path_str(def_id) }
}
/// Does lifetime resolution, but does not descend into trait items. This
@ -1659,7 +1659,7 @@
query type_uninhabited_from(
key: ty::ParamEnvAnd<'tcx, Ty<'tcx>>
) -> ty::inhabitedness::DefIdForest<'tcx> {
desc { "computing the inhabitedness of `{:?}`", key }
desc { "computing the inhabitedness of `{}`", key.value }
remap_env_constness
}
@ -1698,7 +1698,7 @@
}
/// Whether the function is an intrinsic
query is_intrinsic(def_id: DefId) -> bool {
desc { |tcx| "is_intrinsic({})", tcx.def_path_str(def_id) }
desc { |tcx| "checking whether `{}` is an intrinsic", tcx.def_path_str(def_id) }
separate_provide_extern
}
/// Returns the lang items defined in another crate by loading it from metadata.
@ -1765,12 +1765,12 @@
/// is marked as a private dependency
query is_private_dep(c: CrateNum) -> bool {
eval_always
desc { "check whether crate {} is a private dependency", c }
desc { "checking whether crate `{}` is a private dependency", c }
separate_provide_extern
}
query allocator_kind(_: ()) -> Option<AllocatorKind> {
eval_always
desc { "allocator kind for the current crate" }
desc { "getting the allocator kind for the current crate" }
}
query upvars_mentioned(def_id: DefId) -> Option<&'tcx FxIndexMap<hir::HirId, hir::Upvar>> {
@ -1783,7 +1783,7 @@
desc { "looking up all possibly unused extern crates" }
}
query names_imported_by_glob_use(def_id: LocalDefId) -> &'tcx FxHashSet<Symbol> {
desc { |tcx| "names_imported_by_glob_use for `{}`", tcx.def_path_str(def_id.to_def_id()) }
desc { |tcx| "finding names imported by glob use for `{}`", tcx.def_path_str(def_id.to_def_id()) }
}
query stability_index(_: ()) -> stability::Index {
@ -1809,7 +1809,7 @@
/// correspond to a publicly visible symbol in `cnum` machine code.
/// - The `exported_symbols` sets of different crates do not intersect.
query exported_symbols(cnum: CrateNum) -> &'tcx [(ExportedSymbol<'tcx>, SymbolExportInfo)] {
desc { "exported_symbols" }
desc { "collecting exported symbols for crate `{}`", cnum}
cache_on_disk_if { *cnum == LOCAL_CRATE }
separate_provide_extern
}
@ -1818,6 +1818,7 @@
eval_always
desc { "collect_and_partition_mono_items" }
}
query is_codegened_item(def_id: DefId) -> bool {
desc { |tcx| "determining whether `{}` needs codegen", tcx.def_path_str(def_id) }
}
@ -1825,12 +1826,13 @@
/// All items participating in code generation together with items inlined into them.
query codegened_and_inlined_items(_: ()) -> &'tcx DefIdSet {
eval_always
desc { "codegened_and_inlined_items" }
desc { "collecting codegened and inlined items" }
}
query codegen_unit(_: Symbol) -> &'tcx CodegenUnit<'tcx> {
desc { "codegen_unit" }
query codegen_unit(sym: Symbol) -> &'tcx CodegenUnit<'tcx> {
desc { "getting codegen unit `{sym}`" }
}
query unused_generic_params(key: ty::InstanceDef<'tcx>) -> FiniteBitSet<u32> {
cache_on_disk_if { key.def_id().is_local() }
desc {
@ -1839,6 +1841,7 @@
}
separate_provide_extern
}
query backend_optimization_level(_: ()) -> OptLevel {
desc { "optimization level used by backend" }
}
@ -1849,7 +1852,7 @@
/// has been destroyed.
query output_filenames(_: ()) -> &'tcx Arc<OutputFilenames> {
eval_always
desc { "output_filenames" }
desc { "getting output filenames" }
}
/// Do not call this query directly: invoke `normalize` instead.
@ -1859,7 +1862,7 @@
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, NormalizationResult<'tcx>>>,
NoSolution,
> {
desc { "normalizing `{:?}`", goal }
desc { "normalizing `{}`", goal.value.value }
remap_env_constness
}
@ -1877,7 +1880,7 @@
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, Vec<OutlivesBound<'tcx>>>>,
NoSolution,
> {
desc { "computing implied outlives bounds for `{:?}`", goal }
desc { "computing implied outlives bounds for `{}`", goal.value.value }
remap_env_constness
}
@ -1889,7 +1892,7 @@
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, DropckOutlivesResult<'tcx>>>,
NoSolution,
> {
desc { "computing dropck types for `{:?}`", goal }
desc { "computing dropck types for `{}`", goal.value.value }
remap_env_constness
}
@ -1917,7 +1920,7 @@
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ()>>,
NoSolution,
> {
desc { "evaluating `type_op_ascribe_user_type` `{:?}`", goal }
desc { "evaluating `type_op_ascribe_user_type` `{:?}`", goal.value.value }
remap_env_constness
}
@ -1928,7 +1931,7 @@
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ()>>,
NoSolution,
> {
desc { "evaluating `type_op_eq` `{:?}`", goal }
desc { "evaluating `type_op_eq` `{:?}`", goal.value.value }
remap_env_constness
}
@ -1939,7 +1942,7 @@
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ()>>,
NoSolution,
> {
desc { "evaluating `type_op_subtype` `{:?}`", goal }
desc { "evaluating `type_op_subtype` `{:?}`", goal.value.value }
remap_env_constness
}
@ -1950,7 +1953,7 @@
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ()>>,
NoSolution,
> {
desc { "evaluating `type_op_prove_predicate` `{:?}`", goal }
desc { "evaluating `type_op_prove_predicate` `{:?}`", goal.value.value }
}
/// Do not call this query directly: part of the `Normalize` type-op
@ -1960,7 +1963,7 @@
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, Ty<'tcx>>>,
NoSolution,
> {
desc { "normalizing `{:?}`", goal }
desc { "normalizing `{}`", goal.value.value.value }
remap_env_constness
}
@ -1971,7 +1974,7 @@
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ty::Predicate<'tcx>>>,
NoSolution,
> {
desc { "normalizing `{:?}`", goal }
desc { "normalizing `{:?}`", goal.value.value.value }
remap_env_constness
}
@ -1982,7 +1985,7 @@
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ty::PolyFnSig<'tcx>>>,
NoSolution,
> {
desc { "normalizing `{:?}`", goal }
desc { "normalizing `{:?}`", goal.value.value.value }
remap_env_constness
}
@ -1993,20 +1996,20 @@
&'tcx Canonical<'tcx, canonical::QueryResponse<'tcx, ty::FnSig<'tcx>>>,
NoSolution,
> {
desc { "normalizing `{:?}`", goal }
desc { "normalizing `{:?}`", goal.value.value.value }
remap_env_constness
}
query subst_and_check_impossible_predicates(key: (DefId, SubstsRef<'tcx>)) -> bool {
desc { |tcx|
"impossible substituted predicates:`{}`",
"checking impossible substituted predicates: `{}`",
tcx.def_path_str(key.0)
}
}
query is_impossible_method(key: (DefId, DefId)) -> bool {
desc { |tcx|
"checking if {} is impossible to call within {}",
"checking if `{}` is impossible to call within `{}`",
tcx.def_path_str(key.1),
tcx.def_path_str(key.0),
}
@ -2015,7 +2018,7 @@
query method_autoderef_steps(
goal: CanonicalTyGoal<'tcx>
) -> MethodAutoderefStepsResult<'tcx> {
desc { "computing autoderef types for `{:?}`", goal }
desc { "computing autoderef types for `{}`", goal.value.value }
remap_env_constness
}
@ -2063,7 +2066,7 @@
}
query normalize_opaque_types(key: &'tcx ty::List<ty::Predicate<'tcx>>) -> &'tcx ty::List<ty::Predicate<'tcx>> {
desc { "normalizing opaque types in {:?}", key }
desc { "normalizing opaque types in `{:?}`", key }
}
/// Checks whether a type is definitely uninhabited. This is
@ -2073,7 +2076,7 @@
/// will be `Abi::Uninhabited`. (Note that uninhabited types may have nonzero
/// 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 }
desc { "conservatively checking if `{}` is privately uninhabited", key.value }
remap_env_constness
}
@ -2093,7 +2096,7 @@
arena_cache
eval_always
no_hash
desc { "performing HIR wf-checking for predicate {:?} at item {:?}", key.0, key.1 }
desc { "performing HIR wf-checking for predicate `{:?}` at item `{:?}`", key.0, key.1 }
}
@ -2112,11 +2115,11 @@
}
query permits_uninit_init(key: TyAndLayout<'tcx>) -> bool {
desc { "checking to see if {:?} permits being left uninit", key.ty }
desc { "checking to see if `{}` permits being left uninit", key.ty }
}
query permits_zero_init(key: TyAndLayout<'tcx>) -> bool {
desc { "checking to see if {:?} permits being left zeroed", key.ty }
desc { "checking to see if `{}` permits being left zeroed", key.ty }
}
query compare_assoc_const_impl_item_with_trait_item(

View file

@ -18,7 +18,7 @@ note: ...which requires borrow-checking `x`...
|
LL | pub const async fn x() {}
| ^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `x`...
note: ...which requires processing MIR for `x`...
--> $DIR/no-const-async.rs:4:1
|
LL | pub const async fn x() {}

View file

@ -1,4 +1,4 @@
error[E0391]: cycle detected when building an abstract representation for test::{constant#0}
error[E0391]: cycle detected when building an abstract representation for `test::{constant#0}`
--> $DIR/closures.rs:3:35
|
LL | fn test<const N: usize>() -> [u8; N + (|| 42)()] {}
@ -14,7 +14,7 @@ note: ...which requires type-checking `test::{constant#0}`...
|
LL | fn test<const N: usize>() -> [u8; N + (|| 42)()] {}
| ^^^^^^^^^^^^^
= note: ...which again requires building an abstract representation for test::{constant#0}, completing the cycle
= note: ...which again requires building an abstract representation for `test::{constant#0}`, completing the cycle
note: cycle used when checking that `test` is well-formed
--> $DIR/closures.rs:3:1
|

View file

@ -9,12 +9,12 @@ note: ...which requires borrow-checking `cycle1`...
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle1`...
note: ...which requires processing MIR for `cycle1`...
--> $DIR/auto-trait-leak.rs:12:1
|
LL | fn cycle1() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing MIR for `cycle1`...
note: ...which requires preparing `cycle1` for borrow checking...
--> $DIR/auto-trait-leak.rs:12:1
|
LL | fn cycle1() -> impl Clone {
@ -50,12 +50,12 @@ note: ...which requires borrow-checking `cycle2`...
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `cycle2`...
note: ...which requires processing MIR for `cycle2`...
--> $DIR/auto-trait-leak.rs:19:1
|
LL | fn cycle2() -> impl Clone {
| ^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing MIR for `cycle2`...
note: ...which requires preparing `cycle2` for borrow checking...
--> $DIR/auto-trait-leak.rs:19:1
|
LL | fn cycle2() -> impl Clone {

View file

@ -199,7 +199,7 @@ note: ...which requires borrow-checking `main::ff5`...
|
LL | const async unsafe extern "C" fn ff5() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `main::ff5`...
note: ...which requires processing MIR for `main::ff5`...
--> $DIR/fn-header-semantic-fail.rs:12:5
|
LL | const async unsafe extern "C" fn ff5() {}
@ -235,7 +235,7 @@ note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-
|
LL | const async unsafe extern "C" fn ft5() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
note: ...which requires processing MIR for `main::<impl at $DIR/fn-header-semantic-fail.rs:28:5: 28:17>::ft5`...
--> $DIR/fn-header-semantic-fail.rs:33:9
|
LL | const async unsafe extern "C" fn ft5() {}
@ -271,7 +271,7 @@ note: ...which requires borrow-checking `main::<impl at $DIR/fn-header-semantic-
|
LL | const async unsafe extern "C" fn fi5() {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: ...which requires processing `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5`...
note: ...which requires processing MIR for `main::<impl at $DIR/fn-header-semantic-fail.rs:40:5: 40:11>::fi5`...
--> $DIR/fn-header-semantic-fail.rs:45:9
|
LL | const async unsafe extern "C" fn fi5() {}

View file

@ -1,7 +1,7 @@
// compile-flags: -Ztreat-err-as-bug
// failure-status: 101
// error-pattern: aborting due to `-Z treat-err-as-bug=1`
// error-pattern: [trigger_delay_span_bug] trigger a delay span bug
// error-pattern: [trigger_delay_span_bug] triggering a delay span bug
// normalize-stderr-test "note: .*\n\n" -> ""
// normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
// rustc-env:RUST_BACKTRACE=0

View file

@ -7,5 +7,5 @@ LL | fn main() {}
error: internal compiler error: unexpected panic
query stack during panic:
#0 [trigger_delay_span_bug] trigger a delay span bug
#0 [trigger_delay_span_bug] triggering a delay span bug
end of query stack