Skip to content

Commit 6fc31eb

Browse files
authored
Unrolled build for rust-lang#137439
Rollup merge of rust-lang#137439 - clarfonthey:c-str-module, r=tgross35 Stabilise `std::ffi::c_str` This finished FCP in rust-lang#112134 but never actually got a stabilisation PR. Since the FCP in rust-lang#120048 recently passed to add the `os_str` module, it would be nice to also merge this too, to ensure that both get added in the next version. Note: The added stability attributes which *somehow* were able to be omitted before (rustc bug?) were added based on the fact that they were added in 3025513, which ended up in 1.85.0. Closes: rust-lang#112134 r? libs-api
2 parents 8947e16 + 6be84b1 commit 6fc31eb

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

library/alloc/src/ffi/c_str.rs

+2
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,7 @@ impl From<Vec<NonZero<u8>>> for CString {
818818
}
819819
}
820820

821+
#[stable(feature = "c_string_from_str", since = "1.85.0")]
821822
impl FromStr for CString {
822823
type Err = NulError;
823824

@@ -830,6 +831,7 @@ impl FromStr for CString {
830831
}
831832
}
832833

834+
#[stable(feature = "c_string_from_str", since = "1.85.0")]
833835
impl TryFrom<CString> for String {
834836
type Error = IntoStringError;
835837

library/alloc/src/ffi/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,5 @@ pub use self::c_str::CString;
8787
#[stable(feature = "alloc_c_string", since = "1.64.0")]
8888
pub use self::c_str::{FromVecWithNulError, IntoStringError, NulError};
8989

90-
#[unstable(feature = "c_str_module", issue = "112134")]
90+
#[stable(feature = "c_str_module", since = "CURRENT_RUSTC_VERSION")]
9191
pub mod c_str;

library/core/src/ffi/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ pub use self::c_str::FromBytesUntilNulError;
2020
pub use self::c_str::FromBytesWithNulError;
2121
use crate::fmt;
2222

23-
#[unstable(feature = "c_str_module", issue = "112134")]
23+
#[stable(feature = "c_str_module", since = "CURRENT_RUSTC_VERSION")]
2424
pub mod c_str;
2525

2626
#[unstable(

library/std/src/ffi/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@
161161
162162
#![stable(feature = "rust1", since = "1.0.0")]
163163

164-
#[unstable(feature = "c_str_module", issue = "112134")]
164+
#[stable(feature = "c_str_module", since = "CURRENT_RUSTC_VERSION")]
165165
pub mod c_str;
166166

167167
#[stable(feature = "core_c_void", since = "1.30.0")]

library/std/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@
329329
#![feature(array_chunks)]
330330
#![feature(bstr)]
331331
#![feature(bstr_internals)]
332-
#![feature(c_str_module)]
333332
#![feature(char_internals)]
334333
#![feature(clone_to_uninit)]
335334
#![feature(core_intrinsics)]

0 commit comments

Comments
 (0)