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

Fixup: filter().is_none() -> !any() #79806

Merged
merged 1 commit into from
Dec 8, 2020

Conversation

LeSeulArtichaut
Copy link
Contributor

No description provided.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@rust-highfive
Copy link
Contributor

r? @oli-obk

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 7, 2020
@jyn514
Copy link
Member

jyn514 commented Dec 7, 2020

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 7, 2020

📌 Commit 9cc563b has been approved by jyn514

@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 Dec 7, 2020
@jyn514 jyn514 added A-type-system Area: Type system C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 7, 2020
@bors
Copy link
Collaborator

bors commented Dec 8, 2020

⌛ Testing commit 9cc563b with merge 4fd4a98...

@bors
Copy link
Collaborator

bors commented Dec 8, 2020

☀️ Test successful - checks-actions
Approved by: jyn514
Pushing 4fd4a98 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 8, 2020
@bors bors merged commit 4fd4a98 into rust-lang:master Dec 8, 2020
@rustbot rustbot added this to the 1.50.0 milestone Dec 8, 2020
@LeSeulArtichaut LeSeulArtichaut deleted the fixup-filter-is-none branch December 8, 2020 11:32
field.vis.is_accessible_from(tcx.parent_module(pat.hir_id).to_def_id(), tcx)
})
.is_none();
let no_accessible_unmentioned_fields = !unmentioned_fields.iter().any(|(field, _)| {
Copy link

Choose a reason for hiding this comment

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

Would it make sense for an iterator to have a convenience none() method that does the same as !any()? We have such methods for any and all, seems logical to have it for none as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feel free to open an issue or to propose a PR with an unstable implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system C-cleanup Category: PRs that clean code up or issues documenting cleanup. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

None yet

7 participants