diff options
Diffstat (limited to 'src/libstd/old_path')
| -rw-r--r-- | src/libstd/old_path/mod.rs | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/libstd/old_path/mod.rs b/src/libstd/old_path/mod.rs index 9c88533d3ba..22561c96f63 100644 --- a/src/libstd/old_path/mod.rs +++ b/src/libstd/old_path/mod.rs @@ -144,12 +144,10 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// /// # Examples /// - /// ``` + /// ```no_run /// # #![feature(old_path)] - /// use std::old_path::{Path, GenericPath}; - /// # foo(); - /// # #[cfg(windows)] fn foo() {} - /// # #[cfg(unix)] fn foo() { + /// # fn main() { + /// use std::old_path::Path; /// let path = Path::new("foo/bar"); /// # } /// ``` @@ -170,12 +168,10 @@ pub trait GenericPath: Clone + GenericPathUnsafe { /// /// # Examples /// - /// ``` + /// ```no_run /// # #![feature(old_path)] - /// use std::old_path::{Path, GenericPath}; - /// # foo(); - /// # #[cfg(windows)] fn foo() {} - /// # #[cfg(unix)] fn foo() { + /// # fn main() { + /// use std::old_path::Path; /// let x: &[u8] = b"foo\0"; /// assert!(Path::new_opt(x).is_none()); /// # } |
