Skip to content

Commit ef00287

Browse files
committed
Refactor: Mv OsStr/OsStrExt to core, OsString/OsStringExt to alloc
Signed-off-by: Jiahao XU <[email protected]>
1 parent 334e509 commit ef00287

31 files changed

+4860
-3163
lines changed

library/Cargo.lock

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ dependencies = [
2828
name = "alloc"
2929
version = "0.0.0"
3030
dependencies = [
31+
"cfg-if",
3132
"compiler_builtins",
3233
"core",
3334
"rand",

library/alloc/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ edition = "2021"
1111
[dependencies]
1212
core = { path = "../core" }
1313
compiler_builtins = { version = "0.1.118", features = ['rustc-dep-of-std'] }
14+
cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
1415

1516
[dev-dependencies]
1617
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }

library/alloc/src/ffi/mod.rs

+15
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,18 @@ pub use self::c_str::{FromVecWithNulError, IntoStringError, NulError};
8989

9090
#[unstable(feature = "c_str_module", issue = "112134")]
9191
pub mod c_str;
92+
93+
#[stable(feature = "rust1", since = "1.0.0")]
94+
#[doc(inline)]
95+
pub use self::os_str::OsString;
96+
97+
#[unstable(feature = "os_str_display", issue = "120048")]
98+
pub mod os_str;
99+
100+
#[unstable(
101+
feature = "os_str_internals",
102+
reason = "internal details of the implementation of os str",
103+
issue = "none"
104+
)]
105+
#[doc(hidden)]
106+
pub mod wtf8;

0 commit comments

Comments
 (0)