@@ -114,18 +114,18 @@ impl [u8] {
114
114
/// Returns a byte slice with leading ASCII whitespace bytes removed.
115
115
///
116
116
/// 'Whitespace' refers to the definition used by
117
- /// `u8::is_ascii_whitespace`.
117
+ /// [`u8::is_ascii_whitespace`].
118
+ ///
119
+ /// [`u8::is_ascii_whitespace`]: u8::is_ascii_whitespace
118
120
///
119
121
/// # Examples
120
122
///
121
123
/// ```
122
- /// #![feature(byte_slice_trim_ascii)]
123
- ///
124
124
/// assert_eq!(b" \t hello world\n".trim_ascii_start(), b"hello world\n");
125
125
/// assert_eq!(b" ".trim_ascii_start(), b"");
126
126
/// assert_eq!(b"".trim_ascii_start(), b"");
127
127
/// ```
128
- #[ unstable ( feature = "byte_slice_trim_ascii" , issue = "94035 " ) ]
128
+ #[ stable ( feature = "byte_slice_trim_ascii" , since = "CURRENT_RUSTC_VERSION " ) ]
129
129
#[ inline]
130
130
pub const fn trim_ascii_start ( & self ) -> & [ u8 ] {
131
131
let mut bytes = self ;
@@ -144,18 +144,18 @@ impl [u8] {
144
144
/// Returns a byte slice with trailing ASCII whitespace bytes removed.
145
145
///
146
146
/// 'Whitespace' refers to the definition used by
147
- /// `u8::is_ascii_whitespace`.
147
+ /// [`u8::is_ascii_whitespace`].
148
+ ///
149
+ /// [`u8::is_ascii_whitespace`]: u8::is_ascii_whitespace
148
150
///
149
151
/// # Examples
150
152
///
151
153
/// ```
152
- /// #![feature(byte_slice_trim_ascii)]
153
- ///
154
154
/// assert_eq!(b"\r hello world\n ".trim_ascii_end(), b"\r hello world");
155
155
/// assert_eq!(b" ".trim_ascii_end(), b"");
156
156
/// assert_eq!(b"".trim_ascii_end(), b"");
157
157
/// ```
158
- #[ unstable ( feature = "byte_slice_trim_ascii" , issue = "94035 " ) ]
158
+ #[ stable ( feature = "byte_slice_trim_ascii" , since = "CURRENT_RUSTC_VERSION " ) ]
159
159
#[ inline]
160
160
pub const fn trim_ascii_end ( & self ) -> & [ u8 ] {
161
161
let mut bytes = self ;
@@ -175,18 +175,18 @@ impl [u8] {
175
175
/// removed.
176
176
///
177
177
/// 'Whitespace' refers to the definition used by
178
- /// `u8::is_ascii_whitespace`.
178
+ /// [`u8::is_ascii_whitespace`].
179
+ ///
180
+ /// [`u8::is_ascii_whitespace`]: u8::is_ascii_whitespace
179
181
///
180
182
/// # Examples
181
183
///
182
184
/// ```
183
- /// #![feature(byte_slice_trim_ascii)]
184
- ///
185
185
/// assert_eq!(b"\r hello world\n ".trim_ascii(), b"hello world");
186
186
/// assert_eq!(b" ".trim_ascii(), b"");
187
187
/// assert_eq!(b"".trim_ascii(), b"");
188
188
/// ```
189
- #[ unstable ( feature = "byte_slice_trim_ascii" , issue = "94035 " ) ]
189
+ #[ stable ( feature = "byte_slice_trim_ascii" , since = "CURRENT_RUSTC_VERSION " ) ]
190
190
#[ inline]
191
191
pub const fn trim_ascii ( & self ) -> & [ u8 ] {
192
192
self . trim_ascii_start ( ) . trim_ascii_end ( )
0 commit comments