Add intra-doc link in str::xxx_prefix · qinheping/verify-rust-std@93839e7 (original) (raw)

Original file line number Diff line number Diff line change
@@ -2169,7 +2169,7 @@ impl str {
2169 2169 /// Returns a string slice with the prefix removed.
2170 2170 ///
2171 2171 /// If the string starts with the pattern `prefix`, returns the substring after the prefix,
2172 - /// wrapped in `Some`. Unlike `trim_start_matches`, this method removes the prefix exactly once.
2172 + /// wrapped in `Some`. Unlike [`trim_start_matches`], this method removes the prefix exactly once.
2173 2173 ///
2174 2174 /// If the string does not start with `prefix`, returns `None`.
2175 2175 ///
@@ -2178,6 +2178,7 @@ impl str {
2178 2178 ///
2179 2179 /// [`char`]: prim@char
2180 2180 /// [pattern]: self::pattern
2181 + /// [`trim_start_matches`]: Self::trim_start_matches
2181 2182 ///
2182 2183 /// # Examples
2183 2184 ///
@@ -2196,7 +2197,7 @@ impl str {
2196 2197 /// Returns a string slice with the suffix removed.
2197 2198 ///
2198 2199 /// If the string ends with the pattern `suffix`, returns the substring before the suffix,
2199 - /// wrapped in `Some`. Unlike `trim_end_matches`, this method removes the suffix exactly once.
2200 + /// wrapped in `Some`. Unlike [`trim_end_matches`], this method removes the suffix exactly once.
2200 2201 ///
2201 2202 /// If the string does not end with `suffix`, returns `None`.
2202 2203 ///
@@ -2205,6 +2206,7 @@ impl str {
2205 2206 ///
2206 2207 /// [`char`]: prim@char
2207 2208 /// [pattern]: self::pattern
2209 + /// [`trim_end_matches`]: Self::trim_end_matches
2208 2210 ///
2209 2211 /// # Examples
2210 2212 ///