bootstrap: Inline the is_tool check for setting -Zforce-unstable-if-unmarked#152686
Open
Zalathar wants to merge 1 commit intorust-lang:mainfrom
Open
bootstrap: Inline the is_tool check for setting -Zforce-unstable-if-unmarked#152686Zalathar wants to merge 1 commit intorust-lang:mainfrom
is_tool check for setting -Zforce-unstable-if-unmarked#152686Zalathar wants to merge 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
r? @jieyouxu rustbot has assigned @jieyouxu. Use Why was this reviewer chosen?The reviewer was selected based on:
|
Member
Author
|
jieyouxu
approved these changes
Feb 16, 2026
Member
Author
|
@bors r=jieyouxu rollup |
Contributor
jhpratt
added a commit
to jhpratt/rust
that referenced
this pull request
Feb 16, 2026
bootstrap: Inline the `is_tool` check for setting `-Zforce-unstable-if-unmarked` `Mode::is_tool` is the sort of method that looks general-purpose, but is only actually used for a very specific purpose, to control the setting of `-Zforce-unstable-if-unmarked`. It is therefore clearer to inline the mode check, which makes it easier to see how the condition affects the result. I have tried to add some comments explaining why we set that flag, but they are based on my own recent investigations, so I'm not 100% confident that they're accurate.
rust-bors bot
pushed a commit
that referenced
this pull request
Feb 16, 2026
Rollup of 4 pull requests Successful merges: - #152103 (Consider captures to be used by closures that unwind) - #152474 (Implement opt-bisect-limit for MIR) - #152648 (Remove timing assertion from `oneshot::send_before_recv_timeout`) - #152686 (bootstrap: Inline the `is_tool` check for setting `-Zforce-unstable-if-unmarked`)
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.
Mode::is_toolis the sort of method that looks general-purpose, but is only actually used for a very specific purpose, to control the setting of-Zforce-unstable-if-unmarked.It is therefore clearer to inline the mode check, which makes it easier to see how the condition affects the result.
I have tried to add some comments explaining why we set that flag, but they are based on my own recent investigations, so I'm not 100% confident that they're accurate.