coretests: Add more pattern tests. - #161596
Merged
Merged
Conversation
Collaborator
|
r? @nia-e rustbot has assigned @nia-e. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This was referenced Aug 23, 2026
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This was referenced Aug 25, 2026
pacak
marked this pull request as draft
August 26, 2026 07:29
pacak
force-pushed
the
more-pat-tests
branch
2 times, most recently
from
August 26, 2026 19:56
39d6d7e to
2da3800
Compare
teor2345
reviewed
Sep 16, 2026
Right now things are undertested and underspecified. Some of the library code would get in a loop if searcher starts returning empty rejects. And there's no tests for backwards multi byte char matchers. Pull request I'm reviving had a problem implementing that, so making sure it's tested before the actual code lands. Right now it is possible to break both tests (and user code) without breaking anything else in the test suite I think.
pacak
force-pushed
the
more-pat-tests
branch
from
September 16, 2026 16:16
2da3800 to
0a1618e
Compare
pacak
marked this pull request as ready for review
September 16, 2026 16:23
teor2345
approved these changes
Sep 16, 2026
Member
|
yep, makes sense. ty! @bors r+ |
Contributor
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Sep 17, 2026
coretests: Add more pattern tests. Right now things are undertested and underspecified. Some of the library code would get in a loop if searcher starts returning empty rejects. And there's no tests for backwards multi byte char matchers. Pull request I'm reviving had a problem implementing that, so making sure it's tested before the actual code lands. Right now it is possible to break both tests (and user code) without breaking anything else in the test suite I think. This commit is extracted from rust-lang#160971 with slight modifications. <!-- start jj-vine stack --> This PR is part of a stack containing 16 PRs: 1. `main` 2. **"coretests: Add more pattern tests." (this PR)** 3. rust-lang#161606 ([Compare](https://github.com/pacak/rust/compare/more-pat-tests..generalize-pattern)) 4. rust-lang#161754 ([Compare](https://github.com/pacak/rust/compare/generalize-pattern..push-qvvokrsvvqww)) 5. rust-lang#161755 ([Compare](https://github.com/pacak/rust/compare/push-qvvokrsvvqww..push-wlxvvvxzrsly)) 6. rust-lang#161756 ([Compare](https://github.com/pacak/rust/compare/push-wlxvvvxzrsly..push-lkvnuzsvuqzt)) 7. rust-lang#161757 ([Compare](https://github.com/pacak/rust/compare/push-lkvnuzsvuqzt..push-wuxtmysppkst)) 8. rust-lang#161758 ([Compare](https://github.com/pacak/rust/compare/push-wuxtmysppkst..push-tnkxmkmykopl)) 9. rust-lang#161759 ([Compare](https://github.com/pacak/rust/compare/push-tnkxmkmykopl..push-umzmopsxmwry)) 10. rust-lang#161760 ([Compare](https://github.com/pacak/rust/compare/push-umzmopsxmwry..push-ptqpwloxpyru)) 11. rust-lang#161761 ([Compare](https://github.com/pacak/rust/compare/push-ptqpwloxpyru..push-rksmzopsvzlk)) 12. rust-lang#161762 ([Compare](https://github.com/pacak/rust/compare/push-rksmzopsvzlk..push-mkxpywoqusmn)) 13. rust-lang#161608 ([Compare](https://github.com/pacak/rust/compare/push-mkxpywoqusmn..flavor-pattern)) 14. rust-lang#161763 ([Compare](https://github.com/pacak/rust/compare/flavor-pattern..push-xoslomrztmly)) 15. rust-lang#161764 ([Compare](https://github.com/pacak/rust/compare/push-xoslomrztmly..push-pqpumynltyml)) 16. rust-lang#161765 ([Compare](https://github.com/pacak/rust/compare/push-pqpumynltyml..push-svrvnxkpuqul)) 17. rust-lang#161610 ([Compare](https://github.com/pacak/rust/compare/push-svrvnxkpuqul..osstr-pattern-tip)) <!-- end jj-vine stack -->
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 17, 2026
Rollup of 12 pull requests Successful merges: - #161596 (coretests: Add more pattern tests.) - #162796 (libtest: do not early exit from test runners) - #162844 (Add loan reachability traces to polonius MIR dumps) - #158186 (Guarantee 8 bytes of alignment of RawWakerVTable) - #160108 (Stabilize `windows_process_extensions_main_thread_handle`) - #160212 (traits: Fix rigid alias liveness matching) - #160544 (Stabilize `feature(trim_prefix_suffix)` (`{str, [T], Path}::trim_prefix` and `{str, [T]}::trim_suffix`)) - #161305 (Use the entire type of a dropped local to compute variance (edge direction) for Polonius alpha) - #161838 (tests: accept LLVM 24 optimization in this test) - #162805 (Add `must_use` lint to `ExitCode`) - #162825 (core: Add examples for `debug_closure_helpers`) - #162856 (Stabilize CommandExt::show_window)
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Sep 17, 2026
coretests: Add more pattern tests. Right now things are undertested and underspecified. Some of the library code would get in a loop if searcher starts returning empty rejects. And there's no tests for backwards multi byte char matchers. Pull request I'm reviving had a problem implementing that, so making sure it's tested before the actual code lands. Right now it is possible to break both tests (and user code) without breaking anything else in the test suite I think. This commit is extracted from rust-lang#160971 with slight modifications. <!-- start jj-vine stack --> This PR is part of a stack containing 16 PRs: 1. `main` 2. **"coretests: Add more pattern tests." (this PR)** 3. rust-lang#161606 ([Compare](https://github.com/pacak/rust/compare/more-pat-tests..generalize-pattern)) 4. rust-lang#161754 ([Compare](https://github.com/pacak/rust/compare/generalize-pattern..push-qvvokrsvvqww)) 5. rust-lang#161755 ([Compare](https://github.com/pacak/rust/compare/push-qvvokrsvvqww..push-wlxvvvxzrsly)) 6. rust-lang#161756 ([Compare](https://github.com/pacak/rust/compare/push-wlxvvvxzrsly..push-lkvnuzsvuqzt)) 7. rust-lang#161757 ([Compare](https://github.com/pacak/rust/compare/push-lkvnuzsvuqzt..push-wuxtmysppkst)) 8. rust-lang#161758 ([Compare](https://github.com/pacak/rust/compare/push-wuxtmysppkst..push-tnkxmkmykopl)) 9. rust-lang#161759 ([Compare](https://github.com/pacak/rust/compare/push-tnkxmkmykopl..push-umzmopsxmwry)) 10. rust-lang#161760 ([Compare](https://github.com/pacak/rust/compare/push-umzmopsxmwry..push-ptqpwloxpyru)) 11. rust-lang#161761 ([Compare](https://github.com/pacak/rust/compare/push-ptqpwloxpyru..push-rksmzopsvzlk)) 12. rust-lang#161762 ([Compare](https://github.com/pacak/rust/compare/push-rksmzopsvzlk..push-mkxpywoqusmn)) 13. rust-lang#161608 ([Compare](https://github.com/pacak/rust/compare/push-mkxpywoqusmn..flavor-pattern)) 14. rust-lang#161763 ([Compare](https://github.com/pacak/rust/compare/flavor-pattern..push-xoslomrztmly)) 15. rust-lang#161764 ([Compare](https://github.com/pacak/rust/compare/push-xoslomrztmly..push-pqpumynltyml)) 16. rust-lang#161765 ([Compare](https://github.com/pacak/rust/compare/push-pqpumynltyml..push-svrvnxkpuqul)) 17. rust-lang#161610 ([Compare](https://github.com/pacak/rust/compare/push-svrvnxkpuqul..osstr-pattern-tip)) <!-- end jj-vine stack -->
Zalathar
added a commit
to Zalathar/rust
that referenced
this pull request
Sep 17, 2026
coretests: Add more pattern tests. Right now things are undertested and underspecified. Some of the library code would get in a loop if searcher starts returning empty rejects. And there's no tests for backwards multi byte char matchers. Pull request I'm reviving had a problem implementing that, so making sure it's tested before the actual code lands. Right now it is possible to break both tests (and user code) without breaking anything else in the test suite I think. This commit is extracted from rust-lang#160971 with slight modifications. <!-- start jj-vine stack --> This PR is part of a stack containing 16 PRs: 1. `main` 2. **"coretests: Add more pattern tests." (this PR)** 3. rust-lang#161606 ([Compare](https://github.com/pacak/rust/compare/more-pat-tests..generalize-pattern)) 4. rust-lang#161754 ([Compare](https://github.com/pacak/rust/compare/generalize-pattern..push-qvvokrsvvqww)) 5. rust-lang#161755 ([Compare](https://github.com/pacak/rust/compare/push-qvvokrsvvqww..push-wlxvvvxzrsly)) 6. rust-lang#161756 ([Compare](https://github.com/pacak/rust/compare/push-wlxvvvxzrsly..push-lkvnuzsvuqzt)) 7. rust-lang#161757 ([Compare](https://github.com/pacak/rust/compare/push-lkvnuzsvuqzt..push-wuxtmysppkst)) 8. rust-lang#161758 ([Compare](https://github.com/pacak/rust/compare/push-wuxtmysppkst..push-tnkxmkmykopl)) 9. rust-lang#161759 ([Compare](https://github.com/pacak/rust/compare/push-tnkxmkmykopl..push-umzmopsxmwry)) 10. rust-lang#161760 ([Compare](https://github.com/pacak/rust/compare/push-umzmopsxmwry..push-ptqpwloxpyru)) 11. rust-lang#161761 ([Compare](https://github.com/pacak/rust/compare/push-ptqpwloxpyru..push-rksmzopsvzlk)) 12. rust-lang#161762 ([Compare](https://github.com/pacak/rust/compare/push-rksmzopsvzlk..push-mkxpywoqusmn)) 13. rust-lang#161608 ([Compare](https://github.com/pacak/rust/compare/push-mkxpywoqusmn..flavor-pattern)) 14. rust-lang#161763 ([Compare](https://github.com/pacak/rust/compare/flavor-pattern..push-xoslomrztmly)) 15. rust-lang#161764 ([Compare](https://github.com/pacak/rust/compare/push-xoslomrztmly..push-pqpumynltyml)) 16. rust-lang#161765 ([Compare](https://github.com/pacak/rust/compare/push-pqpumynltyml..push-svrvnxkpuqul)) 17. rust-lang#161610 ([Compare](https://github.com/pacak/rust/compare/push-svrvnxkpuqul..osstr-pattern-tip)) <!-- end jj-vine stack -->
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 17, 2026
Rollup of 16 pull requests Successful merges: - #161596 (coretests: Add more pattern tests.) - #162796 (libtest: do not early exit from test runners) - #162844 (Add loan reachability traces to polonius MIR dumps) - #162876 (Move operations out of `rustc_middle::query::job`) - #160108 (Stabilize `windows_process_extensions_main_thread_handle`) - #160212 (traits: Fix rigid alias liveness matching) - #160544 (Stabilize `feature(trim_prefix_suffix)` (`{str, [T], Path}::trim_prefix` and `{str, [T]}::trim_suffix`)) - #161246 (Normalize non-rigid aliases in ty_known_to_outlive) - #161305 (Use the entire type of a dropped local to compute variance (edge direction) for Polonius alpha) - #161838 (tests: accept LLVM 24 optimization in this test) - #162805 (Add `must_use` lint to `ExitCode`) - #162825 (core: Add examples for `debug_closure_helpers`) - #162841 (enable asm tests for xtensa targets) - #162842 (reintroduce check RibKind::ConstParamTy did in direct consts) - #162845 (mgca: fix issue with mismatched array valtree/valtree tys) - #162856 (Stabilize CommandExt::show_window)
JonathanBrouwer
added a commit
to JonathanBrouwer/rust
that referenced
this pull request
Sep 17, 2026
coretests: Add more pattern tests. Right now things are undertested and underspecified. Some of the library code would get in a loop if searcher starts returning empty rejects. And there's no tests for backwards multi byte char matchers. Pull request I'm reviving had a problem implementing that, so making sure it's tested before the actual code lands. Right now it is possible to break both tests (and user code) without breaking anything else in the test suite I think. This commit is extracted from rust-lang#160971 with slight modifications. <!-- start jj-vine stack --> This PR is part of a stack containing 16 PRs: 1. `main` 2. **"coretests: Add more pattern tests." (this PR)** 3. rust-lang#161606 ([Compare](https://github.com/pacak/rust/compare/more-pat-tests..generalize-pattern)) 4. rust-lang#161754 ([Compare](https://github.com/pacak/rust/compare/generalize-pattern..push-qvvokrsvvqww)) 5. rust-lang#161755 ([Compare](https://github.com/pacak/rust/compare/push-qvvokrsvvqww..push-wlxvvvxzrsly)) 6. rust-lang#161756 ([Compare](https://github.com/pacak/rust/compare/push-wlxvvvxzrsly..push-lkvnuzsvuqzt)) 7. rust-lang#161757 ([Compare](https://github.com/pacak/rust/compare/push-lkvnuzsvuqzt..push-wuxtmysppkst)) 8. rust-lang#161758 ([Compare](https://github.com/pacak/rust/compare/push-wuxtmysppkst..push-tnkxmkmykopl)) 9. rust-lang#161759 ([Compare](https://github.com/pacak/rust/compare/push-tnkxmkmykopl..push-umzmopsxmwry)) 10. rust-lang#161760 ([Compare](https://github.com/pacak/rust/compare/push-umzmopsxmwry..push-ptqpwloxpyru)) 11. rust-lang#161761 ([Compare](https://github.com/pacak/rust/compare/push-ptqpwloxpyru..push-rksmzopsvzlk)) 12. rust-lang#161762 ([Compare](https://github.com/pacak/rust/compare/push-rksmzopsvzlk..push-mkxpywoqusmn)) 13. rust-lang#161608 ([Compare](https://github.com/pacak/rust/compare/push-mkxpywoqusmn..flavor-pattern)) 14. rust-lang#161763 ([Compare](https://github.com/pacak/rust/compare/flavor-pattern..push-xoslomrztmly)) 15. rust-lang#161764 ([Compare](https://github.com/pacak/rust/compare/push-xoslomrztmly..push-pqpumynltyml)) 16. rust-lang#161765 ([Compare](https://github.com/pacak/rust/compare/push-pqpumynltyml..push-svrvnxkpuqul)) 17. rust-lang#161610 ([Compare](https://github.com/pacak/rust/compare/push-svrvnxkpuqul..osstr-pattern-tip)) <!-- end jj-vine stack -->
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 17, 2026
…uwer Rollup of 24 pull requests Successful merges: - #161596 (coretests: Add more pattern tests.) - #162177 (Properly implement the gpu-kernel ABI for amdgpu) - #162411 (Make Receiver `#[rustc_dyn_incompatible_trait]`) - #162760 (yeet alias new_from_def_id) - #162796 (libtest: do not early exit from test runners) - #162844 (Add loan reachability traces to polonius MIR dumps) - #162876 (Move operations out of `rustc_middle::query::job`) - #160108 (Stabilize `windows_process_extensions_main_thread_handle`) - #160212 (traits: Fix rigid alias liveness matching) - #160544 (Stabilize `feature(trim_prefix_suffix)` (`{str, [T], Path}::trim_prefix` and `{str, [T]}::trim_suffix`)) - #161305 (Use the entire type of a dropped local to compute variance (edge direction) for Polonius alpha) - #161838 (tests: accept LLVM 24 optimization in this test) - #162312 (core: Rewrite docs for try_as_dyn) - #162785 (Avoid creating overlapping assignments in MatchBranchSimplification) - #162805 (Add `must_use` lint to `ExitCode`) - #162825 (core: Add examples for `debug_closure_helpers`) - #162841 (enable asm tests for xtensa targets) - #162842 (reintroduce check RibKind::ConstParamTy did in direct consts) - #162845 (mgca: fix issue with mismatched array valtree/valtree tys) - #162856 (Stabilize CommandExt::show_window) - #162865 (Complex conjugate, negation and default) - #162874 (Add support for `annotate_snippets::snippet::AnnotationKind::Visible`) - #162881 (Simplify the macro for forwarding Decoder methods ) - #162888 (Fix a typo on the Armv7-R platform docs page)
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 17, 2026
…uwer Rollup of 23 pull requests Successful merges: - #161596 (coretests: Add more pattern tests.) - #162411 (Make Receiver `#[rustc_dyn_incompatible_trait]`) - #162760 (yeet alias new_from_def_id) - #162796 (libtest: do not early exit from test runners) - #162844 (Add loan reachability traces to polonius MIR dumps) - #162876 (Move operations out of `rustc_middle::query::job`) - #160108 (Stabilize `windows_process_extensions_main_thread_handle`) - #160212 (traits: Fix rigid alias liveness matching) - #160544 (Stabilize `feature(trim_prefix_suffix)` (`{str, [T], Path}::trim_prefix` and `{str, [T]}::trim_suffix`)) - #161305 (Use the entire type of a dropped local to compute variance (edge direction) for Polonius alpha) - #161838 (tests: accept LLVM 24 optimization in this test) - #162312 (core: Rewrite docs for try_as_dyn) - #162785 (Avoid creating overlapping assignments in MatchBranchSimplification) - #162805 (Add `must_use` lint to `ExitCode`) - #162825 (core: Add examples for `debug_closure_helpers`) - #162841 (enable asm tests for xtensa targets) - #162842 (reintroduce check RibKind::ConstParamTy did in direct consts) - #162845 (mgca: fix issue with mismatched array valtree/valtree tys) - #162856 (Stabilize CommandExt::show_window) - #162865 (Complex conjugate, negation and default) - #162874 (Add support for `annotate_snippets::snippet::AnnotationKind::Visible`) - #162881 (Simplify the macro for forwarding Decoder methods ) - #162888 (Fix a typo on the Armv7-R platform docs page)
rust-bors Bot
pushed a commit
that referenced
this pull request
Sep 17, 2026
Rollup merge of #161596 - pacak:more-pat-tests, r=nia-e coretests: Add more pattern tests. Right now things are undertested and underspecified. Some of the library code would get in a loop if searcher starts returning empty rejects. And there's no tests for backwards multi byte char matchers. Pull request I'm reviving had a problem implementing that, so making sure it's tested before the actual code lands. Right now it is possible to break both tests (and user code) without breaking anything else in the test suite I think. This commit is extracted from #160971 with slight modifications. <!-- start jj-vine stack --> This PR is part of a stack containing 16 PRs: 1. `main` 2. **"coretests: Add more pattern tests." (this PR)** 3. #161606 ([Compare](https://github.com/pacak/rust/compare/more-pat-tests..generalize-pattern)) 4. #161754 ([Compare](https://github.com/pacak/rust/compare/generalize-pattern..push-qvvokrsvvqww)) 5. #161755 ([Compare](https://github.com/pacak/rust/compare/push-qvvokrsvvqww..push-wlxvvvxzrsly)) 6. #161756 ([Compare](https://github.com/pacak/rust/compare/push-wlxvvvxzrsly..push-lkvnuzsvuqzt)) 7. #161757 ([Compare](https://github.com/pacak/rust/compare/push-lkvnuzsvuqzt..push-wuxtmysppkst)) 8. #161758 ([Compare](https://github.com/pacak/rust/compare/push-wuxtmysppkst..push-tnkxmkmykopl)) 9. #161759 ([Compare](https://github.com/pacak/rust/compare/push-tnkxmkmykopl..push-umzmopsxmwry)) 10. #161760 ([Compare](https://github.com/pacak/rust/compare/push-umzmopsxmwry..push-ptqpwloxpyru)) 11. #161761 ([Compare](https://github.com/pacak/rust/compare/push-ptqpwloxpyru..push-rksmzopsvzlk)) 12. #161762 ([Compare](https://github.com/pacak/rust/compare/push-rksmzopsvzlk..push-mkxpywoqusmn)) 13. #161608 ([Compare](https://github.com/pacak/rust/compare/push-mkxpywoqusmn..flavor-pattern)) 14. #161763 ([Compare](https://github.com/pacak/rust/compare/flavor-pattern..push-xoslomrztmly)) 15. #161764 ([Compare](https://github.com/pacak/rust/compare/push-xoslomrztmly..push-pqpumynltyml)) 16. #161765 ([Compare](https://github.com/pacak/rust/compare/push-pqpumynltyml..push-svrvnxkpuqul)) 17. #161610 ([Compare](https://github.com/pacak/rust/compare/push-svrvnxkpuqul..osstr-pattern-tip)) <!-- end jj-vine stack -->
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.
Right now things are undertested and underspecified.
Some of the library code would get in a loop if searcher starts returning empty rejects.
And there's no tests for backwards multi byte char matchers. Pull request I'm reviving had a problem implementing that, so making sure it's tested before the actual code lands.
Right now it is possible to break both tests (and user code) without breaking anything else in the test suite I think.
This commit is extracted from #160971 with slight modifications.
This PR is part of a stack containing 16 PRs:
main