@@ -318,8 +318,10 @@ impl str {
318318
319319 /// Returns a subslice of `str`.
320320 ///
321- /// This is the non-panicking alternative to indexing the `str`. Returns `None` whenever
322- /// equivalent indexing operation would panic.
321+ /// This is the non-panicking alternative to indexing the `str`. Returns
322+ /// [`None`] whenever equivalent indexing operation would panic.
323+ ///
324+ /// [`None`]: option/enum.Option.html#variant.None
323325 ///
324326 /// # Examples
325327 ///
@@ -339,8 +341,10 @@ impl str {
339341
340342 /// Returns a mutable subslice of `str`.
341343 ///
342- /// This is the non-panicking alternative to indexing the `str`. Returns `None` whenever
343- /// equivalent indexing operation would panic.
344+ /// This is the non-panicking alternative to indexing the `str`. Returns
345+ /// [`None`] whenever equivalent indexing operation would panic.
346+ ///
347+ /// [`None`]: option/enum.Option.html#variant.None
344348 ///
345349 /// # Examples
346350 ///
@@ -563,7 +567,7 @@ impl str {
563567 core_str:: StrExt :: split_at_mut ( self , mid)
564568 }
565569
566- /// Returns an iterator over the `char`s of a string slice.
570+ /// Returns an iterator over the [ `char`] s of a string slice.
567571 ///
568572 /// As a string slice consists of valid UTF-8, we can iterate through a
569573 /// string slice by [`char`]. This method returns such an iterator.
@@ -1650,13 +1654,13 @@ impl str {
16501654
16511655 /// Parses this string slice into another type.
16521656 ///
1653- /// Because `parse() ` is so general, it can cause problems with type
1654- /// inference. As such, `parse() ` is one of the few times you'll see
1657+ /// Because `parse` is so general, it can cause problems with type
1658+ /// inference. As such, `parse` is one of the few times you'll see
16551659 /// the syntax affectionately known as the 'turbofish': `::<>`. This
16561660 /// helps the inference algorithm understand specifically which type
16571661 /// you're trying to parse into.
16581662 ///
1659- /// `parse() ` can parse any type that implements the [`FromStr`] trait.
1663+ /// `parse` can parse any type that implements the [`FromStr`] trait.
16601664 ///
16611665 /// [`FromStr`]: str/trait.FromStr.html
16621666 ///
@@ -1739,7 +1743,7 @@ impl str {
17391743 ///
17401744 /// `replacen` creates a new [`String`], and copies the data from this string slice into it.
17411745 /// While doing so, it attempts to find matches of a pattern. If it finds any, it
1742- /// replaces them with the replacement string slice at most `N ` times.
1746+ /// replaces them with the replacement string slice at most `count ` times.
17431747 ///
17441748 /// [`String`]: string/struct.String.html
17451749 ///
@@ -1885,33 +1889,40 @@ impl str {
18851889 return s;
18861890 }
18871891
1888- /// Escapes each char in `s` with `char::escape_debug`.
1892+ /// Escapes each char in `s` with [`char::escape_debug`].
1893+ ///
1894+ /// [`char::escape_debug`]: primitive.char.html#method.escape_debug
18891895 #[ unstable( feature = "str_escape" ,
18901896 reason = "return type may change to be an iterator" ,
18911897 issue = "27791" ) ]
18921898 pub fn escape_debug ( & self ) -> String {
18931899 self . chars ( ) . flat_map ( |c| c. escape_debug ( ) ) . collect ( )
18941900 }
18951901
1896- /// Escapes each char in `s` with `char::escape_default`.
1902+ /// Escapes each char in `s` with [`char::escape_default`].
1903+ ///
1904+ /// [`char::escape_default`]: primitive.char.html#method.escape_default
18971905 #[ unstable( feature = "str_escape" ,
18981906 reason = "return type may change to be an iterator" ,
18991907 issue = "27791" ) ]
19001908 pub fn escape_default ( & self ) -> String {
19011909 self . chars ( ) . flat_map ( |c| c. escape_default ( ) ) . collect ( )
19021910 }
19031911
1904- /// Escapes each char in `s` with `char::escape_unicode`.
1912+ /// Escapes each char in `s` with [`char::escape_unicode`].
1913+ ///
1914+ /// [`char::escape_unicode`]: primitive.char.html#method.escape_unicode
19051915 #[ unstable( feature = "str_escape" ,
19061916 reason = "return type may change to be an iterator" ,
19071917 issue = "27791" ) ]
19081918 pub fn escape_unicode ( & self ) -> String {
19091919 self . chars ( ) . flat_map ( |c| c. escape_unicode ( ) ) . collect ( )
19101920 }
19111921
1912- /// Converts a `Box<str>` into a [`String`] without copying or allocating.
1922+ /// Converts a [ `Box<str>`] into a [`String`] without copying or allocating.
19131923 ///
19141924 /// [`String`]: string/struct.String.html
1925+ /// [`Box<str>`]: boxed/struct.Box.html
19151926 ///
19161927 /// # Examples
19171928 ///
0 commit comments