Skip to content

Commit f0a1104

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 d2218f5 commit f0a1104

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_fatal: Option<Ident>,
148148
cycle_stash: Option<Ident>,
149149
depth_limit: Option<Ident>,
@@ -161,7 +161,7 @@ fn parse_query_modifiers(input: ParseStream<'_>) -> Result<QueryModifiers> {
161161
let mut cache_on_disk_if = None;
162162
let mut desc = None;
163163
let mut cycle_fatal = None;
164-
let mut cycle_delay_bug = None;
164+
let mut cycle_delayed_bug = None;
165165
let mut cycle_stash = None;
166166
let mut no_hash = None;
167167
let mut anon = None;
@@ -199,8 +199,8 @@ fn parse_query_modifiers(input: ParseStream<'_>) -> Result<QueryModifiers> {
199199
try_insert!(arena_cache = modifier);
200200
} else if modifier == "cycle_fatal" {
201201
try_insert!(cycle_fatal = modifier);
202-
} else if modifier == "cycle_delay_bug" {
203-
try_insert!(cycle_delay_bug = modifier);
202+
} else if modifier == "cycle_delayed_bug" {
203+
try_insert!(cycle_delayed_bug = modifier);
204204
} else if modifier == "cycle_stash" {
205205
try_insert!(cycle_stash = modifier);
206206
} else if modifier == "no_hash" {
@@ -229,7 +229,7 @@ fn parse_query_modifiers(input: ParseStream<'_>) -> Result<QueryModifiers> {
229229
cache_on_disk_if,
230230
desc,
231231
cycle_fatal,
232-
cycle_delay_bug,
232+
cycle_delayed_bug,
233233
cycle_stash,
234234
no_hash,
235235
anon,
@@ -247,7 +247,7 @@ fn make_modifiers_stream(query: &Query, modifiers: &QueryModifiers) -> proc_macr
247247
anon,
248248
arena_cache,
249249
cache_on_disk_if,
250-
cycle_delay_bug,
250+
cycle_delayed_bug,
251251
cycle_fatal,
252252
cycle_stash,
253253
depth_limit,
@@ -264,8 +264,8 @@ fn make_modifiers_stream(query: &Query, modifiers: &QueryModifiers) -> proc_macr
264264
let arena_cache = arena_cache.is_some();
265265
let cache_on_disk = cache_on_disk_if.is_some();
266266

267-
let cycle_error_handling = if cycle_delay_bug.is_some() {
268-
quote! { DelayBug }
267+
let cycle_error_handling = if cycle_delayed_bug.is_some() {
268+
quote! { DelayedBug }
269269
} else if cycle_fatal.is_some() {
270270
quote! { Fatal }
271271
} else if cycle_stash.is_some() {
@@ -408,7 +408,7 @@ fn add_to_analyzer_stream(query: &Query, analyzer_stream: &mut proc_macro2::Toke
408408
doc_link!(
409409
arena_cache,
410410
cycle_fatal,
411-
cycle_delay_bug,
411+
cycle_delayed_bug,
412412
cycle_stash,
413413
no_hash,
414414
anon,

compiler/rustc_middle/src/queries.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
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`.
3535
//! - `cycle_fatal`: If a dependency cycle is detected, abort compilation with a fatal error.
36-
//! - `cycle_delay_bug`: If a dependency cycle is detected, emit a delayed bug instead of aborting immediately.
36+
//! - `cycle_delayed_bug`: If a dependency cycle is detected, emit a delayed bug instead of aborting immediately.
3737
//! - `cycle_stash`: If a dependency cycle is detected, stash the error for later handling.
3838
//! - `no_hash`: Do not hash the query result for incremental compilation; just mark as dirty if recomputed.
3939
//! - `anon`: Make the query anonymous in the dependency graph (no dep node is created).
@@ -596,7 +596,7 @@ rustc_queries! {
596596
query representability(key: LocalDefId) -> rustc_middle::ty::Representability {
597597
desc { "checking if `{}` is representable", tcx.def_path_str(key) }
598598
// infinitely sized types will cause a cycle
599-
cycle_delay_bug
599+
cycle_delayed_bug
600600
// we don't want recursive representability calls to be forced with
601601
// incremental compilation because, if a cycle occurs, we need the
602602
// entire cycle to be in memory for diagnostics
@@ -606,7 +606,7 @@ rustc_queries! {
606606
/// An implementation detail for the `representability` query
607607
query representability_adt_ty(key: Ty<'tcx>) -> rustc_middle::ty::Representability {
608608
desc { "checking if `{}` is representable", key }
609-
cycle_delay_bug
609+
cycle_delayed_bug
610610
anon
611611
}
612612

@@ -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.
@@ -1186,7 +1186,7 @@ rustc_queries! {
11861186
desc { "computing function signature of `{}`", tcx.def_path_str(key) }
11871187
cache_on_disk_if { key.is_local() }
11881188
separate_provide_extern
1189-
cycle_delay_bug
1189+
cycle_delayed_bug
11901190
}
11911191

11921192
/// Performs lint checking for the module.
@@ -1788,7 +1788,7 @@ rustc_queries! {
17881788
depth_limit
17891789
desc { "computing layout of `{}`", key.value }
17901790
// we emit our own error during query cycle handling
1791-
cycle_delay_bug
1791+
cycle_delayed_bug
17921792
}
17931793

17941794
/// 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_fatal` query modifier
3232
///

compiler/rustc_middle/src/query/plumbing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub enum ActiveKeyStatus<'tcx> {
5858
pub enum CycleErrorHandling {
5959
Error,
6060
Fatal,
61-
DelayBug,
61+
DelayedBug,
6262
Stash,
6363
}
6464

compiler/rustc_query_impl/src/execution.rs

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

0 commit comments

Comments
 (0)