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