-
Notifications
You must be signed in to change notification settings - Fork 13k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
std::arch::wasm::unreachable()
is stable but does not compile
#133015
Comments
playground link, which also shows the error when set to compile wasm. |
This is intentional: The The function |
The diagnostic could still use improvement to actually indicate which part of the path is the problem. |
Right, got a bit confused about the difference between |
I can close this, unless someone wants to hold onto it for docs/diagnostics reasons? |
Keeping this open for improving the diagnostic seems reasonable, it would probably help to shorten the span of the path to the segment that's actually unstable:
@rustbot label -C-bug A-diagnostics A-stability D-papercut D-imprecise-spans -needs-triage |
Instead of improving the diagnostic, this could also just be stabilized, as the memory64 proposal reached phase 4 and is about to ship in Chrome and Firefox. |
@CryZe the diagnostic improvement would affect all unstable modules, so it'd still be useful if this gets stabilized. |
I believe that this is an expected error at the moment, and the appropriate tracking issue for this is over at #90599. |
I tried to build this code with
cargo build --target=wasm32-unknown-unknown
:I expected to see this happen: compile succeeds, generates a function containing the wasm "unreachable" instruction, which is what the documentation says it does.
Instead, this happened:
I don't understand what happened: the documentation says this has been stable since rust 1.37.0, and I don't think there's any reason why the webassembly "unreachable" instruction would be tied to the unstable "simd_wasm64" feature.
I also tried with and without
#[no_std]
and using bothcore::arch
andstd::arch
: all fail the same way.Meta
rustc --version --verbose
:The same error happens with
1.83.0-beta.5
andnightly-2024-11-12
.The text was updated successfully, but these errors were encountered: