Skip to content

Commit cfc9ad7

Browse files
committed
Rename the cycle_delay_bug modifier as cycle_delayed_bug.
Because "delayed bug" is the correct term used everywhere else, e.g. `Level::DelayedBug`, `DiagCtxtHandle::delayed_bug`.
1 parent c7b206b commit cfc9ad7

5 files changed

Lines changed: 19 additions & 19 deletions

File tree

compiler/rustc_macros/src/query.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ struct QueryModifiers {
143143
anon: Option<Ident>,
144144
arena_cache: Option<Ident>,
145145
cache_on_disk_if: Option<CacheOnDiskIf>,
146-
cycle_delay_bug: Option<Ident>,
146+
cycle_delayed_bug: Option<Ident>,
147147
cycle_stash: Option<Ident>,
148148
depth_limit: Option<Ident>,
149149
desc: Desc,
@@ -158,7 +158,7 @@ fn parse_query_modifiers(input: ParseStream<'_>) -> Result<QueryModifiers> {
158158
let mut arena_cache = None;
159159
let mut cache_on_disk_if = None;
160160
let mut desc = None;
161-
let mut cycle_delay_bug = None;
161+
let mut cycle_delayed_bug = None;
162162
let mut cycle_stash = None;
163163
let mut no_hash = None;
164164
let mut anon = None;
@@ -193,8 +193,8 @@ fn parse_query_modifiers(input: ParseStream<'_>) -> Result<QueryModifiers> {
193193
try_insert!(cache_on_disk_if = CacheOnDiskIf { modifier, block });
194194
} else if modifier == "arena_cache" {
195195
try_insert!(arena_cache = modifier);
196-
} else if modifier == "cycle_delay_bug" {
197-
try_insert!(cycle_delay_bug = modifier);
196+
} else if modifier == "cycle_delayed_bug" {
197+
try_insert!(cycle_delayed_bug = modifier);
198198
} else if modifier == "cycle_stash" {
199199
try_insert!(cycle_stash = modifier);
200200
} else if modifier == "no_hash" {
@@ -220,7 +220,7 @@ fn parse_query_modifiers(input: ParseStream<'_>) -> Result<QueryModifiers> {
220220
arena_cache,
221221
cache_on_disk_if,
222222
desc,
223-
cycle_delay_bug,
223+
cycle_delayed_bug,
224224
cycle_stash,
225225
no_hash,
226226
anon,
@@ -256,7 +256,7 @@ fn make_modifiers_stream(query: &Query) -> proc_macro2::TokenStream {
256256
anon,
257257
arena_cache,
258258
cache_on_disk_if,
259-
cycle_delay_bug,
259+
cycle_delayed_bug,
260260
cycle_stash,
261261
depth_limit,
262262
desc: _,
@@ -271,8 +271,8 @@ fn make_modifiers_stream(query: &Query) -> proc_macro2::TokenStream {
271271
let arena_cache = arena_cache.is_some();
272272
let cache_on_disk = cache_on_disk_if.is_some();
273273

274-
let cycle_error_handling = if cycle_delay_bug.is_some() {
275-
quote! { DelayBug }
274+
let cycle_error_handling = if cycle_delayed_bug.is_some() {
275+
quote! { DelayedBug }
276276
} else if cycle_stash.is_some() {
277277
quote! { Stash }
278278
} else {
@@ -411,7 +411,7 @@ fn add_to_analyzer_stream(query: &Query, analyzer_stream: &mut proc_macro2::Toke
411411

412412
doc_link!(
413413
arena_cache,
414-
cycle_delay_bug,
414+
cycle_delayed_bug,
415415
cycle_stash,
416416
no_hash,
417417
anon,

compiler/rustc_middle/src/queries.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
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.
35+
//! - `cycle_delayed_bug`: If a dependency cycle is detected, emit a delayed bug instead of aborting immediately.
3636
//! - `cycle_stash`: If a dependency cycle is detected, stash the error for later handling.
3737
//! - `no_hash`: Do not hash the query result for incremental compilation; just mark as dirty if recomputed.
3838
//! - `anon`: Make the query anonymous in the dependency graph (no dep node is created).
@@ -595,7 +595,7 @@ rustc_queries! {
595595
// `Representability` will print a custom error about the infinite size and then abort
596596
// compilation. (In the past we recovered and continued, but in practice that leads to
597597
// confusing subsequent error messages about cycles that then abort.)
598-
cycle_delay_bug
598+
cycle_delayed_bug
599599
// We don't want recursive representability calls to be forced with
600600
// incremental compilation because, if a cycle occurs, we need the
601601
// entire cycle to be in memory for diagnostics. This means we can't
@@ -607,7 +607,7 @@ rustc_queries! {
607607
/// details, particularly on the modifiers.
608608
query check_representability_adt_ty(key: Ty<'tcx>) -> rustc_middle::ty::Representability {
609609
desc { "checking if `{}` is representable", key }
610-
cycle_delay_bug
610+
cycle_delayed_bug
611611
anon
612612
}
613613

@@ -1052,7 +1052,7 @@ rustc_queries! {
10521052
desc { "computing the variances of `{}`", tcx.def_path_str(def_id) }
10531053
cache_on_disk_if { def_id.is_local() }
10541054
separate_provide_extern
1055-
cycle_delay_bug
1055+
cycle_delayed_bug
10561056
}
10571057

10581058
/// Gets a map with the inferred outlives-predicates of every item in the local crate.
@@ -1185,7 +1185,7 @@ rustc_queries! {
11851185
desc { "computing function signature of `{}`", tcx.def_path_str(key) }
11861186
cache_on_disk_if { key.is_local() }
11871187
separate_provide_extern
1188-
cycle_delay_bug
1188+
cycle_delayed_bug
11891189
}
11901190

11911191
/// Performs lint checking for the module.
@@ -1777,7 +1777,7 @@ rustc_queries! {
17771777
depth_limit
17781778
desc { "computing layout of `{}`", key.value }
17791779
// we emit our own error during query cycle handling
1780-
cycle_delay_bug
1780+
cycle_delayed_bug
17811781
}
17821782

17831783
/// Compute a `FnAbi` suitable for indirect calls, i.e. to `fn` pointers.

compiler/rustc_middle/src/query/modifiers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ pub(crate) struct arena_cache;
2323
/// Cache the query to disk if the `Block` returns true.
2424
pub(crate) struct cache_on_disk_if;
2525

26-
/// # `cycle_delay_bug` query modifier
26+
/// # `cycle_delayed_bug` query modifier
2727
///
2828
/// A cycle error results in a delay_bug call
29-
pub(crate) struct cycle_delay_bug;
29+
pub(crate) struct cycle_delayed_bug;
3030

3131
/// # `cycle_stash` query modifier
3232
///

compiler/rustc_middle/src/query/plumbing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub enum ActiveKeyStatus<'tcx> {
5757
#[derive(Copy, Clone)]
5858
pub enum CycleErrorHandling {
5959
Error,
60-
DelayBug,
60+
DelayedBug,
6161
Stash,
6262
}
6363

compiler/rustc_query_impl/src/execution.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ fn mk_cycle<'tcx, C: QueryCache>(
131131
let guar = error.emit();
132132
(query.value_from_cycle_error)(tcx, cycle_error, guar)
133133
}
134-
CycleErrorHandling::DelayBug => {
134+
CycleErrorHandling::DelayedBug => {
135135
let guar = error.delay_as_bug();
136136
(query.value_from_cycle_error)(tcx, cycle_error, guar)
137137
}

0 commit comments

Comments
 (0)