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

Add lint for .. use in fully binded struct #5258

Merged
merged 1 commit into from
Mar 4, 2020

Conversation

ThibsG
Copy link
Contributor

@ThibsG ThibsG commented Mar 2, 2020

This PR adds the lint match-wild-in-fully-binded-struct to prevent the use of the .. pattern when all fields of the struct are already binded.

Fixes: #638

changelog: Add [rest_pat_in_fully_bound_structs] lint to warn against the use of .. in fully binded struct

@JohnTitor JohnTitor added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Mar 3, 2020
clippy_lints/src/matches.rs Outdated Show resolved Hide resolved
clippy_lints/src/matches.rs Outdated Show resolved Hide resolved
clippy_lints/src/matches.rs Show resolved Hide resolved
@flip1995 flip1995 added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Mar 3, 2020
@ThibsG ThibsG force-pushed the UselessBindingInStruct638 branch from 0184752 to fb85dba Compare March 3, 2020 11:45
Copy link
Member

@flip1995 flip1995 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 2 NITs left. Remember that you also have to update stderr, after fixing these.

clippy_lints/src/matches.rs Outdated Show resolved Hide resolved
clippy_lints/src/matches.rs Outdated Show resolved Hide resolved
@ThibsG ThibsG force-pushed the UselessBindingInStruct638 branch from fb85dba to 041dd54 Compare March 3, 2020 13:42
@ThibsG ThibsG force-pushed the UselessBindingInStruct638 branch from 041dd54 to 6526b2b Compare March 3, 2020 14:24
@flip1995
Copy link
Member

flip1995 commented Mar 3, 2020

@bors r+

Thanks!

@bors
Copy link
Contributor

bors commented Mar 3, 2020

📌 Commit 6526b2b has been approved by flip1995

@bors
Copy link
Contributor

bors commented Mar 3, 2020

⌛ Testing commit 6526b2b with merge eb39587...

bors added a commit that referenced this pull request Mar 3, 2020
Add lint for .. use in fully binded struct

This PR adds the lint `match-wild-in-fully-binded-struct` to prevent the use of the `..` pattern when all fields of the struct are already binded.

Fixes: #638

changelog: Add [`rest_pat_in_fully_bound_structs`] lint to warn against the use of `..` in fully binded struct
@bors
Copy link
Contributor

bors commented Mar 3, 2020

💔 Test failed - checks-action_test

@flip1995
Copy link
Member

flip1995 commented Mar 3, 2020

@bors retry

@bors
Copy link
Contributor

bors commented Mar 3, 2020

⌛ Testing commit 6526b2b with merge e68b5f0...

bors added a commit that referenced this pull request Mar 3, 2020
Add lint for .. use in fully binded struct

This PR adds the lint `match-wild-in-fully-binded-struct` to prevent the use of the `..` pattern when all fields of the struct are already binded.

Fixes: #638

changelog: Add [`rest_pat_in_fully_bound_structs`] lint to warn against the use of `..` in fully binded struct
@bors
Copy link
Contributor

bors commented Mar 3, 2020

💔 Test failed - checks-action_test

@ThibsG ThibsG force-pushed the UselessBindingInStruct638 branch from 6526b2b to b4eac00 Compare March 3, 2020 21:47
@flip1995
Copy link
Member

flip1995 commented Mar 3, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Mar 3, 2020

📌 Commit b4eac00 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Mar 3, 2020

⌛ Testing commit b4eac00 with merge 0527d09...

bors added a commit that referenced this pull request Mar 3, 2020
Add lint for .. use in fully binded struct

This PR adds the lint `match-wild-in-fully-binded-struct` to prevent the use of the `..` pattern when all fields of the struct are already binded.

Fixes: #638

changelog: Add [`rest_pat_in_fully_bound_structs`] lint to warn against the use of `..` in fully binded struct
@bors
Copy link
Contributor

bors commented Mar 3, 2020

💔 Test failed - checks-action_test

@ThibsG ThibsG force-pushed the UselessBindingInStruct638 branch from b4eac00 to 2aa14c9 Compare March 4, 2020 08:11
@flip1995
Copy link
Member

flip1995 commented Mar 4, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Mar 4, 2020

📌 Commit 2aa14c9 has been approved by flip1995

@bors
Copy link
Contributor

bors commented Mar 4, 2020

⌛ Testing commit 2aa14c9 with merge 292d534...

bors added a commit that referenced this pull request Mar 4, 2020
Add lint for .. use in fully binded struct

This PR adds the lint `match-wild-in-fully-binded-struct` to prevent the use of the `..` pattern when all fields of the struct are already binded.

Fixes: #638

changelog: Add [`rest_pat_in_fully_bound_structs`] lint to warn against the use of `..` in fully binded struct
@bors
Copy link
Contributor

bors commented Mar 4, 2020

💔 Test failed - checks-action_test

@flip1995
Copy link
Member

flip1995 commented Mar 4, 2020

@bors retry

@bors
Copy link
Contributor

bors commented Mar 4, 2020

⌛ Testing commit 2aa14c9 with merge 36b6598...

@bors
Copy link
Contributor

bors commented Mar 4, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 36b6598 to master...

@bors bors merged commit 36b6598 into rust-lang:master Mar 4, 2020
@ThibsG ThibsG deleted the UselessBindingInStruct638 branch March 4, 2020 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unnecessary .. binding in struct
4 participants