@@ -82,8 +82,6 @@ use crate::ptr;
8282/// ```
8383#[ stable( feature = "rust1" , since = "1.0.0" ) ]
8484#[ 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"]
8785pub const fn from_utf8 ( v : & [ u8 ] ) -> Result < & str , Utf8Error > {
8886 str:: from_utf8 ( v)
8987}
@@ -120,8 +118,6 @@ pub const fn from_utf8(v: &[u8]) -> Result<&str, Utf8Error> {
120118/// errors that can be returned.
121119#[ stable( feature = "str_mut_extras" , since = "1.20.0" ) ]
122120#[ 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"]
125121pub const fn from_utf8_mut ( v : & mut [ u8 ] ) -> Result < & mut str , Utf8Error > {
126122 // FIXME(const-hack): This should use `?` again, once it's `const`
127123 match super :: run_utf8_validation ( v) {
@@ -162,11 +158,6 @@ pub const fn from_utf8_mut(v: &mut [u8]) -> Result<&mut str, Utf8Error> {
162158#[ must_use]
163159#[ stable( feature = "rust1" , since = "1.0.0" ) ]
164160#[ 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"]
170161pub const unsafe fn from_utf8_unchecked ( v : & [ u8 ] ) -> & str {
171162 // SAFETY: same requirements
172163 unsafe { str:: from_utf8_unchecked ( v) }
@@ -193,11 +184,6 @@ pub const unsafe fn from_utf8_unchecked(v: &[u8]) -> &str {
193184#[ must_use]
194185#[ stable( feature = "str_mut_extras" , since = "1.20.0" ) ]
195186#[ 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"]
201187pub const unsafe fn from_utf8_unchecked_mut ( v : & mut [ u8 ] ) -> & mut str {
202188 // SAFETY: same requirements
203189 unsafe { str:: from_utf8_unchecked_mut ( v) }
0 commit comments