Regeneralize the "-1 for None" change - #160376
Draft
scottmcm wants to merge 1 commit into
Draft
Conversation
This comment has been minimized.
This comment has been minimized.
scottmcm
force-pushed
the
more-minus-one-again
branch
from
August 2, 2026 09:04
71d4b14 to
c568872
Compare
This comment has been minimized.
This comment has been minimized.
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 2, 2026
Regeneralize the "-1 for None" change try-job: aarch64*llvm-21*
This comment was marked as outdated.
This comment was marked as outdated.
scottmcm
force-pushed
the
more-minus-one-again
branch
from
August 2, 2026 16:20
c568872 to
7ca10fc
Compare
This comment has been minimized.
This comment has been minimized.
Member
Author
|
:/
|
This comment has been minimized.
This comment has been minimized.
scottmcm
force-pushed
the
more-minus-one-again
branch
from
August 2, 2026 16:34
7ca10fc to
0e8bca9
Compare
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot)Important For more information how to resolve CI failures of this job, visit this link. |
Member
Author
|
@bors try jobs=aarch64llvm-21 |
This comment has been minimized.
This comment has been minimized.
rust-bors Bot
pushed a commit
that referenced
this pull request
Aug 2, 2026
Regeneralize the "-1 for None" change try-job: aarch64*llvm-21*
Collaborator
|
The job Click to see the possible cause of the failure (guessed by this bot) |
Contributor
|
💔 Test for 84c2f57 failed: CI. Failed jobs:
|
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.
Not planning on un-drafting this until after #158734 lands.
The "prefer the smaller magnitude" change (#155473) had been applied pretty narrowly: just to option-like niches and just to non-bool-like values. But now that llvm/llvm-project#208611 has been fixed, let's apply it more generally.
In doing so I ended up pretty substantially restructuring the function. I also greatly expanded the comments and added unit tests for it so it's easier to exercise all the paths (and much quicker than rebuilding all of rustc). I made sure to keep the previous "try to keep zero available for None" cleverness, however.
Or, if you prefer, this is contradicting the old comment in the code that
🙂