Conversation
This comment has been minimized.
This comment has been minimized.
kn1g78
marked this pull request as ready for review
September 17, 2026 11:01
Collaborator
|
r? @wesleywiser rustbot has assigned @wesleywiser. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Contributor
|
☔ The latest upstream changes (presumably #163111) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
This branch has not been deployed
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.
Fix the ordering of stashed diagnostics when one of them is stolen.
stashed_diagnosticsis an order-preserving map. However, the diagnosticstealing helpers currently use
swap_remove, which moves the last entryinto the position of the removed entry.
As a result, stealing a diagnostic can unexpectedly reorder the remaining
stashed diagnostics.
Use
shift_removeinstead, which removes the requested entry whilepreserving the order of all remaining entries.
Add a regression test covering this behavior by stashing diagnostics
A,B, andC, stealingA, and verifying that the remainingdiagnostics are emitted in the original order: