Closed
Description
In order to reproduce:
cargo new hello-world
cd hello-world
RUSTFLAGS="-C target-features=+atomics,+bulk-memory" cargo +nightly build -Z build-std=std --target=wasm32-wasi
This leads to:
Compiling std v0.0.0 (/home/tomaka/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std)
error[E0308]: mismatched types
--> /home/tomaka/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/wasi/../unsupported/once.rs:63:28
|
63 | inner: OnceState {
| ____________________________^
64 | | poisoned: state == State::Poisoned,
65 | | set_state_to: Cell::new(State::Complete),
66 | | },
| |_____________________^ expected `OnceState`, found a different `OnceState`
|
= note: `OnceState` and `OnceState` have similar names, but are actually distinct types
note: `OnceState` is defined in module `crate::sys::wasi::once` of the current crate
--> /home/tomaka/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/wasi/../unsupported/once.rs:8:1
|
8 | pub struct OnceState {
| ^^^^^^^^^^^^^^^^^^^^
note: `OnceState` is defined in module `crate::sys_common::once::futex` of the current crate
--> /home/tomaka/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/once/futex.rs:31:1
|
31 | pub struct OnceState {
| ^^^^^^^^^^^^^^^^^^^^
error[E0616]: field `set_state_to` of struct `sys_common::once::futex::OnceState` is private
--> /home/tomaka/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/wasi/../unsupported/once.rs:69:60
|
69 | ...p_to = f_state.inner.set_state_to.get();
| ^^^^^^^^^^^^ private field
Some errors have detailed explanations: E0308, E0616.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `std` due to 2 previous errors
This happens with both nightly-2023-03-28
and nightly-2023-02-08
.