From 7141379559e2ef17e48dfbadc898581cd34bef6f Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Wed, 6 Mar 2024 12:39:07 -0800
Subject: [PATCH 1/7] Convert some WebAssembly run-make tests to Rust

This commit rewrites a number of `run-make` tests centered around wasm
to instead use `rmake.rs` and additionally use the `wasm32-wasip1`
target instead of `wasm32-unknown-unknown`. Testing no longer requires
Node.js and additionally uses the `wasmparser` crate from crates.io to
parse outputs and power assertions.
---
 Cargo.lock                                    |  3 +
 src/tools/run-make-support/Cargo.toml         |  1 +
 src/tools/run-make-support/src/lib.rs         | 16 +++--
 tests/run-make/wasm-abi/Makefile              |  7 ---
 tests/run-make/wasm-abi/foo.js                | 22 -------
 tests/run-make/wasm-abi/host.wat              | 22 +++++++
 tests/run-make/wasm-abi/rmake.rs              | 43 +++++++++++++
 tests/run-make/wasm-custom-section/Makefile   |  8 ---
 tests/run-make/wasm-custom-section/foo.js     | 36 -----------
 tests/run-make/wasm-custom-section/rmake.rs   | 28 +++++++++
 .../wasm-custom-sections-opt/Makefile         |  7 ---
 .../run-make/wasm-custom-sections-opt/foo.js  | 15 -----
 .../wasm-custom-sections-opt/rmake.rs         | 30 ++++++++++
 .../run-make/wasm-export-all-symbols/Makefile | 19 ------
 .../run-make/wasm-export-all-symbols/rmake.rs | 60 +++++++++++++++++++
 .../wasm-export-all-symbols/verify.js         | 32 ----------
 tests/run-make/wasm-import-module/Makefile    |  8 ---
 tests/run-make/wasm-import-module/foo.js      | 18 ------
 tests/run-make/wasm-import-module/rmake.rs    | 32 ++++++++++
 tests/run-make/wasm-panic-small/Makefile      | 17 ------
 tests/run-make/wasm-panic-small/rmake.rs      | 32 ++++++++++
 tests/run-make/wasm-spurious-import/Makefile  |  7 ---
 tests/run-make/wasm-spurious-import/rmake.rs  | 35 +++++++++++
 tests/run-make/wasm-spurious-import/verify.js |  9 ---
 .../wasm-stringify-ints-small/Makefile        | 10 ----
 .../wasm-stringify-ints-small/rmake.rs        | 17 ++++++
 .../wasm-symbols-different-module/Makefile    | 28 ---------
 .../wasm-symbols-different-module/rmake.rs    | 52 ++++++++++++++++
 .../verify-imports.js                         | 32 ----------
 .../wasm-symbols-not-exported/Makefile        | 13 ----
 .../wasm-symbols-not-exported/rmake.rs        | 41 +++++++++++++
 .../verify-exported-symbols.js                | 21 -------
 .../wasm-symbols-not-imported/Makefile        | 13 ----
 .../wasm-symbols-not-imported/rmake.rs        | 31 ++++++++++
 .../verify-no-imports.js                      | 10 ----
 35 files changed, 439 insertions(+), 336 deletions(-)
 delete mode 100644 tests/run-make/wasm-abi/Makefile
 delete mode 100644 tests/run-make/wasm-abi/foo.js
 create mode 100644 tests/run-make/wasm-abi/host.wat
 create mode 100644 tests/run-make/wasm-abi/rmake.rs
 delete mode 100644 tests/run-make/wasm-custom-section/Makefile
 delete mode 100644 tests/run-make/wasm-custom-section/foo.js
 create mode 100644 tests/run-make/wasm-custom-section/rmake.rs
 delete mode 100644 tests/run-make/wasm-custom-sections-opt/Makefile
 delete mode 100644 tests/run-make/wasm-custom-sections-opt/foo.js
 create mode 100644 tests/run-make/wasm-custom-sections-opt/rmake.rs
 delete mode 100644 tests/run-make/wasm-export-all-symbols/Makefile
 create mode 100644 tests/run-make/wasm-export-all-symbols/rmake.rs
 delete mode 100644 tests/run-make/wasm-export-all-symbols/verify.js
 delete mode 100644 tests/run-make/wasm-import-module/Makefile
 delete mode 100644 tests/run-make/wasm-import-module/foo.js
 create mode 100644 tests/run-make/wasm-import-module/rmake.rs
 delete mode 100644 tests/run-make/wasm-panic-small/Makefile
 create mode 100644 tests/run-make/wasm-panic-small/rmake.rs
 delete mode 100644 tests/run-make/wasm-spurious-import/Makefile
 create mode 100644 tests/run-make/wasm-spurious-import/rmake.rs
 delete mode 100644 tests/run-make/wasm-spurious-import/verify.js
 delete mode 100644 tests/run-make/wasm-stringify-ints-small/Makefile
 create mode 100644 tests/run-make/wasm-stringify-ints-small/rmake.rs
 delete mode 100644 tests/run-make/wasm-symbols-different-module/Makefile
 create mode 100644 tests/run-make/wasm-symbols-different-module/rmake.rs
 delete mode 100644 tests/run-make/wasm-symbols-different-module/verify-imports.js
 delete mode 100644 tests/run-make/wasm-symbols-not-exported/Makefile
 create mode 100644 tests/run-make/wasm-symbols-not-exported/rmake.rs
 delete mode 100644 tests/run-make/wasm-symbols-not-exported/verify-exported-symbols.js
 delete mode 100644 tests/run-make/wasm-symbols-not-imported/Makefile
 create mode 100644 tests/run-make/wasm-symbols-not-imported/rmake.rs
 delete mode 100644 tests/run-make/wasm-symbols-not-imported/verify-no-imports.js

diff --git a/Cargo.lock b/Cargo.lock
index 3290741f128f3..16abe6fbf93f2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -3298,6 +3298,9 @@ dependencies = [
 [[package]]
 name = "run_make_support"
 version = "0.0.0"
+dependencies = [
+ "wasmparser",
+]
 
 [[package]]
 name = "rust-demangler"
diff --git a/src/tools/run-make-support/Cargo.toml b/src/tools/run-make-support/Cargo.toml
index 178deae6499d8..958aef6957256 100644
--- a/src/tools/run-make-support/Cargo.toml
+++ b/src/tools/run-make-support/Cargo.toml
@@ -4,3 +4,4 @@ version = "0.0.0"
 edition = "2021"
 
 [dependencies]
+wasmparser = "0.118.2"
diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs
index 820218732cecd..674860f8413b6 100644
--- a/src/tools/run-make-support/src/lib.rs
+++ b/src/tools/run-make-support/src/lib.rs
@@ -2,13 +2,16 @@ use std::env;
 use std::path::{Path, PathBuf};
 use std::process::{Command, Output};
 
+pub use wasmparser;
+
+pub fn out_dir() -> PathBuf {
+    env::var_os("TMPDIR").unwrap().into()
+}
+
 fn setup_common_build_cmd() -> Command {
     let rustc = env::var("RUSTC").unwrap();
     let mut cmd = Command::new(rustc);
-    cmd.arg("--out-dir")
-        .arg(env::var("TMPDIR").unwrap())
-        .arg("-L")
-        .arg(env::var("TMPDIR").unwrap());
+    cmd.arg("--out-dir").arg(out_dir()).arg("-L").arg(out_dir());
     cmd
 }
 
@@ -45,6 +48,11 @@ impl RustcInvocationBuilder {
         self
     }
 
+    pub fn args(&mut self, args: &[&str]) -> &mut RustcInvocationBuilder {
+        self.cmd.args(args);
+        self
+    }
+
     #[track_caller]
     pub fn run(&mut self) -> Output {
         let caller_location = std::panic::Location::caller();
diff --git a/tests/run-make/wasm-abi/Makefile b/tests/run-make/wasm-abi/Makefile
deleted file mode 100644
index ed95464efef2e..0000000000000
--- a/tests/run-make/wasm-abi/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-include ../tools.mk
-
-# only-wasm32-bare
-
-all:
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown
-	$(NODE) foo.js $(TMPDIR)/foo.wasm
diff --git a/tests/run-make/wasm-abi/foo.js b/tests/run-make/wasm-abi/foo.js
deleted file mode 100644
index 9e9a65401af81..0000000000000
--- a/tests/run-make/wasm-abi/foo.js
+++ /dev/null
@@ -1,22 +0,0 @@
-const fs = require('fs');
-const process = require('process');
-const assert = require('assert');
-const buffer = fs.readFileSync(process.argv[2]);
-
-const m = new WebAssembly.Module(buffer);
-const i = new WebAssembly.Instance(m, {
-  host: {
-    two_i32: () => [100, 101],
-    two_i64: () => [102n, 103n],
-    two_f32: () => [104, 105],
-    two_f64: () => [106, 107],
-    mishmash: () => [108, 109, 110, 111n, 112, 113],
-  }
-});
-
-assert.deepEqual(i.exports.return_two_i32(), [1, 2])
-assert.deepEqual(i.exports.return_two_i64(), [3, 4])
-assert.deepEqual(i.exports.return_two_f32(), [5, 6])
-assert.deepEqual(i.exports.return_two_f64(), [7, 8])
-assert.deepEqual(i.exports.return_mishmash(), [9, 10, 11, 12, 13, 14])
-i.exports.call_imports();
diff --git a/tests/run-make/wasm-abi/host.wat b/tests/run-make/wasm-abi/host.wat
new file mode 100644
index 0000000000000..e87097ac8a14b
--- /dev/null
+++ b/tests/run-make/wasm-abi/host.wat
@@ -0,0 +1,22 @@
+(module
+  (func (export "two_i32") (result i32 i32)
+      i32.const 100
+      i32.const 101)
+  (func (export "two_i64") (result i64 i64)
+      i64.const 102
+      i64.const 103)
+  (func (export "two_f32") (result f32 f32)
+      f32.const 104
+      f32.const 105)
+  (func (export "two_f64") (result f64 f64)
+      f64.const 106
+      f64.const 107)
+
+  (func (export "mishmash") (result f64 f32 i32 i64 i32 i32)
+      f64.const 108
+      f32.const 109
+      i32.const 110
+      i64.const 111
+      i32.const 112
+      i32.const 113)
+)
diff --git a/tests/run-make/wasm-abi/rmake.rs b/tests/run-make/wasm-abi/rmake.rs
new file mode 100644
index 0000000000000..07b826ae6fe12
--- /dev/null
+++ b/tests/run-make/wasm-abi/rmake.rs
@@ -0,0 +1,43 @@
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustc};
+use std::path::Path;
+use std::process::Command;
+
+fn main() {
+    if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
+        return;
+    }
+
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").run();
+    let file = out_dir().join("foo.wasm");
+
+    let has_wasmtime = match Command::new("wasmtime").arg("--version").output() {
+        Ok(s) => s.status.success(),
+        _ => false,
+    };
+    if !has_wasmtime {
+        println!("skipping test, wasmtime isn't available");
+        return;
+    }
+
+    run(&file, "return_two_i32", "1\n2\n");
+    run(&file, "return_two_i64", "3\n4\n");
+    run(&file, "return_two_f32", "5\n6\n");
+    run(&file, "return_two_f64", "7\n8\n");
+    run(&file, "return_mishmash", "9\n10\n11\n12\n13\n14\n");
+    run(&file, "call_imports", "");
+}
+
+fn run(file: &Path, method: &str, expected_output: &str) {
+    let output = Command::new("wasmtime")
+        .arg("run")
+        .arg("--preload=host=host.wat")
+        .arg("--invoke")
+        .arg(method)
+        .arg(file)
+        .output()
+        .unwrap();
+    assert!(output.status.success());
+    assert_eq!(expected_output, String::from_utf8_lossy(&output.stdout));
+}
diff --git a/tests/run-make/wasm-custom-section/Makefile b/tests/run-make/wasm-custom-section/Makefile
deleted file mode 100644
index 2f7d38c273651..0000000000000
--- a/tests/run-make/wasm-custom-section/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-include ../tools.mk
-
-# only-wasm32-bare
-
-all:
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown
-	$(RUSTC) bar.rs -C lto -O --target wasm32-unknown-unknown
-	$(NODE) foo.js $(TMPDIR)/bar.wasm
diff --git a/tests/run-make/wasm-custom-section/foo.js b/tests/run-make/wasm-custom-section/foo.js
deleted file mode 100644
index 57a0f50732d1f..0000000000000
--- a/tests/run-make/wasm-custom-section/foo.js
+++ /dev/null
@@ -1,36 +0,0 @@
-const fs = require('fs');
-const process = require('process');
-const assert = require('assert');
-const buffer = fs.readFileSync(process.argv[2]);
-
-let m = new WebAssembly.Module(buffer);
-let sections = WebAssembly.Module.customSections(m, "baz");
-console.log('section baz', sections);
-assert.strictEqual(sections.length, 1);
-let section = new Uint8Array(sections[0]);
-console.log('contents', section);
-assert.strictEqual(section.length, 2);
-assert.strictEqual(section[0], 7);
-assert.strictEqual(section[1], 8);
-
-sections = WebAssembly.Module.customSections(m, "bar");
-console.log('section bar', sections);
-assert.strictEqual(sections.length, 1, "didn't pick up `bar` section from dependency");
-section = new Uint8Array(sections[0]);
-console.log('contents', section);
-assert.strictEqual(section.length, 2);
-assert.strictEqual(section[0], 3);
-assert.strictEqual(section[1], 4);
-
-sections = WebAssembly.Module.customSections(m, "foo");
-console.log('section foo', sections);
-assert.strictEqual(sections.length, 1, "didn't create `foo` section");
-section = new Uint8Array(sections[0]);
-console.log('contents', section);
-assert.strictEqual(section.length, 4, "didn't concatenate `foo` sections");
-assert.strictEqual(section[0], 5);
-assert.strictEqual(section[1], 6);
-assert.strictEqual(section[2], 1);
-assert.strictEqual(section[3], 2);
-
-process.exit(0);
diff --git a/tests/run-make/wasm-custom-section/rmake.rs b/tests/run-make/wasm-custom-section/rmake.rs
new file mode 100644
index 0000000000000..9ad152695eca3
--- /dev/null
+++ b/tests/run-make/wasm-custom-section/rmake.rs
@@ -0,0 +1,28 @@
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustc, wasmparser};
+use std::collections::HashMap;
+
+fn main() {
+    if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
+        return;
+    }
+
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").run();
+    rustc().arg("bar.rs").arg("--target=wasm32-wasip1").arg("-Clto").arg("-O").run();
+
+    let file = std::fs::read(&out_dir().join("bar.wasm")).unwrap();
+
+    let mut custom = HashMap::new();
+    for payload in wasmparser::Parser::new(0).parse_all(&file) {
+        let payload = payload.unwrap();
+        if let wasmparser::Payload::CustomSection(s) = payload {
+            let prev = custom.insert(s.name(), s.data());
+            assert!(prev.is_none());
+        }
+    }
+
+    assert_eq!(custom.remove("foo"), Some(&[5, 6, 1, 2][..]));
+    assert_eq!(custom.remove("bar"), Some(&[3, 4][..]));
+    assert_eq!(custom.remove("baz"), Some(&[7, 8][..]));
+}
diff --git a/tests/run-make/wasm-custom-sections-opt/Makefile b/tests/run-make/wasm-custom-sections-opt/Makefile
deleted file mode 100644
index a0d4378131be5..0000000000000
--- a/tests/run-make/wasm-custom-sections-opt/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-include ../tools.mk
-
-# only-wasm32-bare
-
-all:
-	$(RUSTC) foo.rs -O --target wasm32-unknown-unknown
-	$(NODE) foo.js $(TMPDIR)/foo.wasm
diff --git a/tests/run-make/wasm-custom-sections-opt/foo.js b/tests/run-make/wasm-custom-sections-opt/foo.js
deleted file mode 100644
index 9663f377ef429..0000000000000
--- a/tests/run-make/wasm-custom-sections-opt/foo.js
+++ /dev/null
@@ -1,15 +0,0 @@
-const fs = require('fs');
-const process = require('process');
-const assert = require('assert');
-const buffer = fs.readFileSync(process.argv[2]);
-
-let m = new WebAssembly.Module(buffer);
-
-sections = WebAssembly.Module.customSections(m, "foo");
-console.log('section foo', sections);
-assert.strictEqual(sections.length, 1, "didn't create `foo` section");
-section = new Uint8Array(sections[0]);
-console.log('contents', section);
-assert.strictEqual(section.length, 4, "didn't concatenate `foo` sections");
-
-process.exit(0);
diff --git a/tests/run-make/wasm-custom-sections-opt/rmake.rs b/tests/run-make/wasm-custom-sections-opt/rmake.rs
new file mode 100644
index 0000000000000..db31d6b716391
--- /dev/null
+++ b/tests/run-make/wasm-custom-sections-opt/rmake.rs
@@ -0,0 +1,30 @@
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustc, wasmparser};
+use std::collections::HashMap;
+use std::path::Path;
+
+fn main() {
+    if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
+        return;
+    }
+
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").arg("-O").run();
+    verify(&out_dir().join("foo.wasm"));
+}
+
+fn verify(path: &Path) {
+    eprintln!("verify {path:?}");
+    let file = std::fs::read(&path).unwrap();
+
+    let mut custom = HashMap::new();
+    for payload in wasmparser::Parser::new(0).parse_all(&file) {
+        let payload = payload.unwrap();
+        if let wasmparser::Payload::CustomSection(s) = payload {
+            let prev = custom.insert(s.name(), s.data());
+            assert!(prev.is_none());
+        }
+    }
+
+    assert_eq!(custom.remove("foo"), Some(&[1, 2, 3, 4][..]));
+}
diff --git a/tests/run-make/wasm-export-all-symbols/Makefile b/tests/run-make/wasm-export-all-symbols/Makefile
deleted file mode 100644
index 86713bc80b85a..0000000000000
--- a/tests/run-make/wasm-export-all-symbols/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-include ../tools.mk
-
-# only-wasm32-bare
-
-all:
-	$(RUSTC) bar.rs --target wasm32-unknown-unknown
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown
-	$(NODE) verify.js $(TMPDIR)/foo.wasm
-	$(RUSTC) main.rs --target wasm32-unknown-unknown
-	$(NODE) verify.js $(TMPDIR)/main.wasm
-	$(RUSTC) bar.rs --target wasm32-unknown-unknown -O
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown -O
-	$(NODE) verify.js $(TMPDIR)/foo.wasm
-	$(RUSTC) main.rs --target wasm32-unknown-unknown -O
-	$(NODE) verify.js $(TMPDIR)/main.wasm
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown -C lto
-	$(NODE) verify.js $(TMPDIR)/foo.wasm
-	$(RUSTC) main.rs --target wasm32-unknown-unknown -C lto
-	$(NODE) verify.js $(TMPDIR)/main.wasm
diff --git a/tests/run-make/wasm-export-all-symbols/rmake.rs b/tests/run-make/wasm-export-all-symbols/rmake.rs
new file mode 100644
index 0000000000000..e3b118279b757
--- /dev/null
+++ b/tests/run-make/wasm-export-all-symbols/rmake.rs
@@ -0,0 +1,60 @@
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustc, wasmparser};
+use std::collections::HashMap;
+use std::path::Path;
+use wasmparser::ExternalKind::*;
+
+fn main() {
+    if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
+        return;
+    }
+
+    test(&[]);
+    test(&["-O"]);
+    test(&["-Clto"]);
+}
+
+fn test(args: &[&str]) {
+    eprintln!("running with {args:?}");
+    rustc().arg("bar.rs").arg("--target=wasm32-wasip1").args(args).run();
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").args(args).run();
+    rustc().arg("main.rs").arg("--target=wasm32-wasip1").args(args).run();
+
+    verify_exports(
+        &out_dir().join("foo.wasm"),
+        &[("foo", Func), ("FOO", Global), ("memory", Memory)],
+    );
+    verify_exports(
+        &out_dir().join("main.wasm"),
+        &[
+            ("foo", Func),
+            ("FOO", Global),
+            ("_start", Func),
+            ("__main_void", Func),
+            ("memory", Memory),
+        ],
+    );
+}
+
+fn verify_exports(path: &Path, exports: &[(&str, wasmparser::ExternalKind)]) {
+    println!("verify {path:?}");
+    let file = std::fs::read(path).unwrap();
+    let mut wasm_exports = HashMap::new();
+    for payload in wasmparser::Parser::new(0).parse_all(&file) {
+        let payload = payload.unwrap();
+        if let wasmparser::Payload::ExportSection(s) = payload {
+            for export in s {
+                let export = export.unwrap();
+                wasm_exports.insert(export.name, export.kind);
+            }
+        }
+    }
+
+    eprintln!("found exports {wasm_exports:?}");
+
+    assert_eq!(exports.len(), wasm_exports.len());
+    for (export, expected_kind) in exports {
+        assert_eq!(wasm_exports[export], *expected_kind);
+    }
+}
diff --git a/tests/run-make/wasm-export-all-symbols/verify.js b/tests/run-make/wasm-export-all-symbols/verify.js
deleted file mode 100644
index 72db3356f5635..0000000000000
--- a/tests/run-make/wasm-export-all-symbols/verify.js
+++ /dev/null
@@ -1,32 +0,0 @@
-const fs = require('fs');
-const process = require('process');
-const assert = require('assert');
-const buffer = fs.readFileSync(process.argv[2]);
-
-let m = new WebAssembly.Module(buffer);
-let list = WebAssembly.Module.exports(m);
-console.log('exports', list);
-
-const my_exports = {};
-let nexports = 0;
-
-for (const entry of list) {
-  if (entry.kind == 'function'){
-    nexports += 1;
-  }
-  my_exports[entry.name] = entry.kind;
-}
-
-if (my_exports.foo != "function")
-  throw new Error("`foo` wasn't defined");
-
-if (my_exports.FOO != "global")
-  throw new Error("`FOO` wasn't defined");
-
-if (my_exports.main === undefined) {
-  if (nexports != 1)
-    throw new Error("should only have one function export");
-} else {
-  if (nexports != 2)
-    throw new Error("should only have two function exports");
-}
diff --git a/tests/run-make/wasm-import-module/Makefile b/tests/run-make/wasm-import-module/Makefile
deleted file mode 100644
index a0b4d920b3d0d..0000000000000
--- a/tests/run-make/wasm-import-module/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-include ../tools.mk
-
- # only-wasm32-bare
-
-all:
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown
-	$(RUSTC) bar.rs -C lto -O --target wasm32-unknown-unknown
-	$(NODE) foo.js $(TMPDIR)/bar.wasm
diff --git a/tests/run-make/wasm-import-module/foo.js b/tests/run-make/wasm-import-module/foo.js
deleted file mode 100644
index 3ea47fcc930e7..0000000000000
--- a/tests/run-make/wasm-import-module/foo.js
+++ /dev/null
@@ -1,18 +0,0 @@
-const fs = require('fs');
-const process = require('process');
-const assert = require('assert');
-const buffer = fs.readFileSync(process.argv[2]);
-
-let m = new WebAssembly.Module(buffer);
-let imports = WebAssembly.Module.imports(m);
-console.log('imports', imports);
-assert.strictEqual(imports.length, 2);
-
-assert.strictEqual(imports[0].kind, 'function');
-assert.strictEqual(imports[1].kind, 'function');
-
-let modules = [imports[0].module, imports[1].module];
-modules.sort();
-
-assert.strictEqual(modules[0], './dep');
-assert.strictEqual(modules[1], './me');
diff --git a/tests/run-make/wasm-import-module/rmake.rs b/tests/run-make/wasm-import-module/rmake.rs
new file mode 100644
index 0000000000000..e521b5b0983ac
--- /dev/null
+++ b/tests/run-make/wasm-import-module/rmake.rs
@@ -0,0 +1,32 @@
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustc, wasmparser};
+use std::collections::HashMap;
+use wasmparser::TypeRef::Func;
+
+fn main() {
+    if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
+        return;
+    }
+
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").run();
+    rustc().arg("bar.rs").arg("--target=wasm32-wasip1").arg("-Clto").arg("-O").run();
+
+    let file = std::fs::read(&out_dir().join("bar.wasm")).unwrap();
+
+    let mut imports = HashMap::new();
+    for payload in wasmparser::Parser::new(0).parse_all(&file) {
+        let payload = payload.unwrap();
+        if let wasmparser::Payload::ImportSection(s) = payload {
+            for i in s {
+                let i = i.unwrap();
+                imports.entry(i.module).or_insert(Vec::new()).push((i.name, i.ty));
+            }
+        }
+    }
+
+    let import = imports.remove("./dep");
+    assert!(matches!(import.as_deref(), Some([("dep", Func(_))])), "bad import {:?}", import);
+    let import = imports.remove("./me");
+    assert!(matches!(import.as_deref(), Some([("me_in_dep", Func(_))])), "bad import {:?}", import);
+}
diff --git a/tests/run-make/wasm-panic-small/Makefile b/tests/run-make/wasm-panic-small/Makefile
deleted file mode 100644
index 16f545218556f..0000000000000
--- a/tests/run-make/wasm-panic-small/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-include ../tools.mk
-
-# only-wasm32-bare
-
-all:
-	$(RUSTC) foo.rs -C lto -O --target wasm32-unknown-unknown --cfg a
-	wc -c < $(TMPDIR)/foo.wasm
-	[ "`wc -c < $(TMPDIR)/foo.wasm`" -lt "1024" ]
-	$(RUSTC) foo.rs -C lto -O --target wasm32-unknown-unknown --cfg b
-	wc -c < $(TMPDIR)/foo.wasm
-	[ "`wc -c < $(TMPDIR)/foo.wasm`" -lt "5120" ]
-	$(RUSTC) foo.rs -C lto -O --target wasm32-unknown-unknown --cfg c
-	wc -c < $(TMPDIR)/foo.wasm
-	[ "`wc -c < $(TMPDIR)/foo.wasm`" -lt "5120" ]
-	$(RUSTC) foo.rs -C lto -O --target wasm32-unknown-unknown --cfg d
-	wc -c < $(TMPDIR)/foo.wasm
-	[ "`wc -c < $(TMPDIR)/foo.wasm`" -lt "5120" ]
diff --git a/tests/run-make/wasm-panic-small/rmake.rs b/tests/run-make/wasm-panic-small/rmake.rs
new file mode 100644
index 0000000000000..0260485f74475
--- /dev/null
+++ b/tests/run-make/wasm-panic-small/rmake.rs
@@ -0,0 +1,32 @@
+#![deny(warnings)]
+
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustc};
+
+fn main() {
+    if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
+        return;
+    }
+
+    test("a");
+    test("b");
+    test("c");
+    test("d");
+}
+
+fn test(cfg: &str) {
+    eprintln!("running cfg {cfg:?}");
+    rustc()
+        .arg("foo.rs")
+        .arg("--target=wasm32-wasip1")
+        .arg("-Clto")
+        .arg("-O")
+        .arg("--cfg")
+        .arg(cfg)
+        .run();
+
+    let bytes = std::fs::read(&out_dir().join("foo.wasm")).unwrap();
+    println!("{}", bytes.len());
+    assert!(bytes.len() < 40_000);
+}
diff --git a/tests/run-make/wasm-spurious-import/Makefile b/tests/run-make/wasm-spurious-import/Makefile
deleted file mode 100644
index ff9dfeac6d00c..0000000000000
--- a/tests/run-make/wasm-spurious-import/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-include ../tools.mk
-
-# only-wasm32-bare
-
-all:
-	$(RUSTC) main.rs -C overflow-checks=yes -C panic=abort -C lto -C opt-level=z --target wasm32-unknown-unknown
-	$(NODE) verify.js $(TMPDIR)/main.wasm
diff --git a/tests/run-make/wasm-spurious-import/rmake.rs b/tests/run-make/wasm-spurious-import/rmake.rs
new file mode 100644
index 0000000000000..0ac9104bfb4e8
--- /dev/null
+++ b/tests/run-make/wasm-spurious-import/rmake.rs
@@ -0,0 +1,35 @@
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustc, wasmparser};
+use std::collections::HashMap;
+use wasmparser::TypeRef::Func;
+
+fn main() {
+    if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
+        return;
+    }
+
+    rustc()
+        .arg("main.rs")
+        .arg("--target=wasm32-wasip1")
+        .arg("-Coverflow-checks=yes")
+        .arg("-Cpanic=abort")
+        .arg("-Clto")
+        .arg("-Copt-level=z")
+        .run();
+
+    let file = std::fs::read(&out_dir().join("main.wasm")).unwrap();
+
+    let mut imports = HashMap::new();
+    for payload in wasmparser::Parser::new(0).parse_all(&file) {
+        let payload = payload.unwrap();
+        if let wasmparser::Payload::ImportSection(s) = payload {
+            for i in s {
+                let i = i.unwrap();
+                imports.entry(i.module).or_insert(Vec::new()).push((i.name, i.ty));
+            }
+        }
+    }
+
+    assert!(imports.is_empty(), "imports are not empty {:?}", imports);
+}
diff --git a/tests/run-make/wasm-spurious-import/verify.js b/tests/run-make/wasm-spurious-import/verify.js
deleted file mode 100644
index d3b2101b6623c..0000000000000
--- a/tests/run-make/wasm-spurious-import/verify.js
+++ /dev/null
@@ -1,9 +0,0 @@
-const fs = require('fs');
-const process = require('process');
-const assert = require('assert');
-const buffer = fs.readFileSync(process.argv[2]);
-
-let m = new WebAssembly.Module(buffer);
-let imports = WebAssembly.Module.imports(m);
-console.log('imports', imports);
-assert.strictEqual(imports.length, 0);
diff --git a/tests/run-make/wasm-stringify-ints-small/Makefile b/tests/run-make/wasm-stringify-ints-small/Makefile
deleted file mode 100644
index f959dbd426b9f..0000000000000
--- a/tests/run-make/wasm-stringify-ints-small/Makefile
+++ /dev/null
@@ -1,10 +0,0 @@
-include ../tools.mk
-
-ifeq ($(TARGET),wasm32-unknown-unknown)
-all:
-	$(RUSTC) foo.rs -C lto -O --target wasm32-unknown-unknown
-	wc -c < $(TMPDIR)/foo.wasm
-	[ "`wc -c < $(TMPDIR)/foo.wasm`" -lt "25000" ]
-else
-all:
-endif
diff --git a/tests/run-make/wasm-stringify-ints-small/rmake.rs b/tests/run-make/wasm-stringify-ints-small/rmake.rs
new file mode 100644
index 0000000000000..80cff7acdf419
--- /dev/null
+++ b/tests/run-make/wasm-stringify-ints-small/rmake.rs
@@ -0,0 +1,17 @@
+#![deny(warnings)]
+
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustc};
+
+fn main() {
+    if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
+        return;
+    }
+
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").arg("-Clto").arg("-O").run();
+
+    let bytes = std::fs::read(&out_dir().join("foo.wasm")).unwrap();
+    println!("{}", bytes.len());
+    assert!(bytes.len() < 50_000);
+}
diff --git a/tests/run-make/wasm-symbols-different-module/Makefile b/tests/run-make/wasm-symbols-different-module/Makefile
deleted file mode 100644
index 0f86914c7b1f2..0000000000000
--- a/tests/run-make/wasm-symbols-different-module/Makefile
+++ /dev/null
@@ -1,28 +0,0 @@
-include ../tools.mk
-
-# only-wasm32-bare
-
-all:
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown
-	$(NODE) verify-imports.js $(TMPDIR)/foo.wasm a/foo b/foo
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown -C lto
-	$(NODE) verify-imports.js $(TMPDIR)/foo.wasm a/foo b/foo
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown -O
-	$(NODE) verify-imports.js $(TMPDIR)/foo.wasm a/foo b/foo
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown -O -C lto
-	$(NODE) verify-imports.js $(TMPDIR)/foo.wasm a/foo b/foo
-
-	$(RUSTC) bar.rs --target wasm32-unknown-unknown
-	$(NODE) verify-imports.js $(TMPDIR)/bar.wasm m1/f m1/g m2/f
-	$(RUSTC) bar.rs --target wasm32-unknown-unknown -C lto
-	$(NODE) verify-imports.js $(TMPDIR)/bar.wasm m1/f m1/g m2/f
-	$(RUSTC) bar.rs --target wasm32-unknown-unknown -O
-	$(NODE) verify-imports.js $(TMPDIR)/bar.wasm m1/f m1/g m2/f
-	$(RUSTC) bar.rs --target wasm32-unknown-unknown -O -C lto
-	$(NODE) verify-imports.js $(TMPDIR)/bar.wasm m1/f m1/g m2/f
-
-	$(RUSTC) baz.rs --target wasm32-unknown-unknown
-	$(NODE) verify-imports.js $(TMPDIR)/baz.wasm sqlite/allocate sqlite/deallocate
-
-	$(RUSTC) log.rs --target wasm32-unknown-unknown
-	$(NODE) verify-imports.js $(TMPDIR)/log.wasm test/log
diff --git a/tests/run-make/wasm-symbols-different-module/rmake.rs b/tests/run-make/wasm-symbols-different-module/rmake.rs
new file mode 100644
index 0000000000000..c3cc1e0c32b71
--- /dev/null
+++ b/tests/run-make/wasm-symbols-different-module/rmake.rs
@@ -0,0 +1,52 @@
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustc, wasmparser};
+use std::collections::{HashMap, HashSet};
+
+fn main() {
+    if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
+        return;
+    }
+
+    test_file("foo.rs", &[("a", &["foo"]), ("b", &["foo"])]);
+    test_file("bar.rs", &[("m1", &["f", "g"]), ("m2", &["f"])]);
+    test_file("baz.rs", &[("sqlite", &["allocate", "deallocate"])]);
+    test_file("log.rs", &[("test", &["log"])]);
+}
+
+fn test_file(file: &str, expected_imports: &[(&str, &[&str])]) {
+    test(file, &[], expected_imports);
+    test(file, &["-Clto"], expected_imports);
+    test(file, &["-O"], expected_imports);
+    test(file, &["-Clto", "-O"], expected_imports);
+}
+
+fn test(file: &str, args: &[&str], expected_imports: &[(&str, &[&str])]) {
+    println!("test {file:?} {args:?} for {expected_imports:?}");
+
+    rustc().arg(file).arg("--target=wasm32-wasip1").args(args).run();
+
+    let file = std::fs::read(&out_dir().join(file).with_extension("wasm")).unwrap();
+
+    let mut imports = HashMap::new();
+    for payload in wasmparser::Parser::new(0).parse_all(&file) {
+        let payload = payload.unwrap();
+        if let wasmparser::Payload::ImportSection(s) = payload {
+            for i in s {
+                let i = i.unwrap();
+                imports.entry(i.module).or_insert(HashSet::new()).insert(i.name);
+            }
+        }
+    }
+
+    eprintln!("imports {imports:?}");
+
+    for (expected_module, expected_names) in expected_imports {
+        let names = imports.remove(expected_module).unwrap();
+        assert_eq!(names.len(), expected_names.len());
+        for name in *expected_names {
+            assert!(names.contains(name));
+        }
+    }
+    assert!(imports.is_empty());
+}
diff --git a/tests/run-make/wasm-symbols-different-module/verify-imports.js b/tests/run-make/wasm-symbols-different-module/verify-imports.js
deleted file mode 100644
index 7e9f90cf8bdc6..0000000000000
--- a/tests/run-make/wasm-symbols-different-module/verify-imports.js
+++ /dev/null
@@ -1,32 +0,0 @@
-const fs = require('fs');
-const process = require('process');
-const assert = require('assert');
-const buffer = fs.readFileSync(process.argv[2]);
-
-let m = new WebAssembly.Module(buffer);
-let list = WebAssembly.Module.imports(m);
-console.log('imports', list);
-if (list.length !== process.argv.length - 3)
-  throw new Error("wrong number of imports")
-
-const imports = new Map();
-for (let i = 3; i < process.argv.length; i++) {
-  const [module, name] = process.argv[i].split('/');
-  if (!imports.has(module))
-    imports.set(module, new Map());
-  imports.get(module).set(name, true);
-}
-
-for (let i of list) {
-  if (imports.get(i.module) === undefined || imports.get(i.module).get(i.name) === undefined)
-    throw new Error(`didn't find import of ${i.module}::${i.name}`);
-  imports.get(i.module).delete(i.name);
-
-  if (imports.get(i.module).size === 0)
-    imports.delete(i.module);
-}
-
-console.log(imports);
-if (imports.size !== 0) {
-  throw new Error('extra imports');
-}
diff --git a/tests/run-make/wasm-symbols-not-exported/Makefile b/tests/run-make/wasm-symbols-not-exported/Makefile
deleted file mode 100644
index 024ad7797488d..0000000000000
--- a/tests/run-make/wasm-symbols-not-exported/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-include ../tools.mk
-
-# only-wasm32-bare
-
-all:
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown
-	$(NODE) verify-exported-symbols.js $(TMPDIR)/foo.wasm
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown -O
-	$(NODE) verify-exported-symbols.js $(TMPDIR)/foo.wasm
-	$(RUSTC) bar.rs --target wasm32-unknown-unknown
-	$(NODE) verify-exported-symbols.js $(TMPDIR)/bar.wasm
-	$(RUSTC) bar.rs --target wasm32-unknown-unknown -O
-	$(NODE) verify-exported-symbols.js $(TMPDIR)/bar.wasm
diff --git a/tests/run-make/wasm-symbols-not-exported/rmake.rs b/tests/run-make/wasm-symbols-not-exported/rmake.rs
new file mode 100644
index 0000000000000..5ff0dc578b341
--- /dev/null
+++ b/tests/run-make/wasm-symbols-not-exported/rmake.rs
@@ -0,0 +1,41 @@
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustc, wasmparser};
+use std::path::Path;
+
+fn main() {
+    if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
+        return;
+    }
+
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").run();
+    verify_symbols(&out_dir().join("foo.wasm"));
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").arg("-O").run();
+    verify_symbols(&out_dir().join("foo.wasm"));
+
+    rustc().arg("bar.rs").arg("--target=wasm32-wasip1").run();
+    verify_symbols(&out_dir().join("bar.wasm"));
+    rustc().arg("bar.rs").arg("--target=wasm32-wasip1").arg("-O").run();
+    verify_symbols(&out_dir().join("bar.wasm"));
+}
+
+fn verify_symbols(path: &Path) {
+    eprintln!("verify {path:?}");
+    let file = std::fs::read(&path).unwrap();
+
+    for payload in wasmparser::Parser::new(0).parse_all(&file) {
+        let payload = payload.unwrap();
+        if let wasmparser::Payload::ExportSection(s) = payload {
+            for e in s {
+                let e = e.unwrap();
+                if e.kind != wasmparser::ExternalKind::Func {
+                    continue;
+                }
+                if e.name == "foo" {
+                    continue;
+                }
+                panic!("unexpected export {e:?}");
+            }
+        }
+    }
+}
diff --git a/tests/run-make/wasm-symbols-not-exported/verify-exported-symbols.js b/tests/run-make/wasm-symbols-not-exported/verify-exported-symbols.js
deleted file mode 100644
index afc8a7241f54e..0000000000000
--- a/tests/run-make/wasm-symbols-not-exported/verify-exported-symbols.js
+++ /dev/null
@@ -1,21 +0,0 @@
-const fs = require('fs');
-const process = require('process');
-const assert = require('assert');
-const buffer = fs.readFileSync(process.argv[2]);
-
-let m = new WebAssembly.Module(buffer);
-let list = WebAssembly.Module.exports(m);
-console.log('exports', list);
-
-let bad = false;
-for (let i = 0; i < list.length; i++) {
-  const e = list[i];
-  if (e.name == "foo" || e.kind != "function")
-    continue;
-
-  console.log('unexpected exported symbol:', e.name);
-  bad = true;
-}
-
-if (bad)
-  process.exit(1);
diff --git a/tests/run-make/wasm-symbols-not-imported/Makefile b/tests/run-make/wasm-symbols-not-imported/Makefile
deleted file mode 100644
index 38440a8b0258c..0000000000000
--- a/tests/run-make/wasm-symbols-not-imported/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-include ../tools.mk
-
-# only-wasm32-bare
-
-all:
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown
-	$(NODE) verify-no-imports.js $(TMPDIR)/foo.wasm
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown -C lto
-	$(NODE) verify-no-imports.js $(TMPDIR)/foo.wasm
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown -O
-	$(NODE) verify-no-imports.js $(TMPDIR)/foo.wasm
-	$(RUSTC) foo.rs --target wasm32-unknown-unknown -O -C lto
-	$(NODE) verify-no-imports.js $(TMPDIR)/foo.wasm
diff --git a/tests/run-make/wasm-symbols-not-imported/rmake.rs b/tests/run-make/wasm-symbols-not-imported/rmake.rs
new file mode 100644
index 0000000000000..974f415166b9f
--- /dev/null
+++ b/tests/run-make/wasm-symbols-not-imported/rmake.rs
@@ -0,0 +1,31 @@
+extern crate run_make_support;
+
+use run_make_support::{out_dir, rustc, wasmparser};
+use std::path::Path;
+
+fn main() {
+    if std::env::var("TARGET").unwrap() != "wasm32-wasip1" {
+        return;
+    }
+
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").run();
+    verify_symbols(&out_dir().join("foo.wasm"));
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").arg("-Clto").run();
+    verify_symbols(&out_dir().join("foo.wasm"));
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").arg("-O").run();
+    verify_symbols(&out_dir().join("foo.wasm"));
+    rustc().arg("foo.rs").arg("--target=wasm32-wasip1").arg("-Clto").arg("-O").run();
+    verify_symbols(&out_dir().join("foo.wasm"));
+}
+
+fn verify_symbols(path: &Path) {
+    eprintln!("verify {path:?}");
+    let file = std::fs::read(&path).unwrap();
+
+    for payload in wasmparser::Parser::new(0).parse_all(&file) {
+        let payload = payload.unwrap();
+        if let wasmparser::Payload::ImportSection(_) = payload {
+            panic!("import section found");
+        }
+    }
+}
diff --git a/tests/run-make/wasm-symbols-not-imported/verify-no-imports.js b/tests/run-make/wasm-symbols-not-imported/verify-no-imports.js
deleted file mode 100644
index 90e3df1d98d33..0000000000000
--- a/tests/run-make/wasm-symbols-not-imported/verify-no-imports.js
+++ /dev/null
@@ -1,10 +0,0 @@
-const fs = require('fs');
-const process = require('process');
-const assert = require('assert');
-const buffer = fs.readFileSync(process.argv[2]);
-
-let m = new WebAssembly.Module(buffer);
-let list = WebAssembly.Module.imports(m);
-console.log('imports', list);
-if (list.length !== 0)
-  throw new Error("there are some imports");

From 8fcc009f7d3d0dbe7fcee8e4df890e78c346378c Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Wed, 6 Mar 2024 12:40:03 -0800
Subject: [PATCH 2/7] libtest: Print timing information on WASI

This commit updates the libtest conditionals to use `std::time::Instant`
on WASI targets where it's implemented. Previously all wasm targets
wouldn't use this type.
---
 library/test/src/console.rs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/library/test/src/console.rs b/library/test/src/console.rs
index 09aa3bfb6aac3..8096e498263ef 100644
--- a/library/test/src/console.rs
+++ b/library/test/src/console.rs
@@ -323,10 +323,11 @@ pub fn run_tests_console(opts: &TestOpts, tests: Vec<TestDescAndFn>) -> io::Resu
     // Prevent the usage of `Instant` in some cases:
     // - It's currently not supported for wasm targets.
     // - We disable it for miri because it's not available when isolation is enabled.
-    let is_instant_supported =
-        !cfg!(target_family = "wasm") && !cfg!(target_os = "zkvm") && !cfg!(miri);
+    let is_instant_unsupported = (cfg!(target_family = "wasm") && !cfg!(target_os = "wasi"))
+        || cfg!(target_os = "zkvm")
+        || cfg!(miri);
 
-    let start_time = is_instant_supported.then(Instant::now);
+    let start_time = (!is_instant_unsupported).then(Instant::now);
     run_tests(opts, tests, |x| on_test_event(&x, &mut st, &mut *out))?;
     st.exec_time = start_time.map(|t| TestSuiteExecTime(t.elapsed()));
 

From 7d9690a3bcb4ce57165341e5f5d0a2161283076d Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Wed, 6 Mar 2024 12:41:08 -0800
Subject: [PATCH 3/7] Remove old support for emscripten/wasm32-u-u

This commit removes the `wasm32-shim.js` file, for example, and deletes
old support for Emscripten which hasn't been exercised in some time.
---
 src/bootstrap/src/core/build_steps/test.rs | 15 +++--------
 src/etc/wasm32-shim.js                     | 24 -----------------
 src/tools/compiletest/src/runtest.rs       | 30 +---------------------
 3 files changed, 4 insertions(+), 65 deletions(-)
 delete mode 100644 src/etc/wasm32-shim.js

diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index 248d831b6e30e..47b0637538b24 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -1657,8 +1657,8 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
         // ensure that `libproc_macro` is available on the host.
         builder.ensure(compile::Std::new(compiler, compiler.host));
 
-        // As well as the target, except for plain wasm32, which can't build it
-        if suite != "mir-opt" && !target.contains("wasm") && !target.contains("emscripten") {
+        // As well as the target
+        if suite != "mir-opt" {
             builder.ensure(TestHelpers { target });
         }
 
@@ -2511,16 +2511,7 @@ fn prepare_cargo_test(
     dylib_path.insert(0, PathBuf::from(&*builder.sysroot_libdir(compiler, target)));
     cargo.env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
 
-    if target.contains("emscripten") {
-        cargo.env(
-            format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)),
-            builder.config.nodejs.as_ref().expect("nodejs not configured"),
-        );
-    } else if target.starts_with("wasm32") {
-        let node = builder.config.nodejs.as_ref().expect("nodejs not configured");
-        let runner = format!("{} {}/src/etc/wasm32-shim.js", node.display(), builder.src.display());
-        cargo.env(format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)), &runner);
-    } else if builder.remote_tested(target) {
+    if builder.remote_tested(target) {
         cargo.env(
             format!("CARGO_TARGET_{}_RUNNER", envify(&target.triple)),
             format!("{} run 0", builder.tool_exe(Tool::RemoteTestClient).display()),
diff --git a/src/etc/wasm32-shim.js b/src/etc/wasm32-shim.js
deleted file mode 100644
index 262a53eabe3c7..0000000000000
--- a/src/etc/wasm32-shim.js
+++ /dev/null
@@ -1,24 +0,0 @@
-// This is a small "shim" program which is used when wasm32 unit tests are run
-// in this repository. This program is intended to be run in node.js and will
-// load a wasm module into memory, instantiate it with a set of imports, and
-// then run it.
-//
-// There's a bunch of helper functions defined here in `imports.env`, but note
-// that most of them aren't actually needed to execute most programs. Many of
-// these are just intended for completeness or debugging. Hopefully over time
-// nothing here is needed for completeness.
-
-const fs = require('fs');
-const process = require('process');
-const buffer = fs.readFileSync(process.argv[2]);
-
-Error.stackTraceLimit = 20;
-
-let m = new WebAssembly.Module(buffer);
-let instance = new WebAssembly.Instance(m, {});
-try {
-  instance.exports.main();
-} catch (e) {
-  console.error(e);
-  process.exit(101);
-}
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 9fd83c507edde..3e0021bf7c65e 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -2632,9 +2632,7 @@ impl<'test> TestCx<'test> {
         // double the length.
         let mut f = self.output_base_dir().join("a");
         // FIXME: This is using the host architecture exe suffix, not target!
-        if self.config.target.contains("emscripten") {
-            f = f.with_extra_extension("js");
-        } else if self.config.target.contains("wasm32") {
+        if self.config.target.starts_with("wasm") {
             f = f.with_extra_extension("wasm");
         } else if self.config.target.contains("spirv") {
             f = f.with_extra_extension("spv");
@@ -2649,32 +2647,6 @@ impl<'test> TestCx<'test> {
         // then split apart its command
         let mut args = self.split_maybe_args(&self.config.runner);
 
-        // If this is emscripten, then run tests under nodejs
-        if self.config.target.contains("emscripten") {
-            if let Some(ref p) = self.config.nodejs {
-                args.push(p.into());
-            } else {
-                self.fatal("emscripten target requested and no NodeJS binary found (--nodejs)");
-            }
-        // If this is otherwise wasm, then run tests under nodejs with our
-        // shim
-        } else if self.config.target.contains("wasm32") {
-            if let Some(ref p) = self.config.nodejs {
-                args.push(p.into());
-            } else {
-                self.fatal("wasm32 target requested and no NodeJS binary found (--nodejs)");
-            }
-
-            let src = self
-                .config
-                .src_base
-                .parent()
-                .unwrap() // chop off `ui`
-                .parent()
-                .unwrap(); // chop off `tests`
-            args.push(src.join("src/etc/wasm32-shim.js").into_os_string());
-        }
-
         let exe_file = self.make_exe_name();
 
         args.push(exe_file.into_os_string());

From 341215c51daf9db2281e989dd559ab0fcc6c73f1 Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Wed, 6 Mar 2024 12:41:46 -0800
Subject: [PATCH 4/7] Configure a default `runner` for WASI targets

If one is not explicitly configured look in the system environment to
try and find one. For now just probing for `wasmtime` is implemented.
---
 src/bootstrap/src/lib.rs | 33 ++++++++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/src/bootstrap/src/lib.rs b/src/bootstrap/src/lib.rs
index 938b95cc60e4b..39bdece8127a4 100644
--- a/src/bootstrap/src/lib.rs
+++ b/src/bootstrap/src/lib.rs
@@ -1360,9 +1360,36 @@ impl Build {
     /// An example of this would be a WebAssembly runtime when testing the wasm
     /// targets.
     fn runner(&self, target: TargetSelection) -> Option<String> {
-        let target = self.config.target_config.get(&target)?;
-        let runner = target.runner.as_ref()?;
-        Some(runner.to_owned())
+        let configured_runner =
+            self.config.target_config.get(&target).and_then(|t| t.runner.as_ref()).map(|p| &**p);
+        if let Some(runner) = configured_runner {
+            return Some(runner.to_owned());
+        }
+
+        if target.starts_with("wasm") && target.contains("wasi") {
+            self.default_wasi_runner()
+        } else {
+            None
+        }
+    }
+
+    /// When a `runner` configuration is not provided and a WASI-looking target
+    /// is being tested this is consulted to prove the environment to see if
+    /// there's a runtime already lying around that seems reasonable to use.
+    fn default_wasi_runner(&self) -> Option<String> {
+        let mut finder = crate::core::sanity::Finder::new();
+
+        // Look for Wasmtime, and for its default options be sure to disable
+        // its caching system since we're executing quite a lot of tests and
+        // ideally shouldn't pollute the cache too much.
+        if let Some(path) = finder.maybe_have("wasmtime") {
+            if let Ok(mut path) = path.into_os_string().into_string() {
+                path.push_str(" run -C cache=n --dir .");
+                return Some(path);
+            }
+        }
+
+        None
     }
 
     /// Returns the root of the "rootfs" image that this target will be using,

From fc746c811867e6dadabb91429813ccf808a84913 Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Wed, 6 Mar 2024 12:42:21 -0800
Subject: [PATCH 5/7] Update test-various docker image to test `wasm32-wasip1`

Drop testing of `wasm32-unknown-unknown` and instead only test a WASI
target which enables more debugging utilities such as printing.
---
 .../docker/host-x86_64/test-various/Dockerfile  | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/ci/docker/host-x86_64/test-various/Dockerfile b/src/ci/docker/host-x86_64/test-various/Dockerfile
index 3fcf12dd9f28e..944d9aed3190b 100644
--- a/src/ci/docker/host-x86_64/test-various/Dockerfile
+++ b/src/ci/docker/host-x86_64/test-various/Dockerfile
@@ -3,6 +3,7 @@ FROM ubuntu:22.04
 ARG DEBIAN_FRONTEND=noninteractive
 RUN apt-get update && apt-get install -y --no-install-recommends \
   clang-11 \
+  llvm-11 \
   g++ \
   make \
   ninja-build \
@@ -38,10 +39,14 @@ WORKDIR /
 COPY scripts/sccache.sh /scripts/
 RUN sh /scripts/sccache.sh
 
+COPY host-x86_64/dist-various-2/build-wasi-toolchain.sh /tmp/
+RUN /tmp/build-wasi-toolchain.sh
+
 ENV RUST_CONFIGURE_ARGS \
   --musl-root-x86_64=/usr/local/x86_64-linux-musl \
   --set build.nodejs=/node-v18.12.0-linux-x64/bin/node \
-  --set rust.lld
+  --set rust.lld \
+  --set target.wasm32-wasip1.wasi-root=/wasm32-wasip1
 
 # Some run-make tests have assertions about code size, and enabling debug
 # assertions in libstd causes the binary to be much bigger than it would
@@ -50,7 +55,11 @@ ENV RUST_CONFIGURE_ARGS \
 ENV NO_DEBUG_ASSERTIONS=1
 ENV NO_OVERFLOW_CHECKS=1
 
-ENV WASM_TARGETS=wasm32-unknown-unknown
+RUN curl -L https://github.com/bytecodealliance/wasmtime/releases/download/v18.0.2/wasmtime-v18.0.2-x86_64-linux.tar.xz | \
+  tar -xJ
+ENV PATH "$PATH:/wasmtime-v18.0.2-x86_64-linux"
+
+ENV WASM_TARGETS=wasm32-wasip1
 ENV WASM_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $WASM_TARGETS \
   tests/run-make \
   tests/ui \
@@ -59,7 +68,9 @@ ENV WASM_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $WASM_T
   tests/codegen \
   tests/assembly \
   library/core
-ENV CC_wasm32_unknown_unknown=clang-11
+ENV CC_wasm32_wasip1=clang-11 \
+    CFLAGS_wasm32_wasip1="--sysroot /wasm32-wasip1" \
+    AR_wasm32_wasip1=llvm-ar-11
 
 ENV NVPTX_TARGETS=nvptx64-nvidia-cuda
 ENV NVPTX_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $NVPTX_TARGETS \

From 4a5aa1a104a9a85cc765af863f64297f9e7e73f6 Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Wed, 6 Mar 2024 12:43:00 -0800
Subject: [PATCH 6/7] compiletest: Automatically compare output by subset with
 runners

This commit updates compiletest to automatically compare test output
with subsets if a `--runner` argument is configured. Runners might
inject extra information on failures, for example a WebAssembly runtime
printing a wasm stack trace, which won't be in the output of a native
runtime. The output with a `--runner` argument, however, should still
have all the native output present.
---
 src/tools/compiletest/src/runtest.rs | 69 ++++++++--------------------
 1 file changed, 20 insertions(+), 49 deletions(-)

diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 3e0021bf7c65e..7be0571b1111b 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -493,12 +493,8 @@ impl<'test> TestCx<'test> {
         let expected_coverage_dump = self.load_expected_output(kind);
         let actual_coverage_dump = self.normalize_output(&proc_res.stdout, &[]);
 
-        let coverage_dump_errors = self.compare_output(
-            kind,
-            &actual_coverage_dump,
-            &expected_coverage_dump,
-            self.props.compare_output_lines_by_subset,
-        );
+        let coverage_dump_errors =
+            self.compare_output(kind, &actual_coverage_dump, &expected_coverage_dump);
 
         if coverage_dump_errors > 0 {
             self.fatal_proc_rec(
@@ -591,12 +587,8 @@ impl<'test> TestCx<'test> {
                 self.fatal_proc_rec(&err, &proc_res);
             });
 
-        let coverage_errors = self.compare_output(
-            kind,
-            &normalized_actual_coverage,
-            &expected_coverage,
-            self.props.compare_output_lines_by_subset,
-        );
+        let coverage_errors =
+            self.compare_output(kind, &normalized_actual_coverage, &expected_coverage);
 
         if coverage_errors > 0 {
             self.fatal_proc_rec(
@@ -4051,35 +4043,17 @@ impl<'test> TestCx<'test> {
         match output_kind {
             TestOutput::Compile => {
                 if !self.props.dont_check_compiler_stdout {
-                    errors += self.compare_output(
-                        stdout_kind,
-                        &normalized_stdout,
-                        &expected_stdout,
-                        self.props.compare_output_lines_by_subset,
-                    );
+                    errors +=
+                        self.compare_output(stdout_kind, &normalized_stdout, &expected_stdout);
                 }
                 if !self.props.dont_check_compiler_stderr {
-                    errors += self.compare_output(
-                        stderr_kind,
-                        &normalized_stderr,
-                        &expected_stderr,
-                        self.props.compare_output_lines_by_subset,
-                    );
+                    errors +=
+                        self.compare_output(stderr_kind, &normalized_stderr, &expected_stderr);
                 }
             }
             TestOutput::Run => {
-                errors += self.compare_output(
-                    stdout_kind,
-                    &normalized_stdout,
-                    &expected_stdout,
-                    self.props.compare_output_lines_by_subset,
-                );
-                errors += self.compare_output(
-                    stderr_kind,
-                    &normalized_stderr,
-                    &expected_stderr,
-                    self.props.compare_output_lines_by_subset,
-                );
+                errors += self.compare_output(stdout_kind, &normalized_stdout, &expected_stdout);
+                errors += self.compare_output(stderr_kind, &normalized_stderr, &expected_stderr);
             }
         }
         errors
@@ -4173,12 +4147,7 @@ impl<'test> TestCx<'test> {
                 )
             });
 
-            errors += self.compare_output(
-                "fixed",
-                &fixed_code,
-                &expected_fixed,
-                self.props.compare_output_lines_by_subset,
-            );
+            errors += self.compare_output("fixed", &fixed_code, &expected_fixed);
         } else if !expected_fixed.is_empty() {
             panic!(
                 "the `//@ run-rustfix` directive wasn't found but a `*.fixed` \
@@ -4673,17 +4642,19 @@ impl<'test> TestCx<'test> {
         }
     }
 
-    fn compare_output(
-        &self,
-        kind: &str,
-        actual: &str,
-        expected: &str,
-        compare_output_by_lines: bool,
-    ) -> usize {
+    fn compare_output(&self, kind: &str, actual: &str, expected: &str) -> usize {
         if actual == expected {
             return 0;
         }
 
+        // If `compare-output-lines-by-subset` is not explicitly enabled then
+        // auto-enable it when a `runner` is in use since wrapper tools might
+        // provide extra output on failure, for example a WebAssembly runtime
+        // might print the stack trace of an `unreachable` instruction by
+        // default.
+        let compare_output_by_lines =
+            self.props.compare_output_lines_by_subset || self.config.runner.is_some();
+
         let tmp;
         let (expected, actual): (&str, &str) = if compare_output_by_lines {
             let actual_lines: HashSet<_> = actual.lines().collect();

From cf6d6050f7d1ea62c9aae54ddd345106b6e31382 Mon Sep 17 00:00:00 2001
From: Alex Crichton <alex@alexcrichton.com>
Date: Wed, 6 Mar 2024 12:44:54 -0800
Subject: [PATCH 7/7] Update test directives for `wasm32-wasip1`

* The WASI targets deal with the `main` symbol a bit differently than
  native so some `codegen` and `assembly` tests have been ignored.
* All `ignore-emscripten` directives have been updated to
  `ignore-wasm32` to be more clear that all wasm targets are ignored and
  it's not just Emscripten.
* Most `ignore-wasm32-bare` directives are now gone.
* Some ignore directives for wasm were switched to `needs-unwind`
  instead.
* Many `ignore-wasm32*` directives are removed as the tests work with
  WASI as opposed to `wasm32-unknown-unknown`.
---
 tests/assembly/wasm_exceptions.rs             |  2 +-
 .../codegen/abi-main-signature-32bit-c-int.rs |  1 +
 tests/codegen/drop.rs                         |  1 -
 tests/codegen/enum/enum-debug-clike.rs        |  1 +
 tests/codegen/enum/enum-debug-niche.rs        |  1 +
 tests/codegen/enum/enum-debug-tagged.rs       |  1 +
 tests/codegen/enum/enum-u128.rs               |  1 +
 tests/codegen/fn-impl-trait-self.rs           |  1 +
 tests/codegen/generic-debug.rs                |  1 +
 tests/codegen/link_section.rs                 |  2 +-
 tests/codegen/mainsubprogram.rs               |  1 +
 tests/codegen/mainsubprogramstart.rs          |  1 +
 tests/codegen/personality_lifetimes.rs        |  1 -
 .../nounwind-on-stable-panic-abort.rs         |  1 -
 .../nounwind-on-stable-panic-unwind.rs        |  1 -
 tests/codegen/unwind-abis/nounwind.rs         |  2 +-
 tests/codegen/unwind-extern-exports.rs        |  1 -
 tests/codegen/unwind-extern-imports.rs        |  1 -
 tests/codegen/wasm_exceptions.rs              |  2 +-
 tests/incremental/change_crate_dep_kind.rs    |  1 -
 tests/incremental/issue-54059.rs              |  1 -
 tests/run-pass-valgrind/exit-flushes.rs       |  2 +-
 tests/ui/abi/anon-extern-mod.rs               |  1 -
 tests/ui/abi/c-stack-as-value.rs              |  1 -
 tests/ui/abi/c-stack-returning-int64.rs       |  1 -
 tests/ui/abi/cabi-int-widening.rs             |  1 -
 .../anon-extern-mod-cross-crate-2.rs          |  1 -
 .../cross-crate/duplicated-external-mods.rs   |  1 -
 tests/ui/abi/extern/extern-call-deep.rs       |  1 -
 tests/ui/abi/extern/extern-call-indirect.rs   |  1 -
 tests/ui/abi/extern/extern-crosscrate.rs      |  1 -
 tests/ui/abi/extern/extern-pass-TwoU16s.rs    |  2 -
 tests/ui/abi/extern/extern-pass-TwoU32s.rs    |  2 -
 tests/ui/abi/extern/extern-pass-TwoU64s.rs    |  2 -
 tests/ui/abi/extern/extern-pass-TwoU8s.rs     |  2 -
 tests/ui/abi/extern/extern-pass-char.rs       |  1 -
 tests/ui/abi/extern/extern-pass-double.rs     |  1 -
 tests/ui/abi/extern/extern-pass-u32.rs        |  1 -
 tests/ui/abi/extern/extern-pass-u64.rs        |  1 -
 tests/ui/abi/extern/extern-return-TwoU16s.rs  |  2 -
 tests/ui/abi/extern/extern-return-TwoU32s.rs  |  2 -
 tests/ui/abi/extern/extern-return-TwoU64s.rs  |  2 -
 tests/ui/abi/extern/extern-return-TwoU8s.rs   |  2 -
 tests/ui/abi/foreign/foreign-dupe.rs          |  1 -
 tests/ui/abi/foreign/foreign-fn-with-byval.rs |  2 -
 tests/ui/abi/foreign/foreign-no-abi.rs        |  1 -
 .../ui/abi/foreign/invoke-external-foreign.rs |  1 -
 .../homogenous-floats-target-feature-mixup.rs |  2 +-
 tests/ui/abi/issue-28676.rs                   |  2 -
 .../issues/issue-62350-sysv-neg-reg-counts.rs |  2 -
 ...sue-97463-broken-abi-leaked-uninit-data.rs |  1 -
 tests/ui/abi/lib-defaults.rs                  |  2 -
 .../ui/abi/mir/mir_codegen_calls_variadic.rs  |  1 -
 tests/ui/abi/segfault-no-out-of-stack.rs      |  2 +-
 tests/ui/abi/statics/static-mut-foreign.rs    |  2 -
 .../ui/abi/statics/static-mut-foreign.stderr  |  4 +-
 tests/ui/abi/struct-enums/struct-return.rs    |  1 -
 tests/ui/abi/union/union-c-interop.rs         |  2 -
 tests/ui/abi/variadic-ffi.rs                  |  1 -
 .../alloc-error/default-alloc-error-hook.rs   |  2 +-
 .../no_std-alloc-error-handler-custom.rs      |  1 -
 .../no_std-alloc-error-handler-default.rs     |  1 -
 tests/ui/asm/issue-87802.rs                   |  1 -
 tests/ui/asm/issue-87802.stderr               |  2 +-
 tests/ui/asm/naked-functions.rs               |  1 -
 tests/ui/asm/naked-functions.stderr           | 70 +++++++-------
 tests/ui/asm/named-asm-labels.rs              |  1 -
 tests/ui/asm/named-asm-labels.stderr          | 92 +++++++++----------
 tests/ui/asm/type-check-1.rs                  |  1 -
 tests/ui/asm/type-check-1.stderr              | 34 +++----
 tests/ui/asm/type-check-4.rs                  |  1 -
 tests/ui/asm/type-check-4.stderr              |  4 +-
 ...-65419-async-fn-resume-after-completion.rs |  2 -
 ...issue-65419-async-fn-resume-after-panic.rs |  1 -
 ...65419-coroutine-resume-after-completion.rs |  2 -
 tests/ui/backtrace.rs                         |  2 +-
 tests/ui/cfg/cfg-family.rs                    |  2 +-
 tests/ui/check-static-recursion-foreign.rs    |  1 -
 tests/ui/codegen/issue-27859.rs               |  1 -
 tests/ui/command/command-argv0.rs             |  2 +-
 tests/ui/command/command-current-dir.rs       |  2 +-
 tests/ui/command/command-exec.rs              |  2 +-
 tests/ui/command/command-pre-exec.rs          |  2 +-
 tests/ui/command/command-setgroups.rs         |  2 +-
 tests/ui/command/issue-10626.rs               |  2 +-
 tests/ui/consts/trait_specialization.rs       |  1 -
 tests/ui/consts/trait_specialization.stderr   |  2 +-
 tests/ui/coroutine/size-moved-locals.rs       |  1 -
 tests/ui/duplicate/dupe-symbols-7.rs          |  1 +
 tests/ui/duplicate/dupe-symbols-7.stderr      |  2 +-
 tests/ui/duplicate/dupe-symbols-8.rs          |  1 +
 tests/ui/duplicate/dupe-symbols-8.stderr      |  2 +-
 tests/ui/env-args-reverse-iterator.rs         |  2 +-
 tests/ui/env-funky-keys.rs                    |  2 +-
 tests/ui/env-null-vars.rs                     |  1 -
 tests/ui/env-vars.rs                          |  1 -
 tests/ui/exec-env.rs                          |  2 +-
 tests/ui/extern/extern-const.fixed            |  1 -
 tests/ui/extern/extern-const.rs               |  1 -
 tests/ui/extern/extern-const.stderr           |  2 +-
 tests/ui/extern/issue-1251.rs                 |  1 -
 tests/ui/foreign/foreign-fn-linkname.rs       |  1 -
 tests/ui/foreign/foreign2.rs                  |  1 -
 tests/ui/inherit-env.rs                       |  3 +-
 tests/ui/intrinsics/intrinsic-alignment.rs    | 11 ++-
 .../intrinsics/panic-uninitialized-zeroed.rs  |  2 +-
 .../non-ice-error-on-worker-io-fail.rs        |  1 -
 tests/ui/issues/issue-12133-3.rs              |  2 +-
 tests/ui/issues/issue-12699.rs                |  1 -
 tests/ui/issues/issue-2214.rs                 |  2 +-
 tests/ui/issues/issue-25185.rs                |  1 -
 tests/ui/issues/issue-33770.rs                |  2 +-
 tests/ui/issues/issue-33992.rs                |  2 +-
 tests/ui/issues/issue-3656.rs                 |  1 -
 tests/ui/issues/issue-39175.rs                |  2 +-
 tests/ui/issues/issue-44216-add-instant.rs    |  5 +-
 .../common-linkage-non-zero-init.rs           |  1 +
 .../issue-69225-SCEVAddExpr-wrap-flag.rs      |  2 -
 ...issue-69225-layout-repeated-checked-add.rs |  2 -
 tests/ui/macros/assert-long-condition.rs      |  1 -
 .../macros/assert-long-condition.run.stderr   |  2 +-
 tests/ui/macros/macros-in-extern.rs           |  1 -
 tests/ui/mir/alignment/misaligned_lhs.rs      |  1 -
 tests/ui/mir/alignment/misaligned_rhs.rs      |  1 -
 tests/ui/mir/alignment/two_pointers.rs        |  1 -
 tests/ui/non-copyable-void.rs                 |  2 -
 tests/ui/non-copyable-void.stderr             |  2 +-
 .../location-add-assign-overflow.rs           |  1 -
 .../location-add-overflow.rs                  |  1 -
 .../location-divide-assign-by-zero.rs         |  1 -
 .../location-divide-by-zero.rs                |  1 -
 .../location-mod-assign-by-zero.rs            |  1 -
 .../location-mod-by-zero.rs                   |  1 -
 .../location-mul-assign-overflow.rs           |  1 -
 .../location-mul-overflow.rs                  |  1 -
 .../location-sub-assign-overflow.rs           |  1 -
 .../location-sub-overflow.rs                  |  1 -
 .../abort-link-to-unwinding-crates.rs         |  2 +-
 tests/ui/panic-runtime/abort.rs               |  2 +-
 tests/ui/panic-runtime/lto-abort.rs           |  2 +-
 tests/ui/panics/abort-on-panic.rs             |  2 +-
 tests/ui/panics/runtime-switch.rs             |  2 +-
 .../short-ice-remove-middle-frames-2.rs       |  1 -
 ...hort-ice-remove-middle-frames-2.run.stderr |  2 +-
 .../panics/short-ice-remove-middle-frames.rs  |  1 -
 .../short-ice-remove-middle-frames.run.stderr |  2 +-
 .../ui/panics/test-should-fail-bad-message.rs |  2 +-
 .../panics/test-should-panic-bad-message.rs   |  2 +-
 .../ui/panics/test-should-panic-no-message.rs |  2 +-
 tests/ui/paths-containing-nul.rs              |  3 +-
 .../precondition-checks/misaligned-slice.rs   |  1 -
 tests/ui/precondition-checks/null-slice.rs    |  1 -
 .../out-of-bounds-get-unchecked.rs            |  1 -
 tests/ui/print-stdout-eprint-stderr.rs        |  2 +-
 tests/ui/privacy/pub-extern-privacy.rs        |  1 -
 tests/ui/proc-macro/crt-static.rs             |  1 -
 tests/ui/proc-macro/macros-in-extern.rs       |  1 -
 tests/ui/process/core-run-destroy.rs          |  2 +-
 tests/ui/process/fds-are-cloexec.rs           |  2 +-
 tests/ui/process/issue-13304.rs               |  2 +-
 tests/ui/process/issue-14456.rs               |  2 +-
 tests/ui/process/issue-14940.rs               |  2 +-
 tests/ui/process/issue-16272.rs               |  2 +-
 tests/ui/process/issue-20091.rs               |  3 +-
 tests/ui/process/multi-panic.rs               |  2 +-
 tests/ui/process/no-stdio.rs                  |  2 +-
 tests/ui/process/println-with-broken-pipe.rs  |  2 +-
 tests/ui/process/process-envs.rs              |  2 +-
 tests/ui/process/process-exit.rs              |  2 +-
 tests/ui/process/process-panic-after-fork.rs  |  4 +-
 tests/ui/process/process-remove-from-env.rs   |  2 +-
 tests/ui/process/process-sigpipe.rs           |  1 -
 tests/ui/process/process-spawn-nonexistent.rs |  2 +-
 .../process-spawn-with-unicode-params.rs      |  2 +-
 .../process/process-status-inherits-stdin.rs  |  2 +-
 tests/ui/process/signal-exit-status.rs        |  2 +-
 tests/ui/process/sigpipe-should-be-ignored.rs |  2 +-
 tests/ui/process/tls-exit-status.rs           |  2 +-
 tests/ui/process/try-wait.rs                  |  3 +-
 .../rfc-1014.rs                               |  1 -
 .../1717-dllimport/library-override.rs        |  1 -
 tests/ui/runtime/atomic-print.rs              |  2 +-
 tests/ui/runtime/backtrace-debuginfo.rs       |  2 +-
 tests/ui/runtime/out-of-stack.rs              |  2 +-
 tests/ui/runtime/running-with-no-runtime.rs   |  2 +-
 .../runtime/signal-alternate-stack-cleanup.rs |  2 +-
 tests/ui/simd/target-feature-mixup.rs         |  2 +-
 tests/ui/std-backtrace.rs                     |  2 +-
 tests/ui/stdio-is-blocking.rs                 |  2 +-
 tests/ui/structs-enums/rec-align-u64.rs       |  9 +-
 tests/ui/test-attrs/test-passed-wasm.rs       | 20 ----
 .../ui/test-attrs/test-passed-wasm.run.stdout |  7 --
 tests/ui/test-attrs/test-passed.rs            |  1 -
 tests/ui/threads-sendsync/sync-send-in-std.rs |  2 +-
 tests/ui/wait-forked-but-failed-child.rs      |  2 +-
 195 files changed, 210 insertions(+), 332 deletions(-)
 delete mode 100644 tests/ui/test-attrs/test-passed-wasm.rs
 delete mode 100644 tests/ui/test-attrs/test-passed-wasm.run.stdout

diff --git a/tests/assembly/wasm_exceptions.rs b/tests/assembly/wasm_exceptions.rs
index 45df444dca462..3d3b13ff32b7b 100644
--- a/tests/assembly/wasm_exceptions.rs
+++ b/tests/assembly/wasm_exceptions.rs
@@ -1,4 +1,4 @@
-//@ only-wasm32-bare
+//@ only-wasm32
 //@ assembly-output: emit-asm
 //@ compile-flags: -C target-feature=+exception-handling
 //@ compile-flags: -C panic=unwind
diff --git a/tests/codegen/abi-main-signature-32bit-c-int.rs b/tests/codegen/abi-main-signature-32bit-c-int.rs
index 52db3d893e1fa..7684024a2e380 100644
--- a/tests/codegen/abi-main-signature-32bit-c-int.rs
+++ b/tests/codegen/abi-main-signature-32bit-c-int.rs
@@ -4,6 +4,7 @@
 // This test is for targets with 32bit c_int only.
 //@ ignore-msp430
 //@ ignore-avr
+//@ ignore-wasi wasi codegens the main symbol differently
 
 fn main() {
 }
diff --git a/tests/codegen/drop.rs b/tests/codegen/drop.rs
index 93e54979a05fe..1e80247ba8aa9 100644
--- a/tests/codegen/drop.rs
+++ b/tests/codegen/drop.rs
@@ -1,4 +1,3 @@
-//@ ignore-wasm32-bare compiled with panic=abort by default
 //@ needs-unwind - this test verifies the amount of drop calls when unwinding is used
 //@ compile-flags: -C no-prepopulate-passes
 
diff --git a/tests/codegen/enum/enum-debug-clike.rs b/tests/codegen/enum/enum-debug-clike.rs
index 205c57d1456ee..59ad587844398 100644
--- a/tests/codegen/enum/enum-debug-clike.rs
+++ b/tests/codegen/enum/enum-debug-clike.rs
@@ -3,6 +3,7 @@
 
 //
 //@ ignore-msvc
+//@ ignore-wasi wasi codegens the main symbol differently
 
 //@ compile-flags: -g -C no-prepopulate-passes
 
diff --git a/tests/codegen/enum/enum-debug-niche.rs b/tests/codegen/enum/enum-debug-niche.rs
index fc6a73e847210..90de928bced6c 100644
--- a/tests/codegen/enum/enum-debug-niche.rs
+++ b/tests/codegen/enum/enum-debug-niche.rs
@@ -2,6 +2,7 @@
 // This is ignored for the fallback mode on MSVC due to problems with PDB.
 
 //@ ignore-msvc
+//@ ignore-wasi wasi codegens the main symbol differently
 
 //@ compile-flags: -g -C no-prepopulate-passes
 
diff --git a/tests/codegen/enum/enum-debug-tagged.rs b/tests/codegen/enum/enum-debug-tagged.rs
index 87a6ccae29132..f13922ee33b83 100644
--- a/tests/codegen/enum/enum-debug-tagged.rs
+++ b/tests/codegen/enum/enum-debug-tagged.rs
@@ -2,6 +2,7 @@
 // This is ignored for the fallback mode on MSVC due to problems with PDB.
 
 //@ ignore-msvc
+//@ ignore-wasi wasi codegens the main symbol differently
 
 //@ compile-flags: -g -C no-prepopulate-passes
 
diff --git a/tests/codegen/enum/enum-u128.rs b/tests/codegen/enum/enum-u128.rs
index 94e80e34068cc..ecdff3c5ce31d 100644
--- a/tests/codegen/enum/enum-u128.rs
+++ b/tests/codegen/enum/enum-u128.rs
@@ -3,6 +3,7 @@
 
 //
 //@ ignore-msvc
+//@ ignore-wasi wasi codegens the main symbol differently
 
 //@ compile-flags: -g -C no-prepopulate-passes
 
diff --git a/tests/codegen/fn-impl-trait-self.rs b/tests/codegen/fn-impl-trait-self.rs
index 9f10762d8fa72..5799d23b5a03a 100644
--- a/tests/codegen/fn-impl-trait-self.rs
+++ b/tests/codegen/fn-impl-trait-self.rs
@@ -1,4 +1,5 @@
 //@ compile-flags: -g
+//@ ignore-wasi wasi codegens the main symbol differently
 //
 // CHECK-LABEL: @main
 // MSVC: {{.*}}DIDerivedType(tag: DW_TAG_pointer_type, name: "recursive_type$ (*)()",{{.*}}
diff --git a/tests/codegen/generic-debug.rs b/tests/codegen/generic-debug.rs
index 87a0ddfea93fc..0f289026396f4 100644
--- a/tests/codegen/generic-debug.rs
+++ b/tests/codegen/generic-debug.rs
@@ -1,4 +1,5 @@
 //@ ignore-windows
+//@ ignore-wasi wasi codegens the main symbol differently
 
 //@ compile-flags: -g -C no-prepopulate-passes
 
diff --git a/tests/codegen/link_section.rs b/tests/codegen/link_section.rs
index 6747feba211b7..281d3fb99d463 100644
--- a/tests/codegen/link_section.rs
+++ b/tests/codegen/link_section.rs
@@ -1,4 +1,4 @@
-//@ ignore-emscripten default visibility is hidden
+//@ ignore-wasm32 custom sections work differently on wasm
 //@ compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/mainsubprogram.rs b/tests/codegen/mainsubprogram.rs
index 8e173df0e86a5..c1933b2b3904e 100644
--- a/tests/codegen/mainsubprogram.rs
+++ b/tests/codegen/mainsubprogram.rs
@@ -3,6 +3,7 @@
 
 //@ ignore-windows
 //@ ignore-macos
+//@ ignore-wasi
 
 //@ compile-flags: -g -C no-prepopulate-passes
 
diff --git a/tests/codegen/mainsubprogramstart.rs b/tests/codegen/mainsubprogramstart.rs
index db2c1466bf5f6..84d680b9bff91 100644
--- a/tests/codegen/mainsubprogramstart.rs
+++ b/tests/codegen/mainsubprogramstart.rs
@@ -1,5 +1,6 @@
 //@ ignore-windows
 //@ ignore-macos
+//@ ignore-wasi wasi codegens the main symbol differently
 
 //@ compile-flags: -g -C no-prepopulate-passes
 
diff --git a/tests/codegen/personality_lifetimes.rs b/tests/codegen/personality_lifetimes.rs
index 06389688e0e20..f2ab9c3bb82bc 100644
--- a/tests/codegen/personality_lifetimes.rs
+++ b/tests/codegen/personality_lifetimes.rs
@@ -1,5 +1,4 @@
 //@ ignore-msvc
-//@ ignore-wasm32-bare compiled with panic=abort by default
 //@ needs-unwind
 
 //@ compile-flags: -O -C no-prepopulate-passes
diff --git a/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs b/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs
index 0b3bfd567aa6c..d27cbd60437b3 100644
--- a/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs
+++ b/tests/codegen/unwind-abis/nounwind-on-stable-panic-abort.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -C opt-level=0 -Cpanic=abort
-//@ ignore-wasm32-bare compiled with panic=abort by default
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs b/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs
index 1e6f8c9ede905..a7f7f2fb77f71 100644
--- a/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs
+++ b/tests/codegen/unwind-abis/nounwind-on-stable-panic-unwind.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -C opt-level=0
-//@ ignore-wasm32-bare compiled with panic=abort by default
 //@ needs-unwind
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/unwind-abis/nounwind.rs b/tests/codegen/unwind-abis/nounwind.rs
index ac53cd7bed3ca..80bf8d6709139 100644
--- a/tests/codegen/unwind-abis/nounwind.rs
+++ b/tests/codegen/unwind-abis/nounwind.rs
@@ -1,5 +1,5 @@
 //@ compile-flags: -C opt-level=0 -Cpanic=abort
-//@ ignore-wasm32-bare compiled with panic=abort by default
+//@ needs-unwind
 
 #![crate_type = "lib"]
 #![feature(c_unwind)]
diff --git a/tests/codegen/unwind-extern-exports.rs b/tests/codegen/unwind-extern-exports.rs
index d670a776ac69b..ea59748b3bcd2 100644
--- a/tests/codegen/unwind-extern-exports.rs
+++ b/tests/codegen/unwind-extern-exports.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -C opt-level=0
-//@ ignore-wasm32-bare compiled with panic=abort by default
 //@ needs-unwind
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/unwind-extern-imports.rs b/tests/codegen/unwind-extern-imports.rs
index 7386704b43097..790e4def8b363 100644
--- a/tests/codegen/unwind-extern-imports.rs
+++ b/tests/codegen/unwind-extern-imports.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -C no-prepopulate-passes
-//@ ignore-wasm32-bare compiled with panic=abort by default
 //@ needs-unwind
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/wasm_exceptions.rs b/tests/codegen/wasm_exceptions.rs
index 66d2bbed709c6..a53722f834c5f 100644
--- a/tests/codegen/wasm_exceptions.rs
+++ b/tests/codegen/wasm_exceptions.rs
@@ -1,4 +1,4 @@
-//@ only-wasm32-bare
+//@ only-wasm32
 //@ compile-flags: -C panic=unwind
 
 #![crate_type = "lib"]
diff --git a/tests/incremental/change_crate_dep_kind.rs b/tests/incremental/change_crate_dep_kind.rs
index d3408f7ad2b34..abca8de47198c 100644
--- a/tests/incremental/change_crate_dep_kind.rs
+++ b/tests/incremental/change_crate_dep_kind.rs
@@ -1,7 +1,6 @@
 // Test that we detect changes to the `dep_kind` query. If the change is not
 // detected then -Zincremental-verify-ich will trigger an assertion.
 
-//@ ignore-wasm32-bare compiled with panic=abort by default
 //@ needs-unwind
 //@ revisions:cfail1 cfail2
 //@ compile-flags: -Z query-dep-graph -Cpanic=unwind
diff --git a/tests/incremental/issue-54059.rs b/tests/incremental/issue-54059.rs
index a5408c671b762..bfce4d487db12 100644
--- a/tests/incremental/issue-54059.rs
+++ b/tests/incremental/issue-54059.rs
@@ -1,5 +1,4 @@
 //@ aux-build:issue-54059.rs
-//@ ignore-wasm32-bare no libc for ffi testing
 //@ ignore-windows - dealing with weird symbols issues on dylibs isn't worth it
 //@ revisions: rpass1
 
diff --git a/tests/run-pass-valgrind/exit-flushes.rs b/tests/run-pass-valgrind/exit-flushes.rs
index c54f9243950e7..fa9196a3eecbe 100644
--- a/tests/run-pass-valgrind/exit-flushes.rs
+++ b/tests/run-pass-valgrind/exit-flushes.rs
@@ -1,4 +1,4 @@
-//@ ignore-emscripten
+//@ ignore-wasm32 no subprocess support
 //@ ignore-sgx no processes
 //@ ignore-macos this needs valgrind 3.11 or higher; see
 // https://github.com/rust-lang/rust/pull/30365#issuecomment-165763679
diff --git a/tests/ui/abi/anon-extern-mod.rs b/tests/ui/abi/anon-extern-mod.rs
index 692cb0850b92d..a424f93f637c9 100644
--- a/tests/ui/abi/anon-extern-mod.rs
+++ b/tests/ui/abi/anon-extern-mod.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 //@ pretty-expanded FIXME #23616
-//@ ignore-wasm32-bare no libc to test ffi with
 
 #![feature(rustc_private)]
 
diff --git a/tests/ui/abi/c-stack-as-value.rs b/tests/ui/abi/c-stack-as-value.rs
index 5b9b6e566f9ac..6ea2051b05b3e 100644
--- a/tests/ui/abi/c-stack-as-value.rs
+++ b/tests/ui/abi/c-stack-as-value.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 //@ pretty-expanded FIXME #23616
-//@ ignore-wasm32-bare no libc to test ffi with
 
 #![feature(rustc_private)]
 
diff --git a/tests/ui/abi/c-stack-returning-int64.rs b/tests/ui/abi/c-stack-returning-int64.rs
index 5caa395d7a5f9..1fd7fe417a5c4 100644
--- a/tests/ui/abi/c-stack-returning-int64.rs
+++ b/tests/ui/abi/c-stack-returning-int64.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc to test with
 //@ ignore-sgx no libc
 
 #![feature(rustc_private)]
diff --git a/tests/ui/abi/cabi-int-widening.rs b/tests/ui/abi/cabi-int-widening.rs
index 6129808244905..e211b98983731 100644
--- a/tests/ui/abi/cabi-int-widening.rs
+++ b/tests/ui/abi/cabi-int-widening.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc to test ffi with
 
 #[link(name = "rust_test_helpers", kind = "static")]
 extern "C" {
diff --git a/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs b/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs
index 47402acc93ae4..95bf4df68df26 100644
--- a/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs
+++ b/tests/ui/abi/cross-crate/anon-extern-mod-cross-crate-2.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:anon-extern-mod-cross-crate-1.rs
 //@ pretty-expanded FIXME #23616
-//@ ignore-wasm32-bare no libc to test ffi with
 
 extern crate anonexternmod;
 
diff --git a/tests/ui/abi/cross-crate/duplicated-external-mods.rs b/tests/ui/abi/cross-crate/duplicated-external-mods.rs
index d1fc3b7c910a3..2a3875d27734c 100644
--- a/tests/ui/abi/cross-crate/duplicated-external-mods.rs
+++ b/tests/ui/abi/cross-crate/duplicated-external-mods.rs
@@ -2,7 +2,6 @@
 //@ aux-build:anon-extern-mod-cross-crate-1.rs
 //@ aux-build:anon-extern-mod-cross-crate-1.rs
 //@ pretty-expanded FIXME #23616
-//@ ignore-wasm32-bare no libc to test ffi with
 
 extern crate anonexternmod;
 
diff --git a/tests/ui/abi/extern/extern-call-deep.rs b/tests/ui/abi/extern/extern-call-deep.rs
index 0c549e6222b90..062e70b1b6ee5 100644
--- a/tests/ui/abi/extern/extern-call-deep.rs
+++ b/tests/ui/abi/extern/extern-call-deep.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc to test ffi with
 //@ ignore-emscripten blows the JS stack
 
 #![feature(rustc_private)]
diff --git a/tests/ui/abi/extern/extern-call-indirect.rs b/tests/ui/abi/extern/extern-call-indirect.rs
index 3e874e2654258..18fb07d8c8bbd 100644
--- a/tests/ui/abi/extern/extern-call-indirect.rs
+++ b/tests/ui/abi/extern/extern-call-indirect.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc to test ffi with
 
 #![feature(rustc_private)]
 
diff --git a/tests/ui/abi/extern/extern-crosscrate.rs b/tests/ui/abi/extern/extern-crosscrate.rs
index 5a4a339882d51..c283cbe321637 100644
--- a/tests/ui/abi/extern/extern-crosscrate.rs
+++ b/tests/ui/abi/extern/extern-crosscrate.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 //@ aux-build:extern-crosscrate-source.rs
-//@ ignore-wasm32-bare no libc to test ffi with
 
 #![feature(rustc_private)]
 
diff --git a/tests/ui/abi/extern/extern-pass-TwoU16s.rs b/tests/ui/abi/extern/extern-pass-TwoU16s.rs
index 69afe7b25321d..8bde553050a40 100644
--- a/tests/ui/abi/extern/extern-pass-TwoU16s.rs
+++ b/tests/ui/abi/extern/extern-pass-TwoU16s.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 #![allow(improper_ctypes)]
 
-//@ ignore-wasm32-bare no libc for ffi testing
-
 // Test a foreign function that accepts and returns a struct
 // by value.
 
diff --git a/tests/ui/abi/extern/extern-pass-TwoU32s.rs b/tests/ui/abi/extern/extern-pass-TwoU32s.rs
index ca7630fe42156..fc90eb6945c7e 100644
--- a/tests/ui/abi/extern/extern-pass-TwoU32s.rs
+++ b/tests/ui/abi/extern/extern-pass-TwoU32s.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 #![allow(improper_ctypes)]
 
-//@ ignore-wasm32-bare no libc for ffi testing
-
 // Test a foreign function that accepts and returns a struct
 // by value.
 
diff --git a/tests/ui/abi/extern/extern-pass-TwoU64s.rs b/tests/ui/abi/extern/extern-pass-TwoU64s.rs
index a8f629f0906d5..603de2e49ab2d 100644
--- a/tests/ui/abi/extern/extern-pass-TwoU64s.rs
+++ b/tests/ui/abi/extern/extern-pass-TwoU64s.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 #![allow(improper_ctypes)]
 
-//@ ignore-wasm32-bare no libc for ffi testing
-
 // Test a foreign function that accepts and returns a struct
 // by value.
 
diff --git a/tests/ui/abi/extern/extern-pass-TwoU8s.rs b/tests/ui/abi/extern/extern-pass-TwoU8s.rs
index 2bf913e4e4f60..a712d79a98dd2 100644
--- a/tests/ui/abi/extern/extern-pass-TwoU8s.rs
+++ b/tests/ui/abi/extern/extern-pass-TwoU8s.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 #![allow(improper_ctypes)]
 
-//@ ignore-wasm32-bare no libc for ffi testing
-
 // Test a foreign function that accepts and returns a struct
 // by value.
 
diff --git a/tests/ui/abi/extern/extern-pass-char.rs b/tests/ui/abi/extern/extern-pass-char.rs
index a0ebd43e07677..24196c54b50d8 100644
--- a/tests/ui/abi/extern/extern-pass-char.rs
+++ b/tests/ui/abi/extern/extern-pass-char.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc for ffi testing
 
 // Test a function that takes/returns a u8.
 
diff --git a/tests/ui/abi/extern/extern-pass-double.rs b/tests/ui/abi/extern/extern-pass-double.rs
index 11e23abb78262..e883ebe9815ee 100644
--- a/tests/ui/abi/extern/extern-pass-double.rs
+++ b/tests/ui/abi/extern/extern-pass-double.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc for ffi testing
 
 #[link(name = "rust_test_helpers", kind = "static")]
 extern "C" {
diff --git a/tests/ui/abi/extern/extern-pass-u32.rs b/tests/ui/abi/extern/extern-pass-u32.rs
index 69570fc935813..0daff4e9f42c4 100644
--- a/tests/ui/abi/extern/extern-pass-u32.rs
+++ b/tests/ui/abi/extern/extern-pass-u32.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc for ffi testing
 
 // Test a function that takes/returns a u32.
 
diff --git a/tests/ui/abi/extern/extern-pass-u64.rs b/tests/ui/abi/extern/extern-pass-u64.rs
index 43880b96c2d67..f1cd6bf59c2ec 100644
--- a/tests/ui/abi/extern/extern-pass-u64.rs
+++ b/tests/ui/abi/extern/extern-pass-u64.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc for ffi testing
 
 // Test a call to a function that takes/returns a u64.
 
diff --git a/tests/ui/abi/extern/extern-return-TwoU16s.rs b/tests/ui/abi/extern/extern-return-TwoU16s.rs
index 723933cd7e737..bf909a8db24c7 100644
--- a/tests/ui/abi/extern/extern-return-TwoU16s.rs
+++ b/tests/ui/abi/extern/extern-return-TwoU16s.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 #![allow(improper_ctypes)]
 
-//@ ignore-wasm32-bare no libc to test ffi with
-
 pub struct TwoU16s {
     one: u16,
     two: u16,
diff --git a/tests/ui/abi/extern/extern-return-TwoU32s.rs b/tests/ui/abi/extern/extern-return-TwoU32s.rs
index 7795e4f040101..c528da8cfc464 100644
--- a/tests/ui/abi/extern/extern-return-TwoU32s.rs
+++ b/tests/ui/abi/extern/extern-return-TwoU32s.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 #![allow(improper_ctypes)]
 
-//@ ignore-wasm32-bare no libc to test ffi with
-
 pub struct TwoU32s {
     one: u32,
     two: u32,
diff --git a/tests/ui/abi/extern/extern-return-TwoU64s.rs b/tests/ui/abi/extern/extern-return-TwoU64s.rs
index a980b7f1cdeae..d4f9540ec7b35 100644
--- a/tests/ui/abi/extern/extern-return-TwoU64s.rs
+++ b/tests/ui/abi/extern/extern-return-TwoU64s.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 #![allow(improper_ctypes)]
 
-//@ ignore-wasm32-bare no libc to test ffi with
-
 pub struct TwoU64s {
     one: u64,
     two: u64,
diff --git a/tests/ui/abi/extern/extern-return-TwoU8s.rs b/tests/ui/abi/extern/extern-return-TwoU8s.rs
index 73263a9da0488..228b27396249b 100644
--- a/tests/ui/abi/extern/extern-return-TwoU8s.rs
+++ b/tests/ui/abi/extern/extern-return-TwoU8s.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 #![allow(improper_ctypes)]
 
-//@ ignore-wasm32-bare no libc to test ffi with
-
 pub struct TwoU8s {
     one: u8,
     two: u8,
diff --git a/tests/ui/abi/foreign/foreign-dupe.rs b/tests/ui/abi/foreign/foreign-dupe.rs
index 6469f5d2ce72b..1b6df0892c70f 100644
--- a/tests/ui/abi/foreign/foreign-dupe.rs
+++ b/tests/ui/abi/foreign/foreign-dupe.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 //@ aux-build:foreign_lib.rs
-//@ ignore-wasm32-bare no libc to test ffi with
 
 // Check that we can still call duplicated extern (imported) functions
 // which were declared in another crate. See issues #32740 and #32783.
diff --git a/tests/ui/abi/foreign/foreign-fn-with-byval.rs b/tests/ui/abi/foreign/foreign-fn-with-byval.rs
index 89bbf40669363..9908ec2d2c01a 100644
--- a/tests/ui/abi/foreign/foreign-fn-with-byval.rs
+++ b/tests/ui/abi/foreign/foreign-fn-with-byval.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 #![allow(improper_ctypes, improper_ctypes_definitions)]
 
-//@ ignore-wasm32-bare no libc to test ffi with
-
 #[derive(Copy, Clone)]
 pub struct S {
     x: u64,
diff --git a/tests/ui/abi/foreign/foreign-no-abi.rs b/tests/ui/abi/foreign/foreign-no-abi.rs
index 84e21660f1c7e..4ac47df29a710 100644
--- a/tests/ui/abi/foreign/foreign-no-abi.rs
+++ b/tests/ui/abi/foreign/foreign-no-abi.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 // ABI is cdecl by default
 
-//@ ignore-wasm32-bare no libc to test ffi with
 //@ pretty-expanded FIXME #23616
 
 #![feature(rustc_private)]
diff --git a/tests/ui/abi/foreign/invoke-external-foreign.rs b/tests/ui/abi/foreign/invoke-external-foreign.rs
index 5eccfaf204bfc..78cc84804bfd0 100644
--- a/tests/ui/abi/foreign/invoke-external-foreign.rs
+++ b/tests/ui/abi/foreign/invoke-external-foreign.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 //@ aux-build:foreign_lib.rs
-//@ ignore-wasm32-bare no libc to test ffi with
 
 // The purpose of this test is to check that we can
 // successfully (and safely) invoke external, cdecl
diff --git a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs
index 34d3b91d404f5..3a8540a825ca2 100644
--- a/tests/ui/abi/homogenous-floats-target-feature-mixup.rs
+++ b/tests/ui/abi/homogenous-floats-target-feature-mixup.rs
@@ -5,7 +5,7 @@
 // without #[repr(simd)]
 
 //@ run-pass
-//@ ignore-emscripten
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 #![feature(avx512_target_feature)]
diff --git a/tests/ui/abi/issue-28676.rs b/tests/ui/abi/issue-28676.rs
index 2457d1d79579e..8640f5aad21c9 100644
--- a/tests/ui/abi/issue-28676.rs
+++ b/tests/ui/abi/issue-28676.rs
@@ -2,8 +2,6 @@
 #![allow(dead_code)]
 #![allow(improper_ctypes)]
 
-//@ ignore-wasm32-bare no libc to test ffi with
-
 #[derive(Copy, Clone)]
 pub struct Quad {
     a: u64,
diff --git a/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs b/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs
index 21720db5143ba..314db42280d99 100644
--- a/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs
+++ b/tests/ui/abi/issues/issue-62350-sysv-neg-reg-counts.rs
@@ -2,8 +2,6 @@
 #![allow(dead_code)]
 #![allow(improper_ctypes)]
 
-//@ ignore-wasm32-bare no libc to test ffi with
-
 #[derive(Copy, Clone)]
 pub struct QuadFloats {
     a: f32,
diff --git a/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs b/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs
index 316ac7a4880ee..f694205174889 100644
--- a/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs
+++ b/tests/ui/abi/issues/issue-97463-broken-abi-leaked-uninit-data.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm
 #![allow(dead_code)]
 #![allow(improper_ctypes)]
 
diff --git a/tests/ui/abi/lib-defaults.rs b/tests/ui/abi/lib-defaults.rs
index e3caccee62c16..2c2cad4f82dca 100644
--- a/tests/ui/abi/lib-defaults.rs
+++ b/tests/ui/abi/lib-defaults.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 //@ dont-check-compiler-stderr (rust-lang/rust#54222)
 
-//@ ignore-wasm32-bare no libc to test ffi with
-
 //@ compile-flags: -lrust_test_helpers
 
 #[link(name = "rust_test_helpers", kind = "static")]
diff --git a/tests/ui/abi/mir/mir_codegen_calls_variadic.rs b/tests/ui/abi/mir/mir_codegen_calls_variadic.rs
index ff515b6626937..0c1a59b38d3eb 100644
--- a/tests/ui/abi/mir/mir_codegen_calls_variadic.rs
+++ b/tests/ui/abi/mir/mir_codegen_calls_variadic.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc to test ffi with
 
 #[link(name = "rust_test_helpers", kind = "static")]
 extern "C" {
diff --git a/tests/ui/abi/segfault-no-out-of-stack.rs b/tests/ui/abi/segfault-no-out-of-stack.rs
index d03cff8009877..fb1f8303f9ffd 100644
--- a/tests/ui/abi/segfault-no-out-of-stack.rs
+++ b/tests/ui/abi/segfault-no-out-of-stack.rs
@@ -1,7 +1,7 @@
 //@ run-pass
 
 #![allow(unused_imports)]
-//@ ignore-emscripten can't run commands
+//@ ignore-wasm32 can't run commands
 //@ ignore-sgx no processes
 //@ ignore-fuchsia must translate zircon signal to SIGSEGV/SIGBUS, FIXME (#58590)
 #![feature(rustc_private)]
diff --git a/tests/ui/abi/statics/static-mut-foreign.rs b/tests/ui/abi/statics/static-mut-foreign.rs
index f32ce8cf085a5..33a7194c102f7 100644
--- a/tests/ui/abi/statics/static-mut-foreign.rs
+++ b/tests/ui/abi/statics/static-mut-foreign.rs
@@ -3,8 +3,6 @@
 // statics cannot. This ensures that there's some form of error if this is
 // attempted.
 
-//@ ignore-wasm32-bare no libc to test ffi with
-
 #![feature(rustc_private)]
 
 extern crate libc;
diff --git a/tests/ui/abi/statics/static-mut-foreign.stderr b/tests/ui/abi/statics/static-mut-foreign.stderr
index f393088ff9f33..4d5f26ac08c64 100644
--- a/tests/ui/abi/statics/static-mut-foreign.stderr
+++ b/tests/ui/abi/statics/static-mut-foreign.stderr
@@ -1,5 +1,5 @@
 warning: creating a shared reference to mutable static is discouraged
-  --> $DIR/static-mut-foreign.rs:35:18
+  --> $DIR/static-mut-foreign.rs:33:18
    |
 LL |     static_bound(&rust_dbg_static_mut);
    |                  ^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static
@@ -14,7 +14,7 @@ LL |     static_bound(addr_of!(rust_dbg_static_mut));
    |                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 warning: creating a mutable reference to mutable static is discouraged
-  --> $DIR/static-mut-foreign.rs:37:22
+  --> $DIR/static-mut-foreign.rs:35:22
    |
 LL |     static_bound_set(&mut rust_dbg_static_mut);
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static
diff --git a/tests/ui/abi/struct-enums/struct-return.rs b/tests/ui/abi/struct-enums/struct-return.rs
index b00f8d8cc2e7b..5b39c0de45467 100644
--- a/tests/ui/abi/struct-enums/struct-return.rs
+++ b/tests/ui/abi/struct-enums/struct-return.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ ignore-wasm32-bare no libc to test ffi with
 
 #[repr(C)]
 #[derive(Copy, Clone)]
diff --git a/tests/ui/abi/union/union-c-interop.rs b/tests/ui/abi/union/union-c-interop.rs
index 508b07a98336f..05eac446a9182 100644
--- a/tests/ui/abi/union/union-c-interop.rs
+++ b/tests/ui/abi/union/union-c-interop.rs
@@ -1,8 +1,6 @@
 //@ run-pass
 #![allow(non_snake_case)]
 
-//@ ignore-wasm32-bare no libc to test ffi with
-
 #[derive(Clone, Copy)]
 #[repr(C)]
 struct LARGE_INTEGER_U {
diff --git a/tests/ui/abi/variadic-ffi.rs b/tests/ui/abi/variadic-ffi.rs
index 6b42f268bb9e4..de4844ac86057 100644
--- a/tests/ui/abi/variadic-ffi.rs
+++ b/tests/ui/abi/variadic-ffi.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc to test ffi with
 #![feature(c_variadic)]
 
 use std::ffi::VaList;
diff --git a/tests/ui/alloc-error/default-alloc-error-hook.rs b/tests/ui/alloc-error/default-alloc-error-hook.rs
index a8a2027cc4518..5f977460b8c6e 100644
--- a/tests/ui/alloc-error/default-alloc-error-hook.rs
+++ b/tests/ui/alloc-error/default-alloc-error-hook.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::alloc::{Layout, handle_alloc_error};
diff --git a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs
index f4825a910b0ca..6bbfb72510d0f 100644
--- a/tests/ui/allocator/no_std-alloc-error-handler-custom.rs
+++ b/tests/ui/allocator/no_std-alloc-error-handler-custom.rs
@@ -2,7 +2,6 @@
 //@ ignore-android no libc
 //@ ignore-emscripten no libc
 //@ ignore-sgx no libc
-//@ ignore-wasm32 no libc
 //@ only-linux
 //@ compile-flags:-C panic=abort
 //@ aux-build:helper.rs
diff --git a/tests/ui/allocator/no_std-alloc-error-handler-default.rs b/tests/ui/allocator/no_std-alloc-error-handler-default.rs
index 1fa1797bf9cb0..8bcf054ac85f5 100644
--- a/tests/ui/allocator/no_std-alloc-error-handler-default.rs
+++ b/tests/ui/allocator/no_std-alloc-error-handler-default.rs
@@ -2,7 +2,6 @@
 //@ ignore-android no libc
 //@ ignore-emscripten no libc
 //@ ignore-sgx no libc
-//@ ignore-wasm32 no libc
 //@ only-linux
 //@ compile-flags:-C panic=abort
 //@ aux-build:helper.rs
diff --git a/tests/ui/asm/issue-87802.rs b/tests/ui/asm/issue-87802.rs
index d93de9ee57fa3..569eb384e1567 100644
--- a/tests/ui/asm/issue-87802.rs
+++ b/tests/ui/asm/issue-87802.rs
@@ -1,7 +1,6 @@
 //@ needs-asm-support
 //@ ignore-nvptx64
 //@ ignore-spirv
-//@ ignore-wasm32
 // Make sure rustc doesn't ICE on asm! when output type is !.
 
 use std::arch::asm;
diff --git a/tests/ui/asm/issue-87802.stderr b/tests/ui/asm/issue-87802.stderr
index 762f3d02a41af..64e91662919b2 100644
--- a/tests/ui/asm/issue-87802.stderr
+++ b/tests/ui/asm/issue-87802.stderr
@@ -1,5 +1,5 @@
 error: cannot use value of type `!` for inline assembly
-  --> $DIR/issue-87802.rs:12:36
+  --> $DIR/issue-87802.rs:11:36
    |
 LL |         asm!("/* {0} */", out(reg) x);
    |                                    ^
diff --git a/tests/ui/asm/naked-functions.rs b/tests/ui/asm/naked-functions.rs
index 41d6393996d2c..1619ebfcf39f0 100644
--- a/tests/ui/asm/naked-functions.rs
+++ b/tests/ui/asm/naked-functions.rs
@@ -1,7 +1,6 @@
 //@ needs-asm-support
 //@ ignore-nvptx64
 //@ ignore-spirv
-//@ ignore-wasm32
 
 #![feature(naked_functions)]
 #![feature(asm_const, asm_unwind)]
diff --git a/tests/ui/asm/naked-functions.stderr b/tests/ui/asm/naked-functions.stderr
index 6613c3dfdbafb..77bc80a101f02 100644
--- a/tests/ui/asm/naked-functions.stderr
+++ b/tests/ui/asm/naked-functions.stderr
@@ -1,53 +1,53 @@
 error: asm with the `pure` option must have at least one output
-  --> $DIR/naked-functions.rs:113:14
+  --> $DIR/naked-functions.rs:112:14
    |
 LL |     asm!("", options(readonly, nostack), options(pure));
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^
 
 error: this is a user specified error
-  --> $DIR/naked-functions.rs:205:5
+  --> $DIR/naked-functions.rs:204:5
    |
 LL |     compile_error!("this is a user specified error")
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: this is a user specified error
-  --> $DIR/naked-functions.rs:211:5
+  --> $DIR/naked-functions.rs:210:5
    |
 LL |     compile_error!("this is a user specified error");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: asm template must be a string literal
-  --> $DIR/naked-functions.rs:218:10
+  --> $DIR/naked-functions.rs:217:10
    |
 LL |     asm!(invalid_syntax)
    |          ^^^^^^^^^^^^^^
 
 error: patterns not allowed in naked function parameters
-  --> $DIR/naked-functions.rs:20:5
+  --> $DIR/naked-functions.rs:19:5
    |
 LL |     mut a: u32,
    |     ^^^^^
 
 error: patterns not allowed in naked function parameters
-  --> $DIR/naked-functions.rs:22:5
+  --> $DIR/naked-functions.rs:21:5
    |
 LL |     &b: &i32,
    |     ^^
 
 error: patterns not allowed in naked function parameters
-  --> $DIR/naked-functions.rs:24:6
+  --> $DIR/naked-functions.rs:23:6
    |
 LL |     (None | Some(_)): Option<std::ptr::NonNull<u8>>,
    |      ^^^^^^^^^^^^^^
 
 error: patterns not allowed in naked function parameters
-  --> $DIR/naked-functions.rs:26:5
+  --> $DIR/naked-functions.rs:25:5
    |
 LL |     P { x, y }: P,
    |     ^^^^^^^^^^
 
 error: referencing function parameters is not allowed in naked functions
-  --> $DIR/naked-functions.rs:35:5
+  --> $DIR/naked-functions.rs:34:5
    |
 LL |     a + 1
    |     ^
@@ -55,7 +55,7 @@ LL |     a + 1
    = help: follow the calling convention in asm block to use parameters
 
 error[E0787]: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:33:1
+  --> $DIR/naked-functions.rs:32:1
    |
 LL | pub unsafe extern "C" fn inc(a: u32) -> u32 {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -64,7 +64,7 @@ LL |     a + 1
    |     ----- non-asm is unsupported in naked functions
 
 error: referencing function parameters is not allowed in naked functions
-  --> $DIR/naked-functions.rs:42:31
+  --> $DIR/naked-functions.rs:41:31
    |
 LL |     asm!("/* {0} */", in(reg) a, options(noreturn));
    |                               ^
@@ -72,13 +72,13 @@ LL |     asm!("/* {0} */", in(reg) a, options(noreturn));
    = help: follow the calling convention in asm block to use parameters
 
 error[E0787]: only `const` and `sym` operands are supported in naked functions
-  --> $DIR/naked-functions.rs:42:23
+  --> $DIR/naked-functions.rs:41:23
    |
 LL |     asm!("/* {0} */", in(reg) a, options(noreturn));
    |                       ^^^^^^^^^
 
 error[E0787]: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:48:1
+  --> $DIR/naked-functions.rs:47:1
    |
 LL | pub unsafe extern "C" fn inc_closure(a: u32) -> u32 {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -87,7 +87,7 @@ LL |     (|| a + 1)()
    |     ------------ non-asm is unsupported in naked functions
 
 error[E0787]: only `const` and `sym` operands are supported in naked functions
-  --> $DIR/naked-functions.rs:65:10
+  --> $DIR/naked-functions.rs:64:10
    |
 LL |          in(reg) a,
    |          ^^^^^^^^^
@@ -102,7 +102,7 @@ LL |          out(reg) e,
    |          ^^^^^^^^^^
 
 error[E0787]: asm in naked functions must use `noreturn` option
-  --> $DIR/naked-functions.rs:63:5
+  --> $DIR/naked-functions.rs:62:5
    |
 LL | /     asm!("/* {0} {1} {2} {3} {4} {5} {6} */",
 LL | |
@@ -119,7 +119,7 @@ LL |          sym G, options(noreturn),
    |               +++++++++++++++++++
 
 error[E0787]: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:54:1
+  --> $DIR/naked-functions.rs:53:1
    |
 LL | pub unsafe extern "C" fn unsupported_operands() {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -136,13 +136,13 @@ LL |     let mut e = 0usize;
    |     ------------------- non-asm is unsupported in naked functions
 
 error[E0787]: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:77:1
+  --> $DIR/naked-functions.rs:76:1
    |
 LL | pub extern "C" fn missing_assembly() {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0787]: asm in naked functions must use `noreturn` option
-  --> $DIR/naked-functions.rs:85:9
+  --> $DIR/naked-functions.rs:84:9
    |
 LL |         asm!("");
    |         ^^^^^^^^
@@ -153,7 +153,7 @@ LL |         asm!("", options(noreturn));
    |                +++++++++++++++++++
 
 error[E0787]: asm in naked functions must use `noreturn` option
-  --> $DIR/naked-functions.rs:87:9
+  --> $DIR/naked-functions.rs:86:9
    |
 LL |         asm!("");
    |         ^^^^^^^^
@@ -164,7 +164,7 @@ LL |         asm!("", options(noreturn));
    |                +++++++++++++++++++
 
 error[E0787]: asm in naked functions must use `noreturn` option
-  --> $DIR/naked-functions.rs:89:9
+  --> $DIR/naked-functions.rs:88:9
    |
 LL |         asm!("");
    |         ^^^^^^^^
@@ -175,7 +175,7 @@ LL |         asm!("", options(noreturn));
    |                +++++++++++++++++++
 
 error[E0787]: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:82:1
+  --> $DIR/naked-functions.rs:81:1
    |
 LL | pub extern "C" fn too_many_asm_blocks() {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -190,7 +190,7 @@ LL |         asm!("", options(noreturn));
    |         --------------------------- multiple asm blocks are unsupported in naked functions
 
 error: referencing function parameters is not allowed in naked functions
-  --> $DIR/naked-functions.rs:99:11
+  --> $DIR/naked-functions.rs:98:11
    |
 LL |         *&y
    |           ^
@@ -198,7 +198,7 @@ LL |         *&y
    = help: follow the calling convention in asm block to use parameters
 
 error[E0787]: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:97:5
+  --> $DIR/naked-functions.rs:96:5
    |
 LL |     pub extern "C" fn inner(y: usize) -> usize {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -207,19 +207,19 @@ LL |         *&y
    |         --- non-asm is unsupported in naked functions
 
 error[E0787]: asm options unsupported in naked functions: `nomem`, `preserves_flags`
-  --> $DIR/naked-functions.rs:107:5
+  --> $DIR/naked-functions.rs:106:5
    |
 LL |     asm!("", options(nomem, preserves_flags, noreturn));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0787]: asm options unsupported in naked functions: `nostack`, `pure`, `readonly`
-  --> $DIR/naked-functions.rs:113:5
+  --> $DIR/naked-functions.rs:112:5
    |
 LL |     asm!("", options(readonly, nostack), options(pure));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0787]: asm in naked functions must use `noreturn` option
-  --> $DIR/naked-functions.rs:113:5
+  --> $DIR/naked-functions.rs:112:5
    |
 LL |     asm!("", options(readonly, nostack), options(pure));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -230,13 +230,13 @@ LL |     asm!("", options(noreturn), options(readonly, nostack), options(pure));
    |            +++++++++++++++++++
 
 error[E0787]: asm options unsupported in naked functions: `may_unwind`
-  --> $DIR/naked-functions.rs:121:5
+  --> $DIR/naked-functions.rs:120:5
    |
 LL |     asm!("", options(noreturn, may_unwind));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: Rust ABI is unsupported in naked functions
-  --> $DIR/naked-functions.rs:126:1
+  --> $DIR/naked-functions.rs:125:1
    |
 LL | pub unsafe fn default_abi() {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -244,43 +244,43 @@ LL | pub unsafe fn default_abi() {
    = note: `#[warn(undefined_naked_function_abi)]` on by default
 
 warning: Rust ABI is unsupported in naked functions
-  --> $DIR/naked-functions.rs:132:1
+  --> $DIR/naked-functions.rs:131:1
    |
 LL | pub unsafe fn rust_abi() {
    | ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:172:1
+  --> $DIR/naked-functions.rs:171:1
    |
 LL | #[inline]
    | ^^^^^^^^^
 
 error: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:179:1
+  --> $DIR/naked-functions.rs:178:1
    |
 LL | #[inline(always)]
    | ^^^^^^^^^^^^^^^^^
 
 error: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:186:1
+  --> $DIR/naked-functions.rs:185:1
    |
 LL | #[inline(never)]
    | ^^^^^^^^^^^^^^^^
 
 error: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:193:1
+  --> $DIR/naked-functions.rs:192:1
    |
 LL | #[inline]
    | ^^^^^^^^^
 
 error: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:195:1
+  --> $DIR/naked-functions.rs:194:1
    |
 LL | #[inline(always)]
    | ^^^^^^^^^^^^^^^^^
 
 error: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:197:1
+  --> $DIR/naked-functions.rs:196:1
    |
 LL | #[inline(never)]
    | ^^^^^^^^^^^^^^^^
diff --git a/tests/ui/asm/named-asm-labels.rs b/tests/ui/asm/named-asm-labels.rs
index 2e21d56e32311..96ccdef75b0ce 100644
--- a/tests/ui/asm/named-asm-labels.rs
+++ b/tests/ui/asm/named-asm-labels.rs
@@ -1,7 +1,6 @@
 //@ needs-asm-support
 //@ ignore-nvptx64
 //@ ignore-spirv
-//@ ignore-wasm32
 
 // Tests that the use of named labels in the `asm!` macro are linted against
 // except for in `#[naked]` fns.
diff --git a/tests/ui/asm/named-asm-labels.stderr b/tests/ui/asm/named-asm-labels.stderr
index 89c058499675c..36fd69839518f 100644
--- a/tests/ui/asm/named-asm-labels.stderr
+++ b/tests/ui/asm/named-asm-labels.stderr
@@ -1,5 +1,5 @@
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:24:15
+  --> $DIR/named-asm-labels.rs:23:15
    |
 LL |         asm!("bar: nop");
    |               ^^^
@@ -9,7 +9,7 @@ LL |         asm!("bar: nop");
    = note: `#[deny(named_asm_labels)]` on by default
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:27:15
+  --> $DIR/named-asm-labels.rs:26:15
    |
 LL |         asm!("abcd:");
    |               ^^^^
@@ -18,7 +18,7 @@ LL |         asm!("abcd:");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:30:15
+  --> $DIR/named-asm-labels.rs:29:15
    |
 LL |         asm!("foo: bar1: nop");
    |               ^^^  ^^^^
@@ -27,7 +27,7 @@ LL |         asm!("foo: bar1: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:34:15
+  --> $DIR/named-asm-labels.rs:33:15
    |
 LL |         asm!("foo1: nop", "nop");
    |               ^^^^
@@ -36,7 +36,7 @@ LL |         asm!("foo1: nop", "nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:35:15
+  --> $DIR/named-asm-labels.rs:34:15
    |
 LL |         asm!("foo2: foo3: nop", "nop");
    |               ^^^^  ^^^^
@@ -45,7 +45,7 @@ LL |         asm!("foo2: foo3: nop", "nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:37:22
+  --> $DIR/named-asm-labels.rs:36:22
    |
 LL |         asm!("nop", "foo4: nop");
    |                      ^^^^
@@ -54,7 +54,7 @@ LL |         asm!("nop", "foo4: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:38:15
+  --> $DIR/named-asm-labels.rs:37:15
    |
 LL |         asm!("foo5: nop", "foo6: nop");
    |               ^^^^
@@ -63,7 +63,7 @@ LL |         asm!("foo5: nop", "foo6: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:38:28
+  --> $DIR/named-asm-labels.rs:37:28
    |
 LL |         asm!("foo5: nop", "foo6: nop");
    |                            ^^^^
@@ -72,7 +72,7 @@ LL |         asm!("foo5: nop", "foo6: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:43:15
+  --> $DIR/named-asm-labels.rs:42:15
    |
 LL |         asm!("foo7: nop; foo8: nop");
    |               ^^^^       ^^^^
@@ -81,7 +81,7 @@ LL |         asm!("foo7: nop; foo8: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:45:15
+  --> $DIR/named-asm-labels.rs:44:15
    |
 LL |         asm!("foo9: nop; nop");
    |               ^^^^
@@ -90,7 +90,7 @@ LL |         asm!("foo9: nop; nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:46:20
+  --> $DIR/named-asm-labels.rs:45:20
    |
 LL |         asm!("nop; foo10: nop");
    |                    ^^^^^
@@ -99,7 +99,7 @@ LL |         asm!("nop; foo10: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:49:15
+  --> $DIR/named-asm-labels.rs:48:15
    |
 LL |         asm!("bar2: nop\n bar3: nop");
    |               ^^^^        ^^^^
@@ -108,7 +108,7 @@ LL |         asm!("bar2: nop\n bar3: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:51:15
+  --> $DIR/named-asm-labels.rs:50:15
    |
 LL |         asm!("bar4: nop\n nop");
    |               ^^^^
@@ -117,7 +117,7 @@ LL |         asm!("bar4: nop\n nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:52:21
+  --> $DIR/named-asm-labels.rs:51:21
    |
 LL |         asm!("nop\n bar5: nop");
    |                     ^^^^
@@ -126,7 +126,7 @@ LL |         asm!("nop\n bar5: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:53:21
+  --> $DIR/named-asm-labels.rs:52:21
    |
 LL |         asm!("nop\n bar6: bar7: nop");
    |                     ^^^^  ^^^^
@@ -135,7 +135,7 @@ LL |         asm!("nop\n bar6: bar7: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:59:13
+  --> $DIR/named-asm-labels.rs:58:13
    |
 LL |             blah2: nop
    |             ^^^^^
@@ -146,7 +146,7 @@ LL |             blah3: nop
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:68:19
+  --> $DIR/named-asm-labels.rs:67:19
    |
 LL |             nop ; blah4: nop
    |                   ^^^^^
@@ -155,7 +155,7 @@ LL |             nop ; blah4: nop
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:82:15
+  --> $DIR/named-asm-labels.rs:81:15
    |
 LL |         asm!("blah1: 2bar: nop");
    |               ^^^^^
@@ -164,7 +164,7 @@ LL |         asm!("blah1: 2bar: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:85:15
+  --> $DIR/named-asm-labels.rs:84:15
    |
 LL |         asm!("def: def: nop");
    |               ^^^
@@ -173,7 +173,7 @@ LL |         asm!("def: def: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:86:15
+  --> $DIR/named-asm-labels.rs:85:15
    |
 LL |         asm!("def: nop\ndef: nop");
    |               ^^^
@@ -182,7 +182,7 @@ LL |         asm!("def: nop\ndef: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:87:15
+  --> $DIR/named-asm-labels.rs:86:15
    |
 LL |         asm!("def: nop; def: nop");
    |               ^^^
@@ -191,7 +191,7 @@ LL |         asm!("def: nop; def: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:95:15
+  --> $DIR/named-asm-labels.rs:94:15
    |
 LL |         asm!("fooo\u{003A} nop");
    |               ^^^^^^^^^^^^^^^^
@@ -200,7 +200,7 @@ LL |         asm!("fooo\u{003A} nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:96:15
+  --> $DIR/named-asm-labels.rs:95:15
    |
 LL |         asm!("foooo\x3A nop");
    |               ^^^^^^^^^^^^^
@@ -209,7 +209,7 @@ LL |         asm!("foooo\x3A nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:99:15
+  --> $DIR/named-asm-labels.rs:98:15
    |
 LL |         asm!("fooooo:\u{000A} nop");
    |               ^^^^^^
@@ -218,7 +218,7 @@ LL |         asm!("fooooo:\u{000A} nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:100:15
+  --> $DIR/named-asm-labels.rs:99:15
    |
 LL |         asm!("foooooo:\x0A nop");
    |               ^^^^^^^
@@ -227,7 +227,7 @@ LL |         asm!("foooooo:\x0A nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:104:14
+  --> $DIR/named-asm-labels.rs:103:14
    |
 LL |         asm!("\x41\x42\x43\x3A\x20\x6E\x6F\x70");
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -236,7 +236,7 @@ LL |         asm!("\x41\x42\x43\x3A\x20\x6E\x6F\x70");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:112:13
+  --> $DIR/named-asm-labels.rs:111:13
    |
 LL |             ab: nop // ab: does foo
    |             ^^
@@ -245,7 +245,7 @@ LL |             ab: nop // ab: does foo
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:132:19
+  --> $DIR/named-asm-labels.rs:131:19
    |
 LL |             asm!("test_{}: nop", in(reg) 10);
    |                   ^^^^^^^
@@ -254,7 +254,7 @@ LL |             asm!("test_{}: nop", in(reg) 10);
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:134:15
+  --> $DIR/named-asm-labels.rs:133:15
    |
 LL |         asm!("test_{}: nop", const 10);
    |               ^^^^^^^
@@ -263,7 +263,7 @@ LL |         asm!("test_{}: nop", const 10);
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:135:15
+  --> $DIR/named-asm-labels.rs:134:15
    |
 LL |         asm!("test_{}: nop", sym main);
    |               ^^^^^^^
@@ -272,7 +272,7 @@ LL |         asm!("test_{}: nop", sym main);
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:136:15
+  --> $DIR/named-asm-labels.rs:135:15
    |
 LL |         asm!("{}_test: nop", const 10);
    |               ^^^^^^^
@@ -281,7 +281,7 @@ LL |         asm!("{}_test: nop", const 10);
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:137:15
+  --> $DIR/named-asm-labels.rs:136:15
    |
 LL |         asm!("test_{}_test: nop", const 10);
    |               ^^^^^^^^^^^^
@@ -290,7 +290,7 @@ LL |         asm!("test_{}_test: nop", const 10);
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:138:15
+  --> $DIR/named-asm-labels.rs:137:15
    |
 LL |         asm!("{}: nop", const 10);
    |               ^^
@@ -299,7 +299,7 @@ LL |         asm!("{}: nop", const 10);
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:140:15
+  --> $DIR/named-asm-labels.rs:139:15
    |
 LL |         asm!("{uwu}: nop", uwu = const 10);
    |               ^^^^^
@@ -308,7 +308,7 @@ LL |         asm!("{uwu}: nop", uwu = const 10);
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:141:15
+  --> $DIR/named-asm-labels.rs:140:15
    |
 LL |         asm!("{0}: nop", const 10);
    |               ^^^
@@ -317,7 +317,7 @@ LL |         asm!("{0}: nop", const 10);
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:142:15
+  --> $DIR/named-asm-labels.rs:141:15
    |
 LL |         asm!("{1}: nop", "/* {0} */", const 10, const 20);
    |               ^^^
@@ -326,7 +326,7 @@ LL |         asm!("{1}: nop", "/* {0} */", const 10, const 20);
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:145:14
+  --> $DIR/named-asm-labels.rs:144:14
    |
 LL |         asm!(include_str!("named-asm-labels.s"));
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -335,7 +335,7 @@ LL |         asm!(include_str!("named-asm-labels.s"));
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 warning: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:155:19
+  --> $DIR/named-asm-labels.rs:154:19
    |
 LL |             asm!("warned: nop");
    |                   ^^^^^^
@@ -343,13 +343,13 @@ LL |             asm!("warned: nop");
    = help: only local labels of the form `<number>:` should be used in inline asm
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 note: the lint level is defined here
-  --> $DIR/named-asm-labels.rs:153:16
+  --> $DIR/named-asm-labels.rs:152:16
    |
 LL |         #[warn(named_asm_labels)]
    |                ^^^^^^^^^^^^^^^^
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:164:20
+  --> $DIR/named-asm-labels.rs:163:20
    |
 LL |     unsafe { asm!(".Lfoo: mov rax, {}; ret;", "nop", const 1, options(noreturn)) }
    |                    ^^^^^
@@ -358,7 +358,7 @@ LL |     unsafe { asm!(".Lfoo: mov rax, {}; ret;", "nop", const 1, options(noret
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:170:20
+  --> $DIR/named-asm-labels.rs:169:20
    |
 LL |     unsafe { asm!(".Lbar: mov rax, {}; ret;", "nop", const 1, options(noreturn)) }
    |                    ^^^^^
@@ -367,7 +367,7 @@ LL |     unsafe { asm!(".Lbar: mov rax, {}; ret;", "nop", const 1, options(noret
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:178:20
+  --> $DIR/named-asm-labels.rs:177:20
    |
 LL |     unsafe { asm!(".Laaa: nop; ret;", options(noreturn)) }
    |                    ^^^^^
@@ -376,7 +376,7 @@ LL |     unsafe { asm!(".Laaa: nop; ret;", options(noreturn)) }
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:188:24
+  --> $DIR/named-asm-labels.rs:187:24
    |
 LL |         unsafe { asm!(".Lbbb: nop; ret;", options(noreturn)) }
    |                        ^^^^^
@@ -385,7 +385,7 @@ LL |         unsafe { asm!(".Lbbb: nop; ret;", options(noreturn)) }
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:197:15
+  --> $DIR/named-asm-labels.rs:196:15
    |
 LL |         asm!("closure1: nop");
    |               ^^^^^^^^
@@ -394,7 +394,7 @@ LL |         asm!("closure1: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:201:15
+  --> $DIR/named-asm-labels.rs:200:15
    |
 LL |         asm!("closure2: nop");
    |               ^^^^^^^^
@@ -403,7 +403,7 @@ LL |         asm!("closure2: nop");
    = note: see the asm section of Rust By Example <https://doc.rust-lang.org/nightly/rust-by-example/unsafe/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:211:19
+  --> $DIR/named-asm-labels.rs:210:19
    |
 LL |             asm!("closure3: nop");
    |                   ^^^^^^^^
diff --git a/tests/ui/asm/type-check-1.rs b/tests/ui/asm/type-check-1.rs
index b18c487fc4b4d..b0f1362f54334 100644
--- a/tests/ui/asm/type-check-1.rs
+++ b/tests/ui/asm/type-check-1.rs
@@ -1,7 +1,6 @@
 //@ needs-asm-support
 //@ ignore-nvptx64
 //@ ignore-spirv
-//@ ignore-wasm32
 
 #![feature(asm_const)]
 
diff --git a/tests/ui/asm/type-check-1.stderr b/tests/ui/asm/type-check-1.stderr
index 1845139659db5..07a609c52139e 100644
--- a/tests/ui/asm/type-check-1.stderr
+++ b/tests/ui/asm/type-check-1.stderr
@@ -1,5 +1,5 @@
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/type-check-1.rs:42:26
+  --> $DIR/type-check-1.rs:41:26
    |
 LL |         let x = 0;
    |         ----- help: consider using `const` instead of `let`: `const x`
@@ -8,7 +8,7 @@ LL |         asm!("{}", const x);
    |                          ^ non-constant value
 
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/type-check-1.rs:45:36
+  --> $DIR/type-check-1.rs:44:36
    |
 LL |         let x = 0;
    |         ----- help: consider using `const` instead of `let`: `const x`
@@ -17,7 +17,7 @@ LL |         asm!("{}", const const_foo(x));
    |                                    ^ non-constant value
 
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/type-check-1.rs:48:36
+  --> $DIR/type-check-1.rs:47:36
    |
 LL |         let x = 0;
    |         ----- help: consider using `const` instead of `let`: `const x`
@@ -26,7 +26,7 @@ LL |         asm!("{}", const const_bar(x));
    |                                    ^ non-constant value
 
 error: invalid `sym` operand
-  --> $DIR/type-check-1.rs:50:24
+  --> $DIR/type-check-1.rs:49:24
    |
 LL |         asm!("{}", sym x);
    |                        ^ is a local variable
@@ -34,19 +34,19 @@ LL |         asm!("{}", sym x);
    = help: `sym` operands must refer to either a function or a static
 
 error: invalid asm output
-  --> $DIR/type-check-1.rs:15:29
+  --> $DIR/type-check-1.rs:14:29
    |
 LL |         asm!("{}", out(reg) 1 + 2);
    |                             ^^^^^ cannot assign to this expression
 
 error: invalid asm output
-  --> $DIR/type-check-1.rs:17:31
+  --> $DIR/type-check-1.rs:16:31
    |
 LL |         asm!("{}", inout(reg) 1 + 2);
    |                               ^^^^^ cannot assign to this expression
 
 error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
-  --> $DIR/type-check-1.rs:23:28
+  --> $DIR/type-check-1.rs:22:28
    |
 LL |         asm!("{}", in(reg) v[..]);
    |                            ^^^^^ doesn't have a size known at compile-time
@@ -55,7 +55,7 @@ LL |         asm!("{}", in(reg) v[..]);
    = note: all inline asm arguments must have a statically known size
 
 error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
-  --> $DIR/type-check-1.rs:26:29
+  --> $DIR/type-check-1.rs:25:29
    |
 LL |         asm!("{}", out(reg) v[..]);
    |                             ^^^^^ doesn't have a size known at compile-time
@@ -64,7 +64,7 @@ LL |         asm!("{}", out(reg) v[..]);
    = note: all inline asm arguments must have a statically known size
 
 error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
-  --> $DIR/type-check-1.rs:29:31
+  --> $DIR/type-check-1.rs:28:31
    |
 LL |         asm!("{}", inout(reg) v[..]);
    |                               ^^^^^ doesn't have a size known at compile-time
@@ -73,7 +73,7 @@ LL |         asm!("{}", inout(reg) v[..]);
    = note: all inline asm arguments must have a statically known size
 
 error: cannot use value of type `[u64]` for inline assembly
-  --> $DIR/type-check-1.rs:23:28
+  --> $DIR/type-check-1.rs:22:28
    |
 LL |         asm!("{}", in(reg) v[..]);
    |                            ^^^^^
@@ -81,7 +81,7 @@ LL |         asm!("{}", in(reg) v[..]);
    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
 
 error: cannot use value of type `[u64]` for inline assembly
-  --> $DIR/type-check-1.rs:26:29
+  --> $DIR/type-check-1.rs:25:29
    |
 LL |         asm!("{}", out(reg) v[..]);
    |                             ^^^^^
@@ -89,7 +89,7 @@ LL |         asm!("{}", out(reg) v[..]);
    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
 
 error: cannot use value of type `[u64]` for inline assembly
-  --> $DIR/type-check-1.rs:29:31
+  --> $DIR/type-check-1.rs:28:31
    |
 LL |         asm!("{}", inout(reg) v[..]);
    |                               ^^^^^
@@ -97,13 +97,13 @@ LL |         asm!("{}", inout(reg) v[..]);
    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
 
 error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:58:26
+  --> $DIR/type-check-1.rs:57:26
    |
 LL |         asm!("{}", const 0f32);
    |                          ^^^^ expected integer, found `f32`
 
 error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:60:26
+  --> $DIR/type-check-1.rs:59:26
    |
 LL |         asm!("{}", const 0 as *mut u8);
    |                          ^^^^^^^^^^^^ expected integer, found `*mut u8`
@@ -112,7 +112,7 @@ LL |         asm!("{}", const 0 as *mut u8);
            found raw pointer `*mut u8`
 
 error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:62:26
+  --> $DIR/type-check-1.rs:61:26
    |
 LL |         asm!("{}", const &0);
    |                          ^^ expected integer, found `&{integer}`
@@ -124,13 +124,13 @@ LL +         asm!("{}", const 0);
    |
 
 error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:76:25
+  --> $DIR/type-check-1.rs:75:25
    |
 LL | global_asm!("{}", const 0f32);
    |                         ^^^^ expected integer, found `f32`
 
 error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:78:25
+  --> $DIR/type-check-1.rs:77:25
    |
 LL | global_asm!("{}", const 0 as *mut u8);
    |                         ^^^^^^^^^^^^ expected integer, found `*mut u8`
diff --git a/tests/ui/asm/type-check-4.rs b/tests/ui/asm/type-check-4.rs
index 0529811d3ba4b..a5b5e29294bb8 100644
--- a/tests/ui/asm/type-check-4.rs
+++ b/tests/ui/asm/type-check-4.rs
@@ -1,7 +1,6 @@
 //@ needs-asm-support
 //@ ignore-nvptx64
 //@ ignore-spirv
-//@ ignore-wasm32
 
 use std::arch::asm;
 
diff --git a/tests/ui/asm/type-check-4.stderr b/tests/ui/asm/type-check-4.stderr
index b5ecb3e1b56fb..5c328a184c896 100644
--- a/tests/ui/asm/type-check-4.stderr
+++ b/tests/ui/asm/type-check-4.stderr
@@ -1,5 +1,5 @@
 error[E0506]: cannot assign to `a` because it is borrowed
-  --> $DIR/type-check-4.rs:14:9
+  --> $DIR/type-check-4.rs:13:9
    |
 LL |         let p = &a;
    |                 -- `a` is borrowed here
@@ -10,7 +10,7 @@ LL |         println!("{}", p);
    |                        - borrow later used here
 
 error[E0503]: cannot use `a` because it was mutably borrowed
-  --> $DIR/type-check-4.rs:22:28
+  --> $DIR/type-check-4.rs:21:28
    |
 LL |         let p = &mut a;
    |                 ------ `a` is borrowed here
diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
index a6e53c06e3195..a8b05a4befa58 100644
--- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
+++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
@@ -5,8 +5,6 @@
 //@ error-pattern: thread 'main' panicked
 //@ error-pattern: `async fn` resumed after completion
 //@ edition:2018
-//@ ignore-wasm no panic or subprocess support
-//@ ignore-emscripten no panic or subprocess support
 
 #![feature(coroutines, coroutine_trait)]
 
diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
index d64184c101251..94366e662638b 100644
--- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
+++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
@@ -6,7 +6,6 @@
 //@ error-pattern: thread 'main' panicked
 //@ error-pattern: `async fn` resumed after panicking
 //@ edition:2018
-//@ ignore-wasm no panic or subprocess support
 
 #![feature(coroutines, coroutine_trait)]
 
diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs
index 7a23457e62af3..f937311a5a0f7 100644
--- a/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs
+++ b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs
@@ -5,8 +5,6 @@
 //@ run-fail
 //@ error-pattern:coroutine resumed after completion
 //@ edition:2018
-//@ ignore-wasm no panic or subprocess support
-//@ ignore-emscripten no panic or subprocess support
 
 #![feature(coroutines, coroutine_trait)]
 
diff --git a/tests/ui/backtrace.rs b/tests/ui/backtrace.rs
index 5c138b75de736..2579ff5203b4f 100644
--- a/tests/ui/backtrace.rs
+++ b/tests/ui/backtrace.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 //@ ignore-android FIXME #17520
-//@ ignore-emscripten spawning processes is not supported
+//@ ignore-wasm32 spawning processes is not supported
 //@ ignore-openbsd no support for libbacktrace without filename
 //@ ignore-sgx no processes
 //@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test
diff --git a/tests/ui/cfg/cfg-family.rs b/tests/ui/cfg/cfg-family.rs
index b90656a0b41f4..caf59327f108d 100644
--- a/tests/ui/cfg/cfg-family.rs
+++ b/tests/ui/cfg/cfg-family.rs
@@ -1,6 +1,6 @@
 //@ build-pass
 //@ pretty-expanded FIXME #23616
-//@ ignore-wasm32-bare no bare family
+//@ ignore-wasm32 no bare family
 //@ ignore-sgx
 
 #[cfg(windows)]
diff --git a/tests/ui/check-static-recursion-foreign.rs b/tests/ui/check-static-recursion-foreign.rs
index 418c149dcc428..97db47d0bd602 100644
--- a/tests/ui/check-static-recursion-foreign.rs
+++ b/tests/ui/check-static-recursion-foreign.rs
@@ -3,7 +3,6 @@
 // Static recursion check shouldn't fail when given a foreign item (#18279)
 
 //@ aux-build:check_static_recursion_foreign_helper.rs
-//@ ignore-wasm32-bare no libc to test ffi with
 
 //@ pretty-expanded FIXME #23616
 
diff --git a/tests/ui/codegen/issue-27859.rs b/tests/ui/codegen/issue-27859.rs
index 4b4d2d28575f0..6f5263b0ace8d 100644
--- a/tests/ui/codegen/issue-27859.rs
+++ b/tests/ui/codegen/issue-27859.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32 issue 42629
 
 #[inline(never)]
 fn foo(a: f32, b: f32) -> f32 {
diff --git a/tests/ui/command/command-argv0.rs b/tests/ui/command/command-argv0.rs
index 53649e35a89ca..35625c0b334cb 100644
--- a/tests/ui/command/command-argv0.rs
+++ b/tests/ui/command/command-argv0.rs
@@ -1,7 +1,7 @@
 //@ run-pass
 
 //@ ignore-windows - this is a unix-specific test
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 use std::env;
 use std::os::unix::process::CommandExt;
diff --git a/tests/ui/command/command-current-dir.rs b/tests/ui/command/command-current-dir.rs
index 7186a165a96f8..95c16bce6e8b8 100644
--- a/tests/ui/command/command-current-dir.rs
+++ b/tests/ui/command/command-current-dir.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-fuchsia Needs directory creation privilege
 
diff --git a/tests/ui/command/command-exec.rs b/tests/ui/command/command-exec.rs
index 3cc5d0bbd3e8d..c97b856141021 100644
--- a/tests/ui/command/command-exec.rs
+++ b/tests/ui/command/command-exec.rs
@@ -2,7 +2,7 @@
 
 #![allow(stable_features)]
 //@ ignore-windows - this is a unix-specific test
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-fuchsia no execvp syscall provided
 
diff --git a/tests/ui/command/command-pre-exec.rs b/tests/ui/command/command-pre-exec.rs
index 2f3483fad086f..7242dea27759a 100644
--- a/tests/ui/command/command-pre-exec.rs
+++ b/tests/ui/command/command-pre-exec.rs
@@ -2,7 +2,7 @@
 
 #![allow(stable_features)]
 //@ ignore-windows - this is a unix-specific test
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-fuchsia no execvp syscall
 #![feature(process_exec, rustc_private)]
diff --git a/tests/ui/command/command-setgroups.rs b/tests/ui/command/command-setgroups.rs
index f5dbf43feb566..c940135d844ca 100644
--- a/tests/ui/command/command-setgroups.rs
+++ b/tests/ui/command/command-setgroups.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 //@ ignore-windows - this is a unix-specific test
-//@ ignore-emscripten
+//@ ignore-wasm32
 //@ ignore-sgx
 //@ ignore-musl - returns dummy result for _SC_NGROUPS_MAX
 //@ ignore-nto - does not have `/bin/id`, expects groups to be i32 (not u32)
diff --git a/tests/ui/command/issue-10626.rs b/tests/ui/command/issue-10626.rs
index c63edb83700ad..f8dbb01151377 100644
--- a/tests/ui/command/issue-10626.rs
+++ b/tests/ui/command/issue-10626.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 // Make sure that if a process doesn't have its stdio/stderr descriptors set up
diff --git a/tests/ui/consts/trait_specialization.rs b/tests/ui/consts/trait_specialization.rs
index f195e067b55ef..1360fabd1fe11 100644
--- a/tests/ui/consts/trait_specialization.rs
+++ b/tests/ui/consts/trait_specialization.rs
@@ -1,4 +1,3 @@
-//@ ignore-wasm32-bare which doesn't support `std::process:exit()`
 //@ compile-flags: -Zmir-opt-level=3
 //@ run-pass
 
diff --git a/tests/ui/consts/trait_specialization.stderr b/tests/ui/consts/trait_specialization.stderr
index 10bebe8ebc55d..ce52cf17b89e6 100644
--- a/tests/ui/consts/trait_specialization.stderr
+++ b/tests/ui/consts/trait_specialization.stderr
@@ -1,5 +1,5 @@
 warning: the feature `specialization` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/trait_specialization.rs:8:12
+  --> $DIR/trait_specialization.rs:7:12
    |
 LL | #![feature(specialization)]
    |            ^^^^^^^^^^^^^^
diff --git a/tests/ui/coroutine/size-moved-locals.rs b/tests/ui/coroutine/size-moved-locals.rs
index 84cc4319070dd..eb5210087a0e6 100644
--- a/tests/ui/coroutine/size-moved-locals.rs
+++ b/tests/ui/coroutine/size-moved-locals.rs
@@ -10,7 +10,6 @@
 // See issue #59123 for a full explanation.
 
 //@ edition:2018
-//@ ignore-wasm32 issue #62807
 //@ needs-unwind Size of Closures change on panic=abort
 
 #![feature(coroutines, coroutine_trait)]
diff --git a/tests/ui/duplicate/dupe-symbols-7.rs b/tests/ui/duplicate/dupe-symbols-7.rs
index 2c75a5ffe6d7c..162c3c40446d7 100644
--- a/tests/ui/duplicate/dupe-symbols-7.rs
+++ b/tests/ui/duplicate/dupe-symbols-7.rs
@@ -1,4 +1,5 @@
 //@ build-fail
+//@ ignore-wasi wasi does different things with the `main` symbol
 
 //
 //@ error-pattern: entry symbol `main` declared multiple times
diff --git a/tests/ui/duplicate/dupe-symbols-7.stderr b/tests/ui/duplicate/dupe-symbols-7.stderr
index 23f74ef750925..ab9167e005a37 100644
--- a/tests/ui/duplicate/dupe-symbols-7.stderr
+++ b/tests/ui/duplicate/dupe-symbols-7.stderr
@@ -1,5 +1,5 @@
 error: entry symbol `main` declared multiple times
-  --> $DIR/dupe-symbols-7.rs:9:1
+  --> $DIR/dupe-symbols-7.rs:10:1
    |
 LL | fn main(){}
    | ^^^^^^^^^
diff --git a/tests/ui/duplicate/dupe-symbols-8.rs b/tests/ui/duplicate/dupe-symbols-8.rs
index fc0b103777766..258e91fa8c878 100644
--- a/tests/ui/duplicate/dupe-symbols-8.rs
+++ b/tests/ui/duplicate/dupe-symbols-8.rs
@@ -1,5 +1,6 @@
 //@ build-fail
 //@ error-pattern: entry symbol `main` declared multiple times
+//@ ignore-wasi wasi does different things with the `main` symbol
 //
 // See #67946.
 
diff --git a/tests/ui/duplicate/dupe-symbols-8.stderr b/tests/ui/duplicate/dupe-symbols-8.stderr
index 67eb0bc71a92f..d7d419c9aa402 100644
--- a/tests/ui/duplicate/dupe-symbols-8.stderr
+++ b/tests/ui/duplicate/dupe-symbols-8.stderr
@@ -1,5 +1,5 @@
 error: entry symbol `main` declared multiple times
-  --> $DIR/dupe-symbols-8.rs:7:1
+  --> $DIR/dupe-symbols-8.rs:8:1
    |
 LL | fn main() {
    | ^^^^^^^^^
diff --git a/tests/ui/env-args-reverse-iterator.rs b/tests/ui/env-args-reverse-iterator.rs
index 4971d2b30e77f..830e953546644 100644
--- a/tests/ui/env-args-reverse-iterator.rs
+++ b/tests/ui/env-args-reverse-iterator.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::env::args;
diff --git a/tests/ui/env-funky-keys.rs b/tests/ui/env-funky-keys.rs
index ac6da1fefae5b..314ccaea01525 100644
--- a/tests/ui/env-funky-keys.rs
+++ b/tests/ui/env-funky-keys.rs
@@ -3,7 +3,7 @@
 
 //@ ignore-android
 //@ ignore-windows
-//@ ignore-emscripten no execve
+//@ ignore-wasm32 no execve
 //@ ignore-sgx no execve
 //@ ignore-vxworks no execve
 //@ ignore-fuchsia no 'execve'
diff --git a/tests/ui/env-null-vars.rs b/tests/ui/env-null-vars.rs
index 55fe8ac25ca02..bb86fd353c4e9 100644
--- a/tests/ui/env-null-vars.rs
+++ b/tests/ui/env-null-vars.rs
@@ -3,7 +3,6 @@
 #![allow(unused_imports)]
 
 //@ ignore-windows
-//@ ignore-wasm32-bare no libc to test ffi with
 
 // issue-53200
 
diff --git a/tests/ui/env-vars.rs b/tests/ui/env-vars.rs
index 5ca1b80f235d1..73068b5dfb8ce 100644
--- a/tests/ui/env-vars.rs
+++ b/tests/ui/env-vars.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no env vars
 
 use std::env::*;
 
diff --git a/tests/ui/exec-env.rs b/tests/ui/exec-env.rs
index 08c5aa864676c..9054b378f5679 100644
--- a/tests/ui/exec-env.rs
+++ b/tests/ui/exec-env.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 //@ exec-env:TEST_EXEC_ENV=22
-//@ ignore-emscripten FIXME: issue #31622
+//@ ignore-wasm32 wasm runtimes aren't configured to inherit env vars yet
 //@ ignore-sgx unsupported
 
 use std::env;
diff --git a/tests/ui/extern/extern-const.fixed b/tests/ui/extern/extern-const.fixed
index b338a56dd7858..9f695eaafd04c 100644
--- a/tests/ui/extern/extern-const.fixed
+++ b/tests/ui/extern/extern-const.fixed
@@ -5,7 +5,6 @@
 // compile. To sidestep this by using one that *is* defined.
 
 //@ run-rustfix
-//@ ignore-wasm32-bare no external library to link to.
 //@ compile-flags: -g
 #![feature(rustc_private)]
 extern crate libc;
diff --git a/tests/ui/extern/extern-const.rs b/tests/ui/extern/extern-const.rs
index 1c552950afbec..e412dff889554 100644
--- a/tests/ui/extern/extern-const.rs
+++ b/tests/ui/extern/extern-const.rs
@@ -5,7 +5,6 @@
 // compile. To sidestep this by using one that *is* defined.
 
 //@ run-rustfix
-//@ ignore-wasm32-bare no external library to link to.
 //@ compile-flags: -g
 #![feature(rustc_private)]
 extern crate libc;
diff --git a/tests/ui/extern/extern-const.stderr b/tests/ui/extern/extern-const.stderr
index 4c2c3d6e0a848..07485cf99940f 100644
--- a/tests/ui/extern/extern-const.stderr
+++ b/tests/ui/extern/extern-const.stderr
@@ -1,5 +1,5 @@
 error: extern items cannot be `const`
-  --> $DIR/extern-const.rs:15:11
+  --> $DIR/extern-const.rs:14:11
    |
 LL |     const rust_dbg_static_mut: libc::c_int;
    |     ------^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/extern/issue-1251.rs b/tests/ui/extern/issue-1251.rs
index bf701a41f9417..da2b8be7bc1f3 100644
--- a/tests/ui/extern/issue-1251.rs
+++ b/tests/ui/extern/issue-1251.rs
@@ -2,7 +2,6 @@
 #![allow(unused_attributes)]
 #![allow(dead_code)]
 //@ pretty-expanded FIXME #23616
-//@ ignore-wasm32-bare no libc to test ffi with
 #![feature(rustc_private)]
 
 mod rustrt {
diff --git a/tests/ui/foreign/foreign-fn-linkname.rs b/tests/ui/foreign/foreign-fn-linkname.rs
index 42876937a839f..47edf6fc7bba1 100644
--- a/tests/ui/foreign/foreign-fn-linkname.rs
+++ b/tests/ui/foreign/foreign-fn-linkname.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc to test ffi with
 //@ ignore-sgx no libc
 
 // Ensure no false positive on "unused extern crate" lint
diff --git a/tests/ui/foreign/foreign2.rs b/tests/ui/foreign/foreign2.rs
index 9379a0b4bd6f5..eb24df35033c5 100644
--- a/tests/ui/foreign/foreign2.rs
+++ b/tests/ui/foreign/foreign2.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ ignore-wasm32-bare no libc to test ffi with
 //@ pretty-expanded FIXME #23616
 #![feature(rustc_private)]
 
diff --git a/tests/ui/inherit-env.rs b/tests/ui/inherit-env.rs
index e4ae8145d7129..0eb61fcdd53b3 100644
--- a/tests/ui/inherit-env.rs
+++ b/tests/ui/inherit-env.rs
@@ -1,6 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten
-//@ ignore-wasm32
+//@ ignore-wasm32 no subprocess support
 //@ ignore-sgx no processes
 
 use std::env;
diff --git a/tests/ui/intrinsics/intrinsic-alignment.rs b/tests/ui/intrinsics/intrinsic-alignment.rs
index 69ccab201e6f1..4856da553a80d 100644
--- a/tests/ui/intrinsics/intrinsic-alignment.rs
+++ b/tests/ui/intrinsics/intrinsic-alignment.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare seems not important to test here
 
 #![feature(intrinsics, rustc_attrs)]
 
@@ -65,6 +64,16 @@ mod m {
     }
 }
 
+#[cfg(target_family = "wasm")]
+mod m {
+    pub fn main() {
+        unsafe {
+            assert_eq!(::rusti::pref_align_of::<u64>(), 8);
+            assert_eq!(::rusti::min_align_of::<u64>(), 8);
+        }
+    }
+}
+
 fn main() {
     m::main();
 }
diff --git a/tests/ui/intrinsics/panic-uninitialized-zeroed.rs b/tests/ui/intrinsics/panic-uninitialized-zeroed.rs
index fb3b0652ddbf7..b1ac7528d584d 100644
--- a/tests/ui/intrinsics/panic-uninitialized-zeroed.rs
+++ b/tests/ui/intrinsics/panic-uninitialized-zeroed.rs
@@ -2,7 +2,7 @@
 //@ revisions: default strict
 //@ [strict]compile-flags: -Zstrict-init-checks
 // ignore-tidy-linelength
-//@ ignore-emscripten spawning processes is not supported
+//@ ignore-wasm32 spawning processes is not supported
 //@ ignore-sgx no processes
 //
 // This test checks panic emitted from `mem::{uninitialized,zeroed}`.
diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
index 3a80934b8657e..fab7ec166e6fa 100644
--- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
+++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
@@ -26,7 +26,6 @@
 
 //@ ignore-windows - this is a unix-specific test
 //@ ignore-emscripten - the file-system issues do not replicate here
-//@ ignore-wasm - the file-system issues do not replicate here
 //@ ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu
 
 #![crate_type = "lib"]
diff --git a/tests/ui/issues/issue-12133-3.rs b/tests/ui/issues/issue-12133-3.rs
index 572337679af2b..a34c075d64dae 100644
--- a/tests/ui/issues/issue-12133-3.rs
+++ b/tests/ui/issues/issue-12133-3.rs
@@ -2,7 +2,7 @@
 //@ aux-build:issue-12133-rlib.rs
 //@ aux-build:issue-12133-dylib.rs
 //@ aux-build:issue-12133-dylib2.rs
-//@ ignore-emscripten no dylib support
+//@ ignore-wasm32 no dylib support
 //@ ignore-musl
 //@ needs-dynamic-linking
 
diff --git a/tests/ui/issues/issue-12699.rs b/tests/ui/issues/issue-12699.rs
index 3222fbe00ea2f..4fc93735c3ce3 100644
--- a/tests/ui/issues/issue-12699.rs
+++ b/tests/ui/issues/issue-12699.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare can't block the thread
 //@ ignore-sgx not supported
 #![allow(deprecated)]
 
diff --git a/tests/ui/issues/issue-2214.rs b/tests/ui/issues/issue-2214.rs
index 3c45898420442..5d732cd77989c 100644
--- a/tests/ui/issues/issue-2214.rs
+++ b/tests/ui/issues/issue-2214.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc to test ffi with
+//@ ignore-wasm32 wasi-libc does not have lgamma
 //@ ignore-sgx no libc
 #![feature(rustc_private)]
 
diff --git a/tests/ui/issues/issue-25185.rs b/tests/ui/issues/issue-25185.rs
index ee54a21694e6b..7dc06ad96df66 100644
--- a/tests/ui/issues/issue-25185.rs
+++ b/tests/ui/issues/issue-25185.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 //@ aux-build:issue-25185-1.rs
 //@ aux-build:issue-25185-2.rs
-//@ ignore-wasm32-bare no libc for ffi testing
 
 extern crate issue_25185_2;
 
diff --git a/tests/ui/issues/issue-33770.rs b/tests/ui/issues/issue-33770.rs
index b4290955be5f1..0fa91ac91c4d3 100644
--- a/tests/ui/issues/issue-33770.rs
+++ b/tests/ui/issues/issue-33770.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::process::{Command, Stdio};
diff --git a/tests/ui/issues/issue-33992.rs b/tests/ui/issues/issue-33992.rs
index d1c62c830a93f..177ff234bb291 100644
--- a/tests/ui/issues/issue-33992.rs
+++ b/tests/ui/issues/issue-33992.rs
@@ -1,7 +1,7 @@
 //@ run-pass
 //@ ignore-windows
 //@ ignore-macos
-//@ ignore-emscripten common linkage not implemented right now
+//@ ignore-wasm32 common linkage not implemented right now
 
 #![feature(linkage)]
 
diff --git a/tests/ui/issues/issue-3656.rs b/tests/ui/issues/issue-3656.rs
index ff3b782ade926..1b65129d0c386 100644
--- a/tests/ui/issues/issue-3656.rs
+++ b/tests/ui/issues/issue-3656.rs
@@ -6,7 +6,6 @@
 // the alignment of elements into account.
 
 //@ pretty-expanded FIXME #23616
-//@ ignore-wasm32-bare no libc to test with
 #![feature(rustc_private)]
 
 extern crate libc;
diff --git a/tests/ui/issues/issue-39175.rs b/tests/ui/issues/issue-39175.rs
index ddba8052b5edf..7b801317b714b 100644
--- a/tests/ui/issues/issue-39175.rs
+++ b/tests/ui/issues/issue-39175.rs
@@ -4,7 +4,7 @@
 // these platforms also.
 
 //@ ignore-windows
-//@ ignore-emscripten
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::process::Command;
diff --git a/tests/ui/issues/issue-44216-add-instant.rs b/tests/ui/issues/issue-44216-add-instant.rs
index 1db0adedcf51b..ca2c52b99a82a 100644
--- a/tests/ui/issues/issue-44216-add-instant.rs
+++ b/tests/ui/issues/issue-44216-add-instant.rs
@@ -1,10 +1,9 @@
 //@ run-fail
 //@ error-pattern:overflow
-//@ ignore-emscripten no processes
 
-use std::time::{Instant, Duration};
+use std::time::{Duration, Instant};
 
 fn main() {
     let now = Instant::now();
-    let _ = now + Duration::from_secs(u64::MAX);
+    let _ = now + Duration::MAX;
 }
diff --git a/tests/ui/linkage-attr/common-linkage-non-zero-init.rs b/tests/ui/linkage-attr/common-linkage-non-zero-init.rs
index 61eb4fb66b571..a1fdd5a014c0f 100644
--- a/tests/ui/linkage-attr/common-linkage-non-zero-init.rs
+++ b/tests/ui/linkage-attr/common-linkage-non-zero-init.rs
@@ -1,6 +1,7 @@
 //@ build-fail
 //@ failure-status: 101
 //@ known-bug: #109681
+//@ ignore-wasm32 this appears to SIGABRT on wasm, not fail cleanly
 
 // This test verifies that we continue to hit the LLVM error for common linkage with non-zero
 // initializers, since it generates invalid LLVM IR.
diff --git a/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs b/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs
index 881c9e88c468c..03717c7c22d54 100644
--- a/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs
+++ b/tests/ui/loops/issue-69225-SCEVAddExpr-wrap-flag.rs
@@ -1,8 +1,6 @@
 //@ run-fail
 //@ compile-flags: -C opt-level=3
 //@ error-pattern: index out of bounds: the len is 0 but the index is 16777216
-//@ ignore-wasm no panic or subprocess support
-//@ ignore-emscripten no panic or subprocess support
 
 fn do_test(x: usize) {
     let mut arr = vec![vec![0u8; 3]];
diff --git a/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs b/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs
index 9a85d1b01eb46..048c7c8872c19 100644
--- a/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs
+++ b/tests/ui/loops/issue-69225-layout-repeated-checked-add.rs
@@ -4,8 +4,6 @@
 //@ run-fail
 //@ compile-flags: -C opt-level=3
 //@ error-pattern: index out of bounds: the len is 0 but the index is 16777216
-//@ ignore-wasm no panic or subprocess support
-//@ ignore-emscripten no panic or subprocess support
 
 fn do_test(x: usize) {
     let arr = vec![vec![0u8; 3]];
diff --git a/tests/ui/macros/assert-long-condition.rs b/tests/ui/macros/assert-long-condition.rs
index 424d566e4393f..1c067438432a6 100644
--- a/tests/ui/macros/assert-long-condition.rs
+++ b/tests/ui/macros/assert-long-condition.rs
@@ -1,7 +1,6 @@
 //@ run-fail
 //@ check-run-results
 //@ exec-env:RUST_BACKTRACE=0
-//@ ignore-emscripten no processes
 // ignore-tidy-linelength
 
 fn main() {
diff --git a/tests/ui/macros/assert-long-condition.run.stderr b/tests/ui/macros/assert-long-condition.run.stderr
index 16e56c92735cc..5c0ff357cb7a7 100644
--- a/tests/ui/macros/assert-long-condition.run.stderr
+++ b/tests/ui/macros/assert-long-condition.run.stderr
@@ -1,4 +1,4 @@
-thread 'main' panicked at $DIR/assert-long-condition.rs:8:5:
+thread 'main' panicked at $DIR/assert-long-condition.rs:7:5:
 assertion failed: 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 + 17 + 18
                                 + 19 + 20 + 21 + 22 + 23 + 24 + 25 == 0
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/macros/macros-in-extern.rs b/tests/ui/macros/macros-in-extern.rs
index 363ff5df64a8d..97780650d1126 100644
--- a/tests/ui/macros/macros-in-extern.rs
+++ b/tests/ui/macros/macros-in-extern.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32
 
 #![feature(decl_macro)]
 
diff --git a/tests/ui/mir/alignment/misaligned_lhs.rs b/tests/ui/mir/alignment/misaligned_lhs.rs
index 5f484b8b3be3f..b169823bc081f 100644
--- a/tests/ui/mir/alignment/misaligned_lhs.rs
+++ b/tests/ui/mir/alignment/misaligned_lhs.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32-bare: No panic messages
 //@ ignore-i686-pc-windows-msvc: #112480
 //@ compile-flags: -C debug-assertions
 //@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is
diff --git a/tests/ui/mir/alignment/misaligned_rhs.rs b/tests/ui/mir/alignment/misaligned_rhs.rs
index ca63a4711cda6..55da30a2fd75d 100644
--- a/tests/ui/mir/alignment/misaligned_rhs.rs
+++ b/tests/ui/mir/alignment/misaligned_rhs.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32-bare: No panic messages
 //@ ignore-i686-pc-windows-msvc: #112480
 //@ compile-flags: -C debug-assertions
 //@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is
diff --git a/tests/ui/mir/alignment/two_pointers.rs b/tests/ui/mir/alignment/two_pointers.rs
index 68bf45c6e70f3..198a1c9853d97 100644
--- a/tests/ui/mir/alignment/two_pointers.rs
+++ b/tests/ui/mir/alignment/two_pointers.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32-bare: No panic messages
 //@ ignore-i686-pc-windows-msvc: #112480
 //@ compile-flags: -C debug-assertions
 //@ error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is
diff --git a/tests/ui/non-copyable-void.rs b/tests/ui/non-copyable-void.rs
index 8089f5e2218a0..586681478010f 100644
--- a/tests/ui/non-copyable-void.rs
+++ b/tests/ui/non-copyable-void.rs
@@ -1,5 +1,3 @@
-//@ ignore-wasm32-bare no libc to test ffi with
-
 #![feature(rustc_private)]
 
 extern crate libc;
diff --git a/tests/ui/non-copyable-void.stderr b/tests/ui/non-copyable-void.stderr
index bef1e1077ebb4..d25bb8c17ee5c 100644
--- a/tests/ui/non-copyable-void.stderr
+++ b/tests/ui/non-copyable-void.stderr
@@ -1,5 +1,5 @@
 error[E0599]: no method named `clone` found for enum `c_void` in the current scope
-  --> $DIR/non-copyable-void.rs:11:23
+  --> $DIR/non-copyable-void.rs:9:23
    |
 LL |         let _z = (*y).clone();
    |                       ^^^^^ method not found in `c_void`
diff --git a/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs
index 654e54a159159..8014bae2889c4 100644
--- a/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs
+++ b/tests/ui/numbers-arithmetic/location-add-assign-overflow.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32
 //@ error-pattern:location-add-assign-overflow.rs
 
 fn main() {
diff --git a/tests/ui/numbers-arithmetic/location-add-overflow.rs b/tests/ui/numbers-arithmetic/location-add-overflow.rs
index 65452e2c2c294..0d2e52d532efa 100644
--- a/tests/ui/numbers-arithmetic/location-add-overflow.rs
+++ b/tests/ui/numbers-arithmetic/location-add-overflow.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32
 //@ error-pattern:location-add-overflow.rs
 
 fn main() {
diff --git a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs
index 8bce8ded5da61..63fbab5ecc49c 100644
--- a/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs
+++ b/tests/ui/numbers-arithmetic/location-divide-assign-by-zero.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32
 //@ error-pattern:location-divide-assign-by-zero.rs
 
 fn main() {
diff --git a/tests/ui/numbers-arithmetic/location-divide-by-zero.rs b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs
index 180f72eb6f46c..88c1b51c1bb4e 100644
--- a/tests/ui/numbers-arithmetic/location-divide-by-zero.rs
+++ b/tests/ui/numbers-arithmetic/location-divide-by-zero.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32
 //@ error-pattern:location-divide-by-zero.rs
 
 // https://github.com/rust-lang/rust/issues/114814
diff --git a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs
index bc4377eb67983..ae62f5c26d9a4 100644
--- a/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs
+++ b/tests/ui/numbers-arithmetic/location-mod-assign-by-zero.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32
 //@ error-pattern:location-mod-assign-by-zero.rs
 
 fn main() {
diff --git a/tests/ui/numbers-arithmetic/location-mod-by-zero.rs b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs
index 2f176013db2f6..6a2e1b158bf7f 100644
--- a/tests/ui/numbers-arithmetic/location-mod-by-zero.rs
+++ b/tests/ui/numbers-arithmetic/location-mod-by-zero.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32
 //@ error-pattern:location-mod-by-zero.rs
 
 fn main() {
diff --git a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs
index 33de927b03421..07cec7d173034 100644
--- a/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs
+++ b/tests/ui/numbers-arithmetic/location-mul-assign-overflow.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32
 //@ error-pattern:location-mul-assign-overflow.rs
 
 fn main() {
diff --git a/tests/ui/numbers-arithmetic/location-mul-overflow.rs b/tests/ui/numbers-arithmetic/location-mul-overflow.rs
index 8d93406ba5092..0a00d3beaa786 100644
--- a/tests/ui/numbers-arithmetic/location-mul-overflow.rs
+++ b/tests/ui/numbers-arithmetic/location-mul-overflow.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32
 //@ error-pattern:location-mul-overflow.rs
 
 fn main() {
diff --git a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs
index 1bc1a9b2d66c8..13f074b0ffef3 100644
--- a/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs
+++ b/tests/ui/numbers-arithmetic/location-sub-assign-overflow.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32
 //@ error-pattern:location-sub-assign-overflow.rs
 
 fn main() {
diff --git a/tests/ui/numbers-arithmetic/location-sub-overflow.rs b/tests/ui/numbers-arithmetic/location-sub-overflow.rs
index 911b2815a00a3..9a0fabe1cd63c 100644
--- a/tests/ui/numbers-arithmetic/location-sub-overflow.rs
+++ b/tests/ui/numbers-arithmetic/location-sub-overflow.rs
@@ -1,5 +1,4 @@
 //@ run-fail
-//@ ignore-wasm32
 //@ error-pattern:location-sub-overflow.rs
 
 fn main() {
diff --git a/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs b/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs
index 4f8efd6d68855..11e4929f12e0a 100644
--- a/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs
+++ b/tests/ui/panic-runtime/abort-link-to-unwinding-crates.rs
@@ -3,7 +3,7 @@
 //@ compile-flags:-C panic=abort
 //@ aux-build:exit-success-if-unwind.rs
 //@ no-prefer-dynamic
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-macos
 
diff --git a/tests/ui/panic-runtime/abort.rs b/tests/ui/panic-runtime/abort.rs
index 810e13c976288..22bd2ecfb00e7 100644
--- a/tests/ui/panic-runtime/abort.rs
+++ b/tests/ui/panic-runtime/abort.rs
@@ -2,7 +2,7 @@
 #![allow(unused_variables)]
 //@ compile-flags:-C panic=abort
 //@ no-prefer-dynamic
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-macos
 
diff --git a/tests/ui/panic-runtime/lto-abort.rs b/tests/ui/panic-runtime/lto-abort.rs
index 1d2aed12b9bd6..c66b6a60c7389 100644
--- a/tests/ui/panic-runtime/lto-abort.rs
+++ b/tests/ui/panic-runtime/lto-abort.rs
@@ -2,7 +2,7 @@
 #![allow(unused_variables)]
 //@ compile-flags:-C lto -C panic=abort
 //@ no-prefer-dynamic
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::process::Command;
diff --git a/tests/ui/panics/abort-on-panic.rs b/tests/ui/panics/abort-on-panic.rs
index 4929cdab1c2f0..5bb2542667607 100644
--- a/tests/ui/panics/abort-on-panic.rs
+++ b/tests/ui/panics/abort-on-panic.rs
@@ -8,7 +8,7 @@
 // Since we mark some ABIs as "nounwind" to LLVM, we must make sure that
 // we never unwind through them.
 
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::io;
diff --git a/tests/ui/panics/runtime-switch.rs b/tests/ui/panics/runtime-switch.rs
index b0991321ee468..a4ef0dcd8a237 100644
--- a/tests/ui/panics/runtime-switch.rs
+++ b/tests/ui/panics/runtime-switch.rs
@@ -9,7 +9,7 @@
 //@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test
 //@ ignore-android FIXME #17520
 //@ ignore-openbsd no support for libbacktrace without filename
-//@ ignore-wasm no panic or subprocess support
+//@ ignore-wasm no backtrace support
 //@ ignore-emscripten no panic or subprocess support
 //@ ignore-sgx no subprocess support
 //@ ignore-fuchsia Backtrace not symbolized
diff --git a/tests/ui/panics/short-ice-remove-middle-frames-2.rs b/tests/ui/panics/short-ice-remove-middle-frames-2.rs
index 15843fa6626f9..6caad2212d491 100644
--- a/tests/ui/panics/short-ice-remove-middle-frames-2.rs
+++ b/tests/ui/panics/short-ice-remove-middle-frames-2.rs
@@ -4,7 +4,6 @@
 //@ exec-env:RUST_BACKTRACE=1
 //@ needs-unwind
 //@ ignore-android FIXME #17520
-//@ ignore-wasm no panic support
 //@ ignore-openbsd no support for libbacktrace without filename
 //@ ignore-emscripten no panic
 //@ ignore-sgx Backtraces not symbolized
diff --git a/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr b/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr
index 664ebaa4c51a6..2b648a0cad2ea 100644
--- a/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr
+++ b/tests/ui/panics/short-ice-remove-middle-frames-2.run.stderr
@@ -1,4 +1,4 @@
-thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:57:5:
+thread 'main' panicked at $DIR/short-ice-remove-middle-frames-2.rs:56:5:
 debug!!!
 stack backtrace:
    0: std::panicking::begin_panic
diff --git a/tests/ui/panics/short-ice-remove-middle-frames.rs b/tests/ui/panics/short-ice-remove-middle-frames.rs
index 204780459b387..5f275d13cc4cb 100644
--- a/tests/ui/panics/short-ice-remove-middle-frames.rs
+++ b/tests/ui/panics/short-ice-remove-middle-frames.rs
@@ -4,7 +4,6 @@
 //@ exec-env:RUST_BACKTRACE=1
 //@ needs-unwind
 //@ ignore-android FIXME #17520
-//@ ignore-wasm no panic support
 //@ ignore-openbsd no support for libbacktrace without filename
 //@ ignore-emscripten no panic
 //@ ignore-sgx Backtraces not symbolized
diff --git a/tests/ui/panics/short-ice-remove-middle-frames.run.stderr b/tests/ui/panics/short-ice-remove-middle-frames.run.stderr
index bc252fde1f6ab..5b37268409679 100644
--- a/tests/ui/panics/short-ice-remove-middle-frames.run.stderr
+++ b/tests/ui/panics/short-ice-remove-middle-frames.run.stderr
@@ -1,4 +1,4 @@
-thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:53:5:
+thread 'main' panicked at $DIR/short-ice-remove-middle-frames.rs:52:5:
 debug!!!
 stack backtrace:
    0: std::panicking::begin_panic
diff --git a/tests/ui/panics/test-should-fail-bad-message.rs b/tests/ui/panics/test-should-fail-bad-message.rs
index 9d8084053cc30..1fb2da9055bd1 100644
--- a/tests/ui/panics/test-should-fail-bad-message.rs
+++ b/tests/ui/panics/test-should-fail-bad-message.rs
@@ -1,7 +1,7 @@
 //@ run-fail
 //@ check-stdout
 //@ compile-flags: --test
-//@ ignore-emscripten
+//@ needs-unwind
 
 #[test]
 #[should_panic(expected = "foobar")]
diff --git a/tests/ui/panics/test-should-panic-bad-message.rs b/tests/ui/panics/test-should-panic-bad-message.rs
index 4f39412af5f99..1a3c52ea176d9 100644
--- a/tests/ui/panics/test-should-panic-bad-message.rs
+++ b/tests/ui/panics/test-should-panic-bad-message.rs
@@ -1,7 +1,7 @@
 //@ run-fail
 //@ compile-flags: --test
 //@ check-stdout
-//@ ignore-emscripten no processes
+//@ needs-unwind
 
 #[test]
 #[should_panic(expected = "foo")]
diff --git a/tests/ui/panics/test-should-panic-no-message.rs b/tests/ui/panics/test-should-panic-no-message.rs
index 8bbcbe9fa594e..b6ed6b19dd086 100644
--- a/tests/ui/panics/test-should-panic-no-message.rs
+++ b/tests/ui/panics/test-should-panic-no-message.rs
@@ -1,7 +1,7 @@
 //@ run-fail
 //@ compile-flags: --test
 //@ check-stdout
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 
 #[test]
 #[should_panic(expected = "foo")]
diff --git a/tests/ui/paths-containing-nul.rs b/tests/ui/paths-containing-nul.rs
index 23ea84bc33fbc..5c37980127db1 100644
--- a/tests/ui/paths-containing-nul.rs
+++ b/tests/ui/paths-containing-nul.rs
@@ -1,8 +1,7 @@
 //@ run-pass
 
 #![allow(deprecated)]
-//@ ignore-wasm32-bare no files or I/O
-//@ ignore-emscripten no files
+//@ ignore-wasm32 no cwd
 //@ ignore-sgx no files
 
 use std::fs;
diff --git a/tests/ui/precondition-checks/misaligned-slice.rs b/tests/ui/precondition-checks/misaligned-slice.rs
index d105154ecd888..52c149b594ebb 100644
--- a/tests/ui/precondition-checks/misaligned-slice.rs
+++ b/tests/ui/precondition-checks/misaligned-slice.rs
@@ -2,7 +2,6 @@
 //@ compile-flags: -Copt-level=3 -Cdebug-assertions=yes
 //@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts
 //@ ignore-debug
-//@ ignore-wasm32-bare no panic messages
 
 fn main() {
     unsafe {
diff --git a/tests/ui/precondition-checks/null-slice.rs b/tests/ui/precondition-checks/null-slice.rs
index 4347b85875d7d..61c7d4676492b 100644
--- a/tests/ui/precondition-checks/null-slice.rs
+++ b/tests/ui/precondition-checks/null-slice.rs
@@ -2,7 +2,6 @@
 //@ compile-flags: -Copt-level=3 -Cdebug-assertions=yes
 //@ error-pattern: unsafe precondition(s) violated: slice::from_raw_parts
 //@ ignore-debug
-//@ ignore-wasm32-bare no panic messages
 
 fn main() {
     unsafe {
diff --git a/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs b/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs
index 77bec6aab7f69..ba02c3da7b289 100644
--- a/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs
+++ b/tests/ui/precondition-checks/out-of-bounds-get-unchecked.rs
@@ -2,7 +2,6 @@
 //@ compile-flags: -Copt-level=3 -Cdebug-assertions=yes
 //@ error-pattern: slice::get_unchecked requires
 //@ ignore-debug
-//@ ignore-wasm32-bare no panic messages
 
 fn main() {
     unsafe {
diff --git a/tests/ui/print-stdout-eprint-stderr.rs b/tests/ui/print-stdout-eprint-stderr.rs
index e676a9ad1afba..e84a9bebc495a 100644
--- a/tests/ui/print-stdout-eprint-stderr.rs
+++ b/tests/ui/print-stdout-eprint-stderr.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten spawning processes is not supported
+//@ ignore-wasm32 spawning processes is not supported
 //@ ignore-sgx no processes
 
 use std::{env, process};
diff --git a/tests/ui/privacy/pub-extern-privacy.rs b/tests/ui/privacy/pub-extern-privacy.rs
index b6c18bd1ee7c4..dc5e8951bfc00 100644
--- a/tests/ui/privacy/pub-extern-privacy.rs
+++ b/tests/ui/privacy/pub-extern-privacy.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc to test ffi with
 
 //@ pretty-expanded FIXME #23616
 
diff --git a/tests/ui/proc-macro/crt-static.rs b/tests/ui/proc-macro/crt-static.rs
index 546d30dbad743..0874c4e8a38bd 100644
--- a/tests/ui/proc-macro/crt-static.rs
+++ b/tests/ui/proc-macro/crt-static.rs
@@ -2,7 +2,6 @@
 // on musl target
 // override -Ctarget-feature=-crt-static from compiletest
 //@ compile-flags: --crate-type proc-macro -Ctarget-feature=
-//@ ignore-wasm32
 //@ ignore-sgx no support for proc-macro crate type
 //@ build-pass
 //@ force-host
diff --git a/tests/ui/proc-macro/macros-in-extern.rs b/tests/ui/proc-macro/macros-in-extern.rs
index 82ab7b506baba..da384d1b141e4 100644
--- a/tests/ui/proc-macro/macros-in-extern.rs
+++ b/tests/ui/proc-macro/macros-in-extern.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 //@ aux-build:test-macros.rs
-//@ ignore-wasm32
 
 #[macro_use]
 extern crate test_macros;
diff --git a/tests/ui/process/core-run-destroy.rs b/tests/ui/process/core-run-destroy.rs
index 42bb35edf3ba5..338203657bd1f 100644
--- a/tests/ui/process/core-run-destroy.rs
+++ b/tests/ui/process/core-run-destroy.rs
@@ -5,7 +5,7 @@
 #![allow(deprecated)]
 #![allow(unused_imports)]
 //@ compile-flags:--test
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-vxworks no 'cat' and 'sleep'
 //@ ignore-fuchsia no 'cat'
diff --git a/tests/ui/process/fds-are-cloexec.rs b/tests/ui/process/fds-are-cloexec.rs
index a5ede2ee04da8..e7b000b2c499f 100644
--- a/tests/ui/process/fds-are-cloexec.rs
+++ b/tests/ui/process/fds-are-cloexec.rs
@@ -1,7 +1,7 @@
 //@ run-pass
 //@ ignore-windows
 //@ ignore-android
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-haiku
 //@ ignore-sgx no processes
 
diff --git a/tests/ui/process/issue-13304.rs b/tests/ui/process/issue-13304.rs
index 06aad569169de..6dbf0caaaecee 100644
--- a/tests/ui/process/issue-13304.rs
+++ b/tests/ui/process/issue-13304.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 #![allow(unused_mut)]
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::env;
diff --git a/tests/ui/process/issue-14456.rs b/tests/ui/process/issue-14456.rs
index 9146588aa4bc3..fd6da8a5fc471 100644
--- a/tests/ui/process/issue-14456.rs
+++ b/tests/ui/process/issue-14456.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 #![allow(unused_mut)]
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::env;
diff --git a/tests/ui/process/issue-14940.rs b/tests/ui/process/issue-14940.rs
index 3c8de7cfccccf..13fb18154a0db 100644
--- a/tests/ui/process/issue-14940.rs
+++ b/tests/ui/process/issue-14940.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::env;
diff --git a/tests/ui/process/issue-16272.rs b/tests/ui/process/issue-16272.rs
index 484c3ea41166d..bf26769d494f6 100644
--- a/tests/ui/process/issue-16272.rs
+++ b/tests/ui/process/issue-16272.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::process::Command;
diff --git a/tests/ui/process/issue-20091.rs b/tests/ui/process/issue-20091.rs
index 27986277fad48..b6d94661b75c2 100644
--- a/tests/ui/process/issue-20091.rs
+++ b/tests/ui/process/issue-20091.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(stable_features)]
-
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 #![feature(os)]
diff --git a/tests/ui/process/multi-panic.rs b/tests/ui/process/multi-panic.rs
index e8aa7f59f8534..02b699036541d 100644
--- a/tests/ui/process/multi-panic.rs
+++ b/tests/ui/process/multi-panic.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ needs-unwind
 
diff --git a/tests/ui/process/no-stdio.rs b/tests/ui/process/no-stdio.rs
index 86e177617e59c..05b1e52b799e9 100644
--- a/tests/ui/process/no-stdio.rs
+++ b/tests/ui/process/no-stdio.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 //@ ignore-android
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 #![feature(rustc_private)]
diff --git a/tests/ui/process/println-with-broken-pipe.rs b/tests/ui/process/println-with-broken-pipe.rs
index bfbea280f0bce..1df8c765cbdec 100644
--- a/tests/ui/process/println-with-broken-pipe.rs
+++ b/tests/ui/process/println-with-broken-pipe.rs
@@ -1,7 +1,7 @@
 //@ run-pass
 //@ check-run-results
 //@ ignore-windows
-//@ ignore-emscripten
+//@ ignore-wasm32
 //@ ignore-fuchsia
 //@ ignore-horizon
 //@ ignore-android
diff --git a/tests/ui/process/process-envs.rs b/tests/ui/process/process-envs.rs
index 6f8a591b7d46c..15285960d16ae 100644
--- a/tests/ui/process/process-envs.rs
+++ b/tests/ui/process/process-envs.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-vxworks no 'env'
 //@ ignore-fuchsia no 'env'
diff --git a/tests/ui/process/process-exit.rs b/tests/ui/process/process-exit.rs
index 7cf1f2bccc396..a75a7306cbcd0 100644
--- a/tests/ui/process/process-exit.rs
+++ b/tests/ui/process/process-exit.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 #![allow(unused_imports)]
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::env;
diff --git a/tests/ui/process/process-panic-after-fork.rs b/tests/ui/process/process-panic-after-fork.rs
index 0115dbd27ef66..bae121576bda0 100644
--- a/tests/ui/process/process-panic-after-fork.rs
+++ b/tests/ui/process/process-panic-after-fork.rs
@@ -1,9 +1,7 @@
 //@ run-pass
 //@ no-prefer-dynamic
-//@ ignore-wasm32-bare no libc
 //@ ignore-windows
-//@ ignore-sgx no libc
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-fuchsia no fork
 
diff --git a/tests/ui/process/process-remove-from-env.rs b/tests/ui/process/process-remove-from-env.rs
index abacccf5a8a44..21fff4fd45d1d 100644
--- a/tests/ui/process/process-remove-from-env.rs
+++ b/tests/ui/process/process-remove-from-env.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-vxworks no 'env'
 //@ ignore-fuchsia no 'env'
diff --git a/tests/ui/process/process-sigpipe.rs b/tests/ui/process/process-sigpipe.rs
index 64d0bbc2b41f7..11f363d625f0c 100644
--- a/tests/ui/process/process-sigpipe.rs
+++ b/tests/ui/process/process-sigpipe.rs
@@ -13,7 +13,6 @@
 // (instead of running forever), and that it does not print an error
 // message about a broken pipe.
 
-//@ ignore-emscripten no threads support
 //@ ignore-vxworks no 'sh'
 //@ ignore-fuchsia no 'sh'
 
diff --git a/tests/ui/process/process-spawn-nonexistent.rs b/tests/ui/process/process-spawn-nonexistent.rs
index 2f45dace2f9c7..1cd328662994d 100644
--- a/tests/ui/process/process-spawn-nonexistent.rs
+++ b/tests/ui/process/process-spawn-nonexistent.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-fuchsia ErrorKind not translated
 
diff --git a/tests/ui/process/process-spawn-with-unicode-params.rs b/tests/ui/process/process-spawn-with-unicode-params.rs
index 26b3899df9684..4d2ba49eeac71 100644
--- a/tests/ui/process/process-spawn-with-unicode-params.rs
+++ b/tests/ui/process/process-spawn-with-unicode-params.rs
@@ -7,7 +7,7 @@
 // non-ASCII characters.  The child process ensures all the strings are
 // intact.
 
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-fuchsia Filesystem manipulation privileged
 
diff --git a/tests/ui/process/process-status-inherits-stdin.rs b/tests/ui/process/process-status-inherits-stdin.rs
index 210968a6ce54d..39eef34c5f862 100644
--- a/tests/ui/process/process-status-inherits-stdin.rs
+++ b/tests/ui/process/process-status-inherits-stdin.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::env;
diff --git a/tests/ui/process/signal-exit-status.rs b/tests/ui/process/signal-exit-status.rs
index 5efef8a612177..a6acea476367a 100644
--- a/tests/ui/process/signal-exit-status.rs
+++ b/tests/ui/process/signal-exit-status.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-windows
 //@ ignore-fuchsia code returned as ZX_TASK_RETCODE_EXCEPTION_KILL, FIXME (#58590)
diff --git a/tests/ui/process/sigpipe-should-be-ignored.rs b/tests/ui/process/sigpipe-should-be-ignored.rs
index cd6bda2764688..44785bee7f80c 100644
--- a/tests/ui/process/sigpipe-should-be-ignored.rs
+++ b/tests/ui/process/sigpipe-should-be-ignored.rs
@@ -4,7 +4,7 @@
 // Be sure that when a SIGPIPE would have been received that the entire process
 // doesn't die in a ball of fire, but rather it's gracefully handled.
 
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::env;
diff --git a/tests/ui/process/tls-exit-status.rs b/tests/ui/process/tls-exit-status.rs
index 5a81c7708feaa..cddcf369da0bd 100644
--- a/tests/ui/process/tls-exit-status.rs
+++ b/tests/ui/process/tls-exit-status.rs
@@ -1,7 +1,7 @@
 //@ run-fail
 //@ error-pattern:nonzero
 //@ exec-env:RUST_NEWRT=1
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 
 use std::env;
 
diff --git a/tests/ui/process/try-wait.rs b/tests/ui/process/try-wait.rs
index 948ce63c76c2c..b6d026d802ff6 100644
--- a/tests/ui/process/try-wait.rs
+++ b/tests/ui/process/try-wait.rs
@@ -1,9 +1,8 @@
 //@ run-pass
 
 #![allow(stable_features)]
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
-
 #![feature(process_try_wait)]
 
 use std::env;
diff --git a/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs b/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs
index 1edd51dd23c6d..cc2d9bad02983 100644
--- a/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs
+++ b/tests/ui/rfcs/rfc-1014-stdout-existential-crisis/rfc-1014.rs
@@ -1,6 +1,5 @@
 //@ run-pass
 #![allow(dead_code)]
-//@ ignore-wasm32-bare no libc
 //@ ignore-sgx no libc
 
 #![feature(rustc_private)]
diff --git a/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs b/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs
index e31516a6480b7..e29f025bcff78 100644
--- a/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs
+++ b/tests/ui/rfcs/rfc-1717-dllimport/1717-dllimport/library-override.rs
@@ -1,5 +1,4 @@
 //@ run-pass
-//@ ignore-wasm32-bare no libc to test ffi with
 //@ compile-flags: -lstatic=wronglibrary:rust_test_helpers
 
 #[link(name = "wronglibrary", kind = "dylib")]
diff --git a/tests/ui/runtime/atomic-print.rs b/tests/ui/runtime/atomic-print.rs
index aa3183885bfce..7352058973637 100644
--- a/tests/ui/runtime/atomic-print.rs
+++ b/tests/ui/runtime/atomic-print.rs
@@ -2,7 +2,7 @@
 
 #![allow(unused_must_use)]
 #![allow(deprecated)]
-//@ ignore-emscripten no threads support
+//@ ignore-wasm32 no processes or threads
 //@ ignore-sgx no processes
 
 use std::{env, fmt, process, sync, thread};
diff --git a/tests/ui/runtime/backtrace-debuginfo.rs b/tests/ui/runtime/backtrace-debuginfo.rs
index 49f153fabdac1..9c4b15e64f51f 100644
--- a/tests/ui/runtime/backtrace-debuginfo.rs
+++ b/tests/ui/runtime/backtrace-debuginfo.rs
@@ -9,7 +9,7 @@
 //@ compile-flags:-g -Copt-level=0 -Cllvm-args=-enable-tail-merge=0
 //@ compile-flags:-Cforce-frame-pointers=yes
 //@ compile-flags:-Cstrip=none
-//@ ignore-emscripten spawning processes is not supported
+//@ ignore-wasm32 spawning processes is not supported
 //@ ignore-sgx no processes
 //@ ignore-fuchsia Backtrace not symbolized, trace different line alignment
 
diff --git a/tests/ui/runtime/out-of-stack.rs b/tests/ui/runtime/out-of-stack.rs
index e8e0e847a8eb2..ab2b50b293ce5 100644
--- a/tests/ui/runtime/out-of-stack.rs
+++ b/tests/ui/runtime/out-of-stack.rs
@@ -3,7 +3,7 @@
 #![allow(unused_must_use)]
 #![allow(unconditional_recursion)]
 //@ ignore-android: FIXME (#20004)
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-fuchsia must translate zircon signal to SIGABRT, FIXME (#58590)
 //@ ignore-nto no stack overflow handler used (no alternate stack available)
diff --git a/tests/ui/runtime/running-with-no-runtime.rs b/tests/ui/runtime/running-with-no-runtime.rs
index 8430e826dc37c..695025b385906 100644
--- a/tests/ui/runtime/running-with-no-runtime.rs
+++ b/tests/ui/runtime/running-with-no-runtime.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten spawning processes is not supported
+//@ ignore-wasm32 spawning processes is not supported
 //@ ignore-sgx no processes
 
 #![feature(start)]
diff --git a/tests/ui/runtime/signal-alternate-stack-cleanup.rs b/tests/ui/runtime/signal-alternate-stack-cleanup.rs
index 3b7bb0d505d3b..f2af86be0a5f5 100644
--- a/tests/ui/runtime/signal-alternate-stack-cleanup.rs
+++ b/tests/ui/runtime/signal-alternate-stack-cleanup.rs
@@ -3,7 +3,7 @@
 // main thread exit while still being in use by signal handlers. This test
 // triggers this situation by sending signal from atexit handler.
 //
-//@ ignore-wasm32-bare no libc
+//@ ignore-wasm32 no signals
 //@ ignore-windows
 //@ ignore-sgx no libc
 //@ ignore-vxworks no SIGWINCH in user space
diff --git a/tests/ui/simd/target-feature-mixup.rs b/tests/ui/simd/target-feature-mixup.rs
index 7148fc509de09..034cb867c95fc 100644
--- a/tests/ui/simd/target-feature-mixup.rs
+++ b/tests/ui/simd/target-feature-mixup.rs
@@ -3,7 +3,7 @@
 #![allow(stable_features)]
 #![allow(overflowing_literals)]
 
-//@ ignore-emscripten
+//@ ignore-wasm32 no subprocess support
 //@ ignore-sgx no processes
 //@ ignore-fuchsia must translate zircon signal to SIGILL, FIXME (#58590)
 
diff --git a/tests/ui/std-backtrace.rs b/tests/ui/std-backtrace.rs
index 141847d958dc4..b4806457877d5 100644
--- a/tests/ui/std-backtrace.rs
+++ b/tests/ui/std-backtrace.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 //@ ignore-android FIXME #17520
-//@ ignore-emscripten spawning processes is not supported
+//@ ignore-wasm32 spawning processes is not supported
 //@ ignore-openbsd no support for libbacktrace without filename
 //@ ignore-sgx no processes
 //@ ignore-msvc see #62897 and `backtrace-debuginfo.rs` test
diff --git a/tests/ui/stdio-is-blocking.rs b/tests/ui/stdio-is-blocking.rs
index 438fb06c426e3..dda100951dded 100644
--- a/tests/ui/stdio-is-blocking.rs
+++ b/tests/ui/stdio-is-blocking.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 
 use std::env;
diff --git a/tests/ui/structs-enums/rec-align-u64.rs b/tests/ui/structs-enums/rec-align-u64.rs
index e4b02fa0c58bf..72601bb16fffa 100644
--- a/tests/ui/structs-enums/rec-align-u64.rs
+++ b/tests/ui/structs-enums/rec-align-u64.rs
@@ -1,7 +1,6 @@
 //@ run-pass
 #![allow(dead_code)]
 #![allow(unused_unsafe)]
-//@ ignore-wasm32-bare seems unimportant to test
 
 // Issue #2303
 
@@ -78,6 +77,14 @@ mod m {
     }
 }
 
+#[cfg(target_family = "wasm")]
+mod m {
+    pub mod m {
+        pub fn align() -> usize { 8 }
+        pub fn size() -> usize { 16 }
+    }
+}
+
 pub fn main() {
     unsafe {
         let x = Outer {c8: 22, t: Inner {c64: 44}};
diff --git a/tests/ui/test-attrs/test-passed-wasm.rs b/tests/ui/test-attrs/test-passed-wasm.rs
deleted file mode 100644
index 614678e2353c5..0000000000000
--- a/tests/ui/test-attrs/test-passed-wasm.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-//@ no-prefer-dynamic
-//@ compile-flags: --test
-//@ run-flags: --test-threads=1
-//@ run-pass
-//@ check-run-results
-//@ only-wasm32
-
-// Tests the output of the test harness with only passed tests.
-
-#![cfg(test)]
-
-#[test]
-fn it_works() {
-    assert_eq!(1 + 1, 2);
-}
-
-#[test]
-fn it_works_too() {
-    assert_eq!(1 * 0, 0);
-}
diff --git a/tests/ui/test-attrs/test-passed-wasm.run.stdout b/tests/ui/test-attrs/test-passed-wasm.run.stdout
deleted file mode 100644
index c3005a77983e3..0000000000000
--- a/tests/ui/test-attrs/test-passed-wasm.run.stdout
+++ /dev/null
@@ -1,7 +0,0 @@
-
-running 2 tests
-test it_works ... ok
-test it_works_too ... ok
-
-test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
-
diff --git a/tests/ui/test-attrs/test-passed.rs b/tests/ui/test-attrs/test-passed.rs
index afd715322ac4b..f43f66a6edf5e 100644
--- a/tests/ui/test-attrs/test-passed.rs
+++ b/tests/ui/test-attrs/test-passed.rs
@@ -4,7 +4,6 @@
 //@ run-pass
 //@ check-run-results
 //@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
-//@ ignore-wasm32 no support for `Instant`
 
 // Tests the output of the test harness with only passed tests.
 
diff --git a/tests/ui/threads-sendsync/sync-send-in-std.rs b/tests/ui/threads-sendsync/sync-send-in-std.rs
index 375e884877ab0..3a97cbb0c6843 100644
--- a/tests/ui/threads-sendsync/sync-send-in-std.rs
+++ b/tests/ui/threads-sendsync/sync-send-in-std.rs
@@ -1,6 +1,6 @@
 //@ run-pass
 
-//@ ignore-wasm32-bare networking not available
+//@ ignore-wasm32 networking not available
 //@ ignore-sgx ToSocketAddrs cannot be used for DNS Resolution
 //@ ignore-fuchsia Req. test-harness networking privileges
 
diff --git a/tests/ui/wait-forked-but-failed-child.rs b/tests/ui/wait-forked-but-failed-child.rs
index a5a6cca0637b7..3d052cc193c55 100644
--- a/tests/ui/wait-forked-but-failed-child.rs
+++ b/tests/ui/wait-forked-but-failed-child.rs
@@ -1,5 +1,5 @@
 //@ run-pass
-//@ ignore-emscripten no processes
+//@ ignore-wasm32 no processes
 //@ ignore-sgx no processes
 //@ ignore-vxworks no 'ps'
 //@ ignore-fuchsia no 'ps'