@@ -325,8 +325,10 @@ impl str {
325325
326326 /// Returns a subslice of `str`.
327327 ///
328- /// This is the non-panicking alternative to indexing the `str`. Returns `None` whenever
329- /// equivalent indexing operation would panic.
328+ /// This is the non-panicking alternative to indexing the `str`. Returns
329+ /// [`None`] whenever equivalent indexing operation would panic.
330+ ///
331+ /// [`None`]: option/enum.Option.html#variant.None
330332 ///
331333 /// # Examples
332334 ///
@@ -346,8 +348,10 @@ impl str {
346348
347349 /// Returns a mutable subslice of `str`.
348350 ///
349- /// This is the non-panicking alternative to indexing the `str`. Returns `None` whenever
350- /// equivalent indexing operation would panic.
351+ /// This is the non-panicking alternative to indexing the `str`. Returns
352+ /// [`None`] whenever equivalent indexing operation would panic.
353+ ///
354+ /// [`None`]: option/enum.Option.html#variant.None
351355 ///
352356 /// # Examples
353357 ///
@@ -570,7 +574,7 @@ impl str {
570574 core_str:: StrExt :: split_at_mut ( self , mid)
571575 }
572576
573- /// Returns an iterator over the `char`s of a string slice.
577+ /// Returns an iterator over the [ `char`] s of a string slice.
574578 ///
575579 /// As a string slice consists of valid UTF-8, we can iterate through a
576580 /// string slice by [`char`]. This method returns such an iterator.
@@ -1657,13 +1661,13 @@ impl str {
16571661
16581662 /// Parses this string slice into another type.
16591663 ///
1660- /// Because `parse() ` is so general, it can cause problems with type
1661- /// inference. As such, `parse() ` is one of the few times you'll see
1664+ /// Because `parse` is so general, it can cause problems with type
1665+ /// inference. As such, `parse` is one of the few times you'll see
16621666 /// the syntax affectionately known as the 'turbofish': `::<>`. This
16631667 /// helps the inference algorithm understand specifically which type
16641668 /// you're trying to parse into.
16651669 ///
1666- /// `parse() ` can parse any type that implements the [`FromStr`] trait.
1670+ /// `parse` can parse any type that implements the [`FromStr`] trait.
16671671 ///
16681672 /// [`FromStr`]: str/trait.FromStr.html
16691673 ///
@@ -1746,7 +1750,7 @@ impl str {
17461750 ///
17471751 /// `replacen` creates a new [`String`], and copies the data from this string slice into it.
17481752 /// While doing so, it attempts to find matches of a pattern. If it finds any, it
1749- /// replaces them with the replacement string slice at most `N ` times.
1753+ /// replaces them with the replacement string slice at most `count ` times.
17501754 ///
17511755 /// [`String`]: string/struct.String.html
17521756 ///
@@ -1892,33 +1896,40 @@ impl str {
18921896 return s;
18931897 }
18941898
1895- /// Escapes each char in `s` with `char::escape_debug`.
1899+ /// Escapes each char in `s` with [`char::escape_debug`].
1900+ ///
1901+ /// [`char::escape_debug`]: primitive.char.html#method.escape_debug
18961902 #[ unstable( feature = "str_escape" ,
18971903 reason = "return type may change to be an iterator" ,
18981904 issue = "27791" ) ]
18991905 pub fn escape_debug ( & self ) -> String {
19001906 self . chars ( ) . flat_map ( |c| c. escape_debug ( ) ) . collect ( )
19011907 }
19021908
1903- /// Escapes each char in `s` with `char::escape_default`.
1909+ /// Escapes each char in `s` with [`char::escape_default`].
1910+ ///
1911+ /// [`char::escape_default`]: primitive.char.html#method.escape_default
19041912 #[ unstable( feature = "str_escape" ,
19051913 reason = "return type may change to be an iterator" ,
19061914 issue = "27791" ) ]
19071915 pub fn escape_default ( & self ) -> String {
19081916 self . chars ( ) . flat_map ( |c| c. escape_default ( ) ) . collect ( )
19091917 }
19101918
1911- /// Escapes each char in `s` with `char::escape_unicode`.
1919+ /// Escapes each char in `s` with [`char::escape_unicode`].
1920+ ///
1921+ /// [`char::escape_unicode`]: primitive.char.html#method.escape_unicode
19121922 #[ unstable( feature = "str_escape" ,
19131923 reason = "return type may change to be an iterator" ,
19141924 issue = "27791" ) ]
19151925 pub fn escape_unicode ( & self ) -> String {
19161926 self . chars ( ) . flat_map ( |c| c. escape_unicode ( ) ) . collect ( )
19171927 }
19181928
1919- /// Converts a `Box<str>` into a [`String`] without copying or allocating.
1929+ /// Converts a [ `Box<str>`] into a [`String`] without copying or allocating.
19201930 ///
19211931 /// [`String`]: string/struct.String.html
1932+ /// [`Box<str>`]: boxed/struct.Box.html
19221933 ///
19231934 /// # Examples
19241935 ///
0 commit comments