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

Stabilize IpAddr::is_ipv4 and is_ipv6 as const #76226

Merged
merged 2 commits into from
Nov 23, 2020

Conversation

CDirkx
Copy link
Contributor

@CDirkx CDirkx commented Sep 2, 2020

Insta-stabilize the methods is_ipv4 and is_ipv6 of std::net::IpAddr as const, in the same way as PR#76198.

Possible because of the recent stabilization of const control flow.

Part of #76225 and #76205.

@rust-highfive
Copy link
Collaborator

r? @joshtriplett

(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 Sep 2, 2020
@jyn514 jyn514 added A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Sep 2, 2020
@scottmcm scottmcm added the needs-fcp This change is insta-stable, so needs a completed FCP to proceed. label Sep 2, 2020
@jonas-schievink jonas-schievink added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 13, 2020
@Dylan-DPC-zz
Copy link

r? @KodrAus

@rust-highfive rust-highfive assigned KodrAus and unassigned joshtriplett Oct 4, 2020
@KodrAus
Copy link
Contributor

KodrAus commented Oct 6, 2020

@rfcbot fcp merge

This is another set of constifying for boolean-style match methods. This time for IpAddr:

impl IpAddr {
    pub const fn is_ipv4(&self) -> bool;
    pub const fn is_ipv6(&self) -> bool;
}

@rfcbot
Copy link

rfcbot commented Oct 6, 2020

Team member @KodrAus has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels Oct 6, 2020
@crlf0710 crlf0710 added S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 23, 2020
@rfcbot
Copy link

rfcbot commented Nov 13, 2020

🔔 This is now entering its final comment period, as per the review above. 🔔

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels Nov 13, 2020
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels Nov 23, 2020
@rfcbot
Copy link

rfcbot commented Nov 23, 2020

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

The RFC will be merged soon.

@dtolnay
Copy link
Member

dtolnay commented Nov 23, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Nov 23, 2020

📌 Commit b5746fe0b1f03b6a6e2f827165e38f7fa23b5295 has been approved by dtolnay

@bors bors removed the S-waiting-on-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). label Nov 23, 2020
@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Nov 23, 2020
Insta-stabilize the methods `is_ipv4` and `is_ipv6` of `IpAddr`.

Possible because of the recent stabilization of const control flow.

Also adds a test for these methods in a const context.
@CDirkx
Copy link
Contributor Author

CDirkx commented Nov 23, 2020

I bumped the version to 1.50.0

@dtolnay
Copy link
Member

dtolnay commented Nov 23, 2020

Good catch, thanks.
@bors r+

@bors
Copy link
Contributor

bors commented Nov 23, 2020

📌 Commit 4613bc9 has been approved by dtolnay

@bors
Copy link
Contributor

bors commented Nov 23, 2020

⌛ Testing commit 4613bc9 with merge 1823a87...

@bors
Copy link
Contributor

bors commented Nov 23, 2020

☀️ Test successful - checks-actions
Approved by: dtolnay
Pushing 1823a87 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 23, 2020
@bors bors merged commit 1823a87 into rust-lang:master Nov 23, 2020
@rustbot rustbot added this to the 1.50.0 milestone Nov 23, 2020
@CDirkx CDirkx deleted the const-ipaddr branch November 23, 2020 07:08
@spastorino spastorino removed the to-announce Announce this issue on triage meeting label Dec 3, 2020
@dtolnay dtolnay self-assigned this Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-fn Area: const fn foo(..) {..}. Pure functions which can be applied at compile time. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. needs-fcp This change is insta-stable, so needs a completed FCP to proceed. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.