@@ -1594,16 +1594,15 @@ impl Ipv6Addr {
1594
1594
/// # Examples
1595
1595
///
1596
1596
/// ```
1597
- /// #![feature(ip)]
1598
- ///
1599
1597
/// use std::net::Ipv6Addr;
1600
1598
///
1601
1599
/// assert_eq!(Ipv6Addr::new(0, 0, 0, 0, 0, 0xffff, 0xc00a, 0x2ff).is_unique_local(), false);
1602
1600
/// assert_eq!(Ipv6Addr::new(0xfc02, 0, 0, 0, 0, 0, 0, 0).is_unique_local(), true);
1603
1601
/// ```
1604
- #[unstable(feature = "ip", issue = "27709")]
1605
1602
#[must_use]
1606
1603
#[inline]
1604
+ #[stable(feature = "ipv6_is_unique_local", since = "CURRENT_RUSTC_VERSION")]
1605
+ #[rustc_const_stable(feature = "ipv6_is_unique_local", since = "CURRENT_RUSTC_VERSION")]
1607
1606
pub const fn is_unique_local(&self) -> bool {
1608
1607
(self.segments()[0] & 0xfe00) == 0xfc00
1609
1608
}
@@ -1665,8 +1664,6 @@ impl Ipv6Addr {
1665
1664
/// # Examples
1666
1665
///
1667
1666
/// ```
1668
- /// #![feature(ip)]
1669
- ///
1670
1667
/// use std::net::Ipv6Addr;
1671
1668
///
1672
1669
/// // The loopback address (`::1`) does not actually have link-local scope.
@@ -1680,9 +1677,10 @@ impl Ipv6Addr {
1680
1677
/// assert_eq!(Ipv6Addr::new(0xfe80, 0, 0, 1, 0, 0, 0, 0).is_unicast_link_local(), true);
1681
1678
/// assert_eq!(Ipv6Addr::new(0xfe81, 0, 0, 0, 0, 0, 0, 0).is_unicast_link_local(), true);
1682
1679
/// ```
1683
- #[unstable(feature = "ip", issue = "27709")]
1684
1680
#[must_use]
1685
1681
#[inline]
1682
+ #[stable(feature = "ipv6_is_unique_local", since = "CURRENT_RUSTC_VERSION")]
1683
+ #[rustc_const_stable(feature = "ipv6_is_unique_local", since = "CURRENT_RUSTC_VERSION")]
1686
1684
pub const fn is_unicast_link_local(&self) -> bool {
1687
1685
(self.segments()[0] & 0xffc0) == 0xfe80
1688
1686
}
0 commit comments