Skip to content

Conversation

@Zalathar
Copy link
Member

In #101303, the handle_cycle_error field was changed from a macro-generated closure to a macro-selected enum variant. But it was not renamed to reflect the fact that it now holds data, not code.

Renaming the field and its associated enum to cycle_error_handling: CycleErrorHandling should make the relevant code less confusing to read.

This PR also moves the enum out of rustc_query_system::error, where it was easily confused with diagnostic structs.

There should be no change to compiler behaviour.

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 23, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 23, 2026

r? @chenyukang

rustbot has assigned @chenyukang.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Zalathar Zalathar force-pushed the cycle-error-handling branch from 9599759 to ff331d2 Compare January 23, 2026 02:58
@Kivooeo
Copy link
Member

Kivooeo commented Jan 23, 2026

sounds reasonable to me

r? me

@bors r+ rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 23, 2026

📌 Commit ff331d2 has been approved by Kivooeo

It is now in the queue for this repository.

@rustbot rustbot assigned Kivooeo and unassigned chenyukang Jan 23, 2026
@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jan 23, 2026
rust-bors bot pushed a commit that referenced this pull request Jan 23, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #149639 (inline constant localized typeck constraint computation)
 - #150780 (Add -Z large-data-threshold)
 - #151520 (Rename `HandleCycleError` to `CycleErrorHandling`)
 - #151525 (update enzyme, includes an extra patch to fix MacOS builds in CI)
 - #151527 (Clean up or resolve cfg-related instances of `FIXME(f16_f128)`)

r? @ghost
@rust-bors rust-bors bot merged commit 730591c into rust-lang:main Jan 23, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 23, 2026
rust-timer added a commit that referenced this pull request Jan 23, 2026
Rollup merge of #151520 - Zalathar:cycle-error-handling, r=Kivooeo

Rename `HandleCycleError` to `CycleErrorHandling`

In #101303, the `handle_cycle_error` field was changed from a macro-generated closure to a macro-selected enum variant. But it was not renamed to reflect the fact that it now holds data, not code.

Renaming the field and its associated enum to `cycle_error_handling: CycleErrorHandling` should make the relevant code less confusing to read.

This PR also moves the enum out of `rustc_query_system::error`, where it was easily confused with diagnostic structs.

There should be no change to compiler behaviour.
@Zalathar Zalathar deleted the cycle-error-handling branch January 23, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants