-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Remove Ipv6Addr::is_unicast_site_local
#85820
Conversation
Seems reasonable and well-justified. @bors r+ |
📌 Commit 8417f483205b2d49029ca9822b04bf44514f6a05 has been approved by |
☔ The latest upstream changes (presumably #85819) made this pull request unmergeable. Please resolve the merge conflicts. |
8417f48
to
7a07da2
Compare
Resolved the merge conflict |
☔ The latest upstream changes (presumably #86160) made this pull request unmergeable. Please resolve the merge conflicts. |
7a07da2
to
ed0557e
Compare
@bors r=joshtriplett |
📌 Commit ed0557e has been approved by |
…htriplett Remove `Ipv6Addr::is_unicast_site_local` Removes the unstable method `Ipv6Addr::is_unicast_site_local`, see also rust-lang#85604 where I have tried to summarize related discussion so far. Unicast site-local addresses (`fec0::/10`) were deprecated in [IETF RFC rust-lang#3879](https://datatracker.ietf.org/doc/html/rfc3879), see also [RFC rust-lang#4291 Section 2.5.7](https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.7). Any new implementation must no longer support the special behaviour of site-local addresses. This is mentioned in the docs of `is_unicast_site_local` and already implemented in `is_unicast_global`, which considers addresses in `fec0::/10` to have global scope, thus overlapping with `is_unicast_site_local`. Given that RFC rust-lang#3879 was published in 2004, long before Rust existed, and it is specified that any new implementation must no longer support the special behaviour of site-local addresses, I don't see how a user would ever have a need for `is_unicast_site_local`. It is also confusing that currently both `is_unicast_site_local` and `is_unicast_global` can be `true` for an address, but an address can actually only have a single scope. The deprecating RFC mentions that Site-Local scope was confusing to work with and that the classification of an address as either Link-Local or Global better matches the mental model of users. There has been earlier discussion of removing `is_unicast_site_local` (rust-lang#60145 (comment)) which decided against it, but that had the incorrect assumption that the method was already stable; it is not. (This confusion arose from the placement of the unstable attribute on the entire module, instead of on individual methods, resolved in rust-lang#85672) r? `@joshtriplett` as reviewer of all the related PRs
☀️ Test successful - checks-actions |
The is_unicast_site_local() method has been gone since Rust 1.55[1] and is_ietf_protocol_assignment() since 1.56[2]. I had to run this tool to test something, saw it wouldn't build with modern Rust. [1] rust-lang/rust#85820 [2] rust-lang/rust#86439
Removes the unstable method
Ipv6Addr::is_unicast_site_local
, see also #85604 where I have tried to summarize related discussion so far.Unicast site-local addresses (
fec0::/10
) were deprecated in IETF RFC #3879, see also RFC #4291 Section 2.5.7. Any new implementation must no longer support the special behaviour of site-local addresses. This is mentioned in the docs ofis_unicast_site_local
and already implemented inis_unicast_global
, which considers addresses infec0::/10
to have global scope, thus overlapping withis_unicast_site_local
.Given that RFC #3879 was published in 2004, long before Rust existed, and it is specified that any new implementation must no longer support the special behaviour of site-local addresses, I don't see how a user would ever have a need for
is_unicast_site_local
. It is also confusing that currently bothis_unicast_site_local
andis_unicast_global
can betrue
for an address, but an address can actually only have a single scope. The deprecating RFC mentions that Site-Local scope was confusing to work with and that the classification of an address as either Link-Local or Global better matches the mental model of users.There has been earlier discussion of removing
is_unicast_site_local
(#60145 (comment)) which decided against it, but that had the incorrect assumption that the method was already stable; it is not. (This confusion arose from the placement of the unstable attribute on the entire module, instead of on individual methods, resolved in #85672)r? @joshtriplett as reviewer of all the related PRs