Skip to content

Commit fa3d56a

Browse files
authored
Rollup merge of rust-lang#53213 - tmccombs:stable-ipconstructors, r=KodrAus
Stabilize IP associated constants Fixes rust-lang#44582
2 parents b51723a + e6244e5 commit fa3d56a

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

src/libstd/net/ip.rs

+5-20
Original file line numberDiff line numberDiff line change
@@ -357,47 +357,38 @@ impl Ipv4Addr {
357357
/// # Examples
358358
///
359359
/// ```
360-
/// #![feature(ip_constructors)]
361360
/// use std::net::Ipv4Addr;
362361
///
363362
/// let addr = Ipv4Addr::LOCALHOST;
364363
/// assert_eq!(addr, Ipv4Addr::new(127, 0, 0, 1));
365364
/// ```
366-
#[unstable(feature = "ip_constructors",
367-
reason = "requires greater scrutiny before stabilization",
368-
issue = "44582")]
365+
#[stable(feature = "ip_constructors", since = "1.30.0")]
369366
pub const LOCALHOST: Self = Ipv4Addr::new(127, 0, 0, 1);
370367

371368
/// An IPv4 address representing an unspecified address: 0.0.0.0
372369
///
373370
/// # Examples
374371
///
375372
/// ```
376-
/// #![feature(ip_constructors)]
377373
/// use std::net::Ipv4Addr;
378374
///
379375
/// let addr = Ipv4Addr::UNSPECIFIED;
380376
/// assert_eq!(addr, Ipv4Addr::new(0, 0, 0, 0));
381377
/// ```
382-
#[unstable(feature = "ip_constructors",
383-
reason = "requires greater scrutiny before stabilization",
384-
issue = "44582")]
378+
#[stable(feature = "ip_constructors", since = "1.30.0")]
385379
pub const UNSPECIFIED: Self = Ipv4Addr::new(0, 0, 0, 0);
386380

387381
/// An IPv4 address representing the broadcast address: 255.255.255.255
388382
///
389383
/// # Examples
390384
///
391385
/// ```
392-
/// #![feature(ip_constructors)]
393386
/// use std::net::Ipv4Addr;
394387
///
395388
/// let addr = Ipv4Addr::BROADCAST;
396389
/// assert_eq!(addr, Ipv4Addr::new(255, 255, 255, 255));
397390
/// ```
398-
#[unstable(feature = "ip_constructors",
399-
reason = "requires greater scrutiny before stabilization",
400-
issue = "44582")]
391+
#[stable(feature = "ip_constructors", since = "1.30.0")]
401392
pub const BROADCAST: Self = Ipv4Addr::new(255, 255, 255, 255);
402393

403394
/// Returns the four eight-bit integers that make up this address.
@@ -896,31 +887,25 @@ impl Ipv6Addr {
896887
/// # Examples
897888
///
898889
/// ```
899-
/// #![feature(ip_constructors)]
900890
/// use std::net::Ipv6Addr;
901891
///
902892
/// let addr = Ipv6Addr::LOCALHOST;
903893
/// assert_eq!(addr, Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1));
904894
/// ```
905-
#[unstable(feature = "ip_constructors",
906-
reason = "requires greater scrutiny before stabilization",
907-
issue = "44582")]
895+
#[stable(feature = "ip_constructors", since = "1.30.0")]
908896
pub const LOCALHOST: Self = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1);
909897

910898
/// An IPv6 address representing the unspecified address: `::`
911899
///
912900
/// # Examples
913901
///
914902
/// ```
915-
/// #![feature(ip_constructors)]
916903
/// use std::net::Ipv6Addr;
917904
///
918905
/// let addr = Ipv6Addr::UNSPECIFIED;
919906
/// assert_eq!(addr, Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0));
920907
/// ```
921-
#[unstable(feature = "ip_constructors",
922-
reason = "requires greater scrutiny before stabilization",
923-
issue = "44582")]
908+
#[stable(feature = "ip_constructors", since = "1.30.0")]
924909
pub const UNSPECIFIED: Self = Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0);
925910

926911
/// Returns the eight 16-bit segments that make up this address.

0 commit comments

Comments
 (0)