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 the "IP" feature #76098

Closed
wants to merge 23 commits into from
Closed

Stabilize the "IP" feature #76098

wants to merge 23 commits into from

Commits on Feb 28, 2021

  1. stabilize the "ip" feature and document stability guarantees

    Feature tracking issue: #27709
    
    - Stabilize the following methods:
        - `IpAddr::is_global`
        - `IpAddr::is_documentation`
        - `Ipv4Addr::is_global`
        - `Ipv4addr::is_shared`
        - `Ipv4Addr::is_ietf_protocol_assignment`
        - `Ipv4addr::is_benchmarking`
        - `Ipv4Addr::is_reserved`
        - `Ipv6Addr::is_global`
        - `Ipv6Addr::is_unique_local`
        - `Ipv6Addr::is_unicast_link_local_strict`
        - `Ipv6Addr::is_unicast_link_local`
        - `Ipv6Addr::is_unicast_site_local`
        - `Ipv6Addr::is_documentation`
        - `Ipv6Addr::is_unicast_global`
        - `Ipv6Addr::multicast_scope`
    - Stabilize the following enum: `Ipv6MulticastScope`
    - Document IP helpers stability guarantees (fixes #60239)
    little-dude authored and caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    1a127d5 View commit details
    Browse the repository at this point in the history
  2. std::net: add Ipv6Multicastscope variants

    Add variants for the currently reserved and un-assigned scopes. Since
    variants may be added in the future as new RFCs get published, we also
    make this enum #[non_exhaustive].
    
    Ref: #66584 (comment)
    little-dude authored and caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    0910bbc View commit details
    Browse the repository at this point in the history
  3. Update feature gates

    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    67742d4 View commit details
    Browse the repository at this point in the history
  4. Apply suggestions from code review

    Thanks again for the help with understanding the attributes!
    
    Co-authored-by: Ashley Mannix <[email protected]>
    caass and KodrAus committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    d3fea20 View commit details
    Browse the repository at this point in the history
  5. is_unicast_link_local_strict --> is_unicast_link_local

    Remove the looser `is_unicast_link_local` and
    rename `is_unicast_link_local_strict` as i suggested 😊
    
    See #76098 (comment)
    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    22520cf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2c005cb View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    707770c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    133c62d View commit details
    Browse the repository at this point in the history
  9. Remove some more #![feature(ip)] stuff

    Getting kind of extremely out of my comfort zone here and modifying quite a few different files...i hope this is all ok...
    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    23f40a3 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    46bdfcb View commit details
    Browse the repository at this point in the history
  11. Change checks for is_unicast_link_local_strict to is_unicast_link_local

    I really...i'm terrified i'm breaking something here
    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    ec63c55 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    6e6f745 View commit details
    Browse the repository at this point in the history
  13. Fix test cases that checked for relaxed behavior

    Because of the changes made due to the discussion [here](#76098 (comment)),
    the checks for the more relaxed behavior of the old
    `is_unicast_link_local` method failed when they were tuned to the new,
    stricter checking behavior. These test cases have been modified to
    check that a given IPv6 address *is not* unicast link local, using
    a bitwise or'ing strategy that was already present in other test cases.
    
    Further discussion [here](https://rust-lang.zulipchat.com/#narrow/stream/212497-t-compiler.2Fhelp-wanted/topic/fix.20tests.20for.20.2376098).
    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    341dc82 View commit details
    Browse the repository at this point in the history
  14. Restore the relaxed behavior of is_unicast_link_local

    This brings the behavior more in line with Go, Python, Linux, and C.
    
    I know, this should have been a `git revert` but honestly I don't trust
    myself with that and I just had a big mishap trying to merge upstream
    Rust anyway so forgive me :crying:
    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    c90cc3d View commit details
    Browse the repository at this point in the history
  15. Revert "Fix test cases that checked for relaxed behavior"

    This reverts commit e0f66e43da61d8fe8aadc6bcdc2545de51607332.
    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    8364ac0 View commit details
    Browse the repository at this point in the history
  16. Remove IP feature gate

    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    3cf1541 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    96d1165 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    3825105 View commit details
    Browse the repository at this point in the history
  19. Adjust Ipv4-in-Ipv6 checking to ignore Ipv4-compatible addresses

    Per [RFC 4291](https://tools.ietf.org/html/rfc4291#section-2.5.5.1),
    IPv6-Compatible IPv4 Addresses are deprecated and may be ignored,
    so let's ignore them! Also add some tests indicating that IPv6-Mapped
    addresses are treated specially, but IPv6-Compatible addresses are not.
    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    18773f9 View commit details
    Browse the repository at this point in the history
  20. Revert "Adjust Ipv4-in-Ipv6 checking to ignore Ipv4-compatible addres…

    …ses"
    
    This reverts commit 63329f9eadbba6da75a04cbf613f5701b06f71e5.
    
    Also, change the behavior of `to_ipv4` to ignore Ipv4-compatible addresses
    instead of adding another method `to_ipv4_mapped` and never ever using
    `to_ipv4` instead. Since this method is in stable.
    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    a0d0771 View commit details
    Browse the repository at this point in the history
  21. Update doc comments

    - Use new intra-doc linking
    - Clarify that the RFC's are IETF RFC's
    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    2c836b5 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    e3487cf View commit details
    Browse the repository at this point in the history
  23. wow i hope i didn't mess something up

    just did a really big rebase and i'm slightly concerned
    that i somehow tanked this whole branch but i guess we'll see
    caass committed Feb 28, 2021
    Configuration menu
    Copy the full SHA
    a1d4e70 View commit details
    Browse the repository at this point in the history