12
12
//! # Examples
13
13
//!
14
14
//! [`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
16
16
//! implementing `FnMut(char) -> bool`.
17
17
//!
18
18
//! ```
28
28
//! assert_eq!(s.find(|c: char| c.is_ascii_punctuation()), Some(35));
29
29
//! ```
30
30
//!
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
38
31
//! [pattern-impls]: trait.Pattern.html#implementors
39
32
40
33
#![ unstable(
@@ -75,6 +68,7 @@ use crate::slice::memchr;
75
68
/// | `&String` | is substring |
76
69
///
77
70
/// # Examples
71
+ ///
78
72
/// ```
79
73
/// // &str
80
74
/// assert_eq!("abaaa".find("ba"), Some(1));
@@ -94,9 +88,6 @@ use crate::slice::memchr;
94
88
/// assert_eq!("abcdef_z".find(|ch| ch > 'd' && ch < 'y'), Some(4));
95
89
/// assert_eq!("abcddd_z".find(|ch| ch > 'd' && ch < 'y'), None);
96
90
/// ```
97
- ///
98
- /// [`str::find`]: ../../../std/primitive.str.html#method.find
99
- /// [`str::contains`]: ../../../std/primitive.str.html#method.contains
100
91
pub trait Pattern < ' a > : Sized {
101
92
/// Associated searcher for this pattern
102
93
type Searcher : Searcher < ' a > ;
0 commit comments