diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-04-06 18:52:18 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-04-07 17:54:34 -0700 |
| commit | ba402312fed8134a9919bbb79bcd9978b92e4dee (patch) | |
| tree | 632e99d9adc3ca92950a86f1b4ba97426057bfce /src/libstd/old_path | |
| parent | 179719d45023e549a62ec7a584d554408c6d241d (diff) | |
| download | rust-ba402312fed8134a9919bbb79bcd9978b92e4dee.tar.gz rust-ba402312fed8134a9919bbb79bcd9978b92e4dee.zip | |
std: Deny most warnings in doctests
Allow a few specific ones but otherwise this helps ensure that our examples are squeaky clean! Closes #18199
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()); /// # } |
