Closed
Description
This code should be correct, because according to IANA IPv4 Special-Purpose Address Registry document, all address in 0.0.0.0/8
are not global reachable.
#![feature(ip)]
use std::net::Ipv4Addr;
fn main() {
let ip = Ipv4Addr::new(0, 0, 0, 1);
assert!(!ip.is_global());
}
But it panic on assertion failed in latest nightly (2019-01-11) (see Rust Playground)