diff options
| author | Corey Farwell <coreyf@rwell.org> | 2018-08-11 14:09:59 -0400 |
|---|---|---|
| committer | Corey Farwell <coreyf@rwell.org> | 2018-08-11 15:42:35 -0400 |
| commit | ec18991492849393a8b3ae4e0c70a22319e8ea60 (patch) | |
| tree | 2917703d35382c3e6dcf5ca6e48b8aa0c2f50f0c /src/libcore | |
| parent | 0aa8d0320266b5579428312095fe49af05ada972 (diff) | |
| download | rust-ec18991492849393a8b3ae4e0c70a22319e8ea60.tar.gz rust-ec18991492849393a8b3ae4e0c70a22319e8ea60.zip | |
Add links to std::char::REPLACEMENT_CHARACTER from docs.
There are a few places where we mention the replacement character in the docs, and it could be helpful for users to utilize the constant which is available in the standard library, so let’s link to it!
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/str/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 356534a9187..54b17b0fbb3 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -244,7 +244,10 @@ impl Utf8Error { /// The length provided is that of the invalid byte sequence /// that starts at the index given by `valid_up_to()`. /// Decoding should resume after that sequence - /// (after inserting a U+FFFD REPLACEMENT CHARACTER) in case of lossy decoding. + /// (after inserting a [`U+FFFD REPLACEMENT CHARACTER`][U+FFFD]) in case of + /// lossy decoding. + /// + /// [U+FFFD]: ../../std/char/constant.REPLACEMENT_CHARACTER.html #[stable(feature = "utf8_error_error_len", since = "1.20.0")] pub fn error_len(&self) -> Option<usize> { self.error_len.map(|len| len as usize) |
