-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Don't warn about v128
in wasm ABI transition
#139809
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
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @compiler-errors. Use |
Like with #139498, I'm going to beta-nominate this as the affected warning is currently present on beta. |
Hi @alexcrichton, could you elaborate on what you mean by "other warning if necessary"? Based on the reported code snippet in #138762 (comment) but with #![allow(wasm_c_abi)]
use std::arch::wasm32::{
v128,
v128_any_true};
#[no_mangle]
pub fn any_true(a: v128) -> bool {
v128_any_true(a)
} I'm not observing another warning, am I missing something? Or rather, could you slightly elaborate on why |
Oh sure yeah, this code: use std::arch::wasm32::*;
#[unsafe(no_mangle)]
#[target_feature(enable = "simd128")]
pub extern "C" fn foo(_: v128) {}
This PR is just addressing the second one which shows up transitively through crates, not the first one which I'm not changing here. |
Thanks, that's what I was missing |
6925ce1
to
38667e5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
@bors r+ rollup |
improper_ctypes warns about so many things that are needed in practice and generally work fine, chances are people have it allowed... but I guess then they don't get to complain if we change the ABI.^^ |
I suppose we can call this out in relnotes? |
Unsettled discussion on trade-offs |
We have a blogpost about the transition, and the relnotes (I expect) will link there. So there are other ways people can learn about this. But, also note that improper_ctypes is not an FCW so unlike this warning, it will not show up for dependencies. If my dependency passes |
Sorry I'm a bit confused, what's being asked for here? The |
I'm slightly concerned some crate could be passing Can you point at the declaration of such an intrinsic that causes a warning? Why would an intrinsic use the "C" ABI? Usually they do not. |
The intrinsics that get the warning are LLVM intrinsics, not Rust intrinsics, which stdarch declares as |
r? RalfJung (since you have concerns) |
☔ The latest upstream changes (presumably #139992) made this pull request unmergeable. Please resolve the merge conflicts. |
This has other warnings if necessary and doesn't need extra warnings from this FCW. cc rust-lang#138762
38667e5
to
53a5900
Compare
This has other warnings if necessary and doesn't need extra warnings from this FCW.
cc #138762 (comment)