about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/codegen/intrinsics/offset.rs34
-rw-r--r--tests/codegen/issues/issue-103840.rs1
-rw-r--r--tests/codegen/issues/issue-105386-ub-in-debuginfo.rs3
-rw-r--r--tests/codegen/issues/issue-86106.rs29
-rw-r--r--tests/debuginfo/thread.rs2
-rw-r--r--tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir2
-rw-r--r--tests/mir-opt/issue_41888.main.ElaborateDrops.diff2
-rw-r--r--tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff4
-rw-r--r--tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff6
-rw-r--r--tests/mir-opt/lower_intrinsics.rs1
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.rs27
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.mir105
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir134
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_index_range.PreCodegen.after.mir26
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_index_usize.PreCodegen.after.mir20
-rw-r--r--tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff24
-rw-r--r--tests/run-make/inaccessible-temp-dir/Makefile32
-rw-r--r--tests/run-make/inaccessible-temp-dir/program.rs1
-rw-r--r--tests/rustdoc-ui/doc_cfg_hide.stderr2
-rw-r--r--tests/rustdoc-ui/invalid-doc-attr.rs2
-rw-r--r--tests/rustdoc-ui/invalid-doc-attr.stderr2
-rw-r--r--tests/rustdoc-ui/issue-110900.rs28
-rw-r--r--tests/rustdoc-ui/unescaped_backticks.rs342
-rw-r--r--tests/rustdoc-ui/unescaped_backticks.stderr959
-rw-r--r--tests/rustdoc/deref/deref-const-fn.rs (renamed from tests/rustdoc/deref-const-fn.rs)0
-rw-r--r--tests/rustdoc/deref/deref-multiple-impl-blocks.rs43
-rw-r--r--tests/rustdoc/deref/deref-mut-methods.rs (renamed from tests/rustdoc/deref-mut-methods.rs)0
-rw-r--r--tests/rustdoc/deref/deref-recursive-pathbuf.rs (renamed from tests/rustdoc/deref-recursive-pathbuf.rs)0
-rw-r--r--tests/rustdoc/deref/deref-recursive.rs (renamed from tests/rustdoc/deref-recursive.rs)0
-rw-r--r--tests/rustdoc/deref/deref-slice-core.rs (renamed from tests/rustdoc/deref-slice-core.rs)0
-rw-r--r--tests/rustdoc/deref/deref-to-primitive.rs (renamed from tests/rustdoc/deref-to-primitive.rs)0
-rw-r--r--tests/rustdoc/deref/deref-typedef.rs (renamed from tests/rustdoc/deref-typedef.rs)0
-rw-r--r--tests/rustdoc/deref/escape-deref-methods.rs (renamed from tests/rustdoc/escape-deref-methods.rs)0
-rw-r--r--tests/rustdoc/deref/issue-100679-sidebar-links-deref.rs (renamed from tests/rustdoc/issue-100679-sidebar-links-deref.rs)0
-rw-r--r--tests/rustdoc/deref/recursive-deref-sidebar.rs (renamed from tests/rustdoc/recursive-deref-sidebar.rs)0
-rw-r--r--tests/rustdoc/deref/recursive-deref.rs (renamed from tests/rustdoc/recursive-deref.rs)0
-rw-r--r--tests/rustdoc/inline_cross/auxiliary/repr.rs4
-rw-r--r--tests/rustdoc/inline_cross/repr.rs13
-rw-r--r--tests/rustdoc/issue-106142.rs14
-rw-r--r--tests/ui/async-await/future-sizes/async-awaiting-fut.stdout40
-rw-r--r--tests/ui/async-await/future-sizes/large-arg.stdout24
-rw-r--r--tests/ui/async-await/in-trait/nested-rpit.rs4
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-early.rs48
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-early.stderr45
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-late.rs50
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-late.stderr19
-rw-r--r--tests/ui/attributes/invalid-doc-attr.rs2
-rw-r--r--tests/ui/attributes/invalid-doc-attr.stderr2
-rw-r--r--tests/ui/attributes/invalid_macro_export_argument.deny.stderr20
-rw-r--r--tests/ui/attributes/invalid_macro_export_argument.rs13
-rw-r--r--tests/ui/attributes/invalid_macro_export_argument.stderr16
-rw-r--r--tests/ui/binop/eq-arr.rs7
-rw-r--r--tests/ui/binop/eq-arr.stderr22
-rw-r--r--tests/ui/binop/eq-vec.rs13
-rw-r--r--tests/ui/binop/eq-vec.stderr24
-rw-r--r--tests/ui/binop/issue-28837.stderr60
-rw-r--r--tests/ui/binop/issue-3820.stderr4
-rw-r--r--tests/ui/coherence/coherence-overlap-negative-impls.rs41
-rw-r--r--tests/ui/const-ptr/forbidden_slices.stderr4
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.32bit.stderr4
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.64bit.stderr4
-rw-r--r--tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr4
-rw-r--r--tests/ui/derives/derives-span-PartialEq-enum.stderr4
-rw-r--r--tests/ui/derives/derives-span-PartialEq-struct.stderr4
-rw-r--r--tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr4
-rw-r--r--tests/ui/derives/deriving-no-inner-impl-error-message.stderr4
-rw-r--r--tests/ui/destructuring-assignment/note-unsupported.stderr4
-rw-r--r--tests/ui/feature-gates/test-listing-format-json.rs18
-rw-r--r--tests/ui/feature-gates/test-listing-format-json.run.stderr1
-rw-r--r--tests/ui/fmt/ifmt-bad-arg.stderr4
-rw-r--r--tests/ui/fmt/ifmt-unimpl.stderr6
-rw-r--r--tests/ui/fmt/send-sync.stderr28
-rw-r--r--tests/ui/generator/issue-110929-generator-conflict-error-ice.rs12
-rw-r--r--tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr18
-rw-r--r--tests/ui/generic-associated-types/self-outlives-lint.rs2
-rw-r--r--tests/ui/io-checks/inaccessbile-temp-dir.rs39
-rw-r--r--tests/ui/io-checks/inaccessbile-temp-dir.stderr4
-rw-r--r--tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs16
-rw-r--r--tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr2
-rw-r--r--tests/ui/issues/issue-62375.stderr13
-rw-r--r--tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr40
-rw-r--r--tests/ui/lint/unused/lint-unused-mut-variables.rs8
-rw-r--r--tests/ui/lint/unused/lint-unused-mut-variables.stderr10
-rw-r--r--tests/ui/macros/missing-bang-in-decl.stderr14
-rw-r--r--tests/ui/methods/method-not-found-generic-arg-elision.rs4
-rw-r--r--tests/ui/methods/method-not-found-generic-arg-elision.stderr6
-rw-r--r--tests/ui/mismatched_types/assignment-operator-unimplemented.stderr4
-rw-r--r--tests/ui/or-patterns/or-patterns-syntactic-fail.stderr4
-rw-r--r--tests/ui/panics/fmt-only-once.rs21
-rw-r--r--tests/ui/panics/fmt-only-once.run.stderr3
-rw-r--r--tests/ui/parser/item-kw-case-mismatch.fixed28
-rw-r--r--tests/ui/parser/item-kw-case-mismatch.rs28
-rw-r--r--tests/ui/parser/item-kw-case-mismatch.stderr28
-rw-r--r--tests/ui/parser/recover-unticked-labels.stderr8
-rw-r--r--tests/ui/parser/use-colon-as-mod-sep.stderr6
-rw-r--r--tests/ui/print_type_sizes/async.stdout8
-rw-r--r--tests/ui/print_type_sizes/generator.stdout8
-rw-r--r--tests/ui/span/issue-39018.stderr4
-rw-r--r--tests/ui/specialization/issue-40582.rs35
-rw-r--r--tests/ui/specialization/specialization-default-items-drop-coherence.rs30
-rw-r--r--tests/ui/structs-enums/type-sizes.rs67
-rw-r--r--tests/ui/suggestions/invalid-bin-op.stderr4
-rw-r--r--tests/ui/suggestions/restrict-type-not-param.stderr4
-rw-r--r--tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed2
-rw-r--r--tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs2
-rw-r--r--tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr10
-rw-r--r--tests/ui/test-attrs/tests-listing-format-json.rs1
-rw-r--r--tests/ui/test-attrs/tests-listing-format-json.run.stdout6
-rw-r--r--tests/ui/thread-local/thread-local-static-ref-use-after-free.rs46
-rw-r--r--tests/ui/traits/new-solver/exponential-trait-goals.rs20
-rw-r--r--tests/ui/traits/new-solver/exponential-trait-goals.stderr23
-rw-r--r--tests/ui/type/type-unsatisfiable.usage.stderr4
112 files changed, 2661 insertions, 340 deletions
diff --git a/tests/codegen/intrinsics/offset.rs b/tests/codegen/intrinsics/offset.rs
new file mode 100644
index 00000000000..7fc4f4498d6
--- /dev/null
+++ b/tests/codegen/intrinsics/offset.rs
@@ -0,0 +1,34 @@
+// compile-flags: -O -C no-prepopulate-passes
+// min-llvm-version: 15.0 (because we're using opaque pointers)
+
+#![crate_type = "lib"]
+#![feature(core_intrinsics)]
+
+use std::intrinsics::offset;
+
+// CHECK-LABEL: ptr @offset_zst
+// CHECK-SAME: (ptr noundef %p, [[SIZE:i[0-9]+]] noundef %d)
+#[no_mangle]
+pub unsafe fn offset_zst(p: *const (), d: usize) -> *const () {
+    // CHECK-NOT: getelementptr
+    // CHECK: ret ptr %p
+    offset(p, d)
+}
+
+// CHECK-LABEL: ptr @offset_isize
+// CHECK-SAME: (ptr noundef %p, [[SIZE]] noundef %d)
+#[no_mangle]
+pub unsafe fn offset_isize(p: *const u32, d: isize) -> *const u32 {
+    // CHECK: %[[R:.*]] = getelementptr inbounds i32, ptr %p, [[SIZE]] %d
+    // CHECK-NEXT: ret ptr %[[R]]
+    offset(p, d)
+}
+
+// CHECK-LABEL: ptr @offset_usize
+// CHECK-SAME: (ptr noundef %p, [[SIZE]] noundef %d)
+#[no_mangle]
+pub unsafe fn offset_usize(p: *const u64, d: usize) -> *const u64 {
+    // CHECK: %[[R:.*]] = getelementptr inbounds i64, ptr %p, [[SIZE]] %d
+    // CHECK-NEXT: ret ptr %[[R]]
+    offset(p, d)
+}
diff --git a/tests/codegen/issues/issue-103840.rs b/tests/codegen/issues/issue-103840.rs
index f19d7031bb3..da64692d27d 100644
--- a/tests/codegen/issues/issue-103840.rs
+++ b/tests/codegen/issues/issue-103840.rs
@@ -1,4 +1,5 @@
 // compile-flags: -O
+// min-llvm-version: 16.0
 #![crate_type = "lib"]
 
 pub fn foo(t: &mut Vec<usize>) {
diff --git a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs
index d54ac9e33bc..2ee4d7cca0e 100644
--- a/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs
+++ b/tests/codegen/issues/issue-105386-ub-in-debuginfo.rs
@@ -19,4 +19,5 @@ pub fn outer_function(x: S, y: S) -> usize {
 // CHECK-NOT: [[ptr_tmp:%.*]] = getelementptr inbounds %"[closure@{{.*.rs}}:9:23: 9:25]", ptr [[spill]]
 // CHECK-NOT: [[load:%.*]] = load ptr, ptr
 // CHECK: call void @llvm.lifetime.start{{.*}}({{.*}}, ptr [[spill]])
-// CHECK: call void @llvm.memcpy{{.*}}(ptr {{align .*}} [[spill]], ptr {{align .*}} %x
+// CHECK: [[inner:%.*]] = getelementptr inbounds %"{{.*}}", ptr [[spill]]
+// CHECK: call void @llvm.memcpy{{.*}}(ptr {{align .*}} [[inner]], ptr {{align .*}} %x
diff --git a/tests/codegen/issues/issue-86106.rs b/tests/codegen/issues/issue-86106.rs
index 9ccbcb24f56..c0be7fab2f3 100644
--- a/tests/codegen/issues/issue-86106.rs
+++ b/tests/codegen/issues/issue-86106.rs
@@ -1,4 +1,5 @@
 // min-llvm-version: 15.0
+// only-64bit llvm appears to use stores instead of memset on 32bit
 // compile-flags: -C opt-level=3 -Z merge-functions=disabled
 
 // The below two functions ensure that both `String::new()` and `"".to_string()`
@@ -9,12 +10,9 @@
 // CHECK-LABEL: define void @string_new
 #[no_mangle]
 pub fn string_new() -> String {
-    // CHECK-NOT: load i8
-    // CHECK: store i{{32|64}}
+    // CHECK: store ptr inttoptr
     // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store ptr
-    // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store i{{32|64}}
+    // CHECK-NEXT: call void @llvm.memset
     // CHECK-NEXT: ret void
     String::new()
 }
@@ -22,12 +20,9 @@ pub fn string_new() -> String {
 // CHECK-LABEL: define void @empty_to_string
 #[no_mangle]
 pub fn empty_to_string() -> String {
-    // CHECK-NOT: load i8
-    // CHECK: store i{{32|64}}
-    // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store ptr
+    // CHECK: store ptr inttoptr
     // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store i{{32|64}}
+    // CHECK-NEXT: call void @llvm.memset
     // CHECK-NEXT: ret void
     "".to_string()
 }
@@ -38,12 +33,9 @@ pub fn empty_to_string() -> String {
 // CHECK-LABEL: @empty_vec
 #[no_mangle]
 pub fn empty_vec() -> Vec<u8> {
-    // CHECK: store i{{32|64}}
-    // CHECK-NOT: load i8
+    // CHECK: store ptr inttoptr
     // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store ptr
-    // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store i{{32|64}}
+    // CHECK-NEXT: call void @llvm.memset
     // CHECK-NEXT: ret void
     vec![]
 }
@@ -51,12 +43,9 @@ pub fn empty_vec() -> Vec<u8> {
 // CHECK-LABEL: @empty_vec_clone
 #[no_mangle]
 pub fn empty_vec_clone() -> Vec<u8> {
-    // CHECK: store i{{32|64}}
-    // CHECK-NOT: load i8
-    // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store ptr
+    // CHECK: store ptr inttoptr
     // CHECK-NEXT: getelementptr
-    // CHECK-NEXT: store i{{32|64}}
+    // CHECK-NEXT: call void @llvm.memset
     // CHECK-NEXT: ret void
     vec![].clone()
 }
diff --git a/tests/debuginfo/thread.rs b/tests/debuginfo/thread.rs
index 388d50c5cdc..e7e83c7aacd 100644
--- a/tests/debuginfo/thread.rs
+++ b/tests/debuginfo/thread.rs
@@ -1,4 +1,4 @@
-// Testing the the display of JoinHandle and Thread in cdb.
+// Testing the display of JoinHandle and Thread in cdb.
 
 // cdb-only
 // min-cdb-version: 10.0.18317.1001
diff --git a/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir b/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
index 7cce3415fa1..9bced25a595 100644
--- a/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
+++ b/tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir
@@ -12,7 +12,7 @@
         _1: GeneratorSavedTy {
             ty: impl std::future::Future<Output = ()>,
             source_info: SourceInfo {
-                span: $DIR/async_await.rs:16:8: 16:14 (#11),
+                span: $DIR/async_await.rs:16:8: 16:14 (#10),
                 scope: scope[0],
             },
             ignore_for_traits: false,
diff --git a/tests/mir-opt/issue_41888.main.ElaborateDrops.diff b/tests/mir-opt/issue_41888.main.ElaborateDrops.diff
index d98f75e7502..46b450a4e47 100644
--- a/tests/mir-opt/issue_41888.main.ElaborateDrops.diff
+++ b/tests/mir-opt/issue_41888.main.ElaborateDrops.diff
@@ -22,9 +22,9 @@
       }
   
       bb0: {
-+         _9 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
 +         _7 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
 +         _8 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
++         _9 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
           StorageLive(_1);                 // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
           StorageLive(_2);                 // scope 1 at $DIR/issue_41888.rs:+2:8: +2:14
           _2 = cond() -> [return: bb1, unwind: bb11]; // scope 1 at $DIR/issue_41888.rs:+2:8: +2:14
diff --git a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff b/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff
index cc5079af7f4..93863fca344 100644
--- a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff
+++ b/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff
@@ -24,7 +24,7 @@
           _4 = &raw const (*_1);           // scope 1 at $DIR/lower_intrinsics.rs:+2:55: +2:56
 -         _3 = option_payload_ptr::<usize>(move _4) -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/lower_intrinsics.rs:+2:18: +2:57
 -                                          // mir::Constant
--                                          // + span: $DIR/lower_intrinsics.rs:133:18: 133:54
+-                                          // + span: $DIR/lower_intrinsics.rs:132:18: 132:54
 -                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const Option<usize>) -> *const usize {option_payload_ptr::<usize>}, val: Value(<ZST>) }
 +         _3 = &raw const (((*_4) as Some).0: usize); // scope 1 at $DIR/lower_intrinsics.rs:+2:18: +2:57
 +         goto -> bb1;                     // scope 1 at $DIR/lower_intrinsics.rs:+2:18: +2:57
@@ -37,7 +37,7 @@
           _6 = &raw const (*_2);           // scope 2 at $DIR/lower_intrinsics.rs:+3:55: +3:56
 -         _5 = option_payload_ptr::<String>(move _6) -> [return: bb2, unwind unreachable]; // scope 2 at $DIR/lower_intrinsics.rs:+3:18: +3:57
 -                                          // mir::Constant
--                                          // + span: $DIR/lower_intrinsics.rs:134:18: 134:54
+-                                          // + span: $DIR/lower_intrinsics.rs:133:18: 133:54
 -                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const Option<String>) -> *const String {option_payload_ptr::<String>}, val: Value(<ZST>) }
 +         _5 = &raw const (((*_6) as Some).0: std::string::String); // scope 2 at $DIR/lower_intrinsics.rs:+3:18: +3:57
 +         goto -> bb2;                     // scope 2 at $DIR/lower_intrinsics.rs:+3:18: +3:57
diff --git a/tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff b/tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff
index f342bf30d02..37f1995a53a 100644
--- a/tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff
+++ b/tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff
@@ -13,10 +13,10 @@
           _3 = _1;                         // scope 0 at $DIR/lower_intrinsics.rs:+1:30: +1:31
           StorageLive(_4);                 // scope 0 at $DIR/lower_intrinsics.rs:+1:33: +1:34
           _4 = _2;                         // scope 0 at $DIR/lower_intrinsics.rs:+1:33: +1:34
--         _0 = offset::<i32>(move _3, move _4) -> [return: bb1, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
+-         _0 = offset::<*const i32, isize>(move _3, move _4) -> [return: bb1, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
 -                                          // mir::Constant
--                                          // + span: $DIR/lower_intrinsics.rs:140:5: 140:29
--                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const i32, isize) -> *const i32 {offset::<i32>}, val: Value(<ZST>) }
+-                                          // + span: $DIR/lower_intrinsics.rs:139:5: 139:29
+-                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*const i32, isize) -> *const i32 {offset::<*const i32, isize>}, val: Value(<ZST>) }
 +         _0 = Offset(move _3, move _4);   // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
 +         goto -> bb1;                     // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:35
       }
diff --git a/tests/mir-opt/lower_intrinsics.rs b/tests/mir-opt/lower_intrinsics.rs
index ad690f803c4..2b1e67be2a9 100644
--- a/tests/mir-opt/lower_intrinsics.rs
+++ b/tests/mir-opt/lower_intrinsics.rs
@@ -127,7 +127,6 @@ pub fn read_via_copy_uninhabited(r: &Never) -> Never {
 pub enum Never {}
 
 // EMIT_MIR lower_intrinsics.option_payload.LowerIntrinsics.diff
-#[cfg(not(bootstrap))]
 pub fn option_payload(o: &Option<usize>, p: &Option<String>) {
     unsafe {
         let _x = core::intrinsics::option_payload_ptr(o);
diff --git a/tests/mir-opt/pre-codegen/slice_index.rs b/tests/mir-opt/pre-codegen/slice_index.rs
new file mode 100644
index 00000000000..44b45627607
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_index.rs
@@ -0,0 +1,27 @@
+// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
+// only-64bit
+// ignore-debug
+
+#![crate_type = "lib"]
+
+use std::ops::Range;
+
+// EMIT_MIR slice_index.slice_index_usize.PreCodegen.after.mir
+pub fn slice_index_usize(slice: &[u32], index: usize) -> u32 {
+    slice[index]
+}
+
+// EMIT_MIR slice_index.slice_get_mut_usize.PreCodegen.after.mir
+pub fn slice_get_mut_usize(slice: &mut [u32], index: usize) -> Option<&mut u32> {
+    slice.get_mut(index)
+}
+
+// EMIT_MIR slice_index.slice_index_range.PreCodegen.after.mir
+pub fn slice_index_range(slice: &[u32], index: Range<usize>) -> &[u32] {
+    &slice[index]
+}
+
+// EMIT_MIR slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir
+pub unsafe fn slice_get_unchecked_mut_range(slice: &mut [u32], index: Range<usize>) -> &mut [u32] {
+    slice.get_unchecked_mut(index)
+}
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.mir
new file mode 100644
index 00000000000..715a1e3fcd4
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_get_mut_usize.PreCodegen.after.mir
@@ -0,0 +1,105 @@
+// MIR for `slice_get_mut_usize` after PreCodegen
+
+fn slice_get_mut_usize(_1: &mut [u32], _2: usize) -> Option<&mut u32> {
+    debug slice => _1;                   // in scope 0 at $DIR/slice_index.rs:+0:28: +0:33
+    debug index => _2;                   // in scope 0 at $DIR/slice_index.rs:+0:47: +0:52
+    let mut _0: std::option::Option<&mut u32>; // return place in scope 0 at $DIR/slice_index.rs:+0:64: +0:80
+    scope 1 (inlined core::slice::<impl [u32]>::get_mut::<usize>) { // at $DIR/slice_index.rs:16:11: 16:25
+        debug self => _1;                // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        debug index => _2;               // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        scope 2 (inlined <usize as SliceIndex<[u32]>>::get_mut) { // at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+            debug self => _2;            // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            debug slice => _1;           // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _3: bool;            // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _4: usize;           // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _5: &[u32];          // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _6: &mut u32;        // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _7: *mut u32;        // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            let mut _8: *mut [u32];      // in scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+            scope 3 {
+                scope 4 (inlined <usize as SliceIndex<[u32]>>::get_unchecked_mut) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                    debug self => _2;    // in scope 4 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                    debug slice => _8;   // in scope 4 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                    let mut _9: *mut u32; // in scope 4 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                    let mut _10: usize;  // in scope 4 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                    let mut _11: *mut [u32]; // in scope 4 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                    scope 5 {
+                        debug this => _2; // in scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                        scope 6 {
+                            scope 7 (inlined <usize as SliceIndex<[T]>>::get_unchecked_mut::runtime::<u32>) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                                debug this => _10; // in scope 7 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                                debug slice => _11; // in scope 7 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                                scope 8 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                    debug self => _11; // in scope 8 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                    let mut _12: *const [u32]; // in scope 8 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                    scope 9 (inlined std::ptr::metadata::<[u32]>) { // at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                        debug ptr => _12; // in scope 9 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                        scope 10 {
+                                        }
+                                    }
+                                }
+                            }
+                            scope 11 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug self => _8; // in scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                            }
+                            scope 12 (inlined ptr::mut_ptr::<impl *mut u32>::add) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug self => _9; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                debug count => _2; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                scope 13 {
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    bb0: {
+        StorageLive(_6);                 // scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_3);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_4);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_5);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _5 = &(*_1);                     // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _4 = Len((*_5));                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_5);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _3 = Lt(_2, move _4);            // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_4);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        switchInt(move _3) -> [0: bb2, otherwise: bb1]; // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+    }
+
+    bb1: {
+        StorageLive(_7);                 // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_8);                 // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _8 = &raw mut (*_1);             // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_10);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_11);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_12);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_9);                 // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _9 = _8 as *mut u32 (PtrToPtr);  // scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+        _7 = Offset(_9, _2);             // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+        StorageDead(_9);                 // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_12);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_11);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_10);                // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_8);                 // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _6 = &mut (*_7);                 // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _0 = Option::<&mut u32>::Some(_6); // scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_7);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        goto -> bb3;                     // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+    }
+
+    bb2: {
+        _0 = const Option::<&mut u32>::None; // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                         // mir::Constant
+                                         // + span: no-location
+                                         // + literal: Const { ty: Option<&mut u32>, val: Value(Scalar(0x0000000000000000)) }
+        goto -> bb3;                     // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+    }
+
+    bb3: {
+        StorageDead(_3);                 // scope 2 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_6);                 // scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        return;                          // scope 0 at $DIR/slice_index.rs:+2:2: +2:2
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir
new file mode 100644
index 00000000000..ea0a44cf3bf
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir
@@ -0,0 +1,134 @@
+// MIR for `slice_get_unchecked_mut_range` after PreCodegen
+
+fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) -> &mut [u32] {
+    debug slice => _1;                   // in scope 0 at $DIR/slice_index.rs:+0:45: +0:50
+    debug index => _2;                   // in scope 0 at $DIR/slice_index.rs:+0:64: +0:69
+    let mut _0: &mut [u32];              // return place in scope 0 at $DIR/slice_index.rs:+1:5: +1:35
+    scope 1 (inlined core::slice::<impl [u32]>::get_unchecked_mut::<std::ops::Range<usize>>) { // at $DIR/slice_index.rs:26:11: 26:35
+        debug self => _1;                // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        debug index => _2;               // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        let mut _3: *mut [u32];          // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        let mut _4: *mut [u32];          // in scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        scope 2 {
+            scope 3 (inlined <std::ops::Range<usize> as SliceIndex<[u32]>>::get_unchecked_mut) { // at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+                debug self => _2;        // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                debug slice => _4;       // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let _5: std::ops::Range<usize>; // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _7: usize;       // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _8: usize;       // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _9: *mut u32;    // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _10: *mut u32;   // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _11: usize;      // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _12: usize;      // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _13: std::ops::Range<usize>; // in scope 3 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                let mut _14: *mut [u32]; // in scope 3 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                scope 4 {
+                    debug this => _5;    // in scope 4 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                    scope 5 {
+                        let _6: usize;   // in scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                        scope 6 {
+                            debug new_len => _6; // in scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                            scope 11 (inlined ptr::mut_ptr::<impl *mut [u32]>::as_mut_ptr) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug self => _4; // in scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                            }
+                            scope 12 (inlined ptr::mut_ptr::<impl *mut u32>::add) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug self => _10; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                debug count => _11; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                scope 13 {
+                                }
+                            }
+                            scope 14 (inlined slice_from_raw_parts_mut::<u32>) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug data => _9; // in scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                                debug len => _12; // in scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                                let mut _16: *mut (); // in scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                                scope 15 (inlined ptr::mut_ptr::<impl *mut u32>::cast::<()>) { // at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                                    debug self => _9; // in scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                }
+                                scope 16 (inlined std::ptr::from_raw_parts_mut::<[u32]>) { // at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                                    debug data_address => _16; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    debug metadata => _12; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    let mut _17: std::ptr::metadata::PtrRepr<[u32]>; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    let mut _18: std::ptr::metadata::PtrComponents<[u32]>; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    let mut _19: *const (); // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    scope 17 {
+                                    }
+                                }
+                            }
+                        }
+                        scope 7 (inlined <std::ops::Range<usize> as SliceIndex<[T]>>::get_unchecked_mut::runtime::<u32>) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                            debug this => _13; // in scope 7 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                            debug slice => _14; // in scope 7 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                            scope 8 (inlined ptr::mut_ptr::<impl *mut [u32]>::len) { // at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                debug self => _14; // in scope 8 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                let mut _15: *const [u32]; // in scope 8 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                scope 9 (inlined std::ptr::metadata::<[u32]>) { // at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                    debug ptr => _15; // in scope 9 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    scope 10 {
+                                    }
+                                }
+                            }
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    bb0: {
+        StorageLive(_3);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_4);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        _4 = &raw mut (*_1);             // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_5);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_13);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_14);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_15);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_6);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_7);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _7 = (_2.1: usize);              // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_8);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _8 = (_2.0: usize);              // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _6 = unchecked_sub::<usize>(move _7, move _8) -> [return: bb1, unwind unreachable]; // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                         // mir::Constant
+                                         // + span: $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                         // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(usize, usize) -> usize {unchecked_sub::<usize>}, val: Value(<ZST>) }
+    }
+
+    bb1: {
+        StorageDead(_8);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_7);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_9);                 // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_10);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _10 = _4 as *mut u32 (PtrToPtr); // scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+        StorageLive(_11);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _11 = (_2.0: usize);             // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _9 = Offset(_10, _11);           // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+        StorageDead(_11);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_10);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_12);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _12 = _6;                        // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_16);                // scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+        _16 = _9 as *mut () (PtrToPtr);  // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+        StorageLive(_17);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageLive(_18);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageLive(_19);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        _19 = _16 as *const () (Pointer(MutToConstPointer)); // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        _18 = ptr::metadata::PtrComponents::<[u32]> { data_address: move _19, metadata: _12 }; // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageDead(_19);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        _17 = ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _18 }; // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageDead(_18);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        _3 = (_17.1: *mut [u32]);        // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageDead(_17);                // scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageDead(_16);                // scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+        StorageDead(_12);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_9);                 // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_6);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_15);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageDead(_14);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageDead(_13);                // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageDead(_5);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageDead(_4);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        _0 = &mut (*_3);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageDead(_3);                 // scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        return;                          // scope 0 at $DIR/slice_index.rs:+2:2: +2:2
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_index_range.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_index.slice_index_range.PreCodegen.after.mir
new file mode 100644
index 00000000000..35dd973b55f
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_index_range.PreCodegen.after.mir
@@ -0,0 +1,26 @@
+// MIR for `slice_index_range` after PreCodegen
+
+fn slice_index_range(_1: &[u32], _2: std::ops::Range<usize>) -> &[u32] {
+    debug slice => _1;                   // in scope 0 at $DIR/slice_index.rs:+0:26: +0:31
+    debug index => _2;                   // in scope 0 at $DIR/slice_index.rs:+0:41: +0:46
+    let mut _0: &[u32];                  // return place in scope 0 at $DIR/slice_index.rs:+1:5: +1:18
+    let _3: &[u32];                      // in scope 0 at $DIR/slice_index.rs:+1:6: +1:18
+    scope 1 (inlined #[track_caller] core::slice::index::<impl Index<std::ops::Range<usize>> for [u32]>::index) { // at $DIR/slice_index.rs:21:6: 21:18
+        debug self => _1;                // in scope 1 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        debug index => _2;               // in scope 1 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+    }
+
+    bb0: {
+        StorageLive(_3);                 // scope 0 at $DIR/slice_index.rs:+1:6: +1:18
+        _3 = <std::ops::Range<usize> as SliceIndex<[u32]>>::index(move _2, _1) -> bb1; // scope 1 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                         // mir::Constant
+                                         // + span: $SRC_DIR/core/src/slice/index.rs:LL:COL
+                                         // + literal: Const { ty: for<'a> fn(std::ops::Range<usize>, &'a [u32]) -> &'a <std::ops::Range<usize> as SliceIndex<[u32]>>::Output {<std::ops::Range<usize> as SliceIndex<[u32]>>::index}, val: Value(<ZST>) }
+    }
+
+    bb1: {
+        _0 = _3;                         // scope 0 at $DIR/slice_index.rs:+1:5: +1:18
+        StorageDead(_3);                 // scope 0 at $DIR/slice_index.rs:+2:1: +2:2
+        return;                          // scope 0 at $DIR/slice_index.rs:+2:2: +2:2
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/slice_index.slice_index_usize.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_index.slice_index_usize.PreCodegen.after.mir
new file mode 100644
index 00000000000..6cc0ee0570b
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/slice_index.slice_index_usize.PreCodegen.after.mir
@@ -0,0 +1,20 @@
+// MIR for `slice_index_usize` after PreCodegen
+
+fn slice_index_usize(_1: &[u32], _2: usize) -> u32 {
+    debug slice => _1;                   // in scope 0 at $DIR/slice_index.rs:+0:26: +0:31
+    debug index => _2;                   // in scope 0 at $DIR/slice_index.rs:+0:41: +0:46
+    let mut _0: u32;                     // return place in scope 0 at $DIR/slice_index.rs:+0:58: +0:61
+    let mut _3: usize;                   // in scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+    let mut _4: bool;                    // in scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+
+    bb0: {
+        _3 = Len((*_1));                 // scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+        _4 = Lt(_2, _3);                 // scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+        assert(move _4, "index out of bounds: the length is {} but the index is {}", move _3, _2) -> bb1; // scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+    }
+
+    bb1: {
+        _0 = (*_1)[_2];                  // scope 0 at $DIR/slice_index.rs:+1:5: +1:17
+        return;                          // scope 0 at $DIR/slice_index.rs:+2:2: +2:2
+    }
+}
diff --git a/tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff b/tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff
index 579587a430b..9bda5f575c9 100644
--- a/tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff
+++ b/tests/mir-opt/sroa/lifetimes.foo.ScalarReplacementOfAggregates.diff
@@ -15,14 +15,14 @@
       let mut _13: &[&str; 3];             // in scope 0 at $DIR/lifetimes.rs:+10:19: +10:28
       let _14: &[&str; 3];                 // in scope 0 at $DIR/lifetimes.rs:+10:19: +10:28
       let _15: [&str; 3];                  // in scope 0 at $DIR/lifetimes.rs:+10:19: +10:28
-      let mut _16: &[core::fmt::ArgumentV1<'_>]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
-      let mut _17: &[core::fmt::ArgumentV1<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
-      let _18: &[core::fmt::ArgumentV1<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
-      let _19: [core::fmt::ArgumentV1<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
-      let mut _20: core::fmt::ArgumentV1<'_>; // in scope 0 at $DIR/lifetimes.rs:+10:20: +10:23
+      let mut _16: &[core::fmt::rt::Argument<'_>]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
+      let mut _17: &[core::fmt::rt::Argument<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
+      let _18: &[core::fmt::rt::Argument<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
+      let _19: [core::fmt::rt::Argument<'_>; 2]; // in scope 0 at $SRC_DIR/std/src/macros.rs:LL:COL
+      let mut _20: core::fmt::rt::Argument<'_>; // in scope 0 at $DIR/lifetimes.rs:+10:20: +10:23
       let mut _21: &std::boxed::Box<dyn std::fmt::Display>; // in scope 0 at $DIR/lifetimes.rs:+10:20: +10:23
       let _22: &std::boxed::Box<dyn std::fmt::Display>; // in scope 0 at $DIR/lifetimes.rs:+10:20: +10:23
-      let mut _23: core::fmt::ArgumentV1<'_>; // in scope 0 at $DIR/lifetimes.rs:+10:24: +10:27
+      let mut _23: core::fmt::rt::Argument<'_>; // in scope 0 at $DIR/lifetimes.rs:+10:24: +10:27
       let mut _24: &u32;                   // in scope 0 at $DIR/lifetimes.rs:+10:24: +10:27
       let _25: &u32;                       // in scope 0 at $DIR/lifetimes.rs:+10:24: +10:27
       let mut _27: bool;                   // in scope 0 at $DIR/lifetimes.rs:+12:1: +12:2
@@ -113,11 +113,11 @@
           StorageLive(_22);                // scope 4 at $DIR/lifetimes.rs:+10:20: +10:23
           _22 = &_8;                       // scope 4 at $DIR/lifetimes.rs:+10:20: +10:23
           _21 = &(*_22);                   // scope 4 at $DIR/lifetimes.rs:+10:20: +10:23
-          _20 = core::fmt::ArgumentV1::<'_>::new_display::<Box<dyn std::fmt::Display>>(move _21) -> [return: bb3, unwind unreachable]; // scope 4 at $DIR/lifetimes.rs:+10:20: +10:23
+          _20 = core::fmt::rt::Argument::<'_>::new_display::<Box<dyn std::fmt::Display>>(move _21) -> [return: bb3, unwind unreachable]; // scope 4 at $DIR/lifetimes.rs:+10:20: +10:23
                                            // mir::Constant
                                            // + span: $DIR/lifetimes.rs:27:20: 27:23
                                            // + user_ty: UserType(4)
-                                           // + literal: Const { ty: for<'b> fn(&'b Box<dyn std::fmt::Display>) -> core::fmt::ArgumentV1<'b> {core::fmt::ArgumentV1::<'_>::new_display::<Box<dyn std::fmt::Display>>}, val: Value(<ZST>) }
+                                           // + literal: Const { ty: for<'b> fn(&'b Box<dyn std::fmt::Display>) -> core::fmt::rt::Argument<'b> {core::fmt::rt::Argument::<'_>::new_display::<Box<dyn std::fmt::Display>>}, val: Value(<ZST>) }
       }
   
       bb3: {
@@ -127,11 +127,11 @@
           StorageLive(_25);                // scope 4 at $DIR/lifetimes.rs:+10:24: +10:27
           _25 = &_6;                       // scope 4 at $DIR/lifetimes.rs:+10:24: +10:27
           _24 = &(*_25);                   // scope 4 at $DIR/lifetimes.rs:+10:24: +10:27
-          _23 = core::fmt::ArgumentV1::<'_>::new_display::<u32>(move _24) -> [return: bb4, unwind unreachable]; // scope 4 at $DIR/lifetimes.rs:+10:24: +10:27
+          _23 = core::fmt::rt::Argument::<'_>::new_display::<u32>(move _24) -> [return: bb4, unwind unreachable]; // scope 4 at $DIR/lifetimes.rs:+10:24: +10:27
                                            // mir::Constant
                                            // + span: $DIR/lifetimes.rs:27:24: 27:27
                                            // + user_ty: UserType(5)
-                                           // + literal: Const { ty: for<'b> fn(&'b u32) -> core::fmt::ArgumentV1<'b> {core::fmt::ArgumentV1::<'_>::new_display::<u32>}, val: Value(<ZST>) }
+                                           // + literal: Const { ty: for<'b> fn(&'b u32) -> core::fmt::rt::Argument<'b> {core::fmt::rt::Argument::<'_>::new_display::<u32>}, val: Value(<ZST>) }
       }
   
       bb4: {
@@ -141,13 +141,13 @@
           StorageDead(_20);                // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
           _18 = &_19;                      // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
           _17 = &(*_18);                   // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
-          _16 = move _17 as &[core::fmt::ArgumentV1<'_>] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
+          _16 = move _17 as &[core::fmt::rt::Argument<'_>] (Pointer(Unsize)); // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
           StorageDead(_17);                // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
           _11 = Arguments::<'_>::new_v1(move _12, move _16) -> [return: bb5, unwind unreachable]; // scope 4 at $SRC_DIR/std/src/macros.rs:LL:COL
                                            // mir::Constant
                                            // + span: $SRC_DIR/std/src/macros.rs:LL:COL
                                            // + user_ty: UserType(3)
-                                           // + literal: Const { ty: fn(&[&'static str], &[core::fmt::ArgumentV1<'_>]) -> Arguments<'_> {Arguments::<'_>::new_v1}, val: Value(<ZST>) }
+                                           // + literal: Const { ty: fn(&[&'static str], &[core::fmt::rt::Argument<'_>]) -> Arguments<'_> {Arguments::<'_>::new_v1}, val: Value(<ZST>) }
       }
   
       bb5: {
diff --git a/tests/run-make/inaccessible-temp-dir/Makefile b/tests/run-make/inaccessible-temp-dir/Makefile
new file mode 100644
index 00000000000..abdba4eb861
--- /dev/null
+++ b/tests/run-make/inaccessible-temp-dir/Makefile
@@ -0,0 +1,32 @@
+# only-linux
+# ignore-arm - linker error on `armhf-gnu`
+
+include ../tools.mk
+
+# Issue #66530: We would ICE if someone compiled with `-o /dev/null`,
+# because we would try to generate auxiliary files in `/dev/` (which
+# at least the OS X file system rejects).
+#
+# An attempt to `-Ztemps-dir` into a directory we cannot write into should
+# indeed be an error; but not an ICE.
+#
+# However, some folks run tests as root, which can write `/dev/` and end
+# up clobbering `/dev/null`. Instead we'll use an inaccessible path, which
+# also used to ICE, but even root can't magically write there.
+#
+# Note that `-Ztemps-dir` uses `create_dir_all` so it is not sufficient to
+# use a directory with non-existing parent like `/does-not-exist/output`.
+
+all:
+	# Create an inaccessible directory
+	mkdir $(TMPDIR)/inaccessible
+	chmod 000 $(TMPDIR)/inaccessible
+
+	# Run rustc with `-Ztemps-dir` set to a directory 
+	# *inside* the inaccessible one, so that it can't create it
+	$(RUSTC) program.rs -Ztemps-dir=$(TMPDIR)/inaccessible/tmp 2>&1 \
+		| $(CGREP) 'failed to find or create the directory specified by `--temps-dir`'
+
+	# Make the inaccessible directory accessible,
+	# so that compiletest can delete the temp dir
+	chmod +rw $(TMPDIR)/inaccessible
diff --git a/tests/run-make/inaccessible-temp-dir/program.rs b/tests/run-make/inaccessible-temp-dir/program.rs
new file mode 100644
index 00000000000..f328e4d9d04
--- /dev/null
+++ b/tests/run-make/inaccessible-temp-dir/program.rs
@@ -0,0 +1 @@
+fn main() {}
diff --git a/tests/rustdoc-ui/doc_cfg_hide.stderr b/tests/rustdoc-ui/doc_cfg_hide.stderr
index 03623368cd0..b7e8870fdf5 100644
--- a/tests/rustdoc-ui/doc_cfg_hide.stderr
+++ b/tests/rustdoc-ui/doc_cfg_hide.stderr
@@ -16,7 +16,7 @@ LL | #![deny(warnings)]
 help: to apply to the crate, use an inner attribute
    |
 LL | #![doc(cfg_hide(doc))]
-   | ~~~~~~~~~~~~~~~~~~~~~~
+   |  +
 
 error: `#[doc(cfg_hide(...)]` takes a list of attributes
   --> $DIR/doc_cfg_hide.rs:4:8
diff --git a/tests/rustdoc-ui/invalid-doc-attr.rs b/tests/rustdoc-ui/invalid-doc-attr.rs
index de004b41e27..c231e43b35c 100644
--- a/tests/rustdoc-ui/invalid-doc-attr.rs
+++ b/tests/rustdoc-ui/invalid-doc-attr.rs
@@ -5,7 +5,7 @@
 //~^ ERROR can only be applied at the crate level
 //~| WARN is being phased out
 //~| HELP to apply to the crate, use an inner attribute
-//~| SUGGESTION #![doc(test(no_crate_inject))]
+//~| SUGGESTION !
 #[doc(inline)]
 //~^ ERROR can only be applied to a `use` item
 //~| WARN is being phased out
diff --git a/tests/rustdoc-ui/invalid-doc-attr.stderr b/tests/rustdoc-ui/invalid-doc-attr.stderr
index 3c66e587b47..b23b8ded867 100644
--- a/tests/rustdoc-ui/invalid-doc-attr.stderr
+++ b/tests/rustdoc-ui/invalid-doc-attr.stderr
@@ -16,7 +16,7 @@ LL | #![deny(warnings)]
 help: to apply to the crate, use an inner attribute
    |
 LL | #![doc(test(no_crate_inject))]
-   |
+   |  +
 
 error: this attribute can only be applied to a `use` item
   --> $DIR/invalid-doc-attr.rs:9:7
diff --git a/tests/rustdoc-ui/issue-110900.rs b/tests/rustdoc-ui/issue-110900.rs
new file mode 100644
index 00000000000..e3154baf860
--- /dev/null
+++ b/tests/rustdoc-ui/issue-110900.rs
@@ -0,0 +1,28 @@
+// check-pass
+
+#![crate_type="lib"]
+#![feature(associated_type_bounds)]
+
+trait A<'a> {}
+trait B<'b> {}
+
+trait C<'c>: for<'a> A<'a> + for<'b> B<'b> {
+    type As;
+}
+
+trait E<'e> {
+    type As;
+}
+trait F<'f>: for<'a> A<'a> + for<'e> E<'e> {}
+struct G<T>
+where
+    T: for<'l, 'i> H<'l, 'i, As: for<'a> A<'a> + 'i>
+{
+    t: std::marker::PhantomData<T>,
+}
+
+trait I<'a, 'b, 'c> {
+    type As;
+}
+
+trait H<'d, 'e>: for<'f> I<'d, 'f, 'e> + 'd {}
diff --git a/tests/rustdoc-ui/unescaped_backticks.rs b/tests/rustdoc-ui/unescaped_backticks.rs
new file mode 100644
index 00000000000..f1ad7c8d4c7
--- /dev/null
+++ b/tests/rustdoc-ui/unescaped_backticks.rs
@@ -0,0 +1,342 @@
+#![deny(rustdoc::unescaped_backticks)]
+#![allow(rustdoc::broken_intra_doc_links)]
+#![allow(rustdoc::invalid_html_tags)]
+
+///
+pub fn empty() {}
+
+#[doc = ""]
+pub fn empty2() {}
+
+/// `
+//~^ ERROR unescaped backtick
+pub fn single() {}
+
+/// \`
+pub fn escaped() {}
+
+/// \\`
+//~^ ERROR unescaped backtick
+pub fn not_escaped() {}
+
+/// \\\`
+pub fn not_not_escaped() {}
+
+/// [`link1]
+//~^ ERROR unescaped backtick
+pub fn link1() {}
+
+/// [link2`]
+//~^ ERROR unescaped backtick
+pub fn link2() {}
+
+/// [`link_long](link_long)
+//~^ ERROR unescaped backtick
+pub fn link_long() {}
+
+/// [`broken-link]
+//~^ ERROR unescaped backtick
+pub fn broken_link() {}
+
+/// <xx:`>
+pub fn url() {}
+
+/// <x:`>
+//~^ ERROR unescaped backtick
+pub fn not_url() {}
+
+/// <h1>`</h1>
+pub fn html_tag() {}
+
+/// &#96;
+pub fn html_escape() {}
+
+/// 🦀`🦀
+//~^ ERROR unescaped backtick
+pub fn unicode() {}
+
+/// `foo(
+//~^ ERROR unescaped backtick
+///
+/// paragraph
+pub fn paragraph() {}
+
+/// `foo `bar`
+//~^ ERROR unescaped backtick
+///
+/// paragraph
+pub fn paragraph2() {}
+
+/// `foo(
+//~^ ERROR unescaped backtick
+/// not paragraph
+pub fn not_paragraph() {}
+
+/// Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`.
+//~^ ERROR unescaped backtick
+///
+/// You could use this function to add 42 to a number `n` (add(n, 42)`),
+/// or even to add a number `n` to 42 (`add(42, b)`)!
+//~^ ERROR unescaped backtick
+pub fn add1(a: i32, b: i32) -> i32 { a + b }
+
+/// Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`.
+//~^ ERROR unescaped backtick
+///
+/// You could use this function to add 42 to a number `n` (`add(n, 42)),
+/// or even to add a number `n` to 42 (`add(42, n)`)!
+//~^ ERROR unescaped backtick
+pub fn add2(a: i32, b: i32) -> i32 { a + b }
+
+/// Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`.
+//~^ ERROR unescaped backtick
+///
+/// You could use this function to add 42 to a number `n` (`add(n, 42)`),
+/// or even to add a number `n` to 42 (add(42, n)`)!
+//~^ ERROR unescaped backtick
+pub fn add3(a: i32, b: i32) -> i32 { a + b }
+
+/// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a).
+//~^ ERROR unescaped backtick
+///
+/// You could use this function to add 42 to a number `n` (`add(n, 42)),
+/// or even to add a number `n` to 42 (`add(42, n)`)!
+//~^ ERROR unescaped backtick
+pub fn add4(a: i32, b: i32) -> i32 { a + b }
+
+#[doc = "`"]
+//~^ ERROR unescaped backtick
+pub fn attr() {}
+
+#[doc = concat!("\\", "`")]
+pub fn attr_escaped() {}
+
+#[doc = concat!("\\\\", "`")]
+//~^ ERROR unescaped backtick
+pub fn attr_not_escaped() {}
+
+#[doc = "Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`."]
+//~^ ERROR unescaped backtick
+pub fn attr_add1(a: i32, b: i32) -> i32 { a + b }
+
+#[doc = "Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`."]
+//~^ ERROR unescaped backtick
+pub fn attr_add2(a: i32, b: i32) -> i32 { a + b }
+
+#[doc = "Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`."]
+//~^ ERROR unescaped backtick
+pub fn attr_add3(a: i32, b: i32) -> i32 { a + b }
+
+#[doc = "Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)."]
+//~^ ERROR unescaped backtick
+pub fn attr_add4(a: i32, b: i32) -> i32 { a + b }
+
+/// ``double backticks``
+/// `foo
+//~^ ERROR unescaped backtick
+pub fn double_backticks() {}
+
+/// # `(heading
+//~^ ERROR unescaped backtick
+/// ## heading2)`
+//~^ ERROR unescaped backtick
+///
+/// multi `(
+//~^ ERROR unescaped backtick
+/// line
+/// ) heading
+/// =
+///
+/// para)`(graph
+//~^ ERROR unescaped backtick
+///
+/// para)`(graph2
+//~^ ERROR unescaped backtick
+///
+/// 1. foo)`
+//~^ ERROR unescaped backtick
+/// 2. `(bar
+//~^ ERROR unescaped backtick
+/// * baz)`
+//~^ ERROR unescaped backtick
+/// * `(quux
+//~^ ERROR unescaped backtick
+///
+/// `#![this_is_actually_an_image(and(not), an = "attribute")]
+//~^ ERROR unescaped backtick
+///
+/// #![this_is_actually_an_image(and(not), an = "attribute")]`
+//~^ ERROR unescaped backtick
+///
+/// [this_is_actually_an_image(and(not), an = "attribute")]: `.png
+///
+/// | `table( | )head` |
+//~^ ERROR unescaped backtick
+//~| ERROR unescaped backtick
+/// |---------|--------|
+/// | table`( | )`body |
+//~^ ERROR unescaped backtick
+//~| ERROR unescaped backtick
+pub fn complicated_markdown() {}
+
+/// The `custom_mir` attribute tells the compiler to treat the function as being custom MIR. This
+/// attribute only works on functions - there is no way to insert custom MIR into the middle of
+/// another function. The `dialect` and `phase` parameters indicate which [version of MIR][dialect
+/// docs] you are inserting here. Generally you'll want to use `#![custom_mir(dialect = "built")]`
+/// if you want your MIR to be modified by the full MIR pipeline, or `#![custom_mir(dialect =
+//~^ ERROR unescaped backtick
+/// "runtime", phase = "optimized")] if you don't.
+pub mod mir {}
+
+pub mod rustc {
+    /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg to
+    //~^ ERROR unescaped backtick
+    /// ensure it gets used.
+    pub fn ty_error_with_message() {}
+
+    pub struct WhereClause {
+        /// `true` if we ate a `where` token: this can happen
+        /// if we parsed no predicates (e.g. `struct Foo where {}
+        /// This allows us to accurately pretty-print
+        /// in `nt_to_tokenstream`
+        //~^ ERROR unescaped backtick
+        pub has_where_token: bool,
+    }
+
+    /// A symbol is an interned or gensymed string. The use of `newtype_index!` means
+    /// that `Option<Symbol>` only takes up 4 bytes, because `newtype_index! reserves
+    //~^ ERROR unescaped backtick
+    /// the last 256 values for tagging purposes.
+    pub struct Symbol();
+
+    /// It is equivalent to `OpenOptions::new()` but allows you to write more
+    /// readable code. Instead of `OpenOptions::new().read(true).open("foo.txt")`
+    /// you can write `File::with_options().read(true).open("foo.txt"). This
+    /// also avoids the need to import `OpenOptions`.
+    //~^ ERROR unescaped backtick
+    pub fn with_options() {}
+
+    /// Subtracts `set from `row`. `set` can be either `BitSet` or
+    /// `HybridBitSet`. Has no effect if `row` does not exist.
+    //~^ ERROR unescaped backtick
+    ///
+    /// Returns true if the row was changed.
+    pub fn subtract_row() {}
+
+    pub mod assert_module_sources {
+        //! The reason that we use `cfg=...` and not `#[cfg_attr]` is so that
+        //! the HIR doesn't change as a result of the annotations, which might
+        //! perturb the reuse results.
+        //!
+        //! `#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]
+        //~^ ERROR unescaped backtick
+        //! allows for doing a more fine-grained check to see if pre- or post-lto data
+        //! was re-used.
+
+        /// `cfg=...
+        //~^ ERROR unescaped backtick
+        pub fn foo() {}
+
+        /// `cfg=... and not `#[cfg_attr]`
+        //~^ ERROR unescaped backtick
+        pub fn bar() {}
+    }
+
+    /// Conceptually, this is like a `Vec<Vec<RWU>>`. But the number of
+    /// RWU`s can get very large, so it uses a more compact representation.
+    //~^ ERROR unescaped backtick
+    pub struct RWUTable {}
+
+    /// Like [Self::canonicalize_query], but preserves distinct universes. For
+    /// example, canonicalizing `&'?0: Trait<'?1>`, where `'?0` is in `U1` and
+    /// `'?1` is in `U3` would be canonicalized to have ?0` in `U1` and `'?1`
+    /// in `U2`.
+    //~^ ERROR unescaped backtick
+    ///
+    /// This is used for Chalk integration.
+    pub fn canonicalize_query_preserving_universes() {}
+
+    /// Note that we used to return `Error` here, but that was quite
+    /// dubious -- the premise was that an error would *eventually* be
+    /// reported, when the obligation was processed. But in general once
+    /// you see an `Error` you are supposed to be able to assume that an
+    /// error *has been* reported, so that you can take whatever heuristic
+    /// paths you want to take. To make things worse, it was possible for
+    /// cycles to arise, where you basically had a setup like `<MyType<$0>
+    /// as Trait>::Foo == $0`. Here, normalizing `<MyType<$0> as
+    /// Trait>::Foo> to `[type error]` would lead to an obligation of
+    /// `<MyType<[type error]> as Trait>::Foo`. We are supposed to report
+    /// an error for this obligation, but we legitimately should not,
+    /// because it contains `[type error]`. Yuck! (See issue #29857 for
+    //~^ ERROR unescaped backtick
+    /// one case where this arose.)
+    pub fn normalize_to_error() {}
+
+    /// you don't want to cache that `B: AutoTrait` or `A: AutoTrait`
+    /// is `EvaluatedToOk`; this is because they were only considered
+    /// ok on the premise that if `A: AutoTrait` held, but we indeed
+    /// encountered a problem (later on) with `A: AutoTrait. So we
+    /// currently set a flag on the stack node for `B: AutoTrait` (as
+    /// well as the second instance of `A: AutoTrait`) to suppress
+    //~^ ERROR unescaped backtick
+    /// caching.
+    pub struct TraitObligationStack;
+
+    /// Extend `scc` so that it can outlive some placeholder region
+    /// from a universe it can't name; at present, the only way for
+    /// this to be true is if `scc` outlives `'static`. This is
+    /// actually stricter than necessary: ideally, we'd support bounds
+    /// like `for<'a: 'b`>` that might then allow us to approximate
+    /// `'a` with `'b` and not `'static`. But it will have to do for
+    //~^ ERROR unescaped backtick
+    /// now.
+    pub fn add_incompatible_universe(){}
+}
+
+/// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+/// which returns an `Option<Dispatch>`. If all [`Dispatch`] clones that point
+/// at the `Subscriber` have been dropped, [`WeakDispatch::upgrade`] will return
+/// `None`. Otherwise, it will return `Some(Dispatch)`.
+//~^ ERROR unescaped backtick
+///
+/// Returns some reference to this `[`Subscriber`] value if it is of type `T`,
+/// or `None` if it isn't.
+//~^ ERROR unescaped backtick
+///
+/// Called before the filtered [`Layer]'s [`on_event`], to determine if
+/// `on_event` should be called.
+//~^ ERROR unescaped backtick
+///
+/// Therefore, if the `Filter will change the value returned by this
+/// method, it is responsible for ensuring that
+/// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+//~^ ERROR unescaped backtick
+/// level changes.
+pub mod tracing {}
+
+macro_rules! id {
+    ($($tt:tt)*) => { $($tt)* }
+}
+
+id! {
+    /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+    //~^ ERROR unescaped backtick
+    //~| ERROR unescaped backtick
+    //~| ERROR unescaped backtick
+    //~| ERROR unescaped backtick
+    /// which returns an `Option<Dispatch>`. If all [`Dispatch`] clones that point
+    /// at the `Subscriber` have been dropped, [`WeakDispatch::upgrade`] will return
+    /// `None`. Otherwise, it will return `Some(Dispatch)`.
+    ///
+    /// Returns some reference to this `[`Subscriber`] value if it is of type `T`,
+    /// or `None` if it isn't.
+    ///
+    /// Called before the filtered [`Layer]'s [`on_event`], to determine if
+    /// `on_event` should be called.
+    ///
+    /// Therefore, if the `Filter will change the value returned by this
+    /// method, it is responsible for ensuring that
+    /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+    /// level changes.
+    pub mod tracing_macro {}
+}
diff --git a/tests/rustdoc-ui/unescaped_backticks.stderr b/tests/rustdoc-ui/unescaped_backticks.stderr
new file mode 100644
index 00000000000..e629dbc34e9
--- /dev/null
+++ b/tests/rustdoc-ui/unescaped_backticks.stderr
@@ -0,0 +1,959 @@
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:186:70
+   |
+LL | /// if you want your MIR to be modified by the full MIR pipeline, or `#![custom_mir(dialect =
+   |                                                                      ^
+   |
+note: the lint level is defined here
+  --> $DIR/unescaped_backticks.rs:1:9
+   |
+LL | #![deny(rustdoc::unescaped_backticks)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// "runtime", phase = "optimized")]` if you don't.
+   |                                     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// if you want your MIR to be modified by the full MIR pipeline, or \`#![custom_mir(dialect =
+   |                                                                      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:231:13
+   |
+LL |         //! `#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]
+   |             ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL |         //! `#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]`
+   |                                                                                         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |         //! \`#![rustc_expected_cgu_reuse(module="spike", cfg="rpass2", kind="post-lto")]
+   |             +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:236:13
+   |
+LL |         /// `cfg=...
+   |             ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL |         /// `cfg=...`
+   |                     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |         /// \`cfg=...
+   |             +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:240:42
+   |
+LL |         /// `cfg=... and not `#[cfg_attr]`
+   |                                          ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |         /// `cfg=...` and not `#[cfg_attr]`
+   |                     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |         /// `cfg=... and not `#[cfg_attr]\`
+   |                                          +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:192:91
+   |
+LL |     /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg to
+   |                                                                                           ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL |     /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given `msg` to
+   |                                                                                               +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// Constructs a `TyKind::Error` type and registers a `delay_span_bug` with the given \`msg to
+   |                                                                                           +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:201:34
+   |
+LL |         /// in `nt_to_tokenstream`
+   |                                  ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |         /// if we parsed no predicates (e.g. `struct` Foo where {}
+   |                                                     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |         /// in `nt_to_tokenstream\`
+   |                                  +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:207:62
+   |
+LL |     /// that `Option<Symbol>` only takes up 4 bytes, because `newtype_index! reserves
+   |                                                              ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL |     /// that `Option<Symbol>` only takes up 4 bytes, because `newtype_index!` reserves
+   |                                                                             +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// that `Option<Symbol>` only takes up 4 bytes, because \`newtype_index! reserves
+   |                                                              +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:215:52
+   |
+LL |     /// also avoids the need to import `OpenOptions`.
+   |                                                    ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |     /// you can write `File::with_options().read(true).open("foo.txt")`. This
+   |                                                                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// also avoids the need to import `OpenOptions\`.
+   |                                                    +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:220:46
+   |
+LL |     /// `HybridBitSet`. Has no effect if `row` does not exist.
+   |                                              ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |     /// Subtracts `set` from `row`. `set` can be either `BitSet` or
+   |                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// `HybridBitSet`. Has no effect if `row\` does not exist.
+   |                                              +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:246:12
+   |
+LL |     /// RWU`s can get very large, so it uses a more compact representation.
+   |            ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL |     /// `RWU`s can get very large, so it uses a more compact representation.
+   |         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// RWU\`s can get very large, so it uses a more compact representation.
+   |            +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:253:15
+   |
+LL |     /// in `U2`.
+   |               ^
+   |
+help: the opening backtick of a previous inline code may be missing
+   |
+LL |     /// `'?1` is in `U3` would be canonicalized to have `?0` in `U1` and `'?1`
+   |                                                         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// in `U2\`.
+   |               +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:270:42
+   |
+LL |     /// because it contains `[type error]`. Yuck! (See issue #29857 for
+   |                                          ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |     /// as Trait>::Foo == $0`. Here, normalizing `<MyType<$0>` as
+   |                                                              +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// because it contains `[type error]\`. Yuck! (See issue #29857 for
+   |                                          +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:280:53
+   |
+LL |     /// well as the second instance of `A: AutoTrait`) to suppress
+   |                                                     ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL |     /// encountered a problem (later on) with `A:` AutoTrait. So we
+   |                                                  +
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// well as the second instance of `A: AutoTrait\`) to suppress
+   |                                                     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:290:40
+   |
+LL |     /// `'a` with `'b` and not `'static`. But it will have to do for
+   |                                        ^
+   |
+   = help: the opening or closing backtick of an inline code may be missing
+help: if you meant to use a literal backtick, escape it
+   |
+LL |     /// `'a` with `'b` and not `'static\`. But it will have to do for
+   |                                        +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:299:54
+   |
+LL | /// `None`. Otherwise, it will return `Some(Dispatch)`.
+   |                                                      ^
+   |
+help: the opening backtick of a previous inline code may be missing
+   |
+LL | /// The `Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+   |         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// `None`. Otherwise, it will return `Some(Dispatch)\`.
+   |                                                      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:303:13
+   |
+LL | /// or `None` if it isn't.
+   |             ^
+   |
+   = help: the opening or closing backtick of an inline code may be missing
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// or `None\` if it isn't.
+   |             +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:307:14
+   |
+LL | /// `on_event` should be called.
+   |              ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// Called before the filtered [`Layer`]'s [`on_event`], to determine if
+   |                                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// `on_event\` should be called.
+   |              +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:312:29
+   |
+LL | /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+   |                             ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// Therefore, if the `Filter` will change the value returned by this
+   |                              +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// [`rebuild_interest_cache\`][rebuild] is called after the value of the max
+   |                             +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:322:5
+   |
+LL | /     /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+LL | |
+LL | |
+LL | |
+...  |
+LL | |     /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+LL | |     /// level changes.
+   | |______________________^
+   |
+   = help: the opening backtick of a previous inline code may be missing
+            change: The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+           to this: The `Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+   = help: if you meant to use a literal backtick, escape it
+            change: `None`. Otherwise, it will return `Some(Dispatch)`.
+           to this: `None`. Otherwise, it will return `Some(Dispatch)\`.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:322:5
+   |
+LL | /     /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+LL | |
+LL | |
+LL | |
+...  |
+LL | |     /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+LL | |     /// level changes.
+   | |______________________^
+   |
+   = help: the opening or closing backtick of an inline code may be missing
+   = help: if you meant to use a literal backtick, escape it
+            change: or `None` if it isn't.
+           to this: or `None\` if it isn't.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:322:5
+   |
+LL | /     /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+LL | |
+LL | |
+LL | |
+...  |
+LL | |     /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+LL | |     /// level changes.
+   | |______________________^
+   |
+   = help: a previous inline code might be longer than expected
+            change: Called before the filtered [`Layer]'s [`on_event`], to determine if
+           to this: Called before the filtered [`Layer`]'s [`on_event`], to determine if
+   = help: if you meant to use a literal backtick, escape it
+            change: `on_event` should be called.
+           to this: `on_event\` should be called.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:322:5
+   |
+LL | /     /// The Subscriber` may be accessed by calling [`WeakDispatch::upgrade`],
+LL | |
+LL | |
+LL | |
+...  |
+LL | |     /// [`rebuild_interest_cache`][rebuild] is called after the value of the max
+LL | |     /// level changes.
+   | |______________________^
+   |
+   = help: a previous inline code might be longer than expected
+            change: Therefore, if the `Filter will change the value returned by this
+           to this: Therefore, if the `Filter` will change the value returned by this
+   = help: if you meant to use a literal backtick, escape it
+            change: [`rebuild_interest_cache`][rebuild] is called after the value of the max
+           to this: [`rebuild_interest_cache\`][rebuild] is called after the value of the max
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:11:5
+   |
+LL | /// `
+   |     ^
+   |
+   = help: the opening or closing backtick of an inline code may be missing
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \`
+   |     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:18:7
+   |
+LL | /// \`
+   |       ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `\`
+   |     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \\`
+   |       +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:25:6
+   |
+LL | /// [`link1]
+   |      ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// [`link1`]
+   |            +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// [\`link1]
+   |      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:29:11
+   |
+LL | /// [link2`]
+   |           ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// [`link2`]
+   |      +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// [link2\`]
+   |           +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:33:6
+   |
+LL | /// [`link_long](link_long)
+   |      ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// [`link_long`](link_long)
+   |                +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// [\`link_long](link_long)
+   |      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:37:6
+   |
+LL | /// [`broken-link]
+   |      ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// [`broken-link`]
+   |                  +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// [\`broken-link]
+   |      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:44:8
+   |
+LL | /// <x:`>
+   |        ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `<x:`>
+   |     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// <x:\`>
+   |        +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:54:6
+   |
+LL | /// 🦀`🦀
+   |       ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `🦀`🦀
+   |     +
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// 🦀`🦀`
+   |          +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// 🦀\`🦀
+   |       +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:58:5
+   |
+LL | /// `foo(
+   |     ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// `foo(`
+   |          +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \`foo(
+   |     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:64:14
+   |
+LL | /// `foo `bar`
+   |              ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// `foo` `bar`
+   |         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// `foo `bar\`
+   |              +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:70:5
+   |
+LL | /// `foo(
+   |     ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// not paragraph`
+   |                  +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \`foo(
+   |     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:75:83
+   |
+LL | /// Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`.
+   |                                                                                   ^
+   |
+help: the opening backtick of a previous inline code may be missing
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   |                                               +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// Addition is commutative, which means that add(a, b)` is the same as `add(b, a)\`.
+   |                                                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:79:51
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, b)`)!
+   |                                                   ^
+   |
+help: the opening backtick of a previous inline code may be missing
+   |
+LL | /// You could use this function to add 42 to a number `n` (`add(n, 42)`),
+   |                                                            +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, b)\`)!
+   |                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:83:83
+   |
+LL | /// Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`.
+   |                                                                                   ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   |                                                         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// Addition is commutative, which means that `add(a, b) is the same as `add(b, a)\`.
+   |                                                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:87:51
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, n)`)!
+   |                                                   ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// You could use this function to add 42 to a number `n` (`add(n, 42)`),
+   |                                                                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, n)\`)!
+   |                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:91:83
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`.
+   |                                                                                   ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   |                                                                          +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as add(b, a)\`.
+   |                                                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:95:50
+   |
+LL | /// or even to add a number `n` to 42 (add(42, n)`)!
+   |                                                  ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, n)`)!
+   |                                        +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// or even to add a number `n` to 42 (add(42, n)\`)!
+   |                                                  +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:99:74
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a).
+   |                                                                          ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   |                                                                                    +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// Addition is commutative, which means that `add(a, b)` is the same as \`add(b, a).
+   |                                                                          +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:103:51
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, n)`)!
+   |                                                   ^
+   |
+help: a previous inline code might be longer than expected
+   |
+LL | /// You could use this function to add 42 to a number `n` (`add(n, 42)`),
+   |                                                                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// or even to add a number `n` to 42 (`add(42, n)\`)!
+   |                                                   +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:107:1
+   |
+LL | #[doc = "`"]
+   | ^^^^^^^^^^^^
+   |
+   = help: the opening or closing backtick of an inline code may be missing
+   = help: if you meant to use a literal backtick, escape it
+            change: `
+           to this: \`
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:114:1
+   |
+LL | #[doc = concat!("\\", "`")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: the opening backtick of an inline code may be missing
+            change: \`
+           to this: `\`
+   = help: if you meant to use a literal backtick, escape it
+            change: \`
+           to this: \\`
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:118:1
+   |
+LL | #[doc = "Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`."]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: the opening backtick of a previous inline code may be missing
+            change: Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`.
+           to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   = help: if you meant to use a literal backtick, escape it
+            change: Addition is commutative, which means that add(a, b)` is the same as `add(b, a)`.
+           to this: Addition is commutative, which means that add(a, b)` is the same as `add(b, a)\`.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:122:1
+   |
+LL | #[doc = "Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`."]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: a previous inline code might be longer than expected
+            change: Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`.
+           to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   = help: if you meant to use a literal backtick, escape it
+            change: Addition is commutative, which means that `add(a, b) is the same as `add(b, a)`.
+           to this: Addition is commutative, which means that `add(a, b) is the same as `add(b, a)\`.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:126:1
+   |
+LL | #[doc = "Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`."]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: the opening backtick of an inline code may be missing
+            change: Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`.
+           to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   = help: if you meant to use a literal backtick, escape it
+            change: Addition is commutative, which means that `add(a, b)` is the same as add(b, a)`.
+           to this: Addition is commutative, which means that `add(a, b)` is the same as add(b, a)\`.
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:130:1
+   |
+LL | #[doc = "Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)."]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: the closing backtick of an inline code may be missing
+            change: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a).
+           to this: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a)`.
+   = help: if you meant to use a literal backtick, escape it
+            change: Addition is commutative, which means that `add(a, b)` is the same as `add(b, a).
+           to this: Addition is commutative, which means that `add(a, b)` is the same as \`add(b, a).
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:135:5
+   |
+LL | /// `foo
+   |     ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// `foo`
+   |         +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \`foo
+   |     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:139:7
+   |
+LL | /// # `(heading
+   |       ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// # `(heading`
+   |                +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// # \`(heading
+   |       +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:141:17
+   |
+LL | /// ## heading2)`
+   |                 ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// ## `heading2)`
+   |        +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// ## heading2)\`
+   |                 +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:144:11
+   |
+LL | /// multi `(
+   |           ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// )` heading
+   |      +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// multi \`(
+   |           +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:150:10
+   |
+LL | /// para)`(graph
+   |          ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `para)`(graph
+   |     +
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// para)`(graph`
+   |                 +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// para)\`(graph
+   |          +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:153:10
+   |
+LL | /// para)`(graph2
+   |          ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `para)`(graph2
+   |     +
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// para)`(graph2`
+   |                  +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// para)\`(graph2
+   |          +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:156:12
+   |
+LL | /// 1. foo)`
+   |            ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// 1. `foo)`
+   |        +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// 1. foo)\`
+   |            +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:158:8
+   |
+LL | /// 2. `(bar
+   |        ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// 2. `(bar`
+   |             +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// 2. \`(bar
+   |        +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:160:11
+   |
+LL | /// * baz)`
+   |           ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// * `baz)`
+   |       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// * baz)\`
+   |           +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:162:7
+   |
+LL | /// * `(quux
+   |       ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// * `(quux`
+   |             +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// * \`(quux
+   |       +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:165:5
+   |
+LL | /// `#![this_is_actually_an_image(and(not), an = "attribute")]
+   |     ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// `#`![this_is_actually_an_image(and(not), an = "attribute")]
+   |       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// \`#![this_is_actually_an_image(and(not), an = "attribute")]
+   |     +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:168:62
+   |
+LL | /// #![this_is_actually_an_image(and(not), an = "attribute")]`
+   |                                                              ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// `#![this_is_actually_an_image(and(not), an = "attribute")]`
+   |     +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// #![this_is_actually_an_image(and(not), an = "attribute")]\`
+   |                                                              +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:173:7
+   |
+LL | /// | `table( | )head` |
+   |       ^
+   |
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// | `table(` | )head` |
+   |              +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// | \`table( | )head` |
+   |       +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:173:22
+   |
+LL | /// | `table( | )head` |
+   |                      ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// | `table( | `)head` |
+   |                 +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// | `table( | )head\` |
+   |                      +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:177:12
+   |
+LL | /// | table`( | )`body |
+   |            ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// | `table`( | )`body |
+   |       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// | table\`( | )`body |
+   |            +
+
+error: unescaped backtick
+  --> $DIR/unescaped_backticks.rs:177:18
+   |
+LL | /// | table`( | )`body |
+   |                  ^
+   |
+help: the opening backtick of an inline code may be missing
+   |
+LL | /// | table`( | `)`body |
+   |                 +
+help: the closing backtick of an inline code may be missing
+   |
+LL | /// | table`( | )`body` |
+   |                       +
+help: if you meant to use a literal backtick, escape it
+   |
+LL | /// | table`( | )\`body |
+   |                  +
+
+error: aborting due to 63 previous errors
+
diff --git a/tests/rustdoc/deref-const-fn.rs b/tests/rustdoc/deref/deref-const-fn.rs
index 8ecca6d12d2..8ecca6d12d2 100644
--- a/tests/rustdoc/deref-const-fn.rs
+++ b/tests/rustdoc/deref/deref-const-fn.rs
diff --git a/tests/rustdoc/deref/deref-multiple-impl-blocks.rs b/tests/rustdoc/deref/deref-multiple-impl-blocks.rs
new file mode 100644
index 00000000000..fa3607c5fc1
--- /dev/null
+++ b/tests/rustdoc/deref/deref-multiple-impl-blocks.rs
@@ -0,0 +1,43 @@
+#![crate_name="foo"]
+
+use std::ops::{Deref, DerefMut};
+
+// @has foo/struct.Vec.html
+// @count - '//h2[@id="deref-methods-Slice"]' 1
+// @count - '//div[@id="deref-methods-Slice-1"]' 1
+// @count - '//div[@id="deref-methods-Slice-1"][@class="impl-items"]' 1
+// @count - '//div[@id="deref-methods-Slice-1"]/div[@class="impl-items"]' 0
+pub struct Vec;
+
+pub struct Slice;
+
+impl Deref for Vec {
+    type Target = Slice;
+    fn deref(&self) -> &Slice {
+        &Slice
+    }
+}
+
+impl DerefMut for Vec {
+    fn deref_mut(&mut self) -> &mut Slice {
+        &mut Slice
+    }
+}
+
+impl Slice {
+    pub fn sort_floats(&mut self) {
+        todo!();
+    }
+}
+
+impl Slice {
+    pub fn sort(&mut self) {
+        todo!();
+    }
+}
+
+impl Slice {
+    pub fn len(&self) {
+        todo!();
+    }
+}
diff --git a/tests/rustdoc/deref-mut-methods.rs b/tests/rustdoc/deref/deref-mut-methods.rs
index fdf8434224f..fdf8434224f 100644
--- a/tests/rustdoc/deref-mut-methods.rs
+++ b/tests/rustdoc/deref/deref-mut-methods.rs
diff --git a/tests/rustdoc/deref-recursive-pathbuf.rs b/tests/rustdoc/deref/deref-recursive-pathbuf.rs
index be2b42b5ac6..be2b42b5ac6 100644
--- a/tests/rustdoc/deref-recursive-pathbuf.rs
+++ b/tests/rustdoc/deref/deref-recursive-pathbuf.rs
diff --git a/tests/rustdoc/deref-recursive.rs b/tests/rustdoc/deref/deref-recursive.rs
index 0436f2f86f5..0436f2f86f5 100644
--- a/tests/rustdoc/deref-recursive.rs
+++ b/tests/rustdoc/deref/deref-recursive.rs
diff --git a/tests/rustdoc/deref-slice-core.rs b/tests/rustdoc/deref/deref-slice-core.rs
index cccf273a820..cccf273a820 100644
--- a/tests/rustdoc/deref-slice-core.rs
+++ b/tests/rustdoc/deref/deref-slice-core.rs
diff --git a/tests/rustdoc/deref-to-primitive.rs b/tests/rustdoc/deref/deref-to-primitive.rs
index 527de780d48..527de780d48 100644
--- a/tests/rustdoc/deref-to-primitive.rs
+++ b/tests/rustdoc/deref/deref-to-primitive.rs
diff --git a/tests/rustdoc/deref-typedef.rs b/tests/rustdoc/deref/deref-typedef.rs
index 32424d13eb8..32424d13eb8 100644
--- a/tests/rustdoc/deref-typedef.rs
+++ b/tests/rustdoc/deref/deref-typedef.rs
diff --git a/tests/rustdoc/escape-deref-methods.rs b/tests/rustdoc/deref/escape-deref-methods.rs
index 66919d73eeb..66919d73eeb 100644
--- a/tests/rustdoc/escape-deref-methods.rs
+++ b/tests/rustdoc/deref/escape-deref-methods.rs
diff --git a/tests/rustdoc/issue-100679-sidebar-links-deref.rs b/tests/rustdoc/deref/issue-100679-sidebar-links-deref.rs
index f09d2320609..f09d2320609 100644
--- a/tests/rustdoc/issue-100679-sidebar-links-deref.rs
+++ b/tests/rustdoc/deref/issue-100679-sidebar-links-deref.rs
diff --git a/tests/rustdoc/recursive-deref-sidebar.rs b/tests/rustdoc/deref/recursive-deref-sidebar.rs
index 619f40eff89..619f40eff89 100644
--- a/tests/rustdoc/recursive-deref-sidebar.rs
+++ b/tests/rustdoc/deref/recursive-deref-sidebar.rs
diff --git a/tests/rustdoc/recursive-deref.rs b/tests/rustdoc/deref/recursive-deref.rs
index aa38485c445..aa38485c445 100644
--- a/tests/rustdoc/recursive-deref.rs
+++ b/tests/rustdoc/deref/recursive-deref.rs
diff --git a/tests/rustdoc/inline_cross/auxiliary/repr.rs b/tests/rustdoc/inline_cross/auxiliary/repr.rs
new file mode 100644
index 00000000000..64a98f18146
--- /dev/null
+++ b/tests/rustdoc/inline_cross/auxiliary/repr.rs
@@ -0,0 +1,4 @@
+#[repr(C)]
+pub struct Foo {
+    field: u8,
+}
diff --git a/tests/rustdoc/inline_cross/repr.rs b/tests/rustdoc/inline_cross/repr.rs
new file mode 100644
index 00000000000..7e1f2799af1
--- /dev/null
+++ b/tests/rustdoc/inline_cross/repr.rs
@@ -0,0 +1,13 @@
+// Regression test for <https://github.com/rust-lang/rust/issues/110698>.
+// This test ensures that the re-exported items still have the `#[repr(...)]` attribute.
+
+// aux-build:repr.rs
+
+#![crate_name = "foo"]
+
+extern crate repr;
+
+// @has 'foo/struct.Foo.html'
+// @has - '//*[@class="rust item-decl"]//*[@class="code-attribute"]' '#[repr(C)]'
+#[doc(inline)]
+pub use repr::Foo;
diff --git a/tests/rustdoc/issue-106142.rs b/tests/rustdoc/issue-106142.rs
new file mode 100644
index 00000000000..41505e72405
--- /dev/null
+++ b/tests/rustdoc/issue-106142.rs
@@ -0,0 +1,14 @@
+// @has 'issue_106142/a/index.html'
+// @count 'issue_106142/a/index.html' '//ul[@class="item-table"]//li//a' 1
+
+#![allow(rustdoc::broken_intra_doc_links)]
+
+pub mod a {
+    /// [`m`]
+    pub fn f() {}
+
+    #[macro_export]
+    macro_rules! m {
+        () => {};
+    }
+}
diff --git a/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout b/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
index eaf3e4b61e3..c0fbb0204b3 100644
--- a/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
+++ b/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
@@ -2,38 +2,34 @@ print-type-size type: `[async fn body@$DIR/async-awaiting-fut.rs:21:21: 24:2]`:
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 0 bytes
 print-type-size     variant `Suspend0`: 3077 bytes
-print-type-size         local `.__awaitee`: 3077 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         local `.__awaitee`: 3077 bytes
 print-type-size     variant `Returned`: 0 bytes
 print-type-size     variant `Panicked`: 0 bytes
 print-type-size type: `[async fn body@$DIR/async-awaiting-fut.rs:10:64: 19:2]`: 3077 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
-print-type-size     variant `Unresumed`: 2051 bytes
-print-type-size         padding: 1026 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size     variant `Unresumed`: 1025 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
 print-type-size     variant `Suspend0`: 2052 bytes
-print-type-size         local `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
-print-type-size         local `..generator_field4`: 1 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
 print-type-size         padding: 1 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size         local `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size         local `..generator_field4`: 1 bytes
 print-type-size         local `.__awaitee`: 1 bytes
 print-type-size     variant `Suspend1`: 3076 bytes
-print-type-size         padding: 1024 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         padding: 1026 bytes
 print-type-size         local `..generator_field4`: 1 bytes, alignment: 1 bytes
-print-type-size         padding: 1 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
 print-type-size         local `.__awaitee`: 1025 bytes
 print-type-size     variant `Suspend2`: 2052 bytes
-print-type-size         local `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
-print-type-size         local `..generator_field4`: 1 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
 print-type-size         padding: 1 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size         local `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size         local `..generator_field4`: 1 bytes
 print-type-size         local `.__awaitee`: 1 bytes
-print-type-size     variant `Returned`: 2051 bytes
-print-type-size         padding: 1026 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
-print-type-size     variant `Panicked`: 2051 bytes
-print-type-size         padding: 1026 bytes
-print-type-size         upvar `.fut`: 1025 bytes, alignment: 1 bytes
+print-type-size     variant `Returned`: 1025 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size     variant `Panicked`: 1025 bytes
+print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
 print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/async-awaiting-fut.rs:10:64: 19:2]>`: 3077 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 3077 bytes
 print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/async-awaiting-fut.rs:10:64: 19:2]>`: 3077 bytes, alignment: 1 bytes
@@ -43,11 +39,11 @@ print-type-size         field `.value`: 3077 bytes
 print-type-size type: `[async fn body@$DIR/async-awaiting-fut.rs:8:35: 8:37]`: 1025 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 1024 bytes
-print-type-size         upvar `.arg`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 1024 bytes
 print-type-size     variant `Returned`: 1024 bytes
-print-type-size         upvar `.arg`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 1024 bytes
 print-type-size     variant `Panicked`: 1024 bytes
-print-type-size         upvar `.arg`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 1024 bytes
 print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/async-awaiting-fut.rs:8:35: 8:37]>`: 1025 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 1025 bytes
 print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/async-awaiting-fut.rs:8:35: 8:37]>`: 1025 bytes, alignment: 1 bytes
diff --git a/tests/ui/async-await/future-sizes/large-arg.stdout b/tests/ui/async-await/future-sizes/large-arg.stdout
index 91db4b1531f..b5e95ddd710 100644
--- a/tests/ui/async-await/future-sizes/large-arg.stdout
+++ b/tests/ui/async-await/future-sizes/large-arg.stdout
@@ -2,20 +2,20 @@ print-type-size type: `[async fn body@$DIR/large-arg.rs:6:21: 8:2]`: 3076 bytes,
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 0 bytes
 print-type-size     variant `Suspend0`: 3075 bytes
-print-type-size         local `.__awaitee`: 3075 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         local `.__awaitee`: 3075 bytes
 print-type-size     variant `Returned`: 0 bytes
 print-type-size     variant `Panicked`: 0 bytes
 print-type-size type: `[async fn body@$DIR/large-arg.rs:10:30: 12:2]`: 3075 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Suspend0`: 3074 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size         local `.__awaitee`: 2050 bytes
 print-type-size     variant `Returned`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Panicked`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/large-arg.rs:10:30: 12:2]>`: 3075 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 3075 bytes
 print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/large-arg.rs:10:30: 12:2]>`: 3075 bytes, alignment: 1 bytes
@@ -25,14 +25,14 @@ print-type-size         field `.value`: 3075 bytes
 print-type-size type: `[async fn body@$DIR/large-arg.rs:13:26: 15:2]`: 2050 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Suspend0`: 2049 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size         local `.__awaitee`: 1025 bytes
 print-type-size     variant `Returned`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Panicked`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/large-arg.rs:13:26: 15:2]>`: 2050 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 2050 bytes
 print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/large-arg.rs:13:26: 15:2]>`: 2050 bytes, alignment: 1 bytes
@@ -42,11 +42,11 @@ print-type-size         field `.value`: 2050 bytes
 print-type-size type: `[async fn body@$DIR/large-arg.rs:16:26: 18:2]`: 1025 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Returned`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size     variant `Panicked`: 1024 bytes
-print-type-size         upvar `.t`: 1024 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.t`: 1024 bytes
 print-type-size type: `std::mem::ManuallyDrop<[async fn body@$DIR/large-arg.rs:16:26: 18:2]>`: 1025 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 1025 bytes
 print-type-size type: `std::mem::MaybeUninit<[async fn body@$DIR/large-arg.rs:16:26: 18:2]>`: 1025 bytes, alignment: 1 bytes
diff --git a/tests/ui/async-await/in-trait/nested-rpit.rs b/tests/ui/async-await/in-trait/nested-rpit.rs
index 41d72ebb4d4..9cdc23bbc78 100644
--- a/tests/ui/async-await/in-trait/nested-rpit.rs
+++ b/tests/ui/async-await/in-trait/nested-rpit.rs
@@ -1,7 +1,5 @@
 // edition: 2021
-// known-bug: #105197
-// failure-status:101
-// dont-check-compiler-stderr
+// check-pass
 
 #![feature(async_fn_in_trait)]
 #![feature(return_position_impl_trait_in_trait)]
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-early.rs b/tests/ui/async-await/return-type-notation/issue-110963-early.rs
new file mode 100644
index 00000000000..0ecbca5c13b
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/issue-110963-early.rs
@@ -0,0 +1,48 @@
+// edition: 2021
+// known-bug: #110963
+
+#![feature(return_type_notation)]
+#![feature(async_fn_in_trait)]
+
+trait HealthCheck {
+    async fn check<'a: 'a>(&'a mut self) -> bool;
+}
+
+async fn do_health_check_par<HC>(hc: HC)
+where
+    HC: HealthCheck<check(): Send> + Send + 'static,
+{
+    spawn(async move {
+        let mut hc = hc;
+        if !hc.check().await {
+            log_health_check_failure().await;
+        }
+    });
+}
+
+async fn log_health_check_failure() {}
+
+fn main() {}
+
+// Fake tokio spawn
+
+use std::future::Future;
+use std::pin::Pin;
+use std::task::{Context, Poll};
+
+fn spawn<F>(future: F) -> JoinHandle
+where
+    F: Future + Send + 'static,
+    F::Output: Send + 'static,
+{
+    loop {}
+}
+
+struct JoinHandle;
+
+impl Future for JoinHandle {
+    type Output = ();
+    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
+        loop {}
+    }
+}
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-early.stderr b/tests/ui/async-await/return-type-notation/issue-110963-early.stderr
new file mode 100644
index 00000000000..b4a3924d8da
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/issue-110963-early.stderr
@@ -0,0 +1,45 @@
+warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-110963-early.rs:4:12
+   |
+LL | #![feature(return_type_notation)]
+   |            ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-110963-early.rs:5:12
+   |
+LL | #![feature(async_fn_in_trait)]
+   |            ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
+
+error: higher-ranked lifetime error
+  --> $DIR/issue-110963-early.rs:15:5
+   |
+LL | /     spawn(async move {
+LL | |         let mut hc = hc;
+LL | |         if !hc.check().await {
+LL | |             log_health_check_failure().await;
+LL | |         }
+LL | |     });
+   | |______^
+   |
+   = note: could not prove `[async block@$DIR/issue-110963-early.rs:15:11: 20:6]: Send`
+
+error: higher-ranked lifetime error
+  --> $DIR/issue-110963-early.rs:15:5
+   |
+LL | /     spawn(async move {
+LL | |         let mut hc = hc;
+LL | |         if !hc.check().await {
+LL | |             log_health_check_failure().await;
+LL | |         }
+LL | |     });
+   | |______^
+   |
+   = note: could not prove `[async block@$DIR/issue-110963-early.rs:15:11: 20:6]: Send`
+
+error: aborting due to 2 previous errors; 2 warnings emitted
+
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-late.rs b/tests/ui/async-await/return-type-notation/issue-110963-late.rs
new file mode 100644
index 00000000000..2a35922eaa1
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/issue-110963-late.rs
@@ -0,0 +1,50 @@
+// edition: 2021
+// check-pass
+
+#![feature(return_type_notation)]
+//~^ WARN the feature `return_type_notation` is incomplete
+#![feature(async_fn_in_trait)]
+//~^ WARN the feature `async_fn_in_trait` is incomplete
+
+trait HealthCheck {
+    async fn check(&mut self) -> bool;
+}
+
+async fn do_health_check_par<HC>(hc: HC)
+where
+    HC: HealthCheck<check(): Send> + Send + 'static,
+{
+    spawn(async move {
+        let mut hc = hc;
+        if !hc.check().await {
+            log_health_check_failure().await;
+        }
+    });
+}
+
+async fn log_health_check_failure() {}
+
+fn main() {}
+
+// Fake tokio spawn
+
+use std::future::Future;
+use std::pin::Pin;
+use std::task::{Context, Poll};
+
+fn spawn<F>(future: F) -> JoinHandle
+where
+    F: Future + Send + 'static,
+    F::Output: Send + 'static,
+{
+    loop {}
+}
+
+struct JoinHandle;
+
+impl Future for JoinHandle {
+    type Output = ();
+    fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
+        loop {}
+    }
+}
diff --git a/tests/ui/async-await/return-type-notation/issue-110963-late.stderr b/tests/ui/async-await/return-type-notation/issue-110963-late.stderr
new file mode 100644
index 00000000000..36ef3ad0a4c
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/issue-110963-late.stderr
@@ -0,0 +1,19 @@
+warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-110963-late.rs:4:12
+   |
+LL | #![feature(return_type_notation)]
+   |            ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/issue-110963-late.rs:6:12
+   |
+LL | #![feature(async_fn_in_trait)]
+   |            ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/attributes/invalid-doc-attr.rs b/tests/ui/attributes/invalid-doc-attr.rs
index de004b41e27..c231e43b35c 100644
--- a/tests/ui/attributes/invalid-doc-attr.rs
+++ b/tests/ui/attributes/invalid-doc-attr.rs
@@ -5,7 +5,7 @@
 //~^ ERROR can only be applied at the crate level
 //~| WARN is being phased out
 //~| HELP to apply to the crate, use an inner attribute
-//~| SUGGESTION #![doc(test(no_crate_inject))]
+//~| SUGGESTION !
 #[doc(inline)]
 //~^ ERROR can only be applied to a `use` item
 //~| WARN is being phased out
diff --git a/tests/ui/attributes/invalid-doc-attr.stderr b/tests/ui/attributes/invalid-doc-attr.stderr
index 3c66e587b47..b23b8ded867 100644
--- a/tests/ui/attributes/invalid-doc-attr.stderr
+++ b/tests/ui/attributes/invalid-doc-attr.stderr
@@ -16,7 +16,7 @@ LL | #![deny(warnings)]
 help: to apply to the crate, use an inner attribute
    |
 LL | #![doc(test(no_crate_inject))]
-   |
+   |  +
 
 error: this attribute can only be applied to a `use` item
   --> $DIR/invalid-doc-attr.rs:9:7
diff --git a/tests/ui/attributes/invalid_macro_export_argument.deny.stderr b/tests/ui/attributes/invalid_macro_export_argument.deny.stderr
new file mode 100644
index 00000000000..644acc27b58
--- /dev/null
+++ b/tests/ui/attributes/invalid_macro_export_argument.deny.stderr
@@ -0,0 +1,20 @@
+error: `#[macro_export]` can only take 1 or 0 arguments
+  --> $DIR/invalid_macro_export_argument.rs:7:1
+   |
+LL | #[macro_export(hello, world)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/invalid_macro_export_argument.rs:4:24
+   |
+LL | #![cfg_attr(deny, deny(invalid_macro_export_arguments))]
+   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: `not_local_inner_macros` isn't a valid `#[macro_export]` argument
+  --> $DIR/invalid_macro_export_argument.rs:13:16
+   |
+LL | #[macro_export(not_local_inner_macros)]
+   |                ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/attributes/invalid_macro_export_argument.rs b/tests/ui/attributes/invalid_macro_export_argument.rs
index 85d009f11a6..a0ed5fd1c8f 100644
--- a/tests/ui/attributes/invalid_macro_export_argument.rs
+++ b/tests/ui/attributes/invalid_macro_export_argument.rs
@@ -1,10 +1,17 @@
-// check-pass
-#[macro_export(hello, world)] //~ WARN `#[macro_export]` can only take 1 or 0 arguments
+// revisions: deny allow
+//[allow] check-pass
+
+#![cfg_attr(deny, deny(invalid_macro_export_arguments))]
+#![cfg_attr(allow, allow(invalid_macro_export_arguments))]
+
+#[macro_export(hello, world)]
+//[deny]~^ ERROR `#[macro_export]` can only take 1 or 0 arguments
 macro_rules! a {
     () => ()
 }
 
-#[macro_export(not_local_inner_macros)] //~ WARN `not_local_inner_macros` isn't a valid `#[macro_export]` argument
+#[macro_export(not_local_inner_macros)]
+//[deny]~^ ERROR `not_local_inner_macros` isn't a valid `#[macro_export]` argument
 macro_rules! b {
     () => ()
 }
diff --git a/tests/ui/attributes/invalid_macro_export_argument.stderr b/tests/ui/attributes/invalid_macro_export_argument.stderr
deleted file mode 100644
index a4e17642c2a..00000000000
--- a/tests/ui/attributes/invalid_macro_export_argument.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-warning: `#[macro_export]` can only take 1 or 0 arguments
-  --> $DIR/invalid_macro_export_argument.rs:2:1
-   |
-LL | #[macro_export(hello, world)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(invalid_macro_export_arguments)]` on by default
-
-warning: `not_local_inner_macros` isn't a valid `#[macro_export]` argument
-  --> $DIR/invalid_macro_export_argument.rs:7:16
-   |
-LL | #[macro_export(not_local_inner_macros)]
-   |                ^^^^^^^^^^^^^^^^^^^^^^
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui/binop/eq-arr.rs b/tests/ui/binop/eq-arr.rs
new file mode 100644
index 00000000000..a77c4c5aabc
--- /dev/null
+++ b/tests/ui/binop/eq-arr.rs
@@ -0,0 +1,7 @@
+fn main() {
+    struct X;
+    //~^ HELP consider annotating `X` with `#[derive(PartialEq)]`
+    let xs = [X, X, X];
+    let eq = xs == [X, X, X];
+    //~^ ERROR binary operation `==` cannot be applied to type `[X; 3]`
+}
diff --git a/tests/ui/binop/eq-arr.stderr b/tests/ui/binop/eq-arr.stderr
new file mode 100644
index 00000000000..a22f8e3ab0c
--- /dev/null
+++ b/tests/ui/binop/eq-arr.stderr
@@ -0,0 +1,22 @@
+error[E0369]: binary operation `==` cannot be applied to type `[X; 3]`
+  --> $DIR/eq-arr.rs:5:17
+   |
+LL |     let eq = xs == [X, X, X];
+   |              -- ^^ --------- [X; 3]
+   |              |
+   |              [X; 3]
+   |
+note: an implementation of `PartialEq` might be missing for `X`
+  --> $DIR/eq-arr.rs:2:5
+   |
+LL |     struct X;
+   |     ^^^^^^^^ must implement `PartialEq`
+help: consider annotating `X` with `#[derive(PartialEq)]`
+   |
+LL +     #[derive(PartialEq)]
+LL |     struct X;
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/eq-vec.rs b/tests/ui/binop/eq-vec.rs
new file mode 100644
index 00000000000..17ce8df8564
--- /dev/null
+++ b/tests/ui/binop/eq-vec.rs
@@ -0,0 +1,13 @@
+fn main() {
+    #[derive(Debug)]
+    enum Foo {
+        //~^ HELP consider annotating `Foo` with `#[derive(PartialEq)]`
+        Bar,
+        Qux,
+    }
+
+    let vec1 = vec![Foo::Bar, Foo::Qux];
+    let vec2 = vec![Foo::Bar, Foo::Qux];
+    assert_eq!(vec1, vec2);
+    //~^ ERROR binary operation `==` cannot be applied to type `Vec<Foo>`
+}
diff --git a/tests/ui/binop/eq-vec.stderr b/tests/ui/binop/eq-vec.stderr
new file mode 100644
index 00000000000..0a98cddfe05
--- /dev/null
+++ b/tests/ui/binop/eq-vec.stderr
@@ -0,0 +1,24 @@
+error[E0369]: binary operation `==` cannot be applied to type `Vec<Foo>`
+  --> $DIR/eq-vec.rs:11:5
+   |
+LL |     assert_eq!(vec1, vec2);
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |     |
+   |     Vec<Foo>
+   |     Vec<Foo>
+   |
+note: an implementation of `PartialEq` might be missing for `Foo`
+  --> $DIR/eq-vec.rs:3:5
+   |
+LL |     enum Foo {
+   |     ^^^^^^^^ must implement `PartialEq`
+   = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider annotating `Foo` with `#[derive(PartialEq)]`
+   |
+LL +     #[derive(PartialEq)]
+LL |     enum Foo {
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/binop/issue-28837.stderr b/tests/ui/binop/issue-28837.stderr
index bb9f3b8af0f..6c98edd3af8 100644
--- a/tests/ui/binop/issue-28837.stderr
+++ b/tests/ui/binop/issue-28837.stderr
@@ -6,11 +6,11 @@ LL |     a + a;
    |     |
    |     A
    |
-note: an implementation of `Add<_>` might be missing for `A`
+note: an implementation of `Add` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Add<_>`
+   | ^^^^^^^^ must implement `Add`
 note: the trait `Add` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
@@ -22,11 +22,11 @@ LL |     a - a;
    |     |
    |     A
    |
-note: an implementation of `Sub<_>` might be missing for `A`
+note: an implementation of `Sub` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Sub<_>`
+   | ^^^^^^^^ must implement `Sub`
 note: the trait `Sub` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
@@ -38,11 +38,11 @@ LL |     a * a;
    |     |
    |     A
    |
-note: an implementation of `Mul<_>` might be missing for `A`
+note: an implementation of `Mul` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Mul<_>`
+   | ^^^^^^^^ must implement `Mul`
 note: the trait `Mul` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
@@ -54,11 +54,11 @@ LL |     a / a;
    |     |
    |     A
    |
-note: an implementation of `Div<_>` might be missing for `A`
+note: an implementation of `Div` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Div<_>`
+   | ^^^^^^^^ must implement `Div`
 note: the trait `Div` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
@@ -70,11 +70,11 @@ LL |     a % a;
    |     |
    |     A
    |
-note: an implementation of `Rem<_>` might be missing for `A`
+note: an implementation of `Rem` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Rem<_>`
+   | ^^^^^^^^ must implement `Rem`
 note: the trait `Rem` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
@@ -86,11 +86,11 @@ LL |     a & a;
    |     |
    |     A
    |
-note: an implementation of `BitAnd<_>` might be missing for `A`
+note: an implementation of `BitAnd` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `BitAnd<_>`
+   | ^^^^^^^^ must implement `BitAnd`
 note: the trait `BitAnd` must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
 
@@ -102,11 +102,11 @@ LL |     a | a;
    |     |
    |     A
    |
-note: an implementation of `BitOr<_>` might be missing for `A`
+note: an implementation of `BitOr` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `BitOr<_>`
+   | ^^^^^^^^ must implement `BitOr`
 note: the trait `BitOr` must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
 
@@ -118,11 +118,11 @@ LL |     a << a;
    |     |
    |     A
    |
-note: an implementation of `Shl<_>` might be missing for `A`
+note: an implementation of `Shl` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Shl<_>`
+   | ^^^^^^^^ must implement `Shl`
 note: the trait `Shl` must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
 
@@ -134,11 +134,11 @@ LL |     a >> a;
    |     |
    |     A
    |
-note: an implementation of `Shr<_>` might be missing for `A`
+note: an implementation of `Shr` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `Shr<_>`
+   | ^^^^^^^^ must implement `Shr`
 note: the trait `Shr` must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
 
@@ -150,11 +150,11 @@ LL |     a == a;
    |     |
    |     A
    |
-note: an implementation of `PartialEq<_>` might be missing for `A`
+note: an implementation of `PartialEq` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^ must implement `PartialEq`
 help: consider annotating `A` with `#[derive(PartialEq)]`
    |
 LL + #[derive(PartialEq)]
@@ -169,11 +169,11 @@ LL |     a != a;
    |     |
    |     A
    |
-note: an implementation of `PartialEq<_>` might be missing for `A`
+note: an implementation of `PartialEq` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^ must implement `PartialEq`
 help: consider annotating `A` with `#[derive(PartialEq)]`
    |
 LL + #[derive(PartialEq)]
@@ -188,11 +188,11 @@ LL |     a < a;
    |     |
    |     A
    |
-note: an implementation of `PartialOrd<_>` might be missing for `A`
+note: an implementation of `PartialOrd` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL + #[derive(PartialEq, PartialOrd)]
@@ -207,11 +207,11 @@ LL |     a <= a;
    |     |
    |     A
    |
-note: an implementation of `PartialOrd<_>` might be missing for `A`
+note: an implementation of `PartialOrd` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL + #[derive(PartialEq, PartialOrd)]
@@ -226,11 +226,11 @@ LL |     a > a;
    |     |
    |     A
    |
-note: an implementation of `PartialOrd<_>` might be missing for `A`
+note: an implementation of `PartialOrd` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL + #[derive(PartialEq, PartialOrd)]
@@ -245,11 +245,11 @@ LL |     a >= a;
    |     |
    |     A
    |
-note: an implementation of `PartialOrd<_>` might be missing for `A`
+note: an implementation of `PartialOrd` might be missing for `A`
   --> $DIR/issue-28837.rs:1:1
    |
 LL | struct A;
-   | ^^^^^^^^ must implement `PartialOrd<_>`
+   | ^^^^^^^^ must implement `PartialOrd`
 help: consider annotating `A` with `#[derive(PartialEq, PartialOrd)]`
    |
 LL + #[derive(PartialEq, PartialOrd)]
diff --git a/tests/ui/binop/issue-3820.stderr b/tests/ui/binop/issue-3820.stderr
index c313ed6037f..cfa78a41dbf 100644
--- a/tests/ui/binop/issue-3820.stderr
+++ b/tests/ui/binop/issue-3820.stderr
@@ -6,11 +6,11 @@ LL |     let w = u * 3;
    |             |
    |             Thing
    |
-note: an implementation of `Mul<_>` might be missing for `Thing`
+note: an implementation of `Mul<{integer}>` might be missing for `Thing`
   --> $DIR/issue-3820.rs:1:1
    |
 LL | struct Thing {
-   | ^^^^^^^^^^^^ must implement `Mul<_>`
+   | ^^^^^^^^^^^^ must implement `Mul<{integer}>`
 note: the trait `Mul` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
diff --git a/tests/ui/coherence/coherence-overlap-negative-impls.rs b/tests/ui/coherence/coherence-overlap-negative-impls.rs
new file mode 100644
index 00000000000..cd1df53a528
--- /dev/null
+++ b/tests/ui/coherence/coherence-overlap-negative-impls.rs
@@ -0,0 +1,41 @@
+// check-pass
+// known-bug: #74629
+
+// Should fail. The `0` and `1` impls overlap, violating coherence. Eg, with
+// `T = Test, F = ()`, all bounds are true, making both impls applicable.
+// `Test: Fold<Nil>`, `Test: Fold<()>` are true because of `2`.
+// `Is<Test>: NotNil` is true because of `auto trait` and lack of negative impl.
+
+#![feature(negative_impls)]
+#![feature(auto_traits)]
+
+struct Nil;
+struct Cons<H>(H);
+struct Test;
+
+trait Fold<F> {}
+
+impl<T, F> Fold<F> for Cons<T> // 0
+where
+    T: Fold<Nil>,
+{}
+
+impl<T, F> Fold<F> for Cons<T> // 1
+where
+    T: Fold<F>,
+    private::Is<T>: private::NotNil,
+{}
+
+impl<F> Fold<F> for Test {} // 2
+
+mod private {
+    use crate::Nil;
+
+    pub struct Is<T>(T);
+    pub auto trait NotNil {}
+
+    #[allow(suspicious_auto_trait_impls)]
+    impl !NotNil for Is<Nil> {}
+}
+
+fn main() {}
diff --git a/tests/ui/const-ptr/forbidden_slices.stderr b/tests/ui/const-ptr/forbidden_slices.stderr
index b42361872c4..817cfb0acf9 100644
--- a/tests/ui/const-ptr/forbidden_slices.stderr
+++ b/tests/ui/const-ptr/forbidden_slices.stderr
@@ -131,8 +131,6 @@ error[E0080]: could not evaluate static initializer
    |
    = note: out-of-bounds pointer arithmetic: allocN has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
    |
-note: inside `ptr::const_ptr::<impl *const u32>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `ptr::const_ptr::<impl *const u32>::add`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `R2`
@@ -195,8 +193,6 @@ error[E0080]: could not evaluate static initializer
    |
    = note: out-of-bounds pointer arithmetic: allocN has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
    |
-note: inside `ptr::const_ptr::<impl *const u64>::offset`
-  --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `ptr::const_ptr::<impl *const u64>::add`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `R8`
diff --git a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
index a0f8dd097c7..a93b561e5be 100644
--- a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
+++ b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
@@ -465,7 +465,7 @@ LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchec
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
-               00 10 00 00 00 00 00 00                         │ ........
+               00 00 00 00 00 10 00 00                         │ ........
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -476,7 +476,7 @@ LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unche
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 8, align: 4) {
-               09 00 00 00 03 00 00 00                         │ ........
+               03 00 00 00 09 00 00 00                         │ ........
            }
 
 error[E0080]: it is undefined behavior to use this value
diff --git a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
index 9706f3ec2e0..a32d4863a38 100644
--- a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
+++ b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
@@ -465,7 +465,7 @@ LL | const LAYOUT_INVALID_ZERO: Layout = unsafe { Layout::from_size_align_unchec
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
-               00 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
+               00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 │ ................
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -476,7 +476,7 @@ LL | const LAYOUT_INVALID_THREE: Layout = unsafe { Layout::from_size_align_unche
    |
    = note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
    = note: the raw bytes of the constant (size: 16, align: 8) {
-               09 00 00 00 00 00 00 00 03 00 00 00 00 00 00 00 │ ................
+               03 00 00 00 00 00 00 00 09 00 00 00 00 00 00 00 │ ................
            }
 
 error[E0080]: it is undefined behavior to use this value
diff --git a/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr b/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr
index 9fc25f2ade4..e3b17431f89 100644
--- a/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-enum-struct-variant.stderr
@@ -7,11 +7,11 @@ LL | #[derive(PartialEq)]
 LL |      x: Error
    |      ^^^^^^^^
    |
-note: an implementation of `PartialEq<_>` might be missing for `Error`
+note: an implementation of `PartialEq` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-enum-struct-variant.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
diff --git a/tests/ui/derives/derives-span-PartialEq-enum.stderr b/tests/ui/derives/derives-span-PartialEq-enum.stderr
index f56e784478d..d1631732a34 100644
--- a/tests/ui/derives/derives-span-PartialEq-enum.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-enum.stderr
@@ -7,11 +7,11 @@ LL | #[derive(PartialEq)]
 LL |      Error
    |      ^^^^^
    |
-note: an implementation of `PartialEq<_>` might be missing for `Error`
+note: an implementation of `PartialEq` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-enum.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
diff --git a/tests/ui/derives/derives-span-PartialEq-struct.stderr b/tests/ui/derives/derives-span-PartialEq-struct.stderr
index 76c0b0104af..ab6c6951fc6 100644
--- a/tests/ui/derives/derives-span-PartialEq-struct.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-struct.stderr
@@ -7,11 +7,11 @@ LL | struct Struct {
 LL |     x: Error
    |     ^^^^^^^^
    |
-note: an implementation of `PartialEq<_>` might be missing for `Error`
+note: an implementation of `PartialEq` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-struct.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
diff --git a/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr b/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr
index 7dae01dbb99..865ecad0e8e 100644
--- a/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr
+++ b/tests/ui/derives/derives-span-PartialEq-tuple-struct.stderr
@@ -7,11 +7,11 @@ LL | struct Struct(
 LL |     Error
    |     ^^^^^
    |
-note: an implementation of `PartialEq<_>` might be missing for `Error`
+note: an implementation of `PartialEq` might be missing for `Error`
   --> $DIR/derives-span-PartialEq-tuple-struct.rs:4:1
    |
 LL | struct Error;
-   | ^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^ must implement `PartialEq`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `Error` with `#[derive(PartialEq)]`
    |
diff --git a/tests/ui/derives/deriving-no-inner-impl-error-message.stderr b/tests/ui/derives/deriving-no-inner-impl-error-message.stderr
index 10af5d36ed9..ab99ba9fab5 100644
--- a/tests/ui/derives/deriving-no-inner-impl-error-message.stderr
+++ b/tests/ui/derives/deriving-no-inner-impl-error-message.stderr
@@ -7,11 +7,11 @@ LL | struct E {
 LL |     x: NoCloneOrEq
    |     ^^^^^^^^^^^^^^
    |
-note: an implementation of `PartialEq<_>` might be missing for `NoCloneOrEq`
+note: an implementation of `PartialEq` might be missing for `NoCloneOrEq`
   --> $DIR/deriving-no-inner-impl-error-message.rs:1:1
    |
 LL | struct NoCloneOrEq;
-   | ^^^^^^^^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^^^^^^^^ must implement `PartialEq`
    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider annotating `NoCloneOrEq` with `#[derive(PartialEq)]`
    |
diff --git a/tests/ui/destructuring-assignment/note-unsupported.stderr b/tests/ui/destructuring-assignment/note-unsupported.stderr
index 8a88332b73e..f556330070c 100644
--- a/tests/ui/destructuring-assignment/note-unsupported.stderr
+++ b/tests/ui/destructuring-assignment/note-unsupported.stderr
@@ -44,11 +44,11 @@ LL |     S { x: a, y: b } += s;
    |     |
    |     cannot use `+=` on type `S`
    |
-note: an implementation of `AddAssign<_>` might be missing for `S`
+note: an implementation of `AddAssign` might be missing for `S`
   --> $DIR/note-unsupported.rs:1:1
    |
 LL | struct S { x: u8, y: u8 }
-   | ^^^^^^^^ must implement `AddAssign<_>`
+   | ^^^^^^^^ must implement `AddAssign`
 note: the trait `AddAssign` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
diff --git a/tests/ui/feature-gates/test-listing-format-json.rs b/tests/ui/feature-gates/test-listing-format-json.rs
new file mode 100644
index 00000000000..2dd0e10b521
--- /dev/null
+++ b/tests/ui/feature-gates/test-listing-format-json.rs
@@ -0,0 +1,18 @@
+// no-prefer-dynamic
+// compile-flags: --test
+// run-flags: --list --format json -Zunstable-options
+// run-fail
+// check-run-results
+// ignore-nightly
+// unset-exec-env:RUSTC_BOOTSTRAP
+
+#![cfg(test)]
+#[test]
+fn m_test() {}
+
+#[test]
+#[ignore = "not yet implemented"]
+fn z_test() {}
+
+#[test]
+fn a_test() {}
diff --git a/tests/ui/feature-gates/test-listing-format-json.run.stderr b/tests/ui/feature-gates/test-listing-format-json.run.stderr
new file mode 100644
index 00000000000..e81cb81f32c
--- /dev/null
+++ b/tests/ui/feature-gates/test-listing-format-json.run.stderr
@@ -0,0 +1 @@
+error: the option `Z` is only accepted on the nightly compiler
diff --git a/tests/ui/fmt/ifmt-bad-arg.stderr b/tests/ui/fmt/ifmt-bad-arg.stderr
index bf18fb315c9..ed008c454a3 100644
--- a/tests/ui/fmt/ifmt-bad-arg.stderr
+++ b/tests/ui/fmt/ifmt-bad-arg.stderr
@@ -307,7 +307,7 @@ LL |     println!("{} {:.*} {}", 1, 3.2, 4);
    = note: expected reference `&usize`
               found reference `&{float}`
 note: associated function defined here
-  --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
+  --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0308]: mismatched types
@@ -321,7 +321,7 @@ LL |     println!("{} {:07$.*} {}", 1, 3.2, 4);
    = note: expected reference `&usize`
               found reference `&{float}`
 note: associated function defined here
-  --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
+  --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
    = note: this error originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 38 previous errors
diff --git a/tests/ui/fmt/ifmt-unimpl.stderr b/tests/ui/fmt/ifmt-unimpl.stderr
index dc2dee3f341..cc316e55f5c 100644
--- a/tests/ui/fmt/ifmt-unimpl.stderr
+++ b/tests/ui/fmt/ifmt-unimpl.stderr
@@ -17,9 +17,9 @@ LL |     format!("{:X}", "3");
              NonZeroIsize
            and 21 others
    = note: required for `&str` to implement `UpperHex`
-note: required by a bound in `core::fmt::ArgumentV1::<'a>::new_upper_hex`
-  --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
-   = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `arg_new` (in Nightly builds, run with -Z macro-backtrace for more info)
+note: required by a bound in `core::fmt::rt::Argument::<'a>::new_upper_hex`
+  --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
+   = note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
 
diff --git a/tests/ui/fmt/send-sync.stderr b/tests/ui/fmt/send-sync.stderr
index d43f4f0d957..b517a342e63 100644
--- a/tests/ui/fmt/send-sync.stderr
+++ b/tests/ui/fmt/send-sync.stderr
@@ -1,16 +1,16 @@
-error[E0277]: `core::fmt::Opaque` cannot be shared between threads safely
+error[E0277]: `core::fmt::rt::Opaque` cannot be shared between threads safely
   --> $DIR/send-sync.rs:8:10
    |
 LL |     send(format_args!("{:?}", c));
-   |     ---- ^^^^^^^^^^^^^^^^^^^^^^^ `core::fmt::Opaque` cannot be shared between threads safely
+   |     ---- ^^^^^^^^^^^^^^^^^^^^^^^ `core::fmt::rt::Opaque` cannot be shared between threads safely
    |     |
    |     required by a bound introduced by this call
    |
-   = help: within `[core::fmt::ArgumentV1<'_>]`, the trait `Sync` is not implemented for `core::fmt::Opaque`
-   = note: required because it appears within the type `&core::fmt::Opaque`
-   = note: required because it appears within the type `ArgumentV1<'_>`
-   = note: required because it appears within the type `[ArgumentV1<'_>]`
-   = note: required for `&[core::fmt::ArgumentV1<'_>]` to implement `Send`
+   = help: within `[core::fmt::rt::Argument<'_>]`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
+   = note: required because it appears within the type `&core::fmt::rt::Opaque`
+   = note: required because it appears within the type `Argument<'_>`
+   = note: required because it appears within the type `[Argument<'_>]`
+   = note: required for `&[core::fmt::rt::Argument<'_>]` to implement `Send`
    = note: required because it appears within the type `Arguments<'_>`
 note: required by a bound in `send`
   --> $DIR/send-sync.rs:1:12
@@ -18,19 +18,19 @@ note: required by a bound in `send`
 LL | fn send<T: Send>(_: T) {}
    |            ^^^^ required by this bound in `send`
 
-error[E0277]: `core::fmt::Opaque` cannot be shared between threads safely
+error[E0277]: `core::fmt::rt::Opaque` cannot be shared between threads safely
   --> $DIR/send-sync.rs:9:10
    |
 LL |     sync(format_args!("{:?}", c));
-   |     ---- ^^^^^^^^^^^^^^^^^^^^^^^ `core::fmt::Opaque` cannot be shared between threads safely
+   |     ---- ^^^^^^^^^^^^^^^^^^^^^^^ `core::fmt::rt::Opaque` cannot be shared between threads safely
    |     |
    |     required by a bound introduced by this call
    |
-   = help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::Opaque`
-   = note: required because it appears within the type `&core::fmt::Opaque`
-   = note: required because it appears within the type `ArgumentV1<'_>`
-   = note: required because it appears within the type `[ArgumentV1<'_>]`
-   = note: required because it appears within the type `&[ArgumentV1<'_>]`
+   = help: within `Arguments<'_>`, the trait `Sync` is not implemented for `core::fmt::rt::Opaque`
+   = note: required because it appears within the type `&core::fmt::rt::Opaque`
+   = note: required because it appears within the type `Argument<'_>`
+   = note: required because it appears within the type `[Argument<'_>]`
+   = note: required because it appears within the type `&[Argument<'_>]`
    = note: required because it appears within the type `Arguments<'_>`
 note: required by a bound in `sync`
   --> $DIR/send-sync.rs:2:12
diff --git a/tests/ui/generator/issue-110929-generator-conflict-error-ice.rs b/tests/ui/generator/issue-110929-generator-conflict-error-ice.rs
new file mode 100644
index 00000000000..9408acc15f9
--- /dev/null
+++ b/tests/ui/generator/issue-110929-generator-conflict-error-ice.rs
@@ -0,0 +1,12 @@
+// edition:2021
+// compile-flags: -Zdrop-tracking-mir=yes
+#![feature(generators)]
+
+fn main() {
+    let x = &mut ();
+    || {
+        let _c = || yield *&mut *x;
+        || _ = &mut *x;
+        //~^ cannot borrow `*x` as mutable more than once at a time
+    };
+}
diff --git a/tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr b/tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr
new file mode 100644
index 00000000000..4d72ebe79eb
--- /dev/null
+++ b/tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr
@@ -0,0 +1,18 @@
+error[E0499]: cannot borrow `*x` as mutable more than once at a time
+  --> $DIR/issue-110929-generator-conflict-error-ice.rs:9:9
+   |
+LL |         let _c = || yield *&mut *x;
+   |                  --             -- first borrow occurs due to use of `*x` in generator
+   |                  |
+   |                  first mutable borrow occurs here
+LL |         || _ = &mut *x;
+   |         ^^          -- second borrow occurs due to use of `*x` in closure
+   |         |
+   |         second mutable borrow occurs here
+LL |
+LL |     };
+   |     - first borrow might be used here, when `_c` is dropped and runs the destructor for generator
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/generic-associated-types/self-outlives-lint.rs b/tests/ui/generic-associated-types/self-outlives-lint.rs
index 673891fc3d1..0ea81b5aecb 100644
--- a/tests/ui/generic-associated-types/self-outlives-lint.rs
+++ b/tests/ui/generic-associated-types/self-outlives-lint.rs
@@ -189,7 +189,7 @@ trait MultipleMethods {
 }
 
 // We would normally require `Self: 'a`, but we can prove that `Self: 'static`
-// because of the the bounds on the trait, so the bound is proven
+// because of the bounds on the trait, so the bound is proven
 trait Trait: 'static {
     type Assoc<'a>;
     fn make_assoc(_: &u32) -> Self::Assoc<'_>;
diff --git a/tests/ui/io-checks/inaccessbile-temp-dir.rs b/tests/ui/io-checks/inaccessbile-temp-dir.rs
deleted file mode 100644
index 9c0aa013572..00000000000
--- a/tests/ui/io-checks/inaccessbile-temp-dir.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// Issue #66530: We would ICE if someone compiled with `-o /dev/null`,
-// because we would try to generate auxiliary files in `/dev/` (which
-// at least the OS X file system rejects).
-//
-// An attempt to `-o` into a directory we cannot write into should indeed
-// be an error; but not an ICE.
-//
-// However, some folks run tests as root, which can write `/dev/` and end
-// up clobbering `/dev/null`. Instead we'll use a non-existent path, which
-// also used to ICE, but even root can't magically write there.
-
-// compile-flags: -Z temps-dir=/does-not-exist/output
-
-// The error-pattern check occurs *before* normalization, and the error patterns
-// are wildly different between build environments. So this is a cop-out (and we
-// rely on the checking of the normalized stderr output as our actual
-// "verification" of the diagnostic).
-
-// error-pattern: error
-
-// On Mac OS X, we get an error like the below
-// normalize-stderr-test "failed to write bytecode to /does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying /does-not-exist/"
-
-// On Linux, we get an error like the below
-// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /does-not-exist/"
-
-// ignore-windows - this is a unix-specific test
-// ignore-emscripten - the file-system issues do not replicate here
-// ignore-wasm - the file-system issues do not replicate here
-// ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu
-
-#![crate_type = "lib"]
-#![cfg_attr(not(feature = "std"), no_std)]
-pub mod task {
-    pub mod __internal {
-        use crate::task::Waker;
-    }
-    pub use core::task::Waker;
-}
diff --git a/tests/ui/io-checks/inaccessbile-temp-dir.stderr b/tests/ui/io-checks/inaccessbile-temp-dir.stderr
deleted file mode 100644
index 2fc5f93ef79..00000000000
--- a/tests/ui/io-checks/inaccessbile-temp-dir.stderr
+++ /dev/null
@@ -1,4 +0,0 @@
-error: failed to find or create the directory specified by `--temps-dir`
-
-error: aborting due to previous error
-
diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
index 134e7d420e3..6ec81a94306 100644
--- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
+++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.rs
@@ -9,7 +9,7 @@
 // up clobbering `/dev/null`. Instead we'll use a non-existent path, which
 // also used to ICE, but even root can't magically write there.
 
-// compile-flags: -o /does-not-exist/output
+// compile-flags: -o ./does-not-exist/output
 
 // The error-pattern check occurs *before* normalization, and the error patterns
 // are wildly different between build environments. So this is a cop-out (and we
@@ -19,22 +19,14 @@
 // error-pattern: error
 
 // On Mac OS X, we get an error like the below
-// normalize-stderr-test "failed to write bytecode to /does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying /does-not-exist/"
+// normalize-stderr-test "failed to write bytecode to ./does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying ./does-not-exist/"
 
 // On Linux, we get an error like the below
-// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /does-not-exist/"
+// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying ./does-not-exist/"
 
 // ignore-windows - this is a unix-specific test
 // ignore-emscripten - the file-system issues do not replicate here
 // ignore-wasm - the file-system issues do not replicate here
 // ignore-arm - the file-system issues do not replicate here, at least on armhf-gnu
 
-#![crate_type="lib"]
-
-#![cfg_attr(not(feature = "std"), no_std)]
-pub mod task {
-    pub mod __internal {
-        use crate::task::Waker;
-    }
-    pub use core::task::Waker;
-}
+#![crate_type = "lib"]
diff --git a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
index edadecf273a..f1d9ed8ac8b 100644
--- a/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
+++ b/tests/ui/io-checks/non-ice-error-on-worker-io-fail.stderr
@@ -1,6 +1,6 @@
 warning: ignoring --out-dir flag due to -o flag
 
-error: io error modifying /does-not-exist/
+error: io error modifying ./does-not-exist/
 
 error: aborting due to previous error; 1 warning emitted
 
diff --git a/tests/ui/issues/issue-62375.stderr b/tests/ui/issues/issue-62375.stderr
index a6fd3700edd..cd632e64fe5 100644
--- a/tests/ui/issues/issue-62375.stderr
+++ b/tests/ui/issues/issue-62375.stderr
@@ -6,16 +6,17 @@ LL |     a == A::Value;
    |     |
    |     A
    |
-note: an implementation of `PartialEq<_>` might be missing for `A`
+note: an implementation of `PartialEq<fn(()) -> A {A::Value}>` might be missing for `A`
   --> $DIR/issue-62375.rs:1:1
    |
 LL | enum A {
-   | ^^^^^^ must implement `PartialEq<_>`
-help: consider annotating `A` with `#[derive(PartialEq)]`
-   |
-LL + #[derive(PartialEq)]
-LL | enum A {
+   | ^^^^^^ must implement `PartialEq<fn(()) -> A {A::Value}>`
+note: the trait `PartialEq` must be implemented
+  --> $SRC_DIR/core/src/cmp.rs:LL:COL
+help: use parentheses to construct this tuple variant
    |
+LL |     a == A::Value(/* () */);
+   |                  ++++++++++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr
index 20d4c418e87..8c7c915350f 100644
--- a/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr
+++ b/tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr
@@ -370,23 +370,23 @@ error: layout_of(NicheFirst) = Layout {
                pref: $PREF_ALIGN,
            },
            abi: ScalarPair(
-               Union {
+               Initialized {
                    value: Int(
                        I8,
                        false,
                    ),
+                   valid_range: 0..=4,
                },
-               Initialized {
+               Union {
                    value: Int(
                        I8,
                        false,
                    ),
-                   valid_range: 0..=4,
                },
            ),
            fields: Arbitrary {
                offsets: [
-                   Size(1 bytes),
+                   Size(0 bytes),
                ],
                memory_index: [
                    0,
@@ -394,7 +394,7 @@ error: layout_of(NicheFirst) = Layout {
            },
            largest_niche: Some(
                Niche {
-                   offset: Size(1 bytes),
+                   offset: Size(0 bytes),
                    value: Int(
                        I8,
                        false,
@@ -429,29 +429,29 @@ error: layout_of(NicheFirst) = Layout {
                                    I8,
                                    false,
                                ),
-                               valid_range: 0..=255,
+                               valid_range: 0..=2,
                            },
                            Initialized {
                                value: Int(
                                    I8,
                                    false,
                                ),
-                               valid_range: 0..=2,
+                               valid_range: 0..=255,
                            },
                        ),
                        fields: Arbitrary {
                            offsets: [
-                               Size(1 bytes),
                                Size(0 bytes),
+                               Size(1 bytes),
                            ],
                            memory_index: [
-                               1,
                                0,
+                               1,
                            ],
                        },
                        largest_niche: Some(
                            Niche {
-                               offset: Size(1 bytes),
+                               offset: Size(0 bytes),
                                value: Int(
                                    I8,
                                    false,
@@ -514,23 +514,23 @@ error: layout_of(NicheSecond) = Layout {
                pref: $PREF_ALIGN,
            },
            abi: ScalarPair(
-               Union {
+               Initialized {
                    value: Int(
                        I8,
                        false,
                    ),
+                   valid_range: 0..=4,
                },
-               Initialized {
+               Union {
                    value: Int(
                        I8,
                        false,
                    ),
-                   valid_range: 0..=4,
                },
            ),
            fields: Arbitrary {
                offsets: [
-                   Size(1 bytes),
+                   Size(0 bytes),
                ],
                memory_index: [
                    0,
@@ -538,7 +538,7 @@ error: layout_of(NicheSecond) = Layout {
            },
            largest_niche: Some(
                Niche {
-                   offset: Size(1 bytes),
+                   offset: Size(0 bytes),
                    value: Int(
                        I8,
                        false,
@@ -573,29 +573,29 @@ error: layout_of(NicheSecond) = Layout {
                                    I8,
                                    false,
                                ),
-                               valid_range: 0..=255,
+                               valid_range: 0..=2,
                            },
                            Initialized {
                                value: Int(
                                    I8,
                                    false,
                                ),
-                               valid_range: 0..=2,
+                               valid_range: 0..=255,
                            },
                        ),
                        fields: Arbitrary {
                            offsets: [
-                               Size(0 bytes),
                                Size(1 bytes),
+                               Size(0 bytes),
                            ],
                            memory_index: [
-                               0,
                                1,
+                               0,
                            ],
                        },
                        largest_niche: Some(
                            Niche {
-                               offset: Size(1 bytes),
+                               offset: Size(0 bytes),
                                value: Int(
                                    I8,
                                    false,
diff --git a/tests/ui/lint/unused/lint-unused-mut-variables.rs b/tests/ui/lint/unused/lint-unused-mut-variables.rs
index 67ec7facf17..5334ab5824d 100644
--- a/tests/ui/lint/unused/lint-unused-mut-variables.rs
+++ b/tests/ui/lint/unused/lint-unused-mut-variables.rs
@@ -205,3 +205,11 @@ fn bar() {
     let mut b = vec![2]; //~ ERROR: variable does not need to be mutable
 
 }
+
+struct Arg(i32);
+
+// Regression test for https://github.com/rust-lang/rust/issues/110849
+fn write_through_reference(mut arg: &mut Arg) {
+    //~^ WARN: variable does not need to be mutable
+    arg.0 = 1
+}
diff --git a/tests/ui/lint/unused/lint-unused-mut-variables.stderr b/tests/ui/lint/unused/lint-unused-mut-variables.stderr
index 805ed2b40bb..5f66c031581 100644
--- a/tests/ui/lint/unused/lint-unused-mut-variables.stderr
+++ b/tests/ui/lint/unused/lint-unused-mut-variables.stderr
@@ -218,5 +218,13 @@ note: the lint level is defined here
 LL | #[deny(unused_mut)]
    |        ^^^^^^^^^^
 
-error: aborting due to previous error; 25 warnings emitted
+warning: variable does not need to be mutable
+  --> $DIR/lint-unused-mut-variables.rs:212:28
+   |
+LL | fn write_through_reference(mut arg: &mut Arg) {
+   |                            ----^^^
+   |                            |
+   |                            help: remove this `mut`
+
+error: aborting due to previous error; 26 warnings emitted
 
diff --git a/tests/ui/macros/missing-bang-in-decl.stderr b/tests/ui/macros/missing-bang-in-decl.stderr
index dfabafb0a7a..aa78c9a6906 100644
--- a/tests/ui/macros/missing-bang-in-decl.stderr
+++ b/tests/ui/macros/missing-bang-in-decl.stderr
@@ -2,13 +2,23 @@ error: expected `!` after `macro_rules`
   --> $DIR/missing-bang-in-decl.rs:5:1
    |
 LL | macro_rules foo {
-   | ^^^^^^^^^^^ help: add a `!`: `macro_rules!`
+   | ^^^^^^^^^^^
+   |
+help: add a `!`
+   |
+LL | macro_rules! foo {
+   |            +
 
 error: expected `!` after `macro_rules`
   --> $DIR/missing-bang-in-decl.rs:10:1
    |
 LL | macro_rules bar! {
-   | ^^^^^^^^^^^ help: add a `!`: `macro_rules!`
+   | ^^^^^^^^^^^
+   |
+help: add a `!`
+   |
+LL | macro_rules! bar! {
+   |            +
 
 error: macro names aren't followed by a `!`
   --> $DIR/missing-bang-in-decl.rs:10:16
diff --git a/tests/ui/methods/method-not-found-generic-arg-elision.rs b/tests/ui/methods/method-not-found-generic-arg-elision.rs
index 799ced5e9c4..538eeadae08 100644
--- a/tests/ui/methods/method-not-found-generic-arg-elision.rs
+++ b/tests/ui/methods/method-not-found-generic-arg-elision.rs
@@ -83,8 +83,8 @@ fn main() {
     //~^ ERROR no method named `distance` found for struct `Point<i32>
     let d = point_i32.other();
     //~^ ERROR no method named `other` found for struct `Point
-    let v = vec![1_i32, 2, 3];
-    v.iter().map(|x| x * x).extend(std::iter::once(100));
+    let v = vec![1, 2, 3];
+    v.iter().map(Box::new(|x| x * x) as Box<dyn Fn(&i32) -> i32>).extend(std::iter::once(100));
     //~^ ERROR no method named `extend` found for struct `Map
     let wrapper = Wrapper(true);
     wrapper.method();
diff --git a/tests/ui/methods/method-not-found-generic-arg-elision.stderr b/tests/ui/methods/method-not-found-generic-arg-elision.stderr
index f3db56d1d53..b97688d3868 100644
--- a/tests/ui/methods/method-not-found-generic-arg-elision.stderr
+++ b/tests/ui/methods/method-not-found-generic-arg-elision.stderr
@@ -20,10 +20,10 @@ LL |     let d = point_i32.other();
    |                       ^^^^^ method not found in `Point<i32>`
 
 error[E0599]: no method named `extend` found for struct `Map` in the current scope
-  --> $DIR/method-not-found-generic-arg-elision.rs:87:29
+  --> $DIR/method-not-found-generic-arg-elision.rs:87:67
    |
-LL |     v.iter().map(|x| x * x).extend(std::iter::once(100));
-   |                             ^^^^^^ method not found in `Map<Iter<'_, i32>, [closure@method-not-found-generic-arg-elision.rs:87:18]>`
+LL |     v.iter().map(Box::new(|x| x * x) as Box<dyn Fn(&i32) -> i32>).extend(std::iter::once(100));
+   |                                                                   ^^^^^^ method not found in `Map<Iter<'_, i32>, Box<dyn Fn(&i32) -> i32>>`
 
 error[E0599]: no method named `method` found for struct `Wrapper<bool>` in the current scope
   --> $DIR/method-not-found-generic-arg-elision.rs:90:13
diff --git a/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr b/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr
index 2393791a9b2..66a85c4656a 100644
--- a/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr
+++ b/tests/ui/mismatched_types/assignment-operator-unimplemented.stderr
@@ -6,11 +6,11 @@ LL |   a += *b;
    |   |
    |   cannot use `+=` on type `Foo`
    |
-note: an implementation of `AddAssign<_>` might be missing for `Foo`
+note: an implementation of `AddAssign` might be missing for `Foo`
   --> $DIR/assignment-operator-unimplemented.rs:1:1
    |
 LL | struct Foo;
-   | ^^^^^^^^^^ must implement `AddAssign<_>`
+   | ^^^^^^^^^^ must implement `AddAssign`
 note: the trait `AddAssign` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
diff --git a/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr b/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr
index 10d42b7e3c0..604bba417e6 100644
--- a/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr
+++ b/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr
@@ -30,11 +30,11 @@ LL |     let _ = |A | B: E| ();
    |                  |
    |                  E
    |
-note: an implementation of `BitOr<_>` might be missing for `E`
+note: an implementation of `BitOr<()>` might be missing for `E`
   --> $DIR/or-patterns-syntactic-fail.rs:6:1
    |
 LL | enum E { A, B }
-   | ^^^^^^ must implement `BitOr<_>`
+   | ^^^^^^ must implement `BitOr<()>`
 note: the trait `BitOr` must be implemented
   --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
 
diff --git a/tests/ui/panics/fmt-only-once.rs b/tests/ui/panics/fmt-only-once.rs
new file mode 100644
index 00000000000..6211bf961b3
--- /dev/null
+++ b/tests/ui/panics/fmt-only-once.rs
@@ -0,0 +1,21 @@
+// run-fail
+// check-run-results
+// exec-env:RUST_BACKTRACE=0
+
+// Test that we format the panic message only once.
+// Regression test for https://github.com/rust-lang/rust/issues/110717
+
+use std::fmt;
+
+struct PrintOnFmt;
+
+impl fmt::Display for PrintOnFmt {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        eprintln!("fmt");
+        f.write_str("PrintOnFmt")
+    }
+}
+
+fn main() {
+    panic!("{}", PrintOnFmt)
+}
diff --git a/tests/ui/panics/fmt-only-once.run.stderr b/tests/ui/panics/fmt-only-once.run.stderr
new file mode 100644
index 00000000000..39bd06881ad
--- /dev/null
+++ b/tests/ui/panics/fmt-only-once.run.stderr
@@ -0,0 +1,3 @@
+fmt
+thread 'main' panicked at 'PrintOnFmt', $DIR/fmt-only-once.rs:20:5
+note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/parser/item-kw-case-mismatch.fixed b/tests/ui/parser/item-kw-case-mismatch.fixed
index 1794268f260..4b99537fbf7 100644
--- a/tests/ui/parser/item-kw-case-mismatch.fixed
+++ b/tests/ui/parser/item-kw-case-mismatch.fixed
@@ -4,31 +4,31 @@
 
 fn main() {}
 
-use std::ptr::read;  //~ ERROR keyword `use` is written in a wrong case
-use std::ptr::write; //~ ERROR keyword `use` is written in a wrong case
+use std::ptr::read;  //~ ERROR keyword `use` is written in the wrong case
+use std::ptr::write; //~ ERROR keyword `use` is written in the wrong case
 
 async fn _a() {}
-//~^ ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `fn` is written in the wrong case
 
 fn _b() {}
-//~^ ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `fn` is written in the wrong case
 
 async fn _c() {}
-//~^ ERROR keyword `async` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `async` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
 
 async fn _d() {}
-//~^ ERROR keyword `async` is written in a wrong case
+//~^ ERROR keyword `async` is written in the wrong case
 
 const unsafe fn _e() {}
-//~^ ERROR keyword `const` is written in a wrong case
-//~| ERROR keyword `unsafe` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `const` is written in the wrong case
+//~| ERROR keyword `unsafe` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
 
 unsafe extern fn _f() {}
-//~^ ERROR keyword `unsafe` is written in a wrong case
-//~| ERROR keyword `extern` is written in a wrong case
+//~^ ERROR keyword `unsafe` is written in the wrong case
+//~| ERROR keyword `extern` is written in the wrong case
 
 extern "C" fn _g() {}
-//~^ ERROR keyword `extern` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `extern` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
diff --git a/tests/ui/parser/item-kw-case-mismatch.rs b/tests/ui/parser/item-kw-case-mismatch.rs
index ac8390efdb9..b11ec93754f 100644
--- a/tests/ui/parser/item-kw-case-mismatch.rs
+++ b/tests/ui/parser/item-kw-case-mismatch.rs
@@ -4,31 +4,31 @@
 
 fn main() {}
 
-Use std::ptr::read;  //~ ERROR keyword `use` is written in a wrong case
-USE std::ptr::write; //~ ERROR keyword `use` is written in a wrong case
+Use std::ptr::read;  //~ ERROR keyword `use` is written in the wrong case
+USE std::ptr::write; //~ ERROR keyword `use` is written in the wrong case
 
 async Fn _a() {}
-//~^ ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `fn` is written in the wrong case
 
 Fn _b() {}
-//~^ ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `fn` is written in the wrong case
 
 aSYNC fN _c() {}
-//~^ ERROR keyword `async` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `async` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
 
 Async fn _d() {}
-//~^ ERROR keyword `async` is written in a wrong case
+//~^ ERROR keyword `async` is written in the wrong case
 
 CONST UNSAFE FN _e() {}
-//~^ ERROR keyword `const` is written in a wrong case
-//~| ERROR keyword `unsafe` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `const` is written in the wrong case
+//~| ERROR keyword `unsafe` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
 
 unSAFE EXTern fn _f() {}
-//~^ ERROR keyword `unsafe` is written in a wrong case
-//~| ERROR keyword `extern` is written in a wrong case
+//~^ ERROR keyword `unsafe` is written in the wrong case
+//~| ERROR keyword `extern` is written in the wrong case
 
 EXTERN "C" FN _g() {}
-//~^ ERROR keyword `extern` is written in a wrong case
-//~| ERROR keyword `fn` is written in a wrong case
+//~^ ERROR keyword `extern` is written in the wrong case
+//~| ERROR keyword `fn` is written in the wrong case
diff --git a/tests/ui/parser/item-kw-case-mismatch.stderr b/tests/ui/parser/item-kw-case-mismatch.stderr
index e66dae825f9..ba59ea85363 100644
--- a/tests/ui/parser/item-kw-case-mismatch.stderr
+++ b/tests/ui/parser/item-kw-case-mismatch.stderr
@@ -1,82 +1,82 @@
-error: keyword `use` is written in a wrong case
+error: keyword `use` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:7:1
    |
 LL | Use std::ptr::read;
    | ^^^ help: write it in the correct case (notice the capitalization): `use`
 
-error: keyword `use` is written in a wrong case
+error: keyword `use` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:8:1
    |
 LL | USE std::ptr::write;
    | ^^^ help: write it in the correct case: `use`
 
-error: keyword `fn` is written in a wrong case
+error: keyword `fn` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:10:7
    |
 LL | async Fn _a() {}
    |       ^^ help: write it in the correct case (notice the capitalization): `fn`
 
-error: keyword `fn` is written in a wrong case
+error: keyword `fn` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:13:1
    |
 LL | Fn _b() {}
    | ^^ help: write it in the correct case (notice the capitalization): `fn`
 
-error: keyword `async` is written in a wrong case
+error: keyword `async` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:16:1
    |
 LL | aSYNC fN _c() {}
    | ^^^^^ help: write it in the correct case: `async`
 
-error: keyword `fn` is written in a wrong case
+error: keyword `fn` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:16:7
    |
 LL | aSYNC fN _c() {}
    |       ^^ help: write it in the correct case: `fn`
 
-error: keyword `async` is written in a wrong case
+error: keyword `async` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:20:1
    |
 LL | Async fn _d() {}
    | ^^^^^ help: write it in the correct case: `async`
 
-error: keyword `const` is written in a wrong case
+error: keyword `const` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:23:1
    |
 LL | CONST UNSAFE FN _e() {}
    | ^^^^^ help: write it in the correct case: `const`
 
-error: keyword `unsafe` is written in a wrong case
+error: keyword `unsafe` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:23:7
    |
 LL | CONST UNSAFE FN _e() {}
    |       ^^^^^^ help: write it in the correct case: `unsafe`
 
-error: keyword `fn` is written in a wrong case
+error: keyword `fn` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:23:14
    |
 LL | CONST UNSAFE FN _e() {}
    |              ^^ help: write it in the correct case: `fn`
 
-error: keyword `unsafe` is written in a wrong case
+error: keyword `unsafe` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:28:1
    |
 LL | unSAFE EXTern fn _f() {}
    | ^^^^^^ help: write it in the correct case: `unsafe`
 
-error: keyword `extern` is written in a wrong case
+error: keyword `extern` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:28:8
    |
 LL | unSAFE EXTern fn _f() {}
    |        ^^^^^^ help: write it in the correct case: `extern`
 
-error: keyword `extern` is written in a wrong case
+error: keyword `extern` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:32:1
    |
 LL | EXTERN "C" FN _g() {}
    | ^^^^^^ help: write it in the correct case: `extern`
 
-error: keyword `fn` is written in a wrong case
+error: keyword `fn` is written in the wrong case
   --> $DIR/item-kw-case-mismatch.rs:32:12
    |
 LL | EXTERN "C" FN _g() {}
diff --git a/tests/ui/parser/recover-unticked-labels.stderr b/tests/ui/parser/recover-unticked-labels.stderr
index c115dffb10e..fbd108ca613 100644
--- a/tests/ui/parser/recover-unticked-labels.stderr
+++ b/tests/ui/parser/recover-unticked-labels.stderr
@@ -2,13 +2,17 @@ error: expected a label, found an identifier
   --> $DIR/recover-unticked-labels.rs:5:26
    |
 LL |     'label: loop { break label 0 };
-   |                          ^^^^^ help: labels start with a tick: `'label`
+   |                          -^^^^
+   |                          |
+   |                          help: labels start with a tick
 
 error: expected a label, found an identifier
   --> $DIR/recover-unticked-labels.rs:6:29
    |
 LL |     'label: loop { continue label };
-   |                             ^^^^^ help: labels start with a tick: `'label`
+   |                             -^^^^
+   |                             |
+   |                             help: labels start with a tick
 
 error[E0425]: cannot find value `label` in this scope
   --> $DIR/recover-unticked-labels.rs:4:26
diff --git a/tests/ui/parser/use-colon-as-mod-sep.stderr b/tests/ui/parser/use-colon-as-mod-sep.stderr
index e825dfed111..bfc5374ef9d 100644
--- a/tests/ui/parser/use-colon-as-mod-sep.stderr
+++ b/tests/ui/parser/use-colon-as-mod-sep.stderr
@@ -11,18 +11,24 @@ error: expected `::`, found `:`
    |
 LL | use std:fs::File;
    |        ^ help: use double colon
+   |
+   = note: import paths are delimited using `::`
 
 error: expected `::`, found `:`
   --> $DIR/use-colon-as-mod-sep.rs:7:8
    |
 LL | use std:collections:HashMap;
    |        ^ help: use double colon
+   |
+   = note: import paths are delimited using `::`
 
 error: expected `::`, found `:`
   --> $DIR/use-colon-as-mod-sep.rs:7:20
    |
 LL | use std:collections:HashMap;
    |                    ^ help: use double colon
+   |
+   = note: import paths are delimited using `::`
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/print_type_sizes/async.stdout b/tests/ui/print_type_sizes/async.stdout
index 8fe936efc89..1c6887412be 100644
--- a/tests/ui/print_type_sizes/async.stdout
+++ b/tests/ui/print_type_sizes/async.stdout
@@ -1,15 +1,15 @@
 print-type-size type: `[async fn body@$DIR/async.rs:8:36: 11:2]`: 16386 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 8192 bytes
-print-type-size         upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 8192 bytes
 print-type-size     variant `Suspend0`: 16385 bytes
-print-type-size         upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 8192 bytes
 print-type-size         local `.arg`: 8192 bytes
 print-type-size         local `.__awaitee`: 1 bytes
 print-type-size     variant `Returned`: 8192 bytes
-print-type-size         upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 8192 bytes
 print-type-size     variant `Panicked`: 8192 bytes
-print-type-size         upvar `.arg`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.arg`: 8192 bytes
 print-type-size type: `std::mem::ManuallyDrop<[u8; 8192]>`: 8192 bytes, alignment: 1 bytes
 print-type-size     field `.value`: 8192 bytes
 print-type-size type: `std::mem::MaybeUninit<[u8; 8192]>`: 8192 bytes, alignment: 1 bytes
diff --git a/tests/ui/print_type_sizes/generator.stdout b/tests/ui/print_type_sizes/generator.stdout
index 7c58d6ce5ff..2dcadde9ec2 100644
--- a/tests/ui/print_type_sizes/generator.stdout
+++ b/tests/ui/print_type_sizes/generator.stdout
@@ -1,10 +1,10 @@
 print-type-size type: `[generator@$DIR/generator.rs:10:5: 10:14]`: 8193 bytes, alignment: 1 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 8192 bytes
-print-type-size         upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.array`: 8192 bytes
 print-type-size     variant `Suspend0`: 8192 bytes
-print-type-size         upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.array`: 8192 bytes
 print-type-size     variant `Returned`: 8192 bytes
-print-type-size         upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.array`: 8192 bytes
 print-type-size     variant `Panicked`: 8192 bytes
-print-type-size         upvar `.array`: 8192 bytes, offset: 0 bytes, alignment: 1 bytes
+print-type-size         upvar `.array`: 8192 bytes
diff --git a/tests/ui/span/issue-39018.stderr b/tests/ui/span/issue-39018.stderr
index 771f21c45da..bae93639271 100644
--- a/tests/ui/span/issue-39018.stderr
+++ b/tests/ui/span/issue-39018.stderr
@@ -21,11 +21,11 @@ LL |     let y = World::Hello + World::Goodbye;
    |             |
    |             World
    |
-note: an implementation of `Add<_>` might be missing for `World`
+note: an implementation of `Add` might be missing for `World`
   --> $DIR/issue-39018.rs:15:1
    |
 LL | enum World {
-   | ^^^^^^^^^^ must implement `Add<_>`
+   | ^^^^^^^^^^ must implement `Add`
 note: the trait `Add` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 
diff --git a/tests/ui/specialization/issue-40582.rs b/tests/ui/specialization/issue-40582.rs
new file mode 100644
index 00000000000..9805933553d
--- /dev/null
+++ b/tests/ui/specialization/issue-40582.rs
@@ -0,0 +1,35 @@
+// check-pass
+// known-bug: #40582
+
+// Should fail. Should not be possible to implement `make_static`.
+
+#![feature(specialization)]
+#![allow(incomplete_features)]
+
+trait FromRef<'a, T: ?Sized> {
+    fn from_ref(r: &'a T) -> Self;
+}
+
+impl<'a, T: ?Sized> FromRef<'a, T> for &'a T {
+    fn from_ref(r: &'a T) -> Self {
+        r
+    }
+}
+
+impl<'a, T: ?Sized, R> FromRef<'a, T> for R {
+    default fn from_ref(_: &'a T) -> Self {
+        unimplemented!()
+    }
+}
+
+fn make_static<T: ?Sized>(data: &T) -> &'static T {
+    fn helper<T: ?Sized, R>(data: &T) -> R {
+        R::from_ref(data)
+    }
+    helper(data)
+}
+
+fn main() {
+    let s = "specialization".to_owned();
+    println!("{:?}", make_static(s.as_str()));
+}
diff --git a/tests/ui/specialization/specialization-default-items-drop-coherence.rs b/tests/ui/specialization/specialization-default-items-drop-coherence.rs
new file mode 100644
index 00000000000..16ad942d5ab
--- /dev/null
+++ b/tests/ui/specialization/specialization-default-items-drop-coherence.rs
@@ -0,0 +1,30 @@
+// check-pass
+// known-bug: #105782
+
+// Should fail. Default items completely drop candidates instead of ambiguity,
+// which is unsound during coherence, since coherence requires completeness.
+
+#![feature(specialization)]
+#![allow(incomplete_features)]
+
+trait Default {
+   type Id;
+}
+
+impl<T> Default for T {
+   default type Id = T;
+}
+
+trait Overlap {
+   type Assoc;
+}
+
+impl Overlap for u32 {
+   type Assoc = usize;
+}
+
+impl Overlap for <u32 as Default>::Id {
+   type Assoc = Box<usize>;
+}
+
+fn main() {}
diff --git a/tests/ui/structs-enums/type-sizes.rs b/tests/ui/structs-enums/type-sizes.rs
index 63e2f3150c0..406e5c8441e 100644
--- a/tests/ui/structs-enums/type-sizes.rs
+++ b/tests/ui/structs-enums/type-sizes.rs
@@ -4,9 +4,14 @@
 #![allow(dead_code)]
 #![feature(never_type)]
 #![feature(pointer_is_aligned)]
+#![feature(ptr_from_ref)]
+#![feature(strict_provenance)]
 
 use std::mem::size_of;
-use std::num::NonZeroU8;
+use std::num::{NonZeroU8, NonZeroU16};
+use std::ptr;
+use std::ptr::NonNull;
+use std::borrow::Cow;
 
 struct t {a: u8, b: i8}
 struct u {a: u8, b: i8, c: u8}
@@ -181,6 +186,41 @@ struct Reorder2 {
     ary: [u8; 6],
 }
 
+// We want the niche in the front, which means we can't treat the array as quasi-aligned more than
+// 4 bytes even though we also want to place it at an 8-aligned offset where possible.
+// So the ideal layout would look like: (char, u32, [u8; 8], u8)
+// The current layout algorithm does (char, [u8; 8], u32, u8)
+#[repr(align(8))]
+struct ReorderWithNiche {
+    a: u32,
+    b: char,
+    c: u8,
+    ary: [u8; 8]
+}
+
+#[repr(C)]
+struct EndNiche8([u8; 7], bool);
+
+#[repr(C)]
+struct MiddleNiche4(u8, u8, bool, u8);
+
+struct ReorderEndNiche {
+    a: EndNiche8,
+    b: MiddleNiche4,
+}
+
+
+// standins for std types which we want to be laid out in a reasonable way
+struct RawVecDummy {
+    ptr: NonNull<u8>,
+    cap: usize,
+}
+
+struct VecDummy {
+    r: RawVecDummy,
+    len: usize,
+}
+
 pub fn main() {
     assert_eq!(size_of::<u8>(), 1 as usize);
     assert_eq!(size_of::<u32>(), 4 as usize);
@@ -270,4 +310,29 @@ pub fn main() {
     let v = Reorder2 {a: 0, b: 0, ary: [0; 6]};
     assert_eq!(size_of::<Reorder2>(), 10);
     assert!((&v.ary).as_ptr().is_aligned_to(2), "[u8; 6] should group with align-2 fields");
+
+    let v = VecDummy { r: RawVecDummy { ptr: NonNull::dangling(), cap: 0 }, len: 1 };
+    assert_eq!(ptr::from_ref(&v), ptr::from_ref(&v.r.ptr).cast(),
+               "sort niches to the front where possible");
+
+    // Ideal layouts: (bool, u8, NonZeroU16) or (NonZeroU16, u8, bool)
+    // Currently the layout algorithm will choose the latter because it doesn't attempt
+    // to aggregate multiple smaller fields to move a niche before a higher-alignment one.
+    let b = BoolInTheMiddle( NonZeroU16::new(1).unwrap(), true, 0);
+    assert!(ptr::from_ref(&b.1).addr() > ptr::from_ref(&b.2).addr());
+
+    assert_eq!(size_of::<Cow<'static, str>>(), size_of::<String>());
+
+    let v = ReorderWithNiche {a: 0, b: ' ', c: 0, ary: [0; 8]};
+    assert!((&v.ary).as_ptr().is_aligned_to(4),
+            "here [u8; 8] should group with _at least_ align-4 fields");
+    assert_eq!(ptr::from_ref(&v), ptr::from_ref(&v.b).cast(),
+               "sort niches to the front where possible");
+
+    // Neither field has a niche at the beginning so the layout algorithm should try move niches to
+    // the end which means the 8-sized field shouldn't be alignment-promoted before the 4-sized one.
+    let v = ReorderEndNiche { a: EndNiche8([0; 7], false), b: MiddleNiche4(0, 0, false, 0) };
+    assert!(ptr::from_ref(&v.a).addr() > ptr::from_ref(&v.b).addr());
+
+
 }
diff --git a/tests/ui/suggestions/invalid-bin-op.stderr b/tests/ui/suggestions/invalid-bin-op.stderr
index e291cedb835..570afcea643 100644
--- a/tests/ui/suggestions/invalid-bin-op.stderr
+++ b/tests/ui/suggestions/invalid-bin-op.stderr
@@ -6,11 +6,11 @@ LL |     let _ = s == t;
    |             |
    |             S<T>
    |
-note: an implementation of `PartialEq<_>` might be missing for `S<T>`
+note: an implementation of `PartialEq` might be missing for `S<T>`
   --> $DIR/invalid-bin-op.rs:5:1
    |
 LL | struct S<T>(T);
-   | ^^^^^^^^^^^ must implement `PartialEq<_>`
+   | ^^^^^^^^^^^ must implement `PartialEq`
 help: consider annotating `S<T>` with `#[derive(PartialEq)]`
    |
 LL + #[derive(PartialEq)]
diff --git a/tests/ui/suggestions/restrict-type-not-param.stderr b/tests/ui/suggestions/restrict-type-not-param.stderr
index 5434472ceec..3c7d42888d8 100644
--- a/tests/ui/suggestions/restrict-type-not-param.stderr
+++ b/tests/ui/suggestions/restrict-type-not-param.stderr
@@ -6,11 +6,11 @@ LL |     a + b
    |     |
    |     Wrapper<T>
    |
-note: an implementation of `Add<_>` might be missing for `Wrapper<T>`
+note: an implementation of `Add<T>` might be missing for `Wrapper<T>`
   --> $DIR/restrict-type-not-param.rs:3:1
    |
 LL | struct Wrapper<T>(T);
-   | ^^^^^^^^^^^^^^^^^ must implement `Add<_>`
+   | ^^^^^^^^^^^^^^^^^ must implement `Add<T>`
 note: the trait `Add` must be implemented
   --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
 help: consider introducing a `where` clause, but there might be an alternative better way to express this requirement
diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed
index b69bad98888..556c9543881 100644
--- a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed
+++ b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.fixed
@@ -11,7 +11,7 @@ fn main() {
     let mut map = HashMap::new();
     map.insert("a", Test { v: 0 });
 
-    for (_k, mut v) in map.iter_mut() {
+    for (_k, v) in map.iter_mut() {
         //~^ HELP use mutable method
         //~| NOTE this iterator yields `&` references
         v.v += 1;
diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs
index 9284410dfa3..b9d49a074ea 100644
--- a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs
+++ b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.rs
@@ -11,7 +11,7 @@ fn main() {
     let mut map = HashMap::new();
     map.insert("a", Test { v: 0 });
 
-    for (_k, mut v) in map.iter() {
+    for (_k, v) in map.iter() {
         //~^ HELP use mutable method
         //~| NOTE this iterator yields `&` references
         v.v += 1;
diff --git a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr
index 74433daa6ac..c442ed6377a 100644
--- a/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr
+++ b/tests/ui/suggestions/suggest-mut-method-for-loop-hashmap.stderr
@@ -1,11 +1,11 @@
 error[E0594]: cannot assign to `v.v`, which is behind a `&` reference
   --> $DIR/suggest-mut-method-for-loop-hashmap.rs:17:9
    |
-LL |     for (_k, mut v) in map.iter() {
-   |                        ----------
-   |                        |   |
-   |                        |   help: use mutable method: `iter_mut()`
-   |                        this iterator yields `&` references
+LL |     for (_k, v) in map.iter() {
+   |                    ----------
+   |                    |   |
+   |                    |   help: use mutable method: `iter_mut()`
+   |                    this iterator yields `&` references
 ...
 LL |         v.v += 1;
    |         ^^^^^^^^ `v` is a `&` reference, so the data it refers to cannot be written
diff --git a/tests/ui/test-attrs/tests-listing-format-json.rs b/tests/ui/test-attrs/tests-listing-format-json.rs
index 18f1521eeeb..5afc2746fe4 100644
--- a/tests/ui/test-attrs/tests-listing-format-json.rs
+++ b/tests/ui/test-attrs/tests-listing-format-json.rs
@@ -3,6 +3,7 @@
 // run-flags: --list --format json -Zunstable-options
 // run-pass
 // check-run-results
+// only-nightly
 // normalize-stdout-test: "fake-test-src-base/test-attrs/" -> "$$DIR/"
 // normalize-stdout-test: "fake-test-src-base\\test-attrs\\" -> "$$DIR/"
 
diff --git a/tests/ui/test-attrs/tests-listing-format-json.run.stdout b/tests/ui/test-attrs/tests-listing-format-json.run.stdout
index b4131e97c34..33cc939b59f 100644
--- a/tests/ui/test-attrs/tests-listing-format-json.run.stdout
+++ b/tests/ui/test-attrs/tests-listing-format-json.run.stdout
@@ -1,5 +1,5 @@
 { "type": "suite", "event": "discovery" }
-{ "type": "test", "event": "discovered", "name": "a_test", "ignore": false, "ignore_message": "", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 20, "start_col": 4, "end_line": 20, "end_col": 10 }
-{ "type": "test", "event": "discovered", "name": "m_test", "ignore": false, "ignore_message": "", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 13, "start_col": 4, "end_line": 13, "end_col": 10 }
-{ "type": "test", "event": "discovered", "name": "z_test", "ignore": true, "ignore_message": "not yet implemented", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 17, "start_col": 4, "end_line": 17, "end_col": 10 }
+{ "type": "test", "event": "discovered", "name": "a_test", "ignore": false, "ignore_message": "", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 21, "start_col": 4, "end_line": 21, "end_col": 10 }
+{ "type": "test", "event": "discovered", "name": "m_test", "ignore": false, "ignore_message": "", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 14, "start_col": 4, "end_line": 14, "end_col": 10 }
+{ "type": "test", "event": "discovered", "name": "z_test", "ignore": true, "ignore_message": "not yet implemented", "source_path": "$DIR/tests-listing-format-json.rs", "start_line": 18, "start_col": 4, "end_line": 18, "end_col": 10 }
 { "type": "suite", "event": "completed", "tests": 3, "benchmarks": 0, "total": 3, "ignored": 1 }
diff --git a/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs b/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs
new file mode 100644
index 00000000000..c282e2185bc
--- /dev/null
+++ b/tests/ui/thread-local/thread-local-static-ref-use-after-free.rs
@@ -0,0 +1,46 @@
+// check-pass
+// known-bug: #49682
+// edition:2021
+
+// Should fail. Keeping references to thread local statics can result in a
+// use-after-free.
+
+#![feature(thread_local)]
+
+use std::sync::atomic::{AtomicUsize, Ordering};
+use std::thread;
+
+#[allow(dead_code)]
+#[thread_local]
+static FOO: AtomicUsize = AtomicUsize::new(0);
+
+#[allow(dead_code)]
+async fn bar() {}
+
+#[allow(dead_code)]
+async fn foo() {
+    let r = &FOO;
+    bar().await;
+    r.load(Ordering::SeqCst);
+}
+
+fn main() {
+    // &FOO = 0x7fd1e9cbf6d0
+    _ = thread::spawn(|| {
+        let g = foo();
+        println!("&FOO = {:p}", &FOO);
+        g
+    })
+    .join()
+    .unwrap();
+
+    // &FOO = 0x7fd1e9cc0f50
+    println!("&FOO = {:p}", &FOO);
+
+    // &FOO = 0x7fd1e9cbf6d0
+    thread::spawn(move || {
+        println!("&FOO = {:p}", &FOO);
+    })
+    .join()
+    .unwrap();
+}
diff --git a/tests/ui/traits/new-solver/exponential-trait-goals.rs b/tests/ui/traits/new-solver/exponential-trait-goals.rs
new file mode 100644
index 00000000000..b37f09ee185
--- /dev/null
+++ b/tests/ui/traits/new-solver/exponential-trait-goals.rs
@@ -0,0 +1,20 @@
+// compile-flags: -Ztrait-solver=next
+
+trait Trait {}
+
+struct W<T>(T);
+
+impl<T, U> Trait for W<(W<T>, W<U>)>
+where
+    W<T>: Trait,
+    W<U>: Trait,
+{
+}
+
+fn impls<T: Trait>() {}
+
+fn main() {
+    impls::<W<_>>();
+    //~^ ERROR type annotations needed
+    //~| ERROR overflow evaluating the requirement `W<_>: Trait`
+}
diff --git a/tests/ui/traits/new-solver/exponential-trait-goals.stderr b/tests/ui/traits/new-solver/exponential-trait-goals.stderr
new file mode 100644
index 00000000000..28a99cbbca6
--- /dev/null
+++ b/tests/ui/traits/new-solver/exponential-trait-goals.stderr
@@ -0,0 +1,23 @@
+error[E0282]: type annotations needed
+  --> $DIR/exponential-trait-goals.rs:17:5
+   |
+LL |     impls::<W<_>>();
+   |     ^^^^^^^^^^^^^ cannot infer type of the type parameter `T` declared on the function `impls`
+
+error[E0275]: overflow evaluating the requirement `W<_>: Trait`
+  --> $DIR/exponential-trait-goals.rs:17:5
+   |
+LL |     impls::<W<_>>();
+   |     ^^^^^^^^^^^^^
+   |
+   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`exponential_trait_goals`)
+note: required by a bound in `impls`
+  --> $DIR/exponential-trait-goals.rs:14:13
+   |
+LL | fn impls<T: Trait>() {}
+   |             ^^^^^ required by this bound in `impls`
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0275, E0282.
+For more information about an error, try `rustc --explain E0275`.
diff --git a/tests/ui/type/type-unsatisfiable.usage.stderr b/tests/ui/type/type-unsatisfiable.usage.stderr
index 56e2e30afac..0b76ba8eb7e 100644
--- a/tests/ui/type/type-unsatisfiable.usage.stderr
+++ b/tests/ui/type/type-unsatisfiable.usage.stderr
@@ -1,8 +1,8 @@
-error[E0369]: cannot subtract `(dyn Vector2<ScalarType = i32> + 'static)` from `dyn Vector2<ScalarType = i32>`
+error[E0369]: cannot subtract `dyn Vector2<ScalarType = i32>` from `dyn Vector2<ScalarType = i32>`
   --> $DIR/type-unsatisfiable.rs:57:20
    |
 LL |     let bar = *hey - *word;
-   |               ---- ^ ----- (dyn Vector2<ScalarType = i32> + 'static)
+   |               ---- ^ ----- dyn Vector2<ScalarType = i32>
    |               |
    |               dyn Vector2<ScalarType = i32>