Skip to content

Commit 9d5b0e1

Browse files
committed
Add unstable attributes for Ipv?Addr constructors.
1 parent 8b6122f commit 9d5b0e1

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

src/libstd/net/ip.rs

+17-5
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
#![unstable(feature = "ip", reason = "extra functionality has not been \
1212
scrutinized to the level that it should \
13-
be stable",
13+
be to be stable",
1414
issue = "27709")]
1515

1616
use cmp::Ordering;
@@ -347,12 +347,15 @@ impl Ipv4Addr {
347347
/// # Examples
348348
///
349349
/// ```
350-
/// #![feature(ip)]
350+
/// #![feature(ip_constructors)]
351351
/// use std::net::Ipv4Addr;
352352
///
353353
/// let addr = Ipv4Addr::localhost();
354354
/// assert_eq!(addr, Ipv4Addr::new(127, 0, 0, 1));
355355
/// ```
356+
#[unstable(feature = "ip_constructors",
357+
reason = "requires greater scrutiny before stabilization",
358+
issue = "44582")]
356359
pub fn localhost() -> Ipv4Addr {
357360
Ipv4Addr::new(127, 0, 0, 1)
358361
}
@@ -362,12 +365,15 @@ impl Ipv4Addr {
362365
/// # Examples
363366
///
364367
/// ```
365-
/// #![feature(ip)]
368+
/// #![feature(ip_constructors)]
366369
/// use std::net::Ipv4Addr;
367370
///
368371
/// let addr = Ipv4Addr::unspecified();
369372
/// assert_eq!(addr, Ipv4Addr::new(0, 0, 0, 0));
370373
/// ```
374+
#[unstable(feature = "ip_constructors",
375+
reason = "requires greater scrutiny before stabilization",
376+
issue = "44582")]
371377
pub fn unspecified() -> Ipv4Addr {
372378
Ipv4Addr::new(0, 0, 0, 0)
373379
}
@@ -823,12 +829,15 @@ impl Ipv6Addr {
823829
/// # Examples
824830
///
825831
/// ```
826-
/// #![feature(ip)]
832+
/// #![feature(ip_constructors)]
827833
/// use std::net::Ipv6Addr;
828834
///
829835
/// let addr = Ipv6Addr::localhost();
830836
/// assert_eq!(addr, Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1));
831837
/// ```
838+
#[unstable(feature = "ip_constructors",
839+
reason = "requires greater scrutiny before stabilization",
840+
issue = "44582")]
832841
pub fn localhost() -> Ipv6Addr {
833842
Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1)
834843
}
@@ -838,12 +847,15 @@ impl Ipv6Addr {
838847
/// # Examples
839848
///
840849
/// ```
841-
/// #![feature(ip)]
850+
/// #![feature(ip_constructors)]
842851
/// use std::net::Ipv6Addr;
843852
///
844853
/// let addr = Ipv6Addr::unspecified();
845854
/// assert_eq!(addr, Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0));
846855
/// ```
856+
#[unstable(feature = "ip_constructors",
857+
reason = "requires greater scrutiny before stabilization",
858+
issue = "44582")]
847859
pub fn unspecified() -> Ipv6Addr {
848860
Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 0)
849861
}

0 commit comments

Comments
 (0)