1212//! # Examples
1313//!
1414//! [`Pattern`] is [implemented][pattern-impls] in the stable API for
15- //! [`&str`], [`char`], slices of [`char`], and functions and closures
15+ //! [`&str`][`str`] , [`char`], slices of [`char`], and functions and closures
1616//! implementing `FnMut(char) -> bool`.
1717//!
1818//! ```
2828//! assert_eq!(s.find(|c: char| c.is_ascii_punctuation()), Some(35));
2929//! ```
3030//!
31- //! [`&str`]: ../../../std/primitive.str.html
32- //! [`char`]: ../../../std/primitive.char.html
33- //! [`str`]: ../../../std/primitive.str.html
34- //! [`DoubleEndedSearcher`]: trait.DoubleEndedSearcher.html
35- //! [`Pattern`]: trait.Pattern.html
36- //! [`ReverseSearcher`]: trait.ReverseSearcher.html
37- //! [`Searcher`]: trait.Searcher.html
3831//! [pattern-impls]: trait.Pattern.html#implementors
3932
4033#![ unstable(
@@ -75,6 +68,7 @@ use crate::slice::memchr;
7568/// | `&String` | is substring |
7669///
7770/// # Examples
71+ ///
7872/// ```
7973/// // &str
8074/// assert_eq!("abaaa".find("ba"), Some(1));
@@ -94,9 +88,6 @@ use crate::slice::memchr;
9488/// assert_eq!("abcdef_z".find(|ch| ch > 'd' && ch < 'y'), Some(4));
9589/// assert_eq!("abcddd_z".find(|ch| ch > 'd' && ch < 'y'), None);
9690/// ```
97- ///
98- /// [`str::find`]: ../../../std/primitive.str.html#method.find
99- /// [`str::contains`]: ../../../std/primitive.str.html#method.contains
10091pub trait Pattern < ' a > : Sized {
10192 /// Associated searcher for this pattern
10293 type Searcher : Searcher < ' a > ;
0 commit comments