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

Make delegation methods of std::net::IpAddr unstably const #76304

Merged
merged 1 commit into from
Sep 25, 2020

Commits on Sep 23, 2020

  1. Make delegation methods of std::net::IpAddr unstable const

    Make the following methods of `std::net::IpAddr` unstable const under the `const_ip` feature:
    - `is_unspecified`
    - `is_loopback`
    - `is_global`
    - `is_multicast`
    
    Also adds a test for these methods in a const context.
    
    Possible because these methods delegate to the inner `Ipv4Addr` or `Ipv6Addr`, which were made const, and the recent stabilization of const control flow.
    
    Part of rust-lang#76205
    CDirkx committed Sep 23, 2020
    Configuration menu
    Copy the full SHA
    947536f View commit details
    Browse the repository at this point in the history