about summary refs log tree commit diff
path: root/tests/ui
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2025-01-25 23:26:58 -0500
committerGitHub <noreply@github.com>2025-01-25 23:26:58 -0500
commitdc202df0ed8caba1c7caffcfc8cb70ba7f4b94b4 (patch)
tree00e51a5589992f47171c84fb642ab6778c197f58 /tests/ui
parent2f0ad2a71e4a4528bb80bcb24bf8fa4e50cb87c2 (diff)
parent49c3aaabaaf383da35d5544817feb54d1800832c (diff)
downloadrust-dc202df0ed8caba1c7caffcfc8cb70ba7f4b94b4.tar.gz
rust-dc202df0ed8caba1c7caffcfc8cb70ba7f4b94b4.zip
Rollup merge of #133951 - bjorn3:wasm_c_abi_lint_hard_error, r=workingjubilee
Make the wasm_c_abi future compat warning a hard error

This is the next step in getting rid of the broken C abi for wasm32-unknown-unknown.

The lint was made deny-by-default in https://github.com/rust-lang/rust/pull/129534 3 months ago. This still keeps the `-Zwasm-c-abi` flag set to `legacy` by default. It will be flipped in a future PR.

cc https://github.com/rust-lang/rust/issues/122532
Diffstat (limited to 'tests/ui')
-rw-r--r--tests/ui/wasm/wasm-bindgen-broken-error.rs28
-rw-r--r--tests/ui/wasm/wasm-bindgen-broken-error.v0_1_0.stderr8
-rw-r--r--tests/ui/wasm/wasm-bindgen-broken-error.v0_2_87.stderr8
3 files changed, 44 insertions, 0 deletions
diff --git a/tests/ui/wasm/wasm-bindgen-broken-error.rs b/tests/ui/wasm/wasm-bindgen-broken-error.rs
new file mode 100644
index 00000000000..d985e879803
--- /dev/null
+++ b/tests/ui/wasm/wasm-bindgen-broken-error.rs
@@ -0,0 +1,28 @@
+//@ only-wasm32
+//@ revisions: v0_1_0 v0_2_87 v0_2_88 v0_3_0 v1_0_0
+//@[v0_1_0] check-fail
+//@[v0_1_0] rustc-env:CARGO_PKG_VERSION_MAJOR=0
+//@[v0_1_0] rustc-env:CARGO_PKG_VERSION_MINOR=1
+//@[v0_1_0] rustc-env:CARGO_PKG_VERSION_PATCH=0
+//@[v0_2_87] check-fail
+//@[v0_2_87] rustc-env:CARGO_PKG_VERSION_MAJOR=0
+//@[v0_2_87] rustc-env:CARGO_PKG_VERSION_MINOR=2
+//@[v0_2_87] rustc-env:CARGO_PKG_VERSION_PATCH=87
+//@[v0_2_88] check-pass
+//@[v0_2_88] rustc-env:CARGO_PKG_VERSION_MAJOR=0
+//@[v0_2_88] rustc-env:CARGO_PKG_VERSION_MINOR=2
+//@[v0_2_88] rustc-env:CARGO_PKG_VERSION_PATCH=88
+//@[v0_3_0] check-pass
+//@[v0_3_0] rustc-env:CARGO_PKG_VERSION_MAJOR=0
+//@[v0_3_0] rustc-env:CARGO_PKG_VERSION_MINOR=3
+//@[v0_3_0] rustc-env:CARGO_PKG_VERSION_PATCH=0
+//@[v1_0_0] check-pass
+//@[v1_0_0] rustc-env:CARGO_PKG_VERSION_MAJOR=1
+//@[v1_0_0] rustc-env:CARGO_PKG_VERSION_MINOR=0
+//@[v1_0_0] rustc-env:CARGO_PKG_VERSION_PATCH=0
+
+#![crate_name = "wasm_bindgen"]
+//[v0_1_0]~^ ERROR: older versions of the `wasm-bindgen` crate
+//[v0_2_87]~^^ ERROR: older versions of the `wasm-bindgen` crate
+
+fn main() {}
diff --git a/tests/ui/wasm/wasm-bindgen-broken-error.v0_1_0.stderr b/tests/ui/wasm/wasm-bindgen-broken-error.v0_1_0.stderr
new file mode 100644
index 00000000000..e1c1ec7ef33
--- /dev/null
+++ b/tests/ui/wasm/wasm-bindgen-broken-error.v0_1_0.stderr
@@ -0,0 +1,8 @@
+error: older versions of the `wasm-bindgen` crate are incompatible with current versions of Rust; please update to `wasm-bindgen` v0.2.88
+  --> $DIR/wasm-bindgen-broken-error.rs:24:1
+   |
+LL | #![crate_name = "wasm_bindgen"]
+   | ^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/wasm/wasm-bindgen-broken-error.v0_2_87.stderr b/tests/ui/wasm/wasm-bindgen-broken-error.v0_2_87.stderr
new file mode 100644
index 00000000000..e1c1ec7ef33
--- /dev/null
+++ b/tests/ui/wasm/wasm-bindgen-broken-error.v0_2_87.stderr
@@ -0,0 +1,8 @@
+error: older versions of the `wasm-bindgen` crate are incompatible with current versions of Rust; please update to `wasm-bindgen` v0.2.88
+  --> $DIR/wasm-bindgen-broken-error.rs:24:1
+   |
+LL | #![crate_name = "wasm_bindgen"]
+   | ^
+
+error: aborting due to 1 previous error
+