-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Only allow PassMode::Direct for aggregates on wasm when using the C ABI #133931
Only allow PassMode::Direct for aggregates on wasm when using the C ABI #133931
Conversation
r? @nnethercote rustbot has assigned @nnethercote. Use |
compiler/rustc_ty_utils/src/abi.rs
Outdated
|
||
match spec_abi { | ||
// The unadjusted ABI is ill specified, but unfortunately we need it for | ||
// calling certain LLVM intrinsics. |
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.
Move this comment up to be part of the big comment above?
// calling certain LLVM intrinsics. | ||
ExternAbi::Unadjusted => {} | ||
ExternAbi::PtxKernel => {} | ||
ExternAbi::C { unwind: _ } |
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.
Should the C-abi-only aspect also be mentioned in the comment above?
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.
It could be something like
ExternAbi::C { unwind: _ } | |
// wasm targets currently implement a dysfunctional C ABI | |
ExternAbi::C { unwind: _ } |
I don't know anything about this stuff, but the change is so minor it seems ok. r=me with the slight comment improvements suggested. |
There might be an edge case I'm not thinking of right now but it doesn't really make sense for almost any ABI to use |
6ed4038
to
117e7de
Compare
For the Rust ABI we don't have any ABI compat reasons to allow PassMode::Direct for aggregates.
117e7de
to
8922d30
Compare
@bors r=nnethercote |
…iaskrgr Rollup of 5 pull requests Successful merges: - rust-lang#130777 (rust_for_linux: -Zreg-struct-return commandline flag for X86 (rust-lang#116973)) - rust-lang#133211 (Extend Miri to correctly pass mutable pointers through FFI) - rust-lang#133790 (Improve documentation for Vec::extend_from_within) - rust-lang#133930 (rustbook: update to use new mdbook-trpl package from The Book) - rust-lang#133931 (Only allow PassMode::Direct for aggregates on wasm when using the C ABI) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#133931 - bjorn3:even_stricter_fn_abi_sanity_checking, r=nnethercote Only allow PassMode::Direct for aggregates on wasm when using the C ABI For the Rust ABI we don't have any ABI compat reasons to allow PassMode::Direct for aggregates.
For the Rust ABI we don't have any ABI compat reasons to allow PassMode::Direct for aggregates.