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 (continued from #76098) #85585

Closed
wants to merge 24 commits into from

Commits on May 22, 2021

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

    Feature tracking issue: rust-lang#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 rust-lang#60239)
    little-dude authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    02e835a 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: rust-lang#66584 (comment)
    little-dude authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    7b7ca5d View commit details
    Browse the repository at this point in the history
  3. Update feature gates

    caass authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    f33f945 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 <kodraus@hey.com>
    2 people authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    86e9b37 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 rust-lang#76098 (comment)
    caass authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    f91cb14 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    259ada1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    f15098f View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    c8ca757 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 authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    392a21b View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    f5694dc 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 authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    8de3caf View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    f224551 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](rust-lang#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 authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    2db2b5d 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 authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    c72ea14 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 authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    179d376 View commit details
    Browse the repository at this point in the history
  16. Remove IP feature gate

    caass authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    4f77918 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    2f1078d View commit details
    Browse the repository at this point in the history
  18. Rewrite using new rustdoc comments!!!!

    caass authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    0348e5e 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 authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    36792e8 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 authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    42b9a38 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 authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    e6b76f0 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    f469444 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 authored and saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    240a913 View commit details
    Browse the repository at this point in the history
  24. Fix tests

    * Move libstd ip tests to their own module
    * Delete failing test; mapped addresses are never unspecified
    saethlin committed May 22, 2021
    Configuration menu
    Copy the full SHA
    6c42f4a View commit details
    Browse the repository at this point in the history