diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index a9e72d6a4a8..e731156afa0 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -318,7 +318,7 @@ pub fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> { /// /// assert_eq!("Hello, Rust!", outstr); /// ``` -/// +/// /// Incorrect bytes: /// /// ``` @@ -331,6 +331,8 @@ pub fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> { /// ``` /// See the docs for [`Utf8Error`][error] for more details on the kinds of /// errors that can be returned. +/// +/// [error]: struct.Utf8Error.html #[stable(feature = "str_mut_extras", since = "1.20.0")] pub fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> { run_utf8_validation(v)?;