Add convenience method for handling ipv4-mapped addresses by canonicalizing them by the8472 · Pull Request #87708 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation4 Commits1 Checks0 Files changed
Conversation
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
[ Show hidden characters]({{ revealButtonHref }})
This simplifies checking common properties in an address-family-agnostic
way since #86335 commits to not checking IPv4 semantics
of IPv4-mapped addresses in the Ipv6Addr
property methods.
…them
This simplifies checking common properties in an address-family-agnostic
way since since rust-lang#86335 commits to not checking IPv4 semantics
of IPv4-mapped addresses in the Ipv6Addr
property methods.
r? @dtolnay
(rust-highfive has picked a reviewer for you, use r? to override)
the8472 added the T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
label
the8472 changed the title
Add convenience for handling ipv4-mapped addresses by canonicalizing them Add convenience method for handling ipv4-mapped addresses by canonicalizing them
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
📌 Commit a5cdff3 has been approved by dtolnay
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
JohnTitor added a commit to JohnTitor/rust that referenced this pull request
Add convenience method for handling ipv4-mapped addresses by canonicalizing them
This simplifies checking common properties in an address-family-agnostic
way since rust-lang#86335 commits to not checking IPv4 semantics
of IPv4-mapped addresses in the Ipv6Addr
property methods.
JohnTitor added a commit to JohnTitor/rust that referenced this pull request
Add convenience method for handling ipv4-mapped addresses by canonicalizing them
This simplifies checking common properties in an address-family-agnostic
way since rust-lang#86335 commits to not checking IPv4 semantics
of IPv4-mapped addresses in the Ipv6Addr
property methods.
bors added a commit to rust-lang-ci/rust that referenced this pull request
Rollup of 8 pull requests
Successful merges:
- rust-lang#87645 (Properly find owner of closure in THIR unsafeck)
- rust-lang#87646 (Fix a parser ICE on invalid
fn
body) - rust-lang#87652 (Validate that naked functions are never inlined)
- rust-lang#87685 (Write docs for SyncOnceCell From and Default impl)
- rust-lang#87693 (Add
aarch64-apple-ios-sim
as a possible target to the manifest) - rust-lang#87708 (Add convenience method for handling ipv4-mapped addresses by canonicalizing them)
- rust-lang#87711 (Correct typo)
- rust-lang#87716 (Allow generic SIMD array element type)
Failed merges:
r? @ghost
@rustbot
modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
Stabilize {IpAddr, Ipv6Addr}::to_canonical
Make IpAddr::to_canonical
and IpV6Addr::to_canonical
stable (+const), as well as const stabilize Ipv6Addr::to_ipv4_mapped
.
Newly stable API:
impl IpAddr {
// Newly stable under `ip_to_canonical`
const fn to_canonical(&self) -> IpAddr;
}
impl Ipv6Addr {
// Newly stable under `ip_to_canonical`
const fn to_canonical(&self) -> IpAddr;
// Already stable, this makes it const stable under
// `const_ipv6_to_ipv4_mapped`
const fn to_ipv4_mapped(&self) -> Option<Ipv4Addr>
}
These stabilize a subset of the following tracking issues:
Stabilization of all methods under the ip
gate was attempted once at rust-lang#66584 then again at rust-lang#76098. These were not successful because there are still unknowns about is_documentation
is_benchmarking
and similar; to_canonical
is much more straightforward.
I have looked and could not find any known issues with to_canonical
. These were added in 2021 in rust-lang#87708
cc implementor @the8472
r? libs-api
@rustbot
label +T-libs-api +needs-fcp
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request
Stabilize {IpAddr, Ipv6Addr}::to_canonical
Make IpAddr::to_canonical
and IpV6Addr::to_canonical
stable (+const), as well as const stabilize Ipv6Addr::to_ipv4_mapped
.
Newly stable API:
impl IpAddr {
// Newly stable under `ip_to_canonical`
const fn to_canonical(&self) -> IpAddr;
}
impl Ipv6Addr {
// Newly stable under `ip_to_canonical`
const fn to_canonical(&self) -> IpAddr;
// Already stable, this makes it const stable under
// `const_ipv6_to_ipv4_mapped`
const fn to_ipv4_mapped(&self) -> Option<Ipv4Addr>
}
These stabilize a subset of the following tracking issues:
Stabilization of all methods under the ip
gate was attempted once at rust-lang#66584 then again at rust-lang#76098. These were not successful because there are still unknowns about is_documentation
is_benchmarking
and similar; to_canonical
is much more straightforward.
I have looked and could not find any known issues with to_canonical
. These were added in 2021 in rust-lang#87708
cc implementor @the8472
r? libs-api
@rustbot
label +T-libs-api +needs-fcp
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#115955 - tgross35:ip-to-canonical, r=dtolnay
Stabilize {IpAddr, Ipv6Addr}::to_canonical
Make IpAddr::to_canonical
and IpV6Addr::to_canonical
stable (+const), as well as const stabilize Ipv6Addr::to_ipv4_mapped
.
Newly stable API:
impl IpAddr {
// Newly stable under `ip_to_canonical`
const fn to_canonical(&self) -> IpAddr;
}
impl Ipv6Addr {
// Newly stable under `ip_to_canonical`
const fn to_canonical(&self) -> IpAddr;
// Already stable, this makes it const stable under
// `const_ipv6_to_ipv4_mapped`
const fn to_ipv4_mapped(&self) -> Option<Ipv4Addr>
}
These stabilize a subset of the following tracking issues:
Stabilization of all methods under the ip
gate was attempted once at rust-lang#66584 then again at rust-lang#76098. These were not successful because there are still unknowns about is_documentation
is_benchmarking
and similar; to_canonical
is much more straightforward.
I have looked and could not find any known issues with to_canonical
. These were added in 2021 in rust-lang#87708
cc implementor @the8472
r? libs-api
@rustbot
label +T-libs-api +needs-fcp
jstasiak added a commit to netaddr/netaddr that referenced this pull request
jstasiak added a commit to netaddr/netaddr that referenced this pull request
Labels
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the library API team, which will review and decide on the PR/issue.