Fix std compilation error for wasi+atomics#110587
Conversation
|
(rustbot has picked a reviewer for you, use r? to override) |
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
As a heads up, I'll probably open another PR afterwards to make |
|
@tomaka right now you need to also build the compiler to use a local std in a dev toolchain, see #101691. you can run |
Or maybe not. Nonetheless, this small PR is still worth merging, since it moves the situation from "doesn't compile" to "compiles". |
|
How can I test this change? |
|
ah, using @bors r+ rollup |
Rollup of 9 pull requests Successful merges: - rust-lang#108416 (black_box doc corrections for clarification - Issue rust-lang#107957) - rust-lang#109379 (Replace `yes` command by `while-echo` in test `tests/ui/process/process-sigpipe.rs`) - rust-lang#110266 (Update documentation wording on path 'try_exists' functions) - rust-lang#110329 (Improve tests for rust-lang#110138) - rust-lang#110418 (Spelling rustdoc) - rust-lang#110587 (Fix `std` compilation error for wasi+atomics) - rust-lang#110594 (`rustc --help` add `--cfg` SPEC declaration.) - rust-lang#110792 (Use the standard macOS CI runner) - rust-lang#110817 (Add regression tests for const-generic inherent associated types) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fix #109727
It seems that the
unsupported/once.rsmodule isn't meant to exist at the same time as thefutexmodule, as they have conflicting definitions.I've solved this by defining the
oncemodule only ifnot(target_feature = "atomics").The
wasm32-unknown-unknowntarget similarly only defines theoncemodule ifnot(target_feature = "atomics").As show in this block of code, the
sys::oncemodule doesn't need to exist ifall(target_arch = "wasm32", target_feature = "atomics").