Skip to content

Commit 792e59f

Browse files
committed
undeprecate
1 parent a4de684 commit 792e59f

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

library/alloc/src/str.rs

-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ pub use core::str::{RSplitTerminator, SplitTerminator};
4646
pub use core::str::{Utf8Chunk, Utf8Chunks};
4747
#[unstable(feature = "str_from_raw_parts", issue = "119206")]
4848
pub use core::str::{from_raw_parts, from_raw_parts_mut};
49-
#[allow(deprecated_in_future)]
5049
#[stable(feature = "rust1", since = "1.0.0")]
5150
pub use core::str::{from_utf8, from_utf8_mut, from_utf8_unchecked, from_utf8_unchecked_mut};
5251
use core::unicode::conversions;

library/core/src/str/converts.rs

-14
Original file line numberDiff line numberDiff line change
@@ -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"]
8785
pub 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"]
125121
pub 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"]
170161
pub 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"]
201187
pub 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

Comments
 (0)