Change value_from_cycle_error signature.#153707
Open
nnethercote wants to merge 2 commits intorust-lang:mainfrom
Open
Change value_from_cycle_error signature.#153707nnethercote wants to merge 2 commits intorust-lang:mainfrom
value_from_cycle_error signature.#153707nnethercote wants to merge 2 commits intorust-lang:mainfrom
Conversation
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.
Collaborator
|
|
Collaborator
|
This was referenced Mar 11, 2026
|
|
||
| vtables.check_representability.value_from_cycle_error = | ||
| |tcx, cycle, guar| check_representability(tcx, cycle, guar); | ||
| |tcx, cycle, _err| check_representability(tcx, cycle); |
Contributor
There was a problem hiding this comment.
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?
Contributor
Author
There was a problem hiding this comment.
check_representability emits its own error and then aborts. We could do err.delay_as_bug(), but it has no effect.
Contributor
|
☔ The latest upstream changes (presumably #153741) made this pull request unmergeable. Please resolve the merge conflicts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR removes the
cycle_*query modifiers andCycleErrorHandling. Details in individual commits.r? @Zalathar