Skip to content

Commit

Permalink
Rollup merge of rust-lang#40992 - donniebishop:utf8err_linking, r=ale…
Browse files Browse the repository at this point in the history
…xcrichton

Added links to from_utf8 methods in Utf8Error

Referencing  rust-lang#29375. Linked the `from_utf8` methods for both `String` and `str` in the description. Also linked the `u8` to its documentation
  • Loading branch information
frewsxcv authored Apr 3, 2017
2 parents b29de46 + 5198072 commit da961f2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/libcore/str/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,16 @@ impl fmt::Display for ParseBoolError {
Section: Creating a string
*/

/// Errors which can occur when attempting to interpret a sequence of `u8`
/// Errors which can occur when attempting to interpret a sequence of [`u8`]
/// as a string.
///
/// As such, the `from_utf8` family of functions and methods for both `String`s
/// and `&str`s make use of this error, for example.
/// [`u8`]: ../../std/primitive.u8.html
///
/// As such, the `from_utf8` family of functions and methods for both [`String`]s
/// and [`&str`]s make use of this error, for example.
///
/// [`String`]: ../../std/string/struct.String.html#method.from_utf8
/// [`&str`]: ../../std/str/fn.from_utf8.html
#[derive(Copy, Eq, PartialEq, Clone, Debug)]
#[stable(feature = "rust1", since = "1.0.0")]
pub struct Utf8Error {
Expand Down

0 comments on commit da961f2

Please sign in to comment.