3232//! - `arena_cache`: Use an arena for in-memory caching of the query result.
3333//! - `cache_on_disk_if { ... }`: Cache the query result to disk if the provided block evaluates to
3434//! true. The query key identifier is available for use within the block, as is `tcx`.
35- //! - `cycle_delay_bug`: If a dependency cycle is detected, emit a delayed bug instead of aborting immediately.
36- //! - `cycle_stash`: If a dependency cycle is detected, stash the error for later handling.
3735//! - `no_hash`: Do not hash the query result for incremental compilation; just mark as dirty if recomputed.
3836//! - `anon`: Make the query anonymous in the dependency graph (no dep node is created).
3937//! - `eval_always`: Always evaluate the query, ignoring its dependencies and cached results.
@@ -354,7 +352,6 @@ rustc_queries! {
354352 "computing type of opaque `{path}`" ,
355353 path = tcx. def_path_str( key) ,
356354 }
357- cycle_stash
358355 }
359356 query type_of_opaque_hir_typeck( key: LocalDefId ) -> ty:: EarlyBinder <' tcx, Ty <' tcx>> {
360357 desc {
@@ -588,14 +585,13 @@ rustc_queries! {
588585 }
589586
590587 /// Checks whether a type is representable or infinitely sized
588+ //
589+ // Infinitely sized types will cause a cycle. The `value_from_cycle_error` impl will print
590+ // a custom error about the infinite size and then abort compilation. (In the past we
591+ // recovered and continued, but in practice that leads to confusing subsequent error
592+ // messages about cycles that then abort.)
591593 query check_representability( key: LocalDefId ) {
592594 desc { "checking if `{}` is representable" , tcx. def_path_str( key) }
593- // njn: update comment
594- // Infinitely sized types will cause a cycle. The custom `FromCycleError` impl for
595- // `Representability` will print a custom error about the infinite size and then abort
596- // compilation. (In the past we recovered and continued, but in practice that leads to
597- // confusing subsequent error messages about cycles that then abort.)
598- cycle_delay_bug
599595 // We don't want recursive representability calls to be forced with
600596 // incremental compilation because, if a cycle occurs, we need the
601597 // entire cycle to be in memory for diagnostics. This means we can't
@@ -607,7 +603,6 @@ rustc_queries! {
607603 /// details, particularly on the modifiers.
608604 query check_representability_adt_ty( key: Ty <' tcx>) {
609605 desc { "checking if `{}` is representable" , key }
610- cycle_delay_bug
611606 anon
612607 }
613608
@@ -1052,7 +1047,6 @@ rustc_queries! {
10521047 desc { "computing the variances of `{}`" , tcx. def_path_str( def_id) }
10531048 cache_on_disk_if { def_id. is_local( ) }
10541049 separate_provide_extern
1055- cycle_delay_bug
10561050 }
10571051
10581052 /// Gets a map with the inferred outlives-predicates of every item in the local crate.
@@ -1185,7 +1179,6 @@ rustc_queries! {
11851179 desc { "computing function signature of `{}`" , tcx. def_path_str( key) }
11861180 cache_on_disk_if { key. is_local( ) }
11871181 separate_provide_extern
1188- cycle_delay_bug
11891182 }
11901183
11911184 /// Performs lint checking for the module.
@@ -1776,8 +1769,6 @@ rustc_queries! {
17761769 ) -> Result <ty:: layout:: TyAndLayout <' tcx>, & ' tcx ty:: layout:: LayoutError <' tcx>> {
17771770 depth_limit
17781771 desc { "computing layout of `{}`" , key. value }
1779- // we emit our own error during query cycle handling
1780- cycle_delay_bug
17811772 }
17821773
17831774 /// Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers.
0 commit comments