Skip to content

Change value_from_cycle_error signature.#153707

Open
nnethercote wants to merge 2 commits intorust-lang:mainfrom
nnethercote:rm-CycleErrorHandling
Open

Change value_from_cycle_error signature.#153707
nnethercote wants to merge 2 commits intorust-lang:mainfrom
nnethercote:rm-CycleErrorHandling

Conversation

@nnethercote
Copy link
Contributor

This PR removes the cycle_* query modifiers and CycleErrorHandling. Details in individual commits.

r? @Zalathar

Its last meaningful uses were removed in rust-lang#153493.
Currently if a cycle error occurs the error is created, then handled
according to `CycleErrorHandling` (which comes from the `cycle_*` query
modifers), and then `value_from_cycle_error` is called.

This commit changes things so the error is created and then just passed
to `value_from_cycle_error`. This gives `value_from_cycle_error` full
control over how it's handled, eliminating the need for
`CycleErrorHandling`. This makes things simpler overall.
@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 Mar 11, 2026
@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2026

Zalathar is not on the review rotation at the moment.
They may take a while to respond.

@rustbot
Copy link
Collaborator

rustbot commented Mar 11, 2026

⚠️ Warning ⚠️

  • There are issue links (such as #123) in the commit messages of the following commits.
    Please move them to the PR description, to avoid spamming the issues with references to the commit, and so this bot can automatically canonicalize them to avoid issues with subtree.


vtables.check_representability.value_from_cycle_error =
|tcx, cycle, guar| check_representability(tcx, cycle, guar);
|tcx, cycle, _err| check_representability(tcx, cycle);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error is not consumed here, what happens if it's just dropped?
If check_representability is guaranteed to report something, then perhaps it would be reasonable to do err.delay_as_bug() here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_representability emits its own error and then aborts. We could do err.delay_as_bug(), but it has no effect.

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 12, 2026

☔ The latest upstream changes (presumably #153741) made this pull request unmergeable. Please resolve the merge conflicts.

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-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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants