about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2021-12-10 00:15:33 +0000
committerAmanieu d'Antras <amanieu@gmail.com>2021-12-12 11:20:03 +0000
commit44a3a66ee890545a2c1ac78ff8f107fe5e7204f9 (patch)
tree8821e53e6c339fca0b3fc58e34fc702a0866d087 /src/test
parentb3a55371a72f665f5d9476d07980e76d3e755fe6 (diff)
Stabilize asm! and global_asm!
They are also removed from the prelude as per the decision in
https://github.com/rust-lang/rust/issues/87228.

stdarch and compiler-builtins are updated to work with the new, stable
asm! and global_asm! macros.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/assembly/asm/global_asm.rs4
-rw-r--r--src/test/assembly/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs14
-rw-r--r--src/test/codegen/asm-clobber_abi.rs3
-rw-r--r--src/test/codegen/asm-clobbers.rs3
-rw-r--r--src/test/codegen/asm-may_unwind.rs4
-rw-r--r--src/test/codegen/asm-multiple-options.rs3
-rw-r--r--src/test/codegen/asm-options.rs3
-rw-r--r--src/test/codegen/asm-target-clobbers.rs3
-rw-r--r--src/test/codegen/global_asm.rs9
-rw-r--r--src/test/codegen/global_asm_include.rs3
-rw-r--r--src/test/codegen/global_asm_x2.rs17
-rw-r--r--src/test/codegen/naked-noinline.rs23
-rw-r--r--src/test/incremental/issue-72386.rs6
-rw-r--r--src/test/pretty/asm.pp4
-rw-r--r--src/test/pretty/asm.rs10
-rw-r--r--src/test/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/src/main.rs67
-rw-r--r--src/test/rustdoc/asm-foreign.rs2
-rw-r--r--src/test/rustdoc/asm-foreign2.rs2
-rw-r--r--src/test/ui/asm/aarch64/bad-options.rs2
-rw-r--r--src/test/ui/asm/aarch64/bad-reg.rs4
-rw-r--r--src/test/ui/asm/aarch64/const.rs4
-rw-r--r--src/test/ui/asm/aarch64/duplicate-options.fixed2
-rw-r--r--src/test/ui/asm/aarch64/duplicate-options.rs6
-rw-r--r--src/test/ui/asm/aarch64/interpolated-idents.rs2
-rw-r--r--src/test/ui/asm/aarch64/may_unwind.rs3
-rw-r--r--src/test/ui/asm/aarch64/parse-error.rs4
-rw-r--r--src/test/ui/asm/aarch64/srcloc.rs3
-rw-r--r--src/test/ui/asm/aarch64/sym.rs4
-rw-r--r--src/test/ui/asm/aarch64/type-check-2.rs4
-rw-r--r--src/test/ui/asm/aarch64/type-check-3.rs3
-rw-r--r--src/test/ui/asm/issue-72570.rs2
-rw-r--r--src/test/ui/asm/issue-87802.rs2
-rw-r--r--src/test/ui/asm/issue-89305.rs3
-rw-r--r--src/test/ui/asm/issue-89305.stderr4
-rw-r--r--src/test/ui/asm/may_unwind.rs4
-rw-r--r--src/test/ui/asm/naked-functions-ffi.rs7
-rw-r--r--src/test/ui/asm/naked-functions-ffi.stderr4
-rw-r--r--src/test/ui/asm/naked-functions-unused.rs5
-rw-r--r--src/test/ui/asm/naked-functions-unused.x86_64.stderr20
-rw-r--r--src/test/ui/asm/naked-functions.rs3
-rw-r--r--src/test/ui/asm/naked-functions.stderr66
-rw-r--r--src/test/ui/asm/naked-invalid-attr.rs3
-rw-r--r--src/test/ui/asm/naked-invalid-attr.stderr10
-rw-r--r--src/test/ui/asm/named-asm-labels.rs4
-rw-r--r--src/test/ui/asm/named-asm-labels.stderr110
-rw-r--r--src/test/ui/asm/noreturn.rs4
-rw-r--r--src/test/ui/asm/type-check-1.rs4
-rw-r--r--src/test/ui/asm/type-check-1.stderr26
-rw-r--r--src/test/ui/asm/type-check-4.rs2
-rw-r--r--src/test/ui/asm/x86_64/bad-clobber-abi.rs4
-rw-r--r--src/test/ui/asm/x86_64/bad-options.rs2
-rw-r--r--src/test/ui/asm/x86_64/bad-reg.rs4
-rw-r--r--src/test/ui/asm/x86_64/bad-reg.stderr46
-rw-r--r--src/test/ui/asm/x86_64/const.rs4
-rw-r--r--src/test/ui/asm/x86_64/duplicate-options.fixed6
-rw-r--r--src/test/ui/asm/x86_64/duplicate-options.rs6
-rw-r--r--src/test/ui/asm/x86_64/interpolated-idents.rs2
-rw-r--r--src/test/ui/asm/x86_64/issue-82869.rs3
-rw-r--r--src/test/ui/asm/x86_64/issue-82869.stderr6
-rw-r--r--src/test/ui/asm/x86_64/issue-89875.rs4
-rw-r--r--src/test/ui/asm/x86_64/may_unwind.rs3
-rw-r--r--src/test/ui/asm/x86_64/multiple-clobber-abi.rs4
-rw-r--r--src/test/ui/asm/x86_64/parse-error.rs4
-rw-r--r--src/test/ui/asm/x86_64/parse-error.stderr132
-rw-r--r--src/test/ui/asm/x86_64/srcloc.rs3
-rw-r--r--src/test/ui/asm/x86_64/srcloc.stderr48
-rw-r--r--src/test/ui/asm/x86_64/sym.rs4
-rw-r--r--src/test/ui/asm/x86_64/target-feature-attr.rs4
-rw-r--r--src/test/ui/asm/x86_64/target-feature-attr.stderr8
-rw-r--r--src/test/ui/asm/x86_64/type-check-2.rs4
-rw-r--r--src/test/ui/asm/x86_64/type-check-2.stderr28
-rw-r--r--src/test/ui/asm/x86_64/type-check-3.rs4
-rw-r--r--src/test/ui/asm/x86_64/type-check-3.stderr32
-rw-r--r--src/test/ui/consts/inline_asm.rs2
-rw-r--r--src/test/ui/consts/miri_unleashed/inline_asm.rs4
-rw-r--r--src/test/ui/consts/miri_unleashed/inline_asm.stderr8
-rw-r--r--src/test/ui/empty_global_asm.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm.stderr13
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm2.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm2.stderr13
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm_const.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm_sym.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-asm_unwind.rs2
-rw-r--r--src/test/ui/feature-gates/feature-gate-global_asm.rs5
-rw-r--r--src/test/ui/feature-gates/feature-gate-global_asm.stderr12
-rw-r--r--src/test/ui/feature-gates/feature-gate-naked_functions.rs3
-rw-r--r--src/test/ui/feature-gates/feature-gate-naked_functions.stderr4
-rw-r--r--src/test/ui/liveness/liveness-asm.rs3
-rw-r--r--src/test/ui/liveness/liveness-asm.stderr6
-rw-r--r--src/test/ui/macros/global-asm.rs4
-rw-r--r--src/test/ui/macros/macro-expanded-include/foo/mod.rs2
-rw-r--r--src/test/ui/macros/macro-expanded-include/test.rs6
-rw-r--r--src/test/ui/macros/macros-nonfatal-errors.rs2
-rw-r--r--src/test/ui/macros/macros-nonfatal-errors.stderr15
-rw-r--r--src/test/ui/rfc-2091-track-caller/error-with-naked.rs4
-rw-r--r--src/test/ui/rfc-2091-track-caller/error-with-naked.stderr4
-rw-r--r--src/test/ui/simple_global_asm.rs3
-rw-r--r--src/test/ui/unsafe/inline_asm.mir.stderr4
-rw-r--r--src/test/ui/unsafe/inline_asm.rs3
-rw-r--r--src/test/ui/unsafe/inline_asm.thir.stderr4
101 files changed, 505 insertions, 500 deletions
diff --git a/src/test/assembly/asm/global_asm.rs b/src/test/assembly/asm/global_asm.rs
index 7e48c386abc..0358bc6d27c 100644
--- a/src/test/assembly/asm/global_asm.rs
+++ b/src/test/assembly/asm/global_asm.rs
@@ -2,9 +2,11 @@
 // assembly-output: emit-asm
 // compile-flags: -C llvm-args=--x86-asm-syntax=intel
 
-#![feature(global_asm, asm_const)]
+#![feature(asm_const)]
 #![crate_type = "rlib"]
 
+use std::arch::global_asm;
+
 // CHECK: mov eax, eax
 global_asm!("mov eax, eax");
 // CHECK: mov ebx, 5
diff --git a/src/test/assembly/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs b/src/test/assembly/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs
index 7e440169edb..720850e91e8 100644
--- a/src/test/assembly/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs
+++ b/src/test/assembly/x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs
@@ -4,11 +4,11 @@
 // compile-flags: --crate-type staticlib
 // only-x86_64-fortanix-unknown-sgx
 
-#![feature(asm)]
+use std::arch::asm;
 
 #[no_mangle]
-pub extern fn get(ptr: *const u64) -> u64 {
-    let value : u64;
+pub extern "C" fn get(ptr: *const u64) -> u64 {
+    let value: u64;
     unsafe {
         asm!(".start_inline_asm:",
             "mov {}, [{}]",
@@ -26,11 +26,13 @@ pub extern fn get(ptr: *const u64) -> u64 {
 // CHECK-NEXT: .end_inline_asm
 
 #[no_mangle]
-pub extern fn myret() {
+pub extern "C" fn myret() {
     unsafe {
-        asm!(".start_myret_inline_asm:
+        asm!(
+            ".start_myret_inline_asm:
             ret
-            .end_myret_inline_asm:");
+            .end_myret_inline_asm:"
+        );
     }
 }
 
diff --git a/src/test/codegen/asm-clobber_abi.rs b/src/test/codegen/asm-clobber_abi.rs
index d589a7c6688..69e35270266 100644
--- a/src/test/codegen/asm-clobber_abi.rs
+++ b/src/test/codegen/asm-clobber_abi.rs
@@ -2,7 +2,8 @@
 // only-x86_64
 
 #![crate_type = "rlib"]
-#![feature(asm)]
+
+use std::arch::asm;
 
 // CHECK-LABEL: @clobber_sysv64
 // CHECK: ={ax},={cx},={dx},={si},={di},={r8},={r9},={r10},={r11},={xmm0},={xmm1},={xmm2},={xmm3},={xmm4},={xmm5},={xmm6},={xmm7},={xmm8},={xmm9},={xmm10},={xmm11},={xmm12},={xmm13},={xmm14},={xmm15},~{xmm16},~{xmm17},~{xmm18},~{xmm19},~{xmm20},~{xmm21},~{xmm22},~{xmm23},~{xmm24},~{xmm25},~{xmm26},~{xmm27},~{xmm28},~{xmm29},~{xmm30},~{xmm31},~{k1},~{k2},~{k3},~{k4},~{k5},~{k6},~{k7},~{st},~{st(1)},~{st(2)},~{st(3)},~{st(4)},~{st(5)},~{st(6)},~{st(7)},~{dirflag},~{fpsr},~{flags},~{memory}
diff --git a/src/test/codegen/asm-clobbers.rs b/src/test/codegen/asm-clobbers.rs
index 9d7c8b5f155..2ef10a2837d 100644
--- a/src/test/codegen/asm-clobbers.rs
+++ b/src/test/codegen/asm-clobbers.rs
@@ -2,7 +2,8 @@
 // only-x86_64
 
 #![crate_type = "rlib"]
-#![feature(asm)]
+
+use std::arch::asm;
 
 // CHECK-LABEL: @x87_clobber
 // CHECK: ~{st},~{st(1)},~{st(2)},~{st(3)},~{st(4)},~{st(5)},~{st(6)},~{st(7)}
diff --git a/src/test/codegen/asm-may_unwind.rs b/src/test/codegen/asm-may_unwind.rs
index 85cae8b2b1c..3b34d79c3a9 100644
--- a/src/test/codegen/asm-may_unwind.rs
+++ b/src/test/codegen/asm-may_unwind.rs
@@ -3,7 +3,9 @@
 // only-x86_64
 
 #![crate_type = "rlib"]
-#![feature(asm, asm_unwind)]
+#![feature(asm_unwind)]
+
+use std::arch::asm;
 
 #[no_mangle]
 pub extern "C" fn panicky() {}
diff --git a/src/test/codegen/asm-multiple-options.rs b/src/test/codegen/asm-multiple-options.rs
index baf9f3e9bd1..1ae37d627d6 100644
--- a/src/test/codegen/asm-multiple-options.rs
+++ b/src/test/codegen/asm-multiple-options.rs
@@ -2,7 +2,8 @@
 // only-x86_64
 
 #![crate_type = "rlib"]
-#![feature(asm)]
+
+use std::arch::asm;
 
 // CHECK-LABEL: @pure
 // CHECK-NOT: asm
diff --git a/src/test/codegen/asm-options.rs b/src/test/codegen/asm-options.rs
index 28df0f9b852..963b60cfe35 100644
--- a/src/test/codegen/asm-options.rs
+++ b/src/test/codegen/asm-options.rs
@@ -2,7 +2,8 @@
 // only-x86_64
 
 #![crate_type = "rlib"]
-#![feature(asm)]
+
+use std::arch::asm;
 
 // CHECK-LABEL: @pure
 // CHECK-NOT: asm
diff --git a/src/test/codegen/asm-target-clobbers.rs b/src/test/codegen/asm-target-clobbers.rs
index f637cdcd234..8845cfbe767 100644
--- a/src/test/codegen/asm-target-clobbers.rs
+++ b/src/test/codegen/asm-target-clobbers.rs
@@ -3,7 +3,8 @@
 // [avx512]compile-flags: -C target-feature=+avx512f
 
 #![crate_type = "rlib"]
-#![feature(asm)]
+
+use std::arch::asm;
 
 // CHECK-LABEL: @avx512_clobber
 // base: call void asm sideeffect inteldialect "", "~{xmm31}"()
diff --git a/src/test/codegen/global_asm.rs b/src/test/codegen/global_asm.rs
index 57d8aeb165b..fab84868fdf 100644
--- a/src/test/codegen/global_asm.rs
+++ b/src/test/codegen/global_asm.rs
@@ -39,18 +39,21 @@
 // ignore-emscripten
 // compile-flags: -C no-prepopulate-passes
 
-#![feature(global_asm)]
 #![crate_type = "lib"]
 
+use std::arch::global_asm;
+
 // CHECK-LABEL: foo
 // CHECK: module asm
 // this regex will capture the correct unconditional branch inst.
 // CHECK: module asm "{{[[:space:]]+}}jmp baz"
-global_asm!(r#"
+global_asm!(
+    r#"
     .global foo
 foo:
     jmp baz
-"#);
+"#
+);
 
 extern "C" {
     fn foo();
diff --git a/src/test/codegen/global_asm_include.rs b/src/test/codegen/global_asm_include.rs
index 44402619c43..02ee916458f 100644
--- a/src/test/codegen/global_asm_include.rs
+++ b/src/test/codegen/global_asm_include.rs
@@ -39,9 +39,10 @@
 // ignore-emscripten
 // compile-flags: -C no-prepopulate-passes
 
-#![feature(global_asm)]
 #![crate_type = "lib"]
 
+use std::arch::global_asm;
+
 // CHECK-LABEL: foo
 // CHECK: module asm
 // CHECK: module asm "{{[[:space:]]+}}jmp baz"
diff --git a/src/test/codegen/global_asm_x2.rs b/src/test/codegen/global_asm_x2.rs
index d632d0dde00..bdcf0ea843c 100644
--- a/src/test/codegen/global_asm_x2.rs
+++ b/src/test/codegen/global_asm_x2.rs
@@ -39,9 +39,10 @@
 // ignore-emscripten
 // compile-flags: -C no-prepopulate-passes
 
-#![feature(global_asm)]
 #![crate_type = "lib"]
-#[no_std]
+#![no_std]
+
+use core::arch::global_asm;
 
 // CHECK-LABEL: foo
 // CHECK: module asm
@@ -49,11 +50,13 @@
 // any other global_asm will be appended to this first block, so:
 // CHECK-LABEL: bar
 // CHECK: module asm "{{[[:space:]]+}}jmp quux"
-global_asm!(r#"
+global_asm!(
+    r#"
     .global foo
 foo:
     jmp baz
-"#);
+"#
+);
 
 extern "C" {
     fn foo();
@@ -64,11 +67,13 @@ extern "C" {
 pub unsafe extern "C" fn baz() {}
 
 // no checks here; this has been appended to the first occurrence
-global_asm!(r#"
+global_asm!(
+    r#"
     .global bar
 bar:
     jmp quux
-"#);
+"#
+);
 
 extern "C" {
     fn bar();
diff --git a/src/test/codegen/naked-noinline.rs b/src/test/codegen/naked-noinline.rs
index d576a53826c..e34ccf5c5fe 100644
--- a/src/test/codegen/naked-noinline.rs
+++ b/src/test/codegen/naked-noinline.rs
@@ -3,28 +3,29 @@
 // needs-asm-support
 // ignore-wasm32
 #![crate_type = "lib"]
-#![feature(asm)]
 #![feature(naked_functions)]
 
+use std::arch::asm;
+
 #[inline(always)]
 #[naked]
 #[no_mangle]
 pub unsafe extern "C" fn f() {
-// Check that f has naked and noinline attributes.
-//
-// CHECK:       define void @f() unnamed_addr [[ATTR:#[0-9]+]]
-// CHECK-NEXT:  start:
-// CHECK-NEXT:    call void asm
+    // Check that f has naked and noinline attributes.
+    //
+    // CHECK:       define void @f() unnamed_addr [[ATTR:#[0-9]+]]
+    // CHECK-NEXT:  start:
+    // CHECK-NEXT:    call void asm
     asm!("", options(noreturn));
 }
 
 #[no_mangle]
 pub unsafe fn g() {
-// Check that call to f is not inlined.
-//
-// CHECK-LABEL: define void @g()
-// CHECK-NEXT:  start:
-// CHECK-NEXT:    call void @f()
+    // Check that call to f is not inlined.
+    //
+    // CHECK-LABEL: define void @g()
+    // CHECK-NEXT:  start:
+    // CHECK-NEXT:    call void @f()
     f();
 }
 
diff --git a/src/test/incremental/issue-72386.rs b/src/test/incremental/issue-72386.rs
index 3dc7f502a59..be624faad04 100644
--- a/src/test/incremental/issue-72386.rs
+++ b/src/test/incremental/issue-72386.rs
@@ -4,13 +4,11 @@
 // Checks that we don't ICE when switching to an invalid register
 // and back again
 
-#![feature(asm)]
+use std::arch::asm;
 
 #[cfg(any(rpass1, rpass3))]
 fn main() {
-    unsafe {
-        asm!("nop")
-    }
+    unsafe { asm!("nop") }
 }
 
 #[cfg(cfail1)]
diff --git a/src/test/pretty/asm.pp b/src/test/pretty/asm.pp
index a2065039692..5eade2933b8 100644
--- a/src/test/pretty/asm.pp
+++ b/src/test/pretty/asm.pp
@@ -1,15 +1,15 @@
 #![feature(prelude_import)]
 #![no_std]
-#![feature(asm)]
 #[prelude_import]
 use ::std::prelude::rust_2015::*;
 #[macro_use]
 extern crate std;
-
 // pretty-mode:expanded
 // pp-exact:asm.pp
 // only-x86_64
 
+use std::arch::asm;
+
 pub fn main() {
     let a: i32;
     let mut b = 4i32;
diff --git a/src/test/pretty/asm.rs b/src/test/pretty/asm.rs
index 1156ab769a0..1a3f972c8f2 100644
--- a/src/test/pretty/asm.rs
+++ b/src/test/pretty/asm.rs
@@ -1,9 +1,9 @@
-#![feature(asm)]
-
 // pretty-mode:expanded
 // pp-exact:asm.pp
 // only-x86_64
 
+use std::arch::asm;
+
 pub fn main() {
     let a: i32;
     let mut b = 4i32;
@@ -20,8 +20,10 @@ pub fn main() {
         asm!("inst1 {}, 42", "inst2 {}, 24", in(reg) a, out(reg) b);
         asm!("inst2 {1}, 24", "inst1 {0}, 42", in(reg) a, out(reg) b);
         asm!("inst1 {}, 42", "inst2 {name}, 24", in(reg) a, name = out(reg) b);
-        asm!("inst1
-inst2");
+        asm!(
+            "inst1
+inst2"
+        );
         asm!("inst1\ninst2");
         asm!("inst1\n\tinst2");
         asm!("inst1\ninst2", "inst3\ninst4");
diff --git a/src/test/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/src/main.rs b/src/test/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/src/main.rs
index 791dec2ed69..cde38aacf7f 100644
--- a/src/test/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/src/main.rs
+++ b/src/test/run-make/x86_64-fortanix-unknown-sgx-lvi/enclave/src/main.rs
@@ -1,6 +1,5 @@
-#![feature(global_asm)]
-
-global_asm!( r#"
+std::arch::global_asm!(
+    r#"
     .text
     .global rust_plus_one_global_asm
     .type rust_plus_one_global_asm, @function
@@ -8,41 +7,43 @@ rust_plus_one_global_asm:
     movl (%rdi), %eax
     inc %eax
     retq
-"#, options(att_syntax));
+"#,
+    options(att_syntax)
+);
 
-extern {
-    fn cc_plus_one_c(arg : &u32) -> u32;
-    fn cc_plus_one_c_asm(arg : &u32) -> u32;
-    fn cc_plus_one_cxx(arg : &u32) -> u32;
-    fn cc_plus_one_cxx_asm(arg : &u32) -> u32;
-    fn cc_plus_one_asm(arg : &u32) -> u32;
-    fn cmake_plus_one_c(arg : &u32) -> u32;
-    fn cmake_plus_one_c_asm(arg : &u32) -> u32;
-    fn cmake_plus_one_cxx(arg : &u32) -> u32;
-    fn cmake_plus_one_cxx_asm(arg : &u32) -> u32;
-    fn cmake_plus_one_c_global_asm(arg : &u32) -> u32;
-    fn cmake_plus_one_cxx_global_asm(arg : &u32) -> u32;
-    fn cmake_plus_one_asm(arg : &u32) -> u32;
-    fn rust_plus_one_global_asm(arg : &u32) -> u32;
+extern "C" {
+    fn cc_plus_one_c(arg: &u32) -> u32;
+    fn cc_plus_one_c_asm(arg: &u32) -> u32;
+    fn cc_plus_one_cxx(arg: &u32) -> u32;
+    fn cc_plus_one_cxx_asm(arg: &u32) -> u32;
+    fn cc_plus_one_asm(arg: &u32) -> u32;
+    fn cmake_plus_one_c(arg: &u32) -> u32;
+    fn cmake_plus_one_c_asm(arg: &u32) -> u32;
+    fn cmake_plus_one_cxx(arg: &u32) -> u32;
+    fn cmake_plus_one_cxx_asm(arg: &u32) -> u32;
+    fn cmake_plus_one_c_global_asm(arg: &u32) -> u32;
+    fn cmake_plus_one_cxx_global_asm(arg: &u32) -> u32;
+    fn cmake_plus_one_asm(arg: &u32) -> u32;
+    fn rust_plus_one_global_asm(arg: &u32) -> u32;
 }
 
 fn main() {
-    let value : u32 = 41;
+    let value: u32 = 41;
     let question = "Answer to the Ultimate Question of Life, the Universe, and Everything:";
 
-    unsafe{
-        println!("{}: {}!", question,rust_plus_one_global_asm(&value));
-        println!("{}: {}!", question,cc_plus_one_c(&value));
-        println!("{}: {}!", question,cc_plus_one_c_asm(&value));
-        println!("{}: {}!", question,cc_plus_one_cxx(&value));
-        println!("{}: {}!", question,cc_plus_one_cxx_asm(&value));
-        println!("{}: {}!", question,cc_plus_one_asm(&value));
-        println!("{}: {}!", question,cmake_plus_one_c(&value));
-        println!("{}: {}!", question,cmake_plus_one_c_asm(&value));
-        println!("{}: {}!", question,cmake_plus_one_cxx(&value));
-        println!("{}: {}!", question,cmake_plus_one_cxx_asm(&value));
-        println!("{}: {}!", question,cmake_plus_one_c_global_asm(&value));
-        println!("{}: {}!", question,cmake_plus_one_cxx_global_asm(&value));
-        println!("{}: {}!", question,cmake_plus_one_asm(&value));
+    unsafe {
+        println!("{}: {}!", question, rust_plus_one_global_asm(&value));
+        println!("{}: {}!", question, cc_plus_one_c(&value));
+        println!("{}: {}!", question, cc_plus_one_c_asm(&value));
+        println!("{}: {}!", question, cc_plus_one_cxx(&value));
+        println!("{}: {}!", question, cc_plus_one_cxx_asm(&value));
+        println!("{}: {}!", question, cc_plus_one_asm(&value));
+        println!("{}: {}!", question, cmake_plus_one_c(&value));
+        println!("{}: {}!", question, cmake_plus_one_c_asm(&value));
+        println!("{}: {}!", question, cmake_plus_one_cxx(&value));
+        println!("{}: {}!", question, cmake_plus_one_cxx_asm(&value));
+        println!("{}: {}!", question, cmake_plus_one_c_global_asm(&value));
+        println!("{}: {}!", question, cmake_plus_one_cxx_global_asm(&value));
+        println!("{}: {}!", question, cmake_plus_one_asm(&value));
     }
 }
diff --git a/src/test/rustdoc/asm-foreign.rs b/src/test/rustdoc/asm-foreign.rs
index 570ed043dd9..d7550ca5aca 100644
--- a/src/test/rustdoc/asm-foreign.rs
+++ b/src/test/rustdoc/asm-foreign.rs
@@ -1,6 +1,6 @@
 // Make sure rustdoc accepts asm! for a foreign architecture.
 
-#![feature(asm)]
+use std::arch::asm;
 
 // @has asm_foreign/fn.aarch64.html
 pub unsafe fn aarch64(a: f64, b: f64) -> f64 {
diff --git a/src/test/rustdoc/asm-foreign2.rs b/src/test/rustdoc/asm-foreign2.rs
index 34e313e7eac..87306901eb7 100644
--- a/src/test/rustdoc/asm-foreign2.rs
+++ b/src/test/rustdoc/asm-foreign2.rs
@@ -1,7 +1,7 @@
 // only-aarch64
 // Make sure rustdoc accepts options(att_syntax) asm! on non-x86 targets.
 
-#![feature(asm)]
+use std::arch::asm;
 
 // @has asm_foreign2/fn.x86.html
 pub unsafe fn x86(x: i64) -> i64 {
diff --git a/src/test/ui/asm/aarch64/bad-options.rs b/src/test/ui/asm/aarch64/bad-options.rs
index 8775eba4a78..6172027a2fa 100644
--- a/src/test/ui/asm/aarch64/bad-options.rs
+++ b/src/test/ui/asm/aarch64/bad-options.rs
@@ -1,6 +1,6 @@
 // only-aarch64
 
-#![feature(asm, global_asm)]
+use std::arch::{asm, global_asm};
 
 fn main() {
     let mut foo = 0;
diff --git a/src/test/ui/asm/aarch64/bad-reg.rs b/src/test/ui/asm/aarch64/bad-reg.rs
index e346f8d992a..8619b3960a6 100644
--- a/src/test/ui/asm/aarch64/bad-reg.rs
+++ b/src/test/ui/asm/aarch64/bad-reg.rs
@@ -1,7 +1,9 @@
 // only-aarch64
 // compile-flags: -C target-feature=+fp
 
-#![feature(asm, asm_const, asm_sym)]
+#![feature(asm_const, asm_sym)]
+
+use std::arch::asm;
 
 fn main() {
     let mut foo = 0;
diff --git a/src/test/ui/asm/aarch64/const.rs b/src/test/ui/asm/aarch64/const.rs
index 49fe48600c2..73512dcc446 100644
--- a/src/test/ui/asm/aarch64/const.rs
+++ b/src/test/ui/asm/aarch64/const.rs
@@ -3,7 +3,9 @@
 // revisions: mirunsafeck thirunsafeck
 // [thirunsafeck]compile-flags: -Z thir-unsafeck
 
-#![feature(asm, global_asm, asm_const)]
+#![feature(asm_const)]
+
+use std::arch::{asm, global_asm};
 
 fn const_generic<const X: usize>() -> usize {
     unsafe {
diff --git a/src/test/ui/asm/aarch64/duplicate-options.fixed b/src/test/ui/asm/aarch64/duplicate-options.fixed
index d95c646e9f9..7cc378e34d8 100644
--- a/src/test/ui/asm/aarch64/duplicate-options.fixed
+++ b/src/test/ui/asm/aarch64/duplicate-options.fixed
@@ -1,8 +1,6 @@
 // only-aarch64
 // run-rustfix
 
-#![feature(asm, global_asm)]
-
 fn main() {
     unsafe {
         asm!("", options(nomem, ));
diff --git a/src/test/ui/asm/aarch64/duplicate-options.rs b/src/test/ui/asm/aarch64/duplicate-options.rs
index eec356463d4..bd1f1570136 100644
--- a/src/test/ui/asm/aarch64/duplicate-options.rs
+++ b/src/test/ui/asm/aarch64/duplicate-options.rs
@@ -1,7 +1,7 @@
 // only-aarch64
 // run-rustfix
 
-#![feature(asm, global_asm)]
+use std::arch::asm;
 
 fn main() {
     unsafe {
@@ -19,8 +19,8 @@ fn main() {
             "",
             options(nomem, noreturn),
             options(preserves_flags, noreturn), //~ ERROR the `noreturn` option was already provided
-            options(nomem, nostack), //~ ERROR the `nomem` option was already provided
-            options(noreturn), //~ ERROR the `noreturn` option was already provided
+            options(nomem, nostack),            //~ ERROR the `nomem` option was already provided
+            options(noreturn),                  //~ ERROR the `noreturn` option was already provided
         );
     }
 }
diff --git a/src/test/ui/asm/aarch64/interpolated-idents.rs b/src/test/ui/asm/aarch64/interpolated-idents.rs
index 1cdf0965667..ece62ce3930 100644
--- a/src/test/ui/asm/aarch64/interpolated-idents.rs
+++ b/src/test/ui/asm/aarch64/interpolated-idents.rs
@@ -1,6 +1,6 @@
 // only-aarch64
 
-#![feature(asm)]
+use std::arch::asm;
 
 macro_rules! m {
     ($in:ident $out:ident $lateout:ident $inout:ident $inlateout:ident $const:ident $sym:ident
diff --git a/src/test/ui/asm/aarch64/may_unwind.rs b/src/test/ui/asm/aarch64/may_unwind.rs
index 94cc7d75049..ac8cc62027e 100644
--- a/src/test/ui/asm/aarch64/may_unwind.rs
+++ b/src/test/ui/asm/aarch64/may_unwind.rs
@@ -3,8 +3,9 @@
 // run-pass
 // needs-asm-support
 
-#![feature(asm, asm_sym, asm_unwind)]
+#![feature(asm_sym, asm_unwind)]
 
+use std::arch::asm;
 use std::panic::{catch_unwind, resume_unwind, AssertUnwindSafe};
 
 struct Foo<'a>(&'a mut bool);
diff --git a/src/test/ui/asm/aarch64/parse-error.rs b/src/test/ui/asm/aarch64/parse-error.rs
index bc0aed8fe55..59d6b28d0fd 100644
--- a/src/test/ui/asm/aarch64/parse-error.rs
+++ b/src/test/ui/asm/aarch64/parse-error.rs
@@ -1,6 +1,8 @@
 // only-aarch64
 
-#![feature(asm, global_asm, asm_const)]
+#![feature(asm_const)]
+
+use std::arch::{asm, global_asm};
 
 fn main() {
     let mut foo = 0;
diff --git a/src/test/ui/asm/aarch64/srcloc.rs b/src/test/ui/asm/aarch64/srcloc.rs
index 143ed182403..609f5e80d24 100644
--- a/src/test/ui/asm/aarch64/srcloc.rs
+++ b/src/test/ui/asm/aarch64/srcloc.rs
@@ -1,7 +1,8 @@
 // only-aarch64
 // build-fail
 // compile-flags: -Ccodegen-units=1
-#![feature(asm)]
+
+use std::arch::asm;
 
 // Checks that inline asm errors are mapped to the correct line in the source code.
 
diff --git a/src/test/ui/asm/aarch64/sym.rs b/src/test/ui/asm/aarch64/sym.rs
index b0dd143a0a1..4fd31070ec7 100644
--- a/src/test/ui/asm/aarch64/sym.rs
+++ b/src/test/ui/asm/aarch64/sym.rs
@@ -2,7 +2,9 @@
 // only-linux
 // run-pass
 
-#![feature(asm, thread_local, asm_sym)]
+#![feature(thread_local, asm_sym)]
+
+use std::arch::asm;
 
 extern "C" fn f1() -> i32 {
     111
diff --git a/src/test/ui/asm/aarch64/type-check-2.rs b/src/test/ui/asm/aarch64/type-check-2.rs
index e1e8a91dda6..1b91f5d0678 100644
--- a/src/test/ui/asm/aarch64/type-check-2.rs
+++ b/src/test/ui/asm/aarch64/type-check-2.rs
@@ -1,6 +1,8 @@
 // only-aarch64
 
-#![feature(asm, repr_simd, never_type, asm_sym)]
+#![feature(repr_simd, never_type, asm_sym)]
+
+use std::arch::asm;
 
 #[repr(simd)]
 #[derive(Clone, Copy)]
diff --git a/src/test/ui/asm/aarch64/type-check-3.rs b/src/test/ui/asm/aarch64/type-check-3.rs
index fc1831a520a..8cac18b8052 100644
--- a/src/test/ui/asm/aarch64/type-check-3.rs
+++ b/src/test/ui/asm/aarch64/type-check-3.rs
@@ -1,9 +1,10 @@
 // only-aarch64
 // compile-flags: -C target-feature=+neon
 
-#![feature(asm, global_asm, repr_simd, stdsimd, asm_const)]
+#![feature(repr_simd, stdsimd, asm_const)]
 
 use std::arch::aarch64::float64x2_t;
+use std::arch::{asm, global_asm};
 
 #[repr(simd)]
 #[derive(Copy, Clone)]
diff --git a/src/test/ui/asm/issue-72570.rs b/src/test/ui/asm/issue-72570.rs
index 960f7427e34..bb13816348d 100644
--- a/src/test/ui/asm/issue-72570.rs
+++ b/src/test/ui/asm/issue-72570.rs
@@ -2,7 +2,7 @@
 // needs-asm-support
 // Also test for #72960
 
-#![feature(asm)]
+use std::arch::asm;
 
 fn main() {
     unsafe {
diff --git a/src/test/ui/asm/issue-87802.rs b/src/test/ui/asm/issue-87802.rs
index 5b6453c42c6..5b2e636c29f 100644
--- a/src/test/ui/asm/issue-87802.rs
+++ b/src/test/ui/asm/issue-87802.rs
@@ -4,7 +4,7 @@
 // ignore-wasm32
 // Make sure rustc doesn't ICE on asm! when output type is !.
 
-#![feature(asm)]
+use std::arch::asm;
 
 fn hmm() -> ! {
     let x;
diff --git a/src/test/ui/asm/issue-89305.rs b/src/test/ui/asm/issue-89305.rs
index a4b22e21028..05677912dff 100644
--- a/src/test/ui/asm/issue-89305.rs
+++ b/src/test/ui/asm/issue-89305.rs
@@ -4,9 +4,10 @@
 // check-pass
 // needs-asm-support
 
-#![feature(asm)]
 #![warn(unused)]
 
+use std::arch::asm;
+
 fn main() {
     unsafe {
         let x: () = asm!("nop");
diff --git a/src/test/ui/asm/issue-89305.stderr b/src/test/ui/asm/issue-89305.stderr
index 3fb1526183b..7efc5102042 100644
--- a/src/test/ui/asm/issue-89305.stderr
+++ b/src/test/ui/asm/issue-89305.stderr
@@ -1,11 +1,11 @@
 warning: unused variable: `x`
-  --> $DIR/issue-89305.rs:12:13
+  --> $DIR/issue-89305.rs:13:13
    |
 LL |         let x: () = asm!("nop");
    |             ^ help: if this is intentional, prefix it with an underscore: `_x`
    |
 note: the lint level is defined here
-  --> $DIR/issue-89305.rs:8:9
+  --> $DIR/issue-89305.rs:7:9
    |
 LL | #![warn(unused)]
    |         ^^^^^^
diff --git a/src/test/ui/asm/may_unwind.rs b/src/test/ui/asm/may_unwind.rs
index 436e8b9d95a..117c0a63aa4 100644
--- a/src/test/ui/asm/may_unwind.rs
+++ b/src/test/ui/asm/may_unwind.rs
@@ -2,7 +2,9 @@
 // run-pass
 // needs-asm-support
 
-#![feature(asm, asm_unwind)]
+#![feature(asm_unwind)]
+
+use std::arch::asm;
 
 fn main() {
     unsafe { asm!("", options(may_unwind)) };
diff --git a/src/test/ui/asm/naked-functions-ffi.rs b/src/test/ui/asm/naked-functions-ffi.rs
index f6725605b92..c8bee504d02 100644
--- a/src/test/ui/asm/naked-functions-ffi.rs
+++ b/src/test/ui/asm/naked-functions-ffi.rs
@@ -1,12 +1,15 @@
 // check-pass
 // needs-asm-support
-#![feature(asm)]
 #![feature(naked_functions)]
 #![crate_type = "lib"]
 
+use std::arch::asm;
+
 #[naked]
 pub extern "C" fn naked(p: char) -> u128 {
     //~^ WARN uses type `char`
     //~| WARN uses type `u128`
-    unsafe { asm!("", options(noreturn)); }
+    unsafe {
+        asm!("", options(noreturn));
+    }
 }
diff --git a/src/test/ui/asm/naked-functions-ffi.stderr b/src/test/ui/asm/naked-functions-ffi.stderr
index a6772badeb6..ac743551311 100644
--- a/src/test/ui/asm/naked-functions-ffi.stderr
+++ b/src/test/ui/asm/naked-functions-ffi.stderr
@@ -1,5 +1,5 @@
 warning: `extern` fn uses type `char`, which is not FFI-safe
-  --> $DIR/naked-functions-ffi.rs:8:28
+  --> $DIR/naked-functions-ffi.rs:9:28
    |
 LL | pub extern "C" fn naked(p: char) -> u128 {
    |                            ^^^^ not FFI-safe
@@ -9,7 +9,7 @@ LL | pub extern "C" fn naked(p: char) -> u128 {
    = note: the `char` type has no C equivalent
 
 warning: `extern` fn uses type `u128`, which is not FFI-safe
-  --> $DIR/naked-functions-ffi.rs:8:37
+  --> $DIR/naked-functions-ffi.rs:9:37
    |
 LL | pub extern "C" fn naked(p: char) -> u128 {
    |                                     ^^^^ not FFI-safe
diff --git a/src/test/ui/asm/naked-functions-unused.rs b/src/test/ui/asm/naked-functions-unused.rs
index 4c5c2ac1c19..4360d9addf0 100644
--- a/src/test/ui/asm/naked-functions-unused.rs
+++ b/src/test/ui/asm/naked-functions-unused.rs
@@ -2,7 +2,6 @@
 //[x86_64] only-x86_64
 //[aarch64] only-aarch64
 #![deny(unused)]
-#![feature(asm)]
 #![feature(naked_functions)]
 #![crate_type = "lib"]
 
@@ -12,6 +11,8 @@ pub trait Trait {
 }
 
 pub mod normal {
+    use std::arch::asm;
+
     pub extern "C" fn function(a: usize, b: usize) -> usize {
         //~^ ERROR unused variable: `a`
         //~| ERROR unused variable: `b`
@@ -50,6 +51,8 @@ pub mod normal {
 }
 
 pub mod naked {
+    use std::arch::asm;
+
     #[naked]
     pub extern "C" fn function(a: usize, b: usize) -> usize {
         unsafe { asm!("", options(noreturn)); }
diff --git a/src/test/ui/asm/naked-functions-unused.x86_64.stderr b/src/test/ui/asm/naked-functions-unused.x86_64.stderr
index a898ab19a73..cf4a1d9174e 100644
--- a/src/test/ui/asm/naked-functions-unused.x86_64.stderr
+++ b/src/test/ui/asm/naked-functions-unused.x86_64.stderr
@@ -1,5 +1,5 @@
 error: unused variable: `a`
-  --> $DIR/naked-functions-unused.rs:15:32
+  --> $DIR/naked-functions-unused.rs:16:32
    |
 LL |     pub extern "C" fn function(a: usize, b: usize) -> usize {
    |                                ^ help: if this is intentional, prefix it with an underscore: `_a`
@@ -12,55 +12,55 @@ LL | #![deny(unused)]
    = note: `#[deny(unused_variables)]` implied by `#[deny(unused)]`
 
 error: unused variable: `b`
-  --> $DIR/naked-functions-unused.rs:15:42
+  --> $DIR/naked-functions-unused.rs:16:42
    |
 LL |     pub extern "C" fn function(a: usize, b: usize) -> usize {
    |                                          ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `a`
-  --> $DIR/naked-functions-unused.rs:24:38
+  --> $DIR/naked-functions-unused.rs:25:38
    |
 LL |         pub extern "C" fn associated(a: usize, b: usize) -> usize {
    |                                      ^ help: if this is intentional, prefix it with an underscore: `_a`
 
 error: unused variable: `b`
-  --> $DIR/naked-functions-unused.rs:24:48
+  --> $DIR/naked-functions-unused.rs:25:48
    |
 LL |         pub extern "C" fn associated(a: usize, b: usize) -> usize {
    |                                                ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `a`
-  --> $DIR/naked-functions-unused.rs:30:41
+  --> $DIR/naked-functions-unused.rs:31:41
    |
 LL |         pub extern "C" fn method(&self, a: usize, b: usize) -> usize {
    |                                         ^ help: if this is intentional, prefix it with an underscore: `_a`
 
 error: unused variable: `b`
-  --> $DIR/naked-functions-unused.rs:30:51
+  --> $DIR/naked-functions-unused.rs:31:51
    |
 LL |         pub extern "C" fn method(&self, a: usize, b: usize) -> usize {
    |                                                   ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `a`
-  --> $DIR/naked-functions-unused.rs:38:40
+  --> $DIR/naked-functions-unused.rs:39:40
    |
 LL |         extern "C" fn trait_associated(a: usize, b: usize) -> usize {
    |                                        ^ help: if this is intentional, prefix it with an underscore: `_a`
 
 error: unused variable: `b`
-  --> $DIR/naked-functions-unused.rs:38:50
+  --> $DIR/naked-functions-unused.rs:39:50
    |
 LL |         extern "C" fn trait_associated(a: usize, b: usize) -> usize {
    |                                                  ^ help: if this is intentional, prefix it with an underscore: `_b`
 
 error: unused variable: `a`
-  --> $DIR/naked-functions-unused.rs:44:43
+  --> $DIR/naked-functions-unused.rs:45:43
    |
 LL |         extern "C" fn trait_method(&self, a: usize, b: usize) -> usize {
    |                                           ^ help: if this is intentional, prefix it with an underscore: `_a`
 
 error: unused variable: `b`
-  --> $DIR/naked-functions-unused.rs:44:53
+  --> $DIR/naked-functions-unused.rs:45:53
    |
 LL |         extern "C" fn trait_method(&self, a: usize, b: usize) -> usize {
    |                                                     ^ help: if this is intentional, prefix it with an underscore: `_b`
diff --git a/src/test/ui/asm/naked-functions.rs b/src/test/ui/asm/naked-functions.rs
index 7154ce26efc..b44204b9005 100644
--- a/src/test/ui/asm/naked-functions.rs
+++ b/src/test/ui/asm/naked-functions.rs
@@ -3,7 +3,6 @@
 // ignore-spirv
 // ignore-wasm32
 
-#![feature(asm)]
 #![feature(llvm_asm)]
 #![feature(naked_functions)]
 #![feature(or_patterns)]
@@ -11,6 +10,8 @@
 #![crate_type = "lib"]
 #![allow(deprecated)] // llvm_asm!
 
+use std::arch::asm;
+
 #[repr(C)]
 pub struct P {
     x: u8,
diff --git a/src/test/ui/asm/naked-functions.stderr b/src/test/ui/asm/naked-functions.stderr
index e4ddb97ca27..8e177f5a52c 100644
--- a/src/test/ui/asm/naked-functions.stderr
+++ b/src/test/ui/asm/naked-functions.stderr
@@ -1,35 +1,35 @@
 error: asm with the `pure` option must have at least one output
-  --> $DIR/naked-functions.rs:135:14
+  --> $DIR/naked-functions.rs:136:14
    |
 LL |     asm!("", options(readonly, nostack), options(pure));
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^
 
 error: patterns not allowed in naked function parameters
-  --> $DIR/naked-functions.rs:22:5
+  --> $DIR/naked-functions.rs:23:5
    |
 LL |     mut a: u32,
    |     ^^^^^
 
 error: patterns not allowed in naked function parameters
-  --> $DIR/naked-functions.rs:24:5
+  --> $DIR/naked-functions.rs:25:5
    |
 LL |     &b: &i32,
    |     ^^
 
 error: patterns not allowed in naked function parameters
-  --> $DIR/naked-functions.rs:26:6
+  --> $DIR/naked-functions.rs:27:6
    |
 LL |     (None | Some(_)): Option<std::ptr::NonNull<u8>>,
    |      ^^^^^^^^^^^^^^
 
 error: patterns not allowed in naked function parameters
-  --> $DIR/naked-functions.rs:28:5
+  --> $DIR/naked-functions.rs:29:5
    |
 LL |     P { x, y }: P,
    |     ^^^^^^^^^^
 
 error: referencing function parameters is not allowed in naked functions
-  --> $DIR/naked-functions.rs:38:5
+  --> $DIR/naked-functions.rs:39:5
    |
 LL |     a + 1
    |     ^
@@ -37,7 +37,7 @@ LL |     a + 1
    = help: follow the calling convention in asm block to use parameters
 
 warning: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:35:1
+  --> $DIR/naked-functions.rs:36:1
    |
 LL | / pub unsafe extern "C" fn inc(a: u32) -> u32 {
 LL | |
@@ -53,7 +53,7 @@ LL | | }
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 error: referencing function parameters is not allowed in naked functions
-  --> $DIR/naked-functions.rs:44:31
+  --> $DIR/naked-functions.rs:45:31
    |
 LL |     asm!("/* {0} */", in(reg) a, options(noreturn));
    |                               ^
@@ -61,7 +61,7 @@ LL |     asm!("/* {0} */", in(reg) a, options(noreturn));
    = help: follow the calling convention in asm block to use parameters
 
 warning: only `const` and `sym` operands are supported in naked functions
-  --> $DIR/naked-functions.rs:44:23
+  --> $DIR/naked-functions.rs:45:23
    |
 LL |     asm!("/* {0} */", in(reg) a, options(noreturn));
    |                       ^^^^^^^^^
@@ -70,7 +70,7 @@ LL |     asm!("/* {0} */", in(reg) a, options(noreturn));
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:51:1
+  --> $DIR/naked-functions.rs:52:1
    |
 LL | / pub unsafe extern "C" fn inc_closure(a: u32) -> u32 {
 LL | |
@@ -84,7 +84,7 @@ LL | | }
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: only `const` and `sym` operands are supported in naked functions
-  --> $DIR/naked-functions.rs:71:10
+  --> $DIR/naked-functions.rs:72:10
    |
 LL |          in(reg) a,
    |          ^^^^^^^^^
@@ -102,7 +102,7 @@ LL |          out(reg) e,
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: asm in naked functions must use `noreturn` option
-  --> $DIR/naked-functions.rs:68:5
+  --> $DIR/naked-functions.rs:69:5
    |
 LL | /     asm!("/* {0} {1} {2} {3} {4} {5} {6} */",
 LL | |
@@ -117,7 +117,7 @@ LL | |     );
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:58:1
+  --> $DIR/naked-functions.rs:59:1
    |
 LL | / pub unsafe extern "C" fn unsupported_operands() {
 LL | |
@@ -141,7 +141,7 @@ LL | | }
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:84:1
+  --> $DIR/naked-functions.rs:85:1
    |
 LL | / pub extern "C" fn missing_assembly() {
 LL | |
@@ -153,7 +153,7 @@ LL | | }
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: asm in naked functions must use `noreturn` option
-  --> $DIR/naked-functions.rs:93:5
+  --> $DIR/naked-functions.rs:94:5
    |
 LL |     asm!("");
    |     ^^^^^^^^
@@ -162,7 +162,7 @@ LL |     asm!("");
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: asm in naked functions must use `noreturn` option
-  --> $DIR/naked-functions.rs:96:5
+  --> $DIR/naked-functions.rs:97:5
    |
 LL |     asm!("");
    |     ^^^^^^^^
@@ -171,7 +171,7 @@ LL |     asm!("");
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: asm in naked functions must use `noreturn` option
-  --> $DIR/naked-functions.rs:99:5
+  --> $DIR/naked-functions.rs:100:5
    |
 LL |     asm!("");
    |     ^^^^^^^^
@@ -180,7 +180,7 @@ LL |     asm!("");
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:90:1
+  --> $DIR/naked-functions.rs:91:1
    |
 LL | / pub extern "C" fn too_many_asm_blocks() {
 LL | |
@@ -202,7 +202,7 @@ LL | | }
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 error: referencing function parameters is not allowed in naked functions
-  --> $DIR/naked-functions.rs:110:11
+  --> $DIR/naked-functions.rs:111:11
    |
 LL |         *&y
    |           ^
@@ -210,7 +210,7 @@ LL |         *&y
    = help: follow the calling convention in asm block to use parameters
 
 warning: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:107:5
+  --> $DIR/naked-functions.rs:108:5
    |
 LL | /     pub extern "C" fn inner(y: usize) -> usize {
 LL | |
@@ -225,7 +225,7 @@ LL | |     }
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: the LLVM-style inline assembly is unsupported in naked functions
-  --> $DIR/naked-functions.rs:120:5
+  --> $DIR/naked-functions.rs:121:5
    |
 LL |     llvm_asm!("");
    |     ^^^^^^^^^^^^^
@@ -236,7 +236,7 @@ LL |     llvm_asm!("");
    = note: this warning originates in the macro `llvm_asm` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 warning: naked functions must contain a single asm block
-  --> $DIR/naked-functions.rs:117:1
+  --> $DIR/naked-functions.rs:118:1
    |
 LL | / unsafe extern "C" fn llvm() -> ! {
 LL | |
@@ -252,7 +252,7 @@ LL | | }
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: asm options unsupported in naked functions: `nomem`, `preserves_flags`
-  --> $DIR/naked-functions.rs:128:5
+  --> $DIR/naked-functions.rs:129:5
    |
 LL |     asm!("", options(nomem, preserves_flags, noreturn));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -261,7 +261,7 @@ LL |     asm!("", options(nomem, preserves_flags, noreturn));
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: asm options unsupported in naked functions: `nostack`, `pure`, `readonly`
-  --> $DIR/naked-functions.rs:135:5
+  --> $DIR/naked-functions.rs:136:5
    |
 LL |     asm!("", options(readonly, nostack), options(pure));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -270,7 +270,7 @@ LL |     asm!("", options(readonly, nostack), options(pure));
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: asm in naked functions must use `noreturn` option
-  --> $DIR/naked-functions.rs:135:5
+  --> $DIR/naked-functions.rs:136:5
    |
 LL |     asm!("", options(readonly, nostack), options(pure));
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -279,7 +279,7 @@ LL |     asm!("", options(readonly, nostack), options(pure));
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: Rust ABI is unsupported in naked functions
-  --> $DIR/naked-functions.rs:144:15
+  --> $DIR/naked-functions.rs:145:15
    |
 LL | pub unsafe fn default_abi() {
    |               ^^^^^^^^^^^
@@ -287,13 +287,13 @@ 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:150:15
+  --> $DIR/naked-functions.rs:151:15
    |
 LL | pub unsafe fn rust_abi() {
    |               ^^^^^^^^
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:190:1
+  --> $DIR/naked-functions.rs:191:1
    |
 LL | #[inline]
    | ^^^^^^^^^
@@ -302,7 +302,7 @@ LL | #[inline]
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:198:1
+  --> $DIR/naked-functions.rs:199:1
    |
 LL | #[inline(always)]
    | ^^^^^^^^^^^^^^^^^
@@ -311,7 +311,7 @@ LL | #[inline(always)]
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:206:1
+  --> $DIR/naked-functions.rs:207:1
    |
 LL | #[inline(never)]
    | ^^^^^^^^^^^^^^^^
@@ -320,7 +320,7 @@ LL | #[inline(never)]
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:214:1
+  --> $DIR/naked-functions.rs:215:1
    |
 LL | #[inline]
    | ^^^^^^^^^
@@ -329,7 +329,7 @@ LL | #[inline]
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:217:1
+  --> $DIR/naked-functions.rs:218:1
    |
 LL | #[inline(always)]
    | ^^^^^^^^^^^^^^^^^
@@ -338,7 +338,7 @@ LL | #[inline(always)]
    = note: for more information, see issue #32408 <https://github.com/rust-lang/rust/issues/32408>
 
 warning: naked functions cannot be inlined
-  --> $DIR/naked-functions.rs:220:1
+  --> $DIR/naked-functions.rs:221:1
    |
 LL | #[inline(never)]
    | ^^^^^^^^^^^^^^^^
diff --git a/src/test/ui/asm/naked-invalid-attr.rs b/src/test/ui/asm/naked-invalid-attr.rs
index 2576d1124c8..ea8f560ff5d 100644
--- a/src/test/ui/asm/naked-invalid-attr.rs
+++ b/src/test/ui/asm/naked-invalid-attr.rs
@@ -1,10 +1,11 @@
 // Checks that #[naked] attribute can be placed on function definitions only.
 //
 // needs-asm-support
-#![feature(asm)]
 #![feature(naked_functions)]
 #![naked] //~ ERROR should be applied to a function definition
 
+use std::arch::asm;
+
 extern "C" {
     #[naked] //~ ERROR should be applied to a function definition
     fn f();
diff --git a/src/test/ui/asm/naked-invalid-attr.stderr b/src/test/ui/asm/naked-invalid-attr.stderr
index 565c2986a66..58344be9334 100644
--- a/src/test/ui/asm/naked-invalid-attr.stderr
+++ b/src/test/ui/asm/naked-invalid-attr.stderr
@@ -1,5 +1,5 @@
 error: attribute should be applied to a function definition
-  --> $DIR/naked-invalid-attr.rs:13:1
+  --> $DIR/naked-invalid-attr.rs:14:1
    |
 LL |   #[naked]
    |   ^^^^^^^^
@@ -11,13 +11,13 @@ LL | | }
    | |_- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/naked-invalid-attr.rs:50:5
+  --> $DIR/naked-invalid-attr.rs:51:5
    |
 LL |     #[naked] || {};
    |     ^^^^^^^^ ----- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/naked-invalid-attr.rs:21:5
+  --> $DIR/naked-invalid-attr.rs:22:5
    |
 LL |     #[naked]
    |     ^^^^^^^^
@@ -25,7 +25,7 @@ LL |     extern "C" fn invoke(&self);
    |     ---------------------------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/naked-invalid-attr.rs:9:5
+  --> $DIR/naked-invalid-attr.rs:10:5
    |
 LL |     #[naked]
    |     ^^^^^^^^
@@ -33,7 +33,7 @@ LL |     fn f();
    |     ------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/naked-invalid-attr.rs:6:1
+  --> $DIR/naked-invalid-attr.rs:5:1
    |
 LL | #![naked]
    | ^^^^^^^^^
diff --git a/src/test/ui/asm/named-asm-labels.rs b/src/test/ui/asm/named-asm-labels.rs
index c87188e46a2..160dbf617c4 100644
--- a/src/test/ui/asm/named-asm-labels.rs
+++ b/src/test/ui/asm/named-asm-labels.rs
@@ -11,7 +11,9 @@
 // which causes less readable LLVM errors and in the worst cases causes ICEs
 // or segfaults based on system dependent behavior and codegen flags.
 
-#![feature(asm, global_asm, naked_functions, asm_const)]
+#![feature(naked_functions, asm_const)]
+
+use std::arch::{asm, global_asm};
 
 #[no_mangle]
 pub static FOO: usize = 42;
diff --git a/src/test/ui/asm/named-asm-labels.stderr b/src/test/ui/asm/named-asm-labels.stderr
index 75c848cdc57..b8ff42d86b5 100644
--- a/src/test/ui/asm/named-asm-labels.stderr
+++ b/src/test/ui/asm/named-asm-labels.stderr
@@ -1,141 +1,126 @@
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:22:15
+  --> $DIR/named-asm-labels.rs:24:15
    |
 LL |         asm!("bar: nop");
    |               ^^^
    |
    = note: `#[deny(named_asm_labels)]` on by default
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:25:15
+  --> $DIR/named-asm-labels.rs:27:15
    |
 LL |         asm!("abcd:");
    |               ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:28:15
+  --> $DIR/named-asm-labels.rs:30:15
    |
 LL |         asm!("foo: bar1: nop");
    |               ^^^  ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:32:15
+  --> $DIR/named-asm-labels.rs:34:15
    |
 LL |         asm!("foo1: nop", "nop");
    |               ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:33:15
+  --> $DIR/named-asm-labels.rs:35:15
    |
 LL |         asm!("foo2: foo3: nop", "nop");
    |               ^^^^  ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:35:22
+  --> $DIR/named-asm-labels.rs:37:22
    |
 LL |         asm!("nop", "foo4: nop");
    |                      ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:36:15
+  --> $DIR/named-asm-labels.rs:38:15
    |
 LL |         asm!("foo5: nop", "foo6: nop");
    |               ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:36:28
+  --> $DIR/named-asm-labels.rs:38:28
    |
 LL |         asm!("foo5: nop", "foo6: nop");
    |                            ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:41:15
+  --> $DIR/named-asm-labels.rs:43:15
    |
 LL |         asm!("foo7: nop; foo8: nop");
    |               ^^^^       ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/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:45:15
    |
 LL |         asm!("foo9: nop; nop");
    |               ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:44:20
+  --> $DIR/named-asm-labels.rs:46:20
    |
 LL |         asm!("nop; foo10: nop");
    |                    ^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:47:15
+  --> $DIR/named-asm-labels.rs:49:15
    |
 LL |         asm!("bar2: nop\n bar3: nop");
    |               ^^^^        ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/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:51:15
    |
 LL |         asm!("bar4: nop\n nop");
    |               ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:50:21
+  --> $DIR/named-asm-labels.rs:52:21
    |
 LL |         asm!("nop\n bar5: nop");
    |                     ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:51:21
+  --> $DIR/named-asm-labels.rs:53:21
    |
 LL |         asm!("nop\n bar6: bar7: nop");
    |                     ^^^^  ^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:57:13
+  --> $DIR/named-asm-labels.rs:59:13
    |
 LL |             blah2: nop
    |             ^^^^^
@@ -143,192 +128,171 @@ LL |             blah3: nop
    |             ^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:66:19
+  --> $DIR/named-asm-labels.rs:68:19
    |
 LL |             nop ; blah4: nop
    |                   ^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:80:15
+  --> $DIR/named-asm-labels.rs:82:15
    |
 LL |         asm!("blah1: 2bar: nop");
    |               ^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:83:15
+  --> $DIR/named-asm-labels.rs:85:15
    |
 LL |         asm!("def: def: nop");
    |               ^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:84:15
+  --> $DIR/named-asm-labels.rs:86:15
    |
 LL |         asm!("def: nop\ndef: nop");
    |               ^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/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:87:15
    |
 LL |         asm!("def: nop; def: nop");
    |               ^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:93:15
+  --> $DIR/named-asm-labels.rs:95:15
    |
 LL |         asm!("fooo\u{003A} nop");
    |               ^^^^^^^^^^^^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:94:15
+  --> $DIR/named-asm-labels.rs:96:15
    |
 LL |         asm!("foooo\x3A nop");
    |               ^^^^^^^^^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:97:15
+  --> $DIR/named-asm-labels.rs:99:15
    |
 LL |         asm!("fooooo:\u{000A} nop");
    |               ^^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:98:15
+  --> $DIR/named-asm-labels.rs:100:15
    |
 LL |         asm!("foooooo:\x0A nop");
    |               ^^^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:102:14
+  --> $DIR/named-asm-labels.rs:104:14
    |
 LL |         asm!("\x41\x42\x43\x3A\x20\x6E\x6F\x70");
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:110:13
+  --> $DIR/named-asm-labels.rs:112:13
    |
 LL |             ab: nop // ab: does foo
    |             ^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:122:14
+  --> $DIR/named-asm-labels.rs:124:14
    |
 LL |         asm!(include_str!("named-asm-labels.s"));
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 warning: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:132:19
+  --> $DIR/named-asm-labels.rs:134:19
    |
 LL |             asm!("warned: nop");
    |                   ^^^^^^
    |
 note: the lint level is defined here
-  --> $DIR/named-asm-labels.rs:130:16
+  --> $DIR/named-asm-labels.rs:132:16
    |
 LL |         #[warn(named_asm_labels)]
    |                ^^^^^^^^^^^^^^^^
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:141:20
+  --> $DIR/named-asm-labels.rs:143:20
    |
 LL |     unsafe { asm!(".Lfoo: mov rax, {}; ret;", "nop", const 1, options(noreturn)) }
    |                    ^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:147:20
+  --> $DIR/named-asm-labels.rs:149:20
    |
 LL |     unsafe { asm!(".Lbar: mov rax, {}; ret;", "nop", const 1, options(noreturn)) }
    |                    ^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:155:20
+  --> $DIR/named-asm-labels.rs:157:20
    |
 LL |     unsafe { asm!(".Laaa: nop; ret;", options(noreturn)) }
    |                    ^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:165:24
+  --> $DIR/named-asm-labels.rs:167:24
    |
 LL |         unsafe { asm!(".Lbbb: nop; ret;", options(noreturn)) }
    |                        ^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:174:15
+  --> $DIR/named-asm-labels.rs:176:15
    |
 LL |         asm!("closure1: nop");
    |               ^^^^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:178:15
+  --> $DIR/named-asm-labels.rs:180:15
    |
 LL |         asm!("closure2: nop");
    |               ^^^^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: avoid using named labels in inline assembly
-  --> $DIR/named-asm-labels.rs:188:19
+  --> $DIR/named-asm-labels.rs:190:19
    |
 LL |             asm!("closure3: nop");
    |                   ^^^^^^^^
    |
    = help: only local labels of the form `<number>:` should be used in inline asm
-   = note: see the asm section of the unstable book <https://doc.rust-lang.org/nightly/unstable-book/library-features/asm.html#labels> for more information
 
 error: aborting due to 35 previous errors; 1 warning emitted
 
diff --git a/src/test/ui/asm/noreturn.rs b/src/test/ui/asm/noreturn.rs
index cb92ff0ad1d..03fa087ae37 100644
--- a/src/test/ui/asm/noreturn.rs
+++ b/src/test/ui/asm/noreturn.rs
@@ -1,9 +1,11 @@
 // needs-asm-support
 // check-pass
 
-#![feature(asm, never_type)]
+#![feature(never_type)]
 #![crate_type = "rlib"]
 
+use std::arch::asm;
+
 pub unsafe fn asm1() {
     let _: () = asm!("");
 }
diff --git a/src/test/ui/asm/type-check-1.rs b/src/test/ui/asm/type-check-1.rs
index 1e463107b18..695fd27efd4 100644
--- a/src/test/ui/asm/type-check-1.rs
+++ b/src/test/ui/asm/type-check-1.rs
@@ -3,7 +3,9 @@
 // ignore-spirv
 // ignore-wasm32
 
-#![feature(asm, global_asm, asm_const)]
+#![feature(asm_const)]
+
+use std::arch::{asm, global_asm};
 
 fn main() {
     unsafe {
diff --git a/src/test/ui/asm/type-check-1.stderr b/src/test/ui/asm/type-check-1.stderr
index c9080a3c030..d774c78ca9a 100644
--- a/src/test/ui/asm/type-check-1.stderr
+++ b/src/test/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:37:26
+  --> $DIR/type-check-1.rs:39: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:40:36
+  --> $DIR/type-check-1.rs:42: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:43:36
+  --> $DIR/type-check-1.rs:45:36
    |
 LL |         let x = 0;
    |         ----- help: consider using `const` instead of `let`: `const x`
@@ -26,13 +26,13 @@ LL |         asm!("{}", const const_bar(x));
    |                                    ^ non-constant value
 
 error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:51:26
+  --> $DIR/type-check-1.rs:53:26
    |
 LL |         asm!("{}", const 0f32);
    |                          ^^^^ expected integer, found `f32`
 
 error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:53:26
+  --> $DIR/type-check-1.rs:55:26
    |
 LL |         asm!("{}", const 0 as *mut u8);
    |                          ^^^^^^^^^^^^ expected integer, found *-ptr
@@ -41,7 +41,7 @@ LL |         asm!("{}", const 0 as *mut u8);
            found raw pointer `*mut u8`
 
 error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:55:26
+  --> $DIR/type-check-1.rs:57:26
    |
 LL |         asm!("{}", const &0);
    |                          ^^ expected integer, found `&{integer}`
@@ -53,19 +53,19 @@ LL +         asm!("{}", const 0);
    | 
 
 error: invalid asm output
-  --> $DIR/type-check-1.rs:13:29
+  --> $DIR/type-check-1.rs:15:29
    |
 LL |         asm!("{}", out(reg) 1 + 2);
    |                             ^^^^^ cannot assign to this expression
 
 error: invalid asm output
-  --> $DIR/type-check-1.rs:15:31
+  --> $DIR/type-check-1.rs:17: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:21:28
+  --> $DIR/type-check-1.rs:23:28
    |
 LL |         asm!("{}", in(reg) v[..]);
    |                            ^^^^^ doesn't have a size known at compile-time
@@ -74,7 +74,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:23:29
+  --> $DIR/type-check-1.rs:25:29
    |
 LL |         asm!("{}", out(reg) v[..]);
    |                             ^^^^^ doesn't have a size known at compile-time
@@ -83,7 +83,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:25:31
+  --> $DIR/type-check-1.rs:27:31
    |
 LL |         asm!("{}", inout(reg) v[..]);
    |                               ^^^^^ doesn't have a size known at compile-time
@@ -92,13 +92,13 @@ LL |         asm!("{}", inout(reg) v[..]);
    = note: all inline asm arguments must have a statically known size
 
 error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:65:25
+  --> $DIR/type-check-1.rs:67:25
    |
 LL | global_asm!("{}", const 0f32);
    |                         ^^^^ expected integer, found `f32`
 
 error[E0308]: mismatched types
-  --> $DIR/type-check-1.rs:67:25
+  --> $DIR/type-check-1.rs:69:25
    |
 LL | global_asm!("{}", const 0 as *mut u8);
    |                         ^^^^^^^^^^^^ expected integer, found *-ptr
diff --git a/src/test/ui/asm/type-check-4.rs b/src/test/ui/asm/type-check-4.rs
index c9826662009..666d2c67783 100644
--- a/src/test/ui/asm/type-check-4.rs
+++ b/src/test/ui/asm/type-check-4.rs
@@ -3,7 +3,7 @@
 // ignore-spirv
 // ignore-wasm32
 
-#![feature(asm)]
+use std::arch::asm;
 
 fn main() {
     unsafe {
diff --git a/src/test/ui/asm/x86_64/bad-clobber-abi.rs b/src/test/ui/asm/x86_64/bad-clobber-abi.rs
index f4ca033048d..ddcd2065bfe 100644
--- a/src/test/ui/asm/x86_64/bad-clobber-abi.rs
+++ b/src/test/ui/asm/x86_64/bad-clobber-abi.rs
@@ -1,9 +1,9 @@
 // needs-asm-support
 // only-x86_64
 
-// checks various modes of failure for the `clobber_abi` argument (after parsing)
+use std::arch::asm;
 
-#![feature(asm)]
+// checks various modes of failure for the `clobber_abi` argument (after parsing)
 
 fn main() {
     unsafe {
diff --git a/src/test/ui/asm/x86_64/bad-options.rs b/src/test/ui/asm/x86_64/bad-options.rs
index 3facc876415..f7c2cd6c505 100644
--- a/src/test/ui/asm/x86_64/bad-options.rs
+++ b/src/test/ui/asm/x86_64/bad-options.rs
@@ -1,6 +1,6 @@
 // only-x86_64
 
-#![feature(asm, global_asm)]
+use std::arch::{asm, global_asm};
 
 fn main() {
     let mut foo = 0;
diff --git a/src/test/ui/asm/x86_64/bad-reg.rs b/src/test/ui/asm/x86_64/bad-reg.rs
index ba4e95db46a..257274b0bc3 100644
--- a/src/test/ui/asm/x86_64/bad-reg.rs
+++ b/src/test/ui/asm/x86_64/bad-reg.rs
@@ -1,7 +1,9 @@
 // only-x86_64
 // compile-flags: -C target-feature=+avx2
 
-#![feature(asm, asm_const, asm_sym)]
+#![feature(asm_const, asm_sym)]
+
+use std::arch::asm;
 
 fn main() {
     let mut foo = 0;
diff --git a/src/test/ui/asm/x86_64/bad-reg.stderr b/src/test/ui/asm/x86_64/bad-reg.stderr
index 102a17e9815..3a89b2fdb74 100644
--- a/src/test/ui/asm/x86_64/bad-reg.stderr
+++ b/src/test/ui/asm/x86_64/bad-reg.stderr
@@ -1,17 +1,17 @@
 error: invalid register class `foo`: unknown register class
-  --> $DIR/bad-reg.rs:12:20
+  --> $DIR/bad-reg.rs:14:20
    |
 LL |         asm!("{}", in(foo) foo);
    |                    ^^^^^^^^^^^
 
 error: invalid register `foo`: unknown register
-  --> $DIR/bad-reg.rs:14:18
+  --> $DIR/bad-reg.rs:16:18
    |
 LL |         asm!("", in("foo") foo);
    |                  ^^^^^^^^^^^^^
 
 error: invalid asm template modifier for this register class
-  --> $DIR/bad-reg.rs:16:15
+  --> $DIR/bad-reg.rs:18:15
    |
 LL |         asm!("{:z}", in(reg) foo);
    |               ^^^^   ----------- argument
@@ -21,7 +21,7 @@ LL |         asm!("{:z}", in(reg) foo);
    = note: the `reg` register class supports the following template modifiers: `l`, `x`, `e`, `r`
 
 error: invalid asm template modifier for this register class
-  --> $DIR/bad-reg.rs:18:15
+  --> $DIR/bad-reg.rs:20:15
    |
 LL |         asm!("{:r}", in(xmm_reg) foo);
    |               ^^^^   --------------- argument
@@ -31,7 +31,7 @@ LL |         asm!("{:r}", in(xmm_reg) foo);
    = note: the `xmm_reg` register class supports the following template modifiers: `x`, `y`, `z`
 
 error: asm template modifiers are not allowed for `const` arguments
-  --> $DIR/bad-reg.rs:20:15
+  --> $DIR/bad-reg.rs:22:15
    |
 LL |         asm!("{:a}", const 0);
    |               ^^^^   ------- argument
@@ -39,7 +39,7 @@ LL |         asm!("{:a}", const 0);
    |               template modifier
 
 error: asm template modifiers are not allowed for `sym` arguments
-  --> $DIR/bad-reg.rs:22:15
+  --> $DIR/bad-reg.rs:24:15
    |
 LL |         asm!("{:a}", sym main);
    |               ^^^^   -------- argument
@@ -47,73 +47,73 @@ LL |         asm!("{:a}", sym main);
    |               template modifier
 
 error: invalid register `ebp`: the frame pointer cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:24:18
+  --> $DIR/bad-reg.rs:26:18
    |
 LL |         asm!("", in("ebp") foo);
    |                  ^^^^^^^^^^^^^
 
 error: invalid register `rsp`: the stack pointer cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:26:18
+  --> $DIR/bad-reg.rs:28:18
    |
 LL |         asm!("", in("rsp") foo);
    |                  ^^^^^^^^^^^^^
 
 error: invalid register `ip`: the instruction pointer cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:28:18
+  --> $DIR/bad-reg.rs:30:18
    |
 LL |         asm!("", in("ip") foo);
    |                  ^^^^^^^^^^^^
 
 error: invalid register `k0`: the k0 AVX mask register cannot be used as an operand for inline asm
-  --> $DIR/bad-reg.rs:30:18
+  --> $DIR/bad-reg.rs:32:18
    |
 LL |         asm!("", in("k0") foo);
    |                  ^^^^^^^^^^^^
 
 error: invalid register `ah`: high byte registers cannot be used as an operand on x86_64
-  --> $DIR/bad-reg.rs:32:18
+  --> $DIR/bad-reg.rs:34:18
    |
 LL |         asm!("", in("ah") foo);
    |                  ^^^^^^^^^^^^
 
 error: register class `x87_reg` can only be used as a clobber, not as an input or output
-  --> $DIR/bad-reg.rs:35:18
+  --> $DIR/bad-reg.rs:37:18
    |
 LL |         asm!("", in("st(2)") foo);
    |                  ^^^^^^^^^^^^^^^
 
 error: register class `mmx_reg` can only be used as a clobber, not as an input or output
-  --> $DIR/bad-reg.rs:37:18
+  --> $DIR/bad-reg.rs:39:18
    |
 LL |         asm!("", in("mm0") foo);
    |                  ^^^^^^^^^^^^^
 
 error: register class `x87_reg` can only be used as a clobber, not as an input or output
-  --> $DIR/bad-reg.rs:41:20
+  --> $DIR/bad-reg.rs:43:20
    |
 LL |         asm!("{}", in(x87_reg) foo);
    |                    ^^^^^^^^^^^^^^^
 
 error: register class `mmx_reg` can only be used as a clobber, not as an input or output
-  --> $DIR/bad-reg.rs:43:20
+  --> $DIR/bad-reg.rs:45:20
    |
 LL |         asm!("{}", in(mmx_reg) foo);
    |                    ^^^^^^^^^^^^^^^
 
 error: register class `x87_reg` can only be used as a clobber, not as an input or output
-  --> $DIR/bad-reg.rs:45:20
+  --> $DIR/bad-reg.rs:47:20
    |
 LL |         asm!("{}", out(x87_reg) _);
    |                    ^^^^^^^^^^^^^^
 
 error: register class `mmx_reg` can only be used as a clobber, not as an input or output
-  --> $DIR/bad-reg.rs:47:20
+  --> $DIR/bad-reg.rs:49:20
    |
 LL |         asm!("{}", out(mmx_reg) _);
    |                    ^^^^^^^^^^^^^^
 
 error: register `al` conflicts with register `ax`
-  --> $DIR/bad-reg.rs:53:33
+  --> $DIR/bad-reg.rs:55:33
    |
 LL |         asm!("", in("eax") foo, in("al") bar);
    |                  -------------  ^^^^^^^^^^^^ register `al`
@@ -121,7 +121,7 @@ LL |         asm!("", in("eax") foo, in("al") bar);
    |                  register `ax`
 
 error: register `ax` conflicts with register `ax`
-  --> $DIR/bad-reg.rs:55:33
+  --> $DIR/bad-reg.rs:57:33
    |
 LL |         asm!("", in("rax") foo, out("rax") bar);
    |                  -------------  ^^^^^^^^^^^^^^ register `ax`
@@ -129,13 +129,13 @@ LL |         asm!("", in("rax") foo, out("rax") bar);
    |                  register `ax`
    |
 help: use `lateout` instead of `out` to avoid conflict
-  --> $DIR/bad-reg.rs:55:18
+  --> $DIR/bad-reg.rs:57:18
    |
 LL |         asm!("", in("rax") foo, out("rax") bar);
    |                  ^^^^^^^^^^^^^
 
 error: register `ymm0` conflicts with register `xmm0`
-  --> $DIR/bad-reg.rs:58:34
+  --> $DIR/bad-reg.rs:60:34
    |
 LL |         asm!("", in("xmm0") foo, in("ymm0") bar);
    |                  --------------  ^^^^^^^^^^^^^^ register `ymm0`
@@ -143,7 +143,7 @@ LL |         asm!("", in("xmm0") foo, in("ymm0") bar);
    |                  register `xmm0`
 
 error: register `ymm0` conflicts with register `xmm0`
-  --> $DIR/bad-reg.rs:60:34
+  --> $DIR/bad-reg.rs:62:34
    |
 LL |         asm!("", in("xmm0") foo, out("ymm0") bar);
    |                  --------------  ^^^^^^^^^^^^^^^ register `ymm0`
@@ -151,7 +151,7 @@ LL |         asm!("", in("xmm0") foo, out("ymm0") bar);
    |                  register `xmm0`
    |
 help: use `lateout` instead of `out` to avoid conflict
-  --> $DIR/bad-reg.rs:60:18
+  --> $DIR/bad-reg.rs:62:18
    |
 LL |         asm!("", in("xmm0") foo, out("ymm0") bar);
    |                  ^^^^^^^^^^^^^^
diff --git a/src/test/ui/asm/x86_64/const.rs b/src/test/ui/asm/x86_64/const.rs
index c1e4cdbb928..aa4cdf99176 100644
--- a/src/test/ui/asm/x86_64/const.rs
+++ b/src/test/ui/asm/x86_64/const.rs
@@ -3,7 +3,9 @@
 // revisions: mirunsafeck thirunsafeck
 // [thirunsafeck]compile-flags: -Z thir-unsafeck
 
-#![feature(asm, global_asm, asm_const)]
+#![feature(asm_const)]
+
+use std::arch::{asm, global_asm};
 
 fn const_generic<const X: usize>() -> usize {
     unsafe {
diff --git a/src/test/ui/asm/x86_64/duplicate-options.fixed b/src/test/ui/asm/x86_64/duplicate-options.fixed
index d4444e9c6cc..c5f14f5f75c 100644
--- a/src/test/ui/asm/x86_64/duplicate-options.fixed
+++ b/src/test/ui/asm/x86_64/duplicate-options.fixed
@@ -1,7 +1,7 @@
 // only-x86_64
 // run-rustfix
 
-#![feature(asm, global_asm)]
+use std::arch::{asm, global_asm};
 
 fn main() {
     unsafe {
@@ -19,8 +19,8 @@ fn main() {
             "",
             options(nomem, noreturn),
             options(att_syntax, ), //~ ERROR the `noreturn` option was already provided
-            options( nostack), //~ ERROR the `nomem` option was already provided
-            options(), //~ ERROR the `noreturn` option was already provided
+            options( nostack),       //~ ERROR the `nomem` option was already provided
+            options(),             //~ ERROR the `noreturn` option was already provided
         );
     }
 }
diff --git a/src/test/ui/asm/x86_64/duplicate-options.rs b/src/test/ui/asm/x86_64/duplicate-options.rs
index fd28311984b..a8dce1f8d71 100644
--- a/src/test/ui/asm/x86_64/duplicate-options.rs
+++ b/src/test/ui/asm/x86_64/duplicate-options.rs
@@ -1,7 +1,7 @@
 // only-x86_64
 // run-rustfix
 
-#![feature(asm, global_asm)]
+use std::arch::{asm, global_asm};
 
 fn main() {
     unsafe {
@@ -19,8 +19,8 @@ fn main() {
             "",
             options(nomem, noreturn),
             options(att_syntax, noreturn), //~ ERROR the `noreturn` option was already provided
-            options(nomem, nostack), //~ ERROR the `nomem` option was already provided
-            options(noreturn), //~ ERROR the `noreturn` option was already provided
+            options(nomem, nostack),       //~ ERROR the `nomem` option was already provided
+            options(noreturn),             //~ ERROR the `noreturn` option was already provided
         );
     }
 }
diff --git a/src/test/ui/asm/x86_64/interpolated-idents.rs b/src/test/ui/asm/x86_64/interpolated-idents.rs
index f4cb749307d..c05633ae885 100644
--- a/src/test/ui/asm/x86_64/interpolated-idents.rs
+++ b/src/test/ui/asm/x86_64/interpolated-idents.rs
@@ -1,6 +1,6 @@
 // only-x86_64
 
-#![feature(asm)]
+use std::arch::asm;
 
 macro_rules! m {
     ($in:ident $out:ident $lateout:ident $inout:ident $inlateout:ident $const:ident $sym:ident
diff --git a/src/test/ui/asm/x86_64/issue-82869.rs b/src/test/ui/asm/x86_64/issue-82869.rs
index a8e688cbe1f..3e632eaf88d 100644
--- a/src/test/ui/asm/x86_64/issue-82869.rs
+++ b/src/test/ui/asm/x86_64/issue-82869.rs
@@ -1,9 +1,10 @@
 // only-x86_64
 // Make sure rustc doesn't ICE on asm! for a foreign architecture.
 
-#![feature(asm)]
 #![crate_type = "rlib"]
 
+use std::arch::asm;
+
 pub unsafe fn aarch64(a: f64, b: f64) -> f64 {
     let c;
     asm!("add {:d}, {:d}, d0", out(vreg) c, in(vreg) a, in("d0") {
diff --git a/src/test/ui/asm/x86_64/issue-82869.stderr b/src/test/ui/asm/x86_64/issue-82869.stderr
index d05714ea6f2..42be1b6de72 100644
--- a/src/test/ui/asm/x86_64/issue-82869.stderr
+++ b/src/test/ui/asm/x86_64/issue-82869.stderr
@@ -1,17 +1,17 @@
 error: invalid register class `vreg`: unknown register class
-  --> $DIR/issue-82869.rs:9:32
+  --> $DIR/issue-82869.rs:10:32
    |
 LL |     asm!("add {:d}, {:d}, d0", out(vreg) c, in(vreg) a, in("d0") {
    |                                ^^^^^^^^^^^
 
 error: invalid register class `vreg`: unknown register class
-  --> $DIR/issue-82869.rs:9:45
+  --> $DIR/issue-82869.rs:10:45
    |
 LL |     asm!("add {:d}, {:d}, d0", out(vreg) c, in(vreg) a, in("d0") {
    |                                             ^^^^^^^^^^
 
 error: invalid register `d0`: unknown register
-  --> $DIR/issue-82869.rs:9:57
+  --> $DIR/issue-82869.rs:10:57
    |
 LL |       asm!("add {:d}, {:d}, d0", out(vreg) c, in(vreg) a, in("d0") {
    |  _________________________________________________________^
diff --git a/src/test/ui/asm/x86_64/issue-89875.rs b/src/test/ui/asm/x86_64/issue-89875.rs
index 9b2b21bbda6..e4b6687e00b 100644
--- a/src/test/ui/asm/x86_64/issue-89875.rs
+++ b/src/test/ui/asm/x86_64/issue-89875.rs
@@ -1,7 +1,9 @@
 // build-pass
 // only-x86_64
 
-#![feature(asm, target_feature_11)]
+#![feature(target_feature_11)]
+
+use std::arch::asm;
 
 #[target_feature(enable = "avx")]
 fn main() {
diff --git a/src/test/ui/asm/x86_64/may_unwind.rs b/src/test/ui/asm/x86_64/may_unwind.rs
index 5ac4dd9b956..9844d63f0cd 100644
--- a/src/test/ui/asm/x86_64/may_unwind.rs
+++ b/src/test/ui/asm/x86_64/may_unwind.rs
@@ -3,8 +3,9 @@
 // run-pass
 // needs-asm-support
 
-#![feature(asm, asm_sym, asm_unwind)]
+#![feature(asm_sym, asm_unwind)]
 
+use std::arch::asm;
 use std::panic::{catch_unwind, resume_unwind, AssertUnwindSafe};
 
 struct Foo<'a>(&'a mut bool);
diff --git a/src/test/ui/asm/x86_64/multiple-clobber-abi.rs b/src/test/ui/asm/x86_64/multiple-clobber-abi.rs
index a573d672d00..513eb270e4f 100644
--- a/src/test/ui/asm/x86_64/multiple-clobber-abi.rs
+++ b/src/test/ui/asm/x86_64/multiple-clobber-abi.rs
@@ -4,7 +4,9 @@
 
 // Checks that multiple clobber_abi options can be used
 
-#![feature(asm, asm_sym)]
+#![feature(asm_sym)]
+
+use std::arch::asm;
 
 extern "sysv64" fn foo(x: i32) -> i32 {
     x + 16
diff --git a/src/test/ui/asm/x86_64/parse-error.rs b/src/test/ui/asm/x86_64/parse-error.rs
index 1d6545f1b5c..f0629f9f51c 100644
--- a/src/test/ui/asm/x86_64/parse-error.rs
+++ b/src/test/ui/asm/x86_64/parse-error.rs
@@ -1,6 +1,8 @@
 // only-x86_64
 
-#![feature(asm, global_asm, asm_const)]
+#![feature(asm_const)]
+
+use std::arch::{asm, global_asm};
 
 fn main() {
     let mut foo = 0;
diff --git a/src/test/ui/asm/x86_64/parse-error.stderr b/src/test/ui/asm/x86_64/parse-error.stderr
index 4f16c15af38..2d0a7a94d56 100644
--- a/src/test/ui/asm/x86_64/parse-error.stderr
+++ b/src/test/ui/asm/x86_64/parse-error.stderr
@@ -1,89 +1,89 @@
 error: requires at least a template string argument
-  --> $DIR/parse-error.rs:9:9
+  --> $DIR/parse-error.rs:11:9
    |
 LL |         asm!();
    |         ^^^^^^
 
 error: asm template must be a string literal
-  --> $DIR/parse-error.rs:11:14
+  --> $DIR/parse-error.rs:13:14
    |
 LL |         asm!(foo);
    |              ^^^
 
 error: expected token: `,`
-  --> $DIR/parse-error.rs:13:19
+  --> $DIR/parse-error.rs:15:19
    |
 LL |         asm!("{}" foo);
    |                   ^^^ expected `,`
 
 error: expected operand, clobber_abi, options, or additional template string
-  --> $DIR/parse-error.rs:15:20
+  --> $DIR/parse-error.rs:17:20
    |
 LL |         asm!("{}", foo);
    |                    ^^^ expected operand, clobber_abi, options, or additional template string
 
 error: expected `(`, found `foo`
-  --> $DIR/parse-error.rs:17:23
+  --> $DIR/parse-error.rs:19:23
    |
 LL |         asm!("{}", in foo);
    |                       ^^^ expected `(`
 
 error: expected `)`, found `foo`
-  --> $DIR/parse-error.rs:19:27
+  --> $DIR/parse-error.rs:21:27
    |
 LL |         asm!("{}", in(reg foo));
    |                           ^^^ expected `)`
 
 error: expected expression, found end of macro arguments
-  --> $DIR/parse-error.rs:21:27
+  --> $DIR/parse-error.rs:23:27
    |
 LL |         asm!("{}", in(reg));
    |                           ^ expected expression
 
 error: expected register class or explicit register
-  --> $DIR/parse-error.rs:23:26
+  --> $DIR/parse-error.rs:25:26
    |
 LL |         asm!("{}", inout(=) foo => bar);
    |                          ^
 
 error: expected expression, found end of macro arguments
-  --> $DIR/parse-error.rs:25:37
+  --> $DIR/parse-error.rs:27:37
    |
 LL |         asm!("{}", inout(reg) foo =>);
    |                                     ^ expected expression
 
 error: expected one of `!`, `,`, `.`, `::`, `?`, `{`, or an operator, found `=>`
-  --> $DIR/parse-error.rs:27:32
+  --> $DIR/parse-error.rs:29:32
    |
 LL |         asm!("{}", in(reg) foo => bar);
    |                                ^^ expected one of 7 possible tokens
 
 error: argument to `sym` must be a path expression
-  --> $DIR/parse-error.rs:29:24
+  --> $DIR/parse-error.rs:31:24
    |
 LL |         asm!("{}", sym foo + bar);
    |                        ^^^^^^^^^
 
 error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
-  --> $DIR/parse-error.rs:31:26
+  --> $DIR/parse-error.rs:33:26
    |
 LL |         asm!("", options(foo));
    |                          ^^^ expected one of 10 possible tokens
 
 error: expected one of `)` or `,`, found `foo`
-  --> $DIR/parse-error.rs:33:32
+  --> $DIR/parse-error.rs:35:32
    |
 LL |         asm!("", options(nomem foo));
    |                                ^^^ expected one of `)` or `,`
 
 error: expected one of `)`, `att_syntax`, `may_unwind`, `nomem`, `noreturn`, `nostack`, `preserves_flags`, `pure`, `raw`, or `readonly`, found `foo`
-  --> $DIR/parse-error.rs:35:33
+  --> $DIR/parse-error.rs:37:33
    |
 LL |         asm!("", options(nomem, foo));
    |                                 ^^^ expected one of 10 possible tokens
 
 error: arguments are not allowed after options
-  --> $DIR/parse-error.rs:37:31
+  --> $DIR/parse-error.rs:39:31
    |
 LL |         asm!("{}", options(), const foo);
    |                    ---------  ^^^^^^^^^ argument
@@ -91,31 +91,31 @@ LL |         asm!("{}", options(), const foo);
    |                    previous options
 
 error: at least one abi must be provided as an argument to `clobber_abi`
-  --> $DIR/parse-error.rs:40:30
+  --> $DIR/parse-error.rs:42:30
    |
 LL |         asm!("", clobber_abi());
    |                              ^
 
 error: expected string literal
-  --> $DIR/parse-error.rs:42:30
+  --> $DIR/parse-error.rs:44:30
    |
 LL |         asm!("", clobber_abi(foo));
    |                              ^^^ not a string literal
 
 error: expected one of `)` or `,`, found `foo`
-  --> $DIR/parse-error.rs:44:34
+  --> $DIR/parse-error.rs:46:34
    |
 LL |         asm!("", clobber_abi("C" foo));
    |                                  ^^^ expected one of `)` or `,`
 
 error: expected string literal
-  --> $DIR/parse-error.rs:46:35
+  --> $DIR/parse-error.rs:48:35
    |
 LL |         asm!("", clobber_abi("C", foo));
    |                                   ^^^ not a string literal
 
 error: arguments are not allowed after clobber_abi
-  --> $DIR/parse-error.rs:48:38
+  --> $DIR/parse-error.rs:50:38
    |
 LL |         asm!("{}", clobber_abi("C"), const foo);
    |                    ----------------  ^^^^^^^^^ argument
@@ -123,7 +123,7 @@ LL |         asm!("{}", clobber_abi("C"), const foo);
    |                    clobber_abi
 
 error: clobber_abi is not allowed after options
-  --> $DIR/parse-error.rs:51:29
+  --> $DIR/parse-error.rs:53:29
    |
 LL |         asm!("", options(), clobber_abi("C"));
    |                  ---------  ^^^^^^^^^^^^^^^^
@@ -131,7 +131,7 @@ LL |         asm!("", options(), clobber_abi("C"));
    |                  options
 
 error: clobber_abi is not allowed after options
-  --> $DIR/parse-error.rs:53:31
+  --> $DIR/parse-error.rs:55:31
    |
 LL |         asm!("{}", options(), clobber_abi("C"), const foo);
    |                    ---------  ^^^^^^^^^^^^^^^^
@@ -139,7 +139,7 @@ LL |         asm!("{}", options(), clobber_abi("C"), const foo);
    |                    options
 
 error: duplicate argument named `a`
-  --> $DIR/parse-error.rs:55:36
+  --> $DIR/parse-error.rs:57:36
    |
 LL |         asm!("{a}", a = const foo, a = const bar);
    |                     -------------  ^^^^^^^^^^^^^ duplicate argument
@@ -147,7 +147,7 @@ LL |         asm!("{a}", a = const foo, a = const bar);
    |                     previously here
 
 error: argument never used
-  --> $DIR/parse-error.rs:55:36
+  --> $DIR/parse-error.rs:57:36
    |
 LL |         asm!("{a}", a = const foo, a = const bar);
    |                                    ^^^^^^^^^^^^^ argument never used
@@ -155,13 +155,13 @@ LL |         asm!("{a}", a = const foo, a = const bar);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
 
 error: explicit register arguments cannot have names
-  --> $DIR/parse-error.rs:60:18
+  --> $DIR/parse-error.rs:62:18
    |
 LL |         asm!("", a = in("eax") foo);
    |                  ^^^^^^^^^^^^^^^^^
 
 error: named arguments cannot follow explicit register arguments
-  --> $DIR/parse-error.rs:62:36
+  --> $DIR/parse-error.rs:64:36
    |
 LL |         asm!("{a}", in("eax") foo, a = const bar);
    |                     -------------  ^^^^^^^^^^^^^ named argument
@@ -169,7 +169,7 @@ LL |         asm!("{a}", in("eax") foo, a = const bar);
    |                     explicit register argument
 
 error: named arguments cannot follow explicit register arguments
-  --> $DIR/parse-error.rs:65:36
+  --> $DIR/parse-error.rs:67:36
    |
 LL |         asm!("{a}", in("eax") foo, a = const bar);
    |                     -------------  ^^^^^^^^^^^^^ named argument
@@ -177,7 +177,7 @@ LL |         asm!("{a}", in("eax") foo, a = const bar);
    |                     explicit register argument
 
 error: positional arguments cannot follow named arguments or explicit register arguments
-  --> $DIR/parse-error.rs:68:36
+  --> $DIR/parse-error.rs:70:36
    |
 LL |         asm!("{1}", in("eax") foo, const bar);
    |                     -------------  ^^^^^^^^^ positional argument
@@ -185,19 +185,19 @@ LL |         asm!("{1}", in("eax") foo, const bar);
    |                     explicit register argument
 
 error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `""`
-  --> $DIR/parse-error.rs:71:29
+  --> $DIR/parse-error.rs:73:29
    |
 LL |         asm!("", options(), "");
    |                             ^^ expected one of 9 possible tokens
 
 error: expected one of `clobber_abi`, `const`, `in`, `inlateout`, `inout`, `lateout`, `options`, `out`, or `sym`, found `"{}"`
-  --> $DIR/parse-error.rs:73:33
+  --> $DIR/parse-error.rs:75:33
    |
 LL |         asm!("{}", in(reg) foo, "{}", out(reg) foo);
    |                                 ^^^^ expected one of 9 possible tokens
 
 error: asm template must be a string literal
-  --> $DIR/parse-error.rs:75:14
+  --> $DIR/parse-error.rs:77:14
    |
 LL |         asm!(format!("{{{}}}", 0), in(reg) foo);
    |              ^^^^^^^^^^^^^^^^^^^^
@@ -205,7 +205,7 @@ LL |         asm!(format!("{{{}}}", 0), in(reg) foo);
    = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: asm template must be a string literal
-  --> $DIR/parse-error.rs:77:21
+  --> $DIR/parse-error.rs:79:21
    |
 LL |         asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
    |                     ^^^^^^^^^^^^^^^^^^^^
@@ -213,79 +213,79 @@ LL |         asm!("{1}", format!("{{{}}}", 0), in(reg) foo, out(reg) bar);
    = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: _ cannot be used for input operands
-  --> $DIR/parse-error.rs:79:28
+  --> $DIR/parse-error.rs:81:28
    |
 LL |         asm!("{}", in(reg) _);
    |                            ^
 
 error: _ cannot be used for input operands
-  --> $DIR/parse-error.rs:81:31
+  --> $DIR/parse-error.rs:83:31
    |
 LL |         asm!("{}", inout(reg) _);
    |                               ^
 
 error: _ cannot be used for input operands
-  --> $DIR/parse-error.rs:83:35
+  --> $DIR/parse-error.rs:85:35
    |
 LL |         asm!("{}", inlateout(reg) _);
    |                                   ^
 
 error: requires at least a template string argument
-  --> $DIR/parse-error.rs:90:1
+  --> $DIR/parse-error.rs:92:1
    |
 LL | global_asm!();
    | ^^^^^^^^^^^^^
 
 error: asm template must be a string literal
-  --> $DIR/parse-error.rs:92:13
+  --> $DIR/parse-error.rs:94:13
    |
 LL | global_asm!(FOO);
    |             ^^^
 
 error: expected token: `,`
-  --> $DIR/parse-error.rs:94:18
+  --> $DIR/parse-error.rs:96:18
    |
 LL | global_asm!("{}" FOO);
    |                  ^^^ expected `,`
 
 error: expected operand, options, or additional template string
-  --> $DIR/parse-error.rs:96:19
+  --> $DIR/parse-error.rs:98:19
    |
 LL | global_asm!("{}", FOO);
    |                   ^^^ expected operand, options, or additional template string
 
 error: expected expression, found end of macro arguments
-  --> $DIR/parse-error.rs:98:24
+  --> $DIR/parse-error.rs:100:24
    |
 LL | global_asm!("{}", const);
    |                        ^ expected expression
 
 error: expected one of `,`, `.`, `?`, or an operator, found `FOO`
-  --> $DIR/parse-error.rs:100:30
+  --> $DIR/parse-error.rs:102:30
    |
 LL | global_asm!("{}", const(reg) FOO);
    |                              ^^^ expected one of `,`, `.`, `?`, or an operator
 
 error: expected one of `)`, `att_syntax`, `may_unwind`, or `raw`, found `FOO`
-  --> $DIR/parse-error.rs:102:25
+  --> $DIR/parse-error.rs:104:25
    |
 LL | global_asm!("", options(FOO));
    |                         ^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw`
 
 error: expected one of `)`, `att_syntax`, `may_unwind`, or `raw`, found `nomem`
-  --> $DIR/parse-error.rs:104:25
+  --> $DIR/parse-error.rs:106:25
    |
 LL | global_asm!("", options(nomem FOO));
    |                         ^^^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw`
 
 error: expected one of `)`, `att_syntax`, `may_unwind`, or `raw`, found `nomem`
-  --> $DIR/parse-error.rs:106:25
+  --> $DIR/parse-error.rs:108:25
    |
 LL | global_asm!("", options(nomem, FOO));
    |                         ^^^^^ expected one of `)`, `att_syntax`, `may_unwind`, or `raw`
 
 error: arguments are not allowed after options
-  --> $DIR/parse-error.rs:108:30
+  --> $DIR/parse-error.rs:110:30
    |
 LL | global_asm!("{}", options(), const FOO);
    |                   ---------  ^^^^^^^^^ argument
@@ -293,25 +293,25 @@ LL | global_asm!("{}", options(), const FOO);
    |                   previous options
 
 error: expected string literal
-  --> $DIR/parse-error.rs:110:29
+  --> $DIR/parse-error.rs:112:29
    |
 LL | global_asm!("", clobber_abi(FOO));
    |                             ^^^ not a string literal
 
 error: expected one of `)` or `,`, found `FOO`
-  --> $DIR/parse-error.rs:112:33
+  --> $DIR/parse-error.rs:114:33
    |
 LL | global_asm!("", clobber_abi("C" FOO));
    |                                 ^^^ expected one of `)` or `,`
 
 error: expected string literal
-  --> $DIR/parse-error.rs:114:34
+  --> $DIR/parse-error.rs:116:34
    |
 LL | global_asm!("", clobber_abi("C", FOO));
    |                                  ^^^ not a string literal
 
 error: arguments are not allowed after clobber_abi
-  --> $DIR/parse-error.rs:116:37
+  --> $DIR/parse-error.rs:118:37
    |
 LL | global_asm!("{}", clobber_abi("C"), const FOO);
    |                   ----------------  ^^^^^^^^^ argument
@@ -319,13 +319,13 @@ LL | global_asm!("{}", clobber_abi("C"), const FOO);
    |                   clobber_abi
 
 error: `clobber_abi` cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:116:19
+  --> $DIR/parse-error.rs:118:19
    |
 LL | global_asm!("{}", clobber_abi("C"), const FOO);
    |                   ^^^^^^^^^^^^^^^^
 
 error: clobber_abi is not allowed after options
-  --> $DIR/parse-error.rs:119:28
+  --> $DIR/parse-error.rs:121:28
    |
 LL | global_asm!("", options(), clobber_abi("C"));
    |                 ---------  ^^^^^^^^^^^^^^^^
@@ -333,7 +333,7 @@ LL | global_asm!("", options(), clobber_abi("C"));
    |                 options
 
 error: clobber_abi is not allowed after options
-  --> $DIR/parse-error.rs:121:30
+  --> $DIR/parse-error.rs:123:30
    |
 LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
    |                   ---------  ^^^^^^^^^^^^^^^^
@@ -341,13 +341,13 @@ LL | global_asm!("{}", options(), clobber_abi("C"), const FOO);
    |                   options
 
 error: `clobber_abi` cannot be used with `global_asm!`
-  --> $DIR/parse-error.rs:123:17
+  --> $DIR/parse-error.rs:125:17
    |
 LL | global_asm!("", clobber_abi("C"), clobber_abi("C"));
    |                 ^^^^^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^
 
 error: duplicate argument named `a`
-  --> $DIR/parse-error.rs:125:35
+  --> $DIR/parse-error.rs:127:35
    |
 LL | global_asm!("{a}", a = const FOO, a = const BAR);
    |                    -------------  ^^^^^^^^^^^^^ duplicate argument
@@ -355,7 +355,7 @@ LL | global_asm!("{a}", a = const FOO, a = const BAR);
    |                    previously here
 
 error: argument never used
-  --> $DIR/parse-error.rs:125:35
+  --> $DIR/parse-error.rs:127:35
    |
 LL | global_asm!("{a}", a = const FOO, a = const BAR);
    |                                   ^^^^^^^^^^^^^ argument never used
@@ -363,19 +363,19 @@ LL | global_asm!("{a}", a = const FOO, a = const BAR);
    = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {1} */"`
 
 error: expected one of `clobber_abi`, `const`, or `options`, found `""`
-  --> $DIR/parse-error.rs:128:28
+  --> $DIR/parse-error.rs:130:28
    |
 LL | global_asm!("", options(), "");
    |                            ^^ expected one of `clobber_abi`, `const`, or `options`
 
 error: expected one of `clobber_abi`, `const`, or `options`, found `"{}"`
-  --> $DIR/parse-error.rs:130:30
+  --> $DIR/parse-error.rs:132:30
    |
 LL | global_asm!("{}", const FOO, "{}", const FOO);
    |                              ^^^^ expected one of `clobber_abi`, `const`, or `options`
 
 error: asm template must be a string literal
-  --> $DIR/parse-error.rs:132:13
+  --> $DIR/parse-error.rs:134:13
    |
 LL | global_asm!(format!("{{{}}}", 0), const FOO);
    |             ^^^^^^^^^^^^^^^^^^^^
@@ -383,7 +383,7 @@ LL | global_asm!(format!("{{{}}}", 0), const FOO);
    = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: asm template must be a string literal
-  --> $DIR/parse-error.rs:134:20
+  --> $DIR/parse-error.rs:136:20
    |
 LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
    |                    ^^^^^^^^^^^^^^^^^^^^
@@ -391,7 +391,7 @@ LL | global_asm!("{1}", format!("{{{}}}", 0), const FOO, const BAR);
    = note: this error originates in the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:37:37
+  --> $DIR/parse-error.rs:39:37
    |
 LL |     let mut foo = 0;
    |      ---------- help: consider using `const` instead of `let`: `const foo`
@@ -400,7 +400,7 @@ LL |         asm!("{}", options(), const foo);
    |                                     ^^^ non-constant value
 
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:48:44
+  --> $DIR/parse-error.rs:50:44
    |
 LL |     let mut foo = 0;
    |      ---------- help: consider using `const` instead of `let`: `const foo`
@@ -409,7 +409,7 @@ LL |         asm!("{}", clobber_abi("C"), const foo);
    |                                            ^^^ non-constant value
 
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:55:31
+  --> $DIR/parse-error.rs:57:31
    |
 LL |     let mut foo = 0;
    |      ---------- help: consider using `const` instead of `let`: `const foo`
@@ -418,7 +418,7 @@ LL |         asm!("{a}", a = const foo, a = const bar);
    |                               ^^^ non-constant value
 
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:55:46
+  --> $DIR/parse-error.rs:57:46
    |
 LL |     let mut bar = 0;
    |      ---------- help: consider using `const` instead of `let`: `const bar`
@@ -427,7 +427,7 @@ LL |         asm!("{a}", a = const foo, a = const bar);
    |                                              ^^^ non-constant value
 
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:62:46
+  --> $DIR/parse-error.rs:64:46
    |
 LL |     let mut bar = 0;
    |      ---------- help: consider using `const` instead of `let`: `const bar`
@@ -436,7 +436,7 @@ LL |         asm!("{a}", in("eax") foo, a = const bar);
    |                                              ^^^ non-constant value
 
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:65:46
+  --> $DIR/parse-error.rs:67:46
    |
 LL |     let mut bar = 0;
    |      ---------- help: consider using `const` instead of `let`: `const bar`
@@ -445,7 +445,7 @@ LL |         asm!("{a}", in("eax") foo, a = const bar);
    |                                              ^^^ non-constant value
 
 error[E0435]: attempt to use a non-constant value in a constant
-  --> $DIR/parse-error.rs:68:42
+  --> $DIR/parse-error.rs:70:42
    |
 LL |     let mut bar = 0;
    |      ---------- help: consider using `const` instead of `let`: `const bar`
diff --git a/src/test/ui/asm/x86_64/srcloc.rs b/src/test/ui/asm/x86_64/srcloc.rs
index c4ccfb8016a..8a21d759772 100644
--- a/src/test/ui/asm/x86_64/srcloc.rs
+++ b/src/test/ui/asm/x86_64/srcloc.rs
@@ -1,7 +1,8 @@
 // only-x86_64
 // build-fail
 // compile-flags: -Ccodegen-units=1
-#![feature(asm)]
+
+use std::arch::asm;
 
 // Checks that inline asm errors are mapped to the correct line in the source code.
 
diff --git a/src/test/ui/asm/x86_64/srcloc.stderr b/src/test/ui/asm/x86_64/srcloc.stderr
index 77894657292..b62c8948289 100644
--- a/src/test/ui/asm/x86_64/srcloc.stderr
+++ b/src/test/ui/asm/x86_64/srcloc.stderr
@@ -1,5 +1,5 @@
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:10:15
+  --> $DIR/srcloc.rs:11:15
    |
 LL |         asm!("invalid_instruction");
    |               ^
@@ -11,7 +11,7 @@ LL |     invalid_instruction
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:14:13
+  --> $DIR/srcloc.rs:15:13
    |
 LL |             invalid_instruction
    |             ^
@@ -23,7 +23,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:19:13
+  --> $DIR/srcloc.rs:20:13
    |
 LL |             invalid_instruction
    |             ^
@@ -35,7 +35,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:25:13
+  --> $DIR/srcloc.rs:26:13
    |
 LL |             invalid_instruction
    |             ^
@@ -47,7 +47,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:32:13
+  --> $DIR/srcloc.rs:33:13
    |
 LL |             invalid_instruction
    |             ^
@@ -59,7 +59,7 @@ LL |             invalid_instruction
    |             ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:37:14
+  --> $DIR/srcloc.rs:38:14
    |
 LL |         asm!(concat!("invalid", "_", "instruction"));
    |              ^
@@ -71,7 +71,7 @@ LL |     invalid_instruction
    |     ^^^^^^^^^^^^^^^^^^^
 
 warning: scale factor without index register is ignored
-  --> $DIR/srcloc.rs:40:15
+  --> $DIR/srcloc.rs:41:15
    |
 LL |         asm!("movaps %xmm3, (%esi, 2)", options(att_syntax));
    |               ^
@@ -83,7 +83,7 @@ LL |     movaps %xmm3, (%esi, 2)
    |                          ^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:44:14
+  --> $DIR/srcloc.rs:45:14
    |
 LL |             "invalid_instruction",
    |              ^
@@ -95,7 +95,7 @@ LL |     invalid_instruction
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:50:14
+  --> $DIR/srcloc.rs:51:14
    |
 LL |             "invalid_instruction",
    |              ^
@@ -107,7 +107,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:57:14
+  --> $DIR/srcloc.rs:58:14
    |
 LL |             "invalid_instruction",
    |              ^
@@ -119,7 +119,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:64:13
+  --> $DIR/srcloc.rs:65:13
    |
 LL |             concat!("invalid", "_", "instruction"),
    |             ^
@@ -131,7 +131,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction'
-  --> $DIR/srcloc.rs:71:13
+  --> $DIR/srcloc.rs:72:13
    |
 LL |             concat!("invalid", "_", "instruction"),
    |             ^
@@ -143,7 +143,7 @@ LL | invalid_instruction
    | ^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:78:14
+  --> $DIR/srcloc.rs:79:14
    |
 LL |             "invalid_instruction1",
    |              ^
@@ -155,7 +155,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:79:14
+  --> $DIR/srcloc.rs:80:14
    |
 LL |             "invalid_instruction2",
    |              ^
@@ -167,7 +167,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:85:13
+  --> $DIR/srcloc.rs:86:13
    |
 LL |             concat!(
    |             ^
@@ -179,7 +179,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:85:13
+  --> $DIR/srcloc.rs:86:13
    |
 LL |             concat!(
    |             ^
@@ -191,7 +191,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:94:13
+  --> $DIR/srcloc.rs:95:13
    |
 LL |             concat!(
    |             ^
@@ -203,7 +203,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:94:13
+  --> $DIR/srcloc.rs:95:13
    |
 LL |             concat!(
    |             ^
@@ -215,7 +215,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction3'
-  --> $DIR/srcloc.rs:98:13
+  --> $DIR/srcloc.rs:99:13
    |
 LL |             concat!(
    |             ^
@@ -227,7 +227,7 @@ LL | invalid_instruction3
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction4'
-  --> $DIR/srcloc.rs:98:13
+  --> $DIR/srcloc.rs:99:13
    |
 LL |             concat!(
    |             ^
@@ -239,7 +239,7 @@ LL | invalid_instruction4
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction1'
-  --> $DIR/srcloc.rs:109:13
+  --> $DIR/srcloc.rs:110:13
    |
 LL |             concat!(
    |             ^
@@ -251,7 +251,7 @@ LL |     invalid_instruction1
    |     ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction2'
-  --> $DIR/srcloc.rs:109:13
+  --> $DIR/srcloc.rs:110:13
    |
 LL |             concat!(
    |             ^
@@ -263,7 +263,7 @@ LL | invalid_instruction2
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction3'
-  --> $DIR/srcloc.rs:113:13
+  --> $DIR/srcloc.rs:114:13
    |
 LL |             concat!(
    |             ^
@@ -275,7 +275,7 @@ LL | invalid_instruction3
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: invalid instruction mnemonic 'invalid_instruction4'
-  --> $DIR/srcloc.rs:113:13
+  --> $DIR/srcloc.rs:114:13
    |
 LL |             concat!(
    |             ^
diff --git a/src/test/ui/asm/x86_64/sym.rs b/src/test/ui/asm/x86_64/sym.rs
index 958dbbdd376..fcb6c5fbfaf 100644
--- a/src/test/ui/asm/x86_64/sym.rs
+++ b/src/test/ui/asm/x86_64/sym.rs
@@ -3,7 +3,9 @@
 // only-linux
 // run-pass
 
-#![feature(asm, thread_local, asm_sym)]
+#![feature(thread_local, asm_sym)]
+
+use std::arch::asm;
 
 extern "C" fn f1() -> i32 {
     111
diff --git a/src/test/ui/asm/x86_64/target-feature-attr.rs b/src/test/ui/asm/x86_64/target-feature-attr.rs
index 4f82cd8aab9..14490c3e0f2 100644
--- a/src/test/ui/asm/x86_64/target-feature-attr.rs
+++ b/src/test/ui/asm/x86_64/target-feature-attr.rs
@@ -1,6 +1,8 @@
 // only-x86_64
 
-#![feature(asm, avx512_target_feature)]
+#![feature(avx512_target_feature)]
+
+use std::arch::asm;
 
 #[target_feature(enable = "avx")]
 unsafe fn foo() {
diff --git a/src/test/ui/asm/x86_64/target-feature-attr.stderr b/src/test/ui/asm/x86_64/target-feature-attr.stderr
index 295c8a97ed3..c852726ee7f 100644
--- a/src/test/ui/asm/x86_64/target-feature-attr.stderr
+++ b/src/test/ui/asm/x86_64/target-feature-attr.stderr
@@ -1,23 +1,23 @@
 error: register class `ymm_reg` requires the `avx` target feature
-  --> $DIR/target-feature-attr.rs:16:40
+  --> $DIR/target-feature-attr.rs:18:40
    |
 LL |     asm!("vaddps {2:y}, {0:y}, {1:y}", in(ymm_reg) x, in(ymm_reg) y, lateout(ymm_reg) x);
    |                                        ^^^^^^^^^^^^^
 
 error: register class `ymm_reg` requires the `avx` target feature
-  --> $DIR/target-feature-attr.rs:16:55
+  --> $DIR/target-feature-attr.rs:18:55
    |
 LL |     asm!("vaddps {2:y}, {0:y}, {1:y}", in(ymm_reg) x, in(ymm_reg) y, lateout(ymm_reg) x);
    |                                                       ^^^^^^^^^^^^^
 
 error: register class `ymm_reg` requires the `avx` target feature
-  --> $DIR/target-feature-attr.rs:16:70
+  --> $DIR/target-feature-attr.rs:18:70
    |
 LL |     asm!("vaddps {2:y}, {0:y}, {1:y}", in(ymm_reg) x, in(ymm_reg) y, lateout(ymm_reg) x);
    |                                                                      ^^^^^^^^^^^^^^^^^^
 
 error: register class `kreg` requires at least one of the following target features: avx512bw, avx512f
-  --> $DIR/target-feature-attr.rs:31:23
+  --> $DIR/target-feature-attr.rs:33:23
    |
 LL |     asm!("/* {0} */", in(kreg) x);
    |                       ^^^^^^^^^^
diff --git a/src/test/ui/asm/x86_64/type-check-2.rs b/src/test/ui/asm/x86_64/type-check-2.rs
index 94aadcf09f4..f95aebb78b5 100644
--- a/src/test/ui/asm/x86_64/type-check-2.rs
+++ b/src/test/ui/asm/x86_64/type-check-2.rs
@@ -1,6 +1,8 @@
 // only-x86_64
 
-#![feature(asm, repr_simd, never_type, asm_sym)]
+#![feature(repr_simd, never_type, asm_sym)]
+
+use std::arch::asm;
 
 #[repr(simd)]
 struct SimdNonCopy(f32, f32, f32, f32);
diff --git a/src/test/ui/asm/x86_64/type-check-2.stderr b/src/test/ui/asm/x86_64/type-check-2.stderr
index 9e73c9a8d6a..cec750fdf9a 100644
--- a/src/test/ui/asm/x86_64/type-check-2.stderr
+++ b/src/test/ui/asm/x86_64/type-check-2.stderr
@@ -1,13 +1,13 @@
 error: arguments for inline assembly must be copyable
-  --> $DIR/type-check-2.rs:42:32
+  --> $DIR/type-check-2.rs:44:32
    |
 LL |         asm!("{}", in(xmm_reg) SimdNonCopy(0.0, 0.0, 0.0, 0.0));
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `SimdNonCopy` does not implement the Copy trait
 
-error: cannot use value of type `[closure@$DIR/type-check-2.rs:54:28: 54:38]` for inline assembly
-  --> $DIR/type-check-2.rs:54:28
+error: cannot use value of type `[closure@$DIR/type-check-2.rs:56:28: 56:38]` for inline assembly
+  --> $DIR/type-check-2.rs:56:28
    |
 LL |         asm!("{}", in(reg) |x: i32| x);
    |                            ^^^^^^^^^^
@@ -15,7 +15,7 @@ LL |         asm!("{}", in(reg) |x: i32| x);
    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
 
 error: cannot use value of type `Vec<i32>` for inline assembly
-  --> $DIR/type-check-2.rs:56:28
+  --> $DIR/type-check-2.rs:58:28
    |
 LL |         asm!("{}", in(reg) vec![0]);
    |                            ^^^^^^^
@@ -24,7 +24,7 @@ LL |         asm!("{}", in(reg) vec![0]);
    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: cannot use value of type `(i32, i32, i32)` for inline assembly
-  --> $DIR/type-check-2.rs:58:28
+  --> $DIR/type-check-2.rs:60:28
    |
 LL |         asm!("{}", in(reg) (1, 2, 3));
    |                            ^^^^^^^^^
@@ -32,7 +32,7 @@ LL |         asm!("{}", in(reg) (1, 2, 3));
    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
 
 error: cannot use value of type `[i32; 3]` for inline assembly
-  --> $DIR/type-check-2.rs:60:28
+  --> $DIR/type-check-2.rs:62:28
    |
 LL |         asm!("{}", in(reg) [1, 2, 3]);
    |                            ^^^^^^^^^
@@ -40,7 +40,7 @@ LL |         asm!("{}", in(reg) [1, 2, 3]);
    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
 
 error: cannot use value of type `fn() {main}` for inline assembly
-  --> $DIR/type-check-2.rs:68:31
+  --> $DIR/type-check-2.rs:70:31
    |
 LL |         asm!("{}", inout(reg) f);
    |                               ^
@@ -48,7 +48,7 @@ LL |         asm!("{}", inout(reg) f);
    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
 
 error: cannot use value of type `&mut i32` for inline assembly
-  --> $DIR/type-check-2.rs:71:31
+  --> $DIR/type-check-2.rs:73:31
    |
 LL |         asm!("{}", inout(reg) r);
    |                               ^
@@ -56,31 +56,31 @@ LL |         asm!("{}", inout(reg) r);
    = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
 
 error: asm `sym` operand must point to a fn or static
-  --> $DIR/type-check-2.rs:35:24
+  --> $DIR/type-check-2.rs:37:24
    |
 LL |         asm!("{}", sym C);
    |                        ^
 
 error: asm `sym` operand must point to a fn or static
-  --> $DIR/type-check-2.rs:37:24
+  --> $DIR/type-check-2.rs:39:24
    |
 LL |         asm!("{}", sym x);
    |                        ^
 
 error[E0381]: use of possibly-uninitialized variable: `x`
-  --> $DIR/type-check-2.rs:13:28
+  --> $DIR/type-check-2.rs:15:28
    |
 LL |         asm!("{}", in(reg) x);
    |                            ^ use of possibly-uninitialized `x`
 
 error[E0381]: use of possibly-uninitialized variable: `y`
-  --> $DIR/type-check-2.rs:16:9
+  --> $DIR/type-check-2.rs:18:9
    |
 LL |         asm!("{}", inout(reg) y);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^ use of possibly-uninitialized `y`
 
 error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
-  --> $DIR/type-check-2.rs:24:29
+  --> $DIR/type-check-2.rs:26:29
    |
 LL |         let v: Vec<u64> = vec![0, 1, 2];
    |             - help: consider changing this to be mutable: `mut v`
@@ -89,7 +89,7 @@ LL |         asm!("{}", out(reg) v[0]);
    |                             ^ cannot borrow as mutable
 
 error[E0596]: cannot borrow `v` as mutable, as it is not declared as mutable
-  --> $DIR/type-check-2.rs:26:31
+  --> $DIR/type-check-2.rs:28:31
    |
 LL |         let v: Vec<u64> = vec![0, 1, 2];
    |             - help: consider changing this to be mutable: `mut v`
diff --git a/src/test/ui/asm/x86_64/type-check-3.rs b/src/test/ui/asm/x86_64/type-check-3.rs
index 83674cf8204..595de55fd8b 100644
--- a/src/test/ui/asm/x86_64/type-check-3.rs
+++ b/src/test/ui/asm/x86_64/type-check-3.rs
@@ -1,7 +1,9 @@
 // only-x86_64
 // compile-flags: -C target-feature=+avx512f
 
-#![feature(asm, global_asm, asm_const)]
+#![feature(asm_const)]
+
+use std::arch::{asm, global_asm};
 
 use std::arch::x86_64::{_mm256_setzero_ps, _mm_setzero_ps};
 
diff --git a/src/test/ui/asm/x86_64/type-check-3.stderr b/src/test/ui/asm/x86_64/type-check-3.stderr
index 9f6989ca03d..aeb638d6949 100644
--- a/src/test/ui/asm/x86_64/type-check-3.stderr
+++ b/src/test/ui/asm/x86_64/type-check-3.stderr
@@ -1,5 +1,5 @@
 error: type `i128` cannot be used with this register class
-  --> $DIR/type-check-3.rs:12:28
+  --> $DIR/type-check-3.rs:14:28
    |
 LL |         asm!("{}", in(reg) 0i128);
    |                            ^^^^^
@@ -7,7 +7,7 @@ LL |         asm!("{}", in(reg) 0i128);
    = note: register class `reg` supports these types: i16, i32, i64, f32, f64
 
 error: type `__m128` cannot be used with this register class
-  --> $DIR/type-check-3.rs:14:28
+  --> $DIR/type-check-3.rs:16:28
    |
 LL |         asm!("{}", in(reg) _mm_setzero_ps());
    |                            ^^^^^^^^^^^^^^^^
@@ -15,7 +15,7 @@ LL |         asm!("{}", in(reg) _mm_setzero_ps());
    = note: register class `reg` supports these types: i16, i32, i64, f32, f64
 
 error: type `__m256` cannot be used with this register class
-  --> $DIR/type-check-3.rs:16:28
+  --> $DIR/type-check-3.rs:18:28
    |
 LL |         asm!("{}", in(reg) _mm256_setzero_ps());
    |                            ^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL |         asm!("{}", in(reg) _mm256_setzero_ps());
    = note: register class `reg` supports these types: i16, i32, i64, f32, f64
 
 error: type `u8` cannot be used with this register class
-  --> $DIR/type-check-3.rs:18:32
+  --> $DIR/type-check-3.rs:20:32
    |
 LL |         asm!("{}", in(xmm_reg) 0u8);
    |                                ^^^
@@ -31,7 +31,7 @@ LL |         asm!("{}", in(xmm_reg) 0u8);
    = note: register class `xmm_reg` supports these types: i32, i64, f32, f64, i8x16, i16x8, i32x4, i64x2, f32x4, f64x2
 
 error: `avx512bw` target feature is not enabled
-  --> $DIR/type-check-3.rs:27:29
+  --> $DIR/type-check-3.rs:29:29
    |
 LL |         asm!("{}", in(kreg) 0u64);
    |                             ^^^^
@@ -39,7 +39,7 @@ LL |         asm!("{}", in(kreg) 0u64);
    = note: this is required to use type `u64` with register class `kreg`
 
 warning: formatting may not be suitable for sub-register argument
-  --> $DIR/type-check-3.rs:32:15
+  --> $DIR/type-check-3.rs:34:15
    |
 LL |         asm!("{0} {0}", in(reg) 0i16);
    |               ^^^ ^^^           ---- for this argument
@@ -49,7 +49,7 @@ LL |         asm!("{0} {0}", in(reg) 0i16);
    = help: or use the `r` modifier to keep the default formatting of `rax`
 
 warning: formatting may not be suitable for sub-register argument
-  --> $DIR/type-check-3.rs:34:15
+  --> $DIR/type-check-3.rs:36:15
    |
 LL |         asm!("{0} {0:x}", in(reg) 0i16);
    |               ^^^                 ---- for this argument
@@ -58,7 +58,7 @@ LL |         asm!("{0} {0:x}", in(reg) 0i16);
    = help: or use the `r` modifier to keep the default formatting of `rax`
 
 warning: formatting may not be suitable for sub-register argument
-  --> $DIR/type-check-3.rs:36:15
+  --> $DIR/type-check-3.rs:38:15
    |
 LL |         asm!("{}", in(reg) 0i32);
    |               ^^           ---- for this argument
@@ -67,7 +67,7 @@ LL |         asm!("{}", in(reg) 0i32);
    = help: or use the `r` modifier to keep the default formatting of `rax`
 
 warning: formatting may not be suitable for sub-register argument
-  --> $DIR/type-check-3.rs:39:15
+  --> $DIR/type-check-3.rs:41:15
    |
 LL |         asm!("{}", in(ymm_reg) 0i64);
    |               ^^               ---- for this argument
@@ -76,7 +76,7 @@ LL |         asm!("{}", in(ymm_reg) 0i64);
    = help: or use the `y` modifier to keep the default formatting of `ymm0`
 
 error: type `i8` cannot be used with this register class
-  --> $DIR/type-check-3.rs:50:28
+  --> $DIR/type-check-3.rs:52:28
    |
 LL |         asm!("{}", in(reg) 0i8);
    |                            ^^^
@@ -85,7 +85,7 @@ LL |         asm!("{}", in(reg) 0i8);
    = help: consider using the `reg_byte` register class instead
 
 error: incompatible types for asm inout argument
-  --> $DIR/type-check-3.rs:62:33
+  --> $DIR/type-check-3.rs:64:33
    |
 LL |         asm!("{:r}", inout(reg) 0u32 => val_f32);
    |                                 ^^^^    ^^^^^^^ type `f32`
@@ -95,7 +95,7 @@ LL |         asm!("{:r}", inout(reg) 0u32 => val_f32);
    = note: asm inout arguments must have the same type, unless they are both pointers or integers of the same size
 
 error: incompatible types for asm inout argument
-  --> $DIR/type-check-3.rs:64:33
+  --> $DIR/type-check-3.rs:66:33
    |
 LL |         asm!("{:r}", inout(reg) 0u32 => val_ptr);
    |                                 ^^^^    ^^^^^^^ type `*mut u8`
@@ -105,7 +105,7 @@ LL |         asm!("{:r}", inout(reg) 0u32 => val_ptr);
    = note: asm inout arguments must have the same type, unless they are both pointers or integers of the same size
 
 error: incompatible types for asm inout argument
-  --> $DIR/type-check-3.rs:66:33
+  --> $DIR/type-check-3.rs:68:33
    |
 LL |         asm!("{:r}", inout(reg) main => val_u32);
    |                                 ^^^^    ^^^^^^^ type `u32`
@@ -115,7 +115,7 @@ LL |         asm!("{:r}", inout(reg) main => val_u32);
    = note: asm inout arguments must have the same type, unless they are both pointers or integers of the same size
 
 error[E0013]: constants cannot refer to statics
-  --> $DIR/type-check-3.rs:82:25
+  --> $DIR/type-check-3.rs:84:25
    |
 LL | global_asm!("{}", const S);
    |                         ^
@@ -123,7 +123,7 @@ LL | global_asm!("{}", const S);
    = help: consider extracting the value of the `static` to a `const`, and referring to that
 
 error[E0013]: constants cannot refer to statics
-  --> $DIR/type-check-3.rs:85:35
+  --> $DIR/type-check-3.rs:87:35
    |
 LL | global_asm!("{}", const const_foo(S));
    |                                   ^
@@ -131,7 +131,7 @@ LL | global_asm!("{}", const const_foo(S));
    = help: consider extracting the value of the `static` to a `const`, and referring to that
 
 error[E0013]: constants cannot refer to statics
-  --> $DIR/type-check-3.rs:88:35
+  --> $DIR/type-check-3.rs:90:35
    |
 LL | global_asm!("{}", const const_bar(S));
    |                                   ^
diff --git a/src/test/ui/consts/inline_asm.rs b/src/test/ui/consts/inline_asm.rs
index b46ca6ba6df..4cd7e2717fe 100644
--- a/src/test/ui/consts/inline_asm.rs
+++ b/src/test/ui/consts/inline_asm.rs
@@ -1,6 +1,6 @@
 // needs-asm-support
 
-#![feature(asm)]
+use std::arch::asm;
 
 const _: () = unsafe { asm!("nop") };
 //~^ ERROR inline assembly
diff --git a/src/test/ui/consts/miri_unleashed/inline_asm.rs b/src/test/ui/consts/miri_unleashed/inline_asm.rs
index b9421330d05..1bb22a1301a 100644
--- a/src/test/ui/consts/miri_unleashed/inline_asm.rs
+++ b/src/test/ui/consts/miri_unleashed/inline_asm.rs
@@ -1,9 +1,11 @@
 // compile-flags: -Zunleash-the-miri-inside-of-you
 // only-x86_64
-#![feature(asm,llvm_asm)]
+#![feature(llvm_asm)]
 #![allow(const_err)]
 #![allow(deprecated)] // llvm_asm!
 
+use std::arch::asm;
+
 fn main() {}
 
 // Make sure we catch executing inline assembly.
diff --git a/src/test/ui/consts/miri_unleashed/inline_asm.stderr b/src/test/ui/consts/miri_unleashed/inline_asm.stderr
index ac9191a340c..34ac808ed17 100644
--- a/src/test/ui/consts/miri_unleashed/inline_asm.stderr
+++ b/src/test/ui/consts/miri_unleashed/inline_asm.stderr
@@ -1,5 +1,5 @@
 error[E0080]: could not evaluate static initializer
-  --> $DIR/inline_asm.rs:11:14
+  --> $DIR/inline_asm.rs:13:14
    |
 LL |     unsafe { llvm_asm!("xor %eax, %eax" ::: "eax"); }
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ inline assembly is not supported
@@ -7,7 +7,7 @@ LL |     unsafe { llvm_asm!("xor %eax, %eax" ::: "eax"); }
    = note: this error originates in the macro `llvm_asm` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0080]: could not evaluate static initializer
-  --> $DIR/inline_asm.rs:20:14
+  --> $DIR/inline_asm.rs:22:14
    |
 LL |     unsafe { asm!("nop"); }
    |              ^^^^^^^^^^^ inline assembly is not supported
@@ -15,12 +15,12 @@ LL |     unsafe { asm!("nop"); }
 warning: skipping const checks
    |
 help: skipping check that does not even have a feature gate
-  --> $DIR/inline_asm.rs:11:14
+  --> $DIR/inline_asm.rs:13:14
    |
 LL |     unsafe { llvm_asm!("xor %eax, %eax" ::: "eax"); }
    |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 help: skipping check that does not even have a feature gate
-  --> $DIR/inline_asm.rs:20:14
+  --> $DIR/inline_asm.rs:22:14
    |
 LL |     unsafe { asm!("nop"); }
    |              ^^^^^^^^^^^
diff --git a/src/test/ui/empty_global_asm.rs b/src/test/ui/empty_global_asm.rs
index efbe2b2eb67..bff5c203b91 100644
--- a/src/test/ui/empty_global_asm.rs
+++ b/src/test/ui/empty_global_asm.rs
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(global_asm)]
+use std::arch::global_asm;
 
 #[cfg(target_arch = "x86")]
 global_asm!("");
diff --git a/src/test/ui/feature-gates/feature-gate-asm.rs b/src/test/ui/feature-gates/feature-gate-asm.rs
index b4dca7216b1..556219b98a9 100644
--- a/src/test/ui/feature-gates/feature-gate-asm.rs
+++ b/src/test/ui/feature-gates/feature-gate-asm.rs
@@ -4,8 +4,6 @@
 
 fn main() {
     unsafe {
-        asm!("");
-        //~^ ERROR inline assembly is not stable enough
         llvm_asm!("");
         //~^ ERROR prefer using the new asm! syntax instead
     }
diff --git a/src/test/ui/feature-gates/feature-gate-asm.stderr b/src/test/ui/feature-gates/feature-gate-asm.stderr
index 144a4258184..72ba70d0d91 100644
--- a/src/test/ui/feature-gates/feature-gate-asm.stderr
+++ b/src/test/ui/feature-gates/feature-gate-asm.stderr
@@ -1,14 +1,5 @@
-error[E0658]: use of unstable library feature 'asm': inline assembly is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-asm.rs:7:9
-   |
-LL |         asm!("");
-   |         ^^^
-   |
-   = note: see issue #72016 <https://github.com/rust-lang/rust/issues/72016> for more information
-   = help: add `#![feature(asm)]` to the crate attributes to enable
-
 error[E0658]: use of unstable library feature 'llvm_asm': prefer using the new asm! syntax instead
-  --> $DIR/feature-gate-asm.rs:9:9
+  --> $DIR/feature-gate-asm.rs:7:9
    |
 LL |         llvm_asm!("");
    |         ^^^^^^^^
@@ -16,6 +7,6 @@ LL |         llvm_asm!("");
    = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
    = help: add `#![feature(llvm_asm)]` to the crate attributes to enable
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/feature-gates/feature-gate-asm2.rs b/src/test/ui/feature-gates/feature-gate-asm2.rs
index 9044f2cb6af..712e3a56fd8 100644
--- a/src/test/ui/feature-gates/feature-gate-asm2.rs
+++ b/src/test/ui/feature-gates/feature-gate-asm2.rs
@@ -4,8 +4,6 @@
 
 fn main() {
     unsafe {
-        println!("{:?}", asm!(""));
-        //~^ ERROR inline assembly is not stable enough
         println!("{:?}", llvm_asm!(""));
         //~^ ERROR prefer using the new asm! syntax instead
     }
diff --git a/src/test/ui/feature-gates/feature-gate-asm2.stderr b/src/test/ui/feature-gates/feature-gate-asm2.stderr
index 0b0c8a64d22..0297fec16dd 100644
--- a/src/test/ui/feature-gates/feature-gate-asm2.stderr
+++ b/src/test/ui/feature-gates/feature-gate-asm2.stderr
@@ -1,14 +1,5 @@
-error[E0658]: use of unstable library feature 'asm': inline assembly is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-asm2.rs:7:26
-   |
-LL |         println!("{:?}", asm!(""));
-   |                          ^^^
-   |
-   = note: see issue #72016 <https://github.com/rust-lang/rust/issues/72016> for more information
-   = help: add `#![feature(asm)]` to the crate attributes to enable
-
 error[E0658]: use of unstable library feature 'llvm_asm': prefer using the new asm! syntax instead
-  --> $DIR/feature-gate-asm2.rs:9:26
+  --> $DIR/feature-gate-asm2.rs:7:26
    |
 LL |         println!("{:?}", llvm_asm!(""));
    |                          ^^^^^^^^
@@ -16,6 +7,6 @@ LL |         println!("{:?}", llvm_asm!(""));
    = note: see issue #70173 <https://github.com/rust-lang/rust/issues/70173> for more information
    = help: add `#![feature(llvm_asm)]` to the crate attributes to enable
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/feature-gates/feature-gate-asm_const.rs b/src/test/ui/feature-gates/feature-gate-asm_const.rs
index c152b54c669..d41d7b258aa 100644
--- a/src/test/ui/feature-gates/feature-gate-asm_const.rs
+++ b/src/test/ui/feature-gates/feature-gate-asm_const.rs
@@ -1,6 +1,6 @@
 // only-x86_64
 
-#![feature(asm)]
+use std::arch::asm;
 
 fn main() {
     unsafe {
diff --git a/src/test/ui/feature-gates/feature-gate-asm_sym.rs b/src/test/ui/feature-gates/feature-gate-asm_sym.rs
index d89c7dd0ef4..e4d781c6859 100644
--- a/src/test/ui/feature-gates/feature-gate-asm_sym.rs
+++ b/src/test/ui/feature-gates/feature-gate-asm_sym.rs
@@ -1,6 +1,6 @@
 // only-x86_64
 
-#![feature(asm)]
+use std::arch::asm;
 
 fn main() {
     unsafe {
diff --git a/src/test/ui/feature-gates/feature-gate-asm_unwind.rs b/src/test/ui/feature-gates/feature-gate-asm_unwind.rs
index c9957ff91d5..df161b60081 100644
--- a/src/test/ui/feature-gates/feature-gate-asm_unwind.rs
+++ b/src/test/ui/feature-gates/feature-gate-asm_unwind.rs
@@ -1,6 +1,6 @@
 // only-x86_64
 
-#![feature(asm)]
+use std::arch::asm;
 
 fn main() {
     unsafe {
diff --git a/src/test/ui/feature-gates/feature-gate-global_asm.rs b/src/test/ui/feature-gates/feature-gate-global_asm.rs
deleted file mode 100644
index 1420eef299b..00000000000
--- a/src/test/ui/feature-gates/feature-gate-global_asm.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-// needs-asm-support
-
-global_asm!(""); //~ ERROR `global_asm!` is not stable
-
-fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-global_asm.stderr b/src/test/ui/feature-gates/feature-gate-global_asm.stderr
deleted file mode 100644
index 7c4d3e3e6e5..00000000000
--- a/src/test/ui/feature-gates/feature-gate-global_asm.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: use of unstable library feature 'global_asm': `global_asm!` is not stable enough for use and is subject to change
-  --> $DIR/feature-gate-global_asm.rs:3:1
-   |
-LL | global_asm!("");
-   | ^^^^^^^^^^
-   |
-   = note: see issue #35119 <https://github.com/rust-lang/rust/issues/35119> for more information
-   = help: add `#![feature(global_asm)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/feature-gates/feature-gate-naked_functions.rs b/src/test/ui/feature-gates/feature-gate-naked_functions.rs
index 71ca5b9373a..8e93b194174 100644
--- a/src/test/ui/feature-gates/feature-gate-naked_functions.rs
+++ b/src/test/ui/feature-gates/feature-gate-naked_functions.rs
@@ -1,5 +1,6 @@
 // needs-asm-support
-#![feature(asm)]
+
+use std::arch::asm;
 
 #[naked]
 //~^ the `#[naked]` attribute is an experimental feature
diff --git a/src/test/ui/feature-gates/feature-gate-naked_functions.stderr b/src/test/ui/feature-gates/feature-gate-naked_functions.stderr
index 653d7b738da..4378fb36367 100644
--- a/src/test/ui/feature-gates/feature-gate-naked_functions.stderr
+++ b/src/test/ui/feature-gates/feature-gate-naked_functions.stderr
@@ -1,5 +1,5 @@
 error[E0658]: the `#[naked]` attribute is an experimental feature
-  --> $DIR/feature-gate-naked_functions.rs:4:1
+  --> $DIR/feature-gate-naked_functions.rs:5:1
    |
 LL | #[naked]
    | ^^^^^^^^
@@ -8,7 +8,7 @@ LL | #[naked]
    = help: add `#![feature(naked_functions)]` to the crate attributes to enable
 
 error[E0658]: the `#[naked]` attribute is an experimental feature
-  --> $DIR/feature-gate-naked_functions.rs:10:1
+  --> $DIR/feature-gate-naked_functions.rs:11:1
    |
 LL | #[naked]
    | ^^^^^^^^
diff --git a/src/test/ui/liveness/liveness-asm.rs b/src/test/ui/liveness/liveness-asm.rs
index b51da0e0d8c..ea5f033cb86 100644
--- a/src/test/ui/liveness/liveness-asm.rs
+++ b/src/test/ui/liveness/liveness-asm.rs
@@ -3,11 +3,12 @@
 // only-x86_64
 // check-pass
 
-#![feature(asm)]
 #![allow(dead_code)]
 #![warn(unused_assignments)]
 #![warn(unused_variables)]
 
+use std::arch::asm;
+
 // Test the single inout case
 unsafe fn f1(mut src: *const u8) {
     asm!("/*{0}*/", inout(reg) src); //~ WARN value assigned to `src` is never read
diff --git a/src/test/ui/liveness/liveness-asm.stderr b/src/test/ui/liveness/liveness-asm.stderr
index f385d7a8065..d052aca338c 100644
--- a/src/test/ui/liveness/liveness-asm.stderr
+++ b/src/test/ui/liveness/liveness-asm.stderr
@@ -1,18 +1,18 @@
 warning: value assigned to `src` is never read
-  --> $DIR/liveness-asm.rs:13:32
+  --> $DIR/liveness-asm.rs:14:32
    |
 LL |     asm!("/*{0}*/", inout(reg) src);
    |                                ^^^
    |
 note: the lint level is defined here
-  --> $DIR/liveness-asm.rs:8:9
+  --> $DIR/liveness-asm.rs:7:9
    |
 LL | #![warn(unused_assignments)]
    |         ^^^^^^^^^^^^^^^^^^
    = help: maybe it is overwritten before being read?
 
 warning: value assigned to `src` is never read
-  --> $DIR/liveness-asm.rs:23:39
+  --> $DIR/liveness-asm.rs:24:39
    |
 LL |     asm!("/*{0}*/", inout(reg) src => src);
    |                                       ^^^
diff --git a/src/test/ui/macros/global-asm.rs b/src/test/ui/macros/global-asm.rs
index b8903e07cfd..26e90edce0b 100644
--- a/src/test/ui/macros/global-asm.rs
+++ b/src/test/ui/macros/global-asm.rs
@@ -1,7 +1,7 @@
-#![feature(global_asm)]
+use std::arch::global_asm;
 
 fn main() {
-    global_asm!();  //~ ERROR requires at least a template string argument
+    global_asm!(); //~ ERROR requires at least a template string argument
     global_asm!(struct); //~ ERROR expected expression
     global_asm!(123); //~ ERROR asm template must be a string literal
 }
diff --git a/src/test/ui/macros/macro-expanded-include/foo/mod.rs b/src/test/ui/macros/macro-expanded-include/foo/mod.rs
index a8bfa0299f6..cff110470f2 100644
--- a/src/test/ui/macros/macro-expanded-include/foo/mod.rs
+++ b/src/test/ui/macros/macro-expanded-include/foo/mod.rs
@@ -5,5 +5,5 @@ macro_rules! m {
 }
 
 macro_rules! n {
-    () => { unsafe { asm!(include_str!("file.txt")); } }
+    () => { unsafe { core::arch::asm!(include_str!("file.txt")); } }
 }
diff --git a/src/test/ui/macros/macro-expanded-include/test.rs b/src/test/ui/macros/macro-expanded-include/test.rs
index 6a2b5ef7241..20da58a7e8e 100644
--- a/src/test/ui/macros/macro-expanded-include/test.rs
+++ b/src/test/ui/macros/macro-expanded-include/test.rs
@@ -1,13 +1,13 @@
 // needs-asm-support
 // build-pass (FIXME(62277): could be check-pass?)
-#![feature(asm)]
 #![allow(unused)]
 
 #[macro_use]
 mod foo;
 
 m!();
-fn f() { n!(); }
-
+fn f() {
+    n!();
+}
 
 fn main() {}
diff --git a/src/test/ui/macros/macros-nonfatal-errors.rs b/src/test/ui/macros/macros-nonfatal-errors.rs
index 24adc0fb407..66e6a2fb783 100644
--- a/src/test/ui/macros/macros-nonfatal-errors.rs
+++ b/src/test/ui/macros/macros-nonfatal-errors.rs
@@ -3,7 +3,7 @@
 // test that errors in a (selection) of macros don't kill compilation
 // immediately, so that we get more errors listed at a time.
 
-#![feature(asm, llvm_asm)]
+#![feature(llvm_asm)]
 #![feature(trace_macros, concat_idents)]
 #![feature(stmt_expr_attributes, arbitrary_enum_discriminant)]
 #![feature(derive_default_enum)]
diff --git a/src/test/ui/macros/macros-nonfatal-errors.stderr b/src/test/ui/macros/macros-nonfatal-errors.stderr
index 64065cd272a..56e4a07843d 100644
--- a/src/test/ui/macros/macros-nonfatal-errors.stderr
+++ b/src/test/ui/macros/macros-nonfatal-errors.stderr
@@ -126,12 +126,6 @@ LL |     Foo,
    |
    = help: consider a manual implementation of `Default`
 
-error: asm template must be a string literal
-  --> $DIR/macros-nonfatal-errors.rs:99:10
-   |
-LL |     asm!(invalid);
-   |          ^^^^^^^
-
 error: inline assembly must be a string literal
   --> $DIR/macros-nonfatal-errors.rs:100:15
    |
@@ -221,5 +215,14 @@ error: trace_macros! accepts only `true` or `false`
 LL |     trace_macros!(invalid);
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
+error: cannot find macro `asm` in this scope
+  --> $DIR/macros-nonfatal-errors.rs:99:5
+   |
+LL |     asm!(invalid);
+   |     ^^^
+   |
+   = note: consider importing this macro:
+           std::arch::asm
+
 error: aborting due to 27 previous errors
 
diff --git a/src/test/ui/rfc-2091-track-caller/error-with-naked.rs b/src/test/ui/rfc-2091-track-caller/error-with-naked.rs
index 9464ffe8722..0045d608133 100644
--- a/src/test/ui/rfc-2091-track-caller/error-with-naked.rs
+++ b/src/test/ui/rfc-2091-track-caller/error-with-naked.rs
@@ -1,5 +1,7 @@
 // needs-asm-support
-#![feature(asm, naked_functions)]
+#![feature(naked_functions)]
+
+use std::arch::asm;
 
 #[track_caller] //~ ERROR cannot use `#[track_caller]` with `#[naked]`
 #[naked]
diff --git a/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr b/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr
index 5f17d6b2b51..d33aecc0f97 100644
--- a/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr
+++ b/src/test/ui/rfc-2091-track-caller/error-with-naked.stderr
@@ -1,11 +1,11 @@
 error[E0736]: cannot use `#[track_caller]` with `#[naked]`
-  --> $DIR/error-with-naked.rs:4:1
+  --> $DIR/error-with-naked.rs:6:1
    |
 LL | #[track_caller]
    | ^^^^^^^^^^^^^^^
 
 error[E0736]: cannot use `#[track_caller]` with `#[naked]`
-  --> $DIR/error-with-naked.rs:13:5
+  --> $DIR/error-with-naked.rs:15:5
    |
 LL |     #[track_caller]
    |     ^^^^^^^^^^^^^^^
diff --git a/src/test/ui/simple_global_asm.rs b/src/test/ui/simple_global_asm.rs
index 75b4788b56f..3c69379ff14 100644
--- a/src/test/ui/simple_global_asm.rs
+++ b/src/test/ui/simple_global_asm.rs
@@ -1,11 +1,10 @@
 // run-pass
 
-#![feature(global_asm)]
 #![feature(naked_functions)]
 #![allow(dead_code)]
 
 #[cfg(any(target_arch = "x86_64", target_arch = "x86"))]
-global_asm!(
+core::arch::global_asm!(
     r#"
     .global foo
     .global _foo
diff --git a/src/test/ui/unsafe/inline_asm.mir.stderr b/src/test/ui/unsafe/inline_asm.mir.stderr
index 865d5cc61ca..fee93dc070d 100644
--- a/src/test/ui/unsafe/inline_asm.mir.stderr
+++ b/src/test/ui/unsafe/inline_asm.mir.stderr
@@ -1,5 +1,5 @@
 error[E0133]: use of inline assembly is unsafe and requires unsafe function or block
-  --> $DIR/inline_asm.rs:10:5
+  --> $DIR/inline_asm.rs:11:5
    |
 LL |     asm!("nop");
    |     ^^^^^^^^^^^ use of inline assembly
@@ -7,7 +7,7 @@ LL |     asm!("nop");
    = note: inline assembly is entirely unchecked and can cause undefined behavior
 
 error[E0133]: use of inline assembly is unsafe and requires unsafe function or block
-  --> $DIR/inline_asm.rs:11:5
+  --> $DIR/inline_asm.rs:12:5
    |
 LL |     llvm_asm!("nop");
    |     ^^^^^^^^^^^^^^^^ use of inline assembly
diff --git a/src/test/ui/unsafe/inline_asm.rs b/src/test/ui/unsafe/inline_asm.rs
index 8e1325bc0a8..7c1f86ac0e0 100644
--- a/src/test/ui/unsafe/inline_asm.rs
+++ b/src/test/ui/unsafe/inline_asm.rs
@@ -3,9 +3,10 @@
 // needs-asm-support
 
 #![feature(llvm_asm)]
-#![feature(asm)]
 #![allow(deprecated)] // llvm_asm!
 
+use std::arch::asm;
+
 fn main() {
     asm!("nop"); //~ ERROR use of inline assembly is unsafe and requires unsafe function or block
     llvm_asm!("nop"); //~ ERROR use of inline assembly is unsafe and requires unsafe function or block
diff --git a/src/test/ui/unsafe/inline_asm.thir.stderr b/src/test/ui/unsafe/inline_asm.thir.stderr
index 865d5cc61ca..fee93dc070d 100644
--- a/src/test/ui/unsafe/inline_asm.thir.stderr
+++ b/src/test/ui/unsafe/inline_asm.thir.stderr
@@ -1,5 +1,5 @@
 error[E0133]: use of inline assembly is unsafe and requires unsafe function or block
-  --> $DIR/inline_asm.rs:10:5
+  --> $DIR/inline_asm.rs:11:5
    |
 LL |     asm!("nop");
    |     ^^^^^^^^^^^ use of inline assembly
@@ -7,7 +7,7 @@ LL |     asm!("nop");
    = note: inline assembly is entirely unchecked and can cause undefined behavior
 
 error[E0133]: use of inline assembly is unsafe and requires unsafe function or block
-  --> $DIR/inline_asm.rs:11:5
+  --> $DIR/inline_asm.rs:12:5
    |
 LL |     llvm_asm!("nop");
    |     ^^^^^^^^^^^^^^^^ use of inline assembly