Skip to content

Commit 9d35bf2

Browse files
committed
Fix intradoc links.
1 parent ca4f31c commit 9d35bf2

File tree

2 files changed

+41
-41
lines changed

2 files changed

+41
-41
lines changed

library/core/src/needle/ext.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,10 @@ where
325325

326326
generate_pattern_iterators! {
327327
forward:
328-
/// Created with the function [`matches`].
328+
/// Created with the function [`matches`](self::matches).
329329
struct Matches;
330330
reverse:
331-
/// Created with the function [`rmatches`].
331+
/// Created with the function [`rmatches`](self::rmatches).
332332
struct RMatches;
333333
stability:
334334
internal:

library/core/src/needle/needle.rs

+39-39
Original file line numberDiff line numberDiff line change
@@ -90,17 +90,17 @@ pub unsafe trait Searcher<A: Hay + ?Sized> {
9090
///
9191
/// This method is used to support the following standard algorithms:
9292
///
93-
/// * [`matches`](std::needle::ext::matches)
94-
/// * [`contains`](std::needle::ext::contains)
95-
/// * [`match_indices`](std::needle::ext::match_indices)
96-
/// * [`find`](std::needle::ext::find)
97-
/// * [`match_ranges`](std::needle::ext::match_ranges)
98-
/// * [`find_range`](std::needle::ext::find_range)
99-
/// * [`split`](std::needle::ext::split)
100-
/// * [`split_terminator`](std::needle::ext::split_terminator)
101-
/// * [`splitn`](std::needle::ext::splitn)
102-
/// * [`replace_with`](std::needle::ext::replace_with)
103-
/// * [`replacen_with`](std::needle::ext::replacen_with)
93+
/// * [`matches`](super::ext::matches)
94+
/// * [`contains`](super::ext::contains)
95+
/// * [`match_indices`](super::ext::match_indices)
96+
/// * [`find`](super::ext::find)
97+
/// * [`match_ranges`](super::ext::match_ranges)
98+
/// * [`find_range`](super::ext::find_range)
99+
/// * [`split`](super::ext::split)
100+
/// * [`split_terminator`](super::ext::split_terminator)
101+
/// * [`splitn`](super::ext::splitn)
102+
/// * [`replace_with`](super::ext::replace_with)
103+
/// * [`replacen_with`](super::ext::replacen_with)
104104
///
105105
/// The hay and the restricted range for searching can be recovered by
106106
/// calling `span`[`.into_parts()`](Span::into_parts). The range returned
@@ -135,7 +135,7 @@ pub unsafe trait Consumer<A: Hay + ?Sized> {
135135
/// Checks if the needle can be found at the beginning of the span.
136136
///
137137
/// This method is used to implement the standard algorithm
138-
/// [`starts_with()`](std::needle::ext::starts_with) as well as providing the default
138+
/// [`starts_with()`](super::ext::starts_with) as well as providing the default
139139
/// implementation for [`.trim_start()`](Consumer::trim_start).
140140
///
141141
/// The hay and the restricted range for searching can be recovered by
@@ -150,7 +150,7 @@ pub unsafe trait Consumer<A: Hay + ?Sized> {
150150
/// Repeatedly removes prefixes of the hay which matches the needle.
151151
///
152152
/// This method is used to implement the standard algorithm
153-
/// [`trim_start()`](std::needle::ext::trim_start).
153+
/// [`trim_start()`](super::ext::trim_start).
154154
///
155155
/// Returns the start index of the slice after all prefixes are removed.
156156
///
@@ -189,14 +189,14 @@ pub unsafe trait ReverseSearcher<A: Hay + ?Sized>: Searcher<A> {
189189
///
190190
/// This method is used to support the following standard algorithms:
191191
///
192-
/// * [`rmatches`](std::needle::ext::rmatches)
193-
/// * [`rmatch_indices`](std::needle::ext::rmatch_indices)
194-
/// * [`rfind`](std::needle::ext::find)
195-
/// * [`rmatch_ranges`](std::needle::ext::rmatch_ranges)
196-
/// * [`rfind_range`](std::needle::ext::rfind_range)
197-
/// * [`rsplit`](std::needle::ext::rsplit)
198-
/// * [`rsplit_terminator`](std::needle::ext::rsplit_terminator)
199-
/// * [`rsplitn`](std::needle::ext::rsplitn)
192+
/// * [`rmatches`](super::ext::rmatches)
193+
/// * [`rmatch_indices`](super::ext::rmatch_indices)
194+
/// * [`rfind`](super::ext::find)
195+
/// * [`rmatch_ranges`](super::ext::rmatch_ranges)
196+
/// * [`rfind_range`](super::ext::rfind_range)
197+
/// * [`rsplit`](super::ext::rsplit)
198+
/// * [`rsplit_terminator`](super::ext::rsplit_terminator)
199+
/// * [`rsplitn`](super::ext::rsplitn)
200200
///
201201
/// The hay and the restricted range for searching can be recovered by
202202
/// calling `span`[`.into_parts()`](Span::into_parts). The returned range
@@ -221,7 +221,7 @@ pub unsafe trait ReverseConsumer<A: Hay + ?Sized>: Consumer<A> {
221221
/// Checks if the needle can be found at the end of the span.
222222
///
223223
/// This method is used to implement the standard algorithm
224-
/// [`ends_with()`](std::needle::ext::ends_with) as well as providing the default
224+
/// [`ends_with()`](super::ext::ends_with) as well as providing the default
225225
/// implementation for [`.trim_end()`](ReverseConsumer::trim_end).
226226
///
227227
/// The hay and the restricted range for searching can be recovered by
@@ -236,7 +236,7 @@ pub unsafe trait ReverseConsumer<A: Hay + ?Sized>: Consumer<A> {
236236
/// Repeatedly removes suffixes of the hay which matches the needle.
237237
///
238238
/// This method is used to implement the standard algorithm
239-
/// [`trim_end()`](std::needle::ext::trim_end).
239+
/// [`trim_end()`](super::ext::trim_end).
240240
///
241241
/// A fast generic implementation in terms of
242242
/// [`.rconsume()`](ReverseConsumer::rconsume) is provided by default.
@@ -261,36 +261,36 @@ pub unsafe trait ReverseConsumer<A: Hay + ?Sized>: Consumer<A> {
261261
/// A searcher which can be searched from both end with consistent results.
262262
///
263263
/// Implementing this marker trait enables the following standard algorithms to
264-
/// return [`DoubleEndedIterator`](std::iter::DoubleEndedIterator)s:
264+
/// return [`DoubleEndedIterator`](crate::iter::DoubleEndedIterator)s:
265265
///
266-
/// * [`matches`](std::needle::ext::matches) /
267-
/// [`rmatches`](std::needle::ext::rmatches)
268-
/// * [`match_indices`](std::needle::ext::match_indices) /
269-
/// [`rmatch_indices`](std::needle::ext::rmatch_indices)
270-
/// * [`match_ranges`](std::needle::ext::match_ranges) /
271-
/// [`rmatch_ranges`](std::needle::ext::rmatch_ranges)
272-
/// * [`split`](std::needle::ext::split) /
273-
/// [`rsplit`](std::needle::ext::rsplit)
274-
/// * [`split_terminator`](std::needle::ext::split_terminator) /
275-
/// [`rsplit_terminator`](std::needle::ext::rsplit_terminator)
276-
/// * [`splitn`](std::needle::ext::splitn) /
277-
/// [`rsplitn`](std::needle::ext::rsplitn)
266+
/// * [`matches`](super::ext::matches) /
267+
/// [`rmatches`](super::ext::rmatches)
268+
/// * [`match_indices`](super::ext::match_indices) /
269+
/// [`rmatch_indices`](super::ext::rmatch_indices)
270+
/// * [`match_ranges`](super::ext::match_ranges) /
271+
/// [`rmatch_ranges`](super::ext::rmatch_ranges)
272+
/// * [`split`](super::ext::split) /
273+
/// [`rsplit`](super::ext::rsplit)
274+
/// * [`split_terminator`](super::ext::split_terminator) /
275+
/// [`rsplit_terminator`](super::ext::rsplit_terminator)
276+
/// * [`splitn`](super::ext::splitn) /
277+
/// [`rsplitn`](super::ext::rsplitn)
278278
pub unsafe trait DoubleEndedSearcher<A: Hay + ?Sized>: ReverseSearcher<A> {}
279279

280280
/// A consumer which can be searched from both end with consistent results.
281281
///
282282
/// It is used to support the following standard algorithm:
283283
///
284-
/// * [`trim`](std::needle::ext::trim)
284+
/// * [`trim`](super::ext::trim)
285285
///
286286
/// The `trim` function is implemented by calling
287-
/// [`trim_start`](std::needle::ext::trim_start) and [`trim_end`](std::needle::ext::trim_end)
287+
/// [`trim_start`](super::ext::trim_start) and [`trim_end`](super::ext::trim_end)
288288
/// together. This trait encodes the fact that we can call these two functions in any order.
289289
pub unsafe trait DoubleEndedConsumer<A: Hay + ?Sized>: ReverseConsumer<A> {}
290290

291291
/// A needle, a type which can be converted into a searcher.
292292
///
293-
/// When using search algorithms like [`split()`](std::needle::ext::split), users will
293+
/// When using search algorithms like [`split()`](super::ext::split), users will
294294
/// search with a `Needle` e.g. a `&str`. A needle is usually stateless,
295295
/// however for efficient searching, we often need some preprocessing and
296296
/// maintain a mutable state. The preprocessed structure is called the

0 commit comments

Comments
 (0)