about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/codegen/array-cmp.rs55
-rw-r--r--tests/codegen/cffi/ffi-const.rs2
-rw-r--r--tests/codegen/cffi/ffi-pure.rs2
-rw-r--r--tests/codegen/dont-shuffle-bswaps.rs9
-rw-r--r--tests/codegen/intrinsics/select_unpredictable.rs8
-rw-r--r--tests/incremental/const-generic-type-cycle.rs5
-rw-r--r--tests/incremental/delayed_span_bug.rs3
-rw-r--r--tests/incremental/link_order/main.rs3
-rw-r--r--tests/mir-opt/jump_threading.bitwise_not.JumpThreading.panic-abort.diff6
-rw-r--r--tests/mir-opt/jump_threading.bitwise_not.JumpThreading.panic-unwind.diff6
-rw-r--r--tests/mir-opt/jump_threading.logical_not.JumpThreading.panic-abort.diff46
-rw-r--r--tests/mir-opt/jump_threading.logical_not.JumpThreading.panic-unwind.diff46
-rw-r--r--tests/mir-opt/jump_threading.rs14
-rw-r--r--tests/mir-opt/tail_expr_drop_order_unwind.method_1.ElaborateDrops.after.panic-abort.mir3
-rw-r--r--tests/mir-opt/tail_expr_drop_order_unwind.method_1.ElaborateDrops.after.panic-unwind.mir3
-rw-r--r--tests/rustdoc-ui/deprecated-attrs.rs1
-rw-r--r--tests/rustdoc-ui/deprecated-attrs.stderr6
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout2
-rw-r--r--tests/rustdoc-ui/invalid-theme-name.rs2
-rw-r--r--tests/ui-fulldeps/missing-rustc-driver-error.rs8
-rw-r--r--tests/ui-fulldeps/stable-mir/check_abi.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_allocation.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_assoc_items.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_attribute.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_binop.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_crate_defs.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_def_ty.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_defs.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_foreign.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_instance.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_intrinsics.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_item_kind.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_normalization.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_trait_queries.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_transform.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/check_ty_fold.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/compilation-result.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/crate-info.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/projections.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/smir_serde.rs1
-rw-r--r--tests/ui-fulldeps/stable-mir/smir_visitor.rs1
-rw-r--r--tests/ui/abi/fixed_x18.rs1
-rw-r--r--tests/ui/asm/naked-functions-rustic-abi.rs27
-rw-r--r--tests/ui/asm/naked-functions-testattrs.rs9
-rw-r--r--tests/ui/asm/naked-functions-testattrs.stderr8
-rw-r--r--tests/ui/asm/naked-functions.rs12
-rw-r--r--tests/ui/asm/naked-functions.stderr22
-rw-r--r--tests/ui/associated-types/issue-36499.rs2
-rw-r--r--tests/ui/associated-types/issue-36499.stderr2
-rw-r--r--tests/ui/async-await/post-cleanup-phase-validation.rs19
-rw-r--r--tests/ui/async-await/suggest-missing-await.rs1
-rw-r--r--tests/ui/async-await/suggest-missing-await.stderr22
-rw-r--r--tests/ui/attributes/z-crate-attr/garbage.stderr16
-rw-r--r--tests/ui/attributes/z-crate-attr/injection.rs6
-rw-r--r--tests/ui/attributes/z-crate-attr/injection.stderr17
-rw-r--r--tests/ui/attributes/z-crate-attr/injection2.rs3
-rw-r--r--tests/ui/attributes/z-crate-attr/injection2.stderr15
-rw-r--r--tests/ui/attributes/z-crate-attr/inner-attr.stderr6
-rw-r--r--tests/ui/attributes/z-crate-attr/multiple.rs4
-rw-r--r--tests/ui/attributes/z-crate-attr/multiple.stderr8
-rw-r--r--tests/ui/attributes/z-crate-attr/unbalanced-paren.rs4
-rw-r--r--tests/ui/attributes/z-crate-attr/unbalanced-paren.stderr13
-rw-r--r--tests/ui/cast/cast-array-issue-138836.rs5
-rw-r--r--tests/ui/cast/cast-array-issue-138836.stderr9
-rw-r--r--tests/ui/cast/cast-as-bool.rs2
-rw-r--r--tests/ui/cast/cast-as-bool.stderr22
-rw-r--r--tests/ui/cfg/cfg_false_no_std-2.rs2
-rw-r--r--tests/ui/check-cfg/cargo-feature.rs3
-rw-r--r--tests/ui/codegen/empty-static-libs-issue-108825.rs4
-rw-r--r--tests/ui/conditional-compilation/cfg-arg-invalid-1.rs6
-rw-r--r--tests/ui/conditional-compilation/cfg-arg-invalid-2.rs6
-rw-r--r--tests/ui/conditional-compilation/cfg-arg-invalid-4.rs6
-rw-r--r--tests/ui/conditional-compilation/cfg-arg-invalid-6.rs6
-rw-r--r--tests/ui/conditional-compilation/cfg-arg-invalid-8.rs6
-rw-r--r--tests/ui/conditional-compilation/cfg-arg-invalid-9.rs6
-rw-r--r--tests/ui/conditional-compilation/cfg-empty-codemap.rs6
-rw-r--r--tests/ui/consts/const-cast-wrong-type.rs2
-rw-r--r--tests/ui/consts/const-cast-wrong-type.stderr6
-rw-r--r--tests/ui/consts/miri_unleashed/drop.rs3
-rw-r--r--tests/ui/consts/miri_unleashed/drop.stderr4
-rw-r--r--tests/ui/debuginfo/dwarf-versions.rs1
-rw-r--r--tests/ui/drop/drop_elaboration_with_errors2.rs (renamed from tests/crashes/137287.rs)6
-rw-r--r--tests/ui/drop/drop_elaboration_with_errors2.stderr47
-rw-r--r--tests/ui/drop/drop_elaboration_with_errors3.rs (renamed from tests/crashes/135668.rs)8
-rw-r--r--tests/ui/drop/drop_elaboration_with_errors3.stderr8
-rw-r--r--tests/ui/error-codes/E0152-duplicate-lang-items.rs4
-rw-r--r--tests/ui/error-codes/E0152-duplicate-lang-items.stderr3
-rw-r--r--tests/ui/error-codes/E0602.rs6
-rw-r--r--tests/ui/extern-flag/invalid-crate-name-dashed.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-ffi_const.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-ffi_const.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-ffi_pure.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-ffi_pure.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.rs26
-rw-r--r--tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.stderr33
-rw-r--r--tests/ui/ffi-attrs/ffi_const.rs11
-rw-r--r--tests/ui/ffi-attrs/ffi_const.stderr25
-rw-r--r--tests/ui/ffi-attrs/ffi_const2.rs4
-rw-r--r--tests/ui/ffi-attrs/ffi_const2.stderr4
-rw-r--r--tests/ui/ffi-attrs/ffi_pure.rs11
-rw-r--r--tests/ui/ffi-attrs/ffi_pure.stderr25
-rw-r--r--tests/ui/fn/suggest-return-closure.rs1
-rw-r--r--tests/ui/fn/suggest-return-closure.stderr6
-rw-r--r--tests/ui/issues/issue-37131.rs3
-rw-r--r--tests/ui/layout/unknown-when-no-type-parameter.rs4
-rw-r--r--tests/ui/layout/unknown-when-no-type-parameter.stderr2
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-1.rs3
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-1.stderr2
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-2.rs3
-rw-r--r--tests/ui/link-native-libs/suggest-libname-only-2.stderr2
-rw-r--r--tests/ui/lint/cli-unknown-force-warn.rs6
-rw-r--r--tests/ui/lint/dead-code/self-assign.rs30
-rw-r--r--tests/ui/lint/dead-code/self-assign.stderr44
-rw-r--r--tests/ui/lint/lint-removed-cmdline-deny.rs6
-rw-r--r--tests/ui/lint/lint-removed-cmdline-deny.stderr4
-rw-r--r--tests/ui/lint/lint-removed-cmdline.rs6
-rw-r--r--tests/ui/lint/lint-removed-cmdline.stderr4
-rw-r--r--tests/ui/lint/lint-renamed-cmdline-deny.rs9
-rw-r--r--tests/ui/lint/lint-renamed-cmdline-deny.stderr4
-rw-r--r--tests/ui/lint/lint-renamed-cmdline.rs6
-rw-r--r--tests/ui/lint/lint-renamed-cmdline.stderr4
-rw-r--r--tests/ui/lint/lint-unknown-lint-cmdline-deny.rs11
-rw-r--r--tests/ui/lint/lint-unknown-lint-cmdline.rs11
-rw-r--r--tests/ui/lint/non-local-defs/cargo-update.rs3
-rw-r--r--tests/ui/lint/removed-lints/undefined_naked_function_abi.rs5
-rw-r--r--tests/ui/lint/removed-lints/undefined_naked_function_abi.stderr10
-rw-r--r--tests/ui/macros/macro-as-fn-body.rs2
-rw-r--r--tests/ui/macros/remove-repetition-issue-139480.rs28
-rw-r--r--tests/ui/macros/remove-repetition-issue-139480.stderr44
-rw-r--r--tests/ui/macros/syntax-error-recovery.rs4
-rw-r--r--tests/ui/macros/syntax-error-recovery.stderr6
-rw-r--r--tests/ui/missing/missing-return.rs5
-rw-r--r--tests/ui/missing/missing-return.stderr2
-rw-r--r--tests/ui/nested-ty-params.rs1
-rw-r--r--tests/ui/nested-ty-params.stderr4
-rw-r--r--tests/ui/no_std/no-std-no-start-binary.rs1
-rw-r--r--tests/ui/optimization-remark.rs5
-rw-r--r--tests/ui/packed/packed-struct-generic-transmute.rs2
-rw-r--r--tests/ui/packed/packed-struct-generic-transmute.stderr2
-rw-r--r--tests/ui/packed/packed-struct-transmute.rs1
-rw-r--r--tests/ui/packed/packed-struct-transmute.stderr2
-rw-r--r--tests/ui/panic-runtime/two-panic-runtimes.rs2
-rw-r--r--tests/ui/panic-runtime/want-abort-got-unwind.rs2
-rw-r--r--tests/ui/panic-runtime/want-abort-got-unwind2.rs2
-rw-r--r--tests/ui/parser/inverted-parameters.rs2
-rw-r--r--tests/ui/parser/inverted-parameters.stderr12
-rw-r--r--tests/ui/parser/recover/raw-no-const-mut.rs31
-rw-r--r--tests/ui/parser/recover/raw-no-const-mut.stderr109
-rw-r--r--tests/ui/parser/utf16-be-without-bom.rsbin202 -> 183 bytes
-rw-r--r--tests/ui/parser/utf16-le-without-bom.rsbin203 -> 184 bytes
-rw-r--r--tests/ui/print-request/print-lints-help.rs5
-rw-r--r--tests/ui/proc-macro/inner-attrs.rs9
-rw-r--r--tests/ui/proc-macro/inner-attrs.stderr8
-rw-r--r--tests/ui/proc-macro/inner-attrs.stdout356
-rw-r--r--tests/ui/regions/region-invariant-static-error-reporting.rs3
-rw-r--r--tests/ui/resolve/auxiliary/empty.rs1
-rw-r--r--tests/ui/resolve/prim-crate-partial-res.rs8
-rw-r--r--tests/ui/resolve/prim-crate-partial-res.stderr17
-rw-r--r--tests/ui/rfcs/rfc-3467-unsafe-pinned/unsafe-pinned-hides-niche.rs29
-rw-r--r--tests/ui/suggestions/suggest-ref-mut.rs2
-rw-r--r--tests/ui/suggestions/suggest-ref-mut.stderr8
-rw-r--r--tests/ui/target-feature/forbidden-target-feature-flag-disable.rs2
-rw-r--r--tests/ui/target-feature/tied-features-no-implication-1.rs2
-rw-r--r--tests/ui/test-attrs/test-should-panic-failed-show-span.rs46
-rw-r--r--tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr13
-rw-r--r--tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout32
-rw-r--r--tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs1
-rw-r--r--tests/ui/typeck/issue-90027-async-fn-return-suggestion.stderr8
-rw-r--r--tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs3
-rw-r--r--tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs3
170 files changed, 1268 insertions, 554 deletions
diff --git a/tests/codegen/array-cmp.rs b/tests/codegen/array-cmp.rs
index 2565a385b61..0d337655401 100644
--- a/tests/codegen/array-cmp.rs
+++ b/tests/codegen/array-cmp.rs
@@ -1,6 +1,7 @@
 // Ensure the asm for array comparisons is properly optimized.
 
 //@ compile-flags: -C opt-level=2
+//@ needs-deterministic-layouts (checks depend on tuple layout)
 
 #![crate_type = "lib"]
 
@@ -17,3 +18,57 @@ pub fn compare() -> bool {
             [0x00, 0x00, 0x48, 0x41]
         }
 }
+
+// CHECK-LABEL: @array_of_tuple_le
+#[no_mangle]
+pub fn array_of_tuple_le(a: &[(i16, u16); 2], b: &[(i16, u16); 2]) -> bool {
+    // Ensure that, after all the optimizations have run, the happy path just checks
+    // `eq` on each corresponding pair and moves onto the next one if it is.
+    // Then there's a dedup'd comparison for the place that's different.
+    // (As opposed to, say, running a full `[su]cmp` as part of checking equality.)
+
+    // This is written quite specifically because different library code was triggering
+    // <https://github.com/llvm/llvm-project/issues/132678> along the way, so this
+    // has enough checks to make sure that's not happening. It doesn't need to be
+    // *exactly* this IR, but be careful if you ever need to update these checks.
+
+    // CHECK: start:
+    // CHECK: %[[A00:.+]] = load i16, ptr %a
+    // CHECK: %[[B00:.+]] = load i16, ptr %b
+    // CHECK-NOT: cmp
+    // CHECK: %[[EQ00:.+]] = icmp eq i16 %[[A00]], %[[B00]]
+    // CHECK-NEXT: br i1 %[[EQ00]], label %[[L01:.+]], label %[[EXIT_S:.+]]
+
+    // CHECK: [[L01]]:
+    // CHECK: %[[PA01:.+]] = getelementptr{{.+}}i8, ptr %a, {{i32|i64}} 2
+    // CHECK: %[[PB01:.+]] = getelementptr{{.+}}i8, ptr %b, {{i32|i64}} 2
+    // CHECK: %[[A01:.+]] = load i16, ptr %[[PA01]]
+    // CHECK: %[[B01:.+]] = load i16, ptr %[[PB01]]
+    // CHECK-NOT: cmp
+    // CHECK: %[[EQ01:.+]] = icmp eq i16 %[[A01]], %[[B01]]
+    // CHECK-NEXT: br i1 %[[EQ01]], label %[[L10:.+]], label %[[EXIT_U:.+]]
+
+    // CHECK: [[L10]]:
+    // CHECK: %[[PA10:.+]] = getelementptr{{.+}}i8, ptr %a, {{i32|i64}} 4
+    // CHECK: %[[PB10:.+]] = getelementptr{{.+}}i8, ptr %b, {{i32|i64}} 4
+    // CHECK: %[[A10:.+]] = load i16, ptr %[[PA10]]
+    // CHECK: %[[B10:.+]] = load i16, ptr %[[PB10]]
+    // CHECK-NOT: cmp
+    // CHECK: %[[EQ10:.+]] = icmp eq i16 %[[A10]], %[[B10]]
+    // CHECK-NEXT: br i1 %[[EQ10]], label %[[L11:.+]], label %[[EXIT_S]]
+
+    // CHECK: [[L11]]:
+    // CHECK: %[[PA11:.+]] = getelementptr{{.+}}i8, ptr %a, {{i32|i64}} 6
+    // CHECK: %[[PB11:.+]] = getelementptr{{.+}}i8, ptr %b, {{i32|i64}} 6
+    // CHECK: %[[A11:.+]] = load i16, ptr %[[PA11]]
+    // CHECK: %[[B11:.+]] = load i16, ptr %[[PB11]]
+    // CHECK-NOT: cmp
+    // CHECK: %[[EQ11:.+]] = icmp eq i16 %[[A11]], %[[B11]]
+    // CHECK-NEXT: br i1 %[[EQ11]], label %[[DONE:.+]], label %[[EXIT_U]]
+
+    // CHECK: [[DONE]]:
+    // CHECK: %[[RET:.+]] = phi i1 [ %{{.+}}, %[[EXIT_S]] ], [ %{{.+}}, %[[EXIT_U]] ], [ true, %[[L11]] ]
+    // CHECK: ret i1 %[[RET]]
+
+    a <= b
+}
diff --git a/tests/codegen/cffi/ffi-const.rs b/tests/codegen/cffi/ffi-const.rs
index 6c90902e89f..3ea9d517ec2 100644
--- a/tests/codegen/cffi/ffi-const.rs
+++ b/tests/codegen/cffi/ffi-const.rs
@@ -10,6 +10,6 @@ extern "C" {
     // CHECK-LABEL: declare{{.*}}void @foo()
     // CHECK-SAME: [[ATTRS:#[0-9]+]]
     // CHECK-DAG: attributes [[ATTRS]] = { {{.*}}memory(none){{.*}} }
-    #[ffi_const]
+    #[unsafe(ffi_const)]
     pub fn foo();
 }
diff --git a/tests/codegen/cffi/ffi-pure.rs b/tests/codegen/cffi/ffi-pure.rs
index 2c5d5f5b4b1..a61e80ecf65 100644
--- a/tests/codegen/cffi/ffi-pure.rs
+++ b/tests/codegen/cffi/ffi-pure.rs
@@ -10,6 +10,6 @@ extern "C" {
     // CHECK-LABEL: declare{{.*}}void @foo()
     // CHECK-SAME: [[ATTRS:#[0-9]+]]
     // CHECK-DAG: attributes [[ATTRS]] = { {{.*}}memory(read){{.*}} }
-    #[ffi_pure]
+    #[unsafe(ffi_pure)]
     pub fn foo();
 }
diff --git a/tests/codegen/dont-shuffle-bswaps.rs b/tests/codegen/dont-shuffle-bswaps.rs
index e100474f606..c1dab2bc295 100644
--- a/tests/codegen/dont-shuffle-bswaps.rs
+++ b/tests/codegen/dont-shuffle-bswaps.rs
@@ -1,8 +1,11 @@
-//@ revisions: OPT2 OPT3
+//@ revisions: OPT2 OPT3 OPT3_S390X
 //@[OPT2] compile-flags: -Copt-level=2
 //@[OPT3] compile-flags: -C opt-level=3
 // some targets don't do the opt we are looking for
 //@[OPT3] only-64bit
+//@[OPT3] ignore-s390x
+//@[OPT3_S390X] compile-flags: -C opt-level=3 -C target-cpu=z13
+//@[OPT3_S390X] only-s390x
 
 #![crate_type = "lib"]
 #![no_std]
@@ -17,6 +20,10 @@
 // OPT3-NEXT: call <8 x i16> @llvm.bswap
 // OPT3-NEXT: store <8 x i16>
 // OPT3-NEXT: ret void
+// OPT3_S390X: load <8 x i16>
+// OPT3_S390X-NEXT: call <8 x i16> @llvm.bswap
+// OPT3_S390X-NEXT: store <8 x i16>
+// OPT3_S390X-NEXT: ret void
 #[no_mangle]
 pub fn convert(value: [u16; 8]) -> [u8; 16] {
     #[cfg(target_endian = "little")]
diff --git a/tests/codegen/intrinsics/select_unpredictable.rs b/tests/codegen/intrinsics/select_unpredictable.rs
index 68a02c8342d..2db4ae174b3 100644
--- a/tests/codegen/intrinsics/select_unpredictable.rs
+++ b/tests/codegen/intrinsics/select_unpredictable.rs
@@ -46,21 +46,21 @@ pub fn test_zst(p: bool, a: (), b: ()) -> () {
 pub fn test_int2(p: bool, a: u64, b: u64) -> u64 {
     // CHECK-LABEL: define{{.*}} @test_int2
     // CHECK: select i1 %p, i64 %a, i64 %b, !unpredictable
-    p.select_unpredictable(a, b)
+    core::hint::select_unpredictable(p, a, b)
 }
 
 #[no_mangle]
 pub fn test_pair2(p: bool, a: (u64, u64), b: (u64, u64)) -> (u64, u64) {
     // CHECK-LABEL: define{{.*}} @test_pair2
     // CHECK: select i1 %p, {{.*}}, !unpredictable
-    p.select_unpredictable(a, b)
+    core::hint::select_unpredictable(p, a, b)
 }
 
 #[no_mangle]
 pub fn test_struct2(p: bool, a: Large, b: Large) -> Large {
     // CHECK-LABEL: define{{.*}} @test_struct2
     // CHECK: select i1 %p, {{.*}}, !unpredictable
-    p.select_unpredictable(a, b)
+    core::hint::select_unpredictable(p, a, b)
 }
 
 #[no_mangle]
@@ -68,5 +68,5 @@ pub fn test_zst2(p: bool, a: (), b: ()) -> () {
     // CHECK-LABEL: define{{.*}} @test_zst2
     // CHECK-NEXT: start:
     // CHECK-NEXT: ret void
-    p.select_unpredictable(a, b)
+    core::hint::select_unpredictable(p, a, b)
 }
diff --git a/tests/incremental/const-generic-type-cycle.rs b/tests/incremental/const-generic-type-cycle.rs
index cd0437f7ef6..40a40ebd13f 100644
--- a/tests/incremental/const-generic-type-cycle.rs
+++ b/tests/incremental/const-generic-type-cycle.rs
@@ -3,7 +3,6 @@
 //
 //@ compile-flags: -Zincremental-ignore-spans
 //@ revisions: cpass cfail
-//@ error-pattern: cycle detected when computing type of `Bar::N`
 
 #![feature(trait_alias)]
 #![crate_type="lib"]
@@ -13,5 +12,9 @@ trait Bar<const N: usize> {}
 
 #[cfg(cfail)]
 trait Bar<const N: dyn BB> {}
+//[cfail]~^ ERROR cycle detected when computing type of `Bar::N`
+//[cfail]~| ERROR cycle detected when computing type of `Bar::N`
+//[cfail]~| ERROR cycle detected when computing type of `Bar::N`
+//[cfail]~| ERROR `(dyn Bar<{ 2 + 1 }> + 'static)` is forbidden as the type of a const generic parameter
 
 trait BB = Bar<{ 2 + 1 }>;
diff --git a/tests/incremental/delayed_span_bug.rs b/tests/incremental/delayed_span_bug.rs
index 1534aca5ddd..7b409db2e18 100644
--- a/tests/incremental/delayed_span_bug.rs
+++ b/tests/incremental/delayed_span_bug.rs
@@ -1,8 +1,7 @@
 //@ revisions: cfail1 cfail2
 //@ should-ice
-//@ error-pattern: delayed bug triggered by #[rustc_delayed_bug_from_inside_query]
 
 #![feature(rustc_attrs)]
 
 #[rustc_delayed_bug_from_inside_query]
-fn main() {}
+fn main() {} //~ ERROR delayed bug triggered by #[rustc_delayed_bug_from_inside_query]
diff --git a/tests/incremental/link_order/main.rs b/tests/incremental/link_order/main.rs
index 847a47a7559..20931e25dd4 100644
--- a/tests/incremental/link_order/main.rs
+++ b/tests/incremental/link_order/main.rs
@@ -1,5 +1,4 @@
 //@ aux-build:my_lib.rs
-//@ error-pattern: error: linking with
 //@ revisions:cfail1 cfail2
 //@ compile-flags:-Z query-dep-graph
 
@@ -10,3 +9,5 @@
 extern crate my_lib;
 
 fn main() {}
+
+//~? ERROR linking with
diff --git a/tests/mir-opt/jump_threading.bitwise_not.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.bitwise_not.JumpThreading.panic-abort.diff
index 047441e6099..c3272f21d6c 100644
--- a/tests/mir-opt/jump_threading.bitwise_not.JumpThreading.panic-abort.diff
+++ b/tests/mir-opt/jump_threading.bitwise_not.JumpThreading.panic-abort.diff
@@ -3,7 +3,7 @@
   
   fn bitwise_not() -> i32 {
       let mut _0: i32;
-      let mut _1: i32;
+      let _1: i32;
       let mut _2: bool;
       let mut _3: i32;
       let mut _4: i32;
@@ -13,7 +13,6 @@
   
       bb0: {
           StorageLive(_1);
-          _1 = const 0_i32;
           _1 = const 1_i32;
           StorageLive(_2);
           StorageLive(_3);
@@ -22,7 +21,8 @@
           _3 = Not(move _4);
           StorageDead(_4);
           _2 = Eq(move _3, const 0_i32);
-          switchInt(move _2) -> [0: bb2, otherwise: bb1];
+-         switchInt(move _2) -> [0: bb2, otherwise: bb1];
++         goto -> bb2;
       }
   
       bb1: {
diff --git a/tests/mir-opt/jump_threading.bitwise_not.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.bitwise_not.JumpThreading.panic-unwind.diff
index 047441e6099..c3272f21d6c 100644
--- a/tests/mir-opt/jump_threading.bitwise_not.JumpThreading.panic-unwind.diff
+++ b/tests/mir-opt/jump_threading.bitwise_not.JumpThreading.panic-unwind.diff
@@ -3,7 +3,7 @@
   
   fn bitwise_not() -> i32 {
       let mut _0: i32;
-      let mut _1: i32;
+      let _1: i32;
       let mut _2: bool;
       let mut _3: i32;
       let mut _4: i32;
@@ -13,7 +13,6 @@
   
       bb0: {
           StorageLive(_1);
-          _1 = const 0_i32;
           _1 = const 1_i32;
           StorageLive(_2);
           StorageLive(_3);
@@ -22,7 +21,8 @@
           _3 = Not(move _4);
           StorageDead(_4);
           _2 = Eq(move _3, const 0_i32);
-          switchInt(move _2) -> [0: bb2, otherwise: bb1];
+-         switchInt(move _2) -> [0: bb2, otherwise: bb1];
++         goto -> bb2;
       }
   
       bb1: {
diff --git a/tests/mir-opt/jump_threading.logical_not.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.logical_not.JumpThreading.panic-abort.diff
new file mode 100644
index 00000000000..ad8be1ef5a1
--- /dev/null
+++ b/tests/mir-opt/jump_threading.logical_not.JumpThreading.panic-abort.diff
@@ -0,0 +1,46 @@
+- // MIR for `logical_not` before JumpThreading
++ // MIR for `logical_not` after JumpThreading
+  
+  fn logical_not() -> i32 {
+      let mut _0: i32;
+      let _1: bool;
+      let mut _2: bool;
+      let mut _3: bool;
+      let mut _4: bool;
+      scope 1 {
+          debug a => _1;
+      }
+  
+      bb0: {
+          StorageLive(_1);
+          _1 = const false;
+          StorageLive(_2);
+          StorageLive(_3);
+          StorageLive(_4);
+          _4 = copy _1;
+          _3 = Not(move _4);
+          StorageDead(_4);
+          _2 = Eq(move _3, const true);
+-         switchInt(move _2) -> [0: bb2, otherwise: bb1];
++         goto -> bb1;
+      }
+  
+      bb1: {
+          StorageDead(_3);
+          _0 = const 1_i32;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          StorageDead(_3);
+          _0 = const 0_i32;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_2);
+          StorageDead(_1);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.logical_not.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.logical_not.JumpThreading.panic-unwind.diff
new file mode 100644
index 00000000000..ad8be1ef5a1
--- /dev/null
+++ b/tests/mir-opt/jump_threading.logical_not.JumpThreading.panic-unwind.diff
@@ -0,0 +1,46 @@
+- // MIR for `logical_not` before JumpThreading
++ // MIR for `logical_not` after JumpThreading
+  
+  fn logical_not() -> i32 {
+      let mut _0: i32;
+      let _1: bool;
+      let mut _2: bool;
+      let mut _3: bool;
+      let mut _4: bool;
+      scope 1 {
+          debug a => _1;
+      }
+  
+      bb0: {
+          StorageLive(_1);
+          _1 = const false;
+          StorageLive(_2);
+          StorageLive(_3);
+          StorageLive(_4);
+          _4 = copy _1;
+          _3 = Not(move _4);
+          StorageDead(_4);
+          _2 = Eq(move _3, const true);
+-         switchInt(move _2) -> [0: bb2, otherwise: bb1];
++         goto -> bb1;
+      }
+  
+      bb1: {
+          StorageDead(_3);
+          _0 = const 1_i32;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          StorageDead(_3);
+          _0 = const 0_i32;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_2);
+          StorageDead(_1);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.rs b/tests/mir-opt/jump_threading.rs
index 743ee8e728b..009e1060700 100644
--- a/tests/mir-opt/jump_threading.rs
+++ b/tests/mir-opt/jump_threading.rs
@@ -532,14 +532,19 @@ fn floats() -> u32 {
 
 pub fn bitwise_not() -> i32 {
     // CHECK-LABEL: fn bitwise_not(
-    // CHECK: switchInt(
 
     // Test for #131195, which was optimizing `!a == b` into `a != b`.
-    let mut a: i32 = 0;
-    a = 1;
+    let a = 1;
     if !a == 0 { 1 } else { 0 }
 }
 
+pub fn logical_not() -> i32 {
+    // CHECK-LABEL: fn logical_not(
+
+    let a = false;
+    if !a == true { 1 } else { 0 }
+}
+
 fn main() {
     // CHECK-LABEL: fn main(
     too_complex(Ok(0));
@@ -555,6 +560,8 @@ fn main() {
     aggregate(7);
     assume(7, false);
     floats();
+    bitwise_not();
+    logical_not();
 }
 
 // EMIT_MIR jump_threading.too_complex.JumpThreading.diff
@@ -572,3 +579,4 @@ fn main() {
 // EMIT_MIR jump_threading.aggregate_copy.JumpThreading.diff
 // EMIT_MIR jump_threading.floats.JumpThreading.diff
 // EMIT_MIR jump_threading.bitwise_not.JumpThreading.diff
+// EMIT_MIR jump_threading.logical_not.JumpThreading.diff
diff --git a/tests/mir-opt/tail_expr_drop_order_unwind.method_1.ElaborateDrops.after.panic-abort.mir b/tests/mir-opt/tail_expr_drop_order_unwind.method_1.ElaborateDrops.after.panic-abort.mir
index ee6e16d20fd..7d7cb76960e 100644
--- a/tests/mir-opt/tail_expr_drop_order_unwind.method_1.ElaborateDrops.after.panic-abort.mir
+++ b/tests/mir-opt/tail_expr_drop_order_unwind.method_1.ElaborateDrops.after.panic-abort.mir
@@ -73,9 +73,6 @@ fn method_1(_1: Guard) -> () {
     }
 
     bb7: {
-        backward incompatible drop(_2);
-        backward incompatible drop(_4);
-        backward incompatible drop(_5);
         goto -> bb21;
     }
 
diff --git a/tests/mir-opt/tail_expr_drop_order_unwind.method_1.ElaborateDrops.after.panic-unwind.mir b/tests/mir-opt/tail_expr_drop_order_unwind.method_1.ElaborateDrops.after.panic-unwind.mir
index ee6e16d20fd..7d7cb76960e 100644
--- a/tests/mir-opt/tail_expr_drop_order_unwind.method_1.ElaborateDrops.after.panic-unwind.mir
+++ b/tests/mir-opt/tail_expr_drop_order_unwind.method_1.ElaborateDrops.after.panic-unwind.mir
@@ -73,9 +73,6 @@ fn method_1(_1: Guard) -> () {
     }
 
     bb7: {
-        backward incompatible drop(_2);
-        backward incompatible drop(_4);
-        backward incompatible drop(_5);
         goto -> bb21;
     }
 
diff --git a/tests/rustdoc-ui/deprecated-attrs.rs b/tests/rustdoc-ui/deprecated-attrs.rs
index 0ae65a5eaf7..dcf8a52de41 100644
--- a/tests/rustdoc-ui/deprecated-attrs.rs
+++ b/tests/rustdoc-ui/deprecated-attrs.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: --passes unknown-pass
-//@ error-pattern: the `passes` flag no longer functions
 
 #![doc(no_default_passes)]
 //~^ ERROR unknown `doc` attribute `no_default_passes`
diff --git a/tests/rustdoc-ui/deprecated-attrs.stderr b/tests/rustdoc-ui/deprecated-attrs.stderr
index a30523e7329..3e982052233 100644
--- a/tests/rustdoc-ui/deprecated-attrs.stderr
+++ b/tests/rustdoc-ui/deprecated-attrs.stderr
@@ -4,7 +4,7 @@ warning: the `passes` flag no longer functions
    = help: you may want to use --document-private-items
 
 error: unknown `doc` attribute `no_default_passes`
-  --> $DIR/deprecated-attrs.rs:4:8
+  --> $DIR/deprecated-attrs.rs:3:8
    |
 LL | #![doc(no_default_passes)]
    |        ^^^^^^^^^^^^^^^^^ no longer functions
@@ -15,7 +15,7 @@ LL | #![doc(no_default_passes)]
    = note: `#[deny(invalid_doc_attributes)]` on by default
 
 error: unknown `doc` attribute `passes`
-  --> $DIR/deprecated-attrs.rs:11:8
+  --> $DIR/deprecated-attrs.rs:10:8
    |
 LL | #![doc(passes = "collapse-docs unindent-comments")]
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no longer functions
@@ -25,7 +25,7 @@ LL | #![doc(passes = "collapse-docs unindent-comments")]
    = note: `doc(passes)` is now a no-op
 
 error: unknown `doc` attribute `plugins`
-  --> $DIR/deprecated-attrs.rs:17:8
+  --> $DIR/deprecated-attrs.rs:16:8
    |
 LL | #![doc(plugins = "xxx")]
    |        ^^^^^^^^^^^^^^^ no longer functions
diff --git a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout
index 90c0463d832..2b04b77c9dc 100644
--- a/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout
@@ -5,7 +5,7 @@ test $DIR/failed-doctest-should-panic.rs - Foo (line 10) - should panic ... FAIL
 failures:
 
 ---- $DIR/failed-doctest-should-panic.rs - Foo (line 10) stdout ----
-note: test did not panic as expected
+note: test did not panic as expected at $DIR/failed-doctest-should-panic.rs:10:0
 
 failures:
     $DIR/failed-doctest-should-panic.rs - Foo (line 10)
diff --git a/tests/rustdoc-ui/invalid-theme-name.rs b/tests/rustdoc-ui/invalid-theme-name.rs
index 7f1d191c89d..22b5e616a3d 100644
--- a/tests/rustdoc-ui/invalid-theme-name.rs
+++ b/tests/rustdoc-ui/invalid-theme-name.rs
@@ -1,4 +1,4 @@
 //@ compile-flags:--theme {{src-base}}/invalid-theme-name.rs
-//@ error-pattern: must have a .css extension
 
 //~? ERROR invalid argument: "$DIR/invalid-theme-name.rs"
+//~? HELP must have a .css extension
diff --git a/tests/ui-fulldeps/missing-rustc-driver-error.rs b/tests/ui-fulldeps/missing-rustc-driver-error.rs
index d582efada90..c6dff2d99dd 100644
--- a/tests/ui-fulldeps/missing-rustc-driver-error.rs
+++ b/tests/ui-fulldeps/missing-rustc-driver-error.rs
@@ -1,11 +1,15 @@
 // Test that we get the following hint when trying to use a compiler crate without rustc_driver.
-//@ error-pattern: try adding `extern crate rustc_driver;` at the top level of this crate
-//@ compile-flags: --emit link --error-format=human
+//@ compile-flags: --emit link
 //@ normalize-stderr: ".*crate .* required.*\n\n" -> ""
 //@ normalize-stderr: "aborting due to [0-9]+" -> "aborting due to NUMBER"
+//@ dont-require-annotations: ERROR
 
 #![feature(rustc_private)]
 
 extern crate rustc_serialize;
 
 fn main() {}
+
+//~? HELP try adding `extern crate rustc_driver;` at the top level of this crate
+//~? HELP try adding `extern crate rustc_driver;` at the top level of this crate
+//~? HELP try adding `extern crate rustc_driver;` at the top level of this crate
diff --git a/tests/ui-fulldeps/stable-mir/check_abi.rs b/tests/ui-fulldeps/stable-mir/check_abi.rs
index ef2d5b4854b..ebf2e333f08 100644
--- a/tests/ui-fulldeps/stable-mir/check_abi.rs
+++ b/tests/ui-fulldeps/stable-mir/check_abi.rs
@@ -17,7 +17,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::abi::{
     ArgAbi, CallConvention, FieldsShape, IntegerLength, PassMode, Primitive, Scalar, ValueAbi,
     VariantsShape,
diff --git a/tests/ui-fulldeps/stable-mir/check_allocation.rs b/tests/ui-fulldeps/stable-mir/check_allocation.rs
index c102f86a228..ae2609bbc12 100644
--- a/tests/ui-fulldeps/stable-mir/check_allocation.rs
+++ b/tests/ui-fulldeps/stable-mir/check_allocation.rs
@@ -19,7 +19,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::crate_def::CrateDef;
 use stable_mir::mir::alloc::GlobalAlloc;
 use stable_mir::mir::mono::{Instance, InstanceKind, StaticDef};
diff --git a/tests/ui-fulldeps/stable-mir/check_assoc_items.rs b/tests/ui-fulldeps/stable-mir/check_assoc_items.rs
index f7511367675..9d611543b5a 100644
--- a/tests/ui-fulldeps/stable-mir/check_assoc_items.rs
+++ b/tests/ui-fulldeps/stable-mir/check_assoc_items.rs
@@ -17,7 +17,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use std::io::Write;
 use std::collections::HashSet;
 use stable_mir::CrateDef;
diff --git a/tests/ui-fulldeps/stable-mir/check_attribute.rs b/tests/ui-fulldeps/stable-mir/check_attribute.rs
index de5ba15f6ea..4148fc0cb6a 100644
--- a/tests/ui-fulldeps/stable-mir/check_attribute.rs
+++ b/tests/ui-fulldeps/stable-mir/check_attribute.rs
@@ -15,7 +15,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::{CrateDef, CrateItems};
 use std::io::Write;
 use std::ops::ControlFlow;
diff --git a/tests/ui-fulldeps/stable-mir/check_binop.rs b/tests/ui-fulldeps/stable-mir/check_binop.rs
index 65b3ffd27ab..6a141e9c577 100644
--- a/tests/ui-fulldeps/stable-mir/check_binop.rs
+++ b/tests/ui-fulldeps/stable-mir/check_binop.rs
@@ -15,7 +15,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::mir::mono::Instance;
 use stable_mir::mir::visit::{Location, MirVisitor};
 use stable_mir::mir::{LocalDecl, Rvalue, Statement, StatementKind, Terminator, TerminatorKind};
diff --git a/tests/ui-fulldeps/stable-mir/check_crate_defs.rs b/tests/ui-fulldeps/stable-mir/check_crate_defs.rs
index 71cca94c34f..31c47192d09 100644
--- a/tests/ui-fulldeps/stable-mir/check_crate_defs.rs
+++ b/tests/ui-fulldeps/stable-mir/check_crate_defs.rs
@@ -16,7 +16,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::CrateDef;
 use std::collections::HashSet;
 use std::io::Write;
diff --git a/tests/ui-fulldeps/stable-mir/check_def_ty.rs b/tests/ui-fulldeps/stable-mir/check_def_ty.rs
index 37b9a83e33e..00a34f13867 100644
--- a/tests/ui-fulldeps/stable-mir/check_def_ty.rs
+++ b/tests/ui-fulldeps/stable-mir/check_def_ty.rs
@@ -17,7 +17,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::ty::{Ty, ForeignItemKind};
 use stable_mir::*;
 use std::io::Write;
diff --git a/tests/ui-fulldeps/stable-mir/check_defs.rs b/tests/ui-fulldeps/stable-mir/check_defs.rs
index cd3d76d8760..1ba73377d6e 100644
--- a/tests/ui-fulldeps/stable-mir/check_defs.rs
+++ b/tests/ui-fulldeps/stable-mir/check_defs.rs
@@ -19,7 +19,6 @@ extern crate stable_mir;
 use std::assert_matches::assert_matches;
 use mir::{mono::Instance, TerminatorKind::*};
 use stable_mir::mir::mono::InstanceKind;
-use rustc_smir::rustc_internal;
 use stable_mir::ty::{RigidTy, TyKind, Ty, UintTy};
 use stable_mir::*;
 use std::io::Write;
diff --git a/tests/ui-fulldeps/stable-mir/check_foreign.rs b/tests/ui-fulldeps/stable-mir/check_foreign.rs
index bc3956b3090..4419050ceb2 100644
--- a/tests/ui-fulldeps/stable-mir/check_foreign.rs
+++ b/tests/ui-fulldeps/stable-mir/check_foreign.rs
@@ -17,7 +17,6 @@ extern crate rustc_interface;
 extern crate rustc_span;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::{
     ty::{Abi, ForeignItemKind},
     *,
diff --git a/tests/ui-fulldeps/stable-mir/check_instance.rs b/tests/ui-fulldeps/stable-mir/check_instance.rs
index 72a138f907e..1510a622cdf 100644
--- a/tests/ui-fulldeps/stable-mir/check_instance.rs
+++ b/tests/ui-fulldeps/stable-mir/check_instance.rs
@@ -21,7 +21,6 @@ use std::ops::ControlFlow;
 
 use mir::mono::Instance;
 use mir::TerminatorKind::*;
-use rustc_smir::rustc_internal;
 use stable_mir::ty::{RigidTy, TyKind};
 use stable_mir::*;
 
diff --git a/tests/ui-fulldeps/stable-mir/check_intrinsics.rs b/tests/ui-fulldeps/stable-mir/check_intrinsics.rs
index 07a2a62e066..3f04abbb9d7 100644
--- a/tests/ui-fulldeps/stable-mir/check_intrinsics.rs
+++ b/tests/ui-fulldeps/stable-mir/check_intrinsics.rs
@@ -20,7 +20,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::mir::mono::{Instance, InstanceKind};
 use stable_mir::mir::visit::{Location, MirVisitor};
 use stable_mir::mir::{LocalDecl, Terminator, TerminatorKind};
diff --git a/tests/ui-fulldeps/stable-mir/check_item_kind.rs b/tests/ui-fulldeps/stable-mir/check_item_kind.rs
index 647ce534589..bb8c00c64c9 100644
--- a/tests/ui-fulldeps/stable-mir/check_item_kind.rs
+++ b/tests/ui-fulldeps/stable-mir/check_item_kind.rs
@@ -16,7 +16,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::*;
 use std::io::Write;
 use std::ops::ControlFlow;
diff --git a/tests/ui-fulldeps/stable-mir/check_normalization.rs b/tests/ui-fulldeps/stable-mir/check_normalization.rs
index de14202adb9..797cb4cd5d0 100644
--- a/tests/ui-fulldeps/stable-mir/check_normalization.rs
+++ b/tests/ui-fulldeps/stable-mir/check_normalization.rs
@@ -17,7 +17,6 @@ extern crate stable_mir;
 
 use mir::mono::Instance;
 use ty::{Ty, TyKind, RigidTy};
-use rustc_smir::rustc_internal;
 use stable_mir::*;
 use std::io::Write;
 use std::ops::ControlFlow;
diff --git a/tests/ui-fulldeps/stable-mir/check_trait_queries.rs b/tests/ui-fulldeps/stable-mir/check_trait_queries.rs
index 23c2844d3f1..d9170d0c408 100644
--- a/tests/ui-fulldeps/stable-mir/check_trait_queries.rs
+++ b/tests/ui-fulldeps/stable-mir/check_trait_queries.rs
@@ -16,7 +16,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::CrateDef;
 use std::collections::HashSet;
 use std::io::Write;
diff --git a/tests/ui-fulldeps/stable-mir/check_transform.rs b/tests/ui-fulldeps/stable-mir/check_transform.rs
index d9fc924933f..604cc72c341 100644
--- a/tests/ui-fulldeps/stable-mir/check_transform.rs
+++ b/tests/ui-fulldeps/stable-mir/check_transform.rs
@@ -17,7 +17,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::mir::alloc::GlobalAlloc;
 use stable_mir::mir::mono::Instance;
 use stable_mir::mir::{Body, ConstOperand, Operand, Rvalue, StatementKind, TerminatorKind};
diff --git a/tests/ui-fulldeps/stable-mir/check_ty_fold.rs b/tests/ui-fulldeps/stable-mir/check_ty_fold.rs
index 9d71697178e..23233f8406c 100644
--- a/tests/ui-fulldeps/stable-mir/check_ty_fold.rs
+++ b/tests/ui-fulldeps/stable-mir/check_ty_fold.rs
@@ -17,7 +17,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::mir::{
     Body, FieldIdx, MirVisitor, Place, ProjectionElem,
     visit::{Location, PlaceContext},
diff --git a/tests/ui-fulldeps/stable-mir/compilation-result.rs b/tests/ui-fulldeps/stable-mir/compilation-result.rs
index b8a9e720e54..39416636fd6 100644
--- a/tests/ui-fulldeps/stable-mir/compilation-result.rs
+++ b/tests/ui-fulldeps/stable-mir/compilation-result.rs
@@ -16,7 +16,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use std::io::Write;
 
 /// This test will generate and analyze a dummy crate using the stable mir.
diff --git a/tests/ui-fulldeps/stable-mir/crate-info.rs b/tests/ui-fulldeps/stable-mir/crate-info.rs
index 4d2d7e26276..e2086d5e579 100644
--- a/tests/ui-fulldeps/stable-mir/crate-info.rs
+++ b/tests/ui-fulldeps/stable-mir/crate-info.rs
@@ -18,7 +18,6 @@ extern crate rustc_interface;
 extern crate stable_mir;
 
 use rustc_hir::def::DefKind;
-use rustc_smir::rustc_internal;
 use stable_mir::ItemKind;
 use stable_mir::crate_def::CrateDef;
 use stable_mir::mir::mono::Instance;
diff --git a/tests/ui-fulldeps/stable-mir/projections.rs b/tests/ui-fulldeps/stable-mir/projections.rs
index 6f82eba61fc..f3bd894ac69 100644
--- a/tests/ui-fulldeps/stable-mir/projections.rs
+++ b/tests/ui-fulldeps/stable-mir/projections.rs
@@ -17,7 +17,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::ItemKind;
 use stable_mir::crate_def::CrateDef;
 use stable_mir::mir::{ProjectionElem, Rvalue, StatementKind};
diff --git a/tests/ui-fulldeps/stable-mir/smir_serde.rs b/tests/ui-fulldeps/stable-mir/smir_serde.rs
index 9b3638a9f2f..3b3d743ad32 100644
--- a/tests/ui-fulldeps/stable-mir/smir_serde.rs
+++ b/tests/ui-fulldeps/stable-mir/smir_serde.rs
@@ -19,7 +19,6 @@ extern crate serde_json;
 extern crate stable_mir;
 
 use rustc_middle::ty::TyCtxt;
-use rustc_smir::rustc_internal;
 use serde_json::to_string;
 use stable_mir::mir::Body;
 use std::io::{BufWriter, Write};
diff --git a/tests/ui-fulldeps/stable-mir/smir_visitor.rs b/tests/ui-fulldeps/stable-mir/smir_visitor.rs
index 0a579a07cef..d225d9773fe 100644
--- a/tests/ui-fulldeps/stable-mir/smir_visitor.rs
+++ b/tests/ui-fulldeps/stable-mir/smir_visitor.rs
@@ -16,7 +16,6 @@ extern crate rustc_driver;
 extern crate rustc_interface;
 extern crate stable_mir;
 
-use rustc_smir::rustc_internal;
 use stable_mir::mir::MirVisitor;
 use stable_mir::mir::MutMirVisitor;
 use stable_mir::*;
diff --git a/tests/ui/abi/fixed_x18.rs b/tests/ui/abi/fixed_x18.rs
index d373468f68f..d64b845e5bd 100644
--- a/tests/ui/abi/fixed_x18.rs
+++ b/tests/ui/abi/fixed_x18.rs
@@ -2,7 +2,6 @@
 // Behavior on aarch64 is tested by tests/codegen/fixed-x18.rs.
 //
 //@ revisions: x64 i686 arm riscv32 riscv64
-//@ error-pattern: the `-Zfixed-x18` flag is not supported
 //@ dont-check-compiler-stderr
 //
 //@ compile-flags: -Zfixed-x18
diff --git a/tests/ui/asm/naked-functions-rustic-abi.rs b/tests/ui/asm/naked-functions-rustic-abi.rs
new file mode 100644
index 00000000000..b654d38ccc1
--- /dev/null
+++ b/tests/ui/asm/naked-functions-rustic-abi.rs
@@ -0,0 +1,27 @@
+//@ revisions: x86_64 aarch64
+//
+//@[aarch64] only-aarch64
+//@[x86_64] only-x86_64
+//
+//@ build-pass
+//@ needs-asm-support
+
+#![feature(naked_functions, naked_functions_rustic_abi, rust_cold_cc)]
+#![crate_type = "lib"]
+
+use std::arch::{asm, naked_asm};
+
+#[naked]
+pub unsafe fn rust_implicit() {
+    naked_asm!("ret");
+}
+
+#[naked]
+pub unsafe extern "Rust" fn rust_explicit() {
+    naked_asm!("ret");
+}
+
+#[naked]
+pub unsafe extern "rust-cold" fn rust_cold() {
+    naked_asm!("ret");
+}
diff --git a/tests/ui/asm/naked-functions-testattrs.rs b/tests/ui/asm/naked-functions-testattrs.rs
index 7e373270e9f..ad31876a77a 100644
--- a/tests/ui/asm/naked-functions-testattrs.rs
+++ b/tests/ui/asm/naked-functions-testattrs.rs
@@ -1,7 +1,6 @@
 //@ needs-asm-support
 //@ compile-flags: --test
 
-#![allow(undefined_naked_function_abi)]
 #![feature(naked_functions)]
 #![feature(test)]
 #![crate_type = "lib"]
@@ -11,7 +10,7 @@ use std::arch::naked_asm;
 #[test]
 #[naked]
 //~^ ERROR [E0736]
-fn test_naked() {
+extern "C" fn test_naked() {
     unsafe { naked_asm!("") };
 }
 
@@ -19,7 +18,7 @@ fn test_naked() {
 #[test]
 #[naked]
 //~^ ERROR [E0736]
-fn test_naked_should_panic() {
+extern "C" fn test_naked_should_panic() {
     unsafe { naked_asm!("") };
 }
 
@@ -27,13 +26,13 @@ fn test_naked_should_panic() {
 #[test]
 #[naked]
 //~^ ERROR [E0736]
-fn test_naked_ignore() {
+extern "C" fn test_naked_ignore() {
     unsafe { naked_asm!("") };
 }
 
 #[bench]
 #[naked]
 //~^ ERROR [E0736]
-fn bench_naked() {
+extern "C" fn bench_naked() {
     unsafe { naked_asm!("") };
 }
diff --git a/tests/ui/asm/naked-functions-testattrs.stderr b/tests/ui/asm/naked-functions-testattrs.stderr
index 4dabe41964a..0f0bb91b954 100644
--- a/tests/ui/asm/naked-functions-testattrs.stderr
+++ b/tests/ui/asm/naked-functions-testattrs.stderr
@@ -1,5 +1,5 @@
 error[E0736]: cannot use `#[naked]` with testing attributes
-  --> $DIR/naked-functions-testattrs.rs:12:1
+  --> $DIR/naked-functions-testattrs.rs:11:1
    |
 LL | #[test]
    | ------- function marked with testing attribute here
@@ -7,7 +7,7 @@ LL | #[naked]
    | ^^^^^^^^ `#[naked]` is incompatible with testing attributes
 
 error[E0736]: cannot use `#[naked]` with testing attributes
-  --> $DIR/naked-functions-testattrs.rs:20:1
+  --> $DIR/naked-functions-testattrs.rs:19:1
    |
 LL | #[test]
    | ------- function marked with testing attribute here
@@ -15,7 +15,7 @@ LL | #[naked]
    | ^^^^^^^^ `#[naked]` is incompatible with testing attributes
 
 error[E0736]: cannot use `#[naked]` with testing attributes
-  --> $DIR/naked-functions-testattrs.rs:28:1
+  --> $DIR/naked-functions-testattrs.rs:27:1
    |
 LL | #[test]
    | ------- function marked with testing attribute here
@@ -23,7 +23,7 @@ LL | #[naked]
    | ^^^^^^^^ `#[naked]` is incompatible with testing attributes
 
 error[E0736]: cannot use `#[naked]` with testing attributes
-  --> $DIR/naked-functions-testattrs.rs:35:1
+  --> $DIR/naked-functions-testattrs.rs:34:1
    |
 LL | #[bench]
    | -------- function marked with testing attribute here
diff --git a/tests/ui/asm/naked-functions.rs b/tests/ui/asm/naked-functions.rs
index 3d4d414539c..5bf2e2a3abd 100644
--- a/tests/ui/asm/naked-functions.rs
+++ b/tests/ui/asm/naked-functions.rs
@@ -123,18 +123,6 @@ unsafe extern "C" fn invalid_may_unwind() {
 }
 
 #[naked]
-pub unsafe fn default_abi() {
-    //~^ WARN Rust ABI is unsupported in naked functions
-    naked_asm!("");
-}
-
-#[naked]
-pub unsafe fn rust_abi() {
-    //~^ WARN Rust ABI is unsupported in naked functions
-    naked_asm!("");
-}
-
-#[naked]
 pub extern "C" fn valid_a<T>() -> T {
     unsafe {
         naked_asm!("");
diff --git a/tests/ui/asm/naked-functions.stderr b/tests/ui/asm/naked-functions.stderr
index 0898f3620f2..0a55bb9cd83 100644
--- a/tests/ui/asm/naked-functions.stderr
+++ b/tests/ui/asm/naked-functions.stderr
@@ -53,19 +53,19 @@ LL |     naked_asm!("", options(may_unwind));
    |                            ^^^^^^^^^^ the `may_unwind` option is not meaningful for global-scoped inline assembly
 
 error: this is a user specified error
-  --> $DIR/naked-functions.rs:169:5
+  --> $DIR/naked-functions.rs:157:5
    |
 LL |     compile_error!("this is a user specified error")
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: this is a user specified error
-  --> $DIR/naked-functions.rs:175:5
+  --> $DIR/naked-functions.rs:163:5
    |
 LL |     compile_error!("this is a user specified error");
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: asm template must be a string literal
-  --> $DIR/naked-functions.rs:182:16
+  --> $DIR/naked-functions.rs:170:16
    |
 LL |     naked_asm!(invalid_syntax)
    |                ^^^^^^^^^^^^^^
@@ -175,20 +175,6 @@ LL |
 LL |         *&y
    |         --- not allowed in naked functions
 
-warning: Rust ABI is unsupported in naked functions
-  --> $DIR/naked-functions.rs:126:1
-   |
-LL | pub unsafe fn default_abi() {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(undefined_naked_function_abi)]` on by default
-
-warning: Rust ABI is unsupported in naked functions
-  --> $DIR/naked-functions.rs:132:1
-   |
-LL | pub unsafe fn rust_abi() {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 25 previous errors; 2 warnings emitted
+error: aborting due to 25 previous errors
 
 For more information about this error, try `rustc --explain E0787`.
diff --git a/tests/ui/associated-types/issue-36499.rs b/tests/ui/associated-types/issue-36499.rs
index 606918b40b7..941b1aaa0d5 100644
--- a/tests/ui/associated-types/issue-36499.rs
+++ b/tests/ui/associated-types/issue-36499.rs
@@ -1,5 +1,3 @@
-//@ error-pattern: aborting due to 1 previous error
-
 fn main() {
     2 + +2; //~ ERROR leading `+` is not supported
 }
diff --git a/tests/ui/associated-types/issue-36499.stderr b/tests/ui/associated-types/issue-36499.stderr
index dd91bac8158..aebf0faae2d 100644
--- a/tests/ui/associated-types/issue-36499.stderr
+++ b/tests/ui/associated-types/issue-36499.stderr
@@ -1,5 +1,5 @@
 error: leading `+` is not supported
-  --> $DIR/issue-36499.rs:4:9
+  --> $DIR/issue-36499.rs:2:9
    |
 LL |     2 + +2;
    |         ^ unexpected `+`
diff --git a/tests/ui/async-await/post-cleanup-phase-validation.rs b/tests/ui/async-await/post-cleanup-phase-validation.rs
new file mode 100644
index 00000000000..a347e35c26d
--- /dev/null
+++ b/tests/ui/async-await/post-cleanup-phase-validation.rs
@@ -0,0 +1,19 @@
+//@ compile-flags: -Zvalidate-mir
+//@ edition: 2024
+//@ build-pass
+
+// Regression test that we don't ICE when encountering a transmute in a coroutine's
+// drop shim body, which is conceptually in the Runtime phase but wasn't having the
+// phase updated b/c the pass manager neither optimizes nor updates the phase for
+// drop shim bodies.
+
+struct HasDrop;
+impl Drop for HasDrop {
+    fn drop(&mut self) {}
+}
+
+fn main() {
+    async {
+        vec![async { HasDrop }.await];
+    };
+}
diff --git a/tests/ui/async-await/suggest-missing-await.rs b/tests/ui/async-await/suggest-missing-await.rs
index 989792825cf..de0b2ce52b6 100644
--- a/tests/ui/async-await/suggest-missing-await.rs
+++ b/tests/ui/async-await/suggest-missing-await.rs
@@ -1,4 +1,5 @@
 //@ edition:2018
+//@ dont-require-annotations: SUGGESTION
 
 fn take_u32(_x: u32) {}
 
diff --git a/tests/ui/async-await/suggest-missing-await.stderr b/tests/ui/async-await/suggest-missing-await.stderr
index f9db86ea40a..9db7eb980ef 100644
--- a/tests/ui/async-await/suggest-missing-await.stderr
+++ b/tests/ui/async-await/suggest-missing-await.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/suggest-missing-await.rs:12:14
+  --> $DIR/suggest-missing-await.rs:13:14
    |
 LL |     take_u32(x)
    |     -------- ^ expected `u32`, found future
@@ -7,12 +7,12 @@ LL |     take_u32(x)
    |     arguments to this function are incorrect
    |
 note: calling an async function returns a future
-  --> $DIR/suggest-missing-await.rs:12:14
+  --> $DIR/suggest-missing-await.rs:13:14
    |
 LL |     take_u32(x)
    |              ^
 note: function defined here
-  --> $DIR/suggest-missing-await.rs:3:4
+  --> $DIR/suggest-missing-await.rs:4:4
    |
 LL | fn take_u32(_x: u32) {}
    |    ^^^^^^^^ -------
@@ -22,13 +22,13 @@ LL |     take_u32(x.await)
    |               ++++++
 
 error[E0308]: mismatched types
-  --> $DIR/suggest-missing-await.rs:22:5
+  --> $DIR/suggest-missing-await.rs:23:5
    |
 LL |     dummy()
    |     ^^^^^^^ expected `()`, found future
    |
 note: calling an async function returns a future
-  --> $DIR/suggest-missing-await.rs:22:5
+  --> $DIR/suggest-missing-await.rs:23:5
    |
 LL |     dummy()
    |     ^^^^^^^
@@ -42,7 +42,7 @@ LL |     dummy();
    |            +
 
 error[E0308]: `if` and `else` have incompatible types
-  --> $DIR/suggest-missing-await.rs:35:9
+  --> $DIR/suggest-missing-await.rs:36:9
    |
 LL |       let _x = if true {
    |  ______________-
@@ -64,7 +64,7 @@ LL |         dummy().await
    |                ++++++
 
 error[E0308]: `match` arms have incompatible types
-  --> $DIR/suggest-missing-await.rs:45:14
+  --> $DIR/suggest-missing-await.rs:46:14
    |
 LL |       let _x = match 0usize {
    |  ______________-
@@ -87,7 +87,7 @@ LL ~         1 => dummy().await,
    |
 
 error[E0308]: mismatched types
-  --> $DIR/suggest-missing-await.rs:53:9
+  --> $DIR/suggest-missing-await.rs:54:9
    |
 LL |     let _x = match dummy() {
    |                    ------- this expression has type `impl Future<Output = ()>`
@@ -102,7 +102,7 @@ LL |     let _x = match dummy().await {
    |                           ++++++
 
 error[E0308]: mismatched types
-  --> $DIR/suggest-missing-await.rs:67:9
+  --> $DIR/suggest-missing-await.rs:68:9
    |
 LL |     match dummy_result() {
    |           -------------- this expression has type `impl Future<Output = Result<(), ()>>`
@@ -118,7 +118,7 @@ LL |     match dummy_result().await {
    |                         ++++++
 
 error[E0308]: mismatched types
-  --> $DIR/suggest-missing-await.rs:69:9
+  --> $DIR/suggest-missing-await.rs:70:9
    |
 LL |     match dummy_result() {
    |           -------------- this expression has type `impl Future<Output = Result<(), ()>>`
@@ -134,7 +134,7 @@ LL |     match dummy_result().await {
    |                         ++++++
 
 error[E0308]: mismatched types
-  --> $DIR/suggest-missing-await.rs:77:27
+  --> $DIR/suggest-missing-await.rs:78:27
    |
 LL |     Some(do_async()).map(|()| {});
    |                           ^^
diff --git a/tests/ui/attributes/z-crate-attr/garbage.stderr b/tests/ui/attributes/z-crate-attr/garbage.stderr
index 082046e31f8..12d18b0845f 100644
--- a/tests/ui/attributes/z-crate-attr/garbage.stderr
+++ b/tests/ui/attributes/z-crate-attr/garbage.stderr
@@ -1,20 +1,20 @@
 error: unknown start of token: `
-  --> <crate attribute>:1:1
+  --> <crate attribute>:1:4
    |
-LL | `%~@$#
-   | ^
+LL | #![`%~@$#]
+   |    ^
    |
 help: Unicode character '`' (Grave Accent) looks like ''' (Single Quote), but it is not
    |
-LL - `%~@$#
-LL + '%~@$#
+LL - #![`%~@$#]
+LL + #!['%~@$#]
    |
 
 error: expected identifier, found `%`
-  --> <crate attribute>:1:2
+  --> <crate attribute>:1:5
    |
-LL | `%~@$#
-   |  ^ expected identifier
+LL | #![`%~@$#]
+   |     ^ expected identifier
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/attributes/z-crate-attr/injection.rs b/tests/ui/attributes/z-crate-attr/injection.rs
index a91f9d2886e..ee7a27c7490 100644
--- a/tests/ui/attributes/z-crate-attr/injection.rs
+++ b/tests/ui/attributes/z-crate-attr/injection.rs
@@ -1,5 +1,3 @@
 //@ compile-flags: '-Zcrate-attr=feature(yeet_expr)]fn main(){}#[inline'
-
-fn foo() {}
-
-//~? ERROR unexpected closing delimiter: `]`
+//~? ERROR unexpected token
+fn foo() {} //~ ERROR `main` function not found
diff --git a/tests/ui/attributes/z-crate-attr/injection.stderr b/tests/ui/attributes/z-crate-attr/injection.stderr
index 6fec98baf8d..899dad07e60 100644
--- a/tests/ui/attributes/z-crate-attr/injection.stderr
+++ b/tests/ui/attributes/z-crate-attr/injection.stderr
@@ -1,8 +1,15 @@
-error: unexpected closing delimiter: `]`
-  --> <crate attribute>:1:19
+error: unexpected token: keyword `fn`
+  --> <crate attribute>:1:23
    |
-LL | feature(yeet_expr)]fn main(){}#[inline
-   |                   ^ unexpected closing delimiter
+LL | #![feature(yeet_expr)]fn main(){}#[inline]
+   |                       ^^ unexpected token after this
 
-error: aborting due to 1 previous error
+error[E0601]: `main` function not found in crate `injection`
+  --> $DIR/injection.rs:3:12
+   |
+LL | fn foo() {}
+   |            ^ consider adding a `main` function to `$DIR/injection.rs`
+
+error: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/attributes/z-crate-attr/injection2.rs b/tests/ui/attributes/z-crate-attr/injection2.rs
new file mode 100644
index 00000000000..67ae3d17f3e
--- /dev/null
+++ b/tests/ui/attributes/z-crate-attr/injection2.rs
@@ -0,0 +1,3 @@
+//@ compile-flags: -Zcrate-attr=feature(yeet_expr)]#![allow(warnings)
+//~? ERROR unexpected token
+fn foo() {} //~ ERROR `main` function not found
diff --git a/tests/ui/attributes/z-crate-attr/injection2.stderr b/tests/ui/attributes/z-crate-attr/injection2.stderr
new file mode 100644
index 00000000000..51f54f900a1
--- /dev/null
+++ b/tests/ui/attributes/z-crate-attr/injection2.stderr
@@ -0,0 +1,15 @@
+error: unexpected token: `#`
+  --> <crate attribute>:1:23
+   |
+LL | #![feature(yeet_expr)]#![allow(warnings)]
+   |                       ^ unexpected token after this
+
+error[E0601]: `main` function not found in crate `injection2`
+  --> $DIR/injection2.rs:3:12
+   |
+LL | fn foo() {}
+   |            ^ consider adding a `main` function to `$DIR/injection2.rs`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0601`.
diff --git a/tests/ui/attributes/z-crate-attr/inner-attr.stderr b/tests/ui/attributes/z-crate-attr/inner-attr.stderr
index 06a063d310b..1acb8c2e750 100644
--- a/tests/ui/attributes/z-crate-attr/inner-attr.stderr
+++ b/tests/ui/attributes/z-crate-attr/inner-attr.stderr
@@ -1,8 +1,8 @@
 error: expected identifier, found `#`
-  --> <crate attribute>:1:1
+  --> <crate attribute>:1:4
    |
-LL | #![feature(foo)]
-   | ^ expected identifier
+LL | #![#![feature(foo)]]
+   |    ^ expected identifier
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/attributes/z-crate-attr/multiple.rs b/tests/ui/attributes/z-crate-attr/multiple.rs
index 47d35d2c3fd..8c60ea64fec 100644
--- a/tests/ui/attributes/z-crate-attr/multiple.rs
+++ b/tests/ui/attributes/z-crate-attr/multiple.rs
@@ -1,5 +1,3 @@
 //@ compile-flags: -Zcrate-attr=feature(foo),feature(bar)
-
+//~? ERROR expected `]`
 fn main() {}
-
-//~? ERROR invalid crate attribute
diff --git a/tests/ui/attributes/z-crate-attr/multiple.stderr b/tests/ui/attributes/z-crate-attr/multiple.stderr
index 9f968a7e134..b95c95dcd73 100644
--- a/tests/ui/attributes/z-crate-attr/multiple.stderr
+++ b/tests/ui/attributes/z-crate-attr/multiple.stderr
@@ -1,8 +1,8 @@
-error: invalid crate attribute
-  --> <crate attribute>:1:1
+error: expected `]`, found `,`
+  --> <crate attribute>:1:16
    |
-LL | feature(foo),feature(bar)
-   | ^^^^^^^^^^^^^
+LL | #![feature(foo),feature(bar)]
+   |                ^ expected `]`
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/attributes/z-crate-attr/unbalanced-paren.rs b/tests/ui/attributes/z-crate-attr/unbalanced-paren.rs
index 77d5d698f65..5ef0a75a3a8 100644
--- a/tests/ui/attributes/z-crate-attr/unbalanced-paren.rs
+++ b/tests/ui/attributes/z-crate-attr/unbalanced-paren.rs
@@ -1,6 +1,4 @@
 // Show diagnostics for unbalanced parens.
 //@ compile-flags: -Zcrate-attr=(
-
+//~? ERROR mismatched closing delimiter
 fn main() {}
-
-//~? ERROR this file contains an unclosed delimiter
diff --git a/tests/ui/attributes/z-crate-attr/unbalanced-paren.stderr b/tests/ui/attributes/z-crate-attr/unbalanced-paren.stderr
index 47b1b764ba9..f6545d1db8b 100644
--- a/tests/ui/attributes/z-crate-attr/unbalanced-paren.stderr
+++ b/tests/ui/attributes/z-crate-attr/unbalanced-paren.stderr
@@ -1,10 +1,11 @@
-error: this file contains an unclosed delimiter
-  --> <crate attribute>:1:2
+error: mismatched closing delimiter: `]`
+  --> <crate attribute>:1:4
    |
-LL | (
-   | -^
-   | |
-   | unclosed delimiter
+LL | #![(]
+   |   -^^ mismatched closing delimiter
+   |   ||
+   |   |unclosed delimiter
+   |   closing delimiter possibly meant for this
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/cast/cast-array-issue-138836.rs b/tests/ui/cast/cast-array-issue-138836.rs
new file mode 100644
index 00000000000..3f8098e76fd
--- /dev/null
+++ b/tests/ui/cast/cast-array-issue-138836.rs
@@ -0,0 +1,5 @@
+fn main() {
+    let a: [u8; 3] = [1,2,3];
+    let b = &a;
+    let c = b as *const [u32; 3]; //~ ERROR casting `&[u8; 3]` as `*const [u32; 3]` is invalid
+}
diff --git a/tests/ui/cast/cast-array-issue-138836.stderr b/tests/ui/cast/cast-array-issue-138836.stderr
new file mode 100644
index 00000000000..309474c29f9
--- /dev/null
+++ b/tests/ui/cast/cast-array-issue-138836.stderr
@@ -0,0 +1,9 @@
+error[E0606]: casting `&[u8; 3]` as `*const [u32; 3]` is invalid
+  --> $DIR/cast-array-issue-138836.rs:4:13
+   |
+LL |     let c = b as *const [u32; 3];
+   |             ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/cast/cast-as-bool.rs b/tests/ui/cast/cast-as-bool.rs
index 511a02718fe..fa9664e572c 100644
--- a/tests/ui/cast/cast-as-bool.rs
+++ b/tests/ui/cast/cast-as-bool.rs
@@ -1,3 +1,5 @@
+//@ dont-require-annotations: SUGGESTION
+
 fn main() {
     let u = 5 as bool; //~ ERROR cannot cast `i32` as `bool`
                        //~| HELP compare with zero instead
diff --git a/tests/ui/cast/cast-as-bool.stderr b/tests/ui/cast/cast-as-bool.stderr
index b2c9ae5c6ad..25377ebebe2 100644
--- a/tests/ui/cast/cast-as-bool.stderr
+++ b/tests/ui/cast/cast-as-bool.stderr
@@ -1,5 +1,5 @@
 error[E0054]: cannot cast `i32` as `bool`
-  --> $DIR/cast-as-bool.rs:2:13
+  --> $DIR/cast-as-bool.rs:4:13
    |
 LL |     let u = 5 as bool;
    |             ^^^^^^^^^
@@ -11,7 +11,7 @@ LL +     let u = 5 != 0;
    |
 
 error[E0054]: cannot cast `i32` as `bool`
-  --> $DIR/cast-as-bool.rs:6:13
+  --> $DIR/cast-as-bool.rs:8:13
    |
 LL |     let t = (1 + 2) as bool;
    |             ^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL +     let t = (1 + 2) != 0;
    |
 
 error[E0054]: cannot cast `u32` as `bool`
-  --> $DIR/cast-as-bool.rs:10:13
+  --> $DIR/cast-as-bool.rs:12:13
    |
 LL |     let _ = 5_u32 as bool;
    |             ^^^^^^^^^^^^^
@@ -35,7 +35,7 @@ LL +     let _ = 5_u32 != 0;
    |
 
 error[E0054]: cannot cast `f64` as `bool`
-  --> $DIR/cast-as-bool.rs:13:13
+  --> $DIR/cast-as-bool.rs:15:13
    |
 LL |     let _ = 64.0_f64 as bool;
    |             ^^^^^^^^^^^^^^^^
@@ -47,43 +47,43 @@ LL +     let _ = 64.0_f64 != 0;
    |
 
 error[E0054]: cannot cast `IntEnum` as `bool`
-  --> $DIR/cast-as-bool.rs:24:13
+  --> $DIR/cast-as-bool.rs:26:13
    |
 LL |     let _ = IntEnum::One as bool;
    |             ^^^^^^^^^^^^^^^^^^^^ unsupported cast
 
 error[E0054]: cannot cast `fn(u8) -> String {uwu}` as `bool`
-  --> $DIR/cast-as-bool.rs:33:13
+  --> $DIR/cast-as-bool.rs:35:13
    |
 LL |     let _ = uwu as bool;
    |             ^^^^^^^^^^^ unsupported cast
 
 error[E0054]: cannot cast `unsafe fn() {owo}` as `bool`
-  --> $DIR/cast-as-bool.rs:35:13
+  --> $DIR/cast-as-bool.rs:37:13
    |
 LL |     let _ = owo as bool;
    |             ^^^^^^^^^^^ unsupported cast
 
 error[E0054]: cannot cast `fn(u8) -> String` as `bool`
-  --> $DIR/cast-as-bool.rs:38:13
+  --> $DIR/cast-as-bool.rs:40:13
    |
 LL |     let _ = uwu as fn(u8) -> String as bool;
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsupported cast
 
 error[E0054]: cannot cast `char` as `bool`
-  --> $DIR/cast-as-bool.rs:40:13
+  --> $DIR/cast-as-bool.rs:42:13
    |
 LL |     let _ = 'x' as bool;
    |             ^^^^^^^^^^^ unsupported cast
 
 error[E0054]: cannot cast `*const ()` as `bool`
-  --> $DIR/cast-as-bool.rs:44:13
+  --> $DIR/cast-as-bool.rs:46:13
    |
 LL |     let _ = ptr as bool;
    |             ^^^^^^^^^^^ unsupported cast
 
 error[E0606]: casting `&'static str` as `bool` is invalid
-  --> $DIR/cast-as-bool.rs:46:13
+  --> $DIR/cast-as-bool.rs:48:13
    |
 LL |     let v = "hello" as bool;
    |             ^^^^^^^^^^^^^^^
diff --git a/tests/ui/cfg/cfg_false_no_std-2.rs b/tests/ui/cfg/cfg_false_no_std-2.rs
index 349c49412ff..18b2c699fd7 100644
--- a/tests/ui/cfg/cfg_false_no_std-2.rs
+++ b/tests/ui/cfg/cfg_false_no_std-2.rs
@@ -1,6 +1,6 @@
 // Error, the linked empty library is `no_std` and doesn't provide a panic handler.
 
-//@ dont-require-annotations:ERROR
+//@ dont-require-annotations: ERROR
 //@ dont-check-compiler-stderr
 //@ aux-build: cfg_false_lib_no_std_before.rs
 
diff --git a/tests/ui/check-cfg/cargo-feature.rs b/tests/ui/check-cfg/cargo-feature.rs
index a9380ddae1a..a02b0437057 100644
--- a/tests/ui/check-cfg/cargo-feature.rs
+++ b/tests/ui/check-cfg/cargo-feature.rs
@@ -10,7 +10,7 @@
 //@ [none]compile-flags: --check-cfg=cfg(feature,values())
 //@ [some]compile-flags: --check-cfg=cfg(feature,values("bitcode"))
 //@ [some]compile-flags: --check-cfg=cfg(CONFIG_NVME,values("y"))
-//@ [none]error-pattern:Cargo.toml
+//@ dont-require-annotations: HELP
 
 #[cfg(feature = "serde")]
 //~^ WARNING unexpected `cfg` condition value
@@ -27,6 +27,7 @@ fn tokio() {}
 #[cfg(CONFIG_NVME = "m")]
 //[none]~^ WARNING unexpected `cfg` condition name
 //[some]~^^ WARNING unexpected `cfg` condition value
+//[none]~| HELP Cargo.toml
 fn tokio() {}
 
 fn main() {}
diff --git a/tests/ui/codegen/empty-static-libs-issue-108825.rs b/tests/ui/codegen/empty-static-libs-issue-108825.rs
index 46bd6d6b2da..4c644be0954 100644
--- a/tests/ui/codegen/empty-static-libs-issue-108825.rs
+++ b/tests/ui/codegen/empty-static-libs-issue-108825.rs
@@ -3,7 +3,6 @@
 
 //@ compile-flags: -Cpanic=abort --print=native-static-libs
 //@ build-pass
-//@ error-pattern: note: native-static-libs:
 //@ dont-check-compiler-stderr (libcore links `/defaultlib:msvcrt` or `/defaultlib:libcmt` on MSVC)
 //@ ignore-pass (the note is emitted later in the compilation pipeline, needs build)
 
@@ -14,3 +13,6 @@
 fn panic(_info: &core::panic::PanicInfo) -> ! {
     loop {}
 }
+
+//~? NOTE native-static-libs:
+//~? NOTE Link against the following native artifacts when linking against this static library
diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs
index cd181f4a49f..28d2d266b62 100644
--- a/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs
+++ b/tests/ui/conditional-compilation/cfg-arg-invalid-1.rs
@@ -1,3 +1,5 @@
-//@ compile-flags: --error-format=human --cfg a(b=c)
-//@ error-pattern: invalid `--cfg` argument: `a(b=c)` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
+//@ compile-flags: --cfg a(b=c)
+
 fn main() {}
+
+//~? ERROR invalid `--cfg` argument: `a(b=c)` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs
index a0c16bd1f80..a46022602e2 100644
--- a/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs
+++ b/tests/ui/conditional-compilation/cfg-arg-invalid-2.rs
@@ -1,3 +1,5 @@
-//@ compile-flags: --error-format=human --cfg a{b}
-//@ error-pattern: invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`)
+//@ compile-flags: --cfg a{b}
+
 fn main() {}
+
+//~? ERROR invalid `--cfg` argument: `a{b}` (expected `key` or `key="value"`)
diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs
index 30402d51852..ba34708c171 100644
--- a/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs
+++ b/tests/ui/conditional-compilation/cfg-arg-invalid-4.rs
@@ -1,3 +1,5 @@
-//@ compile-flags: --error-format=human --cfg a(b)
-//@ error-pattern: invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`)
+//@ compile-flags: --cfg a(b)
+
 fn main() {}
+
+//~? ERROR invalid `--cfg` argument: `a(b)` (expected `key` or `key="value"`)
diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs
index e0ce66eab87..2c2fc105958 100644
--- a/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs
+++ b/tests/ui/conditional-compilation/cfg-arg-invalid-6.rs
@@ -1,3 +1,5 @@
-//@ compile-flags: --error-format=human --cfg a{
-//@ error-pattern: invalid `--cfg` argument: `a{` (expected `key` or `key="value"`)
+//@ compile-flags: --cfg a{
+
 fn main() {}
+
+//~? ERROR invalid `--cfg` argument: `a{` (expected `key` or `key="value"`)
diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs
index 33f8da25830..c9185fc7b25 100644
--- a/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs
+++ b/tests/ui/conditional-compilation/cfg-arg-invalid-8.rs
@@ -1,3 +1,5 @@
-//@ compile-flags: --error-format=human --cfg )
-//@ error-pattern: invalid `--cfg` argument: `)` (expected `key` or `key="value"`)
+//@ compile-flags: --cfg )
+
 fn main() {}
+
+//~? ERROR invalid `--cfg` argument: `)` (expected `key` or `key="value"`)
diff --git a/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs b/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs
index 8ab3b101da7..8d07165dfae 100644
--- a/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs
+++ b/tests/ui/conditional-compilation/cfg-arg-invalid-9.rs
@@ -1,4 +1,6 @@
 // Test for missing quotes around value, issue #66450.
-//@ compile-flags: --error-format=human --cfg key=value
-//@ error-pattern: invalid `--cfg` argument: `key=value` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
+//@ compile-flags: --cfg key=value
+
 fn main() {}
+
+//~? ERROR invalid `--cfg` argument: `key=value` (expected `key` or `key="value"`, ensure escaping is appropriate for your shell, try 'key="value"' or key=\"value\")
diff --git a/tests/ui/conditional-compilation/cfg-empty-codemap.rs b/tests/ui/conditional-compilation/cfg-empty-codemap.rs
index d8fc0277759..9f7ef1bcf9a 100644
--- a/tests/ui/conditional-compilation/cfg-empty-codemap.rs
+++ b/tests/ui/conditional-compilation/cfg-empty-codemap.rs
@@ -1,8 +1,8 @@
 // Tests that empty source_maps don't ICE (#23301)
 
-//@ compile-flags: --error-format=human --cfg ""
-
-//@ error-pattern: invalid `--cfg` argument: `""` (expected `key` or `key="value"`)
+//@ compile-flags: --cfg ""
 
 pub fn main() {
 }
+
+//~? ERROR invalid `--cfg` argument: `""` (expected `key` or `key="value"`)
diff --git a/tests/ui/consts/const-cast-wrong-type.rs b/tests/ui/consts/const-cast-wrong-type.rs
index 6e055a2bcd3..9936a660936 100644
--- a/tests/ui/consts/const-cast-wrong-type.rs
+++ b/tests/ui/consts/const-cast-wrong-type.rs
@@ -1,5 +1,5 @@
 const a: [u8; 3] = ['h' as u8, 'i' as u8, 0 as u8];
-const b: *const i8 = &a as *const i8; //~ ERROR mismatched types
+const b: *const i8 = &a as *const i8; //~ ERROR casting `&[u8; 3]` as `*const i8` is invalid
 
 fn main() {
 }
diff --git a/tests/ui/consts/const-cast-wrong-type.stderr b/tests/ui/consts/const-cast-wrong-type.stderr
index 44361f15d8a..0730bac2235 100644
--- a/tests/ui/consts/const-cast-wrong-type.stderr
+++ b/tests/ui/consts/const-cast-wrong-type.stderr
@@ -1,9 +1,9 @@
-error[E0308]: mismatched types
+error[E0606]: casting `&[u8; 3]` as `*const i8` is invalid
   --> $DIR/const-cast-wrong-type.rs:2:22
    |
 LL | const b: *const i8 = &a as *const i8;
-   |                      ^^^^^^^^^^^^^^^ expected `u8`, found `i8`
+   |                      ^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
-For more information about this error, try `rustc --explain E0308`.
+For more information about this error, try `rustc --explain E0606`.
diff --git a/tests/ui/consts/miri_unleashed/drop.rs b/tests/ui/consts/miri_unleashed/drop.rs
index 17d089222d9..190072d9c20 100644
--- a/tests/ui/consts/miri_unleashed/drop.rs
+++ b/tests/ui/consts/miri_unleashed/drop.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -Zunleash-the-miri-inside-of-you
-//@ error-pattern: calling non-const function `<Vec<i32> as Drop>::drop`
 
 use std::mem::ManuallyDrop;
 
@@ -15,5 +14,7 @@ static TEST_OK: () = {
 static TEST_BAD: () = {
     let _v: Vec<i32> = Vec::new();
 }; //~ ERROR could not evaluate static initializer
+   //~| NOTE calling non-const function `<Vec<i32> as Drop>::drop`
+   //~| NOTE inside `std::ptr::drop_in_place::<Vec<i32>> - shim(Some(Vec<i32>))`
 
 //~? WARN skipping const checks
diff --git a/tests/ui/consts/miri_unleashed/drop.stderr b/tests/ui/consts/miri_unleashed/drop.stderr
index 40a29d5a819..f9ff5491ea6 100644
--- a/tests/ui/consts/miri_unleashed/drop.stderr
+++ b/tests/ui/consts/miri_unleashed/drop.stderr
@@ -1,5 +1,5 @@
 error[E0080]: could not evaluate static initializer
-  --> $DIR/drop.rs:17:1
+  --> $DIR/drop.rs:16:1
    |
 LL | };
    | ^ calling non-const function `<Vec<i32> as Drop>::drop`
@@ -10,7 +10,7 @@ note: inside `std::ptr::drop_in_place::<Vec<i32>> - shim(Some(Vec<i32>))`
 warning: skipping const checks
    |
 help: skipping check that does not even have a feature gate
-  --> $DIR/drop.rs:16:9
+  --> $DIR/drop.rs:15:9
    |
 LL |     let _v: Vec<i32> = Vec::new();
    |         ^^
diff --git a/tests/ui/debuginfo/dwarf-versions.rs b/tests/ui/debuginfo/dwarf-versions.rs
index 6030b2fcf3c..bb18cadce43 100644
--- a/tests/ui/debuginfo/dwarf-versions.rs
+++ b/tests/ui/debuginfo/dwarf-versions.rs
@@ -6,7 +6,6 @@
 //@[zero] compile-flags: -Zdwarf-version=0
 
 //@[one] compile-flags: -Zdwarf-version=1
-//@[one] error-pattern: requested DWARF version 1 is not supported
 
 //@[two] compile-flags: -Zdwarf-version=2
 //@[two] check-pass
diff --git a/tests/crashes/137287.rs b/tests/ui/drop/drop_elaboration_with_errors2.rs
index 59fdf568d36..946c253179c 100644
--- a/tests/crashes/137287.rs
+++ b/tests/ui/drop/drop_elaboration_with_errors2.rs
@@ -1,11 +1,14 @@
-//@ known-bug: #137287
+// Regression test for #137287
 
 mod defining_scope {
     use super::*;
     pub type Alias<T> = impl Sized;
+    //~^ ERROR unconstrained opaque type
+    //~| ERROR `impl Trait` in type aliases is unstable
 
     pub fn cast<T>(x: Container<Alias<T>, T>) -> Container<T, T> {
         x
+        //~^ ERROR mismatched types
     }
 }
 
@@ -21,6 +24,7 @@ impl<T> Trait<T> for T {
     type Assoc = Box<u32>;
 }
 impl<T> Trait<T> for defining_scope::Alias<T> {
+    //~^ ERROR conflicting implementations of trait `Trait<_>`
     type Assoc = usize;
 }
 
diff --git a/tests/ui/drop/drop_elaboration_with_errors2.stderr b/tests/ui/drop/drop_elaboration_with_errors2.stderr
new file mode 100644
index 00000000000..15fe3f6ecc1
--- /dev/null
+++ b/tests/ui/drop/drop_elaboration_with_errors2.stderr
@@ -0,0 +1,47 @@
+error[E0658]: `impl Trait` in type aliases is unstable
+  --> $DIR/drop_elaboration_with_errors2.rs:5:25
+   |
+LL |     pub type Alias<T> = impl Sized;
+   |                         ^^^^^^^^^^
+   |
+   = note: see issue #63063 <https://github.com/rust-lang/rust/issues/63063> for more information
+   = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error[E0119]: conflicting implementations of trait `Trait<_>`
+  --> $DIR/drop_elaboration_with_errors2.rs:26:1
+   |
+LL | impl<T> Trait<T> for T {
+   | ---------------------- first implementation here
+...
+LL | impl<T> Trait<T> for defining_scope::Alias<T> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation
+
+error: unconstrained opaque type
+  --> $DIR/drop_elaboration_with_errors2.rs:5:25
+   |
+LL |     pub type Alias<T> = impl Sized;
+   |                         ^^^^^^^^^^
+   |
+   = note: `Alias` must be used in combination with a concrete type within the same crate
+
+error[E0308]: mismatched types
+  --> $DIR/drop_elaboration_with_errors2.rs:10:9
+   |
+LL |     pub type Alias<T> = impl Sized;
+   |                         ---------- the found opaque type
+...
+LL |     pub fn cast<T>(x: Container<Alias<T>, T>) -> Container<T, T> {
+   |                 - expected this type parameter   --------------- expected `Container<T, T>` because of return type
+LL |         x
+   |         ^ expected `Container<T, T>`, found `Container<Alias<T>, T>`
+   |
+   = note: expected struct `Container<T, _>`
+              found struct `Container<Alias<T>, _>`
+   = help: type parameters must be constrained to match other types
+   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0119, E0308, E0658.
+For more information about an error, try `rustc --explain E0119`.
diff --git a/tests/crashes/135668.rs b/tests/ui/drop/drop_elaboration_with_errors3.rs
index 00d7b5db0c6..c5ed63eb7ac 100644
--- a/tests/crashes/135668.rs
+++ b/tests/ui/drop/drop_elaboration_with_errors3.rs
@@ -1,5 +1,6 @@
-//@ known-bug: #135668
+// Regression test for #135668
 //@ edition: 2021
+
 use std::future::Future;
 
 pub async fn foo() {
@@ -11,7 +12,8 @@ async fn create_task() -> impl Sized {
 }
 
 async fn documentation() {
-    include_str!("nonexistent");
+    compile_error!("bonjour");
+    //~^ ERROR bonjour
 }
 
 fn bind<F>(_filter: F) -> impl Sized
@@ -36,3 +38,5 @@ where
 {
     type Assoc = F;
 }
+
+fn main() {}
diff --git a/tests/ui/drop/drop_elaboration_with_errors3.stderr b/tests/ui/drop/drop_elaboration_with_errors3.stderr
new file mode 100644
index 00000000000..2d44e7c6625
--- /dev/null
+++ b/tests/ui/drop/drop_elaboration_with_errors3.stderr
@@ -0,0 +1,8 @@
+error: bonjour
+  --> $DIR/drop_elaboration_with_errors3.rs:15:5
+   |
+LL |     compile_error!("bonjour");
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/error-codes/E0152-duplicate-lang-items.rs b/tests/ui/error-codes/E0152-duplicate-lang-items.rs
index 089810b1ad2..f707b72f9b2 100644
--- a/tests/ui/error-codes/E0152-duplicate-lang-items.rs
+++ b/tests/ui/error-codes/E0152-duplicate-lang-items.rs
@@ -3,8 +3,9 @@
 //!
 //! Issue: <https://github.com/rust-lang/rust/issues/31788>
 
-//@ error-pattern: first defined in crate `std`
 //@ normalize-stderr: "loaded from .*libstd-.*.rlib" -> "loaded from SYSROOT/libstd-*.rlib"
+//@ dont-require-annotations: NOTE
+
 #![feature(lang_items)]
 
 extern crate core;
@@ -14,6 +15,7 @@ use core::panic::PanicInfo;
 #[lang = "panic_impl"]
 fn panic_impl(info: &PanicInfo) -> ! {
     //~^ ERROR: found duplicate lang item `panic_impl`
+    //~| NOTE first defined in crate `std`
     loop {}
 }
 
diff --git a/tests/ui/error-codes/E0152-duplicate-lang-items.stderr b/tests/ui/error-codes/E0152-duplicate-lang-items.stderr
index 3c3d64322f3..2fe0d18fc2f 100644
--- a/tests/ui/error-codes/E0152-duplicate-lang-items.stderr
+++ b/tests/ui/error-codes/E0152-duplicate-lang-items.stderr
@@ -1,8 +1,9 @@
 error[E0152]: found duplicate lang item `panic_impl`
-  --> $DIR/E0152-duplicate-lang-items.rs:15:1
+  --> $DIR/E0152-duplicate-lang-items.rs:16:1
    |
 LL | / fn panic_impl(info: &PanicInfo) -> ! {
 LL | |
+LL | |
 LL | |     loop {}
 LL | | }
    | |_^
diff --git a/tests/ui/error-codes/E0602.rs b/tests/ui/error-codes/E0602.rs
index cba15bb92d4..381bd1ffb54 100644
--- a/tests/ui/error-codes/E0602.rs
+++ b/tests/ui/error-codes/E0602.rs
@@ -1,11 +1,11 @@
 //@ compile-flags:-D bogus
 //@ check-pass
-
-//@ error-pattern:requested on the command line with `-D bogus`
-//@ error-pattern:`#[warn(unknown_lints)]` on by default
+//@ dont-require-annotations: NOTE
 
 fn main() {}
 
 //~? WARN unknown lint: `bogus`
 //~? WARN unknown lint: `bogus`
 //~? WARN unknown lint: `bogus`
+//~? NOTE requested on the command line with `-D bogus`
+//~? NOTE `#[warn(unknown_lints)]` on by default
diff --git a/tests/ui/extern-flag/invalid-crate-name-dashed.rs b/tests/ui/extern-flag/invalid-crate-name-dashed.rs
index b336cc84569..bbf473cc514 100644
--- a/tests/ui/extern-flag/invalid-crate-name-dashed.rs
+++ b/tests/ui/extern-flag/invalid-crate-name-dashed.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: --extern=my-awesome-library=libawesome.rlib
-//@ error-pattern: consider replacing the dashes with underscores: `my_awesome_library`
 
 // In a sense, this is a regression test for issue #113035. We no longer suggest
 // `pub use my-awesome-library::*;` (sic!) as we outright ban this crate name.
@@ -9,3 +8,4 @@ pub use my_awesome_library::*;
 fn main() {}
 
 //~? ERROR crate name `my-awesome-library` passed to `--extern` is not a valid ASCII identifier
+//~? HELP consider replacing the dashes with underscores: `my_awesome_library`
diff --git a/tests/ui/feature-gates/feature-gate-ffi_const.rs b/tests/ui/feature-gates/feature-gate-ffi_const.rs
index 9f3d783ccd6..35f91b99a6f 100644
--- a/tests/ui/feature-gates/feature-gate-ffi_const.rs
+++ b/tests/ui/feature-gates/feature-gate-ffi_const.rs
@@ -1,6 +1,6 @@
 #![crate_type = "lib"]
 
 extern "C" {
-    #[ffi_const] //~ ERROR the `#[ffi_const]` attribute is an experimental feature
+    #[unsafe(ffi_const)] //~ ERROR the `#[ffi_const]` attribute is an experimental feature
     pub fn foo();
 }
diff --git a/tests/ui/feature-gates/feature-gate-ffi_const.stderr b/tests/ui/feature-gates/feature-gate-ffi_const.stderr
index d083b826d6e..7e8c941be07 100644
--- a/tests/ui/feature-gates/feature-gate-ffi_const.stderr
+++ b/tests/ui/feature-gates/feature-gate-ffi_const.stderr
@@ -1,8 +1,8 @@
 error[E0658]: the `#[ffi_const]` attribute is an experimental feature
   --> $DIR/feature-gate-ffi_const.rs:4:5
    |
-LL |     #[ffi_const]
-   |     ^^^^^^^^^^^^
+LL |     #[unsafe(ffi_const)]
+   |     ^^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #58328 <https://github.com/rust-lang/rust/issues/58328> for more information
    = help: add `#![feature(ffi_const)]` to the crate attributes to enable
diff --git a/tests/ui/feature-gates/feature-gate-ffi_pure.rs b/tests/ui/feature-gates/feature-gate-ffi_pure.rs
index b0dfa01ff4c..0f1288b234e 100644
--- a/tests/ui/feature-gates/feature-gate-ffi_pure.rs
+++ b/tests/ui/feature-gates/feature-gate-ffi_pure.rs
@@ -1,6 +1,6 @@
 #![crate_type = "lib"]
 
 extern "C" {
-    #[ffi_pure] //~ ERROR the `#[ffi_pure]` attribute is an experimental feature
+    #[unsafe(ffi_pure)] //~ ERROR the `#[ffi_pure]` attribute is an experimental feature
     pub fn foo();
 }
diff --git a/tests/ui/feature-gates/feature-gate-ffi_pure.stderr b/tests/ui/feature-gates/feature-gate-ffi_pure.stderr
index 6544d450eeb..cf923536d6c 100644
--- a/tests/ui/feature-gates/feature-gate-ffi_pure.stderr
+++ b/tests/ui/feature-gates/feature-gate-ffi_pure.stderr
@@ -1,8 +1,8 @@
 error[E0658]: the `#[ffi_pure]` attribute is an experimental feature
   --> $DIR/feature-gate-ffi_pure.rs:4:5
    |
-LL |     #[ffi_pure]
-   |     ^^^^^^^^^^^
+LL |     #[unsafe(ffi_pure)]
+   |     ^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #58329 <https://github.com/rust-lang/rust/issues/58329> for more information
    = help: add `#![feature(ffi_pure)]` to the crate attributes to enable
diff --git a/tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.rs b/tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.rs
new file mode 100644
index 00000000000..c91d8339944
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.rs
@@ -0,0 +1,26 @@
+//@ needs-asm-support
+//@ only-x86_64
+
+#![feature(naked_functions, rust_cold_cc)]
+
+use std::arch::naked_asm;
+
+#[naked]
+pub unsafe fn rust_implicit() {
+    //~^ ERROR `#[naked]` is currently unstable on `extern "Rust"` functions
+    naked_asm!("ret");
+}
+
+#[naked]
+pub unsafe extern "Rust" fn rust_explicit() {
+    //~^ ERROR `#[naked]` is currently unstable on `extern "Rust"` functions
+    naked_asm!("ret");
+}
+
+#[naked]
+pub unsafe extern "rust-cold" fn rust_cold() {
+    //~^ ERROR `#[naked]` is currently unstable on `extern "rust-cold"` functions
+    naked_asm!("ret");
+}
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.stderr b/tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.stderr
new file mode 100644
index 00000000000..ba45e15ec86
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-naked_functions_rustic_abi.stderr
@@ -0,0 +1,33 @@
+error[E0658]: `#[naked]` is currently unstable on `extern "Rust"` functions
+  --> $DIR/feature-gate-naked_functions_rustic_abi.rs:9:1
+   |
+LL | pub unsafe fn rust_implicit() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #138997 <https://github.com/rust-lang/rust/issues/138997> for more information
+   = help: add `#![feature(naked_functions_rustic_abi)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error[E0658]: `#[naked]` is currently unstable on `extern "Rust"` functions
+  --> $DIR/feature-gate-naked_functions_rustic_abi.rs:15:1
+   |
+LL | pub unsafe extern "Rust" fn rust_explicit() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #138997 <https://github.com/rust-lang/rust/issues/138997> for more information
+   = help: add `#![feature(naked_functions_rustic_abi)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error[E0658]: `#[naked]` is currently unstable on `extern "rust-cold"` functions
+  --> $DIR/feature-gate-naked_functions_rustic_abi.rs:21:1
+   |
+LL | pub unsafe extern "rust-cold" fn rust_cold() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #138997 <https://github.com/rust-lang/rust/issues/138997> for more information
+   = help: add `#![feature(naked_functions_rustic_abi)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/ffi-attrs/ffi_const.rs b/tests/ui/ffi-attrs/ffi_const.rs
index aa20a4d4c65..dddc862b0fa 100644
--- a/tests/ui/ffi-attrs/ffi_const.rs
+++ b/tests/ui/ffi-attrs/ffi_const.rs
@@ -1,15 +1,18 @@
 #![feature(ffi_const)]
 #![crate_type = "lib"]
 
-#[ffi_const] //~ ERROR `#[ffi_const]` may only be used on foreign functions
+#[unsafe(ffi_const)] //~ ERROR `#[ffi_const]` may only be used on foreign functions
 pub fn foo() {}
 
-#[ffi_const] //~ ERROR `#[ffi_const]` may only be used on foreign functions
+#[unsafe(ffi_const)] //~ ERROR `#[ffi_const]` may only be used on foreign functions
 macro_rules! bar {
-    () => ()
+    () => {};
 }
 
 extern "C" {
-    #[ffi_const] //~ ERROR `#[ffi_const]` may only be used on foreign functions
+    #[unsafe(ffi_const)] //~ ERROR `#[ffi_const]` may only be used on foreign functions
     static INT: i32;
+
+    #[ffi_const] //~ ERROR unsafe attribute used without unsafe
+    fn bar();
 }
diff --git a/tests/ui/ffi-attrs/ffi_const.stderr b/tests/ui/ffi-attrs/ffi_const.stderr
index 394b98f8971..7f31237539d 100644
--- a/tests/ui/ffi-attrs/ffi_const.stderr
+++ b/tests/ui/ffi-attrs/ffi_const.stderr
@@ -1,21 +1,32 @@
+error: unsafe attribute used without unsafe
+  --> $DIR/ffi_const.rs:16:7
+   |
+LL |     #[ffi_const]
+   |       ^^^^^^^^^ usage of unsafe attribute
+   |
+help: wrap the attribute in `unsafe(...)`
+   |
+LL |     #[unsafe(ffi_const)]
+   |       +++++++         +
+
 error[E0756]: `#[ffi_const]` may only be used on foreign functions
   --> $DIR/ffi_const.rs:4:1
    |
-LL | #[ffi_const]
-   | ^^^^^^^^^^^^
+LL | #[unsafe(ffi_const)]
+   | ^^^^^^^^^^^^^^^^^^^^
 
 error[E0756]: `#[ffi_const]` may only be used on foreign functions
   --> $DIR/ffi_const.rs:7:1
    |
-LL | #[ffi_const]
-   | ^^^^^^^^^^^^
+LL | #[unsafe(ffi_const)]
+   | ^^^^^^^^^^^^^^^^^^^^
 
 error[E0756]: `#[ffi_const]` may only be used on foreign functions
   --> $DIR/ffi_const.rs:13:5
    |
-LL |     #[ffi_const]
-   |     ^^^^^^^^^^^^
+LL |     #[unsafe(ffi_const)]
+   |     ^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0756`.
diff --git a/tests/ui/ffi-attrs/ffi_const2.rs b/tests/ui/ffi-attrs/ffi_const2.rs
index 82fe8a9c91d..8a8de13b153 100644
--- a/tests/ui/ffi-attrs/ffi_const2.rs
+++ b/tests/ui/ffi-attrs/ffi_const2.rs
@@ -1,8 +1,8 @@
 #![feature(ffi_const, ffi_pure)]
 
 extern "C" {
-    #[ffi_pure] //~ ERROR `#[ffi_const]` function cannot be `#[ffi_pure]`
-    #[ffi_const]
+    #[unsafe(ffi_pure)] //~ ERROR `#[ffi_const]` function cannot be `#[ffi_pure]`
+    #[unsafe(ffi_const)]
     pub fn baz();
 }
 
diff --git a/tests/ui/ffi-attrs/ffi_const2.stderr b/tests/ui/ffi-attrs/ffi_const2.stderr
index b8cbc296370..d4c9bc42ec9 100644
--- a/tests/ui/ffi-attrs/ffi_const2.stderr
+++ b/tests/ui/ffi-attrs/ffi_const2.stderr
@@ -1,8 +1,8 @@
 error[E0757]: `#[ffi_const]` function cannot be `#[ffi_pure]`
   --> $DIR/ffi_const2.rs:4:5
    |
-LL |     #[ffi_pure]
-   |     ^^^^^^^^^^^
+LL |     #[unsafe(ffi_pure)]
+   |     ^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 1 previous error
 
diff --git a/tests/ui/ffi-attrs/ffi_pure.rs b/tests/ui/ffi-attrs/ffi_pure.rs
index 6d2f3a614ec..1f4812f55cf 100644
--- a/tests/ui/ffi-attrs/ffi_pure.rs
+++ b/tests/ui/ffi-attrs/ffi_pure.rs
@@ -1,15 +1,18 @@
 #![feature(ffi_pure)]
 #![crate_type = "lib"]
 
-#[ffi_pure] //~ ERROR `#[ffi_pure]` may only be used on foreign functions
+#[unsafe(ffi_pure)] //~ ERROR `#[ffi_pure]` may only be used on foreign functions
 pub fn foo() {}
 
-#[ffi_pure] //~ ERROR `#[ffi_pure]` may only be used on foreign functions
+#[unsafe(ffi_pure)] //~ ERROR `#[ffi_pure]` may only be used on foreign functions
 macro_rules! bar {
-    () => ()
+    () => {};
 }
 
 extern "C" {
-    #[ffi_pure] //~ ERROR `#[ffi_pure]` may only be used on foreign functions
+    #[unsafe(ffi_pure)] //~ ERROR `#[ffi_pure]` may only be used on foreign functions
     static INT: i32;
+
+    #[ffi_pure] //~ ERROR unsafe attribute used without unsafe
+    fn bar();
 }
diff --git a/tests/ui/ffi-attrs/ffi_pure.stderr b/tests/ui/ffi-attrs/ffi_pure.stderr
index 8b61a4b609f..bd1177c01e2 100644
--- a/tests/ui/ffi-attrs/ffi_pure.stderr
+++ b/tests/ui/ffi-attrs/ffi_pure.stderr
@@ -1,21 +1,32 @@
+error: unsafe attribute used without unsafe
+  --> $DIR/ffi_pure.rs:16:7
+   |
+LL |     #[ffi_pure]
+   |       ^^^^^^^^ usage of unsafe attribute
+   |
+help: wrap the attribute in `unsafe(...)`
+   |
+LL |     #[unsafe(ffi_pure)]
+   |       +++++++        +
+
 error[E0755]: `#[ffi_pure]` may only be used on foreign functions
   --> $DIR/ffi_pure.rs:4:1
    |
-LL | #[ffi_pure]
-   | ^^^^^^^^^^^
+LL | #[unsafe(ffi_pure)]
+   | ^^^^^^^^^^^^^^^^^^^
 
 error[E0755]: `#[ffi_pure]` may only be used on foreign functions
   --> $DIR/ffi_pure.rs:7:1
    |
-LL | #[ffi_pure]
-   | ^^^^^^^^^^^
+LL | #[unsafe(ffi_pure)]
+   | ^^^^^^^^^^^^^^^^^^^
 
 error[E0755]: `#[ffi_pure]` may only be used on foreign functions
   --> $DIR/ffi_pure.rs:13:5
    |
-LL |     #[ffi_pure]
-   |     ^^^^^^^^^^^
+LL |     #[unsafe(ffi_pure)]
+   |     ^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 3 previous errors
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0755`.
diff --git a/tests/ui/fn/suggest-return-closure.rs b/tests/ui/fn/suggest-return-closure.rs
index 30e25ca8edc..67be8de9243 100644
--- a/tests/ui/fn/suggest-return-closure.rs
+++ b/tests/ui/fn/suggest-return-closure.rs
@@ -19,6 +19,7 @@ fn fn_mut() -> _ {
     let x = String::new();
     //~^ HELP: consider changing this to be mutable
     //~| NOTE binding `x` declared here
+    //~| SUGGESTION mut
     |c| { //~ NOTE: value captured here
         x.push(c);
         //~^ ERROR: does not live long enough
diff --git a/tests/ui/fn/suggest-return-closure.stderr b/tests/ui/fn/suggest-return-closure.stderr
index 45c12b548e6..1860d1ca5d9 100644
--- a/tests/ui/fn/suggest-return-closure.stderr
+++ b/tests/ui/fn/suggest-return-closure.stderr
@@ -21,7 +21,7 @@ LL | fn fn_mut() -> _ {
    = note: for more information on `Fn` traits and closure types, see https://doc.rust-lang.org/book/ch13-01-closures.html
 
 error[E0121]: the placeholder `_` is not allowed within types on item signatures for return types
-  --> $DIR/suggest-return-closure.rs:32:13
+  --> $DIR/suggest-return-closure.rs:33:13
    |
 LL | fn fun() -> _ {
    |             ^
@@ -32,7 +32,7 @@ LL | fn fun() -> _ {
    = note: for more information on `Fn` traits and closure types, see https://doc.rust-lang.org/book/ch13-01-closures.html
 
 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
-  --> $DIR/suggest-return-closure.rs:23:9
+  --> $DIR/suggest-return-closure.rs:24:9
    |
 LL |         x.push(c);
    |         ^ cannot borrow as mutable
@@ -43,7 +43,7 @@ LL |     let mut x = String::new();
    |         +++
 
 error[E0597]: `x` does not live long enough
-  --> $DIR/suggest-return-closure.rs:23:9
+  --> $DIR/suggest-return-closure.rs:24:9
    |
 LL |     let x = String::new();
    |         - binding `x` declared here
diff --git a/tests/ui/issues/issue-37131.rs b/tests/ui/issues/issue-37131.rs
index 16681ac21d1..e91c76e1390 100644
--- a/tests/ui/issues/issue-37131.rs
+++ b/tests/ui/issues/issue-37131.rs
@@ -1,4 +1,6 @@
 //~ ERROR can't find crate for `std`
+//~| NOTE target may not be installed
+//~| NOTE can't find crate
 // Tests that compiling for a target which is not installed will result in a helpful
 // error message.
 
@@ -6,5 +8,4 @@
 //@ ignore-arm
 //@ needs-llvm-components: arm
 
-//@ error-pattern:target may not be installed
 fn main() { }
diff --git a/tests/ui/layout/unknown-when-no-type-parameter.rs b/tests/ui/layout/unknown-when-no-type-parameter.rs
index 500b7938eeb..87f90aa438a 100644
--- a/tests/ui/layout/unknown-when-no-type-parameter.rs
+++ b/tests/ui/layout/unknown-when-no-type-parameter.rs
@@ -1,13 +1,13 @@
 #![feature(trivial_bounds)]
 
-//@ error-pattern: the type `<() as Project>::Assoc` has an unknown layout
-
 trait Project {
     type Assoc;
 }
 
 fn foo() where (): Project {
     [(); size_of::<<() as Project>::Assoc>()]; //~ ERROR evaluation of constant value failed
+    //~| NOTE the type `<() as Project>::Assoc` has an unknown layout
+    //~| NOTE inside `std::mem::size_of::<<() as Project>::Assoc>`
 }
 
 fn main() {}
diff --git a/tests/ui/layout/unknown-when-no-type-parameter.stderr b/tests/ui/layout/unknown-when-no-type-parameter.stderr
index a2dbb191ee2..35fbb11f156 100644
--- a/tests/ui/layout/unknown-when-no-type-parameter.stderr
+++ b/tests/ui/layout/unknown-when-no-type-parameter.stderr
@@ -1,5 +1,5 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/unknown-when-no-type-parameter.rs:10:10
+  --> $DIR/unknown-when-no-type-parameter.rs:8:10
    |
 LL |     [(); size_of::<<() as Project>::Assoc>()];
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the type `<() as Project>::Assoc` has an unknown layout
diff --git a/tests/ui/link-native-libs/suggest-libname-only-1.rs b/tests/ui/link-native-libs/suggest-libname-only-1.rs
index 4ccfa086bde..c69949d1fdb 100644
--- a/tests/ui/link-native-libs/suggest-libname-only-1.rs
+++ b/tests/ui/link-native-libs/suggest-libname-only-1.rs
@@ -1,10 +1,11 @@
 //@ build-fail
 //@ compile-flags: --crate-type rlib
-//@ error-pattern: only provide the library name `foo`, not the full filename
 
 #[link(name = "libfoo.a", kind = "static")]
 extern { } //~ WARN extern declarations without an explicit ABI are deprecated
+           //~| HELP explicitly specify the "C" ABI
 
 pub fn main() { }
 
 //~? ERROR could not find native static library `libfoo.a`
+//~? HELP only provide the library name `foo`, not the full filename
diff --git a/tests/ui/link-native-libs/suggest-libname-only-1.stderr b/tests/ui/link-native-libs/suggest-libname-only-1.stderr
index 85a3599e8db..0320294a800 100644
--- a/tests/ui/link-native-libs/suggest-libname-only-1.stderr
+++ b/tests/ui/link-native-libs/suggest-libname-only-1.stderr
@@ -1,5 +1,5 @@
 warning: extern declarations without an explicit ABI are deprecated
-  --> $DIR/suggest-libname-only-1.rs:6:1
+  --> $DIR/suggest-libname-only-1.rs:5:1
    |
 LL | extern { }
    | ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
diff --git a/tests/ui/link-native-libs/suggest-libname-only-2.rs b/tests/ui/link-native-libs/suggest-libname-only-2.rs
index c35b4a674b7..d5150c327cd 100644
--- a/tests/ui/link-native-libs/suggest-libname-only-2.rs
+++ b/tests/ui/link-native-libs/suggest-libname-only-2.rs
@@ -1,10 +1,11 @@
 //@ build-fail
 //@ compile-flags: --crate-type rlib
-//@ error-pattern: only provide the library name `bar`, not the full filename
 
 #[link(name = "bar.lib", kind = "static")]
 extern { } //~ WARN extern declarations without an explicit ABI are deprecated
+           //~| HELP explicitly specify the "C" ABI
 
 pub fn main() { }
 
 //~? ERROR could not find native static library `bar.lib`
+//~? HELP only provide the library name `bar`, not the full filename
diff --git a/tests/ui/link-native-libs/suggest-libname-only-2.stderr b/tests/ui/link-native-libs/suggest-libname-only-2.stderr
index d5c88931ad5..e492aea27b4 100644
--- a/tests/ui/link-native-libs/suggest-libname-only-2.stderr
+++ b/tests/ui/link-native-libs/suggest-libname-only-2.stderr
@@ -1,5 +1,5 @@
 warning: extern declarations without an explicit ABI are deprecated
-  --> $DIR/suggest-libname-only-2.rs:6:1
+  --> $DIR/suggest-libname-only-2.rs:5:1
    |
 LL | extern { }
    | ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
diff --git a/tests/ui/lint/cli-unknown-force-warn.rs b/tests/ui/lint/cli-unknown-force-warn.rs
index 330d5570e21..0c60f48c514 100644
--- a/tests/ui/lint/cli-unknown-force-warn.rs
+++ b/tests/ui/lint/cli-unknown-force-warn.rs
@@ -3,12 +3,12 @@
 
 //@ check-pass
 //@ compile-flags: --force-warn foo-qux
-
-//@ error-pattern: requested on the command line with `--force-warn foo_qux`
-//@ error-pattern: `#[warn(unknown_lints)]` on by default
+//@ dont-require-annotations: NOTE
 
 fn main() {}
 
 //~? WARN unknown lint: `foo_qux`
 //~? WARN unknown lint: `foo_qux`
 //~? WARN unknown lint: `foo_qux`
+//~? NOTE requested on the command line with `--force-warn foo_qux`
+//~? NOTE `#[warn(unknown_lints)]` on by default
diff --git a/tests/ui/lint/dead-code/self-assign.rs b/tests/ui/lint/dead-code/self-assign.rs
index 072a899e1bd..357846baf22 100644
--- a/tests/ui/lint/dead-code/self-assign.rs
+++ b/tests/ui/lint/dead-code/self-assign.rs
@@ -1,19 +1,29 @@
-// Test that dead code warnings are issued for superfluous assignments of
-// fields or variables to themselves (issue #75356).
-
-//@ ignore-test FIXME(81658, 83171)
+//! Test that dead code warnings are issued for superfluous assignments of fields or variables to
+//! themselves (issue #75356).
+//!
+//! # History of this test (to aid relanding of a fixed version of #81473)
+//!
+//! - Original lint request was about self-assignments not triggering sth like `dead_code`.
+//! - `dead_code` lint expansion for self-assignments was implemented in #87129.
+//! - Unfortunately implementation components of #87129 had to be disabled as part of reverts
+//!   #86212, #83171 (to revert #81473) to address regressions #81626 and #81658.
+//! - Consequently, none of the following warnings are emitted.
 
 //@ check-pass
+
+// Implementation of self-assignment `dead_code` lint expansions disabled due to reverts.
+//@ known-bug: #75356
+
 #![allow(unused_assignments)]
 #![warn(dead_code)]
 
 fn main() {
     let mut x = 0;
     x = x;
-    //~^ WARNING: useless assignment of variable of type `i32` to itself
+    // FIXME ~^ WARNING: useless assignment of variable of type `i32` to itself
 
     x = (x);
-    //~^ WARNING: useless assignment of variable of type `i32` to itself
+    // FIXME ~^ WARNING: useless assignment of variable of type `i32` to itself
 
     x = {x};
     // block expressions don't count as self-assignments
@@ -22,10 +32,10 @@ fn main() {
     struct S<'a> { f: &'a str }
     let mut s = S { f: "abc" };
     s = s;
-    //~^ WARNING: useless assignment of variable of type `S` to itself
+    // FIXME ~^ WARNING: useless assignment of variable of type `S` to itself
 
     s.f = s.f;
-    //~^ WARNING: useless assignment of field of type `&str` to itself
+    // FIXME ~^ WARNING: useless assignment of field of type `&str` to itself
 
 
     struct N0 { x: Box<i32> }
@@ -34,11 +44,11 @@ fn main() {
     struct N3 { n: N2 };
     let mut n3 = N3 { n: N2(N1 { n: N0 { x: Box::new(42) } }) };
     n3.n.0.n.x = n3.n.0.n.x;
-    //~^ WARNING: useless assignment of field of type `Box<i32>` to itself
+    // FIXME ~^ WARNING: useless assignment of field of type `Box<i32>` to itself
 
     let mut t = (1, ((2, 3, (4, 5)),));
     t.1.0.2.1 = t.1.0.2.1;
-    //~^ WARNING: useless assignment of field of type `i32` to itself
+    // FIXME ~^ WARNING: useless assignment of field of type `i32` to itself
 
 
     let mut y = 0;
diff --git a/tests/ui/lint/dead-code/self-assign.stderr b/tests/ui/lint/dead-code/self-assign.stderr
deleted file mode 100644
index bb79c0ec72a..00000000000
--- a/tests/ui/lint/dead-code/self-assign.stderr
+++ /dev/null
@@ -1,44 +0,0 @@
-warning: useless assignment of variable of type `i32` to itself
-  --> $DIR/self-assign.rs:10:5
-   |
-LL |     x = x;
-   |     ^^^^^
-   |
-note: the lint level is defined here
-  --> $DIR/self-assign.rs:6:9
-   |
-LL | #![warn(dead_code)]
-   |         ^^^^^^^^^
-
-warning: useless assignment of variable of type `i32` to itself
-  --> $DIR/self-assign.rs:13:5
-   |
-LL |     x = (x);
-   |     ^^^^^^^
-
-warning: useless assignment of variable of type `S` to itself
-  --> $DIR/self-assign.rs:22:5
-   |
-LL |     s = s;
-   |     ^^^^^
-
-warning: useless assignment of field of type `&str` to itself
-  --> $DIR/self-assign.rs:25:5
-   |
-LL |     s.f = s.f;
-   |     ^^^^^^^^^
-
-warning: useless assignment of field of type `Box<i32>` to itself
-  --> $DIR/self-assign.rs:34:5
-   |
-LL |     n3.n.0.n.x = n3.n.0.n.x;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
-
-warning: useless assignment of field of type `i32` to itself
-  --> $DIR/self-assign.rs:38:5
-   |
-LL |     t.1.0.2.1 = t.1.0.2.1;
-   |     ^^^^^^^^^^^^^^^^^^^^^
-
-warning: 6 warnings emitted
-
diff --git a/tests/ui/lint/lint-removed-cmdline-deny.rs b/tests/ui/lint/lint-removed-cmdline-deny.rs
index 6616781d5cb..83bbd248aa0 100644
--- a/tests/ui/lint/lint-removed-cmdline-deny.rs
+++ b/tests/ui/lint/lint-removed-cmdline-deny.rs
@@ -2,9 +2,7 @@
 // cc #30346
 
 //@ compile-flags:-D renamed-and-removed-lints -D raw_pointer_derive
-
-//@ error-pattern:requested on the command line with `-D raw_pointer_derive`
-//@ error-pattern:requested on the command line with `-D renamed-and-removed-lints`
+//@ dont-require-annotations: NOTE
 
 #![warn(unused)]
 
@@ -14,3 +12,5 @@ fn main() { let unused = (); } //~ ERROR unused variable: `unused`
 //~? ERROR lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
 //~? ERROR lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
 //~? ERROR lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
+//~? NOTE requested on the command line with `-D raw_pointer_derive`
+//~? NOTE requested on the command line with `-D renamed-and-removed-lints`
diff --git a/tests/ui/lint/lint-removed-cmdline-deny.stderr b/tests/ui/lint/lint-removed-cmdline-deny.stderr
index 27a3504a16a..2fb237339cd 100644
--- a/tests/ui/lint/lint-removed-cmdline-deny.stderr
+++ b/tests/ui/lint/lint-removed-cmdline-deny.stderr
@@ -14,13 +14,13 @@ error: lint `raw_pointer_derive` has been removed: using derive with raw pointer
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: unused variable: `unused`
-  --> $DIR/lint-removed-cmdline-deny.rs:12:17
+  --> $DIR/lint-removed-cmdline-deny.rs:10:17
    |
 LL | fn main() { let unused = (); }
    |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
-  --> $DIR/lint-removed-cmdline-deny.rs:11:8
+  --> $DIR/lint-removed-cmdline-deny.rs:9:8
    |
 LL | #[deny(warnings)]
    |        ^^^^^^^^
diff --git a/tests/ui/lint/lint-removed-cmdline.rs b/tests/ui/lint/lint-removed-cmdline.rs
index 4dde3dbc381..f83747a3a6b 100644
--- a/tests/ui/lint/lint-removed-cmdline.rs
+++ b/tests/ui/lint/lint-removed-cmdline.rs
@@ -2,9 +2,7 @@
 // cc #30346
 
 //@ compile-flags:-D raw_pointer_derive
-
-//@ error-pattern:`#[warn(renamed_and_removed_lints)]` on by default
-//@ error-pattern:requested on the command line with `-D raw_pointer_derive`
+//@ dont-require-annotations: NOTE
 
 #![warn(unused)]
 
@@ -14,3 +12,5 @@ fn main() { let unused = (); } //~ ERROR unused variable: `unused`
 //~? WARN lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
 //~? WARN lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
 //~? WARN lint `raw_pointer_derive` has been removed: using derive with raw pointers is ok
+//~? NOTE `#[warn(renamed_and_removed_lints)]` on by default
+//~? NOTE requested on the command line with `-D raw_pointer_derive`
diff --git a/tests/ui/lint/lint-removed-cmdline.stderr b/tests/ui/lint/lint-removed-cmdline.stderr
index 7994f9bcfd9..64e7c572ca7 100644
--- a/tests/ui/lint/lint-removed-cmdline.stderr
+++ b/tests/ui/lint/lint-removed-cmdline.stderr
@@ -14,13 +14,13 @@ warning: lint `raw_pointer_derive` has been removed: using derive with raw point
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: unused variable: `unused`
-  --> $DIR/lint-removed-cmdline.rs:12:17
+  --> $DIR/lint-removed-cmdline.rs:10:17
    |
 LL | fn main() { let unused = (); }
    |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
-  --> $DIR/lint-removed-cmdline.rs:11:8
+  --> $DIR/lint-removed-cmdline.rs:9:8
    |
 LL | #[deny(warnings)]
    |        ^^^^^^^^
diff --git a/tests/ui/lint/lint-renamed-cmdline-deny.rs b/tests/ui/lint/lint-renamed-cmdline-deny.rs
index 0ea4ce40817..c8b03507815 100644
--- a/tests/ui/lint/lint-renamed-cmdline-deny.rs
+++ b/tests/ui/lint/lint-renamed-cmdline-deny.rs
@@ -1,8 +1,6 @@
 //@ compile-flags:-D renamed-and-removed-lints -D bare_trait_object
-
-//@ error-pattern:use the new name `bare_trait_objects`
-//@ error-pattern:requested on the command line with `-D bare_trait_object`
-//@ error-pattern:requested on the command line with `-D renamed-and-removed-lints`
+//@ dont-require-annotations: HELP
+//@ dont-require-annotations: NOTE
 
 #[deny(unused)]
 fn main() { let unused = (); } //~ ERROR unused variable: `unused`
@@ -10,3 +8,6 @@ fn main() { let unused = (); } //~ ERROR unused variable: `unused`
 //~? ERROR lint `bare_trait_object` has been renamed to `bare_trait_objects`
 //~? ERROR lint `bare_trait_object` has been renamed to `bare_trait_objects`
 //~? ERROR lint `bare_trait_object` has been renamed to `bare_trait_objects`
+//~? HELP use the new name `bare_trait_objects`
+//~? NOTE requested on the command line with `-D bare_trait_object`
+//~? NOTE requested on the command line with `-D renamed-and-removed-lints`
diff --git a/tests/ui/lint/lint-renamed-cmdline-deny.stderr b/tests/ui/lint/lint-renamed-cmdline-deny.stderr
index a49cdc84f9e..b42b82834c1 100644
--- a/tests/ui/lint/lint-renamed-cmdline-deny.stderr
+++ b/tests/ui/lint/lint-renamed-cmdline-deny.stderr
@@ -17,13 +17,13 @@ error: lint `bare_trait_object` has been renamed to `bare_trait_objects`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: unused variable: `unused`
-  --> $DIR/lint-renamed-cmdline-deny.rs:8:17
+  --> $DIR/lint-renamed-cmdline-deny.rs:6:17
    |
 LL | fn main() { let unused = (); }
    |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
-  --> $DIR/lint-renamed-cmdline-deny.rs:7:8
+  --> $DIR/lint-renamed-cmdline-deny.rs:5:8
    |
 LL | #[deny(unused)]
    |        ^^^^^^
diff --git a/tests/ui/lint/lint-renamed-cmdline.rs b/tests/ui/lint/lint-renamed-cmdline.rs
index 45df7b6d640..757cb514267 100644
--- a/tests/ui/lint/lint-renamed-cmdline.rs
+++ b/tests/ui/lint/lint-renamed-cmdline.rs
@@ -1,7 +1,5 @@
 //@ compile-flags:-D bare_trait_object
-
-//@ error-pattern:requested on the command line with `-D bare_trait_object`
-//@ error-pattern:`#[warn(renamed_and_removed_lints)]` on by default
+//@ dont-require-annotations: NOTE
 
 #[deny(unused)]
 fn main() { let unused = (); } //~ ERROR unused variable: `unused`
@@ -9,3 +7,5 @@ fn main() { let unused = (); } //~ ERROR unused variable: `unused`
 //~? WARN lint `bare_trait_object` has been renamed to `bare_trait_objects`
 //~? WARN lint `bare_trait_object` has been renamed to `bare_trait_objects`
 //~? WARN lint `bare_trait_object` has been renamed to `bare_trait_objects`
+//~? NOTE requested on the command line with `-D bare_trait_object`
+//~? NOTE `#[warn(renamed_and_removed_lints)]` on by default
diff --git a/tests/ui/lint/lint-renamed-cmdline.stderr b/tests/ui/lint/lint-renamed-cmdline.stderr
index 901e7a642d1..efd399e2169 100644
--- a/tests/ui/lint/lint-renamed-cmdline.stderr
+++ b/tests/ui/lint/lint-renamed-cmdline.stderr
@@ -17,13 +17,13 @@ warning: lint `bare_trait_object` has been renamed to `bare_trait_objects`
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error: unused variable: `unused`
-  --> $DIR/lint-renamed-cmdline.rs:7:17
+  --> $DIR/lint-renamed-cmdline.rs:5:17
    |
 LL | fn main() { let unused = (); }
    |                 ^^^^^^ help: if this is intentional, prefix it with an underscore: `_unused`
    |
 note: the lint level is defined here
-  --> $DIR/lint-renamed-cmdline.rs:6:8
+  --> $DIR/lint-renamed-cmdline.rs:4:8
    |
 LL | #[deny(unused)]
    |        ^^^^^^
diff --git a/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs b/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs
index e2f7c73eacf..ac001e1b6a0 100644
--- a/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs
+++ b/tests/ui/lint/lint-unknown-lint-cmdline-deny.rs
@@ -1,9 +1,6 @@
 //@ compile-flags:-D unknown-lints -D bogus -D dead_cod
-
-//@ error-pattern:requested on the command line with `-D bogus`
-//@ error-pattern:requested on the command line with `-D dead_cod`
-//@ error-pattern:requested on the command line with `-D unknown-lints`
-//@ error-pattern:did you mean: `dead_code`
+//@ dont-require-annotations: HELP
+//@ dont-require-annotations: NOTE
 
 fn main() { }
 
@@ -13,3 +10,7 @@ fn main() { }
 //~? ERROR unknown lint: `dead_cod`
 //~? ERROR unknown lint: `bogus`
 //~? ERROR unknown lint: `dead_cod`
+//~? NOTE requested on the command line with `-D bogus`
+//~? NOTE requested on the command line with `-D dead_cod`
+//~? NOTE requested on the command line with `-D unknown-lints`
+//~? HELP did you mean: `dead_code`
diff --git a/tests/ui/lint/lint-unknown-lint-cmdline.rs b/tests/ui/lint/lint-unknown-lint-cmdline.rs
index 931e945a1a3..7eb8c1f7314 100644
--- a/tests/ui/lint/lint-unknown-lint-cmdline.rs
+++ b/tests/ui/lint/lint-unknown-lint-cmdline.rs
@@ -1,10 +1,7 @@
 //@ check-pass
 //@ compile-flags:-D bogus -D dead_cod
-
-//@ error-pattern:requested on the command line with `-D bogus`
-//@ error-pattern:`#[warn(unknown_lints)]` on by default
-//@ error-pattern:requested on the command line with `-D dead_cod`
-//@ error-pattern:did you mean: `dead_code`
+//@ dont-require-annotations: HELP
+//@ dont-require-annotations: NOTE
 
 fn main() { }
 
@@ -14,3 +11,7 @@ fn main() { }
 //~? WARN unknown lint: `dead_cod`
 //~? WARN unknown lint: `bogus`
 //~? WARN unknown lint: `dead_cod`
+//~? NOTE requested on the command line with `-D bogus`
+//~? NOTE `#[warn(unknown_lints)]` on by default
+//~? NOTE requested on the command line with `-D dead_cod`
+//~? HELP did you mean: `dead_code`
diff --git a/tests/ui/lint/non-local-defs/cargo-update.rs b/tests/ui/lint/non-local-defs/cargo-update.rs
index 8b8c15795d3..f778752b28a 100644
--- a/tests/ui/lint/non-local-defs/cargo-update.rs
+++ b/tests/ui/lint/non-local-defs/cargo-update.rs
@@ -8,7 +8,7 @@
 //
 // and since we specifically want to check the presence
 // of the `cargo update` suggestion we assert it here.
-//@ error-pattern: `cargo update -p non_local_macro`
+//@ dont-require-annotations: NOTE
 
 extern crate non_local_macro;
 
@@ -16,5 +16,6 @@ struct LocalStruct;
 
 non_local_macro::non_local_impl!(LocalStruct);
 //~^ WARN non-local `impl` definition
+//~| NOTE `cargo update -p non_local_macro`
 
 fn main() {}
diff --git a/tests/ui/lint/removed-lints/undefined_naked_function_abi.rs b/tests/ui/lint/removed-lints/undefined_naked_function_abi.rs
new file mode 100644
index 00000000000..cf3ac66ac86
--- /dev/null
+++ b/tests/ui/lint/removed-lints/undefined_naked_function_abi.rs
@@ -0,0 +1,5 @@
+//@ check-pass
+
+#![deny(undefined_naked_function_abi)]
+//~^ WARN  lint `undefined_naked_function_abi` has been removed
+fn main() {}
diff --git a/tests/ui/lint/removed-lints/undefined_naked_function_abi.stderr b/tests/ui/lint/removed-lints/undefined_naked_function_abi.stderr
new file mode 100644
index 00000000000..5a546688beb
--- /dev/null
+++ b/tests/ui/lint/removed-lints/undefined_naked_function_abi.stderr
@@ -0,0 +1,10 @@
+warning: lint `undefined_naked_function_abi` has been removed: converted into hard error, see PR #139001 <https://github.com/rust-lang/rust/issues/139001> for more information
+  --> $DIR/undefined_naked_function_abi.rs:3:9
+   |
+LL | #![deny(undefined_naked_function_abi)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(renamed_and_removed_lints)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/macros/macro-as-fn-body.rs b/tests/ui/macros/macro-as-fn-body.rs
index e0542edc2a5..188c7f7f728 100644
--- a/tests/ui/macros/macro-as-fn-body.rs
+++ b/tests/ui/macros/macro-as-fn-body.rs
@@ -1,7 +1,7 @@
 //
 //@ run-pass
 //
-// Description - ensure Interpolated blocks can act as valid function bodies
+// Description - ensure block metavariables can act as valid function bodies
 // Covered cases: free functions, struct methods, and default trait functions
 
 macro_rules! def_fn {
diff --git a/tests/ui/macros/remove-repetition-issue-139480.rs b/tests/ui/macros/remove-repetition-issue-139480.rs
new file mode 100644
index 00000000000..1efb4306763
--- /dev/null
+++ b/tests/ui/macros/remove-repetition-issue-139480.rs
@@ -0,0 +1,28 @@
+macro_rules! ciallo {
+    ($($v: vis)? $name: ident) => {
+    //~^ error: repetition matches empty token tree
+    };
+}
+
+macro_rules! meow {
+    ($name: ident $($v: vis)?) => {
+    //~^ error: repetition matches empty token tree
+    };
+}
+
+macro_rules! gbc {
+    ($name: ident $/*
+        this comment gets removed by the suggestion
+        */
+        ($v: vis)?) => {
+    //~^ error: repetition matches empty token tree
+    };
+}
+
+ciallo!(hello);
+
+meow!(miaow, pub);
+
+gbc!(mygo,);
+
+fn main() {}
diff --git a/tests/ui/macros/remove-repetition-issue-139480.stderr b/tests/ui/macros/remove-repetition-issue-139480.stderr
new file mode 100644
index 00000000000..c2475589ee9
--- /dev/null
+++ b/tests/ui/macros/remove-repetition-issue-139480.stderr
@@ -0,0 +1,44 @@
+error: repetition matches empty token tree
+  --> $DIR/remove-repetition-issue-139480.rs:2:7
+   |
+LL |     ($($v: vis)? $name: ident) => {
+   |       ^^^^^^^^^
+   |
+   = note: a `vis` fragment can already be empty
+help: remove the `$(` and `)?`
+   |
+LL -     ($($v: vis)? $name: ident) => {
+LL +     ($v: vis $name: ident) => {
+   |
+
+error: repetition matches empty token tree
+  --> $DIR/remove-repetition-issue-139480.rs:8:20
+   |
+LL |     ($name: ident $($v: vis)?) => {
+   |                    ^^^^^^^^^
+   |
+   = note: a `vis` fragment can already be empty
+help: remove the `$(` and `)?`
+   |
+LL -     ($name: ident $($v: vis)?) => {
+LL +     ($name: ident $v: vis) => {
+   |
+
+error: repetition matches empty token tree
+  --> $DIR/remove-repetition-issue-139480.rs:17:9
+   |
+LL |         ($v: vis)?) => {
+   |         ^^^^^^^^^
+   |
+   = note: a `vis` fragment can already be empty
+help: remove the `$(` and `)?`
+   |
+LL -     ($name: ident $/*
+LL -         this comment gets removed by the suggestion
+LL -         */
+LL -         ($v: vis)?) => {
+LL +     ($name: ident $v: vis) => {
+   |
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/macros/syntax-error-recovery.rs b/tests/ui/macros/syntax-error-recovery.rs
index 6cf9d54e826..e1681ea32a2 100644
--- a/tests/ui/macros/syntax-error-recovery.rs
+++ b/tests/ui/macros/syntax-error-recovery.rs
@@ -5,14 +5,14 @@ macro_rules! values {
             $(
                 #[$attr]
                 $token $($inner)? = $value,
+                //~^ ERROR expected one of `!` or `::`, found `<eof>`
             )*
         }
     };
 }
-//~^^^^^ ERROR expected one of `(`, `,`, `=`, `{`, or `}`, found `ty` metavariable
+//~^^^^^^ ERROR expected one of `(`, `,`, `=`, `{`, or `}`, found `ty` metavariable
 //~| ERROR macro expansion ignores `ty` metavariable and any tokens following
 
 values!(STRING(1) as (String) => cfg(test),);
-//~^ ERROR expected one of `!` or `::`, found `<eof>`
 
 fn main() {}
diff --git a/tests/ui/macros/syntax-error-recovery.stderr b/tests/ui/macros/syntax-error-recovery.stderr
index 61758fb9d7d..a2059aa1aa8 100644
--- a/tests/ui/macros/syntax-error-recovery.stderr
+++ b/tests/ui/macros/syntax-error-recovery.stderr
@@ -22,10 +22,10 @@ LL | values!(STRING(1) as (String) => cfg(test),);
    = note: the usage of `values!` is likely invalid in item context
 
 error: expected one of `!` or `::`, found `<eof>`
-  --> $DIR/syntax-error-recovery.rs:15:9
+  --> $DIR/syntax-error-recovery.rs:7:17
    |
-LL | values!(STRING(1) as (String) => cfg(test),);
-   |         ^^^^^^ expected one of `!` or `::`
+LL |                 $token $($inner)? = $value,
+   |                 ^^^^^^ expected one of `!` or `::`
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/missing/missing-return.rs b/tests/ui/missing/missing-return.rs
index 5d9839a969c..4d48e7c13e2 100644
--- a/tests/ui/missing/missing-return.rs
+++ b/tests/ui/missing/missing-return.rs
@@ -1,5 +1,4 @@
-//@ error-pattern: return
-
 fn f() -> isize { } //~ ERROR mismatched types
-
+                    //~| NOTE implicitly returns `()` as its body has no tail or `return` expression
+                    //~| NOTE expected `isize`, found `()`
 fn main() { f(); }
diff --git a/tests/ui/missing/missing-return.stderr b/tests/ui/missing/missing-return.stderr
index 5f7fb504075..b2d202b9b57 100644
--- a/tests/ui/missing/missing-return.stderr
+++ b/tests/ui/missing/missing-return.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/missing-return.rs:3:11
+  --> $DIR/missing-return.rs:1:11
    |
 LL | fn f() -> isize { }
    |    -      ^^^^^ expected `isize`, found `()`
diff --git a/tests/ui/nested-ty-params.rs b/tests/ui/nested-ty-params.rs
index 866e6230f9e..c00c3bc3372 100644
--- a/tests/ui/nested-ty-params.rs
+++ b/tests/ui/nested-ty-params.rs
@@ -1,4 +1,3 @@
-//@ error-pattern:can't use generic parameters from outer item
 fn hd<U>(v: Vec<U> ) -> U {
     fn hd1(w: [U]) -> U { return w[0]; }
     //~^ ERROR can't use generic parameters from outer item
diff --git a/tests/ui/nested-ty-params.stderr b/tests/ui/nested-ty-params.stderr
index a9cdec66719..7ca65b421b2 100644
--- a/tests/ui/nested-ty-params.stderr
+++ b/tests/ui/nested-ty-params.stderr
@@ -1,5 +1,5 @@
 error[E0401]: can't use generic parameters from outer item
-  --> $DIR/nested-ty-params.rs:3:16
+  --> $DIR/nested-ty-params.rs:2:16
    |
 LL | fn hd<U>(v: Vec<U> ) -> U {
    |       - type parameter from outer item
@@ -9,7 +9,7 @@ LL |     fn hd1(w: [U]) -> U { return w[0]; }
    |           help: try introducing a local generic parameter here: `<U>`
 
 error[E0401]: can't use generic parameters from outer item
-  --> $DIR/nested-ty-params.rs:3:23
+  --> $DIR/nested-ty-params.rs:2:23
    |
 LL | fn hd<U>(v: Vec<U> ) -> U {
    |       - type parameter from outer item
diff --git a/tests/ui/no_std/no-std-no-start-binary.rs b/tests/ui/no_std/no-std-no-start-binary.rs
index df68b99346a..6853e2d4228 100644
--- a/tests/ui/no_std/no-std-no-start-binary.rs
+++ b/tests/ui/no_std/no-std-no-start-binary.rs
@@ -1,5 +1,4 @@
 //@ compile-flags: -Cpanic=abort --emit link
-//@ error-pattern:using `fn main` requires the standard library
 
 // Make sure that we don't emit an error message mentioning internal lang items.
 
diff --git a/tests/ui/optimization-remark.rs b/tests/ui/optimization-remark.rs
index ebcf3b40ab2..165fc63c007 100644
--- a/tests/ui/optimization-remark.rs
+++ b/tests/ui/optimization-remark.rs
@@ -12,9 +12,8 @@
 //
 //@ [merge1] compile-flags: -Cremark=all    -Cremark=giraffe
 //@ [merge2] compile-flags: -Cremark=inline -Cremark=giraffe
-//
-//@ error-pattern: inline (missed): 'f' not inlined into 'g'
 //@ dont-check-compiler-stderr
+//@ dont-require-annotations: NOTE
 
 #[no_mangle]
 #[inline(never)]
@@ -25,3 +24,5 @@ pub fn f() {
 pub fn g() {
     f();
 }
+
+//~? NOTE inline (missed): 'f' not inlined into 'g'
diff --git a/tests/ui/packed/packed-struct-generic-transmute.rs b/tests/ui/packed/packed-struct-generic-transmute.rs
index 17e72bebc7d..66972633d80 100644
--- a/tests/ui/packed/packed-struct-generic-transmute.rs
+++ b/tests/ui/packed/packed-struct-generic-transmute.rs
@@ -3,8 +3,6 @@
 // the error points to the start of the file, not the line with the
 // transmute
 
-//@ error-pattern: cannot transmute between types of different sizes, or dependently-sized types
-
 use std::mem;
 
 #[repr(packed)]
diff --git a/tests/ui/packed/packed-struct-generic-transmute.stderr b/tests/ui/packed/packed-struct-generic-transmute.stderr
index e91f4988429..983742b78be 100644
--- a/tests/ui/packed/packed-struct-generic-transmute.stderr
+++ b/tests/ui/packed/packed-struct-generic-transmute.stderr
@@ -1,5 +1,5 @@
 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
-  --> $DIR/packed-struct-generic-transmute.rs:24:38
+  --> $DIR/packed-struct-generic-transmute.rs:22:38
    |
 LL |         let oof: Oof<[u8; 5], i32> = mem::transmute(foo);
    |                                      ^^^^^^^^^^^^^^
diff --git a/tests/ui/packed/packed-struct-transmute.rs b/tests/ui/packed/packed-struct-transmute.rs
index 5ad6524ff81..24ac1f4ac41 100644
--- a/tests/ui/packed/packed-struct-transmute.rs
+++ b/tests/ui/packed/packed-struct-transmute.rs
@@ -4,7 +4,6 @@
 // transmute
 
 //@ normalize-stderr: "\d+ bits" -> "N bits"
-//@ error-pattern: cannot transmute between types of different sizes, or dependently-sized types
 
 use std::mem;
 
diff --git a/tests/ui/packed/packed-struct-transmute.stderr b/tests/ui/packed/packed-struct-transmute.stderr
index 4d75820e944..c5f556f6d0c 100644
--- a/tests/ui/packed/packed-struct-transmute.stderr
+++ b/tests/ui/packed/packed-struct-transmute.stderr
@@ -1,5 +1,5 @@
 error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
-  --> $DIR/packed-struct-transmute.rs:26:24
+  --> $DIR/packed-struct-transmute.rs:25:24
    |
 LL |         let oof: Oof = mem::transmute(foo);
    |                        ^^^^^^^^^^^^^^
diff --git a/tests/ui/panic-runtime/two-panic-runtimes.rs b/tests/ui/panic-runtime/two-panic-runtimes.rs
index 7add07ef600..80591edd107 100644
--- a/tests/ui/panic-runtime/two-panic-runtimes.rs
+++ b/tests/ui/panic-runtime/two-panic-runtimes.rs
@@ -1,6 +1,6 @@
 // ignore-tidy-linelength
 //@ build-fail
-//@ dont-require-annotations:ERROR
+//@ dont-require-annotations: ERROR
 //@ dont-check-compiler-stderr
 //@ aux-build:panic-runtime-unwind.rs
 //@ aux-build:panic-runtime-unwind2.rs
diff --git a/tests/ui/panic-runtime/want-abort-got-unwind.rs b/tests/ui/panic-runtime/want-abort-got-unwind.rs
index 1ae2e623f10..42cdf8bc662 100644
--- a/tests/ui/panic-runtime/want-abort-got-unwind.rs
+++ b/tests/ui/panic-runtime/want-abort-got-unwind.rs
@@ -1,6 +1,6 @@
 // ignore-tidy-linelength
 //@ build-fail
-//@ dont-require-annotations:ERROR
+//@ dont-require-annotations: ERROR
 //@ dont-check-compiler-stderr
 //@ aux-build:panic-runtime-unwind.rs
 //@ compile-flags:-C panic=abort
diff --git a/tests/ui/panic-runtime/want-abort-got-unwind2.rs b/tests/ui/panic-runtime/want-abort-got-unwind2.rs
index dc4d3ea86d8..ddf12cd2a9a 100644
--- a/tests/ui/panic-runtime/want-abort-got-unwind2.rs
+++ b/tests/ui/panic-runtime/want-abort-got-unwind2.rs
@@ -1,6 +1,6 @@
 // ignore-tidy-linelength
 //@ build-fail
-//@ dont-require-annotations:ERROR
+//@ dont-require-annotations: ERROR
 //@ dont-check-compiler-stderr
 //@ aux-build:panic-runtime-unwind.rs
 //@ aux-build:wants-panic-runtime-unwind.rs
diff --git a/tests/ui/parser/inverted-parameters.rs b/tests/ui/parser/inverted-parameters.rs
index 5c4272504e0..bc2f53f0be1 100644
--- a/tests/ui/parser/inverted-parameters.rs
+++ b/tests/ui/parser/inverted-parameters.rs
@@ -1,3 +1,5 @@
+//@ dont-require-annotations: SUGGESTION
+
 struct S;
 
 impl S {
diff --git a/tests/ui/parser/inverted-parameters.stderr b/tests/ui/parser/inverted-parameters.stderr
index 86622778203..7b969032d0f 100644
--- a/tests/ui/parser/inverted-parameters.stderr
+++ b/tests/ui/parser/inverted-parameters.stderr
@@ -1,5 +1,5 @@
 error: expected one of `:`, `@`, or `|`, found `bar`
-  --> $DIR/inverted-parameters.rs:4:24
+  --> $DIR/inverted-parameters.rs:6:24
    |
 LL |     fn foo(&self, &str bar) {}
    |                   -----^^^
@@ -8,7 +8,7 @@ LL |     fn foo(&self, &str bar) {}
    |                   help: declare the type after the parameter binding: `<identifier>: <type>`
 
 error: expected one of `:`, `@`, or `|`, found `quux`
-  --> $DIR/inverted-parameters.rs:10:10
+  --> $DIR/inverted-parameters.rs:12:10
    |
 LL | fn baz(S quux, xyzzy: i32) {}
    |        --^^^^
@@ -17,19 +17,19 @@ LL | fn baz(S quux, xyzzy: i32) {}
    |        help: declare the type after the parameter binding: `<identifier>: <type>`
 
 error: expected one of `:`, `@`, or `|`, found `a`
-  --> $DIR/inverted-parameters.rs:15:12
+  --> $DIR/inverted-parameters.rs:17:12
    |
 LL | fn one(i32 a b) {}
    |            ^ expected one of `:`, `@`, or `|`
 
 error: expected one of `:` or `|`, found `(`
-  --> $DIR/inverted-parameters.rs:18:23
+  --> $DIR/inverted-parameters.rs:20:23
    |
 LL | fn pattern((i32, i32) (a, b)) {}
    |                       ^ expected one of `:` or `|`
 
 error: expected one of `:`, `@`, or `|`, found `)`
-  --> $DIR/inverted-parameters.rs:21:12
+  --> $DIR/inverted-parameters.rs:23:12
    |
 LL | fn fizz(i32) {}
    |            ^ expected one of `:`, `@`, or `|`
@@ -49,7 +49,7 @@ LL | fn fizz(_: i32) {}
    |         ++
 
 error: expected one of `:`, `@`, or `|`, found `S`
-  --> $DIR/inverted-parameters.rs:27:23
+  --> $DIR/inverted-parameters.rs:29:23
    |
 LL | fn missing_colon(quux S) {}
    |                  -----^
diff --git a/tests/ui/parser/recover/raw-no-const-mut.rs b/tests/ui/parser/recover/raw-no-const-mut.rs
new file mode 100644
index 00000000000..d0ae69cc308
--- /dev/null
+++ b/tests/ui/parser/recover/raw-no-const-mut.rs
@@ -0,0 +1,31 @@
+fn a() {
+    let x = &raw 1;
+    //~^ ERROR expected one of
+}
+
+fn b() {
+    [&raw const 1, &raw 2]
+    //~^ ERROR expected one of
+    //~| ERROR cannot find value `raw` in this scope
+    //~| ERROR cannot take address of a temporary
+}
+
+fn c() {
+    if x == &raw z {}
+    //~^ ERROR expected `{`
+}
+
+fn d() {
+    f(&raw 2);
+    //~^ ERROR expected one of
+    //~| ERROR cannot find value `raw` in this scope
+    //~| ERROR cannot find function `f` in this scope
+}
+
+fn e() {
+    let x;
+    x = &raw 1;
+    //~^ ERROR expected one of
+}
+
+fn main() {}
diff --git a/tests/ui/parser/recover/raw-no-const-mut.stderr b/tests/ui/parser/recover/raw-no-const-mut.stderr
new file mode 100644
index 00000000000..65032c80795
--- /dev/null
+++ b/tests/ui/parser/recover/raw-no-const-mut.stderr
@@ -0,0 +1,109 @@
+error: expected one of `!`, `.`, `::`, `;`, `?`, `const`, `else`, `mut`, `{`, or an operator, found `1`
+  --> $DIR/raw-no-const-mut.rs:2:18
+   |
+LL |     let x = &raw 1;
+   |                  ^ expected one of 10 possible tokens
+   |
+help: `&raw` must be followed by `const` or `mut` to be a raw reference expression
+   |
+LL |     let x = &raw const 1;
+   |                  +++++
+LL |     let x = &raw mut 1;
+   |                  +++
+
+error: expected one of `!`, `,`, `.`, `::`, `?`, `]`, `const`, `mut`, `{`, or an operator, found `2`
+  --> $DIR/raw-no-const-mut.rs:7:25
+   |
+LL |     [&raw const 1, &raw 2]
+   |                         ^ expected one of 10 possible tokens
+   |
+help: `&raw` must be followed by `const` or `mut` to be a raw reference expression
+   |
+LL |     [&raw const 1, &raw const 2]
+   |                         +++++
+LL |     [&raw const 1, &raw mut 2]
+   |                         +++
+help: missing `,`
+   |
+LL |     [&raw const 1, &raw, 2]
+   |                        +
+
+error: expected `{`, found `z`
+  --> $DIR/raw-no-const-mut.rs:14:18
+   |
+LL |     if x == &raw z {}
+   |                  ^ expected `{`
+   |
+note: the `if` expression is missing a block after this condition
+  --> $DIR/raw-no-const-mut.rs:14:8
+   |
+LL |     if x == &raw z {}
+   |        ^^^^^^^^^
+help: `&raw` must be followed by `const` or `mut` to be a raw reference expression
+   |
+LL |     if x == &raw const z {}
+   |                  +++++
+LL |     if x == &raw mut z {}
+   |                  +++
+
+error: expected one of `!`, `)`, `,`, `.`, `::`, `?`, `const`, `mut`, `{`, or an operator, found `2`
+  --> $DIR/raw-no-const-mut.rs:19:12
+   |
+LL |     f(&raw 2);
+   |            ^ expected one of 10 possible tokens
+   |
+help: `&raw` must be followed by `const` or `mut` to be a raw reference expression
+   |
+LL |     f(&raw const 2);
+   |            +++++
+LL |     f(&raw mut 2);
+   |            +++
+help: missing `,`
+   |
+LL |     f(&raw, 2);
+   |           +
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `const`, `mut`, `{`, `}`, or an operator, found `1`
+  --> $DIR/raw-no-const-mut.rs:27:14
+   |
+LL |     x = &raw 1;
+   |              ^ expected one of 10 possible tokens
+   |
+help: `&raw` must be followed by `const` or `mut` to be a raw reference expression
+   |
+LL |     x = &raw const 1;
+   |              +++++
+LL |     x = &raw mut 1;
+   |              +++
+
+error[E0425]: cannot find value `raw` in this scope
+  --> $DIR/raw-no-const-mut.rs:7:21
+   |
+LL |     [&raw const 1, &raw 2]
+   |                     ^^^ not found in this scope
+
+error[E0425]: cannot find value `raw` in this scope
+  --> $DIR/raw-no-const-mut.rs:19:8
+   |
+LL |     f(&raw 2);
+   |        ^^^ not found in this scope
+
+error[E0745]: cannot take address of a temporary
+  --> $DIR/raw-no-const-mut.rs:7:17
+   |
+LL |     [&raw const 1, &raw 2]
+   |                 ^ temporary value
+
+error[E0425]: cannot find function `f` in this scope
+  --> $DIR/raw-no-const-mut.rs:19:5
+   |
+LL | fn a() {
+   | ------ similarly named function `a` defined here
+...
+LL |     f(&raw 2);
+   |     ^ help: a function with a similar name exists: `a`
+
+error: aborting due to 9 previous errors
+
+Some errors have detailed explanations: E0425, E0745.
+For more information about an error, try `rustc --explain E0425`.
diff --git a/tests/ui/parser/utf16-be-without-bom.rs b/tests/ui/parser/utf16-be-without-bom.rs
index 538728735f0..1f2abc1ad56 100644
--- a/tests/ui/parser/utf16-be-without-bom.rs
+++ b/tests/ui/parser/utf16-be-without-bom.rs
Binary files differdiff --git a/tests/ui/parser/utf16-le-without-bom.rs b/tests/ui/parser/utf16-le-without-bom.rs
index fc413663c9c..bb95f0dd071 100644
--- a/tests/ui/parser/utf16-le-without-bom.rs
+++ b/tests/ui/parser/utf16-le-without-bom.rs
Binary files differdiff --git a/tests/ui/print-request/print-lints-help.rs b/tests/ui/print-request/print-lints-help.rs
index 6dd88a701c3..9a706a29695 100644
--- a/tests/ui/print-request/print-lints-help.rs
+++ b/tests/ui/print-request/print-lints-help.rs
@@ -2,7 +2,8 @@
 //! `--print=lints` (which is not a valid print request).
 
 //@ compile-flags: --print lints
-//@ error-pattern: help: use `-Whelp` to print a list of lints
-//@ error-pattern: help: for more information, see the rustc book
 
 //~? ERROR unknown print request: `lints`
+//~? HELP use `-Whelp` to print a list of lints
+//~? HELP for more information, see the rustc book
+//~? HELP valid print requests are
diff --git a/tests/ui/proc-macro/inner-attrs.rs b/tests/ui/proc-macro/inner-attrs.rs
index 34c37ddfac3..c541e93f904 100644
--- a/tests/ui/proc-macro/inner-attrs.rs
+++ b/tests/ui/proc-macro/inner-attrs.rs
@@ -1,6 +1,5 @@
 // gate-test-custom_inner_attributes
-//@ compile-flags: -Z span-debug --error-format human
-//@ error-pattern:expected non-macro inner attribute
+//@ compile-flags: -Z span-debug
 //@ proc-macro: test-macros.rs
 //@ edition:2018
 
@@ -63,23 +62,27 @@ fn bar() {
 
     for _ in &[true] {
         #![print_attr]
+        //~^ ERROR expected non-macro inner attribute, found attribute macro `print_attr`
     }
 
     let _ = {
         #![print_attr]
+        //~^ ERROR expected non-macro inner attribute, found attribute macro `print_attr`
     };
 
     let _ = async {
         #![print_attr]
+        //~^ ERROR expected non-macro inner attribute, found attribute macro `print_attr`
     };
 
     {
         #![print_attr]
+        //~^ ERROR expected non-macro inner attribute, found attribute macro `print_attr`
     };
 }
 
 
-extern {
+extern { //~ WARN extern declarations without an explicit ABI are deprecated
     fn weird_extern() {
         #![print_target_and_args_consume(tenth)]
     }
diff --git a/tests/ui/proc-macro/inner-attrs.stderr b/tests/ui/proc-macro/inner-attrs.stderr
index 8b5fec1b4c3..4e7825c0d00 100644
--- a/tests/ui/proc-macro/inner-attrs.stderr
+++ b/tests/ui/proc-macro/inner-attrs.stderr
@@ -1,5 +1,5 @@
 error: expected non-macro inner attribute, found attribute macro `print_attr`
-  --> $DIR/inner-attrs.rs:65:12
+  --> $DIR/inner-attrs.rs:64:12
    |
 LL |         #![print_attr]
    |            ^^^^^^^^^^ not a non-macro inner attribute
@@ -11,19 +11,19 @@ LL |         #![print_attr]
    |            ^^^^^^^^^^ not a non-macro inner attribute
 
 error: expected non-macro inner attribute, found attribute macro `print_attr`
-  --> $DIR/inner-attrs.rs:73:12
+  --> $DIR/inner-attrs.rs:74:12
    |
 LL |         #![print_attr]
    |            ^^^^^^^^^^ not a non-macro inner attribute
 
 error: expected non-macro inner attribute, found attribute macro `print_attr`
-  --> $DIR/inner-attrs.rs:77:12
+  --> $DIR/inner-attrs.rs:79:12
    |
 LL |         #![print_attr]
    |            ^^^^^^^^^^ not a non-macro inner attribute
 
 warning: extern declarations without an explicit ABI are deprecated
-  --> $DIR/inner-attrs.rs:82:1
+  --> $DIR/inner-attrs.rs:85:1
    |
 LL | extern {
    | ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
diff --git a/tests/ui/proc-macro/inner-attrs.stdout b/tests/ui/proc-macro/inner-attrs.stdout
index ed47ee2cf5a..4496f7b90c4 100644
--- a/tests/ui/proc-macro/inner-attrs.stdout
+++ b/tests/ui/proc-macro/inner-attrs.stdout
@@ -2,7 +2,7 @@ PRINT-ATTR_ARGS INPUT (DISPLAY): first
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "first",
-        span: $DIR/inner-attrs.rs:18:25: 18:30 (#0),
+        span: $DIR/inner-attrs.rs:17:25: 17:30 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(second)] fn foo()
@@ -13,40 +13,40 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/inner-attrs.rs:19:1: 19:2 (#0),
+        span: $DIR/inner-attrs.rs:18:1: 18:2 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "print_target_and_args",
-                span: $DIR/inner-attrs.rs:19:3: 19:24 (#0),
+                span: $DIR/inner-attrs.rs:18:3: 18:24 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "second",
-                        span: $DIR/inner-attrs.rs:19:25: 19:31 (#0),
+                        span: $DIR/inner-attrs.rs:18:25: 18:31 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:19:24: 19:32 (#0),
+                span: $DIR/inner-attrs.rs:18:24: 18:32 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:19:2: 19:33 (#0),
+        span: $DIR/inner-attrs.rs:18:2: 18:33 (#0),
     },
     Ident {
         ident: "fn",
-        span: $DIR/inner-attrs.rs:20:1: 20:3 (#0),
+        span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
     },
     Ident {
         ident: "foo",
-        span: $DIR/inner-attrs.rs:20:4: 20:7 (#0),
+        span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
     },
     Group {
         delimiter: Parenthesis,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:20:7: 20:9 (#0),
+        span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
     },
     Group {
         delimiter: Brace,
@@ -54,72 +54,72 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
+                span: $DIR/inner-attrs.rs:20:5: 20:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
+                span: $DIR/inner-attrs.rs:20:6: 20:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
+                        span: $DIR/inner-attrs.rs:20:8: 20:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "third",
-                                span: $DIR/inner-attrs.rs:21:30: 21:35 (#0),
+                                span: $DIR/inner-attrs.rs:20:30: 20:35 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:21:29: 21:36 (#0),
+                        span: $DIR/inner-attrs.rs:20:29: 20:36 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:21:7: 21:37 (#0),
+                span: $DIR/inner-attrs.rs:20:7: 20:37 (#0),
             },
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:22:5: 22:6 (#0),
+                span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:22:6: 22:7 (#0),
+                span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:22:8: 22:29 (#0),
+                        span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "fourth",
-                                span: $DIR/inner-attrs.rs:22:30: 22:36 (#0),
+                                span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:22:29: 22:37 (#0),
+                        span: $DIR/inner-attrs.rs:21:29: 21:37 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:22:7: 22:38 (#0),
+                span: $DIR/inner-attrs.rs:21:7: 21:38 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:20:10: 23:2 (#0),
+        span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): second
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "second",
-        span: $DIR/inner-attrs.rs:19:25: 19:31 (#0),
+        span: $DIR/inner-attrs.rs:18:25: 18:31 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): fn foo()
@@ -129,16 +129,16 @@ PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): fn foo()
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "fn",
-        span: $DIR/inner-attrs.rs:20:1: 20:3 (#0),
+        span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
     },
     Ident {
         ident: "foo",
-        span: $DIR/inner-attrs.rs:20:4: 20:7 (#0),
+        span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
     },
     Group {
         delimiter: Parenthesis,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:20:7: 20:9 (#0),
+        span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
     },
     Group {
         delimiter: Brace,
@@ -146,72 +146,72 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
+                span: $DIR/inner-attrs.rs:20:5: 20:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
+                span: $DIR/inner-attrs.rs:20:6: 20:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
+                        span: $DIR/inner-attrs.rs:20:8: 20:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "third",
-                                span: $DIR/inner-attrs.rs:21:30: 21:35 (#0),
+                                span: $DIR/inner-attrs.rs:20:30: 20:35 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:21:29: 21:36 (#0),
+                        span: $DIR/inner-attrs.rs:20:29: 20:36 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:21:7: 21:37 (#0),
+                span: $DIR/inner-attrs.rs:20:7: 20:37 (#0),
             },
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:22:5: 22:6 (#0),
+                span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:22:6: 22:7 (#0),
+                span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:22:8: 22:29 (#0),
+                        span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "fourth",
-                                span: $DIR/inner-attrs.rs:22:30: 22:36 (#0),
+                                span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:22:29: 22:37 (#0),
+                        span: $DIR/inner-attrs.rs:21:29: 21:37 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:22:7: 22:38 (#0),
+                span: $DIR/inner-attrs.rs:21:7: 21:38 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:20:10: 23:2 (#0),
+        span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): third
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "third",
-        span: $DIR/inner-attrs.rs:21:30: 21:35 (#0),
+        span: $DIR/inner-attrs.rs:20:30: 20:35 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): fn foo() { #![print_target_and_args(fourth)] }
@@ -219,16 +219,16 @@ PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): fn foo() { #! [print_target_and_args(fou
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "fn",
-        span: $DIR/inner-attrs.rs:20:1: 20:3 (#0),
+        span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
     },
     Ident {
         ident: "foo",
-        span: $DIR/inner-attrs.rs:20:4: 20:7 (#0),
+        span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
     },
     Group {
         delimiter: Parenthesis,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:20:7: 20:9 (#0),
+        span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
     },
     Group {
         delimiter: Brace,
@@ -236,70 +236,70 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:22:5: 22:6 (#0),
+                span: $DIR/inner-attrs.rs:21:5: 21:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:22:6: 22:7 (#0),
+                span: $DIR/inner-attrs.rs:21:6: 21:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:22:8: 22:29 (#0),
+                        span: $DIR/inner-attrs.rs:21:8: 21:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "fourth",
-                                span: $DIR/inner-attrs.rs:22:30: 22:36 (#0),
+                                span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:22:29: 22:37 (#0),
+                        span: $DIR/inner-attrs.rs:21:29: 21:37 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:22:7: 22:38 (#0),
+                span: $DIR/inner-attrs.rs:21:7: 21:38 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:20:10: 23:2 (#0),
+        span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): fourth
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "fourth",
-        span: $DIR/inner-attrs.rs:22:30: 22:36 (#0),
+        span: $DIR/inner-attrs.rs:21:30: 21:36 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): fn foo() {}
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "fn",
-        span: $DIR/inner-attrs.rs:20:1: 20:3 (#0),
+        span: $DIR/inner-attrs.rs:19:1: 19:3 (#0),
     },
     Ident {
         ident: "foo",
-        span: $DIR/inner-attrs.rs:20:4: 20:7 (#0),
+        span: $DIR/inner-attrs.rs:19:4: 19:7 (#0),
     },
     Group {
         delimiter: Parenthesis,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:20:7: 20:9 (#0),
+        span: $DIR/inner-attrs.rs:19:7: 19:9 (#0),
     },
     Group {
         delimiter: Brace,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:20:10: 23:2 (#0),
+        span: $DIR/inner-attrs.rs:19:10: 22:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): mod_first
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod_first",
-        span: $DIR/inner-attrs.rs:25:25: 25:34 (#0),
+        span: $DIR/inner-attrs.rs:24:25: 24:34 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): #[print_target_and_args(mod_second)] mod inline_mod
@@ -313,35 +313,35 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
     Punct {
         ch: '#',
         spacing: Alone,
-        span: $DIR/inner-attrs.rs:26:1: 26:2 (#0),
+        span: $DIR/inner-attrs.rs:25:1: 25:2 (#0),
     },
     Group {
         delimiter: Bracket,
         stream: TokenStream [
             Ident {
                 ident: "print_target_and_args",
-                span: $DIR/inner-attrs.rs:26:3: 26:24 (#0),
+                span: $DIR/inner-attrs.rs:25:3: 25:24 (#0),
             },
             Group {
                 delimiter: Parenthesis,
                 stream: TokenStream [
                     Ident {
                         ident: "mod_second",
-                        span: $DIR/inner-attrs.rs:26:25: 26:35 (#0),
+                        span: $DIR/inner-attrs.rs:25:25: 25:35 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:26:24: 26:36 (#0),
+                span: $DIR/inner-attrs.rs:25:24: 25:36 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:26:2: 26:37 (#0),
+        span: $DIR/inner-attrs.rs:25:2: 25:37 (#0),
     },
     Ident {
         ident: "mod",
-        span: $DIR/inner-attrs.rs:27:1: 27:4 (#0),
+        span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
     },
     Ident {
         ident: "inline_mod",
-        span: $DIR/inner-attrs.rs:27:5: 27:15 (#0),
+        span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
     },
     Group {
         delimiter: Brace,
@@ -349,72 +349,72 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
+                span: $DIR/inner-attrs.rs:27:5: 27:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
+                span: $DIR/inner-attrs.rs:27:6: 27:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
+                        span: $DIR/inner-attrs.rs:27:8: 27:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "mod_third",
-                                span: $DIR/inner-attrs.rs:28:30: 28:39 (#0),
+                                span: $DIR/inner-attrs.rs:27:30: 27:39 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:28:29: 28:40 (#0),
+                        span: $DIR/inner-attrs.rs:27:29: 27:40 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:28:7: 28:41 (#0),
+                span: $DIR/inner-attrs.rs:27:7: 27:41 (#0),
             },
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:29:5: 29:6 (#0),
+                span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:29:6: 29:7 (#0),
+                span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:29:8: 29:29 (#0),
+                        span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "mod_fourth",
-                                span: $DIR/inner-attrs.rs:29:30: 29:40 (#0),
+                                span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:29:29: 29:41 (#0),
+                        span: $DIR/inner-attrs.rs:28:29: 28:41 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:29:7: 29:42 (#0),
+                span: $DIR/inner-attrs.rs:28:7: 28:42 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:27:16: 30:2 (#0),
+        span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): mod_second
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod_second",
-        span: $DIR/inner-attrs.rs:26:25: 26:35 (#0),
+        span: $DIR/inner-attrs.rs:25:25: 25:35 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): mod inline_mod
@@ -427,11 +427,11 @@ PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): mod inline_mod
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod",
-        span: $DIR/inner-attrs.rs:27:1: 27:4 (#0),
+        span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
     },
     Ident {
         ident: "inline_mod",
-        span: $DIR/inner-attrs.rs:27:5: 27:15 (#0),
+        span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
     },
     Group {
         delimiter: Brace,
@@ -439,72 +439,72 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
+                span: $DIR/inner-attrs.rs:27:5: 27:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
+                span: $DIR/inner-attrs.rs:27:6: 27:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
+                        span: $DIR/inner-attrs.rs:27:8: 27:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "mod_third",
-                                span: $DIR/inner-attrs.rs:28:30: 28:39 (#0),
+                                span: $DIR/inner-attrs.rs:27:30: 27:39 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:28:29: 28:40 (#0),
+                        span: $DIR/inner-attrs.rs:27:29: 27:40 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:28:7: 28:41 (#0),
+                span: $DIR/inner-attrs.rs:27:7: 27:41 (#0),
             },
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:29:5: 29:6 (#0),
+                span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:29:6: 29:7 (#0),
+                span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:29:8: 29:29 (#0),
+                        span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "mod_fourth",
-                                span: $DIR/inner-attrs.rs:29:30: 29:40 (#0),
+                                span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:29:29: 29:41 (#0),
+                        span: $DIR/inner-attrs.rs:28:29: 28:41 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:29:7: 29:42 (#0),
+                span: $DIR/inner-attrs.rs:28:7: 28:42 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:27:16: 30:2 (#0),
+        span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): mod_third
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod_third",
-        span: $DIR/inner-attrs.rs:28:30: 28:39 (#0),
+        span: $DIR/inner-attrs.rs:27:30: 27:39 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): mod inline_mod { #![print_target_and_args(mod_fourth)] }
@@ -512,11 +512,11 @@ PRINT-ATTR DEEP-RE-COLLECTED (DISPLAY): mod inline_mod { #! [print_target_and_ar
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod",
-        span: $DIR/inner-attrs.rs:27:1: 27:4 (#0),
+        span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
     },
     Ident {
         ident: "inline_mod",
-        span: $DIR/inner-attrs.rs:27:5: 27:15 (#0),
+        span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
     },
     Group {
         delimiter: Brace,
@@ -524,58 +524,58 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
             Punct {
                 ch: '#',
                 spacing: Joint,
-                span: $DIR/inner-attrs.rs:29:5: 29:6 (#0),
+                span: $DIR/inner-attrs.rs:28:5: 28:6 (#0),
             },
             Punct {
                 ch: '!',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:29:6: 29:7 (#0),
+                span: $DIR/inner-attrs.rs:28:6: 28:7 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "print_target_and_args",
-                        span: $DIR/inner-attrs.rs:29:8: 29:29 (#0),
+                        span: $DIR/inner-attrs.rs:28:8: 28:29 (#0),
                     },
                     Group {
                         delimiter: Parenthesis,
                         stream: TokenStream [
                             Ident {
                                 ident: "mod_fourth",
-                                span: $DIR/inner-attrs.rs:29:30: 29:40 (#0),
+                                span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:29:29: 29:41 (#0),
+                        span: $DIR/inner-attrs.rs:28:29: 28:41 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:29:7: 29:42 (#0),
+                span: $DIR/inner-attrs.rs:28:7: 28:42 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:27:16: 30:2 (#0),
+        span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): mod_fourth
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod_fourth",
-        span: $DIR/inner-attrs.rs:29:30: 29:40 (#0),
+        span: $DIR/inner-attrs.rs:28:30: 28:40 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): mod inline_mod {}
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "mod",
-        span: $DIR/inner-attrs.rs:27:1: 27:4 (#0),
+        span: $DIR/inner-attrs.rs:26:1: 26:4 (#0),
     },
     Ident {
         ident: "inline_mod",
-        span: $DIR/inner-attrs.rs:27:5: 27:15 (#0),
+        span: $DIR/inner-attrs.rs:26:5: 26:15 (#0),
     },
     Group {
         delimiter: Brace,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:27:16: 30:2 (#0),
+        span: $DIR/inner-attrs.rs:26:16: 29:2 (#0),
     },
 ]
 PRINT-DERIVE INPUT (DISPLAY): struct MyDerivePrint
@@ -585,63 +585,63 @@ PRINT-DERIVE DEEP-RE-COLLECTED (DISPLAY): struct MyDerivePrint
 PRINT-DERIVE INPUT (DEBUG): TokenStream [
     Ident {
         ident: "struct",
-        span: $DIR/inner-attrs.rs:37:1: 37:7 (#0),
+        span: $DIR/inner-attrs.rs:36:1: 36:7 (#0),
     },
     Ident {
         ident: "MyDerivePrint",
-        span: $DIR/inner-attrs.rs:37:8: 37:21 (#0),
+        span: $DIR/inner-attrs.rs:36:8: 36:21 (#0),
     },
     Group {
         delimiter: Brace,
         stream: TokenStream [
             Ident {
                 ident: "field",
-                span: $DIR/inner-attrs.rs:38:5: 38:10 (#0),
+                span: $DIR/inner-attrs.rs:37:5: 37:10 (#0),
             },
             Punct {
                 ch: ':',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:38:10: 38:11 (#0),
+                span: $DIR/inner-attrs.rs:37:10: 37:11 (#0),
             },
             Group {
                 delimiter: Bracket,
                 stream: TokenStream [
                     Ident {
                         ident: "u8",
-                        span: $DIR/inner-attrs.rs:38:13: 38:15 (#0),
+                        span: $DIR/inner-attrs.rs:37:13: 37:15 (#0),
                     },
                     Punct {
                         ch: ';',
                         spacing: Alone,
-                        span: $DIR/inner-attrs.rs:38:15: 38:16 (#0),
+                        span: $DIR/inner-attrs.rs:37:15: 37:16 (#0),
                     },
                     Group {
                         delimiter: Brace,
                         stream: TokenStream [
                             Ident {
                                 ident: "match",
-                                span: $DIR/inner-attrs.rs:39:9: 39:14 (#0),
+                                span: $DIR/inner-attrs.rs:38:9: 38:14 (#0),
                             },
                             Ident {
                                 ident: "true",
-                                span: $DIR/inner-attrs.rs:39:15: 39:19 (#0),
+                                span: $DIR/inner-attrs.rs:38:15: 38:19 (#0),
                             },
                             Group {
                                 delimiter: Brace,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "_",
-                                        span: $DIR/inner-attrs.rs:40:13: 40:14 (#0),
+                                        span: $DIR/inner-attrs.rs:39:13: 39:14 (#0),
                                     },
                                     Punct {
                                         ch: '=',
                                         spacing: Joint,
-                                        span: $DIR/inner-attrs.rs:40:15: 40:16 (#0),
+                                        span: $DIR/inner-attrs.rs:39:15: 39:16 (#0),
                                     },
                                     Punct {
                                         ch: '>',
                                         spacing: Alone,
-                                        span: $DIR/inner-attrs.rs:40:16: 40:17 (#0),
+                                        span: $DIR/inner-attrs.rs:39:16: 39:17 (#0),
                                     },
                                     Group {
                                         delimiter: Brace,
@@ -649,69 +649,69 @@ PRINT-DERIVE INPUT (DEBUG): TokenStream [
                                             Punct {
                                                 ch: '#',
                                                 spacing: Joint,
-                                                span: $DIR/inner-attrs.rs:41:17: 41:18 (#0),
+                                                span: $DIR/inner-attrs.rs:40:17: 40:18 (#0),
                                             },
                                             Punct {
                                                 ch: '!',
                                                 spacing: Alone,
-                                                span: $DIR/inner-attrs.rs:41:18: 41:19 (#0),
+                                                span: $DIR/inner-attrs.rs:40:18: 40:19 (#0),
                                             },
                                             Group {
                                                 delimiter: Bracket,
                                                 stream: TokenStream [
                                                     Ident {
                                                         ident: "rustc_dummy",
-                                                        span: $DIR/inner-attrs.rs:41:41: 41:52 (#0),
+                                                        span: $DIR/inner-attrs.rs:40:41: 40:52 (#0),
                                                     },
                                                     Group {
                                                         delimiter: Parenthesis,
                                                         stream: TokenStream [
                                                             Ident {
                                                                 ident: "third",
-                                                                span: $DIR/inner-attrs.rs:41:53: 41:58 (#0),
+                                                                span: $DIR/inner-attrs.rs:40:53: 40:58 (#0),
                                                             },
                                                         ],
-                                                        span: $DIR/inner-attrs.rs:41:52: 41:59 (#0),
+                                                        span: $DIR/inner-attrs.rs:40:52: 40:59 (#0),
                                                     },
                                                 ],
-                                                span: $DIR/inner-attrs.rs:41:19: 41:61 (#0),
+                                                span: $DIR/inner-attrs.rs:40:19: 40:61 (#0),
                                             },
                                             Ident {
                                                 ident: "true",
-                                                span: $DIR/inner-attrs.rs:42:17: 42:21 (#0),
+                                                span: $DIR/inner-attrs.rs:41:17: 41:21 (#0),
                                             },
                                         ],
-                                        span: $DIR/inner-attrs.rs:40:18: 43:14 (#0),
+                                        span: $DIR/inner-attrs.rs:39:18: 42:14 (#0),
                                     },
                                 ],
-                                span: $DIR/inner-attrs.rs:39:20: 44:10 (#0),
+                                span: $DIR/inner-attrs.rs:38:20: 43:10 (#0),
                             },
                             Punct {
                                 ch: ';',
                                 spacing: Alone,
-                                span: $DIR/inner-attrs.rs:44:10: 44:11 (#0),
+                                span: $DIR/inner-attrs.rs:43:10: 43:11 (#0),
                             },
                             Literal {
                                 kind: Integer,
                                 symbol: "0",
                                 suffix: None,
-                                span: $DIR/inner-attrs.rs:45:9: 45:10 (#0),
+                                span: $DIR/inner-attrs.rs:44:9: 44:10 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:38:17: 46:6 (#0),
+                        span: $DIR/inner-attrs.rs:37:17: 45:6 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:38:12: 46:7 (#0),
+                span: $DIR/inner-attrs.rs:37:12: 45:7 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:37:22: 47:2 (#0),
+        span: $DIR/inner-attrs.rs:36:22: 46:2 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): tuple_attrs
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "tuple_attrs",
-        span: $DIR/inner-attrs.rs:50:29: 50:40 (#0),
+        span: $DIR/inner-attrs.rs:49:29: 49:40 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): (3, 4, { #![cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 });
@@ -724,23 +724,23 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                 kind: Integer,
                 symbol: "3",
                 suffix: None,
-                span: $DIR/inner-attrs.rs:51:9: 51:10 (#0),
+                span: $DIR/inner-attrs.rs:50:9: 50:10 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:51:10: 51:11 (#0),
+                span: $DIR/inner-attrs.rs:50:10: 50:11 (#0),
             },
             Literal {
                 kind: Integer,
                 symbol: "4",
                 suffix: None,
-                span: $DIR/inner-attrs.rs:51:12: 51:13 (#0),
+                span: $DIR/inner-attrs.rs:50:12: 50:13 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:51:13: 51:14 (#0),
+                span: $DIR/inner-attrs.rs:50:13: 50:14 (#0),
             },
             Group {
                 delimiter: Brace,
@@ -748,85 +748,85 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                     Punct {
                         ch: '#',
                         spacing: Joint,
-                        span: $DIR/inner-attrs.rs:52:13: 52:14 (#0),
+                        span: $DIR/inner-attrs.rs:51:13: 51:14 (#0),
                     },
                     Punct {
                         ch: '!',
                         spacing: Alone,
-                        span: $DIR/inner-attrs.rs:52:14: 52:15 (#0),
+                        span: $DIR/inner-attrs.rs:51:14: 51:15 (#0),
                     },
                     Group {
                         delimiter: Bracket,
                         stream: TokenStream [
                             Ident {
                                 ident: "cfg_attr",
-                                span: $DIR/inner-attrs.rs:52:16: 52:24 (#0),
+                                span: $DIR/inner-attrs.rs:51:16: 51:24 (#0),
                             },
                             Group {
                                 delimiter: Parenthesis,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "not",
-                                        span: $DIR/inner-attrs.rs:52:25: 52:28 (#0),
+                                        span: $DIR/inner-attrs.rs:51:25: 51:28 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "FALSE",
-                                                span: $DIR/inner-attrs.rs:52:29: 52:34 (#0),
+                                                span: $DIR/inner-attrs.rs:51:29: 51:34 (#0),
                                             },
                                         ],
-                                        span: $DIR/inner-attrs.rs:52:28: 52:35 (#0),
+                                        span: $DIR/inner-attrs.rs:51:28: 51:35 (#0),
                                     },
                                     Punct {
                                         ch: ',',
                                         spacing: Alone,
-                                        span: $DIR/inner-attrs.rs:52:35: 52:36 (#0),
+                                        span: $DIR/inner-attrs.rs:51:35: 51:36 (#0),
                                     },
                                     Ident {
                                         ident: "rustc_dummy",
-                                        span: $DIR/inner-attrs.rs:52:37: 52:48 (#0),
+                                        span: $DIR/inner-attrs.rs:51:37: 51:48 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "innermost",
-                                                span: $DIR/inner-attrs.rs:52:49: 52:58 (#0),
+                                                span: $DIR/inner-attrs.rs:51:49: 51:58 (#0),
                                             },
                                         ],
-                                        span: $DIR/inner-attrs.rs:52:48: 52:59 (#0),
+                                        span: $DIR/inner-attrs.rs:51:48: 51:59 (#0),
                                     },
                                 ],
-                                span: $DIR/inner-attrs.rs:52:24: 52:60 (#0),
+                                span: $DIR/inner-attrs.rs:51:24: 51:60 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:52:15: 52:61 (#0),
+                        span: $DIR/inner-attrs.rs:51:15: 51:61 (#0),
                     },
                     Literal {
                         kind: Integer,
                         symbol: "5",
                         suffix: None,
-                        span: $DIR/inner-attrs.rs:53:13: 53:14 (#0),
+                        span: $DIR/inner-attrs.rs:52:13: 52:14 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:51:15: 54:10 (#0),
+                span: $DIR/inner-attrs.rs:50:15: 53:10 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:50:43: 55:6 (#0),
+        span: $DIR/inner-attrs.rs:49:43: 54:6 (#0),
     },
     Punct {
         ch: ';',
         spacing: Alone,
-        span: $DIR/inner-attrs.rs:55:6: 55:7 (#0),
+        span: $DIR/inner-attrs.rs:54:6: 54:7 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): tuple_attrs
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "tuple_attrs",
-        span: $DIR/inner-attrs.rs:57:29: 57:40 (#0),
+        span: $DIR/inner-attrs.rs:56:29: 56:40 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): (3, 4, { #![cfg_attr(not(FALSE), rustc_dummy(innermost))] 5 });
@@ -839,23 +839,23 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                 kind: Integer,
                 symbol: "3",
                 suffix: None,
-                span: $DIR/inner-attrs.rs:58:9: 58:10 (#0),
+                span: $DIR/inner-attrs.rs:57:9: 57:10 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:58:10: 58:11 (#0),
+                span: $DIR/inner-attrs.rs:57:10: 57:11 (#0),
             },
             Literal {
                 kind: Integer,
                 symbol: "4",
                 suffix: None,
-                span: $DIR/inner-attrs.rs:58:12: 58:13 (#0),
+                span: $DIR/inner-attrs.rs:57:12: 57:13 (#0),
             },
             Punct {
                 ch: ',',
                 spacing: Alone,
-                span: $DIR/inner-attrs.rs:58:13: 58:14 (#0),
+                span: $DIR/inner-attrs.rs:57:13: 57:14 (#0),
             },
             Group {
                 delimiter: Brace,
@@ -863,105 +863,105 @@ PRINT-ATTR INPUT (DEBUG): TokenStream [
                     Punct {
                         ch: '#',
                         spacing: Joint,
-                        span: $DIR/inner-attrs.rs:59:13: 59:14 (#0),
+                        span: $DIR/inner-attrs.rs:58:13: 58:14 (#0),
                     },
                     Punct {
                         ch: '!',
                         spacing: Alone,
-                        span: $DIR/inner-attrs.rs:59:14: 59:15 (#0),
+                        span: $DIR/inner-attrs.rs:58:14: 58:15 (#0),
                     },
                     Group {
                         delimiter: Bracket,
                         stream: TokenStream [
                             Ident {
                                 ident: "cfg_attr",
-                                span: $DIR/inner-attrs.rs:59:16: 59:24 (#0),
+                                span: $DIR/inner-attrs.rs:58:16: 58:24 (#0),
                             },
                             Group {
                                 delimiter: Parenthesis,
                                 stream: TokenStream [
                                     Ident {
                                         ident: "not",
-                                        span: $DIR/inner-attrs.rs:59:25: 59:28 (#0),
+                                        span: $DIR/inner-attrs.rs:58:25: 58:28 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "FALSE",
-                                                span: $DIR/inner-attrs.rs:59:29: 59:34 (#0),
+                                                span: $DIR/inner-attrs.rs:58:29: 58:34 (#0),
                                             },
                                         ],
-                                        span: $DIR/inner-attrs.rs:59:28: 59:35 (#0),
+                                        span: $DIR/inner-attrs.rs:58:28: 58:35 (#0),
                                     },
                                     Punct {
                                         ch: ',',
                                         spacing: Alone,
-                                        span: $DIR/inner-attrs.rs:59:35: 59:36 (#0),
+                                        span: $DIR/inner-attrs.rs:58:35: 58:36 (#0),
                                     },
                                     Ident {
                                         ident: "rustc_dummy",
-                                        span: $DIR/inner-attrs.rs:59:37: 59:48 (#0),
+                                        span: $DIR/inner-attrs.rs:58:37: 58:48 (#0),
                                     },
                                     Group {
                                         delimiter: Parenthesis,
                                         stream: TokenStream [
                                             Ident {
                                                 ident: "innermost",
-                                                span: $DIR/inner-attrs.rs:59:49: 59:58 (#0),
+                                                span: $DIR/inner-attrs.rs:58:49: 58:58 (#0),
                                             },
                                         ],
-                                        span: $DIR/inner-attrs.rs:59:48: 59:59 (#0),
+                                        span: $DIR/inner-attrs.rs:58:48: 58:59 (#0),
                                     },
                                 ],
-                                span: $DIR/inner-attrs.rs:59:24: 59:60 (#0),
+                                span: $DIR/inner-attrs.rs:58:24: 58:60 (#0),
                             },
                         ],
-                        span: $DIR/inner-attrs.rs:59:15: 59:61 (#0),
+                        span: $DIR/inner-attrs.rs:58:15: 58:61 (#0),
                     },
                     Literal {
                         kind: Integer,
                         symbol: "5",
                         suffix: None,
-                        span: $DIR/inner-attrs.rs:60:13: 60:14 (#0),
+                        span: $DIR/inner-attrs.rs:59:13: 59:14 (#0),
                     },
                 ],
-                span: $DIR/inner-attrs.rs:58:15: 61:10 (#0),
+                span: $DIR/inner-attrs.rs:57:15: 60:10 (#0),
             },
         ],
-        span: $DIR/inner-attrs.rs:57:43: 62:6 (#0),
+        span: $DIR/inner-attrs.rs:56:43: 61:6 (#0),
     },
     Punct {
         ch: ';',
         spacing: Alone,
-        span: $DIR/inner-attrs.rs:62:6: 62:7 (#0),
+        span: $DIR/inner-attrs.rs:61:6: 61:7 (#0),
     },
 ]
 PRINT-ATTR_ARGS INPUT (DISPLAY): tenth
 PRINT-ATTR_ARGS INPUT (DEBUG): TokenStream [
     Ident {
         ident: "tenth",
-        span: $DIR/inner-attrs.rs:84:42: 84:47 (#0),
+        span: $DIR/inner-attrs.rs:87:42: 87:47 (#0),
     },
 ]
 PRINT-ATTR INPUT (DISPLAY): fn weird_extern() {}
 PRINT-ATTR INPUT (DEBUG): TokenStream [
     Ident {
         ident: "fn",
-        span: $DIR/inner-attrs.rs:83:5: 83:7 (#0),
+        span: $DIR/inner-attrs.rs:86:5: 86:7 (#0),
     },
     Ident {
         ident: "weird_extern",
-        span: $DIR/inner-attrs.rs:83:8: 83:20 (#0),
+        span: $DIR/inner-attrs.rs:86:8: 86:20 (#0),
     },
     Group {
         delimiter: Parenthesis,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:83:20: 83:22 (#0),
+        span: $DIR/inner-attrs.rs:86:20: 86:22 (#0),
     },
     Group {
         delimiter: Brace,
         stream: TokenStream [],
-        span: $DIR/inner-attrs.rs:83:23: 85:6 (#0),
+        span: $DIR/inner-attrs.rs:86:23: 88:6 (#0),
     },
 ]
diff --git a/tests/ui/regions/region-invariant-static-error-reporting.rs b/tests/ui/regions/region-invariant-static-error-reporting.rs
index e58eea3f61a..9792c101fa8 100644
--- a/tests/ui/regions/region-invariant-static-error-reporting.rs
+++ b/tests/ui/regions/region-invariant-static-error-reporting.rs
@@ -3,7 +3,7 @@
 // over time, but this test used to exhibit some pretty bogus messages
 // that were not remotely helpful.
 
-//@ error-pattern:requires that `'a` must outlive `'static`
+//@ dont-require-annotations: NOTE
 
 struct Invariant<'a>(Option<&'a mut &'a mut ()>);
 
@@ -14,6 +14,7 @@ fn unify<'a>(x: Option<Invariant<'a>>, f: fn(Invariant<'a>)) {
         x.unwrap()
     } else {
         mk_static() //~ ERROR lifetime may not live long enough
+                    //~| NOTE assignment requires that `'a` must outlive `'static`
     };
     f(bad);
 }
diff --git a/tests/ui/resolve/auxiliary/empty.rs b/tests/ui/resolve/auxiliary/empty.rs
new file mode 100644
index 00000000000..bd9ec079d80
--- /dev/null
+++ b/tests/ui/resolve/auxiliary/empty.rs
@@ -0,0 +1 @@
+// Intentionally empty.
diff --git a/tests/ui/resolve/prim-crate-partial-res.rs b/tests/ui/resolve/prim-crate-partial-res.rs
new file mode 100644
index 00000000000..955f4fa2aee
--- /dev/null
+++ b/tests/ui/resolve/prim-crate-partial-res.rs
@@ -0,0 +1,8 @@
+//@ aux-build: empty.rs
+
+extern crate empty as usize;
+
+fn foo() -> usize<()> { 0 }
+//~^ ERROR type arguments are not allowed on builtin type `usize`
+
+fn main() {}
diff --git a/tests/ui/resolve/prim-crate-partial-res.stderr b/tests/ui/resolve/prim-crate-partial-res.stderr
new file mode 100644
index 00000000000..d10d37c9f1b
--- /dev/null
+++ b/tests/ui/resolve/prim-crate-partial-res.stderr
@@ -0,0 +1,17 @@
+error[E0109]: type arguments are not allowed on builtin type `usize`
+  --> $DIR/prim-crate-partial-res.rs:5:19
+   |
+LL | fn foo() -> usize<()> { 0 }
+   |             ----- ^^ type argument not allowed
+   |             |
+   |             not allowed on builtin type `usize`
+   |
+help: primitive type `usize` doesn't have generic parameters
+   |
+LL - fn foo() -> usize<()> { 0 }
+LL + fn foo() -> usize { 0 }
+   |
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0109`.
diff --git a/tests/ui/rfcs/rfc-3467-unsafe-pinned/unsafe-pinned-hides-niche.rs b/tests/ui/rfcs/rfc-3467-unsafe-pinned/unsafe-pinned-hides-niche.rs
new file mode 100644
index 00000000000..a1ff9a1f69f
--- /dev/null
+++ b/tests/ui/rfcs/rfc-3467-unsafe-pinned/unsafe-pinned-hides-niche.rs
@@ -0,0 +1,29 @@
+//@ check-pass
+// this test ensures that UnsafePinned hides the niche of its inner type, just like UnsafeCell does
+
+#![crate_type = "lib"]
+#![feature(unsafe_pinned)]
+
+use std::num::NonZero;
+use std::pin::UnsafePinned;
+
+macro_rules! assert_size_is {
+    ($ty:ty = $size:expr) => {
+        const _: () = assert!(size_of::<$ty>() == $size);
+    };
+}
+
+assert_size_is!(UnsafePinned<()> = 0);
+assert_size_is!(UnsafePinned<u8> = 1);
+
+assert_size_is!(       UnsafePinned<               u32>    = 4);
+assert_size_is!(       UnsafePinned<       NonZero<u32>>   = 4);
+assert_size_is!(       UnsafePinned<Option<NonZero<u32>>>  = 4);
+assert_size_is!(Option<UnsafePinned<               u32>>   = 8);
+assert_size_is!(Option<UnsafePinned<       NonZero<u32>>>  = 8);
+assert_size_is!(Option<UnsafePinned<Option<NonZero<u32>>>> = 8);
+
+assert_size_is!(       UnsafePinned<       &()>   = size_of::<usize>());
+assert_size_is!(       UnsafePinned<Option<&()>>  = size_of::<usize>());
+assert_size_is!(Option<UnsafePinned<       &()>>  = size_of::<usize>() * 2);
+assert_size_is!(Option<UnsafePinned<Option<&()>>> = size_of::<usize>() * 2);
diff --git a/tests/ui/suggestions/suggest-ref-mut.rs b/tests/ui/suggestions/suggest-ref-mut.rs
index 9f5df9303c3..2a933f6305f 100644
--- a/tests/ui/suggestions/suggest-ref-mut.rs
+++ b/tests/ui/suggestions/suggest-ref-mut.rs
@@ -1,3 +1,5 @@
+//@ dont-require-annotations: SUGGESTION
+
 struct X(usize);
 
 impl X {
diff --git a/tests/ui/suggestions/suggest-ref-mut.stderr b/tests/ui/suggestions/suggest-ref-mut.stderr
index 935a04c052a..7c0899f0fbc 100644
--- a/tests/ui/suggestions/suggest-ref-mut.stderr
+++ b/tests/ui/suggestions/suggest-ref-mut.stderr
@@ -1,5 +1,5 @@
 error[E0594]: cannot assign to `self.0`, which is behind a `&` reference
-  --> $DIR/suggest-ref-mut.rs:7:9
+  --> $DIR/suggest-ref-mut.rs:9:9
    |
 LL |         self.0 = 32;
    |         ^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be written
@@ -10,7 +10,7 @@ LL |     fn zap(&mut self) {
    |             +++
 
 error[E0594]: cannot assign to `*foo`, which is behind a `&` reference
-  --> $DIR/suggest-ref-mut.rs:15:5
+  --> $DIR/suggest-ref-mut.rs:17:5
    |
 LL |     *foo = 32;
    |     ^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be written
@@ -21,7 +21,7 @@ LL |     let ref mut foo = 16;
    |             +++
 
 error[E0594]: cannot assign to `*bar`, which is behind a `&` reference
-  --> $DIR/suggest-ref-mut.rs:19:9
+  --> $DIR/suggest-ref-mut.rs:21:9
    |
 LL |         *bar = 32;
    |         ^^^^^^^^^ `bar` is a `&` reference, so the data it refers to cannot be written
@@ -32,7 +32,7 @@ LL |     if let Some(ref mut bar) = Some(16) {
    |                     +++
 
 error[E0594]: cannot assign to `*quo`, which is behind a `&` reference
-  --> $DIR/suggest-ref-mut.rs:23:22
+  --> $DIR/suggest-ref-mut.rs:25:22
    |
 LL |         ref quo => { *quo = 32; },
    |                      ^^^^^^^^^ `quo` is a `&` reference, so the data it refers to cannot be written
diff --git a/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs b/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs
index fda0b1c08cb..d394dbe7b15 100644
--- a/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs
+++ b/tests/ui/target-feature/forbidden-target-feature-flag-disable.rs
@@ -4,7 +4,7 @@
 //@ compile-flags: -Ctarget-feature=-forced-atomics
 // For now this is just a warning.
 //@ build-pass
-//@error-pattern: unsound because it changes the ABI
+
 #![feature(no_core, lang_items)]
 #![no_core]
 
diff --git a/tests/ui/target-feature/tied-features-no-implication-1.rs b/tests/ui/target-feature/tied-features-no-implication-1.rs
index 0a98a7eeccf..63a1d77dae9 100644
--- a/tests/ui/target-feature/tied-features-no-implication-1.rs
+++ b/tests/ui/target-feature/tied-features-no-implication-1.rs
@@ -2,9 +2,7 @@
 //@ compile-flags: --crate-type=rlib --target=aarch64-unknown-linux-gnu
 //@ needs-llvm-components: aarch64
 //@[paca] compile-flags: -Ctarget-feature=+paca
-//@[paca] error-pattern: the target features paca, pacg must all be either enabled or disabled together
 //@[pacg] compile-flags: -Ctarget-feature=+pacg
-//@[paca] error-pattern: the target features paca, pacg must all be either enabled or disabled together
 #![feature(no_core, lang_items)]
 #![no_core]
 
diff --git a/tests/ui/test-attrs/test-should-panic-failed-show-span.rs b/tests/ui/test-attrs/test-should-panic-failed-show-span.rs
new file mode 100644
index 00000000000..f400f614142
--- /dev/null
+++ b/tests/ui/test-attrs/test-should-panic-failed-show-span.rs
@@ -0,0 +1,46 @@
+//@ compile-flags: --test
+//@ run-flags: --test-threads=1 --nocapture
+//@ run-fail
+//@ check-run-results
+//@ exec-env:RUST_BACKTRACE=0
+//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
+//@ normalize-stdout: "TypeId\(0x[0-9a-f]+\)" -> "TypeId($$HEX)"
+//@ needs-threads
+//@ needs-unwind (panic)
+
+#[test]
+#[should_panic]
+fn should_panic_with_any_message() {
+    panic!("Panic!");
+}
+
+#[test]
+#[should_panic = "message"]
+fn should_panic_with_message() {
+    panic!("message");
+}
+
+#[test]
+#[should_panic]
+fn should_panic_with_any_message_does_not_panic() {
+    // DON'T PANIC
+}
+
+#[test]
+#[should_panic = "message"]
+fn should_panic_with_message_does_not_panic() {
+    // DON'T PANIC
+}
+
+#[test]
+#[should_panic = "message"]
+fn should_panic_with_substring_panics_with_incorrect_string() {
+    panic!("ZOMGWTFBBQ");
+}
+
+#[test]
+#[should_panic = "message"]
+#[expect(non_fmt_panics)]
+fn should_panic_with_substring_panics_with_non_string_value() {
+    panic!(123);
+}
diff --git a/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr
new file mode 100644
index 00000000000..db379a16b52
--- /dev/null
+++ b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stderr
@@ -0,0 +1,13 @@
+
+thread 'should_panic_with_any_message' panicked at $DIR/test-should-panic-failed-show-span.rs:14:5:
+Panic!
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
+
+thread 'should_panic_with_message' panicked at $DIR/test-should-panic-failed-show-span.rs:20:5:
+message
+
+thread 'should_panic_with_substring_panics_with_incorrect_string' panicked at $DIR/test-should-panic-failed-show-span.rs:38:5:
+ZOMGWTFBBQ
+
+thread 'should_panic_with_substring_panics_with_non_string_value' panicked at $DIR/test-should-panic-failed-show-span.rs:45:5:
+Box<dyn Any>
diff --git a/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout
new file mode 100644
index 00000000000..75600b4d3d6
--- /dev/null
+++ b/tests/ui/test-attrs/test-should-panic-failed-show-span.run.stdout
@@ -0,0 +1,32 @@
+
+running 6 tests
+test should_panic_with_any_message - should panic ... ok
+test should_panic_with_any_message_does_not_panic - should panic ... FAILED
+test should_panic_with_message - should panic ... ok
+test should_panic_with_message_does_not_panic - should panic ... FAILED
+test should_panic_with_substring_panics_with_incorrect_string - should panic ... FAILED
+test should_panic_with_substring_panics_with_non_string_value - should panic ... FAILED
+
+failures:
+
+---- should_panic_with_any_message_does_not_panic stdout ----
+note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:25:4
+---- should_panic_with_message_does_not_panic stdout ----
+note: test did not panic as expected at $DIR/test-should-panic-failed-show-span.rs:31:4
+---- should_panic_with_substring_panics_with_incorrect_string stdout ----
+note: panic did not contain expected string
+      panic message: `"ZOMGWTFBBQ"`,
+ expected substring: `"message"`
+---- should_panic_with_substring_panics_with_non_string_value stdout ----
+note: expected panic with string value,
+ found non-string value: `TypeId($HEX)`
+     expected substring: `"message"`
+
+failures:
+    should_panic_with_any_message_does_not_panic
+    should_panic_with_message_does_not_panic
+    should_panic_with_substring_panics_with_incorrect_string
+    should_panic_with_substring_panics_with_non_string_value
+
+test result: FAILED. 2 passed; 4 failed; 0 ignored; 0 measured; 0 filtered out; finished in $TIME
+
diff --git a/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs b/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs
index 0be1237749f..dd833957a70 100644
--- a/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs
+++ b/tests/ui/typeck/issue-90027-async-fn-return-suggestion.rs
@@ -1,4 +1,5 @@
 //@ edition:2018
+//@ dont-require-annotations: SUGGESTION
 
 async fn hello() { //~ HELP try adding a return type
     0
diff --git a/tests/ui/typeck/issue-90027-async-fn-return-suggestion.stderr b/tests/ui/typeck/issue-90027-async-fn-return-suggestion.stderr
index c46f4ec1ec3..3680df25f0b 100644
--- a/tests/ui/typeck/issue-90027-async-fn-return-suggestion.stderr
+++ b/tests/ui/typeck/issue-90027-async-fn-return-suggestion.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-90027-async-fn-return-suggestion.rs:4:5
+  --> $DIR/issue-90027-async-fn-return-suggestion.rs:5:5
    |
 LL | async fn hello() {
    |                 - help: try adding a return type: `-> i32`
@@ -7,7 +7,7 @@ LL |     0
    |     ^ expected `()`, found integer
 
 error[E0308]: mismatched types
-  --> $DIR/issue-90027-async-fn-return-suggestion.rs:9:5
+  --> $DIR/issue-90027-async-fn-return-suggestion.rs:10:5
    |
 LL | async fn world() -> () {
    |                     -- expected `()` because of return type
@@ -15,13 +15,13 @@ LL |     0
    |     ^ expected `()`, found integer
 
 error[E0308]: mismatched types
-  --> $DIR/issue-90027-async-fn-return-suggestion.rs:14:5
+  --> $DIR/issue-90027-async-fn-return-suggestion.rs:15:5
    |
 LL |     hello()
    |     ^^^^^^^ expected `()`, found future
    |
 note: calling an async function returns a future
-  --> $DIR/issue-90027-async-fn-return-suggestion.rs:14:5
+  --> $DIR/issue-90027-async-fn-return-suggestion.rs:15:5
    |
 LL |     hello()
    |     ^^^^^^^
diff --git a/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs b/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs
index 9304e20b429..6005bc96ad6 100644
--- a/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs
+++ b/tests/ui/unknown-unstable-lints/deny-unstable-lint-command-line.rs
@@ -1,6 +1,7 @@
 //~ ERROR unknown lint: `test_unstable_lint`
+//~^ NOTE the `test_unstable_lint` lint is unstable
 //@ check-fail
 //@ compile-flags: -Dunknown_lints -Atest_unstable_lint
-//@ error-pattern: the `test_unstable_lint` lint is unstable
+//@ dont-require-annotations: NOTE
 
 fn main() {}
diff --git a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs
index 76983419c68..c32a21a0163 100644
--- a/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs
+++ b/tests/ui/unknown-unstable-lints/warn-unknown-unstable-lint-command-line.rs
@@ -1,6 +1,7 @@
 //~ WARN unknown lint: `test_unstable_lint`
+//~^ NOTE the `test_unstable_lint` lint is unstable
 //@ check-pass
 //@ compile-flags: -Wunknown_lints -Atest_unstable_lint
-//@ error-pattern: the `test_unstable_lint` lint is unstable
+//@ dont-require-annotations: NOTE
 
 fn main() {}