diff options
| author | bors <bors@rust-lang.org> | 2025-03-26 00:06:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-26 00:06:46 +0000 |
| commit | 068609ce766e55d2e7371cd2a86143a6d7e8e2e4 (patch) | |
| tree | 42bc3640ce5f704fda5f868fb212eb2e01b1c767 /library | |
| parent | 43f0014ef0f242418674f49052ed39b70f73bc1c (diff) | |
| parent | e88c49c454b965c4c60edf19d1305087c9758a29 (diff) | |
| download | rust-068609ce766e55d2e7371cd2a86143a6d7e8e2e4.tar.gz rust-068609ce766e55d2e7371cd2a86143a6d7e8e2e4.zip | |
Auto merge of #138601 - RalfJung:wasm-abi-fcw, r=alexcrichton
add FCW to warn about wasm ABI transition See https://github.com/rust-lang/rust/issues/122532 for context: the "C" ABI on wasm32-unk-unk will change. The goal of this lint is to warn about any function definition and calls whose behavior will be affected by the change. My understanding is the following: - scalar arguments are fine - including 128 bit types, they get passed as two `i64` arguments in both ABIs - `repr(C)` structs (recursively) wrapping a single scalar argument are fine (unless they have extra padding due to over-alignment attributes) - all return values are fine `@bjorn3` `@alexcrichton` `@Manishearth` is that correct? I am making this a "show up in future compat reports" lint to maximize the chances people become aware of this. OTOH this likely means warnings for most users of Diplomat so maybe we shouldn't do this? IIUC, wasm-bindgen should be unaffected by this lint as they only pass scalar types as arguments. Tracking issue: https://github.com/rust-lang/rust/issues/138762 Transition plan blog post: https://github.com/rust-lang/blog.rust-lang.org/pull/1531 try-job: dist-various-2
Diffstat (limited to 'library')
| -rw-r--r-- | library/proc_macro/src/bridge/mod.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/library/proc_macro/src/bridge/mod.rs b/library/proc_macro/src/bridge/mod.rs index 03c3e697cfe..52cc8fba043 100644 --- a/library/proc_macro/src/bridge/mod.rs +++ b/library/proc_macro/src/bridge/mod.rs @@ -7,6 +7,10 @@ //! Rust ABIs (e.g., stage0/bin/rustc vs stage1/bin/rustc during bootstrap). #![deny(unsafe_code)] +// proc_macros anyway don't work on wasm hosts so while both sides of this bridge can +// be built with different versions of rustc, the wasm ABI changes don't really matter. +#![cfg_attr(bootstrap, allow(unknown_lints))] +#![allow(wasm_c_abi)] use std::hash::Hash; use std::ops::{Bound, Range}; |
