#![allow(dead_code, deprecated, unused_variables, unused_mut)] use std::net::{IpAddr, Ipv6Addr}; fn main() { let addr = Ipv6Addr::new(0, 0, 0, 0, 0, 0xffff, 0xc00a, 0x2ff); assert_eq!(IpAddr::V6(addr), IpAddr::from(addr)); }