Add feature gate to doctests.

This commit is contained in:
J. Cliff Dyer 2017-09-08 17:20:31 -04:00
parent ad170f2339
commit 8b6122f8b8

View File

@ -347,6 +347,7 @@ impl Ipv4Addr {
/// # Examples
///
/// ```
/// #![feature(ip)]
/// use std::net::Ipv4Addr;
///
/// let addr = Ipv4Addr::localhost();
@ -361,6 +362,7 @@ impl Ipv4Addr {
/// # Examples
///
/// ```
/// #![feature(ip)]
/// use std::net::Ipv4Addr;
///
/// let addr = Ipv4Addr::unspecified();
@ -821,6 +823,7 @@ impl Ipv6Addr {
/// # Examples
///
/// ```
/// #![feature(ip)]
/// use std::net::Ipv6Addr;
///
/// let addr = Ipv6Addr::localhost();
@ -835,6 +838,7 @@ impl Ipv6Addr {
/// # Examples
///
/// ```
/// #![feature(ip)]
/// use std::net::Ipv6Addr;
///
/// let addr = Ipv6Addr::unspecified();