about summary refs log tree commit diff
path: root/compiler/rustc_target
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-03-17 22:59:56 +0100
committerRalf Jung <post@ralfj.de>2025-03-25 08:22:35 +0100
commit072ccce553dd83ebfdf0aaf99eb24f65133c368b (patch)
treeaf93c57ceb3717b0ded53c8a4fc7d9e4695e5bba /compiler/rustc_target
parentc961d123d2df8d9fec6d997a6725b88eabe8d5de (diff)
downloadrust-072ccce553dd83ebfdf0aaf99eb24f65133c368b.tar.gz
rust-072ccce553dd83ebfdf0aaf99eb24f65133c368b.zip
make -Zwasm-c-abi=legacy suppress the lint
Diffstat (limited to 'compiler/rustc_target')
-rw-r--r--compiler/rustc_target/src/callconv/mod.rs2
-rw-r--r--compiler/rustc_target/src/spec/mod.rs5
2 files changed, 5 insertions, 2 deletions
diff --git a/compiler/rustc_target/src/callconv/mod.rs b/compiler/rustc_target/src/callconv/mod.rs
index 6d0ee3c7ee5..a52b2b76bc1 100644
--- a/compiler/rustc_target/src/callconv/mod.rs
+++ b/compiler/rustc_target/src/callconv/mod.rs
@@ -705,7 +705,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
             "xtensa" => xtensa::compute_abi_info(cx, self),
             "riscv32" | "riscv64" => riscv::compute_abi_info(cx, self),
             "wasm32" => {
-                if spec.os == "unknown" && cx.wasm_c_abi_opt() == WasmCAbi::Legacy {
+                if spec.os == "unknown" && matches!(cx.wasm_c_abi_opt(), WasmCAbi::Legacy { .. }) {
                     wasm::compute_wasm_abi_info(self)
                 } else {
                     wasm::compute_c_abi_info(cx, self)
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 1887134c575..1a823f47d9d 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -2234,7 +2234,10 @@ pub enum WasmCAbi {
     /// Spec-compliant C ABI.
     Spec,
     /// Legacy ABI. Which is non-spec-compliant.
-    Legacy,
+    Legacy {
+        /// Indicates whether the `wasm_c_abi` lint should be emitted.
+        with_lint: bool,
+    },
 }
 
 pub trait HasWasmCAbiOpt {