Skip to content

Commit 8ff4fc3

Browse files
committed
Make os::wasi unstable in preview2 target
Signed-off-by: Ryan Levick <[email protected]>
1 parent 3851329 commit 8ff4fc3

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

compiler/rustc_span/src/symbol.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1787,6 +1787,7 @@ symbols! {
17871787
warn,
17881788
wasm_abi,
17891789
wasm_import_module,
1790+
wasm_preview2,
17901791
wasm_target_feature,
17911792
while_let,
17921793
windows,

library/std/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ fortanix-sgx-abi = { version = "0.5.0", features = ['rustc-dep-of-std'], public
5050
[target.'cfg(target_os = "hermit")'.dependencies]
5151
hermit-abi = { version = "0.3.2", features = ['rustc-dep-of-std'], public = true }
5252

53-
[target.'cfg(any(target_os = "wasi", target_os = "wasi-preview2"))'.dependencies]
53+
[target.'cfg(target_family = "wasi")'.dependencies]
5454
wasi = { version = "0.11.0", features = ['rustc-dep-of-std'], default-features = false }
5555

5656
[target.'cfg(target_os = "uefi")'.dependencies]

library/std/src/os/fd/raw.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::os::raw;
1212
use crate::os::unix::io::AsFd;
1313
#[cfg(unix)]
1414
use crate::os::unix::io::OwnedFd;
15-
#[cfg(any(target_os = "wasi", target_os = "wasi-preview2"))]
15+
#[cfg(target_family = "wasi")]
1616
use crate::os::wasi::io::OwnedFd;
1717
use crate::sys_common::{AsInner, IntoInner};
1818
#[cfg(target_os = "hermit")]

library/std/src/os/wasi/mod.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
//! [`OsStr`]: crate::ffi::OsStr
2929
//! [`OsString`]: crate::ffi::OsString
3030
31-
#![stable(feature = "rust1", since = "1.0.0")]
31+
#![cfg_attr(not(target_os = "wasi-preview2"), stable(feature = "rust1", since = "1.0.0"))]
32+
#![cfg_attr(target_os = "wasi-preview2", unstable(feature = "wasm_preview2", issue = "none"))]
3233
#![deny(unsafe_op_in_unsafe_fn)]
3334
#![doc(cfg(target_os = "wasi"))]
3435

0 commit comments

Comments
 (0)