Stabilise ip_bits feature · model-checking/verify-rust-std@b1ac7da (original) (raw)

`@@ -460,12 +460,11 @@ impl Ipv4Addr {

`

460

460

`/// # Examples

`

461

461

`///

`

462

462

```` /// ```


`463`

``

`-

/// #![feature(ip_bits)]

`

`464`

`463`

`/// use std:🥅:Ipv4Addr;

`

`465`

`464`

`///

`

`466`

`465`

`/// assert_eq!(Ipv4Addr::BITS, 32);

`

`467`

`466`

```` /// ```

468

``

`-

#[unstable(feature = "ip_bits", issue = "113744")]

`

``

467

`+

#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]

`

469

468

`pub const BITS: u32 = 32;

`

470

469

``

471

470

`` /// Converts an IPv4 address into a u32 representation using native byte order.

``

`@@ -479,24 +478,22 @@ impl Ipv4Addr {

`

479

478

`/// # Examples

`

480

479

`///

`

481

480

```` /// ```


`482`

``

`-

/// #![feature(ip_bits)]

`

`483`

`481`

`/// use std:🥅:Ipv4Addr;

`

`484`

`482`

`///

`

`485`

`483`

`/// let addr = Ipv4Addr::new(0x12, 0x34, 0x56, 0x78);

`

`486`

`484`

`/// assert_eq!(0x12345678, addr.to_bits());

`

`487`

`485`

```` /// ```

488

486

`///

`

489

487

```` /// ```


`490`

``

`-

/// #![feature(ip_bits)]

`

`491`

`488`

`/// use std:🥅:Ipv4Addr;

`

`492`

`489`

`///

`

`493`

`490`

`/// let addr = Ipv4Addr::new(0x12, 0x34, 0x56, 0x78);

`

`494`

`491`

`/// let addr_bits = addr.to_bits() & 0xffffff00;

`

`495`

`492`

`/// assert_eq!(Ipv4Addr::new(0x12, 0x34, 0x56, 0x00), Ipv4Addr::from_bits(addr_bits));

`

`496`

`493`

`///

`

`497`

`494`

```` /// ```

498

``

`-

#[rustc_const_unstable(feature = "ip_bits", issue = "113744")]

`

499

``

`-

#[unstable(feature = "ip_bits", issue = "113744")]

`

``

495

`+

#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]

`

``

496

`+

#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]

`

500

497

`#[must_use]

`

501

498

`#[inline]

`

502

499

`pub const fn to_bits(self) -> u32 {

`

`@@ -510,14 +507,13 @@ impl Ipv4Addr {

`

510

507

`/// # Examples

`

511

508

`///

`

512

509

```` /// ```


`513`

``

`-

/// #![feature(ip_bits)]

`

`514`

`510`

`/// use std:🥅:Ipv4Addr;

`

`515`

`511`

`///

`

`516`

`512`

`/// let addr = Ipv4Addr::from(0x12345678);

`

`517`

`513`

`/// assert_eq!(Ipv4Addr::new(0x12, 0x34, 0x56, 0x78), addr);

`

`518`

`514`

```` /// ```

519

``

`-

#[rustc_const_unstable(feature = "ip_bits", issue = "113744")]

`

520

``

`-

#[unstable(feature = "ip_bits", issue = "113744")]

`

``

515

`+

#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]

`

``

516

`+

#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]

`

521

517

`#[must_use]

`

522

518

`#[inline]

`

523

519

`pub const fn from_bits(bits: u32) -> Ipv4Addr {

`

`@@ -1238,12 +1234,11 @@ impl Ipv6Addr {

`

1238

1234

`/// # Examples

`

1239

1235

`///

`

1240

1236

```` /// ```


`1241`

``

`-

/// #![feature(ip_bits)]

`

`1242`

`1237`

`/// use std:🥅:Ipv6Addr;

`

`1243`

`1238`

`///

`

`1244`

`1239`

`/// assert_eq!(Ipv6Addr::BITS, 128);

`

`1245`

`1240`

```` /// ```

1246

``

`-

#[unstable(feature = "ip_bits", issue = "113744")]

`

``

1241

`+

#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]

`

1247

1242

`pub const BITS: u32 = 128;

`

1248

1243

``

1249

1244

`` /// Converts an IPv6 address into a u128 representation using native byte order.

``

`@@ -1257,7 +1252,6 @@ impl Ipv6Addr {

`

1257

1252

`/// # Examples

`

1258

1253

`///

`

1259

1254

```` /// ```


`1260`

``

`-

/// #![feature(ip_bits)]

`

`1261`

`1255`

`/// use std:🥅:Ipv6Addr;

`

`1262`

`1256`

`///

`

`1263`

`1257`

`/// let addr = Ipv6Addr::new(

`

`@@ -1268,7 +1262,6 @@ impl Ipv6Addr {

`

`1268`

`1262`

```` /// ```

1269

1263

`///

`

1270

1264

```` /// ```


`1271`

``

`-

/// #![feature(ip_bits)]

`

`1272`

`1265`

`/// use std:🥅:Ipv6Addr;

`

`1273`

`1266`

`///

`

`1274`

`1267`

`/// let addr = Ipv6Addr::new(

`

`@@ -1284,8 +1277,8 @@ impl Ipv6Addr {

`

`1284`

`1277`

`/// Ipv6Addr::from_bits(addr_bits));

`

`1285`

`1278`

`///

`

`1286`

`1279`

```` /// ```

1287

``

`-

#[rustc_const_unstable(feature = "ip_bits", issue = "113744")]

`

1288

``

`-

#[unstable(feature = "ip_bits", issue = "113744")]

`

``

1280

`+

#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]

`

``

1281

`+

#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]

`

1289

1282

`#[must_use]

`

1290

1283

`#[inline]

`

1291

1284

`pub const fn to_bits(self) -> u128 {

`

`@@ -1299,7 +1292,6 @@ impl Ipv6Addr {

`

1299

1292

`/// # Examples

`

1300

1293

`///

`

1301

1294

```` /// ```


`1302`

``

`-

/// #![feature(ip_bits)]

`

`1303`

`1295`

`/// use std:🥅:Ipv6Addr;

`

`1304`

`1296`

`///

`

`1305`

`1297`

`/// let addr = Ipv6Addr::from(0x102030405060708090A0B0C0D0E0F00D_u128);

`

`@@ -1310,8 +1302,8 @@ impl Ipv6Addr {

`

`1310`

`1302`

`/// ),

`

`1311`

`1303`

`/// addr);

`

`1312`

`1304`

```` /// ```

1313

``

`-

#[rustc_const_unstable(feature = "ip_bits", issue = "113744")]

`

1314

``

`-

#[unstable(feature = "ip_bits", issue = "113744")]

`

``

1305

`+

#[rustc_const_stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]

`

``

1306

`+

#[stable(feature = "ip_bits", since = "CURRENT_RUSTC_VERSION")]

`

1315

1307

`#[must_use]

`

1316

1308

`#[inline]

`

1317

1309

`pub const fn from_bits(bits: u128) -> Ipv6Addr {

`