4
4
//!
5
5
//! For more details, see the [`std::str`] module.
6
6
//!
7
- //! [`std::str`]: self
7
+ //! [`std::str`]: ../../std/str/index.html
8
8
9
9
#![ stable( feature = "rust1" , since = "1.0.0" ) ]
10
10
@@ -84,9 +84,6 @@ pub trait FromStr: Sized {
84
84
/// when the string is ill-formatted return an error specific to the
85
85
/// inside [`Err`]. The error type is specific to implementation of the trait.
86
86
///
87
- /// [`Ok`]: ../../std/result/enum.Result.html#variant.Ok
88
- /// [`Err`]: ../../std/result/enum.Result.html#variant.Err
89
- ///
90
87
/// # Examples
91
88
///
92
89
/// Basic usage with [`i32`][ithirtytwo], a type that implements `FromStr`:
@@ -269,11 +266,9 @@ impl Utf8Error {
269
266
///
270
267
/// If you are sure that the byte slice is valid UTF-8, and you don't want to
271
268
/// incur the overhead of the validity check, there is an unsafe version of
272
- /// this function, [`from_utf8_unchecked`][fromutf8u] , which has the same
269
+ /// this function, [`from_utf8_unchecked`], which has the same
273
270
/// behavior but skips the check.
274
271
///
275
- /// [fromutf8u]: fn.from_utf8_unchecked.html
276
- ///
277
272
/// If you need a `String` instead of a `&str`, consider
278
273
/// [`String::from_utf8`][string].
279
274
///
@@ -318,11 +313,9 @@ impl Utf8Error {
318
313
/// assert!(str::from_utf8(&sparkle_heart).is_err());
319
314
/// ```
320
315
///
321
- /// See the docs for [`Utf8Error`][error] for more details on the kinds of
316
+ /// See the docs for [`Utf8Error`] for more details on the kinds of
322
317
/// errors that can be returned.
323
318
///
324
- /// [error]: struct.Utf8Error.html
325
- ///
326
319
/// A "stack allocated string":
327
320
///
328
321
/// ```
@@ -371,10 +364,8 @@ pub fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
371
364
///
372
365
/// assert!(str::from_utf8_mut(&mut invalid).is_err());
373
366
/// ```
374
- /// See the docs for [`Utf8Error`][error] for more details on the kinds of
367
+ /// See the docs for [`Utf8Error`] for more details on the kinds of
375
368
/// errors that can be returned.
376
- ///
377
- /// [error]: struct.Utf8Error.html
378
369
#[ stable( feature = "str_mut_extras" , since = "1.20.0" ) ]
379
370
pub fn from_utf8_mut ( v : & mut [ u8 ] ) -> Result < & mut str , Utf8Error > {
380
371
run_utf8_validation ( v) ?;
@@ -385,9 +376,7 @@ pub fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
385
376
/// Converts a slice of bytes to a string slice without checking
386
377
/// that the string contains valid UTF-8.
387
378
///
388
- /// See the safe version, [`from_utf8`][fromutf8], for more information.
389
- ///
390
- /// [fromutf8]: fn.from_utf8.html
379
+ /// See the safe version, [`from_utf8`], for more information.
391
380
///
392
381
/// # Safety
393
382
///
0 commit comments