@@ -157,7 +157,7 @@ impl Utf8Error {
157
157
/// // std::str::from_utf8 returns a Utf8Error
158
158
/// let error = str::from_utf8(&sparkle_heart).unwrap_err();
159
159
///
160
- /// // the first byte is invalid here
160
+ /// // the second byte is invalid here
161
161
/// assert_eq!(1, error.valid_up_to());
162
162
/// ```
163
163
#[ stable( feature = "utf8_error" , since = "1.5.0" ) ]
@@ -174,10 +174,10 @@ impl Utf8Error {
174
174
///
175
175
/// If you are sure that the byte slice is valid UTF-8, and you don't want to
176
176
/// incur the overhead of the validity check, there is an unsafe version of
177
- /// this function, [`from_utf8_unchecked()`][fromutf8 ], which has the same
177
+ /// this function, [`from_utf8_unchecked()`][fromutf8u ], which has the same
178
178
/// behavior but skips the check.
179
179
///
180
- /// [fromutf8 ]: fn.from_utf8 .html
180
+ /// [fromutf8u ]: fn.from_utf8_unchecked .html
181
181
///
182
182
/// If you need a `String` instead of a `&str`, consider
183
183
/// [`String::from_utf8()`][string].
@@ -275,7 +275,7 @@ unsafe fn from_raw_parts_mut<'a>(p: *mut u8, len: usize) -> &'a mut str {
275
275
/// Converts a slice of bytes to a string slice without checking
276
276
/// that the string contains valid UTF-8.
277
277
///
278
- /// See the safe version, [`from_utf8()`][fromutf8], for more.
278
+ /// See the safe version, [`from_utf8()`][fromutf8], for more information .
279
279
///
280
280
/// [fromutf8]: fn.from_utf8.html
281
281
///
0 commit comments