Skip to content

use custom Exhaustive enum instead of bool#157211

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
folkertdev:mir-build-refutable-flag
May 31, 2026
Merged

use custom Exhaustive enum instead of bool#157211
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
folkertdev:mir-build-refutable-flag

Conversation

@folkertdev
Copy link
Copy Markdown
Contributor

@folkertdev folkertdev commented May 31, 2026

Small cleanup, boolean blindness and all that.

I'm not totally sure about where to put the RefutableFlag enum, but the current place seemed fine.

r? Nadrieril (based on pattern match desugaring expertise)

@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 31, 2026

Some changes occurred in match checking

cc @Nadrieril

Some changes occurred in match lowering

cc @Nadrieril

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels May 31, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented May 31, 2026

Nadrieril is currently at their maximum review capacity.
They may take a while to respond.

Comment thread compiler/rustc_mir_build/src/thir/pattern/mod.rs Outdated
@folkertdev folkertdev force-pushed the mir-build-refutable-flag branch from 223dc3a to 51b95c9 Compare May 31, 2026 19:10
@folkertdev folkertdev changed the title use RefutableFlag instead of bool use custom Exhaustive enum instead of bool May 31, 2026
@Nadrieril
Copy link
Copy Markdown
Member

Nice, our discussion is the perfect proof that that boolean was confusing x) Ty!

@bors r+ rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented May 31, 2026

📌 Commit 51b95c9 has been approved by Nadrieril

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 May 31, 2026
@rust-log-analyzer
Copy link
Copy Markdown
Collaborator

The job x86_64-gnu-tools failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
...............................F.................. (50/143)
.................................................. (100/143)
...........................................        (143/143)

======== tests/rustdoc-gui/go-to-collapsed-elem.goml ========

[ERROR] line 25
    at `tests/rustdoc-gui/go-to-collapsed-elem.goml` line 21: Error: Node is detached from document: for command `click: "//*[@id='search']//a[@href='../test_docs/struct.Foo.html#method.must_use']"`
    at <file:///checkout/obj/build/x86_64-unknown-linux-gnu/test/rustdoc-gui/doc/test_docs/struct.Foo.html?search=t_use>


<= doc-ui tests done: 142 succeeded, 1 failed, 0 filtered out

Error: ()

@Nadrieril
Copy link
Copy Markdown
Member

Oops I keep forgetting that bors doesn't wait for try jobs >< This looks quite spurious tho, will see what the rollup reports

rust-bors Bot pushed a commit that referenced this pull request May 31, 2026
Rollup of 4 pull requests

Successful merges:

 - #157192 (directory handles: add Dir::metadata)
 - #157171 ( rustdoc: Separate the caches for synthetic auto trait & blanket impls)
 - #157185 (Don't lower `inner_span` multiple times)
 - #157211 (use custom `Exhaustive` enum instead of `bool`)
@rust-bors rust-bors Bot merged commit 0b67323 into rust-lang:main May 31, 2026
7 of 12 checks passed
rust-timer added a commit that referenced this pull request May 31, 2026
Rollup merge of #157211 - folkertdev:mir-build-refutable-flag, r=Nadrieril

use custom `Exhaustive` enum instead of `bool`

Small cleanup, boolean blindness and all that.

I'm not totally sure about where to put the `RefutableFlag` enum, but the current place seemed fine.

r? Nadrieril (based on pattern match desugaring expertise)
@rustbot rustbot added this to the 1.98.0 milestone May 31, 2026
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-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants