Skip to content

Suggest pattern tests when modifying exhaustiveness #120763

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 11, 2024

Conversation

Nadrieril
Copy link
Member

The vast majority of exhaustiveness tests are in tests/ui/pattern, this is what I've been using for years. This PR is me telling x suggest about that.

cc @Ezrashaw

@rustbot
Copy link
Collaborator

rustbot commented Feb 8, 2024

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 8, 2024
@Mark-Simulacrum
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Feb 11, 2024

📌 Commit 2b95b68 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors 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 11, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 11, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#117740 (Add some links and minor explanatory comments to `std::fmt`)
 - rust-lang#118307 (Remove an unneeded helper from the tuple library code)
 - rust-lang#119242 (Suggest less bug-prone construction of Duration in docs)
 - rust-lang#119449 (Fix `clippy::correctness` in the library)
 - rust-lang#120307 (core: add Duration constructors)
 - rust-lang#120459 (Document various I/O descriptor/handle conversions)
 - rust-lang#120729 (Update mdbook to 0.4.37)
 - rust-lang#120763 (Suggest pattern tests when modifying exhaustiveness)
 - rust-lang#120906 (Remove myself from some review rotations)
 - rust-lang#120916 (Subtree update of ` rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 11, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#117740 (Add some links and minor explanatory comments to `std::fmt`)
 - rust-lang#118307 (Remove an unneeded helper from the tuple library code)
 - rust-lang#119242 (Suggest less bug-prone construction of Duration in docs)
 - rust-lang#119449 (Fix `clippy::correctness` in the library)
 - rust-lang#120307 (core: add Duration constructors)
 - rust-lang#120459 (Document various I/O descriptor/handle conversions)
 - rust-lang#120729 (Update mdbook to 0.4.37)
 - rust-lang#120763 (Suggest pattern tests when modifying exhaustiveness)
 - rust-lang#120906 (Remove myself from some review rotations)
 - rust-lang#120916 (Subtree update of ` rust-analyzer`)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 040ecbf into rust-lang:master Feb 11, 2024
@rustbot rustbot added this to the 1.78.0 milestone Feb 11, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 11, 2024
Rollup merge of rust-lang#120763 - Nadrieril:suggest-patterns, r=Mark-Simulacrum

Suggest pattern tests when modifying exhaustiveness

The vast majority of exhaustiveness tests are in `tests/ui/pattern`, this is what I've been using for years. This PR is me telling `x suggest` about that.

cc `@Ezrashaw`
@Nadrieril Nadrieril deleted the suggest-patterns branch February 11, 2024 18:25
@jieyouxu jieyouxu mentioned this pull request Jul 12, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 15, 2025
…lacrum

Drop `./x suggest`

This PR removes the current `./x suggest` implementation (rust-lang#109933, rust-lang#106249) and associated docs for several reasons:

1. Primarily, `./x suggest` is another "flow" in bootstrap that incurs extra complexity and more invariants that bootstrap has to maintain. This causes more friction when trying to investigate and fix staging problems. As far as I know, this flow has not been actively maintained in quite a while, and I'm not aware of interest in maintaining it. Bootstrap really could use less implementation complexity with a very limited maintenance bandwidth.
2. The current `./x suggest` implementation "bypasses" the usual stage defaults for the various check/build/test/etc. flows, and it's not really possible to have a stage default because `./x suggest --run` produces a *sequence* of suggestions like [`./x check`, `./x test library/std`, ..] and then tries to run all of them in sequence, based on which files are modified.
3. We've not seen a lot of interest both in using it or extending static/dynamic test suggestions. Last extensions were rust-lang#117961 and rust-lang#120763. I'm not convinced the extra implementation complexity is worth it. This was discussed in:
    - [#t-infra/bootstrap > Dropping the current &rust-lang#96;./x suggest&rust-lang#96; flow implementation](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Dropping.20the.20current.20.60.2E.2Fx.20suggest.60.20flow.20implementation/with/527456699)
    - [#t-compiler > Dropping current &rust-lang#96;./x suggest&rust-lang#96; implementation](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Dropping.20current.20.60.2E.2Fx.20suggest.60.20implementation/with/527528696)

Closes rust-lang#109933 (the current implementation is being removed).
Closes rust-lang#143569 (by removing `./x suggest` altogether).
samueltardieu added a commit to samueltardieu/rust that referenced this pull request Jul 15, 2025
…lacrum

Drop `./x suggest`

This PR removes the current `./x suggest` implementation (rust-lang#109933, rust-lang#106249) and associated docs for several reasons:

1. Primarily, `./x suggest` is another "flow" in bootstrap that incurs extra complexity and more invariants that bootstrap has to maintain. This causes more friction when trying to investigate and fix staging problems. As far as I know, this flow has not been actively maintained in quite a while, and I'm not aware of interest in maintaining it. Bootstrap really could use less implementation complexity with a very limited maintenance bandwidth.
2. The current `./x suggest` implementation "bypasses" the usual stage defaults for the various check/build/test/etc. flows, and it's not really possible to have a stage default because `./x suggest --run` produces a *sequence* of suggestions like [`./x check`, `./x test library/std`, ..] and then tries to run all of them in sequence, based on which files are modified.
3. We've not seen a lot of interest both in using it or extending static/dynamic test suggestions. Last extensions were rust-lang#117961 and rust-lang#120763. I'm not convinced the extra implementation complexity is worth it. This was discussed in:
    - [#t-infra/bootstrap > Dropping the current &rust-lang#96;./x suggest&rust-lang#96; flow implementation](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Dropping.20the.20current.20.60.2E.2Fx.20suggest.60.20flow.20implementation/with/527456699)
    - [#t-compiler > Dropping current &rust-lang#96;./x suggest&rust-lang#96; implementation](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Dropping.20current.20.60.2E.2Fx.20suggest.60.20implementation/with/527528696)

Closes rust-lang#109933 (the current implementation is being removed).
Closes rust-lang#143569 (by removing `./x suggest` altogether).
rust-timer added a commit that referenced this pull request Jul 15, 2025
Rollup merge of #143630 - jieyouxu:drop-suggest, r=Mark-Simulacrum

Drop `./x suggest`

This PR removes the current `./x suggest` implementation (#109933, #106249) and associated docs for several reasons:

1. Primarily, `./x suggest` is another "flow" in bootstrap that incurs extra complexity and more invariants that bootstrap has to maintain. This causes more friction when trying to investigate and fix staging problems. As far as I know, this flow has not been actively maintained in quite a while, and I'm not aware of interest in maintaining it. Bootstrap really could use less implementation complexity with a very limited maintenance bandwidth.
2. The current `./x suggest` implementation "bypasses" the usual stage defaults for the various check/build/test/etc. flows, and it's not really possible to have a stage default because `./x suggest --run` produces a *sequence* of suggestions like [`./x check`, `./x test library/std`, ..] and then tries to run all of them in sequence, based on which files are modified.
3. We've not seen a lot of interest both in using it or extending static/dynamic test suggestions. Last extensions were #117961 and #120763. I'm not convinced the extra implementation complexity is worth it. This was discussed in:
    - [#t-infra/bootstrap > Dropping the current `./x suggest` flow implementation](https://rust-lang.zulipchat.com/#narrow/channel/326414-t-infra.2Fbootstrap/topic/Dropping.20the.20current.20.60.2E.2Fx.20suggest.60.20flow.20implementation/with/527456699)
    - [#t-compiler > Dropping current `./x suggest` implementation](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Dropping.20current.20.60.2E.2Fx.20suggest.60.20implementation/with/527528696)

Closes #109933 (the current implementation is being removed).
Closes #143569 (by removing `./x suggest` altogether).
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants