about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/assembly/slice-is_ascii.rs35
-rw-r--r--tests/codegen/abi-main-signature-16bit-c-int.rs1
-rw-r--r--tests/codegen/align-offset.rs78
-rw-r--r--tests/codegen/ascii-char.rs37
-rw-r--r--tests/codegen/call-llvm-intrinsics.rs1
-rw-r--r--tests/codegen/catch-unwind.rs2
-rw-r--r--tests/codegen/enable-lto-unit-splitting.rs10
-rw-r--r--tests/codegen/fewer-names.rs14
-rw-r--r--tests/codegen/global_asm.rs1
-rw-r--r--tests/codegen/global_asm_include.rs1
-rw-r--r--tests/codegen/global_asm_x2.rs1
-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/codegen/loongarch-abi/call-llvm-intrinsics.rs31
-rw-r--r--tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs293
-rw-r--r--tests/codegen/mem-replace-big-type.rs22
-rw-r--r--tests/codegen/mem-replace-direct-memcpy.rs33
-rw-r--r--tests/codegen/mem-replace-simple-type.rs34
-rw-r--r--tests/codegen/nrvo.rs2
-rw-r--r--tests/codegen/repr-transparent-aggregates-1.rs1
-rw-r--r--tests/codegen/repr-transparent-aggregates-2.rs1
-rw-r--r--tests/codegen/repr-transparent.rs1
-rw-r--r--tests/codegen/sanitizer-cfi-add-canonical-jump-tables-flag.rs2
-rw-r--r--tests/codegen/sanitizer-cfi-add-enable-split-lto-unit-flag.rs11
-rw-r--r--tests/codegen/sanitizer-cfi-emit-type-checks-attr-no-sanitize.rs18
-rw-r--r--tests/codegen/sanitizer-cfi-emit-type-checks.rs3
-rw-r--r--tests/codegen/sanitizer-cfi-emit-type-metadata-attr-cfi-encoding.rs48
-rw-r--r--tests/codegen/sanitizer-cfi-emit-type-metadata-id-itanium-cxx-abi.rs319
-rw-r--r--tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs31
-rw-r--r--tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs31
-rw-r--r--tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs31
-rw-r--r--tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi.rs6
-rw-r--r--tests/codegen/sanitizer-cfi-generalize-pointers.rs46
-rw-r--r--tests/codegen/sanitizer-cfi-normalize-integers.rs83
-rw-r--r--tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs30
-rw-r--r--tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs44
-rw-r--r--tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs44
-rw-r--r--tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs44
-rw-r--r--tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs12
-rw-r--r--tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle.rs27
-rw-r--r--tests/codegen/slice-iter-nonnull.rs42
-rw-r--r--tests/codegen/split-lto-unit.rs11
-rw-r--r--tests/codegen/var-names.rs4
-rw-r--r--tests/codegen/vec-shrink-panik.rs4
-rw-r--r--tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.rs1
-rw-r--r--tests/debuginfo/embedded-visualizer.rs1
-rw-r--r--tests/incremental/change_crate_dep_kind.rs1
-rw-r--r--tests/incremental/issue-80691-bad-eval-cache.rs1
-rw-r--r--tests/mir-opt/bool_compare.opt1.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt1.InstCombine.diff)4
-rw-r--r--tests/mir-opt/bool_compare.opt2.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt2.InstCombine.diff)4
-rw-r--r--tests/mir-opt/bool_compare.opt3.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt3.InstCombine.diff)4
-rw-r--r--tests/mir-opt/bool_compare.opt4.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt4.InstCombine.diff)4
-rw-r--r--tests/mir-opt/bool_compare.rs10
-rw-r--r--tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir178
-rw-r--r--tests/mir-opt/casts.redundant.InstSimplify.diff (renamed from tests/mir-opt/casts.redundant.InstCombine.diff)4
-rw-r--r--tests/mir-opt/casts.rs2
-rw-r--r--tests/mir-opt/combine_array_len.norm2.InstSimplify.diff (renamed from tests/mir-opt/combine_array_len.norm2.InstCombine.diff)4
-rw-r--r--tests/mir-opt/combine_array_len.rs4
-rw-r--r--tests/mir-opt/combine_clone_of_primitives.rs4
-rw-r--r--tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.diff (renamed from tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff)4
-rw-r--r--tests/mir-opt/combine_transmutes.adt_transmutes.InstSimplify.diff (renamed from tests/mir-opt/combine_transmutes.adt_transmutes.InstCombine.diff)4
-rw-r--r--tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff (renamed from tests/mir-opt/combine_transmutes.identity_transmutes.InstCombine.diff)4
-rw-r--r--tests/mir-opt/combine_transmutes.integer_transmutes.InstSimplify.diff (renamed from tests/mir-opt/combine_transmutes.integer_transmutes.InstCombine.diff)4
-rw-r--r--tests/mir-opt/combine_transmutes.rs8
-rw-r--r--tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir32
-rw-r--r--tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir36
-rw-r--r--tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir30
-rw-r--r--tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir32
-rw-r--r--tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir16
-rw-r--r--tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir14
-rw-r--r--tests/mir-opt/const_prop/address_of_pair.fn0.ConstProp.diff46
-rw-r--r--tests/mir-opt/const_prop/address_of_pair.rs17
-rw-r--r--tests/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff18
-rw-r--r--tests/mir-opt/const_prop/bad_op_mod_by_zero.rs1
-rw-r--r--tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.32bit.diff46
-rw-r--r--tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.64bit.diff46
-rw-r--r--tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs3
-rw-r--r--tests/mir-opt/const_prop/invalid_constant.main.ConstProp.diff22
-rw-r--r--tests/mir-opt/const_prop/invalid_constant.rs2
-rw-r--r--tests/mir-opt/const_prop/large_array_index.main.ConstProp.32bit.diff9
-rw-r--r--tests/mir-opt/const_prop/large_array_index.main.ConstProp.64bit.diff9
-rw-r--r--tests/mir-opt/const_prop/large_array_index.rs2
-rw-r--r--tests/mir-opt/const_prop/mult_by_zero.rs3
-rw-r--r--tests/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff5
-rw-r--r--tests/mir-opt/const_prop/mutable_variable.main.ConstProp.diff1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable.rs3
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff25
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate.rs3
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff11
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs3
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff3
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs3
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff33
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_no_prop.rs3
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff42
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs3
-rw-r--r--tests/mir-opt/const_prop/offset_of.concrete.ConstProp.diff17
-rw-r--r--tests/mir-opt/const_prop/offset_of.generic.ConstProp.diff9
-rw-r--r--tests/mir-opt/const_prop/offset_of.rs3
-rw-r--r--tests/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff5
-rw-r--r--tests/mir-opt/const_prop/read_immutable_static.rs3
-rw-r--r--tests/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff23
-rw-r--r--tests/mir-opt/const_prop/reify_fn_ptr.rs1
-rw-r--r--tests/mir-opt/const_prop/repeat.main.ConstProp.32bit.diff6
-rw-r--r--tests/mir-opt/const_prop/repeat.main.ConstProp.64bit.diff6
-rw-r--r--tests/mir-opt/const_prop/repeat.rs5
-rw-r--r--tests/mir-opt/const_prop/return_place.add.PreCodegen.before.mir6
-rw-r--r--tests/mir-opt/const_prop/return_place.rs1
-rw-r--r--tests/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff14
-rw-r--r--tests/mir-opt/const_prop/scalar_literal_propagation.rs1
-rw-r--r--tests/mir-opt/const_prop/slice_len.rs2
-rw-r--r--tests/mir-opt/const_prop/switch_int.main.ConstProp.diff4
-rw-r--r--tests/mir-opt/const_prop/switch_int.main.SimplifyConstCondition-after-const-prop.diff4
-rw-r--r--tests/mir-opt/const_prop/switch_int.rs2
-rw-r--r--tests/mir-opt/const_prop/transmute.from_char.ConstProp.32bit.diff (renamed from tests/mir-opt/const_prop/transmute.from_char.ConstProp.diff)0
-rw-r--r--tests/mir-opt/const_prop/transmute.from_char.ConstProp.64bit.diff15
-rw-r--r--tests/mir-opt/const_prop/transmute.invalid_bool.ConstProp.32bit.diff (renamed from tests/mir-opt/const_prop/transmute.invalid_bool.ConstProp.diff)3
-rw-r--r--tests/mir-opt/const_prop/transmute.invalid_bool.ConstProp.64bit.diff15
-rw-r--r--tests/mir-opt/const_prop/transmute.invalid_char.ConstProp.32bit.diff (renamed from tests/mir-opt/const_prop/transmute.invalid_char.ConstProp.diff)3
-rw-r--r--tests/mir-opt/const_prop/transmute.invalid_char.ConstProp.64bit.diff15
-rw-r--r--tests/mir-opt/const_prop/transmute.less_as_i8.ConstProp.32bit.diff (renamed from tests/mir-opt/const_prop/transmute.less_as_i8.ConstProp.diff)0
-rw-r--r--tests/mir-opt/const_prop/transmute.less_as_i8.ConstProp.64bit.diff23
-rw-r--r--tests/mir-opt/const_prop/transmute.rs2
-rw-r--r--tests/mir-opt/const_prop/transmute.undef_union_as_integer.ConstProp.32bit.diff (renamed from tests/mir-opt/const_prop/transmute.undef_union_as_integer.ConstProp.diff)0
-rw-r--r--tests/mir-opt/const_prop/transmute.undef_union_as_integer.ConstProp.64bit.diff22
-rw-r--r--tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.32bit.diff (renamed from tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.diff)6
-rw-r--r--tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.64bit.diff27
-rw-r--r--tests/mir-opt/const_prop/transmute.unreachable_direct.ConstProp.32bit.diff (renamed from tests/mir-opt/const_prop/transmute.unreachable_direct.ConstProp.diff)0
-rw-r--r--tests/mir-opt/const_prop/transmute.unreachable_direct.ConstProp.64bit.diff25
-rw-r--r--tests/mir-opt/const_prop/transmute.unreachable_mut.ConstProp.32bit.diff (renamed from tests/mir-opt/const_prop/transmute.unreachable_mut.ConstProp.diff)6
-rw-r--r--tests/mir-opt/const_prop/transmute.unreachable_mut.ConstProp.64bit.diff31
-rw-r--r--tests/mir-opt/const_prop/transmute.unreachable_ref.ConstProp.32bit.diff (renamed from tests/mir-opt/const_prop/transmute.unreachable_ref.ConstProp.diff)6
-rw-r--r--tests/mir-opt/const_prop/transmute.unreachable_ref.ConstProp.64bit.diff27
-rw-r--r--tests/mir-opt/const_prop/transmute.valid_char.ConstProp.32bit.diff (renamed from tests/mir-opt/const_prop/transmute.valid_char.ConstProp.diff)0
-rw-r--r--tests/mir-opt/const_prop/transmute.valid_char.ConstProp.64bit.diff15
-rw-r--r--tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff13
-rw-r--r--tests/mir-opt/const_prop/tuple_literal_propagation.rs1
-rw-r--r--tests/mir-opt/const_prop/while_let_loops.change_loop_body.ConstProp.diff (renamed from tests/mir-opt/while_let_loops.change_loop_body.ConstProp.diff)27
-rw-r--r--tests/mir-opt/const_prop/while_let_loops.rs (renamed from tests/mir-opt/while_let_loops.rs)2
-rw-r--r--tests/mir-opt/const_prop_miscompile.bar.ConstProp.diff3
-rw-r--r--tests/mir-opt/const_prop_miscompile.foo.ConstProp.diff3
-rw-r--r--tests/mir-opt/copy-prop/borrowed_local.f.CopyProp.diff3
-rw-r--r--tests/mir-opt/dead-store-elimination/place_mention.main.DeadStoreElimination.diff25
-rw-r--r--tests/mir-opt/dead-store-elimination/place_mention.rs9
-rw-r--r--tests/mir-opt/dont_yeet_assert.generic.InstSimplify.diff (renamed from tests/mir-opt/dont_yeet_assert.generic.InstCombine.diff)4
-rw-r--r--tests/mir-opt/dont_yeet_assert.rs4
-rw-r--r--tests/mir-opt/equal_true.opt.InstSimplify.diff (renamed from tests/mir-opt/equal_true.opt.InstCombine.diff)4
-rw-r--r--tests/mir-opt/equal_true.rs4
-rw-r--r--tests/mir-opt/inline/inline_into_box_place.main.Inline.diff12
-rw-r--r--tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir14
-rw-r--r--tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir14
-rw-r--r--tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.diff129
-rw-r--r--tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.mir120
-rw-r--r--tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.Inline.diff129
-rw-r--r--tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.PreCodegen.after.mir120
-rw-r--r--tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.diff8
-rw-r--r--tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir8
-rw-r--r--tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff (renamed from tests/mir-opt/instcombine_duplicate_switch_targets.assert_zero.InstCombine.diff)16
-rw-r--r--tests/mir-opt/instsimplify_duplicate_switch_targets.rs (renamed from tests/mir-opt/instcombine_duplicate_switch_targets.rs)4
-rw-r--r--tests/mir-opt/intrinsic_asserts.generic.InstSimplify.diff (renamed from tests/mir-opt/intrinsic_asserts.generic.InstCombine.diff)4
-rw-r--r--tests/mir-opt/intrinsic_asserts.panics.InstSimplify.diff (renamed from tests/mir-opt/intrinsic_asserts.panics.InstCombine.diff)4
-rw-r--r--tests/mir-opt/intrinsic_asserts.removable.InstSimplify.diff (renamed from tests/mir-opt/intrinsic_asserts.removable.InstCombine.diff)4
-rw-r--r--tests/mir-opt/intrinsic_asserts.rs6
-rw-r--r--tests/mir-opt/issue_78192.f.InstSimplify.diff (renamed from tests/mir-opt/issue_78192.f.InstCombine.diff)4
-rw-r--r--tests/mir-opt/issue_78192.rs2
-rw-r--r--tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff4
-rw-r--r--tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff2
-rw-r--r--tests/mir-opt/lower_intrinsics.rs5
-rw-r--r--tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.diff36
-rw-r--r--tests/mir-opt/not_equal_false.opt.InstSimplify.diff (renamed from tests/mir-opt/not_equal_false.opt.InstCombine.diff)4
-rw-r--r--tests/mir-opt/not_equal_false.rs4
-rw-r--r--tests/mir-opt/nrvo_miscompile_111005.rs22
-rw-r--r--tests/mir-opt/nrvo_miscompile_111005.wrong.RenameReturnPlace.diff18
-rw-r--r--tests/mir-opt/pre-codegen/mem_replace.manual_replace.PreCodegen.after.mir20
-rw-r--r--tests/mir-opt/pre-codegen/mem_replace.mem_replace.PreCodegen.after.mir57
-rw-r--r--tests/mir-opt/pre-codegen/mem_replace.rs17
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_get_unchecked_mut_range.PreCodegen.after.mir124
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.slice_index_range.PreCodegen.after.mir10
-rw-r--r--tests/mir-opt/reference_prop.dominate_storage.ReferencePropagation.diff38
-rw-r--r--tests/mir-opt/reference_prop.maybe_dead.ReferencePropagation.diff56
-rw-r--r--tests/mir-opt/reference_prop.multiple_storage.ReferencePropagation.diff27
-rw-r--r--tests/mir-opt/reference_prop.read_through_raw.ReferencePropagation.diff24
-rw-r--r--tests/mir-opt/reference_prop.reference_propagation.ReferencePropagation.diff375
-rw-r--r--tests/mir-opt/reference_prop.reference_propagation_const_ptr.ReferencePropagation.diff431
-rw-r--r--tests/mir-opt/reference_prop.reference_propagation_mut.ReferencePropagation.diff372
-rw-r--r--tests/mir-opt/reference_prop.reference_propagation_mut_ptr.ReferencePropagation.diff378
-rw-r--r--tests/mir-opt/reference_prop.rs456
-rw-r--r--tests/mir-opt/slice_filter.rs2
-rw-r--r--tests/mir-opt/slice_filter.variant_a-{closure#0}.CopyProp.diff16
-rw-r--r--tests/mir-opt/slice_filter.variant_a-{closure#0}.DestinationPropagation.diff104
-rw-r--r--tests/mir-opt/slice_filter.variant_a-{closure#0}.ReferencePropagation.diff247
-rw-r--r--tests/mir-opt/slice_filter.variant_b-{closure#0}.ReferencePropagation.diff103
-rw-r--r--tests/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir17
-rw-r--r--tests/pretty/offset_of.rs4
-rw-r--r--tests/pretty/tests-are-sorted.pp1
-rw-r--r--tests/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs2
-rw-r--r--tests/run-make/branch-protection-check-IBT/Makefile15
-rw-r--r--tests/run-make/branch-protection-check-IBT/main.rs3
-rw-r--r--tests/run-make/c-unwind-abi-catch-lib-panic/Makefile1
-rw-r--r--tests/run-make/c-unwind-abi-catch-lib-panic/main.rs1
-rw-r--r--tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs1
-rw-r--r--tests/run-make/c-unwind-abi-catch-panic/Makefile1
-rw-r--r--tests/run-make/c-unwind-abi-catch-panic/main.rs1
-rw-r--r--tests/run-make/const_fn_mir/Makefile1
-rw-r--r--tests/run-make/core-no-oom-handling/Makefile6
-rw-r--r--tests/run-make/coverage-reports/Makefile2
-rw-r--r--tests/run-make/coverage-reports/expected_show_coverage.test_harness.txt11
-rw-r--r--tests/run-make/coverage/test_harness.rs10
-rw-r--r--tests/run-make/debug-assertions/Makefile1
-rw-r--r--tests/run-make/forced-unwind-terminate-pof/Makefile9
-rw-r--r--tests/run-make/forced-unwind-terminate-pof/foo.rs17
-rw-r--r--tests/run-make/foreign-double-unwind/Makefile1
-rw-r--r--tests/run-make/foreign-double-unwind/foo.rs2
-rw-r--r--tests/run-make/foreign-exceptions/Makefile1
-rw-r--r--tests/run-make/foreign-exceptions/foo.rs2
-rw-r--r--tests/run-make/foreign-rust-exceptions/Makefile1
-rw-r--r--tests/run-make/foreign-rust-exceptions/bar.rs1
-rw-r--r--tests/run-make/foreign-rust-exceptions/foo.rs2
-rw-r--r--tests/run-make/issue-109934-lto-debuginfo/Makefile12
-rw-r--r--tests/run-make/issue-109934-lto-debuginfo/lib.rs9
-rw-r--r--tests/run-make/libtest-json/Makefile1
-rw-r--r--tests/run-make/libtest-junit/Makefile19
-rw-r--r--tests/run-make/libtest-junit/f.rs23
-rw-r--r--tests/run-make/libtest-junit/output-default.xml1
-rw-r--r--tests/run-make/libtest-junit/output-stdout-success.xml1
-rwxr-xr-xtests/run-make/libtest-junit/validate_junit.py12
-rw-r--r--tests/run-make/raw-dylib-alt-calling-convention/lib.rs1
-rw-r--r--tests/run-make/raw-dylib-c/lib.rs2
-rw-r--r--tests/run-make/raw-dylib-cross-compilation/lib.rs1
-rw-r--r--tests/run-make/raw-dylib-custom-dlltool/Makefile11
-rw-r--r--tests/run-make/raw-dylib-custom-dlltool/lib.rs10
-rw-r--r--tests/run-make/raw-dylib-custom-dlltool/output.txt1
-rw-r--r--tests/run-make/raw-dylib-custom-dlltool/script.cmd2
-rw-r--r--tests/run-make/raw-dylib-import-name-type/driver.rs1
-rw-r--r--tests/run-make/raw-dylib-inline-cross-dylib/driver.rs2
-rw-r--r--tests/run-make/raw-dylib-inline-cross-dylib/lib.rs2
-rw-r--r--tests/run-make/raw-dylib-link-ordinal/lib.rs2
-rw-r--r--tests/run-make/raw-dylib-stdcall-ordinal/lib.rs2
-rw-r--r--tests/run-make/static-unwinding/Makefile1
-rw-r--r--tests/run-make/test-benches/Makefile1
-rw-r--r--tests/run-make/valid-print-requests/valid-print-requests.stderr2
-rw-r--r--tests/rustdoc-gui/search-corrections.goml56
-rw-r--r--tests/rustdoc-js/generics-trait.js27
-rw-r--r--tests/rustdoc-js/slice-array.js65
-rw-r--r--tests/rustdoc-js/slice-array.rs16
-rw-r--r--tests/rustdoc-json/fn_pointer/abi.rs1
-rw-r--r--tests/rustdoc-json/fns/abi.rs1
-rw-r--r--tests/rustdoc-json/methods/abi.rs1
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg-test.stderr (renamed from tests/rustdoc-ui/check-cfg-test.stderr)0
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs (renamed from tests/rustdoc-ui/check-cfg-unstable.rs)0
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg-unstable.stderr (renamed from tests/rustdoc-ui/check-cfg-unstable.stderr)0
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg.rs (renamed from tests/rustdoc-ui/check-cfg.rs)0
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg.stderr (renamed from tests/rustdoc-ui/check-cfg.stderr)2
-rw-r--r--tests/rustdoc-ui/doctest/auxiliary/extern_macros.rs (renamed from tests/rustdoc-ui/auxiliary/extern_macros.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/block-doc-comment.rs (renamed from tests/rustdoc-ui/block-doc-comment.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/block-doc-comment.stdout (renamed from tests/rustdoc-ui/block-doc-comment.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/cfg-test.rs (renamed from tests/rustdoc-ui/cfg-test.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/cfg-test.stdout (renamed from tests/rustdoc-ui/cfg-test.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/check-attr-test.rs (renamed from tests/rustdoc-ui/check-attr-test.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/check-attr-test.stderr (renamed from tests/rustdoc-ui/check-attr-test.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/check-cfg-test.rs (renamed from tests/rustdoc-ui/check-cfg-test.rs)4
-rw-r--r--tests/rustdoc-ui/doctest/check-cfg-test.stderr11
-rw-r--r--tests/rustdoc-ui/doctest/check-cfg-test.stdout (renamed from tests/rustdoc-ui/check-cfg-test.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/display-output.rs (renamed from tests/rustdoc-ui/display-output.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/display-output.stdout (renamed from tests/rustdoc-ui/display-output.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs (renamed from tests/rustdoc-ui/doc-comment-multi-line-attr.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.stdout (renamed from tests/rustdoc-ui/doc-comment-multi-line-attr.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs (renamed from tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.stdout (renamed from tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-attr-pass.rs (renamed from tests/rustdoc-ui/doc-test-attr-pass.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-attr.rs (renamed from tests/rustdoc-ui/doc-test-attr.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-attr.stderr (renamed from tests/rustdoc-ui/doc-test-attr.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs (renamed from tests/rustdoc-ui/doc-test-doctest-feature.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-doctest-feature.stdout (renamed from tests/rustdoc-ui/doc-test-doctest-feature.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs (renamed from tests/rustdoc-ui/doc-test-rustdoc-feature.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.stdout (renamed from tests/rustdoc-ui/doc-test-rustdoc-feature.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doctest-edition.rs (renamed from tests/rustdoc-ui/doctest-edition.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/doctest-edition.stderr (renamed from tests/rustdoc-ui/doctest-edition.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs (renamed from tests/rustdoc-ui/doctest-multiline-crate-attribute.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.stdout (renamed from tests/rustdoc-ui/doctest-multiline-crate-attribute.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/doctest-output.rs (renamed from tests/rustdoc-ui/doctest-output.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/doctest-output.stdout (renamed from tests/rustdoc-ui/doctest-output.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs (renamed from tests/rustdoc-ui/failed-doctest-compile-fail.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-compile-fail.stdout (renamed from tests/rustdoc-ui/failed-doctest-compile-fail.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs (renamed from tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.stdout (renamed from tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs (renamed from tests/rustdoc-ui/failed-doctest-missing-codes.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-missing-codes.stdout (renamed from tests/rustdoc-ui/failed-doctest-missing-codes.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs (renamed from tests/rustdoc-ui/failed-doctest-output-windows.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout (renamed from tests/rustdoc-ui/failed-doctest-output-windows.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output.rs (renamed from tests/rustdoc-ui/failed-doctest-output.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-output.stdout (renamed from tests/rustdoc-ui/failed-doctest-output.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs (renamed from tests/rustdoc-ui/failed-doctest-should-panic.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout (renamed from tests/rustdoc-ui/failed-doctest-should-panic.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/no-run-flag-error.rs (renamed from tests/rustdoc-ui/no-run-flag-error.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/no-run-flag-error.stderr (renamed from tests/rustdoc-ui/no-run-flag-error.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/no-run-flag.rs (renamed from tests/rustdoc-ui/no-run-flag.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/no-run-flag.stdout (renamed from tests/rustdoc-ui/no-run-flag.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/nocapture-fail.rs (renamed from tests/rustdoc-ui/nocapture-fail.rs)4
-rw-r--r--tests/rustdoc-ui/doctest/nocapture-fail.stderr (renamed from tests/rustdoc-ui/nocapture-fail.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/nocapture-fail.stdout (renamed from tests/rustdoc-ui/nocapture-fail.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/nocapture.rs (renamed from tests/rustdoc-ui/nocapture.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/nocapture.stderr (renamed from tests/rustdoc-ui/nocapture.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/nocapture.stdout (renamed from tests/rustdoc-ui/nocapture.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/private-doc-test.rs (renamed from tests/rustdoc-ui/private-doc-test.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/private-item-doc-test.rs (renamed from tests/rustdoc-ui/private-item-doc-test.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/private-item-doc-test.stderr (renamed from tests/rustdoc-ui/private-item-doc-test.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/private-public-item-doc-test.rs (renamed from tests/rustdoc-ui/private-public-item-doc-test.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/private-public-item-doc-test.stderr (renamed from tests/rustdoc-ui/private-public-item-doc-test.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/public-reexported-item-doc-test.rs (renamed from tests/rustdoc-ui/public-reexported-item-doc-test.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/run-directory.correct.stdout (renamed from tests/rustdoc-ui/run-directory.correct.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/run-directory.incorrect.stdout (renamed from tests/rustdoc-ui/run-directory.incorrect.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/run-directory.rs (renamed from tests/rustdoc-ui/run-directory.rs)6
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail1.rs (renamed from tests/rustdoc-ui/test-compile-fail1.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail1.stderr (renamed from tests/rustdoc-ui/test-compile-fail1.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail2.rs (renamed from tests/rustdoc-ui/test-compile-fail2.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail2.stderr (renamed from tests/rustdoc-ui/test-compile-fail2.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail3.rs (renamed from tests/rustdoc-ui/test-compile-fail3.rs)0
-rw-r--r--tests/rustdoc-ui/doctest/test-compile-fail3.stderr (renamed from tests/rustdoc-ui/test-compile-fail3.stderr)0
-rw-r--r--tests/rustdoc-ui/doctest/test-no_std.rs (renamed from tests/rustdoc-ui/test-no_std.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/test-no_std.stdout (renamed from tests/rustdoc-ui/test-no_std.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/test-type.rs (renamed from tests/rustdoc-ui/test-type.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/test-type.stdout (renamed from tests/rustdoc-ui/test-type.stdout)0
-rw-r--r--tests/rustdoc-ui/doctest/unparseable-doc-test.rs (renamed from tests/rustdoc-ui/unparseable-doc-test.rs)2
-rw-r--r--tests/rustdoc-ui/doctest/unparseable-doc-test.stdout (renamed from tests/rustdoc-ui/unparseable-doc-test.stdout)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.rs (renamed from tests/rustdoc-ui/generate-link-to-definition-opt-unstable.rs)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.stderr (renamed from tests/rustdoc-ui/generate-link-to-definition-opt-unstable.stderr)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.rs (renamed from tests/rustdoc-ui/generate-link-to-definition-opt.rs)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.stderr (renamed from tests/rustdoc-ui/generate-link-to-definition-opt.stderr)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.rs (renamed from tests/rustdoc-ui/generate-link-to-definition-opt2.rs)0
-rw-r--r--tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.stderr (renamed from tests/rustdoc-ui/generate-link-to-definition-opt2.stderr)0
-rw-r--r--tests/rustdoc-ui/ice-bug-report-url.rs14
-rw-r--r--tests/rustdoc-ui/ice-bug-report-url.stderr16
-rw-r--r--tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.rs (renamed from tests/rustdoc-ui/assoc-item-not-in-scope.rs)0
-rw-r--r--tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr (renamed from tests/rustdoc-ui/assoc-item-not-in-scope.stderr)0
-rw-r--r--tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.rs (renamed from tests/rustdoc-ui/deny-intra-link-resolution-failure.rs)0
-rw-r--r--tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.stderr (renamed from tests/rustdoc-ui/deny-intra-link-resolution-failure.stderr)0
-rw-r--r--tests/rustdoc-ui/intra-doc/pub-export-lint.rs (renamed from tests/rustdoc-ui/pub-export-lint.rs)0
-rw-r--r--tests/rustdoc-ui/intra-doc/pub-export-lint.stderr (renamed from tests/rustdoc-ui/pub-export-lint.stderr)0
-rw-r--r--tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs (renamed from tests/rustdoc-ui/reference-link-reports-error-once.rs)0
-rw-r--r--tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.stderr (renamed from tests/rustdoc-ui/reference-link-reports-error-once.stderr)0
-rw-r--r--tests/rustdoc-ui/intra-doc/reference-links.rs (renamed from tests/rustdoc-ui/reference-links.rs)0
-rw-r--r--tests/rustdoc-ui/intra-doc/reference-links.stderr (renamed from tests/rustdoc-ui/reference-links.stderr)0
-rw-r--r--tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.rs12
-rw-r--r--tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr25
-rw-r--r--tests/rustdoc-ui/issue-110629-private-type-cycle.rs15
-rw-r--r--tests/rustdoc-ui/issues/auxiliary/empty-fn.rs (renamed from tests/rustdoc-ui/auxiliary/empty-fn.rs)0
-rw-r--r--tests/rustdoc-ui/issues/auxiliary/issue-61592.rs (renamed from tests/rustdoc-ui/auxiliary/issue-61592.rs)0
-rw-r--r--tests/rustdoc-ui/issues/auxiliary/panic-handler.rs (renamed from tests/rustdoc-ui/auxiliary/panic-handler.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-101076.rs (renamed from tests/rustdoc-ui/issue-101076.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-102986.rs (renamed from tests/rustdoc-ui/issue-102986.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-102986.stderr (renamed from tests/rustdoc-ui/issue-102986.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-103997.rs (renamed from tests/rustdoc-ui/issue-103997.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-103997.stderr (renamed from tests/rustdoc-ui/issue-103997.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-105334.rs (renamed from tests/rustdoc-ui/issue-105334.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-105334.stderr (renamed from tests/rustdoc-ui/issue-105334.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-105737.rs (renamed from tests/rustdoc-ui/issue-105737.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-105737.stderr (renamed from tests/rustdoc-ui/issue-105737.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-105742.rs (renamed from tests/rustdoc-ui/issue-105742.rs)8
-rw-r--r--tests/rustdoc-ui/issues/issue-105742.stderr (renamed from tests/rustdoc-ui/issue-105742.stderr)198
-rw-r--r--tests/rustdoc-ui/issues/issue-106213.rs (renamed from tests/rustdoc-ui/issue-106213.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-106213.stderr (renamed from tests/rustdoc-ui/issue-106213.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-106226.rs (renamed from tests/rustdoc-ui/issue-106226.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-106226.stderr (renamed from tests/rustdoc-ui/issue-106226.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-107918.rs (renamed from tests/rustdoc-ui/issue-107918.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs (renamed from tests/rustdoc-ui/issue-109282-import-inline-merge.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-110900.rs (renamed from tests/rustdoc-ui/issue-110900.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-58473-2.rs (renamed from tests/rustdoc-ui/issue-58473-2.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-58473.rs (renamed from tests/rustdoc-ui/issue-58473.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61592-2.rs (renamed from tests/rustdoc-ui/issue-61592-2.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61592-2.stderr (renamed from tests/rustdoc-ui/issue-61592-2.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61592.rs (renamed from tests/rustdoc-ui/issue-61592.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61592.stderr (renamed from tests/rustdoc-ui/issue-61592.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61732.rs (renamed from tests/rustdoc-ui/issue-61732.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-61732.stderr (renamed from tests/rustdoc-ui/issue-61732.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-74134.private.stderr (renamed from tests/rustdoc-ui/issue-74134.private.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-74134.public.stderr (renamed from tests/rustdoc-ui/issue-74134.public.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-74134.rs (renamed from tests/rustdoc-ui/issue-74134.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79465.rs (renamed from tests/rustdoc-ui/issue-79465.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79465.stderr (renamed from tests/rustdoc-ui/issue-79465.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79467.rs (renamed from tests/rustdoc-ui/issue-79467.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79467.stderr (renamed from tests/rustdoc-ui/issue-79467.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79494.rs (renamed from tests/rustdoc-ui/issue-79494.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-79494.stderr (renamed from tests/rustdoc-ui/issue-79494.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-80992.rs (renamed from tests/rustdoc-ui/issue-80992.rs)2
-rw-r--r--tests/rustdoc-ui/issues/issue-80992.stdout (renamed from tests/rustdoc-ui/issue-80992.stdout)0
-rw-r--r--tests/rustdoc-ui/issues/issue-81662-shortness.rs (renamed from tests/rustdoc-ui/issue-81662-shortness.rs)2
-rw-r--r--tests/rustdoc-ui/issues/issue-81662-shortness.stdout (renamed from tests/rustdoc-ui/issue-81662-shortness.stdout)0
-rw-r--r--tests/rustdoc-ui/issues/issue-83883-describe-lints.rs (renamed from tests/rustdoc-ui/issue-83883-describe-lints.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout (renamed from tests/rustdoc-ui/issue-83883-describe-lints.stdout)0
-rw-r--r--tests/rustdoc-ui/issues/issue-91134.rs (renamed from tests/rustdoc-ui/issue-91134.rs)2
-rw-r--r--tests/rustdoc-ui/issues/issue-91134.stdout (renamed from tests/rustdoc-ui/issue-91134.stdout)0
-rw-r--r--tests/rustdoc-ui/issues/issue-91713.rs (renamed from tests/rustdoc-ui/issue-91713.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-91713.stderr (renamed from tests/rustdoc-ui/issue-91713.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-91713.stdout (renamed from tests/rustdoc-ui/issue-91713.stdout)0
-rw-r--r--tests/rustdoc-ui/issues/issue-96287.rs (renamed from tests/rustdoc-ui/issue-96287.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-96287.stderr (renamed from tests/rustdoc-ui/issue-96287.stderr)0
-rw-r--r--tests/rustdoc-ui/issues/issue-98690.rs (renamed from tests/rustdoc-ui/issue-98690.rs)0
-rw-r--r--tests/rustdoc-ui/issues/issue-98690.stderr (renamed from tests/rustdoc-ui/issue-98690.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/bare-urls.fixed (renamed from tests/rustdoc-ui/bare-urls.fixed)0
-rw-r--r--tests/rustdoc-ui/lints/bare-urls.rs (renamed from tests/rustdoc-ui/bare-urls.rs)0
-rw-r--r--tests/rustdoc-ui/lints/bare-urls.stderr (renamed from tests/rustdoc-ui/bare-urls.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/check-attr.rs (renamed from tests/rustdoc-ui/check-attr.rs)0
-rw-r--r--tests/rustdoc-ui/lints/check-attr.stderr (renamed from tests/rustdoc-ui/check-attr.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/check-fail.rs (renamed from tests/rustdoc-ui/check-fail.rs)0
-rw-r--r--tests/rustdoc-ui/lints/check-fail.stderr (renamed from tests/rustdoc-ui/check-fail.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/check.rs (renamed from tests/rustdoc-ui/check.rs)0
-rw-r--r--tests/rustdoc-ui/lints/check.stderr (renamed from tests/rustdoc-ui/check.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/deny-missing-docs-crate.rs (renamed from tests/rustdoc-ui/deny-missing-docs-crate.rs)0
-rw-r--r--tests/rustdoc-ui/lints/deny-missing-docs-crate.stderr (renamed from tests/rustdoc-ui/deny-missing-docs-crate.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/deny-missing-docs-macro.rs (renamed from tests/rustdoc-ui/deny-missing-docs-macro.rs)0
-rw-r--r--tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr (renamed from tests/rustdoc-ui/deny-missing-docs-macro.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/doc-attr.rs (renamed from tests/rustdoc-ui/doc-attr.rs)0
-rw-r--r--tests/rustdoc-ui/lints/doc-attr.stderr (renamed from tests/rustdoc-ui/doc-attr.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/doc-spotlight.fixed (renamed from tests/rustdoc-ui/doc-spotlight.fixed)0
-rw-r--r--tests/rustdoc-ui/lints/doc-spotlight.rs (renamed from tests/rustdoc-ui/doc-spotlight.rs)0
-rw-r--r--tests/rustdoc-ui/lints/doc-spotlight.stderr (renamed from tests/rustdoc-ui/doc-spotlight.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/doc-without-codeblock.rs (renamed from tests/rustdoc-ui/doc-without-codeblock.rs)0
-rw-r--r--tests/rustdoc-ui/lints/doc-without-codeblock.stderr (renamed from tests/rustdoc-ui/doc-without-codeblock.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/doc_cfg_hide.rs (renamed from tests/rustdoc-ui/doc_cfg_hide.rs)0
-rw-r--r--tests/rustdoc-ui/lints/doc_cfg_hide.stderr (renamed from tests/rustdoc-ui/doc_cfg_hide.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs (renamed from tests/rustdoc-ui/expect-tool-lint-rfc-2383.rs)0
-rw-r--r--tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.stderr (renamed from tests/rustdoc-ui/expect-tool-lint-rfc-2383.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs (renamed from tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs)0
-rw-r--r--tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr (renamed from tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/invalid-doc-attr.rs (renamed from tests/rustdoc-ui/invalid-doc-attr.rs)0
-rw-r--r--tests/rustdoc-ui/lints/invalid-doc-attr.stderr (renamed from tests/rustdoc-ui/invalid-doc-attr.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/invalid-html-self-closing-tag.rs (renamed from tests/rustdoc-ui/invalid-html-self-closing-tag.rs)0
-rw-r--r--tests/rustdoc-ui/lints/invalid-html-self-closing-tag.stderr (renamed from tests/rustdoc-ui/invalid-html-self-closing-tag.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/invalid-html-tags.rs (renamed from tests/rustdoc-ui/invalid-html-tags.rs)0
-rw-r--r--tests/rustdoc-ui/lints/invalid-html-tags.stderr (renamed from tests/rustdoc-ui/invalid-html-tags.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/lint-group.rs (renamed from tests/rustdoc-ui/lint-group.rs)0
-rw-r--r--tests/rustdoc-ui/lints/lint-group.stderr (renamed from tests/rustdoc-ui/lint-group.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/lint-missing-doc-code-example.rs (renamed from tests/rustdoc-ui/lint-missing-doc-code-example.rs)0
-rw-r--r--tests/rustdoc-ui/lints/lint-missing-doc-code-example.stderr (renamed from tests/rustdoc-ui/lint-missing-doc-code-example.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs (renamed from tests/rustdoc-ui/no-crate-level-doc-lint.rs)0
-rw-r--r--tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr (renamed from tests/rustdoc-ui/no-crate-level-doc-lint.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/renamed-lint-still-applies.rs (renamed from tests/rustdoc-ui/renamed-lint-still-applies.rs)0
-rw-r--r--tests/rustdoc-ui/lints/renamed-lint-still-applies.stderr (renamed from tests/rustdoc-ui/renamed-lint-still-applies.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/rustdoc-all-only-stable-lints.rs (renamed from tests/rustdoc-ui/rustdoc-all-only-stable-lints.rs)0
-rw-r--r--tests/rustdoc-ui/lints/unknown-renamed-lints.rs (renamed from tests/rustdoc-ui/unknown-renamed-lints.rs)0
-rw-r--r--tests/rustdoc-ui/lints/unknown-renamed-lints.stderr (renamed from tests/rustdoc-ui/unknown-renamed-lints.stderr)0
-rw-r--r--tests/rustdoc-ui/lints/unused-braces-lint.rs (renamed from tests/rustdoc-ui/unused-braces-lint.rs)0
-rw-r--r--tests/rustdoc-ui/lints/unused.rs (renamed from tests/rustdoc-ui/unused.rs)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.rs (renamed from tests/rustdoc-ui/scrape-examples-fail-if-type-error.rs)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.stderr (renamed from tests/rustdoc-ui/scrape-examples-fail-if-type-error.stderr)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-ice.rs (renamed from tests/rustdoc-ui/scrape-examples-ice.rs)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.rs (renamed from tests/rustdoc-ui/scrape-examples-wrong-options-1.rs)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.stderr (renamed from tests/rustdoc-ui/scrape-examples-wrong-options-1.stderr)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.rs (renamed from tests/rustdoc-ui/scrape-examples-wrong-options-2.rs)0
-rw-r--r--tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.stderr (renamed from tests/rustdoc-ui/scrape-examples-wrong-options-2.stderr)0
-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/inherent-projections.rs44
-rw-r--r--tests/rustdoc/intra-doc/inherent-associated-types.rs45
-rw-r--r--tests/rustdoc/issue-110629-private-type-cycle.rs19
-rw-r--r--tests/ui-fulldeps/deriving-encodable-decodable-box.rs34
-rw-r--r--tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs44
-rw-r--r--tests/ui-fulldeps/issue-14021.rs33
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs49
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr30
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs2
-rw-r--r--tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr9
-rw-r--r--tests/ui-fulldeps/stable-mir/crate-info.rs28
-rw-r--r--tests/ui/abi/stack-probes-lto.rs1
-rw-r--r--tests/ui/abi/stack-probes.rs1
-rw-r--r--tests/ui/argument-suggestions/issue-97484.stderr2
-rw-r--r--tests/ui/array-slice-vec/slice-mut-2.stderr2
-rw-r--r--tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs10
-rw-r--r--tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr49
-rw-r--r--tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs16
-rw-r--r--tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr37
-rw-r--r--tests/ui/associated-inherent-types/bugs/ice-substitution.rs23
-rw-r--r--tests/ui/associated-inherent-types/bugs/ice-substitution.stderr6
-rw-r--r--tests/ui/associated-inherent-types/bugs/inference-fail.rs15
-rw-r--r--tests/ui/associated-inherent-types/bugs/lack-of-regionck.rs19
-rw-r--r--tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs15
-rw-r--r--tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs2
-rw-r--r--tests/ui/associated-inherent-types/former-subst-ice.rs16
-rw-r--r--tests/ui/associated-inherent-types/generic-associated-types-bad.item.stderr15
-rw-r--r--tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr15
-rw-r--r--tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr11
-rw-r--r--tests/ui/associated-inherent-types/generic-associated-types-bad.rs26
-rw-r--r--tests/ui/associated-inherent-types/inference-fail.rs11
-rw-r--r--tests/ui/associated-inherent-types/inference-fail.stderr (renamed from tests/ui/associated-inherent-types/bugs/inference-fail.stderr)6
-rw-r--r--tests/ui/associated-inherent-types/inference.rs39
-rw-r--r--tests/ui/associated-inherent-types/issue-109768.rs12
-rw-r--r--tests/ui/associated-inherent-types/issue-109768.stderr35
-rw-r--r--tests/ui/associated-inherent-types/issue-109789.rs22
-rw-r--r--tests/ui/associated-inherent-types/issue-109789.stderr21
-rw-r--r--tests/ui/associated-inherent-types/issue-109790.rs17
-rw-r--r--tests/ui/associated-inherent-types/late-bound-regions.rs25
-rw-r--r--tests/ui/associated-inherent-types/late-bound-regions.stderr12
-rw-r--r--tests/ui/associated-inherent-types/normalization-overflow.rs12
-rw-r--r--tests/ui/associated-inherent-types/normalization-overflow.stderr8
-rw-r--r--tests/ui/associated-inherent-types/private-in-public.rs26
-rw-r--r--tests/ui/associated-inherent-types/private-in-public.stderr34
-rw-r--r--tests/ui/associated-inherent-types/regionck-0.rs14
-rw-r--r--tests/ui/associated-inherent-types/regionck-0.stderr10
-rw-r--r--tests/ui/associated-inherent-types/regionck-1.rs13
-rw-r--r--tests/ui/associated-inherent-types/regionck-1.stderr29
-rw-r--r--tests/ui/associated-inherent-types/regionck-2.rs14
-rw-r--r--tests/ui/associated-inherent-types/regionck-2.stderr18
-rw-r--r--tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs26
-rw-r--r--tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.rs12
-rw-r--r--tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr17
-rw-r--r--tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.rs14
-rw-r--r--tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr18
-rw-r--r--tests/ui/associated-type-bounds/duplicate.rs3
-rw-r--r--tests/ui/associated-type-bounds/duplicate.stderr60
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs1
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr20
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.rs1
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr10
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr16
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.rs1
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/equality.stderr12
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/missing.rs3
-rw-r--r--tests/ui/associated-type-bounds/return-type-notation/missing.stderr14
-rw-r--r--tests/ui/associated-type-bounds/supertrait-defines-ty.rs26
-rw-r--r--tests/ui/async-await/async-await-let-else.drop_tracking.stderr16
-rw-r--r--tests/ui/async-await/async-await-let-else.drop_tracking_mir.stderr12
-rw-r--r--tests/ui/async-await/async-await-let-else.no_drop_tracking.stderr20
-rw-r--r--tests/ui/async-await/async-error-span.drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/async-error-span.no_drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/async-fn-nonsend.drop_tracking.stderr8
-rw-r--r--tests/ui/async-await/async-fn-nonsend.drop_tracking_mir.stderr8
-rw-r--r--tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr20
-rw-r--r--tests/ui/async-await/async-fn-nonsend.stderr49
-rw-r--r--tests/ui/async-await/async-is-unwindsafe.stderr4
-rw-r--r--tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr38
-rw-r--r--tests/ui/async-await/clone-suggestion.fixed28
-rw-r--r--tests/ui/async-await/clone-suggestion.rs28
-rw-r--r--tests/ui/async-await/clone-suggestion.stderr20
-rw-r--r--tests/ui/async-await/drop-track-bad-field-in-fru.stderr8
-rw-r--r--tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking_mir.stderr4
-rw-r--r--tests/ui/async-await/drop-track-field-assign-nonsend.no_drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/field-assign-nonsend.drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/field-assign-nonsend.drop_tracking_mir.stderr4
-rw-r--r--tests/ui/async-await/field-assign-nonsend.no_drop_tracking.stderr4
-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/async-default-fn-overridden.current.stderr11
-rw-r--r--tests/ui/async-await/in-trait/async-default-fn-overridden.next.stderr11
-rw-r--r--tests/ui/async-await/in-trait/async-default-fn-overridden.rs1
-rw-r--r--tests/ui/async-await/in-trait/bad-signatures.current.stderr15
-rw-r--r--tests/ui/async-await/in-trait/bad-signatures.next.stderr15
-rw-r--r--tests/ui/async-await/in-trait/bad-signatures.rs1
-rw-r--r--tests/ui/async-await/in-trait/dont-project-to-specializable-projection.current.stderr11
-rw-r--r--tests/ui/async-await/in-trait/dont-project-to-specializable-projection.next.stderr11
-rw-r--r--tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr13
-rw-r--r--tests/ui/async-await/in-trait/lifetime-mismatch.next.stderr13
-rw-r--r--tests/ui/async-await/in-trait/lifetime-mismatch.rs1
-rw-r--r--tests/ui/async-await/in-trait/missing-send-bound.current.stderr17
-rw-r--r--tests/ui/async-await/in-trait/missing-send-bound.next.stderr17
-rw-r--r--tests/ui/async-await/in-trait/missing-send-bound.rs1
-rw-r--r--tests/ui/async-await/in-trait/object-safety.current.stderr15
-rw-r--r--tests/ui/async-await/in-trait/object-safety.next.stderr15
-rw-r--r--tests/ui/async-await/in-trait/object-safety.rs1
-rw-r--r--tests/ui/async-await/in-trait/return-type-suggestion.current.stderr13
-rw-r--r--tests/ui/async-await/in-trait/return-type-suggestion.next.stderr13
-rw-r--r--tests/ui/async-await/in-trait/return-type-suggestion.rs1
-rw-r--r--tests/ui/async-await/issue-101715.stderr8
-rw-r--r--tests/ui/async-await/issue-64130-1-sync.drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/issue-64130-1-sync.drop_tracking_mir.stderr4
-rw-r--r--tests/ui/async-await/issue-64130-1-sync.no_drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/issue-64130-1-sync.stderr24
-rw-r--r--tests/ui/async-await/issue-64130-2-send.drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/issue-64130-2-send.drop_tracking_mir.stderr4
-rw-r--r--tests/ui/async-await/issue-64130-2-send.no_drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/issue-64130-2-send.stderr24
-rw-r--r--tests/ui/async-await/issue-64130-3-other.drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/issue-64130-3-other.drop_tracking_mir.stderr4
-rw-r--r--tests/ui/async-await/issue-64130-3-other.no_drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/issue-64130-3-other.stderr27
-rw-r--r--tests/ui/async-await/issue-64130-4-async-move.no_drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/issue-64130-non-send-future-diags.stderr4
-rw-r--r--tests/ui/async-await/issue-67252-unnamed-future.drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/issue-67252-unnamed-future.drop_tracking_mir.stderr4
-rw-r--r--tests/ui/async-await/issue-67252-unnamed-future.no_drop_tracking.stderr4
-rw-r--r--tests/ui/async-await/issue-70594.stderr16
-rw-r--r--tests/ui/async-await/issue-70818.stderr18
-rw-r--r--tests/ui/async-await/issue-70935-complex-spans.no_drop_tracking.stderr8
-rw-r--r--tests/ui/async-await/issue-71137.stderr4
-rw-r--r--tests/ui/async-await/issue-73741-type-err-drop-tracking.stderr11
-rw-r--r--tests/ui/async-await/issue-98634.stderr4
-rw-r--r--tests/ui/async-await/issues/issue-102206.stderr10
-rw-r--r--tests/ui/async-await/issues/issue-107280.stderr20
-rw-r--r--tests/ui/async-await/issues/issue-51719.stderr4
-rw-r--r--tests/ui/async-await/issues/issue-51751.stderr4
-rw-r--r--tests/ui/async-await/issues/issue-62009-1.stderr20
-rw-r--r--tests/ui/async-await/issues/issue-62009-2.stderr4
-rw-r--r--tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.no_drop_tracking.stderr8
-rw-r--r--tests/ui/async-await/issues/issue-67893.stderr8
-rw-r--r--tests/ui/async-await/issues/non-async-enclosing-span.stderr4
-rw-r--r--tests/ui/async-await/mutually-recursive-async-impl-trait-type.stderr21
-rw-r--r--tests/ui/async-await/recursive-async-impl-trait-type.stderr12
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-early.stderr10
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-late.rs1
-rw-r--r--tests/ui/async-await/return-type-notation/issue-110963-late.stderr10
-rw-r--r--tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs32
-rw-r--r--tests/ui/async-await/return-type-notation/super-method-bound-ambig.stderr19
-rw-r--r--tests/ui/async-await/return-type-notation/super-method-bound.rs25
-rw-r--r--tests/ui/async-await/return-type-notation/super-method-bound.stderr11
-rw-r--r--tests/ui/async-await/unnecessary-await.rs20
-rw-r--r--tests/ui/async-await/unnecessary-await.stderr36
-rw-r--r--tests/ui/async-await/unresolved_type_param.drop_tracking.stderr12
-rw-r--r--tests/ui/async-await/unresolved_type_param.no_drop_tracking.stderr20
-rw-r--r--tests/ui/async-await/unresolved_type_param.stderr39
-rw-r--r--tests/ui/binding/issue-53114-safety-checks.stderr18
-rw-r--r--tests/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr4
-rw-r--r--tests/ui/borrowck/borrowck-access-permissions.stderr6
-rw-r--r--tests/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr8
-rw-r--r--tests/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr4
-rw-r--r--tests/ui/borrowck/borrowck-issue-14498.stderr2
-rw-r--r--tests/ui/borrowck/borrowck-reborrow-from-mut.stderr2
-rw-r--r--tests/ui/borrowck/issue-85765.stderr2
-rw-r--r--tests/ui/borrowck/mutability-errors.stderr24
-rw-r--r--tests/ui/borrowck/suggest-lt-on-ty-alias-w-generics.rs11
-rw-r--r--tests/ui/borrowck/suggest-lt-on-ty-alias-w-generics.stderr43
-rw-r--r--tests/ui/borrowck/tainted-promoteds.rs12
-rw-r--r--tests/ui/borrowck/tainted-promoteds.stderr14
-rw-r--r--tests/ui/cfg/conditional-compile-arch.rs3
-rw-r--r--tests/ui/check-cfg/compact-values.stderr2
-rw-r--r--tests/ui/check-cfg/diagnotics.rs31
-rw-r--r--tests/ui/check-cfg/diagnotics.stderr62
-rw-r--r--tests/ui/check-cfg/invalid-cfg-name.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-cfg-value.stderr6
-rw-r--r--tests/ui/check-cfg/mix.rs4
-rw-r--r--tests/ui/check-cfg/mix.stderr82
-rw-r--r--tests/ui/check-cfg/no-values.stderr4
-rw-r--r--tests/ui/check-cfg/values-target-json.stderr4
-rw-r--r--tests/ui/check-cfg/well-known-names.stderr6
-rw-r--r--tests/ui/check-cfg/well-known-values.stderr8
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr2
-rw-r--r--tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr3
-rw-r--r--tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs21
-rw-r--r--tests/ui/closures/issue-868.rs (renamed from tests/ui/issues/issue-868.rs)0
-rw-r--r--tests/ui/coercion/coercion-slice.stderr11
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_bad.rs13
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_bad.stderr87
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.rs12
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.stderr16
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_generic_bounds_do_not_hold.rs13
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_generic_bounds_do_not_hold.stderr42
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_good.rs43
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_impl_bad_field.rs13
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_impl_bad_field.stderr12
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.rs17
-rw-r--r--tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.stderr12
-rw-r--r--tests/ui/const-generics/assoc_const_as_type_argument.rs13
-rw-r--r--tests/ui/const-generics/assoc_const_as_type_argument.stderr21
-rw-r--r--tests/ui/const-generics/assoc_const_eq_diagnostic.rs1
-rw-r--r--tests/ui/const-generics/assoc_const_eq_diagnostic.stderr16
-rw-r--r--tests/ui/const-generics/const-arg-in-const-arg.full.stderr163
-rw-r--r--tests/ui/const-generics/const-arg-in-const-arg.min.stderr206
-rw-r--r--tests/ui/const-generics/const-arg-in-const-arg.rs60
-rw-r--r--tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr9
-rw-r--r--tests/ui/const-generics/const-argument-non-static-lifetime.rs2
-rw-r--r--tests/ui/const-generics/const-param-type-depends-on-const-param.full.stderr4
-rw-r--r--tests/ui/const-generics/const-param-type-depends-on-const-param.min.stderr4
-rw-r--r--tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr2
-rw-r--r--tests/ui/const-generics/const-param-type-depends-on-type-param.full.stderr2
-rw-r--r--tests/ui/const-generics/const-param-type-depends-on-type-param.min.stderr2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.stderr6
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-74713.rs2
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-74713.stderr11
-rw-r--r--tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs24
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.rs12
-rw-r--r--tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr11
-rw-r--r--tests/ui/const-generics/issue-46511.rs2
-rw-r--r--tests/ui/const-generics/issue-46511.stderr11
-rw-r--r--tests/ui/const-generics/issues/issue-105821.rs2
-rw-r--r--tests/ui/const-generics/issues/issue-56445-1.full.stderr8
-rw-r--r--tests/ui/const-generics/issues/issue-56445-1.min.stderr8
-rw-r--r--tests/ui/const-generics/issues/issue-56445-1.rs2
-rw-r--r--tests/ui/const-generics/issues/issue-62878.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-62878.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-71169.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-71169.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-71381.full.stderr4
-rw-r--r--tests/ui/const-generics/issues/issue-71381.min.stderr4
-rw-r--r--tests/ui/const-generics/issues/issue-71611.full.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-71611.min.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-77357.rs11
-rw-r--r--tests/ui/const-generics/issues/issue-77357.stderr11
-rw-r--r--tests/ui/const-generics/issues/issue-83993.rs14
-rw-r--r--tests/ui/const-generics/issues/issue-88997.stderr4
-rw-r--r--tests/ui/const-generics/issues/issue-90364.stderr2
-rw-r--r--tests/ui/const-generics/late-bound-vars/in_closure.rs20
-rw-r--r--tests/ui/const-generics/late-bound-vars/in_closure.stderr13
-rw-r--r--tests/ui/const-generics/late-bound-vars/simple.rs19
-rw-r--r--tests/ui/const-generics/late-bound-vars/simple.stderr13
-rw-r--r--tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.rs4
-rw-r--r--tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr17
-rw-r--r--tests/ui/const-generics/nested-type.rs6
-rw-r--r--tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs2
-rw-r--r--tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr8
-rw-r--r--tests/ui/const-generics/sneaky-array-repeat-expr.rs2
-rw-r--r--tests/ui/const-generics/sneaky-array-repeat-expr.stderr20
-rw-r--r--tests/ui/const-generics/variant-discrimiant-no-generics.full.stderr34
-rw-r--r--tests/ui/const-generics/variant-discrimiant-no-generics.min.stderr34
-rw-r--r--tests/ui/const-generics/variant-discrimiant-no-generics.rs32
-rw-r--r--tests/ui/const-ptr/out_of_bounds_read.rs2
-rw-r--r--tests/ui/const-ptr/out_of_bounds_read.stderr6
-rw-r--r--tests/ui/const_prop/const-prop-ice.rs (renamed from tests/ui/consts/const-prop-ice.rs)0
-rw-r--r--tests/ui/const_prop/const-prop-ice.stderr (renamed from tests/ui/consts/const-prop-ice.stderr)0
-rw-r--r--tests/ui/const_prop/const-prop-ice2.rs (renamed from tests/ui/consts/const-prop-ice2.rs)0
-rw-r--r--tests/ui/const_prop/const-prop-ice2.stderr (renamed from tests/ui/consts/const-prop-ice2.stderr)0
-rw-r--r--tests/ui/const_prop/const-prop-ice3.rs (renamed from tests/ui/consts/const-prop-ice3.rs)0
-rw-r--r--tests/ui/const_prop/const-prop-overflowing-casts.rs (renamed from tests/ui/consts/const-prop-overflowing-casts.rs)0
-rw-r--r--tests/ui/const_prop/const-prop-read-static-in-const.rs (renamed from tests/ui/consts/const-prop-read-static-in-const.rs)0
-rw-r--r--tests/ui/const_prop/const-prop-read-static-in-const.stderr (renamed from tests/ui/consts/const-prop-read-static-in-const.stderr)0
-rw-r--r--tests/ui/const_prop/unsized-local-ice.rs9
-rw-r--r--tests/ui/consts/auxiliary/external_macro.rs2
-rw-r--r--tests/ui/consts/const-block-const-bound.rs6
-rw-r--r--tests/ui/consts/const-block-const-bound.stderr18
-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/consts/const-eval/ub-ref-ptr.rs1
-rw-r--r--tests/ui/consts/const-eval/ub-ref-ptr.stderr34
-rw-r--r--tests/ui/consts/extra-const-ub/detect-extra-ub.rs1
-rw-r--r--tests/ui/consts/extra-const-ub/detect-extra-ub.with_flag.stderr8
-rw-r--r--tests/ui/consts/issue-50439.rs4
-rw-r--r--tests/ui/consts/issue-50439.stderr10
-rw-r--r--tests/ui/consts/issue-miri-1910.rs1
-rw-r--r--tests/ui/consts/issue-miri-1910.stderr2
-rw-r--r--tests/ui/cycle-trait/issue-12511.rs (renamed from tests/ui/issues/issue-12511.rs)0
-rw-r--r--tests/ui/cycle-trait/issue-12511.stderr (renamed from tests/ui/issues/issue-12511.stderr)0
-rw-r--r--tests/ui/deployment-target/invalid-target.rs4
-rw-r--r--tests/ui/deployment-target/invalid-target.stderr2
-rw-r--r--tests/ui/deployment-target/macos-target.rs7
-rw-r--r--tests/ui/deployment-target/macos-target.stdout1
-rw-r--r--tests/ui/deriving/issue-15689-1.rs (renamed from tests/ui/issues/issue-15689-1.rs)0
-rw-r--r--tests/ui/deriving/issue-15689-2.rs (renamed from tests/ui/issues/issue-15689-2.rs)0
-rw-r--r--tests/ui/did_you_mean/issue-38147-4.stderr4
-rw-r--r--tests/ui/did_you_mean/issue-39544.stderr12
-rw-r--r--tests/ui/did_you_mean/issue-40823.stderr2
-rw-r--r--tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr1
-rw-r--r--tests/ui/drop/issue-979.rs (renamed from tests/ui/issues/issue-979.rs)0
-rw-r--r--tests/ui/dropck/explicit-drop-bounds.bad1.stderr35
-rw-r--r--tests/ui/dropck/explicit-drop-bounds.bad2.stderr35
-rw-r--r--tests/ui/dropck/explicit-drop-bounds.rs44
-rw-r--r--tests/ui/dropck/explicit-implied-outlives.bad1.stderr15
-rw-r--r--tests/ui/dropck/explicit-implied-outlives.bad2.stderr15
-rw-r--r--tests/ui/dropck/explicit-implied-outlives.rs43
-rw-r--r--tests/ui/dropck/negative.rs7
-rw-r--r--tests/ui/dropck/negative.stderr8
-rw-r--r--tests/ui/dropck/reservation.rs10
-rw-r--r--tests/ui/dropck/reservation.stderr8
-rw-r--r--tests/ui/dropck/transitive-outlives-2.rs18
-rw-r--r--tests/ui/dropck/transitive-outlives.bad.stderr15
-rw-r--r--tests/ui/dropck/transitive-outlives.rs26
-rw-r--r--tests/ui/dropck/trivial-impl-bounds.rs34
-rw-r--r--tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.rs2
-rw-r--r--tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr5
-rw-r--r--tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice.rs2
-rw-r--r--tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr5
-rw-r--r--tests/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr5
-rw-r--r--tests/ui/enum/issue-1821.rs (renamed from tests/ui/issues/issue-1821.rs)0
-rw-r--r--tests/ui/enum/issue-67945-1.stderr5
-rw-r--r--tests/ui/enum/issue-67945-2.stderr5
-rw-r--r--tests/ui/error-codes/E0277.stderr3
-rw-r--r--tests/ui/error-codes/E0389.stderr2
-rw-r--r--tests/ui/error-codes/E0719.rs1
-rw-r--r--tests/ui/error-codes/E0719.stderr12
-rw-r--r--tests/ui/error-codes/E0771.rs2
-rw-r--r--tests/ui/error-codes/E0771.stderr8
-rw-r--r--tests/ui/extern-flag/auxiliary/panic_handler.rs17
-rw-r--r--tests/ui/extern-flag/force-extern.rs9
-rw-r--r--tests/ui/extern-flag/no-force-extern.rs10
-rw-r--r--tests/ui/extern-flag/redundant-force-extern.rs11
-rw-r--r--tests/ui/feature-gates/feature-gate-builtin_syntax.rs7
-rw-r--r--tests/ui/feature-gates/feature-gate-builtin_syntax.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-cfi_encoding.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-cfi_encoding.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-debugger-visualizer.rs3
-rw-r--r--tests/ui/feature-gates/feature-gate-debugger-visualizer.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-negative_bounds.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-negative_bounds.stderr8
-rw-r--r--tests/ui/feature-gates/feature-gate-raw-dylib-2.rs12
-rw-r--r--tests/ui/feature-gates/feature-gate-raw-dylib-2.stderr21
-rw-r--r--tests/ui/feature-gates/feature-gate-raw-dylib-import-name-type.rs8
-rw-r--r--tests/ui/feature-gates/feature-gate-raw-dylib-import-name-type.stderr21
-rw-r--r--tests/ui/feature-gates/feature-gate-raw-dylib.rs7
-rw-r--r--tests/ui/feature-gates/feature-gate-raw-dylib.stderr12
-rw-r--r--tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr17
-rw-r--r--tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr13
-rw-r--r--tests/ui/feature-gates/feature-gate-return_type_notation.rs1
-rw-r--r--tests/ui/feature-gates/feature-gate-thiscall.rs (renamed from tests/ui/unwind-abis/feature-gate-thiscall-unwind.rs)5
-rw-r--r--tests/ui/feature-gates/feature-gate-thiscall.stderr (renamed from tests/ui/unwind-abis/feature-gate-thiscall-unwind.stderr)49
-rw-r--r--tests/ui/feature-gates/feature-gate-type_ascription.rs2
-rw-r--r--tests/ui/feature-gates/feature-gate-type_ascription.stderr6
-rw-r--r--tests/ui/feature-gates/feature-gate-vectorcall.rs4
-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/format-string-error.rs2
-rw-r--r--tests/ui/fmt/send-sync.stderr12
-rw-r--r--tests/ui/fn/issue-3099.rs (renamed from tests/ui/issues/issue-3099.rs)0
-rw-r--r--tests/ui/fn/issue-3099.stderr (renamed from tests/ui/issues/issue-3099.stderr)0
-rw-r--r--tests/ui/generator/borrowing.stderr31
-rw-r--r--tests/ui/generator/retain-resume-ref.stderr13
-rw-r--r--tests/ui/generator/unresolved-ct-var-drop-tracking.stderr28
-rw-r--r--tests/ui/generator/unresolved-ct-var.stderr28
-rw-r--r--tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs3
-rw-r--r--tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr31
-rw-r--r--tests/ui/generics/single-colon-path-not-const-generics.rs4
-rw-r--r--tests/ui/generics/single-colon-path-not-const-generics.stderr11
-rw-r--r--tests/ui/impl-trait/in-trait/auxiliary/rpitit.rs4
-rw-r--r--tests/ui/impl-trait/in-trait/box-coerce-span-in-default.current.stderr11
-rw-r--r--tests/ui/impl-trait/in-trait/box-coerce-span-in-default.next.stderr11
-rw-r--r--tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs1
-rw-r--r--tests/ui/impl-trait/in-trait/default-method-binder-shifting.current.stderr11
-rw-r--r--tests/ui/impl-trait/in-trait/default-method-binder-shifting.next.stderr11
-rw-r--r--tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs1
-rw-r--r--tests/ui/impl-trait/in-trait/default-method-constraint.current.stderr11
-rw-r--r--tests/ui/impl-trait/in-trait/default-method-constraint.next.stderr11
-rw-r--r--tests/ui/impl-trait/in-trait/default-method-constraint.rs1
-rw-r--r--tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.current.stderr13
-rw-r--r--tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.next.stderr13
-rw-r--r--tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs1
-rw-r--r--tests/ui/impl-trait/in-trait/foreign-dyn-error.rs8
-rw-r--r--tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr15
-rw-r--r--tests/ui/impl-trait/in-trait/foreign.rs9
-rw-r--r--tests/ui/impl-trait/issues/issue-86800.rs10
-rw-r--r--tests/ui/impl-trait/issues/issue-86800.stderr14
-rw-r--r--tests/ui/inference/deref-suggestion.stderr20
-rw-r--r--tests/ui/inference/issue-71584.rs (renamed from tests/ui/issues/issue-71584.rs)0
-rw-r--r--tests/ui/inference/issue-71584.stderr (renamed from tests/ui/issues/issue-71584.stderr)0
-rw-r--r--tests/ui/interior-mutability/interior-mutability.stderr3
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-option.rs1
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-option.stderr4
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-target.rs2
-rw-r--r--tests/ui/invalid/invalid-debugger-visualizer-target.stderr2
-rw-r--r--tests/ui/issues/auxiliary/issue-111011.rs12
-rw-r--r--tests/ui/issues/auxiliary/issue-111011.stderr34
-rw-r--r--tests/ui/issues/issue-11374.stderr10
-rw-r--r--tests/ui/issues/issue-17033.stderr11
-rw-r--r--tests/ui/issues/issue-18819.stderr2
-rw-r--r--tests/ui/issues/issue-21763.rs2
-rw-r--r--tests/ui/issues/issue-21763.stderr13
-rw-r--r--tests/ui/issues/issue-22644.rs12
-rw-r--r--tests/ui/issues/issue-22644.stderr51
-rw-r--r--tests/ui/issues/issue-2748-a.rs17
-rw-r--r--tests/ui/issues/issue-32709.stderr13
-rw-r--r--tests/ui/issues/issue-46302.stderr10
-rw-r--r--tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr20
-rw-r--r--tests/ui/issues/issue-51515.rs1
-rw-r--r--tests/ui/issues/issue-51515.stderr6
-rw-r--r--tests/ui/issues/issue-58857.stderr4
-rw-r--r--tests/ui/issues/issue-61106.stderr10
-rw-r--r--tests/ui/issues/issue-61623.stderr2
-rw-r--r--tests/ui/issues/issue-7364.stderr3
-rw-r--r--tests/ui/kindck/kindck-send-object.stderr3
-rw-r--r--tests/ui/kindck/kindck-send-object1.stderr3
-rw-r--r--tests/ui/kindck/kindck-send-object2.stderr3
-rw-r--r--tests/ui/kindck/kindck-send-owned.stderr3
-rw-r--r--tests/ui/layout/debug.rs48
-rw-r--r--tests/ui/layout/debug.stderr220
-rw-r--r--tests/ui/layout/issue-96158-scalarpair-payload-might-be-uninit.stderr40
-rw-r--r--tests/ui/lifetimes/elided-lifetime-in-anon-const.rs20
-rw-r--r--tests/ui/lifetimes/issue-64173-unused-lifetimes.rs2
-rw-r--r--tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr11
-rw-r--r--tests/ui/lifetimes/unusual-rib-combinations.rs2
-rw-r--r--tests/ui/lifetimes/unusual-rib-combinations.stderr8
-rw-r--r--tests/ui/lint/internal/trivial-diagnostics.rs8
-rw-r--r--tests/ui/lint/internal/trivial-diagnostics.stderr15
-rw-r--r--tests/ui/lint/invalid_value-polymorphic.rs2
-rw-r--r--tests/ui/lint/lint-missing-doc.rs3
-rw-r--r--tests/ui/lint/lint-missing-doc.stderr56
-rw-r--r--tests/ui/lint/must_not_suspend/boxed.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/dedup.drop_tracking.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/dedup.drop_tracking_mir.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/dedup.no_drop_tracking.stderr4
-rw-r--r--tests/ui/lint/must_not_suspend/dedup.stderr19
-rw-r--r--tests/ui/lint/must_not_suspend/mutex.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/ref-drop-tracking.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/ref.drop_tracking.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/ref.drop_tracking_mir.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/ref.no_drop_tracking.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/trait.drop_tracking.stderr4
-rw-r--r--tests/ui/lint/must_not_suspend/trait.drop_tracking_mir.stderr4
-rw-r--r--tests/ui/lint/must_not_suspend/trait.no_drop_tracking.stderr4
-rw-r--r--tests/ui/lint/must_not_suspend/trait.stderr37
-rw-r--r--tests/ui/lint/must_not_suspend/unit.drop_tracking.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/unit.drop_tracking_mir.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/unit.no_drop_tracking.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/unit.stderr26
-rw-r--r--tests/ui/lint/must_not_suspend/warn.drop_tracking.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/warn.drop_tracking_mir.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/warn.no_drop_tracking.stderr2
-rw-r--r--tests/ui/lint/must_not_suspend/warn.stderr26
-rw-r--r--tests/ui/lint/noop-method-call.rs8
-rw-r--r--tests/ui/lint/noop-method-call.stderr26
-rw-r--r--tests/ui/lint/suspicious-double-ref-op.rs30
-rw-r--r--tests/ui/lint/suspicious-double-ref-op.stderr35
-rw-r--r--tests/ui/lint/unaligned_references.stderr30
-rw-r--r--tests/ui/lint/unaligned_references_external_macro.stderr3
-rw-r--r--tests/ui/macros/issue-2804-2.rs (renamed from tests/ui/issues/issue-2804-2.rs)0
-rw-r--r--tests/ui/macros/stringify.rs3
-rw-r--r--tests/ui/match/guards-parenthesized-and.rs10
-rw-r--r--tests/ui/methods/method-self-arg-1.stderr10
-rw-r--r--tests/ui/mismatched_types/dont-point-return-on-E0308.stderr10
-rw-r--r--tests/ui/mut/mut-cross-borrowing.stderr10
-rw-r--r--tests/ui/native-library-link-flags/msvc-non-utf8-output.rs5
-rw-r--r--tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr1
-rw-r--r--tests/ui/nll/issue-30438-a.rs (renamed from tests/ui/issues/issue-30438-a.rs)0
-rw-r--r--tests/ui/nll/issue-30438-a.stderr (renamed from tests/ui/issues/issue-30438-a.stderr)0
-rw-r--r--tests/ui/nll/issue-30438-b.rs (renamed from tests/ui/issues/issue-30438-b.rs)0
-rw-r--r--tests/ui/nll/issue-30438-b.stderr (renamed from tests/ui/issues/issue-30438-b.stderr)0
-rw-r--r--tests/ui/nll/issue-30438-c.rs (renamed from tests/ui/issues/issue-30438-c.rs)0
-rw-r--r--tests/ui/nll/issue-30438-c.stderr (renamed from tests/ui/issues/issue-30438-c.stderr)0
-rw-r--r--tests/ui/nll/issue-47388.stderr2
-rw-r--r--tests/ui/nll/issue-51244.stderr2
-rw-r--r--tests/ui/nll/issue-54302-cases.rs (renamed from tests/ui/issues/issue-54302-cases.rs)0
-rw-r--r--tests/ui/nll/issue-54302-cases.stderr (renamed from tests/ui/issues/issue-54302-cases.stderr)0
-rw-r--r--tests/ui/nll/issue-54302.rs (renamed from tests/ui/issues/issue-54302.rs)0
-rw-r--r--tests/ui/nll/issue-54302.stderr (renamed from tests/ui/issues/issue-54302.stderr)0
-rw-r--r--tests/ui/nll/issue-57989.stderr2
-rw-r--r--tests/ui/not-panic/not-panic-safe-2.stderr9
-rw-r--r--tests/ui/not-panic/not-panic-safe-3.stderr9
-rw-r--r--tests/ui/not-panic/not-panic-safe-4.stderr9
-rw-r--r--tests/ui/not-panic/not-panic-safe-6.stderr9
-rw-r--r--tests/ui/offset-of/offset-of-arg-count.rs14
-rw-r--r--tests/ui/offset-of/offset-of-arg-count.stderr59
-rw-r--r--tests/ui/offset-of/offset-of-builtin.rs44
-rw-r--r--tests/ui/offset-of/offset-of-builtin.stderr65
-rw-r--r--tests/ui/offset-of/offset-of-dst-field.stderr3
-rw-r--r--tests/ui/offset-of/offset-of-unstable.stderr5
-rw-r--r--tests/ui/optimization-remark.rs2
-rw-r--r--tests/ui/or-patterns/or-patterns-syntactic-fail.rs5
-rw-r--r--tests/ui/or-patterns/or-patterns-syntactic-fail.stderr33
-rw-r--r--tests/ui/packed/issue-27060.stderr12
-rw-r--r--tests/ui/packed/packed-struct-borrow-element-64bit.stderr3
-rw-r--r--tests/ui/packed/packed-struct-borrow-element.stderr6
-rw-r--r--tests/ui/panic-runtime/auxiliary/needs-unwind.rs1
-rw-r--r--tests/ui/panics/default-backtrace-ice.rs14
-rw-r--r--tests/ui/panics/default-backtrace-ice.stderr5
-rw-r--r--tests/ui/parser/attr-stmt-expr-attr-bad.rs1
-rw-r--r--tests/ui/parser/attr-stmt-expr-attr-bad.stderr107
-rw-r--r--tests/ui/parser/builtin-syntax.rs9
-rw-r--r--tests/ui/parser/builtin-syntax.stderr14
-rw-r--r--tests/ui/parser/eq-less-to-less-eq.rs33
-rw-r--r--tests/ui/parser/eq-less-to-less-eq.stderr34
-rw-r--r--tests/ui/parser/issues/issue-33418.fixed19
-rw-r--r--tests/ui/parser/issues/issue-33418.rs8
-rw-r--r--tests/ui/parser/issues/issue-33418.stderr38
-rw-r--r--tests/ui/parser/issues/issue-35813-postfix-after-cast.rs78
-rw-r--r--tests/ui/parser/issues/issue-35813-postfix-after-cast.stderr338
-rw-r--r--tests/ui/parser/issues/issue-44406.rs1
-rw-r--r--tests/ui/parser/issues/issue-44406.stderr13
-rw-r--r--tests/ui/parser/issues/issue-62913.rs2
-rw-r--r--tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.fixed9
-rw-r--r--tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.rs3
-rw-r--r--tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.stderr32
-rw-r--r--tests/ui/parser/issues/issue-91461.rs5
-rw-r--r--tests/ui/parser/issues/issue-91461.stderr25
-rw-r--r--tests/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.rs3
-rw-r--r--tests/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.stderr10
-rw-r--r--tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr4
-rw-r--r--tests/ui/phantom-auto-trait.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/range/issue-54505-no-literals.fixed24
-rw-r--r--tests/ui/range/issue-54505-no-literals.rs24
-rw-r--r--tests/ui/range/issue-54505-no-literals.stderr120
-rw-r--r--tests/ui/range/issue-54505-no-std.rs12
-rw-r--r--tests/ui/range/issue-54505-no-std.stderr60
-rw-r--r--tests/ui/range/issue-54505.fixed12
-rw-r--r--tests/ui/range/issue-54505.rs12
-rw-r--r--tests/ui/range/issue-54505.stderr60
-rw-r--r--tests/ui/range/issue-73553-misinterp-range-literal.stderr20
-rw-r--r--tests/ui/reachable/auxiliary/foreign-priv-aux.rs21
-rw-r--r--tests/ui/reachable/foreign-priv.rs12
-rw-r--r--tests/ui/reachable/issue-948.rs (renamed from tests/ui/issues/issue-948.rs)0
-rw-r--r--tests/ui/recursion/recursive-requirements.stderr3
-rw-r--r--tests/ui/repr/invalid_repr_list_help.rs5
-rw-r--r--tests/ui/repr/invalid_repr_list_help.stderr20
-rw-r--r--tests/ui/resolve/issue-3099-a.rs (renamed from tests/ui/issues/issue-3099-a.rs)0
-rw-r--r--tests/ui/resolve/issue-3099-a.stderr (renamed from tests/ui/issues/issue-3099-a.stderr)0
-rw-r--r--tests/ui/resolve/issue-3099-b.rs (renamed from tests/ui/issues/issue-3099-b.rs)0
-rw-r--r--tests/ui/resolve/issue-3099-b.stderr (renamed from tests/ui/issues/issue-3099-b.stderr)0
-rw-r--r--tests/ui/rfc-2627-raw-dylib/dlltool-failed.rs19
-rw-r--r--tests/ui/rfc-2627-raw-dylib/dlltool-failed.stderr5
-rw-r--r--tests/ui/rfc-2627-raw-dylib/import-name-type-invalid-format.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/import-name-type-invalid-format.stderr2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/import-name-type-multiple.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/import-name-type-multiple.stderr2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/import-name-type-unknown-value.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/import-name-type-unknown-value.stderr2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.stderr4
-rw-r--r--tests/ui/rfc-2627-raw-dylib/invalid-dlltool.rs13
-rw-r--r--tests/ui/rfc-2627-raw-dylib/invalid-dlltool.stderr4
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-and-name.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-and-name.stderr4
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-invalid-format.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-invalid-format.stderr4
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.stderr4
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-multiple.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-multiple.stderr8
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-not-foreign-fn.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-not-foreign-fn.stderr6
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-too-large.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-too-large.stderr4
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-too-many-arguments.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-too-many-arguments.stderr4
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.rs2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.stderr4
-rw-r--r--tests/ui/rfc-2627-raw-dylib/multiple-declarations.rs1
-rw-r--r--tests/ui/rfc-2627-raw-dylib/multiple-declarations.stderr2
-rw-r--r--tests/ui/rfc-2627-raw-dylib/raw-dylib-windows-only.rs1
-rw-r--r--tests/ui/rfc-2627-raw-dylib/raw-dylib-windows-only.stderr2
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs24
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.stderr4
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs24
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs24
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr8
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr8
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.rs1
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr4
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr4
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr10
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr8
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.rs1
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr2
-rw-r--r--tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs7
-rw-r--r--tests/ui/rfcs/rfc-3348-c-string-literals/gate.rs13
-rw-r--r--tests/ui/rfcs/rfc-3348-c-string-literals/gate.stderr21
-rw-r--r--tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rsbin0 -> 565 bytes
-rw-r--r--tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.stderrbin0 -> 674 bytes
-rw-r--r--tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs10
-rw-r--r--tests/ui/sanitize/cfg.rs10
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs8
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.stderr4
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs9
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs9
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.stderr4
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs11
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.stderr8
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.aarch64.stderr8
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs12
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.x86_64.stderr8
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs9
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs9
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.stderr4
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-requires-lto.rs8
-rw-r--r--tests/ui/sanitize/sanitizer-cfi-requires-lto.stderr4
-rw-r--r--tests/ui/sanitize/split-lto-unit-requires-lto.rs8
-rw-r--r--tests/ui/sanitize/split-lto-unit-requires-lto.stderr4
-rw-r--r--tests/ui/self/elision/nested-item.rs13
-rw-r--r--tests/ui/self/elision/nested-item.stderr38
-rw-r--r--tests/ui/self/self-ctor-inner-const.rs17
-rw-r--r--tests/ui/self/self-ctor-inner-const.stderr33
-rw-r--r--tests/ui/simd/issue-105439.rs25
-rw-r--r--tests/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr8
-rw-r--r--tests/ui/span/borrowck-borrow-overloaded-deref-mut.stderr4
-rw-r--r--tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr6
-rw-r--r--tests/ui/span/borrowck-call-method-from-mut-aliasable.stderr2
-rw-r--r--tests/ui/span/borrowck-fn-in-const-b.stderr2
-rw-r--r--tests/ui/span/borrowck-object-mutability.stderr2
-rw-r--r--tests/ui/span/coerce-suggestions.stderr11
-rw-r--r--tests/ui/span/issue-39018.stderr10
-rw-r--r--tests/ui/span/mut-arg-hint.stderr6
-rw-r--r--tests/ui/specialization/issue-111232.rs11
-rw-r--r--tests/ui/specialization/issue-111232.stderr11
-rw-r--r--tests/ui/specialization/min_specialization/specialize-associated-type.rs37
-rw-r--r--tests/ui/specialization/min_specialization/specialize_nothing.rs14
-rw-r--r--tests/ui/specialization/min_specialization/specialize_nothing.stderr14
-rw-r--r--tests/ui/specialization/min_specialization/specialize_on_type_error.rs33
-rw-r--r--tests/ui/specialization/min_specialization/specialize_on_type_error.stderr12
-rw-r--r--tests/ui/specialization/min_specialization/specialize_with_generalize_lifetimes.rs50
-rw-r--r--tests/ui/specialization/min_specialization/specialize_with_generalize_lifetimes.stderr27
-rw-r--r--tests/ui/stability-attribute/stability-attribute-trait-impl.rs6
-rw-r--r--tests/ui/stability-attribute/stability-attribute-trait-impl.stderr2
-rw-r--r--tests/ui/str/str-array-assignment.stderr21
-rw-r--r--tests/ui/structs-enums/issue-103869.fixed13
-rw-r--r--tests/ui/structs-enums/issue-103869.rs (renamed from tests/ui/parser/issue-103869.rs)12
-rw-r--r--tests/ui/structs-enums/issue-103869.stderr (renamed from tests/ui/parser/issue-103869.stderr)15
-rw-r--r--tests/ui/structs-enums/type-sizes.rs67
-rw-r--r--tests/ui/suggestions/as-ref.stderr88
-rw-r--r--tests/ui/suggestions/issue-68049-2.stderr8
-rw-r--r--tests/ui/suggestions/issue-71394-no-from-impl.stderr10
-rw-r--r--tests/ui/suggestions/issue-96555.stderr12
-rw-r--r--tests/ui/suggestions/many-type-ascription.rs2
-rw-r--r--tests/ui/suggestions/many-type-ascription.stderr10
-rw-r--r--tests/ui/suggestions/path-by-value.stderr3
-rw-r--r--tests/ui/suggestions/suggest-borrow-to-dyn-object.stderr3
-rw-r--r--tests/ui/suggestions/suggest-boxed-empty-block.fixed12
-rw-r--r--tests/ui/suggestions/suggest-boxed-empty-block.rs12
-rw-r--r--tests/ui/suggestions/suggest-boxed-empty-block.stderr33
-rw-r--r--tests/ui/suggestions/suggest-ref-macro.rs4
-rw-r--r--tests/ui/suggestions/suggest-ref-macro.stderr19
-rw-r--r--tests/ui/suggestions/suggest-ref-mut.rs3
-rw-r--r--tests/ui/suggestions/suggest-ref-mut.stderr12
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-let.fixed11
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-let.rs7
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-let.stderr21
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-method.fixed2
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-method.rs2
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-method.stderr10
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-path-2.fixed2
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-path-2.rs2
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-path-2.stderr14
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-path.rs3
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-path.stderr18
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-variant.fixed2
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-variant.rs2
-rw-r--r--tests/ui/suggestions/type-ascription-instead-of-variant.stderr10
-rw-r--r--tests/ui/target-feature/gate.rs1
-rw-r--r--tests/ui/target-feature/gate.stderr2
-rw-r--r--tests/ui/target-feature/invalid-attribute.rs1
-rw-r--r--tests/ui/target-feature/invalid-attribute.stderr44
-rw-r--r--tests/ui/test-attrs/issue-12997-1.rs (renamed from tests/ui/issues/issue-12997-1.rs)0
-rw-r--r--tests/ui/test-attrs/issue-12997-1.stderr (renamed from tests/ui/issues/issue-12997-1.stderr)0
-rw-r--r--tests/ui/test-attrs/issue-12997-2.rs (renamed from tests/ui/issues/issue-12997-2.rs)0
-rw-r--r--tests/ui/test-attrs/issue-12997-2.stderr (renamed from tests/ui/issues/issue-12997-2.stderr)0
-rw-r--r--tests/ui/test-attrs/issue-34932.rs (renamed from tests/ui/issues/issue-34932.rs)0
-rw-r--r--tests/ui/test-attrs/test-type.rs1
-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/traits/issue-38404.rs1
-rw-r--r--tests/ui/traits/issue-38404.stderr16
-rw-r--r--tests/ui/traits/issue-7013.stderr3
-rw-r--r--tests/ui/traits/negative-bounds/associated-constraints.rs20
-rw-r--r--tests/ui/traits/negative-bounds/associated-constraints.stderr34
-rw-r--r--tests/ui/traits/negative-bounds/simple.rs42
-rw-r--r--tests/ui/traits/negative-bounds/simple.stderr70
-rw-r--r--tests/ui/traits/negative-bounds/supertrait.rs9
-rw-r--r--tests/ui/traits/negative-bounds/supertrait.stderr10
-rw-r--r--tests/ui/traits/negative-impls/negated-auto-traits-error.stderr6
-rw-r--r--tests/ui/traits/new-solver/alias-bound-unsound.rs27
-rw-r--r--tests/ui/traits/new-solver/alias-bound-unsound.stderr24
-rw-r--r--tests/ui/traits/new-solver/nested-alias-bound.rs20
-rw-r--r--tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr24
-rw-r--r--tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs25
-rw-r--r--tests/ui/traits/non_lifetime_binders/drop-impl-pred.yes.stderr11
-rw-r--r--tests/ui/traits/unsend-future.stderr4
-rw-r--r--tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr4
-rw-r--r--tests/ui/type/ascription/issue-34255-1.rs7
-rw-r--r--tests/ui/type/ascription/issue-34255-1.stderr38
-rw-r--r--tests/ui/type/ascription/issue-47666.fixed2
-rw-r--r--tests/ui/type/ascription/issue-47666.rs2
-rw-r--r--tests/ui/type/ascription/issue-47666.stderr14
-rw-r--r--tests/ui/type/ascription/issue-54516.fixed2
-rw-r--r--tests/ui/type/ascription/issue-54516.rs2
-rw-r--r--tests/ui/type/ascription/issue-54516.stderr10
-rw-r--r--tests/ui/type/ascription/issue-60933.fixed2
-rw-r--r--tests/ui/type/ascription/issue-60933.rs2
-rw-r--r--tests/ui/type/ascription/issue-60933.stderr10
-rw-r--r--tests/ui/type/missing-let-in-binding-2.fixed5
-rw-r--r--tests/ui/type/missing-let-in-binding-2.rs5
-rw-r--r--tests/ui/type/missing-let-in-binding-2.stderr13
-rw-r--r--tests/ui/type/missing-let-in-binding-3.rs5
-rw-r--r--tests/ui/type/missing-let-in-binding-3.stderr10
-rw-r--r--tests/ui/type/missing-let-in-binding-4.rs5
-rw-r--r--tests/ui/type/missing-let-in-binding-4.stderr10
-rw-r--r--tests/ui/type/missing-let-in-binding.fixed2
-rw-r--r--tests/ui/type/missing-let-in-binding.rs2
-rw-r--r--tests/ui/type/missing-let-in-binding.stderr10
-rw-r--r--tests/ui/type/type-ascription-instead-of-statement-end.rs8
-rw-r--r--tests/ui/type/type-ascription-instead-of-statement-end.stderr22
-rw-r--r--tests/ui/type/type-ascription-precedence.rs48
-rw-r--r--tests/ui/type/type-ascription-precedence.stderr73
-rw-r--r--tests/ui/type/type-ascription-with-fn-call.fixed6
-rw-r--r--tests/ui/type/type-ascription-with-fn-call.rs6
-rw-r--r--tests/ui/type/type-ascription-with-fn-call.stderr11
-rw-r--r--tests/ui/type/type-mismatch.stderr20
-rw-r--r--tests/ui/typeck/bad-index-due-to-nested.stderr36
-rw-r--r--tests/ui/typeck/bad-type-in-vec-contains.stderr10
-rw-r--r--tests/ui/typeck/issue-13853.stderr10
-rw-r--r--tests/ui/typeck/repeat-expr-checks-wf.rs10
-rw-r--r--tests/ui/typeck/repeat-expr-checks-wf.stderr12
-rw-r--r--tests/ui/typeck/typeck-builtin-bound-type-parameters.rs1
-rw-r--r--tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr18
-rw-r--r--tests/ui/union/union-sized-field.stderr9
-rw-r--r--tests/ui/unsized-locals/suggest-borrow.stderr11
-rw-r--r--tests/ui/unwind-abis/feature-gate-c-unwind-enabled.rs12
-rw-r--r--tests/ui/unwind-abis/feature-gate-c-unwind.rs13
-rw-r--r--tests/ui/unwind-abis/feature-gate-c-unwind.stderr33
-rw-r--r--tests/ui/unwind-abis/feature-gate-c_unwind.rs4
-rw-r--r--tests/ui/unwind-abis/feature-gate-stdcall-unwind.rs30
-rw-r--r--tests/ui/unwind-abis/feature-gate-stdcall-unwind.stderr66
-rw-r--r--tests/ui/unwind-abis/feature-gate-system-unwind.rs9
-rw-r--r--tests/ui/unwind-abis/feature-gate-system-unwind.stderr12
-rw-r--r--tests/ui/unwind-abis/ffi-unwind-calls-lint.rs1
-rw-r--r--tests/ui/unwind-abis/ffi-unwind-calls-lint.stderr6
1202 files changed, 13484 insertions, 4901 deletions
diff --git a/tests/assembly/slice-is_ascii.rs b/tests/assembly/slice-is_ascii.rs
new file mode 100644
index 00000000000..b3e1fee15a7
--- /dev/null
+++ b/tests/assembly/slice-is_ascii.rs
@@ -0,0 +1,35 @@
+// revisions: WIN LIN
+// [WIN] only-windows
+// [LIN] only-linux
+// assembly-output: emit-asm
+// compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
+// min-llvm-version: 14
+// only-x86_64
+// ignore-sgx
+// ignore-debug
+
+#![feature(str_internals)]
+
+// CHECK-LABEL: is_ascii_simple_demo:
+#[no_mangle]
+pub fn is_ascii_simple_demo(bytes: &[u8]) -> bool {
+    // Linux (System V): pointer is rdi; length is rsi
+    // Windows: pointer is rcx; length is rdx.
+
+    // CHECK-NOT: mov
+    // CHECK-NOT: test
+    // CHECK-NOT: cmp
+
+    // CHECK: .[[LOOPHEAD:.+]]:
+    // CHECK-NEXT: mov [[TEMP:.+]], [[LEN:rsi|rdx]]
+    // CHECK-NEXT: sub [[LEN]], 1
+    // CHECK-NEXT: jb .[[LOOPEXIT:.+]]
+    // CHECK-NEXT: cmp byte ptr [{{rdi|rcx}} + [[TEMP]] - 1], 0
+    // CHECK-NEXT: jns .[[LOOPHEAD]]
+
+    // CHECK-NEXT: .[[LOOPEXIT]]:
+    // CHECK-NEXT: test [[TEMP]], [[TEMP]]
+    // CHECK-NEXT: sete al
+    // CHECK-NEXT: ret
+    core::slice::is_ascii_simple(bytes)
+}
diff --git a/tests/codegen/abi-main-signature-16bit-c-int.rs b/tests/codegen/abi-main-signature-16bit-c-int.rs
index 3548cc06a5b..353e7489b55 100644
--- a/tests/codegen/abi-main-signature-16bit-c-int.rs
+++ b/tests/codegen/abi-main-signature-16bit-c-int.rs
@@ -17,6 +17,7 @@
 // ignore-wasm32
 // ignore-x86
 // ignore-x86_64
+// ignore-loongarch64
 
 fn main() {
 }
diff --git a/tests/codegen/align-offset.rs b/tests/codegen/align-offset.rs
new file mode 100644
index 00000000000..7c7660c5a55
--- /dev/null
+++ b/tests/codegen/align-offset.rs
@@ -0,0 +1,78 @@
+// compile-flags: -O
+// min-llvm-version: 15.0 (because we're using opaque pointers)
+// ignore-debug (debug assertions in `slice::from_raw_parts` block optimizations)
+
+#![crate_type = "lib"]
+
+// CHECK-LABEL: @align8
+#[no_mangle]
+pub fn align8(p: *const u8) -> bool {
+    // CHECK: ret i1 true
+    p.align_offset(8) < 8
+}
+
+#[repr(align(4))]
+pub struct Align4([u8; 4]);
+
+// CHECK-LABEL: @align_to4
+#[no_mangle]
+pub fn align_to4(x: &[u8]) -> bool {
+    // CHECK: ret i1 true
+    let (prefix, _middle, suffix) = unsafe { x.align_to::<Align4>() };
+    prefix.len() < 4 && suffix.len() < 4
+}
+
+// CHECK-LABEL: @align_offset_byte_ptr(ptr{{.+}}%ptr)
+#[no_mangle]
+pub fn align_offset_byte_ptr(ptr: *const u8) -> usize {
+    // CHECK: %[[ADDR:.+]] = ptrtoint ptr %ptr to [[USIZE:i[0-9]+]]
+    // CHECK: %[[UP:.+]] = add [[USIZE]] %[[ADDR]], 31
+    // CHECK: %[[ALIGNED:.+]] = and [[USIZE]] %[[UP]], -32
+    // CHECK: %[[OFFSET:.+]] = sub [[USIZE]] %[[ALIGNED]], %[[ADDR]]
+
+    // Since we're offsetting a byte pointer, there's no further fixups
+    // CHECK-NOT: shr
+    // CHECK-NOT: div
+    // CHECK-NOT: select
+
+    // CHECK: ret [[USIZE]] %[[OFFSET]]
+    ptr.align_offset(32)
+}
+
+// CHECK-LABEL: @align_offset_word_slice(ptr{{.+}}align 4{{.+}}%slice.0
+#[no_mangle]
+pub fn align_offset_word_slice(slice: &[Align4]) -> usize {
+    // CHECK: %[[ADDR:.+]] = ptrtoint ptr %slice.0 to [[USIZE]]
+    // CHECK: %[[UP:.+]] = add [[USIZE]] %[[ADDR]], 31
+    // CHECK: %[[ALIGNED:.+]] = and [[USIZE]] %[[UP]], -32
+    // CHECK: %[[BOFFSET:.+]] = sub [[USIZE]] %[[ALIGNED]], %[[ADDR]]
+    // CHECK: %[[OFFSET:.+]] = lshr exact [[USIZE]] %[[BOFFSET]], 2
+
+    // Slices are known to be aligned, so we don't need the "maybe -1" path
+    // CHECK-NOT: select
+
+    // CHECK: ret [[USIZE]] %[[OFFSET]]
+    slice.as_ptr().align_offset(32)
+}
+
+
+// CHECK-LABEL: @align_offset_word_ptr(ptr{{.+}}%ptr
+#[no_mangle]
+pub fn align_offset_word_ptr(ptr: *const Align4) -> usize {
+    // CHECK: %[[ADDR:.+]] = ptrtoint ptr %ptr to [[USIZE]]
+    // CHECK: %[[UP:.+]] = add [[USIZE]] %[[ADDR]], 31
+    // CHECK: %[[ALIGNED:.+]] = and [[USIZE]] %[[UP]], -32
+    // CHECK: %[[BOFFSET:.+]] = sub [[USIZE]] %[[ALIGNED]], %[[ADDR]]
+
+    // While we can always get a *byte* offset that will work, if the original
+    // pointer is unaligned it might be impossible to return an *element* offset
+    // that will make it aligned. We want it to be a `select`, not a `br`, so
+    // that the assembly will be branchless.
+    // CHECK: %[[LOW:.+]] = and [[USIZE]] %[[ADDR]], 3
+    // CHECK: %[[ORIGINAL_ALIGNED:.+]] = icmp eq [[USIZE]] %[[LOW]], 0
+    // CHECK: %[[OFFSET:.+]] = lshr exact [[USIZE]] %[[BOFFSET]], 2
+    // CHECK: %[[R:.+]] = select i1 %[[ORIGINAL_ALIGNED]], [[USIZE]] %[[OFFSET]], [[USIZE]] -1
+
+    // CHECK: ret [[USIZE]] %[[R]]
+    ptr.align_offset(32)
+}
diff --git a/tests/codegen/ascii-char.rs b/tests/codegen/ascii-char.rs
new file mode 100644
index 00000000000..4167becf5e9
--- /dev/null
+++ b/tests/codegen/ascii-char.rs
@@ -0,0 +1,37 @@
+// compile-flags: -C opt-level=1
+// ignore-debug (the extra assertions get in the way)
+
+#![crate_type = "lib"]
+#![feature(ascii_char)]
+
+use std::ascii::Char as AsciiChar;
+
+// CHECK-LABEL: i8 @unwrap_digit_from_remainder(i32
+#[no_mangle]
+pub fn unwrap_digit_from_remainder(v: u32) -> AsciiChar {
+    // CHECK-NOT: icmp
+    // CHECK-NOT: panic
+
+    // CHECK: %[[R:.+]] = urem i32 %v, 10
+    // CHECK-NEXT: %[[T:.+]] = trunc i32 %[[R]] to i8
+    // CHECK-NEXT: %[[D:.+]] = or i8 %[[T]], 48
+    // CHECK-NEXT: ret i8 %[[D]]
+
+    // CHECK-NOT: icmp
+    // CHECK-NOT: panic
+    AsciiChar::digit((v % 10) as u8).unwrap()
+}
+
+// CHECK-LABEL: i8 @unwrap_from_masked(i8
+#[no_mangle]
+pub fn unwrap_from_masked(b: u8) -> AsciiChar {
+    // CHECK-NOT: icmp
+    // CHECK-NOT: panic
+
+    // CHECK: %[[M:.+]] = and i8 %b, 127
+    // CHECK-NEXT: ret i8 %[[M]]
+
+    // CHECK-NOT: icmp
+    // CHECK-NOT: panic
+    AsciiChar::from_u8(b & 0x7f).unwrap()
+}
diff --git a/tests/codegen/call-llvm-intrinsics.rs b/tests/codegen/call-llvm-intrinsics.rs
index cb8abae198e..11f2917717c 100644
--- a/tests/codegen/call-llvm-intrinsics.rs
+++ b/tests/codegen/call-llvm-intrinsics.rs
@@ -1,6 +1,7 @@
 // compile-flags: -C no-prepopulate-passes -Copt-level=0
 
 // ignore-riscv64
+// ignore-loongarch64
 
 #![feature(link_llvm_intrinsics)]
 #![crate_type = "lib"]
diff --git a/tests/codegen/catch-unwind.rs b/tests/codegen/catch-unwind.rs
index b90ef104ce7..6b63b83ef45 100644
--- a/tests/codegen/catch-unwind.rs
+++ b/tests/codegen/catch-unwind.rs
@@ -10,6 +10,8 @@
 // ignore-riscv64 FIXME
 // On s390x the closure is also in another function
 // ignore-s390x FIXME
+// On loongarch64 the closure is also in another function
+// ignore-loongarch64 FIXME
 
 #![crate_type = "lib"]
 #![feature(c_unwind)]
diff --git a/tests/codegen/enable-lto-unit-splitting.rs b/tests/codegen/enable-lto-unit-splitting.rs
new file mode 100644
index 00000000000..7daa05f69d1
--- /dev/null
+++ b/tests/codegen/enable-lto-unit-splitting.rs
@@ -0,0 +1,10 @@
+// Verifies that "EnableSplitLTOUnit" module flag is added.
+//
+// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit
+
+#![crate_type="lib"]
+
+pub fn foo() {
+}
+
+// CHECK: !{{[0-9]+}} = !{i32 4, !"EnableSplitLTOUnit", i32 1}
diff --git a/tests/codegen/fewer-names.rs b/tests/codegen/fewer-names.rs
index 7f383a5c149..df1080bff2b 100644
--- a/tests/codegen/fewer-names.rs
+++ b/tests/codegen/fewer-names.rs
@@ -7,14 +7,14 @@
 
 #[no_mangle]
 pub fn sum(x: u32, y: u32) -> u32 {
-// YES-LABEL: define{{.*}}i32 @sum(i32 noundef %0, i32 noundef %1)
-// YES-NEXT:    %3 = add i32 %1, %0
-// YES-NEXT:    ret i32 %3
+    // YES-LABEL: define{{.*}}i32 @sum(i32 noundef %0, i32 noundef %1)
+    // YES-NEXT:    %3 = add i32 %1, %0
+    // YES-NEXT:    ret i32 %3
 
-// NO-LABEL: define{{.*}}i32 @sum(i32 noundef %x, i32 noundef %y)
-// NO-NEXT:  start:
-// NO-NEXT:    %0 = add i32 %y, %x
-// NO-NEXT:    ret i32 %0
+    // NO-LABEL: define{{.*}}i32 @sum(i32 noundef %x, i32 noundef %y)
+    // NO-NEXT:  start:
+    // NO-NEXT:    %z = add i32 %y, %x
+    // NO-NEXT:    ret i32 %z
     let z = x + y;
     z
 }
diff --git a/tests/codegen/global_asm.rs b/tests/codegen/global_asm.rs
index 9912b1e75bf..41a99530ad2 100644
--- a/tests/codegen/global_asm.rs
+++ b/tests/codegen/global_asm.rs
@@ -18,6 +18,7 @@
 // ignore-wasm32
 // ignore-wasm64
 // ignore-emscripten
+// ignore-loongarch64
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/global_asm_include.rs b/tests/codegen/global_asm_include.rs
index b68c5ad3b9d..e25c164f407 100644
--- a/tests/codegen/global_asm_include.rs
+++ b/tests/codegen/global_asm_include.rs
@@ -18,6 +18,7 @@
 // ignore-wasm32
 // ignore-wasm64
 // ignore-emscripten
+// ignore-loongarch64
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
diff --git a/tests/codegen/global_asm_x2.rs b/tests/codegen/global_asm_x2.rs
index d87e02befb9..71ecef124f1 100644
--- a/tests/codegen/global_asm_x2.rs
+++ b/tests/codegen/global_asm_x2.rs
@@ -18,6 +18,7 @@
 // ignore-wasm32
 // ignore-wasm64
 // ignore-emscripten
+// ignore-loongarch64
 // compile-flags: -C no-prepopulate-passes
 
 #![crate_type = "lib"]
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/codegen/loongarch-abi/call-llvm-intrinsics.rs b/tests/codegen/loongarch-abi/call-llvm-intrinsics.rs
new file mode 100644
index 00000000000..4b78f6e24f7
--- /dev/null
+++ b/tests/codegen/loongarch-abi/call-llvm-intrinsics.rs
@@ -0,0 +1,31 @@
+// compile-flags: -C no-prepopulate-passes
+
+// only-loongarch64
+
+#![feature(link_llvm_intrinsics)]
+#![crate_type = "lib"]
+
+struct A;
+
+impl Drop for A {
+    fn drop(&mut self) {
+        println!("A");
+    }
+}
+
+extern "C" {
+    #[link_name = "llvm.sqrt.f32"]
+    fn sqrt(x: f32) -> f32;
+}
+
+pub fn do_call() {
+    let _a = A;
+
+    unsafe {
+        // Ensure that we `call` LLVM intrinsics instead of trying to `invoke` them
+        // CHECK: store float 4.000000e+00, ptr %{{.}}, align 4
+        // CHECK: load float, ptr %{{.}}, align 4
+        // CHECK: call float @llvm.sqrt.f32(float %{{.}}
+        sqrt(4.0);
+    }
+}
diff --git a/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs b/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs
new file mode 100644
index 00000000000..7555553c2c5
--- /dev/null
+++ b/tests/codegen/loongarch-abi/loongarch64-lp64d-abi.rs
@@ -0,0 +1,293 @@
+// compile-flags: -C no-prepopulate-passes
+// only-loongarch64
+// only-linux
+
+#![crate_type = "lib"]
+
+// CHECK: define void @f_fpr_tracking(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, i8 noundef zeroext %i)
+#[no_mangle]
+pub extern "C" fn f_fpr_tracking(
+    a: f64,
+    b: f64,
+    c: f64,
+    d: f64,
+    e: f64,
+    f: f64,
+    g: f64,
+    h: f64,
+    i: u8,
+) {
+}
+
+#[repr(C)]
+pub struct Double {
+    f: f64,
+}
+
+#[repr(C)]
+pub struct DoubleDouble {
+    f: f64,
+    g: f64,
+}
+
+#[repr(C)]
+pub struct DoubleFloat {
+    f: f64,
+    g: f32,
+}
+
+// CHECK: define void @f_double_s_arg(double %0)
+#[no_mangle]
+pub extern "C" fn f_double_s_arg(a: Double) {}
+
+// CHECK: define double @f_ret_double_s()
+#[no_mangle]
+pub extern "C" fn f_ret_double_s() -> Double {
+    Double { f: 1. }
+}
+
+// CHECK: define void @f_double_double_s_arg({ double, double } %0)
+#[no_mangle]
+pub extern "C" fn f_double_double_s_arg(a: DoubleDouble) {}
+
+// CHECK: define { double, double } @f_ret_double_double_s()
+#[no_mangle]
+pub extern "C" fn f_ret_double_double_s() -> DoubleDouble {
+    DoubleDouble { f: 1., g: 2. }
+}
+
+// CHECK: define void @f_double_float_s_arg({ double, float } %0)
+#[no_mangle]
+pub extern "C" fn f_double_float_s_arg(a: DoubleFloat) {}
+
+// CHECK: define { double, float } @f_ret_double_float_s()
+#[no_mangle]
+pub extern "C" fn f_ret_double_float_s() -> DoubleFloat {
+    DoubleFloat { f: 1., g: 2. }
+}
+
+// CHECK: define void @f_double_double_s_arg_insufficient_fprs(double %0, double %1, double %2, double %3, double %4, double %5, double %6, [2 x i64] %7)
+#[no_mangle]
+pub extern "C" fn f_double_double_s_arg_insufficient_fprs(
+    a: f64,
+    b: f64,
+    c: f64,
+    d: f64,
+    e: f64,
+    f: f64,
+    g: f64,
+    h: DoubleDouble,
+) {
+}
+
+#[repr(C)]
+pub struct DoubleInt8 {
+    f: f64,
+    i: i8,
+}
+
+#[repr(C)]
+pub struct DoubleUInt8 {
+    f: f64,
+    i: u8,
+}
+
+#[repr(C)]
+pub struct DoubleInt32 {
+    f: f64,
+    i: i32,
+}
+
+#[repr(C)]
+pub struct DoubleInt64 {
+    f: f64,
+    i: i64,
+}
+
+// CHECK: define void @f_double_int8_s_arg({ double, i8 } %0)
+#[no_mangle]
+pub extern "C" fn f_double_int8_s_arg(a: DoubleInt8) {}
+
+// CHECK: define { double, i8 } @f_ret_double_int8_s()
+#[no_mangle]
+pub extern "C" fn f_ret_double_int8_s() -> DoubleInt8 {
+    DoubleInt8 { f: 1., i: 2 }
+}
+
+// CHECK: define void @f_double_int32_s_arg({ double, i32 } %0)
+#[no_mangle]
+pub extern "C" fn f_double_int32_s_arg(a: DoubleInt32) {}
+
+// CHECK: define { double, i32 } @f_ret_double_int32_s()
+#[no_mangle]
+pub extern "C" fn f_ret_double_int32_s() -> DoubleInt32 {
+    DoubleInt32 { f: 1., i: 2 }
+}
+
+// CHECK: define void @f_double_uint8_s_arg({ double, i8 } %0)
+#[no_mangle]
+pub extern "C" fn f_double_uint8_s_arg(a: DoubleUInt8) {}
+
+// CHECK: define { double, i8 } @f_ret_double_uint8_s()
+#[no_mangle]
+pub extern "C" fn f_ret_double_uint8_s() -> DoubleUInt8 {
+    DoubleUInt8 { f: 1., i: 2 }
+}
+
+// CHECK: define void @f_double_int64_s_arg({ double, i64 } %0)
+#[no_mangle]
+pub extern "C" fn f_double_int64_s_arg(a: DoubleInt64) {}
+
+// CHECK: define { double, i64 } @f_ret_double_int64_s()
+#[no_mangle]
+pub extern "C" fn f_ret_double_int64_s() -> DoubleInt64 {
+    DoubleInt64 { f: 1., i: 2 }
+}
+
+// CHECK: define void @f_double_int8_s_arg_insufficient_gprs(i32 noundef signext %a, i32 noundef signext %b, i32 noundef signext %c, i32 noundef signext %d, i32 noundef signext %e, i32 noundef signext %f, i32 noundef signext %g, i32 noundef signext %h, [2 x i64] %0)
+#[no_mangle]
+pub extern "C" fn f_double_int8_s_arg_insufficient_gprs(
+    a: i32,
+    b: i32,
+    c: i32,
+    d: i32,
+    e: i32,
+    f: i32,
+    g: i32,
+    h: i32,
+    i: DoubleInt8,
+) {
+}
+
+// CHECK: define void @f_struct_double_int8_insufficient_fprs(float %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, [2 x i64] %8)
+#[no_mangle]
+pub extern "C" fn f_struct_double_int8_insufficient_fprs(
+    a: f32,
+    b: f64,
+    c: f64,
+    d: f64,
+    e: f64,
+    f: f64,
+    g: f64,
+    h: f64,
+    i: DoubleInt8,
+) {
+}
+
+#[repr(C)]
+pub struct DoubleArr1 {
+    a: [f64; 1],
+}
+
+// CHECK: define void @f_doublearr1_s_arg(double %0)
+#[no_mangle]
+pub extern "C" fn f_doublearr1_s_arg(a: DoubleArr1) {}
+
+// CHECK: define double @f_ret_doublearr1_s()
+#[no_mangle]
+pub extern "C" fn f_ret_doublearr1_s() -> DoubleArr1 {
+    DoubleArr1 { a: [1.] }
+}
+
+#[repr(C)]
+pub struct DoubleArr2 {
+    a: [f64; 2],
+}
+
+// CHECK: define void @f_doublearr2_s_arg({ double, double } %0)
+#[no_mangle]
+pub extern "C" fn f_doublearr2_s_arg(a: DoubleArr2) {}
+
+// CHECK: define { double, double } @f_ret_doublearr2_s()
+#[no_mangle]
+pub extern "C" fn f_ret_doublearr2_s() -> DoubleArr2 {
+    DoubleArr2 { a: [1., 2.] }
+}
+
+#[repr(C)]
+pub struct Tricky1 {
+    f: [f64; 1],
+}
+
+#[repr(C)]
+pub struct DoubleArr2Tricky1 {
+    g: [Tricky1; 2],
+}
+
+// CHECK: define void @f_doublearr2_tricky1_s_arg({ double, double } %0)
+#[no_mangle]
+pub extern "C" fn f_doublearr2_tricky1_s_arg(a: DoubleArr2Tricky1) {}
+
+// CHECK: define { double, double } @f_ret_doublearr2_tricky1_s()
+#[no_mangle]
+pub extern "C" fn f_ret_doublearr2_tricky1_s() -> DoubleArr2Tricky1 {
+    DoubleArr2Tricky1 { g: [Tricky1 { f: [1.] }, Tricky1 { f: [2.] }] }
+}
+
+#[repr(C)]
+pub struct EmptyStruct {}
+
+#[repr(C)]
+pub struct DoubleArr2Tricky2 {
+    s: EmptyStruct,
+    g: [Tricky1; 2],
+}
+
+// CHECK: define void @f_doublearr2_tricky2_s_arg({ double, double } %0)
+#[no_mangle]
+pub extern "C" fn f_doublearr2_tricky2_s_arg(a: DoubleArr2Tricky2) {}
+
+// CHECK: define { double, double } @f_ret_doublearr2_tricky2_s()
+#[no_mangle]
+pub extern "C" fn f_ret_doublearr2_tricky2_s() -> DoubleArr2Tricky2 {
+    DoubleArr2Tricky2 { s: EmptyStruct {}, g: [Tricky1 { f: [1.] }, Tricky1 { f: [2.] }] }
+}
+
+#[repr(C)]
+pub struct IntDoubleInt {
+    a: i32,
+    b: f64,
+    c: i32,
+}
+
+// CHECK: define void @f_int_double_int_s_arg(ptr noalias nocapture noundef dereferenceable(24) %a)
+#[no_mangle]
+pub extern "C" fn f_int_double_int_s_arg(a: IntDoubleInt) {}
+
+// CHECK: define void @f_ret_int_double_int_s(ptr noalias nocapture noundef sret(%IntDoubleInt) dereferenceable(24) %0)
+#[no_mangle]
+pub extern "C" fn f_ret_int_double_int_s() -> IntDoubleInt {
+    IntDoubleInt { a: 1, b: 2., c: 3 }
+}
+
+#[repr(C)]
+pub struct CharCharDouble {
+    a: u8,
+    b: u8,
+    c: f64,
+}
+
+// CHECK: define void @f_char_char_double_s_arg([2 x i64] %0)
+#[no_mangle]
+pub extern "C" fn f_char_char_double_s_arg(a: CharCharDouble) {}
+
+// CHECK: define [2 x i64] @f_ret_char_char_double_s()
+#[no_mangle]
+pub extern "C" fn f_ret_char_char_double_s() -> CharCharDouble {
+    CharCharDouble { a: 1, b: 2, c: 3. }
+}
+
+#[repr(C)]
+pub union DoubleU {
+    a: f64,
+}
+
+// CHECK: define void @f_double_u_arg(i64 %0)
+#[no_mangle]
+pub extern "C" fn f_double_u_arg(a: DoubleU) {}
+
+// CHECK: define i64 @f_ret_double_u()
+#[no_mangle]
+pub extern "C" fn f_ret_double_u() -> DoubleU {
+    unsafe { DoubleU { a: 1. } }
+}
diff --git a/tests/codegen/mem-replace-big-type.rs b/tests/codegen/mem-replace-big-type.rs
index f6898e2f758..acf759ebe54 100644
--- a/tests/codegen/mem-replace-big-type.rs
+++ b/tests/codegen/mem-replace-big-type.rs
@@ -11,7 +11,10 @@
 #[repr(C, align(8))]
 pub struct Big([u64; 7]);
 pub fn replace_big(dst: &mut Big, src: Big) -> Big {
-    // Before the `read_via_copy` intrinsic, this emitted six `memcpy`s.
+    // Back in 1.68, this emitted six `memcpy`s.
+    // `read_via_copy` in 1.69 got that down to three.
+    // `write_via_move` it was originally down to the essential two, however
+    // with nrvo disabled it is back at 3
     std::mem::replace(dst, src)
 }
 
@@ -22,15 +25,12 @@ pub fn replace_big(dst: &mut Big, src: Big) -> Big {
 
 // For a large type, we expect exactly three `memcpy`s
 // CHECK-LABEL: define internal void @{{.+}}mem{{.+}}replace{{.+}}sret(%Big)
-    // CHECK-NOT: alloca
-    // CHECK: alloca %Big
-    // CHECK-NOT: alloca
-    // CHECK-NOT: call void @llvm.memcpy
-    // CHECK: call void @llvm.memcpy.{{.+}}({{i8\*|ptr}} align 8 %{{.*}}, {{i8\*|ptr}} align 8 %{{.*}}, i{{.*}} 56, i1 false)
-    // CHECK-NOT: call void @llvm.memcpy
-    // CHECK: call void @llvm.memcpy.{{.+}}({{i8\*|ptr}} align 8 %{{.*}}, {{i8\*|ptr}} align 8 %{{.*}}, i{{.*}} 56, i1 false)
-    // CHECK-NOT: call void @llvm.memcpy
-    // CHECK: call void @llvm.memcpy.{{.+}}({{i8\*|ptr}} align 8 %{{.*}}, {{i8\*|ptr}} align 8 %{{.*}}, i{{.*}} 56, i1 false)
-    // CHECK-NOT: call void @llvm.memcpy
+// CHECK-NOT: call void @llvm.memcpy
+// CHECK: call void @llvm.memcpy.{{.+}}({{i8\*|ptr}} align 8 %result, {{i8\*|ptr}} align 8 %dest, i{{.*}} 56, i1 false)
+// CHECK-NOT: call void @llvm.memcpy
+// CHECK: call void @llvm.memcpy.{{.+}}({{i8\*|ptr}} align 8 %dest, {{i8\*|ptr}} align 8 %src, i{{.*}} 56, i1 false)
+// CHECK-NOT: call void @llvm.memcpy
+// CHECK: call void @llvm.memcpy.{{.+}}({{i8\*|ptr}} align 8 %0, {{i8\*|ptr}} align 8 %result, i{{.*}} 56, i1 false)
+// CHECK-NOT: call void @llvm.memcpy
 
 // CHECK-NOT: call void @llvm.memcpy
diff --git a/tests/codegen/mem-replace-direct-memcpy.rs b/tests/codegen/mem-replace-direct-memcpy.rs
deleted file mode 100644
index 83babab4f84..00000000000
--- a/tests/codegen/mem-replace-direct-memcpy.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// This test ensures that `mem::replace::<T>` only ever calls `@llvm.memcpy`
-// with `size_of::<T>()` as the size, and never goes through any wrapper that
-// may e.g. multiply `size_of::<T>()` with a variable "count" (which is only
-// known to be `1` after inlining).
-
-// compile-flags: -C no-prepopulate-passes -Zinline-mir=no
-// ignore-debug: the debug assertions get in the way
-
-#![crate_type = "lib"]
-
-pub fn replace_byte(dst: &mut u8, src: u8) -> u8 {
-    std::mem::replace(dst, src)
-}
-
-// NOTE(eddyb) the `CHECK-NOT`s ensure that the only calls of `@llvm.memcpy` in
-// the entire output, are the direct calls we want, from `ptr::replace`.
-
-// CHECK-NOT: call void @llvm.memcpy
-
-// For a small type, we expect one each of `load`/`store`/`memcpy` instead
-// CHECK-LABEL: define internal noundef i8 @{{.+}}mem{{.+}}replace
-    // CHECK-NOT: alloca
-    // CHECK: alloca i8
-    // CHECK-NOT: alloca
-    // CHECK-NOT: call void @llvm.memcpy
-    // CHECK: load i8
-    // CHECK-NOT: call void @llvm.memcpy
-    // CHECK: store i8
-    // CHECK-NOT: call void @llvm.memcpy
-    // CHECK: call void @llvm.memcpy.{{.+}}({{i8\*|ptr}} align 1 %{{.*}}, {{i8\*|ptr}} align 1 %{{.*}}, i{{.*}} 1, i1 false)
-    // CHECK-NOT: call void @llvm.memcpy
-
-// CHECK-NOT: call void @llvm.memcpy
diff --git a/tests/codegen/mem-replace-simple-type.rs b/tests/codegen/mem-replace-simple-type.rs
new file mode 100644
index 00000000000..4253ef13666
--- /dev/null
+++ b/tests/codegen/mem-replace-simple-type.rs
@@ -0,0 +1,34 @@
+// compile-flags: -O -C no-prepopulate-passes
+// min-llvm-version: 15.0 (for opaque pointers)
+// only-x86_64 (to not worry about usize differing)
+// ignore-debug (the debug assertions get in the way)
+
+#![crate_type = "lib"]
+
+#[no_mangle]
+// CHECK-LABEL: @replace_usize(
+pub fn replace_usize(r: &mut usize, v: usize) -> usize {
+    // CHECK-NOT: alloca
+    // CHECK: %[[R:.+]] = load i64, ptr %r
+    // CHECK: store i64 %v, ptr %r
+    // CHECK: ret i64 %[[R]]
+    std::mem::replace(r, v)
+}
+
+#[no_mangle]
+// CHECK-LABEL: @replace_ref_str(
+pub fn replace_ref_str<'a>(r: &mut &'a str, v: &'a str) -> &'a str {
+    // CHECK-NOT: alloca
+    // CHECK: %[[A:.+]] = load ptr
+    // CHECK: %[[B:.+]] = load i64
+    // CHECK-NOT: store
+    // CHECK-NOT: load
+    // CHECK: store ptr
+    // CHECK: store i64
+    // CHECK-NOT: load
+    // CHECK-NOT: store
+    // CHECK: %[[P1:.+]] = insertvalue { ptr, i64 } poison, ptr %[[A]], 0
+    // CHECK: %[[P2:.+]] = insertvalue { ptr, i64 } %[[P1]], i64 %[[B]], 1
+    // CHECK: ret { ptr, i64 } %[[P2]]
+    std::mem::replace(r, v)
+}
diff --git a/tests/codegen/nrvo.rs b/tests/codegen/nrvo.rs
index fddb0d1fb3c..b2ae99f3761 100644
--- a/tests/codegen/nrvo.rs
+++ b/tests/codegen/nrvo.rs
@@ -8,7 +8,7 @@
 pub fn nrvo(init: fn(&mut [u8; 4096])) -> [u8; 4096] {
     // CHECK-LABEL: nrvo
     // CHECK: @llvm.memset
-    // CHECK-NOT: @llvm.memcpy
+    // FIXME: turn on nrvo then check-not: @llvm.memcpy
     // CHECK: ret
     // CHECK-EMPTY
     let mut buf = [0; 4096];
diff --git a/tests/codegen/repr-transparent-aggregates-1.rs b/tests/codegen/repr-transparent-aggregates-1.rs
index f733de12b35..9c4b0e58e71 100644
--- a/tests/codegen/repr-transparent-aggregates-1.rs
+++ b/tests/codegen/repr-transparent-aggregates-1.rs
@@ -10,6 +10,7 @@
 // ignore-riscv64 see codegen/riscv-abi
 // ignore-s390x
 // ignore-windows
+// ignore-loongarch64
 // See repr-transparent.rs
 
 #![feature(transparent_unions)]
diff --git a/tests/codegen/repr-transparent-aggregates-2.rs b/tests/codegen/repr-transparent-aggregates-2.rs
index e9fa5143b18..a7bde2d05c3 100644
--- a/tests/codegen/repr-transparent-aggregates-2.rs
+++ b/tests/codegen/repr-transparent-aggregates-2.rs
@@ -12,6 +12,7 @@
 // ignore-sparc64
 // ignore-x86
 // ignore-x86_64
+// ignore-loongarch64
 // See repr-transparent.rs
 
 #![feature(transparent_unions)]
diff --git a/tests/codegen/repr-transparent.rs b/tests/codegen/repr-transparent.rs
index 311cbfbaa09..759ddea67a5 100644
--- a/tests/codegen/repr-transparent.rs
+++ b/tests/codegen/repr-transparent.rs
@@ -3,6 +3,7 @@
 // ignore-riscv64 riscv64 has an i128 type used with test_Vector
 // see codegen/riscv-abi for riscv functiona call tests
 // ignore-s390x s390x with default march passes vector types per reference
+// ignore-loongarch64 see codegen/loongarch-abi for loongarch function call tests
 
 #![crate_type="lib"]
 #![feature(repr_simd, transparent_unions)]
diff --git a/tests/codegen/sanitizer-cfi-add-canonical-jump-tables-flag.rs b/tests/codegen/sanitizer-cfi-add-canonical-jump-tables-flag.rs
index c42fbba7425..1ee8bdfc3ab 100644
--- a/tests/codegen/sanitizer-cfi-add-canonical-jump-tables-flag.rs
+++ b/tests/codegen/sanitizer-cfi-add-canonical-jump-tables-flag.rs
@@ -8,4 +8,4 @@
 pub fn foo() {
 }
 
-// CHECK: !{{[0-9]+}} = !{i32 2, !"CFI Canonical Jump Tables", i32 1}
+// CHECK: !{{[0-9]+}} = !{i32 4, !"CFI Canonical Jump Tables", i32 1}
diff --git a/tests/codegen/sanitizer-cfi-add-enable-split-lto-unit-flag.rs b/tests/codegen/sanitizer-cfi-add-enable-split-lto-unit-flag.rs
new file mode 100644
index 00000000000..68c91384b82
--- /dev/null
+++ b/tests/codegen/sanitizer-cfi-add-enable-split-lto-unit-flag.rs
@@ -0,0 +1,11 @@
+// Verifies that "EnableSplitLTOUnit" module flag is added.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsanitizer=cfi
+
+#![crate_type="lib"]
+
+pub fn foo() {
+}
+
+// CHECK: !{{[0-9]+}} = !{i32 4, !"EnableSplitLTOUnit", i32 1}
diff --git a/tests/codegen/sanitizer-cfi-emit-type-checks-attr-no-sanitize.rs b/tests/codegen/sanitizer-cfi-emit-type-checks-attr-no-sanitize.rs
new file mode 100644
index 00000000000..2b61c9078fd
--- /dev/null
+++ b/tests/codegen/sanitizer-cfi-emit-type-checks-attr-no-sanitize.rs
@@ -0,0 +1,18 @@
+// Verifies that pointer type membership tests for indirect calls are omitted.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
+
+#![crate_type="lib"]
+#![feature(no_sanitize)]
+
+#[no_sanitize(cfi)]
+pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
+    // CHECK-LABEL: sanitizer_cfi_emit_type_checks_attr_no_sanitize::foo
+    // CHECK:       Function Attrs: {{.*}}
+    // CHECK-LABEL: define{{.*}}foo{{.*}}!type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+    // CHECK:       start:
+    // CHECK-NEXT:  {{%.+}} = call i32 %f(i32 %arg)
+    // CHECK-NEXT:  ret i32 {{%.+}}
+    f(arg)
+}
diff --git a/tests/codegen/sanitizer-cfi-emit-type-checks.rs b/tests/codegen/sanitizer-cfi-emit-type-checks.rs
index 597b867ebad..cea6aac8b8b 100644
--- a/tests/codegen/sanitizer-cfi-emit-type-checks.rs
+++ b/tests/codegen/sanitizer-cfi-emit-type-checks.rs
@@ -6,13 +6,12 @@
 #![crate_type="lib"]
 
 pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
-    // CHECK-LABEL: define{{.*}}foo{{.*}}!type !{{[0-9]+}}
+    // CHECK-LABEL: define{{.*}}foo{{.*}}!type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
     // CHECK:       start:
     // CHECK:       [[TT:%.+]] = call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"{{[[:print:]]+}}")
     // CHECK-NEXT:  br i1 [[TT]], label %type_test.pass, label %type_test.fail
     // CHECK:       type_test.pass:
     // CHECK-NEXT:  {{%.+}} = call i32 %f(i32 %arg)
-    // CHECK-NEXT:  br label %bb1
     // CHECK:       type_test.fail:
     // CHECK-NEXT:  call void @llvm.trap()
     // CHECK-NEXT:  unreachable
diff --git a/tests/codegen/sanitizer-cfi-emit-type-metadata-attr-cfi-encoding.rs b/tests/codegen/sanitizer-cfi-emit-type-metadata-attr-cfi-encoding.rs
new file mode 100644
index 00000000000..084d8bf803c
--- /dev/null
+++ b/tests/codegen/sanitizer-cfi-emit-type-metadata-attr-cfi-encoding.rs
@@ -0,0 +1,48 @@
+// Verifies that user-defined CFI encoding for types are emitted.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi
+
+#![crate_type="lib"]
+#![feature(cfi_encoding, extern_types)]
+
+#[cfi_encoding = "3Foo"]
+pub struct Type1(i32);
+
+extern {
+    #[cfi_encoding = "3Bar"]
+    type Type2;
+}
+
+#[cfi_encoding = "3Baz"]
+#[repr(transparent)]
+pub struct Type3(i32);
+
+pub fn foo0(_: Type1) { }
+// CHECK: define{{.*}}foo0{{.*}}!type ![[TYPE0:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo1(_: Type1, _: Type1) { }
+// CHECK: define{{.*}}foo1{{.*}}!type ![[TYPE1:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo2(_: Type1, _: Type1, _: Type1) { }
+// CHECK: define{{.*}}foo2{{.*}}!type ![[TYPE2:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo3(_: *mut Type2) { }
+// CHECK: define{{.*}}foo3{{.*}}!type ![[TYPE3:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo4(_: *mut Type2, _: *mut Type2) { }
+// CHECK: define{{.*}}foo4{{.*}}!type ![[TYPE4:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo5(_: *mut Type2, _: *mut Type2, _: *mut Type2) { }
+// CHECK: define{{.*}}foo5{{.*}}!type ![[TYPE5:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo6(_: *mut Type3) { }
+// CHECK: define{{.*}}foo6{{.*}}!type ![[TYPE6:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo7(_: *mut Type3, _: *mut Type3) { }
+// CHECK: define{{.*}}foo7{{.*}}!type ![[TYPE7:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo8(_: *mut Type3, _: *mut Type3, _: *mut Type3) { }
+// CHECK: define{{.*}}foo8{{.*}}!type ![[TYPE8:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+
+// CHECK: ![[TYPE0]] = !{i64 0, !"_ZTSFv3FooE"}
+// CHECK: ![[TYPE1]] = !{i64 0, !"_ZTSFv3FooS_E"}
+// CHECK: ![[TYPE2]] = !{i64 0, !"_ZTSFv3FooS_S_E"}
+// CHECK: ![[TYPE3]] = !{i64 0, !"_ZTSFvP3BarE"}
+// CHECK: ![[TYPE4]] = !{i64 0, !"_ZTSFvP3BarS0_E"}
+// CHECK: ![[TYPE5]] = !{i64 0, !"_ZTSFvP3BarS0_S0_E"}
+// CHECK: ![[TYPE6]] = !{i64 0, !"_ZTSFvP3BazE"}
+// CHECK: ![[TYPE7]] = !{i64 0, !"_ZTSFvP3BazS0_E"}
+// CHECK: ![[TYPE8]] = !{i64 0, !"_ZTSFvP3BazS0_S0_E"}
diff --git a/tests/codegen/sanitizer-cfi-emit-type-metadata-id-itanium-cxx-abi.rs b/tests/codegen/sanitizer-cfi-emit-type-metadata-id-itanium-cxx-abi.rs
index b9c33914360..71e26e3fe8a 100644
--- a/tests/codegen/sanitizer-cfi-emit-type-metadata-id-itanium-cxx-abi.rs
+++ b/tests/codegen/sanitizer-cfi-emit-type-metadata-id-itanium-cxx-abi.rs
@@ -10,7 +10,7 @@
 #![feature(adt_const_params, extern_types, inline_const, type_alias_impl_trait)]
 
 extern crate core;
-use core::ffi::c_void;
+use core::ffi::*;
 use std::marker::PhantomData;
 
 // User-defined type (structure)
@@ -113,9 +113,10 @@ pub fn fn1<'a>() {
     let _: Type11 = Quuux;
 }
 
-// repr(transparent) user-defined type
+// Helper type to make Type12 have an unique id
 struct Foo(i32);
 
+// repr(transparent) user-defined type
 #[repr(transparent)]
 pub struct Type12 {
     member1: (),
@@ -131,313 +132,313 @@ pub struct Type13<'a> {
     member3: &'a Type13<'a>,
 }
 
-// Helper type to allow `Type14<Bar>` to be a unique ID
+// Helper type to make Type14 have an unique id
 pub struct Bar;
 
-// repr(transparent) parameterized type
+// repr(transparent) user-defined generic type
 #[repr(transparent)]
 pub struct Type14<T>(T);
 
 pub fn foo0(_: ()) { }
-// CHECK: define{{.*}}foo0{{.*}}!type ![[TYPE0:[0-9]+]]
-pub fn foo1(_: c_void, _: ()) { }
-// CHECK: define{{.*}}foo1{{.*}}!type ![[TYPE1:[0-9]+]]
+// CHECK: define{{.*}}foo0{{.*}}!type ![[TYPE0:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo1(_: (), _: c_void) { }
+// CHECK: define{{.*}}foo1{{.*}}!type ![[TYPE1:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo2(_: (), _: c_void, _: c_void) { }
-// CHECK: define{{.*}}foo2{{.*}}!type ![[TYPE2:[0-9]+]]
-pub fn foo3(_: *mut c_void) { }
-// CHECK: define{{.*}}foo3{{.*}}!type ![[TYPE3:[0-9]+]]
-pub fn foo4(_: *mut c_void, _: *mut ()) { }
-// CHECK: define{{.*}}foo4{{.*}}!type ![[TYPE4:[0-9]+]]
+// CHECK: define{{.*}}foo2{{.*}}!type ![[TYPE2:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo3(_: *mut ()) { }
+// CHECK: define{{.*}}foo3{{.*}}!type ![[TYPE3:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo4(_: *mut (), _: *mut c_void) { }
+// CHECK: define{{.*}}foo4{{.*}}!type ![[TYPE4:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo5(_: *mut (), _: *mut c_void, _: *mut c_void) { }
-// CHECK: define{{.*}}foo5{{.*}}!type ![[TYPE5:[0-9]+]]
-pub fn foo6(_: *const c_void) { }
-// CHECK: define{{.*}}foo6{{.*}}!type ![[TYPE6:[0-9]+]]
-pub fn foo7(_: *const c_void, _: *const ()) { }
-// CHECK: define{{.*}}foo7{{.*}}!type ![[TYPE7:[0-9]+]]
+// CHECK: define{{.*}}foo5{{.*}}!type ![[TYPE5:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo6(_: *const ()) { }
+// CHECK: define{{.*}}foo6{{.*}}!type ![[TYPE6:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo7(_: *const (), _: *const c_void) { }
+// CHECK: define{{.*}}foo7{{.*}}!type ![[TYPE7:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo8(_: *const (), _: *const c_void, _: *const c_void) { }
-// CHECK: define{{.*}}foo8{{.*}}!type ![[TYPE8:[0-9]+]]
+// CHECK: define{{.*}}foo8{{.*}}!type ![[TYPE8:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo9(_: bool) { }
-// CHECK: define{{.*}}foo9{{.*}}!type ![[TYPE9:[0-9]+]]
+// CHECK: define{{.*}}foo9{{.*}}!type ![[TYPE9:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo10(_: bool, _: bool) { }
-// CHECK: define{{.*}}foo10{{.*}}!type ![[TYPE10:[0-9]+]]
+// CHECK: define{{.*}}foo10{{.*}}!type ![[TYPE10:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo11(_: bool, _: bool, _: bool) { }
-// CHECK: define{{.*}}foo11{{.*}}!type ![[TYPE11:[0-9]+]]
+// CHECK: define{{.*}}foo11{{.*}}!type ![[TYPE11:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo12(_: i8) { }
-// CHECK: define{{.*}}foo12{{.*}}!type ![[TYPE12:[0-9]+]]
+// CHECK: define{{.*}}foo12{{.*}}!type ![[TYPE12:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo13(_: i8, _: i8) { }
-// CHECK: define{{.*}}foo13{{.*}}!type ![[TYPE13:[0-9]+]]
+// CHECK: define{{.*}}foo13{{.*}}!type ![[TYPE13:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo14(_: i8, _: i8, _: i8) { }
-// CHECK: define{{.*}}foo14{{.*}}!type ![[TYPE14:[0-9]+]]
+// CHECK: define{{.*}}foo14{{.*}}!type ![[TYPE14:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo15(_: i16) { }
-// CHECK: define{{.*}}foo15{{.*}}!type ![[TYPE15:[0-9]+]]
+// CHECK: define{{.*}}foo15{{.*}}!type ![[TYPE15:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo16(_: i16, _: i16) { }
-// CHECK: define{{.*}}foo16{{.*}}!type ![[TYPE16:[0-9]+]]
+// CHECK: define{{.*}}foo16{{.*}}!type ![[TYPE16:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo17(_: i16, _: i16, _: i16) { }
-// CHECK: define{{.*}}foo17{{.*}}!type ![[TYPE17:[0-9]+]]
+// CHECK: define{{.*}}foo17{{.*}}!type ![[TYPE17:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo18(_: i32) { }
-// CHECK: define{{.*}}foo18{{.*}}!type ![[TYPE18:[0-9]+]]
+// CHECK: define{{.*}}foo18{{.*}}!type ![[TYPE18:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo19(_: i32, _: i32) { }
-// CHECK: define{{.*}}foo19{{.*}}!type ![[TYPE19:[0-9]+]]
+// CHECK: define{{.*}}foo19{{.*}}!type ![[TYPE19:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo20(_: i32, _: i32, _: i32) { }
-// CHECK: define{{.*}}foo20{{.*}}!type ![[TYPE20:[0-9]+]]
+// CHECK: define{{.*}}foo20{{.*}}!type ![[TYPE20:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo21(_: i64) { }
-// CHECK: define{{.*}}foo21{{.*}}!type ![[TYPE21:[0-9]+]]
+// CHECK: define{{.*}}foo21{{.*}}!type ![[TYPE21:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo22(_: i64, _: i64) { }
-// CHECK: define{{.*}}foo22{{.*}}!type ![[TYPE22:[0-9]+]]
+// CHECK: define{{.*}}foo22{{.*}}!type ![[TYPE22:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo23(_: i64, _: i64, _: i64) { }
-// CHECK: define{{.*}}foo23{{.*}}!type ![[TYPE23:[0-9]+]]
+// CHECK: define{{.*}}foo23{{.*}}!type ![[TYPE23:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo24(_: i128) { }
-// CHECK: define{{.*}}foo24{{.*}}!type ![[TYPE24:[0-9]+]]
+// CHECK: define{{.*}}foo24{{.*}}!type ![[TYPE24:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo25(_: i128, _: i128) { }
-// CHECK: define{{.*}}foo25{{.*}}!type ![[TYPE25:[0-9]+]]
+// CHECK: define{{.*}}foo25{{.*}}!type ![[TYPE25:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo26(_: i128, _: i128, _: i128) { }
-// CHECK: define{{.*}}foo26{{.*}}!type ![[TYPE26:[0-9]+]]
+// CHECK: define{{.*}}foo26{{.*}}!type ![[TYPE26:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo27(_: isize) { }
-// CHECK: define{{.*}}foo27{{.*}}!type ![[TYPE27:[0-9]+]]
+// CHECK: define{{.*}}foo27{{.*}}!type ![[TYPE27:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo28(_: isize, _: isize) { }
-// CHECK: define{{.*}}foo28{{.*}}!type ![[TYPE28:[0-9]+]]
+// CHECK: define{{.*}}foo28{{.*}}!type ![[TYPE28:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo29(_: isize, _: isize, _: isize) { }
-// CHECK: define{{.*}}foo29{{.*}}!type ![[TYPE29:[0-9]+]]
+// CHECK: define{{.*}}foo29{{.*}}!type ![[TYPE29:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo30(_: u8) { }
-// CHECK: define{{.*}}foo30{{.*}}!type ![[TYPE30:[0-9]+]]
+// CHECK: define{{.*}}foo30{{.*}}!type ![[TYPE30:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo31(_: u8, _: u8) { }
-// CHECK: define{{.*}}foo31{{.*}}!type ![[TYPE31:[0-9]+]]
+// CHECK: define{{.*}}foo31{{.*}}!type ![[TYPE31:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo32(_: u8, _: u8, _: u8) { }
-// CHECK: define{{.*}}foo32{{.*}}!type ![[TYPE32:[0-9]+]]
+// CHECK: define{{.*}}foo32{{.*}}!type ![[TYPE32:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo33(_: u16) { }
-// CHECK: define{{.*}}foo33{{.*}}!type ![[TYPE33:[0-9]+]]
+// CHECK: define{{.*}}foo33{{.*}}!type ![[TYPE33:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo34(_: u16, _: u16) { }
-// CHECK: define{{.*}}foo34{{.*}}!type ![[TYPE34:[0-9]+]]
+// CHECK: define{{.*}}foo34{{.*}}!type ![[TYPE34:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo35(_: u16, _: u16, _: u16) { }
-// CHECK: define{{.*}}foo35{{.*}}!type ![[TYPE35:[0-9]+]]
+// CHECK: define{{.*}}foo35{{.*}}!type ![[TYPE35:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo36(_: u32) { }
-// CHECK: define{{.*}}foo36{{.*}}!type ![[TYPE36:[0-9]+]]
+// CHECK: define{{.*}}foo36{{.*}}!type ![[TYPE36:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo37(_: u32, _: u32) { }
-// CHECK: define{{.*}}foo37{{.*}}!type ![[TYPE37:[0-9]+]]
+// CHECK: define{{.*}}foo37{{.*}}!type ![[TYPE37:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo38(_: u32, _: u32, _: u32) { }
-// CHECK: define{{.*}}foo38{{.*}}!type ![[TYPE38:[0-9]+]]
+// CHECK: define{{.*}}foo38{{.*}}!type ![[TYPE38:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo39(_: u64) { }
-// CHECK: define{{.*}}foo39{{.*}}!type ![[TYPE39:[0-9]+]]
+// CHECK: define{{.*}}foo39{{.*}}!type ![[TYPE39:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo40(_: u64, _: u64) { }
-// CHECK: define{{.*}}foo40{{.*}}!type ![[TYPE40:[0-9]+]]
+// CHECK: define{{.*}}foo40{{.*}}!type ![[TYPE40:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo41(_: u64, _: u64, _: u64) { }
-// CHECK: define{{.*}}foo41{{.*}}!type ![[TYPE41:[0-9]+]]
+// CHECK: define{{.*}}foo41{{.*}}!type ![[TYPE41:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo42(_: u128) { }
-// CHECK: define{{.*}}foo42{{.*}}!type ![[TYPE42:[0-9]+]]
+// CHECK: define{{.*}}foo42{{.*}}!type ![[TYPE42:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo43(_: u128, _: u128) { }
-// CHECK: define{{.*}}foo43{{.*}}!type ![[TYPE43:[0-9]+]]
+// CHECK: define{{.*}}foo43{{.*}}!type ![[TYPE43:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo44(_: u128, _: u128, _: u128) { }
-// CHECK: define{{.*}}foo44{{.*}}!type ![[TYPE44:[0-9]+]]
+// CHECK: define{{.*}}foo44{{.*}}!type ![[TYPE44:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo45(_: usize) { }
-// CHECK: define{{.*}}foo45{{.*}}!type ![[TYPE45:[0-9]+]]
+// CHECK: define{{.*}}foo45{{.*}}!type ![[TYPE45:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo46(_: usize, _: usize) { }
-// CHECK: define{{.*}}foo46{{.*}}!type ![[TYPE46:[0-9]+]]
+// CHECK: define{{.*}}foo46{{.*}}!type ![[TYPE46:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo47(_: usize, _: usize, _: usize) { }
-// CHECK: define{{.*}}foo47{{.*}}!type ![[TYPE47:[0-9]+]]
+// CHECK: define{{.*}}foo47{{.*}}!type ![[TYPE47:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo48(_: f32) { }
-// CHECK: define{{.*}}foo48{{.*}}!type ![[TYPE48:[0-9]+]]
+// CHECK: define{{.*}}foo48{{.*}}!type ![[TYPE48:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo49(_: f32, _: f32) { }
-// CHECK: define{{.*}}foo49{{.*}}!type ![[TYPE49:[0-9]+]]
+// CHECK: define{{.*}}foo49{{.*}}!type ![[TYPE49:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo50(_: f32, _: f32, _: f32) { }
-// CHECK: define{{.*}}foo50{{.*}}!type ![[TYPE50:[0-9]+]]
+// CHECK: define{{.*}}foo50{{.*}}!type ![[TYPE50:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo51(_: f64) { }
-// CHECK: define{{.*}}foo51{{.*}}!type ![[TYPE51:[0-9]+]]
+// CHECK: define{{.*}}foo51{{.*}}!type ![[TYPE51:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo52(_: f64, _: f64) { }
-// CHECK: define{{.*}}foo52{{.*}}!type ![[TYPE52:[0-9]+]]
+// CHECK: define{{.*}}foo52{{.*}}!type ![[TYPE52:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo53(_: f64, _: f64, _: f64) { }
-// CHECK: define{{.*}}foo53{{.*}}!type ![[TYPE53:[0-9]+]]
+// CHECK: define{{.*}}foo53{{.*}}!type ![[TYPE53:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo54(_: char) { }
-// CHECK: define{{.*}}foo54{{.*}}!type ![[TYPE54:[0-9]+]]
+// CHECK: define{{.*}}foo54{{.*}}!type ![[TYPE54:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo55(_: char, _: char) { }
-// CHECK: define{{.*}}foo55{{.*}}!type ![[TYPE55:[0-9]+]]
+// CHECK: define{{.*}}foo55{{.*}}!type ![[TYPE55:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo56(_: char, _: char, _: char) { }
-// CHECK: define{{.*}}foo56{{.*}}!type ![[TYPE56:[0-9]+]]
+// CHECK: define{{.*}}foo56{{.*}}!type ![[TYPE56:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo57(_: &str) { }
-// CHECK: define{{.*}}foo57{{.*}}!type ![[TYPE57:[0-9]+]]
+// CHECK: define{{.*}}foo57{{.*}}!type ![[TYPE57:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo58(_: &str, _: &str) { }
-// CHECK: define{{.*}}foo58{{.*}}!type ![[TYPE58:[0-9]+]]
+// CHECK: define{{.*}}foo58{{.*}}!type ![[TYPE58:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo59(_: &str, _: &str, _: &str) { }
-// CHECK: define{{.*}}foo59{{.*}}!type ![[TYPE59:[0-9]+]]
+// CHECK: define{{.*}}foo59{{.*}}!type ![[TYPE59:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo60(_: (i32, i32)) { }
-// CHECK: define{{.*}}foo60{{.*}}!type ![[TYPE60:[0-9]+]]
+// CHECK: define{{.*}}foo60{{.*}}!type ![[TYPE60:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo61(_: (i32, i32), _: (i32, i32)) { }
-// CHECK: define{{.*}}foo61{{.*}}!type ![[TYPE61:[0-9]+]]
+// CHECK: define{{.*}}foo61{{.*}}!type ![[TYPE61:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo62(_: (i32, i32), _: (i32, i32), _: (i32, i32)) { }
-// CHECK: define{{.*}}foo62{{.*}}!type ![[TYPE62:[0-9]+]]
+// CHECK: define{{.*}}foo62{{.*}}!type ![[TYPE62:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo63(_: [i32; 32]) { }
-// CHECK: define{{.*}}foo63{{.*}}!type ![[TYPE63:[0-9]+]]
+// CHECK: define{{.*}}foo63{{.*}}!type ![[TYPE63:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo64(_: [i32; 32], _: [i32; 32]) { }
-// CHECK: define{{.*}}foo64{{.*}}!type ![[TYPE64:[0-9]+]]
+// CHECK: define{{.*}}foo64{{.*}}!type ![[TYPE64:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo65(_: [i32; 32], _: [i32; 32], _: [i32; 32]) { }
-// CHECK: define{{.*}}foo65{{.*}}!type ![[TYPE65:[0-9]+]]
+// CHECK: define{{.*}}foo65{{.*}}!type ![[TYPE65:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo66(_: &[i32]) { }
-// CHECK: define{{.*}}foo66{{.*}}!type ![[TYPE66:[0-9]+]]
+// CHECK: define{{.*}}foo66{{.*}}!type ![[TYPE66:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo67(_: &[i32], _: &[i32]) { }
-// CHECK: define{{.*}}foo67{{.*}}!type ![[TYPE67:[0-9]+]]
+// CHECK: define{{.*}}foo67{{.*}}!type ![[TYPE67:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo68(_: &[i32], _: &[i32], _: &[i32]) { }
-// CHECK: define{{.*}}foo68{{.*}}!type ![[TYPE68:[0-9]+]]
+// CHECK: define{{.*}}foo68{{.*}}!type ![[TYPE68:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo69(_: &Struct1::<i32>) { }
-// CHECK: define{{.*}}foo69{{.*}}!type ![[TYPE69:[0-9]+]]
+// CHECK: define{{.*}}foo69{{.*}}!type ![[TYPE69:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo70(_: &Struct1::<i32>, _: &Struct1::<i32>) { }
-// CHECK: define{{.*}}foo70{{.*}}!type ![[TYPE70:[0-9]+]]
+// CHECK: define{{.*}}foo70{{.*}}!type ![[TYPE70:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo71(_: &Struct1::<i32>, _: &Struct1::<i32>, _: &Struct1::<i32>) { }
-// CHECK: define{{.*}}foo71{{.*}}!type ![[TYPE71:[0-9]+]]
+// CHECK: define{{.*}}foo71{{.*}}!type ![[TYPE71:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo72(_: &Enum1::<i32>) { }
-// CHECK: define{{.*}}foo72{{.*}}!type ![[TYPE72:[0-9]+]]
+// CHECK: define{{.*}}foo72{{.*}}!type ![[TYPE72:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo73(_: &Enum1::<i32>, _: &Enum1::<i32>) { }
-// CHECK: define{{.*}}foo73{{.*}}!type ![[TYPE73:[0-9]+]]
+// CHECK: define{{.*}}foo73{{.*}}!type ![[TYPE73:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo74(_: &Enum1::<i32>, _: &Enum1::<i32>, _: &Enum1::<i32>) { }
-// CHECK: define{{.*}}foo74{{.*}}!type ![[TYPE74:[0-9]+]]
+// CHECK: define{{.*}}foo74{{.*}}!type ![[TYPE74:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo75(_: &Union1::<i32>) { }
-// CHECK: define{{.*}}foo75{{.*}}!type ![[TYPE75:[0-9]+]]
+// CHECK: define{{.*}}foo75{{.*}}!type ![[TYPE75:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo76(_: &Union1::<i32>, _: &Union1::<i32>) { }
-// CHECK: define{{.*}}foo76{{.*}}!type ![[TYPE76:[0-9]+]]
+// CHECK: define{{.*}}foo76{{.*}}!type ![[TYPE76:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo77(_: &Union1::<i32>, _: &Union1::<i32>, _: &Union1::<i32>) { }
-// CHECK: define{{.*}}foo77{{.*}}!type ![[TYPE77:[0-9]+]]
+// CHECK: define{{.*}}foo77{{.*}}!type ![[TYPE77:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo78(_: *mut type1) { }
-// CHECK: define{{.*}}foo78{{.*}}!type ![[TYPE78:[0-9]+]]
+// CHECK: define{{.*}}foo78{{.*}}!type ![[TYPE78:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo79(_: *mut type1, _: *mut type1) { }
-// CHECK: define{{.*}}foo79{{.*}}!type ![[TYPE79:[0-9]+]]
+// CHECK: define{{.*}}foo79{{.*}}!type ![[TYPE79:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo80(_: *mut type1, _: *mut type1, _: *mut type1) { }
-// CHECK: define{{.*}}foo80{{.*}}!type ![[TYPE80:[0-9]+]]
+// CHECK: define{{.*}}foo80{{.*}}!type ![[TYPE80:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo81(_: &mut i32) { }
-// CHECK: define{{.*}}foo81{{.*}}!type ![[TYPE81:[0-9]+]]
+// CHECK: define{{.*}}foo81{{.*}}!type ![[TYPE81:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo82(_: &mut i32, _: &i32) { }
-// CHECK: define{{.*}}foo82{{.*}}!type ![[TYPE82:[0-9]+]]
+// CHECK: define{{.*}}foo82{{.*}}!type ![[TYPE82:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo83(_: &mut i32, _: &i32, _: &i32) { }
-// CHECK: define{{.*}}foo83{{.*}}!type ![[TYPE83:[0-9]+]]
+// CHECK: define{{.*}}foo83{{.*}}!type ![[TYPE83:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo84(_: &i32) { }
-// CHECK: define{{.*}}foo84{{.*}}!type ![[TYPE84:[0-9]+]]
+// CHECK: define{{.*}}foo84{{.*}}!type ![[TYPE84:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo85(_: &i32, _: &mut i32) { }
-// CHECK: define{{.*}}foo85{{.*}}!type ![[TYPE85:[0-9]+]]
+// CHECK: define{{.*}}foo85{{.*}}!type ![[TYPE85:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo86(_: &i32, _: &mut i32, _: &mut i32) { }
-// CHECK: define{{.*}}foo86{{.*}}!type ![[TYPE86:[0-9]+]]
+// CHECK: define{{.*}}foo86{{.*}}!type ![[TYPE86:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo87(_: *mut i32) { }
-// CHECK: define{{.*}}foo87{{.*}}!type ![[TYPE87:[0-9]+]]
+// CHECK: define{{.*}}foo87{{.*}}!type ![[TYPE87:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo88(_: *mut i32, _: *const i32) { }
-// CHECK: define{{.*}}foo88{{.*}}!type ![[TYPE88:[0-9]+]]
+// CHECK: define{{.*}}foo88{{.*}}!type ![[TYPE88:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo89(_: *mut i32, _: *const i32, _: *const i32) { }
-// CHECK: define{{.*}}foo89{{.*}}!type ![[TYPE89:[0-9]+]]
+// CHECK: define{{.*}}foo89{{.*}}!type ![[TYPE89:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo90(_: *const i32) { }
-// CHECK: define{{.*}}foo90{{.*}}!type ![[TYPE90:[0-9]+]]
+// CHECK: define{{.*}}foo90{{.*}}!type ![[TYPE90:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo91(_: *const i32, _: *mut i32) { }
-// CHECK: define{{.*}}foo91{{.*}}!type ![[TYPE91:[0-9]+]]
+// CHECK: define{{.*}}foo91{{.*}}!type ![[TYPE91:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo92(_: *const i32, _: *mut i32, _: *mut i32) { }
-// CHECK: define{{.*}}foo92{{.*}}!type ![[TYPE92:[0-9]+]]
+// CHECK: define{{.*}}foo92{{.*}}!type ![[TYPE92:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo93(_: fn(i32) -> i32) { }
-// CHECK: define{{.*}}foo93{{.*}}!type ![[TYPE93:[0-9]+]]
+// CHECK: define{{.*}}foo93{{.*}}!type ![[TYPE93:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo94(_: fn(i32) -> i32, _: fn(i32) -> i32) { }
-// CHECK: define{{.*}}foo94{{.*}}!type ![[TYPE94:[0-9]+]]
+// CHECK: define{{.*}}foo94{{.*}}!type ![[TYPE94:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo95(_: fn(i32) -> i32, _: fn(i32) -> i32, _: fn(i32) -> i32) { }
-// CHECK: define{{.*}}foo95{{.*}}!type ![[TYPE95:[0-9]+]]
+// CHECK: define{{.*}}foo95{{.*}}!type ![[TYPE95:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo96(_: &dyn Fn(i32) -> i32) { }
-// CHECK: define{{.*}}foo96{{.*}}!type ![[TYPE96:[0-9]+]]
+// CHECK: define{{.*}}foo96{{.*}}!type ![[TYPE96:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo97(_: &dyn Fn(i32) -> i32, _: &dyn Fn(i32) -> i32) { }
-// CHECK: define{{.*}}foo97{{.*}}!type ![[TYPE97:[0-9]+]]
+// CHECK: define{{.*}}foo97{{.*}}!type ![[TYPE97:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo98(_: &dyn Fn(i32) -> i32, _: &dyn Fn(i32) -> i32, _: &dyn Fn(i32) -> i32) { }
-// CHECK: define{{.*}}foo98{{.*}}!type ![[TYPE98:[0-9]+]]
+// CHECK: define{{.*}}foo98{{.*}}!type ![[TYPE98:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo99(_: &dyn FnMut(i32) -> i32) { }
-// CHECK: define{{.*}}foo99{{.*}}!type ![[TYPE99:[0-9]+]]
+// CHECK: define{{.*}}foo99{{.*}}!type ![[TYPE99:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo100(_: &dyn FnMut(i32) -> i32, _: &dyn FnMut(i32) -> i32) { }
-// CHECK: define{{.*}}foo100{{.*}}!type ![[TYPE100:[0-9]+]]
+// CHECK: define{{.*}}foo100{{.*}}!type ![[TYPE100:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo101(_: &dyn FnMut(i32) -> i32, _: &dyn FnMut(i32) -> i32, _: &dyn FnMut(i32) -> i32) { }
-// CHECK: define{{.*}}foo101{{.*}}!type ![[TYPE101:[0-9]+]]
+// CHECK: define{{.*}}foo101{{.*}}!type ![[TYPE101:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo102(_: &dyn FnOnce(i32) -> i32) { }
-// CHECK: define{{.*}}foo102{{.*}}!type ![[TYPE102:[0-9]+]]
+// CHECK: define{{.*}}foo102{{.*}}!type ![[TYPE102:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo103(_: &dyn FnOnce(i32) -> i32, _: &dyn FnOnce(i32) -> i32) { }
-// CHECK: define{{.*}}foo103{{.*}}!type ![[TYPE103:[0-9]+]]
+// CHECK: define{{.*}}foo103{{.*}}!type ![[TYPE103:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo104(_: &dyn FnOnce(i32) -> i32, _: &dyn FnOnce(i32) -> i32, _: &dyn FnOnce(i32) -> i32) {}
-// CHECK: define{{.*}}foo104{{.*}}!type ![[TYPE104:[0-9]+]]
+// CHECK: define{{.*}}foo104{{.*}}!type ![[TYPE104:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo105(_: &dyn Send) { }
-// CHECK: define{{.*}}foo105{{.*}}!type ![[TYPE105:[0-9]+]]
+// CHECK: define{{.*}}foo105{{.*}}!type ![[TYPE105:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo106(_: &dyn Send, _: &dyn Send) { }
-// CHECK: define{{.*}}foo106{{.*}}!type ![[TYPE106:[0-9]+]]
+// CHECK: define{{.*}}foo106{{.*}}!type ![[TYPE106:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo107(_: &dyn Send, _: &dyn Send, _: &dyn Send) { }
-// CHECK: define{{.*}}foo107{{.*}}!type ![[TYPE107:[0-9]+]]
+// CHECK: define{{.*}}foo107{{.*}}!type ![[TYPE107:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo108(_: Type1) { }
-// CHECK: define{{.*}}foo108{{.*}}!type ![[TYPE108:[0-9]+]]
+// CHECK: define{{.*}}foo108{{.*}}!type ![[TYPE108:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo109(_: Type1, _: Type1) { }
-// CHECK: define{{.*}}foo109{{.*}}!type ![[TYPE109:[0-9]+]]
+// CHECK: define{{.*}}foo109{{.*}}!type ![[TYPE109:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo110(_: Type1, _: Type1, _: Type1) { }
-// CHECK: define{{.*}}foo110{{.*}}!type ![[TYPE110:[0-9]+]]
+// CHECK: define{{.*}}foo110{{.*}}!type ![[TYPE110:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo111(_: Type2) { }
-// CHECK: define{{.*}}foo111{{.*}}!type ![[TYPE111:[0-9]+]]
+// CHECK: define{{.*}}foo111{{.*}}!type ![[TYPE111:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo112(_: Type2, _: Type2) { }
-// CHECK: define{{.*}}foo112{{.*}}!type ![[TYPE112:[0-9]+]]
+// CHECK: define{{.*}}foo112{{.*}}!type ![[TYPE112:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo113(_: Type2, _: Type2, _: Type2) { }
-// CHECK: define{{.*}}foo113{{.*}}!type ![[TYPE113:[0-9]+]]
+// CHECK: define{{.*}}foo113{{.*}}!type ![[TYPE113:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo114(_: Type3) { }
-// CHECK: define{{.*}}foo114{{.*}}!type ![[TYPE114:[0-9]+]]
+// CHECK: define{{.*}}foo114{{.*}}!type ![[TYPE114:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo115(_: Type3, _: Type3) { }
-// CHECK: define{{.*}}foo115{{.*}}!type ![[TYPE115:[0-9]+]]
+// CHECK: define{{.*}}foo115{{.*}}!type ![[TYPE115:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo116(_: Type3, _: Type3, _: Type3) { }
-// CHECK: define{{.*}}foo116{{.*}}!type ![[TYPE116:[0-9]+]]
+// CHECK: define{{.*}}foo116{{.*}}!type ![[TYPE116:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo117(_: Type4) { }
-// CHECK: define{{.*}}foo117{{.*}}!type ![[TYPE117:[0-9]+]]
+// CHECK: define{{.*}}foo117{{.*}}!type ![[TYPE117:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo118(_: Type4, _: Type4) { }
-// CHECK: define{{.*}}foo118{{.*}}!type ![[TYPE118:[0-9]+]]
+// CHECK: define{{.*}}foo118{{.*}}!type ![[TYPE118:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo119(_: Type4, _: Type4, _: Type4) { }
-// CHECK: define{{.*}}foo119{{.*}}!type ![[TYPE119:[0-9]+]]
+// CHECK: define{{.*}}foo119{{.*}}!type ![[TYPE119:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo120(_: Type5) { }
-// CHECK: define{{.*}}foo120{{.*}}!type ![[TYPE120:[0-9]+]]
+// CHECK: define{{.*}}foo120{{.*}}!type ![[TYPE120:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo121(_: Type5, _: Type5) { }
-// CHECK: define{{.*}}foo121{{.*}}!type ![[TYPE121:[0-9]+]]
+// CHECK: define{{.*}}foo121{{.*}}!type ![[TYPE121:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo122(_: Type5, _: Type5, _: Type5) { }
-// CHECK: define{{.*}}foo122{{.*}}!type ![[TYPE122:[0-9]+]]
+// CHECK: define{{.*}}foo122{{.*}}!type ![[TYPE122:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo123(_: Type6) { }
-// CHECK: define{{.*}}foo123{{.*}}!type ![[TYPE123:[0-9]+]]
+// CHECK: define{{.*}}foo123{{.*}}!type ![[TYPE123:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo124(_: Type6, _: Type6) { }
-// CHECK: define{{.*}}foo124{{.*}}!type ![[TYPE124:[0-9]+]]
+// CHECK: define{{.*}}foo124{{.*}}!type ![[TYPE124:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo125(_: Type6, _: Type6, _: Type6) { }
-// CHECK: define{{.*}}foo125{{.*}}!type ![[TYPE125:[0-9]+]]
+// CHECK: define{{.*}}foo125{{.*}}!type ![[TYPE125:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo126(_: Type7) { }
-// CHECK: define{{.*}}foo126{{.*}}!type ![[TYPE126:[0-9]+]]
+// CHECK: define{{.*}}foo126{{.*}}!type ![[TYPE126:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo127(_: Type7, _: Type7) { }
-// CHECK: define{{.*}}foo127{{.*}}!type ![[TYPE127:[0-9]+]]
+// CHECK: define{{.*}}foo127{{.*}}!type ![[TYPE127:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo128(_: Type7, _: Type7, _: Type7) { }
-// CHECK: define{{.*}}foo128{{.*}}!type ![[TYPE128:[0-9]+]]
+// CHECK: define{{.*}}foo128{{.*}}!type ![[TYPE128:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo129(_: Type8) { }
-// CHECK: define{{.*}}foo129{{.*}}!type ![[TYPE129:[0-9]+]]
+// CHECK: define{{.*}}foo129{{.*}}!type ![[TYPE129:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo130(_: Type8, _: Type8) { }
-// CHECK: define{{.*}}foo130{{.*}}!type ![[TYPE130:[0-9]+]]
+// CHECK: define{{.*}}foo130{{.*}}!type ![[TYPE130:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo131(_: Type8, _: Type8, _: Type8) { }
-// CHECK: define{{.*}}foo131{{.*}}!type ![[TYPE131:[0-9]+]]
+// CHECK: define{{.*}}foo131{{.*}}!type ![[TYPE131:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo132(_: Type9) { }
-// CHECK: define{{.*}}foo132{{.*}}!type ![[TYPE132:[0-9]+]]
+// CHECK: define{{.*}}foo132{{.*}}!type ![[TYPE132:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo133(_: Type9, _: Type9) { }
-// CHECK: define{{.*}}foo133{{.*}}!type ![[TYPE133:[0-9]+]]
+// CHECK: define{{.*}}foo133{{.*}}!type ![[TYPE133:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo134(_: Type9, _: Type9, _: Type9) { }
-// CHECK: define{{.*}}foo134{{.*}}!type ![[TYPE134:[0-9]+]]
+// CHECK: define{{.*}}foo134{{.*}}!type ![[TYPE134:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo135(_: Type10) { }
-// CHECK: define{{.*}}foo135{{.*}}!type ![[TYPE135:[0-9]+]]
+// CHECK: define{{.*}}foo135{{.*}}!type ![[TYPE135:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo136(_: Type10, _: Type10) { }
-// CHECK: define{{.*}}foo136{{.*}}!type ![[TYPE136:[0-9]+]]
+// CHECK: define{{.*}}foo136{{.*}}!type ![[TYPE136:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo137(_: Type10, _: Type10, _: Type10) { }
-// CHECK: define{{.*}}foo137{{.*}}!type ![[TYPE137:[0-9]+]]
+// CHECK: define{{.*}}foo137{{.*}}!type ![[TYPE137:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo138(_: Type11) { }
-// CHECK: define{{.*}}foo138{{.*}}!type ![[TYPE138:[0-9]+]]
+// CHECK: define{{.*}}foo138{{.*}}!type ![[TYPE138:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo139(_: Type11, _: Type11) { }
-// CHECK: define{{.*}}foo139{{.*}}!type ![[TYPE139:[0-9]+]]
+// CHECK: define{{.*}}foo139{{.*}}!type ![[TYPE139:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo140(_: Type11, _: Type11, _: Type11) { }
-// CHECK: define{{.*}}foo140{{.*}}!type ![[TYPE140:[0-9]+]]
+// CHECK: define{{.*}}foo140{{.*}}!type ![[TYPE140:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo141(_: Type12) { }
-// CHECK: define{{.*}}foo141{{.*}}!type ![[TYPE141:[0-9]+]]
+// CHECK: define{{.*}}foo141{{.*}}!type ![[TYPE141:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo142(_: Type12, _: Type12) { }
-// CHECK: define{{.*}}foo142{{.*}}!type ![[TYPE142:[0-9]+]]
+// CHECK: define{{.*}}foo142{{.*}}!type ![[TYPE142:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo143(_: Type12, _: Type12, _: Type12) { }
-// CHECK: define{{.*}}foo143{{.*}}!type ![[TYPE143:[0-9]+]]
+// CHECK: define{{.*}}foo143{{.*}}!type ![[TYPE143:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo144(_: Type13) { }
-// CHECK: define{{.*}}foo144{{.*}}!type ![[TYPE144:[0-9]+]]
+// CHECK: define{{.*}}foo144{{.*}}!type ![[TYPE144:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo145(_: Type13, _: Type13) { }
-// CHECK: define{{.*}}foo145{{.*}}!type ![[TYPE145:[0-9]+]]
+// CHECK: define{{.*}}foo145{{.*}}!type ![[TYPE145:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo146(_: Type13, _: Type13, _: Type13) { }
-// CHECK: define{{.*}}foo146{{.*}}!type ![[TYPE146:[0-9]+]]
+// CHECK: define{{.*}}foo146{{.*}}!type ![[TYPE146:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo147(_: Type14<Bar>) { }
-// CHECK: define{{.*}}foo147{{.*}}!type ![[TYPE147:[0-9]+]]
+// CHECK: define{{.*}}foo147{{.*}}!type ![[TYPE147:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo148(_: Type14<Bar>, _: Type14<Bar>) { }
-// CHECK: define{{.*}}foo148{{.*}}!type ![[TYPE148:[0-9]+]]
+// CHECK: define{{.*}}foo148{{.*}}!type ![[TYPE148:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 pub fn foo149(_: Type14<Bar>, _: Type14<Bar>, _: Type14<Bar>) { }
-// CHECK: define{{.*}}foo149{{.*}}!type ![[TYPE149:[0-9]+]]
+// CHECK: define{{.*}}foo149{{.*}}!type ![[TYPE149:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
 
 // CHECK: ![[TYPE0]] = !{i64 0, !"_ZTSFvvE"}
 // CHECK: ![[TYPE1]] = !{i64 0, !"_ZTSFvvvE"}
diff --git a/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs b/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs
new file mode 100644
index 00000000000..78ef0c2c7d6
--- /dev/null
+++ b/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-generalized.rs
@@ -0,0 +1,31 @@
+// Verifies that generalized type metadata for functions are emitted.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers
+
+#![crate_type="lib"]
+
+pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}foo
+    // CHECK-SAME:  {{.*}}!type ![[TYPE1:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+    // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_E.generalized")
+    f(arg)
+}
+
+pub fn bar(f: fn(i32, i32) -> i32, arg1: i32, arg2: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}bar
+    // CHECK-SAME:  {{.*}}!type ![[TYPE2:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+    // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_S_E.generalized")
+    f(arg1, arg2)
+}
+
+pub fn baz(f: fn(i32, i32, i32) -> i32, arg1: i32, arg2: i32, arg3: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}baz
+    // CHECK-SAME:  {{.*}}!type ![[TYPE3:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+    // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_S_S_E.generalized")
+    f(arg1, arg2, arg3)
+}
+
+// CHECK: ![[TYPE1]] = !{i64 0, !"_ZTSFu3i32PKvS_E.generalized"}
+// CHECK: ![[TYPE2]] = !{i64 0, !"_ZTSFu3i32PKvS_S_E.generalized"}
+// CHECK: ![[TYPE3]] = !{i64 0, !"_ZTSFu3i32PKvS_S_S_E.generalized"}
diff --git a/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs b/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs
new file mode 100644
index 00000000000..3b72459c4b0
--- /dev/null
+++ b/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-normalized-generalized.rs
@@ -0,0 +1,31 @@
+// Verifies that normalized and generalized type metadata for functions are emitted.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Zsanitizer-cfi-generalize-pointers
+
+#![crate_type="lib"]
+
+pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}foo
+    // CHECK-SAME:  {{.*}}![[TYPE1:[0-9]+]]
+    // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_E.normalized.generalized")
+    f(arg)
+}
+
+pub fn bar(f: fn(i32, i32) -> i32, arg1: i32, arg2: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}bar
+    // CHECK-SAME:  {{.*}}![[TYPE2:[0-9]+]]
+    // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_S_E.normalized.generalized")
+    f(arg1, arg2)
+}
+
+pub fn baz(f: fn(i32, i32, i32) -> i32, arg1: i32, arg2: i32, arg3: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}baz
+    // CHECK-SAME:  {{.*}}![[TYPE3:[0-9]+]]
+    // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_S_S_E.normalized.generalized")
+    f(arg1, arg2, arg3)
+}
+
+// CHECK: ![[TYPE1]] = !{i64 0, !"_ZTSFu3i32PKvS_E.normalized.generalized"}
+// CHECK: ![[TYPE2]] = !{i64 0, !"_ZTSFu3i32PKvS_S_E.normalized.generalized"}
+// CHECK: ![[TYPE3]] = !{i64 0, !"_ZTSFu3i32PKvS_S_S_E.normalized.generalized"}
diff --git a/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs b/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs
new file mode 100644
index 00000000000..9218e9947bf
--- /dev/null
+++ b/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi-normalized.rs
@@ -0,0 +1,31 @@
+// Verifies that normalized type metadata for functions are emitted.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers
+
+#![crate_type="lib"]
+
+pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}foo
+    // CHECK-SAME:  {{.*}}!type ![[TYPE1:[0-9]+]] !type !{{[0-9]+}}
+    // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_E.normalized")
+    f(arg)
+}
+
+pub fn bar(f: fn(i32, i32) -> i32, arg1: i32, arg2: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}bar
+    // CHECK-SAME:  {{.*}}!type ![[TYPE2:[0-9]+]] !type !{{[0-9]+}}
+    // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_S_E.normalized")
+    f(arg1, arg2)
+}
+
+pub fn baz(f: fn(i32, i32, i32) -> i32, arg1: i32, arg2: i32, arg3: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}baz
+    // CHECK-SAME:  {{.*}}!type ![[TYPE3:[0-9]+]] !type !{{[0-9]+}}
+    // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_S_S_E.normalized")
+    f(arg1, arg2, arg3)
+}
+
+// CHECK: ![[TYPE1]] = !{i64 0, !"_ZTSFu3i32PFS_S_ES_E.normalized"}
+// CHECK: ![[TYPE2]] = !{i64 0, !"_ZTSFu3i32PFS_S_S_ES_S_E.normalized"}
+// CHECK: ![[TYPE3]] = !{i64 0, !"_ZTSFu3i32PFS_S_S_S_ES_S_S_E.normalized"}
diff --git a/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi.rs b/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi.rs
index bafc4c6592f..f9fd816dedb 100644
--- a/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi.rs
+++ b/tests/codegen/sanitizer-cfi-emit-type-metadata-itanium-cxx-abi.rs
@@ -7,21 +7,21 @@
 
 pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
     // CHECK-LABEL: define{{.*}}foo
-    // CHECK-SAME: {{.*}}!type ![[TYPE1:[0-9]+]]
+    // CHECK-SAME:  {{.*}}!type ![[TYPE1:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
     // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_E")
     f(arg)
 }
 
 pub fn bar(f: fn(i32, i32) -> i32, arg1: i32, arg2: i32) -> i32 {
     // CHECK-LABEL: define{{.*}}bar
-    // CHECK-SAME: {{.*}}!type ![[TYPE2:[0-9]+]]
+    // CHECK-SAME:  {{.*}}!type ![[TYPE2:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
     // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_S_E")
     f(arg1, arg2)
 }
 
 pub fn baz(f: fn(i32, i32, i32) -> i32, arg1: i32, arg2: i32, arg3: i32) -> i32 {
     // CHECK-LABEL: define{{.*}}baz
-    // CHECK-SAME: {{.*}}!type ![[TYPE3:[0-9]+]]
+    // CHECK-SAME:  {{.*}}!type ![[TYPE3:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}} !type !{{[0-9]+}}
     // CHECK:       call i1 @llvm.type.test({{i8\*|ptr}} {{%f|%0}}, metadata !"_ZTSFu3i32S_S_S_E")
     f(arg1, arg2, arg3)
 }
diff --git a/tests/codegen/sanitizer-cfi-generalize-pointers.rs b/tests/codegen/sanitizer-cfi-generalize-pointers.rs
new file mode 100644
index 00000000000..677ebdb27ec
--- /dev/null
+++ b/tests/codegen/sanitizer-cfi-generalize-pointers.rs
@@ -0,0 +1,46 @@
+// Verifies that pointer types are generalized.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers
+
+#![crate_type="lib"]
+
+extern crate core;
+
+pub fn foo0(_: &mut i32) { }
+// CHECK: define{{.*}}foo0{{.*}}!type ![[TYPE0:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo1(_: &mut i32, _: &mut i32) { }
+// CHECK: define{{.*}}foo1{{.*}}!type ![[TYPE1:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo2(_: &mut i32, _: &mut i32, _: &mut i32) { }
+// CHECK: define{{.*}}foo2{{.*}}!type ![[TYPE2:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo3(_: &i32) { }
+// CHECK: define{{.*}}foo3{{.*}}!type ![[TYPE3:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo4(_: &i32, _: &i32) { }
+// CHECK: define{{.*}}foo4{{.*}}!type ![[TYPE4:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo5(_: &i32, _: &i32, _: &i32) { }
+// CHECK: define{{.*}}foo5{{.*}}!type ![[TYPE5:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo6(_: *mut i32) { }
+// CHECK: define{{.*}}foo6{{.*}}!type ![[TYPE6:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo7(_: *mut i32, _: *mut i32) { }
+// CHECK: define{{.*}}foo7{{.*}}!type ![[TYPE7:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo8(_: *mut i32, _: *mut i32, _: *mut i32) { }
+// CHECK: define{{.*}}foo8{{.*}}!type ![[TYPE8:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo9(_: *const i32) { }
+// CHECK: define{{.*}}foo9{{.*}}!type ![[TYPE9:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo10(_: *const i32, _: *const i32) { }
+// CHECK: define{{.*}}foo10{{.*}}!type ![[TYPE10:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+pub fn foo11(_: *const i32, _: *const i32, _: *const i32) { }
+// CHECK: define{{.*}}foo11{{.*}}!type ![[TYPE11:[0-9]+]] !type !{{[0-9]+}} !type !{{[0-9]+}}
+
+// CHECK: ![[TYPE0]] = !{i64 0, !"_ZTSFvU3mutu3refIvEE.generalized"}
+// CHECK: ![[TYPE1]] = !{i64 0, !"_ZTSFvU3mutu3refIvES0_E.generalized"}
+// CHECK: ![[TYPE2]] = !{i64 0, !"_ZTSFvU3mutu3refIvES0_S0_E.generalized"}
+// CHECK: ![[TYPE3]] = !{i64 0, !"_ZTSFvu3refIvEE.generalized"}
+// CHECK: ![[TYPE4]] = !{i64 0, !"_ZTSFvu3refIvES_E.generalized"}
+// CHECK: ![[TYPE5]] = !{i64 0, !"_ZTSFvu3refIvES_S_E.generalized"}
+// CHECK: ![[TYPE6]] = !{i64 0, !"_ZTSFvPvE.generalized"}
+// CHECK: ![[TYPE7]] = !{i64 0, !"_ZTSFvPvS_E.generalized"}
+// CHECK: ![[TYPE8]] = !{i64 0, !"_ZTSFvPvS_S_E.generalized"}
+// CHECK: ![[TYPE9]] = !{i64 0, !"_ZTSFvPKvE.generalized"}
+// CHECK: ![[TYPE10]] = !{i64 0, !"_ZTSFvPKvS0_E.generalized"}
+// CHECK: ![[TYPE11]] = !{i64 0, !"_ZTSFvPKvS0_S0_E.generalized"}
diff --git a/tests/codegen/sanitizer-cfi-normalize-integers.rs b/tests/codegen/sanitizer-cfi-normalize-integers.rs
new file mode 100644
index 00000000000..aa3913cb8e7
--- /dev/null
+++ b/tests/codegen/sanitizer-cfi-normalize-integers.rs
@@ -0,0 +1,83 @@
+// Verifies that integer types are normalized.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers
+
+#![crate_type="lib"]
+
+extern crate core;
+use core::ffi::*;
+
+pub fn foo0(_: bool) { }
+// CHECK: define{{.*}}foo0{{.*}}!type ![[TYPE0:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo1(_: bool, _: c_uchar) { }
+// CHECK: define{{.*}}foo1{{.*}}!type ![[TYPE1:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo2(_: bool, _: c_uchar, _: c_uchar) { }
+// CHECK: define{{.*}}foo2{{.*}}!type ![[TYPE2:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo3(_: isize) { }
+// CHECK: define{{.*}}foo3{{.*}}!type ![[TYPE3:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo4(_: isize, _: c_long) { }
+// CHECK: define{{.*}}foo4{{.*}}!type ![[TYPE4:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo5(_: isize, _: c_long, _: c_longlong) { }
+// CHECK: define{{.*}}foo5{{.*}}!type ![[TYPE5:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo6(_: usize) { }
+// CHECK: define{{.*}}foo6{{.*}}!type ![[TYPE6:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo7(_: usize, _: c_ulong) { }
+// CHECK: define{{.*}}foo7{{.*}}!type ![[TYPE7:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo8(_: usize, _: c_ulong, _: c_ulonglong) { }
+// CHECK: define{{.*}}foo8{{.*}}!type ![[TYPE8:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo9(_: c_schar) { }
+// CHECK: define{{.*}}foo9{{.*}}!type ![[TYPE9:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo10(_: c_char, _: c_schar) { }
+// CHECK: define{{.*}}foo10{{.*}}!type ![[TYPE10:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo11(_: c_char, _: c_schar, _: c_schar) { }
+// CHECK: define{{.*}}foo11{{.*}}!type ![[TYPE11:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo12(_: c_int) { }
+// CHECK: define{{.*}}foo12{{.*}}!type ![[TYPE12:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo13(_: c_int, _: c_int) { }
+// CHECK: define{{.*}}foo13{{.*}}!type ![[TYPE13:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo14(_: c_int, _: c_int, _: c_int) { }
+// CHECK: define{{.*}}foo14{{.*}}!type ![[TYPE14:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo15(_: c_short) { }
+// CHECK: define{{.*}}foo15{{.*}}!type ![[TYPE15:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo16(_: c_short, _: c_short) { }
+// CHECK: define{{.*}}foo16{{.*}}!type ![[TYPE16:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo17(_: c_short, _: c_short, _: c_short) { }
+// CHECK: define{{.*}}foo17{{.*}}!type ![[TYPE17:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo18(_: c_uint) { }
+// CHECK: define{{.*}}foo18{{.*}}!type ![[TYPE18:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo19(_: c_uint, _: c_uint) { }
+// CHECK: define{{.*}}foo19{{.*}}!type ![[TYPE19:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo20(_: c_uint, _: c_uint, _: c_uint) { }
+// CHECK: define{{.*}}foo20{{.*}}!type ![[TYPE20:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo21(_: c_ushort) { }
+// CHECK: define{{.*}}foo21{{.*}}!type ![[TYPE21:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo22(_: c_ushort, _: c_ushort) { }
+// CHECK: define{{.*}}foo22{{.*}}!type ![[TYPE22:[0-9]+]] !type !{{[0-9]+}}
+pub fn foo23(_: c_ushort, _: c_ushort, _: c_ushort) { }
+// CHECK: define{{.*}}foo23{{.*}}!type ![[TYPE23:[0-9]+]] !type !{{[0-9]+}}
+
+// CHECK: ![[TYPE0]] = !{i64 0, !"_ZTSFvu2u8E.normalized"}
+// CHECK: ![[TYPE1]] = !{i64 0, !"_ZTSFvu2u8S_E.normalized"}
+// CHECK: ![[TYPE2]] = !{i64 0, !"_ZTSFvu2u8S_S_E.normalized"}
+// CHECK: ![[TYPE3]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}E.normalized"}
+// CHECK: ![[TYPE4]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}{{u3i32|u3i64|S_}}E.normalized"}
+// CHECK: ![[TYPE5]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}{{u3i32|u3i64|S_}}{{u3i64|S_|S0_}}E.normalized"}
+// CHECK: ![[TYPE6]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}E.normalized"}
+// CHECK: ![[TYPE7]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}{{u3u32|u3u64|S_}}E.normalized"}
+// CHECK: ![[TYPE8]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}{{u3u32|u3u64|S_}}{{u3u64|S_|S0_}}E.normalized"}
+// CHECK: ![[TYPE9]] = !{i64 0, !"_ZTSFvu2i8E.normalized"}
+// CHECK: ![[TYPE10]] = !{i64 0, !"_ZTSFv{{u2i8S_|u2u8u2i8}}E.normalized"}
+// CHECK: ![[TYPE11]] = !{i64 0, !"_ZTSFv{{u2i8S_S_|u2u8u2i8S0_}}E.normalized"}
+// CHECK: ![[TYPE12]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}E.normalized"}
+// CHECK: ![[TYPE13]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}S_E.normalized"}
+// CHECK: ![[TYPE14]] = !{i64 0, !"_ZTSFv{{u3i16|u3i32|u3i64}}S_S_E.normalized"}
+// CHECK: ![[TYPE15]] = !{i64 0, !"_ZTSFvu3i16E.normalized"}
+// CHECK: ![[TYPE16]] = !{i64 0, !"_ZTSFvu3i16S_E.normalized"}
+// CHECK: ![[TYPE17]] = !{i64 0, !"_ZTSFvu3i16S_S_E.normalized"}
+// CHECK: ![[TYPE18]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}E.normalized"}
+// CHECK: ![[TYPE19]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}S_E.normalized"}
+// CHECK: ![[TYPE20]] = !{i64 0, !"_ZTSFv{{u3u16|u3u32|u3u64}}S_S_E.normalized"}
+// CHECK: ![[TYPE21]] = !{i64 0, !"_ZTSFvu3u16E.normalized"}
+// CHECK: ![[TYPE22]] = !{i64 0, !"_ZTSFvu3u16S_E.normalized"}
+// CHECK: ![[TYPE23]] = !{i64 0, !"_ZTSFvu3u16S_S_E.normalized"}
diff --git a/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs
new file mode 100644
index 00000000000..bb317e4a2fa
--- /dev/null
+++ b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-attr-no-sanitize.rs
@@ -0,0 +1,30 @@
+// Verifies that KCFI operand bundles are omitted.
+//
+// revisions: aarch64 x86_64
+// [aarch64] compile-flags: --target aarch64-unknown-none
+// [aarch64] needs-llvm-components: aarch64
+// [x86_64] compile-flags: --target x86_64-unknown-none
+// [x86_64] needs-llvm-components:
+// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
+
+#![crate_type="lib"]
+#![feature(no_core, no_sanitize, lang_items)]
+#![no_core]
+
+#[lang="sized"]
+trait Sized { }
+#[lang="copy"]
+trait Copy { }
+
+impl Copy for i32 {}
+
+#[no_sanitize(kcfi)]
+pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
+    // CHECK-LABEL: sanitizer_kcfi_emit_kcfi_operand_bundle_attr_no_sanitize::foo
+    // CHECK:       Function Attrs: {{.*}}
+    // CHECK-LABEL: define{{.*}}foo{{.*}}!{{<unknown kind #36>|kcfi_type}} !{{[0-9]+}}
+    // CHECK:       start:
+    // CHECK-NOT:   {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg){{.*}}[ "kcfi"(i32 {{[-0-9]+}}) ]
+    // CHECK:       ret i32 {{%.+}}
+    f(arg)
+}
diff --git a/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs
new file mode 100644
index 00000000000..29e4df3511f
--- /dev/null
+++ b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-generalized.rs
@@ -0,0 +1,44 @@
+// Verifies that generalized KCFI type metadata for functions are emitted.
+//
+// revisions: aarch64 x86_64
+// [aarch64] compile-flags: --target aarch64-unknown-none
+// [aarch64] needs-llvm-components: aarch64
+// [x86_64] compile-flags: --target x86_64-unknown-none
+// [x86_64] needs-llvm-components:
+// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-generalize-pointers
+
+#![crate_type="lib"]
+#![feature(no_core, lang_items)]
+#![no_core]
+
+#[lang="sized"]
+trait Sized { }
+#[lang="copy"]
+trait Copy { }
+
+impl Copy for i32 {}
+
+pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}foo
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE1:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg){{.*}}[ "kcfi"(i32 233085384) ]
+    f(arg)
+}
+
+pub fn bar(f: fn(i32, i32) -> i32, arg1: i32, arg2: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}bar
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE2:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg1, i32 {{(noundef )*}}%arg2){{.*}}[ "kcfi"(i32 435418021) ]
+    f(arg1, arg2)
+}
+
+pub fn baz(f: fn(i32, i32, i32) -> i32, arg1: i32, arg2: i32, arg3: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}baz
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE3:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg1, i32 {{(noundef )*}}%arg2, i32 {{(noundef )*}}%arg3){{.*}}[ "kcfi"(i32 -1003721339) ]
+    f(arg1, arg2, arg3)
+}
+
+// CHECK: ![[TYPE1]] = !{i32 -1741689296}
+// CHECK: ![[TYPE2]] = !{i32 489439372}
+// CHECK: ![[TYPE3]] = !{i32 2026563871}
diff --git a/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs
new file mode 100644
index 00000000000..84d678a33ba
--- /dev/null
+++ b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized-generalized.rs
@@ -0,0 +1,44 @@
+// Verifies that normalized and generalized KCFI type metadata for functions are emitted.
+//
+// revisions: aarch64 x86_64
+// [aarch64] compile-flags: --target aarch64-unknown-none
+// [aarch64] needs-llvm-components: aarch64
+// [x86_64] compile-flags: --target x86_64-unknown-none
+// [x86_64] needs-llvm-components:
+// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers -Zsanitizer-cfi-generalize-pointers
+
+#![crate_type="lib"]
+#![feature(no_core, lang_items)]
+#![no_core]
+
+#[lang="sized"]
+trait Sized { }
+#[lang="copy"]
+trait Copy { }
+
+impl Copy for i32 {}
+
+pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}foo
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE1:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg){{.*}}[ "kcfi"(i32 -686570305) ]
+    f(arg)
+}
+
+pub fn bar(f: fn(i32, i32) -> i32, arg1: i32, arg2: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}bar
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE2:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg1, i32 {{(noundef )*}}%arg2){{.*}}[ "kcfi"(i32 1281038450) ]
+    f(arg1, arg2)
+}
+
+pub fn baz(f: fn(i32, i32, i32) -> i32, arg1: i32, arg2: i32, arg3: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}baz
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE3:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg1, i32 {{(noundef )*}}%arg2, i32 {{(noundef )*}}%arg3){{.*}}[ "kcfi"(i32 -1751512973) ]
+    f(arg1, arg2, arg3)
+}
+
+// CHECK: ![[TYPE1]] = !{i32 975484707}
+// CHECK: ![[TYPE2]] = !{i32 1658833102}
+// CHECK: ![[TYPE3]] = !{i32 230429758}
diff --git a/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs
new file mode 100644
index 00000000000..761c37a9e06
--- /dev/null
+++ b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi-normalized.rs
@@ -0,0 +1,44 @@
+// Verifies that normalized KCFI type metadata for functions are emitted.
+//
+// revisions: aarch64 x86_64
+// [aarch64] compile-flags: --target aarch64-unknown-none
+// [aarch64] needs-llvm-components: aarch64
+// [x86_64] compile-flags: --target x86_64-unknown-none
+// [x86_64] needs-llvm-components:
+// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Zsanitizer-cfi-normalize-integers
+
+#![crate_type="lib"]
+#![feature(no_core, lang_items)]
+#![no_core]
+
+#[lang="sized"]
+trait Sized { }
+#[lang="copy"]
+trait Copy { }
+
+impl Copy for i32 {}
+
+pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}foo
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE1:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg){{.*}}[ "kcfi"(i32 -841055669) ]
+    f(arg)
+}
+
+pub fn bar(f: fn(i32, i32) -> i32, arg1: i32, arg2: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}bar
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE2:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg1, i32 {{(noundef )*}}%arg2){{.*}}[ "kcfi"(i32 1390819368) ]
+    f(arg1, arg2)
+}
+
+pub fn baz(f: fn(i32, i32, i32) -> i32, arg1: i32, arg2: i32, arg3: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}baz
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE3:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg1, i32 {{(noundef )*}}%arg2, i32 {{(noundef )*}}%arg3){{.*}}[ "kcfi"(i32 586925835) ]
+    f(arg1, arg2, arg3)
+}
+
+// CHECK: ![[TYPE1]] = !{i32 -458317079}
+// CHECK: ![[TYPE2]] = !{i32 1737138182}
+// CHECK: ![[TYPE3]] = !{i32 197182412}
diff --git a/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs
index 2537df80a90..83cda0ef136 100644
--- a/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs
+++ b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle-itanium-cxx-abi.rs
@@ -20,22 +20,22 @@ impl Copy for i32 {}
 
 pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
     // CHECK-LABEL: define{{.*}}foo
-    // CHECK-SAME: {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE1:[0-9]+]]
-    // CHECK: call i32 %f(i32 %arg){{.*}}[ "kcfi"(i32 -1666898348) ]
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE1:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg){{.*}}[ "kcfi"(i32 -1666898348) ]
     f(arg)
 }
 
 pub fn bar(f: fn(i32, i32) -> i32, arg1: i32, arg2: i32) -> i32 {
     // CHECK-LABEL: define{{.*}}bar
-    // CHECK-SAME: {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE2:[0-9]+]]
-    // CHECK: call i32 %f(i32 %arg1, i32 %arg2){{.*}}[ "kcfi"(i32 -1789026986) ]
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE2:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg1, i32 {{(noundef )*}}%arg2){{.*}}[ "kcfi"(i32 -1789026986) ]
     f(arg1, arg2)
 }
 
 pub fn baz(f: fn(i32, i32, i32) -> i32, arg1: i32, arg2: i32, arg3: i32) -> i32 {
     // CHECK-LABEL: define{{.*}}baz
-    // CHECK-SAME: {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE3:[0-9]+]]
-    // CHECK: call i32 %f(i32 %arg1, i32 %arg2, i32 %arg3){{.*}}[ "kcfi"(i32 1248878270) ]
+    // CHECK-SAME:  {{.*}}!{{<unknown kind #36>|kcfi_type}} ![[TYPE3:[0-9]+]]
+    // CHECK:       {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg1, i32 {{(noundef )*}}%arg2, i32 {{(noundef )*}}%arg3){{.*}}[ "kcfi"(i32 1248878270) ]
     f(arg1, arg2, arg3)
 }
 
diff --git a/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle.rs b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle.rs
new file mode 100644
index 00000000000..e1d617b5ee1
--- /dev/null
+++ b/tests/codegen/sanitizer-kcfi-emit-kcfi-operand-bundle.rs
@@ -0,0 +1,27 @@
+// Verifies that KCFI operand bundles are emitted.
+//
+// revisions: aarch64 x86_64
+// [aarch64] compile-flags: --target aarch64-unknown-none
+// [aarch64] needs-llvm-components: aarch64
+// [x86_64] compile-flags: --target x86_64-unknown-none
+// [x86_64] needs-llvm-components:
+// compile-flags: -Cno-prepopulate-passes -Zsanitizer=kcfi -Copt-level=0
+
+#![crate_type="lib"]
+#![feature(no_core, lang_items)]
+#![no_core]
+
+#[lang="sized"]
+trait Sized { }
+#[lang="copy"]
+trait Copy { }
+
+impl Copy for i32 {}
+
+pub fn foo(f: fn(i32) -> i32, arg: i32) -> i32 {
+    // CHECK-LABEL: define{{.*}}foo{{.*}}!{{<unknown kind #36>|kcfi_type}} !{{[0-9]+}}
+    // CHECK:       start:
+    // CHECK-NEXT:  {{%.+}} = call {{(noundef )*}}i32 %f(i32 {{(noundef )*}}%arg){{.*}}[ "kcfi"(i32 {{[-0-9]+}}) ]
+    // CHECK-NEXT:  ret i32 {{%.+}}
+    f(arg)
+}
diff --git a/tests/codegen/slice-iter-nonnull.rs b/tests/codegen/slice-iter-nonnull.rs
new file mode 100644
index 00000000000..392e4338076
--- /dev/null
+++ b/tests/codegen/slice-iter-nonnull.rs
@@ -0,0 +1,42 @@
+// no-system-llvm
+// compile-flags: -O
+// ignore-debug (these add extra checks that make it hard to verify)
+#![crate_type = "lib"]
+
+// The slice iterator used to `assume` that the `start` pointer was non-null.
+// That ought to be unneeded, though, since the type is `NonNull`, so this test
+// confirms that the appropriate metadata is included to denote that.
+
+// CHECK-LABEL: @slice_iter_next(
+#[no_mangle]
+pub fn slice_iter_next<'a>(it: &mut std::slice::Iter<'a, u32>) -> Option<&'a u32> {
+    // CHECK: %[[ENDP:.+]] = getelementptr{{.+}}ptr %it,{{.+}} 1
+    // CHECK: %[[END:.+]] = load ptr, ptr %[[ENDP]]
+    // CHECK-SAME: !nonnull
+    // CHECK-SAME: !noundef
+    // CHECK: %[[START:.+]] = load ptr, ptr %it,
+    // CHECK-SAME: !nonnull
+    // CHECK-SAME: !noundef
+    // CHECK: icmp eq ptr %[[START]], %[[END]]
+
+    // CHECK: store ptr{{.+}}, ptr %it,
+
+    it.next()
+}
+
+// CHECK-LABEL: @slice_iter_next_back(
+#[no_mangle]
+pub fn slice_iter_next_back<'a>(it: &mut std::slice::Iter<'a, u32>) -> Option<&'a u32> {
+    // CHECK: %[[ENDP:.+]] = getelementptr{{.+}}ptr %it,{{.+}} 1
+    // CHECK: %[[END:.+]] = load ptr, ptr %[[ENDP]]
+    // CHECK-SAME: !nonnull
+    // CHECK-SAME: !noundef
+    // CHECK: %[[START:.+]] = load ptr, ptr %it,
+    // CHECK-SAME: !nonnull
+    // CHECK-SAME: !noundef
+    // CHECK: icmp eq ptr %[[START]], %[[END]]
+
+    // CHECK: store ptr{{.+}}, ptr %[[ENDP]],
+
+    it.next_back()
+}
diff --git a/tests/codegen/split-lto-unit.rs b/tests/codegen/split-lto-unit.rs
new file mode 100644
index 00000000000..dc6570be32b
--- /dev/null
+++ b/tests/codegen/split-lto-unit.rs
@@ -0,0 +1,11 @@
+// Verifies that "EnableSplitLTOUnit" module flag is added.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Ctarget-feature=-crt-static -Zsplit-lto-unit
+
+#![crate_type="lib"]
+
+pub fn foo() {
+}
+
+// CHECK: !{{[0-9]+}} = !{i32 4, !"EnableSplitLTOUnit", i32 1}
diff --git a/tests/codegen/var-names.rs b/tests/codegen/var-names.rs
index 53841df32e8..d4715efad73 100644
--- a/tests/codegen/var-names.rs
+++ b/tests/codegen/var-names.rs
@@ -9,7 +9,7 @@ pub fn test(a: u32, b: u32) -> u32 {
     // CHECK: %c = add i32 %a, %b
     let d = c;
     let e = d * a;
-    // CHECK-NEXT: %0 = mul i32 %c, %a
+    // CHECK-NEXT: %e = mul i32 %c, %a
     e
-    // CHECK-NEXT: ret i32 %0
+    // CHECK-NEXT: ret i32 %e
 }
diff --git a/tests/codegen/vec-shrink-panik.rs b/tests/codegen/vec-shrink-panik.rs
index b3c3483fea9..4e5d8dc0632 100644
--- a/tests/codegen/vec-shrink-panik.rs
+++ b/tests/codegen/vec-shrink-panik.rs
@@ -25,7 +25,7 @@ pub fn issue71861(vec: Vec<u32>) -> Box<[u32]> {
 
     // Call to panic_cannot_unwind in case of double-panic is expected
     // on LLVM 16 and older, but other panics are not.
-    // CHECK: cleanup
+    // CHECK: filter
     // old-NEXT: ; call core::panicking::panic_cannot_unwind
     // old-NEXT: panic_cannot_unwind
 
@@ -40,7 +40,7 @@ pub fn issue75636<'a>(iter: &[&'a str]) -> Box<[&'a str]> {
 
     // Call to panic_cannot_unwind in case of double-panic is expected,
     // on LLVM 16 and older, but other panics are not.
-    // CHECK: cleanup
+    // CHECK: filter
     // old-NEXT: ; call core::panicking::panic_cannot_unwind
     // old-NEXT: panic_cannot_unwind
 
diff --git a/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.rs b/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.rs
index 327515b10af..c187df637fd 100644
--- a/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.rs
+++ b/tests/debuginfo/auxiliary/dependency-with-embedded-visualizers.rs
@@ -2,7 +2,6 @@
 // ignore-lldb
 // no-prefer-dynamic
 
-#![feature(debugger_visualizer)]
 #![debugger_visualizer(natvis_file = "dependency-with-embedded-visualizers.natvis")]
 #![debugger_visualizer(gdb_script_file = "dependency-with-embedded-visualizers.py")]
 #![crate_type = "rlib"]
diff --git a/tests/debuginfo/embedded-visualizer.rs b/tests/debuginfo/embedded-visualizer.rs
index 2898e75e0ee..ac421092839 100644
--- a/tests/debuginfo/embedded-visualizer.rs
+++ b/tests/debuginfo/embedded-visualizer.rs
@@ -60,7 +60,6 @@
 // gdb-check:$4 = "Person A" is 10 years old.
 
 #![allow(unused_variables)]
-#![feature(debugger_visualizer)]
 #![debugger_visualizer(natvis_file = "embedded-visualizer.natvis")]
 #![debugger_visualizer(gdb_script_file = "embedded-visualizer.py")]
 
diff --git a/tests/incremental/change_crate_dep_kind.rs b/tests/incremental/change_crate_dep_kind.rs
index 8c35f6ca000..f518266016e 100644
--- a/tests/incremental/change_crate_dep_kind.rs
+++ b/tests/incremental/change_crate_dep_kind.rs
@@ -2,6 +2,7 @@
 // detected then -Zincremental-verify-ich will trigger an assertion.
 
 // ignore-wasm32-bare compiled with panic=abort by default
+// needs-unwind
 // revisions:cfail1 cfail2
 // compile-flags: -Z query-dep-graph -Cpanic=unwind
 // build-pass (FIXME(62277): could be check-pass?)
diff --git a/tests/incremental/issue-80691-bad-eval-cache.rs b/tests/incremental/issue-80691-bad-eval-cache.rs
index 1a644fd88d6..ad8a338a796 100644
--- a/tests/incremental/issue-80691-bad-eval-cache.rs
+++ b/tests/incremental/issue-80691-bad-eval-cache.rs
@@ -1,6 +1,7 @@
 // revisions: rfail1 rfail2
 // failure-status: 101
 // error-pattern: not implemented
+// needs-unwind -Cpanic=abort causes abort instead of exit(101)
 
 pub trait Interner {
     type InternedVariableKinds;
diff --git a/tests/mir-opt/bool_compare.opt1.InstCombine.diff b/tests/mir-opt/bool_compare.opt1.InstSimplify.diff
index 0af5d82d315..6c9df8f042b 100644
--- a/tests/mir-opt/bool_compare.opt1.InstCombine.diff
+++ b/tests/mir-opt/bool_compare.opt1.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `opt1` before InstCombine
-+ // MIR for `opt1` after InstCombine
+- // MIR for `opt1` before InstSimplify
++ // MIR for `opt1` after InstSimplify
   
   fn opt1(_1: bool) -> u32 {
       debug x => _1;                       // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
diff --git a/tests/mir-opt/bool_compare.opt2.InstCombine.diff b/tests/mir-opt/bool_compare.opt2.InstSimplify.diff
index f5d1febd991..9fb3982654a 100644
--- a/tests/mir-opt/bool_compare.opt2.InstCombine.diff
+++ b/tests/mir-opt/bool_compare.opt2.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `opt2` before InstCombine
-+ // MIR for `opt2` after InstCombine
+- // MIR for `opt2` before InstSimplify
++ // MIR for `opt2` after InstSimplify
   
   fn opt2(_1: bool) -> u32 {
       debug x => _1;                       // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
diff --git a/tests/mir-opt/bool_compare.opt3.InstCombine.diff b/tests/mir-opt/bool_compare.opt3.InstSimplify.diff
index e7432adac7d..3a47da86735 100644
--- a/tests/mir-opt/bool_compare.opt3.InstCombine.diff
+++ b/tests/mir-opt/bool_compare.opt3.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `opt3` before InstCombine
-+ // MIR for `opt3` after InstCombine
+- // MIR for `opt3` before InstSimplify
++ // MIR for `opt3` after InstSimplify
   
   fn opt3(_1: bool) -> u32 {
       debug x => _1;                       // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
diff --git a/tests/mir-opt/bool_compare.opt4.InstCombine.diff b/tests/mir-opt/bool_compare.opt4.InstSimplify.diff
index 6b3e27772f7..5319c987d41 100644
--- a/tests/mir-opt/bool_compare.opt4.InstCombine.diff
+++ b/tests/mir-opt/bool_compare.opt4.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `opt4` before InstCombine
-+ // MIR for `opt4` after InstCombine
+- // MIR for `opt4` before InstSimplify
++ // MIR for `opt4` after InstSimplify
   
   fn opt4(_1: bool) -> u32 {
       debug x => _1;                       // in scope 0 at $DIR/bool_compare.rs:+0:9: +0:10
diff --git a/tests/mir-opt/bool_compare.rs b/tests/mir-opt/bool_compare.rs
index 4435bf5b0f2..080f7f72d11 100644
--- a/tests/mir-opt/bool_compare.rs
+++ b/tests/mir-opt/bool_compare.rs
@@ -1,21 +1,21 @@
-// unit-test: InstCombine
+// unit-test: InstSimplify
 
-// EMIT_MIR bool_compare.opt1.InstCombine.diff
+// EMIT_MIR bool_compare.opt1.InstSimplify.diff
 fn opt1(x: bool) -> u32 {
     if x != true { 0 } else { 1 }
 }
 
-// EMIT_MIR bool_compare.opt2.InstCombine.diff
+// EMIT_MIR bool_compare.opt2.InstSimplify.diff
 fn opt2(x: bool) -> u32 {
     if true != x { 0 } else { 1 }
 }
 
-// EMIT_MIR bool_compare.opt3.InstCombine.diff
+// EMIT_MIR bool_compare.opt3.InstSimplify.diff
 fn opt3(x: bool) -> u32 {
     if x == false { 0 } else { 1 }
 }
 
-// EMIT_MIR bool_compare.opt4.InstCombine.diff
+// EMIT_MIR bool_compare.opt4.InstSimplify.diff
 fn opt4(x: bool) -> u32 {
     if false == x { 0 } else { 1 }
 }
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 9bced25a595..a9d1477b9fe 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
@@ -4,7 +4,7 @@
         _0: GeneratorSavedTy {
             ty: impl std::future::Future<Output = ()>,
             source_info: SourceInfo {
-                span: $DIR/async_await.rs:15:8: 15:14 (#8),
+                span: $DIR/async_await.rs:15:9: 15:14 (#8),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -12,7 +12,7 @@
         _1: GeneratorSavedTy {
             ty: impl std::future::Future<Output = ()>,
             source_info: SourceInfo {
-                span: $DIR/async_await.rs:16:8: 16:14 (#10),
+                span: $DIR/async_await.rs:16:9: 16:14 (#10),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -35,42 +35,42 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
     debug _task_context => _38;          // in scope 0 at $DIR/async_await.rs:+0:18: +3:2
     let mut _0: std::task::Poll<()>;     // return place in scope 0 at $DIR/async_await.rs:+0:18: +3:2
     let _3: ();                          // in scope 0 at $DIR/async_await.rs:+1:5: +1:14
-    let mut _4: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:8: +1:14
+    let mut _4: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
     let mut _5: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:5: +1:8
-    let mut _6: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:8: +1:14
+    let mut _6: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
     let mut _7: ();                      // in scope 0 at $DIR/async_await.rs:+0:18: +3:2
-    let _8: ();                          // in scope 0 at $DIR/async_await.rs:+1:8: +1:14
-    let mut _9: std::task::Poll<()>;     // in scope 0 at $DIR/async_await.rs:+1:8: +1:14
-    let mut _10: std::pin::Pin<&mut impl std::future::Future<Output = ()>>; // in scope 0 at $DIR/async_await.rs:+1:8: +1:14
-    let mut _11: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:8: +1:14
-    let mut _12: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:8: +1:14
+    let _8: ();                          // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
+    let mut _9: std::task::Poll<()>;     // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
+    let mut _10: std::pin::Pin<&mut impl std::future::Future<Output = ()>>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
+    let mut _11: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
+    let mut _12: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
     let mut _13: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+1:5: +1:14
     let mut _14: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+1:5: +1:14
-    let mut _15: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+1:8: +1:14
-    let mut _16: isize;                  // in scope 0 at $DIR/async_await.rs:+1:8: +1:14
+    let mut _15: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
+    let mut _16: isize;                  // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
     let mut _18: !;                      // in scope 0 at $DIR/async_await.rs:+1:5: +1:14
-    let mut _19: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+1:8: +1:14
-    let mut _20: ();                     // in scope 0 at $DIR/async_await.rs:+1:8: +1:14
-    let mut _21: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:8: +2:14
+    let mut _19: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
+    let mut _20: ();                     // in scope 0 at $DIR/async_await.rs:+1:9: +1:14
+    let mut _21: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
     let mut _22: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:5: +2:8
-    let mut _23: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:8: +2:14
-    let _24: ();                         // in scope 0 at $DIR/async_await.rs:+2:8: +2:14
-    let mut _25: std::task::Poll<()>;    // in scope 0 at $DIR/async_await.rs:+2:8: +2:14
-    let mut _26: std::pin::Pin<&mut impl std::future::Future<Output = ()>>; // in scope 0 at $DIR/async_await.rs:+2:8: +2:14
-    let mut _27: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:8: +2:14
-    let mut _28: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:8: +2:14
+    let mut _23: impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
+    let _24: ();                         // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
+    let mut _25: std::task::Poll<()>;    // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
+    let mut _26: std::pin::Pin<&mut impl std::future::Future<Output = ()>>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
+    let mut _27: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
+    let mut _28: &mut impl std::future::Future<Output = ()>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
     let mut _29: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+2:5: +2:14
     let mut _30: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+2:5: +2:14
-    let mut _31: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+2:8: +2:14
-    let mut _32: isize;                  // in scope 0 at $DIR/async_await.rs:+2:8: +2:14
+    let mut _31: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
+    let mut _32: isize;                  // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
     let mut _34: !;                      // in scope 0 at $DIR/async_await.rs:+2:5: +2:14
-    let mut _35: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+2:8: +2:14
-    let mut _36: ();                     // in scope 0 at $DIR/async_await.rs:+2:8: +2:14
+    let mut _35: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
+    let mut _36: ();                     // in scope 0 at $DIR/async_await.rs:+2:9: +2:14
     let mut _37: ();                     // in scope 0 at $DIR/async_await.rs:+0:18: +3:2
     let mut _38: &mut std::task::Context<'_>; // in scope 0 at $DIR/async_await.rs:+0:18: +3:2
     let mut _39: u32;                    // in scope 0 at $DIR/async_await.rs:+0:18: +3:2
     scope 1 {
-        debug __awaitee => (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>); // in scope 1 at $DIR/async_await.rs:+1:8: +1:14
+        debug __awaitee => (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>); // in scope 1 at $DIR/async_await.rs:+1:9: +1:14
         let _17: ();                     // in scope 1 at $DIR/async_await.rs:+1:5: +1:14
         scope 2 {
         }
@@ -79,7 +79,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
         }
     }
     scope 4 {
-        debug __awaitee => (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>); // in scope 4 at $DIR/async_await.rs:+2:8: +2:14
+        debug __awaitee => (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>); // in scope 4 at $DIR/async_await.rs:+2:9: +2:14
         let _33: ();                     // in scope 4 at $DIR/async_await.rs:+2:5: +2:14
         scope 5 {
         }
@@ -96,7 +96,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
     bb1: {
         _38 = move _2;                   // scope 0 at $DIR/async_await.rs:+0:18: +3:2
         StorageLive(_3);                 // scope 0 at $DIR/async_await.rs:+1:5: +1:14
-        StorageLive(_4);                 // scope 0 at $DIR/async_await.rs:+1:8: +1:14
+        StorageLive(_4);                 // scope 0 at $DIR/async_await.rs:+1:9: +1:14
         StorageLive(_5);                 // scope 0 at $DIR/async_await.rs:+1:5: +1:8
         _5 = a() -> [return: bb2, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+1:5: +1:8
                                          // mir::Constant
@@ -105,30 +105,30 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
     }
 
     bb2: {
-        _4 = <impl Future<Output = ()> as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+1:8: +1:14
+        _4 = <impl Future<Output = ()> as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+1:9: +1:14
                                          // mir::Constant
-                                         // + span: $DIR/async_await.rs:15:8: 15:14
+                                         // + span: $DIR/async_await.rs:15:9: 15:14
                                          // + literal: Const { ty: fn(impl Future<Output = ()>) -> <impl Future<Output = ()> as IntoFuture>::IntoFuture {<impl Future<Output = ()> as IntoFuture>::into_future}, val: Value(<ZST>) }
     }
 
     bb3: {
         StorageDead(_5);                 // scope 0 at $DIR/async_await.rs:+1:13: +1:14
-        nop;                             // scope 0 at $DIR/async_await.rs:+1:8: +1:14
-        (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>) = move _4; // scope 0 at $DIR/async_await.rs:+1:8: +1:14
-        goto -> bb4;                     // scope 1 at $DIR/async_await.rs:+1:8: +1:14
+        nop;                             // scope 0 at $DIR/async_await.rs:+1:9: +1:14
+        (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>) = move _4; // scope 0 at $DIR/async_await.rs:+1:9: +1:14
+        goto -> bb4;                     // scope 1 at $DIR/async_await.rs:+1:9: +1:14
     }
 
     bb4: {
-        StorageLive(_8);                 // scope 1 at $DIR/async_await.rs:+1:8: +1:14
-        StorageLive(_9);                 // scope 1 at $DIR/async_await.rs:+1:8: +1:14
-        StorageLive(_10);                // scope 2 at $DIR/async_await.rs:+1:8: +1:14
-        StorageLive(_11);                // scope 2 at $DIR/async_await.rs:+1:8: +1:14
-        StorageLive(_12);                // scope 2 at $DIR/async_await.rs:+1:8: +1:14
-        _12 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>); // scope 2 at $DIR/async_await.rs:+1:8: +1:14
-        _11 = &mut (*_12);               // scope 2 at $DIR/async_await.rs:+1:8: +1:14
-        _10 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _11) -> [return: bb5, unwind unreachable]; // scope 2 at $DIR/async_await.rs:+1:8: +1:14
+        StorageLive(_8);                 // scope 1 at $DIR/async_await.rs:+1:9: +1:14
+        StorageLive(_9);                 // scope 1 at $DIR/async_await.rs:+1:9: +1:14
+        StorageLive(_10);                // scope 2 at $DIR/async_await.rs:+1:9: +1:14
+        StorageLive(_11);                // scope 2 at $DIR/async_await.rs:+1:9: +1:14
+        StorageLive(_12);                // scope 2 at $DIR/async_await.rs:+1:9: +1:14
+        _12 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#3).0: impl std::future::Future<Output = ()>); // scope 2 at $DIR/async_await.rs:+1:9: +1:14
+        _11 = &mut (*_12);               // scope 2 at $DIR/async_await.rs:+1:9: +1:14
+        _10 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _11) -> [return: bb5, unwind unreachable]; // scope 2 at $DIR/async_await.rs:+1:9: +1:14
                                          // mir::Constant
-                                         // + span: $DIR/async_await.rs:15:8: 15:14
+                                         // + span: $DIR/async_await.rs:15:9: 15:14
                                          // + literal: Const { ty: unsafe fn(&mut impl Future<Output = ()>) -> Pin<&mut impl Future<Output = ()>> {Pin::<&mut impl Future<Output = ()>>::new_unchecked}, val: Value(<ZST>) }
     }
 
@@ -136,8 +136,8 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
         StorageDead(_11);                // scope 2 at $DIR/async_await.rs:+1:13: +1:14
         StorageLive(_13);                // scope 2 at $DIR/async_await.rs:+1:5: +1:14
         StorageLive(_14);                // scope 2 at $DIR/async_await.rs:+1:5: +1:14
-        StorageLive(_15);                // scope 2 at $DIR/async_await.rs:+1:8: +1:14
-        _15 = _38;                       // scope 2 at $DIR/async_await.rs:+1:8: +1:14
+        StorageLive(_15);                // scope 2 at $DIR/async_await.rs:+1:9: +1:14
+        _15 = _38;                       // scope 2 at $DIR/async_await.rs:+1:9: +1:14
         _14 = move _15;                  // scope 2 at $DIR/async_await.rs:+1:5: +1:14
         goto -> bb6;                     // scope 2 at $DIR/async_await.rs:+1:5: +1:14
     }
@@ -145,35 +145,35 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
     bb6: {
         _13 = &mut (*_14);               // scope 2 at $DIR/async_await.rs:+1:5: +1:14
         StorageDead(_15);                // scope 2 at $DIR/async_await.rs:+1:13: +1:14
-        _9 = <impl Future<Output = ()> as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable]; // scope 2 at $DIR/async_await.rs:+1:8: +1:14
+        _9 = <impl Future<Output = ()> as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable]; // scope 2 at $DIR/async_await.rs:+1:9: +1:14
                                          // mir::Constant
-                                         // + span: $DIR/async_await.rs:15:8: 15:14
+                                         // + span: $DIR/async_await.rs:15:9: 15:14
                                          // + literal: Const { ty: for<'a, 'b, 'c> fn(Pin<&'a mut impl Future<Output = ()>>, &'b mut Context<'c>) -> Poll<<impl Future<Output = ()> as Future>::Output> {<impl Future<Output = ()> as Future>::poll}, val: Value(<ZST>) }
     }
 
     bb7: {
         StorageDead(_13);                // scope 2 at $DIR/async_await.rs:+1:13: +1:14
         StorageDead(_10);                // scope 2 at $DIR/async_await.rs:+1:13: +1:14
-        _16 = discriminant(_9);          // scope 1 at $DIR/async_await.rs:+1:8: +1:14
-        switchInt(move _16) -> [0: bb10, 1: bb8, otherwise: bb9]; // scope 1 at $DIR/async_await.rs:+1:8: +1:14
+        _16 = discriminant(_9);          // scope 1 at $DIR/async_await.rs:+1:9: +1:14
+        switchInt(move _16) -> [0: bb10, 1: bb8, otherwise: bb9]; // scope 1 at $DIR/async_await.rs:+1:9: +1:14
     }
 
     bb8: {
-        _8 = const ();                   // scope 1 at $DIR/async_await.rs:+1:8: +1:14
+        _8 = const ();                   // scope 1 at $DIR/async_await.rs:+1:9: +1:14
         StorageDead(_14);                // scope 1 at $DIR/async_await.rs:+1:13: +1:14
         StorageDead(_12);                // scope 1 at $DIR/async_await.rs:+1:13: +1:14
         StorageDead(_9);                 // scope 1 at $DIR/async_await.rs:+1:13: +1:14
         StorageDead(_8);                 // scope 1 at $DIR/async_await.rs:+1:13: +1:14
-        StorageLive(_19);                // scope 1 at $DIR/async_await.rs:+1:8: +1:14
-        StorageLive(_20);                // scope 1 at $DIR/async_await.rs:+1:8: +1:14
-        _20 = ();                        // scope 1 at $DIR/async_await.rs:+1:8: +1:14
-        _0 = Poll::<()>::Pending;        // scope 1 at $DIR/async_await.rs:+1:8: +1:14
-        discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))) = 3; // scope 1 at $DIR/async_await.rs:+1:8: +1:14
-        return;                          // scope 1 at $DIR/async_await.rs:+1:8: +1:14
+        StorageLive(_19);                // scope 1 at $DIR/async_await.rs:+1:9: +1:14
+        StorageLive(_20);                // scope 1 at $DIR/async_await.rs:+1:9: +1:14
+        _20 = ();                        // scope 1 at $DIR/async_await.rs:+1:9: +1:14
+        _0 = Poll::<()>::Pending;        // scope 1 at $DIR/async_await.rs:+1:9: +1:14
+        discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))) = 3; // scope 1 at $DIR/async_await.rs:+1:9: +1:14
+        return;                          // scope 1 at $DIR/async_await.rs:+1:9: +1:14
     }
 
     bb9: {
-        unreachable;                     // scope 1 at $DIR/async_await.rs:+1:8: +1:14
+        unreachable;                     // scope 1 at $DIR/async_await.rs:+1:9: +1:14
     }
 
     bb10: {
@@ -190,10 +190,10 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
 
     bb11: {
         StorageDead(_20);                // scope 1 at $DIR/async_await.rs:+1:13: +1:14
-        _38 = move _19;                  // scope 1 at $DIR/async_await.rs:+1:8: +1:14
+        _38 = move _19;                  // scope 1 at $DIR/async_await.rs:+1:9: +1:14
         StorageDead(_19);                // scope 1 at $DIR/async_await.rs:+1:13: +1:14
-        _7 = const ();                   // scope 1 at $DIR/async_await.rs:+1:8: +1:14
-        goto -> bb4;                     // scope 1 at $DIR/async_await.rs:+1:8: +1:14
+        _7 = const ();                   // scope 1 at $DIR/async_await.rs:+1:9: +1:14
+        goto -> bb4;                     // scope 1 at $DIR/async_await.rs:+1:9: +1:14
     }
 
     bb12: {
@@ -204,7 +204,7 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
     bb13: {
         StorageDead(_4);                 // scope 0 at $DIR/async_await.rs:+1:14: +1:15
         StorageDead(_3);                 // scope 0 at $DIR/async_await.rs:+1:14: +1:15
-        StorageLive(_21);                // scope 0 at $DIR/async_await.rs:+2:8: +2:14
+        StorageLive(_21);                // scope 0 at $DIR/async_await.rs:+2:9: +2:14
         StorageLive(_22);                // scope 0 at $DIR/async_await.rs:+2:5: +2:8
         _22 = a() -> [return: bb14, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+2:5: +2:8
                                          // mir::Constant
@@ -213,30 +213,30 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
     }
 
     bb14: {
-        _21 = <impl Future<Output = ()> as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+2:8: +2:14
+        _21 = <impl Future<Output = ()> as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable]; // scope 0 at $DIR/async_await.rs:+2:9: +2:14
                                          // mir::Constant
-                                         // + span: $DIR/async_await.rs:16:8: 16:14
+                                         // + span: $DIR/async_await.rs:16:9: 16:14
                                          // + literal: Const { ty: fn(impl Future<Output = ()>) -> <impl Future<Output = ()> as IntoFuture>::IntoFuture {<impl Future<Output = ()> as IntoFuture>::into_future}, val: Value(<ZST>) }
     }
 
     bb15: {
         StorageDead(_22);                // scope 0 at $DIR/async_await.rs:+2:13: +2:14
-        nop;                             // scope 0 at $DIR/async_await.rs:+2:8: +2:14
-        (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>) = move _21; // scope 0 at $DIR/async_await.rs:+2:8: +2:14
-        goto -> bb16;                    // scope 4 at $DIR/async_await.rs:+2:8: +2:14
+        nop;                             // scope 0 at $DIR/async_await.rs:+2:9: +2:14
+        (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>) = move _21; // scope 0 at $DIR/async_await.rs:+2:9: +2:14
+        goto -> bb16;                    // scope 4 at $DIR/async_await.rs:+2:9: +2:14
     }
 
     bb16: {
-        StorageLive(_24);                // scope 4 at $DIR/async_await.rs:+2:8: +2:14
-        StorageLive(_25);                // scope 4 at $DIR/async_await.rs:+2:8: +2:14
-        StorageLive(_26);                // scope 5 at $DIR/async_await.rs:+2:8: +2:14
-        StorageLive(_27);                // scope 5 at $DIR/async_await.rs:+2:8: +2:14
-        StorageLive(_28);                // scope 5 at $DIR/async_await.rs:+2:8: +2:14
-        _28 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>); // scope 5 at $DIR/async_await.rs:+2:8: +2:14
-        _27 = &mut (*_28);               // scope 5 at $DIR/async_await.rs:+2:8: +2:14
-        _26 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _27) -> [return: bb17, unwind unreachable]; // scope 5 at $DIR/async_await.rs:+2:8: +2:14
+        StorageLive(_24);                // scope 4 at $DIR/async_await.rs:+2:9: +2:14
+        StorageLive(_25);                // scope 4 at $DIR/async_await.rs:+2:9: +2:14
+        StorageLive(_26);                // scope 5 at $DIR/async_await.rs:+2:9: +2:14
+        StorageLive(_27);                // scope 5 at $DIR/async_await.rs:+2:9: +2:14
+        StorageLive(_28);                // scope 5 at $DIR/async_await.rs:+2:9: +2:14
+        _28 = &mut (((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2])) as variant#4).0: impl std::future::Future<Output = ()>); // scope 5 at $DIR/async_await.rs:+2:9: +2:14
+        _27 = &mut (*_28);               // scope 5 at $DIR/async_await.rs:+2:9: +2:14
+        _26 = Pin::<&mut impl Future<Output = ()>>::new_unchecked(move _27) -> [return: bb17, unwind unreachable]; // scope 5 at $DIR/async_await.rs:+2:9: +2:14
                                          // mir::Constant
-                                         // + span: $DIR/async_await.rs:16:8: 16:14
+                                         // + span: $DIR/async_await.rs:16:9: 16:14
                                          // + literal: Const { ty: unsafe fn(&mut impl Future<Output = ()>) -> Pin<&mut impl Future<Output = ()>> {Pin::<&mut impl Future<Output = ()>>::new_unchecked}, val: Value(<ZST>) }
     }
 
@@ -244,8 +244,8 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
         StorageDead(_27);                // scope 5 at $DIR/async_await.rs:+2:13: +2:14
         StorageLive(_29);                // scope 5 at $DIR/async_await.rs:+2:5: +2:14
         StorageLive(_30);                // scope 5 at $DIR/async_await.rs:+2:5: +2:14
-        StorageLive(_31);                // scope 5 at $DIR/async_await.rs:+2:8: +2:14
-        _31 = _38;                       // scope 5 at $DIR/async_await.rs:+2:8: +2:14
+        StorageLive(_31);                // scope 5 at $DIR/async_await.rs:+2:9: +2:14
+        _31 = _38;                       // scope 5 at $DIR/async_await.rs:+2:9: +2:14
         _30 = move _31;                  // scope 5 at $DIR/async_await.rs:+2:5: +2:14
         goto -> bb18;                    // scope 5 at $DIR/async_await.rs:+2:5: +2:14
     }
@@ -253,31 +253,31 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
     bb18: {
         _29 = &mut (*_30);               // scope 5 at $DIR/async_await.rs:+2:5: +2:14
         StorageDead(_31);                // scope 5 at $DIR/async_await.rs:+2:13: +2:14
-        _25 = <impl Future<Output = ()> as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable]; // scope 5 at $DIR/async_await.rs:+2:8: +2:14
+        _25 = <impl Future<Output = ()> as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable]; // scope 5 at $DIR/async_await.rs:+2:9: +2:14
                                          // mir::Constant
-                                         // + span: $DIR/async_await.rs:16:8: 16:14
+                                         // + span: $DIR/async_await.rs:16:9: 16:14
                                          // + literal: Const { ty: for<'a, 'b, 'c> fn(Pin<&'a mut impl Future<Output = ()>>, &'b mut Context<'c>) -> Poll<<impl Future<Output = ()> as Future>::Output> {<impl Future<Output = ()> as Future>::poll}, val: Value(<ZST>) }
     }
 
     bb19: {
         StorageDead(_29);                // scope 5 at $DIR/async_await.rs:+2:13: +2:14
         StorageDead(_26);                // scope 5 at $DIR/async_await.rs:+2:13: +2:14
-        _32 = discriminant(_25);         // scope 4 at $DIR/async_await.rs:+2:8: +2:14
-        switchInt(move _32) -> [0: bb21, 1: bb20, otherwise: bb9]; // scope 4 at $DIR/async_await.rs:+2:8: +2:14
+        _32 = discriminant(_25);         // scope 4 at $DIR/async_await.rs:+2:9: +2:14
+        switchInt(move _32) -> [0: bb21, 1: bb20, otherwise: bb9]; // scope 4 at $DIR/async_await.rs:+2:9: +2:14
     }
 
     bb20: {
-        _24 = const ();                  // scope 4 at $DIR/async_await.rs:+2:8: +2:14
+        _24 = const ();                  // scope 4 at $DIR/async_await.rs:+2:9: +2:14
         StorageDead(_30);                // scope 4 at $DIR/async_await.rs:+2:13: +2:14
         StorageDead(_28);                // scope 4 at $DIR/async_await.rs:+2:13: +2:14
         StorageDead(_25);                // scope 4 at $DIR/async_await.rs:+2:13: +2:14
         StorageDead(_24);                // scope 4 at $DIR/async_await.rs:+2:13: +2:14
-        StorageLive(_35);                // scope 4 at $DIR/async_await.rs:+2:8: +2:14
-        StorageLive(_36);                // scope 4 at $DIR/async_await.rs:+2:8: +2:14
-        _36 = ();                        // scope 4 at $DIR/async_await.rs:+2:8: +2:14
-        _0 = Poll::<()>::Pending;        // scope 4 at $DIR/async_await.rs:+2:8: +2:14
-        discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))) = 4; // scope 4 at $DIR/async_await.rs:+2:8: +2:14
-        return;                          // scope 4 at $DIR/async_await.rs:+2:8: +2:14
+        StorageLive(_35);                // scope 4 at $DIR/async_await.rs:+2:9: +2:14
+        StorageLive(_36);                // scope 4 at $DIR/async_await.rs:+2:9: +2:14
+        _36 = ();                        // scope 4 at $DIR/async_await.rs:+2:9: +2:14
+        _0 = Poll::<()>::Pending;        // scope 4 at $DIR/async_await.rs:+2:9: +2:14
+        discriminant((*(_1.0: &mut [async fn body@$DIR/async_await.rs:14:18: 17:2]))) = 4; // scope 4 at $DIR/async_await.rs:+2:9: +2:14
+        return;                          // scope 4 at $DIR/async_await.rs:+2:9: +2:14
     }
 
     bb21: {
@@ -294,10 +294,10 @@ fn b::{closure#0}(_1: Pin<&mut [async fn body@$DIR/async_await.rs:14:18: 17:2]>,
 
     bb22: {
         StorageDead(_36);                // scope 4 at $DIR/async_await.rs:+2:13: +2:14
-        _38 = move _35;                  // scope 4 at $DIR/async_await.rs:+2:8: +2:14
+        _38 = move _35;                  // scope 4 at $DIR/async_await.rs:+2:9: +2:14
         StorageDead(_35);                // scope 4 at $DIR/async_await.rs:+2:13: +2:14
-        _7 = const ();                   // scope 4 at $DIR/async_await.rs:+2:8: +2:14
-        goto -> bb16;                    // scope 4 at $DIR/async_await.rs:+2:8: +2:14
+        _7 = const ();                   // scope 4 at $DIR/async_await.rs:+2:9: +2:14
+        goto -> bb16;                    // scope 4 at $DIR/async_await.rs:+2:9: +2:14
     }
 
     bb23: {
diff --git a/tests/mir-opt/casts.redundant.InstCombine.diff b/tests/mir-opt/casts.redundant.InstSimplify.diff
index 528a8e5a90f..a641b69deb0 100644
--- a/tests/mir-opt/casts.redundant.InstCombine.diff
+++ b/tests/mir-opt/casts.redundant.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `redundant` before InstCombine
-+ // MIR for `redundant` after InstCombine
+- // MIR for `redundant` before InstSimplify
++ // MIR for `redundant` after InstSimplify
   
   fn redundant(_1: *const &u8) -> *const &u8 {
       debug x => _1;                       // in scope 0 at $DIR/casts.rs:+0:30: +0:31
diff --git a/tests/mir-opt/casts.rs b/tests/mir-opt/casts.rs
index 259c462da3d..413b0e09d3f 100644
--- a/tests/mir-opt/casts.rs
+++ b/tests/mir-opt/casts.rs
@@ -1,6 +1,6 @@
 #![crate_type = "lib"]
 
-// EMIT_MIR casts.redundant.InstCombine.diff
+// EMIT_MIR casts.redundant.InstSimplify.diff
 // EMIT_MIR casts.redundant.PreCodegen.after.mir
 pub fn redundant<'a, 'b: 'a>(x: *const &'a u8) -> *const &'a u8 {
     generic_cast::<&'a u8, &'b u8>(x) as *const &'a u8
diff --git a/tests/mir-opt/combine_array_len.norm2.InstCombine.diff b/tests/mir-opt/combine_array_len.norm2.InstSimplify.diff
index c73150f947d..0777007cefa 100644
--- a/tests/mir-opt/combine_array_len.norm2.InstCombine.diff
+++ b/tests/mir-opt/combine_array_len.norm2.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `norm2` before InstCombine
-+ // MIR for `norm2` after InstCombine
+- // MIR for `norm2` before InstSimplify
++ // MIR for `norm2` after InstSimplify
   
   fn norm2(_1: [f32; 2]) -> f32 {
       debug x => _1;                       // in scope 0 at $DIR/combine_array_len.rs:+0:10: +0:11
diff --git a/tests/mir-opt/combine_array_len.rs b/tests/mir-opt/combine_array_len.rs
index 08c5f1a1fc5..970cafafcf0 100644
--- a/tests/mir-opt/combine_array_len.rs
+++ b/tests/mir-opt/combine_array_len.rs
@@ -1,6 +1,6 @@
 // ignore-wasm32 compiled with panic=abort by default
-// unit-test: InstCombine
-// EMIT_MIR combine_array_len.norm2.InstCombine.diff
+// unit-test: InstSimplify
+// EMIT_MIR combine_array_len.norm2.InstSimplify.diff
 
 fn norm2(x: [f32; 2]) -> f32 {
     let a = x[0];
diff --git a/tests/mir-opt/combine_clone_of_primitives.rs b/tests/mir-opt/combine_clone_of_primitives.rs
index 7cc50a86e21..1deee9dd6d2 100644
--- a/tests/mir-opt/combine_clone_of_primitives.rs
+++ b/tests/mir-opt/combine_clone_of_primitives.rs
@@ -1,7 +1,7 @@
-// unit-test: InstCombine
+// unit-test: InstSimplify
 // ignore-wasm32 compiled with panic=abort by default
 
-// EMIT_MIR combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff
+// EMIT_MIR combine_clone_of_primitives.{impl#0}-clone.InstSimplify.diff
 
 #[derive(Clone)]
 struct MyThing<T> {
diff --git a/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff b/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.diff
index b715a544ffe..bb0811a7abb 100644
--- a/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstCombine.diff
+++ b/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` before InstCombine
-+ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` after InstCombine
+- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` before InstSimplify
++ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone` after InstSimplify
   
   fn <impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
       debug self => _1;                    // in scope 0 at $DIR/combine_clone_of_primitives.rs:+0:10: +0:15
diff --git a/tests/mir-opt/combine_transmutes.adt_transmutes.InstCombine.diff b/tests/mir-opt/combine_transmutes.adt_transmutes.InstSimplify.diff
index 168e8c61031..c5907e7cf18 100644
--- a/tests/mir-opt/combine_transmutes.adt_transmutes.InstCombine.diff
+++ b/tests/mir-opt/combine_transmutes.adt_transmutes.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `adt_transmutes` before InstCombine
-+ // MIR for `adt_transmutes` after InstCombine
+- // MIR for `adt_transmutes` before InstSimplify
++ // MIR for `adt_transmutes` after InstSimplify
   
   fn adt_transmutes() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/combine_transmutes.rs:+0:32: +0:32
diff --git a/tests/mir-opt/combine_transmutes.identity_transmutes.InstCombine.diff b/tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff
index ae1185c7f71..57d9f4b1402 100644
--- a/tests/mir-opt/combine_transmutes.identity_transmutes.InstCombine.diff
+++ b/tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `identity_transmutes` before InstCombine
-+ // MIR for `identity_transmutes` after InstCombine
+- // MIR for `identity_transmutes` before InstSimplify
++ // MIR for `identity_transmutes` after InstSimplify
   
   fn identity_transmutes() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/combine_transmutes.rs:+0:37: +0:37
diff --git a/tests/mir-opt/combine_transmutes.integer_transmutes.InstCombine.diff b/tests/mir-opt/combine_transmutes.integer_transmutes.InstSimplify.diff
index 8de7c34e6b2..ec7c982c151 100644
--- a/tests/mir-opt/combine_transmutes.integer_transmutes.InstCombine.diff
+++ b/tests/mir-opt/combine_transmutes.integer_transmutes.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `integer_transmutes` before InstCombine
-+ // MIR for `integer_transmutes` after InstCombine
+- // MIR for `integer_transmutes` before InstSimplify
++ // MIR for `integer_transmutes` after InstSimplify
   
   fn integer_transmutes() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/combine_transmutes.rs:+0:36: +0:36
diff --git a/tests/mir-opt/combine_transmutes.rs b/tests/mir-opt/combine_transmutes.rs
index de9b9c35c03..7088488c1b8 100644
--- a/tests/mir-opt/combine_transmutes.rs
+++ b/tests/mir-opt/combine_transmutes.rs
@@ -1,4 +1,4 @@
-// unit-test: InstCombine
+// unit-test: InstSimplify
 // compile-flags: -C panic=abort
 
 #![crate_type = "lib"]
@@ -8,7 +8,7 @@
 use std::intrinsics::mir::*;
 use std::mem::{MaybeUninit, ManuallyDrop, transmute};
 
-// EMIT_MIR combine_transmutes.identity_transmutes.InstCombine.diff
+// EMIT_MIR combine_transmutes.identity_transmutes.InstSimplify.diff
 pub unsafe fn identity_transmutes() {
     // These are nops and should be removed
     let _a = transmute::<i32, i32>(1);
@@ -16,7 +16,7 @@ pub unsafe fn identity_transmutes() {
 }
 
 #[custom_mir(dialect = "runtime", phase = "initial")]
-// EMIT_MIR combine_transmutes.integer_transmutes.InstCombine.diff
+// EMIT_MIR combine_transmutes.integer_transmutes.InstSimplify.diff
 pub unsafe fn integer_transmutes() {
     mir! {
         {
@@ -30,7 +30,7 @@ pub unsafe fn integer_transmutes() {
     }
 }
 
-// EMIT_MIR combine_transmutes.adt_transmutes.InstCombine.diff
+// EMIT_MIR combine_transmutes.adt_transmutes.InstSimplify.diff
 pub unsafe fn adt_transmutes() {
     let _a: u8 = transmute(EnumNoRepr::A);
     let _a: i8 = transmute(EnumNoRepr::B);
diff --git a/tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir b/tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir
index 9b69f79c28e..169e99deee7 100644
--- a/tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir
+++ b/tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir
@@ -21,42 +21,42 @@ fn main() -> () {
 }
 
 alloc1 (static: FOO, size: 8, align: 4) {
-    ╾─alloc18─╼ 03 00 00 00                         │ ╾──╼....
+    ╾─alloc19─╼ 03 00 00 00                         │ ╾──╼....
 }
 
-alloc18 (size: 48, align: 4) {
-    0x00 │ 00 00 00 00 __ __ __ __ ╾─alloc5──╼ 00 00 00 00 │ ....░░░░╾──╼....
-    0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc8──╼ 02 00 00 00 │ ....░░░░╾──╼....
-    0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc13─╼ 03 00 00 00 │ ....*...╾──╼....
+alloc19 (size: 48, align: 4) {
+    0x00 │ 00 00 00 00 __ __ __ __ ╾─alloc6──╼ 00 00 00 00 │ ....░░░░╾──╼....
+    0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc9──╼ 02 00 00 00 │ ....░░░░╾──╼....
+    0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc14─╼ 03 00 00 00 │ ....*...╾──╼....
 }
 
-alloc5 (size: 0, align: 4) {}
+alloc6 (size: 0, align: 4) {}
 
-alloc8 (size: 16, align: 4) {
-    ╾─alloc9──╼ 03 00 00 00 ╾─alloc10─╼ 03 00 00 00 │ ╾──╼....╾──╼....
+alloc9 (size: 16, align: 4) {
+    ╾─alloc10─╼ 03 00 00 00 ╾─alloc11─╼ 03 00 00 00 │ ╾──╼....╾──╼....
 }
 
-alloc9 (size: 3, align: 1) {
+alloc10 (size: 3, align: 1) {
     66 6f 6f                                        │ foo
 }
 
-alloc10 (size: 3, align: 1) {
+alloc11 (size: 3, align: 1) {
     62 61 72                                        │ bar
 }
 
-alloc13 (size: 24, align: 4) {
-    0x00 │ ╾─alloc14─╼ 03 00 00 00 ╾─alloc15─╼ 03 00 00 00 │ ╾──╼....╾──╼....
-    0x10 │ ╾─alloc16─╼ 04 00 00 00                         │ ╾──╼....
+alloc14 (size: 24, align: 4) {
+    0x00 │ ╾─alloc15─╼ 03 00 00 00 ╾─alloc16─╼ 03 00 00 00 │ ╾──╼....╾──╼....
+    0x10 │ ╾─alloc17─╼ 04 00 00 00                         │ ╾──╼....
 }
 
-alloc14 (size: 3, align: 1) {
+alloc15 (size: 3, align: 1) {
     6d 65 68                                        │ meh
 }
 
-alloc15 (size: 3, align: 1) {
+alloc16 (size: 3, align: 1) {
     6d 6f 70                                        │ mop
 }
 
-alloc16 (size: 4, align: 1) {
+alloc17 (size: 4, align: 1) {
     6d c3 b6 70                                     │ m..p
 }
diff --git a/tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir b/tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir
index d0f196e7245..db1f9648843 100644
--- a/tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir
+++ b/tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir
@@ -21,46 +21,46 @@ fn main() -> () {
 }
 
 alloc1 (static: FOO, size: 16, align: 8) {
-    ╾───────alloc18───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+    ╾───────alloc19───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
 }
 
-alloc18 (size: 72, align: 8) {
-    0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc5────────╼ │ ....░░░░╾──────╼
+alloc19 (size: 72, align: 8) {
+    0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc6────────╼ │ ....░░░░╾──────╼
     0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
-    0x20 │ ╾───────alloc8────────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
-    0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc13───────╼ │ ....*...╾──────╼
+    0x20 │ ╾───────alloc9────────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
+    0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc14───────╼ │ ....*...╾──────╼
     0x40 │ 03 00 00 00 00 00 00 00                         │ ........
 }
 
-alloc5 (size: 0, align: 8) {}
+alloc6 (size: 0, align: 8) {}
 
-alloc8 (size: 32, align: 8) {
-    0x00 │ ╾───────alloc9────────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
-    0x10 │ ╾───────alloc10───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+alloc9 (size: 32, align: 8) {
+    0x00 │ ╾───────alloc10───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+    0x10 │ ╾───────alloc11───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
 }
 
-alloc9 (size: 3, align: 1) {
+alloc10 (size: 3, align: 1) {
     66 6f 6f                                        │ foo
 }
 
-alloc10 (size: 3, align: 1) {
+alloc11 (size: 3, align: 1) {
     62 61 72                                        │ bar
 }
 
-alloc13 (size: 48, align: 8) {
-    0x00 │ ╾───────alloc14───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
-    0x10 │ ╾───────alloc15───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
-    0x20 │ ╾───────alloc16───────╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
+alloc14 (size: 48, align: 8) {
+    0x00 │ ╾───────alloc15───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+    0x10 │ ╾───────alloc16───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+    0x20 │ ╾───────alloc17───────╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
 }
 
-alloc14 (size: 3, align: 1) {
+alloc15 (size: 3, align: 1) {
     6d 65 68                                        │ meh
 }
 
-alloc15 (size: 3, align: 1) {
+alloc16 (size: 3, align: 1) {
     6d 6f 70                                        │ mop
 }
 
-alloc16 (size: 4, align: 1) {
+alloc17 (size: 4, align: 1) {
     6d c3 b6 70                                     │ m..p
 }
diff --git a/tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir b/tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir
index aab005c52d6..999acb48afe 100644
--- a/tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir
+++ b/tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir
@@ -21,41 +21,41 @@ fn main() -> () {
 }
 
 alloc1 (static: FOO, size: 8, align: 4) {
-    ╾─alloc22─╼ 03 00 00 00                         │ ╾──╼....
+    ╾─alloc23─╼ 03 00 00 00                         │ ╾──╼....
 }
 
-alloc22 (size: 48, align: 4) {
-    0x00 │ 00 00 00 00 __ __ __ __ ╾─alloc9──╼ 00 00 00 00 │ ....░░░░╾──╼....
-    0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc14─╼ 02 00 00 00 │ ....░░░░╾──╼....
-    0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc20─╼ 03 00 00 00 │ ....*...╾──╼....
+alloc23 (size: 48, align: 4) {
+    0x00 │ 00 00 00 00 __ __ __ __ ╾─alloc10─╼ 00 00 00 00 │ ....░░░░╾──╼....
+    0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc15─╼ 02 00 00 00 │ ....░░░░╾──╼....
+    0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc21─╼ 03 00 00 00 │ ....*...╾──╼....
 }
 
-alloc9 (size: 0, align: 4) {}
+alloc10 (size: 0, align: 4) {}
 
-alloc14 (size: 8, align: 4) {
-    ╾─alloc12─╼ ╾─alloc13─╼                         │ ╾──╼╾──╼
+alloc15 (size: 8, align: 4) {
+    ╾─alloc13─╼ ╾─alloc14─╼                         │ ╾──╼╾──╼
 }
 
-alloc12 (size: 1, align: 1) {
+alloc13 (size: 1, align: 1) {
     05                                              │ .
 }
 
-alloc13 (size: 1, align: 1) {
+alloc14 (size: 1, align: 1) {
     06                                              │ .
 }
 
-alloc20 (size: 12, align: 4) {
-    ╾─a17+0x3─╼ ╾─alloc18─╼ ╾─a19+0x2─╼             │ ╾──╼╾──╼╾──╼
+alloc21 (size: 12, align: 4) {
+    ╾─a18+0x3─╼ ╾─alloc19─╼ ╾─a20+0x2─╼             │ ╾──╼╾──╼╾──╼
 }
 
-alloc17 (size: 4, align: 1) {
+alloc18 (size: 4, align: 1) {
     2a 45 15 6f                                     │ *E.o
 }
 
-alloc18 (size: 1, align: 1) {
+alloc19 (size: 1, align: 1) {
     2a                                              │ *
 }
 
-alloc19 (size: 4, align: 1) {
+alloc20 (size: 4, align: 1) {
     2a 45 15 6f                                     │ *E.o
 }
diff --git a/tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir b/tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir
index 0eff9474c20..30311890eee 100644
--- a/tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir
+++ b/tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir
@@ -21,44 +21,44 @@ fn main() -> () {
 }
 
 alloc1 (static: FOO, size: 16, align: 8) {
-    ╾───────alloc22───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+    ╾───────alloc23───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
 }
 
-alloc22 (size: 72, align: 8) {
-    0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc9────────╼ │ ....░░░░╾──────╼
+alloc23 (size: 72, align: 8) {
+    0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc10───────╼ │ ....░░░░╾──────╼
     0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
-    0x20 │ ╾───────alloc14───────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
-    0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc20───────╼ │ ....*...╾──────╼
+    0x20 │ ╾───────alloc15───────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
+    0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc21───────╼ │ ....*...╾──────╼
     0x40 │ 03 00 00 00 00 00 00 00                         │ ........
 }
 
-alloc9 (size: 0, align: 8) {}
+alloc10 (size: 0, align: 8) {}
 
-alloc14 (size: 16, align: 8) {
-    ╾───────alloc12───────╼ ╾───────alloc13───────╼ │ ╾──────╼╾──────╼
+alloc15 (size: 16, align: 8) {
+    ╾───────alloc13───────╼ ╾───────alloc14───────╼ │ ╾──────╼╾──────╼
 }
 
-alloc12 (size: 1, align: 1) {
+alloc13 (size: 1, align: 1) {
     05                                              │ .
 }
 
-alloc13 (size: 1, align: 1) {
+alloc14 (size: 1, align: 1) {
     06                                              │ .
 }
 
-alloc20 (size: 24, align: 8) {
-    0x00 │ ╾─────alloc17+0x3─────╼ ╾───────alloc18───────╼ │ ╾──────╼╾──────╼
-    0x10 │ ╾─────alloc19+0x2─────╼                         │ ╾──────╼
+alloc21 (size: 24, align: 8) {
+    0x00 │ ╾─────alloc18+0x3─────╼ ╾───────alloc19───────╼ │ ╾──────╼╾──────╼
+    0x10 │ ╾─────alloc20+0x2─────╼                         │ ╾──────╼
 }
 
-alloc17 (size: 4, align: 1) {
+alloc18 (size: 4, align: 1) {
     2a 45 15 6f                                     │ *E.o
 }
 
-alloc18 (size: 1, align: 1) {
+alloc19 (size: 1, align: 1) {
     2a                                              │ *
 }
 
-alloc19 (size: 4, align: 1) {
+alloc20 (size: 4, align: 1) {
     2a 45 15 6f                                     │ *E.o
 }
diff --git a/tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir b/tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir
index 55c6db5d0ce..d592e59fafd 100644
--- a/tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir
+++ b/tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir
@@ -21,30 +21,30 @@ fn main() -> () {
 }
 
 alloc1 (static: FOO, size: 4, align: 4) {
-    ╾─alloc11─╼                                     │ ╾──╼
+    ╾─alloc12─╼                                     │ ╾──╼
 }
 
-alloc11 (size: 168, align: 1) {
+alloc12 (size: 168, align: 1) {
     0x00 │ ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab │ ................
-    0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾─alloc6──╼ │ ............╾──╼
+    0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾─alloc7──╼ │ ............╾──╼
     0x20 │ 01 ef cd ab 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x30 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x40 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x50 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x60 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x70 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
-    0x80 │ 00 00 00 00 00 00 00 00 00 00 ╾─alloc8──╼ 00 00 │ ..........╾──╼..
-    0x90 │ ╾─a9+0x63─╼ 00 00 00 00 00 00 00 00 00 00 00 00 │ ╾──╼............
+    0x80 │ 00 00 00 00 00 00 00 00 00 00 ╾─alloc9──╼ 00 00 │ ..........╾──╼..
+    0x90 │ ╾a10+0x63─╼ 00 00 00 00 00 00 00 00 00 00 00 00 │ ╾──╼............
     0xa0 │ 00 00 00 00 00 00 00 00                         │ ........
 }
 
-alloc6 (size: 4, align: 4) {
+alloc7 (size: 4, align: 4) {
     2a 00 00 00                                     │ *...
 }
 
-alloc8 (fn: main)
+alloc9 (fn: main)
 
-alloc9 (size: 100, align: 1) {
+alloc10 (size: 100, align: 1) {
     0x00 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x20 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
diff --git a/tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir b/tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir
index 27492a7fd22..ca53b28be7c 100644
--- a/tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir
+++ b/tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir
@@ -21,12 +21,12 @@ fn main() -> () {
 }
 
 alloc1 (static: FOO, size: 8, align: 8) {
-    ╾───────alloc11───────╼                         │ ╾──────╼
+    ╾───────alloc12───────╼                         │ ╾──────╼
 }
 
-alloc11 (size: 180, align: 1) {
+alloc12 (size: 180, align: 1) {
     0x00 │ ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab ab │ ................
-    0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾──alloc6── │ ............╾───
+    0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾──alloc7── │ ............╾───
     0x20 │ ──────────╼ 01 ef cd ab 00 00 00 00 00 00 00 00 │ ───╼............
     0x30 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x40 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
@@ -34,18 +34,18 @@ alloc11 (size: 180, align: 1) {
     0x60 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x70 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x80 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ╾──── │ ..............╾─
-    0x90 │ ─────alloc8─────╼ 00 00 ╾─────alloc9+0x63─────╼ │ ─────╼..╾──────╼
+    0x90 │ ─────alloc9─────╼ 00 00 ╾────alloc10+0x63─────╼ │ ─────╼..╾──────╼
     0xa0 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0xb0 │ 00 00 00 00                                     │ ....
 }
 
-alloc6 (size: 4, align: 4) {
+alloc7 (size: 4, align: 4) {
     2a 00 00 00                                     │ *...
 }
 
-alloc8 (fn: main)
+alloc9 (fn: main)
 
-alloc9 (size: 100, align: 1) {
+alloc10 (size: 100, align: 1) {
     0x00 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0x20 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
diff --git a/tests/mir-opt/const_prop/address_of_pair.fn0.ConstProp.diff b/tests/mir-opt/const_prop/address_of_pair.fn0.ConstProp.diff
new file mode 100644
index 00000000000..d50b12044ce
--- /dev/null
+++ b/tests/mir-opt/const_prop/address_of_pair.fn0.ConstProp.diff
@@ -0,0 +1,46 @@
+- // MIR for `fn0` before ConstProp
++ // MIR for `fn0` after ConstProp
+  
+  fn fn0() -> bool {
+      let mut _0: bool;                    // return place in scope 0 at $DIR/address_of_pair.rs:+0:17: +0:21
+      let mut _1: !;                       // in scope 0 at $DIR/address_of_pair.rs:+0:22: +9:2
+      let mut _2: (i32, bool);             // in scope 0 at $DIR/address_of_pair.rs:+1:9: +1:17
+      let _4: ();                          // in scope 0 at $DIR/address_of_pair.rs:+4:5: +6:6
+      let mut _6: bool;                    // in scope 0 at $DIR/address_of_pair.rs:+7:16: +7:22
+      scope 1 {
+          debug pair => _2;                // in scope 1 at $DIR/address_of_pair.rs:+1:9: +1:17
+          let _3: *mut bool;               // in scope 1 at $DIR/address_of_pair.rs:+2:9: +2:12
+          scope 2 {
+              debug ptr => _3;             // in scope 2 at $DIR/address_of_pair.rs:+2:9: +2:12
+              let _5: bool;                // in scope 2 at $DIR/address_of_pair.rs:+7:9: +7:12
+              scope 3 {
+              }
+              scope 4 {
+                  debug ret => _5;         // in scope 4 at $DIR/address_of_pair.rs:+7:9: +7:12
+              }
+          }
+      }
+  
+      bb0: {
+          StorageLive(_2);                 // scope 0 at $DIR/address_of_pair.rs:+1:9: +1:17
+          _2 = (const 1_i32, const false); // scope 0 at $DIR/address_of_pair.rs:+1:20: +1:30
+          StorageLive(_3);                 // scope 1 at $DIR/address_of_pair.rs:+2:9: +2:12
+          _3 = &raw mut (_2.1: bool);      // scope 1 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+          _2 = (const 1_i32, const false); // scope 2 at $DIR/address_of_pair.rs:+3:5: +3:22
+          StorageLive(_4);                 // scope 2 at $DIR/address_of_pair.rs:+4:5: +6:6
+          (*_3) = const true;              // scope 3 at $DIR/address_of_pair.rs:+5:9: +5:20
+          _4 = const ();                   // scope 3 at $DIR/address_of_pair.rs:+4:5: +6:6
+          StorageDead(_4);                 // scope 2 at $DIR/address_of_pair.rs:+6:5: +6:6
+          StorageLive(_5);                 // scope 2 at $DIR/address_of_pair.rs:+7:9: +7:12
+          StorageLive(_6);                 // scope 2 at $DIR/address_of_pair.rs:+7:16: +7:22
+          _6 = (_2.1: bool);               // scope 2 at $DIR/address_of_pair.rs:+7:16: +7:22
+          _5 = Not(move _6);               // scope 2 at $DIR/address_of_pair.rs:+7:15: +7:22
+          StorageDead(_6);                 // scope 2 at $DIR/address_of_pair.rs:+7:21: +7:22
+          _0 = _5;                         // scope 4 at $DIR/address_of_pair.rs:+8:12: +8:15
+          StorageDead(_5);                 // scope 2 at $DIR/address_of_pair.rs:+9:1: +9:2
+          StorageDead(_3);                 // scope 1 at $DIR/address_of_pair.rs:+9:1: +9:2
+          StorageDead(_2);                 // scope 0 at $DIR/address_of_pair.rs:+9:1: +9:2
+          return;                          // scope 0 at $DIR/address_of_pair.rs:+9:2: +9:2
+      }
+  }
+  
diff --git a/tests/mir-opt/const_prop/address_of_pair.rs b/tests/mir-opt/const_prop/address_of_pair.rs
new file mode 100644
index 00000000000..43dc9bae625
--- /dev/null
+++ b/tests/mir-opt/const_prop/address_of_pair.rs
@@ -0,0 +1,17 @@
+// unit-test: ConstProp
+
+// EMIT_MIR address_of_pair.fn0.ConstProp.diff
+pub fn fn0() -> bool {
+    let mut pair = (1, false);
+    let ptr = core::ptr::addr_of_mut!(pair.1);
+    pair = (1, false);
+    unsafe {
+        *ptr = true;
+    }
+    let ret = !pair.1;
+    return ret;
+}
+
+pub fn main() {
+    println!("{}", fn0());
+}
diff --git a/tests/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff b/tests/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff
index bedfa5992ad..85d6b5e3d00 100644
--- a/tests/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/bad_op_mod_by_zero.main.ConstProp.diff
@@ -18,29 +18,35 @@
       }
   
       bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/bad_op_mod_by_zero.rs:+1:9: +1:10
           _1 = const 0_i32;                // scope 0 at $DIR/bad_op_mod_by_zero.rs:+1:13: +1:14
           StorageLive(_2);                 // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:9: +2:11
--         _4 = Eq(_1, const 0_i32);        // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
+          StorageLive(_3);                 // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:18: +2:19
+-         _3 = _1;                         // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:18: +2:19
+-         _4 = Eq(_3, const 0_i32);        // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
 -         assert(!move _4, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
++         _3 = const 0_i32;                // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:18: +2:19
 +         _4 = const true;                 // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
 +         assert(!const true, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_i32) -> bb1; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
       }
   
       bb1: {
--         _5 = Eq(_1, const -1_i32);       // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
+-         _5 = Eq(_3, const -1_i32);       // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
 -         _6 = Eq(const 1_i32, const i32::MIN); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
 -         _7 = BitAnd(move _5, move _6);   // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
--         assert(!move _7, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, _1) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
+-         assert(!move _7, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, _3) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
 +         _5 = const false;                // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
 +         _6 = const false;                // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
 +         _7 = const false;                // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
-+         assert(!const false, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, const 0_i32) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
++         assert(!const false, "attempt to compute the remainder of `{} % {}`, which would overflow", const 1_i32, _3) -> bb2; // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
       }
   
       bb2: {
--         _2 = Rem(const 1_i32, _1);       // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
-+         _2 = Rem(const 1_i32, const 0_i32); // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
+          _2 = Rem(const 1_i32, move _3);  // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:14: +2:19
+          StorageDead(_3);                 // scope 1 at $DIR/bad_op_mod_by_zero.rs:+2:18: +2:19
+          _0 = const ();                   // scope 0 at $DIR/bad_op_mod_by_zero.rs:+0:11: +3:2
           StorageDead(_2);                 // scope 1 at $DIR/bad_op_mod_by_zero.rs:+3:1: +3:2
+          StorageDead(_1);                 // scope 0 at $DIR/bad_op_mod_by_zero.rs:+3:1: +3:2
           return;                          // scope 0 at $DIR/bad_op_mod_by_zero.rs:+3:2: +3:2
       }
   }
diff --git a/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs b/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs
index a1078472cbf..93d558250ea 100644
--- a/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs
+++ b/tests/mir-opt/const_prop/bad_op_mod_by_zero.rs
@@ -1,3 +1,4 @@
+// unit-test: ConstProp
 // ignore-wasm32 compiled with panic=abort by default
 // EMIT_MIR bad_op_mod_by_zero.main.ConstProp.diff
 #[allow(unconditional_panic)]
diff --git a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.32bit.diff b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.32bit.diff
index e711babf035..d72675c2d11 100644
--- a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.32bit.diff
+++ b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.32bit.diff
@@ -6,16 +6,17 @@
       let _1: *const [i32];                // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
       let mut _2: *const [i32; 3];         // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
       let _3: &[i32; 3];                   // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
-      let _5: usize;                       // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
-      let mut _6: usize;                   // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
-      let mut _7: bool;                    // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
-      let mut _8: &[i32; 3];               // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
+      let _4: [i32; 3];                    // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:26: +1:35
+      let _6: usize;                       // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
+      let mut _7: usize;                   // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+      let mut _8: bool;                    // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+      let mut _9: &[i32; 3];               // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
       scope 1 {
           debug a => _1;                   // in scope 1 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
           scope 2 {
-              let _4: i32;                 // in scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
+              let _5: i32;                 // in scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
               scope 3 {
-                  debug _b => _4;          // in scope 3 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
+                  debug _b => _5;          // in scope 3 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
               }
           }
       }
@@ -23,27 +24,32 @@
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
           StorageLive(_2);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
-          _8 = const _;                    // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
+          StorageLive(_3);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
+          _9 = const _;                    // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
                                            // mir::Constant
-                                           // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:6:25: 6:35
+                                           // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:9:25: 9:35
                                            // + literal: Const { ty: &[i32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
-          _2 = &raw const (*_8);           // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
+          _3 = &(*_9);                     // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
+          _2 = &raw const (*_3);           // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
           _1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
           StorageDead(_2);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:34: +1:35
-          StorageLive(_4);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
-          StorageLive(_5);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
-          _5 = const 3_usize;              // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
-          _6 = const 3_usize;              // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
--         _7 = Lt(_5, _6);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
--         assert(move _7, "index out of bounds: the length is {} but the index is {}", move _6, _5) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
-+         _7 = const false;                // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
-+         assert(const false, "index out of bounds: the length is {} but the index is {}", const 3_usize, const 3_usize) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+          StorageDead(_3);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:35: +1:36
+          StorageLive(_5);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
+          StorageLive(_6);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
+          _6 = const 3_usize;              // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
+          _7 = const 3_usize;              // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+-         _8 = Lt(_6, _7);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+-         assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
++         _8 = const false;                // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
++         assert(const false, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
       }
   
       bb1: {
-          _4 = (*_1)[_5];                  // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
-          StorageDead(_5);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:25: +3:26
-          StorageDead(_4);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+4:5: +4:6
+-         _5 = (*_1)[_6];                  // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
++         _5 = (*_1)[3 of 4];              // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+          StorageDead(_6);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:25: +3:26
+          _0 = const ();                   // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+2:5: +4:6
+          StorageDead(_5);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+4:5: +4:6
           StorageDead(_1);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+5:1: +5:2
           return;                          // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+5:2: +5:2
       }
diff --git a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.64bit.diff b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.64bit.diff
index e711babf035..d72675c2d11 100644
--- a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.64bit.diff
+++ b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.main.ConstProp.64bit.diff
@@ -6,16 +6,17 @@
       let _1: *const [i32];                // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
       let mut _2: *const [i32; 3];         // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
       let _3: &[i32; 3];                   // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
-      let _5: usize;                       // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
-      let mut _6: usize;                   // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
-      let mut _7: bool;                    // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
-      let mut _8: &[i32; 3];               // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
+      let _4: [i32; 3];                    // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:26: +1:35
+      let _6: usize;                       // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
+      let mut _7: usize;                   // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+      let mut _8: bool;                    // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+      let mut _9: &[i32; 3];               // in scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
       scope 1 {
           debug a => _1;                   // in scope 1 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
           scope 2 {
-              let _4: i32;                 // in scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
+              let _5: i32;                 // in scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
               scope 3 {
-                  debug _b => _4;          // in scope 3 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
+                  debug _b => _5;          // in scope 3 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
               }
           }
       }
@@ -23,27 +24,32 @@
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:9: +1:10
           StorageLive(_2);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
-          _8 = const _;                    // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
+          StorageLive(_3);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
+          _9 = const _;                    // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
                                            // mir::Constant
-                                           // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:6:25: 6:35
+                                           // + span: $DIR/bad_op_unsafe_oob_for_slices.rs:9:25: 9:35
                                            // + literal: Const { ty: &[i32; 3], val: Unevaluated(main, [], Some(promoted[0])) }
-          _2 = &raw const (*_8);           // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
+          _3 = &(*_9);                     // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
+          _2 = &raw const (*_3);           // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
           _1 = move _2 as *const [i32] (Pointer(Unsize)); // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:25: +1:35
           StorageDead(_2);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:34: +1:35
-          StorageLive(_4);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
-          StorageLive(_5);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
-          _5 = const 3_usize;              // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
-          _6 = const 3_usize;              // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
--         _7 = Lt(_5, _6);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
--         assert(move _7, "index out of bounds: the length is {} but the index is {}", move _6, _5) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
-+         _7 = const false;                // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
-+         assert(const false, "index out of bounds: the length is {} but the index is {}", const 3_usize, const 3_usize) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+          StorageDead(_3);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+1:35: +1:36
+          StorageLive(_5);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:13: +3:15
+          StorageLive(_6);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
+          _6 = const 3_usize;              // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:23: +3:24
+          _7 = const 3_usize;              // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+-         _8 = Lt(_6, _7);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+-         assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
++         _8 = const false;                // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
++         assert(const false, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> bb1; // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
       }
   
       bb1: {
-          _4 = (*_1)[_5];                  // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
-          StorageDead(_5);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:25: +3:26
-          StorageDead(_4);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+4:5: +4:6
+-         _5 = (*_1)[_6];                  // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
++         _5 = (*_1)[3 of 4];              // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:18: +3:25
+          StorageDead(_6);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+3:25: +3:26
+          _0 = const ();                   // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+2:5: +4:6
+          StorageDead(_5);                 // scope 2 at $DIR/bad_op_unsafe_oob_for_slices.rs:+4:5: +4:6
           StorageDead(_1);                 // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+5:1: +5:2
           return;                          // scope 0 at $DIR/bad_op_unsafe_oob_for_slices.rs:+5:2: +5:2
       }
diff --git a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
index 3d252f2d221..ef148d16dc2 100644
--- a/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
+++ b/tests/mir-opt/const_prop/bad_op_unsafe_oob_for_slices.rs
@@ -1,4 +1,7 @@
+// unit-test: ConstProp
 // ignore-wasm32 compiled with panic=abort by default
+// compile-flags: -Zmir-enable-passes=+NormalizeArrayLen
+
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 // EMIT_MIR bad_op_unsafe_oob_for_slices.main.ConstProp.diff
 #[allow(unconditional_panic)]
diff --git a/tests/mir-opt/const_prop/invalid_constant.main.ConstProp.diff b/tests/mir-opt/const_prop/invalid_constant.main.ConstProp.diff
index 85dedf68ce9..1752d222fe7 100644
--- a/tests/mir-opt/const_prop/invalid_constant.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/invalid_constant.main.ConstProp.diff
@@ -7,13 +7,17 @@
       let mut _2: main::InvalidChar;       // in scope 0 at $DIR/invalid_constant.rs:+6:34: +6:63
       let mut _4: E;                       // in scope 0 at $DIR/invalid_constant.rs:+13:25: +13:59
       let mut _5: main::InvalidTag;        // in scope 0 at $DIR/invalid_constant.rs:+13:34: +13:55
+      let mut _7: Empty;                   // in scope 0 at $DIR/invalid_constant.rs:+20:35: +20:73
+      let mut _8: main::NoVariants;        // in scope 0 at $DIR/invalid_constant.rs:+20:44: +20:65
       scope 1 {
           debug _invalid_char => _1;       // in scope 1 at $DIR/invalid_constant.rs:+6:9: +6:22
           let _3: [E; 1];                  // in scope 1 at $DIR/invalid_constant.rs:+13:9: +13:21
           scope 3 {
               debug _invalid_tag => _3;    // in scope 3 at $DIR/invalid_constant.rs:+13:9: +13:21
+              let _6: [Empty; 1];          // in scope 3 at $DIR/invalid_constant.rs:+20:9: +20:31
               scope 5 {
                   debug _enum_without_variants => const [ZeroSized: Empty]; // in scope 5 at $DIR/invalid_constant.rs:+20:9: +20:31
+                  let _9: main::Str<"���">; // in scope 5 at $DIR/invalid_constant.rs:+24:9: +24:22
                   scope 7 {
                       debug _non_utf8_str => const Str::<"���">; // in scope 7 at $DIR/invalid_constant.rs:+24:9: +24:22
                   }
@@ -39,17 +43,25 @@
           StorageLive(_5);                 // scope 4 at $DIR/invalid_constant.rs:+13:34: +13:55
           _5 = InvalidTag { int: const 4_u32 }; // scope 4 at $DIR/invalid_constant.rs:+13:34: +13:55
 -         _4 = (_5.1: E);                  // scope 4 at $DIR/invalid_constant.rs:+13:34: +13:57
--         _3 = [move _4];                  // scope 1 at $DIR/invalid_constant.rs:+13:24: +13:60
 +         _4 = const Scalar(0x00000004): E; // scope 4 at $DIR/invalid_constant.rs:+13:34: +13:57
 +                                          // mir::Constant
 +                                          // + span: no-location
 +                                          // + literal: Const { ty: E, val: Value(Scalar(0x00000004)) }
-+         _3 = [const Scalar(0x00000004): E]; // scope 1 at $DIR/invalid_constant.rs:+13:24: +13:60
-+                                          // mir::Constant
-+                                          // + span: no-location
-+                                          // + literal: Const { ty: E, val: Value(Scalar(0x00000004)) }
+          _3 = [move _4];                  // scope 1 at $DIR/invalid_constant.rs:+13:24: +13:60
           StorageDead(_4);                 // scope 1 at $DIR/invalid_constant.rs:+13:59: +13:60
           StorageDead(_5);                 // scope 1 at $DIR/invalid_constant.rs:+13:60: +13:61
+          nop;                             // scope 3 at $DIR/invalid_constant.rs:+20:9: +20:31
+          nop;                             // scope 3 at $DIR/invalid_constant.rs:+20:35: +20:73
+          StorageLive(_8);                 // scope 6 at $DIR/invalid_constant.rs:+20:44: +20:65
+          _8 = NoVariants { int: const 0_u32 }; // scope 6 at $DIR/invalid_constant.rs:+20:44: +20:65
+          nop;                             // scope 6 at $DIR/invalid_constant.rs:+20:44: +20:71
+          nop;                             // scope 3 at $DIR/invalid_constant.rs:+20:34: +20:74
+          nop;                             // scope 3 at $DIR/invalid_constant.rs:+20:73: +20:74
+          StorageDead(_8);                 // scope 3 at $DIR/invalid_constant.rs:+20:74: +20:75
+          nop;                             // scope 5 at $DIR/invalid_constant.rs:+24:9: +24:22
+          nop;                             // scope 0 at $DIR/invalid_constant.rs:+0:11: +27:2
+          nop;                             // scope 5 at $DIR/invalid_constant.rs:+27:1: +27:2
+          nop;                             // scope 3 at $DIR/invalid_constant.rs:+27:1: +27:2
           StorageDead(_3);                 // scope 1 at $DIR/invalid_constant.rs:+27:1: +27:2
           StorageDead(_1);                 // scope 0 at $DIR/invalid_constant.rs:+27:1: +27:2
           return;                          // scope 0 at $DIR/invalid_constant.rs:+27:2: +27:2
diff --git a/tests/mir-opt/const_prop/invalid_constant.rs b/tests/mir-opt/const_prop/invalid_constant.rs
index eb6172cdff9..bdbc5a1990e 100644
--- a/tests/mir-opt/const_prop/invalid_constant.rs
+++ b/tests/mir-opt/const_prop/invalid_constant.rs
@@ -1,3 +1,5 @@
+// unit-test: ConstProp
+// compile-flags: -Zmir-enable-passes=+RemoveZsts
 // Verify that we can pretty print invalid constants.
 
 #![feature(adt_const_params)]
diff --git a/tests/mir-opt/const_prop/large_array_index.main.ConstProp.32bit.diff b/tests/mir-opt/const_prop/large_array_index.main.ConstProp.32bit.diff
index 5331e5b8212..33bbad2f422 100644
--- a/tests/mir-opt/const_prop/large_array_index.main.ConstProp.32bit.diff
+++ b/tests/mir-opt/const_prop/large_array_index.main.ConstProp.32bit.diff
@@ -18,17 +18,20 @@
           _2 = [const 0_u8; 5000];         // scope 0 at $DIR/large_array_index.rs:+2:17: +2:29
           StorageLive(_3);                 // scope 0 at $DIR/large_array_index.rs:+2:30: +2:31
           _3 = const 2_usize;              // scope 0 at $DIR/large_array_index.rs:+2:30: +2:31
-          _4 = const 5000_usize;           // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
+-         _4 = Len(_2);                    // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
 -         _5 = Lt(_3, _4);                 // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
 -         assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
++         _4 = const 5000_usize;           // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
 +         _5 = const true;                 // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
-+         assert(const true, "index out of bounds: the length is {} but the index is {}", const 5000_usize, const 2_usize) -> bb1; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
++         assert(const true, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
       }
   
       bb1: {
-          _1 = _2[_3];                     // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
+-         _1 = _2[_3];                     // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
++         _1 = _2[2 of 3];                 // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
           StorageDead(_3);                 // scope 0 at $DIR/large_array_index.rs:+2:32: +2:33
           StorageDead(_2);                 // scope 0 at $DIR/large_array_index.rs:+2:32: +2:33
+          _0 = const ();                   // scope 0 at $DIR/large_array_index.rs:+0:11: +3:2
           StorageDead(_1);                 // scope 0 at $DIR/large_array_index.rs:+3:1: +3:2
           return;                          // scope 0 at $DIR/large_array_index.rs:+3:2: +3:2
       }
diff --git a/tests/mir-opt/const_prop/large_array_index.main.ConstProp.64bit.diff b/tests/mir-opt/const_prop/large_array_index.main.ConstProp.64bit.diff
index 5331e5b8212..33bbad2f422 100644
--- a/tests/mir-opt/const_prop/large_array_index.main.ConstProp.64bit.diff
+++ b/tests/mir-opt/const_prop/large_array_index.main.ConstProp.64bit.diff
@@ -18,17 +18,20 @@
           _2 = [const 0_u8; 5000];         // scope 0 at $DIR/large_array_index.rs:+2:17: +2:29
           StorageLive(_3);                 // scope 0 at $DIR/large_array_index.rs:+2:30: +2:31
           _3 = const 2_usize;              // scope 0 at $DIR/large_array_index.rs:+2:30: +2:31
-          _4 = const 5000_usize;           // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
+-         _4 = Len(_2);                    // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
 -         _5 = Lt(_3, _4);                 // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
 -         assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
++         _4 = const 5000_usize;           // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
 +         _5 = const true;                 // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
-+         assert(const true, "index out of bounds: the length is {} but the index is {}", const 5000_usize, const 2_usize) -> bb1; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
++         assert(const true, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> bb1; // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
       }
   
       bb1: {
-          _1 = _2[_3];                     // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
+-         _1 = _2[_3];                     // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
++         _1 = _2[2 of 3];                 // scope 0 at $DIR/large_array_index.rs:+2:17: +2:32
           StorageDead(_3);                 // scope 0 at $DIR/large_array_index.rs:+2:32: +2:33
           StorageDead(_2);                 // scope 0 at $DIR/large_array_index.rs:+2:32: +2:33
+          _0 = const ();                   // scope 0 at $DIR/large_array_index.rs:+0:11: +3:2
           StorageDead(_1);                 // scope 0 at $DIR/large_array_index.rs:+3:1: +3:2
           return;                          // scope 0 at $DIR/large_array_index.rs:+3:2: +3:2
       }
diff --git a/tests/mir-opt/const_prop/large_array_index.rs b/tests/mir-opt/const_prop/large_array_index.rs
index 073f9849568..0876445bf2c 100644
--- a/tests/mir-opt/const_prop/large_array_index.rs
+++ b/tests/mir-opt/const_prop/large_array_index.rs
@@ -1,4 +1,6 @@
+// unit-test: ConstProp
 // ignore-wasm32 compiled with panic=abort by default
+// compile-flags: -Zmir-enable-passes=+NormalizeArrayLen
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
 // EMIT_MIR large_array_index.main.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/mult_by_zero.rs b/tests/mir-opt/const_prop/mult_by_zero.rs
index c839f92f2ce..7bd30975a73 100644
--- a/tests/mir-opt/const_prop/mult_by_zero.rs
+++ b/tests/mir-opt/const_prop/mult_by_zero.rs
@@ -1,5 +1,4 @@
-// unit-test
-// compile-flags: -O -Zmir-opt-level=4
+// unit-test: ConstProp
 
 // EMIT_MIR mult_by_zero.test.ConstProp.diff
 fn test(x : i32) -> i32 {
diff --git a/tests/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff b/tests/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff
index 1cfe47d0a86..629c8e60148 100644
--- a/tests/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff
+++ b/tests/mir-opt/const_prop/mult_by_zero.test.ConstProp.diff
@@ -7,8 +7,11 @@
       let mut _2: i32;                     // in scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:4
   
       bb0: {
--         _0 = Mul(_1, const 0_i32);       // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:8
+          StorageLive(_2);                 // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:4
+          _2 = _1;                         // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:4
+-         _0 = Mul(move _2, const 0_i32);  // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:8
 +         _0 = const 0_i32;                // scope 0 at $DIR/mult_by_zero.rs:+1:3: +1:8
+          StorageDead(_2);                 // scope 0 at $DIR/mult_by_zero.rs:+1:7: +1:8
           return;                          // scope 0 at $DIR/mult_by_zero.rs:+2:2: +2:2
       }
   }
diff --git a/tests/mir-opt/const_prop/mutable_variable.main.ConstProp.diff b/tests/mir-opt/const_prop/mutable_variable.main.ConstProp.diff
index a672c457a72..bd010e7b160 100644
--- a/tests/mir-opt/const_prop/mutable_variable.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/mutable_variable.main.ConstProp.diff
@@ -19,6 +19,7 @@
           StorageLive(_2);                 // scope 1 at $DIR/mutable_variable.rs:+3:9: +3:10
 -         _2 = _1;                         // scope 1 at $DIR/mutable_variable.rs:+3:13: +3:14
 +         _2 = const 99_i32;               // scope 1 at $DIR/mutable_variable.rs:+3:13: +3:14
+          _0 = const ();                   // scope 0 at $DIR/mutable_variable.rs:+0:11: +4:2
           StorageDead(_2);                 // scope 1 at $DIR/mutable_variable.rs:+4:1: +4:2
           StorageDead(_1);                 // scope 0 at $DIR/mutable_variable.rs:+4:1: +4:2
           return;                          // scope 0 at $DIR/mutable_variable.rs:+4:2: +4:2
diff --git a/tests/mir-opt/const_prop/mutable_variable.rs b/tests/mir-opt/const_prop/mutable_variable.rs
index cb01719dd77..95987ef7fa9 100644
--- a/tests/mir-opt/const_prop/mutable_variable.rs
+++ b/tests/mir-opt/const_prop/mutable_variable.rs
@@ -1,5 +1,4 @@
-// unit-test
-// compile-flags: -O
+// unit-test: ConstProp
 
 // EMIT_MIR mutable_variable.main.ConstProp.diff
 fn main() {
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff b/tests/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff
index d088c4f662b..539f6dd94b9 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff
@@ -3,27 +3,26 @@
   
   fn main() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/mutable_variable_aggregate.rs:+0:11: +0:11
-      let mut _3: i32;                     // in scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
-      let mut _4: i32;                     // in scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
+      let mut _1: (i32, i32);              // in scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
       scope 1 {
-          debug x => (i32, i32){ .0 => _3, .1 => _4, }; // in scope 1 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
-          let _1: i32;                     // in scope 1 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
-          let _2: i32;                     // in scope 1 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
+          debug x => _1;                   // in scope 1 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
+          let _2: (i32, i32);              // in scope 1 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
           scope 2 {
-              debug y => (i32, i32){ .0 => _3, .1 => _2, }; // in scope 2 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
+              debug y => _2;               // in scope 2 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
           }
       }
   
       bb0: {
-          StorageLive(_4);                 // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
-          _3 = const 42_i32;               // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:17: +1:25
-          _4 = const 43_i32;               // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:17: +1:25
-          _4 = const 99_i32;               // scope 1 at $DIR/mutable_variable_aggregate.rs:+2:5: +2:13
+          StorageLive(_1);                 // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:9: +1:14
+-         _1 = (const 42_i32, const 43_i32); // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:17: +1:25
++         _1 = const (42_i32, 43_i32);     // scope 0 at $DIR/mutable_variable_aggregate.rs:+1:17: +1:25
+          (_1.1: i32) = const 99_i32;      // scope 1 at $DIR/mutable_variable_aggregate.rs:+2:5: +2:13
           StorageLive(_2);                 // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:9: +3:10
--         _2 = _4;                         // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:13: +3:14
-+         _2 = const 99_i32;               // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:13: +3:14
+-         _2 = _1;                         // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:13: +3:14
++         _2 = const (42_i32, 99_i32);     // scope 1 at $DIR/mutable_variable_aggregate.rs:+3:13: +3:14
+          _0 = const ();                   // scope 0 at $DIR/mutable_variable_aggregate.rs:+0:11: +4:2
           StorageDead(_2);                 // scope 1 at $DIR/mutable_variable_aggregate.rs:+4:1: +4:2
-          StorageDead(_4);                 // scope 0 at $DIR/mutable_variable_aggregate.rs:+4:1: +4:2
+          StorageDead(_1);                 // scope 0 at $DIR/mutable_variable_aggregate.rs:+4:1: +4:2
           return;                          // scope 0 at $DIR/mutable_variable_aggregate.rs:+4:2: +4:2
       }
   }
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
index d4ff8d89073..a145c035438 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
@@ -1,5 +1,4 @@
-// unit-test
-// compile-flags: -O
+// unit-test: ConstProp
 
 // EMIT_MIR mutable_variable_aggregate.main.ConstProp.diff
 fn main() {
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff
index 134f0c080bf..bec641ecfae 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.main.ConstProp.diff
@@ -9,10 +9,9 @@
           let _2: &mut (i32, i32);         // in scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:+2:9: +2:10
           scope 2 {
               debug z => _2;               // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+2:9: +2:10
-              let _3: i32;                 // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
-              let _4: i32;                 // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
+              let _3: (i32, i32);          // in scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
               scope 3 {
-                  debug y => (i32, i32){ .0 => _3, .1 => _4, }; // in scope 3 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
+                  debug y => _3;           // in scope 3 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
               }
           }
       }
@@ -24,11 +23,9 @@
           _2 = &mut _1;                    // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:+2:13: +2:19
           ((*_2).1: i32) = const 99_i32;   // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+3:5: +3:13
           StorageLive(_3);                 // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
-          StorageLive(_4);                 // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:9: +4:10
-          _3 = (_1.0: i32);                // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:13: +4:14
-          _4 = (_1.1: i32);                // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:13: +4:14
+          _3 = _1;                         // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+4:13: +4:14
+          _0 = const ();                   // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+0:11: +5:2
           StorageDead(_3);                 // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:1: +5:2
-          StorageDead(_4);                 // scope 2 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:1: +5:2
           StorageDead(_2);                 // scope 1 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:1: +5:2
           StorageDead(_1);                 // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:1: +5:2
           return;                          // scope 0 at $DIR/mutable_variable_aggregate_mut_ref.rs:+5:2: +5:2
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
index 9060f7e9bd3..3099e659f3f 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs
@@ -1,5 +1,4 @@
-// unit-test
-// compile-flags: -O
+// unit-test: ConstProp
 
 // EMIT_MIR mutable_variable_aggregate_mut_ref.main.ConstProp.diff
 fn main() {
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff
index 75f6ebc58c7..374151057ac 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.main.ConstProp.diff
@@ -16,7 +16,7 @@
           StorageLive(_1);                 // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+1:9: +1:14
           _1 = foo() -> bb1;               // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+1:29: +1:34
                                            // mir::Constant
-                                           // + span: $DIR/mutable_variable_aggregate_partial_read.rs:7:29: 7:32
+                                           // + span: $DIR/mutable_variable_aggregate_partial_read.rs:6:29: 6:32
                                            // + literal: Const { ty: fn() -> (i32, i32) {foo}, val: Value(<ZST>) }
       }
   
@@ -26,6 +26,7 @@
           StorageLive(_2);                 // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+4:9: +4:10
 -         _2 = (_1.1: i32);                // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+4:13: +4:16
 +         _2 = const 99_i32;               // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+4:13: +4:16
+          _0 = const ();                   // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+0:11: +5:2
           StorageDead(_2);                 // scope 1 at $DIR/mutable_variable_aggregate_partial_read.rs:+5:1: +5:2
           StorageDead(_1);                 // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+5:1: +5:2
           return;                          // scope 0 at $DIR/mutable_variable_aggregate_partial_read.rs:+5:2: +5:2
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
index 70a287cf381..0e823e9dc08 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs
@@ -1,6 +1,5 @@
 // ignore-wasm32 compiled with panic=abort by default
-// unit-test
-// compile-flags: -O
+// unit-test: ConstProp
 
 // EMIT_MIR mutable_variable_aggregate_partial_read.main.ConstProp.diff
 fn main() {
diff --git a/tests/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff b/tests/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff
index 7fa29cccd50..fab81063028 100644
--- a/tests/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff
@@ -4,34 +4,39 @@
   fn main() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/mutable_variable_no_prop.rs:+0:11: +0:11
       let mut _1: u32;                     // in scope 0 at $DIR/mutable_variable_no_prop.rs:+1:9: +1:14
-      let mut _2: u32;                     // in scope 0 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
-      let mut _3: *mut u32;                // in scope 0 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
+      let _2: ();                          // in scope 0 at $DIR/mutable_variable_no_prop.rs:+2:5: +4:6
+      let mut _3: u32;                     // in scope 0 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
+      let mut _4: *mut u32;                // in scope 0 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
       scope 1 {
           debug x => _1;                   // in scope 1 at $DIR/mutable_variable_no_prop.rs:+1:9: +1:14
-          let _4: u32;                     // in scope 1 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
+          let _5: u32;                     // in scope 1 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
           scope 2 {
           }
           scope 3 {
-              debug y => _4;               // in scope 3 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
+              debug y => _5;               // in scope 3 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
           }
       }
   
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/mutable_variable_no_prop.rs:+1:9: +1:14
           _1 = const 42_u32;               // scope 0 at $DIR/mutable_variable_no_prop.rs:+1:17: +1:19
-          StorageLive(_2);                 // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
+          StorageLive(_2);                 // scope 1 at $DIR/mutable_variable_no_prop.rs:+2:5: +4:6
           StorageLive(_3);                 // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
-          _3 = const {alloc1: *mut u32};   // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
+          StorageLive(_4);                 // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
+          _4 = const {alloc1: *mut u32};   // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
                                            // mir::Constant
-                                           // + span: $DIR/mutable_variable_no_prop.rs:10:13: 10:19
+                                           // + span: $DIR/mutable_variable_no_prop.rs:9:13: 9:19
                                            // + literal: Const { ty: *mut u32, val: Value(Scalar(alloc1)) }
-          _2 = (*_3);                      // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
-          _1 = move _2;                    // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:9: +3:19
-          StorageDead(_2);                 // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:18: +3:19
-          StorageDead(_3);                 // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:19: +3:20
-          StorageLive(_4);                 // scope 1 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
-          _4 = _1;                         // scope 1 at $DIR/mutable_variable_no_prop.rs:+5:13: +5:14
-          StorageDead(_4);                 // scope 1 at $DIR/mutable_variable_no_prop.rs:+6:1: +6:2
+          _3 = (*_4);                      // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:13: +3:19
+          _1 = move _3;                    // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:9: +3:19
+          StorageDead(_3);                 // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:18: +3:19
+          StorageDead(_4);                 // scope 2 at $DIR/mutable_variable_no_prop.rs:+3:19: +3:20
+          _2 = const ();                   // scope 2 at $DIR/mutable_variable_no_prop.rs:+2:5: +4:6
+          StorageDead(_2);                 // scope 1 at $DIR/mutable_variable_no_prop.rs:+4:5: +4:6
+          StorageLive(_5);                 // scope 1 at $DIR/mutable_variable_no_prop.rs:+5:9: +5:10
+          _5 = _1;                         // scope 1 at $DIR/mutable_variable_no_prop.rs:+5:13: +5:14
+          _0 = const ();                   // scope 0 at $DIR/mutable_variable_no_prop.rs:+0:11: +6:2
+          StorageDead(_5);                 // scope 1 at $DIR/mutable_variable_no_prop.rs:+6:1: +6:2
           StorageDead(_1);                 // scope 0 at $DIR/mutable_variable_no_prop.rs:+6:1: +6:2
           return;                          // scope 0 at $DIR/mutable_variable_no_prop.rs:+6:2: +6:2
       }
diff --git a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
index b69ec931a63..e51c6223555 100644
--- a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
@@ -1,5 +1,4 @@
-// unit-test
-// compile-flags: -O
+// unit-test: ConstProp
 
 static mut STATIC: u32 = 0x42424242;
 
diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff
index 9582504b25e..3048122d8ff 100644
--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.diff
@@ -4,17 +4,16 @@
   fn main() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/mutable_variable_unprop_assign.rs:+0:11: +0:11
       let _1: i32;                         // in scope 0 at $DIR/mutable_variable_unprop_assign.rs:+1:9: +1:10
-      let mut _2: i32;                     // in scope 0 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
+      let mut _3: i32;                     // in scope 0 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
       scope 1 {
           debug a => _1;                   // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:+1:9: +1:10
-          let mut _5: i32;                 // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
-          let mut _6: i32;                 // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
+          let mut _2: (i32, i32);          // in scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
           scope 2 {
-              debug x => (i32, i32){ .0 => _5, .1 => _6, }; // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
-              let _3: i32;                 // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
+              debug x => _2;               // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
+              let _4: i32;                 // in scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
               scope 3 {
-                  debug y => _3;           // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
-                  let _4: i32;             // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:9: +5:10
+                  debug y => _4;           // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
+                  let _5: i32;             // in scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:9: +5:10
                   scope 4 {
                       debug z => _5;       // in scope 4 at $DIR/mutable_variable_unprop_assign.rs:+5:9: +5:10
                   }
@@ -26,22 +25,27 @@
           StorageLive(_1);                 // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+1:9: +1:10
           _1 = foo() -> bb1;               // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+1:13: +1:18
                                            // mir::Constant
-                                           // + span: $DIR/mutable_variable_unprop_assign.rs:7:13: 7:16
+                                           // + span: $DIR/mutable_variable_unprop_assign.rs:6:13: 6:16
                                            // + literal: Const { ty: fn() -> i32 {foo}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageLive(_6);                 // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
-          _5 = const 1_i32;                // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:29: +2:35
-          _6 = const 2_i32;                // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:29: +2:35
-          StorageLive(_2);                 // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
-          _2 = _1;                         // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
-          _6 = move _2;                    // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:5: +3:12
-          StorageDead(_2);                 // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
-          StorageLive(_3);                 // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
-          _3 = _6;                         // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:13: +4:16
-          StorageDead(_3);                 // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
-          StorageDead(_6);                 // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
+          StorageLive(_2);                 // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:9: +2:14
+-         _2 = (const 1_i32, const 2_i32); // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:29: +2:35
++         _2 = const (1_i32, 2_i32);       // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+2:29: +2:35
+          StorageLive(_3);                 // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
+          _3 = _1;                         // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
+          (_2.1: i32) = move _3;           // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:5: +3:12
+          StorageDead(_3);                 // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+3:11: +3:12
+          StorageLive(_4);                 // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:9: +4:10
+          _4 = (_2.1: i32);                // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+4:13: +4:16
+          StorageLive(_5);                 // scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:9: +5:10
+-         _5 = (_2.0: i32);                // scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:13: +5:16
++         _5 = const 1_i32;                // scope 3 at $DIR/mutable_variable_unprop_assign.rs:+5:13: +5:16
+          _0 = const ();                   // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+0:11: +6:2
+          StorageDead(_5);                 // scope 3 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
+          StorageDead(_4);                 // scope 2 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
+          StorageDead(_2);                 // scope 1 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
           StorageDead(_1);                 // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+6:1: +6:2
           return;                          // scope 0 at $DIR/mutable_variable_unprop_assign.rs:+6:2: +6:2
       }
diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
index fabd04e9bd2..5577f78a963 100644
--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
@@ -1,6 +1,5 @@
 // ignore-wasm32 compiled with panic=abort by default
-// unit-test
-// compile-flags: -O
+// unit-test: ConstProp
 
 // EMIT_MIR mutable_variable_unprop_assign.main.ConstProp.diff
 fn main() {
diff --git a/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.diff b/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.diff
index 4e2f1b39d2b..e3757941c8c 100644
--- a/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.diff
+++ b/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.diff
@@ -22,17 +22,18 @@
   
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/offset_of.rs:+1:9: +1:10
--         _1 = OffsetOf(Alpha, [0]);       // scope 0 at $DIR/offset_of.rs:+1:13: +1:33
-+         _1 = const 4_usize;              // scope 0 at $DIR/offset_of.rs:+1:13: +1:33
+-         _1 = OffsetOf(Alpha, [0]);       // scope 0 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
++         _1 = const 4_usize;              // scope 0 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
           StorageLive(_2);                 // scope 1 at $DIR/offset_of.rs:+2:9: +2:10
--         _2 = OffsetOf(Alpha, [1]);       // scope 1 at $DIR/offset_of.rs:+2:13: +2:33
-+         _2 = const 0_usize;              // scope 1 at $DIR/offset_of.rs:+2:13: +2:33
+-         _2 = OffsetOf(Alpha, [1]);       // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
++         _2 = const 0_usize;              // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
           StorageLive(_3);                 // scope 2 at $DIR/offset_of.rs:+3:9: +3:11
--         _3 = OffsetOf(Alpha, [2, 0]);    // scope 2 at $DIR/offset_of.rs:+3:14: +3:36
-+         _3 = const 2_usize;              // scope 2 at $DIR/offset_of.rs:+3:14: +3:36
+-         _3 = OffsetOf(Alpha, [2, 0]);    // scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
++         _3 = const 2_usize;              // scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
           StorageLive(_4);                 // scope 3 at $DIR/offset_of.rs:+4:9: +4:11
--         _4 = OffsetOf(Alpha, [2, 1]);    // scope 3 at $DIR/offset_of.rs:+4:14: +4:36
-+         _4 = const 3_usize;              // scope 3 at $DIR/offset_of.rs:+4:14: +4:36
+-         _4 = OffsetOf(Alpha, [2, 1]);    // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
++         _4 = const 3_usize;              // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+          _0 = const ();                   // scope 0 at $DIR/offset_of.rs:+0:15: +5:2
           StorageDead(_4);                 // scope 3 at $DIR/offset_of.rs:+5:1: +5:2
           StorageDead(_3);                 // scope 2 at $DIR/offset_of.rs:+5:1: +5:2
           StorageDead(_2);                 // scope 1 at $DIR/offset_of.rs:+5:1: +5:2
diff --git a/tests/mir-opt/const_prop/offset_of.generic.ConstProp.diff b/tests/mir-opt/const_prop/offset_of.generic.ConstProp.diff
index 5c6cb47089e..4a655604cd1 100644
--- a/tests/mir-opt/const_prop/offset_of.generic.ConstProp.diff
+++ b/tests/mir-opt/const_prop/offset_of.generic.ConstProp.diff
@@ -22,13 +22,14 @@
   
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/offset_of.rs:+1:9: +1:11
-          _1 = OffsetOf(Gamma<T>, [0]);    // scope 0 at $DIR/offset_of.rs:+1:14: +1:37
+          _1 = OffsetOf(Gamma<T>, [0]);    // scope 0 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
           StorageLive(_2);                 // scope 1 at $DIR/offset_of.rs:+2:9: +2:11
-          _2 = OffsetOf(Gamma<T>, [1]);    // scope 1 at $DIR/offset_of.rs:+2:14: +2:37
+          _2 = OffsetOf(Gamma<T>, [1]);    // scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
           StorageLive(_3);                 // scope 2 at $DIR/offset_of.rs:+3:9: +3:11
-          _3 = OffsetOf(Delta<T>, [1]);    // scope 2 at $DIR/offset_of.rs:+3:14: +3:37
+          _3 = OffsetOf(Delta<T>, [1]);    // scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
           StorageLive(_4);                 // scope 3 at $DIR/offset_of.rs:+4:9: +4:11
-          _4 = OffsetOf(Delta<T>, [2]);    // scope 3 at $DIR/offset_of.rs:+4:14: +4:37
+          _4 = OffsetOf(Delta<T>, [2]);    // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+          _0 = const ();                   // scope 0 at $DIR/offset_of.rs:+0:17: +5:2
           StorageDead(_4);                 // scope 3 at $DIR/offset_of.rs:+5:1: +5:2
           StorageDead(_3);                 // scope 2 at $DIR/offset_of.rs:+5:1: +5:2
           StorageDead(_2);                 // scope 1 at $DIR/offset_of.rs:+5:1: +5:2
diff --git a/tests/mir-opt/const_prop/offset_of.rs b/tests/mir-opt/const_prop/offset_of.rs
index eabdf848079..4cdcd28eeb2 100644
--- a/tests/mir-opt/const_prop/offset_of.rs
+++ b/tests/mir-opt/const_prop/offset_of.rs
@@ -1,5 +1,4 @@
-// unit-test
-// compile-flags: -O
+// unit-test: ConstProp
 
 #![feature(offset_of)]
 
diff --git a/tests/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff b/tests/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff
index 388c6ca810b..c290fba563a 100644
--- a/tests/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff
@@ -18,7 +18,7 @@
           StorageLive(_3);                 // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:16
           _3 = const {alloc1: &u8};        // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:16
                                            // mir::Constant
-                                           // + span: $DIR/read_immutable_static.rs:8:13: 8:16
+                                           // + span: $DIR/read_immutable_static.rs:7:13: 7:16
                                            // + literal: Const { ty: &u8, val: Value(Scalar(alloc1)) }
 -         _2 = (*_3);                      // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:16
 +         _2 = const 2_u8;                 // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:16
@@ -26,7 +26,7 @@
           StorageLive(_5);                 // scope 0 at $DIR/read_immutable_static.rs:+1:19: +1:22
           _5 = const {alloc1: &u8};        // scope 0 at $DIR/read_immutable_static.rs:+1:19: +1:22
                                            // mir::Constant
-                                           // + span: $DIR/read_immutable_static.rs:8:19: 8:22
+                                           // + span: $DIR/read_immutable_static.rs:7:19: 7:22
                                            // + literal: Const { ty: &u8, val: Value(Scalar(alloc1)) }
 -         _4 = (*_5);                      // scope 0 at $DIR/read_immutable_static.rs:+1:19: +1:22
 -         _1 = Add(move _2, move _4);      // scope 0 at $DIR/read_immutable_static.rs:+1:13: +1:22
@@ -36,6 +36,7 @@
           StorageDead(_2);                 // scope 0 at $DIR/read_immutable_static.rs:+1:21: +1:22
           StorageDead(_5);                 // scope 0 at $DIR/read_immutable_static.rs:+1:22: +1:23
           StorageDead(_3);                 // scope 0 at $DIR/read_immutable_static.rs:+1:22: +1:23
+          _0 = const ();                   // scope 0 at $DIR/read_immutable_static.rs:+0:11: +2:2
           StorageDead(_1);                 // scope 0 at $DIR/read_immutable_static.rs:+2:1: +2:2
           return;                          // scope 0 at $DIR/read_immutable_static.rs:+2:2: +2:2
       }
diff --git a/tests/mir-opt/const_prop/read_immutable_static.rs b/tests/mir-opt/const_prop/read_immutable_static.rs
index 4f7afe6cad4..fb8f9fe996a 100644
--- a/tests/mir-opt/const_prop/read_immutable_static.rs
+++ b/tests/mir-opt/const_prop/read_immutable_static.rs
@@ -1,5 +1,4 @@
-// unit-test
-// compile-flags: -O
+// unit-test: ConstProp
 
 static FOO: u8 = 2;
 
diff --git a/tests/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff b/tests/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff
index 15c93f270d7..077b9bf8304 100644
--- a/tests/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/reify_fn_ptr.main.ConstProp.diff
@@ -3,21 +3,26 @@
   
   fn main() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/reify_fn_ptr.rs:+0:11: +0:11
-      let mut _1: usize;                   // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
-      let mut _2: fn();                    // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
+      let mut _1: *const fn();             // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:41
+      let mut _2: usize;                   // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
+      let mut _3: fn();                    // in scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
       scope 1 {
       }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
-          StorageLive(_2);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
-          _2 = main as fn() (Pointer(ReifyFnPointer)); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
+          StorageLive(_1);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:41
+          StorageLive(_2);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
+          StorageLive(_3);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
+          _3 = main as fn() (Pointer(ReifyFnPointer)); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:17
                                            // mir::Constant
-                                           // + span: $DIR/reify_fn_ptr.rs:4:13: 4:17
+                                           // + span: $DIR/reify_fn_ptr.rs:5:13: 5:17
                                            // + literal: Const { ty: fn() {main}, val: Value(<ZST>) }
-          _1 = move _2 as usize (PointerExposeAddress); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
-          StorageDead(_2);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:25: +1:26
-          StorageDead(_1);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:40: +1:41
+          _2 = move _3 as usize (PointerExposeAddress); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:26
+          StorageDead(_3);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:25: +1:26
+          _1 = move _2 as *const fn() (PointerFromExposedAddress); // scope 0 at $DIR/reify_fn_ptr.rs:+1:13: +1:41
+          StorageDead(_2);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:40: +1:41
+          StorageDead(_1);                 // scope 0 at $DIR/reify_fn_ptr.rs:+1:41: +1:42
+          _0 = const ();                   // scope 0 at $DIR/reify_fn_ptr.rs:+0:11: +2:2
           return;                          // scope 0 at $DIR/reify_fn_ptr.rs:+2:2: +2:2
       }
   }
diff --git a/tests/mir-opt/const_prop/reify_fn_ptr.rs b/tests/mir-opt/const_prop/reify_fn_ptr.rs
index bfe2563ad8a..5f63820669b 100644
--- a/tests/mir-opt/const_prop/reify_fn_ptr.rs
+++ b/tests/mir-opt/const_prop/reify_fn_ptr.rs
@@ -1,3 +1,4 @@
+// unit-test: ConstProp
 // EMIT_MIR reify_fn_ptr.main.ConstProp.diff
 
 fn main() {
diff --git a/tests/mir-opt/const_prop/repeat.main.ConstProp.32bit.diff b/tests/mir-opt/const_prop/repeat.main.ConstProp.32bit.diff
index 636032adb81..6641220db69 100644
--- a/tests/mir-opt/const_prop/repeat.main.ConstProp.32bit.diff
+++ b/tests/mir-opt/const_prop/repeat.main.ConstProp.32bit.diff
@@ -20,11 +20,12 @@
           _3 = [const 42_u32; 8];          // scope 0 at $DIR/repeat.rs:+1:18: +1:25
           StorageLive(_4);                 // scope 0 at $DIR/repeat.rs:+1:26: +1:27
           _4 = const 2_usize;              // scope 0 at $DIR/repeat.rs:+1:26: +1:27
-          _5 = const 8_usize;              // scope 0 at $DIR/repeat.rs:+1:18: +1:28
+-         _5 = Len(_3);                    // scope 0 at $DIR/repeat.rs:+1:18: +1:28
 -         _6 = Lt(_4, _5);                 // scope 0 at $DIR/repeat.rs:+1:18: +1:28
 -         assert(move _6, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
++         _5 = const 8_usize;              // scope 0 at $DIR/repeat.rs:+1:18: +1:28
 +         _6 = const true;                 // scope 0 at $DIR/repeat.rs:+1:18: +1:28
-+         assert(const true, "index out of bounds: the length is {} but the index is {}", const 8_usize, const 2_usize) -> bb1; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
++         assert(const true, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
       }
   
       bb1: {
@@ -35,6 +36,7 @@
           StorageDead(_2);                 // scope 0 at $DIR/repeat.rs:+1:31: +1:32
           StorageDead(_4);                 // scope 0 at $DIR/repeat.rs:+1:32: +1:33
           StorageDead(_3);                 // scope 0 at $DIR/repeat.rs:+1:32: +1:33
+          _0 = const ();                   // scope 0 at $DIR/repeat.rs:+0:11: +2:2
           StorageDead(_1);                 // scope 0 at $DIR/repeat.rs:+2:1: +2:2
           return;                          // scope 0 at $DIR/repeat.rs:+2:2: +2:2
       }
diff --git a/tests/mir-opt/const_prop/repeat.main.ConstProp.64bit.diff b/tests/mir-opt/const_prop/repeat.main.ConstProp.64bit.diff
index 636032adb81..6641220db69 100644
--- a/tests/mir-opt/const_prop/repeat.main.ConstProp.64bit.diff
+++ b/tests/mir-opt/const_prop/repeat.main.ConstProp.64bit.diff
@@ -20,11 +20,12 @@
           _3 = [const 42_u32; 8];          // scope 0 at $DIR/repeat.rs:+1:18: +1:25
           StorageLive(_4);                 // scope 0 at $DIR/repeat.rs:+1:26: +1:27
           _4 = const 2_usize;              // scope 0 at $DIR/repeat.rs:+1:26: +1:27
-          _5 = const 8_usize;              // scope 0 at $DIR/repeat.rs:+1:18: +1:28
+-         _5 = Len(_3);                    // scope 0 at $DIR/repeat.rs:+1:18: +1:28
 -         _6 = Lt(_4, _5);                 // scope 0 at $DIR/repeat.rs:+1:18: +1:28
 -         assert(move _6, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
++         _5 = const 8_usize;              // scope 0 at $DIR/repeat.rs:+1:18: +1:28
 +         _6 = const true;                 // scope 0 at $DIR/repeat.rs:+1:18: +1:28
-+         assert(const true, "index out of bounds: the length is {} but the index is {}", const 8_usize, const 2_usize) -> bb1; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
++         assert(const true, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> bb1; // scope 0 at $DIR/repeat.rs:+1:18: +1:28
       }
   
       bb1: {
@@ -35,6 +36,7 @@
           StorageDead(_2);                 // scope 0 at $DIR/repeat.rs:+1:31: +1:32
           StorageDead(_4);                 // scope 0 at $DIR/repeat.rs:+1:32: +1:33
           StorageDead(_3);                 // scope 0 at $DIR/repeat.rs:+1:32: +1:33
+          _0 = const ();                   // scope 0 at $DIR/repeat.rs:+0:11: +2:2
           StorageDead(_1);                 // scope 0 at $DIR/repeat.rs:+2:1: +2:2
           return;                          // scope 0 at $DIR/repeat.rs:+2:2: +2:2
       }
diff --git a/tests/mir-opt/const_prop/repeat.rs b/tests/mir-opt/const_prop/repeat.rs
index 2f3b7d2c502..9c11dbc5b66 100644
--- a/tests/mir-opt/const_prop/repeat.rs
+++ b/tests/mir-opt/const_prop/repeat.rs
@@ -1,7 +1,8 @@
+// unit-test: ConstProp
 // ignore-wasm32 compiled with panic=abort by default
-// compile-flags: -O
-
+// compile-flags: -Zmir-enable-passes=+NormalizeArrayLen
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
+
 // EMIT_MIR repeat.main.ConstProp.diff
 fn main() {
     let x: u32 = [42; 8][2] + 0;
diff --git a/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.mir b/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.mir
index ececd994283..b12d84fa479 100644
--- a/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.mir
+++ b/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.mir
@@ -2,8 +2,14 @@
 
 fn add() -> u32 {
     let mut _0: u32;                     // return place in scope 0 at $DIR/return_place.rs:+0:13: +0:16
+    let mut _1: (u32, bool);             // in scope 0 at $DIR/return_place.rs:+1:5: +1:10
 
     bb0: {
+        _1 = const (4_u32, false);       // scope 0 at $DIR/return_place.rs:+1:5: +1:10
+        assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 2_u32, const 2_u32) -> bb1; // scope 0 at $DIR/return_place.rs:+1:5: +1:10
+    }
+
+    bb1: {
         _0 = const 4_u32;                // scope 0 at $DIR/return_place.rs:+1:5: +1:10
         return;                          // scope 0 at $DIR/return_place.rs:+2:2: +2:2
     }
diff --git a/tests/mir-opt/const_prop/return_place.rs b/tests/mir-opt/const_prop/return_place.rs
index ae119df8518..0e68309f036 100644
--- a/tests/mir-opt/const_prop/return_place.rs
+++ b/tests/mir-opt/const_prop/return_place.rs
@@ -1,3 +1,4 @@
+// unit-test: ConstProp
 // ignore-wasm32 compiled with panic=abort by default
 // compile-flags: -C overflow-checks=on
 
diff --git a/tests/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff b/tests/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff
index a091b4ace20..c2f97a0f622 100644
--- a/tests/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/scalar_literal_propagation.main.ConstProp.diff
@@ -11,15 +11,23 @@
       }
   
       bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/scalar_literal_propagation.rs:+1:9: +1:10
           _1 = const 1_u32;                // scope 0 at $DIR/scalar_literal_propagation.rs:+1:13: +1:14
--         _2 = consume(_1) -> bb1;         // scope 1 at $DIR/scalar_literal_propagation.rs:+2:5: +2:15
-+         _2 = consume(const 1_u32) -> bb1; // scope 1 at $DIR/scalar_literal_propagation.rs:+2:5: +2:15
+          StorageLive(_2);                 // scope 1 at $DIR/scalar_literal_propagation.rs:+2:5: +2:15
+          StorageLive(_3);                 // scope 1 at $DIR/scalar_literal_propagation.rs:+2:13: +2:14
+-         _3 = _1;                         // scope 1 at $DIR/scalar_literal_propagation.rs:+2:13: +2:14
++         _3 = const 1_u32;                // scope 1 at $DIR/scalar_literal_propagation.rs:+2:13: +2:14
+          _2 = consume(move _3) -> bb1;    // scope 1 at $DIR/scalar_literal_propagation.rs:+2:5: +2:15
                                            // mir::Constant
-                                           // + span: $DIR/scalar_literal_propagation.rs:5:5: 5:12
+                                           // + span: $DIR/scalar_literal_propagation.rs:6:5: 6:12
                                            // + literal: Const { ty: fn(u32) {consume}, val: Value(<ZST>) }
       }
   
       bb1: {
+          StorageDead(_3);                 // scope 1 at $DIR/scalar_literal_propagation.rs:+2:14: +2:15
+          StorageDead(_2);                 // scope 1 at $DIR/scalar_literal_propagation.rs:+2:15: +2:16
+          _0 = const ();                   // scope 0 at $DIR/scalar_literal_propagation.rs:+0:11: +3:2
+          StorageDead(_1);                 // scope 0 at $DIR/scalar_literal_propagation.rs:+3:1: +3:2
           return;                          // scope 0 at $DIR/scalar_literal_propagation.rs:+3:2: +3:2
       }
   }
diff --git a/tests/mir-opt/const_prop/scalar_literal_propagation.rs b/tests/mir-opt/const_prop/scalar_literal_propagation.rs
index e13e352f8a1..fc33cc2d021 100644
--- a/tests/mir-opt/const_prop/scalar_literal_propagation.rs
+++ b/tests/mir-opt/const_prop/scalar_literal_propagation.rs
@@ -1,3 +1,4 @@
+// unit-test: ConstProp
 // ignore-wasm32 compiled with panic=abort by default
 // EMIT_MIR scalar_literal_propagation.main.ConstProp.diff
 fn main() {
diff --git a/tests/mir-opt/const_prop/slice_len.rs b/tests/mir-opt/const_prop/slice_len.rs
index 4499c54f264..9821d1b1e92 100644
--- a/tests/mir-opt/const_prop/slice_len.rs
+++ b/tests/mir-opt/const_prop/slice_len.rs
@@ -1,6 +1,6 @@
 // ignore-wasm32 compiled with panic=abort by default
 // unit-test: ConstProp
-// compile-flags: -Zmir-enable-passes=+InstCombine
+// compile-flags: -Zmir-enable-passes=+InstSimplify
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
 // EMIT_MIR slice_len.main.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/switch_int.main.ConstProp.diff b/tests/mir-opt/const_prop/switch_int.main.ConstProp.diff
index 85704c48a2c..664b7839ffc 100644
--- a/tests/mir-opt/const_prop/switch_int.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/switch_int.main.ConstProp.diff
@@ -15,14 +15,14 @@
       bb1: {
           _0 = foo(const -1_i32) -> bb3;   // scope 0 at $DIR/switch_int.rs:+3:14: +3:21
                                            // mir::Constant
-                                           // + span: $DIR/switch_int.rs:10:14: 10:17
+                                           // + span: $DIR/switch_int.rs:12:14: 12:17
                                            // + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
       }
   
       bb2: {
           _0 = foo(const 0_i32) -> bb3;    // scope 0 at $DIR/switch_int.rs:+2:14: +2:20
                                            // mir::Constant
-                                           // + span: $DIR/switch_int.rs:9:14: 9:17
+                                           // + span: $DIR/switch_int.rs:11:14: 11:17
                                            // + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
       }
   
diff --git a/tests/mir-opt/const_prop/switch_int.main.SimplifyConstCondition-after-const-prop.diff b/tests/mir-opt/const_prop/switch_int.main.SimplifyConstCondition-after-const-prop.diff
index 0864db22523..ef2c4d5faa6 100644
--- a/tests/mir-opt/const_prop/switch_int.main.SimplifyConstCondition-after-const-prop.diff
+++ b/tests/mir-opt/const_prop/switch_int.main.SimplifyConstCondition-after-const-prop.diff
@@ -15,14 +15,14 @@
       bb1: {
           _0 = foo(const -1_i32) -> bb3;   // scope 0 at $DIR/switch_int.rs:+3:14: +3:21
                                            // mir::Constant
-                                           // + span: $DIR/switch_int.rs:10:14: 10:17
+                                           // + span: $DIR/switch_int.rs:12:14: 12:17
                                            // + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
       }
   
       bb2: {
           _0 = foo(const 0_i32) -> bb3;    // scope 0 at $DIR/switch_int.rs:+2:14: +2:20
                                            // mir::Constant
-                                           // + span: $DIR/switch_int.rs:9:14: 9:17
+                                           // + span: $DIR/switch_int.rs:11:14: 11:17
                                            // + literal: Const { ty: fn(i32) {foo}, val: Value(<ZST>) }
       }
   
diff --git a/tests/mir-opt/const_prop/switch_int.rs b/tests/mir-opt/const_prop/switch_int.rs
index 2a2322e43a9..7158ea4d2bd 100644
--- a/tests/mir-opt/const_prop/switch_int.rs
+++ b/tests/mir-opt/const_prop/switch_int.rs
@@ -1,3 +1,5 @@
+// unit-test: ConstProp
+// compile-flags: -Zmir-enable-passes=+SimplifyConstCondition-after-const-prop
 // ignore-wasm32 compiled with panic=abort by default
 #[inline(never)]
 fn foo(_: i32) { }
diff --git a/tests/mir-opt/const_prop/transmute.from_char.ConstProp.diff b/tests/mir-opt/const_prop/transmute.from_char.ConstProp.32bit.diff
index 933dfbb5166..933dfbb5166 100644
--- a/tests/mir-opt/const_prop/transmute.from_char.ConstProp.diff
+++ b/tests/mir-opt/const_prop/transmute.from_char.ConstProp.32bit.diff
diff --git a/tests/mir-opt/const_prop/transmute.from_char.ConstProp.64bit.diff b/tests/mir-opt/const_prop/transmute.from_char.ConstProp.64bit.diff
new file mode 100644
index 00000000000..933dfbb5166
--- /dev/null
+++ b/tests/mir-opt/const_prop/transmute.from_char.ConstProp.64bit.diff
@@ -0,0 +1,15 @@
+- // MIR for `from_char` before ConstProp
++ // MIR for `from_char` after ConstProp
+  
+  fn from_char() -> i32 {
+      let mut _0: i32;                     // return place in scope 0 at $DIR/transmute.rs:+0:23: +0:26
+      scope 1 {
+      }
+  
+      bb0: {
+-         _0 = const 'R' as i32 (Transmute); // scope 1 at $DIR/transmute.rs:+1:14: +1:28
++         _0 = const 82_i32;               // scope 1 at $DIR/transmute.rs:+1:14: +1:28
+          return;                          // scope 0 at $DIR/transmute.rs:+2:2: +2:2
+      }
+  }
+  
diff --git a/tests/mir-opt/const_prop/transmute.invalid_bool.ConstProp.diff b/tests/mir-opt/const_prop/transmute.invalid_bool.ConstProp.32bit.diff
index f3474855f02..4a31194de6e 100644
--- a/tests/mir-opt/const_prop/transmute.invalid_bool.ConstProp.diff
+++ b/tests/mir-opt/const_prop/transmute.invalid_bool.ConstProp.32bit.diff
@@ -7,7 +7,8 @@
       }
   
       bb0: {
-          _0 = const -1_i8 as bool (Transmute); // scope 1 at $DIR/transmute.rs:+1:14: +1:30
+-         _0 = const -1_i8 as bool (Transmute); // scope 1 at $DIR/transmute.rs:+1:14: +1:30
++         _0 = const {transmute(0xff): bool}; // scope 1 at $DIR/transmute.rs:+1:14: +1:30
           return;                          // scope 0 at $DIR/transmute.rs:+2:2: +2:2
       }
   }
diff --git a/tests/mir-opt/const_prop/transmute.invalid_bool.ConstProp.64bit.diff b/tests/mir-opt/const_prop/transmute.invalid_bool.ConstProp.64bit.diff
new file mode 100644
index 00000000000..4a31194de6e
--- /dev/null
+++ b/tests/mir-opt/const_prop/transmute.invalid_bool.ConstProp.64bit.diff
@@ -0,0 +1,15 @@
+- // MIR for `invalid_bool` before ConstProp
++ // MIR for `invalid_bool` after ConstProp
+  
+  fn invalid_bool() -> bool {
+      let mut _0: bool;                    // return place in scope 0 at $DIR/transmute.rs:+0:33: +0:37
+      scope 1 {
+      }
+  
+      bb0: {
+-         _0 = const -1_i8 as bool (Transmute); // scope 1 at $DIR/transmute.rs:+1:14: +1:30
++         _0 = const {transmute(0xff): bool}; // scope 1 at $DIR/transmute.rs:+1:14: +1:30
+          return;                          // scope 0 at $DIR/transmute.rs:+2:2: +2:2
+      }
+  }
+  
diff --git a/tests/mir-opt/const_prop/transmute.invalid_char.ConstProp.diff b/tests/mir-opt/const_prop/transmute.invalid_char.ConstProp.32bit.diff
index ba087e226c9..2c541f2f6a0 100644
--- a/tests/mir-opt/const_prop/transmute.invalid_char.ConstProp.diff
+++ b/tests/mir-opt/const_prop/transmute.invalid_char.ConstProp.32bit.diff
@@ -7,7 +7,8 @@
       }
   
       bb0: {
-          _0 = const _ as char (Transmute); // scope 1 at $DIR/transmute.rs:+1:14: +1:33
+-         _0 = const _ as char (Transmute); // scope 1 at $DIR/transmute.rs:+1:14: +1:33
++         _0 = const {transmute(0x7fffffff): char}; // scope 1 at $DIR/transmute.rs:+1:14: +1:33
           return;                          // scope 0 at $DIR/transmute.rs:+2:2: +2:2
       }
   }
diff --git a/tests/mir-opt/const_prop/transmute.invalid_char.ConstProp.64bit.diff b/tests/mir-opt/const_prop/transmute.invalid_char.ConstProp.64bit.diff
new file mode 100644
index 00000000000..2c541f2f6a0
--- /dev/null
+++ b/tests/mir-opt/const_prop/transmute.invalid_char.ConstProp.64bit.diff
@@ -0,0 +1,15 @@
+- // MIR for `invalid_char` before ConstProp
++ // MIR for `invalid_char` after ConstProp
+  
+  fn invalid_char() -> char {
+      let mut _0: char;                    // return place in scope 0 at $DIR/transmute.rs:+0:33: +0:37
+      scope 1 {
+      }
+  
+      bb0: {
+-         _0 = const _ as char (Transmute); // scope 1 at $DIR/transmute.rs:+1:14: +1:33
++         _0 = const {transmute(0x7fffffff): char}; // scope 1 at $DIR/transmute.rs:+1:14: +1:33
+          return;                          // scope 0 at $DIR/transmute.rs:+2:2: +2:2
+      }
+  }
+  
diff --git a/tests/mir-opt/const_prop/transmute.less_as_i8.ConstProp.diff b/tests/mir-opt/const_prop/transmute.less_as_i8.ConstProp.32bit.diff
index 76d464789c1..76d464789c1 100644
--- a/tests/mir-opt/const_prop/transmute.less_as_i8.ConstProp.diff
+++ b/tests/mir-opt/const_prop/transmute.less_as_i8.ConstProp.32bit.diff
diff --git a/tests/mir-opt/const_prop/transmute.less_as_i8.ConstProp.64bit.diff b/tests/mir-opt/const_prop/transmute.less_as_i8.ConstProp.64bit.diff
new file mode 100644
index 00000000000..76d464789c1
--- /dev/null
+++ b/tests/mir-opt/const_prop/transmute.less_as_i8.ConstProp.64bit.diff
@@ -0,0 +1,23 @@
+- // MIR for `less_as_i8` before ConstProp
++ // MIR for `less_as_i8` after ConstProp
+  
+  fn less_as_i8() -> i8 {
+      let mut _0: i8;                      // return place in scope 0 at $DIR/transmute.rs:+0:24: +0:26
+      let mut _1: std::cmp::Ordering;      // in scope 0 at $DIR/transmute.rs:+1:24: +1:48
+      scope 1 {
+      }
+  
+      bb0: {
+          StorageLive(_1);                 // scope 1 at $DIR/transmute.rs:+1:24: +1:48
+-         _1 = Less;                       // scope 1 at $DIR/transmute.rs:+1:24: +1:48
+-         _0 = move _1 as i8 (Transmute);  // scope 1 at $DIR/transmute.rs:+1:14: +1:49
++         _1 = const Less;                 // scope 1 at $DIR/transmute.rs:+1:24: +1:48
++                                          // mir::Constant
++                                          // + span: no-location
++                                          // + literal: Const { ty: std::cmp::Ordering, val: Value(Scalar(0xff)) }
++         _0 = const -1_i8;                // scope 1 at $DIR/transmute.rs:+1:14: +1:49
+          StorageDead(_1);                 // scope 1 at $DIR/transmute.rs:+1:48: +1:49
+          return;                          // scope 0 at $DIR/transmute.rs:+2:2: +2:2
+      }
+  }
+  
diff --git a/tests/mir-opt/const_prop/transmute.rs b/tests/mir-opt/const_prop/transmute.rs
index b753cdccd60..762c421715a 100644
--- a/tests/mir-opt/const_prop/transmute.rs
+++ b/tests/mir-opt/const_prop/transmute.rs
@@ -1,5 +1,7 @@
 // unit-test: ConstProp
 // compile-flags: -O --crate-type=lib
+// ignore-endian-big
+// EMIT_MIR_FOR_EACH_BIT_WIDTH
 
 use std::mem::transmute;
 
diff --git a/tests/mir-opt/const_prop/transmute.undef_union_as_integer.ConstProp.diff b/tests/mir-opt/const_prop/transmute.undef_union_as_integer.ConstProp.32bit.diff
index 538b1f26e4c..538b1f26e4c 100644
--- a/tests/mir-opt/const_prop/transmute.undef_union_as_integer.ConstProp.diff
+++ b/tests/mir-opt/const_prop/transmute.undef_union_as_integer.ConstProp.32bit.diff
diff --git a/tests/mir-opt/const_prop/transmute.undef_union_as_integer.ConstProp.64bit.diff b/tests/mir-opt/const_prop/transmute.undef_union_as_integer.ConstProp.64bit.diff
new file mode 100644
index 00000000000..538b1f26e4c
--- /dev/null
+++ b/tests/mir-opt/const_prop/transmute.undef_union_as_integer.ConstProp.64bit.diff
@@ -0,0 +1,22 @@
+- // MIR for `undef_union_as_integer` before ConstProp
++ // MIR for `undef_union_as_integer` after ConstProp
+  
+  fn undef_union_as_integer() -> u32 {
+      let mut _0: u32;                     // return place in scope 0 at $DIR/transmute.rs:+0:43: +0:46
+      let mut _1: undef_union_as_integer::Union32; // in scope 0 at $DIR/transmute.rs:+2:24: +2:44
+      let mut _2: ();                      // in scope 0 at $DIR/transmute.rs:+2:40: +2:42
+      scope 1 {
+      }
+  
+      bb0: {
+          StorageLive(_1);                 // scope 1 at $DIR/transmute.rs:+2:24: +2:44
+          StorageLive(_2);                 // scope 1 at $DIR/transmute.rs:+2:40: +2:42
+          _2 = ();                         // scope 1 at $DIR/transmute.rs:+2:40: +2:42
+          _1 = Union32 { value: move _2 }; // scope 1 at $DIR/transmute.rs:+2:24: +2:44
+          StorageDead(_2);                 // scope 1 at $DIR/transmute.rs:+2:43: +2:44
+          _0 = move _1 as u32 (Transmute); // scope 1 at $DIR/transmute.rs:+2:14: +2:45
+          StorageDead(_1);                 // scope 1 at $DIR/transmute.rs:+2:44: +2:45
+          return;                          // scope 0 at $DIR/transmute.rs:+3:2: +3:2
+      }
+  }
+  
diff --git a/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.diff b/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.32bit.diff
index 8bf97996a67..bc41b5d0813 100644
--- a/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.diff
+++ b/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.32bit.diff
@@ -15,7 +15,11 @@
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/transmute.rs:+0:38: +3:2
           StorageLive(_2);                 // scope 0 at $DIR/transmute.rs:+1:9: +1:10
-          _2 = const 1_usize as std::boxed::Box<Never> (Transmute); // scope 2 at $DIR/transmute.rs:+1:34: +1:52
+-         _2 = const 1_usize as std::boxed::Box<Never> (Transmute); // scope 2 at $DIR/transmute.rs:+1:34: +1:52
++         _2 = const Box::<Never>(Unique::<Never> {{ pointer: NonNull::<Never> {{ pointer: {0x1 as *const Never} }}, _marker: PhantomData::<Never> }}, std::alloc::Global); // scope 2 at $DIR/transmute.rs:+1:34: +1:52
++                                          // mir::Constant
++                                          // + span: no-location
++                                          // + literal: Const { ty: Box<Never>, val: Value(Scalar(0x00000001)) }
           StorageLive(_3);                 // scope 1 at $DIR/transmute.rs:+2:5: +2:16
           unreachable;                     // scope 1 at $DIR/transmute.rs:+2:11: +2:13
       }
diff --git a/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.64bit.diff b/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.64bit.diff
new file mode 100644
index 00000000000..c4376e6e17a
--- /dev/null
+++ b/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.64bit.diff
@@ -0,0 +1,27 @@
+- // MIR for `unreachable_box` before ConstProp
++ // MIR for `unreachable_box` after ConstProp
+  
+  fn unreachable_box() -> ! {
+      let mut _0: !;                       // return place in scope 0 at $DIR/transmute.rs:+0:36: +0:37
+      let mut _1: !;                       // in scope 0 at $DIR/transmute.rs:+0:38: +3:2
+      let _2: std::boxed::Box<Never>;      // in scope 0 at $DIR/transmute.rs:+1:9: +1:10
+      let mut _3: !;                       // in scope 0 at $DIR/transmute.rs:+2:5: +2:16
+      scope 1 {
+          debug x => _2;                   // in scope 1 at $DIR/transmute.rs:+1:9: +1:10
+      }
+      scope 2 {
+      }
+  
+      bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/transmute.rs:+0:38: +3:2
+          StorageLive(_2);                 // scope 0 at $DIR/transmute.rs:+1:9: +1:10
+-         _2 = const 1_usize as std::boxed::Box<Never> (Transmute); // scope 2 at $DIR/transmute.rs:+1:34: +1:52
++         _2 = const Box::<Never>(Unique::<Never> {{ pointer: NonNull::<Never> {{ pointer: {0x1 as *const Never} }}, _marker: PhantomData::<Never> }}, std::alloc::Global); // scope 2 at $DIR/transmute.rs:+1:34: +1:52
++                                          // mir::Constant
++                                          // + span: no-location
++                                          // + literal: Const { ty: Box<Never>, val: Value(Scalar(0x0000000000000001)) }
+          StorageLive(_3);                 // scope 1 at $DIR/transmute.rs:+2:5: +2:16
+          unreachable;                     // scope 1 at $DIR/transmute.rs:+2:11: +2:13
+      }
+  }
+  
diff --git a/tests/mir-opt/const_prop/transmute.unreachable_direct.ConstProp.diff b/tests/mir-opt/const_prop/transmute.unreachable_direct.ConstProp.32bit.diff
index 81b7b368993..81b7b368993 100644
--- a/tests/mir-opt/const_prop/transmute.unreachable_direct.ConstProp.diff
+++ b/tests/mir-opt/const_prop/transmute.unreachable_direct.ConstProp.32bit.diff
diff --git a/tests/mir-opt/const_prop/transmute.unreachable_direct.ConstProp.64bit.diff b/tests/mir-opt/const_prop/transmute.unreachable_direct.ConstProp.64bit.diff
new file mode 100644
index 00000000000..81b7b368993
--- /dev/null
+++ b/tests/mir-opt/const_prop/transmute.unreachable_direct.ConstProp.64bit.diff
@@ -0,0 +1,25 @@
+- // MIR for `unreachable_direct` before ConstProp
++ // MIR for `unreachable_direct` after ConstProp
+  
+  fn unreachable_direct() -> ! {
+      let mut _0: !;                       // return place in scope 0 at $DIR/transmute.rs:+0:39: +0:40
+      let mut _1: !;                       // in scope 0 at $DIR/transmute.rs:+0:41: +3:2
+      let _2: Never;                       // in scope 0 at $DIR/transmute.rs:+1:9: +1:10
+      let mut _3: ();                      // in scope 0 at $DIR/transmute.rs:+1:39: +1:41
+      let mut _4: !;                       // in scope 0 at $DIR/transmute.rs:+2:5: +2:15
+      scope 1 {
+          debug x => _2;                   // in scope 1 at $DIR/transmute.rs:+1:9: +1:10
+      }
+      scope 2 {
+      }
+  
+      bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/transmute.rs:+0:41: +3:2
+          StorageLive(_2);                 // scope 0 at $DIR/transmute.rs:+1:9: +1:10
+          StorageLive(_3);                 // scope 2 at $DIR/transmute.rs:+1:39: +1:41
+          _3 = ();                         // scope 2 at $DIR/transmute.rs:+1:39: +1:41
+          _2 = move _3 as Never (Transmute); // scope 2 at $DIR/transmute.rs:+1:29: +1:42
+          unreachable;                     // scope 2 at $DIR/transmute.rs:+1:29: +1:42
+      }
+  }
+  
diff --git a/tests/mir-opt/const_prop/transmute.unreachable_mut.ConstProp.diff b/tests/mir-opt/const_prop/transmute.unreachable_mut.ConstProp.32bit.diff
index 34f7aea8ed2..47f023cd93d 100644
--- a/tests/mir-opt/const_prop/transmute.unreachable_mut.ConstProp.diff
+++ b/tests/mir-opt/const_prop/transmute.unreachable_mut.ConstProp.32bit.diff
@@ -17,7 +17,11 @@
           StorageLive(_1);                 // scope 0 at $DIR/transmute.rs:+0:38: +3:2
           StorageLive(_2);                 // scope 0 at $DIR/transmute.rs:+1:9: +1:10
           StorageLive(_3);                 // scope 0 at $DIR/transmute.rs:+1:34: +1:52
-          _3 = const 1_usize as &mut Never (Transmute); // scope 2 at $DIR/transmute.rs:+1:34: +1:52
+-         _3 = const 1_usize as &mut Never (Transmute); // scope 2 at $DIR/transmute.rs:+1:34: +1:52
++         _3 = const {0x1 as &mut Never};  // scope 2 at $DIR/transmute.rs:+1:34: +1:52
++                                          // mir::Constant
++                                          // + span: no-location
++                                          // + literal: Const { ty: &mut Never, val: Value(Scalar(0x00000001)) }
           _2 = &mut (*_3);                 // scope 0 at $DIR/transmute.rs:+1:34: +1:52
           StorageDead(_3);                 // scope 0 at $DIR/transmute.rs:+1:54: +1:55
           StorageLive(_4);                 // scope 1 at $DIR/transmute.rs:+2:5: +2:16
diff --git a/tests/mir-opt/const_prop/transmute.unreachable_mut.ConstProp.64bit.diff b/tests/mir-opt/const_prop/transmute.unreachable_mut.ConstProp.64bit.diff
new file mode 100644
index 00000000000..62300d2e313
--- /dev/null
+++ b/tests/mir-opt/const_prop/transmute.unreachable_mut.ConstProp.64bit.diff
@@ -0,0 +1,31 @@
+- // MIR for `unreachable_mut` before ConstProp
++ // MIR for `unreachable_mut` after ConstProp
+  
+  fn unreachable_mut() -> ! {
+      let mut _0: !;                       // return place in scope 0 at $DIR/transmute.rs:+0:36: +0:37
+      let mut _1: !;                       // in scope 0 at $DIR/transmute.rs:+0:38: +3:2
+      let _2: &mut Never;                  // in scope 0 at $DIR/transmute.rs:+1:9: +1:10
+      let mut _3: &mut Never;              // in scope 0 at $DIR/transmute.rs:+1:34: +1:52
+      let mut _4: !;                       // in scope 0 at $DIR/transmute.rs:+2:5: +2:16
+      scope 1 {
+          debug x => _2;                   // in scope 1 at $DIR/transmute.rs:+1:9: +1:10
+      }
+      scope 2 {
+      }
+  
+      bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/transmute.rs:+0:38: +3:2
+          StorageLive(_2);                 // scope 0 at $DIR/transmute.rs:+1:9: +1:10
+          StorageLive(_3);                 // scope 0 at $DIR/transmute.rs:+1:34: +1:52
+-         _3 = const 1_usize as &mut Never (Transmute); // scope 2 at $DIR/transmute.rs:+1:34: +1:52
++         _3 = const {0x1 as &mut Never};  // scope 2 at $DIR/transmute.rs:+1:34: +1:52
++                                          // mir::Constant
++                                          // + span: no-location
++                                          // + literal: Const { ty: &mut Never, val: Value(Scalar(0x0000000000000001)) }
+          _2 = &mut (*_3);                 // scope 0 at $DIR/transmute.rs:+1:34: +1:52
+          StorageDead(_3);                 // scope 0 at $DIR/transmute.rs:+1:54: +1:55
+          StorageLive(_4);                 // scope 1 at $DIR/transmute.rs:+2:5: +2:16
+          unreachable;                     // scope 1 at $DIR/transmute.rs:+2:11: +2:13
+      }
+  }
+  
diff --git a/tests/mir-opt/const_prop/transmute.unreachable_ref.ConstProp.diff b/tests/mir-opt/const_prop/transmute.unreachable_ref.ConstProp.32bit.diff
index ff95f2a0b94..8578f898a7e 100644
--- a/tests/mir-opt/const_prop/transmute.unreachable_ref.ConstProp.diff
+++ b/tests/mir-opt/const_prop/transmute.unreachable_ref.ConstProp.32bit.diff
@@ -15,7 +15,11 @@
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/transmute.rs:+0:38: +3:2
           StorageLive(_2);                 // scope 0 at $DIR/transmute.rs:+1:9: +1:10
-          _2 = const 1_usize as &Never (Transmute); // scope 2 at $DIR/transmute.rs:+1:30: +1:48
+-         _2 = const 1_usize as &Never (Transmute); // scope 2 at $DIR/transmute.rs:+1:30: +1:48
++         _2 = const {0x1 as &Never};      // scope 2 at $DIR/transmute.rs:+1:30: +1:48
++                                          // mir::Constant
++                                          // + span: no-location
++                                          // + literal: Const { ty: &Never, val: Value(Scalar(0x00000001)) }
           StorageLive(_3);                 // scope 1 at $DIR/transmute.rs:+2:5: +2:16
           unreachable;                     // scope 1 at $DIR/transmute.rs:+2:11: +2:13
       }
diff --git a/tests/mir-opt/const_prop/transmute.unreachable_ref.ConstProp.64bit.diff b/tests/mir-opt/const_prop/transmute.unreachable_ref.ConstProp.64bit.diff
new file mode 100644
index 00000000000..8b11cea9365
--- /dev/null
+++ b/tests/mir-opt/const_prop/transmute.unreachable_ref.ConstProp.64bit.diff
@@ -0,0 +1,27 @@
+- // MIR for `unreachable_ref` before ConstProp
++ // MIR for `unreachable_ref` after ConstProp
+  
+  fn unreachable_ref() -> ! {
+      let mut _0: !;                       // return place in scope 0 at $DIR/transmute.rs:+0:36: +0:37
+      let mut _1: !;                       // in scope 0 at $DIR/transmute.rs:+0:38: +3:2
+      let _2: &Never;                      // in scope 0 at $DIR/transmute.rs:+1:9: +1:10
+      let mut _3: !;                       // in scope 0 at $DIR/transmute.rs:+2:5: +2:16
+      scope 1 {
+          debug x => _2;                   // in scope 1 at $DIR/transmute.rs:+1:9: +1:10
+      }
+      scope 2 {
+      }
+  
+      bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/transmute.rs:+0:38: +3:2
+          StorageLive(_2);                 // scope 0 at $DIR/transmute.rs:+1:9: +1:10
+-         _2 = const 1_usize as &Never (Transmute); // scope 2 at $DIR/transmute.rs:+1:30: +1:48
++         _2 = const {0x1 as &Never};      // scope 2 at $DIR/transmute.rs:+1:30: +1:48
++                                          // mir::Constant
++                                          // + span: no-location
++                                          // + literal: Const { ty: &Never, val: Value(Scalar(0x0000000000000001)) }
+          StorageLive(_3);                 // scope 1 at $DIR/transmute.rs:+2:5: +2:16
+          unreachable;                     // scope 1 at $DIR/transmute.rs:+2:11: +2:13
+      }
+  }
+  
diff --git a/tests/mir-opt/const_prop/transmute.valid_char.ConstProp.diff b/tests/mir-opt/const_prop/transmute.valid_char.ConstProp.32bit.diff
index eac33b73003..eac33b73003 100644
--- a/tests/mir-opt/const_prop/transmute.valid_char.ConstProp.diff
+++ b/tests/mir-opt/const_prop/transmute.valid_char.ConstProp.32bit.diff
diff --git a/tests/mir-opt/const_prop/transmute.valid_char.ConstProp.64bit.diff b/tests/mir-opt/const_prop/transmute.valid_char.ConstProp.64bit.diff
new file mode 100644
index 00000000000..eac33b73003
--- /dev/null
+++ b/tests/mir-opt/const_prop/transmute.valid_char.ConstProp.64bit.diff
@@ -0,0 +1,15 @@
+- // MIR for `valid_char` before ConstProp
++ // MIR for `valid_char` after ConstProp
+  
+  fn valid_char() -> char {
+      let mut _0: char;                    // return place in scope 0 at $DIR/transmute.rs:+0:24: +0:28
+      scope 1 {
+      }
+  
+      bb0: {
+-         _0 = const 82_u32 as char (Transmute); // scope 1 at $DIR/transmute.rs:+1:14: +1:33
++         _0 = const 'R';                  // scope 1 at $DIR/transmute.rs:+1:14: +1:33
+          return;                          // scope 0 at $DIR/transmute.rs:+2:2: +2:2
+      }
+  }
+  
diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff b/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff
index 12313b6c58d..e4a7c0d1e72 100644
--- a/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff
+++ b/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.diff
@@ -11,15 +11,24 @@
       }
   
       bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/tuple_literal_propagation.rs:+1:9: +1:10
 -         _1 = (const 1_u32, const 2_u32); // scope 0 at $DIR/tuple_literal_propagation.rs:+1:13: +1:19
 +         _1 = const (1_u32, 2_u32);       // scope 0 at $DIR/tuple_literal_propagation.rs:+1:13: +1:19
-          _2 = consume(_1) -> bb1;         // scope 1 at $DIR/tuple_literal_propagation.rs:+3:5: +3:15
+          StorageLive(_2);                 // scope 1 at $DIR/tuple_literal_propagation.rs:+3:5: +3:15
+          StorageLive(_3);                 // scope 1 at $DIR/tuple_literal_propagation.rs:+3:13: +3:14
+-         _3 = _1;                         // scope 1 at $DIR/tuple_literal_propagation.rs:+3:13: +3:14
++         _3 = const (1_u32, 2_u32);       // scope 1 at $DIR/tuple_literal_propagation.rs:+3:13: +3:14
+          _2 = consume(move _3) -> bb1;    // scope 1 at $DIR/tuple_literal_propagation.rs:+3:5: +3:15
                                            // mir::Constant
-                                           // + span: $DIR/tuple_literal_propagation.rs:6:5: 6:12
+                                           // + span: $DIR/tuple_literal_propagation.rs:7:5: 7:12
                                            // + literal: Const { ty: fn((u32, u32)) {consume}, val: Value(<ZST>) }
       }
   
       bb1: {
+          StorageDead(_3);                 // scope 1 at $DIR/tuple_literal_propagation.rs:+3:14: +3:15
+          StorageDead(_2);                 // scope 1 at $DIR/tuple_literal_propagation.rs:+3:15: +3:16
+          _0 = const ();                   // scope 0 at $DIR/tuple_literal_propagation.rs:+0:11: +4:2
+          StorageDead(_1);                 // scope 0 at $DIR/tuple_literal_propagation.rs:+4:1: +4:2
           return;                          // scope 0 at $DIR/tuple_literal_propagation.rs:+4:2: +4:2
       }
   }
diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.rs b/tests/mir-opt/const_prop/tuple_literal_propagation.rs
index edd748d00ab..f342ae2700e 100644
--- a/tests/mir-opt/const_prop/tuple_literal_propagation.rs
+++ b/tests/mir-opt/const_prop/tuple_literal_propagation.rs
@@ -1,3 +1,4 @@
+// unit-test: ConstProp
 // ignore-wasm32 compiled with panic=abort by default
 // EMIT_MIR tuple_literal_propagation.main.ConstProp.diff
 fn main() {
diff --git a/tests/mir-opt/while_let_loops.change_loop_body.ConstProp.diff b/tests/mir-opt/const_prop/while_let_loops.change_loop_body.ConstProp.diff
index a4f2d8c84d8..37732421870 100644
--- a/tests/mir-opt/while_let_loops.change_loop_body.ConstProp.diff
+++ b/tests/mir-opt/const_prop/while_let_loops.change_loop_body.ConstProp.diff
@@ -4,8 +4,13 @@
   fn change_loop_body() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/while_let_loops.rs:+0:27: +0:27
       let mut _1: i32;                     // in scope 0 at $DIR/while_let_loops.rs:+1:9: +1:15
-      let mut _2: std::option::Option<u32>; // in scope 0 at $DIR/while_let_loops.rs:+2:28: +2:32
-      let mut _3: isize;                   // in scope 0 at $DIR/while_let_loops.rs:+2:15: +2:25
+      let mut _2: ();                      // in scope 0 at $DIR/while_let_loops.rs:+0:1: +6:2
+      let mut _3: std::option::Option<u32>; // in scope 0 at $DIR/while_let_loops.rs:+2:28: +2:32
+      let mut _4: isize;                   // in scope 0 at $DIR/while_let_loops.rs:+2:15: +2:25
+      let mut _5: !;                       // in scope 0 at $DIR/while_let_loops.rs:+2:33: +5:6
+      let mut _6: !;                       // in scope 0 at $DIR/while_let_loops.rs:+2:5: +5:6
+      let _7: ();                          // in scope 0 at $DIR/while_let_loops.rs:+2:5: +5:6
+      let mut _8: !;                       // in scope 0 at $DIR/while_let_loops.rs:+2:5: +5:6
       scope 1 {
           debug _x => _1;                  // in scope 1 at $DIR/while_let_loops.rs:+1:9: +1:15
           scope 2 {
@@ -15,29 +20,33 @@
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/while_let_loops.rs:+1:9: +1:15
           _1 = const 0_i32;                // scope 0 at $DIR/while_let_loops.rs:+1:18: +1:19
-          StorageLive(_2);                 // scope 2 at $DIR/while_let_loops.rs:+2:28: +2:32
-          _2 = Option::<u32>::None;        // scope 2 at $DIR/while_let_loops.rs:+2:28: +2:32
--         _3 = discriminant(_2);           // scope 2 at $DIR/while_let_loops.rs:+2:15: +2:25
--         switchInt(move _3) -> [1: bb1, otherwise: bb3]; // scope 2 at $DIR/while_let_loops.rs:+2:15: +2:25
-+         _3 = const 0_isize;              // scope 2 at $DIR/while_let_loops.rs:+2:15: +2:25
+          StorageLive(_3);                 // scope 2 at $DIR/while_let_loops.rs:+2:28: +2:32
+          _3 = Option::<u32>::None;        // scope 2 at $DIR/while_let_loops.rs:+2:28: +2:32
+-         _4 = discriminant(_3);           // scope 2 at $DIR/while_let_loops.rs:+2:15: +2:25
+-         switchInt(move _4) -> [1: bb1, otherwise: bb3]; // scope 2 at $DIR/while_let_loops.rs:+2:15: +2:25
++         _4 = const 0_isize;              // scope 2 at $DIR/while_let_loops.rs:+2:15: +2:25
 +         switchInt(const 0_isize) -> [1: bb1, otherwise: bb3]; // scope 2 at $DIR/while_let_loops.rs:+2:15: +2:25
       }
   
       bb1: {
-          switchInt(((_2 as Some).0: u32)) -> [0: bb2, otherwise: bb3]; // scope 2 at $DIR/while_let_loops.rs:+2:15: +2:25
+          switchInt(((_3 as Some).0: u32)) -> [0: bb2, otherwise: bb3]; // scope 2 at $DIR/while_let_loops.rs:+2:15: +2:25
       }
   
       bb2: {
           _1 = const 1_i32;                // scope 2 at $DIR/while_let_loops.rs:+3:9: +3:15
+          _0 = const ();                   // scope 2 at $DIR/while_let_loops.rs:+4:9: +4:14
           goto -> bb4;                     // scope 2 at $DIR/while_let_loops.rs:+4:9: +4:14
       }
   
       bb3: {
+          StorageLive(_7);                 // scope 1 at $DIR/while_let_loops.rs:+2:5: +5:6
+          _0 = const ();                   // scope 1 at $DIR/while_let_loops.rs:+2:5: +5:6
+          StorageDead(_7);                 // scope 1 at $DIR/while_let_loops.rs:+5:5: +5:6
           goto -> bb4;                     // scope 1 at no-location
       }
   
       bb4: {
-          StorageDead(_2);                 // scope 1 at $DIR/while_let_loops.rs:+5:5: +5:6
+          StorageDead(_3);                 // scope 1 at $DIR/while_let_loops.rs:+5:5: +5:6
           StorageDead(_1);                 // scope 0 at $DIR/while_let_loops.rs:+6:1: +6:2
           return;                          // scope 0 at $DIR/while_let_loops.rs:+6:2: +6:2
       }
diff --git a/tests/mir-opt/while_let_loops.rs b/tests/mir-opt/const_prop/while_let_loops.rs
index fc56cd6985d..595a94b88be 100644
--- a/tests/mir-opt/while_let_loops.rs
+++ b/tests/mir-opt/const_prop/while_let_loops.rs
@@ -1,5 +1,5 @@
+// unit-test: ConstProp
 // EMIT_MIR while_let_loops.change_loop_body.ConstProp.diff
-// EMIT_MIR while_let_loops.change_loop_body.PreCodegen.after.mir
 
 pub fn change_loop_body() {
     let mut _x = 0;
diff --git a/tests/mir-opt/const_prop_miscompile.bar.ConstProp.diff b/tests/mir-opt/const_prop_miscompile.bar.ConstProp.diff
index def9fc6428f..a5f52d08957 100644
--- a/tests/mir-opt/const_prop_miscompile.bar.ConstProp.diff
+++ b/tests/mir-opt/const_prop_miscompile.bar.ConstProp.diff
@@ -19,8 +19,7 @@
   
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
--         _1 = (const 1_i32,);             // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
-+         _1 = const (1_i32,);             // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
+          _1 = (const 1_i32,);             // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
           StorageLive(_2);                 // scope 1 at $DIR/const_prop_miscompile.rs:+2:5: +4:6
           StorageLive(_3);                 // scope 2 at $DIR/const_prop_miscompile.rs:+3:10: +3:22
           _3 = &raw mut (_1.0: i32);       // scope 2 at $DIR/const_prop_miscompile.rs:+3:10: +3:22
diff --git a/tests/mir-opt/const_prop_miscompile.foo.ConstProp.diff b/tests/mir-opt/const_prop_miscompile.foo.ConstProp.diff
index b54c10a140f..42ddc2a5620 100644
--- a/tests/mir-opt/const_prop_miscompile.foo.ConstProp.diff
+++ b/tests/mir-opt/const_prop_miscompile.foo.ConstProp.diff
@@ -16,8 +16,7 @@
   
       bb0: {
           StorageLive(_1);                 // scope 0 at $DIR/const_prop_miscompile.rs:+1:9: +1:14
--         _1 = (const 1_i32,);             // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
-+         _1 = const (1_i32,);             // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
+          _1 = (const 1_i32,);             // scope 0 at $DIR/const_prop_miscompile.rs:+1:17: +1:21
           StorageLive(_2);                 // scope 1 at $DIR/const_prop_miscompile.rs:+2:6: +2:14
           _2 = &mut (_1.0: i32);           // scope 1 at $DIR/const_prop_miscompile.rs:+2:6: +2:14
           (*_2) = const 5_i32;             // scope 1 at $DIR/const_prop_miscompile.rs:+2:5: +2:18
diff --git a/tests/mir-opt/copy-prop/borrowed_local.f.CopyProp.diff b/tests/mir-opt/copy-prop/borrowed_local.f.CopyProp.diff
index 2a0bff57db9..51707e71661 100644
--- a/tests/mir-opt/copy-prop/borrowed_local.f.CopyProp.diff
+++ b/tests/mir-opt/copy-prop/borrowed_local.f.CopyProp.diff
@@ -20,8 +20,7 @@
       }
   
       bb1: {
--         _0 = opaque::<u8>(_3) -> bb2;    // scope 0 at $DIR/borrowed_local.rs:+12:13: +12:38
-+         _0 = opaque::<u8>(_1) -> bb2;    // scope 0 at $DIR/borrowed_local.rs:+12:13: +12:38
+          _0 = opaque::<u8>(_3) -> bb2;    // scope 0 at $DIR/borrowed_local.rs:+12:13: +12:38
                                            // mir::Constant
                                            // + span: $DIR/borrowed_local.rs:28:28: 28:34
                                            // + literal: Const { ty: fn(u8) -> bool {opaque::<u8>}, val: Value(<ZST>) }
diff --git a/tests/mir-opt/dead-store-elimination/place_mention.main.DeadStoreElimination.diff b/tests/mir-opt/dead-store-elimination/place_mention.main.DeadStoreElimination.diff
new file mode 100644
index 00000000000..761c074ed94
--- /dev/null
+++ b/tests/mir-opt/dead-store-elimination/place_mention.main.DeadStoreElimination.diff
@@ -0,0 +1,25 @@
+- // MIR for `main` before DeadStoreElimination
++ // MIR for `main` after DeadStoreElimination
+  
+  fn main() -> () {
+      let mut _0: ();                      // return place in scope 0 at $DIR/place_mention.rs:+0:11: +0:11
+      let mut _1: (&str, &str);            // in scope 0 at $DIR/place_mention.rs:+3:18: +3:36
+      scope 1 {
+      }
+  
+      bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/place_mention.rs:+3:18: +3:36
+          _1 = (const "Hello", const "World"); // scope 0 at $DIR/place_mention.rs:+3:18: +3:36
+                                           // mir::Constant
+                                           // + span: $DIR/place_mention.rs:8:19: 8:26
+                                           // + literal: Const { ty: &str, val: Value(Slice(..)) }
+                                           // mir::Constant
+                                           // + span: $DIR/place_mention.rs:8:28: 8:35
+                                           // + literal: Const { ty: &str, val: Value(Slice(..)) }
+          PlaceMention(_1);                // scope 0 at $DIR/place_mention.rs:+3:18: +3:36
+          StorageDead(_1);                 // scope 0 at $DIR/place_mention.rs:+3:36: +3:37
+          _0 = const ();                   // scope 0 at $DIR/place_mention.rs:+0:11: +4:2
+          return;                          // scope 0 at $DIR/place_mention.rs:+4:2: +4:2
+      }
+  }
+  
diff --git a/tests/mir-opt/dead-store-elimination/place_mention.rs b/tests/mir-opt/dead-store-elimination/place_mention.rs
new file mode 100644
index 00000000000..59dc74454a4
--- /dev/null
+++ b/tests/mir-opt/dead-store-elimination/place_mention.rs
@@ -0,0 +1,9 @@
+// unit-test: DeadStoreElimination
+// compile-flags: -Zmir-keep-place-mention
+
+// EMIT_MIR place_mention.main.DeadStoreElimination.diff
+fn main() {
+    // Verify that we account for the `PlaceMention` statement as a use of the tuple,
+    // and don't remove it as a dead store.
+    let (_, _) = ("Hello", "World");
+}
diff --git a/tests/mir-opt/dont_yeet_assert.generic.InstCombine.diff b/tests/mir-opt/dont_yeet_assert.generic.InstSimplify.diff
index c0fc1fb1df3..cadf05152a4 100644
--- a/tests/mir-opt/dont_yeet_assert.generic.InstCombine.diff
+++ b/tests/mir-opt/dont_yeet_assert.generic.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `generic` before InstCombine
-+ // MIR for `generic` after InstCombine
+- // MIR for `generic` before InstSimplify
++ // MIR for `generic` after InstSimplify
   
   fn generic() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/dont_yeet_assert.rs:+0:21: +0:21
diff --git a/tests/mir-opt/dont_yeet_assert.rs b/tests/mir-opt/dont_yeet_assert.rs
index 7cec761eaba..38cc5a293e8 100644
--- a/tests/mir-opt/dont_yeet_assert.rs
+++ b/tests/mir-opt/dont_yeet_assert.rs
@@ -1,11 +1,11 @@
 // compile-flags: --crate-type=lib
-// unit-test: InstCombine
+// unit-test: InstSimplify
 
 #![feature(core_intrinsics)]
 
 // Want to make sure this assertion isn't compiled away in generic code.
 
-// EMIT_MIR dont_yeet_assert.generic.InstCombine.diff
+// EMIT_MIR dont_yeet_assert.generic.InstSimplify.diff
 pub fn generic<T>() {
     core::intrinsics::assert_mem_uninitialized_valid::<&T>();
 }
diff --git a/tests/mir-opt/equal_true.opt.InstCombine.diff b/tests/mir-opt/equal_true.opt.InstSimplify.diff
index 8b542a7c19d..4ef4132008e 100644
--- a/tests/mir-opt/equal_true.opt.InstCombine.diff
+++ b/tests/mir-opt/equal_true.opt.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `opt` before InstCombine
-+ // MIR for `opt` after InstCombine
+- // MIR for `opt` before InstSimplify
++ // MIR for `opt` after InstSimplify
   
   fn opt(_1: bool) -> i32 {
       debug x => _1;                       // in scope 0 at $DIR/equal_true.rs:+0:8: +0:9
diff --git a/tests/mir-opt/equal_true.rs b/tests/mir-opt/equal_true.rs
index 717d10c6d76..fbb5d8d37db 100644
--- a/tests/mir-opt/equal_true.rs
+++ b/tests/mir-opt/equal_true.rs
@@ -1,6 +1,6 @@
-// unit-test InstCombine
+// unit-test InstSimplify
 
-// EMIT_MIR equal_true.opt.InstCombine.diff
+// EMIT_MIR equal_true.opt.InstSimplify.diff
 
 fn opt(x: bool) -> i32 {
     if x == true { 0 } else { 1 }
diff --git a/tests/mir-opt/inline/inline_into_box_place.main.Inline.diff b/tests/mir-opt/inline/inline_into_box_place.main.Inline.diff
index a5129e0e8c8..94f24b50ab7 100644
--- a/tests/mir-opt/inline/inline_into_box_place.main.Inline.diff
+++ b/tests/mir-opt/inline/inline_into_box_place.main.Inline.diff
@@ -16,7 +16,8 @@
 +         let mut _4: usize;               // in scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
 +         let mut _5: usize;               // in scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
 +         let mut _6: *mut u8;             // in scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-+         let mut _7: *const std::vec::Vec<u32>; // in scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
++         let mut _7: std::boxed::Box<std::vec::Vec<u32>>; // in scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
++         let mut _8: *const std::vec::Vec<u32>; // in scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
 +         scope 4 {
 +         }
 +     }
@@ -65,9 +66,12 @@
       bb3: {
 -         StorageDead(_1);                 // scope 0 at $DIR/inline_into_box_place.rs:+2:1: +2:2
 -         return;                          // scope 0 at $DIR/inline_into_box_place.rs:+2:2: +2:2
-+         _1 = ShallowInitBox(move _6, std::vec::Vec<u32>); // scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-+         _7 = (((_1.0: std::ptr::Unique<std::vec::Vec<u32>>).0: std::ptr::NonNull<std::vec::Vec<u32>>).0: *const std::vec::Vec<u32>); // scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-+         (*_7) = move _2;                 // scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
++         StorageLive(_7);                 // scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
++         _7 = ShallowInitBox(move _6, std::vec::Vec<u32>); // scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
++         _8 = (((_7.0: std::ptr::Unique<std::vec::Vec<u32>>).0: std::ptr::NonNull<std::vec::Vec<u32>>).0: *const std::vec::Vec<u32>); // scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
++         (*_8) = move _2;                 // scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
++         _1 = move _7;                    // scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
++         StorageDead(_7);                 // scope 3 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
 +         StorageDead(_2);                 // scope 0 at $DIR/inline_into_box_place.rs:+1:48: +1:49
 +         _0 = const ();                   // scope 0 at $DIR/inline_into_box_place.rs:+0:11: +2:2
 +         drop(_1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/inline_into_box_place.rs:+2:1: +2:2
diff --git a/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir b/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir
index 21570a88a6b..8c4ab2557a5 100644
--- a/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir
+++ b/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir
@@ -8,8 +8,9 @@ fn b(_1: &mut Box<T>) -> &mut T {
     let mut _4: &mut std::boxed::Box<T>; // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
     scope 1 (inlined <Box<T> as AsMut<T>>::as_mut) { // at $DIR/issue_58867_inline_as_ref_as_mut.rs:8:7: 8:15
         debug self => _4;                // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-        let mut _5: std::boxed::Box<T>;  // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-        let mut _6: *const T;            // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        let mut _5: &mut T;              // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        let mut _6: std::boxed::Box<T>;  // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        let mut _7: *const T;            // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
     }
 
     bb0: {
@@ -17,9 +18,12 @@ fn b(_1: &mut Box<T>) -> &mut T {
         StorageLive(_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
         StorageLive(_4);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
         _4 = &mut (*_1);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
-        _5 = deref_copy (*_4);           // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-        _6 = (((_5.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-        _3 = &mut (*_6);                 // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        StorageLive(_5);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:7: +1:15
+        _6 = deref_copy (*_4);           // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        _7 = (((_6.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        _5 = &mut (*_7);                 // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        _3 = _5;                         // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        StorageDead(_5);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:7: +1:15
         _2 = &mut (*_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
         StorageDead(_4);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:14: +1:15
         _0 = &mut (*_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
diff --git a/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir b/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir
index 4f9342247d7..b18a41b622e 100644
--- a/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir
+++ b/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir
@@ -7,17 +7,21 @@ fn d(_1: &Box<T>) -> &T {
     let mut _3: &std::boxed::Box<T>;     // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
     scope 1 (inlined <Box<T> as AsRef<T>>::as_ref) { // at $DIR/issue_58867_inline_as_ref_as_mut.rs:18:7: 18:15
         debug self => _3;                // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-        let mut _4: std::boxed::Box<T>;  // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-        let mut _5: *const T;            // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        let _4: &T;                      // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        let mut _5: std::boxed::Box<T>;  // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        let mut _6: *const T;            // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
     }
 
     bb0: {
         StorageLive(_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
         StorageLive(_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
         _3 = &(*_1);                     // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
-        _4 = deref_copy (*_3);           // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-        _5 = (((_4.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-        _2 = &(*_5);                     // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        StorageLive(_4);                 // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        _5 = deref_copy (*_3);           // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        _6 = (((_5.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        _4 = &(*_6);                     // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        _2 = _4;                         // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
+        StorageDead(_4);                 // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
         _0 = &(*_2);                     // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
         StorageDead(_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:14: +1:15
         StorageDead(_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+2:1: +2:2
diff --git a/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.diff b/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.diff
index d76cd0e2bb8..473e02f1cb1 100644
--- a/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.diff
+++ b/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.diff
@@ -12,51 +12,7 @@
 +         debug rhs => _4;                 // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
 +         let mut _5: u16;                 // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
 +         let mut _6: (u32,);              // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         let mut _7: u32;                 // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
 +         scope 2 {
-+             scope 3 (inlined core::num::<impl u16>::unchecked_shl::conv) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                 debug x => _7;           // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                 let mut _8: std::option::Option<u16>; // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                 let mut _9: std::result::Result<u16, std::num::TryFromIntError>; // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                 scope 4 {
-+                     scope 5 (inlined <u32 as TryInto<u16>>::try_into) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                         debug self => _7; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-+                         scope 6 (inlined convert::num::<impl TryFrom<u32> for u16>::try_from) { // at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-+                             debug u => _7; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+                             let mut _10: bool; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+                             let mut _11: u32; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+                             let mut _12: u16; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+                         }
-+                     }
-+                     scope 7 (inlined Result::<u16, TryFromIntError>::ok) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                         debug self => _9; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+                         let mut _13: isize; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+                         let _14: u16;    // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+                         scope 8 {
-+                             debug x => _14; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
-+                         }
-+                     }
-+                     scope 9 (inlined #[track_caller] Option::<u16>::unwrap_unchecked) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                         debug self => _8; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+                         let mut _15: &std::option::Option<u16>; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+                         let mut _16: isize; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+                         scope 10 {
-+                             debug val => _5; // in scope 10 at $SRC_DIR/core/src/option.rs:LL:COL
-+                         }
-+                         scope 11 {
-+                             scope 13 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
-+                                 scope 14 {
-+                                     scope 15 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
-+                                     }
-+                                 }
-+                             }
-+                         }
-+                         scope 12 (inlined Option::<u16>::is_some) { // at $SRC_DIR/core/src/option.rs:LL:COL
-+                             debug self => _15; // in scope 12 at $SRC_DIR/core/src/option.rs:LL:COL
-+                         }
-+                     }
-+                 }
-+             }
 +         }
 +     }
   
@@ -66,87 +22,30 @@
           StorageLive(_4);                 // scope 0 at $DIR/unchecked_shifts.rs:+1:21: +1:22
           _4 = _2;                         // scope 0 at $DIR/unchecked_shifts.rs:+1:21: +1:22
 -         _0 = core::num::<impl u16>::unchecked_shl(move _3, move _4) -> bb1; // scope 0 at $DIR/unchecked_shifts.rs:+1:5: +1:23
--                                          // mir::Constant
--                                          // + span: $DIR/unchecked_shifts.rs:11:7: 11:20
--                                          // + literal: Const { ty: unsafe fn(u16, u32) -> u16 {core::num::<impl u16>::unchecked_shl}, val: Value(<ZST>) }
 +         StorageLive(_5);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
 +         StorageLive(_6);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
 +         _6 = (_4,);                      // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageLive(_7);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         _7 = move (_6.0: u32);           // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageLive(_8);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageLive(_9);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageLive(_10);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         StorageLive(_11);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         _11 = const 65535_u32;           // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         _10 = Gt(_7, move _11);          // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         StorageDead(_11);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         switchInt(move _10) -> [0: bb3, otherwise: bb2]; // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
++         _5 = core::num::<impl u16>::unchecked_shl::conv(move (_6.0: u32)) -> bb1; // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
+                                           // mir::Constant
+-                                          // + span: $DIR/unchecked_shifts.rs:11:7: 11:20
+-                                          // + literal: Const { ty: unsafe fn(u16, u32) -> u16 {core::num::<impl u16>::unchecked_shl}, val: Value(<ZST>) }
++                                          // + span: $SRC_DIR/core/src/num/mod.rs:LL:COL
++                                          // + literal: Const { ty: fn(u32) -> u16 {core::num::<impl u16>::unchecked_shl::conv}, val: Value(<ZST>) }
       }
   
       bb1: {
-+         StorageDead(_5);                 // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
-          StorageDead(_4);                 // scope 0 at $DIR/unchecked_shifts.rs:+1:22: +1:23
-          StorageDead(_3);                 // scope 0 at $DIR/unchecked_shifts.rs:+1:22: +1:23
-          return;                          // scope 0 at $DIR/unchecked_shifts.rs:+2:2: +2:2
-+     }
-+ 
-+     bb2: {
-+         _9 = Result::<u16, TryFromIntError>::Err(const TryFromIntError(())); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+                                          // mir::Constant
-+                                          // + span: no-location
-+                                          // + literal: Const { ty: TryFromIntError, val: Value(<ZST>) }
-+         goto -> bb4;                     // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+     }
-+ 
-+     bb3: {
-+         StorageLive(_12);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         _12 = _7 as u16 (IntToInt);      // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         _9 = Result::<u16, TryFromIntError>::Ok(move _12); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         StorageDead(_12);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         goto -> bb4;                     // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+     }
-+ 
-+     bb4: {
-+         StorageDead(_10);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         StorageLive(_14);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         _13 = discriminant(_9);          // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+         switchInt(move _13) -> [0: bb7, 1: bb5, otherwise: bb6]; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+     }
-+ 
-+     bb5: {
-+         _8 = Option::<u16>::None;        // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+         goto -> bb8;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+     }
-+ 
-+     bb6: {
-+         unreachable;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+     }
-+ 
-+     bb7: {
-+         _14 = move ((_9 as Ok).0: u16);  // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+         _8 = Option::<u16>::Some(move _14); // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
-+         goto -> bb8;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+     }
-+ 
-+     bb8: {
-+         StorageDead(_14);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageDead(_9);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageLive(_15);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         _16 = discriminant(_8);          // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+         switchInt(move _16) -> [1: bb9, otherwise: bb6]; // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+     }
-+ 
-+     bb9: {
-+         _5 = move ((_8 as Some).0: u16); // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+         StorageDead(_15);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageDead(_8);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageDead(_7);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
 +         StorageDead(_6);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         _0 = unchecked_shl::<u16>(_3, move _5) -> [return: bb1, unwind unreachable]; // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
++         _0 = unchecked_shl::<u16>(_3, move _5) -> [return: bb2, unwind unreachable]; // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
 +                                          // mir::Constant
 +                                          // + span: $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
 +                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u16, u16) -> u16 {unchecked_shl::<u16>}, val: Value(<ZST>) }
++     }
++ 
++     bb2: {
++         StorageDead(_5);                 // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
+          StorageDead(_4);                 // scope 0 at $DIR/unchecked_shifts.rs:+1:22: +1:23
+          StorageDead(_3);                 // scope 0 at $DIR/unchecked_shifts.rs:+1:22: +1:23
+          return;                          // scope 0 at $DIR/unchecked_shifts.rs:+2:2: +2:2
       }
   }
   
diff --git a/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.mir b/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.mir
index 3c175ed1504..9b7b11ef659 100644
--- a/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.mir
+++ b/tests/mir-opt/inline/unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.mir
@@ -9,51 +9,7 @@ fn unchecked_shl_unsigned_smaller(_1: u16, _2: u32) -> u16 {
         debug rhs => _2;                 // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
         let mut _3: u16;                 // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
         let mut _4: (u32,);              // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        let mut _5: u32;                 // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
         scope 2 {
-            scope 3 (inlined core::num::<impl u16>::unchecked_shl::conv) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                debug x => _5;           // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                let mut _6: std::option::Option<u16>; // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                let mut _7: std::result::Result<u16, std::num::TryFromIntError>; // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                scope 4 {
-                    scope 5 (inlined <u32 as TryInto<u16>>::try_into) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                        debug self => _5; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-                        scope 6 (inlined convert::num::<impl TryFrom<u32> for u16>::try_from) { // at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-                            debug u => _5; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-                            let mut _8: bool; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-                            let mut _9: u32; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-                            let mut _10: u16; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-                        }
-                    }
-                    scope 7 (inlined Result::<u16, TryFromIntError>::ok) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                        debug self => _7; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-                        let mut _11: isize; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-                        let _12: u16;    // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-                        scope 8 {
-                            debug x => _12; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
-                        }
-                    }
-                    scope 9 (inlined #[track_caller] Option::<u16>::unwrap_unchecked) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                        debug self => _6; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-                        let mut _13: &std::option::Option<u16>; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-                        let mut _14: isize; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-                        scope 10 {
-                            debug val => _3; // in scope 10 at $SRC_DIR/core/src/option.rs:LL:COL
-                        }
-                        scope 11 {
-                            scope 13 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
-                                scope 14 {
-                                    scope 15 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
-                                    }
-                                }
-                            }
-                        }
-                        scope 12 (inlined Option::<u16>::is_some) { // at $SRC_DIR/core/src/option.rs:LL:COL
-                            debug self => _13; // in scope 12 at $SRC_DIR/core/src/option.rs:LL:COL
-                        }
-                    }
-                }
-            }
         }
     }
 
@@ -61,78 +17,22 @@ fn unchecked_shl_unsigned_smaller(_1: u16, _2: u32) -> u16 {
         StorageLive(_3);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
         StorageLive(_4);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
         _4 = (_2,);                      // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageLive(_5);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        _5 = move (_4.0: u32);           // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageLive(_6);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageLive(_7);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageLive(_8);                 // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        StorageLive(_9);                 // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        _9 = const 65535_u32;            // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        _8 = Gt(_5, move _9);            // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        StorageDead(_9);                 // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        switchInt(move _8) -> [0: bb3, otherwise: bb2]; // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-    }
-
-    bb1: {
-        StorageDead(_3);                 // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
-        return;                          // scope 0 at $DIR/unchecked_shifts.rs:+2:2: +2:2
-    }
-
-    bb2: {
-        _7 = Result::<u16, TryFromIntError>::Err(const TryFromIntError(())); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
+        _3 = core::num::<impl u16>::unchecked_shl::conv(move (_4.0: u32)) -> bb1; // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
                                          // mir::Constant
-                                         // + span: no-location
-                                         // + literal: Const { ty: TryFromIntError, val: Value(<ZST>) }
-        goto -> bb4;                     // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-    }
-
-    bb3: {
-        StorageLive(_10);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        _10 = _5 as u16 (IntToInt);      // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        _7 = Result::<u16, TryFromIntError>::Ok(move _10); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        StorageDead(_10);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        goto -> bb4;                     // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-    }
-
-    bb4: {
-        StorageDead(_8);                 // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        StorageLive(_12);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        _11 = discriminant(_7);          // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-        switchInt(move _11) -> [0: bb7, 1: bb5, otherwise: bb6]; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-    }
-
-    bb5: {
-        _6 = Option::<u16>::None;        // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-        goto -> bb8;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-    }
-
-    bb6: {
-        unreachable;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-    }
-
-    bb7: {
-        _12 = move ((_7 as Ok).0: u16);  // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-        _6 = Option::<u16>::Some(move _12); // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
-        goto -> bb8;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-    }
-
-    bb8: {
-        StorageDead(_12);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageDead(_7);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageLive(_13);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        _14 = discriminant(_6);          // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-        switchInt(move _14) -> [1: bb9, otherwise: bb6]; // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
+                                         // + span: $SRC_DIR/core/src/num/mod.rs:LL:COL
+                                         // + literal: Const { ty: fn(u32) -> u16 {core::num::<impl u16>::unchecked_shl::conv}, val: Value(<ZST>) }
     }
 
-    bb9: {
-        _3 = move ((_6 as Some).0: u16); // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-        StorageDead(_13);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageDead(_6);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageDead(_5);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
+    bb1: {
         StorageDead(_4);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        _0 = unchecked_shl::<u16>(_1, move _3) -> [return: bb1, unwind unreachable]; // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
+        _0 = unchecked_shl::<u16>(_1, move _3) -> [return: bb2, unwind unreachable]; // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
                                          // mir::Constant
                                          // + span: $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u16, u16) -> u16 {unchecked_shl::<u16>}, val: Value(<ZST>) }
     }
+
+    bb2: {
+        StorageDead(_3);                 // scope 2 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
+        return;                          // scope 0 at $DIR/unchecked_shifts.rs:+2:2: +2:2
+    }
 }
diff --git a/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.Inline.diff b/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.Inline.diff
index f3d3e6090bb..9638ddda46b 100644
--- a/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.Inline.diff
+++ b/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.Inline.diff
@@ -12,51 +12,7 @@
 +         debug rhs => _4;                 // in scope 1 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
 +         let mut _5: i16;                 // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
 +         let mut _6: (u32,);              // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         let mut _7: u32;                 // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
 +         scope 2 {
-+             scope 3 (inlined core::num::<impl i16>::unchecked_shr::conv) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                 debug x => _7;           // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                 let mut _8: std::option::Option<i16>; // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                 let mut _9: std::result::Result<i16, std::num::TryFromIntError>; // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                 scope 4 {
-+                     scope 5 (inlined <u32 as TryInto<i16>>::try_into) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                         debug self => _7; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-+                         scope 6 (inlined convert::num::<impl TryFrom<u32> for i16>::try_from) { // at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-+                             debug u => _7; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+                             let mut _10: bool; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+                             let mut _11: u32; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+                             let mut _12: i16; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+                         }
-+                     }
-+                     scope 7 (inlined Result::<i16, TryFromIntError>::ok) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                         debug self => _9; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+                         let mut _13: isize; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+                         let _14: i16;    // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+                         scope 8 {
-+                             debug x => _14; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
-+                         }
-+                     }
-+                     scope 9 (inlined #[track_caller] Option::<i16>::unwrap_unchecked) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+                         debug self => _8; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+                         let mut _15: &std::option::Option<i16>; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+                         let mut _16: isize; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+                         scope 10 {
-+                             debug val => _5; // in scope 10 at $SRC_DIR/core/src/option.rs:LL:COL
-+                         }
-+                         scope 11 {
-+                             scope 13 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
-+                                 scope 14 {
-+                                     scope 15 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
-+                                     }
-+                                 }
-+                             }
-+                         }
-+                         scope 12 (inlined Option::<i16>::is_some) { // at $SRC_DIR/core/src/option.rs:LL:COL
-+                             debug self => _15; // in scope 12 at $SRC_DIR/core/src/option.rs:LL:COL
-+                         }
-+                     }
-+                 }
-+             }
 +         }
 +     }
   
@@ -66,87 +22,30 @@
           StorageLive(_4);                 // scope 0 at $DIR/unchecked_shifts.rs:+1:21: +1:22
           _4 = _2;                         // scope 0 at $DIR/unchecked_shifts.rs:+1:21: +1:22
 -         _0 = core::num::<impl i16>::unchecked_shr(move _3, move _4) -> bb1; // scope 0 at $DIR/unchecked_shifts.rs:+1:5: +1:23
--                                          // mir::Constant
--                                          // + span: $DIR/unchecked_shifts.rs:17:7: 17:20
--                                          // + literal: Const { ty: unsafe fn(i16, u32) -> i16 {core::num::<impl i16>::unchecked_shr}, val: Value(<ZST>) }
 +         StorageLive(_5);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
 +         StorageLive(_6);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
 +         _6 = (_4,);                      // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageLive(_7);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         _7 = move (_6.0: u32);           // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageLive(_8);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageLive(_9);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageLive(_10);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         StorageLive(_11);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         _11 = const 32767_u32;           // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         _10 = Gt(_7, move _11);          // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         StorageDead(_11);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         switchInt(move _10) -> [0: bb3, otherwise: bb2]; // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
++         _5 = core::num::<impl i16>::unchecked_shr::conv(move (_6.0: u32)) -> bb1; // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
+                                           // mir::Constant
+-                                          // + span: $DIR/unchecked_shifts.rs:17:7: 17:20
+-                                          // + literal: Const { ty: unsafe fn(i16, u32) -> i16 {core::num::<impl i16>::unchecked_shr}, val: Value(<ZST>) }
++                                          // + span: $SRC_DIR/core/src/num/mod.rs:LL:COL
++                                          // + literal: Const { ty: fn(u32) -> i16 {core::num::<impl i16>::unchecked_shr::conv}, val: Value(<ZST>) }
       }
   
       bb1: {
-+         StorageDead(_5);                 // scope 2 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
-          StorageDead(_4);                 // scope 0 at $DIR/unchecked_shifts.rs:+1:22: +1:23
-          StorageDead(_3);                 // scope 0 at $DIR/unchecked_shifts.rs:+1:22: +1:23
-          return;                          // scope 0 at $DIR/unchecked_shifts.rs:+2:2: +2:2
-+     }
-+ 
-+     bb2: {
-+         _9 = Result::<i16, TryFromIntError>::Err(const TryFromIntError(())); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+                                          // mir::Constant
-+                                          // + span: no-location
-+                                          // + literal: Const { ty: TryFromIntError, val: Value(<ZST>) }
-+         goto -> bb4;                     // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+     }
-+ 
-+     bb3: {
-+         StorageLive(_12);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         _12 = _7 as i16 (IntToInt);      // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         _9 = Result::<i16, TryFromIntError>::Ok(move _12); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         StorageDead(_12);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         goto -> bb4;                     // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+     }
-+ 
-+     bb4: {
-+         StorageDead(_10);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-+         StorageLive(_14);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         _13 = discriminant(_9);          // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+         switchInt(move _13) -> [0: bb7, 1: bb5, otherwise: bb6]; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+     }
-+ 
-+     bb5: {
-+         _8 = Option::<i16>::None;        // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+         goto -> bb8;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+     }
-+ 
-+     bb6: {
-+         unreachable;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+     }
-+ 
-+     bb7: {
-+         _14 = move ((_9 as Ok).0: i16);  // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+         _8 = Option::<i16>::Some(move _14); // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
-+         goto -> bb8;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-+     }
-+ 
-+     bb8: {
-+         StorageDead(_14);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageDead(_9);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageLive(_15);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         _16 = discriminant(_8);          // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+         switchInt(move _16) -> [1: bb9, otherwise: bb6]; // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+     }
-+ 
-+     bb9: {
-+         _5 = move ((_8 as Some).0: i16); // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-+         StorageDead(_15);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageDead(_8);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         StorageDead(_7);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
 +         StorageDead(_6);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-+         _0 = unchecked_shr::<i16>(_3, move _5) -> [return: bb1, unwind unreachable]; // scope 2 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
++         _0 = unchecked_shr::<i16>(_3, move _5) -> [return: bb2, unwind unreachable]; // scope 2 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
 +                                          // mir::Constant
 +                                          // + span: $SRC_DIR/core/src/num/int_macros.rs:LL:COL
 +                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(i16, i16) -> i16 {unchecked_shr::<i16>}, val: Value(<ZST>) }
++     }
++ 
++     bb2: {
++         StorageDead(_5);                 // scope 2 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
+          StorageDead(_4);                 // scope 0 at $DIR/unchecked_shifts.rs:+1:22: +1:23
+          StorageDead(_3);                 // scope 0 at $DIR/unchecked_shifts.rs:+1:22: +1:23
+          return;                          // scope 0 at $DIR/unchecked_shifts.rs:+2:2: +2:2
       }
   }
   
diff --git a/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.PreCodegen.after.mir b/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.PreCodegen.after.mir
index 724b3c56723..afe6d08741b 100644
--- a/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.PreCodegen.after.mir
+++ b/tests/mir-opt/inline/unchecked_shifts.unchecked_shr_signed_smaller.PreCodegen.after.mir
@@ -9,51 +9,7 @@ fn unchecked_shr_signed_smaller(_1: i16, _2: u32) -> i16 {
         debug rhs => _2;                 // in scope 1 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
         let mut _3: i16;                 // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
         let mut _4: (u32,);              // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        let mut _5: u32;                 // in scope 1 at $SRC_DIR/core/src/num/mod.rs:LL:COL
         scope 2 {
-            scope 3 (inlined core::num::<impl i16>::unchecked_shr::conv) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                debug x => _5;           // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                let mut _6: std::option::Option<i16>; // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                let mut _7: std::result::Result<i16, std::num::TryFromIntError>; // in scope 3 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                scope 4 {
-                    scope 5 (inlined <u32 as TryInto<i16>>::try_into) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                        debug self => _5; // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-                        scope 6 (inlined convert::num::<impl TryFrom<u32> for i16>::try_from) { // at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-                            debug u => _5; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-                            let mut _8: bool; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-                            let mut _9: u32; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-                            let mut _10: i16; // in scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-                        }
-                    }
-                    scope 7 (inlined Result::<i16, TryFromIntError>::ok) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                        debug self => _7; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-                        let mut _11: isize; // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-                        let _12: i16;    // in scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-                        scope 8 {
-                            debug x => _12; // in scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
-                        }
-                    }
-                    scope 9 (inlined #[track_caller] Option::<i16>::unwrap_unchecked) { // at $SRC_DIR/core/src/num/mod.rs:LL:COL
-                        debug self => _6; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-                        let mut _13: &std::option::Option<i16>; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-                        let mut _14: isize; // in scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-                        scope 10 {
-                            debug val => _3; // in scope 10 at $SRC_DIR/core/src/option.rs:LL:COL
-                        }
-                        scope 11 {
-                            scope 13 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
-                                scope 14 {
-                                    scope 15 (inlined unreachable_unchecked::runtime) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
-                                    }
-                                }
-                            }
-                        }
-                        scope 12 (inlined Option::<i16>::is_some) { // at $SRC_DIR/core/src/option.rs:LL:COL
-                            debug self => _13; // in scope 12 at $SRC_DIR/core/src/option.rs:LL:COL
-                        }
-                    }
-                }
-            }
         }
     }
 
@@ -61,78 +17,22 @@ fn unchecked_shr_signed_smaller(_1: i16, _2: u32) -> i16 {
         StorageLive(_3);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
         StorageLive(_4);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
         _4 = (_2,);                      // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageLive(_5);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        _5 = move (_4.0: u32);           // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageLive(_6);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageLive(_7);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageLive(_8);                 // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        StorageLive(_9);                 // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        _9 = const 32767_u32;            // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        _8 = Gt(_5, move _9);            // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        StorageDead(_9);                 // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        switchInt(move _8) -> [0: bb3, otherwise: bb2]; // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-    }
-
-    bb1: {
-        StorageDead(_3);                 // scope 2 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
-        return;                          // scope 0 at $DIR/unchecked_shifts.rs:+2:2: +2:2
-    }
-
-    bb2: {
-        _7 = Result::<i16, TryFromIntError>::Err(const TryFromIntError(())); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
+        _3 = core::num::<impl i16>::unchecked_shr::conv(move (_4.0: u32)) -> bb1; // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
                                          // mir::Constant
-                                         // + span: no-location
-                                         // + literal: Const { ty: TryFromIntError, val: Value(<ZST>) }
-        goto -> bb4;                     // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-    }
-
-    bb3: {
-        StorageLive(_10);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        _10 = _5 as i16 (IntToInt);      // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        _7 = Result::<i16, TryFromIntError>::Ok(move _10); // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        StorageDead(_10);                // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        goto -> bb4;                     // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-    }
-
-    bb4: {
-        StorageDead(_8);                 // scope 6 at $SRC_DIR/core/src/convert/num.rs:LL:COL
-        StorageLive(_12);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        _11 = discriminant(_7);          // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-        switchInt(move _11) -> [0: bb7, 1: bb5, otherwise: bb6]; // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-    }
-
-    bb5: {
-        _6 = Option::<i16>::None;        // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-        goto -> bb8;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-    }
-
-    bb6: {
-        unreachable;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-    }
-
-    bb7: {
-        _12 = move ((_7 as Ok).0: i16);  // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-        _6 = Option::<i16>::Some(move _12); // scope 8 at $SRC_DIR/core/src/result.rs:LL:COL
-        goto -> bb8;                     // scope 7 at $SRC_DIR/core/src/result.rs:LL:COL
-    }
-
-    bb8: {
-        StorageDead(_12);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageDead(_7);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageLive(_13);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        _14 = discriminant(_6);          // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-        switchInt(move _14) -> [1: bb9, otherwise: bb6]; // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
+                                         // + span: $SRC_DIR/core/src/num/mod.rs:LL:COL
+                                         // + literal: Const { ty: fn(u32) -> i16 {core::num::<impl i16>::unchecked_shr::conv}, val: Value(<ZST>) }
     }
 
-    bb9: {
-        _3 = move ((_6 as Some).0: i16); // scope 9 at $SRC_DIR/core/src/option.rs:LL:COL
-        StorageDead(_13);                // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageDead(_6);                 // scope 4 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        StorageDead(_5);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
+    bb1: {
         StorageDead(_4);                 // scope 2 at $SRC_DIR/core/src/num/mod.rs:LL:COL
-        _0 = unchecked_shr::<i16>(_1, move _3) -> [return: bb1, unwind unreachable]; // scope 2 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
+        _0 = unchecked_shr::<i16>(_1, move _3) -> [return: bb2, unwind unreachable]; // scope 2 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
                                          // mir::Constant
                                          // + span: $SRC_DIR/core/src/num/int_macros.rs:LL:COL
                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(i16, i16) -> i16 {unchecked_shr::<i16>}, val: Value(<ZST>) }
     }
+
+    bb2: {
+        StorageDead(_3);                 // scope 2 at $SRC_DIR/core/src/num/int_macros.rs:LL:COL
+        return;                          // scope 0 at $DIR/unchecked_shifts.rs:+2:2: +2:2
+    }
 }
diff --git a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.diff b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.diff
index 8a8cd896e85..778ecc46d73 100644
--- a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.diff
+++ b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.diff
@@ -9,8 +9,9 @@
 +         debug self => _2;                // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
 +         let mut _3: &std::option::Option<T>; // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
 +         let mut _4: isize;               // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
++         let _5: T;                       // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
 +         scope 2 {
-+             debug val => _0;             // in scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
++             debug val => _5;             // in scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
 +         }
 +         scope 3 {
 +             scope 5 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
@@ -46,7 +47,10 @@
 -     bb2 (cleanup): {
 -         resume;                          // scope 0 at $DIR/unwrap_unchecked.rs:+0:1: +2:2
 +     bb2: {
-+         _0 = move ((_2 as Some).0: T);   // scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
++         StorageLive(_5);                 // scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
++         _5 = move ((_2 as Some).0: T);   // scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
++         _0 = move _5;                    // scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
++         StorageDead(_5);                 // scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
 +         StorageDead(_3);                 // scope 0 at $DIR/unwrap_unchecked.rs:+1:9: +1:27
 +         StorageDead(_2);                 // scope 0 at $DIR/unwrap_unchecked.rs:+1:26: +1:27
 +         return;                          // scope 0 at $DIR/unwrap_unchecked.rs:+2:2: +2:2
diff --git a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir
index c5e2469fc27..5cdf4fa46e3 100644
--- a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir
+++ b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir
@@ -7,8 +7,9 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
         debug self => _1;                // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
         let mut _2: &std::option::Option<T>; // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
         let mut _3: isize;               // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
+        let _4: T;                       // in scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
         scope 2 {
-            debug val => _0;             // in scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
+            debug val => _4;             // in scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
         }
         scope 3 {
             scope 5 (inlined unreachable_unchecked) { // at $SRC_DIR/core/src/option.rs:LL:COL
@@ -34,7 +35,10 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
     }
 
     bb2: {
-        _0 = move ((_1 as Some).0: T);   // scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
+        StorageLive(_4);                 // scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
+        _4 = move ((_1 as Some).0: T);   // scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
+        _0 = move _4;                    // scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
+        StorageDead(_4);                 // scope 1 at $SRC_DIR/core/src/option.rs:LL:COL
         StorageDead(_2);                 // scope 0 at $DIR/unwrap_unchecked.rs:+1:9: +1:27
         return;                          // scope 0 at $DIR/unwrap_unchecked.rs:+2:2: +2:2
     }
diff --git a/tests/mir-opt/instcombine_duplicate_switch_targets.assert_zero.InstCombine.diff b/tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff
index e04079453d2..04ba8dd8e4d 100644
--- a/tests/mir-opt/instcombine_duplicate_switch_targets.assert_zero.InstCombine.diff
+++ b/tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff
@@ -1,21 +1,21 @@
-- // MIR for `assert_zero` before InstCombine
-+ // MIR for `assert_zero` after InstCombine
+- // MIR for `assert_zero` before InstSimplify
++ // MIR for `assert_zero` after InstSimplify
   
   fn assert_zero(_1: u8) -> u8 {
-      let mut _0: u8;                      // return place in scope 0 at $DIR/instcombine_duplicate_switch_targets.rs:+0:37: +0:39
+      let mut _0: u8;                      // return place in scope 0 at $DIR/instsimplify_duplicate_switch_targets.rs:+0:37: +0:39
   
       bb0: {
--         switchInt(_1) -> [0: bb2, 1: bb1, otherwise: bb1]; // scope 0 at $DIR/instcombine_duplicate_switch_targets.rs:+3:13: +7:14
-+         switchInt(_1) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/instcombine_duplicate_switch_targets.rs:+3:13: +7:14
+-         switchInt(_1) -> [0: bb2, 1: bb1, otherwise: bb1]; // scope 0 at $DIR/instsimplify_duplicate_switch_targets.rs:+3:13: +7:14
++         switchInt(_1) -> [0: bb2, otherwise: bb1]; // scope 0 at $DIR/instsimplify_duplicate_switch_targets.rs:+3:13: +7:14
       }
   
       bb1: {
-          unreachable;                     // scope 0 at $DIR/instcombine_duplicate_switch_targets.rs:+10:13: +10:26
+          unreachable;                     // scope 0 at $DIR/instsimplify_duplicate_switch_targets.rs:+10:13: +10:26
       }
   
       bb2: {
-          _0 = _1;                         // scope 0 at $DIR/instcombine_duplicate_switch_targets.rs:+13:13: +13:20
-          return;                          // scope 0 at $DIR/instcombine_duplicate_switch_targets.rs:+14:13: +14:21
+          _0 = _1;                         // scope 0 at $DIR/instsimplify_duplicate_switch_targets.rs:+13:13: +13:20
+          return;                          // scope 0 at $DIR/instsimplify_duplicate_switch_targets.rs:+14:13: +14:21
       }
   }
   
diff --git a/tests/mir-opt/instcombine_duplicate_switch_targets.rs b/tests/mir-opt/instsimplify_duplicate_switch_targets.rs
index ef3b487afa3..3e280a40fda 100644
--- a/tests/mir-opt/instcombine_duplicate_switch_targets.rs
+++ b/tests/mir-opt/instsimplify_duplicate_switch_targets.rs
@@ -3,9 +3,9 @@
 
 use std::intrinsics::mir::*;
 
-// unit-test: InstCombine
+// unit-test: InstSimplify
 
-// EMIT_MIR instcombine_duplicate_switch_targets.assert_zero.InstCombine.diff
+// EMIT_MIR instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff
 #[custom_mir(dialect = "runtime", phase = "post-cleanup")]
 pub unsafe fn assert_zero(x: u8) -> u8 {
     mir!(
diff --git a/tests/mir-opt/intrinsic_asserts.generic.InstCombine.diff b/tests/mir-opt/intrinsic_asserts.generic.InstSimplify.diff
index 09fc145e734..a59f4a43aed 100644
--- a/tests/mir-opt/intrinsic_asserts.generic.InstCombine.diff
+++ b/tests/mir-opt/intrinsic_asserts.generic.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `generic` before InstCombine
-+ // MIR for `generic` after InstCombine
+- // MIR for `generic` before InstSimplify
++ // MIR for `generic` after InstSimplify
   
   fn generic() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/intrinsic_asserts.rs:+0:21: +0:21
diff --git a/tests/mir-opt/intrinsic_asserts.panics.InstCombine.diff b/tests/mir-opt/intrinsic_asserts.panics.InstSimplify.diff
index c52174ef5ea..195e8bd4eae 100644
--- a/tests/mir-opt/intrinsic_asserts.panics.InstCombine.diff
+++ b/tests/mir-opt/intrinsic_asserts.panics.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `panics` before InstCombine
-+ // MIR for `panics` after InstCombine
+- // MIR for `panics` before InstSimplify
++ // MIR for `panics` after InstSimplify
   
   fn panics() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/intrinsic_asserts.rs:+0:17: +0:17
diff --git a/tests/mir-opt/intrinsic_asserts.removable.InstCombine.diff b/tests/mir-opt/intrinsic_asserts.removable.InstSimplify.diff
index d059d47ee58..a4a65074caa 100644
--- a/tests/mir-opt/intrinsic_asserts.removable.InstCombine.diff
+++ b/tests/mir-opt/intrinsic_asserts.removable.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `removable` before InstCombine
-+ // MIR for `removable` after InstCombine
+- // MIR for `removable` before InstSimplify
++ // MIR for `removable` after InstSimplify
   
   fn removable() -> () {
       let mut _0: ();                      // return place in scope 0 at $DIR/intrinsic_asserts.rs:+0:20: +0:20
diff --git a/tests/mir-opt/intrinsic_asserts.rs b/tests/mir-opt/intrinsic_asserts.rs
index 8fb99cdf6e0..302d4bda188 100644
--- a/tests/mir-opt/intrinsic_asserts.rs
+++ b/tests/mir-opt/intrinsic_asserts.rs
@@ -2,7 +2,7 @@
 #![feature(core_intrinsics)]
 
 // All these assertions pass, so all the intrinsic calls should be deleted.
-// EMIT_MIR intrinsic_asserts.removable.InstCombine.diff
+// EMIT_MIR intrinsic_asserts.removable.InstSimplify.diff
 pub fn removable() {
     core::intrinsics::assert_inhabited::<()>();
     core::intrinsics::assert_zero_valid::<u8>();
@@ -12,7 +12,7 @@ pub fn removable() {
 enum Never {}
 
 // These assertions all diverge, so their target blocks should become None.
-// EMIT_MIR intrinsic_asserts.panics.InstCombine.diff
+// EMIT_MIR intrinsic_asserts.panics.InstSimplify.diff
 pub fn panics() {
     core::intrinsics::assert_inhabited::<Never>();
     core::intrinsics::assert_zero_valid::<&u8>();
@@ -20,7 +20,7 @@ pub fn panics() {
 }
 
 // Whether or not these asserts pass isn't known, so they shouldn't be modified.
-// EMIT_MIR intrinsic_asserts.generic.InstCombine.diff
+// EMIT_MIR intrinsic_asserts.generic.InstSimplify.diff
 pub fn generic<T>() {
     core::intrinsics::assert_inhabited::<T>();
     core::intrinsics::assert_zero_valid::<T>();
diff --git a/tests/mir-opt/issue_78192.f.InstCombine.diff b/tests/mir-opt/issue_78192.f.InstSimplify.diff
index 116ca304c99..914d7ceb29a 100644
--- a/tests/mir-opt/issue_78192.f.InstCombine.diff
+++ b/tests/mir-opt/issue_78192.f.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `f` before InstCombine
-+ // MIR for `f` after InstCombine
+- // MIR for `f` before InstSimplify
++ // MIR for `f` after InstSimplify
   
   fn f(_1: &T) -> *const T {
       debug a => _1;                       // in scope 0 at $DIR/issue_78192.rs:+0:13: +0:14
diff --git a/tests/mir-opt/issue_78192.rs b/tests/mir-opt/issue_78192.rs
index 39f665402b0..95142a3e463 100644
--- a/tests/mir-opt/issue_78192.rs
+++ b/tests/mir-opt/issue_78192.rs
@@ -8,4 +8,4 @@ fn main() {
     f(&2);
 }
 
-// EMIT_MIR issue_78192.f.InstCombine.diff
+// EMIT_MIR issue_78192.f.InstSimplify.diff
diff --git a/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff b/tests/mir-opt/lower_intrinsics.option_payload.LowerIntrinsics.diff
index 93863fca344..b022e2ba42b 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:132:18: 132:54
+-                                          // + span: $DIR/lower_intrinsics.rs:137:18: 137: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:133:18: 133:54
+-                                          // + span: $DIR/lower_intrinsics.rs:138:18: 138: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 37f1995a53a..60a1dd0ba7d 100644
--- a/tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff
+++ b/tests/mir-opt/lower_intrinsics.ptr_offset.LowerIntrinsics.diff
@@ -15,7 +15,7 @@
           _4 = _2;                         // scope 0 at $DIR/lower_intrinsics.rs:+1:33: +1:34
 -         _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:139:5: 139:29
+-                                          // + span: $DIR/lower_intrinsics.rs:144:5: 144: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 2b1e67be2a9..0ca88a42e3f 100644
--- a/tests/mir-opt/lower_intrinsics.rs
+++ b/tests/mir-opt/lower_intrinsics.rs
@@ -124,6 +124,11 @@ pub fn read_via_copy_uninhabited(r: &Never) -> Never {
     unsafe { core::intrinsics::read_via_copy(r) }
 }
 
+// EMIT_MIR lower_intrinsics.write_via_move_string.LowerIntrinsics.diff
+pub fn write_via_move_string(r: &mut String, v: String) {
+    unsafe { core::intrinsics::write_via_move(r, v) }
+}
+
 pub enum Never {}
 
 // EMIT_MIR lower_intrinsics.option_payload.LowerIntrinsics.diff
diff --git a/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.diff b/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.diff
new file mode 100644
index 00000000000..38d99f661dc
--- /dev/null
+++ b/tests/mir-opt/lower_intrinsics.write_via_move_string.LowerIntrinsics.diff
@@ -0,0 +1,36 @@
+- // MIR for `write_via_move_string` before LowerIntrinsics
++ // MIR for `write_via_move_string` after LowerIntrinsics
+  
+  fn write_via_move_string(_1: &mut String, _2: String) -> () {
+      debug r => _1;                       // in scope 0 at $DIR/lower_intrinsics.rs:+0:30: +0:31
+      debug v => _2;                       // in scope 0 at $DIR/lower_intrinsics.rs:+0:46: +0:47
+      let mut _0: ();                      // return place in scope 0 at $DIR/lower_intrinsics.rs:+0:57: +0:57
+      let mut _3: *mut std::string::String; // in scope 0 at $DIR/lower_intrinsics.rs:+1:47: +1:48
+      let mut _4: std::string::String;     // in scope 0 at $DIR/lower_intrinsics.rs:+1:50: +1:51
+      scope 1 {
+      }
+  
+      bb0: {
+          StorageLive(_3);                 // scope 1 at $DIR/lower_intrinsics.rs:+1:47: +1:48
+          _3 = &raw mut (*_1);             // scope 1 at $DIR/lower_intrinsics.rs:+1:47: +1:48
+          StorageLive(_4);                 // scope 1 at $DIR/lower_intrinsics.rs:+1:50: +1:51
+          _4 = move _2;                    // scope 1 at $DIR/lower_intrinsics.rs:+1:50: +1:51
+-         _0 = write_via_move::<String>(move _3, move _4) -> [return: bb1, unwind unreachable]; // scope 1 at $DIR/lower_intrinsics.rs:+1:14: +1:52
+-                                          // mir::Constant
+-                                          // + span: $DIR/lower_intrinsics.rs:129:14: 129:46
+-                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(*mut String, String) {write_via_move::<String>}, val: Value(<ZST>) }
++         (*_3) = move _4;                 // scope 1 at $DIR/lower_intrinsics.rs:+1:14: +1:52
++         goto -> bb1;                     // scope 1 at $DIR/lower_intrinsics.rs:+1:14: +1:52
+      }
+  
+      bb1: {
+          StorageDead(_4);                 // scope 1 at $DIR/lower_intrinsics.rs:+1:51: +1:52
+          StorageDead(_3);                 // scope 1 at $DIR/lower_intrinsics.rs:+1:51: +1:52
+          goto -> bb2;                     // scope 0 at $DIR/lower_intrinsics.rs:+2:1: +2:2
+      }
+  
+      bb2: {
+          return;                          // scope 0 at $DIR/lower_intrinsics.rs:+2:2: +2:2
+      }
+  }
+  
diff --git a/tests/mir-opt/not_equal_false.opt.InstCombine.diff b/tests/mir-opt/not_equal_false.opt.InstSimplify.diff
index b558c35ac1e..8e7776a0bbc 100644
--- a/tests/mir-opt/not_equal_false.opt.InstCombine.diff
+++ b/tests/mir-opt/not_equal_false.opt.InstSimplify.diff
@@ -1,5 +1,5 @@
-- // MIR for `opt` before InstCombine
-+ // MIR for `opt` after InstCombine
+- // MIR for `opt` before InstSimplify
++ // MIR for `opt` after InstSimplify
   
   fn opt(_1: bool) -> u32 {
       debug x => _1;                       // in scope 0 at $DIR/not_equal_false.rs:+0:8: +0:9
diff --git a/tests/mir-opt/not_equal_false.rs b/tests/mir-opt/not_equal_false.rs
index 2ae03da40f8..e0560732900 100644
--- a/tests/mir-opt/not_equal_false.rs
+++ b/tests/mir-opt/not_equal_false.rs
@@ -1,5 +1,5 @@
-// unit-test: InstCombine
-// EMIT_MIR not_equal_false.opt.InstCombine.diff
+// unit-test: InstSimplify
+// EMIT_MIR not_equal_false.opt.InstSimplify.diff
 
 fn opt(x: bool) -> u32 {
     if x != false { 0 } else { 1 }
diff --git a/tests/mir-opt/nrvo_miscompile_111005.rs b/tests/mir-opt/nrvo_miscompile_111005.rs
new file mode 100644
index 00000000000..a9f391b79d5
--- /dev/null
+++ b/tests/mir-opt/nrvo_miscompile_111005.rs
@@ -0,0 +1,22 @@
+// This is a miscompilation, #111005 to track
+
+// unit-test: RenameReturnPlace
+
+#![feature(custom_mir, core_intrinsics)]
+extern crate core;
+use core::intrinsics::mir::*;
+
+// EMIT_MIR nrvo_miscompile_111005.wrong.RenameReturnPlace.diff
+#[custom_mir(dialect = "runtime", phase = "initial")]
+pub fn wrong(arg: char) -> char {
+    mir!({
+        let temp = arg;
+        RET = temp;
+        temp = 'b';
+        Return()
+    })
+}
+
+fn main() {
+    assert_eq!(wrong('a'), 'a');
+}
diff --git a/tests/mir-opt/nrvo_miscompile_111005.wrong.RenameReturnPlace.diff b/tests/mir-opt/nrvo_miscompile_111005.wrong.RenameReturnPlace.diff
new file mode 100644
index 00000000000..a0acb6e7e11
--- /dev/null
+++ b/tests/mir-opt/nrvo_miscompile_111005.wrong.RenameReturnPlace.diff
@@ -0,0 +1,18 @@
+- // MIR for `wrong` before RenameReturnPlace
++ // MIR for `wrong` after RenameReturnPlace
+  
+  fn wrong(_1: char) -> char {
+-     let mut _0: char;                    // return place in scope 0 at $DIR/nrvo_miscompile_111005.rs:+0:28: +0:32
++     let mut _0: char;                    // return place in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _2: char;                    // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+  
+      bb0: {
+-         _2 = _1;                         // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+-         _0 = _2;                         // scope 0 at $DIR/nrvo_miscompile_111005.rs:+3:9: +3:19
+-         _2 = const 'b';                  // scope 0 at $DIR/nrvo_miscompile_111005.rs:+4:9: +4:19
++         _0 = _1;                         // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
++         _0 = const 'b';                  // scope 0 at $DIR/nrvo_miscompile_111005.rs:+4:9: +4:19
+          return;                          // scope 0 at $DIR/nrvo_miscompile_111005.rs:+5:9: +5:17
+      }
+  }
+  
diff --git a/tests/mir-opt/pre-codegen/mem_replace.manual_replace.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/mem_replace.manual_replace.PreCodegen.after.mir
new file mode 100644
index 00000000000..4fddd50702c
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/mem_replace.manual_replace.PreCodegen.after.mir
@@ -0,0 +1,20 @@
+// MIR for `manual_replace` after PreCodegen
+
+fn manual_replace(_1: &mut u32, _2: u32) -> u32 {
+    debug r => _1;                       // in scope 0 at $DIR/mem_replace.rs:+0:23: +0:24
+    debug v => _2;                       // in scope 0 at $DIR/mem_replace.rs:+0:36: +0:37
+    let mut _0: u32;                     // return place in scope 0 at $DIR/mem_replace.rs:+0:47: +0:50
+    let _3: u32;                         // in scope 0 at $DIR/mem_replace.rs:+1:9: +1:13
+    scope 1 {
+        debug temp => _3;                // in scope 1 at $DIR/mem_replace.rs:+1:9: +1:13
+    }
+
+    bb0: {
+        StorageLive(_3);                 // scope 0 at $DIR/mem_replace.rs:+1:9: +1:13
+        _3 = (*_1);                      // scope 0 at $DIR/mem_replace.rs:+1:16: +1:18
+        (*_1) = _2;                      // scope 1 at $DIR/mem_replace.rs:+2:5: +2:11
+        _0 = _3;                         // scope 1 at $DIR/mem_replace.rs:+3:5: +3:9
+        StorageDead(_3);                 // scope 0 at $DIR/mem_replace.rs:+4:1: +4:2
+        return;                          // scope 0 at $DIR/mem_replace.rs:+4:2: +4:2
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/mem_replace.mem_replace.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/mem_replace.mem_replace.PreCodegen.after.mir
new file mode 100644
index 00000000000..619db12c48b
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/mem_replace.mem_replace.PreCodegen.after.mir
@@ -0,0 +1,57 @@
+// MIR for `mem_replace` after PreCodegen
+
+fn mem_replace(_1: &mut u32, _2: u32) -> u32 {
+    debug r => _1;                       // in scope 0 at $DIR/mem_replace.rs:+0:20: +0:21
+    debug v => _2;                       // in scope 0 at $DIR/mem_replace.rs:+0:33: +0:34
+    let mut _0: u32;                     // return place in scope 0 at $DIR/mem_replace.rs:+0:44: +0:47
+    scope 1 (inlined std::mem::replace::<u32>) { // at $DIR/mem_replace.rs:16:5: 16:28
+        debug dest => _1;                // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        debug src => _2;                 // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        let mut _4: *const u32;          // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        let mut _5: *mut u32;            // in scope 1 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        scope 2 {
+            let _3: u32;                 // in scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+            scope 3 {
+                debug result => _3;      // in scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+                scope 7 (inlined std::ptr::write::<u32>) { // at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+                    debug dst => _5;     // in scope 7 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                    debug src => _2;     // in scope 7 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                    let mut _7: *mut u32; // in scope 7 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                    scope 8 {
+                        scope 9 (inlined std::ptr::write::runtime::<u32>) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                            debug dst => _7; // in scope 9 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                        }
+                    }
+                }
+            }
+            scope 4 (inlined std::ptr::read::<u32>) { // at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+                debug src => _4;         // in scope 4 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                let mut _6: *const u32;  // in scope 4 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                scope 5 {
+                    scope 6 (inlined std::ptr::read::runtime::<u32>) { // at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                        debug src => _6; // in scope 6 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                    }
+                }
+            }
+        }
+    }
+
+    bb0: {
+        StorageLive(_3);                 // scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        StorageLive(_4);                 // scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        _4 = &raw const (*_1);           // scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        StorageLive(_6);                 // scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        _3 = (*_4);                      // scope 5 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+        StorageDead(_6);                 // scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        StorageDead(_4);                 // scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        StorageLive(_5);                 // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        _5 = &raw mut (*_1);             // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        StorageLive(_7);                 // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        (*_5) = _2;                      // scope 8 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+        StorageDead(_7);                 // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        StorageDead(_5);                 // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        _0 = move _3;                    // scope 3 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        StorageDead(_3);                 // scope 2 at $SRC_DIR/core/src/mem/mod.rs:LL:COL
+        return;                          // scope 0 at $DIR/mem_replace.rs:+2:2: +2:2
+    }
+}
diff --git a/tests/mir-opt/pre-codegen/mem_replace.rs b/tests/mir-opt/pre-codegen/mem_replace.rs
new file mode 100644
index 00000000000..e5066c38b96
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/mem_replace.rs
@@ -0,0 +1,17 @@
+// compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
+// only-64bit
+// ignore-debug
+
+#![crate_type = "lib"]
+
+// EMIT_MIR mem_replace.manual_replace.PreCodegen.after.mir
+pub fn manual_replace(r: &mut u32, v: u32) -> u32 {
+    let temp = *r;
+    *r = v;
+    temp
+}
+
+// EMIT_MIR mem_replace.mem_replace.PreCodegen.after.mir
+pub fn mem_replace(r: &mut u32, v: u32) -> u32 {
+    std::mem::replace(r, v)
+}
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
index ea0a44cf3bf..7d4766ee5cc 100644
--- 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
@@ -3,66 +3,67 @@
 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
+    let mut _0: &mut [u32];              // return place in scope 0 at $DIR/slice_index.rs:+0:88: +0:98
     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 _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
+        let mut _5: *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
+                debug slice => _5;       // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let _6: std::ops::Range<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 _9: usize;       // 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 _11: *mut u32;   // 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
+                let mut _13: usize;      // in scope 3 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+                let mut _14: std::ops::Range<usize>; // in scope 3 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                let mut _15: *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
+                    debug this => _6;    // 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
+                        let _7: 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
+                            debug new_len => _7; // 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
+                                debug self => _5; // 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
+                                debug self => _11; // in scope 12 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                debug count => _12; // 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
+                                debug data => _10; // in scope 14 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
+                                debug len => _13; // 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
+                                    debug self => _10; // in scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                    let mut _17: *mut (); // 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
+                                    debug data_address => _17; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    debug metadata => _13; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    let mut _18: std::ptr::metadata::PtrRepr<[u32]>; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    let mut _19: std::ptr::metadata::PtrComponents<[u32]>; // in scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+                                    let mut _20: *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
+                            debug this => _14; // in scope 7 at $SRC_DIR/core/src/intrinsics.rs:LL:COL
+                            debug slice => _15; // 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
+                                debug self => _15; // in scope 8 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+                                let mut _16: *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
+                                    debug ptr => _16; // in scope 9 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
                                     scope 10 {
                                     }
                                 }
@@ -75,60 +76,61 @@ fn slice_get_unchecked_mut_range(_1: &mut [u32], _2: std::ops::Range<usize>) ->
     }
 
     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
+        _5 = &raw mut (*_1);             // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageLive(_6);                 // 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(_16);                // scope 2 at $SRC_DIR/core/src/slice/mod.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
+        _8 = (_2.1: usize);              // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_9);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _9 = (_2.0: usize);              // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _7 = unchecked_sub::<usize>(move _8, move _9) -> [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(_9);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
         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
+        _11 = _5 as *mut u32 (PtrToPtr); // scope 11 at $SRC_DIR/core/src/ptr/mut_ptr.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
+        _12 = (_2.0: usize);             // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _10 = Offset(_11, _12);          // scope 13 at $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
+        StorageDead(_12);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_11);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_13);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _13 = _7;                        // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageLive(_17);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _17 = _10 as *mut () (PtrToPtr); // scope 15 at $SRC_DIR/core/src/ptr/mut_ptr.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
+        StorageLive(_20);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        _20 = _17 as *const () (Pointer(MutToConstPointer)); // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        _19 = ptr::metadata::PtrComponents::<[u32]> { data_address: move _20, metadata: _13 }; // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageDead(_20);                // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        _18 = ptr::metadata::PtrRepr::<[u32]> { const_ptr: move _19 }; // 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
+        _4 = (_18.1: *mut [u32]);        // scope 17 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageDead(_18);                // scope 16 at $SRC_DIR/core/src/ptr/metadata.rs:LL:COL
+        StorageDead(_17);                // scope 6 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_13);                // 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
+        StorageDead(_7);                 // scope 5 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_16);                // scope 2 at $SRC_DIR/core/src/slice/mod.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(_6);                 // 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
+        _3 = &mut (*_4);                 // scope 2 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        StorageDead(_4);                 // scope 1 at $SRC_DIR/core/src/slice/mod.rs:LL:COL
+        _0 = _3;                         // scope 0 at $DIR/slice_index.rs:+1:5: +1:35
         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
index 35dd973b55f..d3b59e265b2 100644
--- 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
@@ -3,24 +3,26 @@
 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 mut _0: &[u32];                  // return place in scope 0 at $DIR/slice_index.rs:+0:65: +0:71
     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
+        let _4: &[u32];                  // 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
+        StorageLive(_4);                 // scope 1 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        _4 = <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: {
+        _3 = _4;                         // scope 1 at $SRC_DIR/core/src/slice/index.rs:LL:COL
+        StorageDead(_4);                 // scope 1 at $SRC_DIR/core/src/slice/index.rs:LL:COL
         _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/reference_prop.dominate_storage.ReferencePropagation.diff b/tests/mir-opt/reference_prop.dominate_storage.ReferencePropagation.diff
new file mode 100644
index 00000000000..8edc83cbf67
--- /dev/null
+++ b/tests/mir-opt/reference_prop.dominate_storage.ReferencePropagation.diff
@@ -0,0 +1,38 @@
+- // MIR for `dominate_storage` before ReferencePropagation
++ // MIR for `dominate_storage` after ReferencePropagation
+  
+  fn dominate_storage() -> () {
+      let mut _0: ();                      // return place in scope 0 at $DIR/reference_prop.rs:+0:23: +0:23
+      let mut _1: i32;                     // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _2: &i32;                    // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _3: i32;                     // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _4: bool;                    // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _5: i32;                     // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _6: bool;                    // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+  
+      bb0: {
+          goto -> bb1;                     // scope 0 at $DIR/reference_prop.rs:+8:11: +8:20
+      }
+  
+      bb1: {
+          _1 = const 5_i32;                // scope 0 at $DIR/reference_prop.rs:+10:13: +10:18
+          _2 = &_1;                        // scope 0 at $DIR/reference_prop.rs:+11:13: +11:19
+          goto -> bb2;                     // scope 0 at $DIR/reference_prop.rs:+12:13: +12:22
+      }
+  
+      bb2: {
+          _5 = (*_2);                      // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+          _0 = opaque::<i32>(_5) -> bb3;   // scope 0 at $DIR/reference_prop.rs:+16:13: +16:38
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:383:28: 383:34
+                                           // + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
+      }
+  
+      bb3: {
+          StorageDead(_1);                 // scope 0 at $DIR/reference_prop.rs:+19:13: +19:27
+          StorageLive(_1);                 // scope 0 at $DIR/reference_prop.rs:+20:13: +20:27
+          _6 = const true;                 // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+          switchInt(_6) -> [0: bb3, otherwise: bb1]; // scope 0 at $DIR/reference_prop.rs:+22:13: +22:47
+      }
+  }
+  
diff --git a/tests/mir-opt/reference_prop.maybe_dead.ReferencePropagation.diff b/tests/mir-opt/reference_prop.maybe_dead.ReferencePropagation.diff
new file mode 100644
index 00000000000..920755bdd1d
--- /dev/null
+++ b/tests/mir-opt/reference_prop.maybe_dead.ReferencePropagation.diff
@@ -0,0 +1,56 @@
+- // MIR for `maybe_dead` before ReferencePropagation
++ // MIR for `maybe_dead` after ReferencePropagation
+  
+  fn maybe_dead(_1: bool) -> () {
+      let mut _0: ();                      // return place in scope 0 at $DIR/reference_prop.rs:+0:24: +0:24
+      let mut _2: i32;                     // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _3: i32;                     // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _4: &i32;                    // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _5: &mut i32;                // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _6: i32;                     // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _7: i32;                     // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _8: i32;                     // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+  
+      bb0: {
+          StorageLive(_2);                 // scope 0 at $DIR/reference_prop.rs:+7:13: +7:27
+          StorageLive(_3);                 // scope 0 at $DIR/reference_prop.rs:+8:13: +8:27
+          _2 = const 5_i32;                // scope 0 at $DIR/reference_prop.rs:+9:13: +9:18
+          _3 = const 5_i32;                // scope 0 at $DIR/reference_prop.rs:+10:13: +10:18
+          _4 = &_2;                        // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+          _5 = &mut _3;                    // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+          (*_5) = const 7_i32;             // scope 0 at $DIR/reference_prop.rs:+14:13: +14:19
+-         _6 = (*_4);                      // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
++         _6 = _2;                         // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+          switchInt(_1) -> [1: bb1, otherwise: bb2]; // scope 0 at $DIR/reference_prop.rs:+17:13: +17:46
+      }
+  
+      bb1: {
+          StorageDead(_2);                 // scope 0 at $DIR/reference_prop.rs:+20:13: +20:27
+          StorageDead(_3);                 // scope 0 at $DIR/reference_prop.rs:+21:13: +21:27
+          _0 = opaque::<i32>(_6) -> bb2;   // scope 0 at $DIR/reference_prop.rs:+22:13: +22:38
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:417:28: 417:34
+                                           // + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
+      }
+  
+      bb2: {
+          _7 = (*_4);                      // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+          _0 = opaque::<i32>(_7) -> bb3;   // scope 0 at $DIR/reference_prop.rs:+27:13: +27:38
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:422:28: 422:34
+                                           // + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
+      }
+  
+      bb3: {
+          _8 = (*_5);                      // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+          _0 = opaque::<i32>(_8) -> bb4;   // scope 0 at $DIR/reference_prop.rs:+33:13: +33:43
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:428:33: 428:39
+                                           // + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
+      }
+  
+      bb4: {
+          return;                          // scope 0 at $DIR/reference_prop.rs:+36:13: +36:21
+      }
+  }
+  
diff --git a/tests/mir-opt/reference_prop.multiple_storage.ReferencePropagation.diff b/tests/mir-opt/reference_prop.multiple_storage.ReferencePropagation.diff
new file mode 100644
index 00000000000..07bfdf0b2f1
--- /dev/null
+++ b/tests/mir-opt/reference_prop.multiple_storage.ReferencePropagation.diff
@@ -0,0 +1,27 @@
+- // MIR for `multiple_storage` before ReferencePropagation
++ // MIR for `multiple_storage` after ReferencePropagation
+  
+  fn multiple_storage() -> () {
+      let mut _0: ();                      // return place in scope 0 at $DIR/reference_prop.rs:+0:23: +0:23
+      let mut _1: i32;                     // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _2: &i32;                    // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _3: i32;                     // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+  
+      bb0: {
+          StorageLive(_1);                 // scope 0 at $DIR/reference_prop.rs:+6:13: +6:27
+          _1 = const 5_i32;                // scope 0 at $DIR/reference_prop.rs:+7:13: +7:18
+          _2 = &_1;                        // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+          StorageDead(_1);                 // scope 0 at $DIR/reference_prop.rs:+9:13: +9:27
+          StorageLive(_1);                 // scope 0 at $DIR/reference_prop.rs:+10:13: +10:27
+          _3 = (*_2);                      // scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+          _0 = opaque::<i32>(_3) -> bb1;   // scope 0 at $DIR/reference_prop.rs:+14:13: +14:43
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:357:33: 357:39
+                                           // + literal: Const { ty: fn(i32) {opaque::<i32>}, val: Value(<ZST>) }
+      }
+  
+      bb1: {
+          return;                          // scope 0 at $DIR/reference_prop.rs:+18:13: +18:21
+      }
+  }
+  
diff --git a/tests/mir-opt/reference_prop.read_through_raw.ReferencePropagation.diff b/tests/mir-opt/reference_prop.read_through_raw.ReferencePropagation.diff
new file mode 100644
index 00000000000..a7d505c6906
--- /dev/null
+++ b/tests/mir-opt/reference_prop.read_through_raw.ReferencePropagation.diff
@@ -0,0 +1,24 @@
+- // MIR for `read_through_raw` before ReferencePropagation
++ // MIR for `read_through_raw` after ReferencePropagation
+  
+  fn read_through_raw(_1: &mut usize) -> usize {
+      let mut _0: usize;                   // return place in scope 0 at $DIR/reference_prop.rs:+0:39: +0:44
+      let mut _2: &mut usize;              // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _3: &mut usize;              // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _4: *mut usize;              // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+      let mut _5: *mut usize;              // in scope 0 at $SRC_DIR/core/src/intrinsics/mir.rs:LL:COL
+  
+      bb0: {
+          _2 = &mut (*_1);                 // scope 0 at $DIR/reference_prop.rs:+10:13: +10:25
+-         _3 = &mut (*_2);                 // scope 0 at $DIR/reference_prop.rs:+11:13: +11:26
+-         _4 = &raw mut (*_2);             // scope 0 at $DIR/reference_prop.rs:+12:13: +12:30
+-         _5 = &raw mut (*_3);             // scope 0 at $DIR/reference_prop.rs:+13:13: +13:30
+-         _0 = (*_4);                      // scope 0 at $DIR/reference_prop.rs:+15:13: +15:22
+-         _0 = (*_5);                      // scope 0 at $DIR/reference_prop.rs:+16:13: +16:22
++         _3 = &mut (*_1);                 // scope 0 at $DIR/reference_prop.rs:+11:13: +11:26
++         _0 = (*_2);                      // scope 0 at $DIR/reference_prop.rs:+15:13: +15:22
++         _0 = (*_3);                      // scope 0 at $DIR/reference_prop.rs:+16:13: +16:22
+          return;                          // scope 0 at $DIR/reference_prop.rs:+17:13: +17:21
+      }
+  }
+  
diff --git a/tests/mir-opt/reference_prop.reference_propagation.ReferencePropagation.diff b/tests/mir-opt/reference_prop.reference_propagation.ReferencePropagation.diff
new file mode 100644
index 00000000000..e41fc28461a
--- /dev/null
+++ b/tests/mir-opt/reference_prop.reference_propagation.ReferencePropagation.diff
@@ -0,0 +1,375 @@
+- // MIR for `reference_propagation` before ReferencePropagation
++ // MIR for `reference_propagation` after ReferencePropagation
+  
+  fn reference_propagation(_1: &T, _2: &T) -> () {
+      debug single => _1;                  // in scope 0 at $DIR/reference_prop.rs:+0:39: +0:45
+      debug multiple => _2;                // in scope 0 at $DIR/reference_prop.rs:+0:54: +0:66
+      let mut _0: ();                      // return place in scope 0 at $DIR/reference_prop.rs:+0:75: +0:75
+      let _3: ();                          // in scope 0 at $DIR/reference_prop.rs:+2:5: +7:6
+      let _4: usize;                       // in scope 0 at $DIR/reference_prop.rs:+3:13: +3:14
+      let _7: ();                          // in scope 0 at $DIR/reference_prop.rs:+6:9: +6:19
+      let mut _8: ();                      // in scope 0 at $DIR/reference_prop.rs:+6:16: +6:18
+      let _9: ();                          // in scope 0 at $DIR/reference_prop.rs:+10:5: +18:6
+      let _10: usize;                      // in scope 0 at $DIR/reference_prop.rs:+11:13: +11:14
+      let mut _13: &usize;                 // in scope 0 at $DIR/reference_prop.rs:+14:13: +14:16
+      let _14: &usize;                     // in scope 0 at $DIR/reference_prop.rs:+14:13: +14:16
+      let _16: ();                         // in scope 0 at $DIR/reference_prop.rs:+17:9: +17:19
+      let mut _17: ();                     // in scope 0 at $DIR/reference_prop.rs:+17:16: +17:18
+      let _18: ();                         // in scope 0 at $DIR/reference_prop.rs:+21:5: +27:6
+      let _19: usize;                      // in scope 0 at $DIR/reference_prop.rs:+22:13: +22:14
+      let _23: ();                         // in scope 0 at $DIR/reference_prop.rs:+26:9: +26:19
+      let mut _24: ();                     // in scope 0 at $DIR/reference_prop.rs:+26:16: +26:18
+      let _25: ();                         // in scope 0 at $DIR/reference_prop.rs:+30:5: +36:6
+      let _26: usize;                      // in scope 0 at $DIR/reference_prop.rs:+31:13: +31:14
+      let _30: ();                         // in scope 0 at $DIR/reference_prop.rs:+35:9: +35:19
+      let mut _31: ();                     // in scope 0 at $DIR/reference_prop.rs:+35:16: +35:18
+      let _32: ();                         // in scope 0 at $DIR/reference_prop.rs:+39:5: +44:6
+      let _33: usize;                      // in scope 0 at $DIR/reference_prop.rs:+40:13: +40:14
+      let _36: ();                         // in scope 0 at $DIR/reference_prop.rs:+43:9: +43:18
+      let mut _37: &usize;                 // in scope 0 at $DIR/reference_prop.rs:+43:16: +43:17
+      let _38: ();                         // in scope 0 at $DIR/reference_prop.rs:+47:5: +57:6
+      let _39: usize;                      // in scope 0 at $DIR/reference_prop.rs:+48:13: +48:14
+      let _45: ();                         // in scope 0 at $DIR/reference_prop.rs:+56:9: +56:19
+      let mut _46: &usize;                 // in scope 0 at $DIR/reference_prop.rs:+56:16: +56:18
+      let _47: ();                         // in scope 0 at $DIR/reference_prop.rs:+60:5: +64:6
+      let _48: &T;                         // in scope 0 at $DIR/reference_prop.rs:+61:13: +61:14
+      let _50: ();                         // in scope 0 at $DIR/reference_prop.rs:+63:9: +63:19
+      let mut _51: ();                     // in scope 0 at $DIR/reference_prop.rs:+63:16: +63:18
+      let _52: &T;                         // in scope 0 at $DIR/reference_prop.rs:+68:13: +68:14
+      let mut _53: &T;                     // in scope 0 at $DIR/reference_prop.rs:+69:20: +69:28
+      let _54: &T;                         // in scope 0 at $DIR/reference_prop.rs:+69:20: +69:28
+      let _56: ();                         // in scope 0 at $DIR/reference_prop.rs:+71:9: +71:19
+      let mut _57: ();                     // in scope 0 at $DIR/reference_prop.rs:+71:16: +71:18
+      scope 1 {
+          debug a => _4;                   // in scope 1 at $DIR/reference_prop.rs:+3:13: +3:14
+          let _5: &usize;                  // in scope 1 at $DIR/reference_prop.rs:+4:13: +4:14
+          scope 2 {
+              debug b => _5;               // in scope 2 at $DIR/reference_prop.rs:+4:13: +4:14
+              let _6: usize;               // in scope 2 at $DIR/reference_prop.rs:+5:13: +5:14
+              scope 3 {
+                  debug c => _6;           // in scope 3 at $DIR/reference_prop.rs:+5:13: +5:14
+              }
+          }
+      }
+      scope 4 {
+          debug a => _10;                  // in scope 4 at $DIR/reference_prop.rs:+11:13: +11:14
+          let _11: usize;                  // in scope 4 at $DIR/reference_prop.rs:+12:13: +12:15
+          scope 5 {
+              debug a2 => _11;             // in scope 5 at $DIR/reference_prop.rs:+12:13: +12:15
+              let mut _12: &usize;         // in scope 5 at $DIR/reference_prop.rs:+13:13: +13:18
+              scope 6 {
+                  debug b => _12;          // in scope 6 at $DIR/reference_prop.rs:+13:13: +13:18
+                  let _15: usize;          // in scope 6 at $DIR/reference_prop.rs:+16:13: +16:14
+                  scope 7 {
+                      debug c => _15;      // in scope 7 at $DIR/reference_prop.rs:+16:13: +16:14
+                  }
+              }
+          }
+      }
+      scope 8 {
+          debug a => _19;                  // in scope 8 at $DIR/reference_prop.rs:+22:13: +22:14
+          let _20: &usize;                 // in scope 8 at $DIR/reference_prop.rs:+23:13: +23:14
+          scope 9 {
+              debug b => _20;              // in scope 9 at $DIR/reference_prop.rs:+23:13: +23:14
+              let _21: &&usize;            // in scope 9 at $DIR/reference_prop.rs:+24:13: +24:14
+              scope 10 {
+                  debug d => _21;          // in scope 10 at $DIR/reference_prop.rs:+24:13: +24:14
+                  let _22: usize;          // in scope 10 at $DIR/reference_prop.rs:+25:13: +25:14
+                  scope 11 {
+                      debug c => _22;      // in scope 11 at $DIR/reference_prop.rs:+25:13: +25:14
+                  }
+              }
+          }
+      }
+      scope 12 {
+          debug a => _26;                  // in scope 12 at $DIR/reference_prop.rs:+31:13: +31:14
+          let mut _27: &usize;             // in scope 12 at $DIR/reference_prop.rs:+32:13: +32:18
+          scope 13 {
+              debug b => _27;              // in scope 13 at $DIR/reference_prop.rs:+32:13: +32:18
+              let _28: &mut &usize;        // in scope 13 at $DIR/reference_prop.rs:+33:13: +33:14
+              scope 14 {
+                  debug d => _28;          // in scope 14 at $DIR/reference_prop.rs:+33:13: +33:14
+                  let _29: usize;          // in scope 14 at $DIR/reference_prop.rs:+34:13: +34:14
+                  scope 15 {
+                      debug c => _29;      // in scope 15 at $DIR/reference_prop.rs:+34:13: +34:14
+                  }
+              }
+          }
+      }
+      scope 16 {
+          debug a => _33;                  // in scope 16 at $DIR/reference_prop.rs:+40:13: +40:14
+          let _34: &usize;                 // in scope 16 at $DIR/reference_prop.rs:+41:13: +41:14
+          scope 17 {
+              debug b => _34;              // in scope 17 at $DIR/reference_prop.rs:+41:13: +41:14
+              let _35: usize;              // in scope 17 at $DIR/reference_prop.rs:+42:13: +42:14
+              scope 18 {
+                  debug c => _35;          // in scope 18 at $DIR/reference_prop.rs:+42:13: +42:14
+              }
+          }
+      }
+      scope 19 {
+          debug a => _39;                  // in scope 19 at $DIR/reference_prop.rs:+48:13: +48:14
+          let _40: &usize;                 // in scope 19 at $DIR/reference_prop.rs:+49:13: +49:15
+          scope 20 {
+              debug b1 => _40;             // in scope 20 at $DIR/reference_prop.rs:+49:13: +49:15
+              let _41: usize;              // in scope 20 at $DIR/reference_prop.rs:+50:13: +50:14
+              scope 21 {
+                  debug c => _41;          // in scope 21 at $DIR/reference_prop.rs:+50:13: +50:14
+                  let _42: &usize;         // in scope 21 at $DIR/reference_prop.rs:+51:13: +51:15
+                  scope 22 {
+                      debug b2 => _42;     // in scope 22 at $DIR/reference_prop.rs:+51:13: +51:15
+                      let _43: usize;      // in scope 22 at $DIR/reference_prop.rs:+52:13: +52:15
+                      scope 23 {
+                          debug c2 => _43; // in scope 23 at $DIR/reference_prop.rs:+52:13: +52:15
+                          let _44: &usize; // in scope 23 at $DIR/reference_prop.rs:+53:13: +53:15
+                          scope 24 {
+                              debug b3 => _44; // in scope 24 at $DIR/reference_prop.rs:+53:13: +53:15
+                          }
+                      }
+                  }
+              }
+          }
+      }
+      scope 25 {
+          debug a => _48;                  // in scope 25 at $DIR/reference_prop.rs:+61:13: +61:14
+          let _49: T;                      // in scope 25 at $DIR/reference_prop.rs:+62:13: +62:14
+          scope 26 {
+              debug b => _49;              // in scope 26 at $DIR/reference_prop.rs:+62:13: +62:14
+          }
+      }
+      scope 27 {
+          debug a => _52;                  // in scope 27 at $DIR/reference_prop.rs:+68:13: +68:14
+          let _55: T;                      // in scope 27 at $DIR/reference_prop.rs:+70:13: +70:14
+          scope 28 {
+              debug b => _55;              // in scope 28 at $DIR/reference_prop.rs:+70:13: +70:14
+          }
+      }
+  
+      bb0: {
+-         StorageLive(_3);                 // scope 0 at $DIR/reference_prop.rs:+2:5: +7:6
+          StorageLive(_4);                 // scope 0 at $DIR/reference_prop.rs:+3:13: +3:14
+          _4 = const 5_usize;              // scope 0 at $DIR/reference_prop.rs:+3:17: +3:24
+          StorageLive(_5);                 // scope 1 at $DIR/reference_prop.rs:+4:13: +4:14
+          _5 = &_4;                        // scope 1 at $DIR/reference_prop.rs:+4:17: +4:19
+          StorageLive(_6);                 // scope 2 at $DIR/reference_prop.rs:+5:13: +5:14
+-         _6 = (*_5);                      // scope 2 at $DIR/reference_prop.rs:+5:17: +5:19
++         _6 = _4;                         // scope 2 at $DIR/reference_prop.rs:+5:17: +5:19
+          StorageLive(_7);                 // scope 3 at $DIR/reference_prop.rs:+6:9: +6:19
+          StorageLive(_8);                 // scope 3 at $DIR/reference_prop.rs:+6:16: +6:18
+          _8 = ();                         // scope 3 at $DIR/reference_prop.rs:+6:16: +6:18
+          _7 = opaque::<()>(move _8) -> bb1; // scope 3 at $DIR/reference_prop.rs:+6:9: +6:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:16:9: 16:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb1: {
+          StorageDead(_8);                 // scope 3 at $DIR/reference_prop.rs:+6:18: +6:19
+          StorageDead(_7);                 // scope 3 at $DIR/reference_prop.rs:+6:19: +6:20
+-         _3 = const ();                   // scope 0 at $DIR/reference_prop.rs:+2:5: +7:6
+          StorageDead(_6);                 // scope 2 at $DIR/reference_prop.rs:+7:5: +7:6
+          StorageDead(_5);                 // scope 1 at $DIR/reference_prop.rs:+7:5: +7:6
+          StorageDead(_4);                 // scope 0 at $DIR/reference_prop.rs:+7:5: +7:6
+-         StorageDead(_3);                 // scope 0 at $DIR/reference_prop.rs:+7:5: +7:6
+-         StorageLive(_9);                 // scope 0 at $DIR/reference_prop.rs:+10:5: +18:6
+          StorageLive(_10);                // scope 0 at $DIR/reference_prop.rs:+11:13: +11:14
+          _10 = const 5_usize;             // scope 0 at $DIR/reference_prop.rs:+11:17: +11:24
+          StorageLive(_11);                // scope 4 at $DIR/reference_prop.rs:+12:13: +12:15
+          _11 = const 7_usize;             // scope 4 at $DIR/reference_prop.rs:+12:18: +12:25
+          StorageLive(_12);                // scope 5 at $DIR/reference_prop.rs:+13:13: +13:18
+          _12 = &_10;                      // scope 5 at $DIR/reference_prop.rs:+13:21: +13:23
+          StorageLive(_13);                // scope 6 at $DIR/reference_prop.rs:+14:13: +14:16
+-         StorageLive(_14);                // scope 6 at $DIR/reference_prop.rs:+14:13: +14:16
+-         _14 = &_11;                      // scope 6 at $DIR/reference_prop.rs:+14:13: +14:16
+-         _13 = &(*_14);                   // scope 6 at $DIR/reference_prop.rs:+14:13: +14:16
++         _13 = &_11;                      // scope 6 at $DIR/reference_prop.rs:+14:13: +14:16
+          _12 = move _13;                  // scope 6 at $DIR/reference_prop.rs:+14:9: +14:16
+          StorageDead(_13);                // scope 6 at $DIR/reference_prop.rs:+14:15: +14:16
+-         StorageDead(_14);                // scope 6 at $DIR/reference_prop.rs:+14:16: +14:17
+          StorageLive(_15);                // scope 6 at $DIR/reference_prop.rs:+16:13: +16:14
+          _15 = (*_12);                    // scope 6 at $DIR/reference_prop.rs:+16:17: +16:19
+          StorageLive(_16);                // scope 7 at $DIR/reference_prop.rs:+17:9: +17:19
+          StorageLive(_17);                // scope 7 at $DIR/reference_prop.rs:+17:16: +17:18
+          _17 = ();                        // scope 7 at $DIR/reference_prop.rs:+17:16: +17:18
+          _16 = opaque::<()>(move _17) -> bb2; // scope 7 at $DIR/reference_prop.rs:+17:9: +17:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:27:9: 27:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb2: {
+          StorageDead(_17);                // scope 7 at $DIR/reference_prop.rs:+17:18: +17:19
+          StorageDead(_16);                // scope 7 at $DIR/reference_prop.rs:+17:19: +17:20
+-         _9 = const ();                   // scope 0 at $DIR/reference_prop.rs:+10:5: +18:6
+          StorageDead(_15);                // scope 6 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_12);                // scope 5 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_11);                // scope 4 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_10);                // scope 0 at $DIR/reference_prop.rs:+18:5: +18:6
+-         StorageDead(_9);                 // scope 0 at $DIR/reference_prop.rs:+18:5: +18:6
+-         StorageLive(_18);                // scope 0 at $DIR/reference_prop.rs:+21:5: +27:6
+          StorageLive(_19);                // scope 0 at $DIR/reference_prop.rs:+22:13: +22:14
+          _19 = const 5_usize;             // scope 0 at $DIR/reference_prop.rs:+22:17: +22:24
+          StorageLive(_20);                // scope 8 at $DIR/reference_prop.rs:+23:13: +23:14
+          _20 = &_19;                      // scope 8 at $DIR/reference_prop.rs:+23:17: +23:19
+          StorageLive(_21);                // scope 9 at $DIR/reference_prop.rs:+24:13: +24:14
+          _21 = &_20;                      // scope 9 at $DIR/reference_prop.rs:+24:17: +24:19
+          StorageLive(_22);                // scope 10 at $DIR/reference_prop.rs:+25:13: +25:14
+          _22 = (*_20);                    // scope 10 at $DIR/reference_prop.rs:+25:17: +25:19
+          StorageLive(_23);                // scope 11 at $DIR/reference_prop.rs:+26:9: +26:19
+          StorageLive(_24);                // scope 11 at $DIR/reference_prop.rs:+26:16: +26:18
+          _24 = ();                        // scope 11 at $DIR/reference_prop.rs:+26:16: +26:18
+          _23 = opaque::<()>(move _24) -> bb3; // scope 11 at $DIR/reference_prop.rs:+26:9: +26:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:36:9: 36:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb3: {
+          StorageDead(_24);                // scope 11 at $DIR/reference_prop.rs:+26:18: +26:19
+          StorageDead(_23);                // scope 11 at $DIR/reference_prop.rs:+26:19: +26:20
+-         _18 = const ();                  // scope 0 at $DIR/reference_prop.rs:+21:5: +27:6
+          StorageDead(_22);                // scope 10 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_21);                // scope 9 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_20);                // scope 8 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_19);                // scope 0 at $DIR/reference_prop.rs:+27:5: +27:6
+-         StorageDead(_18);                // scope 0 at $DIR/reference_prop.rs:+27:5: +27:6
+-         StorageLive(_25);                // scope 0 at $DIR/reference_prop.rs:+30:5: +36:6
+          StorageLive(_26);                // scope 0 at $DIR/reference_prop.rs:+31:13: +31:14
+          _26 = const 5_usize;             // scope 0 at $DIR/reference_prop.rs:+31:17: +31:24
+          StorageLive(_27);                // scope 12 at $DIR/reference_prop.rs:+32:13: +32:18
+          _27 = &_26;                      // scope 12 at $DIR/reference_prop.rs:+32:21: +32:23
+          StorageLive(_28);                // scope 13 at $DIR/reference_prop.rs:+33:13: +33:14
+          _28 = &mut _27;                  // scope 13 at $DIR/reference_prop.rs:+33:17: +33:23
+          StorageLive(_29);                // scope 14 at $DIR/reference_prop.rs:+34:13: +34:14
+          _29 = (*_27);                    // scope 14 at $DIR/reference_prop.rs:+34:17: +34:19
+          StorageLive(_30);                // scope 15 at $DIR/reference_prop.rs:+35:9: +35:19
+          StorageLive(_31);                // scope 15 at $DIR/reference_prop.rs:+35:16: +35:18
+          _31 = ();                        // scope 15 at $DIR/reference_prop.rs:+35:16: +35:18
+          _30 = opaque::<()>(move _31) -> bb4; // scope 15 at $DIR/reference_prop.rs:+35:9: +35:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:45:9: 45:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb4: {
+          StorageDead(_31);                // scope 15 at $DIR/reference_prop.rs:+35:18: +35:19
+          StorageDead(_30);                // scope 15 at $DIR/reference_prop.rs:+35:19: +35:20
+-         _25 = const ();                  // scope 0 at $DIR/reference_prop.rs:+30:5: +36:6
+          StorageDead(_29);                // scope 14 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_28);                // scope 13 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_27);                // scope 12 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_26);                // scope 0 at $DIR/reference_prop.rs:+36:5: +36:6
+-         StorageDead(_25);                // scope 0 at $DIR/reference_prop.rs:+36:5: +36:6
+-         StorageLive(_32);                // scope 0 at $DIR/reference_prop.rs:+39:5: +44:6
+          StorageLive(_33);                // scope 0 at $DIR/reference_prop.rs:+40:13: +40:14
+          _33 = const 7_usize;             // scope 0 at $DIR/reference_prop.rs:+40:17: +40:24
+          StorageLive(_34);                // scope 16 at $DIR/reference_prop.rs:+41:13: +41:14
+          _34 = &_33;                      // scope 16 at $DIR/reference_prop.rs:+41:17: +41:19
+          StorageLive(_35);                // scope 17 at $DIR/reference_prop.rs:+42:13: +42:14
+-         _35 = (*_34);                    // scope 17 at $DIR/reference_prop.rs:+42:17: +42:19
++         _35 = _33;                       // scope 17 at $DIR/reference_prop.rs:+42:17: +42:19
+          StorageLive(_36);                // scope 18 at $DIR/reference_prop.rs:+43:9: +43:18
+          StorageLive(_37);                // scope 18 at $DIR/reference_prop.rs:+43:16: +43:17
+          _37 = _34;                       // scope 18 at $DIR/reference_prop.rs:+43:16: +43:17
+          _36 = opaque::<&usize>(move _37) -> bb5; // scope 18 at $DIR/reference_prop.rs:+43:9: +43:18
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:53:9: 53:15
+                                           // + literal: Const { ty: fn(&usize) {opaque::<&usize>}, val: Value(<ZST>) }
+      }
+  
+      bb5: {
+          StorageDead(_37);                // scope 18 at $DIR/reference_prop.rs:+43:17: +43:18
+          StorageDead(_36);                // scope 18 at $DIR/reference_prop.rs:+43:18: +43:19
+-         _32 = const ();                  // scope 0 at $DIR/reference_prop.rs:+39:5: +44:6
+          StorageDead(_35);                // scope 17 at $DIR/reference_prop.rs:+44:5: +44:6
+          StorageDead(_34);                // scope 16 at $DIR/reference_prop.rs:+44:5: +44:6
+          StorageDead(_33);                // scope 0 at $DIR/reference_prop.rs:+44:5: +44:6
+-         StorageDead(_32);                // scope 0 at $DIR/reference_prop.rs:+44:5: +44:6
+-         StorageLive(_38);                // scope 0 at $DIR/reference_prop.rs:+47:5: +57:6
+          StorageLive(_39);                // scope 0 at $DIR/reference_prop.rs:+48:13: +48:14
+          _39 = const 7_usize;             // scope 0 at $DIR/reference_prop.rs:+48:17: +48:24
+          StorageLive(_40);                // scope 19 at $DIR/reference_prop.rs:+49:13: +49:15
+          _40 = &_39;                      // scope 19 at $DIR/reference_prop.rs:+49:18: +49:20
+          StorageLive(_41);                // scope 20 at $DIR/reference_prop.rs:+50:13: +50:14
+-         _41 = (*_40);                    // scope 20 at $DIR/reference_prop.rs:+50:17: +50:20
++         _41 = _39;                       // scope 20 at $DIR/reference_prop.rs:+50:17: +50:20
+          StorageLive(_42);                // scope 21 at $DIR/reference_prop.rs:+51:13: +51:15
+          _42 = _40;                       // scope 21 at $DIR/reference_prop.rs:+51:18: +51:20
+          StorageLive(_43);                // scope 22 at $DIR/reference_prop.rs:+52:13: +52:15
+-         _43 = (*_42);                    // scope 22 at $DIR/reference_prop.rs:+52:18: +52:21
++         _43 = _39;                       // scope 22 at $DIR/reference_prop.rs:+52:18: +52:21
+          StorageLive(_44);                // scope 23 at $DIR/reference_prop.rs:+53:13: +53:15
+          _44 = _42;                       // scope 23 at $DIR/reference_prop.rs:+53:18: +53:20
+          StorageLive(_45);                // scope 24 at $DIR/reference_prop.rs:+56:9: +56:19
+          StorageLive(_46);                // scope 24 at $DIR/reference_prop.rs:+56:16: +56:18
+          _46 = _44;                       // scope 24 at $DIR/reference_prop.rs:+56:16: +56:18
+          _45 = opaque::<&usize>(move _46) -> bb6; // scope 24 at $DIR/reference_prop.rs:+56:9: +56:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:66:9: 66:15
+                                           // + literal: Const { ty: fn(&usize) {opaque::<&usize>}, val: Value(<ZST>) }
+      }
+  
+      bb6: {
+          StorageDead(_46);                // scope 24 at $DIR/reference_prop.rs:+56:18: +56:19
+          StorageDead(_45);                // scope 24 at $DIR/reference_prop.rs:+56:19: +56:20
+-         _38 = const ();                  // scope 0 at $DIR/reference_prop.rs:+47:5: +57:6
+          StorageDead(_44);                // scope 23 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_43);                // scope 22 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_42);                // scope 21 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_41);                // scope 20 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_40);                // scope 19 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_39);                // scope 0 at $DIR/reference_prop.rs:+57:5: +57:6
+-         StorageDead(_38);                // scope 0 at $DIR/reference_prop.rs:+57:5: +57:6
+-         StorageLive(_47);                // scope 0 at $DIR/reference_prop.rs:+60:5: +64:6
+          StorageLive(_48);                // scope 0 at $DIR/reference_prop.rs:+61:13: +61:14
+          _48 = &(*_1);                    // scope 0 at $DIR/reference_prop.rs:+61:17: +61:25
+          StorageLive(_49);                // scope 25 at $DIR/reference_prop.rs:+62:13: +62:14
+-         _49 = (*_48);                    // scope 25 at $DIR/reference_prop.rs:+62:17: +62:19
++         _49 = (*_1);                     // scope 25 at $DIR/reference_prop.rs:+62:17: +62:19
+          StorageLive(_50);                // scope 26 at $DIR/reference_prop.rs:+63:9: +63:19
+          StorageLive(_51);                // scope 26 at $DIR/reference_prop.rs:+63:16: +63:18
+          _51 = ();                        // scope 26 at $DIR/reference_prop.rs:+63:16: +63:18
+          _50 = opaque::<()>(move _51) -> bb7; // scope 26 at $DIR/reference_prop.rs:+63:9: +63:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:73:9: 73:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb7: {
+          StorageDead(_51);                // scope 26 at $DIR/reference_prop.rs:+63:18: +63:19
+          StorageDead(_50);                // scope 26 at $DIR/reference_prop.rs:+63:19: +63:20
+-         _47 = const ();                  // scope 0 at $DIR/reference_prop.rs:+60:5: +64:6
+          StorageDead(_49);                // scope 25 at $DIR/reference_prop.rs:+64:5: +64:6
+          StorageDead(_48);                // scope 0 at $DIR/reference_prop.rs:+64:5: +64:6
+-         StorageDead(_47);                // scope 0 at $DIR/reference_prop.rs:+64:5: +64:6
+          StorageLive(_52);                // scope 0 at $DIR/reference_prop.rs:+68:13: +68:14
+          _52 = &(*_2);                    // scope 0 at $DIR/reference_prop.rs:+68:17: +68:27
+          StorageLive(_53);                // scope 27 at $DIR/reference_prop.rs:+69:20: +69:28
+-         StorageLive(_54);                // scope 27 at $DIR/reference_prop.rs:+69:20: +69:28
+-         _54 = &(*_1);                    // scope 27 at $DIR/reference_prop.rs:+69:20: +69:28
+-         _53 = &(*_54);                   // scope 27 at $DIR/reference_prop.rs:+69:20: +69:28
++         _53 = &(*_1);                    // scope 27 at $DIR/reference_prop.rs:+69:20: +69:28
+          _2 = move _53;                   // scope 27 at $DIR/reference_prop.rs:+69:9: +69:28
+          StorageDead(_53);                // scope 27 at $DIR/reference_prop.rs:+69:27: +69:28
+-         StorageDead(_54);                // scope 27 at $DIR/reference_prop.rs:+69:28: +69:29
+          StorageLive(_55);                // scope 27 at $DIR/reference_prop.rs:+70:13: +70:14
+          _55 = (*_52);                    // scope 27 at $DIR/reference_prop.rs:+70:17: +70:19
+          StorageLive(_56);                // scope 28 at $DIR/reference_prop.rs:+71:9: +71:19
+          StorageLive(_57);                // scope 28 at $DIR/reference_prop.rs:+71:16: +71:18
+          _57 = ();                        // scope 28 at $DIR/reference_prop.rs:+71:16: +71:18
+          _56 = opaque::<()>(move _57) -> bb8; // scope 28 at $DIR/reference_prop.rs:+71:9: +71:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:81:9: 81:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb8: {
+          StorageDead(_57);                // scope 28 at $DIR/reference_prop.rs:+71:18: +71:19
+          StorageDead(_56);                // scope 28 at $DIR/reference_prop.rs:+71:19: +71:20
+          _0 = const ();                   // scope 0 at $DIR/reference_prop.rs:+67:5: +72:6
+          StorageDead(_55);                // scope 27 at $DIR/reference_prop.rs:+72:5: +72:6
+          StorageDead(_52);                // scope 0 at $DIR/reference_prop.rs:+72:5: +72:6
+          return;                          // scope 0 at $DIR/reference_prop.rs:+73:2: +73:2
+      }
+  }
+  
diff --git a/tests/mir-opt/reference_prop.reference_propagation_const_ptr.ReferencePropagation.diff b/tests/mir-opt/reference_prop.reference_propagation_const_ptr.ReferencePropagation.diff
new file mode 100644
index 00000000000..712727915d0
--- /dev/null
+++ b/tests/mir-opt/reference_prop.reference_propagation_const_ptr.ReferencePropagation.diff
@@ -0,0 +1,431 @@
+- // MIR for `reference_propagation_const_ptr` before ReferencePropagation
++ // MIR for `reference_propagation_const_ptr` after ReferencePropagation
+  
+  fn reference_propagation_const_ptr(_1: *const T, _2: *const T) -> () {
+      debug single => _1;                  // in scope 0 at $DIR/reference_prop.rs:+0:45: +0:51
+      debug multiple => _2;                // in scope 0 at $DIR/reference_prop.rs:+0:63: +0:75
+      let mut _0: ();                      // return place in scope 0 at $DIR/reference_prop.rs:+0:87: +0:87
+      let _3: ();                          // in scope 0 at $DIR/reference_prop.rs:+2:5: +7:6
+      let _7: ();                          // in scope 0 at $DIR/reference_prop.rs:+6:9: +6:19
+      let mut _8: ();                      // in scope 0 at $DIR/reference_prop.rs:+6:16: +6:18
+      let _9: ();                          // in scope 0 at $DIR/reference_prop.rs:+10:5: +18:6
+      let mut _13: *const usize;           // in scope 0 at $DIR/reference_prop.rs:+14:13: +14:26
+      let _15: ();                         // in scope 0 at $DIR/reference_prop.rs:+17:9: +17:19
+      let mut _16: ();                     // in scope 0 at $DIR/reference_prop.rs:+17:16: +17:18
+      let _17: ();                         // in scope 0 at $DIR/reference_prop.rs:+21:5: +27:6
+      let _22: ();                         // in scope 0 at $DIR/reference_prop.rs:+26:9: +26:19
+      let mut _23: ();                     // in scope 0 at $DIR/reference_prop.rs:+26:16: +26:18
+      let _24: ();                         // in scope 0 at $DIR/reference_prop.rs:+30:5: +36:6
+      let _29: ();                         // in scope 0 at $DIR/reference_prop.rs:+35:9: +35:19
+      let mut _30: ();                     // in scope 0 at $DIR/reference_prop.rs:+35:16: +35:18
+      let _31: ();                         // in scope 0 at $DIR/reference_prop.rs:+39:5: +44:6
+      let _35: ();                         // in scope 0 at $DIR/reference_prop.rs:+43:9: +43:18
+      let mut _36: *const usize;           // in scope 0 at $DIR/reference_prop.rs:+43:16: +43:17
+      let _37: ();                         // in scope 0 at $DIR/reference_prop.rs:+47:5: +57:6
+      let _44: ();                         // in scope 0 at $DIR/reference_prop.rs:+56:9: +56:19
+      let mut _45: *const usize;           // in scope 0 at $DIR/reference_prop.rs:+56:16: +56:18
+      let _46: ();                         // in scope 0 at $DIR/reference_prop.rs:+60:5: +64:6
+      let _49: ();                         // in scope 0 at $DIR/reference_prop.rs:+63:9: +63:19
+      let mut _50: ();                     // in scope 0 at $DIR/reference_prop.rs:+63:16: +63:18
+      let _51: ();                         // in scope 0 at $DIR/reference_prop.rs:+67:5: +72:6
+      let mut _53: *const T;               // in scope 0 at $DIR/reference_prop.rs:+69:20: +69:38
+      let _55: ();                         // in scope 0 at $DIR/reference_prop.rs:+71:9: +71:19
+      let mut _56: ();                     // in scope 0 at $DIR/reference_prop.rs:+71:16: +71:18
+      let _61: ();                         // in scope 0 at $DIR/reference_prop.rs:+80:9: +80:19
+      let mut _62: ();                     // in scope 0 at $DIR/reference_prop.rs:+80:16: +80:18
+      scope 1 {
+          let _4: usize;                   // in scope 1 at $DIR/reference_prop.rs:+3:13: +3:14
+          scope 2 {
+              debug a => _4;               // in scope 2 at $DIR/reference_prop.rs:+3:13: +3:14
+              let _5: *const usize;        // in scope 2 at $DIR/reference_prop.rs:+4:13: +4:14
+              scope 3 {
+                  debug b => _5;           // in scope 3 at $DIR/reference_prop.rs:+4:13: +4:14
+                  let _6: usize;           // in scope 3 at $DIR/reference_prop.rs:+5:13: +5:14
+                  scope 4 {
+                      debug c => _6;       // in scope 4 at $DIR/reference_prop.rs:+5:13: +5:14
+                  }
+              }
+          }
+      }
+      scope 5 {
+          let _10: usize;                  // in scope 5 at $DIR/reference_prop.rs:+11:13: +11:14
+          scope 6 {
+              debug a => _10;              // in scope 6 at $DIR/reference_prop.rs:+11:13: +11:14
+              let _11: usize;              // in scope 6 at $DIR/reference_prop.rs:+12:13: +12:15
+              scope 7 {
+                  debug a2 => _11;         // in scope 7 at $DIR/reference_prop.rs:+12:13: +12:15
+                  let mut _12: *const usize; // in scope 7 at $DIR/reference_prop.rs:+13:13: +13:18
+                  scope 8 {
+                      debug b => _12;      // in scope 8 at $DIR/reference_prop.rs:+13:13: +13:18
+                      let _14: usize;      // in scope 8 at $DIR/reference_prop.rs:+16:13: +16:14
+                      scope 9 {
+                          debug c => _14;  // in scope 9 at $DIR/reference_prop.rs:+16:13: +16:14
+                      }
+                  }
+              }
+          }
+      }
+      scope 10 {
+          let _18: usize;                  // in scope 10 at $DIR/reference_prop.rs:+22:13: +22:14
+          scope 11 {
+              debug a => _18;              // in scope 11 at $DIR/reference_prop.rs:+22:13: +22:14
+              let _19: *const usize;       // in scope 11 at $DIR/reference_prop.rs:+23:13: +23:14
+              scope 12 {
+                  debug b => _19;          // in scope 12 at $DIR/reference_prop.rs:+23:13: +23:14
+                  let _20: &*const usize;  // in scope 12 at $DIR/reference_prop.rs:+24:13: +24:14
+                  scope 13 {
+                      debug d => _20;      // in scope 13 at $DIR/reference_prop.rs:+24:13: +24:14
+                      let _21: usize;      // in scope 13 at $DIR/reference_prop.rs:+25:13: +25:14
+                      scope 14 {
+                          debug c => _21;  // in scope 14 at $DIR/reference_prop.rs:+25:13: +25:14
+                      }
+                  }
+              }
+          }
+      }
+      scope 15 {
+          let _25: usize;                  // in scope 15 at $DIR/reference_prop.rs:+31:13: +31:14
+          scope 16 {
+              debug a => _25;              // in scope 16 at $DIR/reference_prop.rs:+31:13: +31:14
+              let mut _26: *const usize;   // in scope 16 at $DIR/reference_prop.rs:+32:13: +32:18
+              scope 17 {
+                  debug b => _26;          // in scope 17 at $DIR/reference_prop.rs:+32:13: +32:18
+                  let _27: &mut *const usize; // in scope 17 at $DIR/reference_prop.rs:+33:13: +33:14
+                  scope 18 {
+                      debug d => _27;      // in scope 18 at $DIR/reference_prop.rs:+33:13: +33:14
+                      let _28: usize;      // in scope 18 at $DIR/reference_prop.rs:+34:13: +34:14
+                      scope 19 {
+                          debug c => _28;  // in scope 19 at $DIR/reference_prop.rs:+34:13: +34:14
+                      }
+                  }
+              }
+          }
+      }
+      scope 20 {
+          let _32: usize;                  // in scope 20 at $DIR/reference_prop.rs:+40:13: +40:14
+          scope 21 {
+              debug a => _32;              // in scope 21 at $DIR/reference_prop.rs:+40:13: +40:14
+              let _33: *const usize;       // in scope 21 at $DIR/reference_prop.rs:+41:13: +41:14
+              scope 22 {
+                  debug b => _33;          // in scope 22 at $DIR/reference_prop.rs:+41:13: +41:14
+                  let _34: usize;          // in scope 22 at $DIR/reference_prop.rs:+42:13: +42:14
+                  scope 23 {
+                      debug c => _34;      // in scope 23 at $DIR/reference_prop.rs:+42:13: +42:14
+                  }
+              }
+          }
+      }
+      scope 24 {
+          let _38: usize;                  // in scope 24 at $DIR/reference_prop.rs:+48:13: +48:14
+          scope 25 {
+              debug a => _38;              // in scope 25 at $DIR/reference_prop.rs:+48:13: +48:14
+              let _39: *const usize;       // in scope 25 at $DIR/reference_prop.rs:+49:13: +49:15
+              scope 26 {
+                  debug b1 => _39;         // in scope 26 at $DIR/reference_prop.rs:+49:13: +49:15
+                  let _40: usize;          // in scope 26 at $DIR/reference_prop.rs:+50:13: +50:14
+                  scope 27 {
+                      debug c => _40;      // in scope 27 at $DIR/reference_prop.rs:+50:13: +50:14
+                      let _41: *const usize; // in scope 27 at $DIR/reference_prop.rs:+51:13: +51:15
+                      scope 28 {
+                          debug b2 => _41; // in scope 28 at $DIR/reference_prop.rs:+51:13: +51:15
+                          let _42: usize;  // in scope 28 at $DIR/reference_prop.rs:+52:13: +52:15
+                          scope 29 {
+                              debug c2 => _42; // in scope 29 at $DIR/reference_prop.rs:+52:13: +52:15
+                              let _43: *const usize; // in scope 29 at $DIR/reference_prop.rs:+53:13: +53:15
+                              scope 30 {
+                                  debug b3 => _43; // in scope 30 at $DIR/reference_prop.rs:+53:13: +53:15
+                              }
+                          }
+                      }
+                  }
+              }
+          }
+      }
+      scope 31 {
+          let _47: *const T;               // in scope 31 at $DIR/reference_prop.rs:+61:13: +61:14
+          scope 32 {
+              debug a => _47;              // in scope 32 at $DIR/reference_prop.rs:+61:13: +61:14
+              let _48: T;                  // in scope 32 at $DIR/reference_prop.rs:+62:13: +62:14
+              scope 33 {
+                  debug b => _48;          // in scope 33 at $DIR/reference_prop.rs:+62:13: +62:14
+              }
+          }
+      }
+      scope 34 {
+          let _52: *const T;               // in scope 34 at $DIR/reference_prop.rs:+68:13: +68:14
+          scope 35 {
+              debug a => _52;              // in scope 35 at $DIR/reference_prop.rs:+68:13: +68:14
+              let _54: T;                  // in scope 35 at $DIR/reference_prop.rs:+70:13: +70:14
+              scope 36 {
+                  debug b => _54;          // in scope 36 at $DIR/reference_prop.rs:+70:13: +70:14
+              }
+          }
+      }
+      scope 37 {
+          let _57: usize;                  // in scope 37 at $DIR/reference_prop.rs:+76:13: +76:14
+          scope 38 {
+              debug a => _57;              // in scope 38 at $DIR/reference_prop.rs:+76:13: +76:14
+              let _58: *const usize;       // in scope 38 at $DIR/reference_prop.rs:+77:13: +77:14
+              scope 39 {
+                  debug b => _58;          // in scope 39 at $DIR/reference_prop.rs:+77:13: +77:14
+                  let _59: *const usize;   // in scope 39 at $DIR/reference_prop.rs:+78:13: +78:14
+                  scope 40 {
+                      debug c => _59;      // in scope 40 at $DIR/reference_prop.rs:+78:13: +78:14
+                      let _60: usize;      // in scope 40 at $DIR/reference_prop.rs:+79:13: +79:14
+                      scope 41 {
+                          debug e => _60;  // in scope 41 at $DIR/reference_prop.rs:+79:13: +79:14
+                      }
+                  }
+              }
+          }
+      }
+  
+      bb0: {
+-         StorageLive(_3);                 // scope 0 at $DIR/reference_prop.rs:+2:5: +7:6
+          StorageLive(_4);                 // scope 1 at $DIR/reference_prop.rs:+3:13: +3:14
+          _4 = const 5_usize;              // scope 1 at $DIR/reference_prop.rs:+3:17: +3:24
+          StorageLive(_5);                 // scope 2 at $DIR/reference_prop.rs:+4:13: +4:14
+          _5 = &raw const _4;              // scope 2 at $DIR/reference_prop.rs:+4:17: +4:29
+          StorageLive(_6);                 // scope 3 at $DIR/reference_prop.rs:+5:13: +5:14
+-         _6 = (*_5);                      // scope 3 at $DIR/reference_prop.rs:+5:17: +5:19
++         _6 = _4;                         // scope 3 at $DIR/reference_prop.rs:+5:17: +5:19
+          StorageLive(_7);                 // scope 4 at $DIR/reference_prop.rs:+6:9: +6:19
+          StorageLive(_8);                 // scope 4 at $DIR/reference_prop.rs:+6:16: +6:18
+          _8 = ();                         // scope 4 at $DIR/reference_prop.rs:+6:16: +6:18
+          _7 = opaque::<()>(move _8) -> bb1; // scope 4 at $DIR/reference_prop.rs:+6:9: +6:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:166:9: 166:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb1: {
+          StorageDead(_8);                 // scope 4 at $DIR/reference_prop.rs:+6:18: +6:19
+          StorageDead(_7);                 // scope 4 at $DIR/reference_prop.rs:+6:19: +6:20
+-         _3 = const ();                   // scope 1 at $DIR/reference_prop.rs:+2:5: +7:6
+          StorageDead(_6);                 // scope 3 at $DIR/reference_prop.rs:+7:5: +7:6
+          StorageDead(_5);                 // scope 2 at $DIR/reference_prop.rs:+7:5: +7:6
+          StorageDead(_4);                 // scope 1 at $DIR/reference_prop.rs:+7:5: +7:6
+-         StorageDead(_3);                 // scope 0 at $DIR/reference_prop.rs:+7:5: +7:6
+-         StorageLive(_9);                 // scope 0 at $DIR/reference_prop.rs:+10:5: +18:6
+          StorageLive(_10);                // scope 5 at $DIR/reference_prop.rs:+11:13: +11:14
+          _10 = const 5_usize;             // scope 5 at $DIR/reference_prop.rs:+11:17: +11:24
+          StorageLive(_11);                // scope 6 at $DIR/reference_prop.rs:+12:13: +12:15
+          _11 = const 7_usize;             // scope 6 at $DIR/reference_prop.rs:+12:18: +12:25
+          StorageLive(_12);                // scope 7 at $DIR/reference_prop.rs:+13:13: +13:18
+          _12 = &raw const _10;            // scope 7 at $DIR/reference_prop.rs:+13:21: +13:33
+          StorageLive(_13);                // scope 8 at $DIR/reference_prop.rs:+14:13: +14:26
+          _13 = &raw const _11;            // scope 8 at $DIR/reference_prop.rs:+14:13: +14:26
+          _12 = move _13;                  // scope 8 at $DIR/reference_prop.rs:+14:9: +14:26
+          StorageDead(_13);                // scope 8 at $DIR/reference_prop.rs:+14:25: +14:26
+          StorageLive(_14);                // scope 8 at $DIR/reference_prop.rs:+16:13: +16:14
+          _14 = (*_12);                    // scope 8 at $DIR/reference_prop.rs:+16:17: +16:19
+          StorageLive(_15);                // scope 9 at $DIR/reference_prop.rs:+17:9: +17:19
+          StorageLive(_16);                // scope 9 at $DIR/reference_prop.rs:+17:16: +17:18
+          _16 = ();                        // scope 9 at $DIR/reference_prop.rs:+17:16: +17:18
+          _15 = opaque::<()>(move _16) -> bb2; // scope 9 at $DIR/reference_prop.rs:+17:9: +17:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:177:9: 177:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb2: {
+          StorageDead(_16);                // scope 9 at $DIR/reference_prop.rs:+17:18: +17:19
+          StorageDead(_15);                // scope 9 at $DIR/reference_prop.rs:+17:19: +17:20
+-         _9 = const ();                   // scope 5 at $DIR/reference_prop.rs:+10:5: +18:6
+          StorageDead(_14);                // scope 8 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_12);                // scope 7 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_11);                // scope 6 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_10);                // scope 5 at $DIR/reference_prop.rs:+18:5: +18:6
+-         StorageDead(_9);                 // scope 0 at $DIR/reference_prop.rs:+18:5: +18:6
+-         StorageLive(_17);                // scope 0 at $DIR/reference_prop.rs:+21:5: +27:6
+          StorageLive(_18);                // scope 10 at $DIR/reference_prop.rs:+22:13: +22:14
+          _18 = const 5_usize;             // scope 10 at $DIR/reference_prop.rs:+22:17: +22:24
+          StorageLive(_19);                // scope 11 at $DIR/reference_prop.rs:+23:13: +23:14
+          _19 = &raw const _18;            // scope 11 at $DIR/reference_prop.rs:+23:17: +23:29
+          StorageLive(_20);                // scope 12 at $DIR/reference_prop.rs:+24:13: +24:14
+          _20 = &_19;                      // scope 12 at $DIR/reference_prop.rs:+24:17: +24:19
+          StorageLive(_21);                // scope 13 at $DIR/reference_prop.rs:+25:13: +25:14
+          _21 = (*_19);                    // scope 13 at $DIR/reference_prop.rs:+25:17: +25:19
+          StorageLive(_22);                // scope 14 at $DIR/reference_prop.rs:+26:9: +26:19
+          StorageLive(_23);                // scope 14 at $DIR/reference_prop.rs:+26:16: +26:18
+          _23 = ();                        // scope 14 at $DIR/reference_prop.rs:+26:16: +26:18
+          _22 = opaque::<()>(move _23) -> bb3; // scope 14 at $DIR/reference_prop.rs:+26:9: +26:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:186:9: 186:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb3: {
+          StorageDead(_23);                // scope 14 at $DIR/reference_prop.rs:+26:18: +26:19
+          StorageDead(_22);                // scope 14 at $DIR/reference_prop.rs:+26:19: +26:20
+-         _17 = const ();                  // scope 10 at $DIR/reference_prop.rs:+21:5: +27:6
+          StorageDead(_21);                // scope 13 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_20);                // scope 12 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_19);                // scope 11 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_18);                // scope 10 at $DIR/reference_prop.rs:+27:5: +27:6
+-         StorageDead(_17);                // scope 0 at $DIR/reference_prop.rs:+27:5: +27:6
+-         StorageLive(_24);                // scope 0 at $DIR/reference_prop.rs:+30:5: +36:6
+          StorageLive(_25);                // scope 15 at $DIR/reference_prop.rs:+31:13: +31:14
+          _25 = const 5_usize;             // scope 15 at $DIR/reference_prop.rs:+31:17: +31:24
+          StorageLive(_26);                // scope 16 at $DIR/reference_prop.rs:+32:13: +32:18
+          _26 = &raw const _25;            // scope 16 at $DIR/reference_prop.rs:+32:21: +32:33
+          StorageLive(_27);                // scope 17 at $DIR/reference_prop.rs:+33:13: +33:14
+          _27 = &mut _26;                  // scope 17 at $DIR/reference_prop.rs:+33:17: +33:23
+          StorageLive(_28);                // scope 18 at $DIR/reference_prop.rs:+34:13: +34:14
+          _28 = (*_26);                    // scope 18 at $DIR/reference_prop.rs:+34:17: +34:19
+          StorageLive(_29);                // scope 19 at $DIR/reference_prop.rs:+35:9: +35:19
+          StorageLive(_30);                // scope 19 at $DIR/reference_prop.rs:+35:16: +35:18
+          _30 = ();                        // scope 19 at $DIR/reference_prop.rs:+35:16: +35:18
+          _29 = opaque::<()>(move _30) -> bb4; // scope 19 at $DIR/reference_prop.rs:+35:9: +35:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:195:9: 195:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb4: {
+          StorageDead(_30);                // scope 19 at $DIR/reference_prop.rs:+35:18: +35:19
+          StorageDead(_29);                // scope 19 at $DIR/reference_prop.rs:+35:19: +35:20
+-         _24 = const ();                  // scope 15 at $DIR/reference_prop.rs:+30:5: +36:6
+          StorageDead(_28);                // scope 18 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_27);                // scope 17 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_26);                // scope 16 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_25);                // scope 15 at $DIR/reference_prop.rs:+36:5: +36:6
+-         StorageDead(_24);                // scope 0 at $DIR/reference_prop.rs:+36:5: +36:6
+-         StorageLive(_31);                // scope 0 at $DIR/reference_prop.rs:+39:5: +44:6
+          StorageLive(_32);                // scope 20 at $DIR/reference_prop.rs:+40:13: +40:14
+          _32 = const 7_usize;             // scope 20 at $DIR/reference_prop.rs:+40:17: +40:24
+          StorageLive(_33);                // scope 21 at $DIR/reference_prop.rs:+41:13: +41:14
+          _33 = &raw const _32;            // scope 21 at $DIR/reference_prop.rs:+41:17: +41:29
+          StorageLive(_34);                // scope 22 at $DIR/reference_prop.rs:+42:13: +42:14
+-         _34 = (*_33);                    // scope 22 at $DIR/reference_prop.rs:+42:17: +42:19
++         _34 = _32;                       // scope 22 at $DIR/reference_prop.rs:+42:17: +42:19
+          StorageLive(_35);                // scope 23 at $DIR/reference_prop.rs:+43:9: +43:18
+          StorageLive(_36);                // scope 23 at $DIR/reference_prop.rs:+43:16: +43:17
+          _36 = _33;                       // scope 23 at $DIR/reference_prop.rs:+43:16: +43:17
+          _35 = opaque::<*const usize>(move _36) -> bb5; // scope 23 at $DIR/reference_prop.rs:+43:9: +43:18
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:203:9: 203:15
+                                           // + literal: Const { ty: fn(*const usize) {opaque::<*const usize>}, val: Value(<ZST>) }
+      }
+  
+      bb5: {
+          StorageDead(_36);                // scope 23 at $DIR/reference_prop.rs:+43:17: +43:18
+          StorageDead(_35);                // scope 23 at $DIR/reference_prop.rs:+43:18: +43:19
+-         _31 = const ();                  // scope 20 at $DIR/reference_prop.rs:+39:5: +44:6
+          StorageDead(_34);                // scope 22 at $DIR/reference_prop.rs:+44:5: +44:6
+          StorageDead(_33);                // scope 21 at $DIR/reference_prop.rs:+44:5: +44:6
+          StorageDead(_32);                // scope 20 at $DIR/reference_prop.rs:+44:5: +44:6
+-         StorageDead(_31);                // scope 0 at $DIR/reference_prop.rs:+44:5: +44:6
+-         StorageLive(_37);                // scope 0 at $DIR/reference_prop.rs:+47:5: +57:6
+          StorageLive(_38);                // scope 24 at $DIR/reference_prop.rs:+48:13: +48:14
+          _38 = const 7_usize;             // scope 24 at $DIR/reference_prop.rs:+48:17: +48:24
+          StorageLive(_39);                // scope 25 at $DIR/reference_prop.rs:+49:13: +49:15
+          _39 = &raw const _38;            // scope 25 at $DIR/reference_prop.rs:+49:18: +49:30
+          StorageLive(_40);                // scope 26 at $DIR/reference_prop.rs:+50:13: +50:14
+-         _40 = (*_39);                    // scope 26 at $DIR/reference_prop.rs:+50:17: +50:20
++         _40 = _38;                       // scope 26 at $DIR/reference_prop.rs:+50:17: +50:20
+          StorageLive(_41);                // scope 27 at $DIR/reference_prop.rs:+51:13: +51:15
+          _41 = _39;                       // scope 27 at $DIR/reference_prop.rs:+51:18: +51:20
+          StorageLive(_42);                // scope 28 at $DIR/reference_prop.rs:+52:13: +52:15
+-         _42 = (*_41);                    // scope 28 at $DIR/reference_prop.rs:+52:18: +52:21
++         _42 = _38;                       // scope 28 at $DIR/reference_prop.rs:+52:18: +52:21
+          StorageLive(_43);                // scope 29 at $DIR/reference_prop.rs:+53:13: +53:15
+          _43 = _41;                       // scope 29 at $DIR/reference_prop.rs:+53:18: +53:20
+          StorageLive(_44);                // scope 30 at $DIR/reference_prop.rs:+56:9: +56:19
+          StorageLive(_45);                // scope 30 at $DIR/reference_prop.rs:+56:16: +56:18
+          _45 = _43;                       // scope 30 at $DIR/reference_prop.rs:+56:16: +56:18
+          _44 = opaque::<*const usize>(move _45) -> bb6; // scope 30 at $DIR/reference_prop.rs:+56:9: +56:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:216:9: 216:15
+                                           // + literal: Const { ty: fn(*const usize) {opaque::<*const usize>}, val: Value(<ZST>) }
+      }
+  
+      bb6: {
+          StorageDead(_45);                // scope 30 at $DIR/reference_prop.rs:+56:18: +56:19
+          StorageDead(_44);                // scope 30 at $DIR/reference_prop.rs:+56:19: +56:20
+-         _37 = const ();                  // scope 24 at $DIR/reference_prop.rs:+47:5: +57:6
+          StorageDead(_43);                // scope 29 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_42);                // scope 28 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_41);                // scope 27 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_40);                // scope 26 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_39);                // scope 25 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_38);                // scope 24 at $DIR/reference_prop.rs:+57:5: +57:6
+-         StorageDead(_37);                // scope 0 at $DIR/reference_prop.rs:+57:5: +57:6
+-         StorageLive(_46);                // scope 0 at $DIR/reference_prop.rs:+60:5: +64:6
+          StorageLive(_47);                // scope 31 at $DIR/reference_prop.rs:+61:13: +61:14
+          _47 = &raw const (*_1);          // scope 31 at $DIR/reference_prop.rs:+61:17: +61:35
+          StorageLive(_48);                // scope 32 at $DIR/reference_prop.rs:+62:13: +62:14
+-         _48 = (*_47);                    // scope 32 at $DIR/reference_prop.rs:+62:17: +62:19
++         _48 = (*_1);                     // scope 32 at $DIR/reference_prop.rs:+62:17: +62:19
+          StorageLive(_49);                // scope 33 at $DIR/reference_prop.rs:+63:9: +63:19
+          StorageLive(_50);                // scope 33 at $DIR/reference_prop.rs:+63:16: +63:18
+          _50 = ();                        // scope 33 at $DIR/reference_prop.rs:+63:16: +63:18
+          _49 = opaque::<()>(move _50) -> bb7; // scope 33 at $DIR/reference_prop.rs:+63:9: +63:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:223:9: 223:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb7: {
+          StorageDead(_50);                // scope 33 at $DIR/reference_prop.rs:+63:18: +63:19
+          StorageDead(_49);                // scope 33 at $DIR/reference_prop.rs:+63:19: +63:20
+-         _46 = const ();                  // scope 31 at $DIR/reference_prop.rs:+60:5: +64:6
+          StorageDead(_48);                // scope 32 at $DIR/reference_prop.rs:+64:5: +64:6
+          StorageDead(_47);                // scope 31 at $DIR/reference_prop.rs:+64:5: +64:6
+-         StorageDead(_46);                // scope 0 at $DIR/reference_prop.rs:+64:5: +64:6
+-         StorageLive(_51);                // scope 0 at $DIR/reference_prop.rs:+67:5: +72:6
+          StorageLive(_52);                // scope 34 at $DIR/reference_prop.rs:+68:13: +68:14
+          _52 = &raw const (*_2);          // scope 34 at $DIR/reference_prop.rs:+68:17: +68:37
+          StorageLive(_53);                // scope 35 at $DIR/reference_prop.rs:+69:20: +69:38
+          _53 = &raw const (*_1);          // scope 35 at $DIR/reference_prop.rs:+69:20: +69:38
+          _2 = move _53;                   // scope 35 at $DIR/reference_prop.rs:+69:9: +69:38
+          StorageDead(_53);                // scope 35 at $DIR/reference_prop.rs:+69:37: +69:38
+          StorageLive(_54);                // scope 35 at $DIR/reference_prop.rs:+70:13: +70:14
+          _54 = (*_52);                    // scope 35 at $DIR/reference_prop.rs:+70:17: +70:19
+          StorageLive(_55);                // scope 36 at $DIR/reference_prop.rs:+71:9: +71:19
+          StorageLive(_56);                // scope 36 at $DIR/reference_prop.rs:+71:16: +71:18
+          _56 = ();                        // scope 36 at $DIR/reference_prop.rs:+71:16: +71:18
+          _55 = opaque::<()>(move _56) -> bb8; // scope 36 at $DIR/reference_prop.rs:+71:9: +71:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:231:9: 231:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb8: {
+          StorageDead(_56);                // scope 36 at $DIR/reference_prop.rs:+71:18: +71:19
+          StorageDead(_55);                // scope 36 at $DIR/reference_prop.rs:+71:19: +71:20
+-         _51 = const ();                  // scope 34 at $DIR/reference_prop.rs:+67:5: +72:6
+          StorageDead(_54);                // scope 35 at $DIR/reference_prop.rs:+72:5: +72:6
+          StorageDead(_52);                // scope 34 at $DIR/reference_prop.rs:+72:5: +72:6
+-         StorageDead(_51);                // scope 0 at $DIR/reference_prop.rs:+72:5: +72:6
+          StorageLive(_57);                // scope 37 at $DIR/reference_prop.rs:+76:13: +76:14
+          _57 = const 13_usize;            // scope 37 at $DIR/reference_prop.rs:+76:17: +76:25
+          StorageLive(_58);                // scope 38 at $DIR/reference_prop.rs:+77:13: +77:14
+          _58 = &raw const _57;            // scope 38 at $DIR/reference_prop.rs:+77:17: +77:29
+          StorageLive(_59);                // scope 39 at $DIR/reference_prop.rs:+78:13: +78:14
+-         _59 = &raw const (*_58);         // scope 39 at $DIR/reference_prop.rs:+78:17: +78:30
++         _59 = &raw const _57;            // scope 39 at $DIR/reference_prop.rs:+78:17: +78:30
+          StorageLive(_60);                // scope 40 at $DIR/reference_prop.rs:+79:13: +79:14
+-         _60 = (*_59);                    // scope 40 at $DIR/reference_prop.rs:+79:17: +79:19
++         _60 = _57;                       // scope 40 at $DIR/reference_prop.rs:+79:17: +79:19
+          StorageLive(_61);                // scope 41 at $DIR/reference_prop.rs:+80:9: +80:19
+          StorageLive(_62);                // scope 41 at $DIR/reference_prop.rs:+80:16: +80:18
+          _62 = ();                        // scope 41 at $DIR/reference_prop.rs:+80:16: +80:18
+          _61 = opaque::<()>(move _62) -> bb9; // scope 41 at $DIR/reference_prop.rs:+80:9: +80:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:240:9: 240:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb9: {
+          StorageDead(_62);                // scope 41 at $DIR/reference_prop.rs:+80:18: +80:19
+          StorageDead(_61);                // scope 41 at $DIR/reference_prop.rs:+80:19: +80:20
+          _0 = const ();                   // scope 37 at $DIR/reference_prop.rs:+75:5: +81:6
+          StorageDead(_60);                // scope 40 at $DIR/reference_prop.rs:+81:5: +81:6
+          StorageDead(_59);                // scope 39 at $DIR/reference_prop.rs:+81:5: +81:6
+          StorageDead(_58);                // scope 38 at $DIR/reference_prop.rs:+81:5: +81:6
+          StorageDead(_57);                // scope 37 at $DIR/reference_prop.rs:+81:5: +81:6
+          return;                          // scope 0 at $DIR/reference_prop.rs:+82:2: +82:2
+      }
+  }
+  
diff --git a/tests/mir-opt/reference_prop.reference_propagation_mut.ReferencePropagation.diff b/tests/mir-opt/reference_prop.reference_propagation_mut.ReferencePropagation.diff
new file mode 100644
index 00000000000..44ddbbc3066
--- /dev/null
+++ b/tests/mir-opt/reference_prop.reference_propagation_mut.ReferencePropagation.diff
@@ -0,0 +1,372 @@
+- // MIR for `reference_propagation_mut` before ReferencePropagation
++ // MIR for `reference_propagation_mut` after ReferencePropagation
+  
+  fn reference_propagation_mut(_1: &mut T, _2: &mut T) -> () {
+      debug single => _1;                  // in scope 0 at $DIR/reference_prop.rs:+0:43: +0:49
+      debug multiple => _2;                // in scope 0 at $DIR/reference_prop.rs:+0:62: +0:74
+      let mut _0: ();                      // return place in scope 0 at $DIR/reference_prop.rs:+0:87: +0:87
+      let _3: ();                          // in scope 0 at $DIR/reference_prop.rs:+2:5: +7:6
+      let mut _4: usize;                   // in scope 0 at $DIR/reference_prop.rs:+3:13: +3:18
+      let _7: ();                          // in scope 0 at $DIR/reference_prop.rs:+6:9: +6:19
+      let mut _8: ();                      // in scope 0 at $DIR/reference_prop.rs:+6:16: +6:18
+      let _9: ();                          // in scope 0 at $DIR/reference_prop.rs:+10:5: +18:6
+      let mut _10: usize;                  // in scope 0 at $DIR/reference_prop.rs:+11:13: +11:18
+      let mut _13: &mut usize;             // in scope 0 at $DIR/reference_prop.rs:+14:13: +14:20
+      let mut _14: &mut usize;             // in scope 0 at $DIR/reference_prop.rs:+14:13: +14:20
+      let _16: ();                         // in scope 0 at $DIR/reference_prop.rs:+17:9: +17:19
+      let mut _17: ();                     // in scope 0 at $DIR/reference_prop.rs:+17:16: +17:18
+      let _18: ();                         // in scope 0 at $DIR/reference_prop.rs:+21:5: +27:6
+      let mut _19: usize;                  // in scope 0 at $DIR/reference_prop.rs:+22:13: +22:18
+      let _23: ();                         // in scope 0 at $DIR/reference_prop.rs:+26:9: +26:19
+      let mut _24: ();                     // in scope 0 at $DIR/reference_prop.rs:+26:16: +26:18
+      let _25: ();                         // in scope 0 at $DIR/reference_prop.rs:+30:5: +36:6
+      let mut _26: usize;                  // in scope 0 at $DIR/reference_prop.rs:+31:13: +31:18
+      let _30: ();                         // in scope 0 at $DIR/reference_prop.rs:+35:9: +35:19
+      let mut _31: ();                     // in scope 0 at $DIR/reference_prop.rs:+35:16: +35:18
+      let _32: ();                         // in scope 0 at $DIR/reference_prop.rs:+39:5: +44:6
+      let mut _33: usize;                  // in scope 0 at $DIR/reference_prop.rs:+40:13: +40:18
+      let _36: ();                         // in scope 0 at $DIR/reference_prop.rs:+43:9: +43:18
+      let mut _37: &mut usize;             // in scope 0 at $DIR/reference_prop.rs:+43:16: +43:17
+      let _38: ();                         // in scope 0 at $DIR/reference_prop.rs:+47:5: +57:6
+      let mut _39: usize;                  // in scope 0 at $DIR/reference_prop.rs:+48:13: +48:18
+      let _45: ();                         // in scope 0 at $DIR/reference_prop.rs:+56:9: +56:19
+      let mut _46: &mut usize;             // in scope 0 at $DIR/reference_prop.rs:+56:16: +56:18
+      let _47: ();                         // in scope 0 at $DIR/reference_prop.rs:+60:5: +64:6
+      let _48: &mut T;                     // in scope 0 at $DIR/reference_prop.rs:+61:13: +61:14
+      let _50: ();                         // in scope 0 at $DIR/reference_prop.rs:+63:9: +63:19
+      let mut _51: ();                     // in scope 0 at $DIR/reference_prop.rs:+63:16: +63:18
+      let _52: &mut T;                     // in scope 0 at $DIR/reference_prop.rs:+68:13: +68:14
+      let mut _53: &mut T;                 // in scope 0 at $DIR/reference_prop.rs:+69:20: +69:32
+      let mut _54: &mut T;                 // in scope 0 at $DIR/reference_prop.rs:+69:20: +69:32
+      let _56: ();                         // in scope 0 at $DIR/reference_prop.rs:+71:9: +71:19
+      let mut _57: ();                     // in scope 0 at $DIR/reference_prop.rs:+71:16: +71:18
+      scope 1 {
+          debug a => _4;                   // in scope 1 at $DIR/reference_prop.rs:+3:13: +3:18
+          let _5: &mut usize;              // in scope 1 at $DIR/reference_prop.rs:+4:13: +4:14
+          scope 2 {
+              debug b => _5;               // in scope 2 at $DIR/reference_prop.rs:+4:13: +4:14
+              let _6: usize;               // in scope 2 at $DIR/reference_prop.rs:+5:13: +5:14
+              scope 3 {
+                  debug c => _6;           // in scope 3 at $DIR/reference_prop.rs:+5:13: +5:14
+              }
+          }
+      }
+      scope 4 {
+          debug a => _10;                  // in scope 4 at $DIR/reference_prop.rs:+11:13: +11:18
+          let mut _11: usize;              // in scope 4 at $DIR/reference_prop.rs:+12:13: +12:19
+          scope 5 {
+              debug a2 => _11;             // in scope 5 at $DIR/reference_prop.rs:+12:13: +12:19
+              let mut _12: &mut usize;     // in scope 5 at $DIR/reference_prop.rs:+13:13: +13:18
+              scope 6 {
+                  debug b => _12;          // in scope 6 at $DIR/reference_prop.rs:+13:13: +13:18
+                  let _15: usize;          // in scope 6 at $DIR/reference_prop.rs:+16:13: +16:14
+                  scope 7 {
+                      debug c => _15;      // in scope 7 at $DIR/reference_prop.rs:+16:13: +16:14
+                  }
+              }
+          }
+      }
+      scope 8 {
+          debug a => _19;                  // in scope 8 at $DIR/reference_prop.rs:+22:13: +22:18
+          let _20: &mut usize;             // in scope 8 at $DIR/reference_prop.rs:+23:13: +23:14
+          scope 9 {
+              debug b => _20;              // in scope 9 at $DIR/reference_prop.rs:+23:13: +23:14
+              let _21: &&mut usize;        // in scope 9 at $DIR/reference_prop.rs:+24:13: +24:14
+              scope 10 {
+                  debug d => _21;          // in scope 10 at $DIR/reference_prop.rs:+24:13: +24:14
+                  let _22: usize;          // in scope 10 at $DIR/reference_prop.rs:+25:13: +25:14
+                  scope 11 {
+                      debug c => _22;      // in scope 11 at $DIR/reference_prop.rs:+25:13: +25:14
+                  }
+              }
+          }
+      }
+      scope 12 {
+          debug a => _26;                  // in scope 12 at $DIR/reference_prop.rs:+31:13: +31:18
+          let mut _27: &mut usize;         // in scope 12 at $DIR/reference_prop.rs:+32:13: +32:18
+          scope 13 {
+              debug b => _27;              // in scope 13 at $DIR/reference_prop.rs:+32:13: +32:18
+              let _28: &mut &mut usize;    // in scope 13 at $DIR/reference_prop.rs:+33:13: +33:14
+              scope 14 {
+                  debug d => _28;          // in scope 14 at $DIR/reference_prop.rs:+33:13: +33:14
+                  let _29: usize;          // in scope 14 at $DIR/reference_prop.rs:+34:13: +34:14
+                  scope 15 {
+                      debug c => _29;      // in scope 15 at $DIR/reference_prop.rs:+34:13: +34:14
+                  }
+              }
+          }
+      }
+      scope 16 {
+          debug a => _33;                  // in scope 16 at $DIR/reference_prop.rs:+40:13: +40:18
+          let _34: &mut usize;             // in scope 16 at $DIR/reference_prop.rs:+41:13: +41:14
+          scope 17 {
+              debug b => _34;              // in scope 17 at $DIR/reference_prop.rs:+41:13: +41:14
+              let _35: usize;              // in scope 17 at $DIR/reference_prop.rs:+42:13: +42:14
+              scope 18 {
+                  debug c => _35;          // in scope 18 at $DIR/reference_prop.rs:+42:13: +42:14
+              }
+          }
+      }
+      scope 19 {
+          debug a => _39;                  // in scope 19 at $DIR/reference_prop.rs:+48:13: +48:18
+          let _40: &mut usize;             // in scope 19 at $DIR/reference_prop.rs:+49:13: +49:15
+          scope 20 {
+              debug b1 => _40;             // in scope 20 at $DIR/reference_prop.rs:+49:13: +49:15
+              let _41: usize;              // in scope 20 at $DIR/reference_prop.rs:+50:13: +50:14
+              scope 21 {
+                  debug c => _41;          // in scope 21 at $DIR/reference_prop.rs:+50:13: +50:14
+                  let _42: &mut usize;     // in scope 21 at $DIR/reference_prop.rs:+51:13: +51:15
+                  scope 22 {
+                      debug b2 => _42;     // in scope 22 at $DIR/reference_prop.rs:+51:13: +51:15
+                      let _43: usize;      // in scope 22 at $DIR/reference_prop.rs:+52:13: +52:15
+                      scope 23 {
+                          debug c2 => _43; // in scope 23 at $DIR/reference_prop.rs:+52:13: +52:15
+                          let _44: &mut usize; // in scope 23 at $DIR/reference_prop.rs:+53:13: +53:15
+                          scope 24 {
+                              debug b3 => _44; // in scope 24 at $DIR/reference_prop.rs:+53:13: +53:15
+                          }
+                      }
+                  }
+              }
+          }
+      }
+      scope 25 {
+          debug a => _48;                  // in scope 25 at $DIR/reference_prop.rs:+61:13: +61:14
+          let _49: T;                      // in scope 25 at $DIR/reference_prop.rs:+62:13: +62:14
+          scope 26 {
+              debug b => _49;              // in scope 26 at $DIR/reference_prop.rs:+62:13: +62:14
+          }
+      }
+      scope 27 {
+          debug a => _52;                  // in scope 27 at $DIR/reference_prop.rs:+68:13: +68:14
+          let _55: T;                      // in scope 27 at $DIR/reference_prop.rs:+70:13: +70:14
+          scope 28 {
+              debug b => _55;              // in scope 28 at $DIR/reference_prop.rs:+70:13: +70:14
+          }
+      }
+  
+      bb0: {
+-         StorageLive(_3);                 // scope 0 at $DIR/reference_prop.rs:+2:5: +7:6
+          StorageLive(_4);                 // scope 0 at $DIR/reference_prop.rs:+3:13: +3:18
+          _4 = const 5_usize;              // scope 0 at $DIR/reference_prop.rs:+3:21: +3:28
+          StorageLive(_5);                 // scope 1 at $DIR/reference_prop.rs:+4:13: +4:14
+          _5 = &mut _4;                    // scope 1 at $DIR/reference_prop.rs:+4:17: +4:23
+          StorageLive(_6);                 // scope 2 at $DIR/reference_prop.rs:+5:13: +5:14
+-         _6 = (*_5);                      // scope 2 at $DIR/reference_prop.rs:+5:17: +5:19
++         _6 = _4;                         // scope 2 at $DIR/reference_prop.rs:+5:17: +5:19
+          StorageLive(_7);                 // scope 3 at $DIR/reference_prop.rs:+6:9: +6:19
+          StorageLive(_8);                 // scope 3 at $DIR/reference_prop.rs:+6:16: +6:18
+          _8 = ();                         // scope 3 at $DIR/reference_prop.rs:+6:16: +6:18
+          _7 = opaque::<()>(move _8) -> bb1; // scope 3 at $DIR/reference_prop.rs:+6:9: +6:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:91:9: 91:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb1: {
+          StorageDead(_8);                 // scope 3 at $DIR/reference_prop.rs:+6:18: +6:19
+          StorageDead(_7);                 // scope 3 at $DIR/reference_prop.rs:+6:19: +6:20
+-         _3 = const ();                   // scope 0 at $DIR/reference_prop.rs:+2:5: +7:6
+          StorageDead(_6);                 // scope 2 at $DIR/reference_prop.rs:+7:5: +7:6
+          StorageDead(_5);                 // scope 1 at $DIR/reference_prop.rs:+7:5: +7:6
+          StorageDead(_4);                 // scope 0 at $DIR/reference_prop.rs:+7:5: +7:6
+-         StorageDead(_3);                 // scope 0 at $DIR/reference_prop.rs:+7:5: +7:6
+-         StorageLive(_9);                 // scope 0 at $DIR/reference_prop.rs:+10:5: +18:6
+          StorageLive(_10);                // scope 0 at $DIR/reference_prop.rs:+11:13: +11:18
+          _10 = const 5_usize;             // scope 0 at $DIR/reference_prop.rs:+11:21: +11:28
+          StorageLive(_11);                // scope 4 at $DIR/reference_prop.rs:+12:13: +12:19
+          _11 = const 7_usize;             // scope 4 at $DIR/reference_prop.rs:+12:22: +12:29
+          StorageLive(_12);                // scope 5 at $DIR/reference_prop.rs:+13:13: +13:18
+          _12 = &mut _10;                  // scope 5 at $DIR/reference_prop.rs:+13:21: +13:27
+          StorageLive(_13);                // scope 6 at $DIR/reference_prop.rs:+14:13: +14:20
+-         StorageLive(_14);                // scope 6 at $DIR/reference_prop.rs:+14:13: +14:20
+-         _14 = &mut _11;                  // scope 6 at $DIR/reference_prop.rs:+14:13: +14:20
+-         _13 = &mut (*_14);               // scope 6 at $DIR/reference_prop.rs:+14:13: +14:20
++         _13 = &mut _11;                  // scope 6 at $DIR/reference_prop.rs:+14:13: +14:20
+          _12 = move _13;                  // scope 6 at $DIR/reference_prop.rs:+14:9: +14:20
+          StorageDead(_13);                // scope 6 at $DIR/reference_prop.rs:+14:19: +14:20
+-         StorageDead(_14);                // scope 6 at $DIR/reference_prop.rs:+14:20: +14:21
+          StorageLive(_15);                // scope 6 at $DIR/reference_prop.rs:+16:13: +16:14
+          _15 = (*_12);                    // scope 6 at $DIR/reference_prop.rs:+16:17: +16:19
+          StorageLive(_16);                // scope 7 at $DIR/reference_prop.rs:+17:9: +17:19
+          StorageLive(_17);                // scope 7 at $DIR/reference_prop.rs:+17:16: +17:18
+          _17 = ();                        // scope 7 at $DIR/reference_prop.rs:+17:16: +17:18
+          _16 = opaque::<()>(move _17) -> bb2; // scope 7 at $DIR/reference_prop.rs:+17:9: +17:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:102:9: 102:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb2: {
+          StorageDead(_17);                // scope 7 at $DIR/reference_prop.rs:+17:18: +17:19
+          StorageDead(_16);                // scope 7 at $DIR/reference_prop.rs:+17:19: +17:20
+-         _9 = const ();                   // scope 0 at $DIR/reference_prop.rs:+10:5: +18:6
+          StorageDead(_15);                // scope 6 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_12);                // scope 5 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_11);                // scope 4 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_10);                // scope 0 at $DIR/reference_prop.rs:+18:5: +18:6
+-         StorageDead(_9);                 // scope 0 at $DIR/reference_prop.rs:+18:5: +18:6
+-         StorageLive(_18);                // scope 0 at $DIR/reference_prop.rs:+21:5: +27:6
+          StorageLive(_19);                // scope 0 at $DIR/reference_prop.rs:+22:13: +22:18
+          _19 = const 5_usize;             // scope 0 at $DIR/reference_prop.rs:+22:21: +22:28
+          StorageLive(_20);                // scope 8 at $DIR/reference_prop.rs:+23:13: +23:14
+          _20 = &mut _19;                  // scope 8 at $DIR/reference_prop.rs:+23:17: +23:23
+          StorageLive(_21);                // scope 9 at $DIR/reference_prop.rs:+24:13: +24:14
+          _21 = &_20;                      // scope 9 at $DIR/reference_prop.rs:+24:17: +24:19
+          StorageLive(_22);                // scope 10 at $DIR/reference_prop.rs:+25:13: +25:14
+          _22 = (*_20);                    // scope 10 at $DIR/reference_prop.rs:+25:17: +25:19
+          StorageLive(_23);                // scope 11 at $DIR/reference_prop.rs:+26:9: +26:19
+          StorageLive(_24);                // scope 11 at $DIR/reference_prop.rs:+26:16: +26:18
+          _24 = ();                        // scope 11 at $DIR/reference_prop.rs:+26:16: +26:18
+          _23 = opaque::<()>(move _24) -> bb3; // scope 11 at $DIR/reference_prop.rs:+26:9: +26:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:111:9: 111:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb3: {
+          StorageDead(_24);                // scope 11 at $DIR/reference_prop.rs:+26:18: +26:19
+          StorageDead(_23);                // scope 11 at $DIR/reference_prop.rs:+26:19: +26:20
+-         _18 = const ();                  // scope 0 at $DIR/reference_prop.rs:+21:5: +27:6
+          StorageDead(_22);                // scope 10 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_21);                // scope 9 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_20);                // scope 8 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_19);                // scope 0 at $DIR/reference_prop.rs:+27:5: +27:6
+-         StorageDead(_18);                // scope 0 at $DIR/reference_prop.rs:+27:5: +27:6
+-         StorageLive(_25);                // scope 0 at $DIR/reference_prop.rs:+30:5: +36:6
+          StorageLive(_26);                // scope 0 at $DIR/reference_prop.rs:+31:13: +31:18
+          _26 = const 5_usize;             // scope 0 at $DIR/reference_prop.rs:+31:21: +31:28
+          StorageLive(_27);                // scope 12 at $DIR/reference_prop.rs:+32:13: +32:18
+          _27 = &mut _26;                  // scope 12 at $DIR/reference_prop.rs:+32:21: +32:27
+          StorageLive(_28);                // scope 13 at $DIR/reference_prop.rs:+33:13: +33:14
+          _28 = &mut _27;                  // scope 13 at $DIR/reference_prop.rs:+33:17: +33:23
+          StorageLive(_29);                // scope 14 at $DIR/reference_prop.rs:+34:13: +34:14
+          _29 = (*_27);                    // scope 14 at $DIR/reference_prop.rs:+34:17: +34:19
+          StorageLive(_30);                // scope 15 at $DIR/reference_prop.rs:+35:9: +35:19
+          StorageLive(_31);                // scope 15 at $DIR/reference_prop.rs:+35:16: +35:18
+          _31 = ();                        // scope 15 at $DIR/reference_prop.rs:+35:16: +35:18
+          _30 = opaque::<()>(move _31) -> bb4; // scope 15 at $DIR/reference_prop.rs:+35:9: +35:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:120:9: 120:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb4: {
+          StorageDead(_31);                // scope 15 at $DIR/reference_prop.rs:+35:18: +35:19
+          StorageDead(_30);                // scope 15 at $DIR/reference_prop.rs:+35:19: +35:20
+-         _25 = const ();                  // scope 0 at $DIR/reference_prop.rs:+30:5: +36:6
+          StorageDead(_29);                // scope 14 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_28);                // scope 13 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_27);                // scope 12 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_26);                // scope 0 at $DIR/reference_prop.rs:+36:5: +36:6
+-         StorageDead(_25);                // scope 0 at $DIR/reference_prop.rs:+36:5: +36:6
+-         StorageLive(_32);                // scope 0 at $DIR/reference_prop.rs:+39:5: +44:6
+          StorageLive(_33);                // scope 0 at $DIR/reference_prop.rs:+40:13: +40:18
+          _33 = const 7_usize;             // scope 0 at $DIR/reference_prop.rs:+40:21: +40:28
+          StorageLive(_34);                // scope 16 at $DIR/reference_prop.rs:+41:13: +41:14
+          _34 = &mut _33;                  // scope 16 at $DIR/reference_prop.rs:+41:17: +41:23
+          StorageLive(_35);                // scope 17 at $DIR/reference_prop.rs:+42:13: +42:14
+          _35 = (*_34);                    // scope 17 at $DIR/reference_prop.rs:+42:17: +42:19
+          StorageLive(_36);                // scope 18 at $DIR/reference_prop.rs:+43:9: +43:18
+          StorageLive(_37);                // scope 18 at $DIR/reference_prop.rs:+43:16: +43:17
+          _37 = move _34;                  // scope 18 at $DIR/reference_prop.rs:+43:16: +43:17
+          _36 = opaque::<&mut usize>(move _37) -> bb5; // scope 18 at $DIR/reference_prop.rs:+43:9: +43:18
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:128:9: 128:15
+                                           // + literal: Const { ty: fn(&mut usize) {opaque::<&mut usize>}, val: Value(<ZST>) }
+      }
+  
+      bb5: {
+          StorageDead(_37);                // scope 18 at $DIR/reference_prop.rs:+43:17: +43:18
+          StorageDead(_36);                // scope 18 at $DIR/reference_prop.rs:+43:18: +43:19
+-         _32 = const ();                  // scope 0 at $DIR/reference_prop.rs:+39:5: +44:6
+          StorageDead(_35);                // scope 17 at $DIR/reference_prop.rs:+44:5: +44:6
+          StorageDead(_34);                // scope 16 at $DIR/reference_prop.rs:+44:5: +44:6
+          StorageDead(_33);                // scope 0 at $DIR/reference_prop.rs:+44:5: +44:6
+-         StorageDead(_32);                // scope 0 at $DIR/reference_prop.rs:+44:5: +44:6
+-         StorageLive(_38);                // scope 0 at $DIR/reference_prop.rs:+47:5: +57:6
+          StorageLive(_39);                // scope 0 at $DIR/reference_prop.rs:+48:13: +48:18
+          _39 = const 7_usize;             // scope 0 at $DIR/reference_prop.rs:+48:21: +48:28
+          StorageLive(_40);                // scope 19 at $DIR/reference_prop.rs:+49:13: +49:15
+          _40 = &mut _39;                  // scope 19 at $DIR/reference_prop.rs:+49:18: +49:24
+          StorageLive(_41);                // scope 20 at $DIR/reference_prop.rs:+50:13: +50:14
+          _41 = (*_40);                    // scope 20 at $DIR/reference_prop.rs:+50:17: +50:20
+          StorageLive(_42);                // scope 21 at $DIR/reference_prop.rs:+51:13: +51:15
+          _42 = move _40;                  // scope 21 at $DIR/reference_prop.rs:+51:18: +51:20
+          StorageLive(_43);                // scope 22 at $DIR/reference_prop.rs:+52:13: +52:15
+          _43 = (*_42);                    // scope 22 at $DIR/reference_prop.rs:+52:18: +52:21
+          StorageLive(_44);                // scope 23 at $DIR/reference_prop.rs:+53:13: +53:15
+          _44 = move _42;                  // scope 23 at $DIR/reference_prop.rs:+53:18: +53:20
+          StorageLive(_45);                // scope 24 at $DIR/reference_prop.rs:+56:9: +56:19
+          StorageLive(_46);                // scope 24 at $DIR/reference_prop.rs:+56:16: +56:18
+          _46 = move _44;                  // scope 24 at $DIR/reference_prop.rs:+56:16: +56:18
+          _45 = opaque::<&mut usize>(move _46) -> bb6; // scope 24 at $DIR/reference_prop.rs:+56:9: +56:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:141:9: 141:15
+                                           // + literal: Const { ty: fn(&mut usize) {opaque::<&mut usize>}, val: Value(<ZST>) }
+      }
+  
+      bb6: {
+          StorageDead(_46);                // scope 24 at $DIR/reference_prop.rs:+56:18: +56:19
+          StorageDead(_45);                // scope 24 at $DIR/reference_prop.rs:+56:19: +56:20
+-         _38 = const ();                  // scope 0 at $DIR/reference_prop.rs:+47:5: +57:6
+          StorageDead(_44);                // scope 23 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_43);                // scope 22 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_42);                // scope 21 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_41);                // scope 20 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_40);                // scope 19 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_39);                // scope 0 at $DIR/reference_prop.rs:+57:5: +57:6
+-         StorageDead(_38);                // scope 0 at $DIR/reference_prop.rs:+57:5: +57:6
+-         StorageLive(_47);                // scope 0 at $DIR/reference_prop.rs:+60:5: +64:6
+          StorageLive(_48);                // scope 0 at $DIR/reference_prop.rs:+61:13: +61:14
+          _48 = &mut (*_1);                // scope 0 at $DIR/reference_prop.rs:+61:17: +61:29
+          StorageLive(_49);                // scope 25 at $DIR/reference_prop.rs:+62:13: +62:14
+-         _49 = (*_48);                    // scope 25 at $DIR/reference_prop.rs:+62:17: +62:19
++         _49 = (*_1);                     // scope 25 at $DIR/reference_prop.rs:+62:17: +62:19
+          StorageLive(_50);                // scope 26 at $DIR/reference_prop.rs:+63:9: +63:19
+          StorageLive(_51);                // scope 26 at $DIR/reference_prop.rs:+63:16: +63:18
+          _51 = ();                        // scope 26 at $DIR/reference_prop.rs:+63:16: +63:18
+          _50 = opaque::<()>(move _51) -> bb7; // scope 26 at $DIR/reference_prop.rs:+63:9: +63:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:148:9: 148:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb7: {
+          StorageDead(_51);                // scope 26 at $DIR/reference_prop.rs:+63:18: +63:19
+          StorageDead(_50);                // scope 26 at $DIR/reference_prop.rs:+63:19: +63:20
+-         _47 = const ();                  // scope 0 at $DIR/reference_prop.rs:+60:5: +64:6
+          StorageDead(_49);                // scope 25 at $DIR/reference_prop.rs:+64:5: +64:6
+          StorageDead(_48);                // scope 0 at $DIR/reference_prop.rs:+64:5: +64:6
+-         StorageDead(_47);                // scope 0 at $DIR/reference_prop.rs:+64:5: +64:6
+          StorageLive(_52);                // scope 0 at $DIR/reference_prop.rs:+68:13: +68:14
+          _52 = &mut (*_2);                // scope 0 at $DIR/reference_prop.rs:+68:17: +68:31
+          StorageLive(_53);                // scope 27 at $DIR/reference_prop.rs:+69:20: +69:32
+-         StorageLive(_54);                // scope 27 at $DIR/reference_prop.rs:+69:20: +69:32
+-         _54 = &mut (*_1);                // scope 27 at $DIR/reference_prop.rs:+69:20: +69:32
+-         _53 = &mut (*_54);               // scope 27 at $DIR/reference_prop.rs:+69:20: +69:32
++         _53 = &mut (*_1);                // scope 27 at $DIR/reference_prop.rs:+69:20: +69:32
+          _2 = move _53;                   // scope 27 at $DIR/reference_prop.rs:+69:9: +69:32
+          StorageDead(_53);                // scope 27 at $DIR/reference_prop.rs:+69:31: +69:32
+-         StorageDead(_54);                // scope 27 at $DIR/reference_prop.rs:+69:32: +69:33
+          StorageLive(_55);                // scope 27 at $DIR/reference_prop.rs:+70:13: +70:14
+          _55 = (*_52);                    // scope 27 at $DIR/reference_prop.rs:+70:17: +70:19
+          StorageLive(_56);                // scope 28 at $DIR/reference_prop.rs:+71:9: +71:19
+          StorageLive(_57);                // scope 28 at $DIR/reference_prop.rs:+71:16: +71:18
+          _57 = ();                        // scope 28 at $DIR/reference_prop.rs:+71:16: +71:18
+          _56 = opaque::<()>(move _57) -> bb8; // scope 28 at $DIR/reference_prop.rs:+71:9: +71:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:156:9: 156:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb8: {
+          StorageDead(_57);                // scope 28 at $DIR/reference_prop.rs:+71:18: +71:19
+          StorageDead(_56);                // scope 28 at $DIR/reference_prop.rs:+71:19: +71:20
+          _0 = const ();                   // scope 0 at $DIR/reference_prop.rs:+67:5: +72:6
+          StorageDead(_55);                // scope 27 at $DIR/reference_prop.rs:+72:5: +72:6
+          StorageDead(_52);                // scope 0 at $DIR/reference_prop.rs:+72:5: +72:6
+          return;                          // scope 0 at $DIR/reference_prop.rs:+73:2: +73:2
+      }
+  }
+  
diff --git a/tests/mir-opt/reference_prop.reference_propagation_mut_ptr.ReferencePropagation.diff b/tests/mir-opt/reference_prop.reference_propagation_mut_ptr.ReferencePropagation.diff
new file mode 100644
index 00000000000..c55b5eb4bed
--- /dev/null
+++ b/tests/mir-opt/reference_prop.reference_propagation_mut_ptr.ReferencePropagation.diff
@@ -0,0 +1,378 @@
+- // MIR for `reference_propagation_mut_ptr` before ReferencePropagation
++ // MIR for `reference_propagation_mut_ptr` after ReferencePropagation
+  
+  fn reference_propagation_mut_ptr(_1: *mut T, _2: *mut T) -> () {
+      debug single => _1;                  // in scope 0 at $DIR/reference_prop.rs:+0:43: +0:49
+      debug multiple => _2;                // in scope 0 at $DIR/reference_prop.rs:+0:59: +0:71
+      let mut _0: ();                      // return place in scope 0 at $DIR/reference_prop.rs:+0:81: +0:81
+      let _3: ();                          // in scope 0 at $DIR/reference_prop.rs:+2:5: +7:6
+      let _7: ();                          // in scope 0 at $DIR/reference_prop.rs:+6:9: +6:19
+      let mut _8: ();                      // in scope 0 at $DIR/reference_prop.rs:+6:16: +6:18
+      let _9: ();                          // in scope 0 at $DIR/reference_prop.rs:+10:5: +18:6
+      let mut _13: *mut usize;             // in scope 0 at $DIR/reference_prop.rs:+14:13: +14:24
+      let _15: ();                         // in scope 0 at $DIR/reference_prop.rs:+17:9: +17:19
+      let mut _16: ();                     // in scope 0 at $DIR/reference_prop.rs:+17:16: +17:18
+      let _17: ();                         // in scope 0 at $DIR/reference_prop.rs:+21:5: +27:6
+      let _22: ();                         // in scope 0 at $DIR/reference_prop.rs:+26:9: +26:19
+      let mut _23: ();                     // in scope 0 at $DIR/reference_prop.rs:+26:16: +26:18
+      let _24: ();                         // in scope 0 at $DIR/reference_prop.rs:+30:5: +36:6
+      let _29: ();                         // in scope 0 at $DIR/reference_prop.rs:+35:9: +35:19
+      let mut _30: ();                     // in scope 0 at $DIR/reference_prop.rs:+35:16: +35:18
+      let _31: ();                         // in scope 0 at $DIR/reference_prop.rs:+39:5: +44:6
+      let _35: ();                         // in scope 0 at $DIR/reference_prop.rs:+43:9: +43:18
+      let mut _36: *mut usize;             // in scope 0 at $DIR/reference_prop.rs:+43:16: +43:17
+      let _37: ();                         // in scope 0 at $DIR/reference_prop.rs:+47:5: +57:6
+      let _44: ();                         // in scope 0 at $DIR/reference_prop.rs:+56:9: +56:19
+      let mut _45: *mut usize;             // in scope 0 at $DIR/reference_prop.rs:+56:16: +56:18
+      let _46: ();                         // in scope 0 at $DIR/reference_prop.rs:+60:5: +64:6
+      let _49: ();                         // in scope 0 at $DIR/reference_prop.rs:+63:9: +63:19
+      let mut _50: ();                     // in scope 0 at $DIR/reference_prop.rs:+63:16: +63:18
+      let mut _52: *mut T;                 // in scope 0 at $DIR/reference_prop.rs:+69:20: +69:36
+      let _54: ();                         // in scope 0 at $DIR/reference_prop.rs:+71:9: +71:19
+      let mut _55: ();                     // in scope 0 at $DIR/reference_prop.rs:+71:16: +71:18
+      scope 1 {
+          let mut _4: usize;               // in scope 1 at $DIR/reference_prop.rs:+3:13: +3:18
+          scope 2 {
+              debug a => _4;               // in scope 2 at $DIR/reference_prop.rs:+3:13: +3:18
+              let _5: *mut usize;          // in scope 2 at $DIR/reference_prop.rs:+4:13: +4:14
+              scope 3 {
+                  debug b => _5;           // in scope 3 at $DIR/reference_prop.rs:+4:13: +4:14
+                  let _6: usize;           // in scope 3 at $DIR/reference_prop.rs:+5:13: +5:14
+                  scope 4 {
+                      debug c => _6;       // in scope 4 at $DIR/reference_prop.rs:+5:13: +5:14
+                  }
+              }
+          }
+      }
+      scope 5 {
+          let mut _10: usize;              // in scope 5 at $DIR/reference_prop.rs:+11:13: +11:18
+          scope 6 {
+              debug a => _10;              // in scope 6 at $DIR/reference_prop.rs:+11:13: +11:18
+              let mut _11: usize;          // in scope 6 at $DIR/reference_prop.rs:+12:13: +12:19
+              scope 7 {
+                  debug a2 => _11;         // in scope 7 at $DIR/reference_prop.rs:+12:13: +12:19
+                  let mut _12: *mut usize; // in scope 7 at $DIR/reference_prop.rs:+13:13: +13:18
+                  scope 8 {
+                      debug b => _12;      // in scope 8 at $DIR/reference_prop.rs:+13:13: +13:18
+                      let _14: usize;      // in scope 8 at $DIR/reference_prop.rs:+16:13: +16:14
+                      scope 9 {
+                          debug c => _14;  // in scope 9 at $DIR/reference_prop.rs:+16:13: +16:14
+                      }
+                  }
+              }
+          }
+      }
+      scope 10 {
+          let mut _18: usize;              // in scope 10 at $DIR/reference_prop.rs:+22:13: +22:18
+          scope 11 {
+              debug a => _18;              // in scope 11 at $DIR/reference_prop.rs:+22:13: +22:18
+              let _19: *mut usize;         // in scope 11 at $DIR/reference_prop.rs:+23:13: +23:14
+              scope 12 {
+                  debug b => _19;          // in scope 12 at $DIR/reference_prop.rs:+23:13: +23:14
+                  let _20: &*mut usize;    // in scope 12 at $DIR/reference_prop.rs:+24:13: +24:14
+                  scope 13 {
+                      debug d => _20;      // in scope 13 at $DIR/reference_prop.rs:+24:13: +24:14
+                      let _21: usize;      // in scope 13 at $DIR/reference_prop.rs:+25:13: +25:14
+                      scope 14 {
+                          debug c => _21;  // in scope 14 at $DIR/reference_prop.rs:+25:13: +25:14
+                      }
+                  }
+              }
+          }
+      }
+      scope 15 {
+          let mut _25: usize;              // in scope 15 at $DIR/reference_prop.rs:+31:13: +31:18
+          scope 16 {
+              debug a => _25;              // in scope 16 at $DIR/reference_prop.rs:+31:13: +31:18
+              let mut _26: *mut usize;     // in scope 16 at $DIR/reference_prop.rs:+32:13: +32:18
+              scope 17 {
+                  debug b => _26;          // in scope 17 at $DIR/reference_prop.rs:+32:13: +32:18
+                  let _27: &mut *mut usize; // in scope 17 at $DIR/reference_prop.rs:+33:13: +33:14
+                  scope 18 {
+                      debug d => _27;      // in scope 18 at $DIR/reference_prop.rs:+33:13: +33:14
+                      let _28: usize;      // in scope 18 at $DIR/reference_prop.rs:+34:13: +34:14
+                      scope 19 {
+                          debug c => _28;  // in scope 19 at $DIR/reference_prop.rs:+34:13: +34:14
+                      }
+                  }
+              }
+          }
+      }
+      scope 20 {
+          let mut _32: usize;              // in scope 20 at $DIR/reference_prop.rs:+40:13: +40:18
+          scope 21 {
+              debug a => _32;              // in scope 21 at $DIR/reference_prop.rs:+40:13: +40:18
+              let _33: *mut usize;         // in scope 21 at $DIR/reference_prop.rs:+41:13: +41:14
+              scope 22 {
+                  debug b => _33;          // in scope 22 at $DIR/reference_prop.rs:+41:13: +41:14
+                  let _34: usize;          // in scope 22 at $DIR/reference_prop.rs:+42:13: +42:14
+                  scope 23 {
+                      debug c => _34;      // in scope 23 at $DIR/reference_prop.rs:+42:13: +42:14
+                  }
+              }
+          }
+      }
+      scope 24 {
+          let mut _38: usize;              // in scope 24 at $DIR/reference_prop.rs:+48:13: +48:18
+          scope 25 {
+              debug a => _38;              // in scope 25 at $DIR/reference_prop.rs:+48:13: +48:18
+              let _39: *mut usize;         // in scope 25 at $DIR/reference_prop.rs:+49:13: +49:15
+              scope 26 {
+                  debug b1 => _39;         // in scope 26 at $DIR/reference_prop.rs:+49:13: +49:15
+                  let _40: usize;          // in scope 26 at $DIR/reference_prop.rs:+50:13: +50:14
+                  scope 27 {
+                      debug c => _40;      // in scope 27 at $DIR/reference_prop.rs:+50:13: +50:14
+                      let _41: *mut usize; // in scope 27 at $DIR/reference_prop.rs:+51:13: +51:15
+                      scope 28 {
+                          debug b2 => _41; // in scope 28 at $DIR/reference_prop.rs:+51:13: +51:15
+                          let _42: usize;  // in scope 28 at $DIR/reference_prop.rs:+52:13: +52:15
+                          scope 29 {
+                              debug c2 => _42; // in scope 29 at $DIR/reference_prop.rs:+52:13: +52:15
+                              let _43: *mut usize; // in scope 29 at $DIR/reference_prop.rs:+53:13: +53:15
+                              scope 30 {
+                                  debug b3 => _43; // in scope 30 at $DIR/reference_prop.rs:+53:13: +53:15
+                              }
+                          }
+                      }
+                  }
+              }
+          }
+      }
+      scope 31 {
+          let _47: *mut T;                 // in scope 31 at $DIR/reference_prop.rs:+61:13: +61:14
+          scope 32 {
+              debug a => _47;              // in scope 32 at $DIR/reference_prop.rs:+61:13: +61:14
+              let _48: T;                  // in scope 32 at $DIR/reference_prop.rs:+62:13: +62:14
+              scope 33 {
+                  debug b => _48;          // in scope 33 at $DIR/reference_prop.rs:+62:13: +62:14
+              }
+          }
+      }
+      scope 34 {
+          let _51: *mut T;                 // in scope 34 at $DIR/reference_prop.rs:+68:13: +68:14
+          scope 35 {
+              debug a => _51;              // in scope 35 at $DIR/reference_prop.rs:+68:13: +68:14
+              let _53: T;                  // in scope 35 at $DIR/reference_prop.rs:+70:13: +70:14
+              scope 36 {
+                  debug b => _53;          // in scope 36 at $DIR/reference_prop.rs:+70:13: +70:14
+              }
+          }
+      }
+  
+      bb0: {
+-         StorageLive(_3);                 // scope 0 at $DIR/reference_prop.rs:+2:5: +7:6
+          StorageLive(_4);                 // scope 1 at $DIR/reference_prop.rs:+3:13: +3:18
+          _4 = const 5_usize;              // scope 1 at $DIR/reference_prop.rs:+3:21: +3:28
+          StorageLive(_5);                 // scope 2 at $DIR/reference_prop.rs:+4:13: +4:14
+          _5 = &raw mut _4;                // scope 2 at $DIR/reference_prop.rs:+4:17: +4:27
+          StorageLive(_6);                 // scope 3 at $DIR/reference_prop.rs:+5:13: +5:14
+-         _6 = (*_5);                      // scope 3 at $DIR/reference_prop.rs:+5:17: +5:19
++         _6 = _4;                         // scope 3 at $DIR/reference_prop.rs:+5:17: +5:19
+          StorageLive(_7);                 // scope 4 at $DIR/reference_prop.rs:+6:9: +6:19
+          StorageLive(_8);                 // scope 4 at $DIR/reference_prop.rs:+6:16: +6:18
+          _8 = ();                         // scope 4 at $DIR/reference_prop.rs:+6:16: +6:18
+          _7 = opaque::<()>(move _8) -> bb1; // scope 4 at $DIR/reference_prop.rs:+6:9: +6:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:250:9: 250:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb1: {
+          StorageDead(_8);                 // scope 4 at $DIR/reference_prop.rs:+6:18: +6:19
+          StorageDead(_7);                 // scope 4 at $DIR/reference_prop.rs:+6:19: +6:20
+-         _3 = const ();                   // scope 1 at $DIR/reference_prop.rs:+2:5: +7:6
+          StorageDead(_6);                 // scope 3 at $DIR/reference_prop.rs:+7:5: +7:6
+          StorageDead(_5);                 // scope 2 at $DIR/reference_prop.rs:+7:5: +7:6
+          StorageDead(_4);                 // scope 1 at $DIR/reference_prop.rs:+7:5: +7:6
+-         StorageDead(_3);                 // scope 0 at $DIR/reference_prop.rs:+7:5: +7:6
+-         StorageLive(_9);                 // scope 0 at $DIR/reference_prop.rs:+10:5: +18:6
+          StorageLive(_10);                // scope 5 at $DIR/reference_prop.rs:+11:13: +11:18
+          _10 = const 5_usize;             // scope 5 at $DIR/reference_prop.rs:+11:21: +11:28
+          StorageLive(_11);                // scope 6 at $DIR/reference_prop.rs:+12:13: +12:19
+          _11 = const 7_usize;             // scope 6 at $DIR/reference_prop.rs:+12:22: +12:29
+          StorageLive(_12);                // scope 7 at $DIR/reference_prop.rs:+13:13: +13:18
+          _12 = &raw mut _10;              // scope 7 at $DIR/reference_prop.rs:+13:21: +13:31
+          StorageLive(_13);                // scope 8 at $DIR/reference_prop.rs:+14:13: +14:24
+          _13 = &raw mut _11;              // scope 8 at $DIR/reference_prop.rs:+14:13: +14:24
+          _12 = move _13;                  // scope 8 at $DIR/reference_prop.rs:+14:9: +14:24
+          StorageDead(_13);                // scope 8 at $DIR/reference_prop.rs:+14:23: +14:24
+          StorageLive(_14);                // scope 8 at $DIR/reference_prop.rs:+16:13: +16:14
+          _14 = (*_12);                    // scope 8 at $DIR/reference_prop.rs:+16:17: +16:19
+          StorageLive(_15);                // scope 9 at $DIR/reference_prop.rs:+17:9: +17:19
+          StorageLive(_16);                // scope 9 at $DIR/reference_prop.rs:+17:16: +17:18
+          _16 = ();                        // scope 9 at $DIR/reference_prop.rs:+17:16: +17:18
+          _15 = opaque::<()>(move _16) -> bb2; // scope 9 at $DIR/reference_prop.rs:+17:9: +17:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:261:9: 261:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb2: {
+          StorageDead(_16);                // scope 9 at $DIR/reference_prop.rs:+17:18: +17:19
+          StorageDead(_15);                // scope 9 at $DIR/reference_prop.rs:+17:19: +17:20
+-         _9 = const ();                   // scope 5 at $DIR/reference_prop.rs:+10:5: +18:6
+          StorageDead(_14);                // scope 8 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_12);                // scope 7 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_11);                // scope 6 at $DIR/reference_prop.rs:+18:5: +18:6
+          StorageDead(_10);                // scope 5 at $DIR/reference_prop.rs:+18:5: +18:6
+-         StorageDead(_9);                 // scope 0 at $DIR/reference_prop.rs:+18:5: +18:6
+-         StorageLive(_17);                // scope 0 at $DIR/reference_prop.rs:+21:5: +27:6
+          StorageLive(_18);                // scope 10 at $DIR/reference_prop.rs:+22:13: +22:18
+          _18 = const 5_usize;             // scope 10 at $DIR/reference_prop.rs:+22:21: +22:28
+          StorageLive(_19);                // scope 11 at $DIR/reference_prop.rs:+23:13: +23:14
+          _19 = &raw mut _18;              // scope 11 at $DIR/reference_prop.rs:+23:17: +23:27
+          StorageLive(_20);                // scope 12 at $DIR/reference_prop.rs:+24:13: +24:14
+          _20 = &_19;                      // scope 12 at $DIR/reference_prop.rs:+24:17: +24:19
+          StorageLive(_21);                // scope 13 at $DIR/reference_prop.rs:+25:13: +25:14
+          _21 = (*_19);                    // scope 13 at $DIR/reference_prop.rs:+25:17: +25:19
+          StorageLive(_22);                // scope 14 at $DIR/reference_prop.rs:+26:9: +26:19
+          StorageLive(_23);                // scope 14 at $DIR/reference_prop.rs:+26:16: +26:18
+          _23 = ();                        // scope 14 at $DIR/reference_prop.rs:+26:16: +26:18
+          _22 = opaque::<()>(move _23) -> bb3; // scope 14 at $DIR/reference_prop.rs:+26:9: +26:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:270:9: 270:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb3: {
+          StorageDead(_23);                // scope 14 at $DIR/reference_prop.rs:+26:18: +26:19
+          StorageDead(_22);                // scope 14 at $DIR/reference_prop.rs:+26:19: +26:20
+-         _17 = const ();                  // scope 10 at $DIR/reference_prop.rs:+21:5: +27:6
+          StorageDead(_21);                // scope 13 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_20);                // scope 12 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_19);                // scope 11 at $DIR/reference_prop.rs:+27:5: +27:6
+          StorageDead(_18);                // scope 10 at $DIR/reference_prop.rs:+27:5: +27:6
+-         StorageDead(_17);                // scope 0 at $DIR/reference_prop.rs:+27:5: +27:6
+-         StorageLive(_24);                // scope 0 at $DIR/reference_prop.rs:+30:5: +36:6
+          StorageLive(_25);                // scope 15 at $DIR/reference_prop.rs:+31:13: +31:18
+          _25 = const 5_usize;             // scope 15 at $DIR/reference_prop.rs:+31:21: +31:28
+          StorageLive(_26);                // scope 16 at $DIR/reference_prop.rs:+32:13: +32:18
+          _26 = &raw mut _25;              // scope 16 at $DIR/reference_prop.rs:+32:21: +32:31
+          StorageLive(_27);                // scope 17 at $DIR/reference_prop.rs:+33:13: +33:14
+          _27 = &mut _26;                  // scope 17 at $DIR/reference_prop.rs:+33:17: +33:23
+          StorageLive(_28);                // scope 18 at $DIR/reference_prop.rs:+34:13: +34:14
+          _28 = (*_26);                    // scope 18 at $DIR/reference_prop.rs:+34:17: +34:19
+          StorageLive(_29);                // scope 19 at $DIR/reference_prop.rs:+35:9: +35:19
+          StorageLive(_30);                // scope 19 at $DIR/reference_prop.rs:+35:16: +35:18
+          _30 = ();                        // scope 19 at $DIR/reference_prop.rs:+35:16: +35:18
+          _29 = opaque::<()>(move _30) -> bb4; // scope 19 at $DIR/reference_prop.rs:+35:9: +35:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:279:9: 279:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb4: {
+          StorageDead(_30);                // scope 19 at $DIR/reference_prop.rs:+35:18: +35:19
+          StorageDead(_29);                // scope 19 at $DIR/reference_prop.rs:+35:19: +35:20
+-         _24 = const ();                  // scope 15 at $DIR/reference_prop.rs:+30:5: +36:6
+          StorageDead(_28);                // scope 18 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_27);                // scope 17 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_26);                // scope 16 at $DIR/reference_prop.rs:+36:5: +36:6
+          StorageDead(_25);                // scope 15 at $DIR/reference_prop.rs:+36:5: +36:6
+-         StorageDead(_24);                // scope 0 at $DIR/reference_prop.rs:+36:5: +36:6
+-         StorageLive(_31);                // scope 0 at $DIR/reference_prop.rs:+39:5: +44:6
+          StorageLive(_32);                // scope 20 at $DIR/reference_prop.rs:+40:13: +40:18
+          _32 = const 7_usize;             // scope 20 at $DIR/reference_prop.rs:+40:21: +40:28
+          StorageLive(_33);                // scope 21 at $DIR/reference_prop.rs:+41:13: +41:14
+          _33 = &raw mut _32;              // scope 21 at $DIR/reference_prop.rs:+41:17: +41:27
+          StorageLive(_34);                // scope 22 at $DIR/reference_prop.rs:+42:13: +42:14
+          _34 = (*_33);                    // scope 22 at $DIR/reference_prop.rs:+42:17: +42:19
+          StorageLive(_35);                // scope 23 at $DIR/reference_prop.rs:+43:9: +43:18
+          StorageLive(_36);                // scope 23 at $DIR/reference_prop.rs:+43:16: +43:17
+          _36 = _33;                       // scope 23 at $DIR/reference_prop.rs:+43:16: +43:17
+          _35 = opaque::<*mut usize>(move _36) -> bb5; // scope 23 at $DIR/reference_prop.rs:+43:9: +43:18
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:287:9: 287:15
+                                           // + literal: Const { ty: fn(*mut usize) {opaque::<*mut usize>}, val: Value(<ZST>) }
+      }
+  
+      bb5: {
+          StorageDead(_36);                // scope 23 at $DIR/reference_prop.rs:+43:17: +43:18
+          StorageDead(_35);                // scope 23 at $DIR/reference_prop.rs:+43:18: +43:19
+-         _31 = const ();                  // scope 20 at $DIR/reference_prop.rs:+39:5: +44:6
+          StorageDead(_34);                // scope 22 at $DIR/reference_prop.rs:+44:5: +44:6
+          StorageDead(_33);                // scope 21 at $DIR/reference_prop.rs:+44:5: +44:6
+          StorageDead(_32);                // scope 20 at $DIR/reference_prop.rs:+44:5: +44:6
+-         StorageDead(_31);                // scope 0 at $DIR/reference_prop.rs:+44:5: +44:6
+-         StorageLive(_37);                // scope 0 at $DIR/reference_prop.rs:+47:5: +57:6
+          StorageLive(_38);                // scope 24 at $DIR/reference_prop.rs:+48:13: +48:18
+          _38 = const 7_usize;             // scope 24 at $DIR/reference_prop.rs:+48:21: +48:28
+          StorageLive(_39);                // scope 25 at $DIR/reference_prop.rs:+49:13: +49:15
+          _39 = &raw mut _38;              // scope 25 at $DIR/reference_prop.rs:+49:18: +49:28
+          StorageLive(_40);                // scope 26 at $DIR/reference_prop.rs:+50:13: +50:14
+          _40 = (*_39);                    // scope 26 at $DIR/reference_prop.rs:+50:17: +50:20
+          StorageLive(_41);                // scope 27 at $DIR/reference_prop.rs:+51:13: +51:15
+          _41 = _39;                       // scope 27 at $DIR/reference_prop.rs:+51:18: +51:20
+          StorageLive(_42);                // scope 28 at $DIR/reference_prop.rs:+52:13: +52:15
+          _42 = (*_41);                    // scope 28 at $DIR/reference_prop.rs:+52:18: +52:21
+          StorageLive(_43);                // scope 29 at $DIR/reference_prop.rs:+53:13: +53:15
+          _43 = _41;                       // scope 29 at $DIR/reference_prop.rs:+53:18: +53:20
+          StorageLive(_44);                // scope 30 at $DIR/reference_prop.rs:+56:9: +56:19
+          StorageLive(_45);                // scope 30 at $DIR/reference_prop.rs:+56:16: +56:18
+          _45 = _43;                       // scope 30 at $DIR/reference_prop.rs:+56:16: +56:18
+          _44 = opaque::<*mut usize>(move _45) -> bb6; // scope 30 at $DIR/reference_prop.rs:+56:9: +56:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:300:9: 300:15
+                                           // + literal: Const { ty: fn(*mut usize) {opaque::<*mut usize>}, val: Value(<ZST>) }
+      }
+  
+      bb6: {
+          StorageDead(_45);                // scope 30 at $DIR/reference_prop.rs:+56:18: +56:19
+          StorageDead(_44);                // scope 30 at $DIR/reference_prop.rs:+56:19: +56:20
+-         _37 = const ();                  // scope 24 at $DIR/reference_prop.rs:+47:5: +57:6
+          StorageDead(_43);                // scope 29 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_42);                // scope 28 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_41);                // scope 27 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_40);                // scope 26 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_39);                // scope 25 at $DIR/reference_prop.rs:+57:5: +57:6
+          StorageDead(_38);                // scope 24 at $DIR/reference_prop.rs:+57:5: +57:6
+-         StorageDead(_37);                // scope 0 at $DIR/reference_prop.rs:+57:5: +57:6
+-         StorageLive(_46);                // scope 0 at $DIR/reference_prop.rs:+60:5: +64:6
+          StorageLive(_47);                // scope 31 at $DIR/reference_prop.rs:+61:13: +61:14
+          _47 = &raw mut (*_1);            // scope 31 at $DIR/reference_prop.rs:+61:17: +61:33
+          StorageLive(_48);                // scope 32 at $DIR/reference_prop.rs:+62:13: +62:14
+-         _48 = (*_47);                    // scope 32 at $DIR/reference_prop.rs:+62:17: +62:19
++         _48 = (*_1);                     // scope 32 at $DIR/reference_prop.rs:+62:17: +62:19
+          StorageLive(_49);                // scope 33 at $DIR/reference_prop.rs:+63:9: +63:19
+          StorageLive(_50);                // scope 33 at $DIR/reference_prop.rs:+63:16: +63:18
+          _50 = ();                        // scope 33 at $DIR/reference_prop.rs:+63:16: +63:18
+          _49 = opaque::<()>(move _50) -> bb7; // scope 33 at $DIR/reference_prop.rs:+63:9: +63:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:307:9: 307:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb7: {
+          StorageDead(_50);                // scope 33 at $DIR/reference_prop.rs:+63:18: +63:19
+          StorageDead(_49);                // scope 33 at $DIR/reference_prop.rs:+63:19: +63:20
+-         _46 = const ();                  // scope 31 at $DIR/reference_prop.rs:+60:5: +64:6
+          StorageDead(_48);                // scope 32 at $DIR/reference_prop.rs:+64:5: +64:6
+          StorageDead(_47);                // scope 31 at $DIR/reference_prop.rs:+64:5: +64:6
+-         StorageDead(_46);                // scope 0 at $DIR/reference_prop.rs:+64:5: +64:6
+          StorageLive(_51);                // scope 34 at $DIR/reference_prop.rs:+68:13: +68:14
+          _51 = &raw mut (*_2);            // scope 34 at $DIR/reference_prop.rs:+68:17: +68:35
+          StorageLive(_52);                // scope 35 at $DIR/reference_prop.rs:+69:20: +69:36
+          _52 = &raw mut (*_1);            // scope 35 at $DIR/reference_prop.rs:+69:20: +69:36
+          _2 = move _52;                   // scope 35 at $DIR/reference_prop.rs:+69:9: +69:36
+          StorageDead(_52);                // scope 35 at $DIR/reference_prop.rs:+69:35: +69:36
+          StorageLive(_53);                // scope 35 at $DIR/reference_prop.rs:+70:13: +70:14
+          _53 = (*_51);                    // scope 35 at $DIR/reference_prop.rs:+70:17: +70:19
+          StorageLive(_54);                // scope 36 at $DIR/reference_prop.rs:+71:9: +71:19
+          StorageLive(_55);                // scope 36 at $DIR/reference_prop.rs:+71:16: +71:18
+          _55 = ();                        // scope 36 at $DIR/reference_prop.rs:+71:16: +71:18
+          _54 = opaque::<()>(move _55) -> bb8; // scope 36 at $DIR/reference_prop.rs:+71:9: +71:19
+                                           // mir::Constant
+                                           // + span: $DIR/reference_prop.rs:315:9: 315:15
+                                           // + literal: Const { ty: fn(()) {opaque::<()>}, val: Value(<ZST>) }
+      }
+  
+      bb8: {
+          StorageDead(_55);                // scope 36 at $DIR/reference_prop.rs:+71:18: +71:19
+          StorageDead(_54);                // scope 36 at $DIR/reference_prop.rs:+71:19: +71:20
+          _0 = const ();                   // scope 34 at $DIR/reference_prop.rs:+67:5: +72:6
+          StorageDead(_53);                // scope 35 at $DIR/reference_prop.rs:+72:5: +72:6
+          StorageDead(_51);                // scope 34 at $DIR/reference_prop.rs:+72:5: +72:6
+          return;                          // scope 0 at $DIR/reference_prop.rs:+73:2: +73:2
+      }
+  }
+  
diff --git a/tests/mir-opt/reference_prop.rs b/tests/mir-opt/reference_prop.rs
new file mode 100644
index 00000000000..e3e5d791464
--- /dev/null
+++ b/tests/mir-opt/reference_prop.rs
@@ -0,0 +1,456 @@
+// unit-test: ReferencePropagation
+// needs-unwind
+
+#![feature(raw_ref_op)]
+#![feature(core_intrinsics, custom_mir)]
+
+#[inline(never)]
+fn opaque(_: impl Sized) {}
+
+fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
+    // Propagation through a reference.
+    {
+        let a = 5_usize;
+        let b = &a; // This borrow is only used once.
+        let c = *b; // This should be optimized.
+        opaque(()); // We use opaque to separate cases into basic blocks in the MIR.
+    }
+
+    // Propagation through a two references.
+    {
+        let a = 5_usize;
+        let a2 = 7_usize;
+        let mut b = &a;
+        b = &a2;
+        // `b` is assigned twice, so we cannot propagate it.
+        let c = *b;
+        opaque(());
+    }
+
+    // Propagation through a borrowed reference.
+    {
+        let a = 5_usize;
+        let b = &a;
+        let d = &b;
+        let c = *b; // `b` is immutably borrowed, we know its value, but do not propagate it
+        opaque(());
+    }
+
+    // Propagation through a borrowed reference.
+    {
+        let a = 5_usize;
+        let mut b = &a;
+        let d = &mut b;
+        let c = *b; // `b` is mutably borrowed, we cannot know its value.
+        opaque(());
+    }
+
+    // Propagation through an escaping borrow.
+    {
+        let a = 7_usize;
+        let b = &a;
+        let c = *b;
+        opaque(b); // `b` escapes here, but we can still replace immutable borrow
+    }
+
+    // Propagation through a transitively escaping borrow.
+    {
+        let a = 7_usize;
+        let b1 = &a;
+        let c = *b1;
+        let b2 = b1;
+        let c2 = *b2;
+        let b3 = b2;
+        // `b3` escapes here, so we can only replace immutable borrow,
+        // for either `b`, `b2` or `b3`.
+        opaque(b3);
+    }
+
+    // Propagation a reborrow of an argument.
+    {
+        let a = &*single;
+        let b = *a; // This should be optimized as `*single`.
+        opaque(());
+    }
+
+    // Propagation a reborrow of a mutated argument.
+    {
+        let a = &*multiple;
+        multiple = &*single;
+        let b = *a; // This should not be optimized.
+        opaque(());
+    }
+}
+
+fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a mut T) {
+    // Propagation through a reference.
+    {
+        let mut a = 5_usize;
+        let b = &mut a; // This borrow is only used once.
+        let c = *b; // This should be optimized.
+        opaque(());
+    }
+
+    // Propagation through a two references.
+    {
+        let mut a = 5_usize;
+        let mut a2 = 7_usize;
+        let mut b = &mut a;
+        b = &mut a2;
+        // `b` is assigned twice, so we cannot propagate it.
+        let c = *b;
+        opaque(());
+    }
+
+    // Propagation through a borrowed reference.
+    {
+        let mut a = 5_usize;
+        let b = &mut a;
+        let d = &b;
+        let c = *b; // `b` is immutably borrowed, we know its value, but cannot be removed.
+        opaque(());
+    }
+
+    // Propagation through a borrowed reference.
+    {
+        let mut a = 5_usize;
+        let mut b = &mut a;
+        let d = &mut b;
+        let c = *b; // `b` is mutably borrowed, we cannot know its value.
+        opaque(());
+    }
+
+    // Propagation through an escaping borrow.
+    {
+        let mut a = 7_usize;
+        let b = &mut a;
+        let c = *b;
+        opaque(b); // `b` escapes here, so we can only replace immutable borrow
+    }
+
+    // Propagation through a transitively escaping borrow.
+    {
+        let mut a = 7_usize;
+        let b1 = &mut a;
+        let c = *b1;
+        let b2 = b1;
+        let c2 = *b2;
+        let b3 = b2;
+        // `b3` escapes here, so we can only replace immutable borrow,
+        // for either `b`, `b2` or `b3`.
+        opaque(b3);
+    }
+
+    // Propagation a reborrow of an argument.
+    {
+        let a = &mut *single;
+        let b = *a; // This should be optimized as `*single`.
+        opaque(());
+    }
+
+    // Propagation a reborrow of a mutated argument.
+    {
+        let a = &mut *multiple;
+        multiple = &mut *single;
+        let b = *a; // This should not be optimized.
+        opaque(());
+    }
+}
+
+fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *const T) {
+    // Propagation through a reference.
+    unsafe {
+        let a = 5_usize;
+        let b = &raw const a; // This borrow is only used once.
+        let c = *b; // This should be optimized.
+        opaque(());
+    }
+
+    // Propagation through a two references.
+    unsafe {
+        let a = 5_usize;
+        let a2 = 7_usize;
+        let mut b = &raw const a;
+        b = &raw const a2;
+        // `b` is assigned twice, so we cannot propagate it.
+        let c = *b;
+        opaque(());
+    }
+
+    // Propagation through a borrowed reference.
+    unsafe {
+        let a = 5_usize;
+        let b = &raw const a;
+        let d = &b;
+        let c = *b; // `b` is immutably borrowed, we know its value, but cannot be removed.
+        opaque(());
+    }
+
+    // Propagation through a borrowed reference.
+    unsafe {
+        let a = 5_usize;
+        let mut b = &raw const a;
+        let d = &mut b;
+        let c = *b; // `b` is mutably borrowed, we cannot know its value.
+        opaque(());
+    }
+
+    // Propagation through an escaping borrow.
+    unsafe {
+        let a = 7_usize;
+        let b = &raw const a;
+        let c = *b;
+        opaque(b); // `b` escapes here, so we can only replace immutable borrow
+    }
+
+    // Propagation through a transitively escaping borrow.
+    unsafe {
+        let a = 7_usize;
+        let b1 = &raw const a;
+        let c = *b1;
+        let b2 = b1;
+        let c2 = *b2;
+        let b3 = b2;
+        // `b3` escapes here, so we can only replace immutable borrow,
+        // for either `b`, `b2` or `b3`.
+        opaque(b3);
+    }
+
+    // Propagation a reborrow of an argument.
+    unsafe {
+        let a = &raw const *single;
+        let b = *a; // This should be optimized as `*single`.
+        opaque(());
+    }
+
+    // Propagation a reborrow of a mutated argument.
+    unsafe {
+        let a = &raw const *multiple;
+        multiple = &raw const *single;
+        let b = *a; // This should not be optimized.
+        opaque(());
+    }
+
+    // Propagation through a reborrow.
+    unsafe {
+        let a = 13_usize;
+        let b = &raw const a;
+        let c = &raw const *b;
+        let e = *c;
+        opaque(());
+    }
+}
+
+fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T) {
+    // Propagation through a reference.
+    unsafe {
+        let mut a = 5_usize;
+        let b = &raw mut a; // This borrow is only used once.
+        let c = *b; // This should be optimized.
+        opaque(());
+    }
+
+    // Propagation through a two references.
+    unsafe {
+        let mut a = 5_usize;
+        let mut a2 = 7_usize;
+        let mut b = &raw mut a;
+        b = &raw mut a2;
+        // `b` is assigned twice, so we cannot propagate it.
+        let c = *b;
+        opaque(());
+    }
+
+    // Propagation through a borrowed reference.
+    unsafe {
+        let mut a = 5_usize;
+        let b = &raw mut a;
+        let d = &b;
+        let c = *b; // `b` is immutably borrowed, we know its value, but cannot be removed.
+        opaque(());
+    }
+
+    // Propagation through a borrowed reference.
+    unsafe {
+        let mut a = 5_usize;
+        let mut b = &raw mut a;
+        let d = &mut b;
+        let c = *b; // `b` is mutably borrowed, we cannot know its value.
+        opaque(());
+    }
+
+    // Propagation through an escaping borrow.
+    unsafe {
+        let mut a = 7_usize;
+        let b = &raw mut a;
+        let c = *b;
+        opaque(b); // `b` escapes here, so we can only replace immutable borrow
+    }
+
+    // Propagation through a transitively escaping borrow.
+    unsafe {
+        let mut a = 7_usize;
+        let b1 = &raw mut a;
+        let c = *b1;
+        let b2 = b1;
+        let c2 = *b2;
+        let b3 = b2;
+        // `b3` escapes here, so we can only replace immutable borrow,
+        // for either `b`, `b2` or `b3`.
+        opaque(b3);
+    }
+
+    // Propagation a reborrow of an argument.
+    unsafe {
+        let a = &raw mut *single;
+        let b = *a; // This should be optimized as `*single`.
+        opaque(());
+    }
+
+    // Propagation a reborrow of a mutated argument.
+    unsafe {
+        let a = &raw mut *multiple;
+        multiple = &raw mut *single;
+        let b = *a; // This should not be optimized.
+        opaque(());
+    }
+}
+
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+fn read_through_raw(x: &mut usize) -> usize {
+    use std::intrinsics::mir::*;
+
+    mir!(
+        let r1: &mut usize;
+        let r2: &mut usize;
+        let p1: *mut usize;
+        let p2: *mut usize;
+
+        {
+            r1 = &mut *x;
+            r2 = &mut *r1;
+            p1 = &raw mut *r1;
+            p2 = &raw mut *r2;
+
+            RET = *p1;
+            RET = *p2;
+            Return()
+        }
+    )
+}
+
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+fn multiple_storage() {
+    use std::intrinsics::mir::*;
+
+    mir!(
+        let x: i32;
+        {
+            StorageLive(x);
+            x = 5;
+            let z = &x;
+            StorageDead(x);
+            StorageLive(x);
+            // As there are multiple `StorageLive` statements for `x`, we cannot know if this `z`'s
+            // pointer address is the address of `x`, so do nothing.
+            let y = *z;
+            Call(RET, retblock, opaque(y))
+        }
+
+        retblock = {
+            Return()
+        }
+    )
+}
+
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+fn dominate_storage() {
+    use std::intrinsics::mir::*;
+
+    mir!(
+        let x: i32;
+        let r: &i32;
+        let c: i32;
+        let d: bool;
+        { Goto(bb0) }
+        bb0 = {
+            x = 5;
+            r = &x;
+            Goto(bb1)
+        }
+        bb1 = {
+            let c = *r;
+            Call(RET, bb2, opaque(c))
+        }
+        bb2 = {
+            StorageDead(x);
+            StorageLive(x);
+            let d = true;
+            match d { false => bb2, _ => bb0 }
+        }
+    )
+}
+
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+fn maybe_dead(m: bool) {
+    use std::intrinsics::mir::*;
+
+    mir!(
+        let x: i32;
+        let y: i32;
+        {
+            StorageLive(x);
+            StorageLive(y);
+            x = 5;
+            y = 5;
+            let a = &x;
+            let b = &mut y;
+            // As we don't replace `b` in `bb2`, we cannot replace it here either.
+            *b = 7;
+            // But this can still be replaced.
+            let u = *a;
+            match m { true => bb1, _ => bb2 }
+        }
+        bb1 = {
+            StorageDead(x);
+            StorageDead(y);
+            Call(RET, bb2, opaque(u))
+        }
+        bb2 = {
+            // As `x` may be `StorageDead`, `a` may be dangling, so we do nothing.
+            let z = *a;
+            Call(RET, bb3, opaque(z))
+        }
+        bb3 = {
+            // As `y` may be `StorageDead`, `b` may be dangling, so we do nothing.
+            // This implies that we also do not substitute `b` in `bb0`.
+            let t = *b;
+            Call(RET, retblock, opaque(t))
+        }
+        retblock = {
+            Return()
+        }
+    )
+}
+
+fn main() {
+    let mut x = 5_usize;
+    let mut y = 7_usize;
+    reference_propagation(&x, &y);
+    reference_propagation_mut(&mut x, &mut y);
+    reference_propagation_const_ptr(&raw const x, &raw const y);
+    reference_propagation_mut_ptr(&raw mut x, &raw mut y);
+    read_through_raw(&mut x);
+    multiple_storage();
+    dominate_storage();
+    maybe_dead(true);
+}
+
+// EMIT_MIR reference_prop.reference_propagation.ReferencePropagation.diff
+// EMIT_MIR reference_prop.reference_propagation_mut.ReferencePropagation.diff
+// EMIT_MIR reference_prop.reference_propagation_const_ptr.ReferencePropagation.diff
+// EMIT_MIR reference_prop.reference_propagation_mut_ptr.ReferencePropagation.diff
+// EMIT_MIR reference_prop.read_through_raw.ReferencePropagation.diff
+// EMIT_MIR reference_prop.multiple_storage.ReferencePropagation.diff
+// EMIT_MIR reference_prop.dominate_storage.ReferencePropagation.diff
+// EMIT_MIR reference_prop.maybe_dead.ReferencePropagation.diff
diff --git a/tests/mir-opt/slice_filter.rs b/tests/mir-opt/slice_filter.rs
index 97c18af31de..be32f40f132 100644
--- a/tests/mir-opt/slice_filter.rs
+++ b/tests/mir-opt/slice_filter.rs
@@ -12,7 +12,9 @@ pub fn variant_b(input: &[(usize, usize, usize, usize)]) -> usize {
     input.iter().filter(|&&(a, b, c, d)| a <= c && d <= b || c <= a && b <= d).count()
 }
 
+// EMIT_MIR slice_filter.variant_a-{closure#0}.ReferencePropagation.diff
 // EMIT_MIR slice_filter.variant_a-{closure#0}.CopyProp.diff
 // EMIT_MIR slice_filter.variant_a-{closure#0}.DestinationPropagation.diff
 // EMIT_MIR slice_filter.variant_b-{closure#0}.CopyProp.diff
+// EMIT_MIR slice_filter.variant_b-{closure#0}.ReferencePropagation.diff
 // EMIT_MIR slice_filter.variant_b-{closure#0}.DestinationPropagation.diff
diff --git a/tests/mir-opt/slice_filter.variant_a-{closure#0}.CopyProp.diff b/tests/mir-opt/slice_filter.variant_a-{closure#0}.CopyProp.diff
index 3bb0358ffe3..60e5056c7a9 100644
--- a/tests/mir-opt/slice_filter.variant_a-{closure#0}.CopyProp.diff
+++ b/tests/mir-opt/slice_filter.variant_a-{closure#0}.CopyProp.diff
@@ -101,16 +101,16 @@
       }
   
       bb0: {
--         StorageLive(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
+          StorageLive(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
           _25 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
           _3 = &((*_25).0: usize);         // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
--         StorageLive(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
+          StorageLive(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
           _26 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
           _4 = &((*_26).1: usize);         // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
--         StorageLive(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
+          StorageLive(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
           _27 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
           _5 = &((*_27).2: usize);         // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
--         StorageLive(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
+          StorageLive(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
           _28 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
           _6 = &((*_28).3: usize);         // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
           StorageLive(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
@@ -184,10 +184,10 @@
       bb3: {
           StorageDead(_16);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
           StorageDead(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageDead(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageDead(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageDead(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
--         StorageDead(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
           return;                          // scope 0 at $DIR/slice_filter.rs:+0:76: +0:76
       }
   
diff --git a/tests/mir-opt/slice_filter.variant_a-{closure#0}.DestinationPropagation.diff b/tests/mir-opt/slice_filter.variant_a-{closure#0}.DestinationPropagation.diff
index 294c3272f4f..7ad1ccf28a6 100644
--- a/tests/mir-opt/slice_filter.variant_a-{closure#0}.DestinationPropagation.diff
+++ b/tests/mir-opt/slice_filter.variant_a-{closure#0}.DestinationPropagation.diff
@@ -30,10 +30,14 @@
       let mut _27: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
       let mut _28: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
       scope 1 {
-          debug a => _3;                   // in scope 1 at $DIR/slice_filter.rs:+0:27: +0:28
-          debug b => _4;                   // in scope 1 at $DIR/slice_filter.rs:+0:30: +0:31
-          debug c => _5;                   // in scope 1 at $DIR/slice_filter.rs:+0:33: +0:34
-          debug d => _6;                   // in scope 1 at $DIR/slice_filter.rs:+0:36: +0:37
+-         debug a => _3;                   // in scope 1 at $DIR/slice_filter.rs:+0:27: +0:28
+-         debug b => _4;                   // in scope 1 at $DIR/slice_filter.rs:+0:30: +0:31
+-         debug c => _5;                   // in scope 1 at $DIR/slice_filter.rs:+0:33: +0:34
+-         debug d => _6;                   // in scope 1 at $DIR/slice_filter.rs:+0:36: +0:37
++         debug a => _20;                  // in scope 1 at $DIR/slice_filter.rs:+0:27: +0:28
++         debug b => _15;                  // in scope 1 at $DIR/slice_filter.rs:+0:30: +0:31
++         debug c => _11;                  // in scope 1 at $DIR/slice_filter.rs:+0:33: +0:34
++         debug d => _24;                  // in scope 1 at $DIR/slice_filter.rs:+0:36: +0:37
           scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:40: 8:46
               debug self => _9;            // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
               debug other => _10;          // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
@@ -85,25 +89,38 @@
       }
   
       bb0: {
+-         StorageLive(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
++         nop;                             // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
           _25 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
-          _3 = &((*_25).0: usize);         // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
+-         _3 = &((*_25).0: usize);         // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
+-         StorageLive(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
++         _20 = &((*_25).0: usize);        // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
++         nop;                             // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
           _26 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
-          _4 = &((*_26).1: usize);         // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
+-         _4 = &((*_26).1: usize);         // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
+-         StorageLive(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
++         _15 = &((*_26).1: usize);        // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
++         nop;                             // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
           _27 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
-          _5 = &((*_27).2: usize);         // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
+-         _5 = &((*_27).2: usize);         // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
+-         StorageLive(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
++         _11 = &((*_27).2: usize);        // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
++         nop;                             // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
           _28 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
-          _6 = &((*_28).3: usize);         // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
+-         _6 = &((*_28).3: usize);         // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
 -         StorageLive(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
++         _24 = &((*_28).3: usize);        // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
 +         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
           StorageLive(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:46
           StorageLive(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:41
-          _9 = &_3;                        // scope 1 at $DIR/slice_filter.rs:+0:40: +0:41
           StorageLive(_10);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          StorageLive(_11);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          _11 = _5;                        // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          _10 = &_11;                      // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
-          _29 = deref_copy (*_9);          // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _30 = deref_copy (*_10);         // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+-         StorageLive(_11);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+-         _11 = _5;                        // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+-         _29 = deref_copy _3;             // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
++         _29 = deref_copy _20;            // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _30 = deref_copy _11;            // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageLive(_31);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
           _31 = (*_29);                    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageLive(_32);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
@@ -111,7 +128,8 @@
           _8 = Le(move _31, move _32);     // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageDead(_32);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageDead(_31);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+-         StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
           StorageDead(_10);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
           StorageDead(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
           switchInt(move _8) -> [0: bb4, otherwise: bb5]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
@@ -127,13 +145,14 @@
 +         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
           StorageLive(_17);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:66
           StorageLive(_18);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:61
-          _18 = &_5;                       // scope 1 at $DIR/slice_filter.rs:+0:60: +0:61
           StorageLive(_19);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          StorageLive(_20);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          _20 = _3;                        // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          _19 = &_20;                      // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
-          _33 = deref_copy (*_18);         // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _34 = deref_copy (*_19);         // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+-         StorageLive(_20);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+-         _20 = _3;                        // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+-         _33 = deref_copy _5;             // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
++         _33 = deref_copy _11;            // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _34 = deref_copy _20;            // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageLive(_35);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
           _35 = (*_33);                    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageLive(_36);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
@@ -141,7 +160,8 @@
           _17 = Le(move _35, move _36);    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageDead(_36);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageDead(_35);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_20);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+-         StorageDead(_20);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
           StorageDead(_19);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
           StorageDead(_18);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
           switchInt(move _17) -> [0: bb6, otherwise: bb7]; // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
@@ -150,8 +170,16 @@
       bb3: {
 -         StorageDead(_16);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
 -         StorageDead(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+-         StorageDead(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+-         StorageDead(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+-         StorageDead(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+-         StorageDead(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
 +         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
 +         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
++         nop;                             // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
++         nop;                             // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
++         nop;                             // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
++         nop;                             // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
           return;                          // scope 0 at $DIR/slice_filter.rs:+0:76: +0:76
       }
   
@@ -166,13 +194,14 @@
 -         StorageLive(_12);                // scope 1 at $DIR/slice_filter.rs:+0:50: +0:56
 +         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:50: +0:56
           StorageLive(_13);                // scope 1 at $DIR/slice_filter.rs:+0:50: +0:51
-          _13 = &_6;                       // scope 1 at $DIR/slice_filter.rs:+0:50: +0:51
           StorageLive(_14);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          StorageLive(_15);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          _15 = _4;                        // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          _14 = &_15;                      // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
-          _37 = deref_copy (*_13);         // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _38 = deref_copy (*_14);         // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+-         StorageLive(_15);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+-         _15 = _4;                        // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+-         _37 = deref_copy _6;             // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
++         _37 = deref_copy _24;            // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _38 = deref_copy _15;            // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageLive(_39);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
           _39 = (*_37);                    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageLive(_40);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
@@ -180,7 +209,8 @@
           _12 = Le(move _39, move _40);    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageDead(_40);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageDead(_39);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_15);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+-         StorageDead(_15);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
           StorageDead(_14);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
           StorageDead(_13);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
 -         _7 = move _12;                   // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
@@ -202,13 +232,14 @@
 -         StorageLive(_21);                // scope 1 at $DIR/slice_filter.rs:+0:70: +0:76
 +         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:70: +0:76
           StorageLive(_22);                // scope 1 at $DIR/slice_filter.rs:+0:70: +0:71
-          _22 = &_4;                       // scope 1 at $DIR/slice_filter.rs:+0:70: +0:71
           StorageLive(_23);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          StorageLive(_24);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          _24 = _6;                        // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          _23 = &_24;                      // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
-          _41 = deref_copy (*_22);         // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          _42 = deref_copy (*_23);         // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+-         StorageLive(_24);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+-         _24 = _6;                        // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+-         _41 = deref_copy _4;             // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
++         _41 = deref_copy _15;            // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _42 = deref_copy _24;            // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageLive(_43);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
           _43 = (*_41);                    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageLive(_44);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
@@ -217,7 +248,8 @@
 +         _0 = Le(move _43, move _44);     // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageDead(_44);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
           StorageDead(_43);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
-          StorageDead(_24);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+-         StorageDead(_24);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
++         nop;                             // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
           StorageDead(_23);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
           StorageDead(_22);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
 -         _16 = move _21;                  // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
diff --git a/tests/mir-opt/slice_filter.variant_a-{closure#0}.ReferencePropagation.diff b/tests/mir-opt/slice_filter.variant_a-{closure#0}.ReferencePropagation.diff
new file mode 100644
index 00000000000..f6350b3812a
--- /dev/null
+++ b/tests/mir-opt/slice_filter.variant_a-{closure#0}.ReferencePropagation.diff
@@ -0,0 +1,247 @@
+- // MIR for `variant_a::{closure#0}` before ReferencePropagation
++ // MIR for `variant_a::{closure#0}` after ReferencePropagation
+  
+  fn variant_a::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:8:25: 8:39], _2: &&(usize, usize, usize, usize)) -> bool {
+      let mut _0: bool;                    // return place in scope 0 at $DIR/slice_filter.rs:+0:40: +0:40
+      let _3: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
+      let _4: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
+      let _5: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
+      let _6: &usize;                      // in scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
+      let mut _7: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:56
+      let mut _8: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:46
+      let mut _9: &&usize;                 // in scope 0 at $DIR/slice_filter.rs:+0:40: +0:41
+      let mut _10: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:45: +0:46
+      let _11: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:45: +0:46
+      let mut _12: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:50: +0:56
+      let mut _13: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:50: +0:51
+      let mut _14: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:55: +0:56
+      let _15: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:55: +0:56
+      let mut _16: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:76
+      let mut _17: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:66
+      let mut _18: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:60: +0:61
+      let mut _19: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:65: +0:66
+      let _20: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:65: +0:66
+      let mut _21: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:70: +0:76
+      let mut _22: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:70: +0:71
+      let mut _23: &&usize;                // in scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+      let _24: &usize;                     // in scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+      let mut _25: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
+      let mut _26: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
+      let mut _27: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
+      let mut _28: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:38
+      let mut _31: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
+      let mut _32: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
+      let mut _37: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
+      let mut _38: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
+      let mut _43: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
+      let mut _44: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
+      let mut _49: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
+      let mut _50: &usize;                 // in scope 0 at $SRC_DIR/core/src/cmp.rs:LL:COL
+      scope 1 {
+          debug a => _3;                   // in scope 1 at $DIR/slice_filter.rs:+0:27: +0:28
+          debug b => _4;                   // in scope 1 at $DIR/slice_filter.rs:+0:30: +0:31
+          debug c => _5;                   // in scope 1 at $DIR/slice_filter.rs:+0:33: +0:34
+          debug d => _6;                   // in scope 1 at $DIR/slice_filter.rs:+0:36: +0:37
+          scope 2 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:40: 8:46
+              debug self => _9;            // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              debug other => _10;          // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              let mut _29: &usize;         // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              let mut _30: &usize;         // in scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              scope 3 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  debug self => _29;       // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  debug other => _30;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  let mut _33: usize;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  let mut _34: usize;      // in scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              }
+          }
+          scope 4 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:60: 8:66
+              debug self => _18;           // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              debug other => _19;          // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              let mut _35: &usize;         // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              let mut _36: &usize;         // in scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              scope 5 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  debug self => _35;       // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  debug other => _36;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  let mut _39: usize;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  let mut _40: usize;      // in scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              }
+          }
+          scope 6 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:50: 8:56
+              debug self => _13;           // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              debug other => _14;          // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              let mut _41: &usize;         // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              let mut _42: &usize;         // in scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              scope 7 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  debug self => _41;       // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  debug other => _42;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  let mut _45: usize;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  let mut _46: usize;      // in scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              }
+          }
+          scope 8 (inlined cmp::impls::<impl PartialOrd for &usize>::le) { // at $DIR/slice_filter.rs:8:70: 8:76
+              debug self => _22;           // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              debug other => _23;          // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              let mut _47: &usize;         // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              let mut _48: &usize;         // in scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              scope 9 (inlined cmp::impls::<impl PartialOrd for usize>::le) { // at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  debug self => _47;       // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  debug other => _48;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  let mut _51: usize;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+                  let mut _52: usize;      // in scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+              }
+          }
+      }
+  
+      bb0: {
+          StorageLive(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
+          _25 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
+          _3 = &((*_25).0: usize);         // scope 0 at $DIR/slice_filter.rs:+0:27: +0:28
+          StorageLive(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
+          _26 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
+          _4 = &((*_26).1: usize);         // scope 0 at $DIR/slice_filter.rs:+0:30: +0:31
+          StorageLive(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
+          _27 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
+          _5 = &((*_27).2: usize);         // scope 0 at $DIR/slice_filter.rs:+0:33: +0:34
+          StorageLive(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
+          _28 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
+          _6 = &((*_28).3: usize);         // scope 0 at $DIR/slice_filter.rs:+0:36: +0:37
+          StorageLive(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
+          StorageLive(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:46
+          StorageLive(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:41
+          _9 = &_3;                        // scope 1 at $DIR/slice_filter.rs:+0:40: +0:41
+          StorageLive(_10);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+          StorageLive(_11);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+          _11 = _5;                        // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+          _10 = &_11;                      // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+-         _29 = deref_copy (*_9);          // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+-         _30 = deref_copy (*_10);         // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         _29 = deref_copy _3;             // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         _30 = deref_copy _11;            // scope 2 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageLive(_33);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _33 = (*_29);                    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageLive(_34);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _34 = (*_30);                    // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _8 = Le(move _33, move _34);     // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_34);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_33);                // scope 3 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+          StorageDead(_10);                // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+          StorageDead(_9);                 // scope 1 at $DIR/slice_filter.rs:+0:45: +0:46
+          switchInt(move _8) -> [0: bb4, otherwise: bb5]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
+      }
+  
+      bb1: {
+          _0 = const true;                 // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
+          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
+      }
+  
+      bb2: {
+          StorageLive(_16);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+          StorageLive(_17);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:66
+          StorageLive(_18);                // scope 1 at $DIR/slice_filter.rs:+0:60: +0:61
+          _18 = &_5;                       // scope 1 at $DIR/slice_filter.rs:+0:60: +0:61
+          StorageLive(_19);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+          StorageLive(_20);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+          _20 = _3;                        // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+          _19 = &_20;                      // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+-         _35 = deref_copy (*_18);         // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+-         _36 = deref_copy (*_19);         // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         _35 = deref_copy _5;             // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         _36 = deref_copy _20;            // scope 4 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageLive(_39);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _39 = (*_35);                    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageLive(_40);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _40 = (*_36);                    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _17 = Le(move _39, move _40);    // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_40);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_39);                // scope 5 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_20);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+          StorageDead(_19);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+          StorageDead(_18);                // scope 1 at $DIR/slice_filter.rs:+0:65: +0:66
+          switchInt(move _17) -> [0: bb6, otherwise: bb7]; // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+      }
+  
+      bb3: {
+          StorageDead(_16);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_6);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_5);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_4);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_3);                 // scope 0 at $DIR/slice_filter.rs:+0:75: +0:76
+          return;                          // scope 0 at $DIR/slice_filter.rs:+0:76: +0:76
+      }
+  
+      bb4: {
+          _7 = const false;                // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
+          StorageDead(_12);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+          goto -> bb2;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
+      }
+  
+      bb5: {
+          StorageLive(_12);                // scope 1 at $DIR/slice_filter.rs:+0:50: +0:56
+          StorageLive(_13);                // scope 1 at $DIR/slice_filter.rs:+0:50: +0:51
+          _13 = &_6;                       // scope 1 at $DIR/slice_filter.rs:+0:50: +0:51
+          StorageLive(_14);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+          StorageLive(_15);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+          _15 = _4;                        // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+          _14 = &_15;                      // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+-         _41 = deref_copy (*_13);         // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+-         _42 = deref_copy (*_14);         // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         _41 = deref_copy _6;             // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         _42 = deref_copy _15;            // scope 6 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageLive(_45);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _45 = (*_41);                    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageLive(_46);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _46 = (*_42);                    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _12 = Le(move _45, move _46);    // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_46);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_45);                // scope 7 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_15);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+          StorageDead(_14);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+          StorageDead(_13);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+          _7 = move _12;                   // scope 1 at $DIR/slice_filter.rs:+0:40: +0:56
+          StorageDead(_12);                // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:55: +0:56
+          switchInt(move _7) -> [0: bb2, otherwise: bb1]; // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
+      }
+  
+      bb6: {
+          _16 = const false;               // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+      }
+  
+      bb7: {
+          StorageLive(_21);                // scope 1 at $DIR/slice_filter.rs:+0:70: +0:76
+          StorageLive(_22);                // scope 1 at $DIR/slice_filter.rs:+0:70: +0:71
+          _22 = &_4;                       // scope 1 at $DIR/slice_filter.rs:+0:70: +0:71
+          StorageLive(_23);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageLive(_24);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+          _24 = _6;                        // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+          _23 = &_24;                      // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+-         _47 = deref_copy (*_22);         // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+-         _48 = deref_copy (*_23);         // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         _47 = deref_copy _4;             // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
++         _48 = deref_copy _24;            // scope 8 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageLive(_51);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _51 = (*_47);                    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageLive(_52);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _52 = (*_48);                    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          _21 = Le(move _51, move _52);    // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_52);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_51);                // scope 9 at $SRC_DIR/core/src/cmp.rs:LL:COL
+          StorageDead(_24);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_23);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_22);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+          _16 = move _21;                  // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:60: +0:76
+      }
+  
+      bb8: {
+          StorageDead(_21);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+          StorageDead(_17);                // scope 1 at $DIR/slice_filter.rs:+0:75: +0:76
+          _0 = move _16;                   // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
+          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:40: +0:76
+      }
+  }
+  
diff --git a/tests/mir-opt/slice_filter.variant_b-{closure#0}.ReferencePropagation.diff b/tests/mir-opt/slice_filter.variant_b-{closure#0}.ReferencePropagation.diff
new file mode 100644
index 00000000000..d1241c6b024
--- /dev/null
+++ b/tests/mir-opt/slice_filter.variant_b-{closure#0}.ReferencePropagation.diff
@@ -0,0 +1,103 @@
+- // MIR for `variant_b::{closure#0}` before ReferencePropagation
++ // MIR for `variant_b::{closure#0}` after ReferencePropagation
+  
+  fn variant_b::{closure#0}(_1: &mut [closure@$DIR/slice_filter.rs:12:25: 12:41], _2: &&(usize, usize, usize, usize)) -> bool {
+      let mut _0: bool;                    // return place in scope 0 at $DIR/slice_filter.rs:+0:42: +0:42
+      let _3: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
+      let _4: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
+      let _5: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
+      let _6: usize;                       // in scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
+      let mut _7: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:58
+      let mut _8: bool;                    // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:48
+      let mut _9: usize;                   // in scope 0 at $DIR/slice_filter.rs:+0:42: +0:43
+      let mut _10: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:47: +0:48
+      let mut _11: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:52: +0:58
+      let mut _12: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:52: +0:53
+      let mut _13: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:57: +0:58
+      let mut _14: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:78
+      let mut _15: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:68
+      let mut _16: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:62: +0:63
+      let mut _17: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:67: +0:68
+      let mut _18: bool;                   // in scope 0 at $DIR/slice_filter.rs:+0:72: +0:78
+      let mut _19: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:72: +0:73
+      let mut _20: usize;                  // in scope 0 at $DIR/slice_filter.rs:+0:77: +0:78
+      let mut _21: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
+      let mut _22: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
+      let mut _23: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
+      let mut _24: &(usize, usize, usize, usize); // in scope 0 at $DIR/slice_filter.rs:+0:26: +0:40
+      scope 1 {
+          debug a => _3;                   // in scope 1 at $DIR/slice_filter.rs:+0:29: +0:30
+          debug b => _4;                   // in scope 1 at $DIR/slice_filter.rs:+0:32: +0:33
+          debug c => _5;                   // in scope 1 at $DIR/slice_filter.rs:+0:35: +0:36
+          debug d => _6;                   // in scope 1 at $DIR/slice_filter.rs:+0:38: +0:39
+      }
+  
+      bb0: {
+          _21 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
+          _3 = ((*_21).0: usize);          // scope 0 at $DIR/slice_filter.rs:+0:29: +0:30
+          _22 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
+          _4 = ((*_22).1: usize);          // scope 0 at $DIR/slice_filter.rs:+0:32: +0:33
+          _23 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
+          _5 = ((*_23).2: usize);          // scope 0 at $DIR/slice_filter.rs:+0:35: +0:36
+          _24 = deref_copy (*_2);          // scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
+          _6 = ((*_24).3: usize);          // scope 0 at $DIR/slice_filter.rs:+0:38: +0:39
+          StorageLive(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
+          StorageLive(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:48
+          _8 = Le(_3, _5);                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:48
+          switchInt(move _8) -> [0: bb4, otherwise: bb5]; // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
+      }
+  
+      bb1: {
+          _0 = const true;                 // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
+          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
+      }
+  
+      bb2: {
+          StorageLive(_14);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+          StorageLive(_15);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:68
+          _15 = Le(_5, _3);                // scope 1 at $DIR/slice_filter.rs:+0:62: +0:68
+          switchInt(move _15) -> [0: bb6, otherwise: bb7]; // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+      }
+  
+      bb3: {
+          StorageDead(_14);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
+          StorageDead(_7);                 // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
+          return;                          // scope 0 at $DIR/slice_filter.rs:+0:78: +0:78
+      }
+  
+      bb4: {
+          _7 = const false;                // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
+          StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
+          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
+          goto -> bb2;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
+      }
+  
+      bb5: {
+          StorageLive(_11);                // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
+          _11 = Le(_6, _4);                // scope 1 at $DIR/slice_filter.rs:+0:52: +0:58
+          _7 = move _11;                   // scope 1 at $DIR/slice_filter.rs:+0:42: +0:58
+          StorageDead(_11);                // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
+          StorageDead(_8);                 // scope 1 at $DIR/slice_filter.rs:+0:57: +0:58
+          switchInt(move _7) -> [0: bb2, otherwise: bb1]; // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
+      }
+  
+      bb6: {
+          _14 = const false;               // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+      }
+  
+      bb7: {
+          StorageLive(_18);                // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
+          _18 = Le(_4, _6);                // scope 1 at $DIR/slice_filter.rs:+0:72: +0:78
+          _14 = move _18;                  // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+          goto -> bb8;                     // scope 1 at $DIR/slice_filter.rs:+0:62: +0:78
+      }
+  
+      bb8: {
+          StorageDead(_18);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
+          StorageDead(_15);                // scope 1 at $DIR/slice_filter.rs:+0:77: +0:78
+          _0 = move _14;                   // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
+          goto -> bb3;                     // scope 1 at $DIR/slice_filter.rs:+0:42: +0:78
+      }
+  }
+  
diff --git a/tests/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir b/tests/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir
deleted file mode 100644
index 15b0aece8f5..00000000000
--- a/tests/mir-opt/while_let_loops.change_loop_body.PreCodegen.after.mir
+++ /dev/null
@@ -1,17 +0,0 @@
-// MIR for `change_loop_body` after PreCodegen
-
-fn change_loop_body() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/while_let_loops.rs:+0:27: +0:27
-    let mut _1: i32;                     // in scope 0 at $DIR/while_let_loops.rs:+1:9: +1:15
-    scope 1 {
-        debug _x => _1;                  // in scope 1 at $DIR/while_let_loops.rs:+1:9: +1:15
-        scope 2 {
-        }
-    }
-
-    bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/while_let_loops.rs:+1:9: +1:15
-        StorageDead(_1);                 // scope 0 at $DIR/while_let_loops.rs:+6:1: +6:2
-        return;                          // scope 0 at $DIR/while_let_loops.rs:+6:2: +6:2
-    }
-}
diff --git a/tests/pretty/offset_of.rs b/tests/pretty/offset_of.rs
new file mode 100644
index 00000000000..e1783432857
--- /dev/null
+++ b/tests/pretty/offset_of.rs
@@ -0,0 +1,4 @@
+// pp-exact
+#![feature(offset_of)]
+
+fn main() { std::mem::offset_of!(std :: ops :: Range < usize >, end); }
diff --git a/tests/pretty/tests-are-sorted.pp b/tests/pretty/tests-are-sorted.pp
index 58f746f2e0e..7d7f682130d 100644
--- a/tests/pretty/tests-are-sorted.pp
+++ b/tests/pretty/tests-are-sorted.pp
@@ -79,6 +79,7 @@ pub const a_test: test::TestDescAndFn =
     };
 fn a_test() {}
 #[rustc_main]
+#[no_coverage]
 pub fn main() -> () {
     extern crate test;
     test::test_main_static(&[&a_test, &m_test, &z_test])
diff --git a/tests/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs b/tests/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs
index 8dac53c2a62..7db100a08a1 100644
--- a/tests/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs
+++ b/tests/run-make-fulldeps/hotplug_codegen_backend/the_backend.rs
@@ -67,7 +67,7 @@ impl CodegenBackend for TheBackend {
         let crate_name = codegen_results.crate_info.local_crate_name;
         for &crate_type in sess.opts.crate_types.iter() {
             if crate_type != CrateType::Rlib {
-                sess.fatal(&format!("Crate type is {:?}", crate_type));
+                sess.fatal(format!("Crate type is {:?}", crate_type));
             }
             let output_name = out_filename(sess, crate_type, &outputs, crate_name);
             let mut out_file = ::std::fs::File::create(output_name).unwrap();
diff --git a/tests/run-make/branch-protection-check-IBT/Makefile b/tests/run-make/branch-protection-check-IBT/Makefile
new file mode 100644
index 00000000000..cabe951e1c5
--- /dev/null
+++ b/tests/run-make/branch-protection-check-IBT/Makefile
@@ -0,0 +1,15 @@
+# Check for GNU Property Note
+
+include ../tools.mk
+
+# How to run this
+# python3 x.py test --target x86_64-unknown-linux-gnu  tests/run-make/branch-protection-check-IBT/
+
+# only-x86_64
+
+all:
+ifeq ($(filter x86,$(LLVM_COMPONENTS)),x86_64)
+	$(RUSTC) --target x86_64-unknown-linux-gnu -Z cf-protection=branch -L$(TMPDIR) -C link-args='-nostartfiles'  -C save-temps  ./main.rs -o $(TMPDIR)/rsmain
+	 readelf -nW $(TMPDIR)/rsmain | $(CGREP) -e ".note.gnu.property"
+endif
+
diff --git a/tests/run-make/branch-protection-check-IBT/main.rs b/tests/run-make/branch-protection-check-IBT/main.rs
new file mode 100644
index 00000000000..ad379d6ea43
--- /dev/null
+++ b/tests/run-make/branch-protection-check-IBT/main.rs
@@ -0,0 +1,3 @@
+fn main() {
+    println!("hello world");
+}
diff --git a/tests/run-make/c-unwind-abi-catch-lib-panic/Makefile b/tests/run-make/c-unwind-abi-catch-lib-panic/Makefile
index 9c41a5a717e..b8e0e9483cd 100644
--- a/tests/run-make/c-unwind-abi-catch-lib-panic/Makefile
+++ b/tests/run-make/c-unwind-abi-catch-lib-panic/Makefile
@@ -1,4 +1,5 @@
 # ignore-cross-compile
+# needs-unwind
 include ../tools.mk
 
 all: archive
diff --git a/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs b/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs
index 78a71219c78..42d3efa82d6 100644
--- a/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs
+++ b/tests/run-make/c-unwind-abi-catch-lib-panic/main.rs
@@ -2,7 +2,6 @@
 //!
 //! This test triggers a panic in a Rust library that our foreign function invokes. This shows
 //! that we can unwind through the C code in that library, and catch the underlying panic.
-#![feature(c_unwind)]
 
 use std::panic::{catch_unwind, AssertUnwindSafe};
 
diff --git a/tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs b/tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs
index a99a04d5c6f..9e7bc3e53a1 100644
--- a/tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs
+++ b/tests/run-make/c-unwind-abi-catch-lib-panic/panic.rs
@@ -1,5 +1,4 @@
 #![crate_type = "staticlib"]
-#![feature(c_unwind)]
 
 /// This function will panic if `x` is greater than 10.
 ///
diff --git a/tests/run-make/c-unwind-abi-catch-panic/Makefile b/tests/run-make/c-unwind-abi-catch-panic/Makefile
index 4398ac2ee24..1760ddb3061 100644
--- a/tests/run-make/c-unwind-abi-catch-panic/Makefile
+++ b/tests/run-make/c-unwind-abi-catch-panic/Makefile
@@ -1,4 +1,5 @@
 # ignore-cross-compile
+# needs-unwind
 include ../tools.mk
 
 all: $(call NATIVE_STATICLIB,add)
diff --git a/tests/run-make/c-unwind-abi-catch-panic/main.rs b/tests/run-make/c-unwind-abi-catch-panic/main.rs
index 15d38d72160..1903be9561c 100644
--- a/tests/run-make/c-unwind-abi-catch-panic/main.rs
+++ b/tests/run-make/c-unwind-abi-catch-panic/main.rs
@@ -1,7 +1,6 @@
 //! A test for calling `C-unwind` functions across foreign function boundaries.
 //!
 //! This test triggers a panic when calling a foreign function that calls *back* into Rust.
-#![feature(c_unwind)]
 
 use std::panic::{catch_unwind, AssertUnwindSafe};
 
diff --git a/tests/run-make/const_fn_mir/Makefile b/tests/run-make/const_fn_mir/Makefile
index b2c268f0439..6d72c122723 100644
--- a/tests/run-make/const_fn_mir/Makefile
+++ b/tests/run-make/const_fn_mir/Makefile
@@ -1,3 +1,4 @@
+# needs-unwind -Cpanic=abort gives different MIR output
 include ../tools.mk
 
 all:
diff --git a/tests/run-make/core-no-oom-handling/Makefile b/tests/run-make/core-no-oom-handling/Makefile
new file mode 100644
index 00000000000..28c5261ff85
--- /dev/null
+++ b/tests/run-make/core-no-oom-handling/Makefile
@@ -0,0 +1,6 @@
+include ../tools.mk
+
+FAKEROOT=$(TMPDIR)/fakeroot
+
+all:
+	$(RUSTC) --edition=2021 -Dwarnings --crate-type=rlib ../../../library/core/src/lib.rs --sysroot=$(FAKEROOT) --cfg no_global_oom_handling
diff --git a/tests/run-make/coverage-reports/Makefile b/tests/run-make/coverage-reports/Makefile
index d06cd9c6a54..d4ae03e590a 100644
--- a/tests/run-make/coverage-reports/Makefile
+++ b/tests/run-make/coverage-reports/Makefile
@@ -174,7 +174,7 @@ else
 	# files are redundant, so there is no need to generate `expected_*.json` files or
 	# compare actual JSON results.)
 
-	$(DIFF) --ignore-matching-lines='^  | .*::<.*>.*:$$' --ignore-matching-lines='^  | <.*>::.*:$$' \
+	$(DIFF) --ignore-matching-lines='^  \| .*::<.*>.*:$$' --ignore-matching-lines='^  \| <.*>::.*:$$' \
 		expected_show_coverage.$@.txt "$(TMPDIR)"/actual_show_coverage.$@.txt || \
 		( grep -q '^\/\/ ignore-llvm-cov-show-diffs' $(SOURCEDIR)/$@.rs && \
 			>&2 echo 'diff failed, but suppressed with `// ignore-llvm-cov-show-diffs` in $(SOURCEDIR)/$@.rs' \
diff --git a/tests/run-make/coverage-reports/expected_show_coverage.test_harness.txt b/tests/run-make/coverage-reports/expected_show_coverage.test_harness.txt
new file mode 100644
index 00000000000..93bd1cfcb48
--- /dev/null
+++ b/tests/run-make/coverage-reports/expected_show_coverage.test_harness.txt
@@ -0,0 +1,11 @@
+    1|       |// Verify that the entry point injected by the test harness doesn't cause
+    2|       |// weird artifacts in the coverage report (e.g. issue #10749).
+    3|       |
+    4|       |// compile-flags: --test
+    5|       |
+    6|       |#[allow(dead_code)]
+    7|      0|fn unused() {}
+    8|       |
+    9|      1|#[test]
+   10|      1|fn my_test() {}
+
diff --git a/tests/run-make/coverage/test_harness.rs b/tests/run-make/coverage/test_harness.rs
new file mode 100644
index 00000000000..12a755734c1
--- /dev/null
+++ b/tests/run-make/coverage/test_harness.rs
@@ -0,0 +1,10 @@
+// Verify that the entry point injected by the test harness doesn't cause
+// weird artifacts in the coverage report (e.g. issue #10749).
+
+// compile-flags: --test
+
+#[allow(dead_code)]
+fn unused() {}
+
+#[test]
+fn my_test() {}
diff --git a/tests/run-make/debug-assertions/Makefile b/tests/run-make/debug-assertions/Makefile
index e83337c597f..4501459e9d1 100644
--- a/tests/run-make/debug-assertions/Makefile
+++ b/tests/run-make/debug-assertions/Makefile
@@ -1,4 +1,5 @@
 # ignore-cross-compile
+# needs-unwind
 include ../tools.mk
 
 all:
diff --git a/tests/run-make/forced-unwind-terminate-pof/Makefile b/tests/run-make/forced-unwind-terminate-pof/Makefile
new file mode 100644
index 00000000000..871621520b9
--- /dev/null
+++ b/tests/run-make/forced-unwind-terminate-pof/Makefile
@@ -0,0 +1,9 @@
+# ignore-cross-compile
+# only-linux
+include ../tools.mk
+
+all: foo
+	$(call RUN,foo) | $(CGREP) -v "cannot unwind"
+
+foo: foo.rs
+	$(RUSTC) $<
diff --git a/tests/run-make/forced-unwind-terminate-pof/foo.rs b/tests/run-make/forced-unwind-terminate-pof/foo.rs
new file mode 100644
index 00000000000..0a51287313f
--- /dev/null
+++ b/tests/run-make/forced-unwind-terminate-pof/foo.rs
@@ -0,0 +1,17 @@
+// Tests that forced unwind through POF Rust frames wouldn't trigger our terminating guards.
+
+#![feature(c_unwind)]
+#![no_main]
+
+extern "C-unwind" {
+    fn pthread_exit(v: *mut core::ffi::c_void) -> !;
+}
+
+unsafe extern "C" fn call_pthread_exit() {
+    pthread_exit(core::ptr::null_mut());
+}
+
+#[no_mangle]
+unsafe extern "C-unwind" fn main(_argc: core::ffi::c_int, _argv: *mut *mut core::ffi::c_char) {
+    call_pthread_exit();
+}
diff --git a/tests/run-make/foreign-double-unwind/Makefile b/tests/run-make/foreign-double-unwind/Makefile
index f20fe3ce66e..b5e52808d2f 100644
--- a/tests/run-make/foreign-double-unwind/Makefile
+++ b/tests/run-make/foreign-double-unwind/Makefile
@@ -1,4 +1,5 @@
 # ignore-cross-compile
+# needs-unwind
 include ../tools.mk
 
 all: foo
diff --git a/tests/run-make/foreign-double-unwind/foo.rs b/tests/run-make/foreign-double-unwind/foo.rs
index cae8aa9402d..c085480b4f8 100644
--- a/tests/run-make/foreign-double-unwind/foo.rs
+++ b/tests/run-make/foreign-double-unwind/foo.rs
@@ -1,8 +1,6 @@
 // Tests that C++ double unwinding through Rust code will be properly guarded
 // against instead of exhibiting undefined behaviour.
 
-#![feature(c_unwind)]
-
 extern "C-unwind" {
     fn throw_cxx_exception();
     fn cxx_catch_callback(cb: extern "C-unwind" fn());
diff --git a/tests/run-make/foreign-exceptions/Makefile b/tests/run-make/foreign-exceptions/Makefile
index a8e20ffb1f4..56c41b274fb 100644
--- a/tests/run-make/foreign-exceptions/Makefile
+++ b/tests/run-make/foreign-exceptions/Makefile
@@ -1,4 +1,5 @@
 # ignore-cross-compile
+# needs-unwind
 include ../tools.mk
 
 all: foo
diff --git a/tests/run-make/foreign-exceptions/foo.rs b/tests/run-make/foreign-exceptions/foo.rs
index dd3b7c76f28..ccf858d8587 100644
--- a/tests/run-make/foreign-exceptions/foo.rs
+++ b/tests/run-make/foreign-exceptions/foo.rs
@@ -2,8 +2,6 @@
 // are caught by catch_unwind. Also tests that Rust panics can unwind through
 // C++ code.
 
-#![feature(c_unwind)]
-
 use std::panic::{catch_unwind, AssertUnwindSafe};
 
 struct DropCheck<'a>(&'a mut bool);
diff --git a/tests/run-make/foreign-rust-exceptions/Makefile b/tests/run-make/foreign-rust-exceptions/Makefile
index 0d007bf1c49..59cee284200 100644
--- a/tests/run-make/foreign-rust-exceptions/Makefile
+++ b/tests/run-make/foreign-rust-exceptions/Makefile
@@ -1,5 +1,6 @@
 # ignore-cross-compile
 # ignore-i686-pc-windows-gnu
+# needs-unwind
 
 # This test doesn't work on 32-bit MinGW as cdylib has its own copy of unwinder
 # so cross-DLL unwinding does not work.
diff --git a/tests/run-make/foreign-rust-exceptions/bar.rs b/tests/run-make/foreign-rust-exceptions/bar.rs
index 5f9efe32360..1d865b429fa 100644
--- a/tests/run-make/foreign-rust-exceptions/bar.rs
+++ b/tests/run-make/foreign-rust-exceptions/bar.rs
@@ -1,5 +1,4 @@
 #![crate_type = "cdylib"]
-#![feature(c_unwind)]
 
 #[no_mangle]
 extern "C-unwind" fn panic() {
diff --git a/tests/run-make/foreign-rust-exceptions/foo.rs b/tests/run-make/foreign-rust-exceptions/foo.rs
index 266987c5b6d..38942c55b19 100644
--- a/tests/run-make/foreign-rust-exceptions/foo.rs
+++ b/tests/run-make/foreign-rust-exceptions/foo.rs
@@ -1,5 +1,3 @@
-#![feature(c_unwind)]
-
 #[cfg_attr(not(windows), link(name = "bar"))]
 #[cfg_attr(windows, link(name = "bar.dll"))]
 extern "C-unwind" {
diff --git a/tests/run-make/issue-109934-lto-debuginfo/Makefile b/tests/run-make/issue-109934-lto-debuginfo/Makefile
new file mode 100644
index 00000000000..3b7a99d3dbc
--- /dev/null
+++ b/tests/run-make/issue-109934-lto-debuginfo/Makefile
@@ -0,0 +1,12 @@
+# ignore-cross-compile
+include ../tools.mk
+
+# With the upgrade to LLVM 16, this was getting:
+#
+#   error: Cannot represent a difference across sections
+#
+# The error stemmed from DI function definitions under type scopes, fixed by
+# only declaring in type scope and defining the subprogram elsewhere.
+
+all:
+	$(RUSTC) lib.rs --test -C lto=fat -C debuginfo=2 -C incremental=$(TMPDIR)/inc-fat
diff --git a/tests/run-make/issue-109934-lto-debuginfo/lib.rs b/tests/run-make/issue-109934-lto-debuginfo/lib.rs
new file mode 100644
index 00000000000..c405928bd18
--- /dev/null
+++ b/tests/run-make/issue-109934-lto-debuginfo/lib.rs
@@ -0,0 +1,9 @@
+extern crate alloc;
+
+#[cfg(test)]
+mod tests {
+    #[test]
+    fn something_alloc() {
+        assert_eq!(Vec::<u32>::new(), Vec::<u32>::new());
+    }
+}
diff --git a/tests/run-make/libtest-json/Makefile b/tests/run-make/libtest-json/Makefile
index 417637cf072..c8bc7b5dd4a 100644
--- a/tests/run-make/libtest-json/Makefile
+++ b/tests/run-make/libtest-json/Makefile
@@ -1,4 +1,5 @@
 # ignore-cross-compile
+# needs-unwind
 include ../tools.mk
 
 # Test expected libtest's JSON output
diff --git a/tests/run-make/libtest-junit/Makefile b/tests/run-make/libtest-junit/Makefile
new file mode 100644
index 00000000000..d97cafccf1f
--- /dev/null
+++ b/tests/run-make/libtest-junit/Makefile
@@ -0,0 +1,19 @@
+# ignore-cross-compile
+include ../tools.mk
+
+# Test expected libtest's junit output
+
+OUTPUT_FILE_DEFAULT := $(TMPDIR)/libtest-junit-output-default.xml
+OUTPUT_FILE_STDOUT_SUCCESS := $(TMPDIR)/libtest-junit-output-stdout-success.xml
+
+all: f.rs validate_junit.py output-default.xml output-stdout-success.xml
+	$(RUSTC) --test f.rs
+	RUST_BACKTRACE=0 $(call RUN,f) -Z unstable-options --test-threads=1 --format=junit > $(OUTPUT_FILE_DEFAULT) || true
+	RUST_BACKTRACE=0 $(call RUN,f) -Z unstable-options --test-threads=1 --format=junit --show-output > $(OUTPUT_FILE_STDOUT_SUCCESS) || true
+
+	cat $(OUTPUT_FILE_DEFAULT) | "$(PYTHON)" validate_junit.py
+	cat $(OUTPUT_FILE_STDOUT_SUCCESS) | "$(PYTHON)" validate_junit.py
+
+	# Normalize the actual output and compare to expected output file
+	cat $(OUTPUT_FILE_DEFAULT) | sed 's/time="[0-9.]*"/time="$$TIME"/g' | diff output-default.xml -
+	cat $(OUTPUT_FILE_STDOUT_SUCCESS) | sed 's/time="[0-9.]*"/time="$$TIME"/g' | diff output-stdout-success.xml -
diff --git a/tests/run-make/libtest-junit/f.rs b/tests/run-make/libtest-junit/f.rs
new file mode 100644
index 00000000000..d360d77317d
--- /dev/null
+++ b/tests/run-make/libtest-junit/f.rs
@@ -0,0 +1,23 @@
+#[test]
+fn a() {
+    println!("print from successful test");
+    // Should pass
+}
+
+#[test]
+fn b() {
+    println!("print from failing test");
+    assert!(false);
+}
+
+#[test]
+#[should_panic]
+fn c() {
+    assert!(false);
+}
+
+#[test]
+#[ignore = "msg"]
+fn d() {
+    assert!(false);
+}
diff --git a/tests/run-make/libtest-junit/output-default.xml b/tests/run-make/libtest-junit/output-default.xml
new file mode 100644
index 00000000000..d59e07b8ad8
--- /dev/null
+++ b/tests/run-make/libtest-junit/output-default.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"/><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>&#xA;<![CDATA[thread 'b' panicked at 'assertion failed: false', f.rs:10:5]]>&#xA;<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"/><system-out/><system-err/></testsuite></testsuites>
diff --git a/tests/run-make/libtest-junit/output-stdout-success.xml b/tests/run-make/libtest-junit/output-stdout-success.xml
new file mode 100644
index 00000000000..0c300611e1f
--- /dev/null
+++ b/tests/run-make/libtest-junit/output-stdout-success.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><testsuites><testsuite name="test" package="test" id="0" errors="0" failures="1" tests="4" skipped="1" ><testcase classname="unknown" name="a" time="$TIME"><system-out><![CDATA[print from successful test]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="b" time="$TIME"><failure type="assert"/><system-out><![CDATA[print from failing test]]>&#xA;<![CDATA[thread 'b' panicked at 'assertion failed: false', f.rs:10:5]]>&#xA;<![CDATA[note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace]]>&#xA;<![CDATA[]]></system-out></testcase><testcase classname="unknown" name="c" time="$TIME"><system-out><![CDATA[thread 'c' panicked at 'assertion failed: false', f.rs:16:5]]>&#xA;<![CDATA[]]></system-out></testcase><system-out/><system-err/></testsuite></testsuites>
diff --git a/tests/run-make/libtest-junit/validate_junit.py b/tests/run-make/libtest-junit/validate_junit.py
new file mode 100755
index 00000000000..47a8e70ccc3
--- /dev/null
+++ b/tests/run-make/libtest-junit/validate_junit.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+
+import sys
+import xml.etree.ElementTree as ET
+
+# Try to decode line in order to ensure it is a valid XML document
+for line in sys.stdin:
+    try:
+        ET.fromstring(line)
+    except ET.ParseError as pe:
+        print("Invalid xml: %r" % line)
+        raise
diff --git a/tests/run-make/raw-dylib-alt-calling-convention/lib.rs b/tests/run-make/raw-dylib-alt-calling-convention/lib.rs
index 22f222c12c3..dcb5fee9ecc 100644
--- a/tests/run-make/raw-dylib-alt-calling-convention/lib.rs
+++ b/tests/run-make/raw-dylib-alt-calling-convention/lib.rs
@@ -1,5 +1,4 @@
 #![feature(abi_vectorcall)]
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
 
 #[repr(C)]
 #[derive(Clone)]
diff --git a/tests/run-make/raw-dylib-c/lib.rs b/tests/run-make/raw-dylib-c/lib.rs
index 5fb1204037c..f17125f308c 100644
--- a/tests/run-make/raw-dylib-c/lib.rs
+++ b/tests/run-make/raw-dylib-c/lib.rs
@@ -1,5 +1,3 @@
-#![feature(raw_dylib)]
-
 #[link(name = "extern_1.dll", kind = "raw-dylib", modifiers = "+verbatim")]
 extern {
     fn extern_fn_1();
diff --git a/tests/run-make/raw-dylib-cross-compilation/lib.rs b/tests/run-make/raw-dylib-cross-compilation/lib.rs
index 51bf2ec6b6e..3338ac0a0b5 100644
--- a/tests/run-make/raw-dylib-cross-compilation/lib.rs
+++ b/tests/run-make/raw-dylib-cross-compilation/lib.rs
@@ -1,4 +1,3 @@
-#![feature(raw_dylib)]
 #![feature(no_core, lang_items)]
 #![no_std]
 #![no_core]
diff --git a/tests/run-make/raw-dylib-custom-dlltool/Makefile b/tests/run-make/raw-dylib-custom-dlltool/Makefile
new file mode 100644
index 00000000000..f5d5360a3fb
--- /dev/null
+++ b/tests/run-make/raw-dylib-custom-dlltool/Makefile
@@ -0,0 +1,11 @@
+# Test using -Cdlltool to change where raw-dylib looks for the dlltool binary.
+
+# only-windows
+# only-gnu
+# needs-dlltool
+
+include ../tools.mk
+
+all:
+	$(RUSTC) --crate-type lib --crate-name raw_dylib_test lib.rs -Cdlltool=$(CURDIR)/script.cmd
+	$(DIFF) output.txt "$(TMPDIR)"/output.txt
diff --git a/tests/run-make/raw-dylib-custom-dlltool/lib.rs b/tests/run-make/raw-dylib-custom-dlltool/lib.rs
new file mode 100644
index 00000000000..2f3f497a00d
--- /dev/null
+++ b/tests/run-make/raw-dylib-custom-dlltool/lib.rs
@@ -0,0 +1,10 @@
+#[link(name = "extern_1", kind = "raw-dylib")]
+extern {
+    fn extern_fn_1();
+}
+
+pub fn library_function() {
+    unsafe {
+        extern_fn_1();
+    }
+}
diff --git a/tests/run-make/raw-dylib-custom-dlltool/output.txt b/tests/run-make/raw-dylib-custom-dlltool/output.txt
new file mode 100644
index 00000000000..6dd9466d26d
--- /dev/null
+++ b/tests/run-make/raw-dylib-custom-dlltool/output.txt
@@ -0,0 +1 @@
+Called dlltool via script.cmd
diff --git a/tests/run-make/raw-dylib-custom-dlltool/script.cmd b/tests/run-make/raw-dylib-custom-dlltool/script.cmd
new file mode 100644
index 00000000000..95f85c61c67
--- /dev/null
+++ b/tests/run-make/raw-dylib-custom-dlltool/script.cmd
@@ -0,0 +1,2 @@
+echo Called dlltool via script.cmd> %TMPDIR%\output.txt
+dlltool.exe %*
diff --git a/tests/run-make/raw-dylib-import-name-type/driver.rs b/tests/run-make/raw-dylib-import-name-type/driver.rs
index 9a3cd9ebe1b..6c1c212f187 100644
--- a/tests/run-make/raw-dylib-import-name-type/driver.rs
+++ b/tests/run-make/raw-dylib-import-name-type/driver.rs
@@ -1,4 +1,3 @@
-#![feature(raw_dylib)]
 #![feature(abi_vectorcall)]
 
 #[link(name = "extern", kind = "raw-dylib", import_name_type = "undecorated")]
diff --git a/tests/run-make/raw-dylib-inline-cross-dylib/driver.rs b/tests/run-make/raw-dylib-inline-cross-dylib/driver.rs
index f72ded7d9f6..0c3125be6f5 100644
--- a/tests/run-make/raw-dylib-inline-cross-dylib/driver.rs
+++ b/tests/run-make/raw-dylib-inline-cross-dylib/driver.rs
@@ -1,5 +1,3 @@
-#![feature(raw_dylib)]
-
 extern crate raw_dylib_test;
 extern crate raw_dylib_test_wrapper;
 
diff --git a/tests/run-make/raw-dylib-inline-cross-dylib/lib.rs b/tests/run-make/raw-dylib-inline-cross-dylib/lib.rs
index 00c2c1c42d1..4877cb80aea 100644
--- a/tests/run-make/raw-dylib-inline-cross-dylib/lib.rs
+++ b/tests/run-make/raw-dylib-inline-cross-dylib/lib.rs
@@ -1,5 +1,3 @@
-#![feature(raw_dylib)]
-
 #[link(name = "extern_1", kind = "raw-dylib")]
 extern {
     fn extern_fn_1();
diff --git a/tests/run-make/raw-dylib-link-ordinal/lib.rs b/tests/run-make/raw-dylib-link-ordinal/lib.rs
index bb25ac64c61..1bbb45bbc77 100644
--- a/tests/run-make/raw-dylib-link-ordinal/lib.rs
+++ b/tests/run-make/raw-dylib-link-ordinal/lib.rs
@@ -1,5 +1,3 @@
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
-
 #[link(name = "exporter", kind = "raw-dylib")]
 extern {
     #[link_ordinal(13)]
diff --git a/tests/run-make/raw-dylib-stdcall-ordinal/lib.rs b/tests/run-make/raw-dylib-stdcall-ordinal/lib.rs
index b7921396a0f..74c5c7f8250 100644
--- a/tests/run-make/raw-dylib-stdcall-ordinal/lib.rs
+++ b/tests/run-make/raw-dylib-stdcall-ordinal/lib.rs
@@ -1,5 +1,3 @@
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
-
 #[link(name = "exporter", kind = "raw-dylib")]
 extern "stdcall" {
     #[link_ordinal(15)]
diff --git a/tests/run-make/static-unwinding/Makefile b/tests/run-make/static-unwinding/Makefile
index dec94fb16f4..4b093f93608 100644
--- a/tests/run-make/static-unwinding/Makefile
+++ b/tests/run-make/static-unwinding/Makefile
@@ -1,4 +1,5 @@
 # ignore-cross-compile
+# needs-unwind
 include ../tools.mk
 
 all:
diff --git a/tests/run-make/test-benches/Makefile b/tests/run-make/test-benches/Makefile
index 0253a52637f..11aed2e4c79 100644
--- a/tests/run-make/test-benches/Makefile
+++ b/tests/run-make/test-benches/Makefile
@@ -1,6 +1,7 @@
 include ../tools.mk
 
 # ignore-cross-compile
+# needs-unwind #[bench] and -Zpanic-abort-tests can't be combined
 
 all:
 	# Smoke-test that `#[bench]` isn't entirely broken.
diff --git a/tests/run-make/valid-print-requests/valid-print-requests.stderr b/tests/run-make/valid-print-requests/valid-print-requests.stderr
index bea6ce067f6..4f57550c29a 100644
--- a/tests/run-make/valid-print-requests/valid-print-requests.stderr
+++ b/tests/run-make/valid-print-requests/valid-print-requests.stderr
@@ -1,2 +1,2 @@
-error: unknown print request `uwu`. Valid print requests are: `crate-name`, `file-names`, `sysroot`, `target-libdir`, `cfg`, `calling-conventions`, `target-list`, `target-cpus`, `target-features`, `relocation-models`, `code-models`, `tls-models`, `native-static-libs`, `stack-protector-strategies`, `target-spec-json`, `all-target-specs-json`, `link-args`, `split-debuginfo`
+error: unknown print request `uwu`. Valid print requests are: `crate-name`, `file-names`, `sysroot`, `target-libdir`, `cfg`, `calling-conventions`, `target-list`, `target-cpus`, `target-features`, `relocation-models`, `code-models`, `tls-models`, `native-static-libs`, `stack-protector-strategies`, `target-spec-json`, `all-target-specs-json`, `link-args`, `split-debuginfo`, `deployment-target`
 
diff --git a/tests/rustdoc-gui/search-corrections.goml b/tests/rustdoc-gui/search-corrections.goml
new file mode 100644
index 00000000000..5d1b83b35c5
--- /dev/null
+++ b/tests/rustdoc-gui/search-corrections.goml
@@ -0,0 +1,56 @@
+// ignore-tidy-linelength
+
+// Checks that the search tab result tell the user about corrections
+// First, try a search-by-name
+go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
+// Intentionally wrong spelling of "NotableStructWithLongName"
+write: (".search-input", "NotableStructWithLongNamr")
+// To be SURE that the search will be run.
+press-key: 'Enter'
+// Waiting for the search results to appear...
+wait-for: "#search-tabs"
+
+// Corrections aren't shown on the "In Names" tab.
+assert: "#search-tabs button.selected:first-child"
+assert-css: (".search-corrections", {
+    "display": "none"
+})
+
+// Corrections do get shown on the "In Parameters" tab.
+click: "#search-tabs button:nth-child(2)"
+assert: "#search-tabs button.selected:nth-child(2)"
+assert-css: (".search-corrections", {
+    "display": "block"
+})
+assert-text: (
+    ".search-corrections",
+    "Type \"notablestructwithlongnamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
+)
+
+// Corrections do get shown on the "In Return Type" tab.
+click: "#search-tabs button:nth-child(3)"
+assert: "#search-tabs button.selected:nth-child(3)"
+assert-css: (".search-corrections", {
+    "display": "block"
+})
+assert-text: (
+    ".search-corrections",
+    "Type \"notablestructwithlongnamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
+)
+
+// Now, explicit return values
+go-to: "file://" + |DOC_PATH| + "/test_docs/index.html"
+// Intentionally wrong spelling of "NotableStructWithLongName"
+write: (".search-input", "-> NotableStructWithLongNamr")
+// To be SURE that the search will be run.
+press-key: 'Enter'
+// Waiting for the search results to appear...
+wait-for: "#search-tabs"
+
+assert-css: (".search-corrections", {
+    "display": "block"
+})
+assert-text: (
+    ".search-corrections",
+    "Type \"notablestructwithlongnamr\" not found. Showing results for closest type name \"notablestructwithlongname\" instead."
+)
diff --git a/tests/rustdoc-js/generics-trait.js b/tests/rustdoc-js/generics-trait.js
index 7876622435b..0e84751603e 100644
--- a/tests/rustdoc-js/generics-trait.js
+++ b/tests/rustdoc-js/generics-trait.js
@@ -1,9 +1,21 @@
+// exact-check
+
 const QUERY = [
     'Result<SomeTrait>',
+    'Result<SomeTraiz>',
+    'OtherThingxxxxxxxx',
+    'OtherThingxxxxxxxy',
+];
+
+const CORRECTIONS = [
+    null,
+    null,
+    null,
     'OtherThingxxxxxxxx',
 ];
 
 const EXPECTED = [
+    // Result<SomeTrait>
     {
         'in_args': [
             { 'path': 'generics_trait', 'name': 'beta' },
@@ -12,6 +24,21 @@ const EXPECTED = [
             { 'path': 'generics_trait', 'name': 'bet' },
         ],
     },
+    // Result<SomeTraiz>
+    {
+        'in_args': [],
+        'returned': [],
+    },
+    // OtherThingxxxxxxxx
+    {
+        'in_args': [
+            { 'path': 'generics_trait', 'name': 'alpha' },
+        ],
+        'returned': [
+            { 'path': 'generics_trait', 'name': 'alef' },
+        ],
+    },
+    // OtherThingxxxxxxxy
     {
         'in_args': [
             { 'path': 'generics_trait', 'name': 'alpha' },
diff --git a/tests/rustdoc-js/slice-array.js b/tests/rustdoc-js/slice-array.js
new file mode 100644
index 00000000000..8c21e06dc4e
--- /dev/null
+++ b/tests/rustdoc-js/slice-array.js
@@ -0,0 +1,65 @@
+// exact-check
+
+const QUERY = [
+    'R<primitive:slice<P>>',
+    'primitive:slice<R<P>>',
+    'R<primitive:slice<Q>>',
+    'primitive:slice<R<Q>>',
+    'R<primitive:array<Q>>',
+    'primitive:array<R<Q>>',
+    'primitive:array<TraitCat>',
+    'primitive:array<TraitDog>',
+];
+
+const EXPECTED = [
+    {
+        // R<primitive:slice<P>>
+        'returned': [],
+        'in_args': [
+            { 'path': 'slice_array', 'name': 'alpha' },
+        ],
+    },
+    {
+        // primitive:slice<R<P>>
+        'returned': [
+            { 'path': 'slice_array', 'name': 'alef' },
+        ],
+        'in_args': [],
+    },
+    {
+        // R<primitive:slice<Q>>
+        'returned': [],
+        'in_args': [],
+    },
+    {
+        // primitive:slice<R<Q>>
+        'returned': [],
+        'in_args': [],
+    },
+    {
+        // R<primitive:array<Q>>
+        'returned': [
+            { 'path': 'slice_array', 'name': 'bet' },
+        ],
+        'in_args': [],
+    },
+    {
+        // primitive:array<R<Q>>
+        'returned': [],
+        'in_args': [
+            { 'path': 'slice_array', 'name': 'beta' },
+        ],
+    },
+    {
+        // primitive::array<TraitCat>
+        'in_args': [
+            { 'path': 'slice_array', 'name': 'gamma' },
+        ],
+    },
+    {
+        // primitive::array<TraitDog>
+        'in_args': [
+            { 'path': 'slice_array', 'name': 'gamma' },
+        ],
+    },
+];
diff --git a/tests/rustdoc-js/slice-array.rs b/tests/rustdoc-js/slice-array.rs
new file mode 100644
index 00000000000..2523b21cfaa
--- /dev/null
+++ b/tests/rustdoc-js/slice-array.rs
@@ -0,0 +1,16 @@
+pub struct P;
+pub struct Q;
+pub struct R<T>(T);
+
+// returns test
+pub fn alef() -> &'static [R<P>] { loop {} }
+pub fn bet() -> R<[Q; 32]> { loop {} }
+
+// in_args test
+pub fn alpha(_x: R<&'static [P]>) { loop {} }
+pub fn beta(_x: [R<Q>; 32]) { loop {} }
+
+pub trait TraitCat {}
+pub trait TraitDog {}
+
+pub fn gamma<T: TraitCat + TraitDog>(t: [T; 32]) {}
diff --git a/tests/rustdoc-json/fn_pointer/abi.rs b/tests/rustdoc-json/fn_pointer/abi.rs
index 3c1a453d12d..6a30acc2cc3 100644
--- a/tests/rustdoc-json/fn_pointer/abi.rs
+++ b/tests/rustdoc-json/fn_pointer/abi.rs
@@ -1,7 +1,6 @@
 // ignore-tidy-linelength
 
 #![feature(abi_vectorcall)]
-#![feature(c_unwind)]
 
 // @is "$.index[*][?(@.name=='AbiRust')].inner.type.inner.header.abi" \"Rust\"
 pub type AbiRust = fn();
diff --git a/tests/rustdoc-json/fns/abi.rs b/tests/rustdoc-json/fns/abi.rs
index 0e8b78bc0e6..7a5dbee730c 100644
--- a/tests/rustdoc-json/fns/abi.rs
+++ b/tests/rustdoc-json/fns/abi.rs
@@ -1,7 +1,6 @@
 // ignore-tidy-linelength
 
 #![feature(abi_vectorcall)]
-#![feature(c_unwind)]
 
 // @is "$.index[*][?(@.name=='abi_rust')].inner.header.abi" \"Rust\"
 pub fn abi_rust() {}
diff --git a/tests/rustdoc-json/methods/abi.rs b/tests/rustdoc-json/methods/abi.rs
index 4c97d97ceba..fd03d92d65b 100644
--- a/tests/rustdoc-json/methods/abi.rs
+++ b/tests/rustdoc-json/methods/abi.rs
@@ -1,7 +1,6 @@
 // ignore-tidy-linelength
 
 #![feature(abi_vectorcall)]
-#![feature(c_unwind)]
 #![feature(no_core)]
 #![no_core]
 
diff --git a/tests/rustdoc-ui/check-cfg-test.stderr b/tests/rustdoc-ui/check-cfg/check-cfg-test.stderr
index 9770be2f191..9770be2f191 100644
--- a/tests/rustdoc-ui/check-cfg-test.stderr
+++ b/tests/rustdoc-ui/check-cfg/check-cfg-test.stderr
diff --git a/tests/rustdoc-ui/check-cfg-unstable.rs b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs
index 5c500ce6ce0..5c500ce6ce0 100644
--- a/tests/rustdoc-ui/check-cfg-unstable.rs
+++ b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs
diff --git a/tests/rustdoc-ui/check-cfg-unstable.stderr b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.stderr
index 9b27c2bc058..9b27c2bc058 100644
--- a/tests/rustdoc-ui/check-cfg-unstable.stderr
+++ b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.stderr
diff --git a/tests/rustdoc-ui/check-cfg.rs b/tests/rustdoc-ui/check-cfg/check-cfg.rs
index fa8789ad3ed..fa8789ad3ed 100644
--- a/tests/rustdoc-ui/check-cfg.rs
+++ b/tests/rustdoc-ui/check-cfg/check-cfg.rs
diff --git a/tests/rustdoc-ui/check-cfg.stderr b/tests/rustdoc-ui/check-cfg/check-cfg.stderr
index 1db8e1d91c2..03fb6f96fb5 100644
--- a/tests/rustdoc-ui/check-cfg.stderr
+++ b/tests/rustdoc-ui/check-cfg/check-cfg.stderr
@@ -2,7 +2,7 @@ warning: unexpected `cfg` condition name
   --> $DIR/check-cfg.rs:5:7
    |
 LL | #[cfg(uniz)]
-   |       ^^^^ help: did you mean: `unix`
+   |       ^^^^ help: there is a config with a similar name: `unix`
    |
    = note: `#[warn(unexpected_cfgs)]` on by default
 
diff --git a/tests/rustdoc-ui/auxiliary/extern_macros.rs b/tests/rustdoc-ui/doctest/auxiliary/extern_macros.rs
index ee1fec4c5c2..ee1fec4c5c2 100644
--- a/tests/rustdoc-ui/auxiliary/extern_macros.rs
+++ b/tests/rustdoc-ui/doctest/auxiliary/extern_macros.rs
diff --git a/tests/rustdoc-ui/block-doc-comment.rs b/tests/rustdoc-ui/doctest/block-doc-comment.rs
index ce529916e5e..ce529916e5e 100644
--- a/tests/rustdoc-ui/block-doc-comment.rs
+++ b/tests/rustdoc-ui/doctest/block-doc-comment.rs
diff --git a/tests/rustdoc-ui/block-doc-comment.stdout b/tests/rustdoc-ui/doctest/block-doc-comment.stdout
index 7326c0a25a0..7326c0a25a0 100644
--- a/tests/rustdoc-ui/block-doc-comment.stdout
+++ b/tests/rustdoc-ui/doctest/block-doc-comment.stdout
diff --git a/tests/rustdoc-ui/cfg-test.rs b/tests/rustdoc-ui/doctest/cfg-test.rs
index d40b9283735..a263baa9738 100644
--- a/tests/rustdoc-ui/cfg-test.rs
+++ b/tests/rustdoc-ui/doctest/cfg-test.rs
@@ -1,6 +1,6 @@
 // check-pass
 // compile-flags:--test --test-args --test-threads=1
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 // Crates like core have doctests gated on `cfg(not(test))` so we need to make
diff --git a/tests/rustdoc-ui/cfg-test.stdout b/tests/rustdoc-ui/doctest/cfg-test.stdout
index 2960ff8d3b4..2960ff8d3b4 100644
--- a/tests/rustdoc-ui/cfg-test.stdout
+++ b/tests/rustdoc-ui/doctest/cfg-test.stdout
diff --git a/tests/rustdoc-ui/check-attr-test.rs b/tests/rustdoc-ui/doctest/check-attr-test.rs
index e955470148a..e955470148a 100644
--- a/tests/rustdoc-ui/check-attr-test.rs
+++ b/tests/rustdoc-ui/doctest/check-attr-test.rs
diff --git a/tests/rustdoc-ui/check-attr-test.stderr b/tests/rustdoc-ui/doctest/check-attr-test.stderr
index 01beba1ffc4..01beba1ffc4 100644
--- a/tests/rustdoc-ui/check-attr-test.stderr
+++ b/tests/rustdoc-ui/doctest/check-attr-test.stderr
diff --git a/tests/rustdoc-ui/check-cfg-test.rs b/tests/rustdoc-ui/doctest/check-cfg-test.rs
index 920432276cb..49a801c3fb3 100644
--- a/tests/rustdoc-ui/check-cfg-test.rs
+++ b/tests/rustdoc-ui/doctest/check-cfg-test.rs
@@ -1,7 +1,7 @@
 // check-pass
 // compile-flags: --test --nocapture --check-cfg=values(feature,"test") -Z unstable-options
-// normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR"
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// The doctest will produce a warning because feature invalid is unexpected
diff --git a/tests/rustdoc-ui/doctest/check-cfg-test.stderr b/tests/rustdoc-ui/doctest/check-cfg-test.stderr
new file mode 100644
index 00000000000..f84543c2072
--- /dev/null
+++ b/tests/rustdoc-ui/doctest/check-cfg-test.stderr
@@ -0,0 +1,11 @@
+warning: unexpected `cfg` condition value
+  --> $DIR/check-cfg-test.rs:9:7
+   |
+LL | #[cfg(feature = "invalid")]
+   |       ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `test`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/rustdoc-ui/check-cfg-test.stdout b/tests/rustdoc-ui/doctest/check-cfg-test.stdout
index b7db49bcfa8..b7db49bcfa8 100644
--- a/tests/rustdoc-ui/check-cfg-test.stdout
+++ b/tests/rustdoc-ui/doctest/check-cfg-test.stdout
diff --git a/tests/rustdoc-ui/display-output.rs b/tests/rustdoc-ui/doctest/display-output.rs
index 23bc54e3cde..7a26dbff986 100644
--- a/tests/rustdoc-ui/display-output.rs
+++ b/tests/rustdoc-ui/doctest/display-output.rs
@@ -3,7 +3,7 @@
 // check-pass
 // edition:2018
 // compile-flags:--test --test-args=--show-output
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```
diff --git a/tests/rustdoc-ui/display-output.stdout b/tests/rustdoc-ui/doctest/display-output.stdout
index ad25d1ce541..ad25d1ce541 100644
--- a/tests/rustdoc-ui/display-output.stdout
+++ b/tests/rustdoc-ui/doctest/display-output.stdout
diff --git a/tests/rustdoc-ui/doc-comment-multi-line-attr.rs b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs
index db674e229fc..75508f435b3 100644
--- a/tests/rustdoc-ui/doc-comment-multi-line-attr.rs
+++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs
@@ -1,6 +1,6 @@
 // Regression test for #97440: Multiline inner attribute triggers ICE during doctest
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // check-pass
 
diff --git a/tests/rustdoc-ui/doc-comment-multi-line-attr.stdout b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.stdout
index e47edbd2a81..e47edbd2a81 100644
--- a/tests/rustdoc-ui/doc-comment-multi-line-attr.stdout
+++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.stdout
diff --git a/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs
index 6ce3cb9fc07..3b0b27edb7d 100644
--- a/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs
+++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs
@@ -1,5 +1,5 @@
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // check-pass
 
diff --git a/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.stdout b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.stdout
index bf3521e4f91..bf3521e4f91 100644
--- a/tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.stdout
+++ b/tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.stdout
diff --git a/tests/rustdoc-ui/doc-test-attr-pass.rs b/tests/rustdoc-ui/doctest/doc-test-attr-pass.rs
index 12608f24450..12608f24450 100644
--- a/tests/rustdoc-ui/doc-test-attr-pass.rs
+++ b/tests/rustdoc-ui/doctest/doc-test-attr-pass.rs
diff --git a/tests/rustdoc-ui/doc-test-attr.rs b/tests/rustdoc-ui/doctest/doc-test-attr.rs
index 46178ad865a..46178ad865a 100644
--- a/tests/rustdoc-ui/doc-test-attr.rs
+++ b/tests/rustdoc-ui/doctest/doc-test-attr.rs
diff --git a/tests/rustdoc-ui/doc-test-attr.stderr b/tests/rustdoc-ui/doctest/doc-test-attr.stderr
index 5e6014954a4..5e6014954a4 100644
--- a/tests/rustdoc-ui/doc-test-attr.stderr
+++ b/tests/rustdoc-ui/doctest/doc-test-attr.stderr
diff --git a/tests/rustdoc-ui/doc-test-doctest-feature.rs b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs
index 88cf44e643b..9c1f4936eab 100644
--- a/tests/rustdoc-ui/doc-test-doctest-feature.rs
+++ b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs
@@ -1,6 +1,6 @@
 // check-pass
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 // Make sure `cfg(doctest)` is set when finding doctests but not inside
diff --git a/tests/rustdoc-ui/doc-test-doctest-feature.stdout b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.stdout
index d7de1f10522..d7de1f10522 100644
--- a/tests/rustdoc-ui/doc-test-doctest-feature.stdout
+++ b/tests/rustdoc-ui/doctest/doc-test-doctest-feature.stdout
diff --git a/tests/rustdoc-ui/doc-test-rustdoc-feature.rs b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs
index dc72a485764..1f90d13af84 100644
--- a/tests/rustdoc-ui/doc-test-rustdoc-feature.rs
+++ b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs
@@ -1,6 +1,6 @@
 // check-pass
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 #![feature(doc_cfg)]
diff --git a/tests/rustdoc-ui/doc-test-rustdoc-feature.stdout b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.stdout
index 5b07fc4c87a..5b07fc4c87a 100644
--- a/tests/rustdoc-ui/doc-test-rustdoc-feature.stdout
+++ b/tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.stdout
diff --git a/tests/rustdoc-ui/doctest-edition.rs b/tests/rustdoc-ui/doctest/doctest-edition.rs
index b0787be972f..b0787be972f 100644
--- a/tests/rustdoc-ui/doctest-edition.rs
+++ b/tests/rustdoc-ui/doctest/doctest-edition.rs
diff --git a/tests/rustdoc-ui/doctest-edition.stderr b/tests/rustdoc-ui/doctest/doctest-edition.stderr
index 8a3329aa3ed..8a3329aa3ed 100644
--- a/tests/rustdoc-ui/doctest-edition.stderr
+++ b/tests/rustdoc-ui/doctest/doctest-edition.stderr
diff --git a/tests/rustdoc-ui/doctest-multiline-crate-attribute.rs b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs
index 260f5a7a64f..a3bde6cb941 100644
--- a/tests/rustdoc-ui/doctest-multiline-crate-attribute.rs
+++ b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs
@@ -1,5 +1,5 @@
 // compile-flags:--test --test-args=--test-threads=1
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // check-pass
 
diff --git a/tests/rustdoc-ui/doctest-multiline-crate-attribute.stdout b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.stdout
index 07a4f657dea..07a4f657dea 100644
--- a/tests/rustdoc-ui/doctest-multiline-crate-attribute.stdout
+++ b/tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.stdout
diff --git a/tests/rustdoc-ui/doctest-output.rs b/tests/rustdoc-ui/doctest/doctest-output.rs
index 303f7689698..26754b73f0b 100644
--- a/tests/rustdoc-ui/doctest-output.rs
+++ b/tests/rustdoc-ui/doctest/doctest-output.rs
@@ -1,7 +1,7 @@
 // edition:2018
 // aux-build:extern_macros.rs
 // compile-flags:--test --test-args=--test-threads=1
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // check-pass
 
diff --git a/tests/rustdoc-ui/doctest-output.stdout b/tests/rustdoc-ui/doctest/doctest-output.stdout
index 35b0e366fb5..35b0e366fb5 100644
--- a/tests/rustdoc-ui/doctest-output.stdout
+++ b/tests/rustdoc-ui/doctest/doctest-output.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-compile-fail.rs b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs
index 4dfca600f16..53b3857dfde 100644
--- a/tests/rustdoc-ui/failed-doctest-compile-fail.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs
@@ -2,7 +2,7 @@
 // adapted to use that, and that normalize line can go away
 
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-compile-fail.stdout b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.stdout
index af3a90a7410..af3a90a7410 100644
--- a/tests/rustdoc-ui/failed-doctest-compile-fail.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-compile-fail.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.rs b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs
index 03a5b9d5d84..84e4d61603a 100644
--- a/tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs
@@ -2,7 +2,7 @@
 // adapted to use that, and that normalize line can go away
 
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.stdout b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.stdout
index 61468b6c745..61468b6c745 100644
--- a/tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-missing-codes.rs b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs
index 66a229a0c75..4e3b848fc02 100644
--- a/tests/rustdoc-ui/failed-doctest-missing-codes.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs
@@ -2,7 +2,7 @@
 // adapted to use that, and that normalize line can go away
 
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-missing-codes.stdout b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.stdout
index bacbb47b5f9..bacbb47b5f9 100644
--- a/tests/rustdoc-ui/failed-doctest-missing-codes.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-missing-codes.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-output-windows.rs b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs
index 456a9e68f20..6bc6c33c76e 100644
--- a/tests/rustdoc-ui/failed-doctest-output-windows.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs
@@ -7,7 +7,7 @@
 
 // compile-flags:--test --test-args --test-threads=1
 // rustc-env:RUST_BACKTRACE=0
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-output-windows.stdout b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout
index 6c147054da3..6c147054da3 100644
--- a/tests/rustdoc-ui/failed-doctest-output-windows.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output-windows.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-output.rs b/tests/rustdoc-ui/doctest/failed-doctest-output.rs
index 77647f8eca9..3e1312382ee 100644
--- a/tests/rustdoc-ui/failed-doctest-output.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output.rs
@@ -7,7 +7,7 @@
 
 // compile-flags:--test --test-args --test-threads=1
 // rustc-env:RUST_BACKTRACE=0
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-output.stdout b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout
index 630198a561a..630198a561a 100644
--- a/tests/rustdoc-ui/failed-doctest-output.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-output.stdout
diff --git a/tests/rustdoc-ui/failed-doctest-should-panic.rs b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs
index c134f80064d..36284e814f3 100644
--- a/tests/rustdoc-ui/failed-doctest-should-panic.rs
+++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs
@@ -2,7 +2,7 @@
 // adapted to use that, and that normalize line can go away
 
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/failed-doctest-should-panic.stdout b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout
index 57a20092a5d..57a20092a5d 100644
--- a/tests/rustdoc-ui/failed-doctest-should-panic.stdout
+++ b/tests/rustdoc-ui/doctest/failed-doctest-should-panic.stdout
diff --git a/tests/rustdoc-ui/no-run-flag-error.rs b/tests/rustdoc-ui/doctest/no-run-flag-error.rs
index 4ead621482b..4ead621482b 100644
--- a/tests/rustdoc-ui/no-run-flag-error.rs
+++ b/tests/rustdoc-ui/doctest/no-run-flag-error.rs
diff --git a/tests/rustdoc-ui/no-run-flag-error.stderr b/tests/rustdoc-ui/doctest/no-run-flag-error.stderr
index d032646c365..d032646c365 100644
--- a/tests/rustdoc-ui/no-run-flag-error.stderr
+++ b/tests/rustdoc-ui/doctest/no-run-flag-error.stderr
diff --git a/tests/rustdoc-ui/no-run-flag.rs b/tests/rustdoc-ui/doctest/no-run-flag.rs
index 181730eb416..1cf3b7c4bb3 100644
--- a/tests/rustdoc-ui/no-run-flag.rs
+++ b/tests/rustdoc-ui/doctest/no-run-flag.rs
@@ -2,7 +2,7 @@
 
 // check-pass
 // compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```
diff --git a/tests/rustdoc-ui/no-run-flag.stdout b/tests/rustdoc-ui/doctest/no-run-flag.stdout
index 02f28aaf60d..02f28aaf60d 100644
--- a/tests/rustdoc-ui/no-run-flag.stdout
+++ b/tests/rustdoc-ui/doctest/no-run-flag.stdout
diff --git a/tests/rustdoc-ui/nocapture-fail.rs b/tests/rustdoc-ui/doctest/nocapture-fail.rs
index 9a3fb592c63..ce487a43db4 100644
--- a/tests/rustdoc-ui/nocapture-fail.rs
+++ b/tests/rustdoc-ui/doctest/nocapture-fail.rs
@@ -1,7 +1,7 @@
 // check-pass
 // compile-flags:--test -Zunstable-options --nocapture
-// normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR"
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```compile_fail
diff --git a/tests/rustdoc-ui/nocapture-fail.stderr b/tests/rustdoc-ui/doctest/nocapture-fail.stderr
index b65b622c1ed..b65b622c1ed 100644
--- a/tests/rustdoc-ui/nocapture-fail.stderr
+++ b/tests/rustdoc-ui/doctest/nocapture-fail.stderr
diff --git a/tests/rustdoc-ui/nocapture-fail.stdout b/tests/rustdoc-ui/doctest/nocapture-fail.stdout
index 754f77db53c..754f77db53c 100644
--- a/tests/rustdoc-ui/nocapture-fail.stdout
+++ b/tests/rustdoc-ui/doctest/nocapture-fail.stdout
diff --git a/tests/rustdoc-ui/nocapture.rs b/tests/rustdoc-ui/doctest/nocapture.rs
index 3eb38f2fb3b..25fbcf857e2 100644
--- a/tests/rustdoc-ui/nocapture.rs
+++ b/tests/rustdoc-ui/doctest/nocapture.rs
@@ -1,6 +1,6 @@
 // check-pass
 // compile-flags:--test -Zunstable-options --nocapture
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```
diff --git a/tests/rustdoc-ui/nocapture.stderr b/tests/rustdoc-ui/doctest/nocapture.stderr
index af6415db3c7..af6415db3c7 100644
--- a/tests/rustdoc-ui/nocapture.stderr
+++ b/tests/rustdoc-ui/doctest/nocapture.stderr
diff --git a/tests/rustdoc-ui/nocapture.stdout b/tests/rustdoc-ui/doctest/nocapture.stdout
index 4880e75da70..4880e75da70 100644
--- a/tests/rustdoc-ui/nocapture.stdout
+++ b/tests/rustdoc-ui/doctest/nocapture.stdout
diff --git a/tests/rustdoc-ui/private-doc-test.rs b/tests/rustdoc-ui/doctest/private-doc-test.rs
index a1f9f8dca08..a1f9f8dca08 100644
--- a/tests/rustdoc-ui/private-doc-test.rs
+++ b/tests/rustdoc-ui/doctest/private-doc-test.rs
diff --git a/tests/rustdoc-ui/private-item-doc-test.rs b/tests/rustdoc-ui/doctest/private-item-doc-test.rs
index 1a3d6cc636d..1a3d6cc636d 100644
--- a/tests/rustdoc-ui/private-item-doc-test.rs
+++ b/tests/rustdoc-ui/doctest/private-item-doc-test.rs
diff --git a/tests/rustdoc-ui/private-item-doc-test.stderr b/tests/rustdoc-ui/doctest/private-item-doc-test.stderr
index 5df6132987c..5df6132987c 100644
--- a/tests/rustdoc-ui/private-item-doc-test.stderr
+++ b/tests/rustdoc-ui/doctest/private-item-doc-test.stderr
diff --git a/tests/rustdoc-ui/private-public-item-doc-test.rs b/tests/rustdoc-ui/doctest/private-public-item-doc-test.rs
index 7cc62b38cc2..7cc62b38cc2 100644
--- a/tests/rustdoc-ui/private-public-item-doc-test.rs
+++ b/tests/rustdoc-ui/doctest/private-public-item-doc-test.rs
diff --git a/tests/rustdoc-ui/private-public-item-doc-test.stderr b/tests/rustdoc-ui/doctest/private-public-item-doc-test.stderr
index f50dbd1844e..f50dbd1844e 100644
--- a/tests/rustdoc-ui/private-public-item-doc-test.stderr
+++ b/tests/rustdoc-ui/doctest/private-public-item-doc-test.stderr
diff --git a/tests/rustdoc-ui/public-reexported-item-doc-test.rs b/tests/rustdoc-ui/doctest/public-reexported-item-doc-test.rs
index b86a53305a1..b86a53305a1 100644
--- a/tests/rustdoc-ui/public-reexported-item-doc-test.rs
+++ b/tests/rustdoc-ui/doctest/public-reexported-item-doc-test.rs
diff --git a/tests/rustdoc-ui/run-directory.correct.stdout b/tests/rustdoc-ui/doctest/run-directory.correct.stdout
index e9b2754794a..e9b2754794a 100644
--- a/tests/rustdoc-ui/run-directory.correct.stdout
+++ b/tests/rustdoc-ui/doctest/run-directory.correct.stdout
diff --git a/tests/rustdoc-ui/run-directory.incorrect.stdout b/tests/rustdoc-ui/doctest/run-directory.incorrect.stdout
index 97a5dbc5c0c..97a5dbc5c0c 100644
--- a/tests/rustdoc-ui/run-directory.incorrect.stdout
+++ b/tests/rustdoc-ui/doctest/run-directory.incorrect.stdout
diff --git a/tests/rustdoc-ui/run-directory.rs b/tests/rustdoc-ui/doctest/run-directory.rs
index b8d0647f08d..1ff0af2d17c 100644
--- a/tests/rustdoc-ui/run-directory.rs
+++ b/tests/rustdoc-ui/doctest/run-directory.rs
@@ -4,12 +4,12 @@
 // check-pass
 // [correct]compile-flags:--test --test-run-directory={{src-base}}
 // [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```
 /// assert_eq!(
-///     std::fs::read_to_string("run-directory.rs").unwrap(),
+///     std::fs::read_to_string("doctest/run-directory.rs").unwrap(),
 ///     include_str!("run-directory.rs"),
 /// );
 /// ```
@@ -17,7 +17,7 @@
 pub fn foo() {}
 
 /// ```
-/// assert!(std::fs::read_to_string("run-directory.rs").is_err());
+/// assert!(std::fs::read_to_string("doctest/run-directory.rs").is_err());
 /// ```
 #[cfg(incorrect)]
 pub fn foo() {}
diff --git a/tests/rustdoc-ui/test-compile-fail1.rs b/tests/rustdoc-ui/doctest/test-compile-fail1.rs
index a0539023878..a0539023878 100644
--- a/tests/rustdoc-ui/test-compile-fail1.rs
+++ b/tests/rustdoc-ui/doctest/test-compile-fail1.rs
diff --git a/tests/rustdoc-ui/test-compile-fail1.stderr b/tests/rustdoc-ui/doctest/test-compile-fail1.stderr
index 72915e46bec..72915e46bec 100644
--- a/tests/rustdoc-ui/test-compile-fail1.stderr
+++ b/tests/rustdoc-ui/doctest/test-compile-fail1.stderr
diff --git a/tests/rustdoc-ui/test-compile-fail2.rs b/tests/rustdoc-ui/doctest/test-compile-fail2.rs
index 651ded0a047..651ded0a047 100644
--- a/tests/rustdoc-ui/test-compile-fail2.rs
+++ b/tests/rustdoc-ui/doctest/test-compile-fail2.rs
diff --git a/tests/rustdoc-ui/test-compile-fail2.stderr b/tests/rustdoc-ui/doctest/test-compile-fail2.stderr
index cee5b63cf50..cee5b63cf50 100644
--- a/tests/rustdoc-ui/test-compile-fail2.stderr
+++ b/tests/rustdoc-ui/doctest/test-compile-fail2.stderr
diff --git a/tests/rustdoc-ui/test-compile-fail3.rs b/tests/rustdoc-ui/doctest/test-compile-fail3.rs
index faa30ad8367..faa30ad8367 100644
--- a/tests/rustdoc-ui/test-compile-fail3.rs
+++ b/tests/rustdoc-ui/doctest/test-compile-fail3.rs
diff --git a/tests/rustdoc-ui/test-compile-fail3.stderr b/tests/rustdoc-ui/doctest/test-compile-fail3.stderr
index fab801b3bea..fab801b3bea 100644
--- a/tests/rustdoc-ui/test-compile-fail3.stderr
+++ b/tests/rustdoc-ui/doctest/test-compile-fail3.stderr
diff --git a/tests/rustdoc-ui/test-no_std.rs b/tests/rustdoc-ui/doctest/test-no_std.rs
index 51abf1c7217..fd651d1a344 100644
--- a/tests/rustdoc-ui/test-no_std.rs
+++ b/tests/rustdoc-ui/doctest/test-no_std.rs
@@ -1,5 +1,5 @@
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // check-pass
 
diff --git a/tests/rustdoc-ui/test-no_std.stdout b/tests/rustdoc-ui/doctest/test-no_std.stdout
index 8d5a30804c1..8d5a30804c1 100644
--- a/tests/rustdoc-ui/test-no_std.stdout
+++ b/tests/rustdoc-ui/doctest/test-no_std.stdout
diff --git a/tests/rustdoc-ui/test-type.rs b/tests/rustdoc-ui/doctest/test-type.rs
index 7f5a8f3fc41..036d37f9db2 100644
--- a/tests/rustdoc-ui/test-type.rs
+++ b/tests/rustdoc-ui/doctest/test-type.rs
@@ -1,6 +1,6 @@
 // compile-flags: --test --test-args=--test-threads=1
 // check-pass
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 /// ```
diff --git a/tests/rustdoc-ui/test-type.stdout b/tests/rustdoc-ui/doctest/test-type.stdout
index a66fd240d34..a66fd240d34 100644
--- a/tests/rustdoc-ui/test-type.stdout
+++ b/tests/rustdoc-ui/doctest/test-type.stdout
diff --git a/tests/rustdoc-ui/unparseable-doc-test.rs b/tests/rustdoc-ui/doctest/unparseable-doc-test.rs
index f0a56a91bf5..fd8b2094d02 100644
--- a/tests/rustdoc-ui/unparseable-doc-test.rs
+++ b/tests/rustdoc-ui/doctest/unparseable-doc-test.rs
@@ -1,5 +1,5 @@
 // compile-flags: --test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 // rustc-env: RUST_BACKTRACE=0
diff --git a/tests/rustdoc-ui/unparseable-doc-test.stdout b/tests/rustdoc-ui/doctest/unparseable-doc-test.stdout
index 2641c66f25e..2641c66f25e 100644
--- a/tests/rustdoc-ui/unparseable-doc-test.stdout
+++ b/tests/rustdoc-ui/doctest/unparseable-doc-test.stdout
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt-unstable.rs b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.rs
index 87620d74ee6..87620d74ee6 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt-unstable.rs
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.rs
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt-unstable.stderr b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.stderr
index a8ddf91bcbf..a8ddf91bcbf 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt-unstable.stderr
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt-unstable.stderr
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt.rs b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.rs
index 8f4f561b44d..8f4f561b44d 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt.rs
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.rs
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt.stderr b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.stderr
index 4c8c607e7da..4c8c607e7da 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt.stderr
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt.stderr
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt2.rs b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.rs
index da5142087dd..da5142087dd 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt2.rs
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.rs
diff --git a/tests/rustdoc-ui/generate-link-to-definition-opt2.stderr b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.stderr
index 4c8c607e7da..4c8c607e7da 100644
--- a/tests/rustdoc-ui/generate-link-to-definition-opt2.stderr
+++ b/tests/rustdoc-ui/generate-link-to-definition/generate-link-to-definition-opt2.stderr
diff --git a/tests/rustdoc-ui/ice-bug-report-url.rs b/tests/rustdoc-ui/ice-bug-report-url.rs
new file mode 100644
index 00000000000..cc066447d31
--- /dev/null
+++ b/tests/rustdoc-ui/ice-bug-report-url.rs
@@ -0,0 +1,14 @@
+// compile-flags: -Ztreat-err-as-bug
+// failure-status: 101
+// error-pattern: aborting due to
+// error-pattern: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md
+
+// normalize-stderr-test "note: compiler flags.*\n\n" -> ""
+// normalize-stderr-test "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}"
+// normalize-stderr-test "thread.*panicked at .*, compiler.*" -> "thread panicked at 'aborting due to `-Z treat-err-as-bug`'"
+// normalize-stderr-test "\s*\d{1,}: .*\n" -> ""
+// normalize-stderr-test "\s at .*\n" -> ""
+// normalize-stderr-test ".*note: Some details are omitted.*\n" -> ""
+
+fn wrong()
+//~^ ERROR expected one of
diff --git a/tests/rustdoc-ui/ice-bug-report-url.stderr b/tests/rustdoc-ui/ice-bug-report-url.stderr
new file mode 100644
index 00000000000..cfb73a9b919
--- /dev/null
+++ b/tests/rustdoc-ui/ice-bug-report-url.stderr
@@ -0,0 +1,16 @@
+error: expected one of `->`, `where`, or `{`, found `<eof>`
+  --> $DIR/ice-bug-report-url.rs:13:10
+   |
+LL | fn wrong()
+   |          ^ expected one of `->`, `where`, or `{`
+
+thread panicked at 'aborting due to `-Z treat-err-as-bug`'
+stack backtrace:
+error: the compiler unexpectedly panicked. this is a bug.
+
+note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md
+
+note: rustc {version} running on {platform}
+
+query stack during panic:
+end of query stack
diff --git a/tests/rustdoc-ui/assoc-item-not-in-scope.rs b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.rs
index 0976515f4a4..0976515f4a4 100644
--- a/tests/rustdoc-ui/assoc-item-not-in-scope.rs
+++ b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.rs
diff --git a/tests/rustdoc-ui/assoc-item-not-in-scope.stderr b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr
index 04594ad4142..04594ad4142 100644
--- a/tests/rustdoc-ui/assoc-item-not-in-scope.stderr
+++ b/tests/rustdoc-ui/intra-doc/assoc-item-not-in-scope.stderr
diff --git a/tests/rustdoc-ui/deny-intra-link-resolution-failure.rs b/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.rs
index 09da124b162..09da124b162 100644
--- a/tests/rustdoc-ui/deny-intra-link-resolution-failure.rs
+++ b/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.rs
diff --git a/tests/rustdoc-ui/deny-intra-link-resolution-failure.stderr b/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.stderr
index 3e08354a61d..3e08354a61d 100644
--- a/tests/rustdoc-ui/deny-intra-link-resolution-failure.stderr
+++ b/tests/rustdoc-ui/intra-doc/deny-intra-link-resolution-failure.stderr
diff --git a/tests/rustdoc-ui/pub-export-lint.rs b/tests/rustdoc-ui/intra-doc/pub-export-lint.rs
index f2e66b77bf3..f2e66b77bf3 100644
--- a/tests/rustdoc-ui/pub-export-lint.rs
+++ b/tests/rustdoc-ui/intra-doc/pub-export-lint.rs
diff --git a/tests/rustdoc-ui/pub-export-lint.stderr b/tests/rustdoc-ui/intra-doc/pub-export-lint.stderr
index 81ef799617c..81ef799617c 100644
--- a/tests/rustdoc-ui/pub-export-lint.stderr
+++ b/tests/rustdoc-ui/intra-doc/pub-export-lint.stderr
diff --git a/tests/rustdoc-ui/reference-link-reports-error-once.rs b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs
index 71bd2c522ff..71bd2c522ff 100644
--- a/tests/rustdoc-ui/reference-link-reports-error-once.rs
+++ b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.rs
diff --git a/tests/rustdoc-ui/reference-link-reports-error-once.stderr b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.stderr
index 2ab67090f66..2ab67090f66 100644
--- a/tests/rustdoc-ui/reference-link-reports-error-once.stderr
+++ b/tests/rustdoc-ui/intra-doc/reference-link-reports-error-once.stderr
diff --git a/tests/rustdoc-ui/reference-links.rs b/tests/rustdoc-ui/intra-doc/reference-links.rs
index e81e034465d..e81e034465d 100644
--- a/tests/rustdoc-ui/reference-links.rs
+++ b/tests/rustdoc-ui/intra-doc/reference-links.rs
diff --git a/tests/rustdoc-ui/reference-links.stderr b/tests/rustdoc-ui/intra-doc/reference-links.stderr
index c98a2fd7ce6..c98a2fd7ce6 100644
--- a/tests/rustdoc-ui/reference-links.stderr
+++ b/tests/rustdoc-ui/intra-doc/reference-links.stderr
diff --git a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.rs b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.rs
new file mode 100644
index 00000000000..c920a815fda
--- /dev/null
+++ b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.rs
@@ -0,0 +1,12 @@
+type Bar<'a, 'b> = Box<dyn PartialEq<Bar<'a, 'b>>>;
+//~^ ERROR cycle detected when expanding type alias
+
+fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
+    Box::new(i)
+}
+
+fn main() {
+    let meh = 42;
+    let muh = 42;
+    assert!(bar(&meh) == bar(&muh));
+}
diff --git a/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr
new file mode 100644
index 00000000000..79e1b753112
--- /dev/null
+++ b/tests/rustdoc-ui/issue-110629-private-type-cycle-dyn.stderr
@@ -0,0 +1,25 @@
+error[E0391]: cycle detected when expanding type alias `Bar`
+  --> $DIR/issue-110629-private-type-cycle-dyn.rs:1:38
+   |
+LL | type Bar<'a, 'b> = Box<dyn PartialEq<Bar<'a, 'b>>>;
+   |                                      ^^^^^^^^^^^
+   |
+   = note: ...which immediately requires expanding type alias `Bar` again
+   = note: type aliases cannot be recursive
+   = help: consider using a struct, enum, or union instead to break the cycle
+   = help: see <https://doc.rust-lang.org/reference/types.html#recursive-types> for more information
+note: cycle used when collecting item types in top-level module
+  --> $DIR/issue-110629-private-type-cycle-dyn.rs:1:1
+   |
+LL | / type Bar<'a, 'b> = Box<dyn PartialEq<Bar<'a, 'b>>>;
+LL | |
+LL | |
+LL | | fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
+...  |
+LL | |     assert!(bar(&meh) == bar(&muh));
+LL | | }
+   | |_^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/rustdoc-ui/issue-110629-private-type-cycle.rs b/tests/rustdoc-ui/issue-110629-private-type-cycle.rs
new file mode 100644
index 00000000000..2d46ddbfa6e
--- /dev/null
+++ b/tests/rustdoc-ui/issue-110629-private-type-cycle.rs
@@ -0,0 +1,15 @@
+// check-pass
+
+#![feature(type_alias_impl_trait)]
+
+type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>> + std::fmt::Debug;
+
+fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
+    i
+}
+
+fn main() {
+    let meh = 42;
+    let muh = 42;
+    assert_eq!(bar(&meh), bar(&muh));
+}
diff --git a/tests/rustdoc-ui/auxiliary/empty-fn.rs b/tests/rustdoc-ui/issues/auxiliary/empty-fn.rs
index 877810f15d7..877810f15d7 100644
--- a/tests/rustdoc-ui/auxiliary/empty-fn.rs
+++ b/tests/rustdoc-ui/issues/auxiliary/empty-fn.rs
diff --git a/tests/rustdoc-ui/auxiliary/issue-61592.rs b/tests/rustdoc-ui/issues/auxiliary/issue-61592.rs
index 57a365b3f38..57a365b3f38 100644
--- a/tests/rustdoc-ui/auxiliary/issue-61592.rs
+++ b/tests/rustdoc-ui/issues/auxiliary/issue-61592.rs
diff --git a/tests/rustdoc-ui/auxiliary/panic-handler.rs b/tests/rustdoc-ui/issues/auxiliary/panic-handler.rs
index 0aaaeee1051..0aaaeee1051 100644
--- a/tests/rustdoc-ui/auxiliary/panic-handler.rs
+++ b/tests/rustdoc-ui/issues/auxiliary/panic-handler.rs
diff --git a/tests/rustdoc-ui/issue-101076.rs b/tests/rustdoc-ui/issues/issue-101076.rs
index 648f9902908..648f9902908 100644
--- a/tests/rustdoc-ui/issue-101076.rs
+++ b/tests/rustdoc-ui/issues/issue-101076.rs
diff --git a/tests/rustdoc-ui/issue-102986.rs b/tests/rustdoc-ui/issues/issue-102986.rs
index 001784ac285..001784ac285 100644
--- a/tests/rustdoc-ui/issue-102986.rs
+++ b/tests/rustdoc-ui/issues/issue-102986.rs
diff --git a/tests/rustdoc-ui/issue-102986.stderr b/tests/rustdoc-ui/issues/issue-102986.stderr
index 3a573726c97..3a573726c97 100644
--- a/tests/rustdoc-ui/issue-102986.stderr
+++ b/tests/rustdoc-ui/issues/issue-102986.stderr
diff --git a/tests/rustdoc-ui/issue-103997.rs b/tests/rustdoc-ui/issues/issue-103997.rs
index 36f42fb15f7..36f42fb15f7 100644
--- a/tests/rustdoc-ui/issue-103997.rs
+++ b/tests/rustdoc-ui/issues/issue-103997.rs
diff --git a/tests/rustdoc-ui/issue-103997.stderr b/tests/rustdoc-ui/issues/issue-103997.stderr
index c06db91496f..c06db91496f 100644
--- a/tests/rustdoc-ui/issue-103997.stderr
+++ b/tests/rustdoc-ui/issues/issue-103997.stderr
diff --git a/tests/rustdoc-ui/issue-105334.rs b/tests/rustdoc-ui/issues/issue-105334.rs
index ee1adc6a029..ee1adc6a029 100644
--- a/tests/rustdoc-ui/issue-105334.rs
+++ b/tests/rustdoc-ui/issues/issue-105334.rs
diff --git a/tests/rustdoc-ui/issue-105334.stderr b/tests/rustdoc-ui/issues/issue-105334.stderr
index e163bb4db9e..e163bb4db9e 100644
--- a/tests/rustdoc-ui/issue-105334.stderr
+++ b/tests/rustdoc-ui/issues/issue-105334.stderr
diff --git a/tests/rustdoc-ui/issue-105737.rs b/tests/rustdoc-ui/issues/issue-105737.rs
index 154f069d8ff..154f069d8ff 100644
--- a/tests/rustdoc-ui/issue-105737.rs
+++ b/tests/rustdoc-ui/issues/issue-105737.rs
diff --git a/tests/rustdoc-ui/issue-105737.stderr b/tests/rustdoc-ui/issues/issue-105737.stderr
index 2dd9beb17da..2dd9beb17da 100644
--- a/tests/rustdoc-ui/issue-105737.stderr
+++ b/tests/rustdoc-ui/issues/issue-105737.stderr
diff --git a/tests/rustdoc-ui/issue-105742.rs b/tests/rustdoc-ui/issues/issue-105742.rs
index 8f4172c0cbb..1fbb70c7808 100644
--- a/tests/rustdoc-ui/issue-105742.rs
+++ b/tests/rustdoc-ui/issues/issue-105742.rs
@@ -19,6 +19,8 @@ pub trait SVec: Index<
     //~| missing generics for associated type `SVec::Item`
     //~| missing generics for associated type `SVec::Item`
     //~| missing generics for associated type `SVec::Item`
+    //~| missing generics for associated type `SVec::Item`
+    //~| missing generics for associated type `SVec::Item`
     Output = <Index<<Self as SVec>::Item,
     //~^ expected 1 lifetime argument
     //~| expected 1 generic argument
@@ -26,6 +28,8 @@ pub trait SVec: Index<
     //~| missing generics for associated type `SVec::Item`
     //~| missing generics for associated type `SVec::Item`
     //~| missing generics for associated type `SVec::Item`
+    //~| missing generics for associated type `SVec::Item`
+    //~| missing generics for associated type `SVec::Item`
     Output = <Self as SVec>::Item> as SVec>::Item,
     //~^ expected 1 lifetime argument
     //~| expected 1 generic argument
@@ -34,11 +38,15 @@ pub trait SVec: Index<
     //~| missing generics for associated type `SVec::Item`
     //~| missing generics for associated type `SVec::Item`
     //~| missing generics for associated type `SVec::Item`
+    //~| missing generics for associated type `SVec::Item`
+    //~| missing generics for associated type `SVec::Item`
     //~| expected 1 generic argument
     //~| missing generics for associated type `SVec::Item`
     //~| missing generics for associated type `SVec::Item`
     //~| missing generics for associated type `SVec::Item`
     //~| missing generics for associated type `SVec::Item`
+    //~| missing generics for associated type `SVec::Item`
+    //~| missing generics for associated type `SVec::Item`
 > {
     type Item<'a, T>;
 
diff --git a/tests/rustdoc-ui/issue-105742.stderr b/tests/rustdoc-ui/issues/issue-105742.stderr
index cd53762ef9b..b63176c9149 100644
--- a/tests/rustdoc-ui/issue-105742.stderr
+++ b/tests/rustdoc-ui/issues/issue-105742.stderr
@@ -5,7 +5,7 @@ LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -21,7 +21,7 @@ LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -31,13 +31,13 @@ LL |     <Self as SVec>::Item<T>,
    |                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:22:37
+  --> $DIR/issue-105742.rs:24:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -47,13 +47,13 @@ LL |     Output = <Index<<Self as SVec>::Item<'a>,
    |                                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:22:37
+  --> $DIR/issue-105742.rs:24:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -63,13 +63,13 @@ LL |     Output = <Index<<Self as SVec>::Item<T>,
    |                                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:29:30
+  --> $DIR/issue-105742.rs:33:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -79,13 +79,13 @@ LL |     Output = <Self as SVec>::Item<'a>> as SVec>::Item,
    |                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:29:30
+  --> $DIR/issue-105742.rs:33:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -95,13 +95,13 @@ LL |     Output = <Self as SVec>::Item<T>> as SVec>::Item,
    |                                  +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:29:46
+  --> $DIR/issue-105742.rs:33:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -111,13 +111,13 @@ LL |     Output = <Self as SVec>::Item> as SVec>::Item<'a>,
    |                                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:29:46
+  --> $DIR/issue-105742.rs:33:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -133,7 +133,7 @@ LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
    |                                        ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -149,7 +149,7 @@ LL | pub fn next<'a, T>(s: &'a mut dyn SVec<Item = T, Output = T>) {
    |                                        ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -165,7 +165,7 @@ LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -181,7 +181,7 @@ LL |     <Self as SVec>::Item,
    |                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -191,13 +191,13 @@ LL |     <Self as SVec>::Item<T>,
    |                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:22:37
+  --> $DIR/issue-105742.rs:24:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -207,13 +207,13 @@ LL |     Output = <Index<<Self as SVec>::Item<'a>,
    |                                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:22:37
+  --> $DIR/issue-105742.rs:24:37
    |
 LL |     Output = <Index<<Self as SVec>::Item,
    |                                     ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -223,13 +223,13 @@ LL |     Output = <Index<<Self as SVec>::Item<T>,
    |                                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:29:30
+  --> $DIR/issue-105742.rs:33:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -239,13 +239,13 @@ LL |     Output = <Self as SVec>::Item<'a>> as SVec>::Item,
    |                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:29:30
+  --> $DIR/issue-105742.rs:33:30
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -255,13 +255,13 @@ LL |     Output = <Self as SVec>::Item<T>> as SVec>::Item,
    |                                  +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:29:46
+  --> $DIR/issue-105742.rs:33:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -271,13 +271,13 @@ LL |     Output = <Self as SVec>::Item> as SVec>::Item<'a>,
    |                                                  ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:29:46
+  --> $DIR/issue-105742.rs:33:46
    |
 LL |     Output = <Self as SVec>::Item> as SVec>::Item,
    |                                              ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -317,13 +317,141 @@ LL | |  > {
    | |__^ ...because it uses `Self` as a type parameter
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:45:38
+  --> $DIR/issue-105742.rs:15:21
+   |
+LL |     <Self as SVec>::Item,
+   |                     ^^^^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/issue-105742.rs:51:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^ --
+help: add missing lifetime argument
+   |
+LL |     <Self as SVec>::Item<'a>,
+   |                         ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+  --> $DIR/issue-105742.rs:15:21
+   |
+LL |     <Self as SVec>::Item,
+   |                     ^^^^ expected 1 generic argument
+   |
+note: associated type defined here, with 1 generic parameter: `T`
+  --> $DIR/issue-105742.rs:51:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^     -
+help: add missing generic argument
+   |
+LL |     <Self as SVec>::Item<T>,
+   |                         +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+  --> $DIR/issue-105742.rs:24:37
+   |
+LL |     Output = <Index<<Self as SVec>::Item,
+   |                                     ^^^^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/issue-105742.rs:51:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^ --
+help: add missing lifetime argument
+   |
+LL |     Output = <Index<<Self as SVec>::Item<'a>,
+   |                                         ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+  --> $DIR/issue-105742.rs:24:37
+   |
+LL |     Output = <Index<<Self as SVec>::Item,
+   |                                     ^^^^ expected 1 generic argument
+   |
+note: associated type defined here, with 1 generic parameter: `T`
+  --> $DIR/issue-105742.rs:51:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^     -
+help: add missing generic argument
+   |
+LL |     Output = <Index<<Self as SVec>::Item<T>,
+   |                                         +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+  --> $DIR/issue-105742.rs:33:30
+   |
+LL |     Output = <Self as SVec>::Item> as SVec>::Item,
+   |                              ^^^^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/issue-105742.rs:51:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^ --
+help: add missing lifetime argument
+   |
+LL |     Output = <Self as SVec>::Item<'a>> as SVec>::Item,
+   |                                  ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+  --> $DIR/issue-105742.rs:33:30
+   |
+LL |     Output = <Self as SVec>::Item> as SVec>::Item,
+   |                              ^^^^ expected 1 generic argument
+   |
+note: associated type defined here, with 1 generic parameter: `T`
+  --> $DIR/issue-105742.rs:51:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^     -
+help: add missing generic argument
+   |
+LL |     Output = <Self as SVec>::Item<T>> as SVec>::Item,
+   |                                  +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+  --> $DIR/issue-105742.rs:33:46
+   |
+LL |     Output = <Self as SVec>::Item> as SVec>::Item,
+   |                                              ^^^^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/issue-105742.rs:51:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^ --
+help: add missing lifetime argument
+   |
+LL |     Output = <Self as SVec>::Item> as SVec>::Item<'a>,
+   |                                                  ++++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+  --> $DIR/issue-105742.rs:33:46
+   |
+LL |     Output = <Self as SVec>::Item> as SVec>::Item,
+   |                                              ^^^^ expected 1 generic argument
+   |
+note: associated type defined here, with 1 generic parameter: `T`
+  --> $DIR/issue-105742.rs:51:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^     -
+help: add missing generic argument
+   |
+LL |     Output = <Self as SVec>::Item> as SVec>::Item<T>,
+   |                                                  +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+  --> $DIR/issue-105742.rs:53:38
    |
 LL |     fn len(&self) -> <Self as SVec>::Item;
    |                                      ^^^^ expected 1 lifetime argument
    |
 note: associated type defined here, with 1 lifetime parameter: `'a`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -333,13 +461,13 @@ LL |     fn len(&self) -> <Self as SVec>::Item<'_>;
    |                                          ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:45:38
+  --> $DIR/issue-105742.rs:53:38
    |
 LL |     fn len(&self) -> <Self as SVec>::Item;
    |                                      ^^^^ expected 1 generic argument
    |
 note: associated type defined here, with 1 generic parameter: `T`
-  --> $DIR/issue-105742.rs:43:10
+  --> $DIR/issue-105742.rs:51:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -348,7 +476,7 @@ help: add missing generic argument
 LL |     fn len(&self) -> <Self as SVec>::Item<T>;
    |                                          +++
 
-error: aborting due to 21 previous errors
+error: aborting due to 29 previous errors
 
 Some errors have detailed explanations: E0038, E0107.
 For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/rustdoc-ui/issue-106213.rs b/tests/rustdoc-ui/issues/issue-106213.rs
index 6d51846b7d0..6d51846b7d0 100644
--- a/tests/rustdoc-ui/issue-106213.rs
+++ b/tests/rustdoc-ui/issues/issue-106213.rs
diff --git a/tests/rustdoc-ui/issue-106213.stderr b/tests/rustdoc-ui/issues/issue-106213.stderr
index 0a4ff69bafb..0a4ff69bafb 100644
--- a/tests/rustdoc-ui/issue-106213.stderr
+++ b/tests/rustdoc-ui/issues/issue-106213.stderr
diff --git a/tests/rustdoc-ui/issue-106226.rs b/tests/rustdoc-ui/issues/issue-106226.rs
index 71b497a9adc..71b497a9adc 100644
--- a/tests/rustdoc-ui/issue-106226.rs
+++ b/tests/rustdoc-ui/issues/issue-106226.rs
diff --git a/tests/rustdoc-ui/issue-106226.stderr b/tests/rustdoc-ui/issues/issue-106226.stderr
index 1c973dab61d..1c973dab61d 100644
--- a/tests/rustdoc-ui/issue-106226.stderr
+++ b/tests/rustdoc-ui/issues/issue-106226.stderr
diff --git a/tests/rustdoc-ui/issue-107918.rs b/tests/rustdoc-ui/issues/issue-107918.rs
index 13788df0fc9..13788df0fc9 100644
--- a/tests/rustdoc-ui/issue-107918.rs
+++ b/tests/rustdoc-ui/issues/issue-107918.rs
diff --git a/tests/rustdoc-ui/issue-109282-import-inline-merge.rs b/tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs
index 0ec8523222f..0ec8523222f 100644
--- a/tests/rustdoc-ui/issue-109282-import-inline-merge.rs
+++ b/tests/rustdoc-ui/issues/issue-109282-import-inline-merge.rs
diff --git a/tests/rustdoc-ui/issue-110900.rs b/tests/rustdoc-ui/issues/issue-110900.rs
index e3154baf860..e3154baf860 100644
--- a/tests/rustdoc-ui/issue-110900.rs
+++ b/tests/rustdoc-ui/issues/issue-110900.rs
diff --git a/tests/rustdoc-ui/issue-58473-2.rs b/tests/rustdoc-ui/issues/issue-58473-2.rs
index 000b6a329c1..000b6a329c1 100644
--- a/tests/rustdoc-ui/issue-58473-2.rs
+++ b/tests/rustdoc-ui/issues/issue-58473-2.rs
diff --git a/tests/rustdoc-ui/issue-58473.rs b/tests/rustdoc-ui/issues/issue-58473.rs
index 44e1f58d0a0..44e1f58d0a0 100644
--- a/tests/rustdoc-ui/issue-58473.rs
+++ b/tests/rustdoc-ui/issues/issue-58473.rs
diff --git a/tests/rustdoc-ui/issue-61592-2.rs b/tests/rustdoc-ui/issues/issue-61592-2.rs
index 5b4fc5ee700..5b4fc5ee700 100644
--- a/tests/rustdoc-ui/issue-61592-2.rs
+++ b/tests/rustdoc-ui/issues/issue-61592-2.rs
diff --git a/tests/rustdoc-ui/issue-61592-2.stderr b/tests/rustdoc-ui/issues/issue-61592-2.stderr
index 1b7f8bb552c..1b7f8bb552c 100644
--- a/tests/rustdoc-ui/issue-61592-2.stderr
+++ b/tests/rustdoc-ui/issues/issue-61592-2.stderr
diff --git a/tests/rustdoc-ui/issue-61592.rs b/tests/rustdoc-ui/issues/issue-61592.rs
index 66772557f2c..66772557f2c 100644
--- a/tests/rustdoc-ui/issue-61592.rs
+++ b/tests/rustdoc-ui/issues/issue-61592.rs
diff --git a/tests/rustdoc-ui/issue-61592.stderr b/tests/rustdoc-ui/issues/issue-61592.stderr
index 9c9c9106f8a..9c9c9106f8a 100644
--- a/tests/rustdoc-ui/issue-61592.stderr
+++ b/tests/rustdoc-ui/issues/issue-61592.stderr
diff --git a/tests/rustdoc-ui/issue-61732.rs b/tests/rustdoc-ui/issues/issue-61732.rs
index 4bd8efeaa3b..4bd8efeaa3b 100644
--- a/tests/rustdoc-ui/issue-61732.rs
+++ b/tests/rustdoc-ui/issues/issue-61732.rs
diff --git a/tests/rustdoc-ui/issue-61732.stderr b/tests/rustdoc-ui/issues/issue-61732.stderr
index d16ec6a853a..d16ec6a853a 100644
--- a/tests/rustdoc-ui/issue-61732.stderr
+++ b/tests/rustdoc-ui/issues/issue-61732.stderr
diff --git a/tests/rustdoc-ui/issue-74134.private.stderr b/tests/rustdoc-ui/issues/issue-74134.private.stderr
index 44c88b6183a..44c88b6183a 100644
--- a/tests/rustdoc-ui/issue-74134.private.stderr
+++ b/tests/rustdoc-ui/issues/issue-74134.private.stderr
diff --git a/tests/rustdoc-ui/issue-74134.public.stderr b/tests/rustdoc-ui/issues/issue-74134.public.stderr
index 5b1887b8310..5b1887b8310 100644
--- a/tests/rustdoc-ui/issue-74134.public.stderr
+++ b/tests/rustdoc-ui/issues/issue-74134.public.stderr
diff --git a/tests/rustdoc-ui/issue-74134.rs b/tests/rustdoc-ui/issues/issue-74134.rs
index b1be9123aaf..b1be9123aaf 100644
--- a/tests/rustdoc-ui/issue-74134.rs
+++ b/tests/rustdoc-ui/issues/issue-74134.rs
diff --git a/tests/rustdoc-ui/issue-79465.rs b/tests/rustdoc-ui/issues/issue-79465.rs
index e50f3995b83..e50f3995b83 100644
--- a/tests/rustdoc-ui/issue-79465.rs
+++ b/tests/rustdoc-ui/issues/issue-79465.rs
diff --git a/tests/rustdoc-ui/issue-79465.stderr b/tests/rustdoc-ui/issues/issue-79465.stderr
index d187a2e664a..d187a2e664a 100644
--- a/tests/rustdoc-ui/issue-79465.stderr
+++ b/tests/rustdoc-ui/issues/issue-79465.stderr
diff --git a/tests/rustdoc-ui/issue-79467.rs b/tests/rustdoc-ui/issues/issue-79467.rs
index eb0b9b38071..eb0b9b38071 100644
--- a/tests/rustdoc-ui/issue-79467.rs
+++ b/tests/rustdoc-ui/issues/issue-79467.rs
diff --git a/tests/rustdoc-ui/issue-79467.stderr b/tests/rustdoc-ui/issues/issue-79467.stderr
index 561513a432b..561513a432b 100644
--- a/tests/rustdoc-ui/issue-79467.stderr
+++ b/tests/rustdoc-ui/issues/issue-79467.stderr
diff --git a/tests/rustdoc-ui/issue-79494.rs b/tests/rustdoc-ui/issues/issue-79494.rs
index fc39424b793..fc39424b793 100644
--- a/tests/rustdoc-ui/issue-79494.rs
+++ b/tests/rustdoc-ui/issues/issue-79494.rs
diff --git a/tests/rustdoc-ui/issue-79494.stderr b/tests/rustdoc-ui/issues/issue-79494.stderr
index 7ed5ed38247..7ed5ed38247 100644
--- a/tests/rustdoc-ui/issue-79494.stderr
+++ b/tests/rustdoc-ui/issues/issue-79494.stderr
diff --git a/tests/rustdoc-ui/issue-80992.rs b/tests/rustdoc-ui/issues/issue-80992.rs
index 80ff225b879..f5ae16981ca 100644
--- a/tests/rustdoc-ui/issue-80992.rs
+++ b/tests/rustdoc-ui/issues/issue-80992.rs
@@ -1,6 +1,6 @@
 // check-pass
 // compile-flags:--test
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 
 pub fn test() -> Result<(), ()> {
diff --git a/tests/rustdoc-ui/issue-80992.stdout b/tests/rustdoc-ui/issues/issue-80992.stdout
index d2b1cd1d550..d2b1cd1d550 100644
--- a/tests/rustdoc-ui/issue-80992.stdout
+++ b/tests/rustdoc-ui/issues/issue-80992.stdout
diff --git a/tests/rustdoc-ui/issue-81662-shortness.rs b/tests/rustdoc-ui/issues/issue-81662-shortness.rs
index 8a90813b31d..0240d217bee 100644
--- a/tests/rustdoc-ui/issue-81662-shortness.rs
+++ b/tests/rustdoc-ui/issues/issue-81662-shortness.rs
@@ -1,5 +1,5 @@
 // compile-flags:--test --error-format=short
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // failure-status: 101
 
diff --git a/tests/rustdoc-ui/issue-81662-shortness.stdout b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
index 748113be3a2..748113be3a2 100644
--- a/tests/rustdoc-ui/issue-81662-shortness.stdout
+++ b/tests/rustdoc-ui/issues/issue-81662-shortness.stdout
diff --git a/tests/rustdoc-ui/issue-83883-describe-lints.rs b/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs
index 0474d6c143e..0474d6c143e 100644
--- a/tests/rustdoc-ui/issue-83883-describe-lints.rs
+++ b/tests/rustdoc-ui/issues/issue-83883-describe-lints.rs
diff --git a/tests/rustdoc-ui/issue-83883-describe-lints.stdout b/tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout
index bbf66a31583..bbf66a31583 100644
--- a/tests/rustdoc-ui/issue-83883-describe-lints.stdout
+++ b/tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout
diff --git a/tests/rustdoc-ui/issue-91134.rs b/tests/rustdoc-ui/issues/issue-91134.rs
index 42703ee4d79..85362f186cc 100644
--- a/tests/rustdoc-ui/issue-91134.rs
+++ b/tests/rustdoc-ui/issues/issue-91134.rs
@@ -1,7 +1,7 @@
 // compile-flags: --test --crate-name=empty_fn --extern=empty_fn --test-args=--test-threads=1
 // aux-build:empty-fn.rs
 // check-pass
-// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // edition:2021
 
diff --git a/tests/rustdoc-ui/issue-91134.stdout b/tests/rustdoc-ui/issues/issue-91134.stdout
index 084062743da..084062743da 100644
--- a/tests/rustdoc-ui/issue-91134.stdout
+++ b/tests/rustdoc-ui/issues/issue-91134.stdout
diff --git a/tests/rustdoc-ui/issue-91713.rs b/tests/rustdoc-ui/issues/issue-91713.rs
index 610bbf11d9c..610bbf11d9c 100644
--- a/tests/rustdoc-ui/issue-91713.rs
+++ b/tests/rustdoc-ui/issues/issue-91713.rs
diff --git a/tests/rustdoc-ui/issue-91713.stderr b/tests/rustdoc-ui/issues/issue-91713.stderr
index 44ead7a1de2..44ead7a1de2 100644
--- a/tests/rustdoc-ui/issue-91713.stderr
+++ b/tests/rustdoc-ui/issues/issue-91713.stderr
diff --git a/tests/rustdoc-ui/issue-91713.stdout b/tests/rustdoc-ui/issues/issue-91713.stdout
index 16783524363..16783524363 100644
--- a/tests/rustdoc-ui/issue-91713.stdout
+++ b/tests/rustdoc-ui/issues/issue-91713.stdout
diff --git a/tests/rustdoc-ui/issue-96287.rs b/tests/rustdoc-ui/issues/issue-96287.rs
index 08cc7ef4c90..08cc7ef4c90 100644
--- a/tests/rustdoc-ui/issue-96287.rs
+++ b/tests/rustdoc-ui/issues/issue-96287.rs
diff --git a/tests/rustdoc-ui/issue-96287.stderr b/tests/rustdoc-ui/issues/issue-96287.stderr
index 7722eb96028..7722eb96028 100644
--- a/tests/rustdoc-ui/issue-96287.stderr
+++ b/tests/rustdoc-ui/issues/issue-96287.stderr
diff --git a/tests/rustdoc-ui/issue-98690.rs b/tests/rustdoc-ui/issues/issue-98690.rs
index fe9bd87ab28..fe9bd87ab28 100644
--- a/tests/rustdoc-ui/issue-98690.rs
+++ b/tests/rustdoc-ui/issues/issue-98690.rs
diff --git a/tests/rustdoc-ui/issue-98690.stderr b/tests/rustdoc-ui/issues/issue-98690.stderr
index 47d94f99a45..47d94f99a45 100644
--- a/tests/rustdoc-ui/issue-98690.stderr
+++ b/tests/rustdoc-ui/issues/issue-98690.stderr
diff --git a/tests/rustdoc-ui/bare-urls.fixed b/tests/rustdoc-ui/lints/bare-urls.fixed
index 23aa5c44c21..23aa5c44c21 100644
--- a/tests/rustdoc-ui/bare-urls.fixed
+++ b/tests/rustdoc-ui/lints/bare-urls.fixed
diff --git a/tests/rustdoc-ui/bare-urls.rs b/tests/rustdoc-ui/lints/bare-urls.rs
index 592f57343bc..592f57343bc 100644
--- a/tests/rustdoc-ui/bare-urls.rs
+++ b/tests/rustdoc-ui/lints/bare-urls.rs
diff --git a/tests/rustdoc-ui/bare-urls.stderr b/tests/rustdoc-ui/lints/bare-urls.stderr
index ccf52cd0b93..ccf52cd0b93 100644
--- a/tests/rustdoc-ui/bare-urls.stderr
+++ b/tests/rustdoc-ui/lints/bare-urls.stderr
diff --git a/tests/rustdoc-ui/check-attr.rs b/tests/rustdoc-ui/lints/check-attr.rs
index 0b3f7bedda5..0b3f7bedda5 100644
--- a/tests/rustdoc-ui/check-attr.rs
+++ b/tests/rustdoc-ui/lints/check-attr.rs
diff --git a/tests/rustdoc-ui/check-attr.stderr b/tests/rustdoc-ui/lints/check-attr.stderr
index f66e63ab727..f66e63ab727 100644
--- a/tests/rustdoc-ui/check-attr.stderr
+++ b/tests/rustdoc-ui/lints/check-attr.stderr
diff --git a/tests/rustdoc-ui/check-fail.rs b/tests/rustdoc-ui/lints/check-fail.rs
index 02632b4ce7d..02632b4ce7d 100644
--- a/tests/rustdoc-ui/check-fail.rs
+++ b/tests/rustdoc-ui/lints/check-fail.rs
diff --git a/tests/rustdoc-ui/check-fail.stderr b/tests/rustdoc-ui/lints/check-fail.stderr
index f05e457af64..f05e457af64 100644
--- a/tests/rustdoc-ui/check-fail.stderr
+++ b/tests/rustdoc-ui/lints/check-fail.stderr
diff --git a/tests/rustdoc-ui/check.rs b/tests/rustdoc-ui/lints/check.rs
index e389a81bb33..e389a81bb33 100644
--- a/tests/rustdoc-ui/check.rs
+++ b/tests/rustdoc-ui/lints/check.rs
diff --git a/tests/rustdoc-ui/check.stderr b/tests/rustdoc-ui/lints/check.stderr
index c5ed5d0c3ef..c5ed5d0c3ef 100644
--- a/tests/rustdoc-ui/check.stderr
+++ b/tests/rustdoc-ui/lints/check.stderr
diff --git a/tests/rustdoc-ui/deny-missing-docs-crate.rs b/tests/rustdoc-ui/lints/deny-missing-docs-crate.rs
index b74eba3f66b..b74eba3f66b 100644
--- a/tests/rustdoc-ui/deny-missing-docs-crate.rs
+++ b/tests/rustdoc-ui/lints/deny-missing-docs-crate.rs
diff --git a/tests/rustdoc-ui/deny-missing-docs-crate.stderr b/tests/rustdoc-ui/lints/deny-missing-docs-crate.stderr
index 5025b0b0ca8..5025b0b0ca8 100644
--- a/tests/rustdoc-ui/deny-missing-docs-crate.stderr
+++ b/tests/rustdoc-ui/lints/deny-missing-docs-crate.stderr
diff --git a/tests/rustdoc-ui/deny-missing-docs-macro.rs b/tests/rustdoc-ui/lints/deny-missing-docs-macro.rs
index b1c1253176b..b1c1253176b 100644
--- a/tests/rustdoc-ui/deny-missing-docs-macro.rs
+++ b/tests/rustdoc-ui/lints/deny-missing-docs-macro.rs
diff --git a/tests/rustdoc-ui/deny-missing-docs-macro.stderr b/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr
index 0867b08183e..0867b08183e 100644
--- a/tests/rustdoc-ui/deny-missing-docs-macro.stderr
+++ b/tests/rustdoc-ui/lints/deny-missing-docs-macro.stderr
diff --git a/tests/rustdoc-ui/doc-attr.rs b/tests/rustdoc-ui/lints/doc-attr.rs
index 980d1c0e207..980d1c0e207 100644
--- a/tests/rustdoc-ui/doc-attr.rs
+++ b/tests/rustdoc-ui/lints/doc-attr.rs
diff --git a/tests/rustdoc-ui/doc-attr.stderr b/tests/rustdoc-ui/lints/doc-attr.stderr
index 68df2771fd7..68df2771fd7 100644
--- a/tests/rustdoc-ui/doc-attr.stderr
+++ b/tests/rustdoc-ui/lints/doc-attr.stderr
diff --git a/tests/rustdoc-ui/doc-spotlight.fixed b/tests/rustdoc-ui/lints/doc-spotlight.fixed
index 4b58778eacd..4b58778eacd 100644
--- a/tests/rustdoc-ui/doc-spotlight.fixed
+++ b/tests/rustdoc-ui/lints/doc-spotlight.fixed
diff --git a/tests/rustdoc-ui/doc-spotlight.rs b/tests/rustdoc-ui/lints/doc-spotlight.rs
index 16e38724580..16e38724580 100644
--- a/tests/rustdoc-ui/doc-spotlight.rs
+++ b/tests/rustdoc-ui/lints/doc-spotlight.rs
diff --git a/tests/rustdoc-ui/doc-spotlight.stderr b/tests/rustdoc-ui/lints/doc-spotlight.stderr
index 58612327ff9..58612327ff9 100644
--- a/tests/rustdoc-ui/doc-spotlight.stderr
+++ b/tests/rustdoc-ui/lints/doc-spotlight.stderr
diff --git a/tests/rustdoc-ui/doc-without-codeblock.rs b/tests/rustdoc-ui/lints/doc-without-codeblock.rs
index 86d7c83d335..86d7c83d335 100644
--- a/tests/rustdoc-ui/doc-without-codeblock.rs
+++ b/tests/rustdoc-ui/lints/doc-without-codeblock.rs
diff --git a/tests/rustdoc-ui/doc-without-codeblock.stderr b/tests/rustdoc-ui/lints/doc-without-codeblock.stderr
index ebf2a2d54f7..ebf2a2d54f7 100644
--- a/tests/rustdoc-ui/doc-without-codeblock.stderr
+++ b/tests/rustdoc-ui/lints/doc-without-codeblock.stderr
diff --git a/tests/rustdoc-ui/doc_cfg_hide.rs b/tests/rustdoc-ui/lints/doc_cfg_hide.rs
index 5d8791748a0..5d8791748a0 100644
--- a/tests/rustdoc-ui/doc_cfg_hide.rs
+++ b/tests/rustdoc-ui/lints/doc_cfg_hide.rs
diff --git a/tests/rustdoc-ui/doc_cfg_hide.stderr b/tests/rustdoc-ui/lints/doc_cfg_hide.stderr
index b7e8870fdf5..b7e8870fdf5 100644
--- a/tests/rustdoc-ui/doc_cfg_hide.stderr
+++ b/tests/rustdoc-ui/lints/doc_cfg_hide.stderr
diff --git a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.rs b/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs
index 0901ac3640f..0901ac3640f 100644
--- a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.rs
+++ b/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.rs
diff --git a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.stderr b/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.stderr
index efc5f349f4f..efc5f349f4f 100644
--- a/tests/rustdoc-ui/expect-tool-lint-rfc-2383.stderr
+++ b/tests/rustdoc-ui/lints/expect-tool-lint-rfc-2383.stderr
diff --git a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs
index c34ea0567a9..c34ea0567a9 100644
--- a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.rs
+++ b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.rs
diff --git a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr
index 326dcfe3bde..326dcfe3bde 100644
--- a/tests/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr
+++ b/tests/rustdoc-ui/lints/feature-gate-rustdoc_missing_doc_code_examples.stderr
diff --git a/tests/rustdoc-ui/invalid-doc-attr.rs b/tests/rustdoc-ui/lints/invalid-doc-attr.rs
index c231e43b35c..c231e43b35c 100644
--- a/tests/rustdoc-ui/invalid-doc-attr.rs
+++ b/tests/rustdoc-ui/lints/invalid-doc-attr.rs
diff --git a/tests/rustdoc-ui/invalid-doc-attr.stderr b/tests/rustdoc-ui/lints/invalid-doc-attr.stderr
index b23b8ded867..b23b8ded867 100644
--- a/tests/rustdoc-ui/invalid-doc-attr.stderr
+++ b/tests/rustdoc-ui/lints/invalid-doc-attr.stderr
diff --git a/tests/rustdoc-ui/invalid-html-self-closing-tag.rs b/tests/rustdoc-ui/lints/invalid-html-self-closing-tag.rs
index d973a53cbc7..d973a53cbc7 100644
--- a/tests/rustdoc-ui/invalid-html-self-closing-tag.rs
+++ b/tests/rustdoc-ui/lints/invalid-html-self-closing-tag.rs
diff --git a/tests/rustdoc-ui/invalid-html-self-closing-tag.stderr b/tests/rustdoc-ui/lints/invalid-html-self-closing-tag.stderr
index e45edfb43ff..e45edfb43ff 100644
--- a/tests/rustdoc-ui/invalid-html-self-closing-tag.stderr
+++ b/tests/rustdoc-ui/lints/invalid-html-self-closing-tag.stderr
diff --git a/tests/rustdoc-ui/invalid-html-tags.rs b/tests/rustdoc-ui/lints/invalid-html-tags.rs
index 317f1fd1d46..317f1fd1d46 100644
--- a/tests/rustdoc-ui/invalid-html-tags.rs
+++ b/tests/rustdoc-ui/lints/invalid-html-tags.rs
diff --git a/tests/rustdoc-ui/invalid-html-tags.stderr b/tests/rustdoc-ui/lints/invalid-html-tags.stderr
index 9c2bfcf2c3d..9c2bfcf2c3d 100644
--- a/tests/rustdoc-ui/invalid-html-tags.stderr
+++ b/tests/rustdoc-ui/lints/invalid-html-tags.stderr
diff --git a/tests/rustdoc-ui/lint-group.rs b/tests/rustdoc-ui/lints/lint-group.rs
index ad88157f64f..ad88157f64f 100644
--- a/tests/rustdoc-ui/lint-group.rs
+++ b/tests/rustdoc-ui/lints/lint-group.rs
diff --git a/tests/rustdoc-ui/lint-group.stderr b/tests/rustdoc-ui/lints/lint-group.stderr
index 7ff09fcc45a..7ff09fcc45a 100644
--- a/tests/rustdoc-ui/lint-group.stderr
+++ b/tests/rustdoc-ui/lints/lint-group.stderr
diff --git a/tests/rustdoc-ui/lint-missing-doc-code-example.rs b/tests/rustdoc-ui/lints/lint-missing-doc-code-example.rs
index 40f35728d79..40f35728d79 100644
--- a/tests/rustdoc-ui/lint-missing-doc-code-example.rs
+++ b/tests/rustdoc-ui/lints/lint-missing-doc-code-example.rs
diff --git a/tests/rustdoc-ui/lint-missing-doc-code-example.stderr b/tests/rustdoc-ui/lints/lint-missing-doc-code-example.stderr
index f9331250154..f9331250154 100644
--- a/tests/rustdoc-ui/lint-missing-doc-code-example.stderr
+++ b/tests/rustdoc-ui/lints/lint-missing-doc-code-example.stderr
diff --git a/tests/rustdoc-ui/no-crate-level-doc-lint.rs b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs
index a186410acf4..a186410acf4 100644
--- a/tests/rustdoc-ui/no-crate-level-doc-lint.rs
+++ b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.rs
diff --git a/tests/rustdoc-ui/no-crate-level-doc-lint.stderr b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
index fb3a5e415df..fb3a5e415df 100644
--- a/tests/rustdoc-ui/no-crate-level-doc-lint.stderr
+++ b/tests/rustdoc-ui/lints/no-crate-level-doc-lint.stderr
diff --git a/tests/rustdoc-ui/renamed-lint-still-applies.rs b/tests/rustdoc-ui/lints/renamed-lint-still-applies.rs
index a4d3a4b4971..a4d3a4b4971 100644
--- a/tests/rustdoc-ui/renamed-lint-still-applies.rs
+++ b/tests/rustdoc-ui/lints/renamed-lint-still-applies.rs
diff --git a/tests/rustdoc-ui/renamed-lint-still-applies.stderr b/tests/rustdoc-ui/lints/renamed-lint-still-applies.stderr
index ee9b67cb91b..ee9b67cb91b 100644
--- a/tests/rustdoc-ui/renamed-lint-still-applies.stderr
+++ b/tests/rustdoc-ui/lints/renamed-lint-still-applies.stderr
diff --git a/tests/rustdoc-ui/rustdoc-all-only-stable-lints.rs b/tests/rustdoc-ui/lints/rustdoc-all-only-stable-lints.rs
index e106d06aff5..e106d06aff5 100644
--- a/tests/rustdoc-ui/rustdoc-all-only-stable-lints.rs
+++ b/tests/rustdoc-ui/lints/rustdoc-all-only-stable-lints.rs
diff --git a/tests/rustdoc-ui/unknown-renamed-lints.rs b/tests/rustdoc-ui/lints/unknown-renamed-lints.rs
index ddf03dd079f..ddf03dd079f 100644
--- a/tests/rustdoc-ui/unknown-renamed-lints.rs
+++ b/tests/rustdoc-ui/lints/unknown-renamed-lints.rs
diff --git a/tests/rustdoc-ui/unknown-renamed-lints.stderr b/tests/rustdoc-ui/lints/unknown-renamed-lints.stderr
index bf529b9f8e2..bf529b9f8e2 100644
--- a/tests/rustdoc-ui/unknown-renamed-lints.stderr
+++ b/tests/rustdoc-ui/lints/unknown-renamed-lints.stderr
diff --git a/tests/rustdoc-ui/unused-braces-lint.rs b/tests/rustdoc-ui/lints/unused-braces-lint.rs
index be0e31e4be2..be0e31e4be2 100644
--- a/tests/rustdoc-ui/unused-braces-lint.rs
+++ b/tests/rustdoc-ui/lints/unused-braces-lint.rs
diff --git a/tests/rustdoc-ui/unused.rs b/tests/rustdoc-ui/lints/unused.rs
index 702b24c36c5..702b24c36c5 100644
--- a/tests/rustdoc-ui/unused.rs
+++ b/tests/rustdoc-ui/lints/unused.rs
diff --git a/tests/rustdoc-ui/scrape-examples-fail-if-type-error.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.rs
index 8f4fde96d7e..8f4fde96d7e 100644
--- a/tests/rustdoc-ui/scrape-examples-fail-if-type-error.rs
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.rs
diff --git a/tests/rustdoc-ui/scrape-examples-fail-if-type-error.stderr b/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.stderr
index 750aa320719..750aa320719 100644
--- a/tests/rustdoc-ui/scrape-examples-fail-if-type-error.stderr
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-fail-if-type-error.stderr
diff --git a/tests/rustdoc-ui/scrape-examples-ice.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-ice.rs
index d629b62a724..d629b62a724 100644
--- a/tests/rustdoc-ui/scrape-examples-ice.rs
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-ice.rs
diff --git a/tests/rustdoc-ui/scrape-examples-wrong-options-1.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.rs
index a1f005c32ee..a1f005c32ee 100644
--- a/tests/rustdoc-ui/scrape-examples-wrong-options-1.rs
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.rs
diff --git a/tests/rustdoc-ui/scrape-examples-wrong-options-1.stderr b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.stderr
index eb8e9f79968..eb8e9f79968 100644
--- a/tests/rustdoc-ui/scrape-examples-wrong-options-1.stderr
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-1.stderr
diff --git a/tests/rustdoc-ui/scrape-examples-wrong-options-2.rs b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.rs
index 4aacec7f094..4aacec7f094 100644
--- a/tests/rustdoc-ui/scrape-examples-wrong-options-2.rs
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.rs
diff --git a/tests/rustdoc-ui/scrape-examples-wrong-options-2.stderr b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.stderr
index eb8e9f79968..eb8e9f79968 100644
--- a/tests/rustdoc-ui/scrape-examples-wrong-options-2.stderr
+++ b/tests/rustdoc-ui/scrape-examples/scrape-examples-wrong-options-2.stderr
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/inherent-projections.rs b/tests/rustdoc/inherent-projections.rs
new file mode 100644
index 00000000000..9bda0acaf83
--- /dev/null
+++ b/tests/rustdoc/inherent-projections.rs
@@ -0,0 +1,44 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+// @has 'inherent_projections/fn.create.html'
+// @has - '//pre[@class="rust item-decl"]' "create() -> Owner::Metadata"
+// @has - '//pre[@class="rust item-decl"]//a[@class="associatedtype"]/@href' 'struct.Owner.html#associatedtype.Metadata'
+pub fn create() -> Owner::Metadata {}
+
+pub struct Owner;
+
+impl Owner {
+    pub type Metadata = ();
+}
+
+// Make sure we handle bound vars correctly.
+// @has 'inherent_projections/type.User.html' '//pre[@class="rust item-decl"]' "for<'a> fn(_: Carrier<'a>::Focus)"
+pub type User = for<'a> fn(Carrier<'a>::Focus);
+
+pub struct Carrier<'a>(&'a ());
+
+impl<'a> Carrier<'a> {
+    pub type Focus = &'a mut i32;
+}
+
+////////////////////////////////////////
+
+// FIXME(inherent_associated_types): Below we link to `Proj` but we should link to `Proj-1`.
+// The current test checks for the buggy behavior for demonstration purposes.
+
+// @has 'inherent_projections/type.Test.html'
+// @has - '//pre[@class="rust item-decl"]' "Parametrized<i32>"
+// @has - '//pre[@class="rust item-decl"]//a[@class="associatedtype"]/@href' 'struct.Parametrized.html#associatedtype.Proj'
+// @!has - '//pre[@class="rust item-decl"]//a[@class="associatedtype"]/@href' 'struct.Parametrized.html#associatedtype.Proj-1'
+pub type Test = Parametrized<i32>::Proj;
+
+pub struct Parametrized<T>(T);
+
+impl Parametrized<bool> {
+    pub type Proj = ();
+}
+
+impl Parametrized<i32> {
+    pub type Proj = String;
+}
diff --git a/tests/rustdoc/intra-doc/inherent-associated-types.rs b/tests/rustdoc/intra-doc/inherent-associated-types.rs
new file mode 100644
index 00000000000..2b28d2ae60b
--- /dev/null
+++ b/tests/rustdoc/intra-doc/inherent-associated-types.rs
@@ -0,0 +1,45 @@
+#![feature(inherent_associated_types)]
+
+#![allow(incomplete_features)]
+#![deny(rustdoc::broken_intra_doc_links)]
+
+// @has inherent_associated_types/index.html
+
+// @has - '//a/@href' 'enum.Simple.html#associatedtype.Type'
+//! [`Simple::Type`]
+
+pub enum Simple {}
+
+impl Simple {
+    pub type Type = ();
+}
+
+////////////////////////////////////////
+
+// @has 'inherent_associated_types/type.Test0.html' '//a/@href' \
+//          'struct.Parametrized.html#associatedtype.Proj'
+/// [`Parametrized<bool>::Proj`]
+pub type Test0 = ();
+
+// FIXME(inherent_associated_types): The intra-doc link below should point to `Proj-1` not `Proj`.
+// The current test checks for the buggy behavior for demonstration purposes.
+// The same bug happens for inherent associated functions and constants (see #85960, #93398).
+//
+// Further, at some point we should reject the intra-doc link `Parametrized::Proj`.
+// It currently links to `Parametrized<bool>::Proj`.
+
+// @has 'inherent_associated_types/type.Test1.html'
+// @has - '//a/@href' 'struct.Parametrized.html#associatedtype.Proj'
+// @!has - '//a/@href' 'struct.Parametrized.html#associatedtype.Proj-1'
+/// [`Parametrized<i32>::Proj`]
+pub type Test1 = ();
+
+pub struct Parametrized<T>(T);
+
+impl Parametrized<bool> {
+    pub type Proj = ();
+}
+
+impl Parametrized<i32> {
+    pub type Proj = String;
+}
diff --git a/tests/rustdoc/issue-110629-private-type-cycle.rs b/tests/rustdoc/issue-110629-private-type-cycle.rs
new file mode 100644
index 00000000000..a4efbb098f7
--- /dev/null
+++ b/tests/rustdoc/issue-110629-private-type-cycle.rs
@@ -0,0 +1,19 @@
+// compile-flags: --document-private-items
+
+#![feature(type_alias_impl_trait)]
+
+type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>> + std::fmt::Debug;
+
+// @has issue_110629_private_type_cycle/type.Bar.html
+// @has - '//pre[@class="rust item-decl"]' \
+//     "pub(crate) type Bar<'a, 'b> = impl PartialEq<Bar<'a, 'b>> + Debug;"
+
+fn bar<'a, 'b>(i: &'a i32) -> Bar<'a, 'b> {
+    i
+}
+
+fn main() {
+    let meh = 42;
+    let muh = 42;
+    assert_eq!(bar(&meh), bar(&muh));
+}
diff --git a/tests/ui-fulldeps/deriving-encodable-decodable-box.rs b/tests/ui-fulldeps/deriving-encodable-decodable-box.rs
deleted file mode 100644
index 1c376f59e51..00000000000
--- a/tests/ui-fulldeps/deriving-encodable-decodable-box.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// run-pass
-
-#![allow(unused_imports)]
-#![feature(rustc_private)]
-
-extern crate rustc_macros;
-extern crate rustc_serialize;
-
-// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
-// files.
-#[allow(unused_extern_crates)]
-extern crate rustc_driver;
-
-use rustc_macros::{Decodable, Encodable};
-use rustc_serialize::opaque::{MemDecoder, MemEncoder};
-use rustc_serialize::{Decodable, Encodable, Encoder};
-
-#[derive(Encodable, Decodable)]
-struct A {
-    foo: Box<[bool]>,
-}
-
-fn main() {
-    let obj = A { foo: Box::new([true, false]) };
-
-    let mut encoder = MemEncoder::new();
-    obj.encode(&mut encoder);
-    let data = encoder.finish();
-
-    let mut decoder = MemDecoder::new(&data, 0);
-    let obj2 = A::decode(&mut decoder);
-
-    assert_eq!(obj.foo, obj2.foo);
-}
diff --git a/tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs b/tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs
deleted file mode 100644
index 844d40f2ecd..00000000000
--- a/tests/ui-fulldeps/deriving-encodable-decodable-cell-refcell.rs
+++ /dev/null
@@ -1,44 +0,0 @@
-// run-pass
-
-#![allow(unused_imports)]
-// This briefly tests the capability of `Cell` and `RefCell` to implement the
-// `Encodable` and `Decodable` traits via `#[derive(Encodable, Decodable)]`
-#![feature(rustc_private)]
-
-extern crate rustc_macros;
-extern crate rustc_serialize;
-
-// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
-// files.
-#[allow(unused_extern_crates)]
-extern crate rustc_driver;
-
-use rustc_macros::{Decodable, Encodable};
-use rustc_serialize::opaque::{MemDecoder, MemEncoder};
-use rustc_serialize::{Decodable, Encodable, Encoder};
-use std::cell::{Cell, RefCell};
-
-#[derive(Encodable, Decodable)]
-struct A {
-    baz: isize,
-}
-
-#[derive(Encodable, Decodable)]
-struct B {
-    foo: Cell<bool>,
-    bar: RefCell<A>,
-}
-
-fn main() {
-    let obj = B { foo: Cell::new(true), bar: RefCell::new(A { baz: 2 }) };
-
-    let mut encoder = MemEncoder::new();
-    obj.encode(&mut encoder);
-    let data = encoder.finish();
-
-    let mut decoder = MemDecoder::new(&data, 0);
-    let obj2 = B::decode(&mut decoder);
-
-    assert_eq!(obj.foo.get(), obj2.foo.get());
-    assert_eq!(obj.bar.borrow().baz, obj2.bar.borrow().baz);
-}
diff --git a/tests/ui-fulldeps/issue-14021.rs b/tests/ui-fulldeps/issue-14021.rs
deleted file mode 100644
index 309b5c4a03d..00000000000
--- a/tests/ui-fulldeps/issue-14021.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// run-pass
-
-#![allow(unused_mut)]
-#![allow(unused_imports)]
-#![feature(rustc_private)]
-
-extern crate rustc_macros;
-extern crate rustc_serialize;
-
-// Necessary to pull in object code as the rest of the rustc crates are shipped only as rmeta
-// files.
-#[allow(unused_extern_crates)]
-extern crate rustc_driver;
-
-use rustc_macros::{Decodable, Encodable};
-use rustc_serialize::opaque::{MemDecoder, MemEncoder};
-use rustc_serialize::{Decodable, Encodable, Encoder};
-
-#[derive(Encodable, Decodable, PartialEq, Debug)]
-struct UnitLikeStruct;
-
-pub fn main() {
-    let obj = UnitLikeStruct;
-
-    let mut encoder = MemEncoder::new();
-    obj.encode(&mut encoder);
-    let data = encoder.finish();
-
-    let mut decoder = MemDecoder::new(&data, 0);
-    let obj2 = UnitLikeStruct::decode(&mut decoder);
-
-    assert_eq!(obj, obj2);
-}
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs
new file mode 100644
index 00000000000..642b58b0753
--- /dev/null
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.rs
@@ -0,0 +1,49 @@
+// check-fail
+// Tests that a doc comment will not preclude a field from being considered a diagnostic argument
+// normalize-stderr-test "the following other types implement trait `IntoDiagnosticArg`:(?:.*\n){0,9}\s+and \d+ others" -> "normalized in stderr"
+// normalize-stderr-test "diagnostic_builder\.rs:[0-9]+:[0-9]+" -> "diagnostic_builder.rs:LL:CC"
+
+// The proc_macro2 crate handles spans differently when on beta/stable release rather than nightly,
+// changing the output of this test. Since Subdiagnostic is strictly internal to the compiler
+// the test is just ignored on stable and beta:
+// ignore-stage1
+// ignore-beta
+// ignore-stable
+
+#![feature(rustc_private)]
+#![crate_type = "lib"]
+
+extern crate rustc_errors;
+extern crate rustc_fluent_macro;
+extern crate rustc_macros;
+extern crate rustc_session;
+extern crate rustc_span;
+
+use rustc_errors::{Applicability, DiagnosticMessage, SubdiagnosticMessage};
+use rustc_fluent_macro::fluent_messages;
+use rustc_macros::{Diagnostic, Subdiagnostic};
+use rustc_span::Span;
+
+fluent_messages! { "./example.ftl" }
+
+struct NotIntoDiagnosticArg;
+
+#[derive(Diagnostic)]
+#[diag(no_crate_example)]
+struct Test {
+    #[primary_span]
+    span: Span,
+    /// A doc comment
+    arg: NotIntoDiagnosticArg,
+    //~^ ERROR the trait bound `NotIntoDiagnosticArg: IntoDiagnosticArg` is not satisfied
+}
+
+#[derive(Subdiagnostic)]
+#[label(no_crate_example)]
+struct SubTest {
+    #[primary_span]
+    span: Span,
+    /// A doc comment
+    arg: NotIntoDiagnosticArg,
+    //~^ ERROR the trait bound `NotIntoDiagnosticArg: IntoDiagnosticArg` is not satisfied
+}
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr
new file mode 100644
index 00000000000..e4b8958b4fa
--- /dev/null
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive-doc-comment-field.stderr
@@ -0,0 +1,30 @@
+error[E0277]: the trait bound `NotIntoDiagnosticArg: IntoDiagnosticArg` is not satisfied
+  --> $DIR/diagnostic-derive-doc-comment-field.rs:37:10
+   |
+LL | #[derive(Diagnostic)]
+   |          ---------- required by a bound introduced by this call
+...
+LL |     arg: NotIntoDiagnosticArg,
+   |          ^^^^^^^^^^^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `NotIntoDiagnosticArg`
+   |
+   = help: normalized in stderr
+note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
+  --> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:LL:CC
+   = note: this error originates in the macro `forward` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0277]: the trait bound `NotIntoDiagnosticArg: IntoDiagnosticArg` is not satisfied
+  --> $DIR/diagnostic-derive-doc-comment-field.rs:47:10
+   |
+LL | #[derive(Subdiagnostic)]
+   |          ------------- required by a bound introduced by this call
+...
+LL |     arg: NotIntoDiagnosticArg,
+   |          ^^^^^^^^^^^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `NotIntoDiagnosticArg`
+   |
+   = help: normalized in stderr
+note: required by a bound in `Diagnostic::set_arg`
+  --> $COMPILER_DIR/rustc_errors/src/diagnostic.rs:964:5
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
index 80ab03ab24c..39e34d73f9a 100644
--- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
@@ -339,12 +339,12 @@ struct ErrorWithDefaultLabelAttr<'a> {
 }
 
 #[derive(Diagnostic)]
-//~^ ERROR the trait bound `Hello: IntoDiagnosticArg` is not satisfied
 #[diag(no_crate_example, code = "E0123")]
 struct ArgFieldWithoutSkip {
     #[primary_span]
     span: Span,
     other: Hello,
+    //~^ ERROR the trait bound `Hello: IntoDiagnosticArg` is not satisfied
 }
 
 #[derive(Diagnostic)]
diff --git a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
index 5e1bea4e38c..801e4b5793c 100644
--- a/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
+++ b/tests/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
@@ -641,15 +641,18 @@ LL | #[derive(Diagnostic)]
    = note: this error originates in the derive macro `Diagnostic` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
-  --> $DIR/diagnostic-derive.rs:341:10
+  --> $DIR/diagnostic-derive.rs:346:12
    |
 LL | #[derive(Diagnostic)]
-   |          ^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello`
+   |          ---------- required by a bound introduced by this call
+...
+LL |     other: Hello,
+   |            ^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello`
    |
    = help: normalized in stderr
 note: required by a bound in `DiagnosticBuilder::<'a, G>::set_arg`
   --> $COMPILER_DIR/rustc_errors/src/diagnostic_builder.rs:LL:CC
-   = note: this error originates in the derive macro `Diagnostic` which comes from the expansion of the macro `forward` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: this error originates in the macro `forward` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 84 previous errors
 
diff --git a/tests/ui-fulldeps/stable-mir/crate-info.rs b/tests/ui-fulldeps/stable-mir/crate-info.rs
index 95f27efa771..a3db2e9ef24 100644
--- a/tests/ui-fulldeps/stable-mir/crate-info.rs
+++ b/tests/ui-fulldeps/stable-mir/crate-info.rs
@@ -40,6 +40,7 @@ fn test_stable_mir(tcx: TyCtxt<'_>) {
 
     let bar = get_item(tcx, &items, (DefKind::Fn, "bar")).unwrap();
     let body = bar.body();
+    assert_eq!(body.locals.len(), 2);
     assert_eq!(body.blocks.len(), 1);
     let block = &body.blocks[0];
     assert_eq!(block.statements.len(), 1);
@@ -54,12 +55,31 @@ fn test_stable_mir(tcx: TyCtxt<'_>) {
 
     let foo_bar = get_item(tcx, &items, (DefKind::Fn, "foo_bar")).unwrap();
     let body = foo_bar.body();
+    assert_eq!(body.locals.len(), 7);
     assert_eq!(body.blocks.len(), 4);
     let block = &body.blocks[0];
     match &block.terminator {
         stable_mir::mir::Terminator::Call { .. } => {}
         other => panic!("{other:?}"),
     }
+
+    let drop = get_item(tcx, &items, (DefKind::Fn, "drop")).unwrap();
+    let body = drop.body();
+    assert_eq!(body.blocks.len(), 2);
+    let block = &body.blocks[0];
+    match &block.terminator {
+        stable_mir::mir::Terminator::Drop { .. } => {}
+        other => panic!("{other:?}"),
+    }
+
+    let assert = get_item(tcx, &items, (DefKind::Fn, "assert")).unwrap();
+    let body = assert.body();
+    assert_eq!(body.blocks.len(), 2);
+    let block = &body.blocks[0];
+    match &block.terminator {
+        stable_mir::mir::Terminator::Assert { .. } => {}
+        other => panic!("{other:?}"),
+    }
 }
 
 // Use internal API to find a function in a crate.
@@ -105,7 +125,7 @@ impl Callbacks for SMirCalls {
         queries: &'tcx Queries<'tcx>,
     ) -> Compilation {
         queries.global_ctxt().unwrap().enter(|tcx| {
-            test_stable_mir(tcx);
+            rustc_smir::rustc_internal::run(tcx, || test_stable_mir(tcx));
         });
         // No need to keep going.
         Compilation::Stop
@@ -131,6 +151,12 @@ fn generate_input(path: &str) -> std::io::Result<()> {
         let x_64 = foo::bar(x);
         let y_64 = foo::bar(y);
         x_64.wrapping_add(y_64)
+    }}
+
+    pub fn drop(_: String) {{}}
+
+    pub fn assert(x: i32) -> i32 {{
+        x + 1
     }}"#
     )?;
     Ok(())
diff --git a/tests/ui/abi/stack-probes-lto.rs b/tests/ui/abi/stack-probes-lto.rs
index 039507d5104..0dccb633df9 100644
--- a/tests/ui/abi/stack-probes-lto.rs
+++ b/tests/ui/abi/stack-probes-lto.rs
@@ -5,6 +5,7 @@
 // ignore-mips64
 // ignore-sparc
 // ignore-sparc64
+// ignore-loongarch64
 // ignore-wasm
 // ignore-emscripten no processes
 // ignore-sgx no processes
diff --git a/tests/ui/abi/stack-probes.rs b/tests/ui/abi/stack-probes.rs
index 8dba54c3f81..8137c92304d 100644
--- a/tests/ui/abi/stack-probes.rs
+++ b/tests/ui/abi/stack-probes.rs
@@ -5,6 +5,7 @@
 // ignore-mips64
 // ignore-sparc
 // ignore-sparc64
+// ignore-loongarch64
 // ignore-wasm
 // ignore-emscripten no processes
 // ignore-sgx no processes
diff --git a/tests/ui/argument-suggestions/issue-97484.stderr b/tests/ui/argument-suggestions/issue-97484.stderr
index a86cbbf1802..082564fbc7f 100644
--- a/tests/ui/argument-suggestions/issue-97484.stderr
+++ b/tests/ui/argument-suggestions/issue-97484.stderr
@@ -16,7 +16,7 @@ LL | fn foo(a: &A, d: D, e: &E, g: G) {}
 help: consider borrowing here
    |
 LL |     foo(&&A, B, C, D, &E, F, G);
-   |                       ~~
+   |                       +
 help: remove the extra arguments
    |
 LL -     foo(&&A, B, C, D, E, F, G);
diff --git a/tests/ui/array-slice-vec/slice-mut-2.stderr b/tests/ui/array-slice-vec/slice-mut-2.stderr
index 5b040d3e4d3..c33919c41cd 100644
--- a/tests/ui/array-slice-vec/slice-mut-2.stderr
+++ b/tests/ui/array-slice-vec/slice-mut-2.stderr
@@ -7,7 +7,7 @@ LL |     let _ = &mut x[2..4];
 help: consider changing this to be a mutable reference
    |
 LL |     let x: &[isize] = &mut [1, 2, 3, 4, 5];
-   |                       ~~~~~~~~~~~~~~~~~~~~
+   |                        +++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs
new file mode 100644
index 00000000000..f41574403d8
--- /dev/null
+++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.rs
@@ -0,0 +1,10 @@
+// known-bug: #108491
+
+// FIXME(inherent_associated_types): This should pass.
+
+struct Foo {
+    bar: Self::Bar,
+}
+impl Foo {
+    pub type Bar = usize;
+}
diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr
new file mode 100644
index 00000000000..f313c494671
--- /dev/null
+++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-adt.stderr
@@ -0,0 +1,49 @@
+error[E0601]: `main` function not found in crate `cycle_iat_inside_of_adt`
+  --> $DIR/cycle-iat-inside-of-adt.rs:10:2
+   |
+LL | }
+   |  ^ consider adding a `main` function to `$DIR/cycle-iat-inside-of-adt.rs`
+
+error[E0391]: cycle detected when computing predicates of `Foo`
+  --> $DIR/cycle-iat-inside-of-adt.rs:5:1
+   |
+LL | struct Foo {
+   | ^^^^^^^^^^
+   |
+note: ...which requires computing predicates of `Foo`...
+  --> $DIR/cycle-iat-inside-of-adt.rs:5:1
+   |
+LL | struct Foo {
+   | ^^^^^^^^^^
+note: ...which requires computing inferred outlives predicates of `Foo`...
+  --> $DIR/cycle-iat-inside-of-adt.rs:5:1
+   |
+LL | struct Foo {
+   | ^^^^^^^^^^
+   = note: ...which requires computing the inferred outlives predicates for items in this crate...
+note: ...which requires computing type of `Foo::bar`...
+  --> $DIR/cycle-iat-inside-of-adt.rs:6:5
+   |
+LL |     bar: Self::Bar,
+   |     ^^^^^^^^^^^^^^
+note: ...which requires computing normalized predicates of `Foo`...
+  --> $DIR/cycle-iat-inside-of-adt.rs:5:1
+   |
+LL | struct Foo {
+   | ^^^^^^^^^^
+   = note: ...which again requires computing predicates of `Foo`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/cycle-iat-inside-of-adt.rs:5:1
+   |
+LL | / struct Foo {
+LL | |     bar: Self::Bar,
+LL | | }
+LL | | impl Foo {
+LL | |     pub type Bar = usize;
+LL | | }
+   | |_^
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0391, E0601.
+For more information about an error, try `rustc --explain E0391`.
diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs
new file mode 100644
index 00000000000..0c2a38b1173
--- /dev/null
+++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.rs
@@ -0,0 +1,16 @@
+// known-bug: unknown
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+// FIXME(inherent_associated_types): This shouldn't lead to a cycle error.
+
+fn user<T>() where S<T>::P: std::fmt::Debug {}
+
+struct S<T>;
+
+impl<T: Copy> S<T> {
+    type P = ();
+}
+
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr
new file mode 100644
index 00000000000..aaa9a39ea0f
--- /dev/null
+++ b/tests/ui/associated-inherent-types/bugs/cycle-iat-inside-of-where-predicate.stderr
@@ -0,0 +1,37 @@
+error[E0391]: cycle detected when computing predicates of `user`
+  --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1
+   |
+LL | fn user<T>() where S<T>::P: std::fmt::Debug {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: ...which requires computing predicates of `user`...
+  --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1
+   |
+LL | fn user<T>() where S<T>::P: std::fmt::Debug {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires computing explicit predicates of `user`...
+  --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1
+   |
+LL | fn user<T>() where S<T>::P: std::fmt::Debug {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires computing normalized predicates of `user`...
+  --> $DIR/cycle-iat-inside-of-where-predicate.rs:8:1
+   |
+LL | fn user<T>() where S<T>::P: std::fmt::Debug {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: ...which again requires computing predicates of `user`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/cycle-iat-inside-of-where-predicate.rs:3:1
+   |
+LL | / #![feature(inherent_associated_types)]
+LL | | #![allow(incomplete_features)]
+LL | |
+LL | | // FIXME(inherent_associated_types): This shouldn't lead to a cycle error.
+...  |
+LL | |
+LL | | fn main() {}
+   | |____________^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/associated-inherent-types/bugs/ice-substitution.rs b/tests/ui/associated-inherent-types/bugs/ice-substitution.rs
deleted file mode 100644
index 53ac79e0561..00000000000
--- a/tests/ui/associated-inherent-types/bugs/ice-substitution.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// known-bug: unknown
-// failure-status: 101
-// normalize-stderr-test "note: .*\n\n" -> ""
-// normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
-// rustc-env:RUST_BACKTRACE=0
-
-// FIXME: I presume a type variable that couldn't be solved by `resolve_vars_if_possible`
-//        escapes the InferCtxt snapshot.
-
-#![feature(inherent_associated_types)]
-#![allow(incomplete_features)]
-
-struct Cont<T>(T);
-
-impl<T: Copy> Cont<T> {
-    type Out = Vec<T>;
-}
-
-pub fn weird<T: Copy>(x: T) {
-    let _: Cont<_>::Out = vec![true];
-}
-
-fn main() {}
diff --git a/tests/ui/associated-inherent-types/bugs/ice-substitution.stderr b/tests/ui/associated-inherent-types/bugs/ice-substitution.stderr
deleted file mode 100644
index 1648cfb266b..00000000000
--- a/tests/ui/associated-inherent-types/bugs/ice-substitution.stderr
+++ /dev/null
@@ -1,6 +0,0 @@
-error: the compiler unexpectedly panicked. this is a bug.
-
-query stack during panic:
-#0 [typeck] type-checking `weird`
-#1 [used_trait_imports] finding used_trait_imports `weird`
-end of query stack
diff --git a/tests/ui/associated-inherent-types/bugs/inference-fail.rs b/tests/ui/associated-inherent-types/bugs/inference-fail.rs
deleted file mode 100644
index a920b412b1a..00000000000
--- a/tests/ui/associated-inherent-types/bugs/inference-fail.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// known-bug: unknown
-
-#![feature(inherent_associated_types)]
-#![allow(incomplete_features)]
-
-struct S<T>(T);
-
-impl S<()> {
-    type P = i128;
-}
-
-fn main() {
-    // We fail to infer `_ == ()` here.
-    let _: S<_>::P;
-}
diff --git a/tests/ui/associated-inherent-types/bugs/lack-of-regionck.rs b/tests/ui/associated-inherent-types/bugs/lack-of-regionck.rs
deleted file mode 100644
index 632dbf3854b..00000000000
--- a/tests/ui/associated-inherent-types/bugs/lack-of-regionck.rs
+++ /dev/null
@@ -1,19 +0,0 @@
-// known-bug: unknown
-// check-pass
-
-// We currently don't region-check inherent associated type projections at all.
-
-#![feature(inherent_associated_types)]
-#![allow(incomplete_features, dead_code)]
-
-struct S<T>(T);
-
-impl S<&'static ()> {
-    type T = ();
-}
-
-fn usr<'a>() {
-    let _: S::<&'a ()>::T; // this should *fail* but it doesn't!
-}
-
-fn main() {}
diff --git a/tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs b/tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs
new file mode 100644
index 00000000000..c7f66e645bb
--- /dev/null
+++ b/tests/ui/associated-inherent-types/bugs/wf-check-skipped.rs
@@ -0,0 +1,15 @@
+// known-bug: #100041
+// check-pass
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+// FIXME(inherent_associated_types): This should fail.
+
+struct Foo;
+
+impl Foo {
+    type Bar<T> = ();
+}
+
+fn main() -> Foo::Bar::<Vec<[u32]>> {}
diff --git a/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs b/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs
index f846bfa4168..83be4f43b5e 100644
--- a/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs
+++ b/tests/ui/associated-inherent-types/dispatch-on-self-type-0.rs
@@ -31,7 +31,7 @@ fn main() {
     let _: Select<u8>::Projection = ();
 
     let _: Choose<NonCopy>::Result = ();
-    let _: Choose<bool>::Result = vec![true];
+    let _: Choose<&str>::Result = vec!["…"]; // regression test for issue #108957
 }
 
 // Test if we use the correct `ParamEnv` when proving obligations.
diff --git a/tests/ui/associated-inherent-types/former-subst-ice.rs b/tests/ui/associated-inherent-types/former-subst-ice.rs
new file mode 100644
index 00000000000..48390b9430b
--- /dev/null
+++ b/tests/ui/associated-inherent-types/former-subst-ice.rs
@@ -0,0 +1,16 @@
+// check-pass
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct Cont<T>(T);
+
+impl<T: Copy> Cont<T> {
+    type Out = Vec<T>;
+}
+
+pub fn weird<T: Copy>(x: T) {
+    let _: Cont<_>::Out = vec![true];
+}
+
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.item.stderr b/tests/ui/associated-inherent-types/generic-associated-types-bad.item.stderr
new file mode 100644
index 00000000000..464b59c249f
--- /dev/null
+++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.item.stderr
@@ -0,0 +1,15 @@
+error[E0277]: the trait bound `String: Copy` is not satisfied
+  --> $DIR/generic-associated-types-bad.rs:16:10
+   |
+LL | const _: Ty::Pr<String> = String::new();
+   |          ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
+   |
+note: required by a bound in `Ty::Pr`
+  --> $DIR/generic-associated-types-bad.rs:10:16
+   |
+LL |     type Pr<T: Copy> = T;
+   |                ^^^^ required by this bound in `Ty::Pr`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr b/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr
new file mode 100644
index 00000000000..4f371b24e80
--- /dev/null
+++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr
@@ -0,0 +1,15 @@
+error[E0277]: the trait bound `Vec<()>: Copy` is not satisfied
+  --> $DIR/generic-associated-types-bad.rs:20:12
+   |
+LL |     let _: Ty::Pr<Vec<()>>;
+   |            ^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Vec<()>`
+   |
+note: required by a bound in `Ty::Pr`
+  --> $DIR/generic-associated-types-bad.rs:10:16
+   |
+LL |     type Pr<T: Copy> = T;
+   |                ^^^^ required by this bound in `Ty::Pr`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr b/tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr
new file mode 100644
index 00000000000..74ec39424ed
--- /dev/null
+++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr
@@ -0,0 +1,11 @@
+error: lifetime may not live long enough
+  --> $DIR/generic-associated-types-bad.rs:25:12
+   |
+LL | fn user<'a>() {
+   |         -- lifetime `'a` defined here
+LL |     #[cfg(region)]
+LL |     let _: Ty::Static<&'a str> = "";
+   |            ^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+
diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.rs b/tests/ui/associated-inherent-types/generic-associated-types-bad.rs
new file mode 100644
index 00000000000..e66392a0a94
--- /dev/null
+++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.rs
@@ -0,0 +1,26 @@
+// revisions: item local region
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+#[derive(Clone, Copy)]
+pub enum Ty {}
+
+impl Ty {
+    type Pr<T: Copy> = T;
+
+    type Static<Q: 'static> = Q;
+}
+
+#[cfg(item)]
+const _: Ty::Pr<String> = String::new(); //[item]~ the trait bound `String: Copy` is not satisfied
+
+fn main() {
+    #[cfg(local)]
+    let _: Ty::Pr<Vec<()>>; //[local]~ ERROR the trait bound `Vec<()>: Copy` is not satisfied
+}
+
+fn user<'a>() {
+    #[cfg(region)]
+    let _: Ty::Static<&'a str> = ""; //[region]~ ERROR lifetime may not live long enough
+}
diff --git a/tests/ui/associated-inherent-types/inference-fail.rs b/tests/ui/associated-inherent-types/inference-fail.rs
new file mode 100644
index 00000000000..939a4ff60f2
--- /dev/null
+++ b/tests/ui/associated-inherent-types/inference-fail.rs
@@ -0,0 +1,11 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct S<T>(T);
+
+impl<T> S<T> { type P = (); }
+
+fn main() {
+    // There is no way to infer this type.
+    let _: S<_>::P = (); //~ ERROR type annotations needed
+}
diff --git a/tests/ui/associated-inherent-types/bugs/inference-fail.stderr b/tests/ui/associated-inherent-types/inference-fail.stderr
index 425691bd6c4..f29144e4aa7 100644
--- a/tests/ui/associated-inherent-types/bugs/inference-fail.stderr
+++ b/tests/ui/associated-inherent-types/inference-fail.stderr
@@ -1,8 +1,8 @@
 error[E0282]: type annotations needed
-  --> $DIR/inference-fail.rs:14:14
+  --> $DIR/inference-fail.rs:10:12
    |
-LL |     let _: S<_>::P;
-   |              ^ cannot infer type
+LL |     let _: S<_>::P = ();
+   |            ^^^^^^^ cannot infer type for type parameter `T`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/associated-inherent-types/inference.rs b/tests/ui/associated-inherent-types/inference.rs
new file mode 100644
index 00000000000..38179214fa1
--- /dev/null
+++ b/tests/ui/associated-inherent-types/inference.rs
@@ -0,0 +1,39 @@
+// Testing inference capabilities.
+// check-pass
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+use std::convert::identity;
+
+struct Container<T>(T);
+
+impl Container<u32> {
+    type Sink = ();
+}
+
+impl<Any> Container<Any> {
+    type Thing = Any;
+}
+
+impl<T> Container<(T, ())> {
+    type Output = ((), Wrapped<T>);
+}
+
+fn main() {
+    // Inferred via the Self type of the impl.
+    let _: Container<_>::Sink;
+
+    // Inferred via the RHS:
+
+    let _: Container<_>::Thing = 0;
+
+    let _: Container<Wrapped<_>>::Thing = Wrapped(false);
+
+    let _: Container<_>::Output = (drop(1), Wrapped("..."));
+
+    let binding: Container<_>::Thing = Default::default(); // unsolved at this point
+    identity::<String>(binding); // constrained and solved here
+}
+
+struct Wrapped<T>(T);
diff --git a/tests/ui/associated-inherent-types/issue-109768.rs b/tests/ui/associated-inherent-types/issue-109768.rs
new file mode 100644
index 00000000000..a3ae2e2ab44
--- /dev/null
+++ b/tests/ui/associated-inherent-types/issue-109768.rs
@@ -0,0 +1,12 @@
+// incremental
+
+struct Wrapper<T>(T);
+
+struct Local<T, U>(T, U);
+
+impl<T> Local { //~ ERROR missing generics for struct `Local`
+    type AssocType3 = T; //~ ERROR inherent associated types are unstable
+
+    const WRAPPED_ASSOC_3: Wrapper<Self::AssocType3> = Wrapper();
+}
+//~^ ERROR `main` function not found
diff --git a/tests/ui/associated-inherent-types/issue-109768.stderr b/tests/ui/associated-inherent-types/issue-109768.stderr
new file mode 100644
index 00000000000..97706d4062a
--- /dev/null
+++ b/tests/ui/associated-inherent-types/issue-109768.stderr
@@ -0,0 +1,35 @@
+error[E0601]: `main` function not found in crate `issue_109768`
+  --> $DIR/issue-109768.rs:11:2
+   |
+LL | }
+   |  ^ consider adding a `main` function to `$DIR/issue-109768.rs`
+
+error[E0107]: missing generics for struct `Local`
+  --> $DIR/issue-109768.rs:7:9
+   |
+LL | impl<T> Local {
+   |         ^^^^^ expected 2 generic arguments
+   |
+note: struct defined here, with 2 generic parameters: `T`, `U`
+  --> $DIR/issue-109768.rs:5:8
+   |
+LL | struct Local<T, U>(T, U);
+   |        ^^^^^ -  -
+help: add missing generic arguments
+   |
+LL | impl<T> Local<T, U> {
+   |              ++++++
+
+error[E0658]: inherent associated types are unstable
+  --> $DIR/issue-109768.rs:8:5
+   |
+LL |     type AssocType3 = T;
+   |     ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #8995 <https://github.com/rust-lang/rust/issues/8995> for more information
+   = help: add `#![feature(inherent_associated_types)]` to the crate attributes to enable
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0107, E0601, E0658.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/associated-inherent-types/issue-109789.rs b/tests/ui/associated-inherent-types/issue-109789.rs
new file mode 100644
index 00000000000..0b5ba7d1fb5
--- /dev/null
+++ b/tests/ui/associated-inherent-types/issue-109789.rs
@@ -0,0 +1,22 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct Foo<T>(T);
+
+impl Foo<fn(&'static ())> {
+    type Assoc = u32;
+}
+
+trait Other {}
+impl Other for u32 {}
+
+// FIXME(inherent_associated_types): Avoid emitting two diagnostics (they only differ in span).
+// FIXME(inherent_associated_types): Enhancement: Spruce up the diagnostic by saying something like
+// "implementation is not general enough" as is done for traits via
+// `try_report_trait_placeholder_mismatch`.
+
+fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {}
+//~^ ERROR mismatched types
+//~| ERROR mismatched types
+
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/issue-109789.stderr b/tests/ui/associated-inherent-types/issue-109789.stderr
new file mode 100644
index 00000000000..7af338274a1
--- /dev/null
+++ b/tests/ui/associated-inherent-types/issue-109789.stderr
@@ -0,0 +1,21 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-109789.rs:18:1
+   |
+LL | fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
+   |
+   = note: expected struct `Foo<fn(&'static ())>`
+              found struct `Foo<for<'a> fn(&'a ())>`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-109789.rs:18:11
+   |
+LL | fn bar(_: Foo<for<'a> fn(&'a ())>::Assoc) {}
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ one type is more general than the other
+   |
+   = note: expected struct `Foo<fn(&'static ())>`
+              found struct `Foo<for<'a> fn(&'a ())>`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-inherent-types/issue-109790.rs b/tests/ui/associated-inherent-types/issue-109790.rs
new file mode 100644
index 00000000000..b2be19a28f4
--- /dev/null
+++ b/tests/ui/associated-inherent-types/issue-109790.rs
@@ -0,0 +1,17 @@
+// check-pass
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct Foo<T>(T);
+
+impl<'a> Foo<fn(&'a ())> {
+    type Assoc = &'a ();
+}
+
+trait Other {}
+impl Other for u32 {}
+
+fn bar(_: for<'a> fn(Foo<fn(&'a ())>::Assoc)) {}
+
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/late-bound-regions.rs b/tests/ui/associated-inherent-types/late-bound-regions.rs
new file mode 100644
index 00000000000..488a2cda649
--- /dev/null
+++ b/tests/ui/associated-inherent-types/late-bound-regions.rs
@@ -0,0 +1,25 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+// Test if we correctly normalize `S<'a>::P` with respect to late-bound regions.
+
+type Function = for<'a> fn(&'a i32) -> S<'a>::P;
+
+struct S<'a>(&'a ());
+
+trait Inter {
+    type P;
+}
+
+impl<'a> S<'a> {
+    type P = &'a i32;
+}
+
+fn ret_ref_local<'e>() -> &'e i32 {
+    let f: Function = |x| x;
+
+    let local = 0;
+    f(&local) //~ ERROR cannot return value referencing local variable `local`
+}
+
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/late-bound-regions.stderr b/tests/ui/associated-inherent-types/late-bound-regions.stderr
new file mode 100644
index 00000000000..4706fcca91d
--- /dev/null
+++ b/tests/ui/associated-inherent-types/late-bound-regions.stderr
@@ -0,0 +1,12 @@
+error[E0515]: cannot return value referencing local variable `local`
+  --> $DIR/late-bound-regions.rs:22:5
+   |
+LL |     f(&local)
+   |     ^^------^
+   |     | |
+   |     | `local` is borrowed here
+   |     returns a value referencing data owned by the current function
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0515`.
diff --git a/tests/ui/associated-inherent-types/normalization-overflow.rs b/tests/ui/associated-inherent-types/normalization-overflow.rs
new file mode 100644
index 00000000000..4228238aa7b
--- /dev/null
+++ b/tests/ui/associated-inherent-types/normalization-overflow.rs
@@ -0,0 +1,12 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+// FIXME(fmease): I'd prefer to report a cycle error here instead of an overflow one.
+
+struct T;
+
+impl T {
+    type This = Self::This; //~ ERROR overflow evaluating associated type `T::This`
+}
+
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/normalization-overflow.stderr b/tests/ui/associated-inherent-types/normalization-overflow.stderr
new file mode 100644
index 00000000000..16bb64281e3
--- /dev/null
+++ b/tests/ui/associated-inherent-types/normalization-overflow.stderr
@@ -0,0 +1,8 @@
+error: overflow evaluating associated type `T::This`
+  --> $DIR/normalization-overflow.rs:9:17
+   |
+LL |     type This = Self::This;
+   |                 ^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/tests/ui/associated-inherent-types/private-in-public.rs b/tests/ui/associated-inherent-types/private-in-public.rs
new file mode 100644
index 00000000000..a4b372537c7
--- /dev/null
+++ b/tests/ui/associated-inherent-types/private-in-public.rs
@@ -0,0 +1,26 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+#![crate_type = "lib"]
+
+#![deny(private_in_public)]
+
+pub type PubAlias0 = PubTy::PrivAssocTy;
+//~^ ERROR private associated type `PubTy::PrivAssocTy` in public interface (error E0446)
+//~| WARNING this was previously accepted
+pub type PubAlias1 = PrivTy::PubAssocTy;
+//~^ ERROR private type `PrivTy` in public interface (error E0446)
+//~| WARNING this was previously accepted
+pub type PubAlias2 = PubTy::PubAssocTy<PrivTy>;
+//~^ ERROR private type `PrivTy` in public interface (error E0446)
+//~| WARNING this was previously accepted
+
+pub struct PubTy;
+impl PubTy {
+    type PrivAssocTy = ();
+    pub type PubAssocTy<T> = T;
+}
+
+struct PrivTy;
+impl PrivTy {
+    pub type PubAssocTy = ();
+}
diff --git a/tests/ui/associated-inherent-types/private-in-public.stderr b/tests/ui/associated-inherent-types/private-in-public.stderr
new file mode 100644
index 00000000000..f0a64e96179
--- /dev/null
+++ b/tests/ui/associated-inherent-types/private-in-public.stderr
@@ -0,0 +1,34 @@
+error: private associated type `PubTy::PrivAssocTy` in public interface (error E0446)
+  --> $DIR/private-in-public.rs:7:1
+   |
+LL | pub type PubAlias0 = PubTy::PrivAssocTy;
+   | ^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
+note: the lint level is defined here
+  --> $DIR/private-in-public.rs:5:9
+   |
+LL | #![deny(private_in_public)]
+   |         ^^^^^^^^^^^^^^^^^
+
+error: private type `PrivTy` in public interface (error E0446)
+  --> $DIR/private-in-public.rs:10:1
+   |
+LL | pub type PubAlias1 = PrivTy::PubAssocTy;
+   | ^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
+
+error: private type `PrivTy` in public interface (error E0446)
+  --> $DIR/private-in-public.rs:13:1
+   |
+LL | pub type PubAlias2 = PubTy::PubAssocTy<PrivTy>;
+   | ^^^^^^^^^^^^^^^^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #34537 <https://github.com/rust-lang/rust/issues/34537>
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/associated-inherent-types/regionck-0.rs b/tests/ui/associated-inherent-types/regionck-0.rs
new file mode 100644
index 00000000000..7c94539ace1
--- /dev/null
+++ b/tests/ui/associated-inherent-types/regionck-0.rs
@@ -0,0 +1,14 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct S<T>(T);
+
+impl S<&'static ()> {
+    type T = ();
+}
+
+fn user<'a>() {
+    let _: S::<&'a ()>::T; //~ ERROR lifetime may not live long enough
+}
+
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/regionck-0.stderr b/tests/ui/associated-inherent-types/regionck-0.stderr
new file mode 100644
index 00000000000..3a438ee630e
--- /dev/null
+++ b/tests/ui/associated-inherent-types/regionck-0.stderr
@@ -0,0 +1,10 @@
+error: lifetime may not live long enough
+  --> $DIR/regionck-0.rs:11:12
+   |
+LL | fn user<'a>() {
+   |         -- lifetime `'a` defined here
+LL |     let _: S::<&'a ()>::T;
+   |            ^^^^^^^^^^^^^^ requires that `'a` must outlive `'static`
+
+error: aborting due to previous error
+
diff --git a/tests/ui/associated-inherent-types/regionck-1.rs b/tests/ui/associated-inherent-types/regionck-1.rs
new file mode 100644
index 00000000000..ec663cd0f77
--- /dev/null
+++ b/tests/ui/associated-inherent-types/regionck-1.rs
@@ -0,0 +1,13 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct U;
+
+impl U {
+    // Don't imply any bounds here.
+
+    type NoTyOutliv<'a, T> = &'a T; //~ ERROR the parameter type `T` may not live long enough
+    type NoReOutliv<'a, 'b> = &'a &'b (); //~ ERROR reference has a longer lifetime than the data it references
+}
+
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/regionck-1.stderr b/tests/ui/associated-inherent-types/regionck-1.stderr
new file mode 100644
index 00000000000..b17d89ca306
--- /dev/null
+++ b/tests/ui/associated-inherent-types/regionck-1.stderr
@@ -0,0 +1,29 @@
+error[E0309]: the parameter type `T` may not live long enough
+  --> $DIR/regionck-1.rs:9:30
+   |
+LL |     type NoTyOutliv<'a, T> = &'a T;
+   |                              ^^^^^- help: consider adding a where clause: `where T: 'a`
+   |                              |
+   |                              ...so that the reference type `&'a T` does not outlive the data it points at
+
+error[E0491]: in type `&'a &'b ()`, reference has a longer lifetime than the data it references
+  --> $DIR/regionck-1.rs:10:31
+   |
+LL |     type NoReOutliv<'a, 'b> = &'a &'b ();
+   |                               ^^^^^^^^^^
+   |
+note: the pointer is valid for the lifetime `'a` as defined here
+  --> $DIR/regionck-1.rs:10:21
+   |
+LL |     type NoReOutliv<'a, 'b> = &'a &'b ();
+   |                     ^^
+note: but the referenced data is only valid for the lifetime `'b` as defined here
+  --> $DIR/regionck-1.rs:10:25
+   |
+LL |     type NoReOutliv<'a, 'b> = &'a &'b ();
+   |                         ^^
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0309, E0491.
+For more information about an error, try `rustc --explain E0309`.
diff --git a/tests/ui/associated-inherent-types/regionck-2.rs b/tests/ui/associated-inherent-types/regionck-2.rs
new file mode 100644
index 00000000000..7a0b8b08300
--- /dev/null
+++ b/tests/ui/associated-inherent-types/regionck-2.rs
@@ -0,0 +1,14 @@
+// Regression test for issue #109299.
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct Lexer<'d>(&'d ());
+
+impl Lexer<'static> {
+    type Cursor = ();
+}
+
+fn test(_: Lexer::Cursor) {} //~ ERROR mismatched types
+
+fn main() {}
diff --git a/tests/ui/associated-inherent-types/regionck-2.stderr b/tests/ui/associated-inherent-types/regionck-2.stderr
new file mode 100644
index 00000000000..b0a4ed35d56
--- /dev/null
+++ b/tests/ui/associated-inherent-types/regionck-2.stderr
@@ -0,0 +1,18 @@
+error[E0308]: mismatched types
+  --> $DIR/regionck-2.rs:12:12
+   |
+LL | fn test(_: Lexer::Cursor) {}
+   |            ^^^^^^^^^^^^^ lifetime mismatch
+   |
+   = note: expected struct `Lexer<'static>`
+              found struct `Lexer<'_>`
+note: the anonymous lifetime defined here...
+  --> $DIR/regionck-2.rs:12:12
+   |
+LL | fn test(_: Lexer::Cursor) {}
+   |            ^^^^^
+   = note: ...does not necessarily outlive the static lifetime
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs b/tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs
new file mode 100644
index 00000000000..b32b4288ac9
--- /dev/null
+++ b/tests/ui/associated-inherent-types/type-alias-bounds-are-enforced.rs
@@ -0,0 +1,26 @@
+// check-pass
+// compile-flags: --crate-type=lib
+
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+// Bounds on the self type play a major role in the resolution of inherent associated types (*).
+// As a result of that, if a type alias contains any then its bounds have to be respected and the
+// lint `type_alias_bounds` should not fire.
+//
+// FIXME(inherent_associated_types): In the current implementation that is. We might move the
+// selection phase of IATs from hir_typeck to trait_selection resulting in us not requiring the
+// ParamEnv that early allowing us to ignore bounds on type aliases again.
+// Triage this before stabilization.
+
+#![deny(type_alias_bounds)]
+
+pub type Alias<T: Bound> = (Source<T>::Assoc,);
+
+
+pub struct Source<T>(T);
+pub trait Bound {}
+
+impl<T: Bound> Source<T> {
+    pub type Assoc = ();
+}
diff --git a/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.rs b/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.rs
new file mode 100644
index 00000000000..d081c4d5b78
--- /dev/null
+++ b/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.rs
@@ -0,0 +1,12 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct S<T>(T);
+
+impl<T: Copy> S<T> {
+    type T = T;
+}
+
+fn main() {
+    let _: S<_>::T = String::new(); //~ ERROR the trait bound `String: Copy` is not satisfied
+}
diff --git a/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr b/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr
new file mode 100644
index 00000000000..ecf30f4cdec
--- /dev/null
+++ b/tests/ui/associated-inherent-types/unsatisfied-bounds-inferred-type.stderr
@@ -0,0 +1,17 @@
+error[E0277]: the trait bound `String: Copy` is not satisfied
+  --> $DIR/unsatisfied-bounds-inferred-type.rs:11:12
+   |
+LL |     let _: S<_>::T = String::new();
+   |            ^^^^^^^ the trait `Copy` is not implemented for `String`
+   |
+note: required by a bound in `S<T>::T`
+  --> $DIR/unsatisfied-bounds-inferred-type.rs:6:9
+   |
+LL | impl<T: Copy> S<T> {
+   |         ^^^^ required by this bound in `S<T>::T`
+LL |     type T = T;
+   |          - required by a bound in this associated type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.rs b/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.rs
new file mode 100644
index 00000000000..97bd2c42160
--- /dev/null
+++ b/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.rs
@@ -0,0 +1,14 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct S<T>(T);
+
+impl<T> S<T> {
+    type X = ()
+    where
+        T: Copy;
+}
+
+fn main() {
+    let _: S::<String>::X; //~ ERROR the trait bound `String: Copy` is not satisfied
+}
diff --git a/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr b/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr
new file mode 100644
index 00000000000..d4968cd05dc
--- /dev/null
+++ b/tests/ui/associated-inherent-types/unsatisfied-bounds-where-clause-on-assoc-ty.stderr
@@ -0,0 +1,18 @@
+error[E0277]: the trait bound `String: Copy` is not satisfied
+  --> $DIR/unsatisfied-bounds-where-clause-on-assoc-ty.rs:13:12
+   |
+LL |     let _: S::<String>::X;
+   |            ^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `String`
+   |
+note: required by a bound in `S<T>::X`
+  --> $DIR/unsatisfied-bounds-where-clause-on-assoc-ty.rs:9:12
+   |
+LL |     type X = ()
+   |          - required by a bound in this associated type
+LL |     where
+LL |         T: Copy;
+   |            ^^^^ required by this bound in `S<T>::X`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-type-bounds/duplicate.rs b/tests/ui/associated-type-bounds/duplicate.rs
index f67410986e5..4b8bf52c374 100644
--- a/tests/ui/associated-type-bounds/duplicate.rs
+++ b/tests/ui/associated-type-bounds/duplicate.rs
@@ -193,10 +193,13 @@ trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
 //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
 trait TRS1: Iterator<Item: Copy, Item: Send> {}
 //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
 trait TRS2: Iterator<Item: Copy, Item: Copy> {}
 //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
 trait TRS3: Iterator<Item: 'static, Item: 'static> {}
 //~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~| ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
 trait TRW1<T>
 where
     T: Iterator<Item: Copy, Item: Send>,
diff --git a/tests/ui/associated-type-bounds/duplicate.stderr b/tests/ui/associated-type-bounds/duplicate.stderr
index c3061327f56..08721eff7b0 100644
--- a/tests/ui/associated-type-bounds/duplicate.stderr
+++ b/tests/ui/associated-type-bounds/duplicate.stderr
@@ -367,7 +367,23 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
    |                      `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:196:34
+  --> $DIR/duplicate.rs:194:34
+   |
+LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
+   |                      ----------  ^^^^^^^^^^ re-bound here
+   |                      |
+   |                      `Item` bound here first
+
+error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+  --> $DIR/duplicate.rs:197:34
+   |
+LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
+   |                      ----------  ^^^^^^^^^^ re-bound here
+   |                      |
+   |                      `Item` bound here first
+
+error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+  --> $DIR/duplicate.rs:197:34
    |
 LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
    |                      ----------  ^^^^^^^^^^ re-bound here
@@ -375,7 +391,15 @@ LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
    |                      `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:198:37
+  --> $DIR/duplicate.rs:200:37
+   |
+LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
+   |                      -------------  ^^^^^^^^^^^^^ re-bound here
+   |                      |
+   |                      `Item` bound here first
+
+error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+  --> $DIR/duplicate.rs:200:37
    |
 LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
    |                      -------------  ^^^^^^^^^^^^^ re-bound here
@@ -383,7 +407,7 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
    |                      `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:202:29
+  --> $DIR/duplicate.rs:205:29
    |
 LL |     T: Iterator<Item: Copy, Item: Send>,
    |                 ----------  ^^^^^^^^^^ re-bound here
@@ -391,7 +415,7 @@ LL |     T: Iterator<Item: Copy, Item: Send>,
    |                 `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:208:29
+  --> $DIR/duplicate.rs:211:29
    |
 LL |     T: Iterator<Item: Copy, Item: Copy>,
    |                 ----------  ^^^^^^^^^^ re-bound here
@@ -399,7 +423,7 @@ LL |     T: Iterator<Item: Copy, Item: Copy>,
    |                 `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:214:32
+  --> $DIR/duplicate.rs:217:32
    |
 LL |     T: Iterator<Item: 'static, Item: 'static>,
    |                 -------------  ^^^^^^^^^^^^^ re-bound here
@@ -407,7 +431,7 @@ LL |     T: Iterator<Item: 'static, Item: 'static>,
    |                 `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:220:32
+  --> $DIR/duplicate.rs:223:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Send>,
    |                    ----------  ^^^^^^^^^^ re-bound here
@@ -415,7 +439,7 @@ LL |     Self: Iterator<Item: Copy, Item: Send>,
    |                    `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:220:32
+  --> $DIR/duplicate.rs:223:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Send>,
    |                    ----------  ^^^^^^^^^^ re-bound here
@@ -423,7 +447,7 @@ LL |     Self: Iterator<Item: Copy, Item: Send>,
    |                    `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:227:32
+  --> $DIR/duplicate.rs:230:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Copy>,
    |                    ----------  ^^^^^^^^^^ re-bound here
@@ -431,7 +455,7 @@ LL |     Self: Iterator<Item: Copy, Item: Copy>,
    |                    `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:227:32
+  --> $DIR/duplicate.rs:230:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Copy>,
    |                    ----------  ^^^^^^^^^^ re-bound here
@@ -439,7 +463,7 @@ LL |     Self: Iterator<Item: Copy, Item: Copy>,
    |                    `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:234:35
+  --> $DIR/duplicate.rs:237:35
    |
 LL |     Self: Iterator<Item: 'static, Item: 'static>,
    |                    -------------  ^^^^^^^^^^^^^ re-bound here
@@ -447,7 +471,7 @@ LL |     Self: Iterator<Item: 'static, Item: 'static>,
    |                    `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:234:35
+  --> $DIR/duplicate.rs:237:35
    |
 LL |     Self: Iterator<Item: 'static, Item: 'static>,
    |                    -------------  ^^^^^^^^^^^^^ re-bound here
@@ -455,7 +479,7 @@ LL |     Self: Iterator<Item: 'static, Item: 'static>,
    |                    `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:252:40
+  --> $DIR/duplicate.rs:255:40
    |
 LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
    |                            ----------  ^^^^^^^^^^ re-bound here
@@ -463,7 +487,7 @@ LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
    |                            `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:254:44
+  --> $DIR/duplicate.rs:257:44
    |
 LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
    |                                ----------  ^^^^^^^^^^ re-bound here
@@ -471,7 +495,7 @@ LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
    |                                `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:256:43
+  --> $DIR/duplicate.rs:259:43
    |
 LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
    |                            -------------  ^^^^^^^^^^^^^ re-bound here
@@ -479,7 +503,7 @@ LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
    |                            `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:240:34
+  --> $DIR/duplicate.rs:243:34
    |
 LL |     type A: Iterator<Item: Copy, Item: Send>;
    |                      ----------  ^^^^^^^^^^ re-bound here
@@ -487,7 +511,7 @@ LL |     type A: Iterator<Item: Copy, Item: Send>;
    |                      `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:244:34
+  --> $DIR/duplicate.rs:247:34
    |
 LL |     type A: Iterator<Item: Copy, Item: Copy>;
    |                      ----------  ^^^^^^^^^^ re-bound here
@@ -495,13 +519,13 @@ LL |     type A: Iterator<Item: Copy, Item: Copy>;
    |                      `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/duplicate.rs:248:37
+  --> $DIR/duplicate.rs:251:37
    |
 LL |     type A: Iterator<Item: 'static, Item: 'static>;
    |                      -------------  ^^^^^^^^^^^^^ re-bound here
    |                      |
    |                      `Item` bound here first
 
-error: aborting due to 63 previous errors
+error: aborting due to 66 previous errors
 
 For more information about this error, try `rustc --explain E0719`.
diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs
index 79cee55177b..58ce41d1a89 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs
+++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.rs
@@ -2,7 +2,6 @@
 
 #![feature(return_type_notation, async_fn_in_trait)]
 //~^ WARN the feature `return_type_notation` is incomplete
-//~| WARN the feature `async_fn_in_trait` is incomplete
 
 trait Trait {
     async fn method() {}
diff --git a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr
index b23e0f791ea..95ef7d82fca 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/bad-inputs-and-output.stderr
@@ -1,11 +1,11 @@
 error: return type notation uses `()` instead of `(..)` for elided arguments
-  --> $DIR/bad-inputs-and-output.rs:19:24
+  --> $DIR/bad-inputs-and-output.rs:18:24
    |
 LL | fn baz<T: Trait<method(..): Send>>() {}
    |                        ^^ help: remove the `..`
 
 error[E0658]: associated type bounds are unstable
-  --> $DIR/bad-inputs-and-output.rs:11:17
+  --> $DIR/bad-inputs-and-output.rs:10:17
    |
 LL | fn foo<T: Trait<method(i32): Send>>() {}
    |                 ^^^^^^^^^^^^^^^^^
@@ -14,7 +14,7 @@ LL | fn foo<T: Trait<method(i32): Send>>() {}
    = help: add `#![feature(associated_type_bounds)]` to the crate attributes to enable
 
 error[E0658]: associated type bounds are unstable
-  --> $DIR/bad-inputs-and-output.rs:15:17
+  --> $DIR/bad-inputs-and-output.rs:14:17
    |
 LL | fn bar<T: Trait<method() -> (): Send>>() {}
    |                 ^^^^^^^^^^^^^^^^^^^^
@@ -31,26 +31,18 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
    = 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/bad-inputs-and-output.rs:3:34
-   |
-LL | #![feature(return_type_notation, async_fn_in_trait)]
-   |                                  ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-
 error: argument types not allowed with return type notation
-  --> $DIR/bad-inputs-and-output.rs:11:23
+  --> $DIR/bad-inputs-and-output.rs:10:23
    |
 LL | fn foo<T: Trait<method(i32): Send>>() {}
    |                       ^^^^^ help: remove the input types: `()`
 
 error: return type not allowed with return type notation
-  --> $DIR/bad-inputs-and-output.rs:15:25
+  --> $DIR/bad-inputs-and-output.rs:14:25
    |
 LL | fn bar<T: Trait<method() -> (): Send>>() {}
    |                         ^^^^^^ help: remove the return type
 
-error: aborting due to 5 previous errors; 2 warnings emitted
+error: aborting due to 5 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.rs b/tests/ui/associated-type-bounds/return-type-notation/basic.rs
index 0b7530b65d7..edc6a8e4caf 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.rs
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.rs
@@ -4,7 +4,6 @@
 
 #![feature(return_type_notation, async_fn_in_trait)]
 //~^ WARN the feature `return_type_notation` is incomplete
-//~| WARN the feature `async_fn_in_trait` is incomplete
 
 trait Foo {
     async fn method() -> Result<(), ()>;
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr
index 722c774cb33..9962f4706b3 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.with.stderr
@@ -7,13 +7,5 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
    = 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/basic.rs:5:34
-   |
-LL | #![feature(return_type_notation, async_fn_in_trait)]
-   |                                  ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-
-warning: 2 warnings emitted
+warning: 1 warning emitted
 
diff --git a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
index 1645d8c2650..c2da4f57696 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/basic.without.stderr
@@ -7,31 +7,23 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
    = 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/basic.rs:5:34
-   |
-LL | #![feature(return_type_notation, async_fn_in_trait)]
-   |                                  ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-
 error: future cannot be sent between threads safely
-  --> $DIR/basic.rs:24:13
+  --> $DIR/basic.rs:23:13
    |
 LL |     is_send(foo::<T>());
    |             ^^^^^^^^^^ future returned by `foo` is not `Send`
    |
    = help: within `impl Future<Output = Result<(), ()>>`, the trait `Send` is not implemented for `impl Future<Output = Result<(), ()>>`
 note: future is not `Send` as it awaits another future which is not `Send`
-  --> $DIR/basic.rs:14:5
+  --> $DIR/basic.rs:13:5
    |
 LL |     T::method().await?;
    |     ^^^^^^^^^^^ await occurs here on type `impl Future<Output = Result<(), ()>>`, which is not `Send`
 note: required by a bound in `is_send`
-  --> $DIR/basic.rs:18:20
+  --> $DIR/basic.rs:17:20
    |
 LL | fn is_send(_: impl Send) {}
    |                    ^^^^ required by this bound in `is_send`
 
-error: aborting due to previous error; 2 warnings emitted
+error: aborting due to previous error; 1 warning emitted
 
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.rs b/tests/ui/associated-type-bounds/return-type-notation/equality.rs
index 75f757e9025..6884305d7b3 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.rs
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.rs
@@ -2,7 +2,6 @@
 
 #![feature(return_type_notation, async_fn_in_trait)]
 //~^ WARN the feature `return_type_notation` is incomplete
-//~| WARN the feature `async_fn_in_trait` is incomplete
 
 use std::future::Future;
 
diff --git a/tests/ui/associated-type-bounds/return-type-notation/equality.stderr b/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
index c5b2e5710d4..490bfdc4c3c 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/equality.stderr
@@ -7,19 +7,11 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
    = 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/equality.rs:3:34
-   |
-LL | #![feature(return_type_notation, async_fn_in_trait)]
-   |                                  ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-
 error: return type notation is not allowed to use type equality
-  --> $DIR/equality.rs:13:18
+  --> $DIR/equality.rs:12:18
    |
 LL | fn test<T: Trait<method() = Box<dyn Future<Output = ()>>>>() {}
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to previous error; 2 warnings emitted
+error: aborting due to previous error; 1 warning emitted
 
diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.rs b/tests/ui/associated-type-bounds/return-type-notation/missing.rs
index 7b98a5cdafd..a52562d78f8 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/missing.rs
+++ b/tests/ui/associated-type-bounds/return-type-notation/missing.rs
@@ -2,13 +2,12 @@
 
 #![feature(return_type_notation, async_fn_in_trait)]
 //~^ WARN the feature `return_type_notation` is incomplete
-//~| WARN the feature `async_fn_in_trait` is incomplete
 
 trait Trait {
     async fn method() {}
 }
 
 fn bar<T: Trait<methid(): Send>>() {}
-//~^ ERROR cannot find associated function `methid` in trait `Trait`
+//~^ ERROR cannot find associated function `methid` for `Trait`
 
 fn main() {}
diff --git a/tests/ui/associated-type-bounds/return-type-notation/missing.stderr b/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
index 34f5bda884d..5b1c4cb0b2c 100644
--- a/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
+++ b/tests/ui/associated-type-bounds/return-type-notation/missing.stderr
@@ -7,19 +7,11 @@ LL | #![feature(return_type_notation, async_fn_in_trait)]
    = 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/missing.rs:3:34
-   |
-LL | #![feature(return_type_notation, async_fn_in_trait)]
-   |                                  ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-
-error: cannot find associated function `methid` in trait `Trait`
-  --> $DIR/missing.rs:11:17
+error: cannot find associated function `methid` for `Trait`
+  --> $DIR/missing.rs:10:17
    |
 LL | fn bar<T: Trait<methid(): Send>>() {}
    |                 ^^^^^^^^^^^^^^
 
-error: aborting due to previous error; 2 warnings emitted
+error: aborting due to previous error; 1 warning emitted
 
diff --git a/tests/ui/associated-type-bounds/supertrait-defines-ty.rs b/tests/ui/associated-type-bounds/supertrait-defines-ty.rs
new file mode 100644
index 00000000000..b6f37cb908e
--- /dev/null
+++ b/tests/ui/associated-type-bounds/supertrait-defines-ty.rs
@@ -0,0 +1,26 @@
+// check-pass
+
+// Make sure that we don't look into associated type bounds when looking for
+// supertraits that define an associated type. Fixes #76593.
+
+#![feature(associated_type_bounds)]
+
+trait Load: Sized {
+    type Blob;
+}
+
+trait Primitive: Load<Blob = Self> {}
+
+trait BlobPtr: Primitive {}
+
+trait CleanPtr: Load<Blob: BlobPtr> {
+    fn to_blob(&self) -> Self::Blob;
+}
+
+impl Load for () {
+    type Blob = Self;
+}
+impl Primitive for () {}
+impl BlobPtr for () {}
+
+fn main() {}
diff --git a/tests/ui/async-await/async-await-let-else.drop_tracking.stderr b/tests/ui/async-await/async-await-let-else.drop_tracking.stderr
index fb83ca90a37..dee90262fd4 100644
--- a/tests/ui/async-await/async-await-let-else.drop_tracking.stderr
+++ b/tests/ui/async-await/async-await-let-else.drop_tracking.stderr
@@ -6,12 +6,12 @@ LL |     is_send(foo(Some(true)));
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-await-let-else.rs:11:14
+  --> $DIR/async-await-let-else.rs:11:15
    |
 LL |         let r = Rc::new(());
    |             - has type `Rc<()>` which is not `Send`
 LL |         bar().await
-   |              ^^^^^^ await occurs here, with `r` maybe used later
+   |               ^^^^^ await occurs here, with `r` maybe used later
 LL |     };
    |     - `r` is later dropped here
 note: required by a bound in `is_send`
@@ -65,12 +65,12 @@ LL |     is_send(foo3(Some(true)));
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-await-let-else.rs:33:28
+  --> $DIR/async-await-let-else.rs:33:29
    |
 LL |         (Rc::new(()), bar().await);
-   |          -----------       ^^^^^^ - `Rc::new(())` is later dropped here
-   |          |                 |
-   |          |                 await occurs here, with `Rc::new(())` maybe used later
+   |          -----------        ^^^^^ - `Rc::new(())` is later dropped here
+   |          |                  |
+   |          |                  await occurs here, with `Rc::new(())` maybe used later
    |          has type `Rc<()>` which is not `Send`
 note: required by a bound in `is_send`
   --> $DIR/async-await-let-else.rs:19:15
@@ -86,12 +86,12 @@ LL |     is_send(foo4(Some(true)));
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-await-let-else.rs:41:14
+  --> $DIR/async-await-let-else.rs:41:15
    |
 LL |         let r = Rc::new(());
    |             - has type `Rc<()>` which is not `Send`
 LL |         bar().await;
-   |              ^^^^^^ await occurs here, with `r` maybe used later
+   |               ^^^^^ await occurs here, with `r` maybe used later
 ...
 LL |     };
    |     - `r` is later dropped here
diff --git a/tests/ui/async-await/async-await-let-else.drop_tracking_mir.stderr b/tests/ui/async-await/async-await-let-else.drop_tracking_mir.stderr
index c284bbfb1cc..e3fcceaa392 100644
--- a/tests/ui/async-await/async-await-let-else.drop_tracking_mir.stderr
+++ b/tests/ui/async-await/async-await-let-else.drop_tracking_mir.stderr
@@ -6,12 +6,12 @@ LL |     is_send(foo(Some(true)));
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-await-let-else.rs:11:14
+  --> $DIR/async-await-let-else.rs:11:15
    |
 LL |         let r = Rc::new(());
    |             - has type `Rc<()>` which is not `Send`
 LL |         bar().await
-   |              ^^^^^^ await occurs here, with `r` maybe used later
+   |               ^^^^^ await occurs here, with `r` maybe used later
 note: required by a bound in `is_send`
   --> $DIR/async-await-let-else.rs:19:15
    |
@@ -63,10 +63,10 @@ LL |     is_send(foo3(Some(true)));
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-await-let-else.rs:33:28
+  --> $DIR/async-await-let-else.rs:33:29
    |
 LL |         (Rc::new(()), bar().await);
-   |          -----------       ^^^^^^ await occurs here, with `Rc::new(())` maybe used later
+   |          -----------        ^^^^^ await occurs here, with `Rc::new(())` maybe used later
    |          |
    |          has type `Rc<()>` which is not `Send`
 note: required by a bound in `is_send`
@@ -83,12 +83,12 @@ LL |     is_send(foo4(Some(true)));
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-await-let-else.rs:41:14
+  --> $DIR/async-await-let-else.rs:41:15
    |
 LL |         let r = Rc::new(());
    |             - has type `Rc<()>` which is not `Send`
 LL |         bar().await;
-   |              ^^^^^^ await occurs here, with `r` maybe used later
+   |               ^^^^^ await occurs here, with `r` maybe used later
 note: required by a bound in `is_send`
   --> $DIR/async-await-let-else.rs:19:15
    |
diff --git a/tests/ui/async-await/async-await-let-else.no_drop_tracking.stderr b/tests/ui/async-await/async-await-let-else.no_drop_tracking.stderr
index d3c5e80a30d..ece4e51ecff 100644
--- a/tests/ui/async-await/async-await-let-else.no_drop_tracking.stderr
+++ b/tests/ui/async-await/async-await-let-else.no_drop_tracking.stderr
@@ -6,12 +6,12 @@ LL |     is_send(foo(Some(true)));
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-await-let-else.rs:11:14
+  --> $DIR/async-await-let-else.rs:11:15
    |
 LL |         let r = Rc::new(());
    |             - has type `Rc<()>` which is not `Send`
 LL |         bar().await
-   |              ^^^^^^ await occurs here, with `r` maybe used later
+   |               ^^^^^ await occurs here, with `r` maybe used later
 LL |     };
    |     - `r` is later dropped here
 note: required by a bound in `is_send`
@@ -28,10 +28,10 @@ LL |     is_send(foo2(Some(true)));
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-await-let-else.rs:23:26
+  --> $DIR/async-await-let-else.rs:23:27
    |
 LL |         bar2(Rc::new(())).await
-   |              ----------- ^^^^^^ await occurs here, with `Rc::new(())` maybe used later
+   |              -----------  ^^^^^ await occurs here, with `Rc::new(())` maybe used later
    |              |
    |              has type `Rc<()>` which is not `Send`
 LL |     };
@@ -50,12 +50,12 @@ LL |     is_send(foo3(Some(true)));
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-await-let-else.rs:33:28
+  --> $DIR/async-await-let-else.rs:33:29
    |
 LL |         (Rc::new(()), bar().await);
-   |          -----------       ^^^^^^ - `Rc::new(())` is later dropped here
-   |          |                 |
-   |          |                 await occurs here, with `Rc::new(())` maybe used later
+   |          -----------        ^^^^^ - `Rc::new(())` is later dropped here
+   |          |                  |
+   |          |                  await occurs here, with `Rc::new(())` maybe used later
    |          has type `Rc<()>` which is not `Send`
 note: required by a bound in `is_send`
   --> $DIR/async-await-let-else.rs:19:15
@@ -71,12 +71,12 @@ LL |     is_send(foo4(Some(true)));
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-await-let-else.rs:41:14
+  --> $DIR/async-await-let-else.rs:41:15
    |
 LL |         let r = Rc::new(());
    |             - has type `Rc<()>` which is not `Send`
 LL |         bar().await;
-   |              ^^^^^^ await occurs here, with `r` maybe used later
+   |               ^^^^^ await occurs here, with `r` maybe used later
 ...
 LL |     };
    |     - `r` is later dropped here
diff --git a/tests/ui/async-await/async-error-span.drop_tracking.stderr b/tests/ui/async-await/async-error-span.drop_tracking.stderr
index c6257cb324d..99a674a2684 100644
--- a/tests/ui/async-await/async-error-span.drop_tracking.stderr
+++ b/tests/ui/async-await/async-error-span.drop_tracking.stderr
@@ -14,10 +14,10 @@ LL |     let a;
    |         ^ cannot infer type
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/async-error-span.rs:19:17
+  --> $DIR/async-error-span.rs:19:18
    |
 LL |     get_future().await;
-   |                 ^^^^^^
+   |                  ^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/async-await/async-error-span.no_drop_tracking.stderr b/tests/ui/async-await/async-error-span.no_drop_tracking.stderr
index c6257cb324d..99a674a2684 100644
--- a/tests/ui/async-await/async-error-span.no_drop_tracking.stderr
+++ b/tests/ui/async-await/async-error-span.no_drop_tracking.stderr
@@ -14,10 +14,10 @@ LL |     let a;
    |         ^ cannot infer type
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/async-error-span.rs:19:17
+  --> $DIR/async-error-span.rs:19:18
    |
 LL |     get_future().await;
-   |                 ^^^^^^
+   |                  ^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/async-await/async-fn-nonsend.drop_tracking.stderr b/tests/ui/async-await/async-fn-nonsend.drop_tracking.stderr
index 0f0dc335e7f..0515edaeda3 100644
--- a/tests/ui/async-await/async-fn-nonsend.drop_tracking.stderr
+++ b/tests/ui/async-await/async-fn-nonsend.drop_tracking.stderr
@@ -6,12 +6,12 @@ LL |     assert_send(non_send_temporary_in_match());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-fn-nonsend.rs:36:25
+  --> $DIR/async-fn-nonsend.rs:36:26
    |
 LL |     match Some(non_send()) {
    |           ---------------- has type `Option<impl Debug>` which is not `Send`
 LL |         Some(_) => fut().await,
-   |                         ^^^^^^ await occurs here, with `Some(non_send())` maybe used later
+   |                          ^^^^^ await occurs here, with `Some(non_send())` maybe used later
 ...
 LL | }
    | - `Some(non_send())` is later dropped here
@@ -29,13 +29,13 @@ LL |     assert_send(non_sync_with_method_call());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-fn-nonsend.rs:49:14
+  --> $DIR/async-fn-nonsend.rs:49:15
    |
 LL |     let f: &mut std::fmt::Formatter = &mut get_formatter();
    |                                            --------------- has type `Formatter<'_>` which is not `Send`
 ...
 LL |         fut().await;
-   |              ^^^^^^ await occurs here, with `get_formatter()` maybe used later
+   |               ^^^^^ await occurs here, with `get_formatter()` maybe used later
 LL |     }
 LL | }
    | - `get_formatter()` is later dropped here
diff --git a/tests/ui/async-await/async-fn-nonsend.drop_tracking_mir.stderr b/tests/ui/async-await/async-fn-nonsend.drop_tracking_mir.stderr
index 57a01280145..219945e0971 100644
--- a/tests/ui/async-await/async-fn-nonsend.drop_tracking_mir.stderr
+++ b/tests/ui/async-await/async-fn-nonsend.drop_tracking_mir.stderr
@@ -6,12 +6,12 @@ LL |     assert_send(non_send_temporary_in_match());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-fn-nonsend.rs:36:25
+  --> $DIR/async-fn-nonsend.rs:36:26
    |
 LL |     match Some(non_send()) {
    |           ---------------- has type `Option<impl Debug>` which is not `Send`
 LL |         Some(_) => fut().await,
-   |                         ^^^^^^ await occurs here, with `Some(non_send())` maybe used later
+   |                          ^^^^^ await occurs here, with `Some(non_send())` maybe used later
 note: required by a bound in `assert_send`
   --> $DIR/async-fn-nonsend.rs:67:24
    |
@@ -26,13 +26,13 @@ LL |     assert_send(non_sync_with_method_call());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-fn-nonsend.rs:49:14
+  --> $DIR/async-fn-nonsend.rs:49:15
    |
 LL |     let f: &mut std::fmt::Formatter = &mut get_formatter();
    |                                            --------------- has type `Formatter<'_>` which is not `Send`
 ...
 LL |         fut().await;
-   |              ^^^^^^ await occurs here, with `get_formatter()` maybe used later
+   |               ^^^^^ await occurs here, with `get_formatter()` maybe used later
 note: required by a bound in `assert_send`
   --> $DIR/async-fn-nonsend.rs:67:24
    |
diff --git a/tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr b/tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr
index 5cec21d890e..b29d2e192f4 100644
--- a/tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr
+++ b/tests/ui/async-await/async-fn-nonsend.no_drop_tracking.stderr
@@ -6,13 +6,13 @@ LL |     assert_send(local_dropped_before_await());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-fn-nonsend.rs:27:10
+  --> $DIR/async-fn-nonsend.rs:27:11
    |
 LL |     let x = non_send();
    |         - has type `impl Debug` which is not `Send`
 LL |     drop(x);
 LL |     fut().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
+   |           ^^^^^ await occurs here, with `x` maybe used later
 LL | }
    | - `x` is later dropped here
 note: required by a bound in `assert_send`
@@ -29,12 +29,12 @@ LL |     assert_send(non_send_temporary_in_match());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-fn-nonsend.rs:36:25
+  --> $DIR/async-fn-nonsend.rs:36:26
    |
 LL |     match Some(non_send()) {
    |                ---------- has type `impl Debug` which is not `Send`
 LL |         Some(_) => fut().await,
-   |                         ^^^^^^ await occurs here, with `non_send()` maybe used later
+   |                          ^^^^^ await occurs here, with `non_send()` maybe used later
 ...
 LL | }
    | - `non_send()` is later dropped here
@@ -52,13 +52,13 @@ LL |     assert_send(non_sync_with_method_call());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-fn-nonsend.rs:49:14
+  --> $DIR/async-fn-nonsend.rs:49:15
    |
 LL |     let f: &mut std::fmt::Formatter = &mut get_formatter();
    |                                            --------------- has type `Formatter<'_>` which is not `Send`
 ...
 LL |         fut().await;
-   |              ^^^^^^ await occurs here, with `get_formatter()` maybe used later
+   |               ^^^^^ await occurs here, with `get_formatter()` maybe used later
 LL |     }
 LL | }
    | - `get_formatter()` is later dropped here
@@ -76,13 +76,13 @@ LL |     assert_send(non_sync_with_method_call_panic());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-fn-nonsend.rs:56:14
+  --> $DIR/async-fn-nonsend.rs:56:15
    |
 LL |     let f: &mut std::fmt::Formatter = panic!();
    |         - has type `&mut Formatter<'_>` which is not `Send`
 LL |     if non_sync().fmt(f).unwrap() == () {
 LL |         fut().await;
-   |              ^^^^^^ await occurs here, with `f` maybe used later
+   |               ^^^^^ await occurs here, with `f` maybe used later
 LL |     }
 LL | }
    | - `f` is later dropped here
@@ -100,13 +100,13 @@ LL |     assert_send(non_sync_with_method_call_infinite_loop());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/async-fn-nonsend.rs:63:14
+  --> $DIR/async-fn-nonsend.rs:63:15
    |
 LL |     let f: &mut std::fmt::Formatter = loop {};
    |         - has type `&mut Formatter<'_>` which is not `Send`
 LL |     if non_sync().fmt(f).unwrap() == () {
 LL |         fut().await;
-   |              ^^^^^^ await occurs here, with `f` maybe used later
+   |               ^^^^^ await occurs here, with `f` maybe used later
 LL |     }
 LL | }
    | - `f` is later dropped here
diff --git a/tests/ui/async-await/async-fn-nonsend.stderr b/tests/ui/async-await/async-fn-nonsend.stderr
deleted file mode 100644
index 0f0dc335e7f..00000000000
--- a/tests/ui/async-await/async-fn-nonsend.stderr
+++ /dev/null
@@ -1,49 +0,0 @@
-error: future cannot be sent between threads safely
-  --> $DIR/async-fn-nonsend.rs:72:17
-   |
-LL |     assert_send(non_send_temporary_in_match());
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_send_temporary_in_match` is not `Send`
-   |
-   = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
-note: future is not `Send` as this value is used across an await
-  --> $DIR/async-fn-nonsend.rs:36:25
-   |
-LL |     match Some(non_send()) {
-   |           ---------------- has type `Option<impl Debug>` which is not `Send`
-LL |         Some(_) => fut().await,
-   |                         ^^^^^^ await occurs here, with `Some(non_send())` maybe used later
-...
-LL | }
-   | - `Some(non_send())` is later dropped here
-note: required by a bound in `assert_send`
-  --> $DIR/async-fn-nonsend.rs:67:24
-   |
-LL | fn assert_send(_: impl Send) {}
-   |                        ^^^^ required by this bound in `assert_send`
-
-error: future cannot be sent between threads safely
-  --> $DIR/async-fn-nonsend.rs:74:17
-   |
-LL |     assert_send(non_sync_with_method_call());
-   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ future returned by `non_sync_with_method_call` is not `Send`
-   |
-   = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `dyn std::fmt::Write`
-note: future is not `Send` as this value is used across an await
-  --> $DIR/async-fn-nonsend.rs:49:14
-   |
-LL |     let f: &mut std::fmt::Formatter = &mut get_formatter();
-   |                                            --------------- has type `Formatter<'_>` which is not `Send`
-...
-LL |         fut().await;
-   |              ^^^^^^ await occurs here, with `get_formatter()` maybe used later
-LL |     }
-LL | }
-   | - `get_formatter()` is later dropped here
-note: required by a bound in `assert_send`
-  --> $DIR/async-fn-nonsend.rs:67:24
-   |
-LL | fn assert_send(_: impl Send) {}
-   |                        ^^^^ required by this bound in `assert_send`
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/async-await/async-is-unwindsafe.stderr b/tests/ui/async-await/async-is-unwindsafe.stderr
index d6404b30e74..5d29325c827 100644
--- a/tests/ui/async-await/async-is-unwindsafe.stderr
+++ b/tests/ui/async-await/async-is-unwindsafe.stderr
@@ -17,13 +17,13 @@ LL | |     });
    = help: within `[async block@$DIR/async-is-unwindsafe.rs:12:19: 29:6]`, the trait `UnwindSafe` is not implemented for `&mut Context<'_>`
    = note: `UnwindSafe` is implemented for `&std::task::Context<'_>`, but not for `&mut std::task::Context<'_>`
 note: future does not implement `UnwindSafe` as this value is used across an await
-  --> $DIR/async-is-unwindsafe.rs:25:17
+  --> $DIR/async-is-unwindsafe.rs:25:18
    |
 LL |         let cx_ref = &mut cx;
    |             ------ has type `&mut Context<'_>` which does not implement `UnwindSafe`
 LL |
 LL |         async {}.await; // this needs an inner await point
-   |                 ^^^^^^ await occurs here, with `cx_ref` maybe used later
+   |                  ^^^^^ await occurs here, with `cx_ref` maybe used later
 ...
 LL |     });
    |     - `cx_ref` is later dropped here
diff --git a/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr b/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr
index b30f2883732..7b03e56662a 100644
--- a/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr
+++ b/tests/ui/async-await/await-keyword/incorrect-syntax-suggestions.stderr
@@ -143,7 +143,7 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks
 LL | fn foo9() -> Result<(), ()> {
    |    ---- this is not `async`
 LL |     let _ = await bar();
-   |             ^^^^^^^^^^^ only allowed inside `async` functions and blocks
+   |             ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
   --> $DIR/incorrect-syntax-suggestions.rs:57:13
@@ -151,7 +151,7 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks
 LL | fn foo10() -> Result<(), ()> {
    |    ----- this is not `async`
 LL |     let _ = await? bar();
-   |             ^^^^^^^^^^^^ only allowed inside `async` functions and blocks
+   |             ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
   --> $DIR/incorrect-syntax-suggestions.rs:66:14
@@ -159,71 +159,71 @@ error[E0728]: `await` is only allowed inside `async` functions and blocks
 LL | fn foo12() -> Result<(), ()> {
    |    ----- this is not `async`
 LL |     let _ = (await bar())?;
-   |              ^^^^^^^^^^^ only allowed inside `async` functions and blocks
+   |              ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/incorrect-syntax-suggestions.rs:71:18
+  --> $DIR/incorrect-syntax-suggestions.rs:71:19
    |
 LL | fn foo13() -> Result<(), ()> {
    |    ----- this is not `async`
 LL |     let _ = bar().await();
-   |                  ^^^^^^ only allowed inside `async` functions and blocks
+   |                   ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/incorrect-syntax-suggestions.rs:76:18
+  --> $DIR/incorrect-syntax-suggestions.rs:76:19
    |
 LL | fn foo14() -> Result<(), ()> {
    |    ----- this is not `async`
 LL |     let _ = bar().await()?;
-   |                  ^^^^^^ only allowed inside `async` functions and blocks
+   |                   ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/incorrect-syntax-suggestions.rs:81:18
+  --> $DIR/incorrect-syntax-suggestions.rs:81:19
    |
 LL | fn foo15() -> Result<(), ()> {
    |    ----- this is not `async`
 LL |     let _ = bar().await;
-   |                  ^^^^^^ only allowed inside `async` functions and blocks
+   |                   ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/incorrect-syntax-suggestions.rs:85:18
+  --> $DIR/incorrect-syntax-suggestions.rs:85:19
    |
 LL | fn foo16() -> Result<(), ()> {
    |    ----- this is not `async`
 LL |     let _ = bar().await?;
-   |                  ^^^^^^ only allowed inside `async` functions and blocks
+   |                   ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/incorrect-syntax-suggestions.rs:90:22
+  --> $DIR/incorrect-syntax-suggestions.rs:90:23
    |
 LL |     fn foo() -> Result<(), ()> {
    |        --- this is not `async`
 LL |         let _ = bar().await?;
-   |                      ^^^^^^ only allowed inside `async` functions and blocks
+   |                       ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/incorrect-syntax-suggestions.rs:97:22
+  --> $DIR/incorrect-syntax-suggestions.rs:97:23
    |
 LL |     let foo = || {
    |               -- this is not `async`
 LL |         let _ = bar().await?;
-   |                      ^^^^^^ only allowed inside `async` functions and blocks
+   |                       ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/incorrect-syntax-suggestions.rs:113:29
+  --> $DIR/incorrect-syntax-suggestions.rs:113:17
    |
 LL |     fn foo() -> Result<(), ()> {
    |        --- this is not `async`
 LL |         let _ = await!(bar())?;
-   |                             ^ only allowed inside `async` functions and blocks
+   |                 ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/incorrect-syntax-suggestions.rs:121:29
+  --> $DIR/incorrect-syntax-suggestions.rs:121:17
    |
 LL |     let foo = || {
    |               -- this is not `async`
 LL |         let _ = await!(bar())?;
-   |                             ^ only allowed inside `async` functions and blocks
+   |                 ^^^^^ only allowed inside `async` functions and blocks
 
 error: aborting due to 33 previous errors
 
diff --git a/tests/ui/async-await/clone-suggestion.fixed b/tests/ui/async-await/clone-suggestion.fixed
new file mode 100644
index 00000000000..3514cd63df1
--- /dev/null
+++ b/tests/ui/async-await/clone-suggestion.fixed
@@ -0,0 +1,28 @@
+// edition: 2021
+// run-rustfix
+
+#![allow(unused)]
+
+use std::future::Future;
+use std::pin::Pin;
+use std::task::{Context, Poll};
+
+#[derive(Clone)]
+struct SharedFuture;
+
+impl Future for SharedFuture {
+    type Output = ();
+
+    fn poll(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<<Self as Future>::Output> {
+        todo!()
+    }
+}
+
+async fn foo() {
+    let f = SharedFuture;
+    f.clone().await;
+    f.await;
+    //~^ ERROR use of moved value
+}
+
+fn main() {}
diff --git a/tests/ui/async-await/clone-suggestion.rs b/tests/ui/async-await/clone-suggestion.rs
new file mode 100644
index 00000000000..5a4f70cbf44
--- /dev/null
+++ b/tests/ui/async-await/clone-suggestion.rs
@@ -0,0 +1,28 @@
+// edition: 2021
+// run-rustfix
+
+#![allow(unused)]
+
+use std::future::Future;
+use std::pin::Pin;
+use std::task::{Context, Poll};
+
+#[derive(Clone)]
+struct SharedFuture;
+
+impl Future for SharedFuture {
+    type Output = ();
+
+    fn poll(self: Pin<&mut Self>, _: &mut Context<'_>) -> Poll<<Self as Future>::Output> {
+        todo!()
+    }
+}
+
+async fn foo() {
+    let f = SharedFuture;
+    f.await;
+    f.await;
+    //~^ ERROR use of moved value
+}
+
+fn main() {}
diff --git a/tests/ui/async-await/clone-suggestion.stderr b/tests/ui/async-await/clone-suggestion.stderr
new file mode 100644
index 00000000000..c02206f6f9b
--- /dev/null
+++ b/tests/ui/async-await/clone-suggestion.stderr
@@ -0,0 +1,20 @@
+error[E0382]: use of moved value: `f`
+  --> $DIR/clone-suggestion.rs:24:5
+   |
+LL |     let f = SharedFuture;
+   |         - move occurs because `f` has type `SharedFuture`, which does not implement the `Copy` trait
+LL |     f.await;
+   |       ----- `f` moved due to this await
+LL |     f.await;
+   |     ^ value used here after move
+   |
+note: `into_future` takes ownership of the receiver `self`, which moves `f`
+  --> $SRC_DIR/core/src/future/into_future.rs:LL:COL
+help: you can `clone` the value and consume it, but this might not be your desired behavior
+   |
+LL |     f.clone().await;
+   |       ++++++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/async-await/drop-track-bad-field-in-fru.stderr b/tests/ui/async-await/drop-track-bad-field-in-fru.stderr
index 819b64ad77f..07ab8b3c903 100644
--- a/tests/ui/async-await/drop-track-bad-field-in-fru.stderr
+++ b/tests/ui/async-await/drop-track-bad-field-in-fru.stderr
@@ -5,12 +5,12 @@ LL |     None { value: (), ..Default::default() }.await;
    |            ^^^^^ `Option<_>::None` does not have this field
 
 error[E0277]: `Option<_>` is not a future
-  --> $DIR/drop-track-bad-field-in-fru.rs:7:45
+  --> $DIR/drop-track-bad-field-in-fru.rs:7:46
    |
 LL |     None { value: (), ..Default::default() }.await;
-   |                                             ^^^^^^
-   |                                             |
-   |                                             `Option<_>` is not a future
+   |                                             -^^^^^
+   |                                             ||
+   |                                             |`Option<_>` is not a future
    |                                             help: remove the `.await`
    |
    = help: the trait `Future` is not implemented for `Option<_>`
diff --git a/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking.stderr b/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking.stderr
index e2bba812d05..80402d8424d 100644
--- a/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking.stderr
+++ b/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking.stderr
@@ -6,13 +6,13 @@ LL |     assert_send(agent.handle());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/drop-track-field-assign-nonsend.rs:23:38
+  --> $DIR/drop-track-field-assign-nonsend.rs:23:39
    |
 LL |         let mut info = self.info_result.clone();
    |             -------- has type `InfoResult` which is not `Send`
 ...
 LL |         let _ = send_element(element).await;
-   |                                      ^^^^^^ await occurs here, with `mut info` maybe used later
+   |                                       ^^^^^ await occurs here, with `mut info` maybe used later
 LL |     }
    |     - `mut info` is later dropped here
 note: required by a bound in `assert_send`
diff --git a/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking_mir.stderr b/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking_mir.stderr
index b89d8680407..d9141cf4e36 100644
--- a/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking_mir.stderr
+++ b/tests/ui/async-await/drop-track-field-assign-nonsend.drop_tracking_mir.stderr
@@ -6,13 +6,13 @@ LL |     assert_send(agent.handle());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/drop-track-field-assign-nonsend.rs:23:38
+  --> $DIR/drop-track-field-assign-nonsend.rs:23:39
    |
 LL |         let mut info = self.info_result.clone();
    |             -------- has type `InfoResult` which is not `Send`
 ...
 LL |         let _ = send_element(element).await;
-   |                                      ^^^^^^ await occurs here, with `mut info` maybe used later
+   |                                       ^^^^^ await occurs here, with `mut info` maybe used later
 note: required by a bound in `assert_send`
   --> $DIR/drop-track-field-assign-nonsend.rs:40:19
    |
diff --git a/tests/ui/async-await/drop-track-field-assign-nonsend.no_drop_tracking.stderr b/tests/ui/async-await/drop-track-field-assign-nonsend.no_drop_tracking.stderr
index e2bba812d05..80402d8424d 100644
--- a/tests/ui/async-await/drop-track-field-assign-nonsend.no_drop_tracking.stderr
+++ b/tests/ui/async-await/drop-track-field-assign-nonsend.no_drop_tracking.stderr
@@ -6,13 +6,13 @@ LL |     assert_send(agent.handle());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/drop-track-field-assign-nonsend.rs:23:38
+  --> $DIR/drop-track-field-assign-nonsend.rs:23:39
    |
 LL |         let mut info = self.info_result.clone();
    |             -------- has type `InfoResult` which is not `Send`
 ...
 LL |         let _ = send_element(element).await;
-   |                                      ^^^^^^ await occurs here, with `mut info` maybe used later
+   |                                       ^^^^^ await occurs here, with `mut info` maybe used later
 LL |     }
    |     - `mut info` is later dropped here
 note: required by a bound in `assert_send`
diff --git a/tests/ui/async-await/field-assign-nonsend.drop_tracking.stderr b/tests/ui/async-await/field-assign-nonsend.drop_tracking.stderr
index ac461a671a8..e2e64c9ae0c 100644
--- a/tests/ui/async-await/field-assign-nonsend.drop_tracking.stderr
+++ b/tests/ui/async-await/field-assign-nonsend.drop_tracking.stderr
@@ -6,13 +6,13 @@ LL |     assert_send(agent.handle());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/field-assign-nonsend.rs:23:38
+  --> $DIR/field-assign-nonsend.rs:23:39
    |
 LL |         let mut info = self.info_result.clone();
    |             -------- has type `InfoResult` which is not `Send`
 ...
 LL |         let _ = send_element(element).await;
-   |                                      ^^^^^^ await occurs here, with `mut info` maybe used later
+   |                                       ^^^^^ await occurs here, with `mut info` maybe used later
 LL |     }
    |     - `mut info` is later dropped here
 note: required by a bound in `assert_send`
diff --git a/tests/ui/async-await/field-assign-nonsend.drop_tracking_mir.stderr b/tests/ui/async-await/field-assign-nonsend.drop_tracking_mir.stderr
index 8c9d14d624c..d1df8e91afa 100644
--- a/tests/ui/async-await/field-assign-nonsend.drop_tracking_mir.stderr
+++ b/tests/ui/async-await/field-assign-nonsend.drop_tracking_mir.stderr
@@ -6,13 +6,13 @@ LL |     assert_send(agent.handle());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/field-assign-nonsend.rs:23:38
+  --> $DIR/field-assign-nonsend.rs:23:39
    |
 LL |         let mut info = self.info_result.clone();
    |             -------- has type `InfoResult` which is not `Send`
 ...
 LL |         let _ = send_element(element).await;
-   |                                      ^^^^^^ await occurs here, with `mut info` maybe used later
+   |                                       ^^^^^ await occurs here, with `mut info` maybe used later
 note: required by a bound in `assert_send`
   --> $DIR/field-assign-nonsend.rs:40:19
    |
diff --git a/tests/ui/async-await/field-assign-nonsend.no_drop_tracking.stderr b/tests/ui/async-await/field-assign-nonsend.no_drop_tracking.stderr
index ac461a671a8..e2e64c9ae0c 100644
--- a/tests/ui/async-await/field-assign-nonsend.no_drop_tracking.stderr
+++ b/tests/ui/async-await/field-assign-nonsend.no_drop_tracking.stderr
@@ -6,13 +6,13 @@ LL |     assert_send(agent.handle());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<String>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/field-assign-nonsend.rs:23:38
+  --> $DIR/field-assign-nonsend.rs:23:39
    |
 LL |         let mut info = self.info_result.clone();
    |             -------- has type `InfoResult` which is not `Send`
 ...
 LL |         let _ = send_element(element).await;
-   |                                      ^^^^^^ await occurs here, with `mut info` maybe used later
+   |                                       ^^^^^ await occurs here, with `mut info` maybe used later
 LL |     }
    |     - `mut info` is later dropped here
 note: required by a bound in `assert_send`
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/async-default-fn-overridden.current.stderr b/tests/ui/async-await/in-trait/async-default-fn-overridden.current.stderr
deleted file mode 100644
index 2142ee232ca..00000000000
--- a/tests/ui/async-await/in-trait/async-default-fn-overridden.current.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/async-default-fn-overridden.rs:6:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/async-await/in-trait/async-default-fn-overridden.next.stderr b/tests/ui/async-await/in-trait/async-default-fn-overridden.next.stderr
deleted file mode 100644
index 2142ee232ca..00000000000
--- a/tests/ui/async-await/in-trait/async-default-fn-overridden.next.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/async-default-fn-overridden.rs:6:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/async-await/in-trait/async-default-fn-overridden.rs b/tests/ui/async-await/in-trait/async-default-fn-overridden.rs
index dd1af93d706..99c3ba6a3c2 100644
--- a/tests/ui/async-await/in-trait/async-default-fn-overridden.rs
+++ b/tests/ui/async-await/in-trait/async-default-fn-overridden.rs
@@ -4,7 +4,6 @@
 // revisions: current next
 
 #![feature(async_fn_in_trait)]
-//~^ WARN the feature `async_fn_in_trait` is incomplete and may not be safe to use
 
 use std::future::Future;
 
diff --git a/tests/ui/async-await/in-trait/bad-signatures.current.stderr b/tests/ui/async-await/in-trait/bad-signatures.current.stderr
index 5a05b080c3e..ae590fb057f 100644
--- a/tests/ui/async-await/in-trait/bad-signatures.current.stderr
+++ b/tests/ui/async-await/in-trait/bad-signatures.current.stderr
@@ -1,11 +1,11 @@
 error: expected identifier, found keyword `self`
-  --> $DIR/bad-signatures.rs:9:23
+  --> $DIR/bad-signatures.rs:8:23
    |
 LL |     async fn bar(&abc self);
    |                       ^^^^ expected identifier, found keyword
 
 error: expected one of `:`, `@`, or `|`, found keyword `self`
-  --> $DIR/bad-signatures.rs:9:23
+  --> $DIR/bad-signatures.rs:8:23
    |
 LL |     async fn bar(&abc self);
    |                  -----^^^^
@@ -13,14 +13,5 @@ LL |     async fn bar(&abc self);
    |                  |    expected one of `:`, `@`, or `|`
    |                  help: declare the type after the parameter binding: `<identifier>: <type>`
 
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/bad-signatures.rs:5:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/async-await/in-trait/bad-signatures.next.stderr b/tests/ui/async-await/in-trait/bad-signatures.next.stderr
index 5a05b080c3e..ae590fb057f 100644
--- a/tests/ui/async-await/in-trait/bad-signatures.next.stderr
+++ b/tests/ui/async-await/in-trait/bad-signatures.next.stderr
@@ -1,11 +1,11 @@
 error: expected identifier, found keyword `self`
-  --> $DIR/bad-signatures.rs:9:23
+  --> $DIR/bad-signatures.rs:8:23
    |
 LL |     async fn bar(&abc self);
    |                       ^^^^ expected identifier, found keyword
 
 error: expected one of `:`, `@`, or `|`, found keyword `self`
-  --> $DIR/bad-signatures.rs:9:23
+  --> $DIR/bad-signatures.rs:8:23
    |
 LL |     async fn bar(&abc self);
    |                  -----^^^^
@@ -13,14 +13,5 @@ LL |     async fn bar(&abc self);
    |                  |    expected one of `:`, `@`, or `|`
    |                  help: declare the type after the parameter binding: `<identifier>: <type>`
 
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/bad-signatures.rs:5:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/async-await/in-trait/bad-signatures.rs b/tests/ui/async-await/in-trait/bad-signatures.rs
index e0093be8cb3..4baddd8ccb8 100644
--- a/tests/ui/async-await/in-trait/bad-signatures.rs
+++ b/tests/ui/async-await/in-trait/bad-signatures.rs
@@ -3,7 +3,6 @@
 // revisions: current next
 
 #![feature(async_fn_in_trait)]
-//~^ WARN the feature `async_fn_in_trait` is incomplete
 
 trait MyTrait {
     async fn bar(&abc self);
diff --git a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.current.stderr b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.current.stderr
index 1e67cdca248..eec5ab06539 100644
--- a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.current.stderr
+++ b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.current.stderr
@@ -1,12 +1,3 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/dont-project-to-specializable-projection.rs:6:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error: async associated function in trait cannot be specialized
   --> $DIR/dont-project-to-specializable-projection.rs:16:5
    |
@@ -15,5 +6,5 @@ LL |     default async fn foo(_: T) -> &'static str {
    |
    = note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
diff --git a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.next.stderr b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.next.stderr
index fa89c6b77e0..25a7f3bb56a 100644
--- a/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.next.stderr
+++ b/tests/ui/async-await/in-trait/dont-project-to-specializable-projection.next.stderr
@@ -1,12 +1,3 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/dont-project-to-specializable-projection.rs:6:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error[E0053]: method `foo` has an incompatible type for trait
   --> $DIR/dont-project-to-specializable-projection.rs:16:35
    |
@@ -29,6 +20,6 @@ LL |     default async fn foo(_: T) -> &'static str {
    |
    = note: specialization behaves in inconsistent and surprising ways with `#![feature(async_fn_in_trait)]`, and for now is disallowed
 
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0053`.
diff --git a/tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr b/tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr
index 0e9477544a4..69e7c65ee3e 100644
--- a/tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr
+++ b/tests/ui/async-await/in-trait/lifetime-mismatch.current.stderr
@@ -1,14 +1,5 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/lifetime-mismatch.rs:5:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration
-  --> $DIR/lifetime-mismatch.rs:14:17
+  --> $DIR/lifetime-mismatch.rs:13:17
    |
 LL |     async fn foo<'a>(&self);
    |                 ---- lifetimes in impl do not match this method in trait
@@ -16,6 +7,6 @@ LL |     async fn foo<'a>(&self);
 LL |     async fn foo(&self) {}
    |                 ^ lifetimes do not match method in trait
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0195`.
diff --git a/tests/ui/async-await/in-trait/lifetime-mismatch.next.stderr b/tests/ui/async-await/in-trait/lifetime-mismatch.next.stderr
index 0e9477544a4..69e7c65ee3e 100644
--- a/tests/ui/async-await/in-trait/lifetime-mismatch.next.stderr
+++ b/tests/ui/async-await/in-trait/lifetime-mismatch.next.stderr
@@ -1,14 +1,5 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/lifetime-mismatch.rs:5:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error[E0195]: lifetime parameters or bounds on method `foo` do not match the trait declaration
-  --> $DIR/lifetime-mismatch.rs:14:17
+  --> $DIR/lifetime-mismatch.rs:13:17
    |
 LL |     async fn foo<'a>(&self);
    |                 ---- lifetimes in impl do not match this method in trait
@@ -16,6 +7,6 @@ LL |     async fn foo<'a>(&self);
 LL |     async fn foo(&self) {}
    |                 ^ lifetimes do not match method in trait
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0195`.
diff --git a/tests/ui/async-await/in-trait/lifetime-mismatch.rs b/tests/ui/async-await/in-trait/lifetime-mismatch.rs
index 5ff5a01a1ee..46183f72bce 100644
--- a/tests/ui/async-await/in-trait/lifetime-mismatch.rs
+++ b/tests/ui/async-await/in-trait/lifetime-mismatch.rs
@@ -3,7 +3,6 @@
 // revisions: current next
 
 #![feature(async_fn_in_trait)]
-//~^ WARN the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
 
 trait MyTrait {
     async fn foo<'a>(&self);
diff --git a/tests/ui/async-await/in-trait/missing-send-bound.current.stderr b/tests/ui/async-await/in-trait/missing-send-bound.current.stderr
index 319ed582e27..9aa37f7437e 100644
--- a/tests/ui/async-await/in-trait/missing-send-bound.current.stderr
+++ b/tests/ui/async-await/in-trait/missing-send-bound.current.stderr
@@ -1,29 +1,20 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/missing-send-bound.rs:5:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error: future cannot be sent between threads safely
-  --> $DIR/missing-send-bound.rs:17:20
+  --> $DIR/missing-send-bound.rs:16:20
    |
 LL |     assert_is_send(test::<T>());
    |                    ^^^^^^^^^^^ future returned by `test` is not `Send`
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
 note: future is not `Send` as it awaits another future which is not `Send`
-  --> $DIR/missing-send-bound.rs:13:5
+  --> $DIR/missing-send-bound.rs:12:5
    |
 LL |     T::bar().await;
    |     ^^^^^^^^ await occurs here on type `impl Future<Output = ()>`, which is not `Send`
 note: required by a bound in `assert_is_send`
-  --> $DIR/missing-send-bound.rs:21:27
+  --> $DIR/missing-send-bound.rs:20:27
    |
 LL | fn assert_is_send(_: impl Send) {}
    |                           ^^^^ required by this bound in `assert_is_send`
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
diff --git a/tests/ui/async-await/in-trait/missing-send-bound.next.stderr b/tests/ui/async-await/in-trait/missing-send-bound.next.stderr
index 319ed582e27..9aa37f7437e 100644
--- a/tests/ui/async-await/in-trait/missing-send-bound.next.stderr
+++ b/tests/ui/async-await/in-trait/missing-send-bound.next.stderr
@@ -1,29 +1,20 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/missing-send-bound.rs:5:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error: future cannot be sent between threads safely
-  --> $DIR/missing-send-bound.rs:17:20
+  --> $DIR/missing-send-bound.rs:16:20
    |
 LL |     assert_is_send(test::<T>());
    |                    ^^^^^^^^^^^ future returned by `test` is not `Send`
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `impl Future<Output = ()>`
 note: future is not `Send` as it awaits another future which is not `Send`
-  --> $DIR/missing-send-bound.rs:13:5
+  --> $DIR/missing-send-bound.rs:12:5
    |
 LL |     T::bar().await;
    |     ^^^^^^^^ await occurs here on type `impl Future<Output = ()>`, which is not `Send`
 note: required by a bound in `assert_is_send`
-  --> $DIR/missing-send-bound.rs:21:27
+  --> $DIR/missing-send-bound.rs:20:27
    |
 LL | fn assert_is_send(_: impl Send) {}
    |                           ^^^^ required by this bound in `assert_is_send`
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
diff --git a/tests/ui/async-await/in-trait/missing-send-bound.rs b/tests/ui/async-await/in-trait/missing-send-bound.rs
index 705fcf322f9..b602865cbb1 100644
--- a/tests/ui/async-await/in-trait/missing-send-bound.rs
+++ b/tests/ui/async-await/in-trait/missing-send-bound.rs
@@ -3,7 +3,6 @@
 // revisions: current next
 
 #![feature(async_fn_in_trait)]
-//~^ WARN the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
 
 trait Foo {
     async fn bar();
diff --git a/tests/ui/async-await/in-trait/object-safety.current.stderr b/tests/ui/async-await/in-trait/object-safety.current.stderr
index 90e049a9960..7f7ec39142c 100644
--- a/tests/ui/async-await/in-trait/object-safety.current.stderr
+++ b/tests/ui/async-await/in-trait/object-safety.current.stderr
@@ -1,20 +1,11 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/object-safety.rs:5:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:13:12
+  --> $DIR/object-safety.rs:12:12
    |
 LL |     let x: &dyn Foo = todo!();
    |            ^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:9:14
+  --> $DIR/object-safety.rs:8:14
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -22,6 +13,6 @@ LL |     async fn foo(&self);
    |              ^^^ ...because method `foo` is `async`
    = help: consider moving `foo` to another trait
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/async-await/in-trait/object-safety.next.stderr b/tests/ui/async-await/in-trait/object-safety.next.stderr
index 90e049a9960..7f7ec39142c 100644
--- a/tests/ui/async-await/in-trait/object-safety.next.stderr
+++ b/tests/ui/async-await/in-trait/object-safety.next.stderr
@@ -1,20 +1,11 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/object-safety.rs:5:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:13:12
+  --> $DIR/object-safety.rs:12:12
    |
 LL |     let x: &dyn Foo = todo!();
    |            ^^^^^^^^ `Foo` cannot be made into an object
    |
 note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
-  --> $DIR/object-safety.rs:9:14
+  --> $DIR/object-safety.rs:8:14
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
@@ -22,6 +13,6 @@ LL |     async fn foo(&self);
    |              ^^^ ...because method `foo` is `async`
    = help: consider moving `foo` to another trait
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/async-await/in-trait/object-safety.rs b/tests/ui/async-await/in-trait/object-safety.rs
index f67286a20a2..4edad1512e9 100644
--- a/tests/ui/async-await/in-trait/object-safety.rs
+++ b/tests/ui/async-await/in-trait/object-safety.rs
@@ -3,7 +3,6 @@
 // revisions: current next
 
 #![feature(async_fn_in_trait)]
-//~^ WARN the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
 
 trait Foo {
     async fn foo(&self);
diff --git a/tests/ui/async-await/in-trait/return-type-suggestion.current.stderr b/tests/ui/async-await/in-trait/return-type-suggestion.current.stderr
index a5efc757156..6a107d7beb8 100644
--- a/tests/ui/async-await/in-trait/return-type-suggestion.current.stderr
+++ b/tests/ui/async-await/in-trait/return-type-suggestion.current.stderr
@@ -1,14 +1,5 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/return-type-suggestion.rs:5:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error[E0308]: mismatched types
-  --> $DIR/return-type-suggestion.rs:10:9
+  --> $DIR/return-type-suggestion.rs:9:9
    |
 LL |         Ok(())
    |         ^^^^^^- help: consider using a semicolon here: `;`
@@ -18,6 +9,6 @@ LL |         Ok(())
    = note: expected unit type `()`
                    found enum `Result<(), _>`
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/in-trait/return-type-suggestion.next.stderr b/tests/ui/async-await/in-trait/return-type-suggestion.next.stderr
index a5efc757156..6a107d7beb8 100644
--- a/tests/ui/async-await/in-trait/return-type-suggestion.next.stderr
+++ b/tests/ui/async-await/in-trait/return-type-suggestion.next.stderr
@@ -1,14 +1,5 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/return-type-suggestion.rs:5:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error[E0308]: mismatched types
-  --> $DIR/return-type-suggestion.rs:10:9
+  --> $DIR/return-type-suggestion.rs:9:9
    |
 LL |         Ok(())
    |         ^^^^^^- help: consider using a semicolon here: `;`
@@ -18,6 +9,6 @@ LL |         Ok(())
    = note: expected unit type `()`
                    found enum `Result<(), _>`
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/async-await/in-trait/return-type-suggestion.rs b/tests/ui/async-await/in-trait/return-type-suggestion.rs
index 3de66306d9a..d63bccefa9f 100644
--- a/tests/ui/async-await/in-trait/return-type-suggestion.rs
+++ b/tests/ui/async-await/in-trait/return-type-suggestion.rs
@@ -3,7 +3,6 @@
 // revisions: current next
 
 #![feature(async_fn_in_trait)]
-//~^ WARN the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
 
 trait A {
     async fn e() {
diff --git a/tests/ui/async-await/issue-101715.stderr b/tests/ui/async-await/issue-101715.stderr
index a0e8d2a8943..d161fb0c05e 100644
--- a/tests/ui/async-await/issue-101715.stderr
+++ b/tests/ui/async-await/issue-101715.stderr
@@ -1,10 +1,10 @@
 error[E0277]: `()` is not a future
-  --> $DIR/issue-101715.rs:11:9
+  --> $DIR/issue-101715.rs:11:10
    |
 LL |         .await
-   |         ^^^^^^
-   |         |
-   |         `()` is not a future
+   |         -^^^^^
+   |         ||
+   |         |`()` is not a future
    |         help: remove the `.await`
    |
    = help: the trait `Future` is not implemented for `()`
diff --git a/tests/ui/async-await/issue-64130-1-sync.drop_tracking.stderr b/tests/ui/async-await/issue-64130-1-sync.drop_tracking.stderr
index c4c7f26c7c7..56aa035f44b 100644
--- a/tests/ui/async-await/issue-64130-1-sync.drop_tracking.stderr
+++ b/tests/ui/async-await/issue-64130-1-sync.drop_tracking.stderr
@@ -6,12 +6,12 @@ LL |     is_sync(bar());
    |
    = help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
 note: future is not `Sync` as this value is used across an await
-  --> $DIR/issue-64130-1-sync.rs:18:10
+  --> $DIR/issue-64130-1-sync.rs:18:11
    |
 LL |     let x = Foo;
    |         - has type `Foo` which is not `Sync`
 LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
+   |           ^^^^^ await occurs here, with `x` maybe used later
 LL |     drop(x);
 LL | }
    | - `x` is later dropped here
diff --git a/tests/ui/async-await/issue-64130-1-sync.drop_tracking_mir.stderr b/tests/ui/async-await/issue-64130-1-sync.drop_tracking_mir.stderr
index 6f43b568a7a..ea1bfb9f9ac 100644
--- a/tests/ui/async-await/issue-64130-1-sync.drop_tracking_mir.stderr
+++ b/tests/ui/async-await/issue-64130-1-sync.drop_tracking_mir.stderr
@@ -6,12 +6,12 @@ LL |     is_sync(bar());
    |
    = help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
 note: future is not `Sync` as this value is used across an await
-  --> $DIR/issue-64130-1-sync.rs:18:10
+  --> $DIR/issue-64130-1-sync.rs:18:11
    |
 LL |     let x = Foo;
    |         - has type `Foo` which is not `Sync`
 LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
+   |           ^^^^^ await occurs here, with `x` maybe used later
 note: required by a bound in `is_sync`
   --> $DIR/issue-64130-1-sync.rs:14:15
    |
diff --git a/tests/ui/async-await/issue-64130-1-sync.no_drop_tracking.stderr b/tests/ui/async-await/issue-64130-1-sync.no_drop_tracking.stderr
index c4c7f26c7c7..56aa035f44b 100644
--- a/tests/ui/async-await/issue-64130-1-sync.no_drop_tracking.stderr
+++ b/tests/ui/async-await/issue-64130-1-sync.no_drop_tracking.stderr
@@ -6,12 +6,12 @@ LL |     is_sync(bar());
    |
    = help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
 note: future is not `Sync` as this value is used across an await
-  --> $DIR/issue-64130-1-sync.rs:18:10
+  --> $DIR/issue-64130-1-sync.rs:18:11
    |
 LL |     let x = Foo;
    |         - has type `Foo` which is not `Sync`
 LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
+   |           ^^^^^ await occurs here, with `x` maybe used later
 LL |     drop(x);
 LL | }
    | - `x` is later dropped here
diff --git a/tests/ui/async-await/issue-64130-1-sync.stderr b/tests/ui/async-await/issue-64130-1-sync.stderr
deleted file mode 100644
index 8d5169a6302..00000000000
--- a/tests/ui/async-await/issue-64130-1-sync.stderr
+++ /dev/null
@@ -1,24 +0,0 @@
-error: future cannot be shared between threads safely
-  --> $DIR/issue-64130-1-sync.rs:24:13
-   |
-LL |     is_sync(bar());
-   |             ^^^^^ future returned by `bar` is not `Sync`
-   |
-   = help: within `impl Future<Output = ()>`, the trait `Sync` is not implemented for `Foo`
-note: future is not `Sync` as this value is used across an await
-  --> $DIR/issue-64130-1-sync.rs:18:10
-   |
-LL |     let x = Foo;
-   |         - has type `Foo` which is not `Sync`
-LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
-LL | }
-   | - `x` is later dropped here
-note: required by a bound in `is_sync`
-  --> $DIR/issue-64130-1-sync.rs:14:15
-   |
-LL | fn is_sync<T: Sync>(t: T) { }
-   |               ^^^^ required by this bound in `is_sync`
-
-error: aborting due to previous error
-
diff --git a/tests/ui/async-await/issue-64130-2-send.drop_tracking.stderr b/tests/ui/async-await/issue-64130-2-send.drop_tracking.stderr
index b6a73c2a5cb..d1717ad3310 100644
--- a/tests/ui/async-await/issue-64130-2-send.drop_tracking.stderr
+++ b/tests/ui/async-await/issue-64130-2-send.drop_tracking.stderr
@@ -6,12 +6,12 @@ LL |     is_send(bar());
    |
    = note: the trait bound `Unique<Foo>: Send` is not satisfied
 note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-64130-2-send.rs:18:10
+  --> $DIR/issue-64130-2-send.rs:18:11
    |
 LL |     let x = Box::new(Foo);
    |         - has type `Box<Foo>` which is not `Send`
 LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
+   |           ^^^^^ await occurs here, with `x` maybe used later
 LL | }
    | - `x` is later dropped here
 note: required by a bound in `is_send`
diff --git a/tests/ui/async-await/issue-64130-2-send.drop_tracking_mir.stderr b/tests/ui/async-await/issue-64130-2-send.drop_tracking_mir.stderr
index 560560f6036..45e43525a20 100644
--- a/tests/ui/async-await/issue-64130-2-send.drop_tracking_mir.stderr
+++ b/tests/ui/async-await/issue-64130-2-send.drop_tracking_mir.stderr
@@ -6,12 +6,12 @@ LL |     is_send(bar());
    |
    = note: the trait bound `Unique<Foo>: Send` is not satisfied
 note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-64130-2-send.rs:18:10
+  --> $DIR/issue-64130-2-send.rs:18:11
    |
 LL |     let x = Box::new(Foo);
    |         - has type `Box<Foo>` which is not `Send`
 LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
+   |           ^^^^^ await occurs here, with `x` maybe used later
 note: required by a bound in `is_send`
   --> $DIR/issue-64130-2-send.rs:14:15
    |
diff --git a/tests/ui/async-await/issue-64130-2-send.no_drop_tracking.stderr b/tests/ui/async-await/issue-64130-2-send.no_drop_tracking.stderr
index b6a73c2a5cb..d1717ad3310 100644
--- a/tests/ui/async-await/issue-64130-2-send.no_drop_tracking.stderr
+++ b/tests/ui/async-await/issue-64130-2-send.no_drop_tracking.stderr
@@ -6,12 +6,12 @@ LL |     is_send(bar());
    |
    = note: the trait bound `Unique<Foo>: Send` is not satisfied
 note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-64130-2-send.rs:18:10
+  --> $DIR/issue-64130-2-send.rs:18:11
    |
 LL |     let x = Box::new(Foo);
    |         - has type `Box<Foo>` which is not `Send`
 LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
+   |           ^^^^^ await occurs here, with `x` maybe used later
 LL | }
    | - `x` is later dropped here
 note: required by a bound in `is_send`
diff --git a/tests/ui/async-await/issue-64130-2-send.stderr b/tests/ui/async-await/issue-64130-2-send.stderr
deleted file mode 100644
index f6505cad69e..00000000000
--- a/tests/ui/async-await/issue-64130-2-send.stderr
+++ /dev/null
@@ -1,24 +0,0 @@
-error: future cannot be sent between threads safely
-  --> $DIR/issue-64130-2-send.rs:24:13
-   |
-LL |     is_send(bar());
-   |             ^^^^^ future returned by `bar` is not `Send`
-   |
-   = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Foo`
-note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-64130-2-send.rs:18:10
-   |
-LL |     let x = Foo;
-   |         - has type `Foo` which is not `Send`
-LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
-LL | }
-   | - `x` is later dropped here
-note: required by a bound in `is_send`
-  --> $DIR/issue-64130-2-send.rs:14:15
-   |
-LL | fn is_send<T: Send>(t: T) { }
-   |               ^^^^ required by this bound in `is_send`
-
-error: aborting due to previous error
-
diff --git a/tests/ui/async-await/issue-64130-3-other.drop_tracking.stderr b/tests/ui/async-await/issue-64130-3-other.drop_tracking.stderr
index d65aae8cc3f..b69f06da1cd 100644
--- a/tests/ui/async-await/issue-64130-3-other.drop_tracking.stderr
+++ b/tests/ui/async-await/issue-64130-3-other.drop_tracking.stderr
@@ -8,12 +8,12 @@ LL |     is_qux(bar());
    |            ^^^^^ within `impl Future<Output = ()>`, the trait `Qux` is not implemented for `Foo`
    |
 note: future does not implement `Qux` as this value is used across an await
-  --> $DIR/issue-64130-3-other.rs:21:10
+  --> $DIR/issue-64130-3-other.rs:21:11
    |
 LL |     let x = Box::new(Foo);
    |         - has type `Box<Foo>` which does not implement `Qux`
 LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
+   |           ^^^^^ await occurs here, with `x` maybe used later
 LL | }
    | - `x` is later dropped here
 note: required by a bound in `is_qux`
diff --git a/tests/ui/async-await/issue-64130-3-other.drop_tracking_mir.stderr b/tests/ui/async-await/issue-64130-3-other.drop_tracking_mir.stderr
index 8fed69d9d88..1298371241c 100644
--- a/tests/ui/async-await/issue-64130-3-other.drop_tracking_mir.stderr
+++ b/tests/ui/async-await/issue-64130-3-other.drop_tracking_mir.stderr
@@ -8,12 +8,12 @@ LL |     is_qux(bar());
    |            ^^^^^ within `impl Future<Output = ()>`, the trait `Qux` is not implemented for `Foo`
    |
 note: future does not implement `Qux` as this value is used across an await
-  --> $DIR/issue-64130-3-other.rs:21:10
+  --> $DIR/issue-64130-3-other.rs:21:11
    |
 LL |     let x = Box::new(Foo);
    |         - has type `Box<Foo>` which does not implement `Qux`
 LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
+   |           ^^^^^ await occurs here, with `x` maybe used later
 note: required by a bound in `is_qux`
   --> $DIR/issue-64130-3-other.rs:17:14
    |
diff --git a/tests/ui/async-await/issue-64130-3-other.no_drop_tracking.stderr b/tests/ui/async-await/issue-64130-3-other.no_drop_tracking.stderr
index d65aae8cc3f..b69f06da1cd 100644
--- a/tests/ui/async-await/issue-64130-3-other.no_drop_tracking.stderr
+++ b/tests/ui/async-await/issue-64130-3-other.no_drop_tracking.stderr
@@ -8,12 +8,12 @@ LL |     is_qux(bar());
    |            ^^^^^ within `impl Future<Output = ()>`, the trait `Qux` is not implemented for `Foo`
    |
 note: future does not implement `Qux` as this value is used across an await
-  --> $DIR/issue-64130-3-other.rs:21:10
+  --> $DIR/issue-64130-3-other.rs:21:11
    |
 LL |     let x = Box::new(Foo);
    |         - has type `Box<Foo>` which does not implement `Qux`
 LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
+   |           ^^^^^ await occurs here, with `x` maybe used later
 LL | }
    | - `x` is later dropped here
 note: required by a bound in `is_qux`
diff --git a/tests/ui/async-await/issue-64130-3-other.stderr b/tests/ui/async-await/issue-64130-3-other.stderr
deleted file mode 100644
index cb36a3811b2..00000000000
--- a/tests/ui/async-await/issue-64130-3-other.stderr
+++ /dev/null
@@ -1,27 +0,0 @@
-error[E0277]: the trait bound `Foo: Qux` is not satisfied in `impl Future<Output = ()>`
-  --> $DIR/issue-64130-3-other.rs:27:12
-   |
-LL | async fn bar() {
-   |                - within this `impl Future<Output = ()>`
-...
-LL |     is_qux(bar());
-   |            ^^^^^ within `impl Future<Output = ()>`, the trait `Qux` is not implemented for `Foo`
-   |
-note: future does not implement `Qux` as this value is used across an await
-  --> $DIR/issue-64130-3-other.rs:21:10
-   |
-LL |     let x = Foo;
-   |         - has type `Foo` which does not implement `Qux`
-LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `x` maybe used later
-LL | }
-   | - `x` is later dropped here
-note: required by a bound in `is_qux`
-  --> $DIR/issue-64130-3-other.rs:17:14
-   |
-LL | fn is_qux<T: Qux>(t: T) {}
-   |              ^^^ required by this bound in `is_qux`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/issue-64130-4-async-move.no_drop_tracking.stderr b/tests/ui/async-await/issue-64130-4-async-move.no_drop_tracking.stderr
index 0bc7cb2f2ac..4b575a3d3b4 100644
--- a/tests/ui/async-await/issue-64130-4-async-move.no_drop_tracking.stderr
+++ b/tests/ui/async-await/issue-64130-4-async-move.no_drop_tracking.stderr
@@ -6,13 +6,13 @@ LL | pub fn foo() -> impl Future + Send {
    |
    = help: the trait `Sync` is not implemented for `(dyn Any + Send + 'static)`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-64130-4-async-move.rs:27:31
+  --> $DIR/issue-64130-4-async-move.rs:27:32
    |
 LL |         match client.status() {
    |               ------ has type `&Client` which is not `Send`
 LL |             200 => {
 LL |                 let _x = get().await;
-   |                               ^^^^^^ await occurs here, with `client` maybe used later
+   |                                ^^^^^ await occurs here, with `client` maybe used later
 ...
 LL |     }
    |     - `client` is later dropped here
diff --git a/tests/ui/async-await/issue-64130-non-send-future-diags.stderr b/tests/ui/async-await/issue-64130-non-send-future-diags.stderr
index 1da80d98bf8..e044e2ca011 100644
--- a/tests/ui/async-await/issue-64130-non-send-future-diags.stderr
+++ b/tests/ui/async-await/issue-64130-non-send-future-diags.stderr
@@ -6,12 +6,12 @@ LL |     is_send(foo());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, u32>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-64130-non-send-future-diags.rs:17:10
+  --> $DIR/issue-64130-non-send-future-diags.rs:17:11
    |
 LL |     let g = x.lock().unwrap();
    |         - has type `MutexGuard<'_, u32>` which is not `Send`
 LL |     baz().await;
-   |          ^^^^^^ await occurs here, with `g` maybe used later
+   |           ^^^^^ await occurs here, with `g` maybe used later
 LL | }
    | - `g` is later dropped here
 note: required by a bound in `is_send`
diff --git a/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking.stderr b/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking.stderr
index fc8bcc8ae79..fa22298658b 100644
--- a/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking.stderr
+++ b/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking.stderr
@@ -11,12 +11,12 @@ LL | |     });
    |
    = help: within `[async block@$DIR/issue-67252-unnamed-future.rs:21:11: 25:6]`, the trait `Send` is not implemented for `*mut ()`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-67252-unnamed-future.rs:23:16
+  --> $DIR/issue-67252-unnamed-future.rs:23:17
    |
 LL |         let a = std::ptr::null_mut::<()>(); // `*mut ()` is not `Send`
    |             - has type `*mut ()` which is not `Send`
 LL |         AFuture.await;
-   |                ^^^^^^ await occurs here, with `a` maybe used later
+   |                 ^^^^^ await occurs here, with `a` maybe used later
 LL |         drop(a);
 LL |     });
    |     - `a` is later dropped here
diff --git a/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking_mir.stderr b/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking_mir.stderr
index a3ef7add116..8cf7bb8d917 100644
--- a/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking_mir.stderr
+++ b/tests/ui/async-await/issue-67252-unnamed-future.drop_tracking_mir.stderr
@@ -6,12 +6,12 @@ LL |     spawn(async {
    |
    = help: within `[async block@$DIR/issue-67252-unnamed-future.rs:21:11: 25:6]`, the trait `Send` is not implemented for `*mut ()`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-67252-unnamed-future.rs:23:16
+  --> $DIR/issue-67252-unnamed-future.rs:23:17
    |
 LL |         let a = std::ptr::null_mut::<()>(); // `*mut ()` is not `Send`
    |             - has type `*mut ()` which is not `Send`
 LL |         AFuture.await;
-   |                ^^^^^^ await occurs here, with `a` maybe used later
+   |                 ^^^^^ await occurs here, with `a` maybe used later
 note: required by a bound in `spawn`
   --> $DIR/issue-67252-unnamed-future.rs:9:13
    |
diff --git a/tests/ui/async-await/issue-67252-unnamed-future.no_drop_tracking.stderr b/tests/ui/async-await/issue-67252-unnamed-future.no_drop_tracking.stderr
index fc8bcc8ae79..fa22298658b 100644
--- a/tests/ui/async-await/issue-67252-unnamed-future.no_drop_tracking.stderr
+++ b/tests/ui/async-await/issue-67252-unnamed-future.no_drop_tracking.stderr
@@ -11,12 +11,12 @@ LL | |     });
    |
    = help: within `[async block@$DIR/issue-67252-unnamed-future.rs:21:11: 25:6]`, the trait `Send` is not implemented for `*mut ()`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-67252-unnamed-future.rs:23:16
+  --> $DIR/issue-67252-unnamed-future.rs:23:17
    |
 LL |         let a = std::ptr::null_mut::<()>(); // `*mut ()` is not `Send`
    |             - has type `*mut ()` which is not `Send`
 LL |         AFuture.await;
-   |                ^^^^^^ await occurs here, with `a` maybe used later
+   |                 ^^^^^ await occurs here, with `a` maybe used later
 LL |         drop(a);
 LL |     });
    |     - `a` is later dropped here
diff --git a/tests/ui/async-await/issue-70594.stderr b/tests/ui/async-await/issue-70594.stderr
index d3cf57d3b14..9866e00bb83 100644
--- a/tests/ui/async-await/issue-70594.stderr
+++ b/tests/ui/async-await/issue-70594.stderr
@@ -1,10 +1,10 @@
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/issue-70594.rs:4:11
+  --> $DIR/issue-70594.rs:4:12
    |
 LL | async fn fun() {
    |          --- this is not `async`
 LL |     [1; ().await];
-   |           ^^^^^^ only allowed inside `async` functions and blocks
+   |            ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0744]: `.await` is not allowed in a `const`
   --> $DIR/issue-70594.rs:4:9
@@ -13,18 +13,18 @@ LL |     [1; ().await];
    |         ^^^^^^^^
 
 error[E0744]: `.await` is not allowed in a `const`
-  --> $DIR/issue-70594.rs:4:11
+  --> $DIR/issue-70594.rs:4:12
    |
 LL |     [1; ().await];
-   |           ^^^^^^
+   |            ^^^^^
 
 error[E0277]: `()` is not a future
-  --> $DIR/issue-70594.rs:4:11
+  --> $DIR/issue-70594.rs:4:12
    |
 LL |     [1; ().await];
-   |           ^^^^^^
-   |           |
-   |           `()` is not a future
+   |           -^^^^^
+   |           ||
+   |           |`()` is not a future
    |           help: remove the `.await`
    |
    = help: the trait `Future` is not implemented for `()`
diff --git a/tests/ui/async-await/issue-70818.stderr b/tests/ui/async-await/issue-70818.stderr
deleted file mode 100644
index ab0698c3ec2..00000000000
--- a/tests/ui/async-await/issue-70818.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error: future cannot be sent between threads safely
-  --> $DIR/issue-70818.rs:7:38
-   |
-LL | fn foo<T: Send, U>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
-   |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ future created by async block is not `Send`
-   |
-note: captured value is not `Send`
-  --> $DIR/issue-70818.rs:9:18
-   |
-LL |     async { (ty, ty1) }
-   |                  ^^^ has type `U` which is not `Send`
-help: consider restricting type parameter `U`
-   |
-LL | fn foo<T: Send, U: std::marker::Send>(ty: T, ty1: U) -> impl Future<Output = (T, U)> + Send {
-   |                  +++++++++++++++++++
-
-error: aborting due to previous error
-
diff --git a/tests/ui/async-await/issue-70935-complex-spans.no_drop_tracking.stderr b/tests/ui/async-await/issue-70935-complex-spans.no_drop_tracking.stderr
index 8036d82daa4..ef0e182e515 100644
--- a/tests/ui/async-await/issue-70935-complex-spans.no_drop_tracking.stderr
+++ b/tests/ui/async-await/issue-70935-complex-spans.no_drop_tracking.stderr
@@ -6,15 +6,15 @@ LL | fn foo(tx: std::sync::mpsc::Sender<i32>) -> impl Future + Send {
    |
    = help: the trait `Sync` is not implemented for `Sender<i32>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-70935-complex-spans.rs:19:11
+  --> $DIR/issue-70935-complex-spans.rs:19:12
    |
 LL |           baz(|| async{
    |  _____________-
 LL | |             foo(tx.clone());
 LL | |         }).await;
-   | |         - ^^^^^^- the value is later dropped here
-   | |         | |
-   | |_________| await occurs here, with the value maybe used later
+   | |         -  ^^^^^- the value is later dropped here
+   | |         |  |
+   | |_________|  await occurs here, with the value maybe used later
    |           has type `[closure@$DIR/issue-70935-complex-spans.rs:17:13: 17:15]` which is not `Send`
 
 error: aborting due to previous error
diff --git a/tests/ui/async-await/issue-71137.stderr b/tests/ui/async-await/issue-71137.stderr
index eade6aa2d3d..a344246d6bf 100644
--- a/tests/ui/async-await/issue-71137.stderr
+++ b/tests/ui/async-await/issue-71137.stderr
@@ -6,12 +6,12 @@ LL |   fake_spawn(wrong_mutex());
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, i32>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-71137.rs:14:25
+  --> $DIR/issue-71137.rs:14:26
    |
 LL |     let mut guard = m.lock().unwrap();
    |         --------- has type `MutexGuard<'_, i32>` which is not `Send`
 LL |     (async { "right"; }).await;
-   |                         ^^^^^^ await occurs here, with `mut guard` maybe used later
+   |                          ^^^^^ await occurs here, with `mut guard` maybe used later
 LL |     *guard += 1;
 LL |   }
    |   - `mut guard` is later dropped here
diff --git a/tests/ui/async-await/issue-73741-type-err-drop-tracking.stderr b/tests/ui/async-await/issue-73741-type-err-drop-tracking.stderr
deleted file mode 100644
index 6d19c3beb2f..00000000000
--- a/tests/ui/async-await/issue-73741-type-err-drop-tracking.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error[E0070]: invalid left-hand side of assignment
-  --> $DIR/issue-73741-type-err-drop-tracking.rs:11:7
-   |
-LL |     1 = 2;
-   |     - ^
-   |     |
-   |     cannot assign to this expression
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0070`.
diff --git a/tests/ui/async-await/issue-98634.stderr b/tests/ui/async-await/issue-98634.stderr
index 5b7f18a98b5..574904ceafa 100644
--- a/tests/ui/async-await/issue-98634.stderr
+++ b/tests/ui/async-await/issue-98634.stderr
@@ -23,10 +23,10 @@ LL | pub struct StructAsync<F: Fn() -> Pin<Box<dyn Future<Output = ()>>>> {
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `StructAsync`
 
 error[E0271]: expected `callback` to be a fn item that returns `Pin<Box<dyn Future<Output = ()>>>`, but it returns `impl Future<Output = ()>`
-  --> $DIR/issue-98634.rs:45:33
+  --> $DIR/issue-98634.rs:45:34
    |
 LL |         StructAsync { callback }.await;
-   |                                 ^^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found future
+   |                                  ^^^^^ expected `Pin<Box<dyn Future<Output = ()>>>`, found future
    |
 note: required by a bound in `StructAsync`
   --> $DIR/issue-98634.rs:9:35
diff --git a/tests/ui/async-await/issues/issue-102206.stderr b/tests/ui/async-await/issues/issue-102206.stderr
index 750b7a886ef..cd845056805 100644
--- a/tests/ui/async-await/issues/issue-102206.stderr
+++ b/tests/ui/async-await/issues/issue-102206.stderr
@@ -2,14 +2,16 @@ error[E0308]: mismatched types
   --> $DIR/issue-102206.rs:6:27
    |
 LL |     std::mem::size_of_val(foo());
-   |     --------------------- ^^^^^
-   |     |                     |
-   |     |                     expected `&_`, found future
-   |     |                     help: consider borrowing here: `&foo()`
+   |     --------------------- ^^^^^ expected `&_`, found future
+   |     |
    |     arguments to this function are incorrect
    |
 note: function defined here
   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+help: consider borrowing here
+   |
+LL |     std::mem::size_of_val(&foo());
+   |                           +
 
 error: aborting due to previous error
 
diff --git a/tests/ui/async-await/issues/issue-107280.stderr b/tests/ui/async-await/issues/issue-107280.stderr
index dd3e10fcc18..2e69862a0e0 100644
--- a/tests/ui/async-await/issues/issue-107280.stderr
+++ b/tests/ui/async-await/issues/issue-107280.stderr
@@ -23,10 +23,10 @@ LL |     inner::<false>().await
    |     ^^^^^^^^^^^^^^ cannot infer the value of const parameter `PING` declared on the function `inner`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/issue-107280.rs:4:21
+  --> $DIR/issue-107280.rs:4:22
    |
 LL |     inner::<false>().await
-   |                     ^^^^^^
+   |                      ^^^^^
 
 error[E0698]: type inside `async fn` body must be known in this context
   --> $DIR/issue-107280.rs:4:5
@@ -35,10 +35,10 @@ LL |     inner::<false>().await
    |     ^^^^^^^^^^^^^^ cannot infer the value of const parameter `PING` declared on the function `inner`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/issue-107280.rs:4:21
+  --> $DIR/issue-107280.rs:4:22
    |
 LL |     inner::<false>().await
-   |                     ^^^^^^
+   |                      ^^^^^
 
 error[E0698]: type inside `async fn` body must be known in this context
   --> $DIR/issue-107280.rs:4:5
@@ -47,10 +47,10 @@ LL |     inner::<false>().await
    |     ^^^^^^^^^^^^^^ cannot infer the value of const parameter `PING` declared on the function `inner`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/issue-107280.rs:4:21
+  --> $DIR/issue-107280.rs:4:22
    |
 LL |     inner::<false>().await
-   |                     ^^^^^^
+   |                      ^^^^^
 
 error[E0698]: type inside `async fn` body must be known in this context
   --> $DIR/issue-107280.rs:4:5
@@ -59,10 +59,10 @@ LL |     inner::<false>().await
    |     ^^^^^^^^^^^^^^ cannot infer the value of const parameter `PING` declared on the function `inner`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/issue-107280.rs:4:21
+  --> $DIR/issue-107280.rs:4:22
    |
 LL |     inner::<false>().await
-   |                     ^^^^^^
+   |                      ^^^^^
 
 error[E0698]: type inside `async fn` body must be known in this context
   --> $DIR/issue-107280.rs:4:5
@@ -71,10 +71,10 @@ LL |     inner::<false>().await
    |     ^^^^^^^^^^^^^^ cannot infer the value of const parameter `PING` declared on the function `inner`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/issue-107280.rs:4:21
+  --> $DIR/issue-107280.rs:4:22
    |
 LL |     inner::<false>().await
-   |                     ^^^^^^
+   |                      ^^^^^
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/async-await/issues/issue-51719.stderr b/tests/ui/async-await/issues/issue-51719.stderr
index f3ce5d1c897..19cc339ec0a 100644
--- a/tests/ui/async-await/issues/issue-51719.stderr
+++ b/tests/ui/async-await/issues/issue-51719.stderr
@@ -1,8 +1,8 @@
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/issue-51719.rs:8:24
+  --> $DIR/issue-51719.rs:8:25
    |
 LL |     let _gen = || foo().await;
-   |                --      ^^^^^^ only allowed inside `async` functions and blocks
+   |                --       ^^^^^ only allowed inside `async` functions and blocks
    |                |
    |                this is not `async`
 
diff --git a/tests/ui/async-await/issues/issue-51751.stderr b/tests/ui/async-await/issues/issue-51751.stderr
index 8696a5b798b..6dd3726608b 100644
--- a/tests/ui/async-await/issues/issue-51751.stderr
+++ b/tests/ui/async-await/issues/issue-51751.stderr
@@ -1,11 +1,11 @@
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/issue-51751.rs:9:26
+  --> $DIR/issue-51751.rs:9:27
    |
 LL | fn main() {
    |    ---- this is not `async`
 LL |     let result = inc(10000);
 LL |     let finished = result.await;
-   |                          ^^^^^^ only allowed inside `async` functions and blocks
+   |                           ^^^^^ only allowed inside `async` functions and blocks
 
 error: aborting due to previous error
 
diff --git a/tests/ui/async-await/issues/issue-62009-1.stderr b/tests/ui/async-await/issues/issue-62009-1.stderr
index 222afb2c7b2..53d0577a1b2 100644
--- a/tests/ui/async-await/issues/issue-62009-1.stderr
+++ b/tests/ui/async-await/issues/issue-62009-1.stderr
@@ -1,36 +1,36 @@
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/issue-62009-1.rs:6:22
+  --> $DIR/issue-62009-1.rs:6:23
    |
 LL | fn main() {
    |    ---- this is not `async`
 LL |     async { let (); }.await;
-   |                      ^^^^^^ only allowed inside `async` functions and blocks
+   |                       ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/issue-62009-1.rs:10:6
+  --> $DIR/issue-62009-1.rs:10:7
    |
 LL | fn main() {
    |    ---- this is not `async`
 ...
 LL |     }.await;
-   |      ^^^^^^ only allowed inside `async` functions and blocks
+   |       ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/issue-62009-1.rs:12:15
+  --> $DIR/issue-62009-1.rs:12:16
    |
 LL | fn main() {
    |    ---- this is not `async`
 ...
 LL |     (|_| 2333).await;
-   |               ^^^^^^ only allowed inside `async` functions and blocks
+   |                ^^^^^ only allowed inside `async` functions and blocks
 
 error[E0277]: `[closure@$DIR/issue-62009-1.rs:12:6: 12:9]` is not a future
-  --> $DIR/issue-62009-1.rs:12:15
+  --> $DIR/issue-62009-1.rs:12:16
    |
 LL |     (|_| 2333).await;
-   |               ^^^^^^
-   |               |
-   |               `[closure@$DIR/issue-62009-1.rs:12:6: 12:9]` is not a future
+   |               -^^^^^
+   |               ||
+   |               |`[closure@$DIR/issue-62009-1.rs:12:6: 12:9]` is not a future
    |               help: remove the `.await`
    |
    = help: the trait `Future` is not implemented for closure `[closure@$DIR/issue-62009-1.rs:12:6: 12:9]`
diff --git a/tests/ui/async-await/issues/issue-62009-2.stderr b/tests/ui/async-await/issues/issue-62009-2.stderr
index 92e9a8a69a8..9c2f20df657 100644
--- a/tests/ui/async-await/issues/issue-62009-2.stderr
+++ b/tests/ui/async-await/issues/issue-62009-2.stderr
@@ -1,10 +1,10 @@
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/issue-62009-2.rs:8:22
+  --> $DIR/issue-62009-2.rs:8:23
    |
 LL | fn main() {
    |    ---- this is not `async`
 LL |     (async || 2333)().await;
-   |                      ^^^^^^ only allowed inside `async` functions and blocks
+   |                       ^^^^^ only allowed inside `async` functions and blocks
 
 error: aborting due to previous error
 
diff --git a/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.no_drop_tracking.stderr b/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.no_drop_tracking.stderr
index 8745bdd973b..53d32620241 100644
--- a/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.no_drop_tracking.stderr
+++ b/tests/ui/async-await/issues/issue-65436-raw-ptr-not-send.no_drop_tracking.stderr
@@ -10,12 +10,12 @@ LL | |     })
    |
    = help: within `[async block@$DIR/issue-65436-raw-ptr-not-send.rs:17:17: 20:6]`, the trait `Send` is not implemented for `*const u8`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/issue-65436-raw-ptr-not-send.rs:19:35
+  --> $DIR/issue-65436-raw-ptr-not-send.rs:19:36
    |
 LL |         bar(Foo(std::ptr::null())).await;
-   |                 ----------------  ^^^^^^- `std::ptr::null()` is later dropped here
-   |                 |                 |
-   |                 |                 await occurs here, with `std::ptr::null()` maybe used later
+   |                 ----------------   ^^^^^- `std::ptr::null()` is later dropped here
+   |                 |                  |
+   |                 |                  await occurs here, with `std::ptr::null()` maybe used later
    |                 has type `*const u8` which is not `Send`
 help: consider moving this into a `let` binding to create a shorter lived borrow
   --> $DIR/issue-65436-raw-ptr-not-send.rs:19:13
diff --git a/tests/ui/async-await/issues/issue-67893.stderr b/tests/ui/async-await/issues/issue-67893.stderr
index ce9424c8b25..c941b9eeb29 100644
--- a/tests/ui/async-await/issues/issue-67893.stderr
+++ b/tests/ui/async-await/issues/issue-67893.stderr
@@ -6,12 +6,12 @@ LL |     g(issue_67893::run())
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/auxiliary/issue_67893.rs:12:26
+  --> $DIR/auxiliary/issue_67893.rs:12:27
    |
 LL |     f(*x.lock().unwrap()).await;
-   |        ----------------- ^^^^^^- `x.lock().unwrap()` is later dropped here
-   |        |                 |
-   |        |                 await occurs here, with `x.lock().unwrap()` maybe used later
+   |        -----------------  ^^^^^- `x.lock().unwrap()` is later dropped here
+   |        |                  |
+   |        |                  await occurs here, with `x.lock().unwrap()` maybe used later
    |        has type `MutexGuard<'_, ()>` which is not `Send`
 note: required by a bound in `g`
   --> $DIR/issue-67893.rs:6:14
diff --git a/tests/ui/async-await/issues/non-async-enclosing-span.stderr b/tests/ui/async-await/issues/non-async-enclosing-span.stderr
index 20b827479fa..b6583022c16 100644
--- a/tests/ui/async-await/issues/non-async-enclosing-span.stderr
+++ b/tests/ui/async-await/issues/non-async-enclosing-span.stderr
@@ -1,11 +1,11 @@
 error[E0728]: `await` is only allowed inside `async` functions and blocks
-  --> $DIR/non-async-enclosing-span.rs:9:27
+  --> $DIR/non-async-enclosing-span.rs:9:28
    |
 LL | fn main() {
    |    ---- this is not `async`
 LL |     let x = move || {};
 LL |     let y = do_the_thing().await;
-   |                           ^^^^^^ only allowed inside `async` functions and blocks
+   |                            ^^^^^ only allowed inside `async` functions and blocks
 
 error: aborting due to previous error
 
diff --git a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.stderr b/tests/ui/async-await/mutually-recursive-async-impl-trait-type.stderr
deleted file mode 100644
index 8a7317bb95a..00000000000
--- a/tests/ui/async-await/mutually-recursive-async-impl-trait-type.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0733]: recursion in an `async fn` requires boxing
-  --> $DIR/mutually-recursive-async-impl-trait-type.rs:9:18
-   |
-LL | async fn rec_1() {
-   |                  ^ recursive `async fn`
-   |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
-
-error[E0733]: recursion in an `async fn` requires boxing
-  --> $DIR/mutually-recursive-async-impl-trait-type.rs:13:18
-   |
-LL | async fn rec_2() {
-   |                  ^ recursive `async fn`
-   |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0733`.
diff --git a/tests/ui/async-await/recursive-async-impl-trait-type.stderr b/tests/ui/async-await/recursive-async-impl-trait-type.stderr
deleted file mode 100644
index 7e63a8da552..00000000000
--- a/tests/ui/async-await/recursive-async-impl-trait-type.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0733]: recursion in an `async fn` requires boxing
-  --> $DIR/recursive-async-impl-trait-type.rs:8:40
-   |
-LL | async fn recursive_async_function() -> () {
-   |                                        ^^ recursive `async fn`
-   |
-   = note: a recursive `async fn` must be rewritten to return a boxed `dyn Future`
-   = note: consider using the `async_recursion` crate: https://crates.io/crates/async_recursion
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0733`.
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
index b4a3924d8da..33e22dec3f7 100644
--- a/tests/ui/async-await/return-type-notation/issue-110963-early.stderr
+++ b/tests/ui/async-await/return-type-notation/issue-110963-early.stderr
@@ -7,14 +7,6 @@ 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
    |
@@ -41,5 +33,5 @@ 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
+error: aborting due to 2 previous errors; 1 warning 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
index 2a35922eaa1..17b5d775d44 100644
--- a/tests/ui/async-await/return-type-notation/issue-110963-late.rs
+++ b/tests/ui/async-await/return-type-notation/issue-110963-late.rs
@@ -4,7 +4,6 @@
 #![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;
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
index 36ef3ad0a4c..9c6966537a7 100644
--- a/tests/ui/async-await/return-type-notation/issue-110963-late.stderr
+++ b/tests/ui/async-await/return-type-notation/issue-110963-late.stderr
@@ -7,13 +7,5 @@ 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
+warning: 1 warning emitted
 
diff --git a/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs
new file mode 100644
index 00000000000..028e526b5f5
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.rs
@@ -0,0 +1,32 @@
+// edition:2021
+
+#![feature(async_fn_in_trait, return_type_notation)]
+//~^ WARN the feature `return_type_notation` is incomplete
+
+trait Super1<'a> {
+    async fn test();
+}
+impl Super1<'_> for () {
+    async fn test() {}
+}
+
+trait Super2 {
+    async fn test();
+}
+impl Super2 for () {
+    async fn test() {}
+}
+
+trait Foo: for<'a> Super1<'a> + Super2 {}
+impl Foo for () {}
+
+fn test<T>()
+where
+    T: Foo<test(): Send>,
+    //~^ ERROR ambiguous associated function `test` for `Foo`
+{
+}
+
+fn main() {
+    test::<()>();
+}
diff --git a/tests/ui/async-await/return-type-notation/super-method-bound-ambig.stderr b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.stderr
new file mode 100644
index 00000000000..5bc8dbde4bc
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/super-method-bound-ambig.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/super-method-bound-ambig.rs:3:31
+   |
+LL | #![feature(async_fn_in_trait, 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
+
+error: ambiguous associated function `test` for `Foo`
+  --> $DIR/super-method-bound-ambig.rs:25:12
+   |
+LL |     T: Foo<test(): Send>,
+   |            ^^^^^^^^^^^^
+   |
+   = note: `test` is declared in two supertraits: `Super2` and `Super1<'a>`
+
+error: aborting due to previous error; 1 warning emitted
+
diff --git a/tests/ui/async-await/return-type-notation/super-method-bound.rs b/tests/ui/async-await/return-type-notation/super-method-bound.rs
new file mode 100644
index 00000000000..58ea3578db6
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/super-method-bound.rs
@@ -0,0 +1,25 @@
+// edition:2021
+// check-pass
+
+#![feature(async_fn_in_trait, return_type_notation)]
+//~^ WARN the feature `return_type_notation` is incomplete
+
+trait Super<'a> {
+    async fn test();
+}
+impl Super<'_> for () {
+    async fn test() {}
+}
+
+trait Foo: for<'a> Super<'a> {}
+impl Foo for () {}
+
+fn test<T>()
+where
+    T: Foo<test(): Send>,
+{
+}
+
+fn main() {
+    test::<()>();
+}
diff --git a/tests/ui/async-await/return-type-notation/super-method-bound.stderr b/tests/ui/async-await/return-type-notation/super-method-bound.stderr
new file mode 100644
index 00000000000..ac0668d3c44
--- /dev/null
+++ b/tests/ui/async-await/return-type-notation/super-method-bound.stderr
@@ -0,0 +1,11 @@
+warning: the feature `return_type_notation` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/super-method-bound.rs:4:31
+   |
+LL | #![feature(async_fn_in_trait, 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: 1 warning emitted
+
diff --git a/tests/ui/async-await/unnecessary-await.rs b/tests/ui/async-await/unnecessary-await.rs
index 24673777b80..cd1e2871432 100644
--- a/tests/ui/async-await/unnecessary-await.rs
+++ b/tests/ui/async-await/unnecessary-await.rs
@@ -11,4 +11,24 @@ async fn baz() -> std::io::Result<()> {
     std::io::Result::Ok(())
 }
 
+macro_rules! e {
+    () => {
+        ()
+    };
+}
+
+macro_rules! f {
+    ($expr:expr) => {
+        $expr.await
+        //~^ ERROR `()` is not a future
+    };
+}
+
+async fn with_macros() {
+    e!().await;
+    //~^ ERROR `()` is not a future
+
+    f!(());
+}
+
 fn main() {}
diff --git a/tests/ui/async-await/unnecessary-await.stderr b/tests/ui/async-await/unnecessary-await.stderr
index dc308933697..9a2a035b2dd 100644
--- a/tests/ui/async-await/unnecessary-await.stderr
+++ b/tests/ui/async-await/unnecessary-await.stderr
@@ -1,8 +1,8 @@
 error[E0277]: `()` is not a future
-  --> $DIR/unnecessary-await.rs:9:10
+  --> $DIR/unnecessary-await.rs:9:11
    |
 LL |     boo().await;
-   |     -----^^^^^^ `()` is not a future
+   |     ----- ^^^^^ `()` is not a future
    |     |
    |     this call returns `()`
    |
@@ -19,6 +19,36 @@ help: alternatively, consider making `fn boo` asynchronous
 LL | async fn boo() {}
    | +++++
 
-error: aborting due to previous error
+error[E0277]: `()` is not a future
+  --> $DIR/unnecessary-await.rs:28:10
+   |
+LL |     e!().await;
+   |         -^^^^^
+   |         ||
+   |         |`()` is not a future
+   |         help: remove the `.await`
+   |
+   = help: the trait `Future` is not implemented for `()`
+   = note: () must be a future or must implement `IntoFuture` to be awaited
+   = note: required for `()` to implement `IntoFuture`
+
+error[E0277]: `()` is not a future
+  --> $DIR/unnecessary-await.rs:22:15
+   |
+LL |         $expr.await
+   |               ^^^^^
+   |               |
+   |               `()` is not a future
+   |               remove the `.await`
+...
+LL |     f!(());
+   |     ------ in this macro invocation
+   |
+   = help: the trait `Future` is not implemented for `()`
+   = note: () must be a future or must implement `IntoFuture` to be awaited
+   = note: required for `()` to implement `IntoFuture`
+   = note: this error originates in the macro `f` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/unresolved_type_param.drop_tracking.stderr b/tests/ui/async-await/unresolved_type_param.drop_tracking.stderr
index 912e2b34c05..6b4a3a36395 100644
--- a/tests/ui/async-await/unresolved_type_param.drop_tracking.stderr
+++ b/tests/ui/async-await/unresolved_type_param.drop_tracking.stderr
@@ -5,10 +5,10 @@ LL |     bar().await;
    |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/unresolved_type_param.rs:12:10
+  --> $DIR/unresolved_type_param.rs:12:11
    |
 LL |     bar().await;
-   |          ^^^^^^
+   |           ^^^^^
 
 error[E0698]: type inside `async fn` body must be known in this context
   --> $DIR/unresolved_type_param.rs:12:5
@@ -17,10 +17,10 @@ LL |     bar().await;
    |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/unresolved_type_param.rs:12:10
+  --> $DIR/unresolved_type_param.rs:12:11
    |
 LL |     bar().await;
-   |          ^^^^^^
+   |           ^^^^^
 
 error[E0698]: type inside `async fn` body must be known in this context
   --> $DIR/unresolved_type_param.rs:12:5
@@ -29,10 +29,10 @@ LL |     bar().await;
    |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/unresolved_type_param.rs:12:10
+  --> $DIR/unresolved_type_param.rs:12:11
    |
 LL |     bar().await;
-   |          ^^^^^^
+   |           ^^^^^
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/async-await/unresolved_type_param.no_drop_tracking.stderr b/tests/ui/async-await/unresolved_type_param.no_drop_tracking.stderr
index 16d618caa57..6642e90acd8 100644
--- a/tests/ui/async-await/unresolved_type_param.no_drop_tracking.stderr
+++ b/tests/ui/async-await/unresolved_type_param.no_drop_tracking.stderr
@@ -5,10 +5,10 @@ LL |     bar().await;
    |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/unresolved_type_param.rs:12:10
+  --> $DIR/unresolved_type_param.rs:12:11
    |
 LL |     bar().await;
-   |          ^^^^^^
+   |           ^^^^^
 
 error[E0698]: type inside `async fn` body must be known in this context
   --> $DIR/unresolved_type_param.rs:12:5
@@ -17,10 +17,10 @@ LL |     bar().await;
    |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/unresolved_type_param.rs:12:10
+  --> $DIR/unresolved_type_param.rs:12:11
    |
 LL |     bar().await;
-   |          ^^^^^^
+   |           ^^^^^
 
 error[E0698]: type inside `async fn` body must be known in this context
   --> $DIR/unresolved_type_param.rs:12:5
@@ -29,10 +29,10 @@ LL |     bar().await;
    |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/unresolved_type_param.rs:12:10
+  --> $DIR/unresolved_type_param.rs:12:11
    |
 LL |     bar().await;
-   |          ^^^^^^
+   |           ^^^^^
 
 error[E0698]: type inside `async fn` body must be known in this context
   --> $DIR/unresolved_type_param.rs:12:5
@@ -41,10 +41,10 @@ LL |     bar().await;
    |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/unresolved_type_param.rs:12:10
+  --> $DIR/unresolved_type_param.rs:12:11
    |
 LL |     bar().await;
-   |          ^^^^^^
+   |           ^^^^^
 
 error[E0698]: type inside `async fn` body must be known in this context
   --> $DIR/unresolved_type_param.rs:12:5
@@ -53,10 +53,10 @@ LL |     bar().await;
    |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
    |
 note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/unresolved_type_param.rs:12:10
+  --> $DIR/unresolved_type_param.rs:12:11
    |
 LL |     bar().await;
-   |          ^^^^^^
+   |           ^^^^^
 
 error: aborting due to 5 previous errors
 
diff --git a/tests/ui/async-await/unresolved_type_param.stderr b/tests/ui/async-await/unresolved_type_param.stderr
deleted file mode 100644
index 64a31b5fc32..00000000000
--- a/tests/ui/async-await/unresolved_type_param.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error[E0698]: type inside `async fn` body must be known in this context
-  --> $DIR/unresolved_type_param.rs:13:5
-   |
-LL |     bar().await;
-   |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
-   |
-note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/unresolved_type_param.rs:13:10
-   |
-LL |     bar().await;
-   |          ^^^^^^
-
-error[E0698]: type inside `async fn` body must be known in this context
-  --> $DIR/unresolved_type_param.rs:13:5
-   |
-LL |     bar().await;
-   |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
-   |
-note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/unresolved_type_param.rs:13:10
-   |
-LL |     bar().await;
-   |          ^^^^^^
-
-error[E0698]: type inside `async fn` body must be known in this context
-  --> $DIR/unresolved_type_param.rs:13:5
-   |
-LL |     bar().await;
-   |     ^^^ cannot infer type for type parameter `T` declared on the function `bar`
-   |
-note: the type is part of the `async fn` body because of this `await`
-  --> $DIR/unresolved_type_param.rs:13:10
-   |
-LL |     bar().await;
-   |          ^^^^^^
-
-error: aborting due to 3 previous errors
-
-For more information about this error, try `rustc --explain E0698`.
diff --git a/tests/ui/binding/issue-53114-safety-checks.stderr b/tests/ui/binding/issue-53114-safety-checks.stderr
index 41318d0a38a..349c4639a9e 100644
--- a/tests/ui/binding/issue-53114-safety-checks.stderr
+++ b/tests/ui/binding/issue-53114-safety-checks.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _ = &p.b;
    |             ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -13,7 +14,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let (_,) = (&p.b,);
    |                 ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -22,7 +24,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _: _ = &p.b;
    |                ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -31,7 +34,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let (_,): _ = (&p.b,);
    |                    ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -40,7 +44,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     match &p.b  { _ => { } }
    |           ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -49,7 +54,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     match (&p.b,)  { (_,) => { } }
    |            ^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
diff --git a/tests/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr b/tests/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr
index 4cc1d821d0a..cfc86ff0dc1 100644
--- a/tests/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr
+++ b/tests/ui/borrowck/borrow-raw-address-of-deref-mutability.stderr
@@ -7,7 +7,7 @@ LL |     let q = &raw mut *x;
 help: consider changing this to be a mutable reference
    |
 LL |     let x = &mut 0;
-   |             ~~~~~~
+   |              +++
 
 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `*const` pointer
   --> $DIR/borrow-raw-address-of-deref-mutability.rs:14:13
@@ -18,7 +18,7 @@ LL |     let q = &raw mut *x;
 help: consider changing this to be a mutable pointer
    |
 LL |     let x = &mut 0 as *const i32;
-   |             ~~~~~~
+   |              +++
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/borrowck/borrowck-access-permissions.stderr b/tests/ui/borrowck/borrowck-access-permissions.stderr
index 26f3e2bbdb7..c161e2d95b4 100644
--- a/tests/ui/borrowck/borrowck-access-permissions.stderr
+++ b/tests/ui/borrowck/borrowck-access-permissions.stderr
@@ -35,7 +35,7 @@ LL |         let _y1 = &mut *ref_x;
 help: consider changing this to be a mutable reference
    |
 LL |         let ref_x = &mut x;
-   |                     ~~~~~~
+   |                      +++
 
 error[E0596]: cannot borrow `*ptr_x` as mutable, as it is behind a `*const` pointer
   --> $DIR/borrowck-access-permissions.rs:39:23
@@ -46,7 +46,7 @@ LL |             let _y1 = &mut *ptr_x;
 help: consider changing this to be a mutable pointer
    |
 LL |         let ptr_x : *const _ = &mut x;
-   |                                ~~~~~~
+   |                                 +++
 
 error[E0596]: cannot borrow `*foo_ref.f` as mutable, as it is behind a `&` reference
   --> $DIR/borrowck-access-permissions.rs:48:18
@@ -57,7 +57,7 @@ LL |         let _y = &mut *foo_ref.f;
 help: consider changing this to be a mutable reference
    |
 LL |         let foo_ref = &mut foo;
-   |                       ~~~~~~~~
+   |                        +++
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr b/tests/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr
index cbacc87a0e8..cf0c4127d82 100644
--- a/tests/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr
+++ b/tests/ui/borrowck/borrowck-assign-to-andmut-in-aliasable-loc.stderr
@@ -6,8 +6,8 @@ LL |     *s.pointer += 1;
    |
 help: consider changing this to be a mutable reference
    |
-LL | fn a(s: &mut S<'_>) {
-   |         ~~~~~~~~~~
+LL | fn a(s: &mut S) {
+   |          +++
 
 error[E0594]: cannot assign to `*s.pointer`, which is behind a `&` reference
   --> $DIR/borrowck-assign-to-andmut-in-aliasable-loc.rs:17:5
@@ -17,8 +17,8 @@ LL |     *s.pointer += 1;
    |
 help: consider changing this to be a mutable reference
    |
-LL | fn c(s: &mut &mut S<'_>) {
-   |         ~~~~~~~~~~~~~~~
+LL | fn c(s: &mut  &mut S) {
+   |          +++
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr b/tests/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr
index dd0817ff233..59ef61b19d5 100644
--- a/tests/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr
+++ b/tests/ui/borrowck/borrowck-borrow-mut-base-ptr-in-aliasable-loc.stderr
@@ -27,8 +27,8 @@ LL |     let x:  &mut isize = &mut **t0;
    |
 help: consider changing this to be a mutable reference
    |
-LL | fn foo4(t0: &mut &mut isize) {
-   |             ~~~~~~~~~~~~~~~
+LL | fn foo4(t0: &mut  &mut isize) {
+   |              +++
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/borrowck/borrowck-issue-14498.stderr b/tests/ui/borrowck/borrowck-issue-14498.stderr
index 374c5ee3ed2..12d67d536d9 100644
--- a/tests/ui/borrowck/borrowck-issue-14498.stderr
+++ b/tests/ui/borrowck/borrowck-issue-14498.stderr
@@ -7,7 +7,7 @@ LL |     ***p = 2;
 help: consider changing this to be a mutable reference
    |
 LL |     let p = &mut y;
-   |             ~~~~~~
+   |              +++
 
 error[E0506]: cannot assign to `**y` because it is borrowed
   --> $DIR/borrowck-issue-14498.rs:25:5
diff --git a/tests/ui/borrowck/borrowck-reborrow-from-mut.stderr b/tests/ui/borrowck/borrowck-reborrow-from-mut.stderr
index d9590e446c7..fb3db4e1446 100644
--- a/tests/ui/borrowck/borrowck-reborrow-from-mut.stderr
+++ b/tests/ui/borrowck/borrowck-reborrow-from-mut.stderr
@@ -111,7 +111,7 @@ LL |     let _bar1 = &mut foo.bar1;
 help: consider changing this to be a mutable reference
    |
 LL | fn borrow_mut_from_imm(foo: &mut Foo) {
-   |                             ~~~~~~~~
+   |                              +++
 
 error: aborting due to 11 previous errors
 
diff --git a/tests/ui/borrowck/issue-85765.stderr b/tests/ui/borrowck/issue-85765.stderr
index b4bb128cbb4..2985a658fdd 100644
--- a/tests/ui/borrowck/issue-85765.stderr
+++ b/tests/ui/borrowck/issue-85765.stderr
@@ -18,7 +18,7 @@ LL |     *r = 0;
 help: consider changing this to be a mutable reference
    |
 LL |     let r = &mut mutvar;
-   |             ~~~~~~~~~~~
+   |              +++
 
 error[E0594]: cannot assign to `*x`, which is behind a `&` reference
   --> $DIR/issue-85765.rs:19:5
diff --git a/tests/ui/borrowck/mutability-errors.stderr b/tests/ui/borrowck/mutability-errors.stderr
index d7c602718f1..b39e57d70ec 100644
--- a/tests/ui/borrowck/mutability-errors.stderr
+++ b/tests/ui/borrowck/mutability-errors.stderr
@@ -7,7 +7,7 @@ LL |     *x = (1,);
 help: consider changing this to be a mutable reference
    |
 LL | fn named_ref(x: &mut (i32,)) {
-   |                 ~~~~~~~~~~~
+   |                  +++
 
 error[E0594]: cannot assign to `x.0`, which is behind a `&` reference
   --> $DIR/mutability-errors.rs:10:5
@@ -18,7 +18,7 @@ LL |     x.0 = 1;
 help: consider changing this to be a mutable reference
    |
 LL | fn named_ref(x: &mut (i32,)) {
-   |                 ~~~~~~~~~~~
+   |                  +++
 
 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `&` reference
   --> $DIR/mutability-errors.rs:11:5
@@ -29,7 +29,7 @@ LL |     &mut *x;
 help: consider changing this to be a mutable reference
    |
 LL | fn named_ref(x: &mut (i32,)) {
-   |                 ~~~~~~~~~~~
+   |                  +++
 
 error[E0596]: cannot borrow `x.0` as mutable, as it is behind a `&` reference
   --> $DIR/mutability-errors.rs:12:5
@@ -40,7 +40,7 @@ LL |     &mut x.0;
 help: consider changing this to be a mutable reference
    |
 LL | fn named_ref(x: &mut (i32,)) {
-   |                 ~~~~~~~~~~~
+   |                  +++
 
 error[E0594]: cannot assign to data in a `&` reference
   --> $DIR/mutability-errors.rs:16:5
@@ -74,8 +74,8 @@ LL |     *x = (1,);
    |
 help: consider changing this to be a mutable pointer
    |
-LL | unsafe fn named_ptr(x: *mut (i32,)) {
-   |                        ~~~~~~~~~~~
+LL | unsafe fn named_ptr(x: *mut const (i32,)) {
+   |                         +++
 
 error[E0594]: cannot assign to `x.0`, which is behind a `*const` pointer
   --> $DIR/mutability-errors.rs:24:5
@@ -85,8 +85,8 @@ LL |     (*x).0 = 1;
    |
 help: consider changing this to be a mutable pointer
    |
-LL | unsafe fn named_ptr(x: *mut (i32,)) {
-   |                        ~~~~~~~~~~~
+LL | unsafe fn named_ptr(x: *mut const (i32,)) {
+   |                         +++
 
 error[E0596]: cannot borrow `*x` as mutable, as it is behind a `*const` pointer
   --> $DIR/mutability-errors.rs:25:5
@@ -96,8 +96,8 @@ LL |     &mut *x;
    |
 help: consider changing this to be a mutable pointer
    |
-LL | unsafe fn named_ptr(x: *mut (i32,)) {
-   |                        ~~~~~~~~~~~
+LL | unsafe fn named_ptr(x: *mut const (i32,)) {
+   |                         +++
 
 error[E0596]: cannot borrow `x.0` as mutable, as it is behind a `*const` pointer
   --> $DIR/mutability-errors.rs:26:5
@@ -107,8 +107,8 @@ LL |     &mut (*x).0;
    |
 help: consider changing this to be a mutable pointer
    |
-LL | unsafe fn named_ptr(x: *mut (i32,)) {
-   |                        ~~~~~~~~~~~
+LL | unsafe fn named_ptr(x: *mut const (i32,)) {
+   |                         +++
 
 error[E0594]: cannot assign to data in a `*const` pointer
   --> $DIR/mutability-errors.rs:30:5
diff --git a/tests/ui/borrowck/suggest-lt-on-ty-alias-w-generics.rs b/tests/ui/borrowck/suggest-lt-on-ty-alias-w-generics.rs
new file mode 100644
index 00000000000..c9e043577ed
--- /dev/null
+++ b/tests/ui/borrowck/suggest-lt-on-ty-alias-w-generics.rs
@@ -0,0 +1,11 @@
+type Lazy<T> = Box<dyn Fn() -> T + 'static>;
+
+fn test(x: &i32) -> Lazy<i32> {
+    Box::new(|| {
+        //~^ ERROR lifetime may not live long enough
+        //~| ERROR closure may outlive the current function
+        *x
+    })
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/suggest-lt-on-ty-alias-w-generics.stderr b/tests/ui/borrowck/suggest-lt-on-ty-alias-w-generics.stderr
new file mode 100644
index 00000000000..28b4b4aa290
--- /dev/null
+++ b/tests/ui/borrowck/suggest-lt-on-ty-alias-w-generics.stderr
@@ -0,0 +1,43 @@
+error: lifetime may not live long enough
+  --> $DIR/suggest-lt-on-ty-alias-w-generics.rs:4:5
+   |
+LL |   fn test(x: &i32) -> Lazy<i32> {
+   |              - let's call the lifetime of this reference `'1`
+LL | /     Box::new(|| {
+LL | |
+LL | |
+LL | |         *x
+LL | |     })
+   | |______^ returning this value requires that `'1` must outlive `'static`
+   |
+help: to declare that the trait object captures data from argument `x`, you can add a lifetime parameter `'a` in the type alias
+   |
+LL | type Lazy<'a, T> = Box<dyn Fn() -> T + 'a>;
+   |           +++                          ~~
+
+error[E0373]: closure may outlive the current function, but it borrows `x`, which is owned by the current function
+  --> $DIR/suggest-lt-on-ty-alias-w-generics.rs:4:14
+   |
+LL |     Box::new(|| {
+   |              ^^ may outlive borrowed value `x`
+...
+LL |         *x
+   |         -- `x` is borrowed here
+   |
+note: closure is returned here
+  --> $DIR/suggest-lt-on-ty-alias-w-generics.rs:4:5
+   |
+LL | /     Box::new(|| {
+LL | |
+LL | |
+LL | |         *x
+LL | |     })
+   | |______^
+help: to force the closure to take ownership of `x` (and any other referenced variables), use the `move` keyword
+   |
+LL |     Box::new(move || {
+   |              ++++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/borrowck/tainted-promoteds.rs b/tests/ui/borrowck/tainted-promoteds.rs
new file mode 100644
index 00000000000..2b6f0ddbd6c
--- /dev/null
+++ b/tests/ui/borrowck/tainted-promoteds.rs
@@ -0,0 +1,12 @@
+// Regression test for issue #110856, where a borrowck error for a MIR tainted
+// all promoteds within. This in turn generated a spurious "erroneous constant
+// used" note when trying to evaluate a promoted.
+
+pub fn f() -> u32 {
+    let a = 0;
+    a = &0 * &1 * &2 * &3;
+    //~^ ERROR: cannot assign twice to immutable variable
+    a
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/tainted-promoteds.stderr b/tests/ui/borrowck/tainted-promoteds.stderr
new file mode 100644
index 00000000000..b276ea9aceb
--- /dev/null
+++ b/tests/ui/borrowck/tainted-promoteds.stderr
@@ -0,0 +1,14 @@
+error[E0384]: cannot assign twice to immutable variable `a`
+  --> $DIR/tainted-promoteds.rs:7:5
+   |
+LL |     let a = 0;
+   |         -
+   |         |
+   |         first assignment to `a`
+   |         help: consider making this binding mutable: `mut a`
+LL |     a = &0 * &1 * &2 * &3;
+   |     ^^^^^^^^^^^^^^^^^^^^^ cannot assign twice to immutable variable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0384`.
diff --git a/tests/ui/cfg/conditional-compile-arch.rs b/tests/ui/cfg/conditional-compile-arch.rs
index 7de561df136..e59e06f801b 100644
--- a/tests/ui/cfg/conditional-compile-arch.rs
+++ b/tests/ui/cfg/conditional-compile-arch.rs
@@ -39,3 +39,6 @@ pub fn main() { }
 
 #[cfg(target_arch = "riscv64")]
 pub fn main() { }
+
+#[cfg(target_arch = "loongarch64")]
+pub fn main() { }
diff --git a/tests/ui/check-cfg/compact-values.stderr b/tests/ui/check-cfg/compact-values.stderr
index 5ca4d3b3de7..70a967c0e5f 100644
--- a/tests/ui/check-cfg/compact-values.stderr
+++ b/tests/ui/check-cfg/compact-values.stderr
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition value
 LL | #[cfg(target(os = "linux", arch = "X"))]
    |                            ^^^^^^^^^^
    |
-   = note: expected values for `target_arch` are: aarch64, arm, avr, bpf, hexagon, loongarch64, m68k, mips, mips64, msp430, nvptx64, powerpc, powerpc64, riscv32, riscv64, s390x, sparc, sparc64, wasm32, wasm64, x86, x86_64
+   = note: expected values for `target_arch` are: `aarch64`, `arm`, `avr`, `bpf`, `hexagon`, `loongarch64`, `m68k`, `mips`, `mips64`, `msp430`, `nvptx64`, `powerpc`, `powerpc64`, `riscv32`, `riscv64`, `s390x`, `sparc`, `sparc64`, `wasm32`, `wasm64`, `x86`, `x86_64`
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/diagnotics.rs b/tests/ui/check-cfg/diagnotics.rs
new file mode 100644
index 00000000000..49e127d079a
--- /dev/null
+++ b/tests/ui/check-cfg/diagnotics.rs
@@ -0,0 +1,31 @@
+// check-pass
+// compile-flags: --check-cfg=names() --check-cfg=values(feature,"foo") --check-cfg=values(no_values) -Z unstable-options
+
+#[cfg(featur)]
+//~^ WARNING unexpected `cfg` condition name
+fn feature() {}
+
+#[cfg(featur = "foo")]
+//~^ WARNING unexpected `cfg` condition name
+fn feature() {}
+
+#[cfg(featur = "fo")]
+//~^ WARNING unexpected `cfg` condition name
+fn feature() {}
+
+#[cfg(feature = "foo")]
+fn feature() {}
+
+#[cfg(no_value)]
+//~^ WARNING unexpected `cfg` condition name
+fn no_values() {}
+
+#[cfg(no_value = "foo")]
+//~^ WARNING unexpected `cfg` condition name
+fn no_values() {}
+
+#[cfg(no_values = "bar")]
+//~^ WARNING unexpected `cfg` condition value
+fn no_values() {}
+
+fn main() {}
diff --git a/tests/ui/check-cfg/diagnotics.stderr b/tests/ui/check-cfg/diagnotics.stderr
new file mode 100644
index 00000000000..8b9fef09d09
--- /dev/null
+++ b/tests/ui/check-cfg/diagnotics.stderr
@@ -0,0 +1,62 @@
+warning: unexpected `cfg` condition name
+  --> $DIR/diagnotics.rs:4:7
+   |
+LL | #[cfg(featur)]
+   |       ^^^^^^ help: there is a config with a similar name: `feature`
+   |
+   = help: expected values for `feature` are: `foo`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition name
+  --> $DIR/diagnotics.rs:8:7
+   |
+LL | #[cfg(featur = "foo")]
+   |       ^^^^^^^^^^^^^^
+   |
+   = help: expected values for `feature` are: `foo`
+help: there is a config with a similar name and value
+   |
+LL | #[cfg(feature = "foo")]
+   |       ~~~~~~~
+
+warning: unexpected `cfg` condition name
+  --> $DIR/diagnotics.rs:12:7
+   |
+LL | #[cfg(featur = "fo")]
+   |       ^^^^^^^^^^^^^
+   |
+   = help: expected values for `feature` are: `foo`
+help: there is a config with a similar name and different values
+   |
+LL | #[cfg(feature = "foo")]
+   |       ~~~~~~~~~~~~~~~
+
+warning: unexpected `cfg` condition name
+  --> $DIR/diagnotics.rs:19:7
+   |
+LL | #[cfg(no_value)]
+   |       ^^^^^^^^ help: there is a config with a similar name: `no_values`
+
+warning: unexpected `cfg` condition name
+  --> $DIR/diagnotics.rs:23:7
+   |
+LL | #[cfg(no_value = "foo")]
+   |       ^^^^^^^^^^^^^^^^
+   |
+help: there is a config with a similar name and no value
+   |
+LL | #[cfg(no_values)]
+   |       ~~~~~~~~~
+
+warning: unexpected `cfg` condition value
+  --> $DIR/diagnotics.rs:27:7
+   |
+LL | #[cfg(no_values = "bar")]
+   |       ^^^^^^^^^--------
+   |                |
+   |                help: remove the value
+   |
+   = note: no expected value for `no_values`
+
+warning: 6 warnings emitted
+
diff --git a/tests/ui/check-cfg/invalid-cfg-name.stderr b/tests/ui/check-cfg/invalid-cfg-name.stderr
index 2bd1821c942..ed09f8cb66d 100644
--- a/tests/ui/check-cfg/invalid-cfg-name.stderr
+++ b/tests/ui/check-cfg/invalid-cfg-name.stderr
@@ -2,7 +2,7 @@ warning: unexpected `cfg` condition name
   --> $DIR/invalid-cfg-name.rs:7:7
    |
 LL | #[cfg(widnows)]
-   |       ^^^^^^^ help: did you mean: `windows`
+   |       ^^^^^^^ help: there is a config with a similar name: `windows`
    |
    = note: `#[warn(unexpected_cfgs)]` on by default
 
diff --git a/tests/ui/check-cfg/invalid-cfg-value.stderr b/tests/ui/check-cfg/invalid-cfg-value.stderr
index 83383ea61a4..776d264a7ad 100644
--- a/tests/ui/check-cfg/invalid-cfg-value.stderr
+++ b/tests/ui/check-cfg/invalid-cfg-value.stderr
@@ -4,9 +4,9 @@ warning: unexpected `cfg` condition value
 LL | #[cfg(feature = "sedre")]
    |       ^^^^^^^^^^-------
    |                 |
-   |                 help: did you mean: `"serde"`
+   |                 help: there is a expected value with a similar name: `"serde"`
    |
-   = note: expected values for `feature` are: full, serde
+   = note: expected values for `feature` are: `full`, `serde`
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value
@@ -15,7 +15,7 @@ warning: unexpected `cfg` condition value
 LL | #[cfg(feature = "rand")]
    |       ^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `feature` are: full, serde
+   = note: expected values for `feature` are: `full`, `serde`
 
 warning: unexpected condition value `rand` for condition name `feature`
    |
diff --git a/tests/ui/check-cfg/mix.rs b/tests/ui/check-cfg/mix.rs
index 4e488fc03ec..9adf5c46e43 100644
--- a/tests/ui/check-cfg/mix.rs
+++ b/tests/ui/check-cfg/mix.rs
@@ -12,6 +12,10 @@ fn do_windows_stuff() {}
 //~^ WARNING unexpected `cfg` condition name
 fn do_windows_stuff() {}
 
+#[cfg(feature)]
+//~^ WARNING unexpected `cfg` condition value
+fn no_feature() {}
+
 #[cfg(feature = "foo")]
 fn use_foo() {}
 
diff --git a/tests/ui/check-cfg/mix.stderr b/tests/ui/check-cfg/mix.stderr
index 9cf887ec788..07c514aed52 100644
--- a/tests/ui/check-cfg/mix.stderr
+++ b/tests/ui/check-cfg/mix.stderr
@@ -2,28 +2,36 @@ warning: unexpected `cfg` condition name
   --> $DIR/mix.rs:11:7
    |
 LL | #[cfg(widnows)]
-   |       ^^^^^^^ help: did you mean: `windows`
+   |       ^^^^^^^ help: there is a config with a similar name: `windows`
    |
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value
-  --> $DIR/mix.rs:18:7
+  --> $DIR/mix.rs:15:7
+   |
+LL | #[cfg(feature)]
+   |       ^^^^^^^- help: specify a config value: `= "foo"`
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: unexpected `cfg` condition value
+  --> $DIR/mix.rs:22:7
    |
 LL | #[cfg(feature = "bar")]
    |       ^^^^^^^^^^^^^^^
    |
-   = note: expected values for `feature` are: foo
+   = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition value
-  --> $DIR/mix.rs:22:7
+  --> $DIR/mix.rs:26:7
    |
 LL | #[cfg(feature = "zebra")]
    |       ^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `feature` are: foo
+   = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:26:12
+  --> $DIR/mix.rs:30:12
    |
 LL | #[cfg_attr(uu, test)]
    |            ^^
@@ -37,146 +45,146 @@ warning: unexpected `unknown_name` as condition name
    = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:35:10
+  --> $DIR/mix.rs:39:10
    |
 LL |     cfg!(widnows);
-   |          ^^^^^^^ help: did you mean: `windows`
+   |          ^^^^^^^ help: there is a config with a similar name: `windows`
 
 warning: unexpected `cfg` condition value
-  --> $DIR/mix.rs:38:10
+  --> $DIR/mix.rs:42:10
    |
 LL |     cfg!(feature = "bar");
    |          ^^^^^^^^^^^^^^^
    |
-   = note: expected values for `feature` are: foo
+   = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition value
-  --> $DIR/mix.rs:40:10
+  --> $DIR/mix.rs:44:10
    |
 LL |     cfg!(feature = "zebra");
    |          ^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `feature` are: foo
+   = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:42:10
+  --> $DIR/mix.rs:46:10
    |
 LL |     cfg!(xxx = "foo");
    |          ^^^^^^^^^^^
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:44:10
+  --> $DIR/mix.rs:48:10
    |
 LL |     cfg!(xxx);
    |          ^^^
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:46:14
+  --> $DIR/mix.rs:50:14
    |
 LL |     cfg!(any(xxx, windows));
    |              ^^^
 
 warning: unexpected `cfg` condition value
-  --> $DIR/mix.rs:48:14
+  --> $DIR/mix.rs:52:14
    |
 LL |     cfg!(any(feature = "bad", windows));
    |              ^^^^^^^^^^^^^^^
    |
-   = note: expected values for `feature` are: foo
+   = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:50:23
+  --> $DIR/mix.rs:54:23
    |
 LL |     cfg!(any(windows, xxx));
    |                       ^^^
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:52:20
+  --> $DIR/mix.rs:56:20
    |
 LL |     cfg!(all(unix, xxx));
    |                    ^^^
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:54:14
+  --> $DIR/mix.rs:58:14
    |
 LL |     cfg!(all(aa, bb));
    |              ^^
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:54:18
+  --> $DIR/mix.rs:58:18
    |
 LL |     cfg!(all(aa, bb));
    |                  ^^
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:57:14
+  --> $DIR/mix.rs:61:14
    |
 LL |     cfg!(any(aa, bb));
    |              ^^
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:57:18
+  --> $DIR/mix.rs:61:18
    |
 LL |     cfg!(any(aa, bb));
    |                  ^^
 
 warning: unexpected `cfg` condition value
-  --> $DIR/mix.rs:60:20
+  --> $DIR/mix.rs:64:20
    |
 LL |     cfg!(any(unix, feature = "zebra"));
    |                    ^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `feature` are: foo
+   = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:62:14
+  --> $DIR/mix.rs:66:14
    |
 LL |     cfg!(any(xxx, feature = "zebra"));
    |              ^^^
 
 warning: unexpected `cfg` condition value
-  --> $DIR/mix.rs:62:19
+  --> $DIR/mix.rs:66:19
    |
 LL |     cfg!(any(xxx, feature = "zebra"));
    |                   ^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `feature` are: foo
+   = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:65:14
+  --> $DIR/mix.rs:69:14
    |
 LL |     cfg!(any(xxx, unix, xxx));
    |              ^^^
 
 warning: unexpected `cfg` condition name
-  --> $DIR/mix.rs:65:25
+  --> $DIR/mix.rs:69:25
    |
 LL |     cfg!(any(xxx, unix, xxx));
    |                         ^^^
 
 warning: unexpected `cfg` condition value
-  --> $DIR/mix.rs:68:14
+  --> $DIR/mix.rs:72:14
    |
 LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
    |              ^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `feature` are: foo
+   = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition value
-  --> $DIR/mix.rs:68:33
+  --> $DIR/mix.rs:72:33
    |
 LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
    |                                 ^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `feature` are: foo
+   = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition value
-  --> $DIR/mix.rs:68:52
+  --> $DIR/mix.rs:72:52
    |
 LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
    |                                                    ^^^^^^^^^^^^^^^^^
    |
-   = note: expected values for `feature` are: foo
+   = note: expected values for `feature` are: `foo`
 
-warning: 27 warnings emitted
+warning: 28 warnings emitted
 
diff --git a/tests/ui/check-cfg/no-values.stderr b/tests/ui/check-cfg/no-values.stderr
index 8c926d187fe..ffa87dc58f2 100644
--- a/tests/ui/check-cfg/no-values.stderr
+++ b/tests/ui/check-cfg/no-values.stderr
@@ -2,7 +2,9 @@ warning: unexpected `cfg` condition value
   --> $DIR/no-values.rs:6:7
    |
 LL | #[cfg(feature = "foo")]
-   |       ^^^^^^^^^^^^^^^
+   |       ^^^^^^^--------
+   |              |
+   |              help: remove the value
    |
    = note: no expected value for `feature`
    = note: `#[warn(unexpected_cfgs)]` on by default
diff --git a/tests/ui/check-cfg/values-target-json.stderr b/tests/ui/check-cfg/values-target-json.stderr
index b58d2970773..eb81535e3ed 100644
--- a/tests/ui/check-cfg/values-target-json.stderr
+++ b/tests/ui/check-cfg/values-target-json.stderr
@@ -4,9 +4,9 @@ warning: unexpected `cfg` condition value
 LL | #[cfg(target_os = "linuz")]
    |       ^^^^^^^^^^^^-------
    |                   |
-   |                   help: did you mean: `"linux"`
+   |                   help: there is a expected value with a similar name: `"linux"`
    |
-   = note: expected values for `target_os` are: aix, android, cuda, dragonfly, emscripten, ericos, espidf, freebsd, fuchsia, haiku, hermit, horizon, illumos, ios, l4re, linux, macos, netbsd, none, nto, openbsd, psp, redox, solaris, solid_asp3, tvos, uefi, unknown, vita, vxworks, wasi, watchos, windows, xous
+   = note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `ericos`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `tvos`, `uefi`, `unknown`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/check-cfg/well-known-names.stderr b/tests/ui/check-cfg/well-known-names.stderr
index bdbe4d29d30..34c5d6172d9 100644
--- a/tests/ui/check-cfg/well-known-names.stderr
+++ b/tests/ui/check-cfg/well-known-names.stderr
@@ -4,7 +4,7 @@ warning: unexpected `cfg` condition name
 LL | #[cfg(target_oz = "linux")]
    |       ---------^^^^^^^^^^
    |       |
-   |       help: did you mean: `target_os`
+   |       help: there is a config with a similar name: `target_os`
    |
    = note: `#[warn(unexpected_cfgs)]` on by default
 
@@ -14,13 +14,13 @@ warning: unexpected `cfg` condition name
 LL | #[cfg(features = "foo")]
    |       --------^^^^^^^^
    |       |
-   |       help: did you mean: `feature`
+   |       help: there is a config with a similar name: `feature`
 
 warning: unexpected `cfg` condition name
   --> $DIR/well-known-names.rs:20:7
    |
 LL | #[cfg(uniw)]
-   |       ^^^^ help: did you mean: `unix`
+   |       ^^^^ help: there is a config with a similar name: `unix`
 
 warning: 3 warnings emitted
 
diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr
index 69d799783a9..2d18cb82e03 100644
--- a/tests/ui/check-cfg/well-known-values.stderr
+++ b/tests/ui/check-cfg/well-known-values.stderr
@@ -4,9 +4,9 @@ warning: unexpected `cfg` condition value
 LL | #[cfg(target_os = "linuz")]
    |       ^^^^^^^^^^^^-------
    |                   |
-   |                   help: did you mean: `"linux"`
+   |                   help: there is a expected value with a similar name: `"linux"`
    |
-   = note: expected values for `target_os` are: aix, android, cuda, dragonfly, emscripten, espidf, freebsd, fuchsia, haiku, hermit, horizon, illumos, ios, l4re, linux, macos, netbsd, none, nto, openbsd, psp, redox, solaris, solid_asp3, tvos, uefi, unknown, vita, vxworks, wasi, watchos, windows, xous
+   = note: expected values for `target_os` are: `aix`, `android`, `cuda`, `dragonfly`, `emscripten`, `espidf`, `freebsd`, `fuchsia`, `haiku`, `hermit`, `horizon`, `illumos`, `ios`, `l4re`, `linux`, `macos`, `netbsd`, `none`, `nto`, `openbsd`, `psp`, `redox`, `solaris`, `solid_asp3`, `tvos`, `uefi`, `unknown`, `vita`, `vxworks`, `wasi`, `watchos`, `windows`, `xous`
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value
@@ -15,9 +15,9 @@ warning: unexpected `cfg` condition value
 LL | #[cfg(target_has_atomic = "0")]
    |       ^^^^^^^^^^^^^^^^^^^^---
    |                           |
-   |                           help: did you mean: `"8"`
+   |                           help: there is a expected value with a similar name: `"8"`
    |
-   = note: expected values for `target_has_atomic` are: 128, 16, 32, 64, 8, ptr
+   = note: expected values for `target_has_atomic` are: (none), `128`, `16`, `32`, `64`, `8`, `ptr`
 
 warning: unexpected `cfg` condition value
   --> $DIR/well-known-values.rs:21:7
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr
index 95f36fc042c..1904faa9598 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/mut_ref.stderr
@@ -10,7 +10,7 @@ LL |         **ref_mref_x = y;
 help: consider changing this to be a mutable reference
    |
 LL |     let ref_mref_x = &mut mref_x;
-   |                      ~~~~~~~~~~~
+   |                       +++
 
 error[E0596]: cannot borrow `**mref_ref_x` as mutable, as it is behind a `&` reference
   --> $DIR/mut_ref.rs:26:13
diff --git a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr
index 9c2c434572a..8c44229bceb 100644
--- a/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr
+++ b/tests/ui/closures/2229_closure_analysis/diagnostics/repr_packed.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         println!("{}", foo.x);
    |                        ^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
    = 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)
 
diff --git a/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs b/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs
new file mode 100644
index 00000000000..72652ef6034
--- /dev/null
+++ b/tests/ui/closures/2229_closure_analysis/run_pass/multivariant.rs
@@ -0,0 +1,21 @@
+// Test precise capture of a multi-variant enum (when remaining variants are
+// visibly uninhabited).
+// edition:2021
+// run-pass
+#![feature(exhaustive_patterns)]
+#![feature(never_type)]
+
+pub fn main() {
+    let mut r = Result::<!, (u32, u32)>::Err((0, 0));
+    let mut f = || {
+        let Err((ref mut a, _)) = r;
+        *a = 1;
+    };
+    let mut g = || {
+        let Err((_, ref mut b)) = r;
+        *b = 2;
+    };
+    f();
+    g();
+    assert_eq!(r, Err((1, 2)));
+}
diff --git a/tests/ui/issues/issue-868.rs b/tests/ui/closures/issue-868.rs
index ce0a3c7ca52..ce0a3c7ca52 100644
--- a/tests/ui/issues/issue-868.rs
+++ b/tests/ui/closures/issue-868.rs
diff --git a/tests/ui/coercion/coercion-slice.stderr b/tests/ui/coercion/coercion-slice.stderr
index c7b856a57eb..17bbca7a0bd 100644
--- a/tests/ui/coercion/coercion-slice.stderr
+++ b/tests/ui/coercion/coercion-slice.stderr
@@ -2,11 +2,14 @@ error[E0308]: mismatched types
   --> $DIR/coercion-slice.rs:4:21
    |
 LL |     let _: &[i32] = [0];
-   |            ------   ^^^
-   |            |        |
-   |            |        expected `&[i32]`, found `[{integer}; 1]`
-   |            |        help: consider borrowing here: `&[0]`
+   |            ------   ^^^ expected `&[i32]`, found `[{integer}; 1]`
+   |            |
    |            expected due to this
+   |
+help: consider borrowing here
+   |
+LL |     let _: &[i32] = &[0];
+   |                     +
 
 error: aborting due to previous error
 
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_bad.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_bad.rs
new file mode 100644
index 00000000000..0da68ae7573
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_bad.rs
@@ -0,0 +1,13 @@
+#![allow(incomplete_features)]
+#![feature(adt_const_params)]
+
+fn check(_: impl std::marker::ConstParamTy) {}
+
+fn main() {
+    check(main);               //~ error: `fn() {main}` can't be used as a const parameter type
+    check(|| {});              //~ error: `[closure@$DIR/const_param_ty_bad.rs:8:11: 8:13]` can't be used as a const parameter type
+    check(main as fn());       //~ error: `fn()` can't be used as a const parameter type
+    check(&mut ());            //~ error: `&mut ()` can't be used as a const parameter type
+    check(&mut () as *mut ()); //~ error: `*mut ()` can't be used as a const parameter type
+    check(&() as *const ());   //~ error: `*const ()` can't be used as a const parameter type
+}
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_bad.stderr b/tests/ui/const-generics/adt_const_params/const_param_ty_bad.stderr
new file mode 100644
index 00000000000..de5704ee429
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_bad.stderr
@@ -0,0 +1,87 @@
+error[E0277]: `fn() {main}` can't be used as a const parameter type
+  --> $DIR/const_param_ty_bad.rs:7:11
+   |
+LL |     check(main);
+   |     ----- ^^^^ the trait `ConstParamTy` is not implemented for fn item `fn() {main}`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `check`
+  --> $DIR/const_param_ty_bad.rs:4:18
+   |
+LL | fn check(_: impl std::marker::ConstParamTy) {}
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
+
+error[E0277]: `[closure@$DIR/const_param_ty_bad.rs:8:11: 8:13]` can't be used as a const parameter type
+  --> $DIR/const_param_ty_bad.rs:8:11
+   |
+LL |     check(|| {});
+   |     ----- ^^^^^ the trait `ConstParamTy` is not implemented for closure `[closure@$DIR/const_param_ty_bad.rs:8:11: 8:13]`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `check`
+  --> $DIR/const_param_ty_bad.rs:4:18
+   |
+LL | fn check(_: impl std::marker::ConstParamTy) {}
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
+
+error[E0277]: `fn()` can't be used as a const parameter type
+  --> $DIR/const_param_ty_bad.rs:9:11
+   |
+LL |     check(main as fn());
+   |     ----- ^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `fn()`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `check`
+  --> $DIR/const_param_ty_bad.rs:4:18
+   |
+LL | fn check(_: impl std::marker::ConstParamTy) {}
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
+
+error[E0277]: `&mut ()` can't be used as a const parameter type
+  --> $DIR/const_param_ty_bad.rs:10:11
+   |
+LL |     check(&mut ());
+   |     ----- ^^^^^^^ the trait `ConstParamTy` is not implemented for `&mut ()`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `check`
+  --> $DIR/const_param_ty_bad.rs:4:18
+   |
+LL | fn check(_: impl std::marker::ConstParamTy) {}
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
+
+error[E0277]: `*mut ()` can't be used as a const parameter type
+  --> $DIR/const_param_ty_bad.rs:11:11
+   |
+LL |     check(&mut () as *mut ());
+   |     ----- ^^^^^^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `*mut ()`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `check`
+  --> $DIR/const_param_ty_bad.rs:4:18
+   |
+LL | fn check(_: impl std::marker::ConstParamTy) {}
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
+
+error[E0277]: `*const ()` can't be used as a const parameter type
+  --> $DIR/const_param_ty_bad.rs:12:11
+   |
+LL |     check(&() as *const ());
+   |     ----- ^^^^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `*const ()`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `check`
+  --> $DIR/const_param_ty_bad.rs:4:18
+   |
+LL | fn check(_: impl std::marker::ConstParamTy) {}
+   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.rs
new file mode 100644
index 00000000000..b0e3b13cc1e
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.rs
@@ -0,0 +1,12 @@
+#![allow(incomplete_features)]
+#![feature(adt_const_params)]
+
+#[derive(PartialEq, Eq)]
+struct NotParam;
+
+fn check<T: std::marker::ConstParamTy>() {}
+
+fn main() {
+    check::<[NotParam; 0]>();
+    //~^ error: `NotParam` can't be used as a const parameter type
+}
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.stderr b/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.stderr
new file mode 100644
index 00000000000..ef55242df87
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_bad_empty_array.stderr
@@ -0,0 +1,16 @@
+error[E0277]: `NotParam` can't be used as a const parameter type
+  --> $DIR/const_param_ty_bad_empty_array.rs:10:13
+   |
+LL |     check::<[NotParam; 0]>();
+   |             ^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
+   |
+   = note: required for `[NotParam; 0]` to implement `ConstParamTy`
+note: required by a bound in `check`
+  --> $DIR/const_param_ty_bad_empty_array.rs:7:13
+   |
+LL | fn check<T: std::marker::ConstParamTy>() {}
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_generic_bounds_do_not_hold.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_generic_bounds_do_not_hold.rs
new file mode 100644
index 00000000000..e4dc76703a2
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_generic_bounds_do_not_hold.rs
@@ -0,0 +1,13 @@
+#![allow(incomplete_features)]
+#![feature(adt_const_params)]
+
+#[derive(PartialEq, Eq)]
+struct NotParam;
+
+fn check<T: std::marker::ConstParamTy + ?Sized>() {}
+
+fn main() {
+    check::<&NotParam>();      //~ error: `NotParam` can't be used as a const parameter type
+    check::<[NotParam]>();     //~ error: `NotParam` can't be used as a const parameter type
+    check::<[NotParam; 17]>(); //~ error: `NotParam` can't be used as a const parameter type
+}
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_generic_bounds_do_not_hold.stderr b/tests/ui/const-generics/adt_const_params/const_param_ty_generic_bounds_do_not_hold.stderr
new file mode 100644
index 00000000000..86d1c94e87f
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_generic_bounds_do_not_hold.stderr
@@ -0,0 +1,42 @@
+error[E0277]: `NotParam` can't be used as a const parameter type
+  --> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:10:13
+   |
+LL |     check::<&NotParam>();
+   |             ^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
+   |
+   = note: required for `&NotParam` to implement `ConstParamTy`
+note: required by a bound in `check`
+  --> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:7:13
+   |
+LL | fn check<T: std::marker::ConstParamTy + ?Sized>() {}
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
+
+error[E0277]: `NotParam` can't be used as a const parameter type
+  --> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:11:13
+   |
+LL |     check::<[NotParam]>();
+   |             ^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
+   |
+   = note: required for `[NotParam]` to implement `ConstParamTy`
+note: required by a bound in `check`
+  --> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:7:13
+   |
+LL | fn check<T: std::marker::ConstParamTy + ?Sized>() {}
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
+
+error[E0277]: `NotParam` can't be used as a const parameter type
+  --> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:12:13
+   |
+LL |     check::<[NotParam; 17]>();
+   |             ^^^^^^^^^^^^^^ the trait `ConstParamTy` is not implemented for `NotParam`
+   |
+   = note: required for `[NotParam; 17]` to implement `ConstParamTy`
+note: required by a bound in `check`
+  --> $DIR/const_param_ty_generic_bounds_do_not_hold.rs:7:13
+   |
+LL | fn check<T: std::marker::ConstParamTy + ?Sized>() {}
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `check`
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_good.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_good.rs
new file mode 100644
index 00000000000..a1b711a3024
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_good.rs
@@ -0,0 +1,43 @@
+// check-pass
+#![allow(incomplete_features)]
+#![feature(adt_const_params)]
+use std::marker::ConstParamTy;
+
+#[derive(PartialEq, Eq)]
+struct S<T> {
+    field: u8,
+    gen: T,
+}
+
+impl<T: ConstParamTy> ConstParamTy for S<T> {}
+
+fn check<T: ConstParamTy + ?Sized>() {}
+
+fn main() {
+    check::<u8>();
+    check::<u16>();
+    check::<u32>();
+    check::<u64>();
+    check::<u128>();
+
+    check::<i8>();
+    check::<i16>();
+    check::<i32>();
+    check::<i64>();
+    check::<i128>();
+
+    check::<char>();
+    check::<bool>();
+    check::<str>();
+
+    check::<&u8>();
+    check::<&str>();
+    check::<[usize]>();
+    check::<[u16; 0]>();
+    check::<[u8; 42]>();
+
+    check::<S<u8>>();
+    check::<S<[&[bool]; 8]>>();
+
+    // FIXME: test tuples
+}
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_impl_bad_field.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_bad_field.rs
new file mode 100644
index 00000000000..07fd243737e
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_bad_field.rs
@@ -0,0 +1,13 @@
+#![allow(incomplete_features)]
+#![feature(adt_const_params)]
+
+#[derive(PartialEq, Eq)]
+struct NotParam;
+
+#[derive(PartialEq, Eq)]
+struct CantParam(NotParam);
+
+impl std::marker::ConstParamTy for CantParam {}
+//~^ error: the trait `ConstParamTy` cannot be implemented for this type
+
+fn main() {}
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_impl_bad_field.stderr b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_bad_field.stderr
new file mode 100644
index 00000000000..c8e065848b1
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_bad_field.stderr
@@ -0,0 +1,12 @@
+error[E0204]: the trait `ConstParamTy` cannot be implemented for this type
+  --> $DIR/const_param_ty_impl_bad_field.rs:10:36
+   |
+LL | struct CantParam(NotParam);
+   |                  -------- this field does not implement `ConstParamTy`
+LL |
+LL | impl std::marker::ConstParamTy for CantParam {}
+   |                                    ^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0204`.
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.rs b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.rs
new file mode 100644
index 00000000000..17ef396164e
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.rs
@@ -0,0 +1,17 @@
+#![allow(incomplete_features)]
+#![feature(adt_const_params)]
+
+#[derive(PartialEq, Eq)]
+struct ImplementsConstParamTy;
+impl std::marker::ConstParamTy for ImplementsConstParamTy {}
+
+struct CantParam(ImplementsConstParamTy);
+
+impl std::marker::ConstParamTy for CantParam {}
+//~^ error: the type `CantParam` does not `#[derive(Eq)]`
+
+fn check<T: std::marker::ConstParamTy>() {}
+
+fn main() {
+    check::<ImplementsConstParamTy>();
+}
diff --git a/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.stderr b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.stderr
new file mode 100644
index 00000000000..ca5abf5e254
--- /dev/null
+++ b/tests/ui/const-generics/adt_const_params/const_param_ty_impl_no_structural_eq.stderr
@@ -0,0 +1,12 @@
+error[E0277]: the type `CantParam` does not `#[derive(Eq)]`
+  --> $DIR/const_param_ty_impl_no_structural_eq.rs:10:36
+   |
+LL | impl std::marker::ConstParamTy for CantParam {}
+   |                                    ^^^^^^^^^ the trait `StructuralEq` is not implemented for `CantParam`
+   |
+note: required by a bound in `ConstParamTy`
+  --> $SRC_DIR/core/src/marker.rs:LL:COL
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/const-generics/assoc_const_as_type_argument.rs b/tests/ui/const-generics/assoc_const_as_type_argument.rs
new file mode 100644
index 00000000000..ffc7f116a94
--- /dev/null
+++ b/tests/ui/const-generics/assoc_const_as_type_argument.rs
@@ -0,0 +1,13 @@
+trait Trait {
+    const ASSOC: usize;
+}
+
+fn bar<const N: usize>() {}
+
+fn foo<T: Trait>() {
+    bar::<<T as Trait>::ASSOC>();
+    //~^ ERROR: expected associated type, found associated constant `Trait::ASSOC`
+    //~| ERROR: unresolved item provided when a constant was expected
+}
+
+fn main() {}
diff --git a/tests/ui/const-generics/assoc_const_as_type_argument.stderr b/tests/ui/const-generics/assoc_const_as_type_argument.stderr
new file mode 100644
index 00000000000..ac009546135
--- /dev/null
+++ b/tests/ui/const-generics/assoc_const_as_type_argument.stderr
@@ -0,0 +1,21 @@
+error[E0575]: expected associated type, found associated constant `Trait::ASSOC`
+  --> $DIR/assoc_const_as_type_argument.rs:8:11
+   |
+LL |     bar::<<T as Trait>::ASSOC>();
+   |           ^^^^^^^^^^^^^^^^^^^ not a associated type
+
+error[E0747]: unresolved item provided when a constant was expected
+  --> $DIR/assoc_const_as_type_argument.rs:8:11
+   |
+LL |     bar::<<T as Trait>::ASSOC>();
+   |           ^^^^^^^^^^^^^^^^^^^
+   |
+help: if this generic argument was intended as a const parameter, surround it with braces
+   |
+LL |     bar::<{ <T as Trait>::ASSOC }>();
+   |           +                     +
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0575, E0747.
+For more information about an error, try `rustc --explain E0575`.
diff --git a/tests/ui/const-generics/assoc_const_eq_diagnostic.rs b/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
index 4d0aaf88e40..bf8202ac152 100644
--- a/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
+++ b/tests/ui/const-generics/assoc_const_eq_diagnostic.rs
@@ -10,6 +10,7 @@ pub trait Parse {
 
 pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
 //~^ ERROR expected associated constant bound
+//~| ERROR expected associated constant bound
 //~| ERROR expected type
 
 fn no_help() -> Mode::Cool {}
diff --git a/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr b/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
index ba727ee0ea3..d7e5e50cba8 100644
--- a/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
+++ b/tests/ui/const-generics/assoc_const_eq_diagnostic.stderr
@@ -8,7 +8,7 @@ LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
    |                                   help: try using the variant's enum: `Mode`
 
 error[E0573]: expected type, found variant `Mode::Cool`
-  --> $DIR/assoc_const_eq_diagnostic.rs:15:17
+  --> $DIR/assoc_const_eq_diagnostic.rs:16:17
    |
 LL | fn no_help() -> Mode::Cool {}
    |                 ^^^^^^^^^^
@@ -28,6 +28,18 @@ note: associated constant defined here
 LL |     const MODE: Mode;
    |     ^^^^^^^^^^^^^^^^
 
-error: aborting due to 3 previous errors
+error: expected associated constant bound, found type
+  --> $DIR/assoc_const_eq_diagnostic.rs:11:28
+   |
+LL | pub trait CoolStuff: Parse<MODE = Mode::Cool> {}
+   |                            ^^^^^^^^^^^^^^^^^ help: if equating a const, try wrapping with braces: `MODE = { const }`
+   |
+note: associated constant defined here
+  --> $DIR/assoc_const_eq_diagnostic.rs:8:5
+   |
+LL |     const MODE: Mode;
+   |     ^^^^^^^^^^^^^^^^
+
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0573`.
diff --git a/tests/ui/const-generics/const-arg-in-const-arg.full.stderr b/tests/ui/const-generics/const-arg-in-const-arg.full.stderr
deleted file mode 100644
index 463a37d7e3d..00000000000
--- a/tests/ui/const-generics/const-arg-in-const-arg.full.stderr
+++ /dev/null
@@ -1,163 +0,0 @@
-error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:18:23
-   |
-LL |     let _: [u8; faz::<'a>(&())];
-   |                       ^^
-   |
-note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
-   |
-LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
-   |              ^^
-
-error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:21:23
-   |
-LL |     let _: [u8; faz::<'b>(&())];
-   |                       ^^
-   |
-note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
-   |
-LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
-   |              ^^
-
-error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:41:24
-   |
-LL |     let _: Foo<{ faz::<'a>(&()) }>;
-   |                        ^^
-   |
-note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
-   |
-LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
-   |              ^^
-
-error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:44:24
-   |
-LL |     let _: Foo<{ faz::<'b>(&()) }>;
-   |                        ^^
-   |
-note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
-   |
-LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
-   |              ^^
-
-error: unconstrained generic constant
-  --> $DIR/const-arg-in-const-arg.rs:13:12
-   |
-LL |     let _: [u8; foo::<T>()];
-   |            ^^^^^^^^^^^^^^^^
-   |
-   = help: try adding a `where` bound using this expression: `where [(); foo::<T>()]:`
-
-error: unconstrained generic constant
-  --> $DIR/const-arg-in-const-arg.rs:15:12
-   |
-LL |     let _: [u8; bar::<N>()];
-   |            ^^^^^^^^^^^^^^^^
-   |
-   = help: try adding a `where` bound using this expression: `where [(); bar::<N>()]:`
-
-error: unconstrained generic constant
-  --> $DIR/const-arg-in-const-arg.rs:36:12
-   |
-LL |     let _: Foo<{ foo::<T>() }>;
-   |            ^^^^^^^^^^^^^^^^^^^
-   |
-   = help: try adding a `where` bound using this expression: `where [(); { foo::<T>() }]:`
-
-error: unconstrained generic constant
-  --> $DIR/const-arg-in-const-arg.rs:38:12
-   |
-LL |     let _: Foo<{ bar::<N>() }>;
-   |            ^^^^^^^^^^^^^^^^^^^
-   |
-   = help: try adding a `where` bound using this expression: `where [(); { bar::<N>() }]:`
-
-error: unconstrained generic constant
-  --> $DIR/const-arg-in-const-arg.rs:25:17
-   |
-LL |     let _ = [0; foo::<T>()];
-   |                 ^^^^^^^^^^
-   |
-   = help: try adding a `where` bound using this expression: `where [(); foo::<T>()]:`
-
-error: unconstrained generic constant
-  --> $DIR/const-arg-in-const-arg.rs:27:17
-   |
-LL |     let _ = [0; bar::<N>()];
-   |                 ^^^^^^^^^^
-   |
-   = help: try adding a `where` bound using this expression: `where [(); bar::<N>()]:`
-
-error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:30:23
-   |
-LL |     let _ = [0; faz::<'a>(&())];
-   |                       ^^
-   |
-note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
-   |
-LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
-   |              ^^
-
-error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:33:23
-   |
-LL |     let _ = [0; faz::<'b>(&())];
-   |                       ^^
-   |
-note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
-   |
-LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
-   |              ^^
-
-error: unconstrained generic constant
-  --> $DIR/const-arg-in-const-arg.rs:47:19
-   |
-LL |     let _ = Foo::<{ foo::<T>() }>;
-   |                   ^^^^^^^^^^^^^^
-   |
-   = help: try adding a `where` bound using this expression: `where [(); { foo::<T>() }]:`
-
-error: unconstrained generic constant
-  --> $DIR/const-arg-in-const-arg.rs:49:19
-   |
-LL |     let _ = Foo::<{ bar::<N>() }>;
-   |                   ^^^^^^^^^^^^^^
-   |
-   = help: try adding a `where` bound using this expression: `where [(); { bar::<N>() }]:`
-
-error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:52:27
-   |
-LL |     let _ = Foo::<{ faz::<'a>(&()) }>;
-   |                           ^^
-   |
-note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
-   |
-LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
-   |              ^^
-
-error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:55:27
-   |
-LL |     let _ = Foo::<{ faz::<'b>(&()) }>;
-   |                           ^^
-   |
-note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
-   |
-LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
-   |              ^^
-
-error: aborting due to 16 previous errors
-
-For more information about this error, try `rustc --explain E0794`.
diff --git a/tests/ui/const-generics/const-arg-in-const-arg.min.stderr b/tests/ui/const-generics/const-arg-in-const-arg.min.stderr
index a7bd9c62b0e..f1f22e2342d 100644
--- a/tests/ui/const-generics/const-arg-in-const-arg.min.stderr
+++ b/tests/ui/const-generics/const-arg-in-const-arg.min.stderr
@@ -1,5 +1,5 @@
 error: generic parameters may not be used in const operations
-  --> $DIR/const-arg-in-const-arg.rs:13:23
+  --> $DIR/const-arg-in-const-arg.rs:15:23
    |
 LL |     let _: [u8; foo::<T>()];
    |                       ^ cannot perform const operation using `T`
@@ -8,7 +8,7 @@ LL |     let _: [u8; foo::<T>()];
    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error: generic parameters may not be used in const operations
-  --> $DIR/const-arg-in-const-arg.rs:15:23
+  --> $DIR/const-arg-in-const-arg.rs:16:23
    |
 LL |     let _: [u8; bar::<N>()];
    |                       ^ cannot perform const operation using `N`
@@ -16,44 +16,44 @@ LL |     let _: [u8; bar::<N>()];
    = help: const parameters may only be used as standalone arguments, i.e. `N`
    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
   --> $DIR/const-arg-in-const-arg.rs:18:23
    |
 LL |     let _: [u8; faz::<'a>(&())];
-   |                       ^^
+   |                       ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
   --> $DIR/const-arg-in-const-arg.rs:20:23
    |
 LL |     let _: [u8; baz::<'a>(&())];
-   |                       ^^
+   |                       ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
   --> $DIR/const-arg-in-const-arg.rs:21:23
    |
 LL |     let _: [u8; faz::<'b>(&())];
-   |                       ^^
+   |                       ^^ cannot perform const operation using `'b`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
   --> $DIR/const-arg-in-const-arg.rs:23:23
    |
 LL |     let _: [u8; baz::<'b>(&())];
-   |                       ^^
+   |                       ^^ cannot perform const operation using `'b`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error: generic parameters may not be used in const operations
-  --> $DIR/const-arg-in-const-arg.rs:27:23
+  --> $DIR/const-arg-in-const-arg.rs:26:23
    |
 LL |     let _ = [0; bar::<N>()];
    |                       ^ cannot perform const operation using `N`
@@ -61,44 +61,44 @@ LL |     let _ = [0; bar::<N>()];
    = help: const parameters may only be used as standalone arguments, i.e. `N`
    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:30:23
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:28:23
    |
 LL |     let _ = [0; faz::<'a>(&())];
-   |                       ^^
+   |                       ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:32:23
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:30:23
    |
 LL |     let _ = [0; baz::<'a>(&())];
-   |                       ^^
+   |                       ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:33:23
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:31:23
    |
 LL |     let _ = [0; faz::<'b>(&())];
-   |                       ^^
+   |                       ^^ cannot perform const operation using `'b`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:35:23
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:33:23
    |
 LL |     let _ = [0; baz::<'b>(&())];
-   |                       ^^
+   |                       ^^ cannot perform const operation using `'b`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error: generic parameters may not be used in const operations
-  --> $DIR/const-arg-in-const-arg.rs:36:24
+  --> $DIR/const-arg-in-const-arg.rs:34:24
    |
 LL |     let _: Foo<{ foo::<T>() }>;
    |                        ^ cannot perform const operation using `T`
@@ -107,7 +107,7 @@ LL |     let _: Foo<{ foo::<T>() }>;
    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error: generic parameters may not be used in const operations
-  --> $DIR/const-arg-in-const-arg.rs:38:24
+  --> $DIR/const-arg-in-const-arg.rs:35:24
    |
 LL |     let _: Foo<{ bar::<N>() }>;
    |                        ^ cannot perform const operation using `N`
@@ -115,44 +115,44 @@ LL |     let _: Foo<{ bar::<N>() }>;
    = help: const parameters may only be used as standalone arguments, i.e. `N`
    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:41:24
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:37:24
    |
 LL |     let _: Foo<{ faz::<'a>(&()) }>;
-   |                        ^^
+   |                        ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:43:24
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:39:24
    |
 LL |     let _: Foo<{ baz::<'a>(&()) }>;
-   |                        ^^
+   |                        ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:44:24
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:40:24
    |
 LL |     let _: Foo<{ faz::<'b>(&()) }>;
-   |                        ^^
+   |                        ^^ cannot perform const operation using `'b`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:46:24
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:42:24
    |
 LL |     let _: Foo<{ baz::<'b>(&()) }>;
-   |                        ^^
+   |                        ^^ cannot perform const operation using `'b`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error: generic parameters may not be used in const operations
-  --> $DIR/const-arg-in-const-arg.rs:47:27
+  --> $DIR/const-arg-in-const-arg.rs:43:27
    |
 LL |     let _ = Foo::<{ foo::<T>() }>;
    |                           ^ cannot perform const operation using `T`
@@ -161,7 +161,7 @@ LL |     let _ = Foo::<{ foo::<T>() }>;
    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error: generic parameters may not be used in const operations
-  --> $DIR/const-arg-in-const-arg.rs:49:27
+  --> $DIR/const-arg-in-const-arg.rs:44:27
    |
 LL |     let _ = Foo::<{ bar::<N>() }>;
    |                           ^ cannot perform const operation using `N`
@@ -169,44 +169,44 @@ LL |     let _ = Foo::<{ bar::<N>() }>;
    = help: const parameters may only be used as standalone arguments, i.e. `N`
    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:52:27
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:46:27
    |
 LL |     let _ = Foo::<{ faz::<'a>(&()) }>;
-   |                           ^^
+   |                           ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:54:27
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:48:27
    |
 LL |     let _ = Foo::<{ baz::<'a>(&()) }>;
-   |                           ^^
+   |                           ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:55:27
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:49:27
    |
 LL |     let _ = Foo::<{ faz::<'b>(&()) }>;
-   |                           ^^
+   |                           ^^ cannot perform const operation using `'b`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
-  --> $DIR/const-arg-in-const-arg.rs:57:27
+error: generic parameters may not be used in const operations
+  --> $DIR/const-arg-in-const-arg.rs:51:27
    |
 LL |     let _ = Foo::<{ baz::<'b>(&()) }>;
-   |                           ^^
+   |                           ^^ cannot perform const operation using `'b`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error[E0747]: unresolved item provided when a constant was expected
-  --> $DIR/const-arg-in-const-arg.rs:15:23
+  --> $DIR/const-arg-in-const-arg.rs:16:23
    |
 LL |     let _: [u8; bar::<N>()];
    |                       ^
@@ -223,7 +223,7 @@ LL |     let _: [u8; faz::<'a>(&())];
    |                       ^^
    |
 note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
+  --> $DIR/const-arg-in-const-arg.rs:10:14
    |
 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
    |              ^^
@@ -235,13 +235,13 @@ LL |     let _: [u8; faz::<'b>(&())];
    |                       ^^
    |
 note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
+  --> $DIR/const-arg-in-const-arg.rs:10:14
    |
 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
    |              ^^
 
 error[E0747]: unresolved item provided when a constant was expected
-  --> $DIR/const-arg-in-const-arg.rs:38:24
+  --> $DIR/const-arg-in-const-arg.rs:35:24
    |
 LL |     let _: Foo<{ bar::<N>() }>;
    |                        ^
@@ -252,25 +252,25 @@ LL |     let _: Foo<{ bar::<{ N }>() }>;
    |                        +   +
 
 error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:41:24
+  --> $DIR/const-arg-in-const-arg.rs:37:24
    |
 LL |     let _: Foo<{ faz::<'a>(&()) }>;
    |                        ^^
    |
 note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
+  --> $DIR/const-arg-in-const-arg.rs:10:14
    |
 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
    |              ^^
 
 error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:44:24
+  --> $DIR/const-arg-in-const-arg.rs:40:24
    |
 LL |     let _: Foo<{ faz::<'b>(&()) }>;
    |                        ^^
    |
 note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
+  --> $DIR/const-arg-in-const-arg.rs:10:14
    |
 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
    |              ^^
@@ -284,7 +284,7 @@ LL |     let _ = [0; foo::<T>()];
    = note: this may fail depending on what value the parameter takes
 
 error[E0747]: unresolved item provided when a constant was expected
-  --> $DIR/const-arg-in-const-arg.rs:27:23
+  --> $DIR/const-arg-in-const-arg.rs:26:23
    |
 LL |     let _ = [0; bar::<N>()];
    |                       ^
@@ -295,31 +295,31 @@ LL |     let _ = [0; bar::<{ N }>()];
    |                       +   +
 
 error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:30:23
+  --> $DIR/const-arg-in-const-arg.rs:28:23
    |
 LL |     let _ = [0; faz::<'a>(&())];
    |                       ^^
    |
 note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
+  --> $DIR/const-arg-in-const-arg.rs:10:14
    |
 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
    |              ^^
 
 error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:33:23
+  --> $DIR/const-arg-in-const-arg.rs:31:23
    |
 LL |     let _ = [0; faz::<'b>(&())];
    |                       ^^
    |
 note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
+  --> $DIR/const-arg-in-const-arg.rs:10:14
    |
 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
    |              ^^
 
 error[E0747]: unresolved item provided when a constant was expected
-  --> $DIR/const-arg-in-const-arg.rs:49:27
+  --> $DIR/const-arg-in-const-arg.rs:44:27
    |
 LL |     let _ = Foo::<{ bar::<N>() }>;
    |                           ^
@@ -330,30 +330,30 @@ LL |     let _ = Foo::<{ bar::<{ N }>() }>;
    |                           +   +
 
 error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:52:27
+  --> $DIR/const-arg-in-const-arg.rs:46:27
    |
 LL |     let _ = Foo::<{ faz::<'a>(&()) }>;
    |                           ^^
    |
 note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
+  --> $DIR/const-arg-in-const-arg.rs:10:14
    |
 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
    |              ^^
 
 error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
-  --> $DIR/const-arg-in-const-arg.rs:55:27
+  --> $DIR/const-arg-in-const-arg.rs:49:27
    |
 LL |     let _ = Foo::<{ faz::<'b>(&()) }>;
    |                           ^^
    |
 note: the late bound lifetime parameter is introduced here
-  --> $DIR/const-arg-in-const-arg.rs:8:14
+  --> $DIR/const-arg-in-const-arg.rs:10:14
    |
 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
    |              ^^
 
 error: aborting due to 36 previous errors
 
-Some errors have detailed explanations: E0658, E0747, E0794.
-For more information about an error, try `rustc --explain E0658`.
+Some errors have detailed explanations: E0747, E0794.
+For more information about an error, try `rustc --explain E0747`.
diff --git a/tests/ui/const-generics/const-arg-in-const-arg.rs b/tests/ui/const-generics/const-arg-in-const-arg.rs
index 44a4f560a24..9eaa54347f1 100644
--- a/tests/ui/const-generics/const-arg-in-const-arg.rs
+++ b/tests/ui/const-generics/const-arg-in-const-arg.rs
@@ -1,4 +1,6 @@
-// revisions: full min
+// revisions: min
+// we use a single revision because t his shoudl have a `full` revision
+// but right now that ICEs and I(@BoxyUwU) could not get stderr normalization to work
 
 #![cfg_attr(full, feature(generic_const_exprs))]
 #![cfg_attr(full, allow(incomplete_features))]
@@ -11,50 +13,42 @@ const fn baz<'a>(_: &'a ()) -> usize where &'a (): Sized { 13 }
 struct Foo<const N: usize>;
 fn test<'a, 'b, T, const N: usize>() where &'b (): Sized {
     let _: [u8; foo::<T>()]; //[min]~ ERROR generic parameters may not
-                             //[full]~^ ERROR unconstrained generic constant
     let _: [u8; bar::<N>()]; //[min]~ ERROR generic parameters may not
                              //[min]~^ ERROR unresolved item provided when a constant was expected
-                             //[full]~^^ ERROR unconstrained generic constant
-    let _: [u8; faz::<'a>(&())]; //[min]~ ERROR a non-static lifetime
-                                 //~^ ERROR cannot specify lifetime arguments
-    let _: [u8; baz::<'a>(&())]; //[min]~ ERROR a non-static lifetime
-    let _: [u8; faz::<'b>(&())]; //[min]~ ERROR a non-static lifetime
-                                 //~^ ERROR cannot specify lifetime arguments
-    let _: [u8; baz::<'b>(&())]; //[min]~ ERROR a non-static lifetime
+    let _: [u8; faz::<'a>(&())]; //[min]~ ERROR generic parameters may not
+                                 //[min]~^ ERROR cannot specify lifetime arguments
+    let _: [u8; baz::<'a>(&())]; //[min]~ ERROR generic parameters may not
+    let _: [u8; faz::<'b>(&())]; //[min]~ ERROR generic parameters may not
+                                 //[min]~^ ERROR cannot specify lifetime arguments
+    let _: [u8; baz::<'b>(&())]; //[min]~ ERROR generic parameters may not
 
     let _ = [0; foo::<T>()]; //[min]~ ERROR constant expression depends on a generic parameter
-                             //[full]~^ ERROR unconstrained generic constant
     let _ = [0; bar::<N>()]; //[min]~ ERROR generic parameters may not
                              //[min]~^ ERROR unresolved item provided when a constant was expected
-                             //[full]~^^ ERROR unconstrained generic constant
-    let _ = [0; faz::<'a>(&())]; //[min]~ ERROR a non-static lifetime
-                                 //~^ ERROR cannot specify lifetime arguments
-    let _ = [0; baz::<'a>(&())]; //[min]~ ERROR a non-static lifetime
-    let _ = [0; faz::<'b>(&())]; //[min]~ ERROR a non-static lifetime
-                                 //~^ ERROR cannot specify lifetime arguments
-    let _ = [0; baz::<'b>(&())]; //[min]~ ERROR a non-static lifetime
+    let _ = [0; faz::<'a>(&())]; //[min]~ ERROR generic parameters may not
+                                 //[min]~^ ERROR cannot specify lifetime arguments
+    let _ = [0; baz::<'a>(&())]; //[min]~ ERROR generic parameters may not
+    let _ = [0; faz::<'b>(&())]; //[min]~ ERROR generic parameters may not
+                                 //[min]~^ ERROR cannot specify lifetime arguments
+    let _ = [0; baz::<'b>(&())]; //[min]~ ERROR generic parameters may not
     let _: Foo<{ foo::<T>() }>; //[min]~ ERROR generic parameters may not
-                                //[full]~^ ERROR unconstrained generic constant
     let _: Foo<{ bar::<N>() }>; //[min]~ ERROR generic parameters may not
                                 //[min]~^ ERROR unresolved item provided when a constant was expected
-                                //[full]~^^ ERROR unconstrained generic constant
-    let _: Foo<{ faz::<'a>(&()) }>; //[min]~ ERROR a non-static lifetime
-                                    //~^ ERROR cannot specify lifetime arguments
-    let _: Foo<{ baz::<'a>(&()) }>; //[min]~ ERROR a non-static lifetime
-    let _: Foo<{ faz::<'b>(&()) }>; //[min]~ ERROR a non-static lifetime
-                                    //~^ ERROR cannot specify lifetime arguments
-    let _: Foo<{ baz::<'b>(&()) }>; //[min]~ ERROR a non-static lifetime
+    let _: Foo<{ faz::<'a>(&()) }>; //[min]~ ERROR generic parameters may not
+                                    //[min]~^ ERROR cannot specify lifetime arguments
+    let _: Foo<{ baz::<'a>(&()) }>; //[min]~ ERROR generic parameters may not
+    let _: Foo<{ faz::<'b>(&()) }>; //[min]~ ERROR generic parameters may not
+                                    //[min]~^ ERROR cannot specify lifetime arguments
+    let _: Foo<{ baz::<'b>(&()) }>; //[min]~ ERROR generic parameters may not
     let _ = Foo::<{ foo::<T>() }>; //[min]~ ERROR generic parameters may not
-                                   //[full]~^ ERROR unconstrained generic constant
     let _ = Foo::<{ bar::<N>() }>; //[min]~ ERROR generic parameters may not
                                    //[min]~^ ERROR unresolved item provided when a constant was expected
-                                   //[full]~^^ ERROR unconstrained generic constant
-    let _ = Foo::<{ faz::<'a>(&()) }>; //[min]~ ERROR a non-static lifetime
-                                       //~^ ERROR cannot specify lifetime arguments
-    let _ = Foo::<{ baz::<'a>(&()) }>; //[min]~ ERROR a non-static lifetime
-    let _ = Foo::<{ faz::<'b>(&()) }>; //[min]~ ERROR a non-static lifetime
-                                       //~^ ERROR cannot specify lifetime arguments
-    let _ = Foo::<{ baz::<'b>(&()) }>; //[min]~ ERROR a non-static lifetime
+    let _ = Foo::<{ faz::<'a>(&()) }>; //[min]~ ERROR generic parameters may not
+                                       //[min]~^ ERROR cannot specify lifetime arguments
+    let _ = Foo::<{ baz::<'a>(&()) }>; //[min]~ ERROR generic parameters may not
+    let _ = Foo::<{ faz::<'b>(&()) }>; //[min]~ ERROR generic parameters may not
+                                       //[min]~^ ERROR cannot specify lifetime arguments
+    let _ = Foo::<{ baz::<'b>(&()) }>; //[min]~ ERROR generic parameters may not
 }
 
 fn main() {}
diff --git a/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr b/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr
index 82030731cc1..310ca75fdc9 100644
--- a/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr
+++ b/tests/ui/const-generics/const-argument-non-static-lifetime.min.stderr
@@ -1,12 +1,11 @@
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
   --> $DIR/const-argument-non-static-lifetime.rs:14:17
    |
 LL |         let _: &'a ();
-   |                 ^^
+   |                 ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/const-generics/const-argument-non-static-lifetime.rs b/tests/ui/const-generics/const-argument-non-static-lifetime.rs
index 0357e4ed59f..df2f3b7918c 100644
--- a/tests/ui/const-generics/const-argument-non-static-lifetime.rs
+++ b/tests/ui/const-generics/const-argument-non-static-lifetime.rs
@@ -11,7 +11,7 @@ fn test<const N: usize>() {}
 
 fn wow<'a>() -> &'a () {
     test::<{
-        let _: &'a (); //[min]~ ERROR a non-static lifetime
+        let _: &'a (); //[min]~ ERROR generic parameters may not be used in const operations
         3
     }>();
     &()
diff --git a/tests/ui/const-generics/const-param-type-depends-on-const-param.full.stderr b/tests/ui/const-generics/const-param-type-depends-on-const-param.full.stderr
index f639e276f46..539d840f0a8 100644
--- a/tests/ui/const-generics/const-param-type-depends-on-const-param.full.stderr
+++ b/tests/ui/const-generics/const-param-type-depends-on-const-param.full.stderr
@@ -3,12 +3,16 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | pub struct Dependent<const N: usize, const X: [u8; N]>([(); N]);
    |                                                    ^ the type must not depend on the parameter `N`
+   |
+   = note: const parameters may not be used in the type of const parameters
 
 error[E0770]: the type of const parameters must not depend on other generic parameters
   --> $DIR/const-param-type-depends-on-const-param.rs:15:40
    |
 LL | pub struct SelfDependent<const N: [u8; N]>;
    |                                        ^ the type must not depend on the parameter `N`
+   |
+   = note: const parameters may not be used in the type of const parameters
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/const-generics/const-param-type-depends-on-const-param.min.stderr b/tests/ui/const-generics/const-param-type-depends-on-const-param.min.stderr
index 24aa405211f..f829526ca1d 100644
--- a/tests/ui/const-generics/const-param-type-depends-on-const-param.min.stderr
+++ b/tests/ui/const-generics/const-param-type-depends-on-const-param.min.stderr
@@ -3,12 +3,16 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | pub struct Dependent<const N: usize, const X: [u8; N]>([(); N]);
    |                                                    ^ the type must not depend on the parameter `N`
+   |
+   = note: const parameters may not be used in the type of const parameters
 
 error[E0770]: the type of const parameters must not depend on other generic parameters
   --> $DIR/const-param-type-depends-on-const-param.rs:15:40
    |
 LL | pub struct SelfDependent<const N: [u8; N]>;
    |                                        ^ the type must not depend on the parameter `N`
+   |
+   = note: const parameters may not be used in the type of const parameters
 
 error: `[u8; N]` is forbidden as the type of a const generic parameter
   --> $DIR/const-param-type-depends-on-const-param.rs:11:47
diff --git a/tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr b/tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr
index 9c5c97befd8..c5160d1c384 100644
--- a/tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr
+++ b/tests/ui/const-generics/const-param-type-depends-on-type-param-ungated.stderr
@@ -3,6 +3,8 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | struct B<T, const N: T>(PhantomData<[T; N]>);
    |                      ^ the type must not depend on the parameter `T`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error: aborting due to previous error
 
diff --git a/tests/ui/const-generics/const-param-type-depends-on-type-param.full.stderr b/tests/ui/const-generics/const-param-type-depends-on-type-param.full.stderr
index 32f7dea8263..938fb08b795 100644
--- a/tests/ui/const-generics/const-param-type-depends-on-type-param.full.stderr
+++ b/tests/ui/const-generics/const-param-type-depends-on-type-param.full.stderr
@@ -3,6 +3,8 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | pub struct Dependent<T, const X: T>([(); X]);
    |                                  ^ the type must not depend on the parameter `T`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error[E0392]: parameter `T` is never used
   --> $DIR/const-param-type-depends-on-type-param.rs:11:22
diff --git a/tests/ui/const-generics/const-param-type-depends-on-type-param.min.stderr b/tests/ui/const-generics/const-param-type-depends-on-type-param.min.stderr
index 32f7dea8263..938fb08b795 100644
--- a/tests/ui/const-generics/const-param-type-depends-on-type-param.min.stderr
+++ b/tests/ui/const-generics/const-param-type-depends-on-type-param.min.stderr
@@ -3,6 +3,8 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | pub struct Dependent<T, const X: T>([(); X]);
    |                                  ^ the type must not depend on the parameter `T`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error[E0392]: parameter `T` is never used
   --> $DIR/const-param-type-depends-on-type-param.rs:11:22
diff --git a/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.stderr b/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.stderr
index 6b3396a25cf..3a7f3cd0ba0 100644
--- a/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/cross_crate_predicate.stderr
@@ -8,6 +8,9 @@ LL |     let _ = const_evaluatable_lib::test1::<T>();
 note: required by a bound in `test1`
   --> $DIR/auxiliary/const_evaluatable_lib.rs:6:10
    |
+LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
+   |        ----- required by a bound in this function
+LL | where
 LL |     [u8; std::mem::size_of::<T>() - 1]: Sized,
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
 
@@ -34,6 +37,9 @@ LL |     let _ = const_evaluatable_lib::test1::<T>();
 note: required by a bound in `test1`
   --> $DIR/auxiliary/const_evaluatable_lib.rs:6:10
    |
+LL | pub fn test1<T>() -> [u8; std::mem::size_of::<T>() - 1]
+   |        ----- required by a bound in this function
+LL | where
 LL |     [u8; std::mem::size_of::<T>() - 1]: Sized,
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `test1`
 
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-74713.rs b/tests/ui/const-generics/generic_const_exprs/issue-74713.rs
index 0bcb997d96c..205d031d4a3 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-74713.rs
+++ b/tests/ui/const-generics/generic_const_exprs/issue-74713.rs
@@ -1,7 +1,7 @@
 fn bug<'a>()
 where
     [(); { //~ ERROR mismatched types
-        let _: &'a (); //~ ERROR a non-static lifetime is not allowed in a `const`
+        let _: &'a (); //~ ERROR generic parameters may not be used in const operations
     }]:
 {}
 
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr b/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr
index e7673df0a02..f0e0a4b9711 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-74713.stderr
@@ -1,11 +1,11 @@
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
   --> $DIR/issue-74713.rs:4:17
    |
 LL |         let _: &'a ();
-   |                 ^^
+   |                 ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error[E0308]: mismatched types
   --> $DIR/issue-74713.rs:3:10
@@ -18,5 +18,4 @@ LL | |     }]:
 
 error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0308, E0658.
-For more information about an error, try `rustc --explain E0308`.
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs b/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs
index d45a6465b76..18a99398622 100644
--- a/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs
+++ b/tests/ui/const-generics/generic_const_exprs/nested_uneval_unification-2.rs
@@ -2,28 +2,30 @@
 #![feature(generic_const_exprs)]
 #![allow(incomplete_features, unused_parens, unused_braces)]
 
-fn zero_init<const N: usize>() -> Substs1<{ (N) }>
+fn zero_init<const N: usize>() -> Substs1<{{ N }}>
 where
-    [u8; { (N) }]: ,
+    [u8; {{ N }}]: ,
 {
-    Substs1([0; { (N) }])
+    Substs1([0; {{ N }}])
 }
 
-struct Substs1<const N: usize>([u8; { (N) }])
+struct Substs1<const N: usize>([u8; {{ N }}])
 where
-    [(); { (N) }]: ;
+    [(); {{ N }}]: ;
 
-fn substs2<const M: usize>() -> Substs1<{ (M) }> {
-    zero_init::<{ (M) }>()
+fn substs2<const M: usize>() -> Substs1<{{ M }}> {
+    zero_init::<{{ M }}>()
 }
 
-fn substs3<const L: usize>() -> Substs1<{ (L) }> {
-    substs2::<{ (L) }>()
+fn substs3<const L: usize>() -> Substs1<{{ L }}> {
+    substs2::<{{ L }}>()
 }
 
 fn main() {
     assert_eq!(substs3::<2>().0, [0; 2]);
 }
 
-// Test that the implicit ``{ (L) }`` bound on ``substs3`` satisfies the
-// ``{ (N) }`` bound on ``Substs1``
+// Test that the implicit ``{{ L }}`` bound on ``substs3`` satisfies the
+// ``{{ N }}`` bound on ``Substs1``
+// FIXME(generic_const_exprs): come up with a less brittle test for this using assoc consts
+// once normalization is implemented for them.
diff --git a/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.rs b/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.rs
new file mode 100644
index 00000000000..96aeec77c13
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.rs
@@ -0,0 +1,12 @@
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+fn foo() -> [(); {
+    let a: &'a ();
+    //~^ ERROR: use of undeclared lifetime name `'a`
+    10_usize
+}] {
+    loop {}
+}
+
+fn main() {}
diff --git a/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr b/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr
new file mode 100644
index 00000000000..976f037062d
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/unresolved_lifetimes_error.stderr
@@ -0,0 +1,11 @@
+error[E0261]: use of undeclared lifetime name `'a`
+  --> $DIR/unresolved_lifetimes_error.rs:5:13
+   |
+LL | fn foo() -> [(); {
+   |       - help: consider introducing lifetime `'a` here: `<'a>`
+LL |     let a: &'a ();
+   |             ^^ undeclared lifetime
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0261`.
diff --git a/tests/ui/const-generics/issue-46511.rs b/tests/ui/const-generics/issue-46511.rs
index 71c50e2f3f7..78baba818ad 100644
--- a/tests/ui/const-generics/issue-46511.rs
+++ b/tests/ui/const-generics/issue-46511.rs
@@ -2,7 +2,7 @@
 
 struct Foo<'a> //~ ERROR parameter `'a` is never used [E0392]
 {
-    _a: [u8; std::mem::size_of::<&'a mut u8>()] //~ ERROR  a non-static lifetime is not allowed in a `const`
+    _a: [u8; std::mem::size_of::<&'a mut u8>()] //~ ERROR generic parameters may not be used in const operations
 }
 
 pub fn main() {}
diff --git a/tests/ui/const-generics/issue-46511.stderr b/tests/ui/const-generics/issue-46511.stderr
index b21afa56dcb..58c93a1fab4 100644
--- a/tests/ui/const-generics/issue-46511.stderr
+++ b/tests/ui/const-generics/issue-46511.stderr
@@ -1,11 +1,11 @@
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
   --> $DIR/issue-46511.rs:5:35
    |
 LL |     _a: [u8; std::mem::size_of::<&'a mut u8>()]
-   |                                   ^^
+   |                                   ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error[E0392]: parameter `'a` is never used
   --> $DIR/issue-46511.rs:3:12
@@ -17,5 +17,4 @@ LL | struct Foo<'a>
 
 error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0392, E0658.
-For more information about an error, try `rustc --explain E0392`.
+For more information about this error, try `rustc --explain E0392`.
diff --git a/tests/ui/const-generics/issues/issue-105821.rs b/tests/ui/const-generics/issues/issue-105821.rs
index cba2e22c460..6cfabb65efb 100644
--- a/tests/ui/const-generics/issues/issue-105821.rs
+++ b/tests/ui/const-generics/issues/issue-105821.rs
@@ -1,7 +1,7 @@
 // check-pass
 
 #![allow(incomplete_features)]
-#![feature(adt_const_params, const_ptr_read, generic_const_exprs)]
+#![feature(adt_const_params, generic_const_exprs)]
 #![allow(dead_code)]
 
 const fn catone<const M: usize>(_a: &[u8; M]) -> [u8; M + 1]
diff --git a/tests/ui/const-generics/issues/issue-56445-1.full.stderr b/tests/ui/const-generics/issues/issue-56445-1.full.stderr
index 179643a7552..5fc0ec26047 100644
--- a/tests/ui/const-generics/issues/issue-56445-1.full.stderr
+++ b/tests/ui/const-generics/issues/issue-56445-1.full.stderr
@@ -1,11 +1,11 @@
-error[E0771]: use of non-static lifetime `'a` in const generic
+error[E0770]: the type of const parameters must not depend on other generic parameters
   --> $DIR/issue-56445-1.rs:9:26
    |
 LL | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
-   |                          ^^
+   |                          ^^ the type must not depend on the parameter `'a`
    |
-   = note: for more information, see issue #74052 <https://github.com/rust-lang/rust/issues/74052>
+   = note: lifetime parameters may not be used in the type of const parameters
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0771`.
+For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/const-generics/issues/issue-56445-1.min.stderr b/tests/ui/const-generics/issues/issue-56445-1.min.stderr
index 9f880134162..71a7051f25b 100644
--- a/tests/ui/const-generics/issues/issue-56445-1.min.stderr
+++ b/tests/ui/const-generics/issues/issue-56445-1.min.stderr
@@ -1,10 +1,10 @@
-error[E0771]: use of non-static lifetime `'a` in const generic
+error[E0770]: the type of const parameters must not depend on other generic parameters
   --> $DIR/issue-56445-1.rs:9:26
    |
 LL | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
-   |                          ^^
+   |                          ^^ the type must not depend on the parameter `'a`
    |
-   = note: for more information, see issue #74052 <https://github.com/rust-lang/rust/issues/74052>
+   = note: lifetime parameters may not be used in the type of const parameters
 
 error: `&str` is forbidden as the type of a const generic parameter
   --> $DIR/issue-56445-1.rs:9:25
@@ -17,4 +17,4 @@ LL | struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0771`.
+For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/const-generics/issues/issue-56445-1.rs b/tests/ui/const-generics/issues/issue-56445-1.rs
index 0741c3796ad..d862bf24aef 100644
--- a/tests/ui/const-generics/issues/issue-56445-1.rs
+++ b/tests/ui/const-generics/issues/issue-56445-1.rs
@@ -7,7 +7,7 @@
 use std::marker::PhantomData;
 
 struct Bug<'a, const S: &'a str>(PhantomData<&'a ()>);
-//~^ ERROR: use of non-static lifetime `'a` in const generic
+//~^ ERROR: the type of const parameters must not depend on other generic parameters
 //[min]~| ERROR: `&str` is forbidden as the type of a const generic parameter
 
 impl Bug<'_, ""> {}
diff --git a/tests/ui/const-generics/issues/issue-62878.full.stderr b/tests/ui/const-generics/issues/issue-62878.full.stderr
index 3a2b291d7ba..c658b5a6e68 100644
--- a/tests/ui/const-generics/issues/issue-62878.full.stderr
+++ b/tests/ui/const-generics/issues/issue-62878.full.stderr
@@ -3,6 +3,8 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | fn foo<const N: usize, const A: [u8; N]>() {}
    |                                      ^ the type must not depend on the parameter `N`
+   |
+   = note: const parameters may not be used in the type of const parameters
 
 error: aborting due to previous error
 
diff --git a/tests/ui/const-generics/issues/issue-62878.min.stderr b/tests/ui/const-generics/issues/issue-62878.min.stderr
index 5a721720d78..9c0e5179cc4 100644
--- a/tests/ui/const-generics/issues/issue-62878.min.stderr
+++ b/tests/ui/const-generics/issues/issue-62878.min.stderr
@@ -3,6 +3,8 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | fn foo<const N: usize, const A: [u8; N]>() {}
    |                                      ^ the type must not depend on the parameter `N`
+   |
+   = note: const parameters may not be used in the type of const parameters
 
 error: `[u8; N]` is forbidden as the type of a const generic parameter
   --> $DIR/issue-62878.rs:5:33
diff --git a/tests/ui/const-generics/issues/issue-71169.full.stderr b/tests/ui/const-generics/issues/issue-71169.full.stderr
index 1f5880f368e..ccdfbbd54cf 100644
--- a/tests/ui/const-generics/issues/issue-71169.full.stderr
+++ b/tests/ui/const-generics/issues/issue-71169.full.stderr
@@ -3,6 +3,8 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | fn foo<const LEN: usize, const DATA: [u8; LEN]>() {}
    |                                           ^^^ the type must not depend on the parameter `LEN`
+   |
+   = note: const parameters may not be used in the type of const parameters
 
 error: aborting due to previous error
 
diff --git a/tests/ui/const-generics/issues/issue-71169.min.stderr b/tests/ui/const-generics/issues/issue-71169.min.stderr
index 998b16a79e6..ebfb24bec28 100644
--- a/tests/ui/const-generics/issues/issue-71169.min.stderr
+++ b/tests/ui/const-generics/issues/issue-71169.min.stderr
@@ -3,6 +3,8 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | fn foo<const LEN: usize, const DATA: [u8; LEN]>() {}
    |                                           ^^^ the type must not depend on the parameter `LEN`
+   |
+   = note: const parameters may not be used in the type of const parameters
 
 error: `[u8; LEN]` is forbidden as the type of a const generic parameter
   --> $DIR/issue-71169.rs:5:38
diff --git a/tests/ui/const-generics/issues/issue-71381.full.stderr b/tests/ui/const-generics/issues/issue-71381.full.stderr
index e17cf96aa3e..962eaf75b98 100644
--- a/tests/ui/const-generics/issues/issue-71381.full.stderr
+++ b/tests/ui/const-generics/issues/issue-71381.full.stderr
@@ -3,12 +3,16 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL |     pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&self) {
    |                                                                                  ^^^^ the type must not depend on the parameter `Args`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error[E0770]: the type of const parameters must not depend on other generic parameters
   --> $DIR/issue-71381.rs:23:40
    |
 LL |         const FN: unsafe extern "C" fn(Args),
    |                                        ^^^^ the type must not depend on the parameter `Args`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error[E0741]: using function pointers as const generic parameters is forbidden
   --> $DIR/issue-71381.rs:14:61
diff --git a/tests/ui/const-generics/issues/issue-71381.min.stderr b/tests/ui/const-generics/issues/issue-71381.min.stderr
index 3950317b370..e1e140071fc 100644
--- a/tests/ui/const-generics/issues/issue-71381.min.stderr
+++ b/tests/ui/const-generics/issues/issue-71381.min.stderr
@@ -3,12 +3,16 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL |     pub fn call_me<Args: Sized, const IDX: usize, const FN: unsafe extern "C" fn(Args)>(&self) {
    |                                                                                  ^^^^ the type must not depend on the parameter `Args`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error[E0770]: the type of const parameters must not depend on other generic parameters
   --> $DIR/issue-71381.rs:23:40
    |
 LL |         const FN: unsafe extern "C" fn(Args),
    |                                        ^^^^ the type must not depend on the parameter `Args`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error: using function pointers as const generic parameters is forbidden
   --> $DIR/issue-71381.rs:14:61
diff --git a/tests/ui/const-generics/issues/issue-71611.full.stderr b/tests/ui/const-generics/issues/issue-71611.full.stderr
index 656aa29e19b..e109459f2be 100644
--- a/tests/ui/const-generics/issues/issue-71611.full.stderr
+++ b/tests/ui/const-generics/issues/issue-71611.full.stderr
@@ -3,6 +3,8 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | fn func<A, const F: fn(inner: A)>(outer: A) {
    |                               ^ the type must not depend on the parameter `A`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error[E0741]: using function pointers as const generic parameters is forbidden
   --> $DIR/issue-71611.rs:5:21
diff --git a/tests/ui/const-generics/issues/issue-71611.min.stderr b/tests/ui/const-generics/issues/issue-71611.min.stderr
index 01a85b745ce..b33d7cf9850 100644
--- a/tests/ui/const-generics/issues/issue-71611.min.stderr
+++ b/tests/ui/const-generics/issues/issue-71611.min.stderr
@@ -3,6 +3,8 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | fn func<A, const F: fn(inner: A)>(outer: A) {
    |                               ^ the type must not depend on the parameter `A`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error: using function pointers as const generic parameters is forbidden
   --> $DIR/issue-71611.rs:5:21
diff --git a/tests/ui/const-generics/issues/issue-77357.rs b/tests/ui/const-generics/issues/issue-77357.rs
deleted file mode 100644
index 3cb8d3846ab..00000000000
--- a/tests/ui/const-generics/issues/issue-77357.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-trait MyTrait<T> {}
-
-fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
-    //~^ ERROR overly complex generic constant
-    todo!()
-}
-
-fn main() {}
diff --git a/tests/ui/const-generics/issues/issue-77357.stderr b/tests/ui/const-generics/issues/issue-77357.stderr
deleted file mode 100644
index 68b35a38b0f..00000000000
--- a/tests/ui/const-generics/issues/issue-77357.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-error: overly complex generic constant
-  --> $DIR/issue-77357.rs:6:46
-   |
-LL | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
-   |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^ blocks are not supported in generic constants
-   |
-   = help: consider moving this anonymous constant into a `const` function
-   = note: this operation may be supported in the future
-
-error: aborting due to previous error
-
diff --git a/tests/ui/const-generics/issues/issue-83993.rs b/tests/ui/const-generics/issues/issue-83993.rs
deleted file mode 100644
index f2f05d9526b..00000000000
--- a/tests/ui/const-generics/issues/issue-83993.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// check-pass
-
-#![feature(generic_const_exprs)]
-#![allow(incomplete_features)]
-
-fn bug<'a>()
-where
-    for<'b> [(); {
-        let x: &'b ();
-        0
-    }]:
-{}
-
-fn main() {}
diff --git a/tests/ui/const-generics/issues/issue-88997.stderr b/tests/ui/const-generics/issues/issue-88997.stderr
index 505ba0da232..b49d52dd0ba 100644
--- a/tests/ui/const-generics/issues/issue-88997.stderr
+++ b/tests/ui/const-generics/issues/issue-88997.stderr
@@ -3,12 +3,16 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
    |                                        ^ the type must not depend on the parameter `T`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error[E0770]: the type of const parameters must not depend on other generic parameters
   --> $DIR/issue-88997.rs:8:54
    |
 LL | struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
    |                                                      ^ the type must not depend on the parameter `T`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/const-generics/issues/issue-90364.stderr b/tests/ui/const-generics/issues/issue-90364.stderr
index e85bd136ef6..23424d7b919 100644
--- a/tests/ui/const-generics/issues/issue-90364.stderr
+++ b/tests/ui/const-generics/issues/issue-90364.stderr
@@ -3,6 +3,8 @@ error[E0770]: the type of const parameters must not depend on other generic para
    |
 LL | pub struct Foo<T, const H: T>(T)
    |                            ^ the type must not depend on the parameter `T`
+   |
+   = note: type parameters may not be used in the type of const parameters
 
 error: aborting due to previous error
 
diff --git a/tests/ui/const-generics/late-bound-vars/in_closure.rs b/tests/ui/const-generics/late-bound-vars/in_closure.rs
index 5294cc3b5f4..00fb535f048 100644
--- a/tests/ui/const-generics/late-bound-vars/in_closure.rs
+++ b/tests/ui/const-generics/late-bound-vars/in_closure.rs
@@ -1,4 +1,22 @@
-// run-pass
+// failure-status: 101
+// known-bug: unknown
+// error-pattern:internal compiler error
+// normalize-stderr-test "internal compiler error.*" -> ""
+// normalize-stderr-test "DefId\([^)]*\)" -> "..."
+// normalize-stderr-test "\nerror: internal compiler error.*\n\n" -> ""
+// normalize-stderr-test "note:.*unexpectedly panicked.*\n\n" -> ""
+// normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> ""
+// normalize-stderr-test "note: compiler flags.*\n\n" -> ""
+// normalize-stderr-test "note: rustc.*running on.*\n\n" -> ""
+// normalize-stderr-test "thread.*panicked.*\n" -> ""
+// normalize-stderr-test "stack backtrace:\n" -> ""
+// normalize-stderr-test "\s\d{1,}: .*\n" -> ""
+// normalize-stderr-test "\s at .*\n" -> ""
+// normalize-stderr-test ".*note: Some details.*\n" -> ""
+// normalize-stderr-test "\n\n[ ]*\n" -> ""
+// normalize-stderr-test "compiler/.*: projection" -> "projection"
+// this should run-pass
+
 #![feature(generic_const_exprs)]
 #![allow(incomplete_features)]
 
diff --git a/tests/ui/const-generics/late-bound-vars/in_closure.stderr b/tests/ui/const-generics/late-bound-vars/in_closure.stderr
new file mode 100644
index 00000000000..557fbea2e05
--- /dev/null
+++ b/tests/ui/const-generics/late-bound-vars/in_closure.stderr
@@ -0,0 +1,13 @@
+error: query stack during panic:
+#0 [mir_borrowck] borrow-checking `test::{closure#0}::{constant#1}`
+#1 [mir_drops_elaborated_and_const_checked] elaborating drops for `test::{closure#0}::{constant#1}`
+#2 [mir_for_ctfe] caching mir of `test::{closure#0}::{constant#1}` for CTFE
+#3 [eval_to_allocation_raw] const-evaluating + checking `test::{closure#0}::{constant#1}`
+#4 [eval_to_allocation_raw] const-evaluating + checking `test::{closure#0}::{constant#1}`
+#5 [eval_to_valtree] evaluating type-level constant
+#6 [typeck] type-checking `test`
+#7 [used_trait_imports] finding used_trait_imports `test`
+#8 [analysis] running analysis passes on this crate
+end of query stack
+error: aborting due to previous error
+
diff --git a/tests/ui/const-generics/late-bound-vars/simple.rs b/tests/ui/const-generics/late-bound-vars/simple.rs
index 6da5395ef83..5d19aaf0b95 100644
--- a/tests/ui/const-generics/late-bound-vars/simple.rs
+++ b/tests/ui/const-generics/late-bound-vars/simple.rs
@@ -1,4 +1,21 @@
-// run-pass
+// failure-status: 101
+// known-bug: unknown
+// error-pattern:internal compiler error
+// normalize-stderr-test "internal compiler error.*" -> ""
+// normalize-stderr-test "DefId\([^)]*\)" -> "..."
+// normalize-stderr-test "\nerror: internal compiler error.*\n\n" -> ""
+// normalize-stderr-test "note:.*unexpectedly panicked.*\n\n" -> ""
+// normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> ""
+// normalize-stderr-test "note: compiler flags.*\n\n" -> ""
+// normalize-stderr-test "note: rustc.*running on.*\n\n" -> ""
+// normalize-stderr-test "thread.*panicked.*\n" -> ""
+// normalize-stderr-test "stack backtrace:\n" -> ""
+// normalize-stderr-test "\s\d{1,}: .*\n" -> ""
+// normalize-stderr-test "\s at .*\n" -> ""
+// normalize-stderr-test ".*note: Some details.*\n" -> ""
+// normalize-stderr-test "\n\n[ ]*\n" -> ""
+// normalize-stderr-test "compiler/.*: projection" -> "projection"
+
 #![feature(generic_const_exprs)]
 #![allow(incomplete_features)]
 
diff --git a/tests/ui/const-generics/late-bound-vars/simple.stderr b/tests/ui/const-generics/late-bound-vars/simple.stderr
new file mode 100644
index 00000000000..c0568f5a5cf
--- /dev/null
+++ b/tests/ui/const-generics/late-bound-vars/simple.stderr
@@ -0,0 +1,13 @@
+error: query stack during panic:
+#0 [mir_borrowck] borrow-checking `test::{constant#1}`
+#1 [mir_drops_elaborated_and_const_checked] elaborating drops for `test::{constant#1}`
+#2 [mir_for_ctfe] caching mir of `test::{constant#1}` for CTFE
+#3 [eval_to_allocation_raw] const-evaluating + checking `test::{constant#1}`
+#4 [eval_to_allocation_raw] const-evaluating + checking `test::{constant#1}`
+#5 [eval_to_valtree] evaluating type-level constant
+#6 [typeck] type-checking `test`
+#7 [used_trait_imports] finding used_trait_imports `test`
+#8 [analysis] running analysis passes on this crate
+end of query stack
+error: aborting due to previous error
+
diff --git a/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.rs b/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.rs
index 6215b7d936c..86f2bc9c74b 100644
--- a/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.rs
+++ b/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.rs
@@ -5,7 +5,7 @@ fn test<const N: usize>() {}
 
 fn issue_75323_and_74447_1<'a>() -> &'a () {
     test::<{ let _: &'a (); 3 },>();
-   //~^ ERROR a non-static lifetime is not allowed in a `const`
+   //~^ ERROR generic parameters may not be used in const operations
     &()
 }
 
@@ -19,7 +19,7 @@ fn issue_75323_and_74447_3() {
 
 fn issue_73375<'a>() {
     [(); (|_: &'a u8| (), 0).1];
-    //~^ ERROR a non-static lifetime is not allowed in a `const`
+    //~^ ERROR generic parameters may not be used in const operations
 }
 
 fn main() {}
diff --git a/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr b/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
index 5f641b07095..7726016eb83 100644
--- a/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
+++ b/tests/ui/const-generics/min_const_generics/forbid-non-static-lifetimes.stderr
@@ -1,21 +1,20 @@
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
   --> $DIR/forbid-non-static-lifetimes.rs:7:22
    |
 LL |     test::<{ let _: &'a (); 3 },>();
-   |                      ^^
+   |                      ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
   --> $DIR/forbid-non-static-lifetimes.rs:21:16
    |
 LL |     [(); (|_: &'a u8| (), 0).1];
-   |                ^^
+   |                ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/const-generics/nested-type.rs b/tests/ui/const-generics/nested-type.rs
index 5240f5c3b0b..ff95018065a 100644
--- a/tests/ui/const-generics/nested-type.rs
+++ b/tests/ui/const-generics/nested-type.rs
@@ -3,7 +3,7 @@
 #![cfg_attr(full, feature(adt_const_params))]
 #![cfg_attr(full, allow(incomplete_features))]
 
-struct Foo<const N: [u8; { //[min]~ ERROR `[u8; _]` is forbidden
+struct Foo<const N: [u8; {
     struct Foo<const N: usize>;
 
     impl<const N: usize> Foo<N> {
@@ -15,5 +15,9 @@ struct Foo<const N: [u8; { //[min]~ ERROR `[u8; _]` is forbidden
     Foo::<17>::value()
     //~^ ERROR cannot call non-const fn
 }]>;
+//[min]~^^^^^^^^^^^^ ERROR `[u8; {
+
+// N.B. it is important that the comment above is not inside the array length,
+//      otherwise it may check for itself, instead of the actual error
 
 fn main() {}
diff --git a/tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs b/tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs
index 3018439afa7..de710b0e37d 100644
--- a/tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs
+++ b/tests/ui/const-generics/outer-lifetime-in-const-generic-default.rs
@@ -2,7 +2,7 @@ struct Foo<
     'a,
     const N: usize = {
         let x: &'a ();
-        //~^ ERROR use of non-static lifetime `'a` in const generic
+        //~^ ERROR generic parameters may not be used in const operations
         3
     },
 >(&'a ());
diff --git a/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr b/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr
index 9d9555d3f64..6b0d18f1989 100644
--- a/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr
+++ b/tests/ui/const-generics/outer-lifetime-in-const-generic-default.stderr
@@ -1,11 +1,11 @@
-error[E0771]: use of non-static lifetime `'a` in const generic
+error: generic parameters may not be used in const operations
   --> $DIR/outer-lifetime-in-const-generic-default.rs:4:17
    |
 LL |         let x: &'a ();
-   |                 ^^
+   |                 ^^ cannot perform const operation using `'a`
    |
-   = note: for more information, see issue #74052 <https://github.com/rust-lang/rust/issues/74052>
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0771`.
diff --git a/tests/ui/const-generics/sneaky-array-repeat-expr.rs b/tests/ui/const-generics/sneaky-array-repeat-expr.rs
index b147c246bda..cd1607608a6 100644
--- a/tests/ui/const-generics/sneaky-array-repeat-expr.rs
+++ b/tests/ui/const-generics/sneaky-array-repeat-expr.rs
@@ -10,6 +10,7 @@ impl<const N: usize> Trait<N> for () {
 pub const fn foo<const N: usize>() where (): Trait<N> {
     let bar = [(); <()>::Assoc];
     //~^ error: constant expression depends on a generic parameter
+    //~| error: constant expression depends on a generic parameter
 }
 
 trait Trait2<const N: usize> {
@@ -24,6 +25,7 @@ impl<const N: usize> Trait2<N> for () {
 pub const fn foo2<const N: usize>() where (): Trait2<N> {
     let bar2 = [(); <()>::Assoc2];
     //~^ error: constant expression depends on a generic parameter
+    //~| error: constant expression depends on a generic parameter
 }
 
 fn main() {
diff --git a/tests/ui/const-generics/sneaky-array-repeat-expr.stderr b/tests/ui/const-generics/sneaky-array-repeat-expr.stderr
index 5c77375d399..e532f27a10d 100644
--- a/tests/ui/const-generics/sneaky-array-repeat-expr.stderr
+++ b/tests/ui/const-generics/sneaky-array-repeat-expr.stderr
@@ -7,12 +7,28 @@ LL |     let bar = [(); <()>::Assoc];
    = note: this may fail depending on what value the parameter takes
 
 error: constant expression depends on a generic parameter
-  --> $DIR/sneaky-array-repeat-expr.rs:25:21
+  --> $DIR/sneaky-array-repeat-expr.rs:11:15
+   |
+LL |     let bar = [(); <()>::Assoc];
+   |               ^^^^^^^^^^^^^^^^^
+   |
+   = note: this may fail depending on what value the parameter takes
+
+error: constant expression depends on a generic parameter
+  --> $DIR/sneaky-array-repeat-expr.rs:26:21
    |
 LL |     let bar2 = [(); <()>::Assoc2];
    |                     ^^^^^^^^^^^^
    |
    = note: this may fail depending on what value the parameter takes
 
-error: aborting due to 2 previous errors
+error: constant expression depends on a generic parameter
+  --> $DIR/sneaky-array-repeat-expr.rs:26:16
+   |
+LL |     let bar2 = [(); <()>::Assoc2];
+   |                ^^^^^^^^^^^^^^^^^^
+   |
+   = note: this may fail depending on what value the parameter takes
+
+error: aborting due to 4 previous errors
 
diff --git a/tests/ui/const-generics/variant-discrimiant-no-generics.full.stderr b/tests/ui/const-generics/variant-discrimiant-no-generics.full.stderr
new file mode 100644
index 00000000000..2f03b8e1f66
--- /dev/null
+++ b/tests/ui/const-generics/variant-discrimiant-no-generics.full.stderr
@@ -0,0 +1,34 @@
+error: generic parameters may not be used in enum discriminant values
+  --> $DIR/variant-discrimiant-no-generics.rs:7:15
+   |
+LL |     Variant = N,
+   |               ^ cannot perform const operation using `N`
+   |
+   = note: const parameters may not be used in enum discriminant values
+
+error: generic parameters may not be used in enum discriminant values
+  --> $DIR/variant-discrimiant-no-generics.rs:12:17
+   |
+LL |     Variant = { N + 1 },
+   |                 ^ cannot perform const operation using `N`
+   |
+   = note: const parameters may not be used in enum discriminant values
+
+error: generic parameters may not be used in enum discriminant values
+  --> $DIR/variant-discrimiant-no-generics.rs:18:37
+   |
+LL |     Variant = { std::mem::size_of::<T>() as isize },
+   |                                     ^ cannot perform const operation using `T`
+   |
+   = note: type parameters may not be used in enum discriminant values
+
+error: generic parameters may not be used in enum discriminant values
+  --> $DIR/variant-discrimiant-no-generics.rs:25:17
+   |
+LL |         let a: &'a ();
+   |                 ^^ cannot perform const operation using `'a`
+   |
+   = note: lifetime parameters may not be used in enum discriminant values
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/const-generics/variant-discrimiant-no-generics.min.stderr b/tests/ui/const-generics/variant-discrimiant-no-generics.min.stderr
new file mode 100644
index 00000000000..2f03b8e1f66
--- /dev/null
+++ b/tests/ui/const-generics/variant-discrimiant-no-generics.min.stderr
@@ -0,0 +1,34 @@
+error: generic parameters may not be used in enum discriminant values
+  --> $DIR/variant-discrimiant-no-generics.rs:7:15
+   |
+LL |     Variant = N,
+   |               ^ cannot perform const operation using `N`
+   |
+   = note: const parameters may not be used in enum discriminant values
+
+error: generic parameters may not be used in enum discriminant values
+  --> $DIR/variant-discrimiant-no-generics.rs:12:17
+   |
+LL |     Variant = { N + 1 },
+   |                 ^ cannot perform const operation using `N`
+   |
+   = note: const parameters may not be used in enum discriminant values
+
+error: generic parameters may not be used in enum discriminant values
+  --> $DIR/variant-discrimiant-no-generics.rs:18:37
+   |
+LL |     Variant = { std::mem::size_of::<T>() as isize },
+   |                                     ^ cannot perform const operation using `T`
+   |
+   = note: type parameters may not be used in enum discriminant values
+
+error: generic parameters may not be used in enum discriminant values
+  --> $DIR/variant-discrimiant-no-generics.rs:25:17
+   |
+LL |         let a: &'a ();
+   |                 ^^ cannot perform const operation using `'a`
+   |
+   = note: lifetime parameters may not be used in enum discriminant values
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/const-generics/variant-discrimiant-no-generics.rs b/tests/ui/const-generics/variant-discrimiant-no-generics.rs
new file mode 100644
index 00000000000..e286aa9a613
--- /dev/null
+++ b/tests/ui/const-generics/variant-discrimiant-no-generics.rs
@@ -0,0 +1,32 @@
+// revisions: full min
+
+#![cfg_attr(full, feature(generic_const_exprs))]
+#![cfg_attr(full, allow(incomplete_features))]
+
+enum Foo<const N: isize> {
+    Variant = N,
+    //~^ ERROR: generic parameters may not be used in enum discriminant values
+}
+
+enum Owo<const N: isize> {
+    Variant = { N + 1 },
+    //~^ ERROR: generic parameters may not be used in enum discriminant values
+}
+
+#[repr(isize)]
+enum Bar<T> {
+    Variant = { std::mem::size_of::<T>() as isize },
+    Other(T), //~^ ERROR: generic parameters may not be used in enum discriminant values
+}
+
+#[repr(isize)]
+enum UwU<'a> {
+    Variant = {
+        let a: &'a ();
+        //~^ ERROR: generic parameters may not be used in enum discriminant values
+        10_isize
+    },
+    Other(&'a ()),
+}
+
+fn main() {}
diff --git a/tests/ui/const-ptr/out_of_bounds_read.rs b/tests/ui/const-ptr/out_of_bounds_read.rs
index 9dd669180da..a371aa93c5e 100644
--- a/tests/ui/const-ptr/out_of_bounds_read.rs
+++ b/tests/ui/const-ptr/out_of_bounds_read.rs
@@ -1,7 +1,5 @@
 // error-pattern: evaluation of constant value failed
 
-#![feature(const_ptr_read)]
-
 fn main() {
     use std::ptr;
 
diff --git a/tests/ui/const-ptr/out_of_bounds_read.stderr b/tests/ui/const-ptr/out_of_bounds_read.stderr
index 89536f53f08..c5c0a1cdefc 100644
--- a/tests/ui/const-ptr/out_of_bounds_read.stderr
+++ b/tests/ui/const-ptr/out_of_bounds_read.stderr
@@ -6,7 +6,7 @@ error[E0080]: evaluation of constant value failed
 note: inside `std::ptr::read::<u32>`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 note: inside `_READ`
-  --> $DIR/out_of_bounds_read.rs:12:33
+  --> $DIR/out_of_bounds_read.rs:10:33
    |
 LL |     const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^
@@ -21,7 +21,7 @@ note: inside `std::ptr::read::<u32>`
 note: inside `ptr::const_ptr::<impl *const u32>::read`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `_CONST_READ`
-  --> $DIR/out_of_bounds_read.rs:13:39
+  --> $DIR/out_of_bounds_read.rs:11:39
    |
 LL |     const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
    |                                       ^^^^^^^^^^^^^^^^^^^
@@ -36,7 +36,7 @@ note: inside `std::ptr::read::<u32>`
 note: inside `ptr::mut_ptr::<impl *mut u32>::read`
   --> $SRC_DIR/core/src/ptr/mut_ptr.rs:LL:COL
 note: inside `_MUT_READ`
-  --> $DIR/out_of_bounds_read.rs:14:37
+  --> $DIR/out_of_bounds_read.rs:12:37
    |
 LL |     const _MUT_READ: u32 = unsafe { (PAST_END_PTR as *mut u32).read() };
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/consts/const-prop-ice.rs b/tests/ui/const_prop/const-prop-ice.rs
index 5bffe020629..5bffe020629 100644
--- a/tests/ui/consts/const-prop-ice.rs
+++ b/tests/ui/const_prop/const-prop-ice.rs
diff --git a/tests/ui/consts/const-prop-ice.stderr b/tests/ui/const_prop/const-prop-ice.stderr
index 3bcf2b2de7b..3bcf2b2de7b 100644
--- a/tests/ui/consts/const-prop-ice.stderr
+++ b/tests/ui/const_prop/const-prop-ice.stderr
diff --git a/tests/ui/consts/const-prop-ice2.rs b/tests/ui/const_prop/const-prop-ice2.rs
index d533e394c06..d533e394c06 100644
--- a/tests/ui/consts/const-prop-ice2.rs
+++ b/tests/ui/const_prop/const-prop-ice2.rs
diff --git a/tests/ui/consts/const-prop-ice2.stderr b/tests/ui/const_prop/const-prop-ice2.stderr
index 2b65ffc2db7..2b65ffc2db7 100644
--- a/tests/ui/consts/const-prop-ice2.stderr
+++ b/tests/ui/const_prop/const-prop-ice2.stderr
diff --git a/tests/ui/consts/const-prop-ice3.rs b/tests/ui/const_prop/const-prop-ice3.rs
index 8ab011661e3..8ab011661e3 100644
--- a/tests/ui/consts/const-prop-ice3.rs
+++ b/tests/ui/const_prop/const-prop-ice3.rs
diff --git a/tests/ui/consts/const-prop-overflowing-casts.rs b/tests/ui/const_prop/const-prop-overflowing-casts.rs
index 8cc5b98250b..8cc5b98250b 100644
--- a/tests/ui/consts/const-prop-overflowing-casts.rs
+++ b/tests/ui/const_prop/const-prop-overflowing-casts.rs
diff --git a/tests/ui/consts/const-prop-read-static-in-const.rs b/tests/ui/const_prop/const-prop-read-static-in-const.rs
index 21426205955..21426205955 100644
--- a/tests/ui/consts/const-prop-read-static-in-const.rs
+++ b/tests/ui/const_prop/const-prop-read-static-in-const.rs
diff --git a/tests/ui/consts/const-prop-read-static-in-const.stderr b/tests/ui/const_prop/const-prop-read-static-in-const.stderr
index 793da628587..793da628587 100644
--- a/tests/ui/consts/const-prop-read-static-in-const.stderr
+++ b/tests/ui/const_prop/const-prop-read-static-in-const.stderr
diff --git a/tests/ui/const_prop/unsized-local-ice.rs b/tests/ui/const_prop/unsized-local-ice.rs
new file mode 100644
index 00000000000..c725b3238ea
--- /dev/null
+++ b/tests/ui/const_prop/unsized-local-ice.rs
@@ -0,0 +1,9 @@
+// build-pass
+//! Regression test for <https://github.com/rust-lang/rust/issues/68538>.
+#![feature(unsized_fn_params)]
+
+pub fn take_unsized_slice(s: [u8]) {
+    s[0];
+}
+
+fn main() {}
diff --git a/tests/ui/consts/auxiliary/external_macro.rs b/tests/ui/consts/auxiliary/external_macro.rs
index d260634c996..fea24703dda 100644
--- a/tests/ui/consts/auxiliary/external_macro.rs
+++ b/tests/ui/consts/auxiliary/external_macro.rs
@@ -9,6 +9,6 @@
 macro_rules! static_assert {
     ($test:expr) => {
         #[allow(dead_code)]
-        const _: () = [()][!($test: bool) as usize];
+        const _: () = [()][!($test) as usize];
     }
 }
diff --git a/tests/ui/consts/const-block-const-bound.rs b/tests/ui/consts/const-block-const-bound.rs
index 42aa0216b87..3704a1a5a39 100644
--- a/tests/ui/consts/const-block-const-bound.rs
+++ b/tests/ui/consts/const-block-const-bound.rs
@@ -11,15 +11,9 @@ impl Drop for UnconstDrop {
     fn drop(&mut self) {}
 }
 
-struct NonDrop;
-
-impl !Drop for NonDrop {}
-
 fn main() {
     const {
         f(UnconstDrop);
         //~^ ERROR can't drop
-        f(NonDrop);
-        //~^ ERROR can't drop
     }
 }
diff --git a/tests/ui/consts/const-block-const-bound.stderr b/tests/ui/consts/const-block-const-bound.stderr
index fef4914fad5..caf24e7afcf 100644
--- a/tests/ui/consts/const-block-const-bound.stderr
+++ b/tests/ui/consts/const-block-const-bound.stderr
@@ -1,5 +1,5 @@
 error[E0277]: can't drop `UnconstDrop` in const contexts
-  --> $DIR/const-block-const-bound.rs:20:9
+  --> $DIR/const-block-const-bound.rs:16:9
    |
 LL |         f(UnconstDrop);
    |         ^^^^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `UnconstDrop`
@@ -12,20 +12,6 @@ LL |         &f(UnconstDrop);
 LL |         &mut f(UnconstDrop);
    |         ++++
 
-error[E0277]: can't drop `NonDrop` in const contexts
-  --> $DIR/const-block-const-bound.rs:22:9
-   |
-LL |         f(NonDrop);
-   |         ^^^^^^^^^^ the trait `~const Destruct` is not implemented for `NonDrop`
-   |
-   = note: the trait bound `NonDrop: ~const Destruct` is not satisfied
-help: consider borrowing here
-   |
-LL |         &f(NonDrop);
-   |         +
-LL |         &mut f(NonDrop);
-   |         ++++
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0277`.
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/consts/const-eval/ub-ref-ptr.rs b/tests/ui/consts/const-eval/ub-ref-ptr.rs
index 369e4519407..a5d2ea01486 100644
--- a/tests/ui/consts/const-eval/ub-ref-ptr.rs
+++ b/tests/ui/consts/const-eval/ub-ref-ptr.rs
@@ -3,7 +3,6 @@
 // normalize-stderr-test "(the raw bytes of the constant) \(size: [0-9]*, align: [0-9]*\)" -> "$1 (size: $$SIZE, align: $$ALIGN)"
 // normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
 #![allow(invalid_value)]
-#![feature(const_ptr_read)]
 
 use std::mem;
 
diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.stderr b/tests/ui/consts/const-eval/ub-ref-ptr.stderr
index 080568b51ef..1d19dfff50b 100644
--- a/tests/ui/consts/const-eval/ub-ref-ptr.stderr
+++ b/tests/ui/consts/const-eval/ub-ref-ptr.stderr
@@ -1,5 +1,5 @@
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:16:1
+  --> $DIR/ub-ref-ptr.rs:15:1
    |
 LL | const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
    | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
@@ -10,7 +10,7 @@ LL | const UNALIGNED: &u16 = unsafe { mem::transmute(&[0u8; 4]) };
            }
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:20:1
+  --> $DIR/ub-ref-ptr.rs:19:1
    |
 LL | const UNALIGNED_BOX: Box<u16> = unsafe { mem::transmute(&[0u8; 4]) };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned box (required 2 byte alignment but found 1)
@@ -21,7 +21,7 @@ LL | const UNALIGNED_BOX: Box<u16> = unsafe { mem::transmute(&[0u8; 4]) };
            }
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:24:1
+  --> $DIR/ub-ref-ptr.rs:23:1
    |
 LL | const NULL: &u16 = unsafe { mem::transmute(0usize) };
    | ^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
@@ -32,7 +32,7 @@ LL | const NULL: &u16 = unsafe { mem::transmute(0usize) };
            }
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:27:1
+  --> $DIR/ub-ref-ptr.rs:26:1
    |
 LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
    | ^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null box
@@ -43,7 +43,7 @@ LL | const NULL_BOX: Box<u16> = unsafe { mem::transmute(0usize) };
            }
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-ref-ptr.rs:34:1
+  --> $DIR/ub-ref-ptr.rs:33:1
    |
 LL | const REF_AS_USIZE: usize = unsafe { mem::transmute(&0) };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
@@ -52,7 +52,7 @@ LL | const REF_AS_USIZE: usize = unsafe { mem::transmute(&0) };
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-ref-ptr.rs:37:39
+  --> $DIR/ub-ref-ptr.rs:36:39
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
@@ -61,13 +61,13 @@ LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
 note: erroneous constant used
-  --> $DIR/ub-ref-ptr.rs:37:38
+  --> $DIR/ub-ref-ptr.rs:36:38
    |
 LL | const REF_AS_USIZE_SLICE: &[usize] = &[unsafe { mem::transmute(&0) }];
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-ref-ptr.rs:40:86
+  --> $DIR/ub-ref-ptr.rs:39:86
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
    |                                                                                      ^^^^^^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
@@ -76,13 +76,13 @@ LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[us
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
 note: erroneous constant used
-  --> $DIR/ub-ref-ptr.rs:40:85
+  --> $DIR/ub-ref-ptr.rs:39:85
    |
 LL | const REF_AS_USIZE_BOX_SLICE: Box<[usize]> = unsafe { mem::transmute::<&[usize], _>(&[mem::transmute(&0)]) };
    |                                                                                     ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:43:1
+  --> $DIR/ub-ref-ptr.rs:42:1
    |
 LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (0x539[noalloc] has no provenance)
@@ -93,7 +93,7 @@ LL | const USIZE_AS_REF: &'static u8 = unsafe { mem::transmute(1337usize) };
            }
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:46:1
+  --> $DIR/ub-ref-ptr.rs:45:1
    |
 LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling box (0x539[noalloc] has no provenance)
@@ -104,13 +104,13 @@ LL | const USIZE_AS_BOX: Box<u8> = unsafe { mem::transmute(1337usize) };
            }
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-ref-ptr.rs:49:41
+  --> $DIR/ub-ref-ptr.rs:48:41
    |
 LL | const UNINIT_PTR: *const i32 = unsafe { MaybeUninit { uninit: () }.init };
    |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:53:1
+  --> $DIR/ub-ref-ptr.rs:52:1
    |
 LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
    | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a function pointer
@@ -121,13 +121,13 @@ LL | const NULL_FN_PTR: fn() = unsafe { mem::transmute(0usize) };
            }
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-ref-ptr.rs:55:38
+  --> $DIR/ub-ref-ptr.rs:54:38
    |
 LL | const UNINIT_FN_PTR: fn() = unsafe { MaybeUninit { uninit: () }.init };
    |                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:58:1
+  --> $DIR/ub-ref-ptr.rs:57:1
    |
 LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered 0xd[noalloc], but expected a function pointer
@@ -138,7 +138,7 @@ LL | const DANGLING_FN_PTR: fn() = unsafe { mem::transmute(13usize) };
            }
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/ub-ref-ptr.rs:60:1
+  --> $DIR/ub-ref-ptr.rs:59:1
    |
 LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
    | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered alloc41, but expected a function pointer
@@ -158,7 +158,7 @@ note: inside `std::ptr::read::<u32>`
 note: inside `ptr::const_ptr::<impl *const u32>::read`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `UNALIGNED_READ`
-  --> $DIR/ub-ref-ptr.rs:67:5
+  --> $DIR/ub-ref-ptr.rs:66:5
    |
 LL |     ptr.read();
    |     ^^^^^^^^^^
diff --git a/tests/ui/consts/extra-const-ub/detect-extra-ub.rs b/tests/ui/consts/extra-const-ub/detect-extra-ub.rs
index e2f8149883b..6a3c93ce7a6 100644
--- a/tests/ui/consts/extra-const-ub/detect-extra-ub.rs
+++ b/tests/ui/consts/extra-const-ub/detect-extra-ub.rs
@@ -1,7 +1,6 @@
 // revisions: no_flag with_flag
 // [no_flag] check-pass
 // [with_flag] compile-flags: -Zextra-const-ub-checks
-#![feature(const_ptr_read)]
 
 use std::mem::transmute;
 
diff --git a/tests/ui/consts/extra-const-ub/detect-extra-ub.with_flag.stderr b/tests/ui/consts/extra-const-ub/detect-extra-ub.with_flag.stderr
index b2a5fd90149..3970baefcb3 100644
--- a/tests/ui/consts/extra-const-ub/detect-extra-ub.with_flag.stderr
+++ b/tests/ui/consts/extra-const-ub/detect-extra-ub.with_flag.stderr
@@ -1,11 +1,11 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/detect-extra-ub.rs:9:20
+  --> $DIR/detect-extra-ub.rs:8:20
    |
 LL |     let _x: bool = transmute(3u8);
    |                    ^^^^^^^^^^^^^^ constructing invalid value: encountered 0x03, but expected a boolean
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/detect-extra-ub.rs:15:21
+  --> $DIR/detect-extra-ub.rs:14:21
    |
 LL |     let _x: usize = transmute(&3u8);
    |                     ^^^^^^^^^^^^^^^ unable to turn pointer into raw bytes
@@ -14,7 +14,7 @@ LL |     let _x: usize = transmute(&3u8);
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/detect-extra-ub.rs:21:30
+  --> $DIR/detect-extra-ub.rs:20:30
    |
 LL |     let _x: (usize, usize) = transmute(x);
    |                              ^^^^^^^^^^^^ unable to turn pointer into raw bytes
@@ -23,7 +23,7 @@ LL |     let _x: (usize, usize) = transmute(x);
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/detect-extra-ub.rs:26:20
+  --> $DIR/detect-extra-ub.rs:25:20
    |
 LL |     let _x: &u32 = transmute(&[0u8; 4]);
    |                    ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 4 byte alignment but found 1)
diff --git a/tests/ui/consts/issue-50439.rs b/tests/ui/consts/issue-50439.rs
index 0be7c405473..d42347e136e 100644
--- a/tests/ui/consts/issue-50439.rs
+++ b/tests/ui/consts/issue-50439.rs
@@ -22,7 +22,9 @@ impl<T: Sized> PinDropInternal for Bears<T> {
     where
         Self: ReflectDrop,
     {
-        let _ = [(); 0 - !!(<Bears<T> as ReflectDrop>::REFLECT_DROP) as usize]; //~ ERROR constant expression depends on a generic parameter
+        let _ = [(); 0 - !!(<Bears<T> as ReflectDrop>::REFLECT_DROP) as usize];
+        //~^ ERROR constant expression depends on a generic parameter
+        //~| ERROR constant expression depends on a generic parameter
     }
 }
 
diff --git a/tests/ui/consts/issue-50439.stderr b/tests/ui/consts/issue-50439.stderr
index 3fbdf33b2d8..7a8cd45ecc7 100644
--- a/tests/ui/consts/issue-50439.stderr
+++ b/tests/ui/consts/issue-50439.stderr
@@ -6,5 +6,13 @@ LL |         let _ = [(); 0 - !!(<Bears<T> as ReflectDrop>::REFLECT_DROP) as usi
    |
    = note: this may fail depending on what value the parameter takes
 
-error: aborting due to previous error
+error: constant expression depends on a generic parameter
+  --> $DIR/issue-50439.rs:25:17
+   |
+LL |         let _ = [(); 0 - !!(<Bears<T> as ReflectDrop>::REFLECT_DROP) as usize];
+   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: this may fail depending on what value the parameter takes
+
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/issue-miri-1910.rs b/tests/ui/consts/issue-miri-1910.rs
index 29e0ea95026..3798332dfd7 100644
--- a/tests/ui/consts/issue-miri-1910.rs
+++ b/tests/ui/consts/issue-miri-1910.rs
@@ -1,6 +1,5 @@
 // error-pattern unable to turn pointer into raw bytes
 // normalize-stderr-test: "alloc[0-9]+\+0x[a-z0-9]+" -> "ALLOC"
-#![feature(const_ptr_read)]
 
 const C: () = unsafe {
     let foo = Some(&42 as *const i32);
diff --git a/tests/ui/consts/issue-miri-1910.stderr b/tests/ui/consts/issue-miri-1910.stderr
index a10eea9de11..fb758d406b5 100644
--- a/tests/ui/consts/issue-miri-1910.stderr
+++ b/tests/ui/consts/issue-miri-1910.stderr
@@ -10,7 +10,7 @@ note: inside `std::ptr::read::<u8>`
 note: inside `ptr::const_ptr::<impl *const u8>::read`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `C`
-  --> $DIR/issue-miri-1910.rs:8:5
+  --> $DIR/issue-miri-1910.rs:7:5
    |
 LL |     (&foo as *const _ as *const u8).add(one_and_a_half_pointers).read();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/issues/issue-12511.rs b/tests/ui/cycle-trait/issue-12511.rs
index ea83e3fd9dc..ea83e3fd9dc 100644
--- a/tests/ui/issues/issue-12511.rs
+++ b/tests/ui/cycle-trait/issue-12511.rs
diff --git a/tests/ui/issues/issue-12511.stderr b/tests/ui/cycle-trait/issue-12511.stderr
index 558aad10946..558aad10946 100644
--- a/tests/ui/issues/issue-12511.stderr
+++ b/tests/ui/cycle-trait/issue-12511.stderr
diff --git a/tests/ui/deployment-target/invalid-target.rs b/tests/ui/deployment-target/invalid-target.rs
new file mode 100644
index 00000000000..336624320a3
--- /dev/null
+++ b/tests/ui/deployment-target/invalid-target.rs
@@ -0,0 +1,4 @@
+// compile-flags: --target x86_64-unknown-linux-gnu --print deployment-target
+// needs-llvm-components: x86
+
+fn main() {}
diff --git a/tests/ui/deployment-target/invalid-target.stderr b/tests/ui/deployment-target/invalid-target.stderr
new file mode 100644
index 00000000000..eb4ac131c40
--- /dev/null
+++ b/tests/ui/deployment-target/invalid-target.stderr
@@ -0,0 +1,2 @@
+error: only Apple targets currently support deployment version info
+
diff --git a/tests/ui/deployment-target/macos-target.rs b/tests/ui/deployment-target/macos-target.rs
new file mode 100644
index 00000000000..701ccf4799a
--- /dev/null
+++ b/tests/ui/deployment-target/macos-target.rs
@@ -0,0 +1,7 @@
+// only-macos
+// compile-flags: --print deployment-target
+// normalize-stdout-test: "\d+\." -> "$$CURRENT_MAJOR_VERSION."
+// normalize-stdout-test: "\d+" -> "$$CURRENT_MINOR_VERSION"
+// check-pass
+
+fn main() {}
diff --git a/tests/ui/deployment-target/macos-target.stdout b/tests/ui/deployment-target/macos-target.stdout
new file mode 100644
index 00000000000..f55ef568ed6
--- /dev/null
+++ b/tests/ui/deployment-target/macos-target.stdout
@@ -0,0 +1 @@
+deployment_target=$CURRENT_MAJOR_VERSION.$CURRENT_MINOR_VERSION
diff --git a/tests/ui/issues/issue-15689-1.rs b/tests/ui/deriving/issue-15689-1.rs
index d143926b281..d143926b281 100644
--- a/tests/ui/issues/issue-15689-1.rs
+++ b/tests/ui/deriving/issue-15689-1.rs
diff --git a/tests/ui/issues/issue-15689-2.rs b/tests/ui/deriving/issue-15689-2.rs
index 83dcb1406f8..83dcb1406f8 100644
--- a/tests/ui/issues/issue-15689-2.rs
+++ b/tests/ui/deriving/issue-15689-2.rs
diff --git a/tests/ui/did_you_mean/issue-38147-4.stderr b/tests/ui/did_you_mean/issue-38147-4.stderr
index d3339989361..43647fa562b 100644
--- a/tests/ui/did_you_mean/issue-38147-4.stderr
+++ b/tests/ui/did_you_mean/issue-38147-4.stderr
@@ -6,8 +6,8 @@ LL |     f.s.push('x');
    |
 help: consider changing this to be a mutable reference
    |
-LL | fn f(x: usize, f: &mut Foo<'_>) {
-   |                   ~~~~~~~~~~~~
+LL | fn f(x: usize, f: &mut Foo) {
+   |                    +++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/did_you_mean/issue-39544.stderr b/tests/ui/did_you_mean/issue-39544.stderr
index 8dc0512a945..8ccb4cbb0c1 100644
--- a/tests/ui/did_you_mean/issue-39544.stderr
+++ b/tests/ui/did_you_mean/issue-39544.stderr
@@ -40,7 +40,7 @@ LL |         let _ = &mut other.x;
 help: consider changing this to be a mutable reference
    |
 LL |     fn foo1(&self, other: &mut Z) {
-   |                           ~~~~~~
+   |                            +++
 
 error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference
   --> $DIR/issue-39544.rs:25:17
@@ -62,7 +62,7 @@ LL |         let _ = &mut other.x;
 help: consider changing this to be a mutable reference
    |
 LL |     fn foo2<'a>(&'a self, other: &mut Z) {
-   |                                  ~~~~~~
+   |                                   +++
 
 error[E0596]: cannot borrow `self.x` as mutable, as it is behind a `&` reference
   --> $DIR/issue-39544.rs:30:17
@@ -73,7 +73,7 @@ LL |         let _ = &mut self.x;
 help: consider changing this to be a mutable reference
    |
 LL |     fn foo3<'a>(self: &'a mut Self, other: &Z) {
-   |                       ~~~~~~~~~~~~
+   |                           +++
 
 error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference
   --> $DIR/issue-39544.rs:31:17
@@ -84,7 +84,7 @@ LL |         let _ = &mut other.x;
 help: consider changing this to be a mutable reference
    |
 LL |     fn foo3<'a>(self: &'a Self, other: &mut Z) {
-   |                                        ~~~~~~
+   |                                         +++
 
 error[E0596]: cannot borrow `other.x` as mutable, as it is behind a `&` reference
   --> $DIR/issue-39544.rs:35:17
@@ -95,7 +95,7 @@ LL |         let _ = &mut other.x;
 help: consider changing this to be a mutable reference
    |
 LL |     fn foo4(other: &mut Z) {
-   |                    ~~~~~~
+   |                     +++
 
 error[E0596]: cannot borrow `z.x` as mutable, as `z` is not declared as mutable
   --> $DIR/issue-39544.rs:41:13
@@ -117,7 +117,7 @@ LL |     let _ = &mut w.x;
 help: consider changing this to be a mutable reference
    |
 LL | pub fn with_arg(z: Z, w: &mut Z) {
-   |                          ~~~~~~
+   |                           +++
 
 error[E0594]: cannot assign to `*x.0`, which is behind a `&` reference
   --> $DIR/issue-39544.rs:48:5
diff --git a/tests/ui/did_you_mean/issue-40823.stderr b/tests/ui/did_you_mean/issue-40823.stderr
index aadd698891e..ba94a570256 100644
--- a/tests/ui/did_you_mean/issue-40823.stderr
+++ b/tests/ui/did_you_mean/issue-40823.stderr
@@ -7,7 +7,7 @@ LL |     buf.iter_mut();
 help: consider changing this to be a mutable reference
    |
 LL |     let mut buf = &mut [1, 2, 3, 4];
-   |                   ~~~~~~~~~~~~~~~~~
+   |                    +++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr b/tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
index a3c607b5903..6d92fa5e14e 100644
--- a/tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
+++ b/tests/ui/did_you_mean/issue-48492-tuple-destructure-missing-parens.stderr
@@ -65,6 +65,7 @@ error: unexpected `,` in pattern
 LL |     let women, men: (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
    |              ^
    |
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 help: try adding parentheses to match on a tuple
    |
 LL |     let (women, men): (Vec<Genome>, Vec<Genome>) = genomes.iter().cloned()
diff --git a/tests/ui/issues/issue-979.rs b/tests/ui/drop/issue-979.rs
index 57a99b325ad..57a99b325ad 100644
--- a/tests/ui/issues/issue-979.rs
+++ b/tests/ui/drop/issue-979.rs
diff --git a/tests/ui/dropck/explicit-drop-bounds.bad1.stderr b/tests/ui/dropck/explicit-drop-bounds.bad1.stderr
new file mode 100644
index 00000000000..3b506c7e7ec
--- /dev/null
+++ b/tests/ui/dropck/explicit-drop-bounds.bad1.stderr
@@ -0,0 +1,35 @@
+error[E0277]: the trait bound `T: Copy` is not satisfied
+  --> $DIR/explicit-drop-bounds.rs:27:18
+   |
+LL | impl<T> Drop for DropMe<T>
+   |                  ^^^^^^^^^ the trait `Copy` is not implemented for `T`
+   |
+note: required by a bound in `DropMe`
+  --> $DIR/explicit-drop-bounds.rs:7:18
+   |
+LL | struct DropMe<T: Copy>(T);
+   |                  ^^^^ required by this bound in `DropMe`
+help: consider further restricting type parameter `T`
+   |
+LL |     [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
+   |                 ~~~~~~~~~~~~~~~~~~~~~~
+
+error[E0277]: the trait bound `T: Copy` is not satisfied
+  --> $DIR/explicit-drop-bounds.rs:32:13
+   |
+LL |     fn drop(&mut self) {}
+   |             ^^^^^^^^^ the trait `Copy` is not implemented for `T`
+   |
+note: required by a bound in `DropMe`
+  --> $DIR/explicit-drop-bounds.rs:7:18
+   |
+LL | struct DropMe<T: Copy>(T);
+   |                  ^^^^ required by this bound in `DropMe`
+help: consider further restricting type parameter `T`
+   |
+LL |     [T; 1]: Copy, T: std::marker::Copy // But `[T; 1]: Copy` does not imply `T: Copy`
+   |                 ~~~~~~~~~~~~~~~~~~~~~~
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/dropck/explicit-drop-bounds.bad2.stderr b/tests/ui/dropck/explicit-drop-bounds.bad2.stderr
new file mode 100644
index 00000000000..832af3e521a
--- /dev/null
+++ b/tests/ui/dropck/explicit-drop-bounds.bad2.stderr
@@ -0,0 +1,35 @@
+error[E0277]: the trait bound `T: Copy` is not satisfied
+  --> $DIR/explicit-drop-bounds.rs:37:18
+   |
+LL | impl<T> Drop for DropMe<T>
+   |                  ^^^^^^^^^ the trait `Copy` is not implemented for `T`
+   |
+note: required by a bound in `DropMe`
+  --> $DIR/explicit-drop-bounds.rs:7:18
+   |
+LL | struct DropMe<T: Copy>(T);
+   |                  ^^^^ required by this bound in `DropMe`
+help: consider restricting type parameter `T`
+   |
+LL | impl<T: std::marker::Copy> Drop for DropMe<T>
+   |       +++++++++++++++++++
+
+error[E0277]: the trait bound `T: Copy` is not satisfied
+  --> $DIR/explicit-drop-bounds.rs:40:13
+   |
+LL |     fn drop(&mut self) {}
+   |             ^^^^^^^^^ the trait `Copy` is not implemented for `T`
+   |
+note: required by a bound in `DropMe`
+  --> $DIR/explicit-drop-bounds.rs:7:18
+   |
+LL | struct DropMe<T: Copy>(T);
+   |                  ^^^^ required by this bound in `DropMe`
+help: consider restricting type parameter `T`
+   |
+LL | impl<T: std::marker::Copy> Drop for DropMe<T>
+   |       +++++++++++++++++++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/dropck/explicit-drop-bounds.rs b/tests/ui/dropck/explicit-drop-bounds.rs
new file mode 100644
index 00000000000..ab6f33c0999
--- /dev/null
+++ b/tests/ui/dropck/explicit-drop-bounds.rs
@@ -0,0 +1,44 @@
+// revisions: good1 good2 bad1 bad2
+//[good1] check-pass
+//[good2] check-pass
+
+use std::ops::Drop;
+
+struct DropMe<T: Copy>(T);
+
+#[cfg(good1)]
+impl<T> Drop for DropMe<T>
+where
+    T: Copy + Clone,
+{
+    fn drop(&mut self) {}
+}
+
+#[cfg(good2)]
+impl<T> Drop for DropMe<T>
+where
+    T: Copy,
+    [T; 1]: Copy, // Trivial bound implied by `T: Copy`
+{
+    fn drop(&mut self) {}
+}
+
+#[cfg(bad1)]
+impl<T> Drop for DropMe<T>
+//[bad1]~^ ERROR the trait bound `T: Copy` is not satisfied
+where
+    [T; 1]: Copy, // But `[T; 1]: Copy` does not imply `T: Copy`
+{
+    fn drop(&mut self) {}
+    //[bad1]~^ ERROR the trait bound `T: Copy` is not satisfied
+}
+
+#[cfg(bad2)]
+impl<T> Drop for DropMe<T>
+//[bad2]~^ ERROR the trait bound `T: Copy` is not satisfied
+{
+    fn drop(&mut self) {}
+    //[bad2]~^ ERROR the trait bound `T: Copy` is not satisfied
+}
+
+fn main() {}
diff --git a/tests/ui/dropck/explicit-implied-outlives.bad1.stderr b/tests/ui/dropck/explicit-implied-outlives.bad1.stderr
new file mode 100644
index 00000000000..bf6d70e7d37
--- /dev/null
+++ b/tests/ui/dropck/explicit-implied-outlives.bad1.stderr
@@ -0,0 +1,15 @@
+error[E0367]: `Drop` impl requires `T: 'static` but the struct it is implemented for does not
+  --> $DIR/explicit-implied-outlives.rs:28:8
+   |
+LL |     T: 'static,
+   |        ^^^^^^^
+   |
+note: the implementor must specify the same requirement
+  --> $DIR/explicit-implied-outlives.rs:7:1
+   |
+LL | struct DropMe<'a, T>(&'a T);
+   | ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0367`.
diff --git a/tests/ui/dropck/explicit-implied-outlives.bad2.stderr b/tests/ui/dropck/explicit-implied-outlives.bad2.stderr
new file mode 100644
index 00000000000..27a15170bdd
--- /dev/null
+++ b/tests/ui/dropck/explicit-implied-outlives.bad2.stderr
@@ -0,0 +1,15 @@
+error[E0367]: `Drop` impl requires `'a: 'static` but the struct it is implemented for does not
+  --> $DIR/explicit-implied-outlives.rs:37:9
+   |
+LL |     'a: 'static,
+   |         ^^^^^^^
+   |
+note: the implementor must specify the same requirement
+  --> $DIR/explicit-implied-outlives.rs:7:1
+   |
+LL | struct DropMe<'a, T>(&'a T);
+   | ^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0367`.
diff --git a/tests/ui/dropck/explicit-implied-outlives.rs b/tests/ui/dropck/explicit-implied-outlives.rs
new file mode 100644
index 00000000000..fa446591f3d
--- /dev/null
+++ b/tests/ui/dropck/explicit-implied-outlives.rs
@@ -0,0 +1,43 @@
+// revisions: good1 good2 bad1 bad2
+//[good1] check-pass
+//[good2] check-pass
+
+use std::ops::Drop;
+
+struct DropMe<'a, T>(&'a T);
+
+#[cfg(good1)]
+impl<'a, T> Drop for DropMe<'a, T>
+where
+    T: 'a, // Implied by struct, explicit on impl
+{
+    fn drop(&mut self) {}
+}
+
+#[cfg(good2)]
+impl<'a, T> Drop for DropMe<'a, T>
+where
+    'static: 'a, // Trivial bound
+{
+    fn drop(&mut self) {}
+}
+
+#[cfg(bad1)]
+impl<'a, T> Drop for DropMe<'a, T>
+where
+    T: 'static,
+    //[bad1]~^ ERROR `Drop` impl requires `T: 'static`
+{
+    fn drop(&mut self) {}
+}
+
+#[cfg(bad2)]
+impl<'a, T> Drop for DropMe<'a, T>
+where
+    'a: 'static,
+    //[bad2]~^ ERROR `Drop` impl requires `'a: 'static`
+{
+    fn drop(&mut self) {}
+}
+
+fn main() {}
diff --git a/tests/ui/dropck/negative.rs b/tests/ui/dropck/negative.rs
new file mode 100644
index 00000000000..ae63632b55e
--- /dev/null
+++ b/tests/ui/dropck/negative.rs
@@ -0,0 +1,7 @@
+#![feature(negative_impls)]
+
+struct NonDrop;
+impl !Drop for NonDrop {}
+//~^ ERROR negative `Drop` impls are not supported
+
+fn main() {}
diff --git a/tests/ui/dropck/negative.stderr b/tests/ui/dropck/negative.stderr
new file mode 100644
index 00000000000..d613e30b5ea
--- /dev/null
+++ b/tests/ui/dropck/negative.stderr
@@ -0,0 +1,8 @@
+error: negative `Drop` impls are not supported
+  --> $DIR/negative.rs:4:1
+   |
+LL | impl !Drop for NonDrop {}
+   | ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/tests/ui/dropck/reservation.rs b/tests/ui/dropck/reservation.rs
new file mode 100644
index 00000000000..f7199d4ec44
--- /dev/null
+++ b/tests/ui/dropck/reservation.rs
@@ -0,0 +1,10 @@
+#![feature(rustc_attrs)]
+
+struct ReservedDrop;
+#[rustc_reservation_impl = "message"]
+impl Drop for ReservedDrop {
+//~^ ERROR reservation `Drop` impls are not supported
+    fn drop(&mut self) {}
+}
+
+fn main() {}
diff --git a/tests/ui/dropck/reservation.stderr b/tests/ui/dropck/reservation.stderr
new file mode 100644
index 00000000000..19325d6ed44
--- /dev/null
+++ b/tests/ui/dropck/reservation.stderr
@@ -0,0 +1,8 @@
+error: reservation `Drop` impls are not supported
+  --> $DIR/reservation.rs:5:1
+   |
+LL | impl Drop for ReservedDrop {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/tests/ui/dropck/transitive-outlives-2.rs b/tests/ui/dropck/transitive-outlives-2.rs
new file mode 100644
index 00000000000..87154e25d40
--- /dev/null
+++ b/tests/ui/dropck/transitive-outlives-2.rs
@@ -0,0 +1,18 @@
+// check-pass
+
+use std::marker::PhantomData;
+use std::ops::Drop;
+
+// a >= b >= c >= a implies a = b = c
+struct DropMe<'a: 'b, 'b: 'c, 'c: 'a>(
+    PhantomData<&'a ()>,
+    PhantomData<&'b ()>,
+    PhantomData<&'c ()>,
+);
+
+// a >= b, a >= c, b >= a, c >= a implies a = b = c
+impl<'a: 'b + 'c, 'b: 'a, 'c: 'a> Drop for DropMe<'a, 'b, 'c> {
+    fn drop(&mut self) {}
+}
+
+fn main() {}
diff --git a/tests/ui/dropck/transitive-outlives.bad.stderr b/tests/ui/dropck/transitive-outlives.bad.stderr
new file mode 100644
index 00000000000..da5088b27b4
--- /dev/null
+++ b/tests/ui/dropck/transitive-outlives.bad.stderr
@@ -0,0 +1,15 @@
+error[E0367]: `Drop` impl requires `'a: 'c` but the struct it is implemented for does not
+  --> $DIR/transitive-outlives.rs:20:9
+   |
+LL |     'a: 'c,
+   |         ^^
+   |
+note: the implementor must specify the same requirement
+  --> $DIR/transitive-outlives.rs:7:1
+   |
+LL | struct DropMe<'a, 'b: 'a, 'c: 'b>(PhantomData<&'a ()>, PhantomData<&'b ()>, PhantomData<&'c ()>);
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0367`.
diff --git a/tests/ui/dropck/transitive-outlives.rs b/tests/ui/dropck/transitive-outlives.rs
new file mode 100644
index 00000000000..d071664abde
--- /dev/null
+++ b/tests/ui/dropck/transitive-outlives.rs
@@ -0,0 +1,26 @@
+// revisions: good bad
+//[good] check-pass
+
+use std::marker::PhantomData;
+use std::ops::Drop;
+
+struct DropMe<'a, 'b: 'a, 'c: 'b>(PhantomData<&'a ()>, PhantomData<&'b ()>, PhantomData<&'c ()>);
+
+#[cfg(good)]
+impl<'a, 'b, 'c> Drop for DropMe<'a, 'b, 'c>
+where
+    'c: 'a,
+{
+    fn drop(&mut self) {}
+}
+
+#[cfg(bad)]
+impl<'a, 'b, 'c> Drop for DropMe<'a, 'b, 'c>
+where
+    'a: 'c,
+    //[bad]~^ ERROR `Drop` impl requires `'a: 'c`
+{
+    fn drop(&mut self) {}
+}
+
+fn main() {}
diff --git a/tests/ui/dropck/trivial-impl-bounds.rs b/tests/ui/dropck/trivial-impl-bounds.rs
new file mode 100644
index 00000000000..a8f5d2c354b
--- /dev/null
+++ b/tests/ui/dropck/trivial-impl-bounds.rs
@@ -0,0 +1,34 @@
+// revisions: good1 good2 good3
+// check-pass
+
+use std::ops::Drop;
+
+struct Foo;
+
+const X: usize = 1;
+
+#[cfg(good1)]
+impl Drop for Foo
+where
+    [(); X]:, // Trivial WF bound
+{
+    fn drop(&mut self) {}
+}
+
+#[cfg(good2)]
+impl Drop for Foo
+where
+    for<'a> &'a (): Copy, // Trivial trait bound
+{
+    fn drop(&mut self) {}
+}
+
+#[cfg(good3)]
+impl Drop for Foo
+where
+    for<'a> &'a (): 'a, // Trivial outlives bound
+{
+    fn drop(&mut self) {}
+}
+
+fn main() {}
diff --git a/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.rs b/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.rs
index ad9fcc25b41..62137c0c8d3 100644
--- a/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.rs
+++ b/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.rs
@@ -7,7 +7,7 @@ use core::intrinsics::discriminant_value;
 enum MyWeirdOption<T> {
     None = 0,
     Some(T) = std::mem::size_of::<T>(),
-    //~^ ERROR generic parameters may not be used in const operations
+    //~^ ERROR generic parameters may not be used in enum discriminant values
 }
 
 fn main() {
diff --git a/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr b/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr
index e4e10468d53..2cb159ee291 100644
--- a/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr
+++ b/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice-2.stderr
@@ -1,11 +1,10 @@
-error: generic parameters may not be used in const operations
+error: generic parameters may not be used in enum discriminant values
   --> $DIR/issue-70453-generics-in-discr-ice-2.rs:9:35
    |
 LL |     Some(T) = std::mem::size_of::<T>(),
    |                                   ^ cannot perform const operation using `T`
    |
-   = note: type parameters may not be used in const expressions
-   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+   = note: type parameters may not be used in enum discriminant values
 
 error: aborting due to previous error
 
diff --git a/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice.rs b/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice.rs
index a0fb788a510..093c57534a4 100644
--- a/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice.rs
+++ b/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice.rs
@@ -8,7 +8,7 @@ enum MyWeirdOption<T> {
 //~^ ERROR parameter `T` is never used
     None = 0,
     Some = std::mem::size_of::<T>(),
-    //~^ ERROR generic parameters may not be used in const operations
+    //~^ ERROR generic parameters may not be used in enum discriminant values
 }
 
 fn main() {
diff --git a/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr b/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr
index 7ea8a39129e..fac3ce07aeb 100644
--- a/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr
+++ b/tests/ui/enum-discriminant/issue-70453-generics-in-discr-ice.stderr
@@ -1,11 +1,10 @@
-error: generic parameters may not be used in const operations
+error: generic parameters may not be used in enum discriminant values
   --> $DIR/issue-70453-generics-in-discr-ice.rs:10:32
    |
 LL |     Some = std::mem::size_of::<T>(),
    |                                ^ cannot perform const operation using `T`
    |
-   = note: type parameters may not be used in const expressions
-   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+   = note: type parameters may not be used in enum discriminant values
 
 error[E0392]: parameter `T` is never used
   --> $DIR/issue-70453-generics-in-discr-ice.rs:7:20
diff --git a/tests/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr b/tests/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr
index 0a7a631606e..15cd6d30364 100644
--- a/tests/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr
+++ b/tests/ui/enum-discriminant/issue-70453-polymorphic-ctfe.stderr
@@ -1,11 +1,10 @@
-error: generic parameters may not be used in const operations
+error: generic parameters may not be used in enum discriminant values
   --> $DIR/issue-70453-polymorphic-ctfe.rs:9:41
    |
 LL |     Some(T) = core::mem::size_of::<*mut T>(),
    |                                         ^ cannot perform const operation using `T`
    |
-   = note: type parameters may not be used in const expressions
-   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+   = note: type parameters may not be used in enum discriminant values
 
 error: aborting due to previous error
 
diff --git a/tests/ui/issues/issue-1821.rs b/tests/ui/enum/issue-1821.rs
index 76ee9c3edb0..76ee9c3edb0 100644
--- a/tests/ui/issues/issue-1821.rs
+++ b/tests/ui/enum/issue-1821.rs
diff --git a/tests/ui/enum/issue-67945-1.stderr b/tests/ui/enum/issue-67945-1.stderr
index 8f1b5b38e4c..878fa322f02 100644
--- a/tests/ui/enum/issue-67945-1.stderr
+++ b/tests/ui/enum/issue-67945-1.stderr
@@ -1,11 +1,10 @@
-error: generic parameters may not be used in const operations
+error: generic parameters may not be used in enum discriminant values
   --> $DIR/issue-67945-1.rs:3:16
    |
 LL |         let x: S = 0;
    |                ^ cannot perform const operation using `S`
    |
-   = note: type parameters may not be used in const expressions
-   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+   = note: type parameters may not be used in enum discriminant values
 
 error[E0392]: parameter `S` is never used
   --> $DIR/issue-67945-1.rs:1:10
diff --git a/tests/ui/enum/issue-67945-2.stderr b/tests/ui/enum/issue-67945-2.stderr
index 63d3521afe4..f8ec12d470a 100644
--- a/tests/ui/enum/issue-67945-2.stderr
+++ b/tests/ui/enum/issue-67945-2.stderr
@@ -1,11 +1,10 @@
-error: generic parameters may not be used in const operations
+error: generic parameters may not be used in enum discriminant values
   --> $DIR/issue-67945-2.rs:4:28
    |
 LL |     Var = type_ascribe!(0, S),
    |                            ^ cannot perform const operation using `S`
    |
-   = note: type parameters may not be used in const expressions
-   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
+   = note: type parameters may not be used in enum discriminant values
 
 error[E0392]: parameter `S` is never used
   --> $DIR/issue-67945-2.rs:3:10
diff --git a/tests/ui/error-codes/E0277.stderr b/tests/ui/error-codes/E0277.stderr
index 2b4784d7ecc..440e43dff81 100644
--- a/tests/ui/error-codes/E0277.stderr
+++ b/tests/ui/error-codes/E0277.stderr
@@ -5,7 +5,8 @@ LL | fn f(p: Path) { }
    |      ^ doesn't have a size known at compile-time
    |
    = help: within `Path`, the trait `Sized` is not implemented for `[u8]`
-   = note: required because it appears within the type `Path`
+note: required because it appears within the type `Path`
+  --> $SRC_DIR/std/src/path.rs:LL:COL
    = help: unsized fn params are gated as an unstable feature
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
diff --git a/tests/ui/error-codes/E0389.stderr b/tests/ui/error-codes/E0389.stderr
index 51c4c92addf..e4001856c38 100644
--- a/tests/ui/error-codes/E0389.stderr
+++ b/tests/ui/error-codes/E0389.stderr
@@ -7,7 +7,7 @@ LL |     fancy_ref.num = 6;
 help: consider changing this to be a mutable reference
    |
 LL |     let fancy_ref = &mut (&mut fancy);
-   |                     ~~~~~~~~~~~~~~~~~
+   |                      +++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/error-codes/E0719.rs b/tests/ui/error-codes/E0719.rs
index 3311e190937..cbf1bb219a0 100644
--- a/tests/ui/error-codes/E0719.rs
+++ b/tests/ui/error-codes/E0719.rs
@@ -1,5 +1,6 @@
 trait Foo: Iterator<Item = i32, Item = i32> {}
 //~^ ERROR is already specified
+//~| ERROR is already specified
 
 type Unit = ();
 
diff --git a/tests/ui/error-codes/E0719.stderr b/tests/ui/error-codes/E0719.stderr
index b342d634334..e302f406d02 100644
--- a/tests/ui/error-codes/E0719.stderr
+++ b/tests/ui/error-codes/E0719.stderr
@@ -7,13 +7,21 @@ LL | trait Foo: Iterator<Item = i32, Item = i32> {}
    |                     `Item` bound here first
 
 error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
-  --> $DIR/E0719.rs:6:42
+  --> $DIR/E0719.rs:1:33
+   |
+LL | trait Foo: Iterator<Item = i32, Item = i32> {}
+   |                     ----------  ^^^^^^^^^^ re-bound here
+   |                     |
+   |                     `Item` bound here first
+
+error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+  --> $DIR/E0719.rs:7:42
    |
 LL | fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
    |                               ---------  ^^^^^^^^^^^ re-bound here
    |                               |
    |                               `Item` bound here first
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0719`.
diff --git a/tests/ui/error-codes/E0771.rs b/tests/ui/error-codes/E0771.rs
index 67e7d106a1f..c0a2e98a7df 100644
--- a/tests/ui/error-codes/E0771.rs
+++ b/tests/ui/error-codes/E0771.rs
@@ -1,7 +1,7 @@
 #![feature(adt_const_params)]
 //~^ WARN the feature `adt_const_params` is incomplete
 
-fn function_with_str<'a, const STRING: &'a str>() {} //~ ERROR E0771
+fn function_with_str<'a, const STRING: &'a str>() {} //~ ERROR E0770
 
 fn main() {
     function_with_str::<"Hello, world!">()
diff --git a/tests/ui/error-codes/E0771.stderr b/tests/ui/error-codes/E0771.stderr
index b759399a940..9450c61c27b 100644
--- a/tests/ui/error-codes/E0771.stderr
+++ b/tests/ui/error-codes/E0771.stderr
@@ -1,10 +1,10 @@
-error[E0771]: use of non-static lifetime `'a` in const generic
+error[E0770]: the type of const parameters must not depend on other generic parameters
   --> $DIR/E0771.rs:4:41
    |
 LL | fn function_with_str<'a, const STRING: &'a str>() {}
-   |                                         ^^
+   |                                         ^^ the type must not depend on the parameter `'a`
    |
-   = note: for more information, see issue #74052 <https://github.com/rust-lang/rust/issues/74052>
+   = note: lifetime parameters may not be used in the type of const parameters
 
 warning: the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
   --> $DIR/E0771.rs:1:12
@@ -17,4 +17,4 @@ LL | #![feature(adt_const_params)]
 
 error: aborting due to previous error; 1 warning emitted
 
-For more information about this error, try `rustc --explain E0771`.
+For more information about this error, try `rustc --explain E0770`.
diff --git a/tests/ui/extern-flag/auxiliary/panic_handler.rs b/tests/ui/extern-flag/auxiliary/panic_handler.rs
new file mode 100644
index 00000000000..a625761a838
--- /dev/null
+++ b/tests/ui/extern-flag/auxiliary/panic_handler.rs
@@ -0,0 +1,17 @@
+#![feature(lang_items)]
+#![no_std]
+
+// Since `rustc` generally passes `-nodefaultlibs` to the linker,
+// Rust programs link necessary system libraries via `#[link()]`
+// attributes in the `libc` crate. `libc` is a dependency of `std`,
+// but as we are `#![no_std]`, we need to include it manually.
+#![feature(rustc_private)]
+extern crate libc;
+
+#[panic_handler]
+pub fn begin_panic_handler(_info: &core::panic::PanicInfo<'_>) -> ! {
+    loop {}
+}
+
+#[lang = "eh_personality"]
+extern "C" fn eh_personality() {}
diff --git a/tests/ui/extern-flag/force-extern.rs b/tests/ui/extern-flag/force-extern.rs
new file mode 100644
index 00000000000..f56b5378223
--- /dev/null
+++ b/tests/ui/extern-flag/force-extern.rs
@@ -0,0 +1,9 @@
+// check-pass
+// ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header)
+// aux-crate:force:panic_handler=panic_handler.rs
+// compile-flags: -Zunstable-options --crate-type dylib
+// edition:2018
+
+#![no_std]
+
+fn foo() {}
diff --git a/tests/ui/extern-flag/no-force-extern.rs b/tests/ui/extern-flag/no-force-extern.rs
new file mode 100644
index 00000000000..ce9cbfe1cd2
--- /dev/null
+++ b/tests/ui/extern-flag/no-force-extern.rs
@@ -0,0 +1,10 @@
+// aux-crate:panic_handler=panic_handler.rs
+// ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header)
+// compile_flags: -Zunstable-options --crate-type dylib
+// error-pattern: `#[panic_handler]` function required, but not found
+// dont-check-compiler-stderr
+// edition: 2018
+
+#![no_std]
+
+fn foo() {}
diff --git a/tests/ui/extern-flag/redundant-force-extern.rs b/tests/ui/extern-flag/redundant-force-extern.rs
new file mode 100644
index 00000000000..a4091616dd5
--- /dev/null
+++ b/tests/ui/extern-flag/redundant-force-extern.rs
@@ -0,0 +1,11 @@
+// check-pass
+// ignore-cross-compile (needs dylibs and compiletest doesn't have a more specific header)
+// aux-crate:force:panic_handler=panic_handler.rs
+// compile-flags: -Zunstable-options --crate-type dylib
+// edition:2018
+
+#![no_std]
+
+extern crate panic_handler;
+
+fn foo() {}
diff --git a/tests/ui/feature-gates/feature-gate-builtin_syntax.rs b/tests/ui/feature-gates/feature-gate-builtin_syntax.rs
new file mode 100644
index 00000000000..832bb5a96bc
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-builtin_syntax.rs
@@ -0,0 +1,7 @@
+struct Foo {
+    v: u8,
+    w: u8,
+}
+fn main() {
+    builtin # offset_of(Foo, v); //~ ERROR `builtin #` syntax is unstable
+}
diff --git a/tests/ui/feature-gates/feature-gate-builtin_syntax.stderr b/tests/ui/feature-gates/feature-gate-builtin_syntax.stderr
new file mode 100644
index 00000000000..3bc7848f66d
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-builtin_syntax.stderr
@@ -0,0 +1,12 @@
+error[E0658]: `builtin #` syntax is unstable
+  --> $DIR/feature-gate-builtin_syntax.rs:6:15
+   |
+LL |     builtin # offset_of(Foo, v);
+   |               ^^^^^^^^^
+   |
+   = note: see issue #110680 <https://github.com/rust-lang/rust/issues/110680> for more information
+   = help: add `#![feature(builtin_syntax)]` to the crate attributes to enable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-cfi_encoding.rs b/tests/ui/feature-gates/feature-gate-cfi_encoding.rs
new file mode 100644
index 00000000000..3cef8156014
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-cfi_encoding.rs
@@ -0,0 +1,4 @@
+#![crate_type = "lib"]
+
+#[cfi_encoding = "3Bar"] //~ERROR 3:1: 3:25: the `#[cfi_encoding]` attribute is an experimental feature [E0658]
+pub struct Foo(i32);
diff --git a/tests/ui/feature-gates/feature-gate-cfi_encoding.stderr b/tests/ui/feature-gates/feature-gate-cfi_encoding.stderr
new file mode 100644
index 00000000000..b10a1508881
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-cfi_encoding.stderr
@@ -0,0 +1,12 @@
+error[E0658]: the `#[cfi_encoding]` attribute is an experimental feature
+  --> $DIR/feature-gate-cfi_encoding.rs:3:1
+   |
+LL | #[cfi_encoding = "3Bar"]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #89653 <https://github.com/rust-lang/rust/issues/89653> for more information
+   = help: add `#![feature(cfi_encoding)]` to the crate attributes to enable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-debugger-visualizer.rs b/tests/ui/feature-gates/feature-gate-debugger-visualizer.rs
deleted file mode 100644
index 4c4dc450d18..00000000000
--- a/tests/ui/feature-gates/feature-gate-debugger-visualizer.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-#![debugger_visualizer(natvis_file = "auxiliary/debugger-visualizer.natvis")] //~ ERROR the `#[debugger_visualizer]` attribute is an experimental feature
-
-fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-debugger-visualizer.stderr b/tests/ui/feature-gates/feature-gate-debugger-visualizer.stderr
deleted file mode 100644
index e9367fbc6c9..00000000000
--- a/tests/ui/feature-gates/feature-gate-debugger-visualizer.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: the `#[debugger_visualizer]` attribute is an experimental feature
-  --> $DIR/feature-gate-debugger-visualizer.rs:1:1
-   |
-LL | #![debugger_visualizer(natvis_file = "auxiliary/debugger-visualizer.natvis")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #95939 <https://github.com/rust-lang/rust/issues/95939> for more information
-   = help: add `#![feature(debugger_visualizer)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-negative_bounds.rs b/tests/ui/feature-gates/feature-gate-negative_bounds.rs
new file mode 100644
index 00000000000..533cb0ce5bc
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-negative_bounds.rs
@@ -0,0 +1,4 @@
+fn test<T: !Copy>() {}
+//~^ ERROR negative bounds are not supported
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-negative_bounds.stderr b/tests/ui/feature-gates/feature-gate-negative_bounds.stderr
new file mode 100644
index 00000000000..ae010fdf3f8
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-negative_bounds.stderr
@@ -0,0 +1,8 @@
+error: negative bounds are not supported
+  --> $DIR/feature-gate-negative_bounds.rs:1:12
+   |
+LL | fn test<T: !Copy>() {}
+   |            ^
+
+error: aborting due to previous error
+
diff --git a/tests/ui/feature-gates/feature-gate-raw-dylib-2.rs b/tests/ui/feature-gates/feature-gate-raw-dylib-2.rs
deleted file mode 100644
index fc47a9061d3..00000000000
--- a/tests/ui/feature-gates/feature-gate-raw-dylib-2.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// only-x86
-#[link(name = "foo")]
-extern "C" {
-    #[link_ordinal(42)]
-    //~^ ERROR: `#[link_ordinal]` is unstable on x86
-    fn foo();
-    #[link_ordinal(5)]
-    //~^ ERROR: `#[link_ordinal]` is unstable on x86
-    static mut imported_variable: i32;
-}
-
-fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-raw-dylib-2.stderr b/tests/ui/feature-gates/feature-gate-raw-dylib-2.stderr
deleted file mode 100644
index 0e900760d24..00000000000
--- a/tests/ui/feature-gates/feature-gate-raw-dylib-2.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0658]: `#[link_ordinal]` is unstable on x86
-  --> $DIR/feature-gate-raw-dylib-2.rs:4:5
-   |
-LL |     #[link_ordinal(42)]
-   |     ^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #58713 <https://github.com/rust-lang/rust/issues/58713> for more information
-   = help: add `#![feature(raw_dylib)]` to the crate attributes to enable
-
-error[E0658]: `#[link_ordinal]` is unstable on x86
-  --> $DIR/feature-gate-raw-dylib-2.rs:7:5
-   |
-LL |     #[link_ordinal(5)]
-   |     ^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #58713 <https://github.com/rust-lang/rust/issues/58713> for more information
-   = help: add `#![feature(raw_dylib)]` to the crate attributes to enable
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-raw-dylib-import-name-type.rs b/tests/ui/feature-gates/feature-gate-raw-dylib-import-name-type.rs
deleted file mode 100644
index 295f502d6a3..00000000000
--- a/tests/ui/feature-gates/feature-gate-raw-dylib-import-name-type.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// only-windows
-// only-x86
-#[link(name = "foo", kind = "raw-dylib", import_name_type = "decorated")]
-//~^ ERROR link kind `raw-dylib` is unstable on x86
-//~| ERROR import name type is unstable
-extern "C" {}
-
-fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-raw-dylib-import-name-type.stderr b/tests/ui/feature-gates/feature-gate-raw-dylib-import-name-type.stderr
deleted file mode 100644
index d6b165b7610..00000000000
--- a/tests/ui/feature-gates/feature-gate-raw-dylib-import-name-type.stderr
+++ /dev/null
@@ -1,21 +0,0 @@
-error[E0658]: link kind `raw-dylib` is unstable on x86
-  --> $DIR/feature-gate-raw-dylib-import-name-type.rs:3:29
-   |
-LL | #[link(name = "foo", kind = "raw-dylib", import_name_type = "decorated")]
-   |                             ^^^^^^^^^^^
-   |
-   = note: see issue #58713 <https://github.com/rust-lang/rust/issues/58713> for more information
-   = help: add `#![feature(raw_dylib)]` to the crate attributes to enable
-
-error[E0658]: import name type is unstable
-  --> $DIR/feature-gate-raw-dylib-import-name-type.rs:3:61
-   |
-LL | #[link(name = "foo", kind = "raw-dylib", import_name_type = "decorated")]
-   |                                                             ^^^^^^^^^^^
-   |
-   = note: see issue #58713 <https://github.com/rust-lang/rust/issues/58713> for more information
-   = help: add `#![feature(raw_dylib)]` to the crate attributes to enable
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-raw-dylib.rs b/tests/ui/feature-gates/feature-gate-raw-dylib.rs
deleted file mode 100644
index 291cca8fd25..00000000000
--- a/tests/ui/feature-gates/feature-gate-raw-dylib.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-// only-windows
-// only-x86
-#[link(name = "foo", kind = "raw-dylib")]
-//~^ ERROR: link kind `raw-dylib` is unstable on x86
-extern "C" {}
-
-fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-raw-dylib.stderr b/tests/ui/feature-gates/feature-gate-raw-dylib.stderr
deleted file mode 100644
index f02241e4908..00000000000
--- a/tests/ui/feature-gates/feature-gate-raw-dylib.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: link kind `raw-dylib` is unstable on x86
-  --> $DIR/feature-gate-raw-dylib.rs:3:29
-   |
-LL | #[link(name = "foo", kind = "raw-dylib")]
-   |                             ^^^^^^^^^^^
-   |
-   = note: see issue #58713 <https://github.com/rust-lang/rust/issues/58713> for more information
-   = help: add `#![feature(raw_dylib)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr b/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr
index c3a371e25e8..1bdb2574ead 100644
--- a/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr
+++ b/tests/ui/feature-gates/feature-gate-return_type_notation.cfg.stderr
@@ -1,5 +1,5 @@
 error[E0658]: return type notation is experimental
-  --> $DIR/feature-gate-return_type_notation.rs:15:17
+  --> $DIR/feature-gate-return_type_notation.rs:14:17
    |
 LL | fn foo<T: Trait<m(): Send>>() {}
    |                 ^^^^^^^^^
@@ -7,17 +7,8 @@ LL | fn foo<T: Trait<m(): Send>>() {}
    = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
    = help: add `#![feature(return_type_notation)]` to the crate attributes to enable
 
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/feature-gate-return_type_notation.rs:7:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error: parenthesized generic arguments cannot be used in associated type constraints
-  --> $DIR/feature-gate-return_type_notation.rs:15:17
+  --> $DIR/feature-gate-return_type_notation.rs:14:17
    |
 LL | fn foo<T: Trait<m(): Send>>() {}
    |                 ^--
@@ -25,12 +16,12 @@ LL | fn foo<T: Trait<m(): Send>>() {}
    |                  help: remove these parentheses
 
 error[E0220]: associated type `m` not found for `Trait`
-  --> $DIR/feature-gate-return_type_notation.rs:15:17
+  --> $DIR/feature-gate-return_type_notation.rs:14:17
    |
 LL | fn foo<T: Trait<m(): Send>>() {}
    |                 ^ associated type `m` not found
 
-error: aborting due to 3 previous errors; 1 warning emitted
+error: aborting due to 3 previous errors
 
 Some errors have detailed explanations: E0220, E0658.
 For more information about an error, try `rustc --explain E0220`.
diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr b/tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr
index 52c90c1565c..dd6ebb61038 100644
--- a/tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr
+++ b/tests/ui/feature-gates/feature-gate-return_type_notation.no.stderr
@@ -1,14 +1,5 @@
-warning: the feature `async_fn_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/feature-gate-return_type_notation.rs:7:12
-   |
-LL | #![feature(async_fn_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 warning: return type notation is experimental
-  --> $DIR/feature-gate-return_type_notation.rs:15:17
+  --> $DIR/feature-gate-return_type_notation.rs:14:17
    |
 LL | fn foo<T: Trait<m(): Send>>() {}
    |                 ^^^^^^^^^
@@ -18,5 +9,5 @@ LL | fn foo<T: Trait<m(): Send>>() {}
    = warning: unstable syntax can change at any point in the future, causing a hard error!
    = note: for more information, see issue #65860 <https://github.com/rust-lang/rust/issues/65860>
 
-warning: 2 warnings emitted
+warning: 1 warning emitted
 
diff --git a/tests/ui/feature-gates/feature-gate-return_type_notation.rs b/tests/ui/feature-gates/feature-gate-return_type_notation.rs
index 5028b9ec9e3..d9bcb65feba 100644
--- a/tests/ui/feature-gates/feature-gate-return_type_notation.rs
+++ b/tests/ui/feature-gates/feature-gate-return_type_notation.rs
@@ -5,7 +5,6 @@
 // Since we're not adding new syntax, `cfg`'d out RTN must pass.
 
 #![feature(async_fn_in_trait)]
-//~^ WARN the feature `async_fn_in_trait` is incomplete
 
 trait Trait {
     async fn m();
diff --git a/tests/ui/unwind-abis/feature-gate-thiscall-unwind.rs b/tests/ui/feature-gates/feature-gate-thiscall.rs
index 0a323e50fcf..97a732bcff7 100644
--- a/tests/ui/unwind-abis/feature-gate-thiscall-unwind.rs
+++ b/tests/ui/feature-gates/feature-gate-thiscall.rs
@@ -1,5 +1,4 @@
 // gate-test-abi_thiscall
-// gate-test-c_unwind
 // needs-llvm-components: x86
 // compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib
 #![no_core]
@@ -7,8 +6,8 @@
 #[lang="sized"]
 trait Sized { }
 
-// Test that the "thiscall-unwind" ABI is feature-gated, and cannot be used when
-// the `c_unwind` feature gate is not used.
+// Test that the "thiscall" ABI is feature-gated, and cannot be used when
+// the `abi_thiscall` feature gate is not used.
 
 extern "thiscall-unwind" fn fu() {} //~ ERROR thiscall-unwind ABI is experimental
 extern "thiscall" fn f() {} //~ ERROR thiscall is experimental
diff --git a/tests/ui/unwind-abis/feature-gate-thiscall-unwind.stderr b/tests/ui/feature-gates/feature-gate-thiscall.stderr
index 9ca00a55cd8..346e45952cd 100644
--- a/tests/ui/unwind-abis/feature-gate-thiscall-unwind.stderr
+++ b/tests/ui/feature-gates/feature-gate-thiscall.stderr
@@ -1,14 +1,13 @@
 error[E0658]: thiscall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:13:8
+  --> $DIR/feature-gate-thiscall.rs:12:8
    |
 LL | extern "thiscall-unwind" fn fu() {}
    |        ^^^^^^^^^^^^^^^^^
    |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
+   = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:14:8
+  --> $DIR/feature-gate-thiscall.rs:13:8
    |
 LL | extern "thiscall" fn f() {}
    |        ^^^^^^^^^^
@@ -16,7 +15,7 @@ LL | extern "thiscall" fn f() {}
    = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:17:12
+  --> $DIR/feature-gate-thiscall.rs:16:12
    |
 LL |     extern "thiscall" fn m();
    |            ^^^^^^^^^^
@@ -24,16 +23,15 @@ LL |     extern "thiscall" fn m();
    = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:18:12
+  --> $DIR/feature-gate-thiscall.rs:17:12
    |
 LL |     extern "thiscall-unwind" fn mu();
    |            ^^^^^^^^^^^^^^^^^
    |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
+   = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:20:12
+  --> $DIR/feature-gate-thiscall.rs:19:12
    |
 LL |     extern "thiscall" fn dm() {}
    |            ^^^^^^^^^^
@@ -41,16 +39,15 @@ LL |     extern "thiscall" fn dm() {}
    = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:21:12
+  --> $DIR/feature-gate-thiscall.rs:20:12
    |
 LL |     extern "thiscall-unwind" fn dmu() {}
    |            ^^^^^^^^^^^^^^^^^
    |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
+   = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:26:12
+  --> $DIR/feature-gate-thiscall.rs:25:12
    |
 LL |     extern "thiscall" fn m() {}
    |            ^^^^^^^^^^
@@ -58,16 +55,15 @@ LL |     extern "thiscall" fn m() {}
    = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:27:12
+  --> $DIR/feature-gate-thiscall.rs:26:12
    |
 LL |     extern "thiscall-unwind" fn mu() {}
    |            ^^^^^^^^^^^^^^^^^
    |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
+   = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:31:12
+  --> $DIR/feature-gate-thiscall.rs:30:12
    |
 LL |     extern "thiscall" fn im() {}
    |            ^^^^^^^^^^
@@ -75,16 +71,15 @@ LL |     extern "thiscall" fn im() {}
    = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:32:12
+  --> $DIR/feature-gate-thiscall.rs:31:12
    |
 LL |     extern "thiscall-unwind" fn imu() {}
    |            ^^^^^^^^^^^^^^^^^
    |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
+   = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:35:18
+  --> $DIR/feature-gate-thiscall.rs:34:18
    |
 LL | type TA = extern "thiscall" fn();
    |                  ^^^^^^^^^^
@@ -92,16 +87,15 @@ LL | type TA = extern "thiscall" fn();
    = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:36:19
+  --> $DIR/feature-gate-thiscall.rs:35:19
    |
 LL | type TAU = extern "thiscall-unwind" fn();
    |                   ^^^^^^^^^^^^^^^^^
    |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
+   = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:38:8
+  --> $DIR/feature-gate-thiscall.rs:37:8
    |
 LL | extern "thiscall" {}
    |        ^^^^^^^^^^
@@ -109,13 +103,12 @@ LL | extern "thiscall" {}
    = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error[E0658]: thiscall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-thiscall-unwind.rs:39:8
+  --> $DIR/feature-gate-thiscall.rs:38:8
    |
 LL | extern "thiscall-unwind" {}
    |        ^^^^^^^^^^^^^^^^^
    |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
+   = help: add `#![feature(abi_thiscall)]` to the crate attributes to enable
 
 error: aborting due to 14 previous errors
 
diff --git a/tests/ui/feature-gates/feature-gate-type_ascription.rs b/tests/ui/feature-gates/feature-gate-type_ascription.rs
index 7a597157300..5c3f0e37df6 100644
--- a/tests/ui/feature-gates/feature-gate-type_ascription.rs
+++ b/tests/ui/feature-gates/feature-gate-type_ascription.rs
@@ -1,5 +1,5 @@
 // Type ascription is unstable
 
 fn main() {
-    let a = 10: u8; //~ ERROR type ascription is experimental
+    let a = type_ascribe!(10, u8); //~ ERROR use of unstable library feature 'type_ascription': placeholder syntax for type ascription
 }
diff --git a/tests/ui/feature-gates/feature-gate-type_ascription.stderr b/tests/ui/feature-gates/feature-gate-type_ascription.stderr
index 615d5b9a1e0..d747aea6d17 100644
--- a/tests/ui/feature-gates/feature-gate-type_ascription.stderr
+++ b/tests/ui/feature-gates/feature-gate-type_ascription.stderr
@@ -1,8 +1,8 @@
-error[E0658]: type ascription is experimental
+error[E0658]: use of unstable library feature 'type_ascription': placeholder syntax for type ascription
   --> $DIR/feature-gate-type_ascription.rs:4:13
    |
-LL |     let a = 10: u8;
-   |             ^^^^^^
+LL |     let a = type_ascribe!(10, u8);
+   |             ^^^^^^^^^^^^
    |
    = note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information
    = help: add `#![feature(type_ascription)]` to the crate attributes to enable
diff --git a/tests/ui/feature-gates/feature-gate-vectorcall.rs b/tests/ui/feature-gates/feature-gate-vectorcall.rs
index 5a6c6d28804..706780dfd6c 100644
--- a/tests/ui/feature-gates/feature-gate-vectorcall.rs
+++ b/tests/ui/feature-gates/feature-gate-vectorcall.rs
@@ -6,8 +6,8 @@
 #[lang="sized"]
 trait Sized { }
 
-// Test that the "vectorcall-unwind" ABI is feature-gated, and cannot be used when
-// the `c_unwind` feature gate is not used.
+// Test that the "vectorcall" ABI is feature-gated, and cannot be used when
+// the `vectorcall` feature gate is not used.
 
 extern "vectorcall" fn f() {} //~ ERROR vectorcall is experimental
 
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/format-string-error.rs b/tests/ui/fmt/format-string-error.rs
index eae4f3cb547..9b436e2c479 100644
--- a/tests/ui/fmt/format-string-error.rs
+++ b/tests/ui/fmt/format-string-error.rs
@@ -17,7 +17,7 @@ fn main() {
     let _ = format!("}");
     //~^ ERROR invalid format string: unmatched `}` found
     let _ = format!("{\\}");
-    //~^ ERROR invalid format string: expected `'}'`, found `'\\'`
+    //~^ ERROR invalid format string: expected `'}'`, found `'\'`
     let _ = format!("\n\n\n{\n\n\n");
     //~^ ERROR invalid format string
     let _ = format!(r###"
diff --git a/tests/ui/fmt/send-sync.stderr b/tests/ui/fmt/send-sync.stderr
index b517a342e63..e3ebe6cdcb8 100644
--- a/tests/ui/fmt/send-sync.stderr
+++ b/tests/ui/fmt/send-sync.stderr
@@ -8,10 +8,12 @@ LL |     send(format_args!("{:?}", c));
    |
    = 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<'_>`
+  --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
    = 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 because it appears within the type `Arguments<'_>`
+  --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
 note: required by a bound in `send`
   --> $DIR/send-sync.rs:1:12
    |
@@ -28,10 +30,12 @@ LL |     sync(format_args!("{:?}", c));
    |
    = 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<'_>`
+  --> $SRC_DIR/core/src/fmt/rt.rs:LL:COL
    = 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 because it appears within the type `Arguments<'_>`
+  --> $SRC_DIR/core/src/fmt/mod.rs:LL:COL
 note: required by a bound in `sync`
   --> $DIR/send-sync.rs:2:12
    |
diff --git a/tests/ui/issues/issue-3099.rs b/tests/ui/fn/issue-3099.rs
index ee75b359388..ee75b359388 100644
--- a/tests/ui/issues/issue-3099.rs
+++ b/tests/ui/fn/issue-3099.rs
diff --git a/tests/ui/issues/issue-3099.stderr b/tests/ui/fn/issue-3099.stderr
index 32ee2e1d207..32ee2e1d207 100644
--- a/tests/ui/issues/issue-3099.stderr
+++ b/tests/ui/fn/issue-3099.stderr
diff --git a/tests/ui/generator/borrowing.stderr b/tests/ui/generator/borrowing.stderr
deleted file mode 100644
index 96e3c327f8b..00000000000
--- a/tests/ui/generator/borrowing.stderr
+++ /dev/null
@@ -1,31 +0,0 @@
-error[E0597]: `a` does not live long enough
-  --> $DIR/borrowing.rs:13:33
-   |
-LL |     let _b = {
-   |         -- borrow later stored here
-LL |         let a = 3;
-LL |         Pin::new(&mut || yield &a).resume(())
-   |                       --        ^ borrowed value does not live long enough
-   |                       |
-   |                       value captured here by generator
-LL |
-LL |     };
-   |     - `a` dropped here while still borrowed
-
-error[E0597]: `a` does not live long enough
-  --> $DIR/borrowing.rs:20:20
-   |
-LL |     let _b = {
-   |         -- borrow later stored here
-LL |         let a = 3;
-LL |         || {
-   |         -- value captured here by generator
-LL |             yield &a
-   |                    ^ borrowed value does not live long enough
-...
-LL |     };
-   |     - `a` dropped here while still borrowed
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0597`.
diff --git a/tests/ui/generator/retain-resume-ref.stderr b/tests/ui/generator/retain-resume-ref.stderr
deleted file mode 100644
index 7122a951e80..00000000000
--- a/tests/ui/generator/retain-resume-ref.stderr
+++ /dev/null
@@ -1,13 +0,0 @@
-error[E0499]: cannot borrow `thing` as mutable more than once at a time
-  --> $DIR/retain-resume-ref.rs:27:25
-   |
-LL |     gen.as_mut().resume(&mut thing);
-   |                         ---------- first mutable borrow occurs here
-LL |     gen.as_mut().resume(&mut thing);
-   |                  ------ ^^^^^^^^^^ second mutable borrow occurs here
-   |                  |
-   |                  first borrow later used by call
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/generator/unresolved-ct-var-drop-tracking.stderr b/tests/ui/generator/unresolved-ct-var-drop-tracking.stderr
index 9e1fed54c54..dec0141ab67 100644
--- a/tests/ui/generator/unresolved-ct-var-drop-tracking.stderr
+++ b/tests/ui/generator/unresolved-ct-var-drop-tracking.stderr
@@ -1,10 +1,10 @@
 error[E0277]: `[(); _]` is not a future
-  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
+  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                 ---------------------------^^^^^^
-   |                 |                          |
-   |                 |                          `[(); _]` is not a future
+   |                 ----------------------------^^^^^
+   |                 |                          ||
+   |                 |                          |`[(); _]` is not a future
    |                 |                          help: remove the `.await`
    |                 this call returns `[(); _]`
    |
@@ -19,10 +19,10 @@ LL |         let s = std::array::from_fn(|_| ()).await;
    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
    |
 note: the type is part of the `async` block because of this `await`
-  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
+  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                                            ^^^^^^
+   |                                             ^^^^^
 
 error[E0698]: type inside `async` block must be known in this context
   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
@@ -31,10 +31,10 @@ LL |         let s = std::array::from_fn(|_| ()).await;
    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
    |
 note: the type is part of the `async` block because of this `await`
-  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
+  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                                            ^^^^^^
+   |                                             ^^^^^
 
 error[E0698]: type inside `async` block must be known in this context
   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
@@ -43,10 +43,10 @@ LL |         let s = std::array::from_fn(|_| ()).await;
    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
    |
 note: the type is part of the `async` block because of this `await`
-  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
+  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                                            ^^^^^^
+   |                                             ^^^^^
 
 error[E0698]: type inside `async` block must be known in this context
   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
@@ -55,10 +55,10 @@ LL |         let s = std::array::from_fn(|_| ()).await;
    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
    |
 note: the type is part of the `async` block because of this `await`
-  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
+  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                                            ^^^^^^
+   |                                             ^^^^^
 
 error[E0698]: type inside `async` block must be known in this context
   --> $DIR/unresolved-ct-var-drop-tracking.rs:7:17
@@ -67,10 +67,10 @@ LL |         let s = std::array::from_fn(|_| ()).await;
    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
    |
 note: the type is part of the `async` block because of this `await`
-  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:44
+  --> $DIR/unresolved-ct-var-drop-tracking.rs:7:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                                            ^^^^^^
+   |                                             ^^^^^
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/generator/unresolved-ct-var.stderr b/tests/ui/generator/unresolved-ct-var.stderr
index fdf00dfad7a..ace254178b7 100644
--- a/tests/ui/generator/unresolved-ct-var.stderr
+++ b/tests/ui/generator/unresolved-ct-var.stderr
@@ -1,10 +1,10 @@
 error[E0277]: `[(); _]` is not a future
-  --> $DIR/unresolved-ct-var.rs:6:44
+  --> $DIR/unresolved-ct-var.rs:6:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                 ---------------------------^^^^^^
-   |                 |                          |
-   |                 |                          `[(); _]` is not a future
+   |                 ----------------------------^^^^^
+   |                 |                          ||
+   |                 |                          |`[(); _]` is not a future
    |                 |                          help: remove the `.await`
    |                 this call returns `[(); _]`
    |
@@ -19,10 +19,10 @@ LL |         let s = std::array::from_fn(|_| ()).await;
    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
    |
 note: the type is part of the `async` block because of this `await`
-  --> $DIR/unresolved-ct-var.rs:6:44
+  --> $DIR/unresolved-ct-var.rs:6:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                                            ^^^^^^
+   |                                             ^^^^^
 
 error[E0698]: type inside `async` block must be known in this context
   --> $DIR/unresolved-ct-var.rs:6:17
@@ -31,10 +31,10 @@ LL |         let s = std::array::from_fn(|_| ()).await;
    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
    |
 note: the type is part of the `async` block because of this `await`
-  --> $DIR/unresolved-ct-var.rs:6:44
+  --> $DIR/unresolved-ct-var.rs:6:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                                            ^^^^^^
+   |                                             ^^^^^
 
 error[E0698]: type inside `async` block must be known in this context
   --> $DIR/unresolved-ct-var.rs:6:17
@@ -43,10 +43,10 @@ LL |         let s = std::array::from_fn(|_| ()).await;
    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
    |
 note: the type is part of the `async` block because of this `await`
-  --> $DIR/unresolved-ct-var.rs:6:44
+  --> $DIR/unresolved-ct-var.rs:6:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                                            ^^^^^^
+   |                                             ^^^^^
 
 error[E0698]: type inside `async` block must be known in this context
   --> $DIR/unresolved-ct-var.rs:6:17
@@ -55,10 +55,10 @@ LL |         let s = std::array::from_fn(|_| ()).await;
    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
    |
 note: the type is part of the `async` block because of this `await`
-  --> $DIR/unresolved-ct-var.rs:6:44
+  --> $DIR/unresolved-ct-var.rs:6:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                                            ^^^^^^
+   |                                             ^^^^^
 
 error[E0698]: type inside `async` block must be known in this context
   --> $DIR/unresolved-ct-var.rs:6:17
@@ -67,10 +67,10 @@ LL |         let s = std::array::from_fn(|_| ()).await;
    |                 ^^^^^^^^^^^^^^^^^^^ cannot infer the value of const parameter `N` declared on the function `from_fn`
    |
 note: the type is part of the `async` block because of this `await`
-  --> $DIR/unresolved-ct-var.rs:6:44
+  --> $DIR/unresolved-ct-var.rs:6:45
    |
 LL |         let s = std::array::from_fn(|_| ()).await;
-   |                                            ^^^^^^
+   |                                             ^^^^^
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs b/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs
index ecabf8943ea..b7b93ef1c44 100644
--- a/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs
+++ b/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.rs
@@ -5,9 +5,6 @@ trait X {
 const _: () = {
   fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
       //~^ ERROR: expected one of `>`, a const expression, lifetime, or type, found `:`
-      //~| ERROR: expected parameter name, found `>`
-      //~| ERROR: expected one of `!`, `)`, `+`, `,`, or `::`, found `>`
-      //~| ERROR: constant provided when a type was expected
 };
 
 const _: () = {
diff --git a/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr b/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr
index 10ceccedcac..bfddb6dc693 100644
--- a/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr
+++ b/tests/ui/generic-associated-types/parse/trait-path-missing-gen_arg.stderr
@@ -3,41 +3,14 @@ error: expected one of `>`, a const expression, lifetime, or type, found `:`
    |
 LL |   fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
    |                              ^ expected one of `>`, a const expression, lifetime, or type
-   |
-help: expressions must be enclosed in braces to be used as const generic arguments
-   |
-LL |   fn f1<'a>(arg : Box<{ dyn X< : 32 } >>) {}
-   |                       +             +
-
-error: expected parameter name, found `>`
-  --> $DIR/trait-path-missing-gen_arg.rs:6:36
-   |
-LL |   fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
-   |                                    ^ expected parameter name
-
-error: expected one of `!`, `)`, `+`, `,`, or `::`, found `>`
-  --> $DIR/trait-path-missing-gen_arg.rs:6:36
-   |
-LL |   fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
-   |                                    ^
-   |                                    |
-   |                                    expected one of `!`, `)`, `+`, `,`, or `::`
-   |                                    help: missing `,`
 
 error: expected one of `>`, a const expression, lifetime, or type, found `=`
-  --> $DIR/trait-path-missing-gen_arg.rs:14:30
+  --> $DIR/trait-path-missing-gen_arg.rs:11:30
    |
 LL |   fn f1<'a>(arg : Box<dyn X< = 32 >>) {}
    |                            - ^ expected one of `>`, a const expression, lifetime, or type
    |                            |
    |                            maybe try to close unmatched angle bracket
 
-error[E0747]: constant provided when a type was expected
-  --> $DIR/trait-path-missing-gen_arg.rs:6:23
-   |
-LL |   fn f1<'a>(arg : Box<dyn X< : 32 >>) {}
-   |                       ^^^^^^^^^^^
-
-error: aborting due to 5 previous errors
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0747`.
diff --git a/tests/ui/generics/single-colon-path-not-const-generics.rs b/tests/ui/generics/single-colon-path-not-const-generics.rs
index 55a7ae0bb6d..dff00b0b720 100644
--- a/tests/ui/generics/single-colon-path-not-const-generics.rs
+++ b/tests/ui/generics/single-colon-path-not-const-generics.rs
@@ -6,8 +6,8 @@ pub mod foo {
 
 pub struct Foo {
   a: Vec<foo::bar:A>,
-  //~^ ERROR expected
-  //~| HELP path separator
+  //~^ ERROR path separator must be a double colon
+  //~| HELP use a double colon instead
 }
 
 fn main() {}
diff --git a/tests/ui/generics/single-colon-path-not-const-generics.stderr b/tests/ui/generics/single-colon-path-not-const-generics.stderr
index 3eafa9fa5a9..96f07e190c1 100644
--- a/tests/ui/generics/single-colon-path-not-const-generics.stderr
+++ b/tests/ui/generics/single-colon-path-not-const-generics.stderr
@@ -1,11 +1,12 @@
-error: expected one of `,` or `>`, found `:`
+error: path separator must be a double colon
   --> $DIR/single-colon-path-not-const-generics.rs:8:18
    |
+LL | pub struct Foo {
+   |            --- while parsing this struct
 LL |   a: Vec<foo::bar:A>,
-   |                  ^
-   |                  |
-   |                  expected one of `,` or `>`
-   |                  help: write a path separator here: `::`
+   |                  ^ help: use a double colon instead: `::`
+   |
+   = note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: aborting due to previous error
 
diff --git a/tests/ui/impl-trait/in-trait/auxiliary/rpitit.rs b/tests/ui/impl-trait/in-trait/auxiliary/rpitit.rs
index ffeabe5c2ed..776006124dc 100644
--- a/tests/ui/impl-trait/in-trait/auxiliary/rpitit.rs
+++ b/tests/ui/impl-trait/in-trait/auxiliary/rpitit.rs
@@ -5,10 +5,10 @@
 use std::ops::Deref;
 
 pub trait Foo {
-    fn bar() -> impl Deref<Target = impl Sized>;
+    fn bar(self) -> impl Deref<Target = impl Sized>;
 }
 
 pub struct Foreign;
 impl Foo for Foreign {
-    fn bar() -> &'static () { &() }
+    fn bar(self) -> &'static () { &() }
 }
diff --git a/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.current.stderr b/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.current.stderr
deleted file mode 100644
index 05c025cc169..00000000000
--- a/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.current.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/box-coerce-span-in-default.rs:5:12
-   |
-LL | #![feature(return_position_impl_trait_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.next.stderr b/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.next.stderr
deleted file mode 100644
index 05c025cc169..00000000000
--- a/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.next.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/box-coerce-span-in-default.rs:5:12
-   |
-LL | #![feature(return_position_impl_trait_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs b/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs
index 163bb4fcf77..f5290a5f4af 100644
--- a/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs
+++ b/tests/ui/impl-trait/in-trait/box-coerce-span-in-default.rs
@@ -3,7 +3,6 @@
 // revisions: current next
 
 #![feature(return_position_impl_trait_in_trait)]
-//~^ WARN the feature `return_position_impl_trait_in_trait` is incomplete
 
 struct TestA {}
 struct TestB {}
diff --git a/tests/ui/impl-trait/in-trait/default-method-binder-shifting.current.stderr b/tests/ui/impl-trait/in-trait/default-method-binder-shifting.current.stderr
deleted file mode 100644
index a0c0589b9a1..00000000000
--- a/tests/ui/impl-trait/in-trait/default-method-binder-shifting.current.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/default-method-binder-shifting.rs:5:12
-   |
-LL | #![feature(return_position_impl_trait_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/impl-trait/in-trait/default-method-binder-shifting.next.stderr b/tests/ui/impl-trait/in-trait/default-method-binder-shifting.next.stderr
deleted file mode 100644
index a0c0589b9a1..00000000000
--- a/tests/ui/impl-trait/in-trait/default-method-binder-shifting.next.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/default-method-binder-shifting.rs:5:12
-   |
-LL | #![feature(return_position_impl_trait_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs b/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs
index de82544f293..187039f449c 100644
--- a/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs
+++ b/tests/ui/impl-trait/in-trait/default-method-binder-shifting.rs
@@ -3,7 +3,6 @@
 // revisions: current next
 
 #![feature(return_position_impl_trait_in_trait)]
-//~^ WARN the feature `return_position_impl_trait_in_trait` is incomplete
 
 trait Trait {
     type Type;
diff --git a/tests/ui/impl-trait/in-trait/default-method-constraint.current.stderr b/tests/ui/impl-trait/in-trait/default-method-constraint.current.stderr
deleted file mode 100644
index 7bb79911f56..00000000000
--- a/tests/ui/impl-trait/in-trait/default-method-constraint.current.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/default-method-constraint.rs:7:12
-   |
-LL | #![feature(return_position_impl_trait_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/impl-trait/in-trait/default-method-constraint.next.stderr b/tests/ui/impl-trait/in-trait/default-method-constraint.next.stderr
deleted file mode 100644
index 7bb79911f56..00000000000
--- a/tests/ui/impl-trait/in-trait/default-method-constraint.next.stderr
+++ /dev/null
@@ -1,11 +0,0 @@
-warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/default-method-constraint.rs:7:12
-   |
-LL | #![feature(return_position_impl_trait_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/impl-trait/in-trait/default-method-constraint.rs b/tests/ui/impl-trait/in-trait/default-method-constraint.rs
index e85fe3c8626..4f0bf2e7dfe 100644
--- a/tests/ui/impl-trait/in-trait/default-method-constraint.rs
+++ b/tests/ui/impl-trait/in-trait/default-method-constraint.rs
@@ -5,7 +5,6 @@
 // This didn't work in the previous default RPITIT method hack attempt
 
 #![feature(return_position_impl_trait_in_trait)]
-//~^ WARN the feature `return_position_impl_trait_in_trait` is incomplete
 
 trait Foo {
     fn bar(x: bool) -> impl Sized {
diff --git a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.current.stderr b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.current.stderr
index b8a793e1a7b..d4d0124a659 100644
--- a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.current.stderr
+++ b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.current.stderr
@@ -1,14 +1,5 @@
-warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/dont-project-to-rpitit-with-no-value.rs:4:12
-   |
-LL | #![feature(return_position_impl_trait_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error[E0046]: not all trait items implemented, missing: `foo`
-  --> $DIR/dont-project-to-rpitit-with-no-value.rs:12:1
+  --> $DIR/dont-project-to-rpitit-with-no-value.rs:11:1
    |
 LL |     fn foo(&self) -> impl Sized;
    |     ---------------------------- `foo` from trait
@@ -16,6 +7,6 @@ LL |     fn foo(&self) -> impl Sized;
 LL | impl MyTrait for i32 {
    | ^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.next.stderr b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.next.stderr
index b8a793e1a7b..d4d0124a659 100644
--- a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.next.stderr
+++ b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.next.stderr
@@ -1,14 +1,5 @@
-warning: the feature `return_position_impl_trait_in_trait` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/dont-project-to-rpitit-with-no-value.rs:4:12
-   |
-LL | #![feature(return_position_impl_trait_in_trait)]
-   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information
-   = note: `#[warn(incomplete_features)]` on by default
-
 error[E0046]: not all trait items implemented, missing: `foo`
-  --> $DIR/dont-project-to-rpitit-with-no-value.rs:12:1
+  --> $DIR/dont-project-to-rpitit-with-no-value.rs:11:1
    |
 LL |     fn foo(&self) -> impl Sized;
    |     ---------------------------- `foo` from trait
@@ -16,6 +7,6 @@ LL |     fn foo(&self) -> impl Sized;
 LL | impl MyTrait for i32 {
    | ^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
 
-error: aborting due to previous error; 1 warning emitted
+error: aborting due to previous error
 
 For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs
index 8329ce1f835..4d50b8c9278 100644
--- a/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs
+++ b/tests/ui/impl-trait/in-trait/dont-project-to-rpitit-with-no-value.rs
@@ -2,7 +2,6 @@
 // revisions: current next
 
 #![feature(return_position_impl_trait_in_trait)]
-//~^ WARN the feature `return_position_impl_trait_in_trait` is incomplete
 
 trait MyTrait {
     fn foo(&self) -> impl Sized;
diff --git a/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs b/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs
new file mode 100644
index 00000000000..ecb5e62c433
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/foreign-dyn-error.rs
@@ -0,0 +1,8 @@
+// aux-build: rpitit.rs
+
+extern crate rpitit;
+
+fn main() {
+    let _: &dyn rpitit::Foo = todo!();
+    //~^ ERROR the trait `Foo` cannot be made into an object
+}
diff --git a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr
new file mode 100644
index 00000000000..6eef392c05f
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr
@@ -0,0 +1,15 @@
+error[E0038]: the trait `Foo` cannot be made into an object
+  --> $DIR/foreign-dyn-error.rs:6:12
+   |
+LL |     let _: &dyn rpitit::Foo = todo!();
+   |            ^^^^^^^^^^^^^^^^ `Foo` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/auxiliary/rpitit.rs:8:21
+   |
+LL |     fn bar(self) -> impl Deref<Target = impl Sized>;
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait cannot be made into an object because method `bar` references an `impl Trait` type in its return type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/impl-trait/in-trait/foreign.rs b/tests/ui/impl-trait/in-trait/foreign.rs
index f4972d948b2..98417b343a1 100644
--- a/tests/ui/impl-trait/in-trait/foreign.rs
+++ b/tests/ui/impl-trait/in-trait/foreign.rs
@@ -5,17 +5,18 @@
 
 extern crate rpitit;
 
+use rpitit::{Foo, Foreign};
 use std::sync::Arc;
 
 // Implement an RPITIT from another crate.
 struct Local;
-impl rpitit::Foo for Local {
-    fn bar() -> Arc<String> { Arc::new(String::new()) }
+impl Foo for Local {
+    fn bar(self) -> Arc<String> { Arc::new(String::new()) }
 }
 
 fn main() {
     // Witness an RPITIT from another crate.
-    let &() = <rpitit::Foreign as rpitit::Foo>::bar();
+    let &() = Foreign.bar();
 
-    let x: Arc<String> = <Local as rpitit::Foo>::bar();
+    let x: Arc<String> = Local.bar();
 }
diff --git a/tests/ui/impl-trait/issues/issue-86800.rs b/tests/ui/impl-trait/issues/issue-86800.rs
index 351243c6727..ec4fda322d0 100644
--- a/tests/ui/impl-trait/issues/issue-86800.rs
+++ b/tests/ui/impl-trait/issues/issue-86800.rs
@@ -1,14 +1,12 @@
 #![feature(type_alias_impl_trait)]
 
 // edition:2021
-// unset-rustc-env:RUST_BACKTRACE
 // compile-flags:-Z treat-err-as-bug=1
-// error-pattern:stack backtrace:
+// error-pattern: aborting due to `-Z treat-err-as-bug=1`
 // failure-status:101
-// normalize-stderr-test "note: .*" -> ""
-// normalize-stderr-test "thread 'rustc' .*" -> ""
-// normalize-stderr-test " +[0-9]+:.*\n" -> ""
-// normalize-stderr-test " +at .*\n" -> ""
+// normalize-stderr-test ".*note: .*\n\n" -> ""
+// normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
+// rustc-env:RUST_BACKTRACE=0
 
 use std::future::Future;
 
diff --git a/tests/ui/impl-trait/issues/issue-86800.stderr b/tests/ui/impl-trait/issues/issue-86800.stderr
index f3a77383778..facab390d15 100644
--- a/tests/ui/impl-trait/issues/issue-86800.stderr
+++ b/tests/ui/impl-trait/issues/issue-86800.stderr
@@ -1,24 +1,12 @@
 error: unconstrained opaque type
-  --> $DIR/issue-86800.rs:33:34
+  --> $DIR/issue-86800.rs:31:34
    |
 LL | type TransactionFuture<'__, O> = impl '__ + Future<Output = TransactionResult<O>>;
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = 
-
-
-stack backtrace:
-
 error: the compiler unexpectedly panicked. this is a bug.
 
-
-
-
-
-
-
 query stack during panic:
 #0 [type_of] computing type of `TransactionFuture::{opaque#0}`
 #1 [check_mod_item_types] checking item types in top-level module
-#2 [analysis] running analysis passes on this crate
 end of query stack
diff --git a/tests/ui/inference/deref-suggestion.stderr b/tests/ui/inference/deref-suggestion.stderr
index 6f5aacacfc1..c58aab42269 100644
--- a/tests/ui/inference/deref-suggestion.stderr
+++ b/tests/ui/inference/deref-suggestion.stderr
@@ -98,19 +98,23 @@ error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:40:17
    |
 LL |     let s = S { u };
-   |                 ^
-   |                 |
-   |                 expected `&u32`, found integer
-   |                 help: consider borrowing here: `u: &u`
+   |                 ^ expected `&u32`, found integer
+   |
+help: consider borrowing here
+   |
+LL |     let s = S { u: &u };
+   |                 ++++
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:42:20
    |
 LL |     let s = S { u: u };
-   |                    ^
-   |                    |
-   |                    expected `&u32`, found integer
-   |                    help: consider borrowing here: `&u`
+   |                    ^ expected `&u32`, found integer
+   |
+help: consider borrowing here
+   |
+LL |     let s = S { u: &u };
+   |                    +
 
 error[E0308]: mismatched types
   --> $DIR/deref-suggestion.rs:45:17
diff --git a/tests/ui/issues/issue-71584.rs b/tests/ui/inference/issue-71584.rs
index 7bf3ed60ec1..7bf3ed60ec1 100644
--- a/tests/ui/issues/issue-71584.rs
+++ b/tests/ui/inference/issue-71584.rs
diff --git a/tests/ui/issues/issue-71584.stderr b/tests/ui/inference/issue-71584.stderr
index 6ddb7657301..6ddb7657301 100644
--- a/tests/ui/issues/issue-71584.stderr
+++ b/tests/ui/inference/issue-71584.stderr
diff --git a/tests/ui/interior-mutability/interior-mutability.stderr b/tests/ui/interior-mutability/interior-mutability.stderr
index 034d22591b3..0c3be7ca607 100644
--- a/tests/ui/interior-mutability/interior-mutability.stderr
+++ b/tests/ui/interior-mutability/interior-mutability.stderr
@@ -7,7 +7,8 @@ LL |     catch_unwind(|| { x.set(23); });
    |     required by a bound introduced by this call
    |
    = help: within `Cell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>`
-   = note: required because it appears within the type `Cell<i32>`
+note: required because it appears within the type `Cell<i32>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
    = note: required for `&Cell<i32>` to implement `UnwindSafe`
 note: required because it's used within this closure
   --> $DIR/interior-mutability.rs:5:18
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-option.rs b/tests/ui/invalid/invalid-debugger-visualizer-option.rs
index 5645a30ccee..150723898bd 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-option.rs
+++ b/tests/ui/invalid/invalid-debugger-visualizer-option.rs
@@ -1,7 +1,6 @@
 // normalize-stderr-test: "foo.random:.*\(" -> "foo.random: $$FILE_NOT_FOUND_MSG ("
 // normalize-stderr-test: "os error \d+" -> "os error $$FILE_NOT_FOUND_CODE"
 
-#![feature(debugger_visualizer)]
 #![debugger_visualizer(random_file = "../foo.random")] //~ ERROR invalid argument
 #![debugger_visualizer(natvis_file = "../foo.random")] //~ ERROR
 fn main() {}
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-option.stderr b/tests/ui/invalid/invalid-debugger-visualizer-option.stderr
index afb8d16ee96..6fbb4d641e6 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-option.stderr
+++ b/tests/ui/invalid/invalid-debugger-visualizer-option.stderr
@@ -1,5 +1,5 @@
 error: invalid argument
-  --> $DIR/invalid-debugger-visualizer-option.rs:5:24
+  --> $DIR/invalid-debugger-visualizer-option.rs:4:24
    |
 LL | #![debugger_visualizer(random_file = "../foo.random")]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -9,7 +9,7 @@ LL | #![debugger_visualizer(random_file = "../foo.random")]
    = note: expected: `gdb_script_file = "..."`
 
 error: couldn't read $DIR/../foo.random: $FILE_NOT_FOUND_MSG (os error $FILE_NOT_FOUND_CODE)
-  --> $DIR/invalid-debugger-visualizer-option.rs:6:24
+  --> $DIR/invalid-debugger-visualizer-option.rs:5:24
    |
 LL | #![debugger_visualizer(natvis_file = "../foo.random")]
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-target.rs b/tests/ui/invalid/invalid-debugger-visualizer-target.rs
index f0aba6a75c4..f9dd20dbfed 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-target.rs
+++ b/tests/ui/invalid/invalid-debugger-visualizer-target.rs
@@ -1,4 +1,2 @@
-#![feature(debugger_visualizer)]
-
 #[debugger_visualizer(natvis_file = "../foo.natvis")] //~ ERROR attribute should be applied to a module
 fn main() {}
diff --git a/tests/ui/invalid/invalid-debugger-visualizer-target.stderr b/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
index 3555bbb169b..7944f751859 100644
--- a/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
+++ b/tests/ui/invalid/invalid-debugger-visualizer-target.stderr
@@ -1,5 +1,5 @@
 error: attribute should be applied to a module
-  --> $DIR/invalid-debugger-visualizer-target.rs:3:1
+  --> $DIR/invalid-debugger-visualizer-target.rs:1:1
    |
 LL | #[debugger_visualizer(natvis_file = "../foo.natvis")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/issues/auxiliary/issue-111011.rs b/tests/ui/issues/auxiliary/issue-111011.rs
new file mode 100644
index 00000000000..927134a588c
--- /dev/null
+++ b/tests/ui/issues/auxiliary/issue-111011.rs
@@ -0,0 +1,12 @@
+#![feature(async_closure)]
+
+// edition:2021
+
+fn foo<X>(x: impl FnOnce() -> Box<X>) {}
+// just to make sure async closures can still be suggested for boxing.
+fn bar<X>(x: Box<dyn FnOnce() -> X>) {}
+
+fn main() {
+    foo(async move || {}); //~ ERROR mismatched types
+    bar(async move || {}); //~ ERROR mismatched types
+}
diff --git a/tests/ui/issues/auxiliary/issue-111011.stderr b/tests/ui/issues/auxiliary/issue-111011.stderr
new file mode 100644
index 00000000000..082f0f035ad
--- /dev/null
+++ b/tests/ui/issues/auxiliary/issue-111011.stderr
@@ -0,0 +1,34 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-111011.rs:10:23
+   |
+LL |     foo(async move || {});
+   |                       ^^ expected `Box<_>`, found `async` closure body
+   |
+   = note:            expected struct `Box<_>`
+           found `async` closure body `[async closure body@$DIR/issue-111011.rs:10:23: 10:25]`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+
+error[E0308]: mismatched types
+  --> $DIR/issue-111011.rs:11:9
+   |
+LL |     bar(async move || {});
+   |     --- ^^^^^^^^^^^^^^^^ expected `Box<dyn FnOnce() -> _>`, found closure
+   |     |
+   |     arguments to this function are incorrect
+   |
+   = note: expected struct `Box<(dyn FnOnce() -> _ + 'static)>`
+             found closure `[closure@$DIR/issue-111011.rs:11:9: 11:22]`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+note: function defined here
+  --> $DIR/issue-111011.rs:7:4
+   |
+LL | fn bar<X>(x: Box<dyn FnOnce() -> X>) {}
+   |    ^^^    -------------------------
+help: store this in the heap by calling `Box::new`
+   |
+LL |     bar(Box::new(async move || {}));
+   |         +++++++++                +
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/issues/issue-11374.stderr b/tests/ui/issues/issue-11374.stderr
index 6e1fb1540bb..879dc5b76c5 100644
--- a/tests/ui/issues/issue-11374.stderr
+++ b/tests/ui/issues/issue-11374.stderr
@@ -2,10 +2,8 @@ error[E0308]: mismatched types
   --> $DIR/issue-11374.rs:26:15
    |
 LL |     c.read_to(v);
-   |       ------- ^
-   |       |       |
-   |       |       expected `&mut [u8]`, found `Vec<_>`
-   |       |       help: consider mutably borrowing here: `&mut v`
+   |       ------- ^ expected `&mut [u8]`, found `Vec<_>`
+   |       |
    |       arguments to this method are incorrect
    |
    = note: expected mutable reference `&mut [u8]`
@@ -15,6 +13,10 @@ note: method defined here
    |
 LL |     pub fn read_to(&mut self, vec: &mut [u8]) {
    |            ^^^^^^^            --------------
+help: consider mutably borrowing here
+   |
+LL |     c.read_to(&mut v);
+   |               ++++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/issues/issue-17033.stderr b/tests/ui/issues/issue-17033.stderr
index f26bee5ff45..3419c079859 100644
--- a/tests/ui/issues/issue-17033.stderr
+++ b/tests/ui/issues/issue-17033.stderr
@@ -2,11 +2,14 @@ error[E0308]: mismatched types
   --> $DIR/issue-17033.rs:2:10
    |
 LL |     (*p)(())
-   |     ---- ^^
-   |     |    |
-   |     |    expected `&mut ()`, found `()`
-   |     |    help: consider mutably borrowing here: `&mut ()`
+   |     ---- ^^ expected `&mut ()`, found `()`
+   |     |
    |     arguments to this function are incorrect
+   |
+help: consider mutably borrowing here
+   |
+LL |     (*p)(&mut ())
+   |          ++++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/issues/issue-18819.stderr b/tests/ui/issues/issue-18819.stderr
index 1fc974b609c..40098f9622f 100644
--- a/tests/ui/issues/issue-18819.stderr
+++ b/tests/ui/issues/issue-18819.stderr
@@ -19,7 +19,7 @@ LL | fn print_x(_: &dyn Foo<Item=bool>, extra: &str) {
 help: consider borrowing here
    |
 LL |     print_x(&X);
-   |             ~~
+   |             +
 help: provide the argument
    |
 LL |     print_x(/* &dyn Foo<Item = bool> */, /* &str */);
diff --git a/tests/ui/issues/issue-21763.rs b/tests/ui/issues/issue-21763.rs
index 5beb1d8b8c4..38103ff4f9c 100644
--- a/tests/ui/issues/issue-21763.rs
+++ b/tests/ui/issues/issue-21763.rs
@@ -1,5 +1,7 @@
 // Regression test for HashMap only impl'ing Send/Sync if its contents do
 
+// normalize-stderr-test: "\S+hashbrown-\S+" -> "$$HASHBROWN_SRC_LOCATION"
+
 use std::collections::HashMap;
 use std::rc::Rc;
 
diff --git a/tests/ui/issues/issue-21763.stderr b/tests/ui/issues/issue-21763.stderr
index 04379f07ba0..df50118ac47 100644
--- a/tests/ui/issues/issue-21763.stderr
+++ b/tests/ui/issues/issue-21763.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `Rc<()>` cannot be sent between threads safely
-  --> $DIR/issue-21763.rs:9:11
+  --> $DIR/issue-21763.rs:11:11
    |
 LL |     foo::<HashMap<Rc<()>, Rc<()>>>();
    |           ^^^^^^^^^^^^^^^^^^^^^^^ `Rc<()>` cannot be sent between threads safely
@@ -7,10 +7,15 @@ LL |     foo::<HashMap<Rc<()>, Rc<()>>>();
    = help: within `(Rc<()>, Rc<()>)`, the trait `Send` is not implemented for `Rc<()>`
    = note: required because it appears within the type `(Rc<()>, Rc<()>)`
    = note: required for `hashbrown::raw::RawTable<(Rc<()>, Rc<()>)>` to implement `Send`
-   = note: required because it appears within the type `HashMap<Rc<()>, Rc<()>, RandomState>`
-   = note: required because it appears within the type `HashMap<Rc<()>, Rc<()>>`
+note: required because it appears within the type `HashMap<Rc<()>, Rc<()>, RandomState>`
+  --> $HASHBROWN_SRC_LOCATION
+   |
+LL | pub struct HashMap<K, V, S = DefaultHashBuilder, A: Allocator + Clone = Global> {
+   |            ^^^^^^^
+note: required because it appears within the type `HashMap<Rc<()>, Rc<()>>`
+  --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
 note: required by a bound in `foo`
-  --> $DIR/issue-21763.rs:6:11
+  --> $DIR/issue-21763.rs:8:11
    |
 LL | fn foo<T: Send>() {}
    |           ^^^^ required by this bound in `foo`
diff --git a/tests/ui/issues/issue-22644.rs b/tests/ui/issues/issue-22644.rs
index b1d69dcd862..e3ada65049d 100644
--- a/tests/ui/issues/issue-22644.rs
+++ b/tests/ui/issues/issue-22644.rs
@@ -1,18 +1,12 @@
-#![feature(type_ascription)]
-
 fn main() {
-    let a : usize = 0;
-    let long_name : usize = 0;
+    let a: usize = 0;
+    let long_name: usize = 0;
 
     println!("{}", a as usize > long_name);
     println!("{}", a as usize < long_name); //~ ERROR `<` is interpreted as a start of generic
     println!("{}{}", a as usize < long_name, long_name);
     //~^ ERROR `<` is interpreted as a start of generic
     println!("{}", a as usize < 4); //~ ERROR `<` is interpreted as a start of generic
-    println!("{}", a: usize > long_name);
-    println!("{}{}", a: usize < long_name, long_name);
-    //~^ ERROR `<` is interpreted as a start of generic
-    println!("{}", a: usize < 4); //~ ERROR `<` is interpreted as a start of generic
 
     println!("{}", a
                    as
@@ -30,6 +24,4 @@ fn main() {
                    5);
 
     println!("{}", a as usize << long_name); //~ ERROR `<<` is interpreted as a start of generic
-
-    println!("{}", a: &mut 4); //~ ERROR expected type, found `4`
 }
diff --git a/tests/ui/issues/issue-22644.stderr b/tests/ui/issues/issue-22644.stderr
index 45027afa7b6..0799e9ef11b 100644
--- a/tests/ui/issues/issue-22644.stderr
+++ b/tests/ui/issues/issue-22644.stderr
@@ -1,5 +1,5 @@
 error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
-  --> $DIR/issue-22644.rs:8:31
+  --> $DIR/issue-22644.rs:6:31
    |
 LL |     println!("{}", a as usize < long_name);
    |                               ^ --------- interpreted as generic arguments
@@ -12,7 +12,7 @@ LL |     println!("{}", (a as usize) < long_name);
    |                    +          +
 
 error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
-  --> $DIR/issue-22644.rs:9:33
+  --> $DIR/issue-22644.rs:7:33
    |
 LL |     println!("{}{}", a as usize < long_name, long_name);
    |                                 ^ -------------------- interpreted as generic arguments
@@ -25,7 +25,7 @@ LL |     println!("{}{}", (a as usize) < long_name, long_name);
    |                      +          +
 
 error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
-  --> $DIR/issue-22644.rs:11:31
+  --> $DIR/issue-22644.rs:9:31
    |
 LL |     println!("{}", a as usize < 4);
    |                               ^ - interpreted as generic arguments
@@ -38,33 +38,7 @@ LL |     println!("{}", (a as usize) < 4);
    |                    +          +
 
 error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
-  --> $DIR/issue-22644.rs:13:31
-   |
-LL |     println!("{}{}", a: usize < long_name, long_name);
-   |                               ^ -------------------- interpreted as generic arguments
-   |                               |
-   |                               not interpreted as comparison
-   |
-help: try comparing the cast value
-   |
-LL |     println!("{}{}", (a: usize) < long_name, long_name);
-   |                      +        +
-
-error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
-  --> $DIR/issue-22644.rs:15:29
-   |
-LL |     println!("{}", a: usize < 4);
-   |                             ^ - interpreted as generic arguments
-   |                             |
-   |                             not interpreted as comparison
-   |
-help: try comparing the cast value
-   |
-LL |     println!("{}", (a: usize) < 4);
-   |                    +        +
-
-error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
-  --> $DIR/issue-22644.rs:20:20
+  --> $DIR/issue-22644.rs:14:20
    |
 LL |                    <
    |                    ^ not interpreted as comparison
@@ -79,7 +53,7 @@ LL ~                    usize)
    |
 
 error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison
-  --> $DIR/issue-22644.rs:29:20
+  --> $DIR/issue-22644.rs:23:20
    |
 LL |                    <
    |                    ^ not interpreted as comparison
@@ -96,7 +70,7 @@ LL ~                    usize)
    |
 
 error: `<<` is interpreted as a start of generic arguments for `usize`, not a shift
-  --> $DIR/issue-22644.rs:32:31
+  --> $DIR/issue-22644.rs:26:31
    |
 LL |     println!("{}", a as usize << long_name);
    |                               ^^ --------- interpreted as generic arguments
@@ -108,16 +82,5 @@ help: try shifting the cast value
 LL |     println!("{}", (a as usize) << long_name);
    |                    +          +
 
-error: expected type, found `4`
-  --> $DIR/issue-22644.rs:34:28
-   |
-LL |     println!("{}", a: &mut 4);
-   |                     -      ^ expected type
-   |                     |
-   |                     tried to parse a type due to this type ascription
-   |
-   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
-   = note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information
-
-error: aborting due to 9 previous errors
+error: aborting due to 6 previous errors
 
diff --git a/tests/ui/issues/issue-2748-a.rs b/tests/ui/issues/issue-2748-a.rs
deleted file mode 100644
index cbb9bcc28ac..00000000000
--- a/tests/ui/issues/issue-2748-a.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// build-pass
-#![allow(dead_code)]
-#![allow(non_snake_case)]
-
-// pretty-expanded FIXME #23616
-
-struct CMap<'a> {
-    buf: &'a [u8],
-}
-
-fn CMap(buf: &[u8]) -> CMap {
-    CMap {
-        buf: buf
-    }
-}
-
-pub fn main() { }
diff --git a/tests/ui/issues/issue-32709.stderr b/tests/ui/issues/issue-32709.stderr
index 1d595ca5649..a4ba5da4d87 100644
--- a/tests/ui/issues/issue-32709.stderr
+++ b/tests/ui/issues/issue-32709.stderr
@@ -7,9 +7,16 @@ LL |     Err(5)?;
    |           ^ the trait `From<{integer}>` is not implemented for `()`
    |
    = note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
-   = help: the following other types implement trait `FromResidual<R>`:
-             <Result<T, F> as FromResidual<Result<Infallible, E>>>
-             <Result<T, F> as FromResidual<Yeet<E>>>
+   = help: the following other types implement trait `From<T>`:
+             <(T, T) as From<[T; 2]>>
+             <(T, T, T) as From<[T; 3]>>
+             <(T, T, T, T) as From<[T; 4]>>
+             <(T, T, T, T, T) as From<[T; 5]>>
+             <(T, T, T, T, T, T) as From<[T; 6]>>
+             <(T, T, T, T, T, T, T) as From<[T; 7]>>
+             <(T, T, T, T, T, T, T, T) as From<[T; 8]>>
+             <(T, T, T, T, T, T, T, T, T) as From<[T; 9]>>
+           and 4 others
    = note: required for `Result<i32, ()>` to implement `FromResidual<Result<Infallible, {integer}>>`
 
 error: aborting due to previous error
diff --git a/tests/ui/issues/issue-46302.stderr b/tests/ui/issues/issue-46302.stderr
index a6f97c3c9af..6e126038cc9 100644
--- a/tests/ui/issues/issue-46302.stderr
+++ b/tests/ui/issues/issue-46302.stderr
@@ -2,10 +2,12 @@ error[E0308]: mismatched types
   --> $DIR/issue-46302.rs:3:27
    |
 LL |   let u: &str = if true { s[..2] } else { s };
-   |                           ^^^^^^
-   |                           |
-   |                           expected `&str`, found `str`
-   |                           help: consider borrowing here: `&s[..2]`
+   |                           ^^^^^^ expected `&str`, found `str`
+   |
+help: consider borrowing here
+   |
+LL |   let u: &str = if true { &s[..2] } else { s };
+   |                           +
 
 error: aborting due to previous error
 
diff --git a/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr b/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr
index e874ded8ec5..211dd512895 100644
--- a/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr
+++ b/tests/ui/issues/issue-46756-consider-borrowing-cast-or-binexpr.stderr
@@ -2,10 +2,8 @@ error[E0308]: mismatched types
   --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:12:42
    |
 LL |     light_flows_our_war_of_mocking_words(behold as usize);
-   |     ------------------------------------ ^^^^^^^^^^^^^^^
-   |     |                                    |
-   |     |                                    expected `&usize`, found `usize`
-   |     |                                    help: consider borrowing here: `&(behold as usize)`
+   |     ------------------------------------ ^^^^^^^^^^^^^^^ expected `&usize`, found `usize`
+   |     |
    |     arguments to this function are incorrect
    |
 note: function defined here
@@ -13,15 +11,17 @@ note: function defined here
    |
 LL | fn light_flows_our_war_of_mocking_words(and_yet: &usize) -> usize {
    |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------
+help: consider borrowing here
+   |
+LL |     light_flows_our_war_of_mocking_words(&(behold as usize));
+   |                                          ++               +
 
 error[E0308]: mismatched types
   --> $DIR/issue-46756-consider-borrowing-cast-or-binexpr.rs:14:42
    |
 LL |     light_flows_our_war_of_mocking_words(with_tears + 4);
-   |     ------------------------------------ ^^^^^^^^^^^^^^
-   |     |                                    |
-   |     |                                    expected `&usize`, found `usize`
-   |     |                                    help: consider borrowing here: `&(with_tears + 4)`
+   |     ------------------------------------ ^^^^^^^^^^^^^^ expected `&usize`, found `usize`
+   |     |
    |     arguments to this function are incorrect
    |
 note: function defined here
@@ -29,6 +29,10 @@ note: function defined here
    |
 LL | fn light_flows_our_war_of_mocking_words(and_yet: &usize) -> usize {
    |    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ---------------
+help: consider borrowing here
+   |
+LL |     light_flows_our_war_of_mocking_words(&(with_tears + 4));
+   |                                          ++              +
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/issues/issue-51515.rs b/tests/ui/issues/issue-51515.rs
index 84e09afac0a..33a9bf85e23 100644
--- a/tests/ui/issues/issue-51515.rs
+++ b/tests/ui/issues/issue-51515.rs
@@ -1,7 +1,6 @@
 fn main() {
     let foo = &16;
     //~^ HELP consider changing this to be a mutable reference
-    //~| SUGGESTION &mut 16
     *foo = 32;
     //~^ ERROR cannot assign to `*foo`, which is behind a `&` reference
     let bar = foo;
diff --git a/tests/ui/issues/issue-51515.stderr b/tests/ui/issues/issue-51515.stderr
index 94e5c9f1b83..88b8d210908 100644
--- a/tests/ui/issues/issue-51515.stderr
+++ b/tests/ui/issues/issue-51515.stderr
@@ -1,5 +1,5 @@
 error[E0594]: cannot assign to `*foo`, which is behind a `&` reference
-  --> $DIR/issue-51515.rs:5:5
+  --> $DIR/issue-51515.rs:4:5
    |
 LL |     *foo = 32;
    |     ^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be written
@@ -7,10 +7,10 @@ LL |     *foo = 32;
 help: consider changing this to be a mutable reference
    |
 LL |     let foo = &mut 16;
-   |               ~~~~~~~
+   |                +++
 
 error[E0594]: cannot assign to `*bar`, which is behind a `&` reference
-  --> $DIR/issue-51515.rs:9:5
+  --> $DIR/issue-51515.rs:8:5
    |
 LL |     *bar = 64;
    |     ^^^^^^^^^ `bar` is a `&` reference, so the data it refers to cannot be written
diff --git a/tests/ui/issues/issue-58857.stderr b/tests/ui/issues/issue-58857.stderr
index e2acec47e5a..6aef35f0bb9 100644
--- a/tests/ui/issues/issue-58857.stderr
+++ b/tests/ui/issues/issue-58857.stderr
@@ -1,8 +1,8 @@
 error: negative bounds are not supported
-  --> $DIR/issue-58857.rs:4:7
+  --> $DIR/issue-58857.rs:4:9
    |
 LL | impl<A: !Valid> Conj<A>{}
-   |       ^^^^^^^^ negative bounds are not supported
+   |         ^
 
 error: aborting due to previous error
 
diff --git a/tests/ui/issues/issue-61106.stderr b/tests/ui/issues/issue-61106.stderr
index eff3e6e7849..aa922e2682d 100644
--- a/tests/ui/issues/issue-61106.stderr
+++ b/tests/ui/issues/issue-61106.stderr
@@ -2,10 +2,8 @@ error[E0308]: mismatched types
   --> $DIR/issue-61106.rs:3:9
    |
 LL |     foo(x.clone());
-   |     --- ^^^^^^^^^
-   |     |   |
-   |     |   expected `&str`, found `String`
-   |     |   help: consider borrowing here: `&x`
+   |     --- ^^^^^^^^^ expected `&str`, found `String`
+   |     |
    |     arguments to this function are incorrect
    |
 note: function defined here
@@ -13,6 +11,10 @@ note: function defined here
    |
 LL | fn foo(_: &str) {}
    |    ^^^ -------
+help: consider borrowing here
+   |
+LL |     foo(&x.clone());
+   |         +
 
 error: aborting due to previous error
 
diff --git a/tests/ui/issues/issue-61623.stderr b/tests/ui/issues/issue-61623.stderr
index 5fcc338557c..bedea3890a3 100644
--- a/tests/ui/issues/issue-61623.stderr
+++ b/tests/ui/issues/issue-61623.stderr
@@ -7,7 +7,7 @@ LL |     f2(|| x.0, f1(x.1))
 help: consider changing this to be a mutable reference
    |
 LL | fn f3<'a>(x: &'a mut ((), &'a mut ())) {
-   |              ~~~~~~~~~~~~~~~~~~~~~~~~
+   |                  +++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/issues/issue-7364.stderr b/tests/ui/issues/issue-7364.stderr
index aee73380f15..7449fe697ae 100644
--- a/tests/ui/issues/issue-7364.stderr
+++ b/tests/ui/issues/issue-7364.stderr
@@ -7,7 +7,8 @@ LL | static boxed: Box<RefCell<isize>> = Box::new(RefCell::new(0));
    = help: the trait `Sync` is not implemented for `RefCell<isize>`
    = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
    = note: required for `Unique<RefCell<isize>>` to implement `Sync`
-   = note: required because it appears within the type `Box<RefCell<isize>>`
+note: required because it appears within the type `Box<RefCell<isize>>`
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
    = note: shared static variables must have a type that implements `Sync`
 
 error: aborting due to previous error
diff --git a/tests/ui/kindck/kindck-send-object.stderr b/tests/ui/kindck/kindck-send-object.stderr
index e9bbeeacd70..284d5dcec31 100644
--- a/tests/ui/kindck/kindck-send-object.stderr
+++ b/tests/ui/kindck/kindck-send-object.stderr
@@ -20,7 +20,8 @@ LL |     assert_send::<Box<dyn Dummy>>();
    |
    = help: the trait `Send` is not implemented for `dyn Dummy`
    = note: required for `Unique<dyn Dummy>` to implement `Send`
-   = note: required because it appears within the type `Box<dyn Dummy>`
+note: required because it appears within the type `Box<dyn Dummy>`
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
 note: required by a bound in `assert_send`
   --> $DIR/kindck-send-object.rs:5:18
    |
diff --git a/tests/ui/kindck/kindck-send-object1.stderr b/tests/ui/kindck/kindck-send-object1.stderr
index 19ef4f6fc68..269193f73b4 100644
--- a/tests/ui/kindck/kindck-send-object1.stderr
+++ b/tests/ui/kindck/kindck-send-object1.stderr
@@ -20,7 +20,8 @@ LL |     assert_send::<Box<dyn Dummy + 'a>>();
    |
    = help: the trait `Send` is not implemented for `(dyn Dummy + 'a)`
    = note: required for `Unique<(dyn Dummy + 'a)>` to implement `Send`
-   = note: required because it appears within the type `Box<dyn Dummy>`
+note: required because it appears within the type `Box<dyn Dummy>`
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
 note: required by a bound in `assert_send`
   --> $DIR/kindck-send-object1.rs:5:18
    |
diff --git a/tests/ui/kindck/kindck-send-object2.stderr b/tests/ui/kindck/kindck-send-object2.stderr
index b8af33d0dc1..6b8df60227f 100644
--- a/tests/ui/kindck/kindck-send-object2.stderr
+++ b/tests/ui/kindck/kindck-send-object2.stderr
@@ -20,7 +20,8 @@ LL |     assert_send::<Box<dyn Dummy>>();
    |
    = help: the trait `Send` is not implemented for `dyn Dummy`
    = note: required for `Unique<dyn Dummy>` to implement `Send`
-   = note: required because it appears within the type `Box<dyn Dummy>`
+note: required because it appears within the type `Box<dyn Dummy>`
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
 note: required by a bound in `assert_send`
   --> $DIR/kindck-send-object2.rs:3:18
    |
diff --git a/tests/ui/kindck/kindck-send-owned.stderr b/tests/ui/kindck/kindck-send-owned.stderr
index b03f56465ce..dc1bb6206af 100644
--- a/tests/ui/kindck/kindck-send-owned.stderr
+++ b/tests/ui/kindck/kindck-send-owned.stderr
@@ -6,7 +6,8 @@ LL |     assert_send::<Box<*mut u8>>();
    |
    = help: the trait `Send` is not implemented for `*mut u8`
    = note: required for `Unique<*mut u8>` to implement `Send`
-   = note: required because it appears within the type `Box<*mut u8>`
+note: required because it appears within the type `Box<*mut u8>`
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
 note: required by a bound in `assert_send`
   --> $DIR/kindck-send-owned.rs:3:18
    |
diff --git a/tests/ui/layout/debug.rs b/tests/ui/layout/debug.rs
index a282e71235c..46171880a6f 100644
--- a/tests/ui/layout/debug.rs
+++ b/tests/ui/layout/debug.rs
@@ -1,8 +1,9 @@
 // normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN"
-#![feature(never_type, rustc_attrs, type_alias_impl_trait)]
+#![feature(never_type, rustc_attrs, type_alias_impl_trait, repr_simd)]
 #![crate_type = "lib"]
 
 #[rustc_layout(debug)]
+#[derive(Copy, Clone)]
 enum E { Foo, Bar(!, i32, i32) } //~ ERROR: layout_of
 
 #[rustc_layout(debug)]
@@ -17,6 +18,51 @@ type Test = Result<i32, i32>; //~ ERROR: layout_of
 #[rustc_layout(debug)]
 type T = impl std::fmt::Debug; //~ ERROR: layout_of
 
+#[rustc_layout(debug)]
+pub union V { //~ ERROR: layout_of
+    a: [u16; 0],
+    b: u8,
+}
+
+#[rustc_layout(debug)]
+pub union W { //~ ERROR: layout_of
+    b: u8,
+    a: [u16; 0],
+}
+
+#[rustc_layout(debug)]
+pub union Y { //~ ERROR: layout_of
+    b: [u8; 0],
+    a: [u16; 0],
+}
+
+#[rustc_layout(debug)]
+#[repr(packed(1))]
+union P1 { x: u32 } //~ ERROR: layout_of
+
+#[rustc_layout(debug)]
+#[repr(packed(1))]
+union P2 { x: (u32, u32) } //~ ERROR: layout_of
+
+#[repr(simd)]
+#[derive(Copy, Clone)]
+struct F32x4(f32, f32, f32, f32);
+
+#[rustc_layout(debug)]
+#[repr(packed(1))]
+union P3 { x: F32x4 } //~ ERROR: layout_of
+
+#[rustc_layout(debug)]
+#[repr(packed(1))]
+union P4 { x: E } //~ ERROR: layout_of
+
+#[rustc_layout(debug)]
+#[repr(packed(1))]
+union P5 { zst: [u16; 0], byte: u8 } //~ ERROR: layout_of
+
+#[rustc_layout(debug)]
+type X = std::mem::MaybeUninit<u8>; //~ ERROR: layout_of
+
 fn f() -> T {
     0i32
 }
diff --git a/tests/ui/layout/debug.stderr b/tests/ui/layout/debug.stderr
index c5e1c41d130..b9fa1b299e9 100644
--- a/tests/ui/layout/debug.stderr
+++ b/tests/ui/layout/debug.stderr
@@ -81,7 +81,7 @@ error: layout_of(E) = Layout {
                ],
            },
        }
-  --> $DIR/debug.rs:6:1
+  --> $DIR/debug.rs:7:1
    |
 LL | enum E { Foo, Bar(!, i32, i32) }
    | ^^^^^^
@@ -125,7 +125,7 @@ error: layout_of(S) = Layout {
                index: 0,
            },
        }
-  --> $DIR/debug.rs:9:1
+  --> $DIR/debug.rs:10:1
    |
 LL | struct S { f1: i32, f2: (), f3: i32 }
    | ^^^^^^^^
@@ -147,7 +147,7 @@ error: layout_of(U) = Layout {
                index: 0,
            },
        }
-  --> $DIR/debug.rs:12:1
+  --> $DIR/debug.rs:13:1
    |
 LL | union U { f1: (i32, i32), f3: i32 }
    | ^^^^^^^
@@ -276,7 +276,7 @@ error: layout_of(std::result::Result<i32, i32>) = Layout {
                ],
            },
        }
-  --> $DIR/debug.rs:15:1
+  --> $DIR/debug.rs:16:1
    |
 LL | type Test = Result<i32, i32>;
    | ^^^^^^^^^
@@ -302,10 +302,218 @@ error: layout_of(i32) = Layout {
                index: 0,
            },
        }
-  --> $DIR/debug.rs:18:1
+  --> $DIR/debug.rs:19:1
    |
 LL | type T = impl std::fmt::Debug;
    | ^^^^^^
 
-error: aborting due to 5 previous errors
+error: layout_of(V) = Layout {
+           size: Size(2 bytes),
+           align: AbiAndPrefAlign {
+               abi: Align(2 bytes),
+               pref: $PREF_ALIGN,
+           },
+           abi: Aggregate {
+               sized: true,
+           },
+           fields: Union(
+               2,
+           ),
+           largest_niche: None,
+           variants: Single {
+               index: 0,
+           },
+       }
+  --> $DIR/debug.rs:22:1
+   |
+LL | pub union V {
+   | ^^^^^^^^^^^
+
+error: layout_of(W) = Layout {
+           size: Size(2 bytes),
+           align: AbiAndPrefAlign {
+               abi: Align(2 bytes),
+               pref: $PREF_ALIGN,
+           },
+           abi: Aggregate {
+               sized: true,
+           },
+           fields: Union(
+               2,
+           ),
+           largest_niche: None,
+           variants: Single {
+               index: 0,
+           },
+       }
+  --> $DIR/debug.rs:28:1
+   |
+LL | pub union W {
+   | ^^^^^^^^^^^
+
+error: layout_of(Y) = Layout {
+           size: Size(0 bytes),
+           align: AbiAndPrefAlign {
+               abi: Align(2 bytes),
+               pref: $PREF_ALIGN,
+           },
+           abi: Aggregate {
+               sized: true,
+           },
+           fields: Union(
+               2,
+           ),
+           largest_niche: None,
+           variants: Single {
+               index: 0,
+           },
+       }
+  --> $DIR/debug.rs:34:1
+   |
+LL | pub union Y {
+   | ^^^^^^^^^^^
+
+error: layout_of(P1) = Layout {
+           size: Size(4 bytes),
+           align: AbiAndPrefAlign {
+               abi: Align(1 bytes),
+               pref: $PREF_ALIGN,
+           },
+           abi: Aggregate {
+               sized: true,
+           },
+           fields: Union(
+               1,
+           ),
+           largest_niche: None,
+           variants: Single {
+               index: 0,
+           },
+       }
+  --> $DIR/debug.rs:41:1
+   |
+LL | union P1 { x: u32 }
+   | ^^^^^^^^
+
+error: layout_of(P2) = Layout {
+           size: Size(8 bytes),
+           align: AbiAndPrefAlign {
+               abi: Align(1 bytes),
+               pref: $PREF_ALIGN,
+           },
+           abi: Aggregate {
+               sized: true,
+           },
+           fields: Union(
+               1,
+           ),
+           largest_niche: None,
+           variants: Single {
+               index: 0,
+           },
+       }
+  --> $DIR/debug.rs:45:1
+   |
+LL | union P2 { x: (u32, u32) }
+   | ^^^^^^^^
+
+error: layout_of(P3) = Layout {
+           size: Size(16 bytes),
+           align: AbiAndPrefAlign {
+               abi: Align(1 bytes),
+               pref: $PREF_ALIGN,
+           },
+           abi: Aggregate {
+               sized: true,
+           },
+           fields: Union(
+               1,
+           ),
+           largest_niche: None,
+           variants: Single {
+               index: 0,
+           },
+       }
+  --> $DIR/debug.rs:53:1
+   |
+LL | union P3 { x: F32x4 }
+   | ^^^^^^^^
+
+error: layout_of(P4) = Layout {
+           size: Size(12 bytes),
+           align: AbiAndPrefAlign {
+               abi: Align(1 bytes),
+               pref: $PREF_ALIGN,
+           },
+           abi: Aggregate {
+               sized: true,
+           },
+           fields: Union(
+               1,
+           ),
+           largest_niche: None,
+           variants: Single {
+               index: 0,
+           },
+       }
+  --> $DIR/debug.rs:57:1
+   |
+LL | union P4 { x: E }
+   | ^^^^^^^^
+
+error: layout_of(P5) = Layout {
+           size: Size(1 bytes),
+           align: AbiAndPrefAlign {
+               abi: Align(1 bytes),
+               pref: $PREF_ALIGN,
+           },
+           abi: Scalar(
+               Union {
+                   value: Int(
+                       I8,
+                       false,
+                   ),
+               },
+           ),
+           fields: Union(
+               2,
+           ),
+           largest_niche: None,
+           variants: Single {
+               index: 0,
+           },
+       }
+  --> $DIR/debug.rs:61:1
+   |
+LL | union P5 { zst: [u16; 0], byte: u8 }
+   | ^^^^^^^^
+
+error: layout_of(std::mem::MaybeUninit<u8>) = Layout {
+           size: Size(1 bytes),
+           align: AbiAndPrefAlign {
+               abi: Align(1 bytes),
+               pref: $PREF_ALIGN,
+           },
+           abi: Scalar(
+               Union {
+                   value: Int(
+                       I8,
+                       false,
+                   ),
+               },
+           ),
+           fields: Union(
+               2,
+           ),
+           largest_niche: None,
+           variants: Single {
+               index: 0,
+           },
+       }
+  --> $DIR/debug.rs:64:1
+   |
+LL | type X = std::mem::MaybeUninit<u8>;
+   | ^^^^^^
+
+error: aborting due to 14 previous errors
 
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/lifetimes/elided-lifetime-in-anon-const.rs b/tests/ui/lifetimes/elided-lifetime-in-anon-const.rs
new file mode 100644
index 00000000000..69a7b61bab4
--- /dev/null
+++ b/tests/ui/lifetimes/elided-lifetime-in-anon-const.rs
@@ -0,0 +1,20 @@
+// Verify that elided lifetimes inside anonymous constants are not forced to be `'static`.
+// check-pass
+
+fn foo() -> [(); {
+       let a = 10_usize;
+       let b: &'_ usize = &a;
+       *b
+   }] {
+    [(); 10]
+}
+
+fn bar() -> [(); 10] {
+    [(); {
+        let a = 10_usize;
+        let b: &'_ usize = &a;
+        *b
+    }]
+}
+
+fn main() {}
diff --git a/tests/ui/lifetimes/issue-64173-unused-lifetimes.rs b/tests/ui/lifetimes/issue-64173-unused-lifetimes.rs
index 8080dd7dc34..3879784d0b0 100644
--- a/tests/ui/lifetimes/issue-64173-unused-lifetimes.rs
+++ b/tests/ui/lifetimes/issue-64173-unused-lifetimes.rs
@@ -13,7 +13,7 @@ const fn foo<T>() -> usize {
 }
 
 struct Bar<'a> { //~ ERROR: parameter `'a` is never used
-    beta: [(); foo::<&'a ()>()], //~ ERROR: a non-static lifetime is not allowed in a `const`
+    beta: [(); foo::<&'a ()>()], //~ ERROR: generic parameters may not be used in const operations
 }
 
 fn main() {}
diff --git a/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr b/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr
index a487cbea537..02ca10b2eb6 100644
--- a/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr
+++ b/tests/ui/lifetimes/issue-64173-unused-lifetimes.stderr
@@ -1,11 +1,11 @@
-error[E0658]: a non-static lifetime is not allowed in a `const`
+error: generic parameters may not be used in const operations
   --> $DIR/issue-64173-unused-lifetimes.rs:16:23
    |
 LL |     beta: [(); foo::<&'a ()>()],
-   |                       ^^
+   |                       ^^ cannot perform const operation using `'a`
    |
-   = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
-   = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
+   = note: lifetime parameters may not be used in const expressions
+   = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
 
 error: generic `Self` types are currently not permitted in anonymous constants
   --> $DIR/issue-64173-unused-lifetimes.rs:4:28
@@ -31,5 +31,4 @@ LL | struct Bar<'a> {
 
 error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0392, E0658.
-For more information about an error, try `rustc --explain E0392`.
+For more information about this error, try `rustc --explain E0392`.
diff --git a/tests/ui/lifetimes/unusual-rib-combinations.rs b/tests/ui/lifetimes/unusual-rib-combinations.rs
index 0ae68ad04f7..2f5ba98445b 100644
--- a/tests/ui/lifetimes/unusual-rib-combinations.rs
+++ b/tests/ui/lifetimes/unusual-rib-combinations.rs
@@ -27,7 +27,7 @@ fn d<const C: S>() {}
 
 trait Foo<'a> {}
 struct Bar<const N: &'a (dyn for<'a> Foo<'a>)>;
-//~^ ERROR use of non-static lifetime `'a` in const generic
+//~^ ERROR the type of const parameters must not depend on other generic parameters
 //~| ERROR `&dyn for<'a> Foo<'a>` is forbidden as the type of a const generic parameter
 
 fn main() {}
diff --git a/tests/ui/lifetimes/unusual-rib-combinations.stderr b/tests/ui/lifetimes/unusual-rib-combinations.stderr
index 20163d289b1..4994e4dc444 100644
--- a/tests/ui/lifetimes/unusual-rib-combinations.stderr
+++ b/tests/ui/lifetimes/unusual-rib-combinations.stderr
@@ -9,13 +9,13 @@ help: consider introducing a named lifetime parameter
 LL | fn d<'a, const C: S<'a>>() {}
    |      +++           ++++
 
-error[E0771]: use of non-static lifetime `'a` in const generic
+error[E0770]: the type of const parameters must not depend on other generic parameters
   --> $DIR/unusual-rib-combinations.rs:29:22
    |
 LL | struct Bar<const N: &'a (dyn for<'a> Foo<'a>)>;
-   |                      ^^
+   |                      ^^ the type must not depend on the parameter `'a`
    |
-   = note: for more information, see issue #74052 <https://github.com/rust-lang/rust/issues/74052>
+   = note: lifetime parameters may not be used in the type of const parameters
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
   --> $DIR/unusual-rib-combinations.rs:7:16
@@ -74,5 +74,5 @@ LL | struct Bar<const N: &'a (dyn for<'a> Foo<'a>)>;
 
 error: aborting due to 9 previous errors
 
-Some errors have detailed explanations: E0106, E0214, E0308, E0771.
+Some errors have detailed explanations: E0106, E0214, E0308, E0770.
 For more information about an error, try `rustc --explain E0106`.
diff --git a/tests/ui/lint/internal/trivial-diagnostics.rs b/tests/ui/lint/internal/trivial-diagnostics.rs
new file mode 100644
index 00000000000..e536e1164fc
--- /dev/null
+++ b/tests/ui/lint/internal/trivial-diagnostics.rs
@@ -0,0 +1,8 @@
+// compile-flags: -Zunstable-options
+
+pub fn issue_111280() {
+    struct_span_err(msg).emit(); //~ ERROR cannot find value `msg`
+    //~^ ERROR cannot find function `struct_span_err`
+}
+
+fn main() {}
diff --git a/tests/ui/lint/internal/trivial-diagnostics.stderr b/tests/ui/lint/internal/trivial-diagnostics.stderr
new file mode 100644
index 00000000000..d47a7dae023
--- /dev/null
+++ b/tests/ui/lint/internal/trivial-diagnostics.stderr
@@ -0,0 +1,15 @@
+error[E0425]: cannot find value `msg` in this scope
+  --> $DIR/trivial-diagnostics.rs:4:21
+   |
+LL |     struct_span_err(msg).emit();
+   |                     ^^^ not found in this scope
+
+error[E0425]: cannot find function `struct_span_err` in this scope
+  --> $DIR/trivial-diagnostics.rs:4:5
+   |
+LL |     struct_span_err(msg).emit();
+   |     ^^^^^^^^^^^^^^^ not found in this scope
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/lint/invalid_value-polymorphic.rs b/tests/ui/lint/invalid_value-polymorphic.rs
index 055173e9842..98f82b792fc 100644
--- a/tests/ui/lint/invalid_value-polymorphic.rs
+++ b/tests/ui/lint/invalid_value-polymorphic.rs
@@ -1,4 +1,4 @@
-// compile-flags: --crate-type=lib -Zmir-enable-passes=+InstCombine
+// compile-flags: --crate-type=lib -Zmir-enable-passes=+InstSimplify
 // build-pass
 
 #![feature(core_intrinsics)]
diff --git a/tests/ui/lint/lint-missing-doc.rs b/tests/ui/lint/lint-missing-doc.rs
index 4a234d2651a..e4c9f8f559b 100644
--- a/tests/ui/lint/lint-missing-doc.rs
+++ b/tests/ui/lint/lint-missing-doc.rs
@@ -3,6 +3,7 @@
 #![deny(missing_docs)]
 #![allow(dead_code)]
 #![feature(associated_type_defaults, extern_types)]
+#![feature(trait_alias)]
 
 //! Some garbage docs for the crate here
 #![doc="More garbage"]
@@ -202,4 +203,6 @@ extern "C" {
     //~^ ERROR: missing documentation for a foreign type
 }
 
+pub trait T = Sync; //~ ERROR: missing documentation for a trait alias
+
 fn main() {}
diff --git a/tests/ui/lint/lint-missing-doc.stderr b/tests/ui/lint/lint-missing-doc.stderr
index 733d062a08b..c94bd3b8dfb 100644
--- a/tests/ui/lint/lint-missing-doc.stderr
+++ b/tests/ui/lint/lint-missing-doc.stderr
@@ -1,5 +1,5 @@
 error: missing documentation for a type alias
-  --> $DIR/lint-missing-doc.rs:11:1
+  --> $DIR/lint-missing-doc.rs:12:1
    |
 LL | pub type PubTypedef = String;
    | ^^^^^^^^^^^^^^^^^^^
@@ -11,142 +11,148 @@ LL | #![deny(missing_docs)]
    |         ^^^^^^^^^^^^
 
 error: missing documentation for a struct
-  --> $DIR/lint-missing-doc.rs:18:1
+  --> $DIR/lint-missing-doc.rs:19:1
    |
 LL | pub struct PubFoo {
    | ^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a struct field
-  --> $DIR/lint-missing-doc.rs:19:5
+  --> $DIR/lint-missing-doc.rs:20:5
    |
 LL |     pub a: isize,
    |     ^^^^^^^^^^^^
 
 error: missing documentation for a module
-  --> $DIR/lint-missing-doc.rs:30:1
+  --> $DIR/lint-missing-doc.rs:31:1
    |
 LL | pub mod pub_module_no_dox {}
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a function
-  --> $DIR/lint-missing-doc.rs:34:1
+  --> $DIR/lint-missing-doc.rs:35:1
    |
 LL | pub fn foo2() {}
    | ^^^^^^^^^^^^^
 
 error: missing documentation for a trait
-  --> $DIR/lint-missing-doc.rs:52:1
+  --> $DIR/lint-missing-doc.rs:53:1
    |
 LL | pub trait C {
    | ^^^^^^^^^^^
 
 error: missing documentation for a method
-  --> $DIR/lint-missing-doc.rs:53:5
+  --> $DIR/lint-missing-doc.rs:54:5
    |
 LL |     fn foo(&self);
    |     ^^^^^^^^^^^^^^
 
 error: missing documentation for a method
-  --> $DIR/lint-missing-doc.rs:54:5
+  --> $DIR/lint-missing-doc.rs:55:5
    |
 LL |     fn foo_with_impl(&self) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for an associated function
-  --> $DIR/lint-missing-doc.rs:55:5
+  --> $DIR/lint-missing-doc.rs:56:5
    |
 LL |     fn foo_no_self();
    |     ^^^^^^^^^^^^^^^^^
 
 error: missing documentation for an associated function
-  --> $DIR/lint-missing-doc.rs:56:5
+  --> $DIR/lint-missing-doc.rs:57:5
    |
 LL |     fn foo_no_self_with_impl() {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for an associated type
-  --> $DIR/lint-missing-doc.rs:66:5
+  --> $DIR/lint-missing-doc.rs:67:5
    |
 LL |     type AssociatedType;
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for an associated type
-  --> $DIR/lint-missing-doc.rs:67:5
+  --> $DIR/lint-missing-doc.rs:68:5
    |
 LL |     type AssociatedTypeDef = Self;
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for an associated function
-  --> $DIR/lint-missing-doc.rs:83:5
+  --> $DIR/lint-missing-doc.rs:84:5
    |
 LL |     pub fn foo() {}
    |     ^^^^^^^^^^^^
 
 error: missing documentation for an enum
-  --> $DIR/lint-missing-doc.rs:120:1
+  --> $DIR/lint-missing-doc.rs:121:1
    |
 LL | pub enum PubBaz {
    | ^^^^^^^^^^^^^^^
 
 error: missing documentation for a variant
-  --> $DIR/lint-missing-doc.rs:121:5
+  --> $DIR/lint-missing-doc.rs:122:5
    |
 LL |     PubBazA {
    |     ^^^^^^^
 
 error: missing documentation for a struct field
-  --> $DIR/lint-missing-doc.rs:122:9
+  --> $DIR/lint-missing-doc.rs:123:9
    |
 LL |         a: isize,
    |         ^^^^^^^^
 
 error: missing documentation for a constant
-  --> $DIR/lint-missing-doc.rs:153:1
+  --> $DIR/lint-missing-doc.rs:154:1
    |
 LL | pub const FOO4: u32 = 0;
    | ^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a static
-  --> $DIR/lint-missing-doc.rs:163:1
+  --> $DIR/lint-missing-doc.rs:164:1
    |
 LL | pub static BAR4: u32 = 0;
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a function
-  --> $DIR/lint-missing-doc.rs:169:5
+  --> $DIR/lint-missing-doc.rs:170:5
    |
 LL |     pub fn undocumented1() {}
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a function
-  --> $DIR/lint-missing-doc.rs:170:5
+  --> $DIR/lint-missing-doc.rs:171:5
    |
 LL |     pub fn undocumented2() {}
    |     ^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a function
-  --> $DIR/lint-missing-doc.rs:176:9
+  --> $DIR/lint-missing-doc.rs:177:9
    |
 LL |         pub fn also_undocumented1() {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a function
-  --> $DIR/lint-missing-doc.rs:191:5
+  --> $DIR/lint-missing-doc.rs:192:5
    |
 LL |     pub fn extern_fn_undocumented(f: f32) -> f32;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a static
-  --> $DIR/lint-missing-doc.rs:196:5
+  --> $DIR/lint-missing-doc.rs:197:5
    |
 LL |     pub static EXTERN_STATIC_UNDOCUMENTED: u8;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: missing documentation for a foreign type
-  --> $DIR/lint-missing-doc.rs:201:5
+  --> $DIR/lint-missing-doc.rs:202:5
    |
 LL |     pub type ExternTyUndocumented;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 24 previous errors
+error: missing documentation for a trait alias
+  --> $DIR/lint-missing-doc.rs:206:1
+   |
+LL | pub trait T = Sync;
+   | ^^^^^^^^^^^
+
+error: aborting due to 25 previous errors
 
diff --git a/tests/ui/lint/must_not_suspend/boxed.stderr b/tests/ui/lint/must_not_suspend/boxed.stderr
index 9efc7b0693b..a2abfffc170 100644
--- a/tests/ui/lint/must_not_suspend/boxed.stderr
+++ b/tests/ui/lint/must_not_suspend/boxed.stderr
@@ -4,7 +4,7 @@ error: boxed `Umm` held across a suspend point, but should not be
 LL |     let _guard = bar();
    |         ^^^^^^
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 note: You gotta use Umm's, ya know?
   --> $DIR/boxed.rs:20:9
diff --git a/tests/ui/lint/must_not_suspend/dedup.drop_tracking.stderr b/tests/ui/lint/must_not_suspend/dedup.drop_tracking.stderr
index 262657da5fe..cd3baa857ab 100644
--- a/tests/ui/lint/must_not_suspend/dedup.drop_tracking.stderr
+++ b/tests/ui/lint/must_not_suspend/dedup.drop_tracking.stderr
@@ -4,7 +4,7 @@ error: `No` held across a suspend point, but should not be
 LL |     let no = No {};
    |         ^^
 LL |     wheeee(&no).await;
-   |                ------ the value is held across this suspend point
+   |                 ----- the value is held across this suspend point
    |
 help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
   --> $DIR/dedup.rs:19:9
diff --git a/tests/ui/lint/must_not_suspend/dedup.drop_tracking_mir.stderr b/tests/ui/lint/must_not_suspend/dedup.drop_tracking_mir.stderr
index 262657da5fe..cd3baa857ab 100644
--- a/tests/ui/lint/must_not_suspend/dedup.drop_tracking_mir.stderr
+++ b/tests/ui/lint/must_not_suspend/dedup.drop_tracking_mir.stderr
@@ -4,7 +4,7 @@ error: `No` held across a suspend point, but should not be
 LL |     let no = No {};
    |         ^^
 LL |     wheeee(&no).await;
-   |                ------ the value is held across this suspend point
+   |                 ----- the value is held across this suspend point
    |
 help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
   --> $DIR/dedup.rs:19:9
diff --git a/tests/ui/lint/must_not_suspend/dedup.no_drop_tracking.stderr b/tests/ui/lint/must_not_suspend/dedup.no_drop_tracking.stderr
index 7ed43d25719..aff2f7c32b9 100644
--- a/tests/ui/lint/must_not_suspend/dedup.no_drop_tracking.stderr
+++ b/tests/ui/lint/must_not_suspend/dedup.no_drop_tracking.stderr
@@ -4,7 +4,7 @@ error: `No` held across a suspend point, but should not be
 LL |     let no = No {};
    |         ^^
 LL |     wheeee(&no).await;
-   |                ------ the value is held across this suspend point
+   |                 ----- the value is held across this suspend point
    |
 help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
   --> $DIR/dedup.rs:19:9
@@ -21,7 +21,7 @@ error: `No` held across a suspend point, but should not be
   --> $DIR/dedup.rs:20:13
    |
 LL |     wheeee(&no).await;
-   |             ^^ ------ the value is held across this suspend point
+   |             ^^  ----- the value is held across this suspend point
    |
 help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
   --> $DIR/dedup.rs:20:13
diff --git a/tests/ui/lint/must_not_suspend/dedup.stderr b/tests/ui/lint/must_not_suspend/dedup.stderr
deleted file mode 100644
index 18880f5a757..00000000000
--- a/tests/ui/lint/must_not_suspend/dedup.stderr
+++ /dev/null
@@ -1,19 +0,0 @@
-error: `No` held across a suspend point, but should not be
-  --> $DIR/dedup.rs:19:13
-   |
-LL |     wheeee(&No {}).await;
-   |             ^^^^^ ------ the value is held across this suspend point
-   |
-help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
-  --> $DIR/dedup.rs:19:13
-   |
-LL |     wheeee(&No {}).await;
-   |             ^^^^^
-note: the lint level is defined here
-  --> $DIR/dedup.rs:6:9
-   |
-LL | #![deny(must_not_suspend)]
-   |         ^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/tests/ui/lint/must_not_suspend/mutex.stderr b/tests/ui/lint/must_not_suspend/mutex.stderr
index c251cb84589..9b5fc37a332 100644
--- a/tests/ui/lint/must_not_suspend/mutex.stderr
+++ b/tests/ui/lint/must_not_suspend/mutex.stderr
@@ -4,7 +4,7 @@ error: `MutexGuard` held across a suspend point, but should not be
 LL |     let _guard = m.lock().unwrap();
    |         ^^^^^^
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 note: holding a MutexGuard across suspend points can cause deadlocks, delays, and cause Futures to not implement `Send`
   --> $DIR/mutex.rs:8:9
diff --git a/tests/ui/lint/must_not_suspend/ref-drop-tracking.stderr b/tests/ui/lint/must_not_suspend/ref-drop-tracking.stderr
index 180e187c1b0..348880b9c9f 100644
--- a/tests/ui/lint/must_not_suspend/ref-drop-tracking.stderr
+++ b/tests/ui/lint/must_not_suspend/ref-drop-tracking.stderr
@@ -5,7 +5,7 @@ LL |         let guard = &mut self.u;
    |             ^^^^^
 LL |
 LL |         other().await;
-   |                ------ the value is held across this suspend point
+   |                 ----- the value is held across this suspend point
    |
 note: You gotta use Umm's, ya know?
   --> $DIR/ref-drop-tracking.rs:19:13
diff --git a/tests/ui/lint/must_not_suspend/ref.drop_tracking.stderr b/tests/ui/lint/must_not_suspend/ref.drop_tracking.stderr
index e3628ca5e49..fb18c2be9cb 100644
--- a/tests/ui/lint/must_not_suspend/ref.drop_tracking.stderr
+++ b/tests/ui/lint/must_not_suspend/ref.drop_tracking.stderr
@@ -5,7 +5,7 @@ LL |         let guard = &mut self.u;
    |             ^^^^^
 LL |
 LL |         other().await;
-   |                ------ the value is held across this suspend point
+   |                 ----- the value is held across this suspend point
    |
 note: You gotta use Umm's, ya know?
   --> $DIR/ref.rs:22:13
diff --git a/tests/ui/lint/must_not_suspend/ref.drop_tracking_mir.stderr b/tests/ui/lint/must_not_suspend/ref.drop_tracking_mir.stderr
index e3628ca5e49..fb18c2be9cb 100644
--- a/tests/ui/lint/must_not_suspend/ref.drop_tracking_mir.stderr
+++ b/tests/ui/lint/must_not_suspend/ref.drop_tracking_mir.stderr
@@ -5,7 +5,7 @@ LL |         let guard = &mut self.u;
    |             ^^^^^
 LL |
 LL |         other().await;
-   |                ------ the value is held across this suspend point
+   |                 ----- the value is held across this suspend point
    |
 note: You gotta use Umm's, ya know?
   --> $DIR/ref.rs:22:13
diff --git a/tests/ui/lint/must_not_suspend/ref.no_drop_tracking.stderr b/tests/ui/lint/must_not_suspend/ref.no_drop_tracking.stderr
index e9bfa08b5dd..6976dd34991 100644
--- a/tests/ui/lint/must_not_suspend/ref.no_drop_tracking.stderr
+++ b/tests/ui/lint/must_not_suspend/ref.no_drop_tracking.stderr
@@ -5,7 +5,7 @@ LL |         let guard = &mut self.u;
    |                          ^^^^^^
 LL |
 LL |         other().await;
-   |                ------ the value is held across this suspend point
+   |                 ----- the value is held across this suspend point
    |
 note: You gotta use Umm's, ya know?
   --> $DIR/ref.rs:22:26
diff --git a/tests/ui/lint/must_not_suspend/trait.drop_tracking.stderr b/tests/ui/lint/must_not_suspend/trait.drop_tracking.stderr
index 6e62a228a43..8c8ad1f3788 100644
--- a/tests/ui/lint/must_not_suspend/trait.drop_tracking.stderr
+++ b/tests/ui/lint/must_not_suspend/trait.drop_tracking.stderr
@@ -5,7 +5,7 @@ LL |     let _guard1 = r#impl();
    |         ^^^^^^^
 ...
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
   --> $DIR/trait.rs:24:9
@@ -25,7 +25,7 @@ LL |     let _guard2 = r#dyn();
    |         ^^^^^^^
 LL |
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
   --> $DIR/trait.rs:25:9
diff --git a/tests/ui/lint/must_not_suspend/trait.drop_tracking_mir.stderr b/tests/ui/lint/must_not_suspend/trait.drop_tracking_mir.stderr
index 6e62a228a43..8c8ad1f3788 100644
--- a/tests/ui/lint/must_not_suspend/trait.drop_tracking_mir.stderr
+++ b/tests/ui/lint/must_not_suspend/trait.drop_tracking_mir.stderr
@@ -5,7 +5,7 @@ LL |     let _guard1 = r#impl();
    |         ^^^^^^^
 ...
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
   --> $DIR/trait.rs:24:9
@@ -25,7 +25,7 @@ LL |     let _guard2 = r#dyn();
    |         ^^^^^^^
 LL |
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
   --> $DIR/trait.rs:25:9
diff --git a/tests/ui/lint/must_not_suspend/trait.no_drop_tracking.stderr b/tests/ui/lint/must_not_suspend/trait.no_drop_tracking.stderr
index 6e62a228a43..8c8ad1f3788 100644
--- a/tests/ui/lint/must_not_suspend/trait.no_drop_tracking.stderr
+++ b/tests/ui/lint/must_not_suspend/trait.no_drop_tracking.stderr
@@ -5,7 +5,7 @@ LL |     let _guard1 = r#impl();
    |         ^^^^^^^
 ...
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
   --> $DIR/trait.rs:24:9
@@ -25,7 +25,7 @@ LL |     let _guard2 = r#dyn();
    |         ^^^^^^^
 LL |
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
   --> $DIR/trait.rs:25:9
diff --git a/tests/ui/lint/must_not_suspend/trait.stderr b/tests/ui/lint/must_not_suspend/trait.stderr
deleted file mode 100644
index 6e62a228a43..00000000000
--- a/tests/ui/lint/must_not_suspend/trait.stderr
+++ /dev/null
@@ -1,37 +0,0 @@
-error: implementer of `Wow` held across a suspend point, but should not be
-  --> $DIR/trait.rs:24:9
-   |
-LL |     let _guard1 = r#impl();
-   |         ^^^^^^^
-...
-LL |     other().await;
-   |            ------ the value is held across this suspend point
-   |
-help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
-  --> $DIR/trait.rs:24:9
-   |
-LL |     let _guard1 = r#impl();
-   |         ^^^^^^^
-note: the lint level is defined here
-  --> $DIR/trait.rs:6:9
-   |
-LL | #![deny(must_not_suspend)]
-   |         ^^^^^^^^^^^^^^^^
-
-error: boxed `Wow` trait object held across a suspend point, but should not be
-  --> $DIR/trait.rs:25:9
-   |
-LL |     let _guard2 = r#dyn();
-   |         ^^^^^^^
-LL |
-LL |     other().await;
-   |            ------ the value is held across this suspend point
-   |
-help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
-  --> $DIR/trait.rs:25:9
-   |
-LL |     let _guard2 = r#dyn();
-   |         ^^^^^^^
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/lint/must_not_suspend/unit.drop_tracking.stderr b/tests/ui/lint/must_not_suspend/unit.drop_tracking.stderr
index f89b3e341fd..e24cffdd0df 100644
--- a/tests/ui/lint/must_not_suspend/unit.drop_tracking.stderr
+++ b/tests/ui/lint/must_not_suspend/unit.drop_tracking.stderr
@@ -4,7 +4,7 @@ error: `Umm` held across a suspend point, but should not be
 LL |     let _guard = bar();
    |         ^^^^^^
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 note: You gotta use Umm's, ya know?
   --> $DIR/unit.rs:22:9
diff --git a/tests/ui/lint/must_not_suspend/unit.drop_tracking_mir.stderr b/tests/ui/lint/must_not_suspend/unit.drop_tracking_mir.stderr
index f89b3e341fd..e24cffdd0df 100644
--- a/tests/ui/lint/must_not_suspend/unit.drop_tracking_mir.stderr
+++ b/tests/ui/lint/must_not_suspend/unit.drop_tracking_mir.stderr
@@ -4,7 +4,7 @@ error: `Umm` held across a suspend point, but should not be
 LL |     let _guard = bar();
    |         ^^^^^^
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 note: You gotta use Umm's, ya know?
   --> $DIR/unit.rs:22:9
diff --git a/tests/ui/lint/must_not_suspend/unit.no_drop_tracking.stderr b/tests/ui/lint/must_not_suspend/unit.no_drop_tracking.stderr
index f89b3e341fd..e24cffdd0df 100644
--- a/tests/ui/lint/must_not_suspend/unit.no_drop_tracking.stderr
+++ b/tests/ui/lint/must_not_suspend/unit.no_drop_tracking.stderr
@@ -4,7 +4,7 @@ error: `Umm` held across a suspend point, but should not be
 LL |     let _guard = bar();
    |         ^^^^^^
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 note: You gotta use Umm's, ya know?
   --> $DIR/unit.rs:22:9
diff --git a/tests/ui/lint/must_not_suspend/unit.stderr b/tests/ui/lint/must_not_suspend/unit.stderr
deleted file mode 100644
index 50ca292c2f6..00000000000
--- a/tests/ui/lint/must_not_suspend/unit.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error: `Umm` held across a suspend point, but should not be
-  --> $DIR/unit.rs:23:9
-   |
-LL |     let _guard = bar();
-   |         ^^^^^^
-LL |     other().await;
-   |            ------ the value is held across this suspend point
-   |
-note: You gotta use Umm's, ya know?
-  --> $DIR/unit.rs:23:9
-   |
-LL |     let _guard = bar();
-   |         ^^^^^^
-help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
-  --> $DIR/unit.rs:23:9
-   |
-LL |     let _guard = bar();
-   |         ^^^^^^
-note: the lint level is defined here
-  --> $DIR/unit.rs:6:9
-   |
-LL | #![deny(must_not_suspend)]
-   |         ^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/tests/ui/lint/must_not_suspend/warn.drop_tracking.stderr b/tests/ui/lint/must_not_suspend/warn.drop_tracking.stderr
index 7a422891ab1..4f7b40a5efe 100644
--- a/tests/ui/lint/must_not_suspend/warn.drop_tracking.stderr
+++ b/tests/ui/lint/must_not_suspend/warn.drop_tracking.stderr
@@ -4,7 +4,7 @@ warning: `Umm` held across a suspend point, but should not be
 LL |     let _guard = bar();
    |         ^^^^^^
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 note: You gotta use Umm's, ya know?
   --> $DIR/warn.rs:24:9
diff --git a/tests/ui/lint/must_not_suspend/warn.drop_tracking_mir.stderr b/tests/ui/lint/must_not_suspend/warn.drop_tracking_mir.stderr
index 7a422891ab1..4f7b40a5efe 100644
--- a/tests/ui/lint/must_not_suspend/warn.drop_tracking_mir.stderr
+++ b/tests/ui/lint/must_not_suspend/warn.drop_tracking_mir.stderr
@@ -4,7 +4,7 @@ warning: `Umm` held across a suspend point, but should not be
 LL |     let _guard = bar();
    |         ^^^^^^
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 note: You gotta use Umm's, ya know?
   --> $DIR/warn.rs:24:9
diff --git a/tests/ui/lint/must_not_suspend/warn.no_drop_tracking.stderr b/tests/ui/lint/must_not_suspend/warn.no_drop_tracking.stderr
index 7a422891ab1..4f7b40a5efe 100644
--- a/tests/ui/lint/must_not_suspend/warn.no_drop_tracking.stderr
+++ b/tests/ui/lint/must_not_suspend/warn.no_drop_tracking.stderr
@@ -4,7 +4,7 @@ warning: `Umm` held across a suspend point, but should not be
 LL |     let _guard = bar();
    |         ^^^^^^
 LL |     other().await;
-   |            ------ the value is held across this suspend point
+   |             ----- the value is held across this suspend point
    |
 note: You gotta use Umm's, ya know?
   --> $DIR/warn.rs:24:9
diff --git a/tests/ui/lint/must_not_suspend/warn.stderr b/tests/ui/lint/must_not_suspend/warn.stderr
deleted file mode 100644
index 7a422891ab1..00000000000
--- a/tests/ui/lint/must_not_suspend/warn.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-warning: `Umm` held across a suspend point, but should not be
-  --> $DIR/warn.rs:24:9
-   |
-LL |     let _guard = bar();
-   |         ^^^^^^
-LL |     other().await;
-   |            ------ the value is held across this suspend point
-   |
-note: You gotta use Umm's, ya know?
-  --> $DIR/warn.rs:24:9
-   |
-LL |     let _guard = bar();
-   |         ^^^^^^
-help: consider using a block (`{ ... }`) to shrink the value's scope, ending before the suspend point
-  --> $DIR/warn.rs:24:9
-   |
-LL |     let _guard = bar();
-   |         ^^^^^^
-note: the lint level is defined here
-  --> $DIR/warn.rs:7:9
-   |
-LL | #![warn(must_not_suspend)]
-   |         ^^^^^^^^^^^^^^^^
-
-warning: 1 warning emitted
-
diff --git a/tests/ui/lint/noop-method-call.rs b/tests/ui/lint/noop-method-call.rs
index 89b29663595..dbcf2a5131b 100644
--- a/tests/ui/lint/noop-method-call.rs
+++ b/tests/ui/lint/noop-method-call.rs
@@ -19,18 +19,17 @@ fn main() {
     let clone_type_ref = &CloneType(1u32);
     let clone_type_ref_clone: CloneType<u32> = clone_type_ref.clone();
 
-    // Calling clone on a double reference doesn't warn since the method call itself
-    // peels the outer reference off
     let clone_type_ref = &&CloneType(1u32);
     let clone_type_ref_clone: &CloneType<u32> = clone_type_ref.clone();
+    //~^ WARNING using `.clone()` on a double reference, which returns `&CloneType<u32>`
 
     let non_deref_type = &PlainType(1u32);
     let non_deref_type_deref: &PlainType<u32> = non_deref_type.deref();
     //~^ WARNING call to `.deref()` on a reference in this situation does nothing
 
-    // Dereferencing a &&T does not warn since it has collapsed the double reference
     let non_deref_type = &&PlainType(1u32);
     let non_deref_type_deref: &PlainType<u32> = non_deref_type.deref();
+    //~^ WARNING using `.deref()` on a double reference, which returns `&PlainType<u32>`
 
     let non_borrow_type = &PlainType(1u32);
     let non_borrow_type_borrow: &PlainType<u32> = non_borrow_type.borrow();
@@ -41,7 +40,8 @@ fn main() {
     let non_borrow_type_borrow: &PlainType<u32> = non_borrow_type.borrow();
 
     let xs = ["a", "b", "c"];
-    let _v: Vec<&str> = xs.iter().map(|x| x.clone()).collect(); // ok, but could use `*x` instead
+    let _v: Vec<&str> = xs.iter().map(|x| x.clone()).collect(); // could use `*x` instead
+    //~^ WARNING using `.clone()` on a double reference, which returns `&str`
 }
 
 fn generic<T>(non_clone_type: &PlainType<T>) {
diff --git a/tests/ui/lint/noop-method-call.stderr b/tests/ui/lint/noop-method-call.stderr
index 6a904d01abc..37cd1a0fc18 100644
--- a/tests/ui/lint/noop-method-call.stderr
+++ b/tests/ui/lint/noop-method-call.stderr
@@ -11,22 +11,42 @@ note: the lint level is defined here
 LL | #![warn(noop_method_call)]
    |         ^^^^^^^^^^^^^^^^
 
+warning: using `.clone()` on a double reference, which returns `&CloneType<u32>` instead of cloning the inner type
+  --> $DIR/noop-method-call.rs:23:63
+   |
+LL |     let clone_type_ref_clone: &CloneType<u32> = clone_type_ref.clone();
+   |                                                               ^^^^^^^^
+   |
+   = note: `#[warn(suspicious_double_ref_op)]` on by default
+
 warning: call to `.deref()` on a reference in this situation does nothing
-  --> $DIR/noop-method-call.rs:28:63
+  --> $DIR/noop-method-call.rs:27:63
    |
 LL |     let non_deref_type_deref: &PlainType<u32> = non_deref_type.deref();
    |                                                               ^^^^^^^^ unnecessary method call
    |
    = note: the type `&PlainType<u32>` which `deref` is being called on is the same as the type returned from `deref`, so the method call does not do anything and can be removed
 
+warning: using `.deref()` on a double reference, which returns `&PlainType<u32>` instead of dereferencing the inner type
+  --> $DIR/noop-method-call.rs:31:63
+   |
+LL |     let non_deref_type_deref: &PlainType<u32> = non_deref_type.deref();
+   |                                                               ^^^^^^^^
+
 warning: call to `.borrow()` on a reference in this situation does nothing
-  --> $DIR/noop-method-call.rs:36:66
+  --> $DIR/noop-method-call.rs:35:66
    |
 LL |     let non_borrow_type_borrow: &PlainType<u32> = non_borrow_type.borrow();
    |                                                                  ^^^^^^^^^ unnecessary method call
    |
    = note: the type `&PlainType<u32>` which `borrow` is being called on is the same as the type returned from `borrow`, so the method call does not do anything and can be removed
 
+warning: using `.clone()` on a double reference, which returns `&str` instead of cloning the inner type
+  --> $DIR/noop-method-call.rs:43:44
+   |
+LL |     let _v: Vec<&str> = xs.iter().map(|x| x.clone()).collect(); // could use `*x` instead
+   |                                            ^^^^^^^^
+
 warning: call to `.clone()` on a reference in this situation does nothing
   --> $DIR/noop-method-call.rs:48:19
    |
@@ -43,5 +63,5 @@ LL |     non_clone_type.clone();
    |
    = note: the type `&PlainType<u32>` which `clone` is being called on is the same as the type returned from `clone`, so the method call does not do anything and can be removed
 
-warning: 5 warnings emitted
+warning: 8 warnings emitted
 
diff --git a/tests/ui/lint/suspicious-double-ref-op.rs b/tests/ui/lint/suspicious-double-ref-op.rs
new file mode 100644
index 00000000000..b9bcd31c2a8
--- /dev/null
+++ b/tests/ui/lint/suspicious-double-ref-op.rs
@@ -0,0 +1,30 @@
+#![feature(lazy_cell)]
+#![deny(suspicious_double_ref_op, noop_method_call)]
+
+pub fn clone_on_double_ref() {
+    let x = vec![1];
+    let y = &&x;
+    let z: &Vec<_> = y.clone();
+    //~^ ERROR using `.clone()` on a double reference, which returns `&Vec<i32>`
+
+    println!("{:p} {:p}", *y, z);
+}
+
+use std::sync::LazyLock;
+
+pub static STRS: LazyLock<&str> = LazyLock::new(|| "First");
+
+// https://github.com/rust-lang/rust-clippy/issues/9272
+fn rust_clippy_issue_9272() {
+    let str = STRS.clone();
+    println!("{str}")
+}
+
+fn check(mut encoded: &[u8]) {
+    let _ = &mut encoded.clone();
+    //~^ ERROR call to `.clone()` on a reference in this situation does nothing
+    let _ = &encoded.clone();
+    //~^ ERROR call to `.clone()` on a reference in this situation does nothing
+}
+
+fn main() {}
diff --git a/tests/ui/lint/suspicious-double-ref-op.stderr b/tests/ui/lint/suspicious-double-ref-op.stderr
new file mode 100644
index 00000000000..d15487ca238
--- /dev/null
+++ b/tests/ui/lint/suspicious-double-ref-op.stderr
@@ -0,0 +1,35 @@
+error: using `.clone()` on a double reference, which returns `&Vec<i32>` instead of cloning the inner type
+  --> $DIR/suspicious-double-ref-op.rs:7:23
+   |
+LL |     let z: &Vec<_> = y.clone();
+   |                       ^^^^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/suspicious-double-ref-op.rs:2:9
+   |
+LL | #![deny(suspicious_double_ref_op, noop_method_call)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: call to `.clone()` on a reference in this situation does nothing
+  --> $DIR/suspicious-double-ref-op.rs:24:25
+   |
+LL |     let _ = &mut encoded.clone();
+   |                         ^^^^^^^^ unnecessary method call
+   |
+   = note: the type `&[u8]` which `clone` is being called on is the same as the type returned from `clone`, so the method call does not do anything and can be removed
+note: the lint level is defined here
+  --> $DIR/suspicious-double-ref-op.rs:2:35
+   |
+LL | #![deny(suspicious_double_ref_op, noop_method_call)]
+   |                                   ^^^^^^^^^^^^^^^^
+
+error: call to `.clone()` on a reference in this situation does nothing
+  --> $DIR/suspicious-double-ref-op.rs:26:21
+   |
+LL |     let _ = &encoded.clone();
+   |                     ^^^^^^^^ unnecessary method call
+   |
+   = note: the type `&[u8]` which `clone` is being called on is the same as the type returned from `clone`, so the method call does not do anything and can be removed
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/lint/unaligned_references.stderr b/tests/ui/lint/unaligned_references.stderr
index 775dcac678e..5f9cecadbff 100644
--- a/tests/ui/lint/unaligned_references.stderr
+++ b/tests/ui/lint/unaligned_references.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |             &self.x;
    |             ^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -13,7 +14,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = &good.ptr;
    |                 ^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -22,7 +24,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = &good.data;
    |                 ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -31,7 +34,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = &good.data as *const _;
    |                 ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -40,7 +44,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _: *const _ = &good.data;
    |                           ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -49,7 +54,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = good.data.clone();
    |                 ^^^^^^^^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -58,7 +64,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = &good.data2[0];
    |                 ^^^^^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -67,7 +74,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ = &packed2.x;
    |                 ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -76,7 +84,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ref = &m1.1.a;
    |                    ^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -85,7 +94,8 @@ error[E0793]: reference to packed field is unaligned
 LL |         let _ref = &m2.1.a;
    |                    ^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error: aborting due to 10 previous errors
diff --git a/tests/ui/lint/unaligned_references_external_macro.stderr b/tests/ui/lint/unaligned_references_external_macro.stderr
index 5b08f433e32..94a95c1d8fd 100644
--- a/tests/ui/lint/unaligned_references_external_macro.stderr
+++ b/tests/ui/lint/unaligned_references_external_macro.stderr
@@ -9,7 +9,8 @@ LL | |     }
 LL | | }
    | |_^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
    = note: this error originates in the macro `unaligned_references_external_crate::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/issues/issue-2804-2.rs b/tests/ui/macros/issue-2804-2.rs
index d02725505ac..d02725505ac 100644
--- a/tests/ui/issues/issue-2804-2.rs
+++ b/tests/ui/macros/issue-2804-2.rs
diff --git a/tests/ui/macros/stringify.rs b/tests/ui/macros/stringify.rs
index 79d8cd75716..816f99baa84 100644
--- a/tests/ui/macros/stringify.rs
+++ b/tests/ui/macros/stringify.rs
@@ -134,8 +134,7 @@ fn test_expr() {
     assert_eq!(stringify_expr!(expr as T<u8>), "expr as T<u8>");
 
     // ExprKind::Type
-    assert_eq!(stringify_expr!(expr: T), "expr: T");
-    assert_eq!(stringify_expr!(expr: T<u8>), "expr: T<u8>");
+    // There is no syntax for type ascription.
 
     // ExprKind::If
     assert_eq!(stringify_expr!(if true {}), "if true {}");
diff --git a/tests/ui/match/guards-parenthesized-and.rs b/tests/ui/match/guards-parenthesized-and.rs
new file mode 100644
index 00000000000..3a1c341f3ee
--- /dev/null
+++ b/tests/ui/match/guards-parenthesized-and.rs
@@ -0,0 +1,10 @@
+// check-pass
+
+fn main() {
+    let c = 1;
+    let w = "T";
+    match Some(5) {
+        None if c == 1 && (w != "Y" && w != "E") => {}
+        _ => panic!(),
+    }
+}
diff --git a/tests/ui/methods/method-self-arg-1.stderr b/tests/ui/methods/method-self-arg-1.stderr
index 9241a8be58f..dcc21acc5c0 100644
--- a/tests/ui/methods/method-self-arg-1.stderr
+++ b/tests/ui/methods/method-self-arg-1.stderr
@@ -2,10 +2,8 @@ error[E0308]: mismatched types
   --> $DIR/method-self-arg-1.rs:11:14
    |
 LL |     Foo::bar(x);
-   |     -------- ^
-   |     |        |
-   |     |        expected `&Foo`, found `Foo`
-   |     |        help: consider borrowing here: `&x`
+   |     -------- ^ expected `&Foo`, found `Foo`
+   |     |
    |     arguments to this function are incorrect
    |
 note: method defined here
@@ -13,6 +11,10 @@ note: method defined here
    |
 LL |     fn bar(&self) {}
    |        ^^^ -----
+help: consider borrowing here
+   |
+LL |     Foo::bar(&x);
+   |              +
 
 error[E0308]: mismatched types
   --> $DIR/method-self-arg-1.rs:13:14
diff --git a/tests/ui/mismatched_types/dont-point-return-on-E0308.stderr b/tests/ui/mismatched_types/dont-point-return-on-E0308.stderr
index 13942682d28..7be94ef4ad6 100644
--- a/tests/ui/mismatched_types/dont-point-return-on-E0308.stderr
+++ b/tests/ui/mismatched_types/dont-point-return-on-E0308.stderr
@@ -2,10 +2,8 @@ error[E0308]: mismatched types
   --> $DIR/dont-point-return-on-E0308.rs:11:11
    |
 LL |         f(());
-   |         - ^^
-   |         | |
-   |         | expected `&()`, found `()`
-   |         | help: consider borrowing here: `&()`
+   |         - ^^ expected `&()`, found `()`
+   |         |
    |         arguments to this function are incorrect
    |
 note: function defined here
@@ -13,6 +11,10 @@ note: function defined here
    |
 LL | async fn f(_: &()) {}
    |          ^ ------
+help: consider borrowing here
+   |
+LL |         f(&());
+   |           +
 
 error: aborting due to previous error
 
diff --git a/tests/ui/mut/mut-cross-borrowing.stderr b/tests/ui/mut/mut-cross-borrowing.stderr
index 8401827e51f..8a3076db9b2 100644
--- a/tests/ui/mut/mut-cross-borrowing.stderr
+++ b/tests/ui/mut/mut-cross-borrowing.stderr
@@ -2,10 +2,8 @@ error[E0308]: mismatched types
   --> $DIR/mut-cross-borrowing.rs:7:7
    |
 LL |     f(x)
-   |     - ^
-   |     | |
-   |     | expected `&mut isize`, found `Box<{integer}>`
-   |     | help: consider mutably borrowing here: `&mut x`
+   |     - ^ expected `&mut isize`, found `Box<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected mutable reference `&mut isize`
@@ -15,6 +13,10 @@ note: function defined here
    |
 LL | fn f(_: &mut isize) {}
    |    ^ -------------
+help: consider mutably borrowing here
+   |
+LL |     f(&mut x)
+   |       ++++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs b/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs
new file mode 100644
index 00000000000..19b9a17705b
--- /dev/null
+++ b/tests/ui/native-library-link-flags/msvc-non-utf8-output.rs
@@ -0,0 +1,5 @@
+// build-fail
+// compile-flags:-C link-arg=⦺ⅈ⽯⭏⽽◃⡽⚞
+// only-msvc
+// normalize-stderr-test "(?:.|\n)*(⦺ⅈ⽯⭏⽽◃⡽⚞)(?:.|\n)*" -> "$1"
+pub fn main() {}
diff --git a/tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr b/tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr
new file mode 100644
index 00000000000..7f3ef376447
--- /dev/null
+++ b/tests/ui/native-library-link-flags/msvc-non-utf8-output.stderr
@@ -0,0 +1 @@
+⦺ⅈ⽯⭏⽽◃⡽⚞
\ No newline at end of file
diff --git a/tests/ui/issues/issue-30438-a.rs b/tests/ui/nll/issue-30438-a.rs
index 0d4eb796ad9..0d4eb796ad9 100644
--- a/tests/ui/issues/issue-30438-a.rs
+++ b/tests/ui/nll/issue-30438-a.rs
diff --git a/tests/ui/issues/issue-30438-a.stderr b/tests/ui/nll/issue-30438-a.stderr
index 53845af82fb..53845af82fb 100644
--- a/tests/ui/issues/issue-30438-a.stderr
+++ b/tests/ui/nll/issue-30438-a.stderr
diff --git a/tests/ui/issues/issue-30438-b.rs b/tests/ui/nll/issue-30438-b.rs
index 79510cdb663..79510cdb663 100644
--- a/tests/ui/issues/issue-30438-b.rs
+++ b/tests/ui/nll/issue-30438-b.rs
diff --git a/tests/ui/issues/issue-30438-b.stderr b/tests/ui/nll/issue-30438-b.stderr
index fd6bd25b1da..fd6bd25b1da 100644
--- a/tests/ui/issues/issue-30438-b.stderr
+++ b/tests/ui/nll/issue-30438-b.stderr
diff --git a/tests/ui/issues/issue-30438-c.rs b/tests/ui/nll/issue-30438-c.rs
index 813c1d3e2cc..813c1d3e2cc 100644
--- a/tests/ui/issues/issue-30438-c.rs
+++ b/tests/ui/nll/issue-30438-c.rs
diff --git a/tests/ui/issues/issue-30438-c.stderr b/tests/ui/nll/issue-30438-c.stderr
index 7c001088097..7c001088097 100644
--- a/tests/ui/issues/issue-30438-c.stderr
+++ b/tests/ui/nll/issue-30438-c.stderr
diff --git a/tests/ui/nll/issue-47388.stderr b/tests/ui/nll/issue-47388.stderr
index c780451dfa9..09b9d638afb 100644
--- a/tests/ui/nll/issue-47388.stderr
+++ b/tests/ui/nll/issue-47388.stderr
@@ -7,7 +7,7 @@ LL |     fancy_ref.num = 6;
 help: consider changing this to be a mutable reference
    |
 LL |     let fancy_ref = &mut (&mut fancy);
-   |                     ~~~~~~~~~~~~~~~~~
+   |                      +++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/nll/issue-51244.stderr b/tests/ui/nll/issue-51244.stderr
index 03d8acc8188..8ccb5809e39 100644
--- a/tests/ui/nll/issue-51244.stderr
+++ b/tests/ui/nll/issue-51244.stderr
@@ -7,7 +7,7 @@ LL |     *my_ref = 0;
 help: consider changing this to be a mutable reference
    |
 LL |     let ref mut my_ref @ _ = 0;
-   |         ~~~~~~~~~~~~~~
+   |             +++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/issues/issue-54302-cases.rs b/tests/ui/nll/issue-54302-cases.rs
index faa116269ee..faa116269ee 100644
--- a/tests/ui/issues/issue-54302-cases.rs
+++ b/tests/ui/nll/issue-54302-cases.rs
diff --git a/tests/ui/issues/issue-54302-cases.stderr b/tests/ui/nll/issue-54302-cases.stderr
index 6e8b69c4bee..6e8b69c4bee 100644
--- a/tests/ui/issues/issue-54302-cases.stderr
+++ b/tests/ui/nll/issue-54302-cases.stderr
diff --git a/tests/ui/issues/issue-54302.rs b/tests/ui/nll/issue-54302.rs
index 1bfaebc3895..1bfaebc3895 100644
--- a/tests/ui/issues/issue-54302.rs
+++ b/tests/ui/nll/issue-54302.rs
diff --git a/tests/ui/issues/issue-54302.stderr b/tests/ui/nll/issue-54302.stderr
index 26c46571f9c..26c46571f9c 100644
--- a/tests/ui/issues/issue-54302.stderr
+++ b/tests/ui/nll/issue-54302.stderr
diff --git a/tests/ui/nll/issue-57989.stderr b/tests/ui/nll/issue-57989.stderr
index d5effd6f346..6062b31d688 100644
--- a/tests/ui/nll/issue-57989.stderr
+++ b/tests/ui/nll/issue-57989.stderr
@@ -7,7 +7,7 @@ LL |     *x = 0;
 help: consider changing this to be a mutable reference
    |
 LL | fn f(x: &mut i32) {
-   |         ~~~~~~~~
+   |          +++
 
 error[E0506]: cannot assign to `*x` because it is borrowed
   --> $DIR/issue-57989.rs:5:5
diff --git a/tests/ui/not-panic/not-panic-safe-2.stderr b/tests/ui/not-panic/not-panic-safe-2.stderr
index 3b0f83b3b9a..0c399f15a25 100644
--- a/tests/ui/not-panic/not-panic-safe-2.stderr
+++ b/tests/ui/not-panic/not-panic-safe-2.stderr
@@ -5,7 +5,8 @@ LL |     assert::<Rc<RefCell<i32>>>();
    |              ^^^^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
    |
    = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>`
-   = note: required because it appears within the type `RefCell<i32>`
+note: required because it appears within the type `RefCell<i32>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
    = note: required for `Rc<RefCell<i32>>` to implement `UnwindSafe`
 note: required by a bound in `assert`
   --> $DIR/not-panic-safe-2.rs:7:14
@@ -20,8 +21,10 @@ LL |     assert::<Rc<RefCell<i32>>>();
    |              ^^^^^^^^^^^^^^^^ `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
    |
    = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<isize>`
-   = note: required because it appears within the type `Cell<isize>`
-   = note: required because it appears within the type `RefCell<i32>`
+note: required because it appears within the type `Cell<isize>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
+note: required because it appears within the type `RefCell<i32>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
    = note: required for `Rc<RefCell<i32>>` to implement `UnwindSafe`
 note: required by a bound in `assert`
   --> $DIR/not-panic-safe-2.rs:7:14
diff --git a/tests/ui/not-panic/not-panic-safe-3.stderr b/tests/ui/not-panic/not-panic-safe-3.stderr
index 9e9a12764a4..53028d6a337 100644
--- a/tests/ui/not-panic/not-panic-safe-3.stderr
+++ b/tests/ui/not-panic/not-panic-safe-3.stderr
@@ -5,7 +5,8 @@ LL |     assert::<Arc<RefCell<i32>>>();
    |              ^^^^^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
    |
    = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>`
-   = note: required because it appears within the type `RefCell<i32>`
+note: required because it appears within the type `RefCell<i32>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
    = note: required for `Arc<RefCell<i32>>` to implement `UnwindSafe`
 note: required by a bound in `assert`
   --> $DIR/not-panic-safe-3.rs:7:14
@@ -20,8 +21,10 @@ LL |     assert::<Arc<RefCell<i32>>>();
    |              ^^^^^^^^^^^^^^^^^ `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
    |
    = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<isize>`
-   = note: required because it appears within the type `Cell<isize>`
-   = note: required because it appears within the type `RefCell<i32>`
+note: required because it appears within the type `Cell<isize>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
+note: required because it appears within the type `RefCell<i32>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
    = note: required for `Arc<RefCell<i32>>` to implement `UnwindSafe`
 note: required by a bound in `assert`
   --> $DIR/not-panic-safe-3.rs:7:14
diff --git a/tests/ui/not-panic/not-panic-safe-4.stderr b/tests/ui/not-panic/not-panic-safe-4.stderr
index 9428c125651..b1361cfd87e 100644
--- a/tests/ui/not-panic/not-panic-safe-4.stderr
+++ b/tests/ui/not-panic/not-panic-safe-4.stderr
@@ -5,7 +5,8 @@ LL |     assert::<&RefCell<i32>>();
    |              ^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
    |
    = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>`
-   = note: required because it appears within the type `RefCell<i32>`
+note: required because it appears within the type `RefCell<i32>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
    = note: required for `&RefCell<i32>` to implement `UnwindSafe`
 note: required by a bound in `assert`
   --> $DIR/not-panic-safe-4.rs:6:14
@@ -25,8 +26,10 @@ LL |     assert::<&RefCell<i32>>();
    |              ^^^^^^^^^^^^^ `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
    |
    = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<isize>`
-   = note: required because it appears within the type `Cell<isize>`
-   = note: required because it appears within the type `RefCell<i32>`
+note: required because it appears within the type `Cell<isize>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
+note: required because it appears within the type `RefCell<i32>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
    = note: required for `&RefCell<i32>` to implement `UnwindSafe`
 note: required by a bound in `assert`
   --> $DIR/not-panic-safe-4.rs:6:14
diff --git a/tests/ui/not-panic/not-panic-safe-6.stderr b/tests/ui/not-panic/not-panic-safe-6.stderr
index 7986e341eb0..47f28257409 100644
--- a/tests/ui/not-panic/not-panic-safe-6.stderr
+++ b/tests/ui/not-panic/not-panic-safe-6.stderr
@@ -5,7 +5,8 @@ LL |     assert::<*mut RefCell<i32>>();
    |              ^^^^^^^^^^^^^^^^^ `UnsafeCell<i32>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
    |
    = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<i32>`
-   = note: required because it appears within the type `RefCell<i32>`
+note: required because it appears within the type `RefCell<i32>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
    = note: required for `*mut RefCell<i32>` to implement `UnwindSafe`
 note: required by a bound in `assert`
   --> $DIR/not-panic-safe-6.rs:6:14
@@ -20,8 +21,10 @@ LL |     assert::<*mut RefCell<i32>>();
    |              ^^^^^^^^^^^^^^^^^ `UnsafeCell<isize>` may contain interior mutability and a reference may not be safely transferrable across a catch_unwind boundary
    |
    = help: within `RefCell<i32>`, the trait `RefUnwindSafe` is not implemented for `UnsafeCell<isize>`
-   = note: required because it appears within the type `Cell<isize>`
-   = note: required because it appears within the type `RefCell<i32>`
+note: required because it appears within the type `Cell<isize>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
+note: required because it appears within the type `RefCell<i32>`
+  --> $SRC_DIR/core/src/cell.rs:LL:COL
    = note: required for `*mut RefCell<i32>` to implement `UnwindSafe`
 note: required by a bound in `assert`
   --> $DIR/not-panic-safe-6.rs:6:14
diff --git a/tests/ui/offset-of/offset-of-arg-count.rs b/tests/ui/offset-of/offset-of-arg-count.rs
index 163b07454ec..5e66e33f8a2 100644
--- a/tests/ui/offset-of/offset-of-arg-count.rs
+++ b/tests/ui/offset-of/offset-of-arg-count.rs
@@ -3,7 +3,15 @@
 use std::mem::offset_of;
 
 fn main() {
-    offset_of!(NotEnoughArguments); //~ ERROR expected one of
-    offset_of!(NotEnoughArgumentsWithAComma, ); //~ ERROR expected 2 arguments
-    offset_of!(Container, field, too many arguments); //~ ERROR expected 2 arguments
+    offset_of!(NotEnoughArguments); //~ ERROR unexpected end of macro invocation
+    offset_of!(NotEnoughArgumentsWithAComma, ); //~ ERROR unexpected end of macro invocation
+    offset_of!(Container, field, too many arguments); //~ ERROR no rules expected the token `too`
+    offset_of!(S, f); // compiles fine
+    offset_of!(S, f,); // also compiles fine
+    offset_of!(S, f.); //~ ERROR unexpected end of macro invocation
+    offset_of!(S, f.,); //~ ERROR expected identifier
+    offset_of!(S, f..); //~ ERROR no rules expected the token
+    offset_of!(S, f..,); //~ ERROR no rules expected the token
 }
+
+struct S { f: u8, }
diff --git a/tests/ui/offset-of/offset-of-arg-count.stderr b/tests/ui/offset-of/offset-of-arg-count.stderr
index ebecc982c51..4275a89545f 100644
--- a/tests/ui/offset-of/offset-of-arg-count.stderr
+++ b/tests/ui/offset-of/offset-of-arg-count.stderr
@@ -1,20 +1,59 @@
-error: expected one of `!`, `(`, `+`, `,`, `::`, or `<`, found `<eof>`
-  --> $DIR/offset-of-arg-count.rs:6:16
+error: unexpected end of macro invocation
+  --> $DIR/offset-of-arg-count.rs:6:34
    |
 LL |     offset_of!(NotEnoughArguments);
-   |                ^^^^^^^^^^^^^^^^^^ expected one of `!`, `(`, `+`, `,`, `::`, or `<`
+   |                                  ^ missing tokens in macro arguments
+   |
+note: while trying to match `,`
+  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
 
-error: expected 2 arguments
-  --> $DIR/offset-of-arg-count.rs:7:5
+error: unexpected end of macro invocation
+  --> $DIR/offset-of-arg-count.rs:7:45
    |
 LL |     offset_of!(NotEnoughArgumentsWithAComma, );
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                             ^ missing tokens in macro arguments
+   |
+note: while trying to match meta-variable `$fields:tt`
+  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
 
-error: expected 2 arguments
-  --> $DIR/offset-of-arg-count.rs:8:5
+error: no rules expected the token `too`
+  --> $DIR/offset-of-arg-count.rs:8:34
    |
 LL |     offset_of!(Container, field, too many arguments);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                  ^^^ no rules expected this token in macro call
+   |
+   = note: while trying to match sequence end
+
+error: unexpected end of macro invocation
+  --> $DIR/offset-of-arg-count.rs:11:21
+   |
+LL |     offset_of!(S, f.);
+   |                     ^ missing tokens in macro arguments
+   |
+note: while trying to match meta-variable `$fields:tt`
+  --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
+
+error: expected identifier, found `,`
+  --> $DIR/offset-of-arg-count.rs:12:21
+   |
+LL |     offset_of!(S, f.,);
+   |                     ^ expected identifier
+
+error: no rules expected the token `..`
+  --> $DIR/offset-of-arg-count.rs:13:20
+   |
+LL |     offset_of!(S, f..);
+   |                    ^^ no rules expected this token in macro call
+   |
+   = note: while trying to match sequence start
+
+error: no rules expected the token `..`
+  --> $DIR/offset-of-arg-count.rs:14:20
+   |
+LL |     offset_of!(S, f..,);
+   |                    ^^ no rules expected this token in macro call
+   |
+   = note: while trying to match sequence start
 
-error: aborting due to 3 previous errors
+error: aborting due to 7 previous errors
 
diff --git a/tests/ui/offset-of/offset-of-builtin.rs b/tests/ui/offset-of/offset-of-builtin.rs
new file mode 100644
index 00000000000..1be9899887b
--- /dev/null
+++ b/tests/ui/offset-of/offset-of-builtin.rs
@@ -0,0 +1,44 @@
+#![feature(builtin_syntax)]
+
+// For the exposed macro we already test these errors in the other files,
+// but this test helps to make sure the builtin construct also errors.
+// This has the same examples as offset-of-arg-count.rs
+
+fn main() {
+    builtin # offset_of(NotEnoughArguments); //~ ERROR expected one of
+}
+fn t1() {
+    // Already errored upon at the macro level. Yielding an error would require
+    // extra effort.
+    builtin # offset_of(NotEnoughArgumentsWithAComma, );
+}
+fn t2() {
+    builtin # offset_of(Container, field, too many arguments); //~ ERROR expected identifier, found
+    //~| ERROR found `,`
+    //~| ERROR found `many`
+    //~| ERROR found `arguments`
+}
+fn t3() {
+    builtin # offset_of(S, f); // compiles fine
+}
+fn t4() {
+    // Already errored upon at the macro level. Yielding an error would require
+    // extra effort.
+    builtin # offset_of(S, f);
+}
+fn t5() {
+    builtin # offset_of(S, f.); //~ ERROR expected identifier
+}
+fn t6() {
+    builtin # offset_of(S, f.,); //~ ERROR expected identifier
+}
+fn t7() {
+    builtin # offset_of(S, f..); //~ ERROR expected one of
+}
+fn t8() {
+    // Already errored upon at the macro level. Yielding an error would require
+    // extra effort.
+    builtin # offset_of(S, f..,);
+}
+
+struct S { f: u8, }
diff --git a/tests/ui/offset-of/offset-of-builtin.stderr b/tests/ui/offset-of/offset-of-builtin.stderr
new file mode 100644
index 00000000000..1a1f33cc613
--- /dev/null
+++ b/tests/ui/offset-of/offset-of-builtin.stderr
@@ -0,0 +1,65 @@
+error: expected one of `!`, `(`, `+`, `,`, `::`, or `<`, found `)`
+  --> $DIR/offset-of-builtin.rs:8:43
+   |
+LL |     builtin # offset_of(NotEnoughArguments);
+   |                                           ^ expected one of `!`, `(`, `+`, `,`, `::`, or `<`
+
+error: expected identifier, found `,`
+  --> $DIR/offset-of-builtin.rs:16:41
+   |
+LL |     builtin # offset_of(Container, field, too many arguments);
+   |                                         ^
+   |                                         |
+   |                                         expected identifier
+   |                                         help: remove this comma
+
+error: expected one of `)` or `.`, found `,`
+  --> $DIR/offset-of-builtin.rs:16:41
+   |
+LL |     builtin # offset_of(Container, field, too many arguments);
+   |                                         ^
+   |                                         |
+   |                                         expected one of `)` or `.`
+   |                                         help: missing `.`
+
+error: expected one of `)` or `.`, found `many`
+  --> $DIR/offset-of-builtin.rs:16:47
+   |
+LL |     builtin # offset_of(Container, field, too many arguments);
+   |                                              -^^^^ expected one of `)` or `.`
+   |                                              |
+   |                                              help: missing `.`
+
+error: expected one of `)` or `.`, found `arguments`
+  --> $DIR/offset-of-builtin.rs:16:52
+   |
+LL |     builtin # offset_of(Container, field, too many arguments);
+   |                                                   -^^^^^^^^^ expected one of `)` or `.`
+   |                                                   |
+   |                                                   help: missing `.`
+
+error: expected identifier, found `)`
+  --> $DIR/offset-of-builtin.rs:30:30
+   |
+LL |     builtin # offset_of(S, f.);
+   |                              ^ expected identifier
+
+error: expected identifier, found `,`
+  --> $DIR/offset-of-builtin.rs:33:30
+   |
+LL |     builtin # offset_of(S, f.,);
+   |                              ^ expected identifier
+
+error: expected one of `)` or `.`, found `..`
+  --> $DIR/offset-of-builtin.rs:36:29
+   |
+LL |     builtin # offset_of(S, f..);
+   |                             ^^ expected one of `)` or `.`
+   |
+help: if you meant to bind the contents of the rest of the array pattern into `f`, use `@`
+   |
+LL |     builtin # offset_of(S, f @ ..);
+   |                              +
+
+error: aborting due to 8 previous errors
+
diff --git a/tests/ui/offset-of/offset-of-dst-field.stderr b/tests/ui/offset-of/offset-of-dst-field.stderr
index 8e88015b07a..e6e0f499236 100644
--- a/tests/ui/offset-of/offset-of-dst-field.stderr
+++ b/tests/ui/offset-of/offset-of-dst-field.stderr
@@ -5,6 +5,7 @@ LL |     offset_of!(Alpha, z);
    |     ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `[u8]`
+   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
   --> $DIR/offset-of-dst-field.rs:31:5
@@ -13,6 +14,7 @@ LL |     offset_of!(Beta, z);
    |     ^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `(dyn Trait + 'static)`
+   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0277]: the size for values of type `Extern` cannot be known at compilation time
   --> $DIR/offset-of-dst-field.rs:32:5
@@ -21,6 +23,7 @@ LL |     offset_of!(Gamma, z);
    |     ^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `Extern`
+   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/offset-of/offset-of-unstable.stderr b/tests/ui/offset-of/offset-of-unstable.stderr
index 25811a061d7..c39882519a5 100644
--- a/tests/ui/offset-of/offset-of-unstable.stderr
+++ b/tests/ui/offset-of/offset-of-unstable.stderr
@@ -33,6 +33,7 @@ LL | |     );
    | |_____^
    |
    = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable
+   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0658]: use of unstable library feature 'unstable_test_feature'
   --> $DIR/offset-of-unstable.rs:18:5
@@ -41,6 +42,7 @@ LL |     offset_of!(StableWithUnstableField, unstable);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable
+   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0658]: use of unstable library feature 'unstable_test_feature'
   --> $DIR/offset-of-unstable.rs:20:5
@@ -49,6 +51,7 @@ LL |     offset_of!(StableWithUnstableFieldType, stable.unstable);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable
+   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0658]: use of unstable library feature 'unstable_test_feature'
   --> $DIR/offset-of-unstable.rs:21:5
@@ -61,6 +64,7 @@ LL | |     );
    | |_____^
    |
    = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable
+   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error[E0658]: use of unstable library feature 'unstable_test_feature'
   --> $DIR/offset-of-unstable.rs:26:5
@@ -73,6 +77,7 @@ LL | |     );
    | |_____^
    |
    = help: add `#![feature(unstable_test_feature)]` to the crate attributes to enable
+   = note: this error originates in the macro `offset_of` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/optimization-remark.rs b/tests/ui/optimization-remark.rs
index 4f651b1dcbc..8fd30466f43 100644
--- a/tests/ui/optimization-remark.rs
+++ b/tests/ui/optimization-remark.rs
@@ -13,7 +13,7 @@
 // [merge1] compile-flags: -Cremark=all    -Cremark=giraffe
 // [merge2] compile-flags: -Cremark=inline -Cremark=giraffe
 //
-// error-pattern: inline: 'f' not inlined into 'g'
+// error-pattern: inline (missed): 'f' not inlined into 'g'
 // dont-check-compiler-stderr
 
 #[no_mangle]
diff --git a/tests/ui/or-patterns/or-patterns-syntactic-fail.rs b/tests/ui/or-patterns/or-patterns-syntactic-fail.rs
index 358e9d034c4..23dbb57cbcf 100644
--- a/tests/ui/or-patterns/or-patterns-syntactic-fail.rs
+++ b/tests/ui/or-patterns/or-patterns-syntactic-fail.rs
@@ -8,9 +8,12 @@ use E::*;
 
 fn no_top_level_or_patterns() {
     // We do *not* allow or-patterns at the top level of lambdas...
-    let _ = |A | B: E| (); //~ ERROR no implementation for `E | ()`
+    let _ = |A | B: E| ();
+                           //~^ ERROR expected identifier, found
     //           -------- This looks like an or-pattern but is in fact `|A| (B: E | ())`.
+}
 
+fn no_top_level_or_patterns_2() {
     // ...and for now neither do we allow or-patterns at the top level of functions.
     fn fun1(A | B: E) {}
     //~^ ERROR top-level or-patterns are not allowed
diff --git a/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr b/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr
index 604bba417e6..c16a90368e1 100644
--- a/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr
+++ b/tests/ui/or-patterns/or-patterns-syntactic-fail.stderr
@@ -1,43 +1,34 @@
+error: expected identifier, found `:`
+  --> $DIR/or-patterns-syntactic-fail.rs:11:19
+   |
+LL |     let _ = |A | B: E| ();
+   |                   ^ expected identifier
+   |
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
+
 error: top-level or-patterns are not allowed in function parameters
-  --> $DIR/or-patterns-syntactic-fail.rs:15:13
+  --> $DIR/or-patterns-syntactic-fail.rs:18:13
    |
 LL |     fn fun1(A | B: E) {}
    |             ^^^^^ help: wrap the pattern in parentheses: `(A | B)`
 
 error: top-level or-patterns are not allowed in function parameters
-  --> $DIR/or-patterns-syntactic-fail.rs:18:13
+  --> $DIR/or-patterns-syntactic-fail.rs:21:13
    |
 LL |     fn fun2(| A | B: E) {}
    |             ^^^^^^^ help: wrap the pattern in parentheses: `(A | B)`
 
 error: top-level or-patterns are not allowed in `let` bindings
-  --> $DIR/or-patterns-syntactic-fail.rs:23:9
+  --> $DIR/or-patterns-syntactic-fail.rs:26:9
    |
 LL |     let A | B: E = A;
    |         ^^^^^ help: wrap the pattern in parentheses: `(A | B)`
 
 error: top-level or-patterns are not allowed in `let` bindings
-  --> $DIR/or-patterns-syntactic-fail.rs:26:9
+  --> $DIR/or-patterns-syntactic-fail.rs:29:9
    |
 LL |     let | A | B: E = A;
    |         ^^^^^^^ help: wrap the pattern in parentheses: `(A | B)`
 
-error[E0369]: no implementation for `E | ()`
-  --> $DIR/or-patterns-syntactic-fail.rs:11:22
-   |
-LL |     let _ = |A | B: E| ();
-   |                  ----^ -- ()
-   |                  |
-   |                  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<()>`
-note: the trait `BitOr` must be implemented
-  --> $SRC_DIR/core/src/ops/bit.rs:LL:COL
-
 error: aborting due to 5 previous errors
 
-For more information about this error, try `rustc --explain E0369`.
diff --git a/tests/ui/packed/issue-27060.stderr b/tests/ui/packed/issue-27060.stderr
index b4753284f72..4dc31a28386 100644
--- a/tests/ui/packed/issue-27060.stderr
+++ b/tests/ui/packed/issue-27060.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _ = &good.data;
    |             ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -13,7 +14,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _ = &good.data2[0];
    |             ^^^^^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -22,7 +24,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _ = &good.data;
    |             ^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -31,7 +34,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let _ = &good.data2[0];
    |             ^^^^^^^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error: aborting due to 4 previous errors
diff --git a/tests/ui/packed/packed-struct-borrow-element-64bit.stderr b/tests/ui/packed/packed-struct-borrow-element-64bit.stderr
index 32943b0f07b..57630a4b470 100644
--- a/tests/ui/packed/packed-struct-borrow-element-64bit.stderr
+++ b/tests/ui/packed/packed-struct-borrow-element-64bit.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let brw = &foo.baz;
    |               ^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error: aborting due to previous error
diff --git a/tests/ui/packed/packed-struct-borrow-element.stderr b/tests/ui/packed/packed-struct-borrow-element.stderr
index 29d867fc5b9..c1f749d6fbb 100644
--- a/tests/ui/packed/packed-struct-borrow-element.stderr
+++ b/tests/ui/packed/packed-struct-borrow-element.stderr
@@ -4,7 +4,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let brw = &foo.baz;
    |               ^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error[E0793]: reference to packed field is unaligned
@@ -13,7 +14,8 @@ error[E0793]: reference to packed field is unaligned
 LL |     let brw = &foo.baz;
    |               ^^^^^^^^
    |
-   = note: fields of packed structs are not properly aligned, and creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
+   = note: packed structs are only aligned by one byte, and many modern architectures penalize unaligned field accesses
+   = note: creating a misaligned reference is undefined behavior (even if that reference is never dereferenced)
    = help: copy the field contents to a local variable, or replace the reference with a raw pointer and use `read_unaligned`/`write_unaligned` (loads and stores via `*p` must be properly aligned even when using raw pointers)
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/panic-runtime/auxiliary/needs-unwind.rs b/tests/ui/panic-runtime/auxiliary/needs-unwind.rs
index d555b531986..ba917b52d9a 100644
--- a/tests/ui/panic-runtime/auxiliary/needs-unwind.rs
+++ b/tests/ui/panic-runtime/auxiliary/needs-unwind.rs
@@ -3,7 +3,6 @@
 
 #![crate_type = "rlib"]
 #![no_std]
-#![feature(c_unwind)]
 
 extern "C-unwind" fn foo() {}
 
diff --git a/tests/ui/panics/default-backtrace-ice.rs b/tests/ui/panics/default-backtrace-ice.rs
index fd86a3f9dfa..b40203c339d 100644
--- a/tests/ui/panics/default-backtrace-ice.rs
+++ b/tests/ui/panics/default-backtrace-ice.rs
@@ -2,8 +2,20 @@
 // compile-flags:-Z treat-err-as-bug=1
 // error-pattern:stack backtrace:
 // failure-status:101
+// ignore-msvc
 // normalize-stderr-test "note: .*" -> ""
 // normalize-stderr-test "thread 'rustc' .*" -> ""
-// normalize-stderr-test "  .*\n" -> ""
+// normalize-stderr-test " +\d+:.*__rust_begin_short_backtrace.*" -> "(begin_short_backtrace)"
+// normalize-stderr-test " +\d+:.*__rust_end_short_backtrace.*" -> "(end_short_backtrace)"
+// normalize-stderr-test " +\d+:.*\n" -> ""
+// normalize-stderr-test " +at .*\n" -> ""
+//
+// This test makes sure that full backtraces are used for ICEs when
+// RUST_BACKTRACE is not set. It does this by checking for the presence of
+// `__rust_{begin,end}_short_backtrace` markers, which only appear in full
+// backtraces. The rest of the backtrace is filtered out.
+//
+// Ignored on msvc becaue the `__rust_{begin,end}_short_backtrace` symbols
+// aren't reliable.
 
 fn main() { missing_ident; }
diff --git a/tests/ui/panics/default-backtrace-ice.stderr b/tests/ui/panics/default-backtrace-ice.stderr
index 4bd4780e25f..ddbfc4e7f3a 100644
--- a/tests/ui/panics/default-backtrace-ice.stderr
+++ b/tests/ui/panics/default-backtrace-ice.stderr
@@ -1,8 +1,13 @@
 error[E0425]: cannot find value `missing_ident` in this scope
+  --> $DIR/default-backtrace-ice.rs:21:13
+   |
 LL | fn main() { missing_ident; }
+   |             ^^^^^^^^^^^^^ not found in this scope
 
 
 stack backtrace:
+(end_short_backtrace)
+(begin_short_backtrace)
 
 error: the compiler unexpectedly panicked. this is a bug.
 
diff --git a/tests/ui/parser/attr-stmt-expr-attr-bad.rs b/tests/ui/parser/attr-stmt-expr-attr-bad.rs
index c94a32146b9..d1950087c4c 100644
--- a/tests/ui/parser/attr-stmt-expr-attr-bad.rs
+++ b/tests/ui/parser/attr-stmt-expr-attr-bad.rs
@@ -6,6 +6,7 @@ fn main() {}
 //~^ ERROR expected one of
 #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); }
 //~^ ERROR an inner attribute is not permitted in this context
+//~| ERROR an inner attribute is not permitted in this context
 //~| ERROR expected expression, found `)`
 #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); }
 //~^ ERROR an inner attribute is not permitted in this context
diff --git a/tests/ui/parser/attr-stmt-expr-attr-bad.stderr b/tests/ui/parser/attr-stmt-expr-attr-bad.stderr
index a857f11fd18..96899fd3fc5 100644
--- a/tests/ui/parser/attr-stmt-expr-attr-bad.stderr
+++ b/tests/ui/parser/attr-stmt-expr-attr-bad.stderr
@@ -19,6 +19,15 @@ LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); }
    = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
    = note: outer attributes, like `#[test]`, annotate the item following them
 
+error: an inner attribute is not permitted in this context
+  --> $DIR/attr-stmt-expr-attr-bad.rs:7:36
+   |
+LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); }
+   |                                    ^^^^^^^^
+   |
+   = note: inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually found at the beginning of source files
+   = note: outer attributes, like `#[test]`, annotate the item following them
+
 error: expected expression, found `)`
   --> $DIR/attr-stmt-expr-attr-bad.rs:7:44
    |
@@ -26,7 +35,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); }
    |                                            ^ expected expression
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:10:38
+  --> $DIR/attr-stmt-expr-attr-bad.rs:11:38
    |
 LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); }
    |                                      ^^^^^^^^
@@ -35,13 +44,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: expected expression, found `)`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:10:46
+  --> $DIR/attr-stmt-expr-attr-bad.rs:11:46
    |
 LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); }
    |                                              ^ expected expression
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:13:36
+  --> $DIR/attr-stmt-expr-attr-bad.rs:14:36
    |
 LL | #[cfg(FALSE)] fn e() { let _ = 0 + #![attr] 0; }
    |                                    ^^^^^^^^
@@ -50,7 +59,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = 0 + #![attr] 0; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:15:33
+  --> $DIR/attr-stmt-expr-attr-bad.rs:16:33
    |
 LL | #[cfg(FALSE)] fn e() { let _ = !#![attr] 0; }
    |                                 ^^^^^^^^
@@ -59,7 +68,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = !#![attr] 0; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:17:33
+  --> $DIR/attr-stmt-expr-attr-bad.rs:18:33
    |
 LL | #[cfg(FALSE)] fn e() { let _ = -#![attr] 0; }
    |                                 ^^^^^^^^
@@ -68,13 +77,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = -#![attr] 0; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `#`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:19:34
+  --> $DIR/attr-stmt-expr-attr-bad.rs:20:34
    |
 LL | #[cfg(FALSE)] fn e() { let _ = x #![attr] as Y; }
    |                                  ^ expected one of 8 possible tokens
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:21:35
+  --> $DIR/attr-stmt-expr-attr-bad.rs:22:35
    |
 LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] foo; }
    |                                   ^^^^^^^^
@@ -83,7 +92,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] foo; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:23:40
+  --> $DIR/attr-stmt-expr-attr-bad.rs:24:40
    |
 LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] foo; }
    |                                        ^^^^^^^^
@@ -92,7 +101,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] foo; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:25:35
+  --> $DIR/attr-stmt-expr-attr-bad.rs:26:35
    |
 LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] {foo}; }
    |                                   ^^^^^^^^
@@ -101,7 +110,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] {foo}; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:27:40
+  --> $DIR/attr-stmt-expr-attr-bad.rs:28:40
    |
 LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] {foo}; }
    |                                        ^^^^^^^^
@@ -110,19 +119,19 @@ LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] {foo}; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: expected expression, found `..`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:29:40
+  --> $DIR/attr-stmt-expr-attr-bad.rs:30:40
    |
 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..#[attr] 0; }
    |                                        ^^ expected expression
 
 error: expected expression, found `..`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:31:40
+  --> $DIR/attr-stmt-expr-attr-bad.rs:32:40
    |
 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..; }
    |                                        ^^ expected expression
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:33:41
+  --> $DIR/attr-stmt-expr-attr-bad.rs:34:41
    |
 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &#![attr] 0; }
    |                                         ^^^^^^^^
@@ -131,7 +140,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &#![attr] 0; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:35:45
+  --> $DIR/attr-stmt-expr-attr-bad.rs:36:45
    |
 LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &mut #![attr] 0; }
    |                                             ^^^^^^^^
@@ -140,7 +149,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &mut #![attr] 0; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: outer attributes are not allowed on `if` and `else` branches
-  --> $DIR/attr-stmt-expr-attr-bad.rs:37:37
+  --> $DIR/attr-stmt-expr-attr-bad.rs:38:37
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; }
    |                                --   ^^^^^^^ -- the attributes are attached to this branch
@@ -149,7 +158,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; }
    |                                the branch belongs to this `if`
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:39:38
+  --> $DIR/attr-stmt-expr-attr-bad.rs:40:38
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; }
    |                                      ^^^^^^^^
@@ -158,13 +167,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:41:40
+  --> $DIR/attr-stmt-expr-attr-bad.rs:42:40
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} #[attr] else {}; }
    |                                        ^ expected one of `.`, `;`, `?`, `else`, or an operator
 
 error: outer attributes are not allowed on `if` and `else` branches
-  --> $DIR/attr-stmt-expr-attr-bad.rs:43:45
+  --> $DIR/attr-stmt-expr-attr-bad.rs:44:45
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; }
    |                                        ---- ^^^^^^^ -- the attributes are attached to this branch
@@ -173,7 +182,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; }
    |                                        the branch belongs to this `else`
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:45:46
+  --> $DIR/attr-stmt-expr-attr-bad.rs:46:46
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; }
    |                                              ^^^^^^^^
@@ -182,7 +191,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: outer attributes are not allowed on `if` and `else` branches
-  --> $DIR/attr-stmt-expr-attr-bad.rs:47:45
+  --> $DIR/attr-stmt-expr-attr-bad.rs:48:45
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
    |                                        ---- ^^^^^^^ ------- the attributes are attached to this branch
@@ -191,7 +200,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; }
    |                                        the branch belongs to this `else`
 
 error: outer attributes are not allowed on `if` and `else` branches
-  --> $DIR/attr-stmt-expr-attr-bad.rs:49:50
+  --> $DIR/attr-stmt-expr-attr-bad.rs:50:50
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; }
    |                                             --   ^^^^^^^ -- the attributes are attached to this branch
@@ -200,7 +209,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; }
    |                                             the branch belongs to this `if`
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:51:51
+  --> $DIR/attr-stmt-expr-attr-bad.rs:52:51
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; }
    |                                                   ^^^^^^^^
@@ -209,7 +218,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: outer attributes are not allowed on `if` and `else` branches
-  --> $DIR/attr-stmt-expr-attr-bad.rs:53:45
+  --> $DIR/attr-stmt-expr-attr-bad.rs:54:45
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; }
    |                                --           ^^^^^^^ -- the attributes are attached to this branch
@@ -218,7 +227,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; }
    |                                the branch belongs to this `if`
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:55:46
+  --> $DIR/attr-stmt-expr-attr-bad.rs:56:46
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; }
    |                                              ^^^^^^^^
@@ -227,13 +236,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:57:48
+  --> $DIR/attr-stmt-expr-attr-bad.rs:58:48
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} #[attr] else {}; }
    |                                                ^ expected one of `.`, `;`, `?`, `else`, or an operator
 
 error: outer attributes are not allowed on `if` and `else` branches
-  --> $DIR/attr-stmt-expr-attr-bad.rs:59:53
+  --> $DIR/attr-stmt-expr-attr-bad.rs:60:53
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; }
    |                                                ---- ^^^^^^^ -- the attributes are attached to this branch
@@ -242,7 +251,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; }
    |                                                the branch belongs to this `else`
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:61:54
+  --> $DIR/attr-stmt-expr-attr-bad.rs:62:54
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; }
    |                                                      ^^^^^^^^
@@ -251,7 +260,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: outer attributes are not allowed on `if` and `else` branches
-  --> $DIR/attr-stmt-expr-attr-bad.rs:63:53
+  --> $DIR/attr-stmt-expr-attr-bad.rs:64:53
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; }
    |                                                ---- ^^^^^^^ --------------- the attributes are attached to this branch
@@ -260,7 +269,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}
    |                                                the branch belongs to this `else`
 
 error: outer attributes are not allowed on `if` and `else` branches
-  --> $DIR/attr-stmt-expr-attr-bad.rs:65:66
+  --> $DIR/attr-stmt-expr-attr-bad.rs:66:66
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}; }
    |                                                     --           ^^^^^^^ -- the attributes are attached to this branch
@@ -269,7 +278,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}
    |                                                     the branch belongs to this `if`
 
 error: an inner attribute is not permitted in this context
-  --> $DIR/attr-stmt-expr-attr-bad.rs:67:67
+  --> $DIR/attr-stmt-expr-attr-bad.rs:68:67
    |
 LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}; }
    |                                                                   ^^^^^^^^
@@ -278,7 +287,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: an inner attribute is not permitted following an outer attribute
-  --> $DIR/attr-stmt-expr-attr-bad.rs:70:32
+  --> $DIR/attr-stmt-expr-attr-bad.rs:71:32
    |
 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; }
    |                        ------- ^^^^^^^^ not permitted following an outer attribute
@@ -289,7 +298,7 @@ LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: an inner attribute is not permitted following an outer attribute
-  --> $DIR/attr-stmt-expr-attr-bad.rs:72:32
+  --> $DIR/attr-stmt-expr-attr-bad.rs:73:32
    |
 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; }
    |                        ------- ^^^^^^^^ not permitted following an outer attribute
@@ -300,7 +309,7 @@ LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; }
    = note: outer attributes, like `#[test]`, annotate the item following them
 
 error: an inner attribute is not permitted following an outer attribute
-  --> $DIR/attr-stmt-expr-attr-bad.rs:74:32
+  --> $DIR/attr-stmt-expr-attr-bad.rs:75:32
    |
 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!(); }
    |                        ------- ^^^^^^^^ ------- the inner attribute doesn't annotate this item macro invocation
@@ -316,7 +325,7 @@ LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo!(); }
    |
 
 error: an inner attribute is not permitted following an outer attribute
-  --> $DIR/attr-stmt-expr-attr-bad.rs:76:32
+  --> $DIR/attr-stmt-expr-attr-bad.rs:77:32
    |
 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo![]; }
    |                        ------- ^^^^^^^^ ------- the inner attribute doesn't annotate this item macro invocation
@@ -332,7 +341,7 @@ LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo![]; }
    |
 
 error: an inner attribute is not permitted following an outer attribute
-  --> $DIR/attr-stmt-expr-attr-bad.rs:78:32
+  --> $DIR/attr-stmt-expr-attr-bad.rs:79:32
    |
 LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!{}; }
    |                        ------- ^^^^^^^^ ------ the inner attribute doesn't annotate this item macro invocation
@@ -348,7 +357,7 @@ LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo!{}; }
    |
 
 error[E0586]: inclusive range with no end
-  --> $DIR/attr-stmt-expr-attr-bad.rs:84:35
+  --> $DIR/attr-stmt-expr-attr-bad.rs:85:35
    |
 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
    |                                   ^^^ help: use `..` instead
@@ -356,13 +365,13 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
    = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
 
 error: expected one of `=>`, `if`, or `|`, found `#`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:84:38
+  --> $DIR/attr-stmt-expr-attr-bad.rs:85:38
    |
 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } }
    |                                      ^ expected one of `=>`, `if`, or `|`
 
 error[E0586]: inclusive range with no end
-  --> $DIR/attr-stmt-expr-attr-bad.rs:87:35
+  --> $DIR/attr-stmt-expr-attr-bad.rs:88:35
    |
 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
    |                                   ^^^ help: use `..` instead
@@ -370,19 +379,19 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
    = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
 
 error: expected one of `=>`, `if`, or `|`, found `#`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:87:38
+  --> $DIR/attr-stmt-expr-attr-bad.rs:88:38
    |
 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } }
    |                                      ^ expected one of `=>`, `if`, or `|`
 
 error: unexpected token: `#`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:90:39
+  --> $DIR/attr-stmt-expr-attr-bad.rs:91:39
    |
 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=-#[attr] 10 => () } }
    |                                       ^
 
 error[E0586]: inclusive range with no end
-  --> $DIR/attr-stmt-expr-attr-bad.rs:92:35
+  --> $DIR/attr-stmt-expr-attr-bad.rs:93:35
    |
 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
    |                                   ^^^ help: use `..` instead
@@ -390,47 +399,47 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
    = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`)
 
 error: expected one of `=>`, `if`, or `|`, found `#`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:92:38
+  --> $DIR/attr-stmt-expr-attr-bad.rs:93:38
    |
 LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } }
    |                                      ^ expected one of `=>`, `if`, or `|`
 
 error: unexpected token: `#`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:96:34
+  --> $DIR/attr-stmt-expr-attr-bad.rs:97:34
    |
 LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
    |                                  ^
 
 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:96:34
+  --> $DIR/attr-stmt-expr-attr-bad.rs:97:34
    |
 LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); }
    |                                  ^ expected one of `.`, `;`, `?`, `else`, or an operator
 
 error: unexpected token: `#`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:99:34
+  --> $DIR/attr-stmt-expr-attr-bad.rs:100:34
    |
 LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
    |                                  ^
 
 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#`
-  --> $DIR/attr-stmt-expr-attr-bad.rs:99:34
+  --> $DIR/attr-stmt-expr-attr-bad.rs:100:34
    |
 LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); }
    |                                  ^ expected one of `.`, `;`, `?`, `else`, or an operator
 
 error: expected statement after outer attribute
-  --> $DIR/attr-stmt-expr-attr-bad.rs:104:37
+  --> $DIR/attr-stmt-expr-attr-bad.rs:105:37
    |
 LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr]; } } }
    |                                     ^^^^^^^
 
 error: expected statement after outer attribute
-  --> $DIR/attr-stmt-expr-attr-bad.rs:106:37
+  --> $DIR/attr-stmt-expr-attr-bad.rs:107:37
    |
 LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr] } } }
    |                                     ^^^^^^^
 
-error: aborting due to 52 previous errors
+error: aborting due to 53 previous errors
 
 For more information about this error, try `rustc --explain E0586`.
diff --git a/tests/ui/parser/builtin-syntax.rs b/tests/ui/parser/builtin-syntax.rs
new file mode 100644
index 00000000000..897dab8ec50
--- /dev/null
+++ b/tests/ui/parser/builtin-syntax.rs
@@ -0,0 +1,9 @@
+#![feature(builtin_syntax)]
+
+fn main() {
+    builtin # foobar(); //~ ERROR unknown `builtin #` construct
+}
+
+fn not_identifier() {
+    builtin # {}(); //~ ERROR expected identifier after
+}
diff --git a/tests/ui/parser/builtin-syntax.stderr b/tests/ui/parser/builtin-syntax.stderr
new file mode 100644
index 00000000000..ee3764a6221
--- /dev/null
+++ b/tests/ui/parser/builtin-syntax.stderr
@@ -0,0 +1,14 @@
+error: unknown `builtin #` construct `foobar`
+  --> $DIR/builtin-syntax.rs:4:5
+   |
+LL |     builtin # foobar();
+   |     ^^^^^^^^^^^^^^^^
+
+error: expected identifier after `builtin #`
+  --> $DIR/builtin-syntax.rs:8:15
+   |
+LL |     builtin # {}();
+   |               ^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/parser/eq-less-to-less-eq.rs b/tests/ui/parser/eq-less-to-less-eq.rs
new file mode 100644
index 00000000000..23c6c59d7a6
--- /dev/null
+++ b/tests/ui/parser/eq-less-to-less-eq.rs
@@ -0,0 +1,33 @@
+fn foo() {
+    let a = 0;
+    let b = 4;
+    if a =< b { //~ERROR
+        println!("yay!");
+    }
+}
+
+fn bar() {
+    let a = 0;
+    let b = 4;
+    if a = <b { //~ERROR
+        println!("yay!");
+    }
+}
+
+fn baz() {
+    let a = 0;
+    let b = 4;
+    if a = < b { //~ERROR
+        println!("yay!");
+    }
+}
+
+fn qux() {
+    let a = 0;
+    let b = 4;
+    if a =< i32>::abs(-4) { //~ERROR: mismatched types
+        println!("yay!");
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/parser/eq-less-to-less-eq.stderr b/tests/ui/parser/eq-less-to-less-eq.stderr
new file mode 100644
index 00000000000..4717d8287ff
--- /dev/null
+++ b/tests/ui/parser/eq-less-to-less-eq.stderr
@@ -0,0 +1,34 @@
+error: expected one of `!`, `(`, `+`, `::`, `<`, `>`, or `as`, found `{`
+  --> $DIR/eq-less-to-less-eq.rs:4:15
+   |
+LL |     if a =< b {
+   |          --   ^ expected one of 7 possible tokens
+   |          |
+   |          help: did you mean: `<=`
+
+error: expected one of `!`, `(`, `+`, `::`, `<`, `>`, or `as`, found `{`
+  --> $DIR/eq-less-to-less-eq.rs:12:15
+   |
+LL |     if a = <b {
+   |               ^ expected one of 7 possible tokens
+
+error: expected one of `!`, `(`, `+`, `::`, `<`, `>`, or `as`, found `{`
+  --> $DIR/eq-less-to-less-eq.rs:20:16
+   |
+LL |     if a = < b {
+   |                ^ expected one of 7 possible tokens
+
+error[E0308]: mismatched types
+  --> $DIR/eq-less-to-less-eq.rs:28:8
+   |
+LL |     if a =< i32>::abs(-4) {
+   |        ^^^^^^^^^^^^^^^^^^ expected `bool`, found `()`
+   |
+help: you might have meant to compare for equality
+   |
+LL |     if a ==< i32>::abs(-4) {
+   |           +
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/parser/issues/issue-33418.fixed b/tests/ui/parser/issues/issue-33418.fixed
deleted file mode 100644
index ed885ae1435..00000000000
--- a/tests/ui/parser/issues/issue-33418.fixed
+++ /dev/null
@@ -1,19 +0,0 @@
-// run-rustfix
-
-trait Tr {}
-//~^ ERROR negative bounds are not supported
-trait Tr2: SuperA {}
-//~^ ERROR negative bounds are not supported
-trait Tr3: SuperB {}
-//~^ ERROR negative bounds are not supported
-trait Tr4: SuperB + SuperD {}
-//~^ ERROR negative bounds are not supported
-trait Tr5 {}
-//~^ ERROR negative bounds are not supported
-
-trait SuperA {}
-trait SuperB {}
-trait SuperC {}
-trait SuperD {}
-
-fn main() {}
diff --git a/tests/ui/parser/issues/issue-33418.rs b/tests/ui/parser/issues/issue-33418.rs
index 9934284abfb..4ebd5871e53 100644
--- a/tests/ui/parser/issues/issue-33418.rs
+++ b/tests/ui/parser/issues/issue-33418.rs
@@ -1,5 +1,3 @@
-// run-rustfix
-
 trait Tr: !SuperA {}
 //~^ ERROR negative bounds are not supported
 trait Tr2: SuperA + !SuperB {}
@@ -7,10 +5,12 @@ trait Tr2: SuperA + !SuperB {}
 trait Tr3: !SuperA + SuperB {}
 //~^ ERROR negative bounds are not supported
 trait Tr4: !SuperA + SuperB
-    + !SuperC + SuperD {}
+//~^ ERROR negative bounds are not supported
++ !SuperC + SuperD {}
 //~^ ERROR negative bounds are not supported
 trait Tr5: !SuperA
-    + !SuperB {}
+//~^ ERROR negative bounds are not supported
++ !SuperB {}
 //~^ ERROR negative bounds are not supported
 
 trait SuperA {}
diff --git a/tests/ui/parser/issues/issue-33418.stderr b/tests/ui/parser/issues/issue-33418.stderr
index 9a8733e8929..b111bcfd240 100644
--- a/tests/ui/parser/issues/issue-33418.stderr
+++ b/tests/ui/parser/issues/issue-33418.stderr
@@ -1,36 +1,44 @@
 error: negative bounds are not supported
-  --> $DIR/issue-33418.rs:3:9
+  --> $DIR/issue-33418.rs:1:11
    |
 LL | trait Tr: !SuperA {}
-   |         ^^^^^^^^^ negative bounds are not supported
+   |           ^
 
 error: negative bounds are not supported
-  --> $DIR/issue-33418.rs:5:19
+  --> $DIR/issue-33418.rs:3:21
    |
 LL | trait Tr2: SuperA + !SuperB {}
-   |                   ^^^^^^^^^ negative bounds are not supported
+   |                     ^
 
 error: negative bounds are not supported
-  --> $DIR/issue-33418.rs:7:10
+  --> $DIR/issue-33418.rs:5:12
    |
 LL | trait Tr3: !SuperA + SuperB {}
-   |          ^^^^^^^^^ negative bounds are not supported
+   |            ^
 
 error: negative bounds are not supported
-  --> $DIR/issue-33418.rs:9:10
+  --> $DIR/issue-33418.rs:7:12
    |
 LL | trait Tr4: !SuperA + SuperB
-   |          ^^^^^^^^^
-LL |     + !SuperC + SuperD {}
-   |     ^^^^^^^^^ negative bounds are not supported
+   |            ^
 
 error: negative bounds are not supported
-  --> $DIR/issue-33418.rs:12:10
+  --> $DIR/issue-33418.rs:9:3
+   |
+LL | + !SuperC + SuperD {}
+   |   ^
+
+error: negative bounds are not supported
+  --> $DIR/issue-33418.rs:11:12
    |
 LL | trait Tr5: !SuperA
-   |          ^^^^^^^^^
-LL |     + !SuperB {}
-   |     ^^^^^^^^^ negative bounds are not supported
+   |            ^
+
+error: negative bounds are not supported
+  --> $DIR/issue-33418.rs:13:3
+   |
+LL | + !SuperB {}
+   |   ^
 
-error: aborting due to 5 previous errors
+error: aborting due to 7 previous errors
 
diff --git a/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs b/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs
index 7bd4b3a165c..3d110adef3e 100644
--- a/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs
+++ b/tests/ui/parser/issues/issue-35813-postfix-after-cast.rs
@@ -10,14 +10,14 @@ pub fn index_after_as_cast() {
     vec![1, 2, 3] as Vec<i32>[0];
     //~^ ERROR: cast cannot be followed by indexing
     vec![1, 2, 3]: Vec<i32>[0];
-    //~^ ERROR: type ascription cannot be followed by indexing
+    //~^ ERROR: expected one of
 }
 
 pub fn index_after_cast_to_index() {
     (&[0]) as &[i32][0];
     //~^ ERROR: cast cannot be followed by indexing
     (&[0i32]): &[i32; 1][0];
-    //~^ ERROR: type ascription cannot be followed by indexing
+    //~^ ERROR: expected one of
 }
 
 pub fn cast_after_cast() {
@@ -25,7 +25,7 @@ pub fn cast_after_cast() {
 
     }
     if 5u64: u64: u64 == 0u64 {
-
+        //~^ ERROR expected `{`, found `:`
     }
     let _ = 5u64: u64: u64 as u8 as i8 == 9i8;
     let _ = 0i32: i32: i32;
@@ -36,26 +36,46 @@ pub fn cast_after_cast() {
 }
 
 pub fn cast_cast_method_call() {
-    let _ = 0i32: i32: i32.count_ones();
-    //~^ ERROR: type ascription cannot be followed by a method call
-    let _ = 0 as i32: i32.count_ones();
-    //~^ ERROR: type ascription cannot be followed by a method call
-    let _ = 0i32: i32 as i32.count_ones();
-    //~^ ERROR: cast cannot be followed by a method call
+    let _ = 0i32: i32: i32.count_ones(); //~ ERROR expected one of
+}
+
+pub fn cast_cast_method_call_2() {
+    let _ = 0 as i32: i32.count_ones(); //~ ERROR expected one of
+}
+
+pub fn cast_cast_method_call_3() {
+    let _ = 0i32: i32 as i32.count_ones(); //~ ERROR expected one of
+}
+
+pub fn cast_cast_method_call_4() {
     let _ = 0 as i32 as i32.count_ones();
     //~^ ERROR: cast cannot be followed by a method call
-    let _ = 0i32: i32: i32 as u32 as i32.count_ones();
-    //~^ ERROR: cast cannot be followed by a method call
-    let _ = 0i32: i32.count_ones(): u32;
-    //~^ ERROR: type ascription cannot be followed by a method call
-    let _ = 0 as i32.count_ones(): u32;
+}
+
+pub fn cast_cast_method_call_5() {
+    let _ = 0i32: i32: i32 as u32 as i32.count_ones(); //~ ERROR expected one of
+}
+
+pub fn cast_cast_method_call_6() {
+    let _ = 0i32: i32.count_ones(): u32; //~ ERROR expected one of
+}
+
+pub fn cast_cast_method_call_7() {
+    let _ = 0 as i32.count_ones(): u32; //~ ERROR expected one of
     //~^ ERROR: cast cannot be followed by a method call
-    let _ = 0i32: i32.count_ones() as u32;
-    //~^ ERROR: type ascription cannot be followed by a method call
+}
+
+pub fn cast_cast_method_call_8() {
+    let _ = 0i32: i32.count_ones() as u32; //~ ERROR expected one of
+}
+
+pub fn cast_cast_method_call_9() {
     let _ = 0 as i32.count_ones() as u32;
     //~^ ERROR: cast cannot be followed by a method call
-    let _ = 0i32: i32: i32.count_ones() as u32 as i32;
-    //~^ ERROR: type ascription cannot be followed by a method call
+}
+
+pub fn cast_cast_method_call_10() {
+    let _ = 0i32: i32: i32.count_ones() as u32 as i32; //~ ERROR expected one of
 }
 
 pub fn multiline_error() {
@@ -74,8 +94,7 @@ pub fn precedence() {
 pub fn method_calls() {
     0 as i32.max(0);
     //~^ ERROR: cast cannot be followed by a method call
-    0: i32.max(0);
-    //~^ ERROR: type ascription cannot be followed by a method call
+    0: i32.max(0); //~ ERROR expected one of
 }
 
 pub fn complex() {
@@ -84,7 +103,7 @@ pub fn complex() {
         if true { 33 } else { 44 } as i32.max(0),
         //~^ ERROR: cast cannot be followed by a method call
         if true { 33 } else { 44 }: i32.max(0)
-        //~^ ERROR: type ascription cannot be followed by a method call
+        //~^ ERROR: expected one of
     );
 }
 
@@ -93,7 +112,7 @@ pub fn in_condition() {
         //~^ ERROR: cast cannot be followed by a method call
     }
     if 5u64: u64.max(0) == 0 {
-        //~^ ERROR: type ascription cannot be followed by a method call
+        //~^ ERROR: expected `{`, found `:`
     }
 }
 
@@ -104,7 +123,7 @@ pub fn inside_block() {
     } else { false };
     let _ = if true {
         5u64: u64.max(0) == 0
-        //~^ ERROR: type ascription cannot be followed by a method call
+        //~^ ERROR: expected one of
     } else { false };
 }
 
@@ -112,14 +131,14 @@ static bar: &[i32] = &(&[1,2,3] as &[i32][0..1]);
 //~^ ERROR: cast cannot be followed by indexing
 
 static bar2: &[i32] = &(&[1i32,2,3]: &[i32; 3][0..1]);
-//~^ ERROR: type ascription cannot be followed by indexing
+//~^ ERROR: expected one of
 
 
 pub fn cast_then_try() -> Result<u64,u64> {
     Err(0u64) as Result<u64,u64>?;
     //~^ ERROR: cast cannot be followed by `?`
     Err(0u64): Result<u64,u64>?;
-    //~^ ERROR: type ascription cannot be followed by `?`
+    //~^ ERROR: expected one of
     Ok(1)
 }
 
@@ -131,13 +150,14 @@ pub fn cast_then_call() {
     drop as F();
     //~^ ERROR: parenthesized type parameters may only be used with a `Fn` trait [E0214]
     drop_ptr: F();
-    //~^ ERROR: parenthesized type parameters may only be used with a `Fn` trait [E0214]
+    //~^ ERROR: expected identifier, found `:`
 }
 
 pub fn cast_to_fn_should_work() {
     let drop_ptr = drop as fn(u8);
     drop as fn(u8);
     drop_ptr: fn(u8);
+    //~^ ERROR expected one of
 }
 
 pub fn parens_after_cast_error() {
@@ -145,7 +165,7 @@ pub fn parens_after_cast_error() {
     drop as fn(u8)(0);
     //~^ ERROR: cast cannot be followed by a function call
     drop_ptr: fn(u8)(0);
-    //~^ ERROR: type ascription cannot be followed by a function call
+    //~^ ERROR: expected one of
 }
 
 pub async fn cast_then_await() {
@@ -153,7 +173,7 @@ pub async fn cast_then_await() {
     //~^ ERROR: cast cannot be followed by `.await`
 
     Box::pin(noop()): Pin<Box<_>>.await;
-    //~^ ERROR: type ascription cannot be followed by `.await`
+    //~^ ERROR: expected one of
 }
 
 pub async fn noop() {}
@@ -167,5 +187,5 @@ pub fn struct_field() {
     Foo::default() as Foo.bar;
     //~^ ERROR: cannot be followed by a field access
     Foo::default(): Foo.bar;
-    //~^ ERROR: type ascription cannot be followed by a field access
+    //~^ ERROR expected one of
 }
diff --git a/tests/ui/parser/issues/issue-35813-postfix-after-cast.stderr b/tests/ui/parser/issues/issue-35813-postfix-after-cast.stderr
index 0c328bde285..d313c888e51 100644
--- a/tests/ui/parser/issues/issue-35813-postfix-after-cast.stderr
+++ b/tests/ui/parser/issues/issue-35813-postfix-after-cast.stderr
@@ -9,21 +9,11 @@ help: try surrounding the expression in parentheses
 LL |     (vec![1, 2, 3] as Vec<i32>)[0];
    |     +                         +
 
-error: type ascription cannot be followed by indexing
-  --> $DIR/issue-35813-postfix-after-cast.rs:12:5
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:12:18
    |
 LL |     vec![1, 2, 3]: Vec<i32>[0];
-   |     ^^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |     (vec![1, 2, 3]: Vec<i32>)[0];
-   |     +                       +
-help: alternatively, remove the type ascription
-   |
-LL -     vec![1, 2, 3]: Vec<i32>[0];
-LL +     vec![1, 2, 3][0];
-   |
+   |                  ^ expected one of `.`, `;`, `?`, `}`, or an operator
 
 error: cast cannot be followed by indexing
   --> $DIR/issue-35813-postfix-after-cast.rs:17:5
@@ -36,67 +26,50 @@ help: try surrounding the expression in parentheses
 LL |     ((&[0]) as &[i32])[0];
    |     +                +
 
-error: type ascription cannot be followed by indexing
-  --> $DIR/issue-35813-postfix-after-cast.rs:19:5
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:19:14
    |
 LL |     (&[0i32]): &[i32; 1][0];
-   |     ^^^^^^^^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
+   |              ^ expected one of `.`, `;`, `?`, `}`, or an operator
+
+error: expected `{`, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:27:12
    |
-LL |     ((&[0i32]): &[i32; 1])[0];
-   |     +                    +
-help: alternatively, remove the type ascription
+LL |     if 5u64: u64: u64 == 0u64 {
+   |            ^ expected `{`
    |
-LL -     (&[0i32]): &[i32; 1][0];
-LL +     (&[0i32])[0];
+note: the `if` expression is missing a block after this condition
+  --> $DIR/issue-35813-postfix-after-cast.rs:27:8
    |
+LL |     if 5u64: u64: u64 == 0u64 {
+   |        ^^^^
 
-error: type ascription cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:39:13
+error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:39:17
    |
 LL |     let _ = 0i32: i32: i32.count_ones();
-   |             ^^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |     let _ = (0i32: i32: i32).count_ones();
-   |             +              +
-help: alternatively, remove the type ascription
-   |
-LL -     let _ = 0i32: i32: i32.count_ones();
-LL +     let _ = 0i32: i32.count_ones();
+   |                 ^ expected one of `.`, `;`, `?`, `else`, or an operator
    |
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
-error: type ascription cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:41:13
+error: expected one of `!`, `(`, `.`, `::`, `;`, `<`, `?`, or `else`, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:43:21
    |
 LL |     let _ = 0 as i32: i32.count_ones();
-   |             ^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |     let _ = (0 as i32: i32).count_ones();
-   |             +             +
-help: alternatively, remove the type ascription
-   |
-LL -     let _ = 0 as i32: i32.count_ones();
-LL +     let _ = 0 as i32.count_ones();
+   |                     ^ expected one of 8 possible tokens
    |
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
-error: cast cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:43:13
+error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:47:17
    |
 LL |     let _ = 0i32: i32 as i32.count_ones();
-   |             ^^^^^^^^^^^^^^^^
+   |                 ^ expected one of `.`, `;`, `?`, `else`, or an operator
    |
-help: try surrounding the expression in parentheses
-   |
-LL |     let _ = (0i32: i32 as i32).count_ones();
-   |             +                +
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: cast cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:45:13
+  --> $DIR/issue-35813-postfix-after-cast.rs:51:13
    |
 LL |     let _ = 0 as i32 as i32.count_ones();
    |             ^^^^^^^^^^^^^^^
@@ -106,35 +79,24 @@ help: try surrounding the expression in parentheses
 LL |     let _ = (0 as i32 as i32).count_ones();
    |             +               +
 
-error: cast cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:47:13
+error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:56:17
    |
 LL |     let _ = 0i32: i32: i32 as u32 as i32.count_ones();
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
+   |                 ^ expected one of `.`, `;`, `?`, `else`, or an operator
    |
-LL |     let _ = (0i32: i32: i32 as u32 as i32).count_ones();
-   |             +                            +
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
-error: type ascription cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:49:13
+error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:60:17
    |
 LL |     let _ = 0i32: i32.count_ones(): u32;
-   |             ^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |     let _ = (0i32: i32).count_ones(): u32;
-   |             +         +
-help: alternatively, remove the type ascription
-   |
-LL -     let _ = 0i32: i32.count_ones(): u32;
-LL +     let _ = 0i32.count_ones(): u32;
+   |                 ^ expected one of `.`, `;`, `?`, `else`, or an operator
    |
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: cast cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:51:13
+  --> $DIR/issue-35813-postfix-after-cast.rs:64:13
    |
 LL |     let _ = 0 as i32.count_ones(): u32;
    |             ^^^^^^^^
@@ -144,24 +106,24 @@ help: try surrounding the expression in parentheses
 LL |     let _ = (0 as i32).count_ones(): u32;
    |             +        +
 
-error: type ascription cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:53:13
+error: expected one of `.`, `;`, `?`, or `else`, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:64:34
    |
-LL |     let _ = 0i32: i32.count_ones() as u32;
-   |             ^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
+LL |     let _ = 0 as i32.count_ones(): u32;
+   |                                  ^ expected one of `.`, `;`, `?`, or `else`
    |
-LL |     let _ = (0i32: i32).count_ones() as u32;
-   |             +         +
-help: alternatively, remove the type ascription
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
+
+error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:69:17
    |
-LL -     let _ = 0i32: i32.count_ones() as u32;
-LL +     let _ = 0i32.count_ones() as u32;
+LL |     let _ = 0i32: i32.count_ones() as u32;
+   |                 ^ expected one of `.`, `;`, `?`, `else`, or an operator
    |
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: cast cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:55:13
+  --> $DIR/issue-35813-postfix-after-cast.rs:73:13
    |
 LL |     let _ = 0 as i32.count_ones() as u32;
    |             ^^^^^^^^
@@ -171,24 +133,16 @@ help: try surrounding the expression in parentheses
 LL |     let _ = (0 as i32).count_ones() as u32;
    |             +        +
 
-error: type ascription cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:57:13
+error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:78:17
    |
 LL |     let _ = 0i32: i32: i32.count_ones() as u32 as i32;
-   |             ^^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |     let _ = (0i32: i32: i32).count_ones() as u32 as i32;
-   |             +              +
-help: alternatively, remove the type ascription
-   |
-LL -     let _ = 0i32: i32: i32.count_ones() as u32 as i32;
-LL +     let _ = 0i32: i32.count_ones() as u32 as i32;
+   |                 ^ expected one of `.`, `;`, `?`, `else`, or an operator
    |
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: cast cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:62:13
+  --> $DIR/issue-35813-postfix-after-cast.rs:82:13
    |
 LL |       let _ = 0
    |  _____________^
@@ -202,7 +156,7 @@ LL ~         as i32)
    |
 
 error: cast cannot be followed by indexing
-  --> $DIR/issue-35813-postfix-after-cast.rs:70:18
+  --> $DIR/issue-35813-postfix-after-cast.rs:90:18
    |
 LL |     let x: i32 = &vec![1, 2, 3] as &Vec<i32>[0];
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -213,7 +167,7 @@ LL |     let x: i32 = (&vec![1, 2, 3] as &Vec<i32>)[0];
    |                  +                           +
 
 error: cast cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:75:5
+  --> $DIR/issue-35813-postfix-after-cast.rs:95:5
    |
 LL |     0 as i32.max(0);
    |     ^^^^^^^^
@@ -223,24 +177,14 @@ help: try surrounding the expression in parentheses
 LL |     (0 as i32).max(0);
    |     +        +
 
-error: type ascription cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:77:5
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:97:6
    |
 LL |     0: i32.max(0);
-   |     ^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |     (0: i32).max(0);
-   |     +      +
-help: alternatively, remove the type ascription
-   |
-LL -     0: i32.max(0);
-LL +     0.max(0);
-   |
+   |      ^ expected one of `.`, `;`, `?`, `}`, or an operator
 
 error: cast cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:92:8
+  --> $DIR/issue-35813-postfix-after-cast.rs:111:8
    |
 LL |     if 5u64 as i32.max(0) == 0 {
    |        ^^^^^^^^^^^
@@ -250,24 +194,20 @@ help: try surrounding the expression in parentheses
 LL |     if (5u64 as i32).max(0) == 0 {
    |        +           +
 
-error: type ascription cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:95:8
+error: expected `{`, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:114:12
    |
 LL |     if 5u64: u64.max(0) == 0 {
-   |        ^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |     if (5u64: u64).max(0) == 0 {
-   |        +         +
-help: alternatively, remove the type ascription
+   |            ^ expected `{`
    |
-LL -     if 5u64: u64.max(0) == 0 {
-LL +     if 5u64.max(0) == 0 {
+note: the `if` expression is missing a block after this condition
+  --> $DIR/issue-35813-postfix-after-cast.rs:114:8
    |
+LL |     if 5u64: u64.max(0) == 0 {
+   |        ^^^^
 
 error: cast cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:102:9
+  --> $DIR/issue-35813-postfix-after-cast.rs:121:9
    |
 LL |         5u64 as u32.max(0) == 0
    |         ^^^^^^^^^^^
@@ -277,24 +217,14 @@ help: try surrounding the expression in parentheses
 LL |         (5u64 as u32).max(0) == 0
    |         +           +
 
-error: type ascription cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:106:9
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:125:13
    |
 LL |         5u64: u64.max(0) == 0
-   |         ^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |         (5u64: u64).max(0) == 0
-   |         +         +
-help: alternatively, remove the type ascription
-   |
-LL -         5u64: u64.max(0) == 0
-LL +         5u64.max(0) == 0
-   |
+   |             ^ expected one of `.`, `;`, `?`, `}`, or an operator
 
 error: cast cannot be followed by indexing
-  --> $DIR/issue-35813-postfix-after-cast.rs:111:24
+  --> $DIR/issue-35813-postfix-after-cast.rs:130:24
    |
 LL | static bar: &[i32] = &(&[1,2,3] as &[i32][0..1]);
    |                        ^^^^^^^^^^^^^^^^^^
@@ -304,24 +234,14 @@ help: try surrounding the expression in parentheses
 LL | static bar: &[i32] = &((&[1,2,3] as &[i32])[0..1]);
    |                        +                  +
 
-error: type ascription cannot be followed by indexing
-  --> $DIR/issue-35813-postfix-after-cast.rs:114:25
+error: expected one of `)`, `,`, `.`, `?`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:133:36
    |
 LL | static bar2: &[i32] = &(&[1i32,2,3]: &[i32; 3][0..1]);
-   |                         ^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL | static bar2: &[i32] = &((&[1i32,2,3]: &[i32; 3])[0..1]);
-   |                         +                      +
-help: alternatively, remove the type ascription
-   |
-LL - static bar2: &[i32] = &(&[1i32,2,3]: &[i32; 3][0..1]);
-LL + static bar2: &[i32] = &(&[1i32,2,3][0..1]);
-   |
+   |                                    ^ expected one of `)`, `,`, `.`, `?`, or an operator
 
 error: cast cannot be followed by `?`
-  --> $DIR/issue-35813-postfix-after-cast.rs:119:5
+  --> $DIR/issue-35813-postfix-after-cast.rs:138:5
    |
 LL |     Err(0u64) as Result<u64,u64>?;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -331,24 +251,28 @@ help: try surrounding the expression in parentheses
 LL |     (Err(0u64) as Result<u64,u64>)?;
    |     +                            +
 
-error: type ascription cannot be followed by `?`
-  --> $DIR/issue-35813-postfix-after-cast.rs:121:5
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:140:14
    |
 LL |     Err(0u64): Result<u64,u64>?;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
+   |              ^ expected one of `.`, `;`, `?`, `}`, or an operator
+
+error: expected identifier, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:152:13
    |
-LL |     (Err(0u64): Result<u64,u64>)?;
-   |     +                          +
-help: alternatively, remove the type ascription
+LL |     drop_ptr: F();
+   |             ^ expected identifier
    |
-LL -     Err(0u64): Result<u64,u64>?;
-LL +     Err(0u64)?;
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
+
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:159:13
    |
+LL |     drop_ptr: fn(u8);
+   |             ^ expected one of 8 possible tokens
 
 error: cast cannot be followed by a function call
-  --> $DIR/issue-35813-postfix-after-cast.rs:145:5
+  --> $DIR/issue-35813-postfix-after-cast.rs:165:5
    |
 LL |     drop as fn(u8)(0);
    |     ^^^^^^^^^^^^^^
@@ -358,24 +282,14 @@ help: try surrounding the expression in parentheses
 LL |     (drop as fn(u8))(0);
    |     +              +
 
-error: type ascription cannot be followed by a function call
-  --> $DIR/issue-35813-postfix-after-cast.rs:147:5
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:167:13
    |
 LL |     drop_ptr: fn(u8)(0);
-   |     ^^^^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |     (drop_ptr: fn(u8))(0);
-   |     +                +
-help: alternatively, remove the type ascription
-   |
-LL -     drop_ptr: fn(u8)(0);
-LL +     drop_ptr(0);
-   |
+   |             ^ expected one of 8 possible tokens
 
 error: cast cannot be followed by `.await`
-  --> $DIR/issue-35813-postfix-after-cast.rs:152:5
+  --> $DIR/issue-35813-postfix-after-cast.rs:172:5
    |
 LL |     Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>.await;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -385,24 +299,14 @@ help: try surrounding the expression in parentheses
 LL |     (Box::pin(noop()) as Pin<Box<dyn Future<Output = ()>>>).await;
    |     +                                                     +
 
-error: type ascription cannot be followed by `.await`
-  --> $DIR/issue-35813-postfix-after-cast.rs:155:5
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:175:21
    |
 LL |     Box::pin(noop()): Pin<Box<_>>.await;
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |     (Box::pin(noop()): Pin<Box<_>>).await;
-   |     +                             +
-help: alternatively, remove the type ascription
-   |
-LL -     Box::pin(noop()): Pin<Box<_>>.await;
-LL +     Box::pin(noop()).await;
-   |
+   |                     ^ expected one of `.`, `;`, `?`, `}`, or an operator
 
 error: cast cannot be followed by a field access
-  --> $DIR/issue-35813-postfix-after-cast.rs:167:5
+  --> $DIR/issue-35813-postfix-after-cast.rs:187:5
    |
 LL |     Foo::default() as Foo.bar;
    |     ^^^^^^^^^^^^^^^^^^^^^
@@ -412,24 +316,14 @@ help: try surrounding the expression in parentheses
 LL |     (Foo::default() as Foo).bar;
    |     +                     +
 
-error: type ascription cannot be followed by a field access
-  --> $DIR/issue-35813-postfix-after-cast.rs:169:5
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:189:19
    |
 LL |     Foo::default(): Foo.bar;
-   |     ^^^^^^^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |     (Foo::default(): Foo).bar;
-   |     +                   +
-help: alternatively, remove the type ascription
-   |
-LL -     Foo::default(): Foo.bar;
-LL +     Foo::default().bar;
-   |
+   |                   ^ expected one of `.`, `;`, `?`, `}`, or an operator
 
 error: cast cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:84:9
+  --> $DIR/issue-35813-postfix-after-cast.rs:103:9
    |
 LL |         if true { 33 } else { 44 } as i32.max(0),
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -439,34 +333,18 @@ help: try surrounding the expression in parentheses
 LL |         (if true { 33 } else { 44 } as i32).max(0),
    |         +                                 +
 
-error: type ascription cannot be followed by a method call
-  --> $DIR/issue-35813-postfix-after-cast.rs:86:9
+error: expected one of `,`, `.`, `?`, or an operator, found `:`
+  --> $DIR/issue-35813-postfix-after-cast.rs:105:35
    |
 LL |         if true { 33 } else { 44 }: i32.max(0)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-help: try surrounding the expression in parentheses
-   |
-LL |         (if true { 33 } else { 44 }: i32).max(0)
-   |         +                               +
-help: alternatively, remove the type ascription
-   |
-LL -         if true { 33 } else { 44 }: i32.max(0)
-LL +         if true { 33 } else { 44 }.max(0)
-   |
+   |                                   ^ expected one of `,`, `.`, `?`, or an operator
 
 error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/issue-35813-postfix-after-cast.rs:131:13
+  --> $DIR/issue-35813-postfix-after-cast.rs:150:13
    |
 LL |     drop as F();
    |             ^^^ only `Fn` traits may use parentheses
 
-error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/issue-35813-postfix-after-cast.rs:133:15
-   |
-LL |     drop_ptr: F();
-   |               ^^^ only `Fn` traits may use parentheses
-
-error: aborting due to 36 previous errors
+error: aborting due to 39 previous errors
 
 For more information about this error, try `rustc --explain E0214`.
diff --git a/tests/ui/parser/issues/issue-44406.rs b/tests/ui/parser/issues/issue-44406.rs
index a5b7e83a016..6719e582848 100644
--- a/tests/ui/parser/issues/issue-44406.rs
+++ b/tests/ui/parser/issues/issue-44406.rs
@@ -6,5 +6,4 @@ macro_rules! foo {
 
 fn main() {
     foo!(true);
-    //~^ ERROR expected identifier, found keyword
 }
diff --git a/tests/ui/parser/issues/issue-44406.stderr b/tests/ui/parser/issues/issue-44406.stderr
index de02ea85b27..69ff64c2772 100644
--- a/tests/ui/parser/issues/issue-44406.stderr
+++ b/tests/ui/parser/issues/issue-44406.stderr
@@ -1,14 +1,3 @@
-error: expected identifier, found keyword `true`
-  --> $DIR/issue-44406.rs:8:10
-   |
-LL |     foo!(true);
-   |          ^^^^ expected identifier, found keyword
-   |
-help: escape `true` to use it as an identifier
-   |
-LL |     foo!(r#true);
-   |          ++
-
 error: invalid `struct` delimiters or `fn` call arguments
   --> $DIR/issue-44406.rs:3:9
    |
@@ -29,5 +18,5 @@ LL -         bar(baz: $rest)
 LL +         bar(: $rest)
    |
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
diff --git a/tests/ui/parser/issues/issue-62913.rs b/tests/ui/parser/issues/issue-62913.rs
index 0db06f636c3..a55ef5ac710 100644
--- a/tests/ui/parser/issues/issue-62913.rs
+++ b/tests/ui/parser/issues/issue-62913.rs
@@ -1,4 +1,4 @@
 "\u\\"
 //~^ ERROR incorrect unicode escape sequence
 //~| ERROR invalid trailing slash in literal
-//~| ERROR expected item, found `"\u\\"`
+//~| ERROR expected item, found `"\u\"`
diff --git a/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.fixed b/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.fixed
index 95019b27869..2c42f973174 100644
--- a/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.fixed
+++ b/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.fixed
@@ -6,9 +6,12 @@
 
 fn main() {}
 
-pub fn f1<T>() {}
+pub fn f1<T: 'static>() {}
 //~^ ERROR negative bounds are not supported
-pub fn f2<'a, T: Ord>() {}
+//~| ERROR `!` may only modify trait bounds, not lifetime bound
+pub fn f2<'a, T: Ord + 'a>() {}
 //~^ ERROR negative bounds are not supported
-pub fn f3<'a, T: Ord>() {}
+//~| ERROR `!` may only modify trait bounds, not lifetime bound
+pub fn f3<'a, T: 'a + Ord>() {}
 //~^ ERROR negative bounds are not supported
+//~| ERROR `!` may only modify trait bounds, not lifetime bound
diff --git a/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.rs b/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.rs
index 82f54f8faa9..e510efaae5b 100644
--- a/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.rs
+++ b/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.rs
@@ -8,7 +8,10 @@ fn main() {}
 
 pub fn f1<T: !'static>() {}
 //~^ ERROR negative bounds are not supported
+//~| ERROR `!` may only modify trait bounds, not lifetime bound
 pub fn f2<'a, T: Ord + !'a>() {}
 //~^ ERROR negative bounds are not supported
+//~| ERROR `!` may only modify trait bounds, not lifetime bound
 pub fn f3<'a, T: !'a + Ord>() {}
 //~^ ERROR negative bounds are not supported
+//~| ERROR `!` may only modify trait bounds, not lifetime bound
diff --git a/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.stderr b/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.stderr
index a4a422948ac..91fe02db3a6 100644
--- a/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.stderr
+++ b/tests/ui/parser/issues/issue-67146-negative-outlives-bound-syntactic-fail.stderr
@@ -1,20 +1,38 @@
+error: `!` may only modify trait bounds, not lifetime bounds
+  --> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:9:14
+   |
+LL | pub fn f1<T: !'static>() {}
+   |              ^
+
+error: `!` may only modify trait bounds, not lifetime bounds
+  --> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:12:24
+   |
+LL | pub fn f2<'a, T: Ord + !'a>() {}
+   |                        ^
+
+error: `!` may only modify trait bounds, not lifetime bounds
+  --> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:15:18
+   |
+LL | pub fn f3<'a, T: !'a + Ord>() {}
+   |                  ^
+
 error: negative bounds are not supported
-  --> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:9:12
+  --> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:9:14
    |
 LL | pub fn f1<T: !'static>() {}
-   |            ^^^^^^^^^^ negative bounds are not supported
+   |              ^
 
 error: negative bounds are not supported
-  --> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:11:22
+  --> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:12:24
    |
 LL | pub fn f2<'a, T: Ord + !'a>() {}
-   |                      ^^^^^ negative bounds are not supported
+   |                        ^
 
 error: negative bounds are not supported
-  --> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:13:16
+  --> $DIR/issue-67146-negative-outlives-bound-syntactic-fail.rs:15:18
    |
 LL | pub fn f3<'a, T: !'a + Ord>() {}
-   |                ^^^^^ negative bounds are not supported
+   |                  ^
 
-error: aborting due to 3 previous errors
+error: aborting due to 6 previous errors
 
diff --git a/tests/ui/parser/issues/issue-91461.rs b/tests/ui/parser/issues/issue-91461.rs
index 3e3c411c478..80e0940ad8f 100644
--- a/tests/ui/parser/issues/issue-91461.rs
+++ b/tests/ui/parser/issues/issue-91461.rs
@@ -1,6 +1,5 @@
 fn main() {
     a(_:b:,)
-    //~^ ERROR: expected identifier, found reserved identifier `_`
-    //~| ERROR: expected type, found `,`
-    //~| ERROR: expected type, found `,`
+    //~^ ERROR expected identifier, found reserved identifier
+    //~| ERROR: expected one of
 }
diff --git a/tests/ui/parser/issues/issue-91461.stderr b/tests/ui/parser/issues/issue-91461.stderr
index 94fcf1721d8..27e1b5cdc17 100644
--- a/tests/ui/parser/issues/issue-91461.stderr
+++ b/tests/ui/parser/issues/issue-91461.stderr
@@ -4,28 +4,11 @@ error: expected identifier, found reserved identifier `_`
 LL |     a(_:b:,)
    |       ^ expected identifier, found reserved identifier
 
-error: expected type, found `,`
-  --> $DIR/issue-91461.rs:2:11
+error: expected one of `)`, `,`, `.`, `?`, or an operator, found `:`
+  --> $DIR/issue-91461.rs:2:8
    |
 LL |     a(_:b:,)
-   |     -    -^ expected type
-   |     |    |
-   |     |    tried to parse a type due to this type ascription
-   |     while parsing this struct
-   |
-   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
-   = note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information
-
-error: expected type, found `,`
-  --> $DIR/issue-91461.rs:2:11
-   |
-LL |     a(_:b:,)
-   |          -^ expected type
-   |          |
-   |          tried to parse a type due to this type ascription
-   |
-   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
-   = note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information
+   |        ^ expected one of `)`, `,`, `.`, `?`, or an operator
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.rs b/tests/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.rs
index a709e34b501..01a978d5557 100644
--- a/tests/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.rs
+++ b/tests/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.rs
@@ -22,8 +22,7 @@ fn case_1() {
 #[cfg(FALSE)]
 fn case_2() {
     let a @ (b: u8);
-    //~^ ERROR expected one of `!`
-    //~| ERROR expected one of `)`
+    //~^ ERROR expected one of `)`
 }
 
 #[cfg(FALSE)]
diff --git a/tests/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.stderr b/tests/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.stderr
index 27660ae406e..0c109ff6bba 100644
--- a/tests/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.stderr
+++ b/tests/ui/pattern/bindings-after-at/nested-type-ascription-syntactically-invalid.stderr
@@ -9,18 +9,14 @@ error: expected one of `)`, `,`, `@`, or `|`, found `:`
    |
 LL |     let a @ (b: u8);
    |               ^ expected one of `)`, `,`, `@`, or `|`
-
-error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found `)`
-  --> $DIR/nested-type-ascription-syntactically-invalid.rs:24:19
    |
-LL |     let a @ (b: u8);
-   |                   ^ expected one of 7 possible tokens
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: expected one of `!`, `(`, `+`, `::`, `;`, `<`, or `=`, found `@`
-  --> $DIR/nested-type-ascription-syntactically-invalid.rs:31:15
+  --> $DIR/nested-type-ascription-syntactically-invalid.rs:30:15
    |
 LL |     let a: T1 @ Outer(b: T2);
    |               ^ expected one of 7 possible tokens
 
-error: aborting due to 4 previous errors
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr b/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr
index c7c7c074f7c..a033cc0655e 100644
--- a/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr
+++ b/tests/ui/pattern/move-ref-patterns/borrowck-move-ref-pattern.stderr
@@ -112,7 +112,7 @@ LL |     *_x0 = U;
 help: consider changing this to be a mutable reference
    |
 LL |     let (ref mut _x0, _x1, ref _x2, ..) = tup;
-   |          ~~~~~~~~~~~
+   |              +++
 
 error[E0594]: cannot assign to `*_x2`, which is behind a `&` reference
   --> $DIR/borrowck-move-ref-pattern.rs:27:5
@@ -123,7 +123,7 @@ LL |     *_x2 = U;
 help: consider changing this to be a mutable reference
    |
 LL |     let (ref _x0, _x1, ref mut _x2, ..) = tup;
-   |                        ~~~~~~~~~~~
+   |                            +++
 
 error[E0382]: use of moved value: `tup.1`
   --> $DIR/borrowck-move-ref-pattern.rs:28:10
diff --git a/tests/ui/phantom-auto-trait.stderr b/tests/ui/phantom-auto-trait.stderr
index 4769d53eb35..5af648f6a0c 100644
--- a/tests/ui/phantom-auto-trait.stderr
+++ b/tests/ui/phantom-auto-trait.stderr
@@ -11,7 +11,8 @@ note: required for `&T` to implement `Zen`
    |
 LL | unsafe impl<'a, T: 'a> Zen for &'a T where T: Sync {}
    |                        ^^^     ^^^^^          ---- unsatisfied trait bound introduced here
-   = note: required because it appears within the type `PhantomData<&T>`
+note: required because it appears within the type `PhantomData<&T>`
+  --> $SRC_DIR/core/src/marker.rs:LL:COL
 note: required because it appears within the type `Guard<'_, T>`
   --> $DIR/phantom-auto-trait.rs:12:8
    |
@@ -40,7 +41,8 @@ note: required for `&T` to implement `Zen`
    |
 LL | unsafe impl<'a, T: 'a> Zen for &'a T where T: Sync {}
    |                        ^^^     ^^^^^          ---- unsatisfied trait bound introduced here
-   = note: required because it appears within the type `PhantomData<&T>`
+note: required because it appears within the type `PhantomData<&T>`
+  --> $SRC_DIR/core/src/marker.rs:LL:COL
 note: required because it appears within the type `Guard<'_, T>`
   --> $DIR/phantom-auto-trait.rs:12:8
    |
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/range/issue-54505-no-literals.fixed b/tests/ui/range/issue-54505-no-literals.fixed
index 4d8f67182b9..71c36c741cc 100644
--- a/tests/ui/range/issue-54505-no-literals.fixed
+++ b/tests/ui/range/issue-54505-no-literals.fixed
@@ -16,60 +16,60 @@ fn main() {
     take_range(&std::ops::Range { start: 0, end: 1 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::Range { start: 0, end: 1 }
+    //~| SUGGESTION &
 
     take_range(&::std::ops::Range { start: 0, end: 1 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::Range { start: 0, end: 1 }
+    //~| SUGGESTION &
 
     take_range(&std::ops::RangeFrom { start: 1 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeFrom { start: 1 }
+    //~| SUGGESTION &
 
     take_range(&::std::ops::RangeFrom { start: 1 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeFrom { start: 1 }
+    //~| SUGGESTION &
 
     take_range(&std::ops::RangeFull {});
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeFull {}
+    //~| SUGGESTION &
 
     take_range(&::std::ops::RangeFull {});
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeFull {}
+    //~| SUGGESTION &
 
     take_range(&std::ops::RangeInclusive::new(0, 1));
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeInclusive::new(0, 1)
+    //~| SUGGESTION &
 
     take_range(&::std::ops::RangeInclusive::new(0, 1));
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeInclusive::new(0, 1)
+    //~| SUGGESTION &
 
     take_range(&std::ops::RangeTo { end: 5 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeTo { end: 5 }
+    //~| SUGGESTION &
 
     take_range(&::std::ops::RangeTo { end: 5 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeTo { end: 5 }
+    //~| SUGGESTION &
 
     take_range(&std::ops::RangeToInclusive { end: 5 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeToInclusive { end: 5 }
+    //~| SUGGESTION &
 
     take_range(&::std::ops::RangeToInclusive { end: 5 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeToInclusive { end: 5 }
+    //~| SUGGESTION &
 }
diff --git a/tests/ui/range/issue-54505-no-literals.rs b/tests/ui/range/issue-54505-no-literals.rs
index dc21dcbc2db..db125d1a22b 100644
--- a/tests/ui/range/issue-54505-no-literals.rs
+++ b/tests/ui/range/issue-54505-no-literals.rs
@@ -16,60 +16,60 @@ fn main() {
     take_range(std::ops::Range { start: 0, end: 1 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::Range { start: 0, end: 1 }
+    //~| SUGGESTION &
 
     take_range(::std::ops::Range { start: 0, end: 1 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::Range { start: 0, end: 1 }
+    //~| SUGGESTION &
 
     take_range(std::ops::RangeFrom { start: 1 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeFrom { start: 1 }
+    //~| SUGGESTION &
 
     take_range(::std::ops::RangeFrom { start: 1 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeFrom { start: 1 }
+    //~| SUGGESTION &
 
     take_range(std::ops::RangeFull {});
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeFull {}
+    //~| SUGGESTION &
 
     take_range(::std::ops::RangeFull {});
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeFull {}
+    //~| SUGGESTION &
 
     take_range(std::ops::RangeInclusive::new(0, 1));
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeInclusive::new(0, 1)
+    //~| SUGGESTION &
 
     take_range(::std::ops::RangeInclusive::new(0, 1));
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeInclusive::new(0, 1)
+    //~| SUGGESTION &
 
     take_range(std::ops::RangeTo { end: 5 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeTo { end: 5 }
+    //~| SUGGESTION &
 
     take_range(::std::ops::RangeTo { end: 5 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeTo { end: 5 }
+    //~| SUGGESTION &
 
     take_range(std::ops::RangeToInclusive { end: 5 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &std::ops::RangeToInclusive { end: 5 }
+    //~| SUGGESTION &
 
     take_range(::std::ops::RangeToInclusive { end: 5 });
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &::std::ops::RangeToInclusive { end: 5 }
+    //~| SUGGESTION &
 }
diff --git a/tests/ui/range/issue-54505-no-literals.stderr b/tests/ui/range/issue-54505-no-literals.stderr
index d112983848d..5894bb6ba55 100644
--- a/tests/ui/range/issue-54505-no-literals.stderr
+++ b/tests/ui/range/issue-54505-no-literals.stderr
@@ -2,10 +2,8 @@ error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:16:16
    |
 LL |     take_range(std::ops::Range { start: 0, end: 1 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `Range<{integer}>`
-   |     |          help: consider borrowing here: `&std::ops::Range { start: 0, end: 1 }`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `Range<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -15,15 +13,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&std::ops::Range { start: 0, end: 1 });
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:21:16
    |
 LL |     take_range(::std::ops::Range { start: 0, end: 1 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `Range<{integer}>`
-   |     |          help: consider borrowing here: `&::std::ops::Range { start: 0, end: 1 }`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `Range<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -33,15 +33,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&::std::ops::Range { start: 0, end: 1 });
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:26:16
    |
 LL |     take_range(std::ops::RangeFrom { start: 1 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeFrom<{integer}>`
-   |     |          help: consider borrowing here: `&std::ops::RangeFrom { start: 1 }`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `RangeFrom<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -51,15 +53,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&std::ops::RangeFrom { start: 1 });
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:31:16
    |
 LL |     take_range(::std::ops::RangeFrom { start: 1 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeFrom<{integer}>`
-   |     |          help: consider borrowing here: `&::std::ops::RangeFrom { start: 1 }`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `RangeFrom<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -69,15 +73,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&::std::ops::RangeFrom { start: 1 });
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:36:16
    |
 LL |     take_range(std::ops::RangeFull {});
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeFull`
-   |     |          help: consider borrowing here: `&std::ops::RangeFull {}`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `RangeFull`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -87,15 +93,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&std::ops::RangeFull {});
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:41:16
    |
 LL |     take_range(::std::ops::RangeFull {});
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeFull`
-   |     |          help: consider borrowing here: `&::std::ops::RangeFull {}`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `RangeFull`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -105,15 +113,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&::std::ops::RangeFull {});
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:46:16
    |
 LL |     take_range(std::ops::RangeInclusive::new(0, 1));
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeInclusive<{integer}>`
-   |     |          help: consider borrowing here: `&std::ops::RangeInclusive::new(0, 1)`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `RangeInclusive<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -123,15 +133,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&std::ops::RangeInclusive::new(0, 1));
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:51:16
    |
 LL |     take_range(::std::ops::RangeInclusive::new(0, 1));
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeInclusive<{integer}>`
-   |     |          help: consider borrowing here: `&::std::ops::RangeInclusive::new(0, 1)`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `RangeInclusive<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -141,15 +153,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&::std::ops::RangeInclusive::new(0, 1));
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:56:16
    |
 LL |     take_range(std::ops::RangeTo { end: 5 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeTo<{integer}>`
-   |     |          help: consider borrowing here: `&std::ops::RangeTo { end: 5 }`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `RangeTo<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -159,15 +173,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&std::ops::RangeTo { end: 5 });
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:61:16
    |
 LL |     take_range(::std::ops::RangeTo { end: 5 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeTo<{integer}>`
-   |     |          help: consider borrowing here: `&::std::ops::RangeTo { end: 5 }`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `RangeTo<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -177,15 +193,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&::std::ops::RangeTo { end: 5 });
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:66:16
    |
 LL |     take_range(std::ops::RangeToInclusive { end: 5 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeToInclusive<{integer}>`
-   |     |          help: consider borrowing here: `&std::ops::RangeToInclusive { end: 5 }`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `RangeToInclusive<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -195,15 +213,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&std::ops::RangeToInclusive { end: 5 });
+   |                +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-literals.rs:71:16
    |
 LL |     take_range(::std::ops::RangeToInclusive { end: 5 });
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeToInclusive<{integer}>`
-   |     |          help: consider borrowing here: `&::std::ops::RangeToInclusive { end: 5 }`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `&_`, found `RangeToInclusive<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -213,6 +233,10 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&::std::ops::RangeToInclusive { end: 5 });
+   |                +
 
 error: aborting due to 12 previous errors
 
diff --git a/tests/ui/range/issue-54505-no-std.rs b/tests/ui/range/issue-54505-no-std.rs
index 9f378b4836e..db455fada3b 100644
--- a/tests/ui/range/issue-54505-no-std.rs
+++ b/tests/ui/range/issue-54505-no-std.rs
@@ -29,30 +29,30 @@ fn main() {
     take_range(0..1);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..1)
+    //~| SUGGESTION &(
 
     take_range(1..);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(1..)
+    //~| SUGGESTION &(
 
     take_range(..);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(..)
+    //~| SUGGESTION &(
 
     take_range(0..=1);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..=1)
+    //~| SUGGESTION &(
 
     take_range(..5);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(..5)
+    //~| SUGGESTION &(
 
     take_range(..=42);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(..=42)
+    //~| SUGGESTION &(
 }
diff --git a/tests/ui/range/issue-54505-no-std.stderr b/tests/ui/range/issue-54505-no-std.stderr
index a6a9f89da74..13563d1940c 100644
--- a/tests/ui/range/issue-54505-no-std.stderr
+++ b/tests/ui/range/issue-54505-no-std.stderr
@@ -14,10 +14,8 @@ error[E0308]: mismatched types
   --> $DIR/issue-54505-no-std.rs:29:16
    |
 LL |     take_range(0..1);
-   |     ---------- ^^^^
-   |     |          |
-   |     |          expected `&_`, found `Range<{integer}>`
-   |     |          help: consider borrowing here: `&(0..1)`
+   |     ---------- ^^^^ expected `&_`, found `Range<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -27,15 +25,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(0..1));
+   |                ++    +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-std.rs:34:16
    |
 LL |     take_range(1..);
-   |     ---------- ^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeFrom<{integer}>`
-   |     |          help: consider borrowing here: `&(1..)`
+   |     ---------- ^^^ expected `&_`, found `RangeFrom<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -45,15 +45,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(1..));
+   |                ++   +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-std.rs:39:16
    |
 LL |     take_range(..);
-   |     ---------- ^^
-   |     |          |
-   |     |          expected `&_`, found `RangeFull`
-   |     |          help: consider borrowing here: `&(..)`
+   |     ---------- ^^ expected `&_`, found `RangeFull`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -63,15 +65,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(..));
+   |                ++  +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-std.rs:44:16
    |
 LL |     take_range(0..=1);
-   |     ---------- ^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeInclusive<{integer}>`
-   |     |          help: consider borrowing here: `&(0..=1)`
+   |     ---------- ^^^^^ expected `&_`, found `RangeInclusive<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -81,15 +85,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(0..=1));
+   |                ++     +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-std.rs:49:16
    |
 LL |     take_range(..5);
-   |     ---------- ^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeTo<{integer}>`
-   |     |          help: consider borrowing here: `&(..5)`
+   |     ---------- ^^^ expected `&_`, found `RangeTo<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -99,15 +105,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(..5));
+   |                ++   +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505-no-std.rs:54:16
    |
 LL |     take_range(..=42);
-   |     ---------- ^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeToInclusive<{integer}>`
-   |     |          help: consider borrowing here: `&(..=42)`
+   |     ---------- ^^^^^ expected `&_`, found `RangeToInclusive<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -117,6 +125,10 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(..=42));
+   |                ++     +
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/range/issue-54505.fixed b/tests/ui/range/issue-54505.fixed
index f8298c0b5ce..9d113ba1d35 100644
--- a/tests/ui/range/issue-54505.fixed
+++ b/tests/ui/range/issue-54505.fixed
@@ -14,30 +14,30 @@ fn main() {
     take_range(&(0..1));
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..1)
+    //~| SUGGESTION &(
 
     take_range(&(1..));
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(1..)
+    //~| SUGGESTION &(
 
     take_range(&(..));
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(..)
+    //~| SUGGESTION &(
 
     take_range(&(0..=1));
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..=1)
+    //~| SUGGESTION &(
 
     take_range(&(..5));
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(..5)
+    //~| SUGGESTION &(
 
     take_range(&(..=42));
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(..=42)
+    //~| SUGGESTION &(
 }
diff --git a/tests/ui/range/issue-54505.rs b/tests/ui/range/issue-54505.rs
index 03673252dd3..c9929988fe5 100644
--- a/tests/ui/range/issue-54505.rs
+++ b/tests/ui/range/issue-54505.rs
@@ -14,30 +14,30 @@ fn main() {
     take_range(0..1);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..1)
+    //~| SUGGESTION &(
 
     take_range(1..);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(1..)
+    //~| SUGGESTION &(
 
     take_range(..);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(..)
+    //~| SUGGESTION &(
 
     take_range(0..=1);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(0..=1)
+    //~| SUGGESTION &(
 
     take_range(..5);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(..5)
+    //~| SUGGESTION &(
 
     take_range(..=42);
     //~^ ERROR mismatched types [E0308]
     //~| HELP consider borrowing here
-    //~| SUGGESTION &(..=42)
+    //~| SUGGESTION &(
 }
diff --git a/tests/ui/range/issue-54505.stderr b/tests/ui/range/issue-54505.stderr
index eda047b507a..0e959fc05e2 100644
--- a/tests/ui/range/issue-54505.stderr
+++ b/tests/ui/range/issue-54505.stderr
@@ -2,10 +2,8 @@ error[E0308]: mismatched types
   --> $DIR/issue-54505.rs:14:16
    |
 LL |     take_range(0..1);
-   |     ---------- ^^^^
-   |     |          |
-   |     |          expected `&_`, found `Range<{integer}>`
-   |     |          help: consider borrowing here: `&(0..1)`
+   |     ---------- ^^^^ expected `&_`, found `Range<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -15,15 +13,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(0..1));
+   |                ++    +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505.rs:19:16
    |
 LL |     take_range(1..);
-   |     ---------- ^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeFrom<{integer}>`
-   |     |          help: consider borrowing here: `&(1..)`
+   |     ---------- ^^^ expected `&_`, found `RangeFrom<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -33,15 +33,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(1..));
+   |                ++   +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505.rs:24:16
    |
 LL |     take_range(..);
-   |     ---------- ^^
-   |     |          |
-   |     |          expected `&_`, found `RangeFull`
-   |     |          help: consider borrowing here: `&(..)`
+   |     ---------- ^^ expected `&_`, found `RangeFull`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -51,15 +53,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(..));
+   |                ++  +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505.rs:29:16
    |
 LL |     take_range(0..=1);
-   |     ---------- ^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeInclusive<{integer}>`
-   |     |          help: consider borrowing here: `&(0..=1)`
+   |     ---------- ^^^^^ expected `&_`, found `RangeInclusive<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -69,15 +73,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(0..=1));
+   |                ++     +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505.rs:34:16
    |
 LL |     take_range(..5);
-   |     ---------- ^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeTo<{integer}>`
-   |     |          help: consider borrowing here: `&(..5)`
+   |     ---------- ^^^ expected `&_`, found `RangeTo<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -87,15 +93,17 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(..5));
+   |                ++   +
 
 error[E0308]: mismatched types
   --> $DIR/issue-54505.rs:39:16
    |
 LL |     take_range(..=42);
-   |     ---------- ^^^^^
-   |     |          |
-   |     |          expected `&_`, found `RangeToInclusive<{integer}>`
-   |     |          help: consider borrowing here: `&(..=42)`
+   |     ---------- ^^^^^ expected `&_`, found `RangeToInclusive<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -105,6 +113,10 @@ note: function defined here
    |
 LL | fn take_range(_r: &impl RangeBounds<i8>) {}
    |    ^^^^^^^^^^ -------------------------
+help: consider borrowing here
+   |
+LL |     take_range(&(..=42));
+   |                ++     +
 
 error: aborting due to 6 previous errors
 
diff --git a/tests/ui/range/issue-73553-misinterp-range-literal.stderr b/tests/ui/range/issue-73553-misinterp-range-literal.stderr
index 77595b3678e..52efa241d0b 100644
--- a/tests/ui/range/issue-73553-misinterp-range-literal.stderr
+++ b/tests/ui/range/issue-73553-misinterp-range-literal.stderr
@@ -2,10 +2,8 @@ error[E0308]: mismatched types
   --> $DIR/issue-73553-misinterp-range-literal.rs:12:10
    |
 LL |     demo(tell(1)..tell(10));
-   |     ---- ^^^^^^^^^^^^^^^^^
-   |     |    |
-   |     |    expected `&Range<usize>`, found `Range<usize>`
-   |     |    help: consider borrowing here: `&(tell(1)..tell(10))`
+   |     ---- ^^^^^^^^^^^^^^^^^ expected `&Range<usize>`, found `Range<usize>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&std::ops::Range<usize>`
@@ -15,15 +13,17 @@ note: function defined here
    |
 LL | fn demo(r: &Range) {
    |    ^^^^ ---------
+help: consider borrowing here
+   |
+LL |     demo(&(tell(1)..tell(10)));
+   |          ++                 +
 
 error[E0308]: mismatched types
   --> $DIR/issue-73553-misinterp-range-literal.rs:14:10
    |
 LL |     demo(1..10);
-   |     ---- ^^^^^
-   |     |    |
-   |     |    expected `&Range<usize>`, found `Range<{integer}>`
-   |     |    help: consider borrowing here: `&(1..10)`
+   |     ---- ^^^^^ expected `&Range<usize>`, found `Range<{integer}>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&std::ops::Range<usize>`
@@ -33,6 +33,10 @@ note: function defined here
    |
 LL | fn demo(r: &Range) {
    |    ^^^^ ---------
+help: consider borrowing here
+   |
+LL |     demo(&(1..10));
+   |          ++     +
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/reachable/auxiliary/foreign-priv-aux.rs b/tests/ui/reachable/auxiliary/foreign-priv-aux.rs
new file mode 100644
index 00000000000..10dc0861461
--- /dev/null
+++ b/tests/ui/reachable/auxiliary/foreign-priv-aux.rs
@@ -0,0 +1,21 @@
+trait PrivTrait {
+    fn priv_fn(&self);
+}
+
+pub struct ImplPrivTrait;
+
+impl PrivTrait for ImplPrivTrait {
+    fn priv_fn(&self) {}
+}
+
+pub struct Wrapper<T>(T);
+
+pub trait PubTrait {
+    fn pub_fn(&self);
+}
+
+impl<T: PrivTrait> PubTrait for Wrapper<T> {
+    fn pub_fn(&self) {
+        self.0.priv_fn()
+    }
+}
diff --git a/tests/ui/reachable/foreign-priv.rs b/tests/ui/reachable/foreign-priv.rs
new file mode 100644
index 00000000000..bf336b6be7a
--- /dev/null
+++ b/tests/ui/reachable/foreign-priv.rs
@@ -0,0 +1,12 @@
+// aux-build:foreign-priv-aux.rs
+// build-pass
+
+#![crate_type = "lib"]
+
+extern crate foreign_priv_aux;
+
+use foreign_priv_aux::{ImplPrivTrait, PubTrait, Wrapper};
+
+pub fn foo(x: Wrapper<ImplPrivTrait>) {
+    x.pub_fn();
+}
diff --git a/tests/ui/issues/issue-948.rs b/tests/ui/reachable/issue-948.rs
index b9bbeb3951e..b9bbeb3951e 100644
--- a/tests/ui/issues/issue-948.rs
+++ b/tests/ui/reachable/issue-948.rs
diff --git a/tests/ui/recursion/recursive-requirements.stderr b/tests/ui/recursion/recursive-requirements.stderr
index 8ee154ce57b..bb63f7cd0dc 100644
--- a/tests/ui/recursion/recursive-requirements.stderr
+++ b/tests/ui/recursion/recursive-requirements.stderr
@@ -28,7 +28,8 @@ note: required because it appears within the type `Bar`
    |
 LL | pub struct Bar {
    |            ^^^
-   = note: required because it appears within the type `PhantomData<Bar>`
+note: required because it appears within the type `PhantomData<Bar>`
+  --> $SRC_DIR/core/src/marker.rs:LL:COL
 note: required because it appears within the type `Foo`
   --> $DIR/recursive-requirements.rs:5:12
    |
diff --git a/tests/ui/repr/invalid_repr_list_help.rs b/tests/ui/repr/invalid_repr_list_help.rs
index c320984536c..785ffb1e0f4 100644
--- a/tests/ui/repr/invalid_repr_list_help.rs
+++ b/tests/ui/repr/invalid_repr_list_help.rs
@@ -15,3 +15,8 @@ pub struct OwO3 {
 pub enum OwO4 {
     UwU = 1,
 }
+
+#[repr(uwu)] //~ERROR: unrecognized representation hint
+#[doc(owo)]  //~WARN: unknown `doc` attribute
+             //~^ WARN: this was previously
+pub struct Owo5;
diff --git a/tests/ui/repr/invalid_repr_list_help.stderr b/tests/ui/repr/invalid_repr_list_help.stderr
index 2acd56d9a32..48a6af3dd4c 100644
--- a/tests/ui/repr/invalid_repr_list_help.stderr
+++ b/tests/ui/repr/invalid_repr_list_help.stderr
@@ -30,6 +30,24 @@ LL | #[repr(uwu, u8)]
    |
    = help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
 
-error: aborting due to 4 previous errors
+warning: unknown `doc` attribute `owo`
+  --> $DIR/invalid_repr_list_help.rs:20:7
+   |
+LL | #[doc(owo)]
+   |       ^^^
+   |
+   = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+   = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
+   = note: `#[warn(invalid_doc_attributes)]` on by default
+
+error[E0552]: unrecognized representation hint
+  --> $DIR/invalid_repr_list_help.rs:19:8
+   |
+LL | #[repr(uwu)]
+   |        ^^^
+   |
+   = help: valid reprs are `C`, `align`, `packed`, `transparent`, `simd`, `i8`, `u8`, `i16`, `u16`, `i32`, `u32`, `i64`, `u64`, `i128`, `u128`, `isize`, `usize`
+
+error: aborting due to 5 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0552`.
diff --git a/tests/ui/issues/issue-3099-a.rs b/tests/ui/resolve/issue-3099-a.rs
index 9c3d8cf5a55..9c3d8cf5a55 100644
--- a/tests/ui/issues/issue-3099-a.rs
+++ b/tests/ui/resolve/issue-3099-a.rs
diff --git a/tests/ui/issues/issue-3099-a.stderr b/tests/ui/resolve/issue-3099-a.stderr
index e3733cebba5..e3733cebba5 100644
--- a/tests/ui/issues/issue-3099-a.stderr
+++ b/tests/ui/resolve/issue-3099-a.stderr
diff --git a/tests/ui/issues/issue-3099-b.rs b/tests/ui/resolve/issue-3099-b.rs
index 71952c3b060..71952c3b060 100644
--- a/tests/ui/issues/issue-3099-b.rs
+++ b/tests/ui/resolve/issue-3099-b.rs
diff --git a/tests/ui/issues/issue-3099-b.stderr b/tests/ui/resolve/issue-3099-b.stderr
index c0cfefeb940..c0cfefeb940 100644
--- a/tests/ui/issues/issue-3099-b.stderr
+++ b/tests/ui/resolve/issue-3099-b.stderr
diff --git a/tests/ui/rfc-2627-raw-dylib/dlltool-failed.rs b/tests/ui/rfc-2627-raw-dylib/dlltool-failed.rs
new file mode 100644
index 00000000000..d7a418959bf
--- /dev/null
+++ b/tests/ui/rfc-2627-raw-dylib/dlltool-failed.rs
@@ -0,0 +1,19 @@
+// Tests that dlltool failing to generate an import library will raise an error.
+
+// only-gnu
+// only-windows
+// needs-dlltool
+// compile-flags: --crate-type lib --emit link
+// normalize-stderr-test: "[^ ']*/dlltool.exe" -> "$$DLLTOOL"
+// normalize-stderr-test: "[^ ]*/foo.def" -> "$$DEF_FILE"
+#[link(name = "foo", kind = "raw-dylib")]
+extern "C" {
+    // `@1` is an invalid name to export, as it usually indicates that something
+    // is being exported via ordinal.
+    #[link_name = "@1"]
+    fn f(x: i32);
+}
+
+pub fn lib_main() {
+    unsafe { f(42); }
+}
diff --git a/tests/ui/rfc-2627-raw-dylib/dlltool-failed.stderr b/tests/ui/rfc-2627-raw-dylib/dlltool-failed.stderr
new file mode 100644
index 00000000000..020ac6a2b67
--- /dev/null
+++ b/tests/ui/rfc-2627-raw-dylib/dlltool-failed.stderr
@@ -0,0 +1,5 @@
+error: Dlltool could not create import library: 
+       $DLLTOOL: Syntax error in def file $DEF_FILE:1
+
+error: aborting due to previous error
+
diff --git a/tests/ui/rfc-2627-raw-dylib/import-name-type-invalid-format.rs b/tests/ui/rfc-2627-raw-dylib/import-name-type-invalid-format.rs
index 22d57f8bedd..7bc44d65be9 100644
--- a/tests/ui/rfc-2627-raw-dylib/import-name-type-invalid-format.rs
+++ b/tests/ui/rfc-2627-raw-dylib/import-name-type-invalid-format.rs
@@ -1,7 +1,5 @@
 // only-windows
 // only-x86
-#![feature(raw_dylib)]
-
 #[link(name = "foo", kind = "raw-dylib", import_name_type = 6)]
 //~^ ERROR import name type must be of the form `import_name_type = "string"`
 extern "C" { }
diff --git a/tests/ui/rfc-2627-raw-dylib/import-name-type-invalid-format.stderr b/tests/ui/rfc-2627-raw-dylib/import-name-type-invalid-format.stderr
index 0e95fec29d2..fb70b987fc7 100644
--- a/tests/ui/rfc-2627-raw-dylib/import-name-type-invalid-format.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/import-name-type-invalid-format.stderr
@@ -1,5 +1,5 @@
 error: import name type must be of the form `import_name_type = "string"`
-  --> $DIR/import-name-type-invalid-format.rs:5:42
+  --> $DIR/import-name-type-invalid-format.rs:3:42
    |
 LL | #[link(name = "foo", kind = "raw-dylib", import_name_type = 6)]
    |                                          ^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/import-name-type-multiple.rs b/tests/ui/rfc-2627-raw-dylib/import-name-type-multiple.rs
index 7ccb0082fb9..b96f61a26da 100644
--- a/tests/ui/rfc-2627-raw-dylib/import-name-type-multiple.rs
+++ b/tests/ui/rfc-2627-raw-dylib/import-name-type-multiple.rs
@@ -1,8 +1,6 @@
 // ignore-tidy-linelength
 // only-windows
 // only-x86
-#![feature(raw_dylib)]
-
 #[link(name = "foo", kind = "raw-dylib", import_name_type = "decorated", import_name_type = "decorated")]
 //~^ ERROR multiple `import_name_type` arguments in a single `#[link]` attribute
 extern "C" { }
diff --git a/tests/ui/rfc-2627-raw-dylib/import-name-type-multiple.stderr b/tests/ui/rfc-2627-raw-dylib/import-name-type-multiple.stderr
index 7c0e0be911f..9533061892f 100644
--- a/tests/ui/rfc-2627-raw-dylib/import-name-type-multiple.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/import-name-type-multiple.stderr
@@ -1,5 +1,5 @@
 error: multiple `import_name_type` arguments in a single `#[link]` attribute
-  --> $DIR/import-name-type-multiple.rs:6:74
+  --> $DIR/import-name-type-multiple.rs:4:74
    |
 LL | #[link(name = "foo", kind = "raw-dylib", import_name_type = "decorated", import_name_type = "decorated")]
    |                                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/import-name-type-unknown-value.rs b/tests/ui/rfc-2627-raw-dylib/import-name-type-unknown-value.rs
index f728a578d3b..067e82a17fd 100644
--- a/tests/ui/rfc-2627-raw-dylib/import-name-type-unknown-value.rs
+++ b/tests/ui/rfc-2627-raw-dylib/import-name-type-unknown-value.rs
@@ -1,7 +1,5 @@
 // only-windows
 // only-x86
-#![feature(raw_dylib)]
-
 #[link(name = "foo", kind = "raw-dylib", import_name_type = "unknown")]
 //~^ ERROR unknown import name type `unknown`, expected one of: decorated, noprefix, undecorated
 extern "C" { }
diff --git a/tests/ui/rfc-2627-raw-dylib/import-name-type-unknown-value.stderr b/tests/ui/rfc-2627-raw-dylib/import-name-type-unknown-value.stderr
index 2b299f2fea3..2bce9758e99 100644
--- a/tests/ui/rfc-2627-raw-dylib/import-name-type-unknown-value.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/import-name-type-unknown-value.stderr
@@ -1,5 +1,5 @@
 error: unknown import name type `unknown`, expected one of: decorated, noprefix, undecorated
-  --> $DIR/import-name-type-unknown-value.rs:5:42
+  --> $DIR/import-name-type-unknown-value.rs:3:42
    |
 LL | #[link(name = "foo", kind = "raw-dylib", import_name_type = "unknown")]
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs b/tests/ui/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs
index ae9207864a2..34e907bde83 100644
--- a/tests/ui/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs
+++ b/tests/ui/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.rs
@@ -1,7 +1,5 @@
 // only-windows
 // only-x86
-#![feature(raw_dylib)]
-
 #[link(name = "foo", import_name_type = "decorated")]
 //~^ ERROR import name type can only be used with link kind `raw-dylib`
 extern "C" { }
diff --git a/tests/ui/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.stderr b/tests/ui/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.stderr
index 5898cd875a1..75cadc471c4 100644
--- a/tests/ui/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/import-name-type-unsupported-link-kind.stderr
@@ -1,11 +1,11 @@
 error: import name type can only be used with link kind `raw-dylib`
-  --> $DIR/import-name-type-unsupported-link-kind.rs:5:22
+  --> $DIR/import-name-type-unsupported-link-kind.rs:3:22
    |
 LL | #[link(name = "foo", import_name_type = "decorated")]
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: import name type can only be used with link kind `raw-dylib`
-  --> $DIR/import-name-type-unsupported-link-kind.rs:9:39
+  --> $DIR/import-name-type-unsupported-link-kind.rs:7:39
    |
 LL | #[link(name = "bar", kind = "static", import_name_type = "decorated")]
    |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/invalid-dlltool.rs b/tests/ui/rfc-2627-raw-dylib/invalid-dlltool.rs
new file mode 100644
index 00000000000..a07be9d92b4
--- /dev/null
+++ b/tests/ui/rfc-2627-raw-dylib/invalid-dlltool.rs
@@ -0,0 +1,13 @@
+// Tests that failing to run dlltool will raise an error.
+
+// only-gnu
+// only-windows
+// compile-flags: --crate-type lib --emit link -Cdlltool=does_not_exit.exe
+#[link(name = "foo", kind = "raw-dylib")]
+extern "C" {
+    fn f(x: i32);
+}
+
+pub fn lib_main() {
+    unsafe { f(42); }
+}
diff --git a/tests/ui/rfc-2627-raw-dylib/invalid-dlltool.stderr b/tests/ui/rfc-2627-raw-dylib/invalid-dlltool.stderr
new file mode 100644
index 00000000000..3ae901e0dbc
--- /dev/null
+++ b/tests/ui/rfc-2627-raw-dylib/invalid-dlltool.stderr
@@ -0,0 +1,4 @@
+error: Error calling dlltool 'does_not_exit.exe': program not found
+
+error: aborting due to previous error
+
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-and-name.rs b/tests/ui/rfc-2627-raw-dylib/link-ordinal-and-name.rs
index 1a128c87a0c..b04c2facbcd 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-and-name.rs
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-and-name.rs
@@ -1,5 +1,3 @@
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
-
 #[link(name="foo")]
 extern "C" {
     #[link_name="foo"]
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-and-name.stderr b/tests/ui/rfc-2627-raw-dylib/link-ordinal-and-name.stderr
index 481a06d2797..f1e54d37827 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-and-name.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-and-name.stderr
@@ -1,11 +1,11 @@
 error: cannot use `#[link_name]` with `#[link_ordinal]`
-  --> $DIR/link-ordinal-and-name.rs:6:5
+  --> $DIR/link-ordinal-and-name.rs:4:5
    |
 LL |     #[link_ordinal(42)]
    |     ^^^^^^^^^^^^^^^^^^^
 
 error: cannot use `#[link_name]` with `#[link_ordinal]`
-  --> $DIR/link-ordinal-and-name.rs:10:5
+  --> $DIR/link-ordinal-and-name.rs:8:5
    |
 LL |     #[link_ordinal(5)]
    |     ^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-invalid-format.rs b/tests/ui/rfc-2627-raw-dylib/link-ordinal-invalid-format.rs
index 7c8da050cf6..9b7e8d70743 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-invalid-format.rs
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-invalid-format.rs
@@ -1,5 +1,3 @@
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
-
 #[link(name = "foo")]
 extern "C" {
     #[link_ordinal("JustMonika")]
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-invalid-format.stderr b/tests/ui/rfc-2627-raw-dylib/link-ordinal-invalid-format.stderr
index 55cdcad75a4..6341e57a0be 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-invalid-format.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-invalid-format.stderr
@@ -1,5 +1,5 @@
 error: illegal ordinal format in `link_ordinal`
-  --> $DIR/link-ordinal-invalid-format.rs:5:5
+  --> $DIR/link-ordinal-invalid-format.rs:3:5
    |
 LL |     #[link_ordinal("JustMonika")]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -7,7 +7,7 @@ LL |     #[link_ordinal("JustMonika")]
    = note: an unsuffixed integer value, e.g., `1`, is expected
 
 error: illegal ordinal format in `link_ordinal`
-  --> $DIR/link-ordinal-invalid-format.rs:8:5
+  --> $DIR/link-ordinal-invalid-format.rs:6:5
    |
 LL |     #[link_ordinal("JustMonika")]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.rs b/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.rs
index 9feed394110..6b8cd49566d 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.rs
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.rs
@@ -1,5 +1,3 @@
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
-
 #[link(name = "foo")]
 extern "C" {
     #[link_ordinal()]
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.stderr b/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.stderr
index 853cdad8c1c..1b04bb228e7 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-missing-argument.stderr
@@ -1,5 +1,5 @@
 error: incorrect number of arguments to `#[link_ordinal]`
-  --> $DIR/link-ordinal-missing-argument.rs:5:5
+  --> $DIR/link-ordinal-missing-argument.rs:3:5
    |
 LL |     #[link_ordinal()]
    |     ^^^^^^^^^^^^^^^^^
@@ -7,7 +7,7 @@ LL |     #[link_ordinal()]
    = note: the attribute requires exactly one argument
 
 error: incorrect number of arguments to `#[link_ordinal]`
-  --> $DIR/link-ordinal-missing-argument.rs:8:5
+  --> $DIR/link-ordinal-missing-argument.rs:6:5
    |
 LL |     #[link_ordinal()]
    |     ^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-multiple.rs b/tests/ui/rfc-2627-raw-dylib/link-ordinal-multiple.rs
index 631c363d4ba..8842cb94404 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-multiple.rs
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-multiple.rs
@@ -1,6 +1,4 @@
 // only-windows
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
-
 #[link(name = "foo", kind = "raw-dylib")]
 extern "C" {
     #[link_ordinal(1)] //~ ERROR multiple `link_ordinal` attributes
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-multiple.stderr b/tests/ui/rfc-2627-raw-dylib/link-ordinal-multiple.stderr
index c0453d2bf01..2e6cf3761c2 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-multiple.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-multiple.stderr
@@ -1,23 +1,23 @@
 error: multiple `link_ordinal` attributes
-  --> $DIR/link-ordinal-multiple.rs:6:5
+  --> $DIR/link-ordinal-multiple.rs:4:5
    |
 LL |     #[link_ordinal(1)]
    |     ^^^^^^^^^^^^^^^^^^ help: remove this attribute
    |
 note: attribute also specified here
-  --> $DIR/link-ordinal-multiple.rs:7:5
+  --> $DIR/link-ordinal-multiple.rs:5:5
    |
 LL |     #[link_ordinal(2)]
    |     ^^^^^^^^^^^^^^^^^^
 
 error: multiple `link_ordinal` attributes
-  --> $DIR/link-ordinal-multiple.rs:9:5
+  --> $DIR/link-ordinal-multiple.rs:7:5
    |
 LL |     #[link_ordinal(1)]
    |     ^^^^^^^^^^^^^^^^^^ help: remove this attribute
    |
 note: attribute also specified here
-  --> $DIR/link-ordinal-multiple.rs:10:5
+  --> $DIR/link-ordinal-multiple.rs:8:5
    |
 LL |     #[link_ordinal(2)]
    |     ^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-not-foreign-fn.rs b/tests/ui/rfc-2627-raw-dylib/link-ordinal-not-foreign-fn.rs
index 54e614164b3..f33a3d62e26 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-not-foreign-fn.rs
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-not-foreign-fn.rs
@@ -1,5 +1,3 @@
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
-
 #[link_ordinal(123)]
 //~^ ERROR attribute should be applied to a foreign function or static
 struct Foo {}
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-not-foreign-fn.stderr b/tests/ui/rfc-2627-raw-dylib/link-ordinal-not-foreign-fn.stderr
index ec4104fbe50..8f279508720 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-not-foreign-fn.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-not-foreign-fn.stderr
@@ -1,17 +1,17 @@
 error: attribute should be applied to a foreign function or static
-  --> $DIR/link-ordinal-not-foreign-fn.rs:3:1
+  --> $DIR/link-ordinal-not-foreign-fn.rs:1:1
    |
 LL | #[link_ordinal(123)]
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: attribute should be applied to a foreign function or static
-  --> $DIR/link-ordinal-not-foreign-fn.rs:7:1
+  --> $DIR/link-ordinal-not-foreign-fn.rs:5:1
    |
 LL | #[link_ordinal(123)]
    | ^^^^^^^^^^^^^^^^^^^^
 
 error: attribute should be applied to a foreign function or static
-  --> $DIR/link-ordinal-not-foreign-fn.rs:11:1
+  --> $DIR/link-ordinal-not-foreign-fn.rs:9:1
    |
 LL | #[link_ordinal(42)]
    | ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-large.rs b/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-large.rs
index 46731581ebc..9d741630fc9 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-large.rs
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-large.rs
@@ -1,5 +1,3 @@
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
-
 #[link(name = "foo")]
 extern "C" {
     #[link_ordinal(72436)]
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-large.stderr b/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-large.stderr
index fef6de6aedf..811145e77ee 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-large.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-large.stderr
@@ -1,5 +1,5 @@
 error: ordinal value in `link_ordinal` is too large: `72436`
-  --> $DIR/link-ordinal-too-large.rs:5:5
+  --> $DIR/link-ordinal-too-large.rs:3:5
    |
 LL |     #[link_ordinal(72436)]
    |     ^^^^^^^^^^^^^^^^^^^^^^
@@ -7,7 +7,7 @@ LL |     #[link_ordinal(72436)]
    = note: the value may not exceed `u16::MAX`
 
 error: ordinal value in `link_ordinal` is too large: `72436`
-  --> $DIR/link-ordinal-too-large.rs:8:5
+  --> $DIR/link-ordinal-too-large.rs:6:5
    |
 LL |     #[link_ordinal(72436)]
    |     ^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-many-arguments.rs b/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-many-arguments.rs
index 71e0ac9f3ee..9988115fd8b 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-many-arguments.rs
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-many-arguments.rs
@@ -1,5 +1,3 @@
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
-
 #[link(name = "foo")]
 extern "C" {
     #[link_ordinal(3, 4)]
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-many-arguments.stderr b/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-many-arguments.stderr
index 7e0fcd845cb..d5ce8aff34f 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-many-arguments.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-too-many-arguments.stderr
@@ -1,5 +1,5 @@
 error: incorrect number of arguments to `#[link_ordinal]`
-  --> $DIR/link-ordinal-too-many-arguments.rs:5:5
+  --> $DIR/link-ordinal-too-many-arguments.rs:3:5
    |
 LL |     #[link_ordinal(3, 4)]
    |     ^^^^^^^^^^^^^^^^^^^^^
@@ -7,7 +7,7 @@ LL |     #[link_ordinal(3, 4)]
    = note: the attribute requires exactly one argument
 
 error: incorrect number of arguments to `#[link_ordinal]`
-  --> $DIR/link-ordinal-too-many-arguments.rs:8:5
+  --> $DIR/link-ordinal-too-many-arguments.rs:6:5
    |
 LL |     #[link_ordinal(3, 4)]
    |     ^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.rs b/tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.rs
index 329c93fc196..14e915d602a 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.rs
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.rs
@@ -1,5 +1,3 @@
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
-
 #[link(name = "foo")]
 extern "C" {
     #[link_ordinal(3)]
diff --git a/tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.stderr b/tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.stderr
index 5fbffbda570..200b8f62874 100644
--- a/tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/link-ordinal-unsupported-link-kind.stderr
@@ -1,11 +1,11 @@
 error: `#[link_ordinal]` is only supported if link kind is `raw-dylib`
-  --> $DIR/link-ordinal-unsupported-link-kind.rs:5:5
+  --> $DIR/link-ordinal-unsupported-link-kind.rs:3:5
    |
 LL |     #[link_ordinal(3)]
    |     ^^^^^^^^^^^^^^^^^^
 
 error: `#[link_ordinal]` is only supported if link kind is `raw-dylib`
-  --> $DIR/link-ordinal-unsupported-link-kind.rs:12:5
+  --> $DIR/link-ordinal-unsupported-link-kind.rs:10:5
    |
 LL |     #[link_ordinal(3)]
    |     ^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/multiple-declarations.rs b/tests/ui/rfc-2627-raw-dylib/multiple-declarations.rs
index 6542faad264..b4173f3b60b 100644
--- a/tests/ui/rfc-2627-raw-dylib/multiple-declarations.rs
+++ b/tests/ui/rfc-2627-raw-dylib/multiple-declarations.rs
@@ -2,7 +2,6 @@
 // only-windows
 // compile-flags: --crate-type lib --emit link
 #![allow(clashing_extern_declarations)]
-#![feature(raw_dylib)]
 #[link(name = "foo", kind = "raw-dylib")]
 extern "C" {
     fn f(x: i32);
diff --git a/tests/ui/rfc-2627-raw-dylib/multiple-declarations.stderr b/tests/ui/rfc-2627-raw-dylib/multiple-declarations.stderr
index c6808bec7b5..51010840548 100644
--- a/tests/ui/rfc-2627-raw-dylib/multiple-declarations.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/multiple-declarations.stderr
@@ -1,5 +1,5 @@
 error: multiple declarations of external function `f` from library `foo.dll` have different calling conventions
-  --> $DIR/multiple-declarations.rs:14:9
+  --> $DIR/multiple-declarations.rs:13:9
    |
 LL |         fn f(x: i32);
    |         ^^^^^^^^^^^^^
diff --git a/tests/ui/rfc-2627-raw-dylib/raw-dylib-windows-only.rs b/tests/ui/rfc-2627-raw-dylib/raw-dylib-windows-only.rs
index 4efffbd532e..d4c6658a330 100644
--- a/tests/ui/rfc-2627-raw-dylib/raw-dylib-windows-only.rs
+++ b/tests/ui/rfc-2627-raw-dylib/raw-dylib-windows-only.rs
@@ -1,6 +1,5 @@
 // ignore-windows
 // compile-flags: --crate-type lib
-#![cfg_attr(target_arch = "x86", feature(raw_dylib))]
 #[link(name = "foo", kind = "raw-dylib")]
 //~^ ERROR: link kind `raw-dylib` is only supported on Windows targets
 extern "C" {}
diff --git a/tests/ui/rfc-2627-raw-dylib/raw-dylib-windows-only.stderr b/tests/ui/rfc-2627-raw-dylib/raw-dylib-windows-only.stderr
index 14e791f1fb9..b635a09afba 100644
--- a/tests/ui/rfc-2627-raw-dylib/raw-dylib-windows-only.stderr
+++ b/tests/ui/rfc-2627-raw-dylib/raw-dylib-windows-only.stderr
@@ -1,5 +1,5 @@
 error[E0455]: link kind `raw-dylib` is only supported on Windows targets
-  --> $DIR/raw-dylib-windows-only.rs:4:29
+  --> $DIR/raw-dylib-windows-only.rs:3:29
    |
 LL | #[link(name = "foo", kind = "raw-dylib")]
    |                             ^^^^^^^^^^^
diff --git a/tests/ui/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs b/tests/ui/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs
index 3ac90992486..f31123f16f1 100644
--- a/tests/ui/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs
+++ b/tests/ui/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.rs
@@ -12,7 +12,9 @@ trait Specialize {}
 trait Foo {}
 
 #[const_trait]
-trait Bar {}
+trait Bar {
+    fn bar();
+}
 
 // bgr360: I was only able to exercise the code path that raises the
 // "missing ~const qualifier" error by making this base impl non-const, even
@@ -21,26 +23,36 @@ trait Bar {}
 impl<T> Bar for T
 where
     T: ~const Foo,
-{}
+{
+    default fn bar() {}
+}
 
 impl<T> Bar for T
 where
     T: Foo, //~ ERROR missing `~const` qualifier
     T: Specialize,
-{}
+{
+    fn bar() {}
+}
 
 #[const_trait]
-trait Baz {}
+trait Baz {
+    fn baz();
+}
 
 impl<T> const Baz for T
 where
     T: ~const Foo,
-{}
+{
+    default fn baz() {}
+}
 
 impl<T> const Baz for T //~ ERROR conflicting implementations of trait `Baz`
 where
     T: Foo,
     T: Specialize,
-{}
+{
+    fn baz() {}
+}
 
 fn main() {}
diff --git a/tests/ui/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.stderr b/tests/ui/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.stderr
index 4aea1979421..057cf4aea8a 100644
--- a/tests/ui/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.stderr
+++ b/tests/ui/rfc-2632-const-trait-impl/specialization/const-default-bound-non-const-specialized-bound.stderr
@@ -1,11 +1,11 @@
 error: missing `~const` qualifier for specialization
-  --> $DIR/const-default-bound-non-const-specialized-bound.rs:28:8
+  --> $DIR/const-default-bound-non-const-specialized-bound.rs:32:8
    |
 LL |     T: Foo,
    |        ^^^
 
 error[E0119]: conflicting implementations of trait `Baz`
-  --> $DIR/const-default-bound-non-const-specialized-bound.rs:40:1
+  --> $DIR/const-default-bound-non-const-specialized-bound.rs:50:1
    |
 LL | impl<T> const Baz for T
    | ----------------------- first implementation here
diff --git a/tests/ui/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs b/tests/ui/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs
index 9c2c2cf1610..92d8be6bb16 100644
--- a/tests/ui/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs
+++ b/tests/ui/rfc-2632-const-trait-impl/specialization/issue-95186-specialize-on-tilde-const.rs
@@ -11,27 +11,39 @@
 trait Specialize {}
 
 #[const_trait]
-trait Foo {}
+trait Foo {
+    fn foo();
+}
 
-impl<T> const Foo for T {}
+impl<T> const Foo for T {
+    default fn foo() {}
+}
 
 impl<T> const Foo for T
 where
     T: ~const Specialize,
-{}
+{
+    fn foo() {}
+}
 
 #[const_trait]
-trait Bar {}
+trait Bar {
+    fn bar() {}
+}
 
 impl<T> const Bar for T
 where
     T: ~const Foo,
-{}
+{
+    default fn bar() {}
+}
 
 impl<T> const Bar for T
 where
     T: ~const Foo,
     T: ~const Specialize,
-{}
+{
+    fn bar() {}
+}
 
 fn main() {}
diff --git a/tests/ui/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs b/tests/ui/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs
index 1e6b1c6513b..51bfaf73b57 100644
--- a/tests/ui/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs
+++ b/tests/ui/rfc-2632-const-trait-impl/specialization/issue-95187-same-trait-bound-different-constness.rs
@@ -15,31 +15,43 @@ trait Specialize {}
 trait Foo {}
 
 #[const_trait]
-trait Bar {}
+trait Bar {
+    fn bar();
+}
 
 impl<T> Bar for T
 where
     T: Foo,
-{}
+{
+    default fn bar() {}
+}
 
 impl<T> const Bar for T
 where
     T: ~const Foo,
     T: Specialize,
-{}
+{
+    fn bar() {}
+}
 
 #[const_trait]
-trait Baz {}
+trait Baz {
+    fn baz();
+}
 
 impl<T> const Baz for T
 where
     T: Foo,
-{}
+{
+    default fn baz() {}
+}
 
 impl<T> const Baz for T
 where
     T: ~const Foo,
     T: Specialize,
-{}
+{
+    fn baz() {}
+}
 
 fn main() {}
diff --git a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
index d4f42b787e4..97f346e8c1d 100644
--- a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
+++ b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.nn.stderr
@@ -4,5 +4,11 @@ error: ~const can only be applied to `#[const_trait]` traits
 LL | trait Bar: ~const Foo {}
    |                   ^^^
 
-error: aborting due to previous error
+error: ~const can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:11:19
+   |
+LL | trait Bar: ~const Foo {}
+   |                   ^^^
+
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr
index d4f42b787e4..97f346e8c1d 100644
--- a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr
+++ b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.ny.stderr
@@ -4,5 +4,11 @@ error: ~const can only be applied to `#[const_trait]` traits
 LL | trait Bar: ~const Foo {}
    |                   ^^^
 
-error: aborting due to previous error
+error: ~const can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-2.rs:11:19
+   |
+LL | trait Bar: ~const Foo {}
+   |                   ^^^
+
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.rs b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.rs
index d183efde2df..ecb06271cd9 100644
--- a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.rs
+++ b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.rs
@@ -10,6 +10,7 @@ trait Foo {
 #[cfg_attr(any(yy, ny), const_trait)]
 trait Bar: ~const Foo {}
 //[ny,nn]~^ ERROR: ~const can only be applied to `#[const_trait]`
+//[ny,nn]~| ERROR: ~const can only be applied to `#[const_trait]`
 
 const fn foo<T: Bar>(x: &T) {
     x.a();
diff --git a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
index 13fc719f28c..c9fa1955498 100644
--- a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
+++ b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.yn.stderr
@@ -1,11 +1,11 @@
 error[E0277]: the trait bound `T: ~const Foo` is not satisfied
-  --> $DIR/super-traits-fail-2.rs:15:7
+  --> $DIR/super-traits-fail-2.rs:16:7
    |
 LL |     x.a();
    |       ^ the trait `~const Foo` is not implemented for `T`
    |
 note: the trait `Foo` is implemented for `T`, but that implementation is not `const`
-  --> $DIR/super-traits-fail-2.rs:15:5
+  --> $DIR/super-traits-fail-2.rs:16:5
    |
 LL |     x.a();
    |     ^
diff --git a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr
index 13fc719f28c..c9fa1955498 100644
--- a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr
+++ b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-2.yy.stderr
@@ -1,11 +1,11 @@
 error[E0277]: the trait bound `T: ~const Foo` is not satisfied
-  --> $DIR/super-traits-fail-2.rs:15:7
+  --> $DIR/super-traits-fail-2.rs:16:7
    |
 LL |     x.a();
    |       ^ the trait `~const Foo` is not implemented for `T`
    |
 note: the trait `Foo` is implemented for `T`, but that implementation is not `const`
-  --> $DIR/super-traits-fail-2.rs:15:5
+  --> $DIR/super-traits-fail-2.rs:16:5
    |
 LL |     x.a();
    |     ^
diff --git a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
index d433e1cfa69..fdc6b805889 100644
--- a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
+++ b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.nn.stderr
@@ -5,10 +5,16 @@ LL | trait Bar: ~const Foo {}
    |                   ^^^
 
 error: ~const can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:15:24
+  --> $DIR/super-traits-fail-3.rs:12:19
+   |
+LL | trait Bar: ~const Foo {}
+   |                   ^^^
+
+error: ~const can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:16:24
    |
 LL | const fn foo<T: ~const Bar>(x: &T) {
    |                        ^^^
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr
index 2a7e8e00bc7..7375b8c819c 100644
--- a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr
+++ b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.ny.stderr
@@ -4,5 +4,11 @@ error: ~const can only be applied to `#[const_trait]` traits
 LL | trait Bar: ~const Foo {}
    |                   ^^^
 
-error: aborting due to previous error
+error: ~const can only be applied to `#[const_trait]` traits
+  --> $DIR/super-traits-fail-3.rs:12:19
+   |
+LL | trait Bar: ~const Foo {}
+   |                   ^^^
+
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.rs b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.rs
index 70d2936d3b2..8cf64944ac1 100644
--- a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.rs
+++ b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.rs
@@ -11,6 +11,7 @@ trait Foo {
 #[cfg_attr(any(yy, ny), const_trait)]
 trait Bar: ~const Foo {}
 //[ny,nn]~^ ERROR: ~const can only be applied to `#[const_trait]`
+//[ny,nn]~| ERROR: ~const can only be applied to `#[const_trait]`
 
 const fn foo<T: ~const Bar>(x: &T) {
     //[yn,nn]~^ ERROR: ~const can only be applied to `#[const_trait]`
diff --git a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
index e5978c12a09..7a152914b69 100644
--- a/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
+++ b/tests/ui/rfc-2632-const-trait-impl/super-traits-fail-3.yn.stderr
@@ -1,5 +1,5 @@
 error: ~const can only be applied to `#[const_trait]` traits
-  --> $DIR/super-traits-fail-3.rs:15:24
+  --> $DIR/super-traits-fail-3.rs:16:24
    |
 LL | const fn foo<T: ~const Bar>(x: &T) {
    |                        ^^^
diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs
new file mode 100644
index 00000000000..e4b07ab8108
--- /dev/null
+++ b/tests/ui/rfcs/rfc-3348-c-string-literals/basic.rs
@@ -0,0 +1,7 @@
+// run-pass
+
+#![feature(c_str_literals)]
+
+fn main() {
+    assert_eq!(b"test\0", c"test".to_bytes_with_nul());
+}
diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/gate.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/gate.rs
new file mode 100644
index 00000000000..b27da26ed23
--- /dev/null
+++ b/tests/ui/rfcs/rfc-3348-c-string-literals/gate.rs
@@ -0,0 +1,13 @@
+// gate-test-c_str_literals
+
+macro_rules! m {
+    ($t:tt) => {}
+}
+
+fn main() {
+    c"foo";
+    //~^ ERROR: `c".."` literals are experimental
+
+    m!(c"test");
+    //~^ ERROR: `c".."` literals are experimental
+}
diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/gate.stderr b/tests/ui/rfcs/rfc-3348-c-string-literals/gate.stderr
new file mode 100644
index 00000000000..bc0c537aada
--- /dev/null
+++ b/tests/ui/rfcs/rfc-3348-c-string-literals/gate.stderr
@@ -0,0 +1,21 @@
+error[E0658]: `c".."` literals are experimental
+  --> $DIR/gate.rs:8:5
+   |
+LL |     c"foo";
+   |     ^^^^^^
+   |
+   = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
+   = help: add `#![feature(c_str_literals)]` to the crate attributes to enable
+
+error[E0658]: `c".."` literals are experimental
+  --> $DIR/gate.rs:11:8
+   |
+LL |     m!(c"test");
+   |        ^^^^^^^
+   |
+   = note: see issue #105723 <https://github.com/rust-lang/rust/issues/105723> for more information
+   = help: add `#![feature(c_str_literals)]` to the crate attributes to enable
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs
new file mode 100644
index 00000000000..7bc6097f124
--- /dev/null
+++ b/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.rs
Binary files differdiff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.stderr b/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.stderr
new file mode 100644
index 00000000000..ff9006f6f97
--- /dev/null
+++ b/tests/ui/rfcs/rfc-3348-c-string-literals/no-nuls.stderr
Binary files differdiff --git a/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs b/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs
new file mode 100644
index 00000000000..82e8e2090d7
--- /dev/null
+++ b/tests/ui/rfcs/rfc-3348-c-string-literals/non-ascii.rs
@@ -0,0 +1,10 @@
+// run-pass
+
+#![feature(c_str_literals)]
+
+fn main() {
+    assert_eq!(
+        c"\xEF\x80🦀\u{1F980}".to_bytes_with_nul(),
+        &[0xEF, 0x80, 0xF0, 0x9F, 0xA6, 0x80, 0xF0, 0x9F, 0xA6, 0x80, 0x00],
+    );
+}
diff --git a/tests/ui/sanitize/cfg.rs b/tests/ui/sanitize/cfg.rs
index 79dfe58f04d..c0f08a6d1e5 100644
--- a/tests/ui/sanitize/cfg.rs
+++ b/tests/ui/sanitize/cfg.rs
@@ -3,12 +3,16 @@
 
 // needs-sanitizer-support
 // needs-sanitizer-address
+// needs-sanitizer-cfi
+// needs-sanitizer-kcfi
 // needs-sanitizer-leak
 // needs-sanitizer-memory
 // needs-sanitizer-thread
 // check-pass
 // revisions: address leak memory thread
 //[address]compile-flags: -Zsanitizer=address --cfg address
+//[cfi]compile-flags:     -Zsanitizer=cfi     --cfg cfi
+//[kcfi]compile-flags:    -Zsanitizer=kcfi    --cfg kcfi
 //[leak]compile-flags:    -Zsanitizer=leak    --cfg leak
 //[memory]compile-flags:  -Zsanitizer=memory  --cfg memory
 //[thread]compile-flags:  -Zsanitizer=thread  --cfg thread
@@ -18,6 +22,12 @@
 #[cfg(all(sanitize = "address", address))]
 fn main() {}
 
+#[cfg(all(sanitize = "cfi", cfi))]
+fn main() {}
+
+#[cfg(all(sanitize = "kcfi", kcfi))]
+fn main() {}
+
 #[cfg(all(sanitize = "leak", leak))]
 fn main() {}
 
diff --git a/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs b/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs
new file mode 100644
index 00000000000..462a3f661ef
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.rs
@@ -0,0 +1,8 @@
+// Verifies that `-Zsanitizer-cfi-canonical-jump-tables` requires `-Zsanitizer=cfi`.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-canonical-jump-tables=false
+
+#![feature(no_core)]
+#![no_core]
+#![no_main]
diff --git a/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.stderr b/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.stderr
new file mode 100644
index 00000000000..3ee95634b16
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-canonical-jump-tables-require-cfi.stderr
@@ -0,0 +1,4 @@
+error: `-Zsanitizer-cfi-canonical-jump-tables` requires `-Zsanitizer=cfi`
+
+error: aborting due to previous error
+
diff --git a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs
new file mode 100644
index 00000000000..3a0fc143da6
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-attr-cfg.rs
@@ -0,0 +1,9 @@
+// Verifies that when compiling with `-Zsanitizer-cfi-generalize-pointers` the
+// `#[cfg(sanitizer_cfi_generalize_pointers)]` attribute is configured.
+//
+// needs-sanitizer-cfi
+// check-pass
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers
+
+#[cfg(sanitizer_cfi_generalize_pointers)]
+fn main() {}
diff --git a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs
new file mode 100644
index 00000000000..f31b8bde7ae
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.rs
@@ -0,0 +1,9 @@
+// Verifies that `-Zsanitizer-cfi-generalize-pointers` requires `-Zsanitizer=cfi` or
+// `-Zsanitizer=kcfi`.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-generalize-pointers
+
+#![feature(no_core)]
+#![no_core]
+#![no_main]
diff --git a/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.stderr b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.stderr
new file mode 100644
index 00000000000..6eb09a53b48
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-generalize-pointers-require-cfi.stderr
@@ -0,0 +1,4 @@
+error: `-Zsanitizer-cfi-generalize-pointers` requires `-Zsanitizer=cfi` or `-Zsanitizer=kcfi`
+
+error: aborting due to previous error
+
diff --git a/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs b/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs
new file mode 100644
index 00000000000..fe044f50a21
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.rs
@@ -0,0 +1,11 @@
+// Verifies that invalid user-defined CFI encodings can't be used.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi
+
+#![feature(cfi_encoding, no_core)]
+#![no_core]
+#![no_main]
+
+#[cfi_encoding] //~ERROR 10:1: 10:16: malformed `cfi_encoding` attribute input
+pub struct Type1(i32);
diff --git a/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.stderr b/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.stderr
new file mode 100644
index 00000000000..e23bafb1814
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-invalid-attr-cfi-encoding.stderr
@@ -0,0 +1,8 @@
+error: malformed `cfi_encoding` attribute input
+  --> $DIR/sanitizer-cfi-invalid-attr-cfi-encoding.rs:10:1
+   |
+LL | #[cfi_encoding]
+   | ^^^^^^^^^^^^^^^ help: must be of the form: `#[cfi_encoding = "encoding"]`
+
+error: aborting due to previous error
+
diff --git a/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.aarch64.stderr b/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.aarch64.stderr
new file mode 100644
index 00000000000..8328178e8d0
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.aarch64.stderr
@@ -0,0 +1,8 @@
+error: cfi sanitizer is not supported for this target
+
+error: `-Zsanitizer=cfi` is incompatible with `-Zsanitizer=kcfi`
+
+error: `-Zsanitizer=cfi` is incompatible with `-Zsanitizer=kcfi`
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs b/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs
new file mode 100644
index 00000000000..9a5b0f38990
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.rs
@@ -0,0 +1,12 @@
+// Verifies that `-Zsanitizer=cfi` is incompatible with `-Zsanitizer=kcfi`.
+//
+// revisions: aarch64 x86_64
+// [aarch64] compile-flags: --target aarch64-unknown-none
+// [aarch64] needs-llvm-components: aarch64
+// [x86_64] compile-flags: --target x86_64-unknown-none
+// [x86_64] needs-llvm-components: x86
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer=kcfi
+
+#![feature(no_core)]
+#![no_core]
+#![no_main]
diff --git a/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.x86_64.stderr b/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.x86_64.stderr
new file mode 100644
index 00000000000..8328178e8d0
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-is-incompatible-with-saniziter-kcfi.x86_64.stderr
@@ -0,0 +1,8 @@
+error: cfi sanitizer is not supported for this target
+
+error: `-Zsanitizer=cfi` is incompatible with `-Zsanitizer=kcfi`
+
+error: `-Zsanitizer=cfi` is incompatible with `-Zsanitizer=kcfi`
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs
new file mode 100644
index 00000000000..dafc20162ab
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-attr-cfg.rs
@@ -0,0 +1,9 @@
+// Verifies that when compiling with `-Zsanitizer-cfi-normalize-integers` the
+// `#[cfg(sanitizer_cfi_normalize_integers)]` attribute is configured.
+//
+// needs-sanitizer-cfi
+// check-pass
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers
+
+#[cfg(sanitizer_cfi_normalize_integers)]
+fn main() {}
diff --git a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs
new file mode 100644
index 00000000000..b25a60d3494
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.rs
@@ -0,0 +1,9 @@
+// Verifies that `-Zsanitizer-cfi-normalize-integers` requires `-Zsanitizer=cfi` or
+// `-Zsanitizer=kcfi`
+//
+// needs-sanitizer-cfi
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer-cfi-normalize-integers
+
+#![feature(no_core)]
+#![no_core]
+#![no_main]
diff --git a/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.stderr b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.stderr
new file mode 100644
index 00000000000..e3164205434
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-normalize-integers-require-cfi.stderr
@@ -0,0 +1,4 @@
+error: `-Zsanitizer-cfi-normalize-integers` requires `-Zsanitizer=cfi` or `-Zsanitizer=kcfi`
+
+error: aborting due to previous error
+
diff --git a/tests/ui/sanitize/sanitizer-cfi-requires-lto.rs b/tests/ui/sanitize/sanitizer-cfi-requires-lto.rs
new file mode 100644
index 00000000000..29e32889fcc
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-requires-lto.rs
@@ -0,0 +1,8 @@
+// Verifies that `-Zsanitizer=cfi` requires `-Clto`, `-Clto=thin`, or `-Clinker-plugin-lto`.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi
+
+#![feature(no_core)]
+#![no_core]
+#![no_main]
diff --git a/tests/ui/sanitize/sanitizer-cfi-requires-lto.stderr b/tests/ui/sanitize/sanitizer-cfi-requires-lto.stderr
new file mode 100644
index 00000000000..5e706b513b9
--- /dev/null
+++ b/tests/ui/sanitize/sanitizer-cfi-requires-lto.stderr
@@ -0,0 +1,4 @@
+error: `-Zsanitizer=cfi` requires `-Clto`, `-Clto=thin`, or `-Clinker-plugin-lto`
+
+error: aborting due to previous error
+
diff --git a/tests/ui/sanitize/split-lto-unit-requires-lto.rs b/tests/ui/sanitize/split-lto-unit-requires-lto.rs
new file mode 100644
index 00000000000..3c497260e85
--- /dev/null
+++ b/tests/ui/sanitize/split-lto-unit-requires-lto.rs
@@ -0,0 +1,8 @@
+// Verifies that `-Zsplit-lto-unit` requires `-Clto`, `-Clto=thin`, or `-Clinker-plugin-lto`.
+//
+// needs-sanitizer-cfi
+// compile-flags: -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsplit-lto-unit
+
+#![feature(no_core)]
+#![no_core]
+#![no_main]
diff --git a/tests/ui/sanitize/split-lto-unit-requires-lto.stderr b/tests/ui/sanitize/split-lto-unit-requires-lto.stderr
new file mode 100644
index 00000000000..ab8f4f4f351
--- /dev/null
+++ b/tests/ui/sanitize/split-lto-unit-requires-lto.stderr
@@ -0,0 +1,4 @@
+error: `-Zsplit-lto-unit` requires `-Clto`, `-Clto=thin`, or `-Clinker-plugin-lto`
+
+error: aborting due to previous error
+
diff --git a/tests/ui/self/elision/nested-item.rs b/tests/ui/self/elision/nested-item.rs
new file mode 100644
index 00000000000..4bcb645c60e
--- /dev/null
+++ b/tests/ui/self/elision/nested-item.rs
@@ -0,0 +1,13 @@
+// Regression test for #110899.
+// When looking for the elided lifetime for `wrap`,
+// we must not consider the lifetimes in `bar` as candidates.
+
+fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() {
+    //~^ ERROR `self` parameter is only allowed in associated functions
+    //~| ERROR `self` parameter is only allowed in associated functions
+    //~| ERROR missing lifetime specifier
+    //~| ERROR cannot find type `Wrap` in this scope
+    &()
+}
+
+fn main() {}
diff --git a/tests/ui/self/elision/nested-item.stderr b/tests/ui/self/elision/nested-item.stderr
new file mode 100644
index 00000000000..752fd82332c
--- /dev/null
+++ b/tests/ui/self/elision/nested-item.stderr
@@ -0,0 +1,38 @@
+error: `self` parameter is only allowed in associated functions
+  --> $DIR/nested-item.rs:5:9
+   |
+LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() {
+   |         ^^^^ not semantically valid as function parameter
+   |
+   = note: associated functions are those in `impl` or `trait` definitions
+
+error: `self` parameter is only allowed in associated functions
+  --> $DIR/nested-item.rs:5:29
+   |
+LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() {
+   |                             ^^^^^ not semantically valid as function parameter
+   |
+   = note: associated functions are those in `impl` or `trait` definitions
+
+error[E0106]: missing lifetime specifier
+  --> $DIR/nested-item.rs:5:46
+   |
+LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() {
+   |                                              ^ expected named lifetime parameter
+   |
+   = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
+help: consider using the `'static` lifetime
+   |
+LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &'static () {
+   |                                               +++++++
+
+error[E0412]: cannot find type `Wrap` in this scope
+  --> $DIR/nested-item.rs:5:15
+   |
+LL | fn wrap(self: Wrap<{ fn bar(&self) {} }>) -> &() {
+   |               ^^^^ not found in this scope
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0106, E0412.
+For more information about an error, try `rustc --explain E0106`.
diff --git a/tests/ui/self/self-ctor-inner-const.rs b/tests/ui/self/self-ctor-inner-const.rs
new file mode 100644
index 00000000000..b015397a5bc
--- /dev/null
+++ b/tests/ui/self/self-ctor-inner-const.rs
@@ -0,0 +1,17 @@
+// Verify that we ban usage of `Self` as constructor from inner items.
+
+struct S0<T>(T);
+
+impl<T> S0<T> {
+    fn foo() {
+        const C: S0<u8> = Self(0);
+        //~^ ERROR can't use generic parameters from outer function
+        fn bar() -> Self {
+            //~^ ERROR can't use generic parameters from outer function
+            Self(0)
+            //~^ ERROR can't use generic parameters from outer function
+        }
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/self/self-ctor-inner-const.stderr b/tests/ui/self/self-ctor-inner-const.stderr
new file mode 100644
index 00000000000..7287c64c659
--- /dev/null
+++ b/tests/ui/self/self-ctor-inner-const.stderr
@@ -0,0 +1,33 @@
+error[E0401]: can't use generic parameters from outer function
+  --> $DIR/self-ctor-inner-const.rs:7:27
+   |
+LL |         const C: S0<u8> = Self(0);
+   |                           ^^^^
+   |                           |
+   |                           use of generic parameter from outer function
+   |                           can't use `Self` here
+
+error[E0401]: can't use generic parameters from outer function
+  --> $DIR/self-ctor-inner-const.rs:9:21
+   |
+LL | impl<T> S0<T> {
+   | ---- `Self` type implicitly declared here, by this `impl`
+...
+LL |         fn bar() -> Self {
+   |                     ^^^^
+   |                     |
+   |                     use of generic parameter from outer function
+   |                     use a type here instead
+
+error[E0401]: can't use generic parameters from outer function
+  --> $DIR/self-ctor-inner-const.rs:11:13
+   |
+LL |             Self(0)
+   |             ^^^^
+   |             |
+   |             use of generic parameter from outer function
+   |             can't use `Self` here
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0401`.
diff --git a/tests/ui/simd/issue-105439.rs b/tests/ui/simd/issue-105439.rs
new file mode 100644
index 00000000000..35ca76e989b
--- /dev/null
+++ b/tests/ui/simd/issue-105439.rs
@@ -0,0 +1,25 @@
+// run-pass
+// compile-flags: -O -Zverify-llvm-ir
+
+#![feature(repr_simd)]
+#![feature(platform_intrinsics)]
+
+#[allow(non_camel_case_types)]
+#[derive(Clone, Copy)]
+#[repr(simd)]
+struct i32x4([i32; 4]);
+
+extern "platform-intrinsic" {
+    pub(crate) fn simd_add<T>(x: T, y: T) -> T;
+}
+
+#[inline(always)]
+fn to_array(a: i32x4) -> [i32; 4] {
+    a.0
+}
+
+fn main() {
+    let a = i32x4([1, 2, 3, 4]);
+    let b = unsafe { simd_add(a, a) };
+    assert_eq!(to_array(b), [2, 4, 6, 8]);
+}
diff --git a/tests/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr b/tests/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr
index 570328fc211..80c5f9da40c 100644
--- a/tests/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr
+++ b/tests/ui/span/borrowck-borrow-overloaded-auto-deref-mut.stderr
@@ -18,7 +18,7 @@ LL |     &mut x.y
 help: consider changing this to be a mutable reference
    |
 LL | fn deref_extend_mut_field1(x: &mut Own<Point>) -> &mut isize {
-   |                               ~~~~~~~~~~~~~~~
+   |                                +++
 
 error[E0499]: cannot borrow `*x` as mutable more than once at a time
   --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:78:19
@@ -50,7 +50,7 @@ LL |     x.y = 3;
 help: consider changing this to be a mutable reference
    |
 LL | fn assign_field2<'a>(x: &'a mut Own<Point>) {
-   |                         ~~~~~~~~~~~~~~~~~~
+   |                             +++
 
 error[E0499]: cannot borrow `*x` as mutable more than once at a time
   --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:101:5
@@ -82,7 +82,7 @@ LL |     x.y_mut()
 help: consider changing this to be a mutable reference
    |
 LL | fn deref_extend_mut_method1(x: &mut Own<Point>) -> &mut isize {
-   |                                ~~~~~~~~~~~~~~~
+   |                                 +++
 
 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
   --> $DIR/borrowck-borrow-overloaded-auto-deref-mut.rs:129:6
@@ -104,7 +104,7 @@ LL |     *x.y_mut() = 3;
 help: consider changing this to be a mutable reference
    |
 LL | fn assign_method2<'a>(x: &'a mut Own<Point>) {
-   |                          ~~~~~~~~~~~~~~~~~~
+   |                              +++
 
 error: aborting due to 10 previous errors
 
diff --git a/tests/ui/span/borrowck-borrow-overloaded-deref-mut.stderr b/tests/ui/span/borrowck-borrow-overloaded-deref-mut.stderr
index 3fed7b3f4dc..dbd52dc2d38 100644
--- a/tests/ui/span/borrowck-borrow-overloaded-deref-mut.stderr
+++ b/tests/ui/span/borrowck-borrow-overloaded-deref-mut.stderr
@@ -18,7 +18,7 @@ LL |     &mut **x
 help: consider changing this to be a mutable reference
    |
 LL | fn deref_extend_mut1<'a>(x: &'a mut Own<isize>) -> &'a mut isize {
-   |                             ~~~~~~~~~~~~~~~~~~
+   |                                 +++
 
 error[E0596]: cannot borrow `x` as mutable, as it is not declared as mutable
   --> $DIR/borrowck-borrow-overloaded-deref-mut.rs:49:6
@@ -40,7 +40,7 @@ LL |     **x = 3;
 help: consider changing this to be a mutable reference
    |
 LL | fn assign2<'a>(x: &'a mut Own<isize>) {
-   |                   ~~~~~~~~~~~~~~~~~~
+   |                       +++
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr b/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr
index 9711dad8078..99c8fa1f932 100644
--- a/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr
+++ b/tests/ui/span/borrowck-call-is-borrow-issue-12224.stderr
@@ -19,7 +19,7 @@ LL |     (*f)();
 help: consider changing this to be a mutable reference
    |
 LL | fn test2<F>(f: &mut F) where F: FnMut() {
-   |                ~~~~~~
+   |                 +++
 
 error[E0596]: cannot borrow `f.f` as mutable, as it is behind a `&` reference
   --> $DIR/borrowck-call-is-borrow-issue-12224.rs:34:5
@@ -29,8 +29,8 @@ LL |     f.f.call_mut(())
    |
 help: consider changing this to be a mutable reference
    |
-LL | fn test4(f: &mut Test<'_>) {
-   |             ~~~~~~~~~~~~~
+LL | fn test4(f: &mut Test) {
+   |              +++
 
 error[E0507]: cannot move out of `f`, a captured variable in an `FnMut` closure
   --> $DIR/borrowck-call-is-borrow-issue-12224.rs:57:13
diff --git a/tests/ui/span/borrowck-call-method-from-mut-aliasable.stderr b/tests/ui/span/borrowck-call-method-from-mut-aliasable.stderr
index 2a842f5a2a9..328197ae9f4 100644
--- a/tests/ui/span/borrowck-call-method-from-mut-aliasable.stderr
+++ b/tests/ui/span/borrowck-call-method-from-mut-aliasable.stderr
@@ -7,7 +7,7 @@ LL |     x.h();
 help: consider changing this to be a mutable reference
    |
 LL | fn b(x: &mut Foo) {
-   |         ~~~~~~~~
+   |          +++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/span/borrowck-fn-in-const-b.stderr b/tests/ui/span/borrowck-fn-in-const-b.stderr
index 1df19deb12f..17fdcc622f7 100644
--- a/tests/ui/span/borrowck-fn-in-const-b.stderr
+++ b/tests/ui/span/borrowck-fn-in-const-b.stderr
@@ -7,7 +7,7 @@ LL |         x.push(format!("this is broken"));
 help: consider changing this to be a mutable reference
    |
 LL |     fn broken(x: &mut Vec<String>) {
-   |                  ~~~~~~~~~~~~~~~~
+   |                   +++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/span/borrowck-object-mutability.stderr b/tests/ui/span/borrowck-object-mutability.stderr
index b6517e0b309..805a8034c18 100644
--- a/tests/ui/span/borrowck-object-mutability.stderr
+++ b/tests/ui/span/borrowck-object-mutability.stderr
@@ -7,7 +7,7 @@ LL |     x.borrowed_mut();
 help: consider changing this to be a mutable reference
    |
 LL | fn borrowed_receiver(x: &mut dyn Foo) {
-   |                         ~~~~~~~~~~~~
+   |                          +++
 
 error[E0596]: cannot borrow `*x` as mutable, as `x` is not declared as mutable
   --> $DIR/borrowck-object-mutability.rs:18:5
diff --git a/tests/ui/span/coerce-suggestions.stderr b/tests/ui/span/coerce-suggestions.stderr
index bb30f000ea7..ff840b781f0 100644
--- a/tests/ui/span/coerce-suggestions.stderr
+++ b/tests/ui/span/coerce-suggestions.stderr
@@ -10,11 +10,14 @@ error[E0308]: mismatched types
   --> $DIR/coerce-suggestions.rs:9:19
    |
 LL |     let x: &str = String::new();
-   |            ----   ^^^^^^^^^^^^^
-   |            |      |
-   |            |      expected `&str`, found `String`
-   |            |      help: consider borrowing here: `&String::new()`
+   |            ----   ^^^^^^^^^^^^^ expected `&str`, found `String`
+   |            |
    |            expected due to this
+   |
+help: consider borrowing here
+   |
+LL |     let x: &str = &String::new();
+   |                   +
 
 error[E0308]: mismatched types
   --> $DIR/coerce-suggestions.rs:12:10
diff --git a/tests/ui/span/issue-39018.stderr b/tests/ui/span/issue-39018.stderr
index bae93639271..c8c4a513988 100644
--- a/tests/ui/span/issue-39018.stderr
+++ b/tests/ui/span/issue-39018.stderr
@@ -78,10 +78,12 @@ error[E0308]: mismatched types
   --> $DIR/issue-39018.rs:29:17
    |
 LL |     let _ = a + b;
-   |                 ^
-   |                 |
-   |                 expected `&str`, found `String`
-   |                 help: consider borrowing here: `&b`
+   |                 ^ expected `&str`, found `String`
+   |
+help: consider borrowing here
+   |
+LL |     let _ = a + &b;
+   |                 +
 
 error[E0369]: cannot add `String` to `&String`
   --> $DIR/issue-39018.rs:30:15
diff --git a/tests/ui/span/mut-arg-hint.stderr b/tests/ui/span/mut-arg-hint.stderr
index 96ce4d5bc6c..06011eac674 100644
--- a/tests/ui/span/mut-arg-hint.stderr
+++ b/tests/ui/span/mut-arg-hint.stderr
@@ -7,7 +7,7 @@ LL |         a.push_str("bar");
 help: consider changing this to be a mutable reference
    |
 LL |     fn foo(mut a: &mut String) {
-   |                   ~~~~~~~~~~~
+   |                    +++
 
 error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference
   --> $DIR/mut-arg-hint.rs:8:5
@@ -18,7 +18,7 @@ LL |     a.push_str("foo");
 help: consider changing this to be a mutable reference
    |
 LL | pub fn foo<'a>(mut a: &'a mut String) {
-   |                       ~~~~~~~~~~~~~~
+   |                           +++
 
 error[E0596]: cannot borrow `*a` as mutable, as it is behind a `&` reference
   --> $DIR/mut-arg-hint.rs:15:9
@@ -29,7 +29,7 @@ LL |         a.push_str("foo");
 help: consider changing this to be a mutable reference
    |
 LL |     pub fn foo(mut a: &mut String) {
-   |                       ~~~~~~~~~~~
+   |                        +++
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/specialization/issue-111232.rs b/tests/ui/specialization/issue-111232.rs
new file mode 100644
index 00000000000..3ed3c580e6d
--- /dev/null
+++ b/tests/ui/specialization/issue-111232.rs
@@ -0,0 +1,11 @@
+#![feature(min_specialization)]
+
+struct S;
+
+impl From<S> for S {
+    fn from(s: S) -> S { //~ ERROR `from` specializes an item from a parent `impl`, but that item is not marked `default`
+        s
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/specialization/issue-111232.stderr b/tests/ui/specialization/issue-111232.stderr
new file mode 100644
index 00000000000..27ee42fc00c
--- /dev/null
+++ b/tests/ui/specialization/issue-111232.stderr
@@ -0,0 +1,11 @@
+error[E0520]: `from` specializes an item from a parent `impl`, but that item is not marked `default`
+  --> $DIR/issue-111232.rs:6:5
+   |
+LL |     fn from(s: S) -> S {
+   |     ^^^^^^^^^^^^^^^^^^
+   |
+   = note: parent implementation is in crate `core`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0520`.
diff --git a/tests/ui/specialization/min_specialization/specialize-associated-type.rs b/tests/ui/specialization/min_specialization/specialize-associated-type.rs
new file mode 100644
index 00000000000..c4960b0c28e
--- /dev/null
+++ b/tests/ui/specialization/min_specialization/specialize-associated-type.rs
@@ -0,0 +1,37 @@
+// Another regression test for #109815.
+
+// check-pass
+
+#![feature(min_specialization)]
+#![feature(rustc_attrs)]
+
+#[rustc_specialization_trait]
+trait X {}
+trait Z {
+    type Assoc: X;
+}
+struct A<T>(T);
+
+impl X for () {}
+
+impl<T: X> Z for A<T> {
+    type Assoc = ();
+}
+
+trait MyFrom<T> {
+    fn from(other: T) -> Self;
+}
+
+impl<T> MyFrom<()> for T {
+    default fn from(other: ()) -> T {
+        panic!();
+    }
+}
+
+impl<T: X> MyFrom<<A<T> as Z>::Assoc> for T {
+    fn from(other: ()) -> T {
+        panic!();
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/specialization/min_specialization/specialize_nothing.rs b/tests/ui/specialization/min_specialization/specialize_nothing.rs
new file mode 100644
index 00000000000..ef92254d465
--- /dev/null
+++ b/tests/ui/specialization/min_specialization/specialize_nothing.rs
@@ -0,0 +1,14 @@
+#![feature(min_specialization)]
+
+trait Special {
+    fn be_special();
+}
+
+impl<T> Special for T {
+    fn be_special() {}
+}
+
+impl Special for usize {}
+//~^ ERROR specialization impl does not specialize any associated items
+
+fn main() {}
diff --git a/tests/ui/specialization/min_specialization/specialize_nothing.stderr b/tests/ui/specialization/min_specialization/specialize_nothing.stderr
new file mode 100644
index 00000000000..65f73781cae
--- /dev/null
+++ b/tests/ui/specialization/min_specialization/specialize_nothing.stderr
@@ -0,0 +1,14 @@
+error: specialization impl does not specialize any associated items
+  --> $DIR/specialize_nothing.rs:11:1
+   |
+LL | impl Special for usize {}
+   | ^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: impl is a specialization of this impl
+  --> $DIR/specialize_nothing.rs:7:1
+   |
+LL | impl<T> Special for T {
+   | ^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/tests/ui/specialization/min_specialization/specialize_on_type_error.rs b/tests/ui/specialization/min_specialization/specialize_on_type_error.rs
new file mode 100644
index 00000000000..24e92a0abc3
--- /dev/null
+++ b/tests/ui/specialization/min_specialization/specialize_on_type_error.rs
@@ -0,0 +1,33 @@
+// A regression test for #109815.
+
+#![feature(min_specialization)]
+#![feature(rustc_attrs)]
+
+#[rustc_specialization_trait]
+trait X {}
+trait Y: X {}
+trait Z {
+    type Assoc: Y;
+}
+struct A<T>(T);
+
+impl<T: X> Z for A<T> {}
+//~^ ERROR not all trait items implemented
+
+trait MyFrom<T> {
+    fn from(other: T) -> Self;
+}
+
+impl<T> MyFrom<T> for T {
+    default fn from(other: T) -> T {
+        other
+    }
+}
+
+impl<T: X> MyFrom<<A<T> as Z>::Assoc> for T {
+    fn from(other: <A<T> as Z>::Assoc) -> T {
+        other
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/specialization/min_specialization/specialize_on_type_error.stderr b/tests/ui/specialization/min_specialization/specialize_on_type_error.stderr
new file mode 100644
index 00000000000..cc12302bd8c
--- /dev/null
+++ b/tests/ui/specialization/min_specialization/specialize_on_type_error.stderr
@@ -0,0 +1,12 @@
+error[E0046]: not all trait items implemented, missing: `Assoc`
+  --> $DIR/specialize_on_type_error.rs:14:1
+   |
+LL |     type Assoc: Y;
+   |     ------------- `Assoc` from trait
+...
+LL | impl<T: X> Z for A<T> {}
+   | ^^^^^^^^^^^^^^^^^^^^^ missing `Assoc` in implementation
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0046`.
diff --git a/tests/ui/specialization/min_specialization/specialize_with_generalize_lifetimes.rs b/tests/ui/specialization/min_specialization/specialize_with_generalize_lifetimes.rs
new file mode 100644
index 00000000000..d90b81f717a
--- /dev/null
+++ b/tests/ui/specialization/min_specialization/specialize_with_generalize_lifetimes.rs
@@ -0,0 +1,50 @@
+// Regression test for #79457.
+
+#![feature(min_specialization)]
+
+use std::any::Any;
+
+pub trait Tr {
+    fn method(self) -> Box<dyn Any + 'static>;
+    fn other(self);
+}
+
+impl<T: Any + 'static> Tr for T {
+    default fn method(self) -> Box<dyn Any + 'static> {
+        Box::new(self)
+    }
+
+    default fn other(self) {}
+}
+
+impl<'a> Tr for &'a i32 {
+    //~^ ERROR does not fulfill the required lifetime
+    fn other(self) {}
+}
+
+fn promote_to_static<'a>(i: &'a i32) -> &'static i32 {
+    *i.method().downcast().unwrap()
+}
+
+struct Wrapper<'a>(&'a i32);
+
+impl<'a> Tr for Wrapper<'a> {
+    //~^ ERROR does not fulfill the required lifetime
+    fn other(self) {}
+}
+
+fn promote_to_static_2<'a>(w: Wrapper<'a>) -> Wrapper<'static> {
+    *w.method().downcast().unwrap()
+}
+
+fn main() {
+    let i = Box::new(100_i32);
+    let static_i: &'static i32 = promote_to_static(&*i);
+    drop(i);
+    println!("{}", *static_i);
+
+    let j = Box::new(200_i32);
+    let static_w: Wrapper<'static> = promote_to_static_2(Wrapper(&*j));
+    drop(j);
+    println!("{}", *static_w.0);
+}
diff --git a/tests/ui/specialization/min_specialization/specialize_with_generalize_lifetimes.stderr b/tests/ui/specialization/min_specialization/specialize_with_generalize_lifetimes.stderr
new file mode 100644
index 00000000000..2af75876d5b
--- /dev/null
+++ b/tests/ui/specialization/min_specialization/specialize_with_generalize_lifetimes.stderr
@@ -0,0 +1,27 @@
+error[E0477]: the type `&'a i32` does not fulfill the required lifetime
+  --> $DIR/specialize_with_generalize_lifetimes.rs:20:1
+   |
+LL | impl<'a> Tr for &'a i32 {
+   | ^^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: type must satisfy the static lifetime as required by this binding
+  --> $DIR/specialize_with_generalize_lifetimes.rs:12:15
+   |
+LL | impl<T: Any + 'static> Tr for T {
+   |               ^^^^^^^
+
+error[E0477]: the type `Wrapper<'a>` does not fulfill the required lifetime
+  --> $DIR/specialize_with_generalize_lifetimes.rs:31:1
+   |
+LL | impl<'a> Tr for Wrapper<'a> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: type must satisfy the static lifetime as required by this binding
+  --> $DIR/specialize_with_generalize_lifetimes.rs:12:15
+   |
+LL | impl<T: Any + 'static> Tr for T {
+   |               ^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0477`.
diff --git a/tests/ui/stability-attribute/stability-attribute-trait-impl.rs b/tests/ui/stability-attribute/stability-attribute-trait-impl.rs
index 0c771ae8795..1d138e26408 100644
--- a/tests/ui/stability-attribute/stability-attribute-trait-impl.rs
+++ b/tests/ui/stability-attribute/stability-attribute-trait-impl.rs
@@ -1,4 +1,4 @@
-#![feature(staged_api, never_type, c_unwind)]
+#![feature(staged_api, never_type, rust_cold_cc)]
 //~^ ERROR module has missing stability attribute
 
 #[stable(feature = "a", since = "1")]
@@ -25,9 +25,9 @@ impl UnstableTrait for StableType {}
 #[unstable(feature = "h", issue = "none")]
 impl StableTrait for ! {}
 
-// Note: If C-unwind is stabilized, switch this to another (unstable) ABI.
+// Note: If rust_cold_cc is stabilized, switch this to another (unstable) ABI.
 #[unstable(feature = "i", issue = "none")]
-impl StableTrait for extern "C-unwind" fn() {}
+impl StableTrait for extern "rust-cold" fn() {}
 
 #[unstable(feature = "j", issue = "none")]
 //~^ ERROR an `#[unstable]` annotation here has no effect [ineffective_unstable_trait_impl]
diff --git a/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr b/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr
index b91a1d2e11a..96322c2c945 100644
--- a/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr
@@ -18,7 +18,7 @@ LL | #[unstable(feature = "k", issue = "none")]
 error: module has missing stability attribute
   --> $DIR/stability-attribute-trait-impl.rs:1:1
    |
-LL | / #![feature(staged_api, never_type, c_unwind)]
+LL | / #![feature(staged_api, never_type, rust_cold_cc)]
 LL | |
 LL | |
 LL | | #[stable(feature = "a", since = "1")]
diff --git a/tests/ui/str/str-array-assignment.stderr b/tests/ui/str/str-array-assignment.stderr
index c23400a1d14..515cb9e12f8 100644
--- a/tests/ui/str/str-array-assignment.stderr
+++ b/tests/ui/str/str-array-assignment.stderr
@@ -10,10 +10,12 @@ error[E0308]: mismatched types
   --> $DIR/str-array-assignment.rs:5:27
    |
 LL |   let u: &str = if true { s[..2] } else { s };
-   |                           ^^^^^^
-   |                           |
-   |                           expected `&str`, found `str`
-   |                           help: consider borrowing here: `&s[..2]`
+   |                           ^^^^^^ expected `&str`, found `str`
+   |
+help: consider borrowing here
+   |
+LL |   let u: &str = if true { &s[..2] } else { s };
+   |                           +
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
   --> $DIR/str-array-assignment.rs:7:7
@@ -33,11 +35,14 @@ error[E0308]: mismatched types
   --> $DIR/str-array-assignment.rs:9:17
    |
 LL |   let w: &str = s[..2];
-   |          ----   ^^^^^^
-   |          |      |
-   |          |      expected `&str`, found `str`
-   |          |      help: consider borrowing here: `&s[..2]`
+   |          ----   ^^^^^^ expected `&str`, found `str`
+   |          |
    |          expected due to this
+   |
+help: consider borrowing here
+   |
+LL |   let w: &str = &s[..2];
+   |                 +
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/structs-enums/issue-103869.fixed b/tests/ui/structs-enums/issue-103869.fixed
new file mode 100644
index 00000000000..49fe32c7109
--- /dev/null
+++ b/tests/ui/structs-enums/issue-103869.fixed
@@ -0,0 +1,13 @@
+// run-rustfix
+
+struct VecOrMap {
+    //~^ HELP: perhaps you meant to use `struct` here
+    vec: Vec<usize>,
+    //~^ ERROR expected one of `(`, `,`, `=`, `{`, or `}`, found `:`
+    //~| HELP: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }`
+}
+
+fn main() {
+    let o = VecOrMap { vec: vec![1, 2, 3] };
+    println!("{:?}", o.vec);
+}
diff --git a/tests/ui/parser/issue-103869.rs b/tests/ui/structs-enums/issue-103869.rs
index 28c442bdd63..729079e0501 100644
--- a/tests/ui/parser/issue-103869.rs
+++ b/tests/ui/structs-enums/issue-103869.rs
@@ -1,9 +1,13 @@
-enum VecOrMap{
+// run-rustfix
+
+enum VecOrMap {
+    //~^ HELP: perhaps you meant to use `struct` here
     vec: Vec<usize>,
     //~^ ERROR expected one of `(`, `,`, `=`, `{`, or `}`, found `:`
     //~| HELP: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }`
-    //~| ERROR expected item, found `:`
-    map: HashMap<String,usize>
 }
 
-fn main() {}
+fn main() {
+    let o = VecOrMap { vec: vec![1, 2, 3] };
+    println!("{:?}", o.vec);
+}
diff --git a/tests/ui/parser/issue-103869.stderr b/tests/ui/structs-enums/issue-103869.stderr
index 0b8cd919a9d..4665ebf89a3 100644
--- a/tests/ui/parser/issue-103869.stderr
+++ b/tests/ui/structs-enums/issue-103869.stderr
@@ -1,16 +1,17 @@
 error: expected one of `(`, `,`, `=`, `{`, or `}`, found `:`
-  --> $DIR/issue-103869.rs:2:8
+  --> $DIR/issue-103869.rs:5:8
    |
+LL | enum VecOrMap {
+   |      -------- while parsing this enum
+LL |
 LL |     vec: Vec<usize>,
    |        ^ expected one of `(`, `,`, `=`, `{`, or `}`
    |
    = help: enum variants can be `Variant`, `Variant = <integer>`, `Variant(Type, ..., TypeN)` or `Variant { fields: Types }`
-
-error: expected item, found `:`
-  --> $DIR/issue-103869.rs:2:8
+help: perhaps you meant to use `struct` here
    |
-LL |     vec: Vec<usize>,
-   |        ^ expected item
+LL | struct VecOrMap {
+   | ~~~~~~
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
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/as-ref.stderr b/tests/ui/suggestions/as-ref.stderr
index 0ee343ebf9f..2147d2d92e3 100644
--- a/tests/ui/suggestions/as-ref.stderr
+++ b/tests/ui/suggestions/as-ref.stderr
@@ -2,61 +2,73 @@ error[E0308]: mismatched types
   --> $DIR/as-ref.rs:7:29
    |
 LL |     opt.map(|arg| takes_ref(arg));
-   |         ---       --------- ^^^ expected `&Foo`, found `Foo`
-   |         |         |
-   |         |         arguments to this function are incorrect
-   |         help: consider using `as_ref` instead: `as_ref().map`
+   |                   --------- ^^^ expected `&Foo`, found `Foo`
+   |                   |
+   |                   arguments to this function are incorrect
    |
 note: function defined here
   --> $DIR/as-ref.rs:3:4
    |
 LL | fn takes_ref(_: &Foo) {}
    |    ^^^^^^^^^ -------
+help: consider using `as_ref` instead
+   |
+LL |     opt.as_ref().map(|arg| takes_ref(arg));
+   |         +++++++++
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:8:39
    |
 LL |     opt.and_then(|arg| Some(takes_ref(arg)));
-   |         --------            --------- ^^^ expected `&Foo`, found `Foo`
-   |         |                   |
-   |         |                   arguments to this function are incorrect
-   |         help: consider using `as_ref` instead: `as_ref().and_then`
+   |                             --------- ^^^ expected `&Foo`, found `Foo`
+   |                             |
+   |                             arguments to this function are incorrect
    |
 note: function defined here
   --> $DIR/as-ref.rs:3:4
    |
 LL | fn takes_ref(_: &Foo) {}
    |    ^^^^^^^^^ -------
+help: consider using `as_ref` instead
+   |
+LL |     opt.as_ref().and_then(|arg| Some(takes_ref(arg)));
+   |         +++++++++
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:10:29
    |
 LL |     opt.map(|arg| takes_ref(arg));
-   |         ---       --------- ^^^ expected `&Foo`, found `Foo`
-   |         |         |
-   |         |         arguments to this function are incorrect
-   |         help: consider using `as_ref` instead: `as_ref().map`
+   |                   --------- ^^^ expected `&Foo`, found `Foo`
+   |                   |
+   |                   arguments to this function are incorrect
    |
 note: function defined here
   --> $DIR/as-ref.rs:3:4
    |
 LL | fn takes_ref(_: &Foo) {}
    |    ^^^^^^^^^ -------
+help: consider using `as_ref` instead
+   |
+LL |     opt.as_ref().map(|arg| takes_ref(arg));
+   |         +++++++++
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:11:37
    |
 LL |     opt.and_then(|arg| Ok(takes_ref(arg)));
-   |         --------          --------- ^^^ expected `&Foo`, found `Foo`
-   |         |                 |
-   |         |                 arguments to this function are incorrect
-   |         help: consider using `as_ref` instead: `as_ref().and_then`
+   |                           --------- ^^^ expected `&Foo`, found `Foo`
+   |                           |
+   |                           arguments to this function are incorrect
    |
 note: function defined here
   --> $DIR/as-ref.rs:3:4
    |
 LL | fn takes_ref(_: &Foo) {}
    |    ^^^^^^^^^ -------
+help: consider using `as_ref` instead
+   |
+LL |     opt.as_ref().and_then(|arg| Ok(takes_ref(arg)));
+   |         +++++++++
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:13:29
@@ -101,61 +113,73 @@ error[E0308]: mismatched types
   --> $DIR/as-ref.rs:22:42
    |
 LL |     multiple_ref_opt.map(|arg| takes_ref(arg));
-   |                      ---       --------- ^^^ expected `&Foo`, found `Foo`
-   |                      |         |
-   |                      |         arguments to this function are incorrect
-   |                      help: consider using `as_ref` instead: `as_ref().map`
+   |                                --------- ^^^ expected `&Foo`, found `Foo`
+   |                                |
+   |                                arguments to this function are incorrect
    |
 note: function defined here
   --> $DIR/as-ref.rs:3:4
    |
 LL | fn takes_ref(_: &Foo) {}
    |    ^^^^^^^^^ -------
+help: consider using `as_ref` instead
+   |
+LL |     multiple_ref_opt.as_ref().map(|arg| takes_ref(arg));
+   |                      +++++++++
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:23:52
    |
 LL |     multiple_ref_opt.and_then(|arg| Some(takes_ref(arg)));
-   |                      --------            --------- ^^^ expected `&Foo`, found `Foo`
-   |                      |                   |
-   |                      |                   arguments to this function are incorrect
-   |                      help: consider using `as_ref` instead: `as_ref().and_then`
+   |                                          --------- ^^^ expected `&Foo`, found `Foo`
+   |                                          |
+   |                                          arguments to this function are incorrect
    |
 note: function defined here
   --> $DIR/as-ref.rs:3:4
    |
 LL | fn takes_ref(_: &Foo) {}
    |    ^^^^^^^^^ -------
+help: consider using `as_ref` instead
+   |
+LL |     multiple_ref_opt.as_ref().and_then(|arg| Some(takes_ref(arg)));
+   |                      +++++++++
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:25:45
    |
 LL |     multiple_ref_result.map(|arg| takes_ref(arg));
-   |                         ---       --------- ^^^ expected `&Foo`, found `Foo`
-   |                         |         |
-   |                         |         arguments to this function are incorrect
-   |                         help: consider using `as_ref` instead: `as_ref().map`
+   |                                   --------- ^^^ expected `&Foo`, found `Foo`
+   |                                   |
+   |                                   arguments to this function are incorrect
    |
 note: function defined here
   --> $DIR/as-ref.rs:3:4
    |
 LL | fn takes_ref(_: &Foo) {}
    |    ^^^^^^^^^ -------
+help: consider using `as_ref` instead
+   |
+LL |     multiple_ref_result.as_ref().map(|arg| takes_ref(arg));
+   |                         +++++++++
 
 error[E0308]: mismatched types
   --> $DIR/as-ref.rs:26:53
    |
 LL |     multiple_ref_result.and_then(|arg| Ok(takes_ref(arg)));
-   |                         --------          --------- ^^^ expected `&Foo`, found `Foo`
-   |                         |                 |
-   |                         |                 arguments to this function are incorrect
-   |                         help: consider using `as_ref` instead: `as_ref().and_then`
+   |                                           --------- ^^^ expected `&Foo`, found `Foo`
+   |                                           |
+   |                                           arguments to this function are incorrect
    |
 note: function defined here
   --> $DIR/as-ref.rs:3:4
    |
 LL | fn takes_ref(_: &Foo) {}
    |    ^^^^^^^^^ -------
+help: consider using `as_ref` instead
+   |
+LL |     multiple_ref_result.as_ref().and_then(|arg| Ok(takes_ref(arg)));
+   |                         +++++++++
 
 error: aborting due to 11 previous errors
 
diff --git a/tests/ui/suggestions/issue-68049-2.stderr b/tests/ui/suggestions/issue-68049-2.stderr
index de35aa5b186..6f3c78443f8 100644
--- a/tests/ui/suggestions/issue-68049-2.stderr
+++ b/tests/ui/suggestions/issue-68049-2.stderr
@@ -4,10 +4,10 @@ error[E0594]: cannot assign to `*input`, which is behind a `&` reference
 LL |       *input = self.0;
    |       ^^^^^^^^^^^^^^^ `input` is a `&` reference, so the data it refers to cannot be written
    |
-help: consider changing that to be a mutable reference
+help: consider changing this to be a mutable reference
    |
-LL |   fn example(&self, input: &mut i32); // should suggest here
-   |                            ~~~~~~~~
+LL |   fn example(&self, input: &mut i32) { // should not suggest here
+   |                             +++
 
 error[E0594]: cannot assign to `self.0`, which is behind a `&` reference
   --> $DIR/issue-68049-2.rs:17:5
@@ -15,7 +15,7 @@ error[E0594]: cannot assign to `self.0`, which is behind a `&` reference
 LL |     self.0 += *input;
    |     ^^^^^^^^^^^^^^^^ `self` is a `&` reference, so the data it refers to cannot be written
    |
-help: consider changing that to be a mutable reference
+help: consider changing this to be a mutable reference
    |
 LL |   fn example(&mut self, input: &i32); // should suggest here
    |              ~~~~~~~~~
diff --git a/tests/ui/suggestions/issue-71394-no-from-impl.stderr b/tests/ui/suggestions/issue-71394-no-from-impl.stderr
index 5c36a385a46..ea57992b483 100644
--- a/tests/ui/suggestions/issue-71394-no-from-impl.stderr
+++ b/tests/ui/suggestions/issue-71394-no-from-impl.stderr
@@ -6,8 +6,14 @@ LL |     let _: &[i8] = data.into();
    |
    = help: the following other types implement trait `From<T>`:
              <&'input [u8] as From<gimli::read::endian_slice::EndianSlice<'input, Endian>>>
-             <[T; LANES] as From<Simd<T, LANES>>>
-             <[bool; LANES] as From<Mask<T, LANES>>>
+             <[T; 10] as From<(T, T, T, T, T, T, T, T, T, T)>>
+             <[T; 11] as From<(T, T, T, T, T, T, T, T, T, T, T)>>
+             <[T; 12] as From<(T, T, T, T, T, T, T, T, T, T, T, T)>>
+             <[T; 1] as From<(T,)>>
+             <[T; 2] as From<(T, T)>>
+             <[T; 3] as From<(T, T, T)>>
+             <[T; 4] as From<(T, T, T, T)>>
+           and 7 others
    = note: required for `&[u8]` to implement `Into<&[i8]>`
 
 error: aborting due to previous error
diff --git a/tests/ui/suggestions/issue-96555.stderr b/tests/ui/suggestions/issue-96555.stderr
index 9a8a183dc2d..1a1e069f09e 100644
--- a/tests/ui/suggestions/issue-96555.stderr
+++ b/tests/ui/suggestions/issue-96555.stderr
@@ -1,8 +1,8 @@
 error[E0277]: `()` is not a future
-  --> $DIR/issue-96555.rs:4:12
+  --> $DIR/issue-96555.rs:4:13
    |
 LL |     m::f1().await;
-   |     -------^^^^^^ `()` is not a future
+   |     ------- ^^^^^ `()` is not a future
    |     |
    |     this call returns `()`
    |
@@ -20,10 +20,10 @@ LL |     pub async fn f1() {}
    |         +++++
 
 error[E0277]: `()` is not a future
-  --> $DIR/issue-96555.rs:5:12
+  --> $DIR/issue-96555.rs:5:13
    |
 LL |     m::f2().await;
-   |     -------^^^^^^ `()` is not a future
+   |     ------- ^^^^^ `()` is not a future
    |     |
    |     this call returns `()`
    |
@@ -41,10 +41,10 @@ LL |     pub(crate) async fn f2() {}
    |                +++++
 
 error[E0277]: `()` is not a future
-  --> $DIR/issue-96555.rs:6:12
+  --> $DIR/issue-96555.rs:6:13
    |
 LL |     m::f3().await;
-   |     -------^^^^^^ `()` is not a future
+   |     ------- ^^^^^ `()` is not a future
    |     |
    |     this call returns `()`
    |
diff --git a/tests/ui/suggestions/many-type-ascription.rs b/tests/ui/suggestions/many-type-ascription.rs
index 31ac556b944..cc2406d6690 100644
--- a/tests/ui/suggestions/many-type-ascription.rs
+++ b/tests/ui/suggestions/many-type-ascription.rs
@@ -1,4 +1,4 @@
 fn main() {
-    let _ = 0: i32; //~ ERROR: type ascription is experimental
+    let _ = 0: i32; //~ ERROR: expected one of
     let _ = 0: i32; // (error only emitted once)
 }
diff --git a/tests/ui/suggestions/many-type-ascription.stderr b/tests/ui/suggestions/many-type-ascription.stderr
index 3706bbae9df..e36919c82f8 100644
--- a/tests/ui/suggestions/many-type-ascription.stderr
+++ b/tests/ui/suggestions/many-type-ascription.stderr
@@ -1,12 +1,10 @@
-error[E0658]: type ascription is experimental
-  --> $DIR/many-type-ascription.rs:2:13
+error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
+  --> $DIR/many-type-ascription.rs:2:14
    |
 LL |     let _ = 0: i32;
-   |             ^^^^^^
+   |              ^ expected one of `.`, `;`, `?`, `else`, or an operator
    |
-   = note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information
-   = help: add `#![feature(type_ascription)]` to the crate attributes to enable
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/suggestions/path-by-value.stderr b/tests/ui/suggestions/path-by-value.stderr
index bbeaa26a93a..fd3646b8c3c 100644
--- a/tests/ui/suggestions/path-by-value.stderr
+++ b/tests/ui/suggestions/path-by-value.stderr
@@ -5,7 +5,8 @@ LL | fn f(p: Path) { }
    |      ^ doesn't have a size known at compile-time
    |
    = help: within `Path`, the trait `Sized` is not implemented for `[u8]`
-   = note: required because it appears within the type `Path`
+note: required because it appears within the type `Path`
+  --> $SRC_DIR/std/src/path.rs:LL:COL
    = help: unsized fn params are gated as an unstable feature
 help: function arguments must have a statically known size, borrowed types always have a known size
    |
diff --git a/tests/ui/suggestions/suggest-borrow-to-dyn-object.stderr b/tests/ui/suggestions/suggest-borrow-to-dyn-object.stderr
index 6ce9bfd9dca..365c1016eb3 100644
--- a/tests/ui/suggestions/suggest-borrow-to-dyn-object.stderr
+++ b/tests/ui/suggestions/suggest-borrow-to-dyn-object.stderr
@@ -5,7 +5,8 @@ LL |     check(s);
    |           ^ doesn't have a size known at compile-time
    |
    = help: within `OsStr`, the trait `Sized` is not implemented for `[u8]`
-   = note: required because it appears within the type `OsStr`
+note: required because it appears within the type `OsStr`
+  --> $SRC_DIR/std/src/ffi/os_str.rs:LL:COL
    = note: required for the cast from `OsStr` to the object type `dyn AsRef<Path>`
 help: consider borrowing the value, since `&OsStr` can be coerced into `dyn AsRef<Path>`
    |
diff --git a/tests/ui/suggestions/suggest-boxed-empty-block.fixed b/tests/ui/suggestions/suggest-boxed-empty-block.fixed
new file mode 100644
index 00000000000..46683aa0953
--- /dev/null
+++ b/tests/ui/suggestions/suggest-boxed-empty-block.fixed
@@ -0,0 +1,12 @@
+#![feature(async_closure)]
+
+// edition:2021
+// run-rustfix
+
+fn foo<T>(_: Box<T>) {}
+fn bar<T>(_: impl Fn() -> Box<T>) {}
+
+fn main() {
+    foo(Box::new(())); //~ ERROR mismatched types
+    bar(|| Box::new(())); //~ ERROR mismatched types
+}
diff --git a/tests/ui/suggestions/suggest-boxed-empty-block.rs b/tests/ui/suggestions/suggest-boxed-empty-block.rs
new file mode 100644
index 00000000000..e19670a5018
--- /dev/null
+++ b/tests/ui/suggestions/suggest-boxed-empty-block.rs
@@ -0,0 +1,12 @@
+#![feature(async_closure)]
+
+// edition:2021
+// run-rustfix
+
+fn foo<T>(_: Box<T>) {}
+fn bar<T>(_: impl Fn() -> Box<T>) {}
+
+fn main() {
+    foo({}); //~ ERROR mismatched types
+    bar(|| {}); //~ ERROR mismatched types
+}
diff --git a/tests/ui/suggestions/suggest-boxed-empty-block.stderr b/tests/ui/suggestions/suggest-boxed-empty-block.stderr
new file mode 100644
index 00000000000..474a37b888f
--- /dev/null
+++ b/tests/ui/suggestions/suggest-boxed-empty-block.stderr
@@ -0,0 +1,33 @@
+error[E0308]: mismatched types
+  --> $DIR/suggest-boxed-empty-block.rs:10:9
+   |
+LL |     foo({});
+   |         ^^ expected `Box<_>`, found `()`
+   |
+   = note: expected struct `Box<_>`
+           found unit type `()`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+help: store this in the heap by calling `Box::new`
+   |
+LL -     foo({});
+LL +     foo(Box::new(()));
+   |
+
+error[E0308]: mismatched types
+  --> $DIR/suggest-boxed-empty-block.rs:11:12
+   |
+LL |     bar(|| {});
+   |            ^^ expected `Box<_>`, found `()`
+   |
+   = note: expected struct `Box<_>`
+           found unit type `()`
+   = note: for more on the distinction between the stack and the heap, read https://doc.rust-lang.org/book/ch15-01-box.html, https://doc.rust-lang.org/rust-by-example/std/box.html, and https://doc.rust-lang.org/std/boxed/index.html
+help: store this in the heap by calling `Box::new`
+   |
+LL -     bar(|| {});
+LL +     bar(|| Box::new(()));
+   |
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/suggestions/suggest-ref-macro.rs b/tests/ui/suggestions/suggest-ref-macro.rs
index 6f780f32a14..730f5fa1b5e 100644
--- a/tests/ui/suggestions/suggest-ref-macro.rs
+++ b/tests/ui/suggestions/suggest-ref-macro.rs
@@ -14,7 +14,7 @@ macro_rules! bla {
     () => {
         x(123);
         //~^ ERROR mismatched types
-        //~| SUGGESTION &mut 123
+        //~| SUGGESTION &mut
     };
     ($v:expr) => {
         x($v)
@@ -25,5 +25,5 @@ fn main() {
     bla!();
     bla!(456);
     //~^ ERROR mismatched types
-    //~| SUGGESTION &mut 456
+    //~| SUGGESTION &mut
 }
diff --git a/tests/ui/suggestions/suggest-ref-macro.stderr b/tests/ui/suggestions/suggest-ref-macro.stderr
index 17de49fbd84..08bc9e86a50 100644
--- a/tests/ui/suggestions/suggest-ref-macro.stderr
+++ b/tests/ui/suggestions/suggest-ref-macro.stderr
@@ -18,10 +18,8 @@ error[E0308]: mismatched types
   --> $DIR/suggest-ref-macro.rs:15:11
    |
 LL |         x(123);
-   |         - ^^^
-   |         | |
-   |         | expected `&mut i32`, found integer
-   |         | help: consider mutably borrowing here: `&mut 123`
+   |         - ^^^ expected `&mut i32`, found integer
+   |         |
    |         arguments to this function are incorrect
 ...
 LL |     bla!();
@@ -33,6 +31,10 @@ note: function defined here
 LL | fn x(_: &mut i32) {}
    |    ^ -----------
    = note: this error originates in the macro `bla` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider mutably borrowing here
+   |
+LL |         x(&mut 123);
+   |           ++++
 
 error[E0308]: mismatched types
   --> $DIR/suggest-ref-macro.rs:26:10
@@ -41,16 +43,17 @@ LL |         x($v)
    |         - arguments to this function are incorrect
 ...
 LL |     bla!(456);
-   |          ^^^
-   |          |
-   |          expected `&mut i32`, found integer
-   |          help: consider mutably borrowing here: `&mut 456`
+   |          ^^^ expected `&mut i32`, found integer
    |
 note: function defined here
   --> $DIR/suggest-ref-macro.rs:11:4
    |
 LL | fn x(_: &mut i32) {}
    |    ^ -----------
+help: consider mutably borrowing here
+   |
+LL |     bla!(&mut 456);
+   |          ++++
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/suggestions/suggest-ref-mut.rs b/tests/ui/suggestions/suggest-ref-mut.rs
index d04113ffccc..b40439b8e37 100644
--- a/tests/ui/suggestions/suggest-ref-mut.rs
+++ b/tests/ui/suggestions/suggest-ref-mut.rs
@@ -12,12 +12,10 @@ impl X {
 fn main() {
     let ref foo = 16;
     //~^ HELP
-    //~| SUGGESTION ref mut foo
     *foo = 32;
     //~^ ERROR
     if let Some(ref bar) = Some(16) {
         //~^ HELP
-        //~| SUGGESTION ref mut bar
         *bar = 32;
         //~^ ERROR
     }
@@ -25,6 +23,5 @@ fn main() {
         ref quo => { *quo = 32; },
         //~^ ERROR
         //~| HELP
-        //~| SUGGESTION ref mut quo
     }
 }
diff --git a/tests/ui/suggestions/suggest-ref-mut.stderr b/tests/ui/suggestions/suggest-ref-mut.stderr
index 7973759bf5e..cc00022ab8e 100644
--- a/tests/ui/suggestions/suggest-ref-mut.stderr
+++ b/tests/ui/suggestions/suggest-ref-mut.stderr
@@ -10,7 +10,7 @@ LL |     fn zap(&mut self) {
    |            ~~~~~~~~~
 
 error[E0594]: cannot assign to `*foo`, which is behind a `&` reference
-  --> $DIR/suggest-ref-mut.rs:16:5
+  --> $DIR/suggest-ref-mut.rs:15:5
    |
 LL |     *foo = 32;
    |     ^^^^^^^^^ `foo` is a `&` reference, so the data it refers to cannot be written
@@ -18,10 +18,10 @@ LL |     *foo = 32;
 help: consider changing this to be a mutable reference
    |
 LL |     let ref mut foo = 16;
-   |         ~~~~~~~~~~~
+   |             +++
 
 error[E0594]: cannot assign to `*bar`, which is behind a `&` reference
-  --> $DIR/suggest-ref-mut.rs:21:9
+  --> $DIR/suggest-ref-mut.rs:19:9
    |
 LL |         *bar = 32;
    |         ^^^^^^^^^ `bar` is a `&` reference, so the data it refers to cannot be written
@@ -29,10 +29,10 @@ LL |         *bar = 32;
 help: consider changing this to be a mutable reference
    |
 LL |     if let Some(ref mut bar) = Some(16) {
-   |                 ~~~~~~~~~~~
+   |                     +++
 
 error[E0594]: cannot assign to `*quo`, which is behind a `&` reference
-  --> $DIR/suggest-ref-mut.rs:25:22
+  --> $DIR/suggest-ref-mut.rs:23:22
    |
 LL |         ref quo => { *quo = 32; },
    |                      ^^^^^^^^^ `quo` is a `&` reference, so the data it refers to cannot be written
@@ -40,7 +40,7 @@ LL |         ref quo => { *quo = 32; },
 help: consider changing this to be a mutable reference
    |
 LL |         ref mut quo => { *quo = 32; },
-   |         ~~~~~~~~~~~
+   |             +++
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/suggestions/type-ascription-instead-of-let.fixed b/tests/ui/suggestions/type-ascription-instead-of-let.fixed
new file mode 100644
index 00000000000..e3d03b6f22a
--- /dev/null
+++ b/tests/ui/suggestions/type-ascription-instead-of-let.fixed
@@ -0,0 +1,11 @@
+// run-rustfix
+
+fn fun(x: i32) -> i32 { x }
+
+fn main() {
+    let _closure_annotated = |value: i32| -> i32 {
+        let temp: i32 = fun(5i32);
+        //~^ ERROR expected identifier, found `:`
+        temp + value + 1
+    };
+}
diff --git a/tests/ui/suggestions/type-ascription-instead-of-let.rs b/tests/ui/suggestions/type-ascription-instead-of-let.rs
index 0e1c3075027..6e1c86f9671 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-let.rs
+++ b/tests/ui/suggestions/type-ascription-instead-of-let.rs
@@ -1,10 +1,11 @@
+// run-rustfix
+
 fn fun(x: i32) -> i32 { x }
 
 fn main() {
-    let closure_annotated = |value: i32| -> i32 {
+    let _closure_annotated = |value: i32| -> i32 {
         temp: i32 = fun(5i32);
-        //~^ ERROR cannot find value `temp` in this scope
+        //~^ ERROR expected identifier, found `:`
         temp + value + 1
-        //~^ ERROR cannot find value `temp` in this scope
     };
 }
diff --git a/tests/ui/suggestions/type-ascription-instead-of-let.stderr b/tests/ui/suggestions/type-ascription-instead-of-let.stderr
index 92e4b5798c8..065b1f4d353 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-let.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-let.stderr
@@ -1,18 +1,13 @@
-error[E0425]: cannot find value `temp` in this scope
-  --> $DIR/type-ascription-instead-of-let.rs:5:9
+error: expected identifier, found `:`
+  --> $DIR/type-ascription-instead-of-let.rs:7:13
    |
 LL |         temp: i32 = fun(5i32);
-   |         ^^^^
-   |         |
-   |         not found in this scope
-   |         help: maybe you meant to write an assignment here: `let temp`
-
-error[E0425]: cannot find value `temp` in this scope
-  --> $DIR/type-ascription-instead-of-let.rs:7:9
+   |             ^ expected identifier
+   |
+help: you might have meant to introduce a new binding
    |
-LL |         temp + value + 1
-   |         ^^^^ not found in this scope
+LL |         let temp: i32 = fun(5i32);
+   |         +++
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/suggestions/type-ascription-instead-of-method.fixed b/tests/ui/suggestions/type-ascription-instead-of-method.fixed
index 56b740b0d5c..02e316b264e 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-method.fixed
+++ b/tests/ui/suggestions/type-ascription-instead-of-method.fixed
@@ -1,5 +1,5 @@
 // run-rustfix
 fn main() {
     let _ = Box::new("foo".to_string());
-    //~^ ERROR expected type, found
+    //~^ ERROR path separator must be a double colon
 }
diff --git a/tests/ui/suggestions/type-ascription-instead-of-method.rs b/tests/ui/suggestions/type-ascription-instead-of-method.rs
index a603e09e7e8..6f893ee89b2 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-method.rs
+++ b/tests/ui/suggestions/type-ascription-instead-of-method.rs
@@ -1,5 +1,5 @@
 // run-rustfix
 fn main() {
     let _ = Box:new("foo".to_string());
-    //~^ ERROR expected type, found
+    //~^ ERROR path separator must be a double colon
 }
diff --git a/tests/ui/suggestions/type-ascription-instead-of-method.stderr b/tests/ui/suggestions/type-ascription-instead-of-method.stderr
index 83bc33f410a..b3799101cf0 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-method.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-method.stderr
@@ -1,12 +1,10 @@
-error: expected type, found `"foo"`
-  --> $DIR/type-ascription-instead-of-method.rs:3:21
+error: path separator must be a double colon
+  --> $DIR/type-ascription-instead-of-method.rs:3:16
    |
 LL |     let _ = Box:new("foo".to_string());
-   |                -    ^^^^^ expected type
-   |                |
-   |                help: maybe write a path separator here: `::`
+   |                ^ help: use a double colon instead: `::`
    |
-   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
+   = note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: aborting due to previous error
 
diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed b/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed
index 787fcc1208e..4cec58be856 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed
+++ b/tests/ui/suggestions/type-ascription-instead-of-path-2.fixed
@@ -1,6 +1,6 @@
 // run-rustfix
 fn main() -> Result<(), ()> {
     let _ = vec![Ok(2)].into_iter().collect::<Result<Vec<_>,_>>()?;
-    //~^ ERROR expected `::`, found `(`
+    //~^ ERROR expected one of
     Ok(())
 }
diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-2.rs b/tests/ui/suggestions/type-ascription-instead-of-path-2.rs
index 934016b3b81..5695d5a7f72 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-path-2.rs
+++ b/tests/ui/suggestions/type-ascription-instead-of-path-2.rs
@@ -1,6 +1,6 @@
 // run-rustfix
 fn main() -> Result<(), ()> {
     let _ = vec![Ok(2)].into_iter().collect:<Result<Vec<_>,_>>()?;
-    //~^ ERROR expected `::`, found `(`
+    //~^ ERROR expected one of
     Ok(())
 }
diff --git a/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr b/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr
index 970b220b737..43d00591e74 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-path-2.stderr
@@ -1,12 +1,14 @@
-error: expected `::`, found `(`
-  --> $DIR/type-ascription-instead-of-path-2.rs:3:63
+error: expected one of `(`, `.`, `::`, `;`, `?`, `else`, or an operator, found `:`
+  --> $DIR/type-ascription-instead-of-path-2.rs:3:44
    |
 LL |     let _ = vec![Ok(2)].into_iter().collect:<Result<Vec<_>,_>>()?;
-   |                                            -                  ^ expected `::`
-   |                                            |
-   |                                            help: maybe write a path separator here: `::`
+   |                                            ^ expected one of 7 possible tokens
    |
-   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
+help: maybe write a path separator here
+   |
+LL |     let _ = vec![Ok(2)].into_iter().collect::<Result<Vec<_>,_>>()?;
+   |                                            ~~
 
 error: aborting due to previous error
 
diff --git a/tests/ui/suggestions/type-ascription-instead-of-path.rs b/tests/ui/suggestions/type-ascription-instead-of-path.rs
index ce40b55f1ee..69647887afc 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-path.rs
+++ b/tests/ui/suggestions/type-ascription-instead-of-path.rs
@@ -1,5 +1,4 @@
 fn main() {
     std:io::stdin();
-    //~^ ERROR failed to resolve: use of undeclared crate or module `io`
-    //~| ERROR expected value, found crate
+    //~^ ERROR path separator must be a double colon
 }
diff --git a/tests/ui/suggestions/type-ascription-instead-of-path.stderr b/tests/ui/suggestions/type-ascription-instead-of-path.stderr
index 518660cfa16..849630218da 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-path.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-path.stderr
@@ -1,18 +1,10 @@
-error[E0433]: failed to resolve: use of undeclared crate or module `io`
-  --> $DIR/type-ascription-instead-of-path.rs:2:9
+error: path separator must be a double colon
+  --> $DIR/type-ascription-instead-of-path.rs:2:8
    |
 LL |     std:io::stdin();
-   |         ^^ use of undeclared crate or module `io`
-
-error[E0423]: expected value, found crate `std`
-  --> $DIR/type-ascription-instead-of-path.rs:2:5
+   |        ^ help: use a double colon instead: `::`
    |
-LL |     std:io::stdin();
-   |     ^^^- help: maybe you meant to write a path separator here: `::`
-   |     |
-   |     not a value
+   = note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-Some errors have detailed explanations: E0423, E0433.
-For more information about an error, try `rustc --explain E0423`.
diff --git a/tests/ui/suggestions/type-ascription-instead-of-variant.fixed b/tests/ui/suggestions/type-ascription-instead-of-variant.fixed
index b3247e1287d..04cb2068624 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-variant.fixed
+++ b/tests/ui/suggestions/type-ascription-instead-of-variant.fixed
@@ -1,5 +1,5 @@
 // run-rustfix
 fn main() {
     let _ = Option::Some("");
-    //~^ ERROR expected type, found
+    //~^ ERROR path separator must be a double colon
 }
diff --git a/tests/ui/suggestions/type-ascription-instead-of-variant.rs b/tests/ui/suggestions/type-ascription-instead-of-variant.rs
index 6fd2c19541c..2cce69bfec8 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-variant.rs
+++ b/tests/ui/suggestions/type-ascription-instead-of-variant.rs
@@ -1,5 +1,5 @@
 // run-rustfix
 fn main() {
     let _ = Option:Some("");
-    //~^ ERROR expected type, found
+    //~^ ERROR path separator must be a double colon
 }
diff --git a/tests/ui/suggestions/type-ascription-instead-of-variant.stderr b/tests/ui/suggestions/type-ascription-instead-of-variant.stderr
index f59ba78d4d3..11d0f5f527e 100644
--- a/tests/ui/suggestions/type-ascription-instead-of-variant.stderr
+++ b/tests/ui/suggestions/type-ascription-instead-of-variant.stderr
@@ -1,12 +1,10 @@
-error: expected type, found `""`
-  --> $DIR/type-ascription-instead-of-variant.rs:3:25
+error: path separator must be a double colon
+  --> $DIR/type-ascription-instead-of-variant.rs:3:19
    |
 LL |     let _ = Option:Some("");
-   |                   -     ^^ expected type
-   |                   |
-   |                   help: maybe write a path separator here: `::`
+   |                   ^ help: use a double colon instead: `::`
    |
-   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
+   = note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: aborting due to previous error
 
diff --git a/tests/ui/target-feature/gate.rs b/tests/ui/target-feature/gate.rs
index 2eea087c705..8d1765eb8e9 100644
--- a/tests/ui/target-feature/gate.rs
+++ b/tests/ui/target-feature/gate.rs
@@ -10,6 +10,7 @@
 // ignore-sparc
 // ignore-sparc64
 // ignore-s390x
+// ignore-loongarch64
 // gate-test-sse4a_target_feature
 // gate-test-powerpc_target_feature
 // gate-test-avx512_target_feature
diff --git a/tests/ui/target-feature/gate.stderr b/tests/ui/target-feature/gate.stderr
index 2d6abcc0a01..ee542b60a26 100644
--- a/tests/ui/target-feature/gate.stderr
+++ b/tests/ui/target-feature/gate.stderr
@@ -1,5 +1,5 @@
 error[E0658]: the target feature `avx512bw` is currently unstable
-  --> $DIR/gate.rs:31:18
+  --> $DIR/gate.rs:32:18
    |
 LL | #[target_feature(enable = "avx512bw")]
    |                  ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/target-feature/invalid-attribute.rs b/tests/ui/target-feature/invalid-attribute.rs
index b59ed076f93..77fd8b85f3f 100644
--- a/tests/ui/target-feature/invalid-attribute.rs
+++ b/tests/ui/target-feature/invalid-attribute.rs
@@ -10,6 +10,7 @@
 // ignore-s390x
 // ignore-sparc
 // ignore-sparc64
+// ignore-loongarch64
 
 #![warn(unused_attributes)]
 
diff --git a/tests/ui/target-feature/invalid-attribute.stderr b/tests/ui/target-feature/invalid-attribute.stderr
index c36392d430f..6d37d0917bc 100644
--- a/tests/ui/target-feature/invalid-attribute.stderr
+++ b/tests/ui/target-feature/invalid-attribute.stderr
@@ -1,11 +1,11 @@
 error: malformed `target_feature` attribute input
-  --> $DIR/invalid-attribute.rs:31:1
+  --> $DIR/invalid-attribute.rs:32:1
    |
 LL | #[target_feature = "+sse2"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[target_feature(enable = "name")]`
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:16:1
+  --> $DIR/invalid-attribute.rs:17:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -14,7 +14,7 @@ LL | extern crate alloc;
    | ------------------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:21:1
+  --> $DIR/invalid-attribute.rs:22:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL | use alloc::alloc::alloc;
    | ------------------------ not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:26:1
+  --> $DIR/invalid-attribute.rs:27:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -32,7 +32,7 @@ LL | extern "Rust" {}
    | ---------------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:48:1
+  --> $DIR/invalid-attribute.rs:49:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -41,7 +41,7 @@ LL | mod another {}
    | -------------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:53:1
+  --> $DIR/invalid-attribute.rs:54:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -50,7 +50,7 @@ LL | const FOO: usize = 7;
    | --------------------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:58:1
+  --> $DIR/invalid-attribute.rs:59:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -59,7 +59,7 @@ LL | struct Foo;
    | ----------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:63:1
+  --> $DIR/invalid-attribute.rs:64:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -68,7 +68,7 @@ LL | enum Bar {}
    | ----------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:68:1
+  --> $DIR/invalid-attribute.rs:69:1
    |
 LL |   #[target_feature(enable = "sse2")]
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -81,7 +81,7 @@ LL | | }
    | |_- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:76:1
+  --> $DIR/invalid-attribute.rs:77:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -90,7 +90,7 @@ LL | type Uwu = ();
    | -------------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:81:1
+  --> $DIR/invalid-attribute.rs:82:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -99,7 +99,7 @@ LL | trait Baz {}
    | ------------ not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:91:1
+  --> $DIR/invalid-attribute.rs:92:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -108,7 +108,7 @@ LL | static A: () = ();
    | ------------------ not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:96:1
+  --> $DIR/invalid-attribute.rs:97:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -117,7 +117,7 @@ LL | impl Quux for u8 {}
    | ------------------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:101:1
+  --> $DIR/invalid-attribute.rs:102:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -126,7 +126,7 @@ LL | impl Foo {}
    | ----------- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:119:5
+  --> $DIR/invalid-attribute.rs:120:5
    |
 LL |       #[target_feature(enable = "sse2")]
    |       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -138,7 +138,7 @@ LL | |     }
    | |_____- not a function definition
 
 error: attribute should be applied to a function definition
-  --> $DIR/invalid-attribute.rs:127:5
+  --> $DIR/invalid-attribute.rs:128:5
    |
 LL |     #[target_feature(enable = "sse2")]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -147,25 +147,25 @@ LL |     || {};
    |     ----- not a function definition
 
 error: the feature named `foo` is not valid for this target
-  --> $DIR/invalid-attribute.rs:33:18
+  --> $DIR/invalid-attribute.rs:34:18
    |
 LL | #[target_feature(enable = "foo")]
    |                  ^^^^^^^^^^^^^^ `foo` is not valid for this target
 
 error: malformed `target_feature` attribute input
-  --> $DIR/invalid-attribute.rs:36:18
+  --> $DIR/invalid-attribute.rs:37:18
    |
 LL | #[target_feature(bar)]
    |                  ^^^ help: must be of the form: `enable = ".."`
 
 error: malformed `target_feature` attribute input
-  --> $DIR/invalid-attribute.rs:38:18
+  --> $DIR/invalid-attribute.rs:39:18
    |
 LL | #[target_feature(disable = "baz")]
    |                  ^^^^^^^^^^^^^^^ help: must be of the form: `enable = ".."`
 
 error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
-  --> $DIR/invalid-attribute.rs:42:1
+  --> $DIR/invalid-attribute.rs:43:1
    |
 LL | #[target_feature(enable = "sse2")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -177,13 +177,13 @@ LL | fn bar() {}
    = help: add `#![feature(target_feature_11)]` to the crate attributes to enable
 
 error: cannot use `#[inline(always)]` with `#[target_feature]`
-  --> $DIR/invalid-attribute.rs:86:1
+  --> $DIR/invalid-attribute.rs:87:1
    |
 LL | #[inline(always)]
    | ^^^^^^^^^^^^^^^^^
 
 error[E0658]: `#[target_feature(..)]` can only be applied to `unsafe` functions
-  --> $DIR/invalid-attribute.rs:111:5
+  --> $DIR/invalid-attribute.rs:112:5
    |
 LL |     #[target_feature(enable = "sse2")]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/issues/issue-12997-1.rs b/tests/ui/test-attrs/issue-12997-1.rs
index 9f808dac362..9f808dac362 100644
--- a/tests/ui/issues/issue-12997-1.rs
+++ b/tests/ui/test-attrs/issue-12997-1.rs
diff --git a/tests/ui/issues/issue-12997-1.stderr b/tests/ui/test-attrs/issue-12997-1.stderr
index 00c605174fb..00c605174fb 100644
--- a/tests/ui/issues/issue-12997-1.stderr
+++ b/tests/ui/test-attrs/issue-12997-1.stderr
diff --git a/tests/ui/issues/issue-12997-2.rs b/tests/ui/test-attrs/issue-12997-2.rs
index 9df965315ab..9df965315ab 100644
--- a/tests/ui/issues/issue-12997-2.rs
+++ b/tests/ui/test-attrs/issue-12997-2.rs
diff --git a/tests/ui/issues/issue-12997-2.stderr b/tests/ui/test-attrs/issue-12997-2.stderr
index 2a3d0e3457b..2a3d0e3457b 100644
--- a/tests/ui/issues/issue-12997-2.stderr
+++ b/tests/ui/test-attrs/issue-12997-2.stderr
diff --git a/tests/ui/issues/issue-34932.rs b/tests/ui/test-attrs/issue-34932.rs
index ab568fd01ef..ab568fd01ef 100644
--- a/tests/ui/issues/issue-34932.rs
+++ b/tests/ui/test-attrs/issue-34932.rs
diff --git a/tests/ui/test-attrs/test-type.rs b/tests/ui/test-attrs/test-type.rs
index f99e476eaba..8416270fd81 100644
--- a/tests/ui/test-attrs/test-type.rs
+++ b/tests/ui/test-attrs/test-type.rs
@@ -3,6 +3,7 @@
 // check-run-results
 // normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
 // ignore-emscripten no threads support
+// needs-unwind
 // run-pass
 
 #[test]
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/traits/issue-38404.rs b/tests/ui/traits/issue-38404.rs
index 1a92acc3404..05921b2c36e 100644
--- a/tests/ui/traits/issue-38404.rs
+++ b/tests/ui/traits/issue-38404.rs
@@ -2,5 +2,6 @@ trait A<T>: std::ops::Add<Self> + Sized {}
 trait B<T>: A<T> {}
 trait C<T>: A<dyn B<T, Output=usize>> {}
 //~^ ERROR the trait `B` cannot be made into an object
+//~| ERROR the trait `B` cannot be made into an object
 
 fn main() {}
diff --git a/tests/ui/traits/issue-38404.stderr b/tests/ui/traits/issue-38404.stderr
index d7721d7e69c..f8625f53b78 100644
--- a/tests/ui/traits/issue-38404.stderr
+++ b/tests/ui/traits/issue-38404.stderr
@@ -12,6 +12,20 @@ LL | trait A<T>: std::ops::Add<Self> + Sized {}
 LL | trait B<T>: A<T> {}
    |       - this trait cannot be made into an object...
 
-error: aborting due to previous error
+error[E0038]: the trait `B` cannot be made into an object
+  --> $DIR/issue-38404.rs:3:15
+   |
+LL | trait C<T>: A<dyn B<T, Output=usize>> {}
+   |               ^^^^^^^^^^^^^^^^^^^^^^ `B` cannot be made into an object
+   |
+note: for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
+  --> $DIR/issue-38404.rs:1:13
+   |
+LL | trait A<T>: std::ops::Add<Self> + Sized {}
+   |             ^^^^^^^^^^^^^^^^^^^ ...because it uses `Self` as a type parameter
+LL | trait B<T>: A<T> {}
+   |       - this trait cannot be made into an object...
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/issue-7013.stderr b/tests/ui/traits/issue-7013.stderr
index 4575f4dbae6..9ac5c4725ab 100644
--- a/tests/ui/traits/issue-7013.stderr
+++ b/tests/ui/traits/issue-7013.stderr
@@ -5,7 +5,8 @@ LL |     let a = A {v: Box::new(B{v: None}) as Box<dyn Foo + Send>};
    |                   ^^^^^^^^^^^^^^^^^^^^ `Rc<RefCell<A>>` cannot be sent between threads safely
    |
    = help: within `B`, the trait `Send` is not implemented for `Rc<RefCell<A>>`
-   = note: required because it appears within the type `Option<Rc<RefCell<A>>>`
+note: required because it appears within the type `Option<Rc<RefCell<A>>>`
+  --> $SRC_DIR/core/src/option.rs:LL:COL
 note: required because it appears within the type `B`
   --> $DIR/issue-7013.rs:8:8
    |
diff --git a/tests/ui/traits/negative-bounds/associated-constraints.rs b/tests/ui/traits/negative-bounds/associated-constraints.rs
new file mode 100644
index 00000000000..bc1a0ef1708
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/associated-constraints.rs
@@ -0,0 +1,20 @@
+#![feature(negative_bounds, associated_type_bounds)]
+//~^ WARN the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
+
+trait Trait {
+    type Assoc;
+}
+
+fn test<T: !Trait<Assoc = i32>>() {}
+//~^ ERROR associated type constraints not allowed on negative bounds
+
+fn test2<T>() where T: !Trait<Assoc = i32> {}
+//~^ ERROR associated type constraints not allowed on negative bounds
+
+fn test3<T: !Trait<Assoc: Send>>() {}
+//~^ ERROR associated type constraints not allowed on negative bounds
+
+fn test4<T>() where T: !Trait<Assoc: Send> {}
+//~^ ERROR associated type constraints not allowed on negative bounds
+
+fn main() {}
diff --git a/tests/ui/traits/negative-bounds/associated-constraints.stderr b/tests/ui/traits/negative-bounds/associated-constraints.stderr
new file mode 100644
index 00000000000..335ac7e5ad9
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/associated-constraints.stderr
@@ -0,0 +1,34 @@
+error: associated type constraints not allowed on negative bounds
+  --> $DIR/associated-constraints.rs:8:19
+   |
+LL | fn test<T: !Trait<Assoc = i32>>() {}
+   |                   ^^^^^^^^^^^
+
+error: associated type constraints not allowed on negative bounds
+  --> $DIR/associated-constraints.rs:11:31
+   |
+LL | fn test2<T>() where T: !Trait<Assoc = i32> {}
+   |                               ^^^^^^^^^^^
+
+error: associated type constraints not allowed on negative bounds
+  --> $DIR/associated-constraints.rs:14:20
+   |
+LL | fn test3<T: !Trait<Assoc: Send>>() {}
+   |                    ^^^^^^^^^^^
+
+error: associated type constraints not allowed on negative bounds
+  --> $DIR/associated-constraints.rs:17:31
+   |
+LL | fn test4<T>() where T: !Trait<Assoc: Send> {}
+   |                               ^^^^^^^^^^^
+
+warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/associated-constraints.rs:1:12
+   |
+LL | #![feature(negative_bounds, associated_type_bounds)]
+   |            ^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+
+error: aborting due to 4 previous errors; 1 warning emitted
+
diff --git a/tests/ui/traits/negative-bounds/simple.rs b/tests/ui/traits/negative-bounds/simple.rs
new file mode 100644
index 00000000000..f6d1d5169c4
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/simple.rs
@@ -0,0 +1,42 @@
+#![feature(negative_bounds, negative_impls)]
+//~^ WARN the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
+
+fn not_copy<T: !Copy>() {}
+
+fn neg_param_env<T: !Copy>() {
+    not_copy::<T>();
+}
+
+fn pos_param_env<T: Copy>() {
+    not_copy::<T>();
+    //~^ ERROR the trait bound `T: !Copy` is not satisfied
+}
+
+fn unknown<T>() {
+    not_copy::<T>();
+    //~^ ERROR the trait bound `T: !Copy` is not satisfied
+}
+
+struct NotCopyable;
+impl !Copy for NotCopyable {}
+
+fn neg_impl() {
+    not_copy::<NotCopyable>();
+}
+
+#[derive(Copy, Clone)]
+struct Copyable;
+
+fn pos_impl() {
+    not_copy::<Copyable>();
+    //~^ ERROR the trait bound `Copyable: !Copy` is not satisfied
+}
+
+struct NotNecessarilyCopyable;
+
+fn unknown_impl() {
+    not_copy::<NotNecessarilyCopyable>();
+    //~^ ERROR the trait bound `NotNecessarilyCopyable: !Copy` is not satisfied
+}
+
+fn main() {}
diff --git a/tests/ui/traits/negative-bounds/simple.stderr b/tests/ui/traits/negative-bounds/simple.stderr
new file mode 100644
index 00000000000..a3cab41a2ce
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/simple.stderr
@@ -0,0 +1,70 @@
+warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/simple.rs:1:12
+   |
+LL | #![feature(negative_bounds, negative_impls)]
+   |            ^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+
+error[E0277]: the trait bound `T: !Copy` is not satisfied
+  --> $DIR/simple.rs:11:16
+   |
+LL |     not_copy::<T>();
+   |                ^ the trait `!Copy` is not implemented for `T`
+   |
+note: required by a bound in `not_copy`
+  --> $DIR/simple.rs:4:16
+   |
+LL | fn not_copy<T: !Copy>() {}
+   |                ^^^^^ required by this bound in `not_copy`
+
+error[E0277]: the trait bound `T: !Copy` is not satisfied
+  --> $DIR/simple.rs:16:16
+   |
+LL |     not_copy::<T>();
+   |                ^ the trait `!Copy` is not implemented for `T`
+   |
+note: required by a bound in `not_copy`
+  --> $DIR/simple.rs:4:16
+   |
+LL | fn not_copy<T: !Copy>() {}
+   |                ^^^^^ required by this bound in `not_copy`
+
+error[E0277]: the trait bound `Copyable: !Copy` is not satisfied
+  --> $DIR/simple.rs:31:16
+   |
+LL |     not_copy::<Copyable>();
+   |                ^^^^^^^^ the trait `!Copy` is not implemented for `Copyable`
+   |
+   = help: the trait `Copy` is implemented for `Copyable`
+note: required by a bound in `not_copy`
+  --> $DIR/simple.rs:4:16
+   |
+LL | fn not_copy<T: !Copy>() {}
+   |                ^^^^^ required by this bound in `not_copy`
+help: consider annotating `Copyable` with `#[derive(Copy)]`
+   |
+LL + #[derive(Copy)]
+LL | struct Copyable;
+   |
+
+error[E0277]: the trait bound `NotNecessarilyCopyable: !Copy` is not satisfied
+  --> $DIR/simple.rs:38:16
+   |
+LL |     not_copy::<NotNecessarilyCopyable>();
+   |                ^^^^^^^^^^^^^^^^^^^^^^ the trait `!Copy` is not implemented for `NotNecessarilyCopyable`
+   |
+note: required by a bound in `not_copy`
+  --> $DIR/simple.rs:4:16
+   |
+LL | fn not_copy<T: !Copy>() {}
+   |                ^^^^^ required by this bound in `not_copy`
+help: consider annotating `NotNecessarilyCopyable` with `#[derive(Copy)]`
+   |
+LL + #[derive(Copy)]
+LL | struct NotNecessarilyCopyable;
+   |
+
+error: aborting due to 4 previous errors; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/negative-bounds/supertrait.rs b/tests/ui/traits/negative-bounds/supertrait.rs
new file mode 100644
index 00000000000..df0884b8b9f
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/supertrait.rs
@@ -0,0 +1,9 @@
+// check-pass
+
+#![feature(negative_bounds)]
+//~^ WARN the feature `negative_bounds` is incomplete
+
+trait A: !B {}
+trait B: !A {}
+
+fn main() {}
diff --git a/tests/ui/traits/negative-bounds/supertrait.stderr b/tests/ui/traits/negative-bounds/supertrait.stderr
new file mode 100644
index 00000000000..f44753b624e
--- /dev/null
+++ b/tests/ui/traits/negative-bounds/supertrait.stderr
@@ -0,0 +1,10 @@
+warning: the feature `negative_bounds` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/supertrait.rs:3:12
+   |
+LL | #![feature(negative_bounds)]
+   |            ^^^^^^^^^^^^^^^
+   |
+   = note: `#[warn(incomplete_features)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr b/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr
index b680ce7f990..a53879657f5 100644
--- a/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr
+++ b/tests/ui/traits/negative-impls/negated-auto-traits-error.stderr
@@ -67,7 +67,8 @@ LL |     is_send(Box::new(TestType));
    |
    = note: the trait bound `Unique<dummy2::TestType>: Send` is not satisfied
    = note: required for `Unique<dummy2::TestType>` to implement `Send`
-   = note: required because it appears within the type `Box<TestType>`
+note: required because it appears within the type `Box<TestType>`
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
 note: required by a bound in `is_send`
   --> $DIR/negated-auto-traits-error.rs:16:15
    |
@@ -93,7 +94,8 @@ note: required because it appears within the type `Outer2<TestType>`
 LL | struct Outer2<T>(T);
    |        ^^^^^^
    = note: required for `Unique<Outer2<dummy3::TestType>>` to implement `Send`
-   = note: required because it appears within the type `Box<Outer2<TestType>>`
+note: required because it appears within the type `Box<Outer2<TestType>>`
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
 note: required by a bound in `is_send`
   --> $DIR/negated-auto-traits-error.rs:16:15
    |
diff --git a/tests/ui/traits/new-solver/alias-bound-unsound.rs b/tests/ui/traits/new-solver/alias-bound-unsound.rs
new file mode 100644
index 00000000000..00294c708f1
--- /dev/null
+++ b/tests/ui/traits/new-solver/alias-bound-unsound.rs
@@ -0,0 +1,27 @@
+// compile-flags: -Ztrait-solver=next
+
+// Makes sure that alias bounds are not unsound!
+
+#![feature(trivial_bounds)]
+
+trait Foo {
+    type Item: Copy
+    where
+        <Self as Foo>::Item: Copy;
+
+    fn copy_me(x: &Self::Item) -> Self::Item {
+        *x
+    }
+}
+
+impl Foo for () {
+    type Item = String where String: Copy;
+}
+
+fn main() {
+    let x = String::from("hello, world");
+    drop(<() as Foo>::copy_me(&x));
+    //~^ ERROR `<() as Foo>::Item: Copy` is not satisfied
+    //~| ERROR `<() as Foo>::Item` is not well-formed
+    println!("{x}");
+}
diff --git a/tests/ui/traits/new-solver/alias-bound-unsound.stderr b/tests/ui/traits/new-solver/alias-bound-unsound.stderr
new file mode 100644
index 00000000000..9a43d2a6639
--- /dev/null
+++ b/tests/ui/traits/new-solver/alias-bound-unsound.stderr
@@ -0,0 +1,24 @@
+error[E0277]: the trait bound `<() as Foo>::Item: Copy` is not satisfied
+  --> $DIR/alias-bound-unsound.rs:23:10
+   |
+LL |     drop(<() as Foo>::copy_me(&x));
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `<() as Foo>::Item`
+   |
+note: required by a bound in `Foo::Item`
+  --> $DIR/alias-bound-unsound.rs:10:30
+   |
+LL |     type Item: Copy
+   |          ---- required by a bound in this associated type
+LL |     where
+LL |         <Self as Foo>::Item: Copy;
+   |                              ^^^^ required by this bound in `Foo::Item`
+
+error: the type `<() as Foo>::Item` is not well-formed
+  --> $DIR/alias-bound-unsound.rs:23:10
+   |
+LL |     drop(<() as Foo>::copy_me(&x));
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/new-solver/nested-alias-bound.rs b/tests/ui/traits/new-solver/nested-alias-bound.rs
new file mode 100644
index 00000000000..c365902dbe5
--- /dev/null
+++ b/tests/ui/traits/new-solver/nested-alias-bound.rs
@@ -0,0 +1,20 @@
+// compile-flags: -Ztrait-solver=next
+// check-pass
+
+trait A {
+    type A: B;
+}
+
+trait B {
+    type B: C;
+}
+
+trait C {}
+
+fn needs_c<T: C>() {}
+
+fn test<T: A>() {
+    needs_c::<<T::A as B>::B>();
+}
+
+fn main() {}
diff --git a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr
new file mode 100644
index 00000000000..a985b1a6e12
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.no.stderr
@@ -0,0 +1,24 @@
+warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/drop-impl-pred.rs:6:12
+   |
+LL | #![feature(non_lifetime_binders)]
+   |            ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+error[E0367]: `Drop` impl requires `H: Foo` but the struct it is implemented for does not
+  --> $DIR/drop-impl-pred.rs:19:15
+   |
+LL |     for<H> H: Foo,
+   |               ^^^
+   |
+note: the implementor must specify the same requirement
+  --> $DIR/drop-impl-pred.rs:12:1
+   |
+LL | struct Bar<T>(T) where T: Foo;
+   | ^^^^^^^^^^^^^
+
+error: aborting due to previous error; 1 warning emitted
+
+For more information about this error, try `rustc --explain E0367`.
diff --git a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs
new file mode 100644
index 00000000000..c65b5ea9ba4
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.rs
@@ -0,0 +1,25 @@
+// revisions: no yes
+//[yes] check-pass
+
+// Issue 110557
+
+#![feature(non_lifetime_binders)]
+//~^ WARN the feature `non_lifetime_binders` is incomplete
+
+pub trait Foo {}
+
+#[cfg(no)]
+struct Bar<T>(T) where T: Foo;
+
+#[cfg(yes)]
+struct Bar<T>(T) where for<H> H: Foo;
+
+impl<T> Drop for Bar<T>
+where
+    for<H> H: Foo,
+//[no]~^ ERROR `Drop` impl requires `H: Foo` but the struct it is implemented for does not
+{
+    fn drop(&mut self) {}
+}
+
+fn main() {}
diff --git a/tests/ui/traits/non_lifetime_binders/drop-impl-pred.yes.stderr b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.yes.stderr
new file mode 100644
index 00000000000..165cf2ee13d
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/drop-impl-pred.yes.stderr
@@ -0,0 +1,11 @@
+warning: the feature `non_lifetime_binders` is incomplete and may not be safe to use and/or cause compiler crashes
+  --> $DIR/drop-impl-pred.rs:6:12
+   |
+LL | #![feature(non_lifetime_binders)]
+   |            ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/traits/unsend-future.stderr b/tests/ui/traits/unsend-future.stderr
index 4aaa7c4a924..6ce1cf452f4 100644
--- a/tests/ui/traits/unsend-future.stderr
+++ b/tests/ui/traits/unsend-future.stderr
@@ -6,12 +6,12 @@ LL |     require_handler(handler)
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `*const i32`
 note: future is not `Send` as this value is used across an await
-  --> $DIR/unsend-future.rs:15:13
+  --> $DIR/unsend-future.rs:15:14
    |
 LL |     let a = &1 as *const i32;
    |         - has type `*const i32` which is not `Send`
 LL |     async {}.await;
-   |             ^^^^^^ await occurs here, with `a` maybe used later
+   |              ^^^^^ await occurs here, with `a` maybe used later
 LL | }
    | - `a` is later dropped here
 note: required by a bound in `require_handler`
diff --git a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr
index 39b60c31197..c054ddb893d 100644
--- a/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr
+++ b/tests/ui/trivial-bounds/trivial-bounds-inconsistent-copy-reborrow.stderr
@@ -7,7 +7,7 @@ LL |     *t
 help: consider changing this to be a mutable reference
    |
 LL | fn reborrow_mut<'a>(t: &'a mut &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy {
-   |                        ~~~~~~~~~~~~~~~~~~~
+   |                            +++
 
 error[E0596]: cannot borrow `**t` as mutable, as it is behind a `&` reference
   --> $DIR/trivial-bounds-inconsistent-copy-reborrow.rs:10:6
@@ -18,7 +18,7 @@ LL |     {*t}
 help: consider changing this to be a mutable reference
    |
 LL | fn copy_reborrow_mut<'a>(t: &'a mut &'a mut i32) -> &'a mut i32 where &'a mut i32: Copy {
-   |                             ~~~~~~~~~~~~~~~~~~~
+   |                                 +++
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/type/ascription/issue-34255-1.rs b/tests/ui/type/ascription/issue-34255-1.rs
index 44b47cc4eb2..7436f83593d 100644
--- a/tests/ui/type/ascription/issue-34255-1.rs
+++ b/tests/ui/type/ascription/issue-34255-1.rs
@@ -1,13 +1,12 @@
+// rustfix
+
 struct Reactor {
     input_cells: Vec<usize>,
 }
 
 impl Reactor {
-    pub fn new() -> Self {
+    pub fn new() -> Self { //~ ERROR struct literal body without path
         input_cells: Vec::new()
-        //~^ ERROR cannot find value `input_cells` in this scope
-        //~| ERROR parenthesized type parameters may only be used with a `Fn` trait
-        //~| ERROR missing generics for struct `Vec`
     }
 }
 
diff --git a/tests/ui/type/ascription/issue-34255-1.stderr b/tests/ui/type/ascription/issue-34255-1.stderr
index fafff19f8f6..254d36cb947 100644
--- a/tests/ui/type/ascription/issue-34255-1.stderr
+++ b/tests/ui/type/ascription/issue-34255-1.stderr
@@ -1,36 +1,18 @@
-error[E0425]: cannot find value `input_cells` in this scope
-  --> $DIR/issue-34255-1.rs:7:9
+error: struct literal body without path
+  --> $DIR/issue-34255-1.rs:8:26
    |
-LL |         input_cells: Vec::new()
-   |         ^^^^^^^^^^^ a field by this name exists in `Self`
+LL |       pub fn new() -> Self {
+   |  __________________________^
+LL | |         input_cells: Vec::new()
+LL | |     }
+   | |_____^
    |
-help: you might have meant to write a `struct` literal
+help: you might have forgotten to add the struct literal inside the block
    |
 LL ~     pub fn new() -> Self { SomeStruct {
 LL |         input_cells: Vec::new()
- ...
-LL |
-LL ~     }}
-   |
-
-error[E0214]: parenthesized type parameters may only be used with a `Fn` trait
-  --> $DIR/issue-34255-1.rs:7:27
-   |
-LL |         input_cells: Vec::new()
-   |                           ^^^^^ only `Fn` traits may use parentheses
-
-error[E0107]: missing generics for struct `Vec`
-  --> $DIR/issue-34255-1.rs:7:22
-   |
-LL |         input_cells: Vec::new()
-   |                      ^^^ expected at least 1 generic argument
-   |
-help: add missing generic argument
+LL ~     } }
    |
-LL |         input_cells: Vec<T>::new()
-   |                         +++
 
-error: aborting due to 3 previous errors
+error: aborting due to previous error
 
-Some errors have detailed explanations: E0107, E0214, E0425.
-For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/type/ascription/issue-47666.fixed b/tests/ui/type/ascription/issue-47666.fixed
index c4db747551e..027c692f900 100644
--- a/tests/ui/type/ascription/issue-47666.fixed
+++ b/tests/ui/type/ascription/issue-47666.fixed
@@ -1,4 +1,4 @@
 // run-rustfix
 fn main() {
-    let _ = Option::Some(vec![0, 1]); //~ ERROR expected type, found
+    let _ = Option::Some(vec![0, 1]); //~ ERROR path separator must be a double colon
 }
diff --git a/tests/ui/type/ascription/issue-47666.rs b/tests/ui/type/ascription/issue-47666.rs
index c67202e2157..e2f5d03ef74 100644
--- a/tests/ui/type/ascription/issue-47666.rs
+++ b/tests/ui/type/ascription/issue-47666.rs
@@ -1,4 +1,4 @@
 // run-rustfix
 fn main() {
-    let _ = Option:Some(vec![0, 1]); //~ ERROR expected type, found
+    let _ = Option:Some(vec![0, 1]); //~ ERROR path separator must be a double colon
 }
diff --git a/tests/ui/type/ascription/issue-47666.stderr b/tests/ui/type/ascription/issue-47666.stderr
index 0f90fce3a42..74d85a75c85 100644
--- a/tests/ui/type/ascription/issue-47666.stderr
+++ b/tests/ui/type/ascription/issue-47666.stderr
@@ -1,16 +1,10 @@
-error: expected type, found `<[_]>::into_vec(#[rustc_box] ::alloc::boxed::Box::new([0, 1]))`
-  --> $DIR/issue-47666.rs:3:25
+error: path separator must be a double colon
+  --> $DIR/issue-47666.rs:3:19
    |
 LL |     let _ = Option:Some(vec![0, 1]);
-   |                   -     ^^^^^^^^^^
-   |                   |     |
-   |                   |     expected type
-   |                   |     in this macro invocation
-   |                   |     this macro call doesn't expand to a type
-   |                   help: maybe write a path separator here: `::`
+   |                   ^ help: use a double colon instead: `::`
    |
-   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
-   = note: this error originates in the macro `$crate::__rust_force_expr` which comes from the expansion of the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: aborting due to previous error
 
diff --git a/tests/ui/type/ascription/issue-54516.fixed b/tests/ui/type/ascription/issue-54516.fixed
index f78268894da..48622663b4d 100644
--- a/tests/ui/type/ascription/issue-54516.fixed
+++ b/tests/ui/type/ascription/issue-54516.fixed
@@ -3,5 +3,5 @@ use std::collections::BTreeMap;
 
 fn main() {
     println!("{}", std::mem::size_of::<BTreeMap<u32, u32>>());
-    //~^ ERROR type ascription cannot be followed by a function call
+    //~^ ERROR path separator must be a double colon
 }
diff --git a/tests/ui/type/ascription/issue-54516.rs b/tests/ui/type/ascription/issue-54516.rs
index 1f34e6943ba..9e71d2af1d3 100644
--- a/tests/ui/type/ascription/issue-54516.rs
+++ b/tests/ui/type/ascription/issue-54516.rs
@@ -3,5 +3,5 @@ use std::collections::BTreeMap;
 
 fn main() {
     println!("{}", std::mem:size_of::<BTreeMap<u32, u32>>());
-    //~^ ERROR type ascription cannot be followed by a function call
+    //~^ ERROR path separator must be a double colon
 }
diff --git a/tests/ui/type/ascription/issue-54516.stderr b/tests/ui/type/ascription/issue-54516.stderr
index 1ab9093e584..a1371432f5a 100644
--- a/tests/ui/type/ascription/issue-54516.stderr
+++ b/tests/ui/type/ascription/issue-54516.stderr
@@ -1,12 +1,10 @@
-error: type ascription cannot be followed by a function call
-  --> $DIR/issue-54516.rs:5:20
+error: path separator must be a double colon
+  --> $DIR/issue-54516.rs:5:28
    |
 LL |     println!("{}", std::mem:size_of::<BTreeMap<u32, u32>>());
-   |                    ^^^^^^^^-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |                            |
-   |                            help: maybe write a path separator here: `::`
+   |                            ^ help: use a double colon instead: `::`
    |
-   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
+   = note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: aborting due to previous error
 
diff --git a/tests/ui/type/ascription/issue-60933.fixed b/tests/ui/type/ascription/issue-60933.fixed
index 3e8be3875b3..016ad4a7e6a 100644
--- a/tests/ui/type/ascription/issue-60933.fixed
+++ b/tests/ui/type/ascription/issue-60933.fixed
@@ -1,5 +1,5 @@
 // run-rustfix
 fn main() {
     let _: usize = std::mem::size_of::<u32>();
-    //~^ ERROR type ascription cannot be followed by a function call
+    //~^ ERROR path separator must be a double colon
 }
diff --git a/tests/ui/type/ascription/issue-60933.rs b/tests/ui/type/ascription/issue-60933.rs
index 2a4ad7bdc4e..972bf2827f9 100644
--- a/tests/ui/type/ascription/issue-60933.rs
+++ b/tests/ui/type/ascription/issue-60933.rs
@@ -1,5 +1,5 @@
 // run-rustfix
 fn main() {
     let _: usize = std::mem:size_of::<u32>();
-    //~^ ERROR type ascription cannot be followed by a function call
+    //~^ ERROR path separator must be a double colon
 }
diff --git a/tests/ui/type/ascription/issue-60933.stderr b/tests/ui/type/ascription/issue-60933.stderr
index 0b7f8edf624..0ec527ff5a9 100644
--- a/tests/ui/type/ascription/issue-60933.stderr
+++ b/tests/ui/type/ascription/issue-60933.stderr
@@ -1,12 +1,10 @@
-error: type ascription cannot be followed by a function call
-  --> $DIR/issue-60933.rs:3:20
+error: path separator must be a double colon
+  --> $DIR/issue-60933.rs:3:28
    |
 LL |     let _: usize = std::mem:size_of::<u32>();
-   |                    ^^^^^^^^-^^^^^^^^^^^^^^
-   |                            |
-   |                            help: maybe write a path separator here: `::`
+   |                            ^ help: use a double colon instead: `::`
    |
-   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
+   = note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: aborting due to previous error
 
diff --git a/tests/ui/type/missing-let-in-binding-2.fixed b/tests/ui/type/missing-let-in-binding-2.fixed
new file mode 100644
index 00000000000..d64013c8c83
--- /dev/null
+++ b/tests/ui/type/missing-let-in-binding-2.fixed
@@ -0,0 +1,5 @@
+// run-rustfix
+
+fn main() {
+    let _v: Vec<i32> = vec![1, 2, 3]; //~ ERROR expected identifier, found `:`
+}
diff --git a/tests/ui/type/missing-let-in-binding-2.rs b/tests/ui/type/missing-let-in-binding-2.rs
new file mode 100644
index 00000000000..f95f7bef215
--- /dev/null
+++ b/tests/ui/type/missing-let-in-binding-2.rs
@@ -0,0 +1,5 @@
+// run-rustfix
+
+fn main() {
+    _v: Vec<i32> = vec![1, 2, 3]; //~ ERROR expected identifier, found `:`
+}
diff --git a/tests/ui/type/missing-let-in-binding-2.stderr b/tests/ui/type/missing-let-in-binding-2.stderr
new file mode 100644
index 00000000000..2e10125943e
--- /dev/null
+++ b/tests/ui/type/missing-let-in-binding-2.stderr
@@ -0,0 +1,13 @@
+error: expected identifier, found `:`
+  --> $DIR/missing-let-in-binding-2.rs:4:7
+   |
+LL |     _v: Vec<i32> = vec![1, 2, 3];
+   |       ^ expected identifier
+   |
+help: you might have meant to introduce a new binding
+   |
+LL |     let _v: Vec<i32> = vec![1, 2, 3];
+   |     +++
+
+error: aborting due to previous error
+
diff --git a/tests/ui/type/missing-let-in-binding-3.rs b/tests/ui/type/missing-let-in-binding-3.rs
new file mode 100644
index 00000000000..d56b1393336
--- /dev/null
+++ b/tests/ui/type/missing-let-in-binding-3.rs
@@ -0,0 +1,5 @@
+struct A {
+    : :u8, //~ ERROR expected identifier, found `:`
+}
+
+fn main() {}
diff --git a/tests/ui/type/missing-let-in-binding-3.stderr b/tests/ui/type/missing-let-in-binding-3.stderr
new file mode 100644
index 00000000000..ca828ce37eb
--- /dev/null
+++ b/tests/ui/type/missing-let-in-binding-3.stderr
@@ -0,0 +1,10 @@
+error: expected identifier, found `:`
+  --> $DIR/missing-let-in-binding-3.rs:2:5
+   |
+LL | struct A {
+   |        - while parsing this struct
+LL |     : :u8,
+   |     ^ expected identifier
+
+error: aborting due to previous error
+
diff --git a/tests/ui/type/missing-let-in-binding-4.rs b/tests/ui/type/missing-let-in-binding-4.rs
new file mode 100644
index 00000000000..879a6fedcd6
--- /dev/null
+++ b/tests/ui/type/missing-let-in-binding-4.rs
@@ -0,0 +1,5 @@
+struct A {
+    : u8 =, //~ ERROR expected identifier, found `:`
+}
+
+fn main() {}
diff --git a/tests/ui/type/missing-let-in-binding-4.stderr b/tests/ui/type/missing-let-in-binding-4.stderr
new file mode 100644
index 00000000000..e6f173a6658
--- /dev/null
+++ b/tests/ui/type/missing-let-in-binding-4.stderr
@@ -0,0 +1,10 @@
+error: expected identifier, found `:`
+  --> $DIR/missing-let-in-binding-4.rs:2:5
+   |
+LL | struct A {
+   |        - while parsing this struct
+LL |     : u8 =,
+   |     ^ expected identifier
+
+error: aborting due to previous error
+
diff --git a/tests/ui/type/missing-let-in-binding.fixed b/tests/ui/type/missing-let-in-binding.fixed
index d1787688950..4301fed2312 100644
--- a/tests/ui/type/missing-let-in-binding.fixed
+++ b/tests/ui/type/missing-let-in-binding.fixed
@@ -1,5 +1,5 @@
 // run-rustfix
 fn main() {
     let mut _foo: i32 = 1;
-    let _foo: i32 = 4; //~ ERROR type ascription is experimental
+    let _foo: i32 = 4; //~ ERROR expected identifier, found `:`
 }
diff --git a/tests/ui/type/missing-let-in-binding.rs b/tests/ui/type/missing-let-in-binding.rs
index ca42f2e6eac..c0f91d98ff3 100644
--- a/tests/ui/type/missing-let-in-binding.rs
+++ b/tests/ui/type/missing-let-in-binding.rs
@@ -1,5 +1,5 @@
 // run-rustfix
 fn main() {
     let mut _foo: i32 = 1;
-    _foo: i32 = 4; //~ ERROR type ascription is experimental
+    _foo: i32 = 4; //~ ERROR expected identifier, found `:`
 }
diff --git a/tests/ui/type/missing-let-in-binding.stderr b/tests/ui/type/missing-let-in-binding.stderr
index 12759c5096e..fc094e8cbad 100644
--- a/tests/ui/type/missing-let-in-binding.stderr
+++ b/tests/ui/type/missing-let-in-binding.stderr
@@ -1,11 +1,10 @@
-error[E0658]: type ascription is experimental
-  --> $DIR/missing-let-in-binding.rs:4:5
+error: expected identifier, found `:`
+  --> $DIR/missing-let-in-binding.rs:4:9
    |
 LL |     _foo: i32 = 4;
-   |     ^^^^^^^^^
+   |         ^ expected identifier
    |
-   = note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information
-   = help: add `#![feature(type_ascription)]` to the crate attributes to enable
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 help: you might have meant to introduce a new binding
    |
 LL |     let _foo: i32 = 4;
@@ -13,4 +12,3 @@ LL |     let _foo: i32 = 4;
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/type/type-ascription-instead-of-statement-end.rs b/tests/ui/type/type-ascription-instead-of-statement-end.rs
index 1d5565ab583..e30e571386b 100644
--- a/tests/ui/type/type-ascription-instead-of-statement-end.rs
+++ b/tests/ui/type/type-ascription-instead-of-statement-end.rs
@@ -1,10 +1,8 @@
-#![feature(type_ascription)]
-
 fn main() {
-    println!("test"):
-    0; //~ ERROR expected type, found `0`
+    println!("test"): //~ ERROR statements are terminated with a semicolon
+    0;
 }
 
 fn foo() {
-    println!("test"): 0; //~ ERROR expected type, found `0`
+    println!("test"): 0; //~ ERROR expected one of
 }
diff --git a/tests/ui/type/type-ascription-instead-of-statement-end.stderr b/tests/ui/type/type-ascription-instead-of-statement-end.stderr
index 521ebcdf192..8c09e78bc5f 100644
--- a/tests/ui/type/type-ascription-instead-of-statement-end.stderr
+++ b/tests/ui/type/type-ascription-instead-of-statement-end.stderr
@@ -1,24 +1,16 @@
-error: expected type, found `0`
-  --> $DIR/type-ascription-instead-of-statement-end.rs:5:5
+error: statements are terminated with a semicolon
+  --> $DIR/type-ascription-instead-of-statement-end.rs:2:21
    |
 LL |     println!("test"):
-   |                     - help: try using a semicolon: `;`
-LL |     0;
-   |     ^ expected type
+   |                     ^ help: use a semicolon instead: `;`
    |
-   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
-   = note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information
+   = note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
-error: expected type, found `0`
-  --> $DIR/type-ascription-instead-of-statement-end.rs:9:23
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
+  --> $DIR/type-ascription-instead-of-statement-end.rs:7:21
    |
 LL |     println!("test"): 0;
-   |                     - ^ expected type
-   |                     |
-   |                     tried to parse a type due to this type ascription
-   |
-   = note: `#![feature(type_ascription)]` lets you annotate an expression with a type: `<expr>: <type>`
-   = note: see issue #23416 <https://github.com/rust-lang/rust/issues/23416> for more information
+   |                     ^ expected one of `.`, `;`, `?`, `}`, or an operator
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/type/type-ascription-precedence.rs b/tests/ui/type/type-ascription-precedence.rs
index d3aef929b9f..1527bb7aa17 100644
--- a/tests/ui/type/type-ascription-precedence.rs
+++ b/tests/ui/type/type-ascription-precedence.rs
@@ -1,10 +1,8 @@
 // Operator precedence of type ascription
 // Type ascription has very high precedence, the same as operator `as`
-
 #![feature(type_ascription)]
 
 use std::ops::*;
-
 struct S;
 struct Z;
 
@@ -25,30 +23,34 @@ impl Deref for S {
     fn deref(&self) -> &Z { panic!() }
 }
 
-fn main() {
-    &S: &S; // OK
-    (&S): &S; // OK
-    &(S: &S); //~ ERROR mismatched types
+fn test1() {
+    &S: &S; //~ ERROR expected one of
+    (&S): &S;
+    &(S: &S);
+}
+
+fn test2() {
+    *(S: Z); //~ ERROR expected identifier
+}
 
-    *S: Z; // OK
-    (*S): Z; // OK
-    *(S: Z); //~ ERROR mismatched types
-    //~^ ERROR type `Z` cannot be dereferenced
+fn test3() {
+    -(S: Z); //~ ERROR expected identifier
+}
 
-    -S: Z; // OK
-    (-S): Z; // OK
-    -(S: Z); //~ ERROR mismatched types
-    //~^ ERROR cannot apply unary operator `-` to type `Z`
+fn test4() {
+    (S + Z): Z; //~ ERROR expected one of
+}
 
-    S + Z: Z; // OK
-    S + (Z: Z); // OK
-    (S + Z): Z; //~ ERROR mismatched types
+fn test5() {
+    (S * Z): Z; //~ ERROR expected one of
+}
 
-    S * Z: Z; // OK
-    S * (Z: Z); // OK
-    (S * Z): Z; //~ ERROR mismatched types
+fn test6() {
+    S .. S: S; //~ ERROR expected identifier, found `:`
+}
 
-    S .. S: S; // OK
-    S .. (S: S); // OK
-    (S .. S): S; //~ ERROR mismatched types
+fn test7() {
+    (S .. S): S; //~ ERROR expected one of
 }
+
+fn main() {}
diff --git a/tests/ui/type/type-ascription-precedence.stderr b/tests/ui/type/type-ascription-precedence.stderr
index d6d1e1d7d02..09cdc370309 100644
--- a/tests/ui/type/type-ascription-precedence.stderr
+++ b/tests/ui/type/type-ascription-precedence.stderr
@@ -1,63 +1,46 @@
-error[E0308]: mismatched types
-  --> $DIR/type-ascription-precedence.rs:31:7
+error: expected one of `!`, `.`, `::`, `;`, `?`, `{`, `}`, or an operator, found `:`
+  --> $DIR/type-ascription-precedence.rs:27:7
    |
-LL |     &(S: &S);
-   |       ^ expected `&S`, found `S`
+LL |     &S: &S;
+   |       ^ expected one of 8 possible tokens
 
-error[E0308]: mismatched types
-  --> $DIR/type-ascription-precedence.rs:35:7
+error: expected identifier, found `:`
+  --> $DIR/type-ascription-precedence.rs:33:8
    |
 LL |     *(S: Z);
-   |       ^ expected `Z`, found `S`
+   |        ^ expected identifier
 
-error[E0614]: type `Z` cannot be dereferenced
-  --> $DIR/type-ascription-precedence.rs:35:5
-   |
-LL |     *(S: Z);
-   |     ^^^^^^^
-
-error[E0308]: mismatched types
-  --> $DIR/type-ascription-precedence.rs:40:7
-   |
-LL |     -(S: Z);
-   |       ^ expected `Z`, found `S`
-
-error[E0600]: cannot apply unary operator `-` to type `Z`
-  --> $DIR/type-ascription-precedence.rs:40:5
+error: expected identifier, found `:`
+  --> $DIR/type-ascription-precedence.rs:37:8
    |
 LL |     -(S: Z);
-   |     ^^^^^^^ cannot apply unary operator `-`
-   |
-note: an implementation of `std::ops::Neg` might be missing for `Z`
-  --> $DIR/type-ascription-precedence.rs:9:1
-   |
-LL | struct Z;
-   | ^^^^^^^^ must implement `std::ops::Neg`
-note: the trait `std::ops::Neg` must be implemented
-  --> $SRC_DIR/core/src/ops/arith.rs:LL:COL
+   |        ^ expected identifier
 
-error[E0308]: mismatched types
-  --> $DIR/type-ascription-precedence.rs:45:5
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
+  --> $DIR/type-ascription-precedence.rs:41:12
    |
 LL |     (S + Z): Z;
-   |     ^^^^^^^ expected `Z`, found `S`
+   |            ^ expected one of `.`, `;`, `?`, `}`, or an operator
 
-error[E0308]: mismatched types
-  --> $DIR/type-ascription-precedence.rs:49:5
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
+  --> $DIR/type-ascription-precedence.rs:45:12
    |
 LL |     (S * Z): Z;
-   |     ^^^^^^^ expected `Z`, found `S`
+   |            ^ expected one of `.`, `;`, `?`, `}`, or an operator
 
-error[E0308]: mismatched types
-  --> $DIR/type-ascription-precedence.rs:53:5
+error: expected identifier, found `:`
+  --> $DIR/type-ascription-precedence.rs:49:11
    |
-LL |     (S .. S): S;
-   |     ^^^^^^^^ expected `S`, found `Range<S>`
+LL |     S .. S: S;
+   |           ^ expected identifier
    |
-   = note: expected struct `S`
-              found struct `std::ops::Range<S>`
+   = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
+
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found `:`
+  --> $DIR/type-ascription-precedence.rs:53:13
+   |
+LL |     (S .. S): S;
+   |             ^ expected one of `.`, `;`, `?`, `}`, or an operator
 
-error: aborting due to 8 previous errors
+error: aborting due to 7 previous errors
 
-Some errors have detailed explanations: E0308, E0600, E0614.
-For more information about an error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-ascription-with-fn-call.fixed b/tests/ui/type/type-ascription-with-fn-call.fixed
index 6d96c4303c3..847f3309973 100644
--- a/tests/ui/type/type-ascription-with-fn-call.fixed
+++ b/tests/ui/type/type-ascription-with-fn-call.fixed
@@ -1,9 +1,7 @@
 // run-rustfix
-#![feature(type_ascription)]
-
 fn main() {
-    f()  ;
-    f(); //~ ERROR expected type, found function
+    f()  ; //~ ERROR statements are terminated with a semicolon
+    f();
 }
 
 fn f() {}
diff --git a/tests/ui/type/type-ascription-with-fn-call.rs b/tests/ui/type/type-ascription-with-fn-call.rs
index ed4f7c9041c..1db48b0adc4 100644
--- a/tests/ui/type/type-ascription-with-fn-call.rs
+++ b/tests/ui/type/type-ascription-with-fn-call.rs
@@ -1,9 +1,7 @@
 // run-rustfix
-#![feature(type_ascription)]
-
 fn main() {
-    f()  :
-    f(); //~ ERROR expected type, found function
+    f()  : //~ ERROR statements are terminated with a semicolon
+    f();
 }
 
 fn f() {}
diff --git a/tests/ui/type/type-ascription-with-fn-call.stderr b/tests/ui/type/type-ascription-with-fn-call.stderr
index d78fd08fd60..e3afa497ac2 100644
--- a/tests/ui/type/type-ascription-with-fn-call.stderr
+++ b/tests/ui/type/type-ascription-with-fn-call.stderr
@@ -1,11 +1,10 @@
-error[E0573]: expected type, found function `f`
-  --> $DIR/type-ascription-with-fn-call.rs:6:5
+error: statements are terminated with a semicolon
+  --> $DIR/type-ascription-with-fn-call.rs:3:10
    |
 LL |     f()  :
-   |          - help: maybe you meant to write `;` here
-LL |     f();
-   |     ^^^ expecting a type here because of type ascription
+   |          ^ help: use a semicolon instead: `;`
+   |
+   = note: if you meant to annotate an expression with a type, the type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0573`.
diff --git a/tests/ui/type/type-mismatch.stderr b/tests/ui/type/type-mismatch.stderr
index 67a1f893050..ce6f29d354f 100644
--- a/tests/ui/type/type-mismatch.stderr
+++ b/tests/ui/type/type-mismatch.stderr
@@ -378,10 +378,8 @@ error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:47:23
    |
 LL |     want::<&Foo<foo>>(f);
-   |     ----------------- ^
-   |     |                 |
-   |     |                 expected `&Foo<foo>`, found `Foo<foo>`
-   |     |                 help: consider borrowing here: `&f`
+   |     ----------------- ^ expected `&Foo<foo>`, found `Foo<foo>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&Foo<foo>`
@@ -391,6 +389,10 @@ note: function defined here
    |
 LL | fn want<T>(t: T) {}
    |    ^^^^    ----
+help: consider borrowing here
+   |
+LL |     want::<&Foo<foo>>(&f);
+   |                       +
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:48:26
@@ -556,10 +558,8 @@ error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:61:26
    |
 LL |     want::<&Foo<foo, B>>(f);
-   |     -------------------- ^
-   |     |                    |
-   |     |                    expected `&Foo<foo, B>`, found `Foo<foo, B>`
-   |     |                    help: consider borrowing here: `&f`
+   |     -------------------- ^ expected `&Foo<foo, B>`, found `Foo<foo, B>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&Foo<foo, B>`
@@ -569,6 +569,10 @@ note: function defined here
    |
 LL | fn want<T>(t: T) {}
    |    ^^^^    ----
+help: consider borrowing here
+   |
+LL |     want::<&Foo<foo, B>>(&f);
+   |                          +
 
 error[E0308]: mismatched types
   --> $DIR/type-mismatch.rs:65:19
diff --git a/tests/ui/typeck/bad-index-due-to-nested.stderr b/tests/ui/typeck/bad-index-due-to-nested.stderr
index e03b06b336e..f9cdb280e27 100644
--- a/tests/ui/typeck/bad-index-due-to-nested.stderr
+++ b/tests/ui/typeck/bad-index-due-to-nested.stderr
@@ -4,11 +4,14 @@ error[E0277]: the trait bound `K: Hash` is not satisfied
 LL |     map[k]
    |     ^^^ the trait `Hash` is not implemented for `K`
    |
-note: required by a bound in `<HashMap<K, V> as Index<&K>>`
-  --> $DIR/bad-index-due-to-nested.rs:9:8
+note: required for `HashMap<K, V>` to implement `Index<&K>`
+  --> $DIR/bad-index-due-to-nested.rs:7:12
    |
+LL | impl<K, V> Index<&K> for HashMap<K, V>
+   |            ^^^^^^^^^     ^^^^^^^^^^^^^
+LL | where
 LL |     K: Hash,
-   |        ^^^^ required by this bound in `<HashMap<K, V> as Index<&K>>`
+   |        ---- unsatisfied trait bound introduced here
 help: consider restricting type parameter `K`
    |
 LL | fn index<'a, K: std::hash::Hash, V>(map: &'a HashMap<K, V>, k: K) -> &'a V {
@@ -20,11 +23,14 @@ error[E0277]: the trait bound `V: Copy` is not satisfied
 LL |     map[k]
    |     ^^^ the trait `Copy` is not implemented for `V`
    |
-note: required by a bound in `<HashMap<K, V> as Index<&K>>`
-  --> $DIR/bad-index-due-to-nested.rs:10:8
+note: required for `HashMap<K, V>` to implement `Index<&K>`
+  --> $DIR/bad-index-due-to-nested.rs:7:12
    |
+LL | impl<K, V> Index<&K> for HashMap<K, V>
+   |            ^^^^^^^^^     ^^^^^^^^^^^^^
+...
 LL |     V: Copy,
-   |        ^^^^ required by this bound in `<HashMap<K, V> as Index<&K>>`
+   |        ---- unsatisfied trait bound introduced here
 help: consider restricting type parameter `V`
    |
 LL | fn index<'a, K, V: std::marker::Copy>(map: &'a HashMap<K, V>, k: K) -> &'a V {
@@ -36,13 +42,14 @@ error[E0308]: mismatched types
 LL | fn index<'a, K, V>(map: &'a HashMap<K, V>, k: K) -> &'a V {
    |              - this type parameter
 LL |     map[k]
-   |         ^
-   |         |
-   |         expected `&K`, found type parameter `K`
-   |         help: consider borrowing here: `&k`
+   |         ^ expected `&K`, found type parameter `K`
    |
    = note:   expected reference `&K`
            found type parameter `K`
+help: consider borrowing here
+   |
+LL |     map[&k]
+   |         +
 
 error[E0308]: mismatched types
   --> $DIR/bad-index-due-to-nested.rs:20:5
@@ -50,13 +57,14 @@ error[E0308]: mismatched types
 LL | fn index<'a, K, V>(map: &'a HashMap<K, V>, k: K) -> &'a V {
    |                 - this type parameter               ----- expected `&'a V` because of return type
 LL |     map[k]
-   |     ^^^^^^
-   |     |
-   |     expected `&V`, found type parameter `V`
-   |     help: consider borrowing here: `&map[k]`
+   |     ^^^^^^ expected `&V`, found type parameter `V`
    |
    = note:   expected reference `&'a V`
            found type parameter `V`
+help: consider borrowing here
+   |
+LL |     &map[k]
+   |     +
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/typeck/bad-type-in-vec-contains.stderr b/tests/ui/typeck/bad-type-in-vec-contains.stderr
index 72533ab1fa3..b9b3a5fe5ec 100644
--- a/tests/ui/typeck/bad-type-in-vec-contains.stderr
+++ b/tests/ui/typeck/bad-type-in-vec-contains.stderr
@@ -2,16 +2,18 @@ error[E0308]: mismatched types
   --> $DIR/bad-type-in-vec-contains.rs:5:21
    |
 LL |     primes.contains(3);
-   |            -------- ^
-   |            |        |
-   |            |        expected `&_`, found integer
-   |            |        help: consider borrowing here: `&3`
+   |            -------- ^ expected `&_`, found integer
+   |            |
    |            arguments to this method are incorrect
    |
    = note: expected reference `&_`
                    found type `{integer}`
 note: method defined here
   --> $SRC_DIR/core/src/slice/mod.rs:LL:COL
+help: consider borrowing here
+   |
+LL |     primes.contains(&3);
+   |                     +
 
 error: aborting due to previous error
 
diff --git a/tests/ui/typeck/issue-13853.stderr b/tests/ui/typeck/issue-13853.stderr
index 11d34f5b93b..8ecb8b68016 100644
--- a/tests/ui/typeck/issue-13853.stderr
+++ b/tests/ui/typeck/issue-13853.stderr
@@ -20,10 +20,8 @@ error[E0308]: mismatched types
   --> $DIR/issue-13853.rs:37:13
    |
 LL |     iterate(graph);
-   |     ------- ^^^^^
-   |     |       |
-   |     |       expected `&_`, found `Vec<Stuff>`
-   |     |       help: consider borrowing here: `&graph`
+   |     ------- ^^^^^ expected `&_`, found `Vec<Stuff>`
+   |     |
    |     arguments to this function are incorrect
    |
    = note: expected reference `&_`
@@ -33,6 +31,10 @@ note: function defined here
    |
 LL | fn iterate<N: Node, G: Graph<N>>(graph: &G) {
    |    ^^^^^^^                       ---------
+help: consider borrowing here
+   |
+LL |     iterate(&graph);
+   |             +
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/typeck/repeat-expr-checks-wf.rs b/tests/ui/typeck/repeat-expr-checks-wf.rs
new file mode 100644
index 00000000000..b8a2a0ceb58
--- /dev/null
+++ b/tests/ui/typeck/repeat-expr-checks-wf.rs
@@ -0,0 +1,10 @@
+trait Foo {
+    const ASSOC: [u8];
+}
+
+fn bar<T: Foo>() {
+    let a = [T::ASSOC; 2];
+    //~^ ERROR: the size for values of type `[u8]` cannot be known at compilation time
+}
+
+fn main() {}
diff --git a/tests/ui/typeck/repeat-expr-checks-wf.stderr b/tests/ui/typeck/repeat-expr-checks-wf.stderr
new file mode 100644
index 00000000000..a821088a4b3
--- /dev/null
+++ b/tests/ui/typeck/repeat-expr-checks-wf.stderr
@@ -0,0 +1,12 @@
+error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
+  --> $DIR/repeat-expr-checks-wf.rs:6:13
+   |
+LL |     let a = [T::ASSOC; 2];
+   |             ^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `[u8]`
+   = note: slice and array elements must have `Sized` type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs b/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs
index 7ff9199f63c..e7e62c07739 100644
--- a/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs
+++ b/tests/ui/typeck/typeck-builtin-bound-type-parameters.rs
@@ -3,6 +3,7 @@ fn foo1<T:Copy<U>, U>(x: T) {}
 
 trait Trait: Copy<dyn Send> {}
 //~^ ERROR trait takes 0 generic arguments but 1 generic argument was supplied
+//~| ERROR trait takes 0 generic arguments but 1 generic argument was supplied
 
 struct MyStruct1<T: Copy<T>>;
 //~^ ERROR trait takes 0 generic arguments but 1 generic argument was supplied
diff --git a/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr b/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr
index a71fd953658..a3517af877c 100644
--- a/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr
+++ b/tests/ui/typeck/typeck-builtin-bound-type-parameters.stderr
@@ -15,7 +15,15 @@ LL | trait Trait: Copy<dyn Send> {}
    |              expected 0 generic arguments
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
-  --> $DIR/typeck-builtin-bound-type-parameters.rs:7:21
+  --> $DIR/typeck-builtin-bound-type-parameters.rs:4:14
+   |
+LL | trait Trait: Copy<dyn Send> {}
+   |              ^^^^---------- help: remove these generics
+   |              |
+   |              expected 0 generic arguments
+
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/typeck-builtin-bound-type-parameters.rs:8:21
    |
 LL | struct MyStruct1<T: Copy<T>>;
    |                     ^^^^--- help: remove these generics
@@ -23,7 +31,7 @@ LL | struct MyStruct1<T: Copy<T>>;
    |                     expected 0 generic arguments
 
 error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/typeck-builtin-bound-type-parameters.rs:10:25
+  --> $DIR/typeck-builtin-bound-type-parameters.rs:11:25
    |
 LL | struct MyStruct2<'a, T: Copy<'a>>;
    |                         ^^^^---- help: remove these generics
@@ -31,7 +39,7 @@ LL | struct MyStruct2<'a, T: Copy<'a>>;
    |                         expected 0 lifetime arguments
 
 error[E0107]: trait takes 0 lifetime arguments but 1 lifetime argument was supplied
-  --> $DIR/typeck-builtin-bound-type-parameters.rs:13:15
+  --> $DIR/typeck-builtin-bound-type-parameters.rs:14:15
    |
 LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
    |               ^^^^ -- help: remove this lifetime argument
@@ -39,13 +47,13 @@ LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
    |               expected 0 lifetime arguments
 
 error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
-  --> $DIR/typeck-builtin-bound-type-parameters.rs:13:15
+  --> $DIR/typeck-builtin-bound-type-parameters.rs:14:15
    |
 LL | fn foo2<'a, T:Copy<'a, U>, U>(x: T) {}
    |               ^^^^     - help: remove this generic argument
    |               |
    |               expected 0 generic arguments
 
-error: aborting due to 6 previous errors
+error: aborting due to 7 previous errors
 
 For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/union/union-sized-field.stderr b/tests/ui/union/union-sized-field.stderr
index 771e8f26199..bf1ff9c8bc1 100644
--- a/tests/ui/union/union-sized-field.stderr
+++ b/tests/ui/union/union-sized-field.stderr
@@ -6,7 +6,8 @@ LL | union Foo<T: ?Sized> {
 LL |     value: ManuallyDrop<T>,
    |            ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
-   = note: required because it appears within the type `ManuallyDrop<T>`
+note: required because it appears within the type `ManuallyDrop<T>`
+  --> $SRC_DIR/core/src/mem/manually_drop.rs:LL:COL
    = note: no field of a union may have a dynamically sized type
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
@@ -31,7 +32,8 @@ LL | struct Foo2<T: ?Sized> {
 LL |     value: ManuallyDrop<T>,
    |            ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
-   = note: required because it appears within the type `ManuallyDrop<T>`
+note: required because it appears within the type `ManuallyDrop<T>`
+  --> $SRC_DIR/core/src/mem/manually_drop.rs:LL:COL
    = note: only the last field of a struct may have a dynamically sized type
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
@@ -56,7 +58,8 @@ LL | enum Foo3<T: ?Sized> {
 LL |     Value(ManuallyDrop<T>),
    |           ^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
    |
-   = note: required because it appears within the type `ManuallyDrop<T>`
+note: required because it appears within the type `ManuallyDrop<T>`
+  --> $SRC_DIR/core/src/mem/manually_drop.rs:LL:COL
    = note: no field of an enum variant may have a dynamically sized type
    = help: change the field's type to have a statically known size
 help: consider removing the `?Sized` bound to make the type parameter `Sized`
diff --git a/tests/ui/unsized-locals/suggest-borrow.stderr b/tests/ui/unsized-locals/suggest-borrow.stderr
index d456c16de0d..8741b35cdcf 100644
--- a/tests/ui/unsized-locals/suggest-borrow.stderr
+++ b/tests/ui/unsized-locals/suggest-borrow.stderr
@@ -16,11 +16,14 @@ error[E0308]: mismatched types
   --> $DIR/suggest-borrow.rs:3:20
    |
 LL |     let x: &[u8] = vec!(1, 2, 3)[..];
-   |            -----   ^^^^^^^^^^^^^^^^^
-   |            |       |
-   |            |       expected `&[u8]`, found `[{integer}]`
-   |            |       help: consider borrowing here: `&vec!(1, 2, 3)[..]`
+   |            -----   ^^^^^^^^^^^^^^^^^ expected `&[u8]`, found `[{integer}]`
+   |            |
    |            expected due to this
+   |
+help: consider borrowing here
+   |
+LL |     let x: &[u8] = &vec!(1, 2, 3)[..];
+   |                    +
 
 error[E0308]: mismatched types
   --> $DIR/suggest-borrow.rs:4:19
diff --git a/tests/ui/unwind-abis/feature-gate-c-unwind-enabled.rs b/tests/ui/unwind-abis/feature-gate-c-unwind-enabled.rs
deleted file mode 100644
index 6ff5dbda2d5..00000000000
--- a/tests/ui/unwind-abis/feature-gate-c-unwind-enabled.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// Test that the "C-unwind" ABI is feature-gated, and *can* be used when the
-// `c_unwind` feature gate is enabled.
-
-// check-pass
-
-#![feature(c_unwind)]
-
-extern "C-unwind" fn f() {}
-
-fn main() {
-    f();
-}
diff --git a/tests/ui/unwind-abis/feature-gate-c-unwind.rs b/tests/ui/unwind-abis/feature-gate-c-unwind.rs
deleted file mode 100644
index ba72f74f20c..00000000000
--- a/tests/ui/unwind-abis/feature-gate-c-unwind.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// Test that the "C-unwind" ABI is feature-gated, and cannot be used when the
-// `c_unwind` feature gate is not used.
-
-#![allow(ffi_unwind_calls)]
-//~^ WARNING unknown lint: `ffi_unwind_calls`
-//~| WARNING unknown lint: `ffi_unwind_calls`
-
-extern "C-unwind" fn f() {}
-//~^ ERROR C-unwind ABI is experimental and subject to change [E0658]
-
-fn main() {
-    f();
-}
diff --git a/tests/ui/unwind-abis/feature-gate-c-unwind.stderr b/tests/ui/unwind-abis/feature-gate-c-unwind.stderr
deleted file mode 100644
index 214ddc45ce9..00000000000
--- a/tests/ui/unwind-abis/feature-gate-c-unwind.stderr
+++ /dev/null
@@ -1,33 +0,0 @@
-warning: unknown lint: `ffi_unwind_calls`
-  --> $DIR/feature-gate-c-unwind.rs:4:1
-   |
-LL | #![allow(ffi_unwind_calls)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: the `ffi_unwind_calls` lint is unstable
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-   = note: `#[warn(unknown_lints)]` on by default
-
-error[E0658]: C-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-c-unwind.rs:8:8
-   |
-LL | extern "C-unwind" fn f() {}
-   |        ^^^^^^^^^^
-   |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-warning: unknown lint: `ffi_unwind_calls`
-  --> $DIR/feature-gate-c-unwind.rs:4:1
-   |
-LL | #![allow(ffi_unwind_calls)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: the `ffi_unwind_calls` lint is unstable
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error: aborting due to previous error; 2 warnings emitted
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/unwind-abis/feature-gate-c_unwind.rs b/tests/ui/unwind-abis/feature-gate-c_unwind.rs
new file mode 100644
index 00000000000..d73fe3e0bda
--- /dev/null
+++ b/tests/ui/unwind-abis/feature-gate-c_unwind.rs
@@ -0,0 +1,4 @@
+// ignore-test
+
+// After partial stabilisation, `c_unwind` only contains codegen behaviour changes
+// and are tested in `src/test/codegen/unwind-abis`
diff --git a/tests/ui/unwind-abis/feature-gate-stdcall-unwind.rs b/tests/ui/unwind-abis/feature-gate-stdcall-unwind.rs
deleted file mode 100644
index cfa8eb3cad0..00000000000
--- a/tests/ui/unwind-abis/feature-gate-stdcall-unwind.rs
+++ /dev/null
@@ -1,30 +0,0 @@
-// gate-test-c_unwind
-// needs-llvm-components: x86
-// compile-flags: --target=i686-pc-windows-msvc --crate-type=rlib
-#![no_core]
-#![feature(no_core, lang_items)]
-#[lang="sized"]
-trait Sized { }
-
-// Test that the "stdcall-unwind" ABI is feature-gated, and cannot be used when
-// the `c_unwind` feature gate is not used.
-
-extern "stdcall-unwind" fn fu() {} //~ ERROR stdcall-unwind ABI is experimental
-
-trait T {
-    extern "stdcall-unwind" fn mu(); //~ ERROR stdcall-unwind ABI is experimental
-    extern "stdcall-unwind" fn dmu() {} //~ ERROR stdcall-unwind ABI is experimental
-}
-
-struct S;
-impl T for S {
-    extern "stdcall-unwind" fn mu() {} //~ ERROR stdcall-unwind ABI is experimental
-}
-
-impl S {
-    extern "stdcall-unwind" fn imu() {} //~ ERROR stdcall-unwind ABI is experimental
-}
-
-type TAU = extern "stdcall-unwind" fn(); //~ ERROR stdcall-unwind ABI is experimental
-
-extern "stdcall-unwind" {} //~ ERROR stdcall-unwind ABI is experimental
diff --git a/tests/ui/unwind-abis/feature-gate-stdcall-unwind.stderr b/tests/ui/unwind-abis/feature-gate-stdcall-unwind.stderr
deleted file mode 100644
index c2cce0e1193..00000000000
--- a/tests/ui/unwind-abis/feature-gate-stdcall-unwind.stderr
+++ /dev/null
@@ -1,66 +0,0 @@
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-stdcall-unwind.rs:12:8
-   |
-LL | extern "stdcall-unwind" fn fu() {}
-   |        ^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-stdcall-unwind.rs:15:12
-   |
-LL |     extern "stdcall-unwind" fn mu();
-   |            ^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-stdcall-unwind.rs:16:12
-   |
-LL |     extern "stdcall-unwind" fn dmu() {}
-   |            ^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-stdcall-unwind.rs:21:12
-   |
-LL |     extern "stdcall-unwind" fn mu() {}
-   |            ^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-stdcall-unwind.rs:25:12
-   |
-LL |     extern "stdcall-unwind" fn imu() {}
-   |            ^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-stdcall-unwind.rs:28:19
-   |
-LL | type TAU = extern "stdcall-unwind" fn();
-   |                   ^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error[E0658]: stdcall-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-stdcall-unwind.rs:30:8
-   |
-LL | extern "stdcall-unwind" {}
-   |        ^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error: aborting due to 7 previous errors
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/unwind-abis/feature-gate-system-unwind.rs b/tests/ui/unwind-abis/feature-gate-system-unwind.rs
deleted file mode 100644
index 26c2de4e817..00000000000
--- a/tests/ui/unwind-abis/feature-gate-system-unwind.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Test that the "system-unwind" ABI is feature-gated, and cannot be used when
-// the `c_unwind` feature gate is not used.
-
-extern "system-unwind" fn f() {}
-//~^ ERROR system-unwind ABI is experimental and subject to change [E0658]
-
-fn main() {
-    f();
-}
diff --git a/tests/ui/unwind-abis/feature-gate-system-unwind.stderr b/tests/ui/unwind-abis/feature-gate-system-unwind.stderr
deleted file mode 100644
index 87877336475..00000000000
--- a/tests/ui/unwind-abis/feature-gate-system-unwind.stderr
+++ /dev/null
@@ -1,12 +0,0 @@
-error[E0658]: system-unwind ABI is experimental and subject to change
-  --> $DIR/feature-gate-system-unwind.rs:4:8
-   |
-LL | extern "system-unwind" fn f() {}
-   |        ^^^^^^^^^^^^^^^
-   |
-   = note: see issue #74990 <https://github.com/rust-lang/rust/issues/74990> for more information
-   = help: add `#![feature(c_unwind)]` to the crate attributes to enable
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs b/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs
index 9a324f00435..8f000737656 100644
--- a/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs
+++ b/tests/ui/unwind-abis/ffi-unwind-calls-lint.rs
@@ -1,7 +1,6 @@
 // build-pass
 // needs-unwind
 
-#![feature(c_unwind)]
 #![warn(ffi_unwind_calls)]
 
 mod foo {
diff --git a/tests/ui/unwind-abis/ffi-unwind-calls-lint.stderr b/tests/ui/unwind-abis/ffi-unwind-calls-lint.stderr
index 937a2b3dff8..cf8a7782e35 100644
--- a/tests/ui/unwind-abis/ffi-unwind-calls-lint.stderr
+++ b/tests/ui/unwind-abis/ffi-unwind-calls-lint.stderr
@@ -1,17 +1,17 @@
 warning: call to foreign function with FFI-unwind ABI
-  --> $DIR/ffi-unwind-calls-lint.rs:20:14
+  --> $DIR/ffi-unwind-calls-lint.rs:19:14
    |
 LL |     unsafe { foo(); }
    |              ^^^^^ call to foreign function with FFI-unwind ABI
    |
 note: the lint level is defined here
-  --> $DIR/ffi-unwind-calls-lint.rs:5:9
+  --> $DIR/ffi-unwind-calls-lint.rs:4:9
    |
 LL | #![warn(ffi_unwind_calls)]
    |         ^^^^^^^^^^^^^^^^
 
 warning: call to function pointer with FFI-unwind ABI
-  --> $DIR/ffi-unwind-calls-lint.rs:24:5
+  --> $DIR/ffi-unwind-calls-lint.rs:23:5
    |
 LL |     ptr();
    |     ^^^^^ call to function pointer with FFI-unwind ABI