diff options
Diffstat (limited to 'library/std')
| -rw-r--r-- | library/std/src/keyword_docs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/os/unix/fs.rs | 2 | ||||
| -rw-r--r-- | library/std/src/path.rs | 2 | ||||
| -rw-r--r-- | library/std/src/primitive_docs.rs | 1 | ||||
| -rw-r--r-- | library/std/src/process.rs | 2 |
5 files changed, 5 insertions, 4 deletions
diff --git a/library/std/src/keyword_docs.rs b/library/std/src/keyword_docs.rs index be6dc7768af..eb46f4e54bb 100644 --- a/library/std/src/keyword_docs.rs +++ b/library/std/src/keyword_docs.rs @@ -2287,7 +2287,7 @@ mod use_keyword {} /// # #![allow(dead_code)] /// pub enum Cow<'a, B> /// where -/// B: 'a + ToOwned + ?Sized, +/// B: ToOwned + ?Sized, /// { /// Borrowed(&'a B), /// Owned(<B as ToOwned>::Owned), diff --git a/library/std/src/os/unix/fs.rs b/library/std/src/os/unix/fs.rs index a0e664acd13..1e1c3693105 100644 --- a/library/std/src/os/unix/fs.rs +++ b/library/std/src/os/unix/fs.rs @@ -368,7 +368,7 @@ pub trait OpenOptionsExt { /// /// ```no_run /// # #![feature(rustc_private)] - /// extern crate libc; + /// use libc; /// use std::fs::OpenOptions; /// use std::os::unix::fs::OpenOptionsExt; /// diff --git a/library/std/src/path.rs b/library/std/src/path.rs index e5abd02a1bc..19d19bb045e 100644 --- a/library/std/src/path.rs +++ b/library/std/src/path.rs @@ -117,7 +117,7 @@ use crate::sys::path::{is_sep_byte, is_verbatim_sep, parse_prefix, MAIN_SEP_STR} /// use std::path::Prefix::*; /// use std::ffi::OsStr; /// -/// fn get_path_prefix(s: &str) -> Prefix { +/// fn get_path_prefix(s: &str) -> Prefix<'_> { /// let path = Path::new(s); /// match path.components().next().unwrap() { /// Component::Prefix(prefix_component) => prefix_component.kind(), diff --git a/library/std/src/primitive_docs.rs b/library/std/src/primitive_docs.rs index 3df990e5dd9..b8230042875 100644 --- a/library/std/src/primitive_docs.rs +++ b/library/std/src/primitive_docs.rs @@ -555,6 +555,7 @@ impl Copy for () { /// /// ``` /// # #![feature(rustc_private)] +/// #[allow(unused_extern_crates)] /// extern crate libc; /// /// use std::mem; diff --git a/library/std/src/process.rs b/library/std/src/process.rs index 0ab72f7ea7a..41e450499ce 100644 --- a/library/std/src/process.rs +++ b/library/std/src/process.rs @@ -1835,7 +1835,7 @@ impl ExitCode { /// # use std::fmt; /// # enum UhOhError { GenericProblem, Specific, WithCode { exit_code: ExitCode, _x: () } } /// # impl fmt::Display for UhOhError { - /// # fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result { unimplemented!() } + /// # fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result { unimplemented!() } /// # } /// // there's no way to gracefully recover from an UhOhError, so we just /// // print a message and exit |
