Auto merge of #49101 - mark-i-m:stabilize_i128, r=nagisa
Stabilize 128-bit integers 🎉 cc #35118 EDIT: This should be merged only after the following have been merged: - [x] https://github.com/rust-lang-nursery/compiler-builtins/pull/236 - [x] https://github.com/rust-lang/book/pull/1230
This commit is contained in:
@@ -1355,7 +1355,7 @@ impl FromInner<c::in6_addr> for Ipv6Addr {
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "i128", issue = "35118")]
|
||||
#[stable(feature = "i128", since = "1.26.0")]
|
||||
impl From<Ipv6Addr> for u128 {
|
||||
fn from(ip: Ipv6Addr) -> u128 {
|
||||
let ip = ip.segments();
|
||||
@@ -1364,7 +1364,7 @@ impl From<Ipv6Addr> for u128 {
|
||||
((ip[6] as u128) << 16) + (ip[7] as u128)
|
||||
}
|
||||
}
|
||||
#[unstable(feature = "i128", issue = "35118")]
|
||||
#[stable(feature = "i128", since = "1.26.0")]
|
||||
impl From<u128> for Ipv6Addr {
|
||||
fn from(ip: u128) -> Ipv6Addr {
|
||||
Ipv6Addr::new(
|
||||
|
||||
Reference in New Issue
Block a user