Skip to content

Conversation

GuillaumeGomez
Copy link
Member

@Nadrieril suggested that it could be interesting to suggest to users when a match is too complex and that they should try to simplify it.

The goal here is to find a threeshold where we will emit a warning suggesting to simplify a match. To do so, we'll run a crater run first and advise what to do from there.

Currently the PR SHOULD NOT be merged as is and SHOULD NOT panic.

r? @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 Mar 4, 2024
@rustbot
Copy link
Collaborator

rustbot commented Mar 4, 2024

Some changes occurred in exhaustiveness checking

cc @Nadrieril

@Nadrieril Nadrieril changed the title WIP: emit a warning if a match is too complex crater: emit a warning if a match is too complex Mar 4, 2024
@GuillaumeGomez GuillaumeGomez changed the title crater: emit a warning if a match is too complex [DO NOT MERGE] crater: emit a warning if a match is too complex Mar 4, 2024
@Nadrieril
Copy link
Member

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 4, 2024
…atch, r=<try>

[DO NOT MERGE] crater: emit a warning if a `match` is too complex

`@Nadrieril` suggested that it could be interesting to suggest to users when a `match` is too complex and that they should try to simplify it.

The goal here is to find a threeshold where we will emit a warning suggesting to simplify a `match`. To do so, we'll run a crater run first and advise what to do from there.

Currently the PR SHOULD NOT be merged as is and SHOULD NOT panic.

r? `@Nadrieril`
@bors
Copy link
Collaborator

bors commented Mar 4, 2024

⌛ Trying commit 7d43f33 with merge ae97362...

@bors
Copy link
Collaborator

bors commented Mar 4, 2024

☀️ Try build successful - checks-actions
Build commit: ae97362 (ae973628c64ab60398819bcc1fd9f08ae68ad5b5)

@Nadrieril
Copy link
Member

@craterbot run mode=check-only

@craterbot
Copy link
Collaborator

👌 Experiment pr-121979 created and queued.
🤖 Automatically detected try build ae97362
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 4, 2024
@matthiaskrgr matthiaskrgr added the S-blocked Status: Blocked on something else such as an RFC or other implementation work. label Mar 4, 2024
@craterbot
Copy link
Collaborator

🚧 Experiment pr-121979 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-121979 is completed!
📊 6 regressed and 1 fixed (423303 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Mar 18, 2024
@GuillaumeGomez
Copy link
Member Author

Experiment is a success, we can now turn it into a warning.

@GuillaumeGomez GuillaumeGomez deleted the warning-too-complex-match branch March 18, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants