Skip to content

Commit 5198072

Browse files
committed
Added links to from_utf8 methods in Utf8Error
1 parent 40feadb commit 5198072

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/libcore/str/mod.rs

+8-3
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,16 @@ impl fmt::Display for ParseBoolError {
152152
Section: Creating a string
153153
*/
154154

155-
/// Errors which can occur when attempting to interpret a sequence of `u8`
155+
/// Errors which can occur when attempting to interpret a sequence of [`u8`]
156156
/// as a string.
157157
///
158-
/// As such, the `from_utf8` family of functions and methods for both `String`s
159-
/// and `&str`s make use of this error, for example.
158+
/// [`u8`]: ../../std/primitive.u8.html
159+
///
160+
/// As such, the `from_utf8` family of functions and methods for both [`String`]s
161+
/// and [`&str`]s make use of this error, for example.
162+
///
163+
/// [`String`]: ../../std/string/struct.String.html#method.from_utf8
164+
/// [`&str`]: ../../std/str/fn.from_utf8.html
160165
#[derive(Copy, Eq, PartialEq, Clone, Debug)]
161166
#[stable(feature = "rust1", since = "1.0.0")]
162167
pub struct Utf8Error {

0 commit comments

Comments
 (0)