Skip to content
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

test(patterns): add patterns feature tests to borrowck test suite #69817

Merged

Conversation

thekuom
Copy link
Contributor

@thekuom thekuom commented Mar 8, 2020

Addresses request here: #69690 (comment)

Fixes #67311.

r? @Centril

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 8, 2020
@thekuom
Copy link
Contributor Author

thekuom commented Mar 8, 2020

@Centril it looks like the slice_patterns and or_patterns were already covered in the borrowck test suite

@Centril
Copy link
Contributor

Centril commented Mar 8, 2020

@thekuom Ah, sorry; it seems I was unclear. There are already a bunch of borrowck tests in src/test/ui/pattern/bindings-after-at/ which I introduced in #66296 and amended in #68376. What's missing is the combination of these features interacting together in borrowck, e.g. tests that use all 4 of nested or-patterns, bindings_after_at, slice_patterns, box_patterns all at the same time.

@Centril Centril added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 8, 2020
@thekuom
Copy link
Contributor Author

thekuom commented Mar 8, 2020

@Centril, no worries! I will do those

@rust-highfive

This comment has been minimized.

@Centril Centril added F-bindings_after_at `#![feature(bindings_after_at)]` F-or_patterns `#![feature(or_patterns)]` F-slice_patterns `#![feature(slice_patterns)]` labels Mar 9, 2020
@Centril
Copy link
Contributor

Centril commented Mar 9, 2020

Thanks; can you squash the commits into one? r=me with that done.

Adds borrowck tests for the following features:
- bindings_after_at
- or_patterns
- slice_patterns
- box_patterns
@thekuom thekuom force-pushed the test/borrow-checking-pattern-features branch from 2ade48f to b974d6f Compare March 9, 2020 13:28
@thekuom
Copy link
Contributor Author

thekuom commented Mar 9, 2020

Done, r=@Centril

@Centril
Copy link
Contributor

Centril commented Mar 9, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Mar 9, 2020

📌 Commit b974d6f has been approved by Centril

@bors
Copy link
Contributor

bors commented Mar 9, 2020

🌲 The tree is currently closed for pull requests below priority 1000, this pull request will be tested once the tree is reopened

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 9, 2020
bors added a commit that referenced this pull request Mar 10, 2020
Rollup of 10 pull requests

Successful merges:

 - #69475 (Remove the `no_force` query attribute)
 - #69514 (Remove spotlight)
 - #69677 (rustc_metadata: Give decoder access to whole crate store)
 - #69714 (Make PlaceRef take just one lifetime)
 - #69799 (Allow ZSTs in `AllocRef`)
 - #69817 (test(patterns): add patterns feature tests to borrowck test suite)
 - #69836 (Check if output is immediate value)
 - #69847 (clean up E0393 explanation)
 - #69861 (Add note about localization to std::fmt docs)
 - #69877 (Vec::new is const stable in 1.39 not 1.32)

Failed merges:

r? @ghost
@bors bors merged commit 08095f4 into rust-lang:master Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-bindings_after_at `#![feature(bindings_after_at)]` F-or_patterns `#![feature(or_patterns)]` F-slice_patterns `#![feature(slice_patterns)]` 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.

Extend bindings_after_at (b1 @ Some(b2)) tests with nested or_patterns
4 participants