@@ -82,8 +82,6 @@ use crate::ptr;
82
82
/// ```
83
83
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
84
84
#[ rustc_const_stable( feature = "const_str_from_utf8_shared" , since = "1.63.0" ) ]
85
- #[ deprecated( since = "TBD" , note = "replaced by the `from_utf8` method on the `str` type" ) ]
86
- // #[rustc_diagnostic_item = "str_from_utf8"]
87
85
pub const fn from_utf8 ( v : & [ u8 ] ) -> Result < & str , Utf8Error > {
88
86
str:: from_utf8 ( v)
89
87
}
@@ -120,8 +118,6 @@ pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
120
118
/// errors that can be returned.
121
119
#[ stable( feature = "str_mut_extras" , since = "1.20.0" ) ]
122
120
#[ rustc_const_unstable( feature = "const_str_from_utf8" , issue = "91006" ) ]
123
- #[ deprecated( since = "TBD" , note = "replaced by the `from_utf8_mut` method on the `str` type" ) ]
124
- // #[rustc_diagnostic_item = "str_from_utf8_mut"]
125
121
pub const fn from_utf8_mut ( v : & mut [ u8 ] ) -> Result < & mut str , Utf8Error > {
126
122
// FIXME(const-hack): This should use `?` again, once it's `const`
127
123
match super :: run_utf8_validation ( v) {
@@ -162,11 +158,6 @@ pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
162
158
#[ must_use]
163
159
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
164
160
#[ rustc_const_stable( feature = "const_str_from_utf8_unchecked" , since = "1.55.0" ) ]
165
- #[ deprecated(
166
- since = "TBD" ,
167
- note = "replaced by the `from_utf8_unchecked` method on the `str` type"
168
- ) ]
169
- // #[rustc_diagnostic_item = "str_from_utf8_unchecked"]
170
161
pub const unsafe fn from_utf8_unchecked ( v : & [ u8 ] ) -> & str {
171
162
// SAFETY: same requirements
172
163
unsafe { str:: from_utf8_unchecked ( v) }
@@ -193,11 +184,6 @@ pub const unsafe fn from_utf8_unchecked(v: &[u8]) -> &str {
193
184
#[ must_use]
194
185
#[ stable( feature = "str_mut_extras" , since = "1.20.0" ) ]
195
186
#[ rustc_const_stable( feature = "const_str_from_utf8_unchecked_mut" , since = "1.83.0" ) ]
196
- #[ deprecated(
197
- since = "TBD" ,
198
- note = "replaced by the `from_utf8_unchecked_mut` method on the `str` type"
199
- ) ]
200
- // #[rustc_diagnostic_item = "str_from_utf8_unchecked_mut"]
201
187
pub const unsafe fn from_utf8_unchecked_mut ( v : & mut [ u8 ] ) -> & mut str {
202
188
// SAFETY: same requirements
203
189
unsafe { str:: from_utf8_unchecked_mut ( v) }
0 commit comments