Skip to content

bootstrap: Inline the is_tool check for setting -Zforce-unstable-if-unmarked#152686

Open
Zalathar wants to merge 1 commit intorust-lang:mainfrom
Zalathar:force-unstable
Open

bootstrap: Inline the is_tool check for setting -Zforce-unstable-if-unmarked#152686
Zalathar wants to merge 1 commit intorust-lang:mainfrom
Zalathar:force-unstable

Conversation

@Zalathar
Copy link
Member

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.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 16, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 16, 2026

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789, jieyouxu

@Zalathar
Copy link
Member Author

Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks, r=me after PR CI is green

View changes since this review

@Zalathar
Copy link
Member Author

@bors r=jieyouxu rollup

@rust-bors
Copy link
Contributor

rust-bors bot commented Feb 16, 2026

📌 Commit f1664ac has been approved by jieyouxu

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 16, 2026
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`)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants