about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/assembly/asm/arm-types.rs1
-rw-r--r--tests/assembly/closure-inherit-target-feature.rs2
-rw-r--r--tests/assembly/dwarf5.rs2
-rw-r--r--tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-32bit.rs406
-rw-r--r--tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-64bit.rs414
-rw-r--r--tests/assembly/stack-protector/stack-protector-heuristics-effect.rs2
-rw-r--r--tests/codegen-units/item-collection/asm-sym.rs3
-rw-r--r--tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs2
-rw-r--r--tests/codegen-units/item-collection/cross-crate-trait-method.rs2
-rw-r--r--tests/codegen-units/item-collection/items-within-generic-items.rs2
-rw-r--r--tests/codegen-units/item-collection/unreferenced-const-fn.rs1
-rw-r--r--tests/codegen/asm-sanitize-llvm.rs2
-rw-r--r--tests/codegen/async-fn-debug-awaitee-field.rs4
-rw-r--r--tests/codegen/async-fn-debug-msvc.rs2
-rw-r--r--tests/codegen/char-ascii-branchless.rs47
-rw-r--r--tests/codegen/coroutine-debug-msvc.rs (renamed from tests/codegen/generator-debug-msvc.rs)12
-rw-r--r--tests/codegen/coroutine-debug.rs (renamed from tests/codegen/generator-debug.rs)14
-rw-r--r--tests/codegen/debug-linkage-name.rs4
-rw-r--r--tests/codegen/default-requires-uwtable.rs2
-rw-r--r--tests/codegen/drop.rs2
-rw-r--r--tests/codegen/force-frame-pointers.rs2
-rw-r--r--tests/codegen/force-unwind-tables.rs2
-rw-r--r--tests/codegen/inline-function-args-debug-info.rs5
-rw-r--r--tests/codegen/instrument-coverage-off.rs23
-rw-r--r--tests/codegen/instrument-coverage.rs9
-rw-r--r--tests/codegen/instrument-mcount.rs2
-rw-r--r--tests/codegen/instrument-xray/basic.rs2
-rw-r--r--tests/codegen/instrument-xray/options-combine.rs6
-rw-r--r--tests/codegen/instrument-xray/options-override.rs4
-rw-r--r--tests/codegen/panic-unwind-default-uwtable.rs2
-rw-r--r--tests/codegen/personality_lifetimes.rs2
-rw-r--r--tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs2
-rw-r--r--tests/codegen/sanitizer/cfi-emit-type-metadata-id-itanium-cxx-abi.rs2
-rw-r--r--tests/codegen/sanitizer/cfi-generalize-pointers.rs2
-rw-r--r--tests/codegen/sanitizer/cfi-normalize-integers.rs2
-rw-r--r--tests/codegen/sanitizer/kasan-emits-instrumentation.rs2
-rw-r--r--tests/codegen/sanitizer/memtag-attr-check.rs2
-rw-r--r--tests/codegen/sanitizer/no-sanitize.rs2
-rw-r--r--tests/codegen/sanitizer/safestack-attr-check.rs2
-rw-r--r--tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs2
-rw-r--r--tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs2
-rw-r--r--tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs2
-rw-r--r--tests/codegen/target-cpu-on-functions.rs3
-rw-r--r--tests/codegen/tied-features-strength.rs8
-rw-r--r--tests/codegen/tune-cpu-on-functions.rs2
-rw-r--r--tests/codegen/unchecked_shifts.rs2
-rw-r--r--tests/codegen/vec-reserve-extend.rs14
-rw-r--r--tests/codegen/vec_pop_push_noop.rs24
-rw-r--r--tests/coverage-map/fn_sig_into_try.cov-map53
-rw-r--r--tests/coverage-map/fn_sig_into_try.rs41
-rw-r--r--tests/coverage-map/status-quo/bad_counter_ids.cov-map98
-rw-r--r--tests/coverage-map/status-quo/bad_counter_ids.rs66
-rw-r--r--tests/coverage-map/status-quo/coroutine.cov-map (renamed from tests/coverage-map/status-quo/generator.cov-map)6
-rw-r--r--tests/coverage-map/status-quo/coroutine.rs (renamed from tests/run-coverage/generator.rs)16
-rw-r--r--tests/coverage-map/status-quo/inline-dead.cov-map24
-rw-r--r--tests/coverage-map/status-quo/issue-84561.cov-map67
-rw-r--r--tests/coverage-map/status-quo/loops_branches.cov-map138
-rw-r--r--tests/coverage-map/status-quo/sort_groups.cov-map10
-rw-r--r--tests/coverage-map/status-quo/tight_inf_loop.cov-map6
-rw-r--r--tests/coverage-map/status-quo/while.cov-map10
-rw-r--r--tests/coverage-map/status-quo/yield.rs24
-rw-r--r--tests/debuginfo/coroutine-locals.rs (renamed from tests/debuginfo/generator-locals.rs)4
-rw-r--r--tests/debuginfo/coroutine-objects.rs (renamed from tests/debuginfo/generator-objects.rs)30
-rw-r--r--tests/debuginfo/function-names.rs20
-rw-r--r--tests/debuginfo/issue-57822.rs10
-rw-r--r--tests/debuginfo/simple-struct.rs2
-rw-r--r--tests/mir-opt/README.md18
-rw-r--r--tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir60
-rw-r--r--tests/mir-opt/address_of.rs1
-rw-r--r--tests/mir-opt/array_index_is_temporary.rs7
-rw-r--r--tests/mir-opt/asm_unwind_panic_abort.rs3
-rw-r--r--tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir4
-rw-r--r--tests/mir-opt/basic_assignment.rs18
-rw-r--r--tests/mir-opt/bool_compare.rs28
-rw-r--r--tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-abort.mir71
-rw-r--r--tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-unwind.mir71
-rw-r--r--tests/mir-opt/box_expr.main.ElaborateDrops.diff89
-rw-r--r--tests/mir-opt/box_expr.rs17
-rw-r--r--tests/mir-opt/building/async_await.a-{closure#0}.coroutine_resume.0.mir (renamed from tests/mir-opt/building/async_await.a-{closure#0}.generator_resume.0.mir)10
-rw-r--r--tests/mir-opt/building/async_await.b-{closure#0}.coroutine_resume.0.mir (renamed from tests/mir-opt/building/async_await.b-{closure#0}.generator_resume.0.mir)86
-rw-r--r--tests/mir-opt/building/async_await.rs7
-rw-r--r--tests/mir-opt/building/custom/aggregate_exprs.rs1
-rw-r--r--tests/mir-opt/building/custom/arbitrary_let.rs1
-rw-r--r--tests/mir-opt/building/custom/arrays.rs1
-rw-r--r--tests/mir-opt/building/custom/as_cast.rs1
-rw-r--r--tests/mir-opt/building/custom/composite_return.rs1
-rw-r--r--tests/mir-opt/building/custom/consts.rs1
-rw-r--r--tests/mir-opt/building/custom/consts.statics.built.after.mir8
-rw-r--r--tests/mir-opt/building/custom/debuginfo.rs1
-rw-r--r--tests/mir-opt/building/custom/enums.rs1
-rw-r--r--tests/mir-opt/building/custom/operators.rs1
-rw-r--r--tests/mir-opt/building/custom/projections.rs1
-rw-r--r--tests/mir-opt/building/custom/references.rs1
-rw-r--r--tests/mir-opt/building/custom/simple_assign.rs1
-rw-r--r--tests/mir-opt/building/custom/terminators.rs1
-rw-r--r--tests/mir-opt/building/enum_cast.rs1
-rw-r--r--tests/mir-opt/building/issue_101867.main.built.after.mir6
-rw-r--r--tests/mir-opt/building/issue_101867.rs1
-rw-r--r--tests/mir-opt/building/issue_110508.rs1
-rw-r--r--tests/mir-opt/building/issue_110508.{impl#0}-BAR.built.after.mir4
-rw-r--r--tests/mir-opt/building/issue_110508.{impl#0}-SELF_BAR.built.after.mir4
-rw-r--r--tests/mir-opt/building/issue_49232.main.built.after.mir2
-rw-r--r--tests/mir-opt/building/issue_49232.rs1
-rw-r--r--tests/mir-opt/building/logical_or_in_conditional.rs1
-rw-r--r--tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir4
-rw-r--r--tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir3
-rw-r--r--tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir3
-rw-r--r--tests/mir-opt/building/match_false_edges.main.built.after.mir2
-rw-r--r--tests/mir-opt/building/match_false_edges.rs1
-rw-r--r--tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir8
-rw-r--r--tests/mir-opt/building/receiver_ptr_mutability.rs1
-rw-r--r--tests/mir-opt/building/shifts.rs1
-rw-r--r--tests/mir-opt/building/simple_match.match_bool.built.after.mir2
-rw-r--r--tests/mir-opt/building/simple_match.rs1
-rw-r--r--tests/mir-opt/building/storage_live_dead_in_statics.rs1
-rw-r--r--tests/mir-opt/building/uniform_array_move_out.rs1
-rw-r--r--tests/mir-opt/building/while_storage.rs60
-rw-r--r--tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-abort.mir70
-rw-r--r--tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-unwind.mir70
-rw-r--r--tests/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir2
-rw-r--r--tests/mir-opt/byte_slice.rs1
-rw-r--r--tests/mir-opt/casts.redundant.PreCodegen.after.mir14
-rw-r--r--tests/mir-opt/casts.roundtrip.PreCodegen.after.mir15
-rw-r--r--tests/mir-opt/casts.rs17
-rw-r--r--tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir36
-rw-r--r--tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir40
-rw-r--r--tests/mir-opt/const_allocation.rs1
-rw-r--r--tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir34
-rw-r--r--tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir36
-rw-r--r--tests/mir-opt/const_allocation2.rs1
-rw-r--r--tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir20
-rw-r--r--tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir18
-rw-r--r--tests/mir-opt/const_allocation3.rs1
-rw-r--r--tests/mir-opt/const_debuginfo.main.ConstDebugInfo.diff79
-rw-r--r--tests/mir-opt/const_debuginfo.rs16
-rw-r--r--tests/mir-opt/const_goto.rs1
-rw-r--r--tests/mir-opt/const_goto_const_eval_fail.rs1
-rw-r--r--tests/mir-opt/const_goto_storage.rs1
-rw-r--r--tests/mir-opt/const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir4
-rw-r--r--tests/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff4
-rw-r--r--tests/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir4
-rw-r--r--tests/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff4
-rw-r--r--tests/mir-opt/const_promotion_extern_static.rs1
-rw-r--r--tests/mir-opt/const_prop/address_of_pair.rs1
-rw-r--r--tests/mir-opt/const_prop/aggregate.rs1
-rw-r--r--tests/mir-opt/const_prop/array_index.rs1
-rw-r--r--tests/mir-opt/const_prop/bad_op_div_by_zero.rs1
-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.rs1
-rw-r--r--tests/mir-opt/const_prop/boolean_identities.rs1
-rw-r--r--tests/mir-opt/const_prop/boxes.rs1
-rw-r--r--tests/mir-opt/const_prop/cast.rs1
-rw-r--r--tests/mir-opt/const_prop/checked_add.main.ConstProp.panic-abort.diff2
-rw-r--r--tests/mir-opt/const_prop/checked_add.main.ConstProp.panic-unwind.diff2
-rw-r--r--tests/mir-opt/const_prop/checked_add.rs1
-rw-r--r--tests/mir-opt/const_prop/const_prop_fails_gracefully.rs1
-rw-r--r--tests/mir-opt/const_prop/control_flow_simplification.rs1
-rw-r--r--tests/mir-opt/const_prop/discriminant.rs1
-rw-r--r--tests/mir-opt/const_prop/indirect.main.ConstProp.panic-abort.diff2
-rw-r--r--tests/mir-opt/const_prop/indirect.main.ConstProp.panic-unwind.diff2
-rw-r--r--tests/mir-opt/const_prop/indirect.rs1
-rw-r--r--tests/mir-opt/const_prop/indirect_mutation.bar.ConstProp.diff (renamed from tests/mir-opt/const_prop_miscompile.bar.ConstProp.diff)0
-rw-r--r--tests/mir-opt/const_prop/indirect_mutation.foo.ConstProp.diff (renamed from tests/mir-opt/const_prop_miscompile.foo.ConstProp.diff)0
-rw-r--r--tests/mir-opt/const_prop/indirect_mutation.rs41
-rw-r--r--tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-abort.diff2
-rw-r--r--tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-unwind.diff2
-rw-r--r--tests/mir-opt/const_prop/inherit_overflow.rs1
-rw-r--r--tests/mir-opt/const_prop/invalid_constant.rs1
-rw-r--r--tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-abort.diff4
-rw-r--r--tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-unwind.diff4
-rw-r--r--tests/mir-opt/const_prop/issue_66971.rs1
-rw-r--r--tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-abort.diff6
-rw-r--r--tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-unwind.diff6
-rw-r--r--tests/mir-opt/const_prop/issue_67019.rs1
-rw-r--r--tests/mir-opt/const_prop/large_array_index.rs1
-rw-r--r--tests/mir-opt/const_prop/mult_by_zero.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate.main.ConstProp.diff4
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_mut_ref.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_aggregate_partial_read.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_no_prop.main.ConstProp.diff4
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_no_prop.rs1
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.panic-abort.diff2
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.panic-unwind.diff2
-rw-r--r--tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs1
-rw-r--r--tests/mir-opt/const_prop/offset_of.concrete.ConstProp.panic-abort.diff56
-rw-r--r--tests/mir-opt/const_prop/offset_of.concrete.ConstProp.panic-unwind.diff56
-rw-r--r--tests/mir-opt/const_prop/offset_of.generic.ConstProp.panic-abort.diff50
-rw-r--r--tests/mir-opt/const_prop/offset_of.generic.ConstProp.panic-unwind.diff50
-rw-r--r--tests/mir-opt/const_prop/offset_of.rs20
-rw-r--r--tests/mir-opt/const_prop/read_immutable_static.main.ConstProp.diff6
-rw-r--r--tests/mir-opt/const_prop/read_immutable_static.rs1
-rw-r--r--tests/mir-opt/const_prop/ref_deref.rs1
-rw-r--r--tests/mir-opt/const_prop/ref_deref_project.rs1
-rw-r--r--tests/mir-opt/const_prop/reify_fn_ptr.rs1
-rw-r--r--tests/mir-opt/const_prop/repeat.rs1
-rw-r--r--tests/mir-opt/const_prop/return_place.add.ConstProp.panic-abort.diff2
-rw-r--r--tests/mir-opt/const_prop/return_place.add.ConstProp.panic-unwind.diff2
-rw-r--r--tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-abort.mir2
-rw-r--r--tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-unwind.mir2
-rw-r--r--tests/mir-opt/const_prop/return_place.rs1
-rw-r--r--tests/mir-opt/const_prop/scalar_literal_propagation.rs1
-rw-r--r--tests/mir-opt/const_prop/slice_len.rs1
-rw-r--r--tests/mir-opt/const_prop/switch_int.rs1
-rw-r--r--tests/mir-opt/const_prop/transmute.rs22
-rw-r--r--tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.32bit.diff3
-rw-r--r--tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.64bit.diff3
-rw-r--r--tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.panic-abort.diff6
-rw-r--r--tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.panic-unwind.diff6
-rw-r--r--tests/mir-opt/const_prop/tuple_literal_propagation.rs1
-rw-r--r--tests/mir-opt/const_prop/while_let_loops.rs1
-rw-r--r--tests/mir-opt/const_prop_miscompile.rs23
-rw-r--r--tests/mir-opt/copy-prop/borrowed_local.rs1
-rw-r--r--tests/mir-opt/copy-prop/branch.rs1
-rw-r--r--tests/mir-opt/copy-prop/calls.rs1
-rw-r--r--tests/mir-opt/copy-prop/copy_propagation_arg.rs1
-rw-r--r--tests/mir-opt/copy-prop/custom_move_arg.rs1
-rw-r--r--tests/mir-opt/copy-prop/cycle.rs1
-rw-r--r--tests/mir-opt/copy-prop/dead_stores_79191.rs1
-rw-r--r--tests/mir-opt/copy-prop/dead_stores_better.rs1
-rw-r--r--tests/mir-opt/copy-prop/issue_107511.rs1
-rw-r--r--tests/mir-opt/copy-prop/move_arg.rs1
-rw-r--r--tests/mir-opt/copy-prop/move_projection.rs1
-rw-r--r--tests/mir-opt/copy-prop/mutate_through_pointer.rs1
-rw-r--r--tests/mir-opt/copy-prop/non_dominate.rs1
-rw-r--r--tests/mir-opt/copy-prop/partial_init.rs1
-rw-r--r--tests/mir-opt/copy-prop/reborrow.rs1
-rw-r--r--tests/mir-opt/coroutine_drop_cleanup.main-{closure#0}.coroutine_drop.0.panic-abort.mir (renamed from tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-abort.mir)10
-rw-r--r--tests/mir-opt/coroutine_drop_cleanup.main-{closure#0}.coroutine_drop.0.panic-unwind.mir (renamed from tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-unwind.mir)10
-rw-r--r--tests/mir-opt/coroutine_drop_cleanup.rs15
-rw-r--r--tests/mir-opt/coroutine_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-abort.mir (renamed from tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-abort.mir)4
-rw-r--r--tests/mir-opt/coroutine_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-unwind.mir (renamed from tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-unwind.mir)4
-rw-r--r--tests/mir-opt/coroutine_storage_dead_unwind.rs (renamed from tests/mir-opt/generator_storage_dead_unwind.rs)7
-rw-r--r--tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir (renamed from tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir)22
-rw-r--r--tests/mir-opt/coroutine_tiny.rs (renamed from tests/mir-opt/generator_tiny.rs)7
-rw-r--r--tests/mir-opt/dataflow-const-prop/array_index.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/boolean_identities.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/cast.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-abort.diff12
-rw-r--r--tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-unwind.diff12
-rw-r--r--tests/mir-opt/dataflow-const-prop/checked.rs3
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-abort.diff12
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-unwind.diff12
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-abort.diff12
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-unwind.diff12
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff12
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff12
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff12
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff12
-rw-r--r--tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/enum.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.32bit.diff7
-rw-r--r--tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.64bit.diff7
-rw-r--r--tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff19
-rw-r--r--tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff19
-rw-r--r--tests/mir-opt/dataflow-const-prop/if.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-abort.diff6
-rw-r--r--tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-unwind.diff6
-rw-r--r--tests/mir-opt/dataflow-const-prop/inherit_overflow.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/issue_81605.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/large_array_index.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/mult_by_zero.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/offset_of.concrete.DataflowConstProp.panic-abort.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/offset_of.concrete.DataflowConstProp.panic-unwind.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-unwind.diff8
-rw-r--r--tests/mir-opt/dataflow-const-prop/offset_of.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/ref_without_sb.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/repeat.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/repr_transparent.main.DataflowConstProp.diff13
-rw-r--r--tests/mir-opt/dataflow-const-prop/repr_transparent.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/self_assign.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/self_assign_add.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/sibling_ptr.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/slice_len.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff228
-rw-r--r--tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff228
-rw-r--r--tests/mir-opt/dataflow-const-prop/struct.rs26
-rw-r--r--tests/mir-opt/dataflow-const-prop/terminator.rs1
-rw-r--r--tests/mir-opt/dataflow-const-prop/transmute.rs22
-rw-r--r--tests/mir-opt/dataflow-const-prop/transmute.undef_union_as_integer.DataflowConstProp.32bit.diff6
-rw-r--r--tests/mir-opt/dataflow-const-prop/transmute.undef_union_as_integer.DataflowConstProp.64bit.diff6
-rw-r--r--tests/mir-opt/dataflow-const-prop/transmute.unreachable_box.DataflowConstProp.32bit.diff2
-rw-r--r--tests/mir-opt/dataflow-const-prop/transmute.unreachable_box.DataflowConstProp.64bit.diff2
-rw-r--r--tests/mir-opt/dataflow-const-prop/transmute.unreachable_direct.DataflowConstProp.32bit.diff6
-rw-r--r--tests/mir-opt/dataflow-const-prop/transmute.unreachable_direct.DataflowConstProp.64bit.diff6
-rw-r--r--tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.32bit.diff (renamed from tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.diff)45
-rw-r--r--tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.64bit.diff112
-rw-r--r--tests/mir-opt/dataflow-const-prop/tuple.rs4
-rw-r--r--tests/mir-opt/dead-store-elimination/call_arg_copy.rs1
-rw-r--r--tests/mir-opt/dead-store-elimination/cycle.rs1
-rw-r--r--tests/mir-opt/dead-store-elimination/place_mention.rs1
-rw-r--r--tests/mir-opt/dead-store-elimination/provenance_soundness.rs1
-rw-r--r--tests/mir-opt/deduplicate_blocks.rs1
-rw-r--r--tests/mir-opt/deref-patterns/string.rs1
-rw-r--r--tests/mir-opt/derefer_complex_case.main.Derefer.panic-abort.diff2
-rw-r--r--tests/mir-opt/derefer_complex_case.main.Derefer.panic-unwind.diff2
-rw-r--r--tests/mir-opt/derefer_complex_case.rs1
-rw-r--r--tests/mir-opt/derefer_inline_test.rs1
-rw-r--r--tests/mir-opt/derefer_terminator_test.main.Derefer.panic-abort.diff10
-rw-r--r--tests/mir-opt/derefer_terminator_test.main.Derefer.panic-unwind.diff10
-rw-r--r--tests/mir-opt/derefer_terminator_test.rs1
-rw-r--r--tests/mir-opt/derefer_test.rs1
-rw-r--r--tests/mir-opt/derefer_test_multiple.rs1
-rw-r--r--tests/mir-opt/dest-prop/branch.rs1
-rw-r--r--tests/mir-opt/dest-prop/copy_propagation_arg.rs1
-rw-r--r--tests/mir-opt/dest-prop/cycle.rs1
-rw-r--r--tests/mir-opt/dest-prop/dead_stores_79191.rs1
-rw-r--r--tests/mir-opt/dest-prop/dead_stores_better.rs1
-rw-r--r--tests/mir-opt/dest-prop/simple.rs1
-rw-r--r--tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-abort.diff19
-rw-r--r--tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-unwind.diff19
-rw-r--r--tests/mir-opt/dest-prop/union.rs1
-rw-r--r--tests/mir-opt/dest-prop/unreachable.rs1
-rw-r--r--tests/mir-opt/dont_inline_type_id.rs1
-rw-r--r--tests/mir-opt/dont_yeet_assert.rs11
-rw-r--r--tests/mir-opt/early_otherwise_branch.rs1
-rw-r--r--tests/mir-opt/early_otherwise_branch_3_element_tuple.rs1
-rw-r--r--tests/mir-opt/early_otherwise_branch_68867.rs1
-rw-r--r--tests/mir-opt/early_otherwise_branch_noopt.rs1
-rw-r--r--tests/mir-opt/early_otherwise_branch_soundness.rs1
-rw-r--r--tests/mir-opt/enum_opt.cand.EnumSizeOpt.32bit.diff2
-rw-r--r--tests/mir-opt/enum_opt.cand.EnumSizeOpt.64bit.diff2
-rw-r--r--tests/mir-opt/enum_opt.rs1
-rw-r--r--tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff2
-rw-r--r--tests/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff2
-rw-r--r--tests/mir-opt/equal_true.opt.InstSimplify.diff36
-rw-r--r--tests/mir-opt/equal_true.rs11
-rw-r--r--tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir2
-rw-r--r--tests/mir-opt/exponential_or.rs1
-rw-r--r--tests/mir-opt/fn_ptr_shim.rs1
-rw-r--r--tests/mir-opt/funky_arms.float_to_exponential_common.ConstProp.panic-abort.diff124
-rw-r--r--tests/mir-opt/funky_arms.float_to_exponential_common.ConstProp.panic-unwind.diff124
-rw-r--r--tests/mir-opt/funky_arms.rs1
-rw-r--r--tests/mir-opt/generator_drop_cleanup.rs14
-rw-r--r--tests/mir-opt/graphviz.rs1
-rw-r--r--tests/mir-opt/gvn.arithmetic.GVN.panic-abort.diff121
-rw-r--r--tests/mir-opt/gvn.arithmetic.GVN.panic-unwind.diff121
-rw-r--r--tests/mir-opt/gvn.arithmetic_checked.GVN.panic-abort.diff308
-rw-r--r--tests/mir-opt/gvn.arithmetic_checked.GVN.panic-unwind.diff308
-rw-r--r--tests/mir-opt/gvn.arithmetic_float.GVN.panic-abort.diff66
-rw-r--r--tests/mir-opt/gvn.arithmetic_float.GVN.panic-unwind.diff66
-rw-r--r--tests/mir-opt/gvn.cast.GVN.panic-abort.diff291
-rw-r--r--tests/mir-opt/gvn.cast.GVN.panic-unwind.diff291
-rw-r--r--tests/mir-opt/gvn.comparison.GVN.panic-abort.diff94
-rw-r--r--tests/mir-opt/gvn.comparison.GVN.panic-unwind.diff94
-rw-r--r--tests/mir-opt/gvn.dereferences.GVN.panic-abort.diff32
-rw-r--r--tests/mir-opt/gvn.dereferences.GVN.panic-unwind.diff32
-rw-r--r--tests/mir-opt/gvn.duplicate_slice.GVN.panic-abort.diff38
-rw-r--r--tests/mir-opt/gvn.duplicate_slice.GVN.panic-unwind.diff38
-rw-r--r--tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff118
-rw-r--r--tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff118
-rw-r--r--tests/mir-opt/gvn.indirect_static.GVN.panic-abort.diff19
-rw-r--r--tests/mir-opt/gvn.indirect_static.GVN.panic-unwind.diff19
-rw-r--r--tests/mir-opt/gvn.multiple_branches.GVN.panic-abort.diff136
-rw-r--r--tests/mir-opt/gvn.multiple_branches.GVN.panic-unwind.diff136
-rw-r--r--tests/mir-opt/gvn.references.GVN.panic-abort.diff79
-rw-r--r--tests/mir-opt/gvn.references.GVN.panic-unwind.diff101
-rw-r--r--tests/mir-opt/gvn.repeat.GVN.panic-abort.diff79
-rw-r--r--tests/mir-opt/gvn.repeat.GVN.panic-unwind.diff79
-rw-r--r--tests/mir-opt/gvn.repeated_index.GVN.panic-abort.diff19
-rw-r--r--tests/mir-opt/gvn.repeated_index.GVN.panic-unwind.diff19
-rw-r--r--tests/mir-opt/gvn.rs488
-rw-r--r--tests/mir-opt/gvn.slices.GVN.panic-abort.diff136
-rw-r--r--tests/mir-opt/gvn.slices.GVN.panic-unwind.diff136
-rw-r--r--tests/mir-opt/gvn.subexpression_elimination.GVN.panic-abort.diff1091
-rw-r--r--tests/mir-opt/gvn.subexpression_elimination.GVN.panic-unwind.diff1091
-rw-r--r--tests/mir-opt/gvn.wrap_unwrap.GVN.panic-abort.diff22
-rw-r--r--tests/mir-opt/gvn.wrap_unwrap.GVN.panic-unwind.diff22
-rw-r--r--tests/mir-opt/if_condition_int.rs1
-rw-r--r--tests/mir-opt/inline/asm_unwind.rs5
-rw-r--r--tests/mir-opt/inline/caller_with_trivial_bound.rs5
-rw-r--r--tests/mir-opt/inline/cycle.rs10
-rw-r--r--tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs2
-rw-r--r--tests/mir-opt/inline/dyn_trait.rs8
-rw-r--r--tests/mir-opt/inline/exponential_runtime.rs9
-rw-r--r--tests/mir-opt/inline/inline_any_operand.rs2
-rw-r--r--tests/mir-opt/inline/inline_async.rs3
-rw-r--r--tests/mir-opt/inline/inline_box_fn.rs2
-rw-r--r--tests/mir-opt/inline/inline_closure.rs3
-rw-r--r--tests/mir-opt/inline/inline_closure_borrows_arg.rs3
-rw-r--r--tests/mir-opt/inline/inline_closure_captures.rs3
-rw-r--r--tests/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.panic-abort.diff21
-rw-r--r--tests/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.panic-unwind.diff21
-rw-r--r--tests/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.panic-abort.diff21
-rw-r--r--tests/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.panic-unwind.diff21
-rw-r--r--tests/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.panic-abort.diff22
-rw-r--r--tests/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.panic-unwind.diff22
-rw-r--r--tests/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.panic-abort.diff19
-rw-r--r--tests/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.panic-unwind.diff19
-rw-r--r--tests/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.panic-abort.diff19
-rw-r--r--tests/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.panic-unwind.diff19
-rw-r--r--tests/mir-opt/inline/inline_compatibility.rs63
-rw-r--r--tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff (renamed from tests/mir-opt/inline/inline_generator.main.Inline.panic-abort.diff)30
-rw-r--r--tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff (renamed from tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff)30
-rw-r--r--tests/mir-opt/inline/inline_coroutine.rs20
-rw-r--r--tests/mir-opt/inline/inline_cycle.rs1
-rw-r--r--tests/mir-opt/inline/inline_cycle_generic.rs1
-rw-r--r--tests/mir-opt/inline/inline_diverging.rs7
-rw-r--r--tests/mir-opt/inline/inline_generator.rs17
-rw-r--r--tests/mir-opt/inline/inline_instruction_set.rs10
-rw-r--r--tests/mir-opt/inline/inline_into_box_place.rs2
-rw-r--r--tests/mir-opt/inline/inline_options.rs3
-rw-r--r--tests/mir-opt/inline/inline_retag.rs11
-rw-r--r--tests/mir-opt/inline/inline_shims.rs4
-rw-r--r--tests/mir-opt/inline/inline_specialization.rs2
-rw-r--r--tests/mir-opt/inline/inline_trait_method.rs3
-rw-r--r--tests/mir-opt/inline/inline_trait_method_2.rs3
-rw-r--r--tests/mir-opt/inline/issue_106141.rs7
-rw-r--r--tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs8
-rw-r--r--tests/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir6
-rw-r--r--tests/mir-opt/inline/issue_76997_inline_scopes_parenting.rs10
-rw-r--r--tests/mir-opt/inline/issue_78442.bar.Inline.panic-abort.diff22
-rw-r--r--tests/mir-opt/inline/issue_78442.bar.Inline.panic-unwind.diff31
-rw-r--r--tests/mir-opt/inline/issue_78442.rs5
-rw-r--r--tests/mir-opt/inline/polymorphic_recursion.rs1
-rw-r--r--tests/mir-opt/inline/unchecked_shifts.rs10
-rw-r--r--tests/mir-opt/inline/unit_test.rs19
-rw-r--r--tests/mir-opt/inline/unsized_argument.caller.Inline.diff24
-rw-r--r--tests/mir-opt/inline/unsized_argument.rs2
-rw-r--r--tests/mir-opt/inline/unwrap_unchecked.rs2
-rw-r--r--tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-abort.diff16
-rw-r--r--tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-unwind.diff28
-rw-r--r--tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-abort.mir21
-rw-r--r--tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-unwind.mir21
-rw-r--r--tests/mir-opt/inline_generically_if_sized.rs1
-rw-r--r--tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff4
-rw-r--r--tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff16
-rw-r--r--tests/mir-opt/instrument_coverage.rs1
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.eq_false.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt3.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.eq_true.InstSimplify.diff36
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.false_eq.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt4.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.false_ne.InstSimplify.diff36
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.ne_false.InstSimplify.diff (renamed from tests/mir-opt/not_equal_false.opt.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.ne_true.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt1.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.rs68
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.true_eq.InstSimplify.diff36
-rw-r--r--tests/mir-opt/instsimplify/bool_compare.true_ne.InstSimplify.diff (renamed from tests/mir-opt/bool_compare.opt2.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/casts.redundant.InstSimplify.diff (renamed from tests/mir-opt/casts.redundant.InstSimplify.diff)19
-rw-r--r--tests/mir-opt/instsimplify/casts.roundtrip.InstSimplify.diff26
-rw-r--r--tests/mir-opt/instsimplify/casts.rs25
-rw-r--r--tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-abort.diff (renamed from tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-abort.diff)0
-rw-r--r--tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-unwind.diff (renamed from tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-unwind.diff)0
-rw-r--r--tests/mir-opt/instsimplify/combine_array_len.rs (renamed from tests/mir-opt/combine_array_len.rs)4
-rw-r--r--tests/mir-opt/instsimplify/combine_clone_of_primitives.rs (renamed from tests/mir-opt/combine_clone_of_primitives.rs)6
-rw-r--r--tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff (renamed from tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff)6
-rw-r--r--tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff (renamed from tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff)6
-rw-r--r--tests/mir-opt/instsimplify/combine_transmutes.adt_transmutes.InstSimplify.diff (renamed from tests/mir-opt/combine_transmutes.adt_transmutes.InstSimplify.diff)0
-rw-r--r--tests/mir-opt/instsimplify/combine_transmutes.identity_transmutes.InstSimplify.diff (renamed from tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff)0
-rw-r--r--tests/mir-opt/instsimplify/combine_transmutes.integer_transmutes.InstSimplify.diff (renamed from tests/mir-opt/combine_transmutes.integer_transmutes.InstSimplify.diff)0
-rw-r--r--tests/mir-opt/instsimplify/combine_transmutes.rs (renamed from tests/mir-opt/combine_transmutes.rs)22
-rw-r--r--tests/mir-opt/instsimplify/duplicate_switch_targets.assert_zero.InstSimplify.diff (renamed from tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff)0
-rw-r--r--tests/mir-opt/instsimplify/duplicate_switch_targets.rs (renamed from tests/mir-opt/instsimplify_duplicate_switch_targets.rs)8
-rw-r--r--tests/mir-opt/instsimplify/intrinsic_asserts.generic.InstSimplify.diff (renamed from tests/mir-opt/intrinsic_asserts.generic.InstSimplify.diff)14
-rw-r--r--tests/mir-opt/instsimplify/intrinsic_asserts.generic_ref.InstSimplify.diff (renamed from tests/mir-opt/dont_yeet_assert.generic.InstSimplify.diff)6
-rw-r--r--tests/mir-opt/instsimplify/intrinsic_asserts.panics.InstSimplify.diff (renamed from tests/mir-opt/intrinsic_asserts.panics.InstSimplify.diff)14
-rw-r--r--tests/mir-opt/instsimplify/intrinsic_asserts.removable.InstSimplify.diff (renamed from tests/mir-opt/intrinsic_asserts.removable.InstSimplify.diff)14
-rw-r--r--tests/mir-opt/instsimplify/intrinsic_asserts.rs (renamed from tests/mir-opt/intrinsic_asserts.rs)22
-rw-r--r--tests/mir-opt/issue_101973.rs1
-rw-r--r--tests/mir-opt/issue_104451_unwindable_intrinsics.rs1
-rw-r--r--tests/mir-opt/issue_38669.rs1
-rw-r--r--tests/mir-opt/issue_41110.rs1
-rw-r--r--tests/mir-opt/issue_41697.rs1
-rw-r--r--tests/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir4
-rw-r--r--tests/mir-opt/issue_41888.main.ElaborateDrops.panic-abort.diff41
-rw-r--r--tests/mir-opt/issue_41888.main.ElaborateDrops.panic-unwind.diff41
-rw-r--r--tests/mir-opt/issue_41888.rs1
-rw-r--r--tests/mir-opt/issue_62289.rs1
-rw-r--r--tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-abort.mir1
-rw-r--r--tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-unwind.mir1
-rw-r--r--tests/mir-opt/issue_72181.rs1
-rw-r--r--tests/mir-opt/issue_72181_1.f.built.after.mir1
-rw-r--r--tests/mir-opt/issue_72181_1.main.built.after.mir4
-rw-r--r--tests/mir-opt/issue_72181_1.rs1
-rw-r--r--tests/mir-opt/issue_76432.rs1
-rw-r--r--tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff47
-rw-r--r--tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-unwind.diff47
-rw-r--r--tests/mir-opt/issue_78192.rs1
-rw-r--r--tests/mir-opt/issue_91633.rs1
-rw-r--r--tests/mir-opt/issue_99325.main.built.after.32bit.mir10
-rw-r--r--tests/mir-opt/issue_99325.main.built.after.64bit.mir10
-rw-r--r--tests/mir-opt/issue_99325.rs1
-rw-r--r--tests/mir-opt/issues/issue_59352.rs1
-rw-r--r--tests/mir-opt/issues/issue_75439.rs1
-rw-r--r--tests/mir-opt/jump_threading.custom_discr.JumpThreading.panic-abort.diff57
-rw-r--r--tests/mir-opt/jump_threading.custom_discr.JumpThreading.panic-unwind.diff57
-rw-r--r--tests/mir-opt/jump_threading.dfa.JumpThreading.panic-abort.diff68
-rw-r--r--tests/mir-opt/jump_threading.dfa.JumpThreading.panic-unwind.diff68
-rw-r--r--tests/mir-opt/jump_threading.disappearing_bb.JumpThreading.panic-abort.diff59
-rw-r--r--tests/mir-opt/jump_threading.disappearing_bb.JumpThreading.panic-unwind.diff59
-rw-r--r--tests/mir-opt/jump_threading.duplicate_chain.JumpThreading.panic-abort.diff45
-rw-r--r--tests/mir-opt/jump_threading.duplicate_chain.JumpThreading.panic-unwind.diff45
-rw-r--r--tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff139
-rw-r--r--tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff139
-rw-r--r--tests/mir-opt/jump_threading.multiple_match.JumpThreading.panic-abort.diff54
-rw-r--r--tests/mir-opt/jump_threading.multiple_match.JumpThreading.panic-unwind.diff54
-rw-r--r--tests/mir-opt/jump_threading.mutable_ref.JumpThreading.panic-abort.diff56
-rw-r--r--tests/mir-opt/jump_threading.mutable_ref.JumpThreading.panic-unwind.diff56
-rw-r--r--tests/mir-opt/jump_threading.mutate_discriminant.JumpThreading.panic-abort.diff26
-rw-r--r--tests/mir-opt/jump_threading.mutate_discriminant.JumpThreading.panic-unwind.diff26
-rw-r--r--tests/mir-opt/jump_threading.renumbered_bb.JumpThreading.panic-abort.diff57
-rw-r--r--tests/mir-opt/jump_threading.renumbered_bb.JumpThreading.panic-unwind.diff57
-rw-r--r--tests/mir-opt/jump_threading.rs480
-rw-r--r--tests/mir-opt/jump_threading.too_complex.JumpThreading.panic-abort.diff98
-rw-r--r--tests/mir-opt/jump_threading.too_complex.JumpThreading.panic-unwind.diff98
-rw-r--r--tests/mir-opt/loop_test.rs1
-rw-r--r--tests/mir-opt/lower_array_len.rs14
-rw-r--r--tests/mir-opt/lower_intrinsics.rs87
-rw-r--r--tests/mir-opt/lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.panic-abort.diff3
-rw-r--r--tests/mir-opt/lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.panic-unwind.diff3
-rw-r--r--tests/mir-opt/lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.panic-abort.diff1
-rw-r--r--tests/mir-opt/lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.panic-unwind.diff1
-rw-r--r--tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.panic-abort.diff1
-rw-r--r--tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.panic-unwind.diff1
-rw-r--r--tests/mir-opt/lower_slice_len.rs4
-rw-r--r--tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff2
-rw-r--r--tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff2
-rw-r--r--tests/mir-opt/match_arm_scopes.rs1
-rw-r--r--tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir2
-rw-r--r--tests/mir-opt/match_test.rs1
-rw-r--r--tests/mir-opt/matches_reduce_branches.rs1
-rw-r--r--tests/mir-opt/matches_u8.rs1
-rw-r--r--tests/mir-opt/multiple_return_terminators.rs1
-rw-r--r--tests/mir-opt/nll/named_lifetimes_basic.rs1
-rw-r--r--tests/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir16
-rw-r--r--tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir4
-rw-r--r--tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir4
-rw-r--r--tests/mir-opt/nll/region_subtyping_basic.rs1
-rw-r--r--tests/mir-opt/no_drop_for_inactive_variant.rs1
-rw-r--r--tests/mir-opt/no_spurious_drop_after_call.rs1
-rw-r--r--tests/mir-opt/not_equal_false.rs10
-rw-r--r--tests/mir-opt/nrvo_miscompile_111005.rs1
-rw-r--r--tests/mir-opt/nrvo_simple.rs1
-rw-r--r--tests/mir-opt/packed_struct_drop_aligned.rs1
-rw-r--r--tests/mir-opt/pre-codegen/chained_comparison.rs1
-rw-r--r--tests/mir-opt/pre-codegen/checked_ops.rs1
-rw-r--r--tests/mir-opt/pre-codegen/duplicate_switch_targets.rs1
-rw-r--r--tests/mir-opt/pre-codegen/duplicate_switch_targets.ub_if_b.PreCodegen.after.mir11
-rw-r--r--tests/mir-opt/pre-codegen/intrinsics.rs1
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff123
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff92
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff123
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff92
-rw-r--r--tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.rs15
-rw-r--r--tests/mir-opt/pre-codegen/loops.rs1
-rw-r--r--tests/mir-opt/pre-codegen/mem_replace.rs1
-rw-r--r--tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-abort.diff2
-rw-r--r--tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff2
-rw-r--r--tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.64bit.panic-abort.diff2
-rw-r--r--tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.64bit.panic-unwind.diff2
-rw-r--r--tests/mir-opt/pre-codegen/optimizes_into_variable.rs1
-rw-r--r--tests/mir-opt/pre-codegen/range_iter.rs1
-rw-r--r--tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir4
-rw-r--r--tests/mir-opt/pre-codegen/simple_option_map.rs1
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.rs1
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir2
-rw-r--r--tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir2
-rw-r--r--tests/mir-opt/pre-codegen/slice_index.rs1
-rw-r--r--tests/mir-opt/pre-codegen/slice_iter.rs1
-rw-r--r--tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir25
-rw-r--r--tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir25
-rw-r--r--tests/mir-opt/pre-codegen/spans.rs1
-rw-r--r--tests/mir-opt/pre-codegen/try_identity.rs1
-rw-r--r--tests/mir-opt/reference_prop.rs333
-rw-r--r--tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-abort.diff3
-rw-r--r--tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-unwind.diff3
-rw-r--r--tests/mir-opt/remove_fake_borrows.rs1
-rw-r--r--tests/mir-opt/remove_never_const.rs1
-rw-r--r--tests/mir-opt/remove_storage_markers.rs1
-rw-r--r--tests/mir-opt/remove_unneeded_drops.rs1
-rw-r--r--tests/mir-opt/remove_zsts.rs1
-rw-r--r--tests/mir-opt/retag.rs1
-rw-r--r--tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-abort.mir4
-rw-r--r--tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-unwind.mir4
-rw-r--r--tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-abort.mir4
-rw-r--r--tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-unwind.mir4
-rw-r--r--tests/mir-opt/return_an_array.rs1
-rw-r--r--tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff6
-rw-r--r--tests/mir-opt/separate_const_switch.rs1
-rw-r--r--tests/mir-opt/simplify_arm.rs1
-rw-r--r--tests/mir-opt/simplify_arm_identity.rs1
-rw-r--r--tests/mir-opt/simplify_cfg.rs1
-rw-r--r--tests/mir-opt/simplify_duplicate_unreachable_blocks.rs1
-rw-r--r--tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-abort.diff8
-rw-r--r--tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-unwind.diff8
-rw-r--r--tests/mir-opt/simplify_if.rs1
-rw-r--r--tests/mir-opt/simplify_locals.rs1
-rw-r--r--tests/mir-opt/simplify_locals_fixedpoint.rs1
-rw-r--r--tests/mir-opt/simplify_locals_removes_unused_consts.rs1
-rw-r--r--tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs1
-rw-r--r--tests/mir-opt/simplify_match.rs1
-rw-r--r--tests/mir-opt/simplify_try_if_let.rs1
-rw-r--r--tests/mir-opt/slice_drop_shim.rs1
-rw-r--r--tests/mir-opt/spanview_block.main.built.after.html6
-rw-r--r--tests/mir-opt/spanview_block.rs1
-rw-r--r--tests/mir-opt/spanview_statement.main.built.after.html6
-rw-r--r--tests/mir-opt/spanview_statement.rs1
-rw-r--r--tests/mir-opt/spanview_terminator.main.built.after.html4
-rw-r--r--tests/mir-opt/spanview_terminator.rs1
-rw-r--r--tests/mir-opt/sroa/lifetimes.rs1
-rw-r--r--tests/mir-opt/sroa/structs.rs1
-rw-r--r--tests/mir-opt/ssa_unreachable_116212.rs1
-rw-r--r--tests/mir-opt/storage_ranges.main.nll.0.mir2
-rw-r--r--tests/mir-opt/storage_ranges.rs1
-rw-r--r--tests/mir-opt/switch_to_self.rs1
-rw-r--r--tests/mir-opt/tls_access.rs1
-rw-r--r--tests/mir-opt/uninhabited_enum.rs1
-rw-r--r--tests/mir-opt/uninhabited_enum_branching.byref.UninhabitedEnumBranching.diff (renamed from tests/mir-opt/uninhabited_enum_branching2.main.UninhabitedEnumBranching.diff)26
-rw-r--r--tests/mir-opt/uninhabited_enum_branching.custom_discriminant.UninhabitedEnumBranching.diff48
-rw-r--r--tests/mir-opt/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir60
-rw-r--r--tests/mir-opt/uninhabited_enum_branching.rs69
-rw-r--r--tests/mir-opt/uninhabited_enum_branching.simple.UninhabitedEnumBranching.diff (renamed from tests/mir-opt/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff)39
-rw-r--r--tests/mir-opt/uninhabited_enum_branching2.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir85
-rw-r--r--tests/mir-opt/uninhabited_enum_branching2.rs34
-rw-r--r--tests/mir-opt/uninhabited_fallthrough_elimination.keep_fallthrough.UninhabitedEnumBranching.diff6
-rw-r--r--tests/mir-opt/uninhabited_fallthrough_elimination.rs1
-rw-r--r--tests/mir-opt/unreachable.as_match.UnreachablePropagation.panic-abort.diff45
-rw-r--r--tests/mir-opt/unreachable.as_match.UnreachablePropagation.panic-unwind.diff45
-rw-r--r--tests/mir-opt/unreachable.if_let.UnreachablePropagation.panic-abort.diff (renamed from tests/mir-opt/unreachable.main.UnreachablePropagation.panic-abort.diff)35
-rw-r--r--tests/mir-opt/unreachable.if_let.UnreachablePropagation.panic-unwind.diff (renamed from tests/mir-opt/unreachable.main.UnreachablePropagation.panic-unwind.diff)35
-rw-r--r--tests/mir-opt/unreachable.rs49
-rw-r--r--tests/mir-opt/unreachable_diverging.main.UnreachablePropagation.panic-abort.diff6
-rw-r--r--tests/mir-opt/unreachable_diverging.main.UnreachablePropagation.panic-unwind.diff6
-rw-r--r--tests/mir-opt/unreachable_diverging.rs19
-rw-r--r--tests/mir-opt/unusual_item_types.rs1
-rw-r--r--tests/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir4
-rw-r--r--tests/mir-opt/while_storage.rs20
-rw-r--r--tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-abort.mir46
-rw-r--r--tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-unwind.mir46
-rw-r--r--tests/pretty/format-args-str-escape.pp21
-rw-r--r--tests/pretty/format-args-str-escape.rs10
-rw-r--r--tests/pretty/hir-fn-variadic.pp15
-rw-r--r--tests/pretty/hir-fn-variadic.rs13
-rw-r--r--tests/run-coverage/bad_counter_ids.coverage69
-rw-r--r--tests/run-coverage/bad_counter_ids.rs66
-rw-r--r--tests/run-coverage/coroutine.coverage (renamed from tests/run-coverage/generator.coverage)16
-rw-r--r--tests/run-coverage/coroutine.rs (renamed from tests/coverage-map/status-quo/generator.rs)16
-rw-r--r--tests/run-coverage/fn_sig_into_try.coverage45
-rw-r--r--tests/run-coverage/fn_sig_into_try.rs41
-rw-r--r--tests/run-coverage/issue-84561.coverage2
-rw-r--r--tests/run-coverage/yield.coverage24
-rw-r--r--tests/run-coverage/yield.rs24
-rw-r--r--tests/run-make-fulldeps/issue-19371/foo.rs4
-rw-r--r--tests/run-make/coverage-llvmir/filecheck.testprog.txt6
-rw-r--r--tests/run-make/crate-hash-rustc-version/Makefile2
-rw-r--r--tests/run-make/dump-ice-to-disk/check.sh6
-rw-r--r--tests/run-make/emit-stack-sizes/foo.rs1
-rw-r--r--tests/run-make/intrinsic-unreachable/exit-ret.rs1
-rw-r--r--tests/run-make/intrinsic-unreachable/exit-unreachable.rs1
-rw-r--r--tests/run-make/issue-96498/Makefile8
-rw-r--r--tests/run-make/remap-path-prefix-dwarf/Makefile37
-rw-r--r--tests/run-make/remap-path-prefix/Makefile32
-rw-r--r--tests/run-make/rust-lld-custom-target/Makefile7
-rw-r--r--tests/run-make/rust-lld-custom-target/custom-target.json57
-rw-r--r--tests/run-make/rust-lld-custom-target/lib.rs9
-rw-r--r--tests/run-make/split-debuginfo/Makefile64
-rw-r--r--tests/run-make/unknown-mod-stdin/unknown-mod.stderr1
-rw-r--r--tests/run-make/use-extern-for-plugins/Makefile17
-rw-r--r--tests/run-make/use-extern-for-plugins/bar.rs9
-rw-r--r--tests/run-make/use-extern-for-plugins/baz.rs8
-rw-r--r--tests/run-make/use-extern-for-plugins/foo.rs8
-rw-r--r--tests/run-make/windows-safeseh/Makefile19
-rw-r--r--tests/run-make/windows-safeseh/bar.rs1
-rw-r--r--tests/run-make/windows-safeseh/baz.rs4
-rw-r--r--tests/run-make/windows-safeseh/foo.rs (renamed from tests/run-make/issue-96498/foo.rs)0
-rw-r--r--tests/rustdoc-gui/code-tags.goml2
-rw-r--r--tests/rustdoc-gui/impl_on_foreign_order.goml6
-rw-r--r--tests/rustdoc-gui/item-decl-colors.goml2
-rw-r--r--tests/rustdoc-gui/no-docblock.goml2
-rw-r--r--tests/rustdoc-gui/search-tab.goml4
-rw-r--r--tests/rustdoc-gui/setting-auto-hide-content-large-items.goml2
-rw-r--r--tests/rustdoc-gui/src/lib2/lib.rs9
-rw-r--r--tests/rustdoc-gui/src/test_docs/lib.rs46
-rw-r--r--tests/rustdoc-gui/trait-sidebar-item-order.goml2
-rw-r--r--tests/rustdoc-gui/type-declation-overflow.goml2
-rw-r--r--tests/rustdoc-gui/type-impls.goml86
-rw-r--r--tests/rustdoc-json/enums/field_hidden.rs5
-rw-r--r--tests/rustdoc-json/enums/kind.rs5
-rw-r--r--tests/rustdoc-json/enums/tuple_fields_hidden.rs5
-rw-r--r--tests/rustdoc-json/generic-associated-types/gats.rs5
-rw-r--r--tests/rustdoc-json/impls/auto.rs9
-rw-r--r--tests/rustdoc-json/type/inherent_associated_type_bound.rs2
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs2
-rw-r--r--tests/rustdoc-ui/check-cfg/check-cfg.rs2
-rw-r--r--tests/rustdoc-ui/doctest/check-cfg-test.rs2
-rw-r--r--tests/rustdoc-ui/error-in-impl-trait/closure.rs2
-rw-r--r--tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.rs3
-rw-r--r--tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.stderr17
-rw-r--r--tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.rs3
-rw-r--r--tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.stderr17
-rw-r--r--tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs (renamed from tests/rustdoc/issue-31808.rs)5
-rw-r--r--tests/rustdoc-ui/invalid_const_in_lifetime_position.rs5
-rw-r--r--tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr84
-rw-r--r--tests/rustdoc-ui/issues/issue-105742.rs8
-rw-r--r--tests/rustdoc-ui/issues/issue-105742.stderr234
-rw-r--r--tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout4
-rw-r--r--tests/rustdoc-ui/issues/issue-96287.stderr7
-rw-r--r--tests/rustdoc-ui/not-wf-ambiguous-normalization.rs (renamed from tests/rustdoc/not-wf-ambiguous-normalization.rs)1
-rw-r--r--tests/rustdoc-ui/not-wf-ambiguous-normalization.stderr9
-rw-r--r--tests/rustdoc-ui/recursive-deref-ice.rs5
-rw-r--r--tests/rustdoc-ui/unable-fulfill-trait.rs3
-rw-r--r--tests/rustdoc-ui/unable-fulfill-trait.stderr23
-rw-r--r--tests/rustdoc/blanket-impl-29503.rs (renamed from tests/rustdoc/issue-29503.rs)3
-rw-r--r--tests/rustdoc/const-generics/add-impl.rs2
-rw-r--r--tests/rustdoc/const-generics/const-impl.rs4
-rw-r--r--tests/rustdoc/const-rendering-macros-33302.rs (renamed from tests/rustdoc/issue-33302.rs)3
-rw-r--r--tests/rustdoc/decl-trailing-whitespace.declaration.html14
-rw-r--r--tests/rustdoc/decl-trailing-whitespace.rs8
-rw-r--r--tests/rustdoc/deprecated-future-staged-api.rs6
-rw-r--r--tests/rustdoc/deref/deref-mut-methods.rs2
-rw-r--r--tests/rustdoc/deref/deref-recursive-pathbuf.rs4
-rw-r--r--tests/rustdoc/disambiguate-anchors-32890.rs (renamed from tests/rustdoc/issue-32890.rs)3
-rw-r--r--tests/rustdoc/disambiguate-anchors-header-29449.rs (renamed from tests/rustdoc/issue-29449.rs)3
-rw-r--r--tests/rustdoc/doc-hidden-trait-implementors-33069.rs (renamed from tests/rustdoc/issue-33069.rs)3
-rw-r--r--tests/rustdoc/doctest-cfg-feature-30252.rs (renamed from tests/rustdoc/issue-30252.rs)3
-rw-r--r--tests/rustdoc/doctest-ignore-32556.rs (renamed from tests/rustdoc/issue-32556.rs)3
-rw-r--r--tests/rustdoc/hidden-extern-34025.rs (renamed from tests/rustdoc/issue-34025.rs)1
-rw-r--r--tests/rustdoc/hidden-impls.rs2
-rw-r--r--tests/rustdoc/hide-complex-unevaluated-const-arguments.rs11
-rw-r--r--tests/rustdoc/html-no-source.rs12
-rw-r--r--tests/rustdoc/impl-parts-crosscrate.rs2
-rw-r--r--tests/rustdoc/impl-type-parameter-33592.rs (renamed from tests/rustdoc/issue-33592.rs)1
-rw-r--r--tests/rustdoc/implementor-stable-version.rs16
-rw-r--r--tests/rustdoc/inline_cross/auxiliary/default-generic-args.rs45
-rw-r--r--tests/rustdoc/inline_cross/auxiliary/issue-29584.rs (renamed from tests/rustdoc/auxiliary/issue-29584.rs)0
-rw-r--r--tests/rustdoc/inline_cross/default-generic-args.rs104
-rw-r--r--tests/rustdoc/inline_cross/doc-hidden-extern-trait-impl-29584.rs (renamed from tests/rustdoc/issue-29584.rs)3
-rw-r--r--tests/rustdoc/inline_cross/dyn_trait.rs8
-rw-r--r--tests/rustdoc/inline_cross/impl_trait.rs4
-rw-r--r--tests/rustdoc/inline_cross/implementors-js.rs10
-rw-r--r--tests/rustdoc/intra-doc/prim-associated-traits.rs2
-rw-r--r--tests/rustdoc/issue-43701.rs2
-rw-r--r--tests/rustdoc/link-extern-crate-33178.rs (renamed from tests/rustdoc/issue-33178.rs)3
-rw-r--r--tests/rustdoc/link-extern-crate-item-30109.rs (renamed from tests/rustdoc/issue-30109.rs)3
-rw-r--r--tests/rustdoc/link-extern-crate-title-33178.rs (renamed from tests/rustdoc/issue-33178-1.rs)3
-rw-r--r--tests/rustdoc/normalize-assoc-item.rs4
-rw-r--r--tests/rustdoc/notable-trait/doc-notable_trait_box_is_not_an_iterator.rs11
-rw-r--r--tests/rustdoc/render-enum-variant-structlike-32395.rs (renamed from tests/rustdoc/issue-32395.rs)3
-rw-r--r--tests/rustdoc/sidebar-items.rs7
-rw-r--r--tests/rustdoc/source-version-separator.rs10
-rw-r--r--tests/rustdoc/src-links-inlined-34274.rs (renamed from tests/rustdoc/issue-34274.rs)1
-rw-r--r--tests/rustdoc/staged-api-deprecated-unstable-32374.rs (renamed from tests/rustdoc/issue-32374.rs)2
-rw-r--r--tests/rustdoc/strip-enum-variant.no-not-shown.html2
-rw-r--r--tests/rustdoc/strip-enum-variant.rs2
-rw-r--r--tests/rustdoc/summary-codeblock-31899.rs (renamed from tests/rustdoc/issue-31899.rs)3
-rw-r--r--tests/rustdoc/summary-reference-link-30366.rs (renamed from tests/rustdoc/issue-30366.rs)3
-rw-r--r--tests/rustdoc/trait-object-safe.rs27
-rw-r--r--tests/rustdoc/type-alias/auxiliary/parent-crate-115718.rs9
-rw-r--r--tests/rustdoc/type-alias/cross-crate-115718.rs34
-rw-r--r--tests/rustdoc/type-alias/deeply-nested-112515.rs (renamed from tests/rustdoc/issue-112515-impl-ty-alias.rs)0
-rw-r--r--tests/rustdoc/type-alias/deref-32077.rs (renamed from tests/rustdoc/issue-32077-type-alias-impls.rs)18
-rw-r--r--tests/rustdoc/type-alias/same-crate-115718.rs34
-rw-r--r--tests/rustdoc/version-separator-without-source.rs12
-rw-r--r--tests/rustdoc/where-clause-order.rs2
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.enum.html2
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.enum2.html2
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.rs15
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.struct.html2
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.struct2.html2
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.union.html2
-rw-r--r--tests/rustdoc/whitespace-after-where-clause.union2.html2
-rw-r--r--tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs15
-rw-r--r--tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr14
-rw-r--r--tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs4
-rw-r--r--tests/ui-fulldeps/internal-lints/ty_tykind_usage.stderr4
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/empty-plugin.rs9
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/issue-40001-plugin.rs61
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/lint-for-crate.rs43
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/lint-group-plugin-test.rs43
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/lint-plugin-test.rs33
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/lint-tool-test.rs52
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/lto-syntax-extension-lib.rs5
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/lto-syntax-extension-plugin.rs11
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/multiple-plugins-1.rs10
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/multiple-plugins-2.rs10
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/outlive-expansion-phase.rs24
-rw-r--r--tests/ui-fulldeps/plugin/auxiliary/rlib-crate-test.rs12
-rw-r--r--tests/ui-fulldeps/plugin/feature-gate-plugin.rs8
-rw-r--r--tests/ui-fulldeps/plugin/feature-gate-plugin.stderr20
-rw-r--r--tests/ui-fulldeps/plugin/gated-plugin.rs8
-rw-r--r--tests/ui-fulldeps/plugin/gated-plugin.stderr20
-rw-r--r--tests/ui-fulldeps/plugin/issue-15778-fail.rs9
-rw-r--r--tests/ui-fulldeps/plugin/issue-15778-fail.stderr22
-rw-r--r--tests/ui-fulldeps/plugin/issue-40001.rs10
-rw-r--r--tests/ui-fulldeps/plugin/issue-40001.stderr10
-rw-r--r--tests/ui-fulldeps/plugin/lint-group-plugin-deny-cmdline.rs17
-rw-r--r--tests/ui-fulldeps/plugin/lint-group-plugin-deny-cmdline.stderr28
-rw-r--r--tests/ui-fulldeps/plugin/lint-group-plugin.rs17
-rw-r--r--tests/ui-fulldeps/plugin/lint-group-plugin.stderr26
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-cmdline-allow.rs12
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-cmdline-allow.stderr10
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-cmdline-load.rs13
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-cmdline-load.stderr18
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-deny-attr.rs13
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-deny-attr.stderr22
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-deny-cmdline.rs13
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-deny-cmdline.stderr18
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-forbid-attrs.rs16
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-forbid-attrs.stderr43
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-forbid-cmdline.rs15
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin-forbid-cmdline.stderr36
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin.rs13
-rw-r--r--tests/ui-fulldeps/plugin/lint-plugin.stderr18
-rw-r--r--tests/ui-fulldeps/plugin/lint-tool-cmdline-allow.rs12
-rw-r--r--tests/ui-fulldeps/plugin/lint-tool-cmdline-allow.stderr36
-rw-r--r--tests/ui-fulldeps/plugin/lint-tool-test.rs36
-rw-r--r--tests/ui-fulldeps/plugin/lint-tool-test.stderr107
-rw-r--r--tests/ui-fulldeps/plugin/lto-syntax-extension.rs15
-rw-r--r--tests/ui-fulldeps/plugin/lto-syntax-extension.stderr10
-rw-r--r--tests/ui-fulldeps/plugin/macro-crate-rlib.rs9
-rw-r--r--tests/ui-fulldeps/plugin/macro-crate-rlib.stderr9
-rw-r--r--tests/ui-fulldeps/plugin/multiple-plugins.rs12
-rw-r--r--tests/ui-fulldeps/plugin/multiple-plugins.stderr16
-rw-r--r--tests/ui-fulldeps/plugin/outlive-expansion-phase.rs8
-rw-r--r--tests/ui-fulldeps/plugin/outlive-expansion-phase.stderr10
-rw-r--r--tests/ui-fulldeps/plugin/plugin-args.rs9
-rw-r--r--tests/ui-fulldeps/plugin/plugin-args.stderr17
-rw-r--r--tests/ui-fulldeps/plugin/plugin-as-extern-crate.rs10
-rw-r--r--tests/ui-fulldeps/pprust-expr-roundtrip.rs6
-rw-r--r--tests/ui-fulldeps/stable-mir/check_instance.rs122
-rw-r--r--tests/ui-fulldeps/stable-mir/compilation-result.rs19
-rw-r--r--tests/ui-fulldeps/stable-mir/crate-info.rs101
-rw-r--r--tests/ui-fulldeps/stable-mir/smir_internal.rs64
-rw-r--r--tests/ui-fulldeps/stable-mir/smir_visitor.rs148
-rw-r--r--tests/ui/abi/compatibility.rs1
-rw-r--r--tests/ui/asm/aarch64/interpolated-idents.stderr7
-rw-r--r--tests/ui/asm/x86_64/interpolated-idents.stderr7
-rw-r--r--tests/ui/associated-consts/associated-const-ambiguity-report.stderr8
-rw-r--r--tests/ui/associated-consts/issue-105330.rs10
-rw-r--r--tests/ui/associated-consts/issue-105330.stderr80
-rw-r--r--tests/ui/associated-consts/issue-58022.rs1
-rw-r--r--tests/ui/associated-consts/issue-58022.stderr22
-rw-r--r--tests/ui/associated-inherent-types/generic-associated-types-bad.item.stderr14
-rw-r--r--tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr2
-rw-r--r--tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr2
-rw-r--r--tests/ui/associated-inherent-types/generic-associated-types-bad.rs1
-rw-r--r--tests/ui/associated-inherent-types/issue-109071.no_gate.stderr2
-rw-r--r--tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr2
-rw-r--r--tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr2
-rw-r--r--tests/ui/associated-item/associated-item-duplicate-names-3.stderr2
-rw-r--r--tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs28
-rw-r--r--tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr18
-rw-r--r--tests/ui/associated-type-bounds/duplicate.rs132
-rw-r--r--tests/ui/associated-type-bounds/duplicate.stderr132
-rw-r--r--tests/ui/associated-type-bounds/elision.stderr2
-rw-r--r--tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr2
-rw-r--r--tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed14
-rw-r--r--tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs14
-rw-r--r--tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr16
-rw-r--r--tests/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.stderr24
-rw-r--r--tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr12
-rw-r--r--tests/ui/associated-types/associated-types-in-ambiguous-context.stderr6
-rw-r--r--tests/ui/associated-types/associated-types-incomplete-object.rs6
-rw-r--r--tests/ui/associated-types/associated-types-incomplete-object.stderr6
-rw-r--r--tests/ui/associated-types/associated-types-issue-20346.stderr2
-rw-r--r--tests/ui/associated-types/associated-types-no-suitable-supertrait.rs1
-rw-r--r--tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr14
-rw-r--r--tests/ui/associated-types/associated-types-path-1.stderr4
-rw-r--r--tests/ui/associated-types/hr-associated-type-projection-1.stderr4
-rw-r--r--tests/ui/associated-types/issue-22560.stderr2
-rw-r--r--tests/ui/associated-types/issue-23595-1.stderr2
-rw-r--r--tests/ui/associated-types/missing-associated-types.stderr10
-rw-r--r--tests/ui/async-await/async-await-let-else.stderr4
-rw-r--r--tests/ui/async-await/async-unsafe-fn-call-in-safe.mir.stderr2
-rw-r--r--tests/ui/async-await/async-unsafe-fn-call-in-safe.rs8
-rw-r--r--tests/ui/async-await/async-unsafe-fn-call-in-safe.thir.stderr18
-rw-r--r--tests/ui/async-await/coroutine-desc.rs (renamed from tests/ui/async-await/generator-desc.rs)0
-rw-r--r--tests/ui/async-await/coroutine-desc.stderr (renamed from tests/ui/async-await/generator-desc.stderr)20
-rw-r--r--tests/ui/async-await/coroutine-not-future.rs (renamed from tests/ui/async-await/generator-not-future.rs)24
-rw-r--r--tests/ui/async-await/coroutine-not-future.stderr81
-rw-r--r--tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs10
-rw-r--r--tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.stderr23
-rw-r--r--tests/ui/async-await/future-sizes/async-awaiting-fut.stdout6
-rw-r--r--tests/ui/async-await/generator-not-future.stderr81
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr4
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-extra.rs1
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-manual.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared-manual.stderr2
-rw-r--r--tests/ui/async-await/in-trait/async-example-desugared.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-example.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-generics-and-bounds.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-generics-and-bounds.stderr4
-rw-r--r--tests/ui/async-await/in-trait/async-generics.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-generics.stderr4
-rw-r--r--tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-lifetimes.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-recursive-generic.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-recursive-generic.stderr2
-rw-r--r--tests/ui/async-await/in-trait/async-recursive.rs2
-rw-r--r--tests/ui/async-await/in-trait/async-recursive.stderr2
-rw-r--r--tests/ui/async-await/in-trait/coherence-constrained.rs26
-rw-r--r--tests/ui/async-await/in-trait/coherence-constrained.stderr25
-rw-r--r--tests/ui/async-await/in-trait/early-bound-1.rs2
-rw-r--r--tests/ui/async-await/in-trait/unconstrained-impl-region.rs19
-rw-r--r--tests/ui/async-await/in-trait/unconstrained-impl-region.stderr9
-rw-r--r--tests/ui/async-await/issue-60709.rs2
-rw-r--r--tests/ui/async-await/issue-61793.rs2
-rw-r--r--tests/ui/async-await/issue-62658.rs2
-rw-r--r--tests/ui/async-await/issue-66312.rs2
-rw-r--r--tests/ui/async-await/issue-66312.stderr11
-rw-r--r--tests/ui/async-await/issue-68112.stderr2
-rw-r--r--tests/ui/async-await/issue-70935-complex-spans.stderr2
-rw-r--r--tests/ui/async-await/issue-73137.rs2
-rw-r--r--tests/ui/async-await/issues/issue-51719.rs4
-rw-r--r--tests/ui/async-await/issues/issue-59972.rs2
-rw-r--r--tests/ui/async-await/issues/issue-60655-latebound-regions.rs2
-rw-r--r--tests/ui/async-await/issues/issue-64477-2.rs2
-rw-r--r--tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs4
-rw-r--r--tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs4
-rw-r--r--tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs (renamed from tests/ui/async-await/issues/issue-65419/issue-65419-generator-resume-after-completion.rs)10
-rw-r--r--tests/ui/async-await/issues/issue-67893.stderr2
-rw-r--r--tests/ui/async-await/non-trivial-drop.rs2
-rw-r--r--tests/ui/async-await/partial-drop-partial-reinit.rs2
-rw-r--r--tests/ui/async-await/partial-drop-partial-reinit.stderr2
-rw-r--r--tests/ui/async-await/send-bound-async-closure.rs2
-rw-r--r--tests/ui/async-await/task-context-arg.rs2
-rw-r--r--tests/ui/async-await/unnecessary-await.rs5
-rw-r--r--tests/ui/async-await/unnecessary-await.stderr15
-rw-r--r--tests/ui/atomic-from-mut-not-available.stderr4
-rw-r--r--tests/ui/attributes/const-stability-on-macro.rs2
-rw-r--r--tests/ui/attributes/const-stability-on-macro.stderr4
-rw-r--r--tests/ui/attributes/statement-attribute-validation.rs39
-rw-r--r--tests/ui/attributes/statement-attribute-validation.stderr56
-rw-r--r--tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr8
-rw-r--r--tests/ui/binding/issue-53114-borrow-checks.rs13
-rw-r--r--tests/ui/binding/issue-53114-borrow-checks.stderr81
-rw-r--r--tests/ui/binop/false-binop-caused-by-missing-semi.fixed10
-rw-r--r--tests/ui/binop/false-binop-caused-by-missing-semi.rs10
-rw-r--r--tests/ui/binop/false-binop-caused-by-missing-semi.stderr17
-rw-r--r--tests/ui/borrowck/alias-liveness/escaping-bounds-2.rs14
-rw-r--r--tests/ui/borrowck/alias-liveness/escaping-bounds-2.stderr19
-rw-r--r--tests/ui/borrowck/alias-liveness/escaping-bounds.rs22
-rw-r--r--tests/ui/borrowck/alias-liveness/gat-static.rs29
-rw-r--r--tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs16
-rw-r--r--tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr16
-rw-r--r--tests/ui/borrowck/alias-liveness/higher-ranked.rs16
-rw-r--r--tests/ui/borrowck/alias-liveness/opaque-capture.rs17
-rw-r--r--tests/ui/borrowck/alias-liveness/opaque-type-param.rs14
-rw-r--r--tests/ui/borrowck/alias-liveness/opaque-type-param.stderr13
-rw-r--r--tests/ui/borrowck/alias-liveness/rpit-static.rs22
-rw-r--r--tests/ui/borrowck/alias-liveness/rpitit-static.rs18
-rw-r--r--tests/ui/borrowck/alias-liveness/rtn-static.rs23
-rw-r--r--tests/ui/borrowck/alias-liveness/rtn-static.stderr11
-rw-r--r--tests/ui/borrowck/borrowck-move-out-from-array-match.rs10
-rw-r--r--tests/ui/borrowck/borrowck-move-out-from-array-match.stderr40
-rw-r--r--tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs10
-rw-r--r--tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr138
-rw-r--r--tests/ui/borrowck/borrowck-move-out-from-array-use-match.rs10
-rw-r--r--tests/ui/borrowck/borrowck-move-out-from-array-use-match.stderr50
-rw-r--r--tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs10
-rw-r--r--tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.stderr138
-rw-r--r--tests/ui/borrowck/issue-62107-match-arm-scopes.rs2
-rw-r--r--tests/ui/borrowck/issue-62107-match-arm-scopes.stderr5
-rw-r--r--tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs4
-rw-r--r--tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr6
-rw-r--r--tests/ui/borrowck/let_underscore_temporary.rs38
-rw-r--r--tests/ui/borrowck/let_underscore_temporary.stderr40
-rw-r--r--tests/ui/bounds-lifetime.rs2
-rw-r--r--tests/ui/bounds-lifetime.stderr4
-rw-r--r--tests/ui/c-variadic/issue-86053-1.stderr10
-rw-r--r--tests/ui/cast/ptr-to-ptr-different-regions.rs24
-rw-r--r--tests/ui/check-cfg/allow-at-crate-level.rs2
-rw-r--r--tests/ui/check-cfg/allow-macro-cfg.rs2
-rw-r--r--tests/ui/check-cfg/allow-same-level.rs2
-rw-r--r--tests/ui/check-cfg/allow-top-level.rs2
-rw-r--r--tests/ui/check-cfg/allow-upper-level.rs2
-rw-r--r--tests/ui/check-cfg/compact-names.rs2
-rw-r--r--tests/ui/check-cfg/compact-values.rs2
-rw-r--r--tests/ui/check-cfg/concat-values.rs13
-rw-r--r--tests/ui/check-cfg/concat-values.stderr19
-rw-r--r--tests/ui/check-cfg/diagnotics.rs2
-rw-r--r--tests/ui/check-cfg/empty-names.rs10
-rw-r--r--tests/ui/check-cfg/empty-values.rs10
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr25
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr25
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.feature.stderr33
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.full.stderr33
-rw-r--r--tests/ui/check-cfg/exhaustive-names-values.rs34
-rw-r--r--tests/ui/check-cfg/exhaustive-names.empty_names.stderr (renamed from tests/ui/check-cfg/empty-names.stderr)8
-rw-r--r--tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr15
-rw-r--r--tests/ui/check-cfg/exhaustive-names.rs12
-rw-r--r--tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr17
-rw-r--r--tests/ui/check-cfg/exhaustive-values.empty_values.stderr (renamed from tests/ui/check-cfg/empty-values.stderr)2
-rw-r--r--tests/ui/check-cfg/exhaustive-values.rs13
-rw-r--r--tests/ui/check-cfg/exhaustive-values.without_names.stderr13
-rw-r--r--tests/ui/check-cfg/invalid-arguments.any_values.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.anything_else.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.giberich.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.ident_in_values_1.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.ident_in_values_2.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.mixed_any.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.mixed_values_any.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.multiple_any.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.multiple_values.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.multiple_values_any.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.not_empty_any.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.not_empty_values_any.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.rs34
-rw-r--r--tests/ui/check-cfg/invalid-arguments.string_for_name_1.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.string_for_name_2.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.unknown_meta_item_1.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.unknown_meta_item_2.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.unknown_meta_item_3.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.unterminated.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.values_any_before_ident.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-arguments.values_any_missing_values.stderr2
-rw-r--r--tests/ui/check-cfg/invalid-cfg-name.rs14
-rw-r--r--tests/ui/check-cfg/invalid-cfg-value.rs18
-rw-r--r--tests/ui/check-cfg/mix.cfg.stderr (renamed from tests/ui/check-cfg/mix.stderr)54
-rw-r--r--tests/ui/check-cfg/mix.names_values.stderr192
-rw-r--r--tests/ui/check-cfg/mix.rs6
-rw-r--r--tests/ui/check-cfg/no-expected-values.empty.stderr (renamed from tests/ui/check-cfg/no-values.stderr)4
-rw-r--r--tests/ui/check-cfg/no-expected-values.mixed.stderr23
-rw-r--r--tests/ui/check-cfg/no-expected-values.rs20
-rw-r--r--tests/ui/check-cfg/no-expected-values.simple.stderr23
-rw-r--r--tests/ui/check-cfg/no-expected-values.values.stderr23
-rw-r--r--tests/ui/check-cfg/no-values.rs14
-rw-r--r--tests/ui/check-cfg/stmt-no-ice.rs2
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-name.exhaustive.stderr (renamed from tests/ui/check-cfg/invalid-cfg-name.stderr)2
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-name.names.stderr10
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-name.rs16
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-value.cfg.stderr (renamed from tests/ui/check-cfg/invalid-cfg-value.stderr)4
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-value.rs22
-rw-r--r--tests/ui/check-cfg/unexpected-cfg-value.values.stderr25
-rw-r--r--tests/ui/check-cfg/unknown-values.rs17
-rw-r--r--tests/ui/check-cfg/well-known-names.rs2
-rw-r--r--tests/ui/check-cfg/well-known-names.stderr8
-rw-r--r--tests/ui/check-cfg/well-known-values.rs2
-rw-r--r--tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.stderr4
-rw-r--r--tests/ui/closures/closure-expected.rs2
-rw-r--r--tests/ui/closures/closure-expected.stderr4
-rw-r--r--tests/ui/closures/coerce-unsafe-to-closure.stderr2
-rw-r--r--tests/ui/closures/infer-signature-from-impl.next.stderr16
-rw-r--r--tests/ui/closures/infer-signature-from-impl.rs20
-rw-r--r--tests/ui/closures/issue-25439.rs2
-rw-r--r--tests/ui/closures/issue-25439.stderr2
-rw-r--r--tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs1
-rw-r--r--tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr13
-rw-r--r--tests/ui/coherence/coherence-negative-outlives-lifetimes.rs2
-rw-r--r--tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr11
-rw-r--r--tests/ui/coherence/coherence-overlap-trait-alias.rs4
-rw-r--r--tests/ui/coherence/coherence-overlap-trait-alias.stderr16
-rw-r--r--tests/ui/coherence/coherence-overlap-with-regions.rs8
-rw-r--r--tests/ui/coherence/coherence-overlap-with-regions.stderr11
-rw-r--r--tests/ui/coherence/coherence-with-coroutine.rs (renamed from tests/ui/coherence/coherence-with-generator.rs)10
-rw-r--r--tests/ui/coherence/coherence-with-coroutine.stock.stderr (renamed from tests/ui/coherence/coherence-with-generator.stock.stderr)8
-rw-r--r--tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr12
-rw-r--r--tests/ui/coherence/negative-coherence-considering-regions.rs29
-rw-r--r--tests/ui/coherence/negative-coherence-considering-regions.static_lt.stderr12
-rw-r--r--tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr25
-rw-r--r--tests/ui/const-generics/const-arg-in-const-arg.rs2
-rw-r--r--tests/ui/const-generics/defaults/default-annotation.rs6
-rw-r--r--tests/ui/const-generics/generic_arg_infer/infer-arg-test.rs2
-rw-r--r--tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr19
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-80742.rs1
-rw-r--r--tests/ui/const-generics/generic_const_exprs/issue-80742.stderr4
-rw-r--r--tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr8
-rw-r--r--tests/ui/const-generics/generic_const_exprs/type_mismatch.rs13
-rw-r--r--tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr12
-rw-r--r--tests/ui/const-generics/issues/issue-100313.stderr2
-rw-r--r--tests/ui/const-generics/issues/issue-67945-1.full.stderr2
-rw-r--r--tests/ui/const-ptr/allowed_slices.rs2
-rw-r--r--tests/ui/const-ptr/forbidden_slices.rs14
-rw-r--r--tests/ui/const-ptr/forbidden_slices.stderr114
-rw-r--r--tests/ui/const-ptr/out_of_bounds_read.stderr6
-rw-r--r--tests/ui/consts/assert-type-intrinsics.rs1
-rw-r--r--tests/ui/consts/assert-type-intrinsics.stderr12
-rw-r--r--tests/ui/consts/const-compare-bytes-ub.stderr8
-rw-r--r--tests/ui/consts/const-deref-ptr.rs1
-rw-r--r--tests/ui/consts/const-deref-ptr.stderr2
-rw-r--r--tests/ui/consts/const-eval/const_raw_ptr_ops2.stderr4
-rw-r--r--tests/ui/consts/const-eval/dangling.rs10
-rw-r--r--tests/ui/consts/const-eval/dangling.stderr9
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr2
-rw-r--r--tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr2
-rw-r--r--tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs2
-rw-r--r--tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr10
-rw-r--r--tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr2
-rw-r--r--tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.stderr6
-rw-r--r--tests/ui/consts/const-eval/issue-49296.stderr2
-rw-r--r--tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr21
-rw-r--r--tests/ui/consts/const-eval/issue-50814-2.normal.stderr (renamed from tests/ui/consts/const-eval/issue-50814-2.stderr)6
-rw-r--r--tests/ui/consts/const-eval/issue-50814-2.rs2
-rw-r--r--tests/ui/consts/const-eval/nonnull_as_ref_ub.rs2
-rw-r--r--tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr11
-rw-r--r--tests/ui/consts/const-eval/partial_ptr_overwrite.stderr2
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.32bit.stderr10
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.64bit.stderr10
-rw-r--r--tests/ui/consts/const-eval/raw-bytes.rs4
-rw-r--r--tests/ui/consts/const-eval/raw-pointer-ub.rs19
-rw-r--r--tests/ui/consts/const-eval/raw-pointer-ub.stderr22
-rw-r--r--tests/ui/consts/const-eval/ub-enum.rs2
-rw-r--r--tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr40
-rw-r--r--tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr40
-rw-r--r--tests/ui/consts/const-eval/ub-incorrect-vtable.rs10
-rw-r--r--tests/ui/consts/const-eval/ub-nonnull.rs2
-rw-r--r--tests/ui/consts/const-eval/ub-nonnull.stderr4
-rw-r--r--tests/ui/consts/const-eval/ub-ref-ptr.rs2
-rw-r--r--tests/ui/consts/const-eval/ub-ref-ptr.stderr4
-rw-r--r--tests/ui/consts/const-eval/ub-upvars.32bit.stderr2
-rw-r--r--tests/ui/consts/const-eval/ub-upvars.64bit.stderr2
-rw-r--r--tests/ui/consts/const-eval/ub-wide-ptr.rs20
-rw-r--r--tests/ui/consts/const-eval/ub-wide-ptr.stderr67
-rw-r--r--tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs1
-rw-r--r--tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.thir.stderr10
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr20
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr20
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs9
-rw-r--r--tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr26
-rw-r--r--tests/ui/consts/const-points-to-static.32bit.stderr2
-rw-r--r--tests/ui/consts/const-points-to-static.64bit.stderr2
-rw-r--r--tests/ui/consts/const-unsized.rs4
-rw-r--r--tests/ui/consts/const-unsized.stderr44
-rw-r--r--tests/ui/consts/const_discriminant.rs1
-rw-r--r--tests/ui/consts/copy-intrinsic.stderr4
-rw-r--r--tests/ui/consts/effect_param.rs11
-rw-r--r--tests/ui/consts/effect_param.stderr19
-rw-r--r--tests/ui/consts/extra-const-ub/detect-extra-ub.rs13
-rw-r--r--tests/ui/consts/extra-const-ub/detect-extra-ub.with_flag.stderr8
-rw-r--r--tests/ui/consts/invalid-union.32bit.stderr2
-rw-r--r--tests/ui/consts/invalid-union.64bit.stderr2
-rw-r--r--tests/ui/consts/issue-116186.rs12
-rw-r--r--tests/ui/consts/issue-116186.stderr21
-rw-r--r--tests/ui/consts/issue-39974.rs1
-rw-r--r--tests/ui/consts/issue-39974.stderr13
-rw-r--r--tests/ui/consts/issue-63952.32bit.stderr2
-rw-r--r--tests/ui/consts/issue-63952.64bit.stderr2
-rw-r--r--tests/ui/consts/issue-79690.64bit.stderr2
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr4
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr9
-rw-r--r--tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr9
-rw-r--r--tests/ui/consts/miri_unleashed/mutable_references_err.32bit.stderr6
-rw-r--r--tests/ui/consts/miri_unleashed/mutable_references_err.64bit.stderr6
-rw-r--r--tests/ui/consts/miri_unleashed/ptr_arith.rs1
-rw-r--r--tests/ui/consts/miri_unleashed/ptr_arith.stderr6
-rw-r--r--tests/ui/consts/missing_span_in_backtrace.rs2
-rw-r--r--tests/ui/consts/missing_span_in_backtrace.stderr2
-rw-r--r--tests/ui/consts/offset_from_ub.stderr6
-rw-r--r--tests/ui/consts/offset_ub.rs2
-rw-r--r--tests/ui/consts/offset_ub.stderr8
-rw-r--r--tests/ui/coroutine/addassign-yield.rs (renamed from tests/ui/generator/addassign-yield.rs)2
-rw-r--r--tests/ui/coroutine/async-coroutine-issue-67158.rs6
-rw-r--r--tests/ui/coroutine/async-coroutine-issue-67158.stderr (renamed from tests/ui/generator/async-generator-issue-67158.stderr)4
-rw-r--r--tests/ui/coroutine/auto-trait-regions.rs (renamed from tests/ui/generator/auto-trait-regions.rs)6
-rw-r--r--tests/ui/coroutine/auto-trait-regions.stderr (renamed from tests/ui/generator/auto-trait-regions.stderr)0
-rw-r--r--tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs11
-rw-r--r--tests/ui/coroutine/auxiliary/xcrate-reachable.rs14
-rw-r--r--tests/ui/coroutine/auxiliary/xcrate.rs18
-rw-r--r--tests/ui/coroutine/borrow-in-tail-expr.rs (renamed from tests/ui/generator/borrow-in-tail-expr.rs)2
-rw-r--r--tests/ui/coroutine/borrowing.rs (renamed from tests/ui/generator/borrowing.rs)4
-rw-r--r--tests/ui/coroutine/borrowing.stderr31
-rw-r--r--tests/ui/coroutine/clone-impl-async.rs (renamed from tests/ui/generator/clone-impl-async.rs)6
-rw-r--r--tests/ui/coroutine/clone-impl-async.stderr (renamed from tests/ui/generator/clone-impl-async.stderr)0
-rw-r--r--tests/ui/coroutine/clone-impl-static.rs (renamed from tests/ui/generator/clone-impl-static.rs)6
-rw-r--r--tests/ui/coroutine/clone-impl-static.stderr (renamed from tests/ui/generator/clone-impl-static.stderr)8
-rw-r--r--tests/ui/coroutine/clone-impl.rs (renamed from tests/ui/generator/clone-impl.rs)6
-rw-r--r--tests/ui/coroutine/clone-impl.stderr (renamed from tests/ui/generator/clone-impl.stderr)40
-rw-r--r--tests/ui/coroutine/conditional-drop.rs (renamed from tests/ui/generator/conditional-drop.rs)4
-rw-r--r--tests/ui/coroutine/control-flow.rs (renamed from tests/ui/generator/control-flow.rs)10
-rw-r--r--tests/ui/coroutine/coroutine-region-requirements.migrate.stderr (renamed from tests/ui/generator/generator-region-requirements.migrate.stderr)0
-rw-r--r--tests/ui/coroutine/coroutine-region-requirements.rs (renamed from tests/ui/generator/generator-region-requirements.rs)8
-rw-r--r--tests/ui/coroutine/coroutine-region-requirements.stderr (renamed from tests/ui/generator/generator-region-requirements.stderr)4
-rw-r--r--tests/ui/coroutine/coroutine-resume-after-panic.rs (renamed from tests/ui/generator/generator-resume-after-panic.rs)8
-rw-r--r--tests/ui/coroutine/coroutine-with-nll.rs (renamed from tests/ui/generator/generator-with-nll.rs)4
-rw-r--r--tests/ui/coroutine/coroutine-with-nll.stderr (renamed from tests/ui/generator/generator-with-nll.stderr)4
-rw-r--r--tests/ui/coroutine/coroutine-yielding-or-returning-itself.rs35
-rw-r--r--tests/ui/coroutine/coroutine-yielding-or-returning-itself.stderr (renamed from tests/ui/generator/generator-yielding-or-returning-itself.stderr)32
-rw-r--r--tests/ui/coroutine/derived-drop-parent-expr.rs (renamed from tests/ui/generator/derived-drop-parent-expr.rs)2
-rw-r--r--tests/ui/coroutine/discriminant.rs (renamed from tests/ui/generator/discriminant.rs)14
-rw-r--r--tests/ui/coroutine/drop-and-replace.rs (renamed from tests/ui/generator/drop-and-replace.rs)10
-rw-r--r--tests/ui/coroutine/drop-control-flow.rs (renamed from tests/ui/generator/drop-control-flow.rs)6
-rw-r--r--tests/ui/coroutine/drop-env.rs (renamed from tests/ui/generator/drop-env.rs)4
-rw-r--r--tests/ui/coroutine/drop-track-addassign-yield.rs (renamed from tests/ui/generator/drop-track-addassign-yield.rs)2
-rw-r--r--tests/ui/coroutine/drop-tracking-parent-expression.rs (renamed from tests/ui/generator/drop-tracking-parent-expression.rs)2
-rw-r--r--tests/ui/coroutine/drop-tracking-parent-expression.stderr (renamed from tests/ui/generator/drop-tracking-parent-expression.stderr)24
-rw-r--r--tests/ui/coroutine/drop-tracking-yielding-in-match-guards.rs (renamed from tests/ui/generator/drop-tracking-yielding-in-match-guards.rs)2
-rw-r--r--tests/ui/coroutine/drop-yield-twice.rs (renamed from tests/ui/generator/drop-yield-twice.rs)4
-rw-r--r--tests/ui/coroutine/drop-yield-twice.stderr (renamed from tests/ui/generator/drop-yield-twice.stderr)8
-rw-r--r--tests/ui/coroutine/dropck-resume.rs (renamed from tests/ui/generator/dropck-resume.rs)8
-rw-r--r--tests/ui/coroutine/dropck-resume.stderr (renamed from tests/ui/generator/dropck-resume.stderr)2
-rw-r--r--tests/ui/coroutine/dropck.rs (renamed from tests/ui/generator/dropck.rs)6
-rw-r--r--tests/ui/coroutine/dropck.stderr (renamed from tests/ui/generator/dropck.stderr)8
-rw-r--r--tests/ui/coroutine/gen_block.e2024.stderr19
-rw-r--r--tests/ui/coroutine/gen_block.none.stderr49
-rw-r--r--tests/ui/coroutine/gen_block.rs17
-rw-r--r--tests/ui/coroutine/gen_block_is_coro.rs18
-rw-r--r--tests/ui/coroutine/gen_block_is_coro.stderr21
-rw-r--r--tests/ui/coroutine/gen_block_is_iter.rs19
-rw-r--r--tests/ui/coroutine/gen_block_is_no_future.rs8
-rw-r--r--tests/ui/coroutine/gen_block_is_no_future.stderr12
-rw-r--r--tests/ui/coroutine/gen_block_iterate.rs35
-rw-r--r--tests/ui/coroutine/gen_block_move.fixed17
-rw-r--r--tests/ui/coroutine/gen_block_move.rs17
-rw-r--r--tests/ui/coroutine/gen_block_move.stderr30
-rw-r--r--tests/ui/coroutine/gen_block_panic.rs26
-rw-r--r--tests/ui/coroutine/gen_block_panic.stderr12
-rw-r--r--tests/ui/coroutine/gen_fn.e2024.stderr10
-rw-r--r--tests/ui/coroutine/gen_fn.none.stderr8
-rw-r--r--tests/ui/coroutine/gen_fn.rs8
-rw-r--r--tests/ui/coroutine/issue-102645.rs (renamed from tests/ui/generator/issue-102645.rs)4
-rw-r--r--tests/ui/coroutine/issue-102645.stderr (renamed from tests/ui/generator/issue-102645.stderr)2
-rw-r--r--tests/ui/coroutine/issue-105084.rs (renamed from tests/ui/generator/issue-105084.rs)12
-rw-r--r--tests/ui/coroutine/issue-105084.stderr (renamed from tests/ui/generator/issue-105084.stderr)10
-rw-r--r--tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs (renamed from tests/ui/generator/issue-110929-generator-conflict-error-ice.rs)4
-rw-r--r--tests/ui/coroutine/issue-113279.rs (renamed from tests/ui/generator/issue-113279.rs)6
-rw-r--r--tests/ui/coroutine/issue-113279.stderr (renamed from tests/ui/generator/issue-113279.stderr)0
-rw-r--r--tests/ui/coroutine/issue-44197.rs (renamed from tests/ui/generator/issue-44197.rs)12
-rw-r--r--tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr (renamed from tests/ui/generator/issue-45729-unsafe-in-generator.mir.stderr)2
-rw-r--r--tests/ui/coroutine/issue-45729-unsafe-in-coroutine.rs (renamed from tests/ui/generator/issue-45729-unsafe-in-generator.rs)2
-rw-r--r--tests/ui/coroutine/issue-45729-unsafe-in-coroutine.thir.stderr (renamed from tests/ui/generator/issue-45729-unsafe-in-generator.thir.stderr)2
-rw-r--r--tests/ui/coroutine/issue-48048.rs (renamed from tests/ui/generator/issue-48048.rs)4
-rw-r--r--tests/ui/coroutine/issue-48048.stderr (renamed from tests/ui/generator/issue-48048.stderr)2
-rw-r--r--tests/ui/coroutine/issue-52304.rs11
-rw-r--r--tests/ui/coroutine/issue-52398.rs (renamed from tests/ui/generator/issue-52398.rs)6
-rw-r--r--tests/ui/coroutine/issue-52398.stderr (renamed from tests/ui/generator/issue-52398.stderr)8
-rw-r--r--tests/ui/coroutine/issue-53548-1.rs (renamed from tests/ui/generator/issue-53548-1.rs)2
-rw-r--r--tests/ui/coroutine/issue-53548.rs (renamed from tests/ui/generator/issue-53548.rs)4
-rw-r--r--tests/ui/coroutine/issue-57017.rs (renamed from tests/ui/generator/issue-57017.rs)2
-rw-r--r--tests/ui/coroutine/issue-57084.rs (renamed from tests/ui/generator/issue-57084.rs)8
-rw-r--r--tests/ui/coroutine/issue-57084.stderr (renamed from tests/ui/generator/issue-57084.stderr)4
-rw-r--r--tests/ui/coroutine/issue-57478.rs (renamed from tests/ui/generator/issue-57478.rs)2
-rw-r--r--tests/ui/coroutine/issue-58888.rs (renamed from tests/ui/generator/issue-58888.rs)6
-rw-r--r--tests/ui/coroutine/issue-61442-stmt-expr-with-drop.rs (renamed from tests/ui/generator/issue-61442-stmt-expr-with-drop.rs)4
-rw-r--r--tests/ui/coroutine/issue-62506-two_awaits.rs (renamed from tests/ui/generator/issue-62506-two_awaits.rs)2
-rw-r--r--tests/ui/coroutine/issue-64620-yield-array-element.rs9
-rw-r--r--tests/ui/coroutine/issue-64620-yield-array-element.stderr (renamed from tests/ui/generator/issue-64620-yield-array-element.stderr)2
-rw-r--r--tests/ui/coroutine/issue-68112.rs (renamed from tests/ui/generator/issue-68112.rs)26
-rw-r--r--tests/ui/coroutine/issue-68112.stderr (renamed from tests/ui/generator/issue-68112.stderr)24
-rw-r--r--tests/ui/coroutine/issue-69017.rs (renamed from tests/ui/generator/issue-69017.rs)8
-rw-r--r--tests/ui/coroutine/issue-69039.rs (renamed from tests/ui/generator/issue-69039.rs)12
-rw-r--r--tests/ui/coroutine/issue-87142.rs32
-rw-r--r--tests/ui/coroutine/issue-88653.rs (renamed from tests/ui/generator/issue-88653.rs)12
-rw-r--r--tests/ui/coroutine/issue-88653.stderr (renamed from tests/ui/generator/issue-88653.stderr)8
-rw-r--r--tests/ui/coroutine/issue-91477.rs (renamed from tests/ui/generator/issue-91477.rs)2
-rw-r--r--tests/ui/coroutine/issue-91477.stderr (renamed from tests/ui/generator/issue-91477.stderr)2
-rw-r--r--tests/ui/coroutine/issue-93161.rs (renamed from tests/ui/generator/issue-93161.rs)0
-rw-r--r--tests/ui/coroutine/iterator-count.rs (renamed from tests/ui/generator/iterator-count.rs)14
-rw-r--r--tests/ui/coroutine/layout-error.rs (renamed from tests/ui/generator/layout-error.rs)2
-rw-r--r--tests/ui/coroutine/layout-error.stderr (renamed from tests/ui/generator/layout-error.stderr)0
-rw-r--r--tests/ui/coroutine/live-upvar-across-yield.rs (renamed from tests/ui/generator/live-upvar-across-yield.rs)4
-rw-r--r--tests/ui/coroutine/match-bindings.rs (renamed from tests/ui/generator/match-bindings.rs)4
-rw-r--r--tests/ui/coroutine/match-bindings.stderr (renamed from tests/ui/generator/match-bindings.stderr)4
-rw-r--r--tests/ui/coroutine/metadata-sufficient-for-layout.rs (renamed from tests/ui/generator/metadata-sufficient-for-layout.rs)10
-rw-r--r--tests/ui/coroutine/metadata-sufficient-for-layout.stderr (renamed from tests/ui/generator/metadata-sufficient-for-layout.stderr)0
-rw-r--r--tests/ui/coroutine/nested_coroutine.rs21
-rw-r--r--tests/ui/coroutine/niche-in-coroutine.rs (renamed from tests/ui/generator/niche-in-generator.rs)4
-rw-r--r--tests/ui/coroutine/non-static-is-unpin.rs (renamed from tests/ui/generator/non-static-is-unpin.rs)4
-rw-r--r--tests/ui/coroutine/not-send-sync.rs (renamed from tests/ui/generator/not-send-sync.rs)6
-rw-r--r--tests/ui/coroutine/not-send-sync.stderr (renamed from tests/ui/generator/not-send-sync.stderr)16
-rw-r--r--tests/ui/coroutine/overlap-locals.rs (renamed from tests/ui/generator/overlap-locals.rs)2
-rw-r--r--tests/ui/coroutine/panic-drops-resume.rs (renamed from tests/ui/generator/panic-drops-resume.rs)6
-rw-r--r--tests/ui/coroutine/panic-drops.rs (renamed from tests/ui/generator/panic-drops.rs)4
-rw-r--r--tests/ui/coroutine/panic-safe.rs (renamed from tests/ui/generator/panic-safe.rs)4
-rw-r--r--tests/ui/coroutine/parent-expression.rs (renamed from tests/ui/generator/parent-expression.rs)2
-rw-r--r--tests/ui/coroutine/parent-expression.stderr (renamed from tests/ui/generator/parent-expression.stderr)24
-rw-r--r--tests/ui/coroutine/partial-drop.rs (renamed from tests/ui/generator/partial-drop.rs)2
-rw-r--r--tests/ui/coroutine/partial-initialization-across-yield.rs (renamed from tests/ui/generator/partial-initialization-across-yield.rs)4
-rw-r--r--tests/ui/coroutine/partial-initialization-across-yield.stderr (renamed from tests/ui/generator/partial-initialization-across-yield.stderr)0
-rw-r--r--tests/ui/coroutine/pattern-borrow.rs (renamed from tests/ui/generator/pattern-borrow.rs)4
-rw-r--r--tests/ui/coroutine/pattern-borrow.stderr (renamed from tests/ui/generator/pattern-borrow.stderr)2
-rw-r--r--tests/ui/coroutine/pin-box-coroutine.rs13
-rw-r--r--tests/ui/coroutine/print/coroutine-print-verbose-1.rs (renamed from tests/ui/generator/print/generator-print-verbose-1.rs)24
-rw-r--r--tests/ui/coroutine/print/coroutine-print-verbose-1.stderr (renamed from tests/ui/generator/print/generator-print-verbose-1.stderr)42
-rw-r--r--tests/ui/coroutine/print/coroutine-print-verbose-2.rs (renamed from tests/ui/generator/print/generator-print-verbose-2.rs)8
-rw-r--r--tests/ui/coroutine/print/coroutine-print-verbose-2.stderr (renamed from tests/ui/generator/print/generator-print-verbose-2.stderr)24
-rw-r--r--tests/ui/coroutine/print/coroutine-print-verbose-3.rs (renamed from tests/ui/generator/print/generator-print-verbose-3.rs)4
-rw-r--r--tests/ui/coroutine/print/coroutine-print-verbose-3.stderr (renamed from tests/ui/generator/print/generator-print-verbose-3.stderr)8
-rw-r--r--tests/ui/coroutine/reborrow-mut-upvar.rs (renamed from tests/ui/generator/reborrow-mut-upvar.rs)4
-rw-r--r--tests/ui/coroutine/reborrow-mut-upvar.stderr (renamed from tests/ui/generator/reborrow-mut-upvar.stderr)4
-rw-r--r--tests/ui/coroutine/ref-escapes-but-not-over-yield.rs (renamed from tests/ui/generator/ref-escapes-but-not-over-yield.rs)6
-rw-r--r--tests/ui/coroutine/ref-escapes-but-not-over-yield.stderr (renamed from tests/ui/generator/ref-escapes-but-not-over-yield.stderr)8
-rw-r--r--tests/ui/coroutine/ref-upvar-not-send.rs (renamed from tests/ui/generator/ref-upvar-not-send.rs)12
-rw-r--r--tests/ui/coroutine/ref-upvar-not-send.stderr (renamed from tests/ui/generator/ref-upvar-not-send.stderr)10
-rw-r--r--tests/ui/coroutine/reinit-in-match-guard.rs (renamed from tests/ui/generator/reinit-in-match-guard.rs)2
-rw-r--r--tests/ui/coroutine/resume-after-return.rs (renamed from tests/ui/generator/resume-after-return.rs)8
-rw-r--r--tests/ui/coroutine/resume-arg-late-bound.rs (renamed from tests/ui/generator/resume-arg-late-bound.rs)8
-rw-r--r--tests/ui/coroutine/resume-arg-late-bound.stderr (renamed from tests/ui/generator/resume-arg-late-bound.stderr)6
-rw-r--r--tests/ui/coroutine/resume-arg-size.rs (renamed from tests/ui/generator/resume-arg-size.rs)8
-rw-r--r--tests/ui/coroutine/resume-live-across-yield.rs (renamed from tests/ui/generator/resume-live-across-yield.rs)8
-rw-r--r--tests/ui/coroutine/retain-resume-ref.rs (renamed from tests/ui/generator/retain-resume-ref.rs)6
-rw-r--r--tests/ui/coroutine/retain-resume-ref.stderr (renamed from tests/ui/generator/retain-resume-ref.stderr)7
-rw-r--r--tests/ui/coroutine/self_referential_gen_block.rs17
-rw-r--r--tests/ui/coroutine/self_referential_gen_block.stderr11
-rw-r--r--tests/ui/coroutine/size-moved-locals.rs (renamed from tests/ui/generator/size-moved-locals.rs)14
-rw-r--r--tests/ui/coroutine/sized-yield.rs14
-rw-r--r--tests/ui/coroutine/sized-yield.stderr26
-rw-r--r--tests/ui/coroutine/smoke-resume-args.rs (renamed from tests/ui/generator/smoke-resume-args.rs)10
-rw-r--r--tests/ui/coroutine/smoke.rs (renamed from tests/ui/generator/smoke.rs)32
-rw-r--r--tests/ui/coroutine/static-coroutine.rs20
-rw-r--r--tests/ui/coroutine/static-mut-reference-across-yield.rs (renamed from tests/ui/generator/static-mut-reference-across-yield.rs)2
-rw-r--r--tests/ui/coroutine/static-not-unpin.current.stderr (renamed from tests/ui/generator/static-not-unpin.current.stderr)6
-rw-r--r--tests/ui/coroutine/static-not-unpin.next.stderr (renamed from tests/ui/generator/static-not-unpin.next.stderr)6
-rw-r--r--tests/ui/coroutine/static-not-unpin.rs (renamed from tests/ui/generator/static-not-unpin.rs)6
-rw-r--r--tests/ui/coroutine/static-reference-across-yield.rs (renamed from tests/ui/generator/static-reference-across-yield.rs)2
-rw-r--r--tests/ui/coroutine/too-live-local-in-immovable-gen.rs (renamed from tests/ui/generator/too-live-local-in-immovable-gen.rs)8
-rw-r--r--tests/ui/coroutine/too-live-local-in-immovable-gen.stderr (renamed from tests/ui/generator/too-live-local-in-immovable-gen.stderr)6
-rw-r--r--tests/ui/coroutine/too-many-parameters.rs8
-rw-r--r--tests/ui/coroutine/too-many-parameters.stderr (renamed from tests/ui/generator/too-many-parameters.stderr)2
-rw-r--r--tests/ui/coroutine/type-mismatch-error.rs (renamed from tests/ui/generator/type-mismatch-error.rs)6
-rw-r--r--tests/ui/coroutine/type-mismatch-error.stderr (renamed from tests/ui/generator/type-mismatch-error.stderr)0
-rw-r--r--tests/ui/coroutine/type-mismatch-signature-deduction.rs (renamed from tests/ui/generator/type-mismatch-signature-deduction.rs)6
-rw-r--r--tests/ui/coroutine/type-mismatch-signature-deduction.stderr (renamed from tests/ui/generator/type-mismatch-signature-deduction.stderr)4
-rw-r--r--tests/ui/coroutine/unresolved-ct-var.rs (renamed from tests/ui/generator/unresolved-ct-var.rs)0
-rw-r--r--tests/ui/coroutine/unresolved-ct-var.stderr (renamed from tests/ui/generator/unresolved-ct-var.stderr)0
-rw-r--r--tests/ui/coroutine/unsized-capture-across-yield.rs (renamed from tests/ui/generator/unsized-capture-across-yield.rs)8
-rw-r--r--tests/ui/coroutine/unsized-capture-across-yield.stderr (renamed from tests/ui/generator/unsized-capture-across-yield.stderr)0
-rw-r--r--tests/ui/coroutine/unsized-local-across-yield.rs (renamed from tests/ui/generator/unsized-local-across-yield.rs)8
-rw-r--r--tests/ui/coroutine/unsized-local-across-yield.stderr (renamed from tests/ui/generator/unsized-local-across-yield.stderr)0
-rw-r--r--tests/ui/coroutine/xcrate-reachable.rs (renamed from tests/ui/generator/xcrate-reachable.rs)4
-rw-r--r--tests/ui/coroutine/xcrate.rs (renamed from tests/ui/generator/xcrate.rs)10
-rw-r--r--tests/ui/coroutine/yield-in-args-rev.rs (renamed from tests/ui/generator/yield-in-args-rev.rs)4
-rw-r--r--tests/ui/coroutine/yield-in-args-rev.stderr (renamed from tests/ui/generator/yield-in-args-rev.stderr)4
-rw-r--r--tests/ui/coroutine/yield-in-args.rs (renamed from tests/ui/generator/yield-in-args.rs)2
-rw-r--r--tests/ui/coroutine/yield-in-args.stderr (renamed from tests/ui/generator/yield-in-args.stderr)2
-rw-r--r--tests/ui/coroutine/yield-in-const.rs (renamed from tests/ui/generator/yield-in-const.rs)2
-rw-r--r--tests/ui/coroutine/yield-in-const.stderr (renamed from tests/ui/generator/yield-in-const.stderr)2
-rw-r--r--tests/ui/coroutine/yield-in-function.rs (renamed from tests/ui/generator/yield-in-function.rs)2
-rw-r--r--tests/ui/coroutine/yield-in-function.stderr (renamed from tests/ui/generator/yield-in-function.stderr)2
-rw-r--r--tests/ui/coroutine/yield-in-initializer.rs (renamed from tests/ui/generator/yield-in-initializer.rs)4
-rw-r--r--tests/ui/coroutine/yield-in-initializer.stderr (renamed from tests/ui/generator/yield-in-initializer.stderr)4
-rw-r--r--tests/ui/coroutine/yield-in-static.rs (renamed from tests/ui/generator/yield-in-static.rs)2
-rw-r--r--tests/ui/coroutine/yield-in-static.stderr (renamed from tests/ui/generator/yield-in-static.stderr)2
-rw-r--r--tests/ui/coroutine/yield-outside-coroutine-issue-78653.rs (renamed from tests/ui/generator/yield-outside-generator-issue-78653.rs)4
-rw-r--r--tests/ui/coroutine/yield-outside-coroutine-issue-78653.stderr (renamed from tests/ui/generator/yield-outside-generator-issue-78653.stderr)6
-rw-r--r--tests/ui/coroutine/yield-subtype.rs (renamed from tests/ui/generator/yield-subtype.rs)4
-rw-r--r--tests/ui/coroutine/yield-subtype.stderr (renamed from tests/ui/generator/yield-subtype.stderr)4
-rw-r--r--tests/ui/coroutine/yield-while-iterating.rs (renamed from tests/ui/generator/yield-while-iterating.rs)6
-rw-r--r--tests/ui/coroutine/yield-while-iterating.stderr (renamed from tests/ui/generator/yield-while-iterating.stderr)4
-rw-r--r--tests/ui/coroutine/yield-while-local-borrowed.rs (renamed from tests/ui/generator/yield-while-local-borrowed.rs)16
-rw-r--r--tests/ui/coroutine/yield-while-local-borrowed.stderr (renamed from tests/ui/generator/yield-while-local-borrowed.stderr)12
-rw-r--r--tests/ui/coroutine/yield-while-ref-reborrowed.rs (renamed from tests/ui/generator/yield-while-ref-reborrowed.rs)8
-rw-r--r--tests/ui/coroutine/yield-while-ref-reborrowed.stderr (renamed from tests/ui/generator/yield-while-ref-reborrowed.stderr)4
-rw-r--r--tests/ui/coroutine/yielding-in-match-guards.rs (renamed from tests/ui/generator/yielding-in-match-guards.rs)2
-rw-r--r--tests/ui/deprecation/staged-deprecation-in-future.rs6
-rw-r--r--tests/ui/derives/deriving-with-repr-packed-move-errors.rs96
-rw-r--r--tests/ui/derives/deriving-with-repr-packed-move-errors.stderr174
-rw-r--r--tests/ui/derives/deriving-with-repr-packed.stderr1
-rw-r--r--tests/ui/derives/issue-36617.stderr40
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs8
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr77
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs10
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr35
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.rs18
-rw-r--r--tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.stderr47
-rw-r--r--tests/ui/did_you_mean/bad-assoc-ty.stderr2
-rw-r--r--tests/ui/did_you_mean/issue-105225-named-args.rs10
-rw-r--r--tests/ui/did_you_mean/issue-105225-named-args.stderr22
-rw-r--r--tests/ui/did_you_mean/issue-105225.fixed21
-rw-r--r--tests/ui/did_you_mean/issue-105225.rs21
-rw-r--r--tests/ui/did_you_mean/issue-105225.stderr72
-rw-r--r--tests/ui/drop/dynamic-drop.rs14
-rw-r--r--tests/ui/dropck/coroutine-liveness-1.rs18
-rw-r--r--tests/ui/dropck/coroutine-liveness-2.rs23
-rw-r--r--tests/ui/error-codes/E0004.stderr6
-rw-r--r--tests/ui/error-codes/E0034.stderr4
-rw-r--r--tests/ui/error-codes/E0191.stderr2
-rw-r--r--tests/ui/error-codes/E0220.stderr2
-rw-r--r--tests/ui/error-codes/E0221.stderr6
-rw-r--r--tests/ui/error-codes/E0223.stderr2
-rw-r--r--tests/ui/error-codes/E0283.rs8
-rw-r--r--tests/ui/error-codes/E0283.stderr6
-rw-r--r--tests/ui/error-codes/E0396-fixed.stderr2
-rw-r--r--tests/ui/error-codes/E0396.rs2
-rw-r--r--tests/ui/error-codes/E0396.stderr24
-rw-r--r--tests/ui/error-codes/E0463.rs7
-rw-r--r--tests/ui/error-codes/E0463.stderr9
-rw-r--r--tests/ui/error-codes/E0583.stderr1
-rw-r--r--tests/ui/error-codes/E0719.stderr6
-rw-r--r--tests/ui/errors/remap-path-prefix-macro.normal.run.stdout1
-rw-r--r--tests/ui/errors/remap-path-prefix-macro.rs12
-rw-r--r--tests/ui/errors/remap-path-prefix-macro.with-macro-scope.run.stdout1
-rw-r--r--tests/ui/errors/remap-path-prefix-macro.without-macro-scope.run.stdout1
-rw-r--r--tests/ui/errors/remap-path-prefix.normal.stderr (renamed from tests/ui/errors/remap-path-prefix.stderr)2
-rw-r--r--tests/ui/errors/remap-path-prefix.rs3
-rw-r--r--tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr9
-rw-r--r--tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr9
-rw-r--r--tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.rs10
-rw-r--r--tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr27
-rw-r--r--tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.rs7
-rw-r--r--tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.stderr25
-rw-r--r--tests/ui/extern/extern-wrong-value-type.rs2
-rw-r--r--tests/ui/extern/extern-wrong-value-type.stderr4
-rw-r--r--tests/ui/feature-gates/feature-gate-closure_track_caller.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-closure_track_caller.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr28
-rw-r--r--tests/ui/feature-gates/feature-gate-coroutines.none.stderr66
-rw-r--r--tests/ui/feature-gates/feature-gate-coroutines.rs18
-rw-r--r--tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr2
-rw-r--r--tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr28
-rw-r--r--tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr9
-rw-r--r--tests/ui/feature-gates/feature-gate-gen_blocks.rs15
-rw-r--r--tests/ui/feature-gates/feature-gate-generators.rs10
-rw-r--r--tests/ui/feature-gates/feature-gate-generators.stderr37
-rw-r--r--tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs18
-rw-r--r--tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr103
-rw-r--r--tests/ui/feature-gates/feature-gate-offset-of-enum.rs15
-rw-r--r--tests/ui/feature-gates/feature-gate-offset-of-enum.stderr37
-rw-r--r--tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs10
-rw-r--r--tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr18
-rw-r--r--tests/ui/feature-gates/feature-gate-staged_api.rs4
-rw-r--r--tests/ui/feature-gates/feature-gate-staged_api.stderr8
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-bench.stderr6
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs6
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr96
-rw-r--r--tests/ui/feature-gates/issue-43106-gating-of-test.stderr6
-rw-r--r--tests/ui/fn/fn-trait-formatting.rs2
-rw-r--r--tests/ui/fn/fn-trait-formatting.stderr4
-rw-r--r--tests/ui/generator/async-generator-issue-67158.rs6
-rw-r--r--tests/ui/generator/auxiliary/metadata-sufficient-for-layout.rs11
-rw-r--r--tests/ui/generator/auxiliary/xcrate-reachable.rs14
-rw-r--r--tests/ui/generator/auxiliary/xcrate.rs18
-rw-r--r--tests/ui/generator/borrowing.stderr39
-rw-r--r--tests/ui/generator/generator-yielding-or-returning-itself.rs35
-rw-r--r--tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr18
-rw-r--r--tests/ui/generator/issue-52304.rs11
-rw-r--r--tests/ui/generator/issue-64620-yield-array-element.rs9
-rw-r--r--tests/ui/generator/issue-87142.rs32
-rw-r--r--tests/ui/generator/nested_generators.rs21
-rw-r--r--tests/ui/generator/pin-box-generator.rs13
-rw-r--r--tests/ui/generator/sized-yield.rs14
-rw-r--r--tests/ui/generator/sized-yield.stderr26
-rw-r--r--tests/ui/generator/static-generators.rs20
-rw-r--r--tests/ui/generator/too-many-parameters.rs8
-rw-r--r--tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs18
-rw-r--r--tests/ui/generic-associated-types/bugs/issue-100013.rs8
-rw-r--r--tests/ui/generic-associated-types/bugs/issue-100013.stderr8
-rw-r--r--tests/ui/generic-associated-types/gat-in-trait-path.base.stderr3
-rw-r--r--tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs2
-rw-r--r--tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr4
-rw-r--r--tests/ui/generic-associated-types/issue-68643-broken-mir.rs2
-rw-r--r--tests/ui/generic-associated-types/issue-68643-broken-mir.stderr4
-rw-r--r--tests/ui/generic-associated-types/issue-68644-codegen-selection.rs2
-rw-r--r--tests/ui/generic-associated-types/issue-68644-codegen-selection.stderr4
-rw-r--r--tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs2
-rw-r--r--tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr4
-rw-r--r--tests/ui/generic-associated-types/issue-68648-2.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-68656-unsized-values.stderr2
-rw-r--r--tests/ui/generic-associated-types/issue-76535.base.stderr4
-rw-r--r--tests/ui/generic-associated-types/issue-79422.base.stderr6
-rw-r--r--tests/ui/generic-associated-types/issue-84931.rs3
-rw-r--r--tests/ui/generic-associated-types/issue-84931.stderr24
-rw-r--r--tests/ui/generic-associated-types/issue-86787.rs4
-rw-r--r--tests/ui/generic-associated-types/issue-86787.stderr21
-rw-r--r--tests/ui/generic-associated-types/issue-88360.stderr2
-rw-r--r--tests/ui/generic-associated-types/missing-bounds.stderr6
-rw-r--r--tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.rs1
-rw-r--r--tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr34
-rw-r--r--tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr4
-rw-r--r--tests/ui/higher-ranked/trait-bounds/fn-ptr.rs2
-rw-r--r--tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-3.stderr4
-rw-r--r--tests/ui/hygiene/panic-location.run.stderr2
-rw-r--r--tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr2
-rw-r--r--tests/ui/impl-trait/async_scope_creep.rs4
-rw-r--r--tests/ui/impl-trait/async_scope_creep.tait.stderr9
-rw-r--r--tests/ui/impl-trait/auto-trait-leak.rs2
-rw-r--r--tests/ui/impl-trait/auto-trait-leak.stderr68
-rw-r--r--tests/ui/impl-trait/bivariant-lifetime-liveness.rs15
-rw-r--r--tests/ui/impl-trait/bounds_regression.rs10
-rw-r--r--tests/ui/impl-trait/equality-in-canonical-query.clone.stderr29
-rw-r--r--tests/ui/impl-trait/equality-in-canonical-query.rs23
-rw-r--r--tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr14
-rw-r--r--tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr14
-rw-r--r--tests/ui/impl-trait/erased-regions-in-hidden-ty.rs23
-rw-r--r--tests/ui/impl-trait/in-trait/async-and-ret-ref.rs11
-rw-r--r--tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr14
-rw-r--r--tests/ui/impl-trait/in-trait/deep-match.rs2
-rw-r--r--tests/ui/impl-trait/in-trait/deep-match.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/default-body-type-err.rs2
-rw-r--r--tests/ui/impl-trait/in-trait/default-body-type-err.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/doesnt-satisfy.rs2
-rw-r--r--tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr4
-rw-r--r--tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr1
-rw-r--r--tests/ui/impl-trait/in-trait/gat-outlives.rs17
-rw-r--r--tests/ui/impl-trait/in-trait/gat-outlives.stderr24
-rw-r--r--tests/ui/impl-trait/in-trait/generics-mismatch.rs2
-rw-r--r--tests/ui/impl-trait/in-trait/generics-mismatch.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/issue-102140.rs2
-rw-r--r--tests/ui/impl-trait/in-trait/issue-102140.stderr6
-rw-r--r--tests/ui/impl-trait/in-trait/issue-102571.rs2
-rw-r--r--tests/ui/impl-trait/in-trait/issue-102571.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs11
-rw-r--r--tests/ui/impl-trait/in-trait/object-safety.rs2
-rw-r--r--tests/ui/impl-trait/in-trait/object-safety.stderr20
-rw-r--r--tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.rs2
-rw-r--r--tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/specialization-broken.stderr2
-rw-r--r--tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.rs2
-rw-r--r--tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr2
-rw-r--r--tests/ui/impl-trait/issues/issue-58504.rs8
-rw-r--r--tests/ui/impl-trait/issues/issue-58504.stderr2
-rw-r--r--tests/ui/impl-trait/lifetimes.rs4
-rw-r--r--tests/ui/impl-trait/negative-reasoning.stderr2
-rw-r--r--tests/ui/impl-trait/nested-return-type2-tait2.rs4
-rw-r--r--tests/ui/impl-trait/nested-return-type2-tait2.stderr23
-rw-r--r--tests/ui/impl-trait/nested-return-type2-tait3.rs4
-rw-r--r--tests/ui/impl-trait/nested-return-type2-tait3.stderr25
-rw-r--r--tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr6
-rw-r--r--tests/ui/impl-trait/recursive-coroutine.rs (renamed from tests/ui/impl-trait/recursive-generator.rs)10
-rw-r--r--tests/ui/impl-trait/recursive-coroutine.stderr (renamed from tests/ui/impl-trait/recursive-generator.stderr)6
-rw-r--r--tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs14
-rw-r--r--tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr16
-rw-r--r--tests/ui/impl-trait/universal-mismatched-type.stderr2
-rw-r--r--tests/ui/impl-unused-tps.rs5
-rw-r--r--tests/ui/impl-unused-tps.stderr37
-rw-r--r--tests/ui/implied-bounds/issue-100690.rs4
-rw-r--r--tests/ui/implied-bounds/issue-100690.stderr4
-rw-r--r--tests/ui/imports/issue-28134.stderr5
-rw-r--r--tests/ui/imports/issue-56125.stderr12
-rw-r--r--tests/ui/imports/pub-reexport-empty.rs25
-rw-r--r--tests/ui/imports/pub-reexport-empty.stderr20
-rw-r--r--tests/ui/imports/reexports.rs5
-rw-r--r--tests/ui/imports/reexports.stderr34
-rw-r--r--tests/ui/inference/issue-107090.rs6
-rw-r--r--tests/ui/inference/issue-107090.stderr17
-rw-r--r--tests/ui/inference/issue-86094-suggest-add-return-to-coerce-ret-ty.rs61
-rw-r--r--tests/ui/inference/issue-86094-suggest-add-return-to-coerce-ret-ty.stderr98
-rw-r--r--tests/ui/infinite/infinite-struct.stderr6
-rw-r--r--tests/ui/inline-const/expr-unsafe.thir.stderr3
-rw-r--r--tests/ui/inline-const/pat-unsafe-err.rs14
-rw-r--r--tests/ui/inline-const/pat-unsafe-err.thir.stderr19
-rw-r--r--tests/ui/inline-const/pat-unsafe.rs15
-rw-r--r--tests/ui/inline-const/pat-unsafe.thir.stderr20
-rw-r--r--tests/ui/instrument-coverage/bad-value.bad.stderr2
-rw-r--r--tests/ui/instrument-coverage/bad-value.blank.stderr2
-rw-r--r--tests/ui/instrument-coverage/bad-value.rs5
-rw-r--r--tests/ui/instrument-coverage/off-values.rs9
-rw-r--r--tests/ui/instrument-coverage/on-values.rs11
-rw-r--r--tests/ui/instrument-coverage/unstable.branch.stderr2
-rw-r--r--tests/ui/instrument-coverage/unstable.except-unused-functions.stderr2
-rw-r--r--tests/ui/instrument-coverage/unstable.except-unused-generics.stderr2
-rw-r--r--tests/ui/instrument-coverage/unstable.rs6
-rw-r--r--tests/ui/intrinsics/const-eval-select-bad.rs4
-rw-r--r--tests/ui/intrinsics/const-eval-select-bad.stderr8
-rw-r--r--tests/ui/intrinsics/intrinsic-raw_eq-const-bad.stderr2
-rw-r--r--tests/ui/invalid-compile-flags/invalid-llvm-passes.rs (renamed from tests/ui/invalid/invalid-llvm-passes.rs)0
-rw-r--r--tests/ui/invalid-compile-flags/invalid-llvm-passes.stderr (renamed from tests/ui/invalid/invalid-llvm-passes.stderr)0
-rw-r--r--tests/ui/invalid-module-declaration/invalid-module-declaration.stderr1
-rw-r--r--tests/ui/invalid/invalid-plugin-attr.rs7
-rw-r--r--tests/ui/invalid/invalid-plugin-attr.stderr22
-rw-r--r--tests/ui/issues/issue-12567.stderr12
-rw-r--r--tests/ui/issues/issue-19380.rs1
-rw-r--r--tests/ui/issues/issue-19380.stderr27
-rw-r--r--tests/ui/issues/issue-19482.rs2
-rw-r--r--tests/ui/issues/issue-19482.stderr2
-rw-r--r--tests/ui/issues/issue-20225.stderr6
-rw-r--r--tests/ui/issues/issue-21950.stderr2
-rw-r--r--tests/ui/issues/issue-22034.rs2
-rw-r--r--tests/ui/issues/issue-22034.stderr4
-rw-r--r--tests/ui/issues/issue-22434.rs2
-rw-r--r--tests/ui/issues/issue-22434.stderr2
-rw-r--r--tests/ui/issues/issue-23024.rs2
-rw-r--r--tests/ui/issues/issue-23024.stderr2
-rw-r--r--tests/ui/issues/issue-23966.stderr4
-rw-r--r--tests/ui/issues/issue-24446.rs2
-rw-r--r--tests/ui/issues/issue-24446.stderr37
-rw-r--r--tests/ui/issues/issue-28344.stderr4
-rw-r--r--tests/ui/issues/issue-37534.rs6
-rw-r--r--tests/ui/issues/issue-37534.stderr12
-rw-r--r--tests/ui/issues/issue-51154.stderr2
-rw-r--r--tests/ui/issues/issue-59494.rs2
-rw-r--r--tests/ui/issues/issue-59494.stderr4
-rw-r--r--tests/ui/issues/issue-69306.stderr12
-rw-r--r--tests/ui/issues/issue-77919.rs2
-rw-r--r--tests/ui/issues/issue-87199.rs6
-rw-r--r--tests/ui/issues/issue-87199.stderr18
-rw-r--r--tests/ui/iterators/invalid-iterator-chain-fixable.fixed42
-rw-r--r--tests/ui/iterators/invalid-iterator-chain-fixable.rs42
-rw-r--r--tests/ui/iterators/invalid-iterator-chain-fixable.stderr157
-rw-r--r--tests/ui/iterators/invalid-iterator-chain.stderr26
-rw-r--r--tests/ui/lang-items/start_lang_item_args.main_ret.stderr2
-rw-r--r--tests/ui/late-bound-lifetimes/predicate-is-global.rs40
-rw-r--r--tests/ui/layout/cannot-transmute-unnormalizable-type.rs3
-rw-r--r--tests/ui/layout/cannot-transmute-unnormalizable-type.stderr14
-rw-r--r--tests/ui/layout/issue-84108.rs2
-rw-r--r--tests/ui/layout/issue-84108.stderr24
-rw-r--r--tests/ui/layout/too-big-with-padding.rs18
-rw-r--r--tests/ui/layout/too-big-with-padding.stderr8
-rw-r--r--tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs22
-rw-r--r--tests/ui/lifetimes/borrowck-let-suggestion.stderr4
-rw-r--r--tests/ui/lifetimes/issue-26638.stderr4
-rw-r--r--tests/ui/lifetimes/issue-76168-hr-outlives-3.rs19
-rw-r--r--tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr51
-rw-r--r--tests/ui/lifetimes/issue-77175.rs2
-rw-r--r--tests/ui/lint/bare-trait-objects-path.stderr2
-rw-r--r--tests/ui/lint/lint-unnecessary-parens.fixed8
-rw-r--r--tests/ui/lint/lint-unnecessary-parens.rs8
-rw-r--r--tests/ui/lint/lint-unnecessary-parens.stderr74
-rw-r--r--tests/ui/lint/missing-copy-implementations-non-exhaustive.rs25
-rw-r--r--tests/ui/lint/must_not_suspend/tuple-mismatch.rs4
-rw-r--r--tests/ui/lint/unused/issue-117284-arg-in-macro.rs17
-rw-r--r--tests/ui/lint/unused/issue-117284-arg-in-macro.stderr29
-rw-r--r--tests/ui/lint/unused/issue-74883-unused-paren-baren-yield.rs6
-rw-r--r--tests/ui/lint/unused/lint-unused-imports.rs2
-rw-r--r--tests/ui/lint/unused/unused-closure.rs4
-rw-r--r--tests/ui/liveness/liveness-upvars.rs8
-rw-r--r--tests/ui/macros/stringify.rs1034
-rw-r--r--tests/ui/malformed/do-not-ice-on-note_and_explain.rs7
-rw-r--r--tests/ui/malformed/do-not-ice-on-note_and_explain.stderr79
-rw-r--r--tests/ui/malformed/malformed-plugin-1.rs5
-rw-r--r--tests/ui/malformed/malformed-plugin-1.stderr16
-rw-r--r--tests/ui/malformed/malformed-plugin-2.rs5
-rw-r--r--tests/ui/malformed/malformed-plugin-2.stderr16
-rw-r--r--tests/ui/malformed/malformed-plugin-3.rs5
-rw-r--r--tests/ui/malformed/malformed-plugin-3.stderr17
-rw-r--r--tests/ui/match/match_non_exhaustive.stderr4
-rw-r--r--tests/ui/methods/disambiguate-multiple-blanket-impl.rs38
-rw-r--r--tests/ui/methods/disambiguate-multiple-blanket-impl.stderr63
-rw-r--r--tests/ui/methods/disambiguate-multiple-impl.rs37
-rw-r--r--tests/ui/methods/disambiguate-multiple-impl.stderr63
-rw-r--r--tests/ui/methods/disambiguate-multiple-trait-2.rs54
-rw-r--r--tests/ui/methods/disambiguate-multiple-trait-2.stderr132
-rw-r--r--tests/ui/methods/disambiguate-multiple-trait.rs32
-rw-r--r--tests/ui/methods/disambiguate-multiple-trait.stderr63
-rw-r--r--tests/ui/methods/method-ambig-two-traits-from-impls2.stderr4
-rw-r--r--tests/ui/mir/alignment/addrof_alignment.rs (renamed from tests/ui/mir/addrof_alignment.rs)3
-rw-r--r--tests/ui/mir/alignment/i686-pc-windows-msvc.rs (renamed from tests/ui/mir/mir_alignment_check_i686-pc-windows-msvc.rs)4
-rw-r--r--tests/ui/mir/alignment/misaligned_lhs.rs (renamed from tests/ui/mir/mir_alignment_check.rs)4
-rw-r--r--tests/ui/mir/alignment/misaligned_rhs.rs13
-rw-r--r--tests/ui/mir/alignment/packed.rs29
-rw-r--r--tests/ui/mir/alignment/place_computation.rs16
-rw-r--r--tests/ui/mir/alignment/place_without_read.rs9
-rw-r--r--tests/ui/mir/alignment/two_pointers.rs15
-rw-r--r--tests/ui/mir/issue-71793-inline-args-storage.rs2
-rw-r--r--tests/ui/mir/mir_match_test.rs1
-rw-r--r--tests/ui/mir/remove-zsts-query-cycle.rs2
-rw-r--r--tests/ui/mismatched_types/async-unwrap-suggestion.rs22
-rw-r--r--tests/ui/mismatched_types/async-unwrap-suggestion.stderr25
-rw-r--r--tests/ui/mismatched_types/issue-35030.stderr2
-rw-r--r--tests/ui/mismatched_types/mismatch-ty-dont-suggest.rs23
-rw-r--r--tests/ui/mismatched_types/mismatch-ty-dont-suggest.stderr55
-rw-r--r--tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed31
-rw-r--r--tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs31
-rw-r--r--tests/ui/mismatched_types/mismatch-ty-unwrap-expect.stderr93
-rw-r--r--tests/ui/mismatched_types/recovered-block.rs6
-rw-r--r--tests/ui/mismatched_types/recovered-block.stderr8
-rw-r--r--tests/ui/mismatched_types/suggest-option-asderef-unfixable.rs4
-rw-r--r--tests/ui/mismatched_types/suggest-option-asderef-unfixable.stderr6
-rw-r--r--tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr1
-rw-r--r--tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.stderr1
-rw-r--r--tests/ui/modules/special_module_name.stderr2
-rw-r--r--tests/ui/nll/coroutine-distinct-lifetime.rs (renamed from tests/ui/nll/generator-distinct-lifetime.rs)4
-rw-r--r--tests/ui/nll/coroutine-upvar-mutability.rs (renamed from tests/ui/nll/generator-upvar-mutability.rs)4
-rw-r--r--tests/ui/nll/coroutine-upvar-mutability.stderr (renamed from tests/ui/nll/generator-upvar-mutability.stderr)2
-rw-r--r--tests/ui/nll/extra-unused-mut.rs4
-rw-r--r--tests/ui/nll/issue-48623-coroutine.rs (renamed from tests/ui/nll/issue-48623-generator.rs)6
-rw-r--r--tests/ui/nll/issue-48623-coroutine.stderr (renamed from tests/ui/nll/issue-48623-generator.stderr)6
-rw-r--r--tests/ui/nll/issue-55850.rs10
-rw-r--r--tests/ui/nll/issue-55850.stderr2
-rw-r--r--tests/ui/nll/move-errors.stderr2
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr36
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.polonius.stderr36
-rw-r--r--tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs33
-rw-r--r--tests/ui/noexporttypeexe.stderr4
-rw-r--r--tests/ui/object-safety/assoc_type_bounds.rs4
-rw-r--r--tests/ui/object-safety/assoc_type_bounds.stderr4
-rw-r--r--tests/ui/object-safety/assoc_type_bounds2.rs4
-rw-r--r--tests/ui/object-safety/assoc_type_bounds2.stderr4
-rw-r--r--tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed10
-rw-r--r--tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs10
-rw-r--r--tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr20
-rw-r--r--tests/ui/object-safety/assoc_type_bounds_sized_others.rs4
-rw-r--r--tests/ui/object-safety/assoc_type_bounds_sized_others.stderr4
-rw-r--r--tests/ui/object-safety/assoc_type_bounds_sized_used.stderr4
-rw-r--r--tests/ui/object-safety/issue-19538.stderr2
-rw-r--r--tests/ui/object-safety/object-safety-issue-22040.stderr1
-rw-r--r--tests/ui/object-safety/object-safety-no-static.curr.stderr1
-rw-r--r--tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr1
-rw-r--r--tests/ui/offset-of/offset-of-enum.rs9
-rw-r--r--tests/ui/offset-of/offset-of-enum.stderr40
-rw-r--r--tests/ui/offset-of/offset-of-private.rs13
-rw-r--r--tests/ui/offset-of/offset-of-private.stderr22
-rw-r--r--tests/ui/or-patterns/exhaustiveness-pass.rs6
-rw-r--r--tests/ui/packed/packed-struct-drop-aligned.rs8
-rw-r--r--tests/ui/parser/deep-unmatched-angle-brackets.rs17
-rw-r--r--tests/ui/parser/deep-unmatched-angle-brackets.stderr13
-rw-r--r--tests/ui/parser/diff-markers/unclosed-delims-in-macro.rs9
-rw-r--r--tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr18
-rw-r--r--tests/ui/parser/diff-markers/unclosed-delims.rs14
-rw-r--r--tests/ui/parser/diff-markers/unclosed-delims.stderr18
-rw-r--r--tests/ui/parser/doc-comment-in-stmt.fixed27
-rw-r--r--tests/ui/parser/doc-comment-in-stmt.rs11
-rw-r--r--tests/ui/parser/doc-comment-in-stmt.stderr45
-rw-r--r--tests/ui/parser/emoji-identifiers.stderr6
-rw-r--r--tests/ui/parser/issue-116781.rs8
-rw-r--r--tests/ui/parser/issue-116781.stderr16
-rw-r--r--tests/ui/parser/issues/issue-100197-mut-let.fixed (renamed from tests/ui/parser/issue-100197-mut-let.fixed)0
-rw-r--r--tests/ui/parser/issues/issue-100197-mut-let.rs (renamed from tests/ui/parser/issue-100197-mut-let.rs)0
-rw-r--r--tests/ui/parser/issues/issue-100197-mut-let.stderr (renamed from tests/ui/parser/issue-100197-mut-let.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-101477-enum.fixed (renamed from tests/ui/parser/issue-101477-enum.fixed)0
-rw-r--r--tests/ui/parser/issues/issue-101477-enum.rs (renamed from tests/ui/parser/issue-101477-enum.rs)0
-rw-r--r--tests/ui/parser/issues/issue-101477-enum.stderr (renamed from tests/ui/parser/issue-101477-enum.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-101477-let.fixed (renamed from tests/ui/parser/issue-101477-let.fixed)0
-rw-r--r--tests/ui/parser/issues/issue-101477-let.rs (renamed from tests/ui/parser/issue-101477-let.rs)0
-rw-r--r--tests/ui/parser/issues/issue-101477-let.stderr (renamed from tests/ui/parser/issue-101477-let.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-102806.rs (renamed from tests/ui/parser/issue-102806.rs)0
-rw-r--r--tests/ui/parser/issues/issue-102806.stderr (renamed from tests/ui/parser/issue-102806.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-103143.rs (renamed from tests/ui/parser/issue-103143.rs)0
-rw-r--r--tests/ui/parser/issues/issue-103143.stderr (renamed from tests/ui/parser/issue-103143.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-103381.fixed (renamed from tests/ui/parser/issue-103381.fixed)0
-rw-r--r--tests/ui/parser/issues/issue-103381.rs (renamed from tests/ui/parser/issue-103381.rs)0
-rw-r--r--tests/ui/parser/issues/issue-103381.stderr (renamed from tests/ui/parser/issue-103381.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-103425.rs (renamed from tests/ui/parser/issue-103425.rs)0
-rw-r--r--tests/ui/parser/issues/issue-103425.stderr (renamed from tests/ui/parser/issue-103425.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-103451.rs (renamed from tests/ui/parser/issue-103451.rs)0
-rw-r--r--tests/ui/parser/issues/issue-103451.stderr (renamed from tests/ui/parser/issue-103451.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-103748-ICE-wrong-braces.rs (renamed from tests/ui/parser/issue-103748-ICE-wrong-braces.rs)0
-rw-r--r--tests/ui/parser/issues/issue-103748-ICE-wrong-braces.stderr (renamed from tests/ui/parser/issue-103748-ICE-wrong-braces.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-104620.rs (renamed from tests/ui/parser/issue-104620.rs)0
-rw-r--r--tests/ui/parser/issues/issue-104620.stderr (renamed from tests/ui/parser/issue-104620.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-104867-inc-dec-2.rs (renamed from tests/ui/parser/issue-104867-inc-dec-2.rs)0
-rw-r--r--tests/ui/parser/issues/issue-104867-inc-dec-2.stderr (renamed from tests/ui/parser/issue-104867-inc-dec-2.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-104867-inc-dec.rs (renamed from tests/ui/parser/issue-104867-inc-dec.rs)0
-rw-r--r--tests/ui/parser/issues/issue-104867-inc-dec.stderr (renamed from tests/ui/parser/issue-104867-inc-dec.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-105366.fixed (renamed from tests/ui/parser/issue-105366.fixed)0
-rw-r--r--tests/ui/parser/issues/issue-105366.rs (renamed from tests/ui/parser/issue-105366.rs)0
-rw-r--r--tests/ui/parser/issues/issue-105366.stderr (renamed from tests/ui/parser/issue-105366.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-105634.rs (renamed from tests/ui/parser/issue-105634.rs)0
-rw-r--r--tests/ui/parser/issues/issue-107705.rs (renamed from tests/ui/parser/issue-107705.rs)0
-rw-r--r--tests/ui/parser/issues/issue-107705.stderr (renamed from tests/ui/parser/issue-107705.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-108109-fn-missing-params.fixed9
-rw-r--r--tests/ui/parser/issues/issue-108109-fn-missing-params.rs9
-rw-r--r--tests/ui/parser/issues/issue-108109-fn-missing-params.stderr14
-rw-r--r--tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed8
-rw-r--r--tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs8
-rw-r--r--tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr11
-rw-r--r--tests/ui/parser/issues/issue-108495-dec.rs (renamed from tests/ui/parser/issue-108495-dec.rs)0
-rw-r--r--tests/ui/parser/issues/issue-108495-dec.stderr (renamed from tests/ui/parser/issue-108495-dec.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-112188.fixed (renamed from tests/ui/parser/issue-112188.fixed)0
-rw-r--r--tests/ui/parser/issues/issue-112188.rs (renamed from tests/ui/parser/issue-112188.rs)0
-rw-r--r--tests/ui/parser/issues/issue-112188.stderr (renamed from tests/ui/parser/issue-112188.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-113342.rs (renamed from tests/ui/parser/issue-113342.rs)0
-rw-r--r--tests/ui/parser/issues/issue-113342.stderr (renamed from tests/ui/parser/issue-113342.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-17718-parse-const.rs (renamed from tests/ui/parser/issue-17718-parse-const.rs)0
-rw-r--r--tests/ui/parser/issues/issue-39616.rs (renamed from tests/ui/parser/issue-39616.rs)0
-rw-r--r--tests/ui/parser/issues/issue-39616.stderr (renamed from tests/ui/parser/issue-39616.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-49257.rs (renamed from tests/ui/parser/issue-49257.rs)0
-rw-r--r--tests/ui/parser/issues/issue-49257.stderr (renamed from tests/ui/parser/issue-49257.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-61858.rs (renamed from tests/ui/parser/issue-61858.rs)0
-rw-r--r--tests/ui/parser/issues/issue-61858.stderr (renamed from tests/ui/parser/issue-61858.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-68091-unicode-ident-after-if.rs (renamed from tests/ui/parser/issue-68091-unicode-ident-after-if.rs)0
-rw-r--r--tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr (renamed from tests/ui/parser/issue-68091-unicode-ident-after-if.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.rs (renamed from tests/ui/parser/issue-68092-unicode-ident-after-incomplete-expr.rs)0
-rw-r--r--tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr (renamed from tests/ui/parser/issue-68092-unicode-ident-after-incomplete-expr.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-68987-unmatch-issue-1.rs (renamed from tests/ui/parser/issue-68987-unmatch-issue-1.rs)0
-rw-r--r--tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr (renamed from tests/ui/parser/issue-68987-unmatch-issue-1.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-68987-unmatch-issue-2.rs (renamed from tests/ui/parser/issue-68987-unmatch-issue-2.rs)0
-rw-r--r--tests/ui/parser/issues/issue-68987-unmatch-issue-2.stderr (renamed from tests/ui/parser/issue-68987-unmatch-issue-2.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-68987-unmatch-issue-3.rs (renamed from tests/ui/parser/issue-68987-unmatch-issue-3.rs)0
-rw-r--r--tests/ui/parser/issues/issue-68987-unmatch-issue-3.stderr (renamed from tests/ui/parser/issue-68987-unmatch-issue-3.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-68987-unmatch-issue.rs (renamed from tests/ui/parser/issue-68987-unmatch-issue.rs)0
-rw-r--r--tests/ui/parser/issues/issue-68987-unmatch-issue.stderr (renamed from tests/ui/parser/issue-68987-unmatch-issue.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-81804.rs (renamed from tests/ui/parser/issue-81804.rs)0
-rw-r--r--tests/ui/parser/issues/issue-81804.stderr (renamed from tests/ui/parser/issue-81804.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-81827.rs (renamed from tests/ui/parser/issue-81827.rs)0
-rw-r--r--tests/ui/parser/issues/issue-81827.stderr (renamed from tests/ui/parser/issue-81827.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-87694-duplicated-pub.rs (renamed from tests/ui/parser/issue-87694-duplicated-pub.rs)0
-rw-r--r--tests/ui/parser/issues/issue-87694-duplicated-pub.stderr (renamed from tests/ui/parser/issue-87694-duplicated-pub.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-87694-misplaced-pub.rs (renamed from tests/ui/parser/issue-87694-misplaced-pub.rs)0
-rw-r--r--tests/ui/parser/issues/issue-87694-misplaced-pub.stderr (renamed from tests/ui/parser/issue-87694-misplaced-pub.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-90728.rs (renamed from tests/ui/parser/issue-90728.rs)0
-rw-r--r--tests/ui/parser/issues/issue-90728.stderr (renamed from tests/ui/parser/issue-90728.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-91421.rs (renamed from tests/ui/parser/issue-91421.rs)0
-rw-r--r--tests/ui/parser/issues/issue-91421.stderr (renamed from tests/ui/parser/issue-91421.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed (renamed from tests/ui/parser/issue-99625-enum-struct-mutually-exclusive.fixed)0
-rw-r--r--tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs (renamed from tests/ui/parser/issue-99625-enum-struct-mutually-exclusive.rs)0
-rw-r--r--tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr (renamed from tests/ui/parser/issue-99625-enum-struct-mutually-exclusive.stderr)0
-rw-r--r--tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed (renamed from tests/ui/parser/issue-99910-const-let-mutually-exclusive.fixed)0
-rw-r--r--tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs (renamed from tests/ui/parser/issue-99910-const-let-mutually-exclusive.rs)0
-rw-r--r--tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.stderr (renamed from tests/ui/parser/issue-99910-const-let-mutually-exclusive.stderr)0
-rw-r--r--tests/ui/parser/mod_file_not_exist.stderr1
-rw-r--r--tests/ui/parser/mod_file_not_exist_windows.stderr1
-rw-r--r--tests/ui/parser/recover-missing-semi-before-item.fixed2
-rw-r--r--tests/ui/parser/recover-missing-semi-before-item.rs2
-rw-r--r--tests/ui/parser/removed-syntax-fn-sigil.rs3
-rw-r--r--tests/ui/parser/removed-syntax-fn-sigil.stderr14
-rw-r--r--tests/ui/parser/ternary_operator.rs59
-rw-r--r--tests/ui/parser/ternary_operator.stderr91
-rw-r--r--tests/ui/parser/unsafe-mod.stderr1
-rw-r--r--tests/ui/parser/variadic-ffi-nested-syntactic-fail.rs6
-rw-r--r--tests/ui/parser/variadic-ffi-nested-syntactic-fail.stderr13
-rw-r--r--tests/ui/parser/variadic-ffi-semantic-restrictions.rs17
-rw-r--r--tests/ui/parser/variadic-ffi-semantic-restrictions.stderr103
-rw-r--r--tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed18
-rw-r--r--tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs18
-rw-r--r--tests/ui/pattern/incorrect-placement-of-pattern-modifiers.stderr58
-rw-r--r--tests/ui/pattern/issue-115599.rs7
-rw-r--r--tests/ui/pattern/issue-115599.stderr11
-rw-r--r--tests/ui/pattern/issue-94866.stderr4
-rw-r--r--tests/ui/pattern/non-structural-match-types.mir.stderr14
-rw-r--r--tests/ui/pattern/non-structural-match-types.rs3
-rw-r--r--tests/ui/pattern/non-structural-match-types.stderr14
-rw-r--r--tests/ui/pattern/non-structural-match-types.thir.stderr14
-rw-r--r--tests/ui/pattern/usefulness/conflicting_bindings.rs24
-rw-r--r--tests/ui/pattern/usefulness/conflicting_bindings.stderr66
-rw-r--r--tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr18
-rw-r--r--tests/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr94
-rw-r--r--tests/ui/pattern/usefulness/empty-match.normal.stderr94
-rw-r--r--tests/ui/pattern/usefulness/empty-match.rs18
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.rs20
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.stderr53
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.allow.stderr2
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr140
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs6
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.rs10
-rw-r--r--tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr18
-rw-r--r--tests/ui/pattern/usefulness/issue-35609.stderr3
-rw-r--r--tests/ui/pattern/usefulness/issue-39362.stderr6
-rw-r--r--tests/ui/pattern/usefulness/issue-40221.stderr6
-rw-r--r--tests/ui/pattern/usefulness/issue-56379.stderr10
-rw-r--r--tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.rs16
-rw-r--r--tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr68
-rw-r--r--tests/ui/pattern/usefulness/non-exhaustive-defined-here.rs18
-rw-r--r--tests/ui/pattern/usefulness/non-exhaustive-defined-here.stderr54
-rw-r--r--tests/ui/pattern/usefulness/non-exhaustive-match-nested.stderr4
-rw-r--r--tests/ui/pattern/usefulness/non-exhaustive-match.stderr8
-rw-r--r--tests/ui/pattern/usefulness/non-exhaustive-pattern-witness.rs53
-rw-r--r--tests/ui/pattern/usefulness/non-exhaustive-pattern-witness.stderr75
-rw-r--r--tests/ui/pattern/usefulness/refutable-pattern-errors.rs4
-rw-r--r--tests/ui/pattern/usefulness/refutable-pattern-errors.stderr4
-rw-r--r--tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.rs2
-rw-r--r--tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.stderr2
-rw-r--r--tests/ui/pattern/usefulness/stable-gated-patterns.stderr6
-rw-r--r--tests/ui/pattern/usefulness/struct-like-enum-nonexhaustive.stderr6
-rw-r--r--tests/ui/pattern/usefulness/tuple-struct-nonexhaustive.stderr10
-rw-r--r--tests/ui/pattern/usefulness/unstable-gated-patterns.stderr6
-rw-r--r--tests/ui/polymorphization/coroutine.rs (renamed from tests/ui/polymorphization/generators.rs)24
-rw-r--r--tests/ui/polymorphization/coroutine.stderr (renamed from tests/ui/polymorphization/generators.stderr)12
-rw-r--r--tests/ui/print_type_sizes/coroutine.rs (renamed from tests/ui/print_type_sizes/generator.rs)8
-rw-r--r--tests/ui/print_type_sizes/coroutine.stdout (renamed from tests/ui/print_type_sizes/generator.stdout)2
-rw-r--r--tests/ui/print_type_sizes/coroutine_discr_placement.rs (renamed from tests/ui/print_type_sizes/generator_discr_placement.rs)4
-rw-r--r--tests/ui/print_type_sizes/coroutine_discr_placement.stdout (renamed from tests/ui/print_type_sizes/generator_discr_placement.stdout)2
-rw-r--r--tests/ui/privacy/associated-item-privacy-trait.rs2
-rw-r--r--tests/ui/privacy/associated-item-privacy-trait.stderr4
-rw-r--r--tests/ui/privacy/issue-46209-private-enum-variant-reexport.rs4
-rw-r--r--tests/ui/privacy/issue-46209-private-enum-variant-reexport.stderr38
-rw-r--r--tests/ui/privacy/private-in-public.rs8
-rw-r--r--tests/ui/privacy/private-in-public.stderr20
-rw-r--r--tests/ui/privacy/private-variant-reexport.rs4
-rw-r--r--tests/ui/privacy/private-variant-reexport.stderr8
-rw-r--r--tests/ui/privacy/sealed-traits/sealed-trait-local.rs40
-rw-r--r--tests/ui/privacy/sealed-traits/sealed-trait-local.stderr44
-rw-r--r--tests/ui/privacy/suggest-box-new.fixed15
-rw-r--r--tests/ui/privacy/suggest-box-new.rs15
-rw-r--r--tests/ui/privacy/suggest-box-new.stderr20
-rw-r--r--tests/ui/proc-macro/bad-projection.rs2
-rw-r--r--tests/ui/proc-macro/bad-projection.stderr30
-rw-r--r--tests/ui/reachable/reachable-unnameable-type-alias.rs4
-rw-r--r--tests/ui/regions/closure-in-projection-issue-97405.rs2
-rw-r--r--tests/ui/repr/16-bit-repr-c-enum.rs6
-rw-r--r--tests/ui/repr/explicit-rust-repr-conflicts.rs23
-rw-r--r--tests/ui/repr/explicit-rust-repr-conflicts.stderr39
-rw-r--r--tests/ui/resolve/fn-new-doesnt-exist.rs5
-rw-r--r--tests/ui/resolve/fn-new-doesnt-exist.stderr14
-rw-r--r--tests/ui/resolve/issue-55673.fixed21
-rw-r--r--tests/ui/resolve/issue-55673.rs9
-rw-r--r--tests/ui/resolve/issue-55673.stderr24
-rw-r--r--tests/ui/resolve/issue-82865.stderr7
-rw-r--r--tests/ui/return/return-impl-trait-bad.stderr8
-rw-r--r--tests/ui/return/return-impl-trait.stderr4
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate_empty_match.stderr20
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.lint.stderr75
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr31
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs53
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs85
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.stderr125
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs8
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr12
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.stderr8
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr8
-rw-r--r--tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr8
-rw-r--r--tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs40
-rw-r--r--tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr14
-rw-r--r--tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr5
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs12
-rw-r--r--tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr21
-rw-r--r--tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_forbidden.stderr1
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr14
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs2
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs12
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs15
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.stderr11
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs18
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs504
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.stderr32
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs18
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr59
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.rs27
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr69
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs11
-rw-r--r--tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr34
-rw-r--r--tests/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr7
-rw-r--r--tests/ui/sanitize/issue-111184-coroutine-witness.rs (renamed from tests/ui/sanitize/issue-111184-generator-witness.rs)2
-rw-r--r--tests/ui/self/arbitrary-self-from-method-substs.default.stderr13
-rw-r--r--tests/ui/self/arbitrary-self-from-method-substs.feature.stderr (renamed from tests/ui/self/arbitrary-self-from-method-substs.stderr)2
-rw-r--r--tests/ui/self/arbitrary-self-from-method-substs.rs8
-rw-r--r--tests/ui/self/arbitrary-self-types-not-object-safe.curr.stderr2
-rw-r--r--tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr1
-rw-r--r--tests/ui/self/self-impl.stderr4
-rw-r--r--tests/ui/self/self_type_keyword.rs2
-rw-r--r--tests/ui/self/self_type_keyword.stderr27
-rw-r--r--tests/ui/simd/array-trait.rs1
-rw-r--r--tests/ui/simd/array-trait.stderr9
-rw-r--r--tests/ui/sized/unsized-binding.rs5
-rw-r--r--tests/ui/sized/unsized-binding.stderr13
-rw-r--r--tests/ui/span/issue-43927-non-ADT-derive.stderr8
-rw-r--r--tests/ui/span/lint-unused-unsafe-thir.rs61
-rw-r--r--tests/ui/span/lint-unused-unsafe-thir.stderr50
-rw-r--r--tests/ui/span/lint-unused-unsafe.mir.stderr376
-rw-r--r--tests/ui/span/lint-unused-unsafe.rs8
-rw-r--r--tests/ui/span/lint-unused-unsafe.thir.stderr1402
-rw-r--r--tests/ui/specialization/min_specialization/issue-79224.rs1
-rw-r--r--tests/ui/specialization/min_specialization/issue-79224.stderr14
-rw-r--r--tests/ui/stability-attribute/stability-attribute-issue-43027.rs8
-rw-r--r--tests/ui/stability-attribute/stability-attribute-sanity-4.rs5
-rw-r--r--tests/ui/stability-attribute/stability-attribute-sanity-4.stderr13
-rw-r--r--tests/ui/stability-attribute/stability-attribute-sanity.rs33
-rw-r--r--tests/ui/stability-attribute/stability-attribute-sanity.stderr66
-rw-r--r--tests/ui/stability-attribute/stability-attribute-trait-impl.rs4
-rw-r--r--tests/ui/stability-attribute/stability-attribute-trait-impl.stderr2
-rw-r--r--tests/ui/structs/struct-path-associated-type.stderr6
-rw-r--r--tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.stderr2
-rw-r--r--tests/ui/suggestions/deref-path-method.stderr7
-rw-r--r--tests/ui/suggestions/dont-suggest-ref/simple.stderr8
-rw-r--r--tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr4
-rw-r--r--tests/ui/suggestions/issue-104961.fixed4
-rw-r--r--tests/ui/suggestions/issue-104961.rs4
-rw-r--r--tests/ui/suggestions/issue-104961.stderr4
-rw-r--r--tests/ui/suggestions/issue-109291.stderr7
-rw-r--r--tests/ui/suggestions/issue-62843.stderr2
-rw-r--r--tests/ui/suggestions/issue-81839.stderr15
-rw-r--r--tests/ui/suggestions/issue-84973-blacklist.rs2
-rw-r--r--tests/ui/suggestions/issue-84973-blacklist.stderr4
-rw-r--r--tests/ui/suggestions/path-display.stderr2
-rw-r--r--tests/ui/suggestions/restrict-existing-type-bounds.stderr4
-rw-r--r--tests/ui/suggestions/silenced-binding-typo.fixed5
-rw-r--r--tests/ui/suggestions/silenced-binding-typo.rs5
-rw-r--r--tests/ui/suggestions/silenced-binding-typo.stderr14
-rw-r--r--tests/ui/suggestions/suggest-trait-in-ufcs-in-hrtb.stderr2
-rw-r--r--tests/ui/suggestions/trait-hidden-method.stderr2
-rw-r--r--tests/ui/suggestions/trait-with-missing-associated-type-restriction.stderr2
-rw-r--r--tests/ui/suggestions/unnamable-types.rs2
-rw-r--r--tests/ui/suggestions/unnamable-types.stderr2
-rw-r--r--tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr2
-rw-r--r--tests/ui/symbol-mangling-version/bad-value.bad.stderr2
-rw-r--r--tests/ui/symbol-mangling-version/bad-value.blank.stderr2
-rw-r--r--tests/ui/symbol-mangling-version/bad-value.no-value.stderr2
-rw-r--r--tests/ui/symbol-mangling-version/bad-value.rs6
-rw-r--r--tests/ui/symbol-mangling-version/stable.rs5
-rw-r--r--tests/ui/symbol-mangling-version/unstable.legacy.stderr2
-rw-r--r--tests/ui/symbol-mangling-version/unstable.rs6
-rw-r--r--tests/ui/target-feature/gate.rs1
-rw-r--r--tests/ui/target-feature/gate.stderr2
-rw-r--r--tests/ui/thread-local/thread-local-static.mir.stderr (renamed from tests/ui/thread-local/thread-local-static.stderr)10
-rw-r--r--tests/ui/thread-local/thread-local-static.rs3
-rw-r--r--tests/ui/thread-local/thread-local-static.thir.stderr44
-rw-r--r--tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs2
-rw-r--r--tests/ui/trait-bounds/mismatch-fn-trait.stderr20
-rw-r--r--tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed11
-rw-r--r--tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs11
-rw-r--r--tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.stderr20
-rw-r--r--tests/ui/traits/alias/object-fail.stderr2
-rw-r--r--tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.rs43
-rw-r--r--tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr109
-rw-r--r--tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.rs2
-rw-r--r--tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr4
-rw-r--r--tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs4
-rw-r--r--tests/ui/traits/bound/assoc-fn-bound-root-obligation.stderr4
-rw-r--r--tests/ui/traits/bound/on-structs-and-enums-static.rs2
-rw-r--r--tests/ui/traits/bound/on-structs-and-enums-static.stderr19
-rw-r--r--tests/ui/traits/issue-38604.stderr2
-rw-r--r--tests/ui/traits/issue-52893.stderr2
-rw-r--r--tests/ui/traits/issue-59029-1.stderr4
-rw-r--r--tests/ui/traits/item-privacy.stderr26
-rw-r--r--tests/ui/traits/new-solver/coroutine.fail.stderr64
-rw-r--r--tests/ui/traits/new-solver/coroutine.rs32
-rw-r--r--tests/ui/traits/new-solver/fn-trait.rs8
-rw-r--r--tests/ui/traits/new-solver/fn-trait.stderr14
-rw-r--r--tests/ui/traits/new-solver/generator.fail.stderr64
-rw-r--r--tests/ui/traits/new-solver/generator.rs32
-rw-r--r--tests/ui/traits/new-solver/object-unsafety.stderr2
-rw-r--r--tests/ui/traits/new-solver/specialization-unconstrained.rs2
-rw-r--r--tests/ui/traits/new-solver/specialization-unconstrained.stderr11
-rw-r--r--tests/ui/traits/non-lifetime-via-dyn-builtin.current.stderr11
-rw-r--r--tests/ui/traits/non-lifetime-via-dyn-builtin.next.stderr11
-rw-r--r--tests/ui/traits/non-lifetime-via-dyn-builtin.rs16
-rw-r--r--tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs19
-rw-r--r--tests/ui/traits/non_lifetime_binders/supertrait-object-safety.stderr3
-rw-r--r--tests/ui/traits/object/object-unsafe-missing-assoc-type.rs7
-rw-r--r--tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr18
-rw-r--r--tests/ui/traits/object/print_vtable_sizes.stdout22
-rw-r--r--tests/ui/traits/object/safety.stderr2
-rw-r--r--tests/ui/traits/object/with-self-in-projection-output-bad.rs4
-rw-r--r--tests/ui/traits/object/with-self-in-projection-output-bad.stderr4
-rw-r--r--tests/ui/traits/suggest-dereferences/root-obligation.fixed2
-rw-r--r--tests/ui/traits/suggest-dereferences/root-obligation.rs2
-rw-r--r--tests/ui/traits/suggest-dereferences/root-obligation.stderr4
-rw-r--r--tests/ui/traits/test-2.stderr9
-rw-r--r--tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr12
-rw-r--r--tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs3
-rw-r--r--tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr48
-rw-r--r--tests/ui/type-alias-impl-trait/closure_parent_substs.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs13
-rw-r--r--tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs15
-rw-r--r--tests/ui/type-alias-impl-trait/generic_underconstrained.rs1
-rw-r--r--tests/ui/type-alias-impl-trait/generic_underconstrained.stderr23
-rw-r--r--tests/ui/type-alias-impl-trait/generic_underconstrained2.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr48
-rw-r--r--tests/ui/type-alias-impl-trait/impl_trait_for_same_tait.stderr2
-rw-r--r--tests/ui/type-alias-impl-trait/inference-cycle.rs7
-rw-r--r--tests/ui/type-alias-impl-trait/inference-cycle.stderr50
-rw-r--r--tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.rs8
-rw-r--r--tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr9
-rw-r--r--tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs22
-rw-r--r--tests/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs22
-rw-r--r--tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs39
-rw-r--r--tests/ui/type-alias-impl-trait/issue-58662-generator-with-lifetime.rs39
-rw-r--r--tests/ui/type-alias-impl-trait/issue-58662-simplified.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/issue-63279.rs4
-rw-r--r--tests/ui/type-alias-impl-trait/issue-63279.stderr8
-rw-r--r--tests/ui/type-alias-impl-trait/issue-94429.rs12
-rw-r--r--tests/ui/type-alias-impl-trait/issue-94429.stderr6
-rw-r--r--tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs27
-rw-r--r--tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs44
-rw-r--r--tests/ui/type-alias-impl-trait/not_well_formed.fixed19
-rw-r--r--tests/ui/type-alias-impl-trait/not_well_formed.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/not_well_formed.stderr9
-rw-r--r--tests/ui/type-alias-impl-trait/recursive-fn-tait.rs17
-rw-r--r--tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr14
-rw-r--r--tests/ui/type-alias-impl-trait/reveal_local.rs3
-rw-r--r--tests/ui/type-alias-impl-trait/reveal_local.stderr73
-rw-r--r--tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr13
-rw-r--r--tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs18
-rw-r--r--tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.rs14
-rw-r--r--tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.stderr17
-rw-r--r--tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.rs6
-rw-r--r--tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.stderr15
-rw-r--r--tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr1
-rw-r--r--tests/ui/typeck/bad-index-due-to-nested.stderr4
-rw-r--r--tests/ui/typeck/issue-107087.stderr2
-rw-r--r--tests/ui/typeck/issue-110052.stderr2
-rw-r--r--tests/ui/typeck/issue-114529-illegal-break-with-value.rs20
-rw-r--r--tests/ui/typeck/issue-114529-illegal-break-with-value.stderr29
-rw-r--r--tests/ui/typeck/issue-114918/const-in-impl-fn-return-type.rs2
-rw-r--r--tests/ui/typeck/issue-114918/const-in-impl-fn-return-type.stderr8
-rw-r--r--tests/ui/typeck/issue-116473-ice-wrong-span-variant-args.stderr30
-rw-r--r--tests/ui/typeck/issue-13853.stderr2
-rw-r--r--tests/ui/typeck/issue-36708.stderr7
-rw-r--r--tests/ui/typeck/issue-91334.rs2
-rw-r--r--tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr4
-rw-r--r--tests/ui/ufcs/ufcs-explicit-self-bad.rs1
-rw-r--r--tests/ui/ufcs/ufcs-explicit-self-bad.stderr31
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.rs2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr2
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr4
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr6
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr12
-rw-r--r--tests/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr6
-rw-r--r--tests/ui/uninhabited/diverging-guard.rs10
-rw-r--r--tests/ui/union/issue-81199.rs1
-rw-r--r--tests/ui/union/issue-81199.stderr19
-rw-r--r--tests/ui/union/union-unsafe.mir.stderr28
-rw-r--r--tests/ui/union/union-unsafe.rs14
-rw-r--r--tests/ui/union/union-unsafe.thir.stderr30
-rw-r--r--tests/ui/union/union-unsized.mirunsafeck.stderr31
-rw-r--r--tests/ui/union/union-unsized.rs2
-rw-r--r--tests/ui/union/union-unsized.thirunsafeck.stderr31
-rw-r--r--tests/ui/unresolved/auxiliary/library.rs1
-rw-r--r--tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs31
-rw-r--r--tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.stderr25
-rw-r--r--tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed19
-rw-r--r--tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs19
-rw-r--r--tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.stderr14
-rw-r--r--tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.mir.stderr (renamed from tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr)4
-rw-r--r--tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs10
-rw-r--r--tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.thir.stderr16
-rw-r--r--tests/ui/unsafe/initializing-ranged-via-ctor.stderr2
-rw-r--r--tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.thir.stderr6
-rw-r--r--tests/ui/unsafe/ranged_ints2.mirunsafeck.stderr10
-rw-r--r--tests/ui/unsafe/ranged_ints2.rs1
-rw-r--r--tests/ui/unsafe/ranged_ints2.thirunsafeck.stderr10
-rw-r--r--tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.thir.stderr16
-rw-r--r--tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.fixed (renamed from tests/ui/unsafe/wrapping-unsafe-block-sugg.fixed)19
-rw-r--r--tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.stderr (renamed from tests/ui/unsafe/wrapping-unsafe-block-sugg.stderr)26
-rw-r--r--tests/ui/unsafe/wrapping-unsafe-block-sugg.rs19
-rw-r--r--tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.fixed73
-rw-r--r--tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.stderr99
-rw-r--r--tests/ui/unsized/maybe-bounds-where.rs4
-rw-r--r--tests/ui/unsized/maybe-bounds-where.stderr16
-rw-r--r--tests/ui/unsized/unsize-coerce-multiple-adt-params.rs29
-rw-r--r--tests/ui/unsized/unsized-trait-impl-self-type.rs1
-rw-r--r--tests/ui/unsized/unsized-trait-impl-self-type.stderr14
-rw-r--r--tests/ui/unsized/unsized-trait-impl-trait-arg.rs1
-rw-r--r--tests/ui/unsized/unsized-trait-impl-trait-arg.stderr14
-rw-r--r--tests/ui/unsized/unsized7.rs1
-rw-r--r--tests/ui/unsized/unsized7.stderr14
-rw-r--r--tests/ui/weird-exprs.rs2
-rw-r--r--tests/ui/wf/hir-wf-check-erase-regions.rs1
-rw-r--r--tests/ui/wf/hir-wf-check-erase-regions.stderr16
-rw-r--r--tests/ui/wf/issue-110157.rs1
-rw-r--r--tests/ui/wf/issue-110157.stderr25
-rw-r--r--tests/ui/wf/wf-const-type.rs1
-rw-r--r--tests/ui/wf/wf-const-type.stderr20
-rw-r--r--tests/ui/wf/wf-convert-unsafe-trait-obj-box.stderr3
-rw-r--r--tests/ui/wf/wf-convert-unsafe-trait-obj.stderr3
-rw-r--r--tests/ui/wf/wf-static-type.rs1
-rw-r--r--tests/ui/wf/wf-static-type.stderr20
-rw-r--r--tests/ui/wf/wf-unsafe-trait-obj-match.stderr10
2115 files changed, 27445 insertions, 11499 deletions
diff --git a/tests/assembly/asm/arm-types.rs b/tests/assembly/asm/arm-types.rs
index b22a26ce36f..9520f932779 100644
--- a/tests/assembly/asm/arm-types.rs
+++ b/tests/assembly/asm/arm-types.rs
@@ -1,6 +1,7 @@
 // assembly-output: emit-asm
 // compile-flags: --target armv7-unknown-linux-gnueabihf
 // compile-flags: -C target-feature=+neon
+// compile-flags: -C opt-level=0
 // needs-llvm-components: arm
 
 #![feature(no_core, lang_items, rustc_attrs, repr_simd)]
diff --git a/tests/assembly/closure-inherit-target-feature.rs b/tests/assembly/closure-inherit-target-feature.rs
index 65728a15516..7acda76e25f 100644
--- a/tests/assembly/closure-inherit-target-feature.rs
+++ b/tests/assembly/closure-inherit-target-feature.rs
@@ -1,4 +1,5 @@
 // only-x86_64
+// ignore-sgx Tests incompatible with LVI mitigations
 // assembly-output: emit-asm
 // make sure the feature is not enabled at compile-time
 // compile-flags: -C opt-level=3 -C target-feature=-sse4.1 -C llvm-args=-x86-asm-syntax=intel
@@ -22,6 +23,7 @@ pub unsafe fn sse41_blend_nofeature(x: __m128, y: __m128) -> __m128 {
     f(x, y)
 }
 
+#[no_mangle]
 #[target_feature(enable = "sse4.1")]
 pub fn sse41_blend_noinline(x: __m128, y: __m128) -> __m128 {
     let f = {
diff --git a/tests/assembly/dwarf5.rs b/tests/assembly/dwarf5.rs
index f41e6bd55be..253baafb887 100644
--- a/tests/assembly/dwarf5.rs
+++ b/tests/assembly/dwarf5.rs
@@ -1,6 +1,6 @@
 // Makes sure that `-Z dwarf-version=5` causes `rustc` to emit DWARF version 5.
 // assembly-output: emit-asm
-// compile-flags: -g --target x86_64-unknown-linux-gnu -Z dwarf-version=5
+// compile-flags: -g --target x86_64-unknown-linux-gnu -Z dwarf-version=5 -Copt-level=0
 // needs-llvm-components: x86
 
 #![feature(no_core, lang_items)]
diff --git a/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-32bit.rs b/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-32bit.rs
new file mode 100644
index 00000000000..fca2c85d5a6
--- /dev/null
+++ b/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-32bit.rs
@@ -0,0 +1,406 @@
+// revisions: all strong basic none missing
+// assembly-output: emit-asm
+// only-windows
+// only-msvc
+// ignore-64bit 64-bit table based SEH has slightly different behaviors than classic SEH
+// [all] compile-flags: -Z stack-protector=all
+// [strong] compile-flags: -Z stack-protector=strong
+// [basic] compile-flags: -Z stack-protector=basic
+// [none] compile-flags: -Z stack-protector=none
+// compile-flags: -C opt-level=2 -Z merge-functions=disabled
+
+#![crate_type = "lib"]
+
+#![allow(incomplete_features)]
+
+#![feature(unsized_locals, unsized_fn_params)]
+
+
+// CHECK-LABEL: emptyfn:
+#[no_mangle]
+pub fn emptyfn() {
+    // all: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: array_char
+#[no_mangle]
+pub fn array_char(f: fn(*const char)) {
+    let a = ['c'; 1];
+    let b = ['d'; 3];
+    let c = ['e'; 15];
+
+    f(&a as *const _);
+    f(&b as *const _);
+    f(&c as *const _);
+
+    // Any type of local array variable leads to stack protection with the
+    // "strong" heuristic. The 'basic' heuristic only adds stack protection to
+    // functions with local array variables of a byte-sized type, however. Since
+    // 'char' is 4 bytes in Rust, this function is not protected by the 'basic'
+    // heuristic
+    //
+    // (This test *also* takes the address of the local stack variables. We
+    // cannot know that this isn't what triggers the `strong` heuristic.
+    // However, the test strategy of passing the address of a stack array to an
+    // external function is sufficient to trigger the `basic` heuristic (see
+    // test `array_u8_large()`). Since the `basic` heuristic only checks for the
+    // presence of stack-local array variables, we can be confident that this
+    // test also captures this part of the `strong` heuristic specification.)
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: array_u8_1
+#[no_mangle]
+pub fn array_u8_1(f: fn(*const u8)) {
+    let a = [0u8; 1];
+    f(&a as *const _);
+
+    // The 'strong' heuristic adds stack protection to functions with local
+    // array variables regardless of their size.
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: array_u8_small:
+#[no_mangle]
+pub fn array_u8_small(f: fn(*const u8)) {
+    let a = [0u8; 2];
+    let b = [0u8; 7];
+    f(&a as *const _);
+    f(&b as *const _);
+
+    // Small arrays do not lead to stack protection by the 'basic' heuristic.
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: array_u8_large:
+#[no_mangle]
+pub fn array_u8_large(f: fn(*const u8)) {
+    let a = [0u8; 9];
+    f(&a as *const _);
+
+    // Since `a` is a byte array with size greater than 8, the basic heuristic
+    // will also protect this function.
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+#[derive(Copy, Clone)]
+pub struct ByteSizedNewtype(u8);
+
+// CHECK-LABEL: array_bytesizednewtype_9:
+#[no_mangle]
+pub fn array_bytesizednewtype_9(f: fn(*const ByteSizedNewtype)) {
+    let a = [ByteSizedNewtype(0); 9];
+    f(&a as *const _);
+
+    // Since `a` is a byte array in the LLVM output, the basic heuristic will
+    // also protect this function.
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: local_var_addr_used_indirectly
+#[no_mangle]
+pub fn local_var_addr_used_indirectly(f: fn(bool)) {
+    let a = 5;
+    let a_addr = &a as *const _ as usize;
+    f(a_addr & 0x10 == 0);
+
+    // This function takes the address of a local variable taken. Although this
+    // address is never used as a way to refer to stack memory, the `strong`
+    // heuristic adds stack smash protection. This is also the case in C++:
+    // ```
+    // cat << EOF | clang++ -O2 -fstack-protector-strong -S -x c++ - -o - | grep stack_chk
+    // #include <cstdint>
+    // void f(void (*g)(bool)) {
+    //     int32_t x;
+    //     g((reinterpret_cast<uintptr_t>(&x) & 0x10U) == 0);
+    // }
+    // EOF
+    // ```
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+
+// CHECK-LABEL: local_string_addr_taken
+#[no_mangle]
+pub fn local_string_addr_taken(f: fn(&String)) {
+    let x = String::new();
+    f(&x);
+
+    // Taking the address of the local variable `x` leads to stack smash
+    // protection with the `strong` heuristic, but not with the `basic`
+    // heuristic. It does not matter that the reference is not mut.
+    //
+    // An interesting note is that a similar function in C++ *would* be
+    // protected by the `basic` heuristic, because `std::string` has a char
+    // array internally as a small object optimization:
+    // ```
+    // cat <<EOF | clang++ -O2 -fstack-protector -S -x c++ - -o - | grep stack_chk
+    // #include <string>
+    // void f(void (*g)(const std::string&)) {
+    //     std::string x;
+    //     g(x);
+    // }
+    // EOF
+    // ```
+    //
+
+    // all: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+pub trait SelfByRef {
+    fn f(&self) -> i32;
+}
+
+impl SelfByRef for i32 {
+    fn f(&self) -> i32 {
+        return self + 1;
+    }
+}
+
+// CHECK-LABEL: local_var_addr_taken_used_locally_only
+#[no_mangle]
+pub fn local_var_addr_taken_used_locally_only(factory: fn() -> i32, sink: fn(i32)) {
+    let x = factory();
+    let g = x.f();
+    sink(g);
+
+    // Even though the local variable conceptually has its address taken, as
+    // it's passed by reference to the trait function, the use of the reference
+    // is easily inlined. There is therefore no stack smash protection even with
+    // the `strong` heuristic.
+
+    // all: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+pub struct Gigastruct {
+    does: u64,
+    not: u64,
+    have: u64,
+    array: u64,
+    members: u64
+}
+
+// CHECK-LABEL: local_large_var_moved
+#[no_mangle]
+pub fn local_large_var_moved(f: fn(Gigastruct)) {
+    let x = Gigastruct { does: 0, not: 1, have: 2, array: 3, members: 4 };
+    f(x);
+
+    // Even though the local variable conceptually doesn't have its address
+    // taken, it's so large that the "move" is implemented with a reference to a
+    // stack-local variable in the ABI. Consequently, this function *is*
+    // protected by the `strong` heuristic. This is also the case for
+    // rvalue-references in C++, regardless of struct size:
+    // ```
+    // cat <<EOF | clang++ -O2 -fstack-protector-strong -S -x c++ - -o - | grep stack_chk
+    // #include <cstdint>
+    // #include <utility>
+    // void f(void (*g)(uint64_t&&)) {
+    //     uint64_t x;
+    //     g(std::move(x));
+    // }
+    // EOF
+    // ```
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: local_large_var_cloned
+#[no_mangle]
+pub fn local_large_var_cloned(f: fn(Gigastruct)) {
+    f(Gigastruct { does: 0, not: 1, have: 2, array: 3, members: 4 });
+
+    // A new instance of `Gigastruct` is passed to `f()`, without any apparent
+    // connection to this stack frame. Still, since instances of `Gigastruct`
+    // are sufficiently large, it is allocated in the caller stack frame and
+    // passed as a pointer. As such, this function is *also* protected by the
+    // `strong` heuristic, just like `local_large_var_moved`. This is also the
+    // case for pass-by-value of sufficiently large structs in C++:
+    // ```
+    // cat <<EOF | clang++ -O2 -fstack-protector-strong -S -x c++ - -o - | grep stack_chk
+    // #include <cstdint>
+    // #include <utility>
+    // struct Gigastruct { uint64_t a, b, c, d, e; };
+    // void f(void (*g)(Gigastruct)) {
+    //     g(Gigastruct{});
+    // }
+    // EOF
+    // ```
+
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+
+extern "C" {
+    // A call to an external `alloca` function is *not* recognized as an
+    // `alloca(3)` operation. This function is a compiler built-in, as the
+    // man page explains. Clang translates it to an LLVM `alloca`
+    // instruction with a count argument, which is also what the LLVM stack
+    // protector heuristics looks for. The man page for `alloca(3)` details
+    // a way to avoid using the compiler built-in: pass a -std=c11
+    // argument, *and* don't include <alloca.h>. Though this leads to an
+    // external alloca() function being called, it doesn't lead to stack
+    // protection being included. It even fails with a linker error
+    // "undefined reference to `alloca'". Example:
+    // ```
+    // cat<<EOF | clang -fstack-protector-strong -x c -std=c11 - -o /dev/null
+    // #include <stdlib.h>
+    // void * alloca(size_t);
+    // void f(void (*g)(void*)) {
+    //     void * p = alloca(10);
+    //     g(p);
+    // }
+    // int main() { return 0; }
+    // EOF
+    // ```
+    // The following tests demonstrate that calls to an external `alloca`
+    // function in Rust also doesn't trigger stack protection.
+
+    fn alloca(size: usize) -> *mut ();
+}
+
+// CHECK-LABEL: alloca_small_compile_time_constant_arg
+#[no_mangle]
+pub fn alloca_small_compile_time_constant_arg(f: fn(*mut ())) {
+    f(unsafe { alloca(8) });
+
+    // all: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: alloca_large_compile_time_constant_arg
+#[no_mangle]
+pub fn alloca_large_compile_time_constant_arg(f: fn(*mut ())) {
+    f(unsafe { alloca(9) });
+
+    // all: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+
+// CHECK-LABEL: alloca_dynamic_arg
+#[no_mangle]
+pub fn alloca_dynamic_arg(f: fn(*mut ()), n: usize) {
+    f(unsafe { alloca(n) });
+
+    // all: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// The question then is: in what ways can Rust code generate array-`alloca`
+// LLVM instructions? This appears to only be generated by
+// rustc_codegen_ssa::traits::Builder::array_alloca() through
+// rustc_codegen_ssa::mir::operand::OperandValue::store_unsized(). FWICT
+// this is support for the "unsized locals" unstable feature:
+// https://doc.rust-lang.org/unstable-book/language-features/unsized-locals.html.
+
+
+// CHECK-LABEL: unsized_fn_param
+#[no_mangle]
+pub fn unsized_fn_param(s: [u8], l: bool, f: fn([u8])) {
+    let n = if l { 1 } else { 2 };
+    f(*Box::<[u8]>::from(&s[0..n])); // slice-copy with Box::from
+
+    // Even though slices are conceptually passed by-value both into this
+    // function and into `f()`, this is implemented with pass-by-reference
+    // using a suitably constructed fat-pointer (as if the functions
+    // accepted &[u8]). This function therefore doesn't need dynamic array
+    // alloca, and is therefore not protected by the `strong` or `basic`
+    // heuristics.
+
+
+    // We should have a __security_check_cookie call in `all` and `strong` modes but
+    // LLVM does not support generating stack protectors in functions with funclet
+    // based EH personalities.
+    // https://github.com/llvm/llvm-project/blob/37fd3c96b917096d8a550038f6e61cdf0fc4174f/llvm/lib/CodeGen/StackProtector.cpp#L103C1-L109C4
+    // all-NOT: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: unsized_local
+#[no_mangle]
+pub fn unsized_local(s: &[u8], l: bool, f: fn(&mut [u8])) {
+    let n = if l { 1 } else { 2 };
+    let mut a: [u8] = *Box::<[u8]>::from(&s[0..n]); // slice-copy with Box::from
+    f(&mut a);
+
+    // This function allocates a slice as a local variable in its stack
+    // frame. Since the size is not a compile-time constant, an array
+    // alloca is required, and the function is protected by both the
+    // `strong` and `basic` heuristic.
+
+    // We should have a __security_check_cookie call in `all`, `strong` and `basic` modes but
+    // LLVM does not support generating stack protectors in functions with funclet
+    // based EH personalities.
+    // https://github.com/llvm/llvm-project/blob/37fd3c96b917096d8a550038f6e61cdf0fc4174f/llvm/lib/CodeGen/StackProtector.cpp#L103C1-L109C4
+    // all-NOT: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
diff --git a/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-64bit.rs b/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-64bit.rs
new file mode 100644
index 00000000000..d9abf554a92
--- /dev/null
+++ b/tests/assembly/stack-protector/stack-protector-heuristics-effect-windows-64bit.rs
@@ -0,0 +1,414 @@
+// revisions: all strong basic none missing
+// assembly-output: emit-asm
+// only-windows
+// only-msvc
+// ignore-32bit 64-bit table based SEH has slightly different behaviors than classic SEH
+// [all] compile-flags: -Z stack-protector=all
+// [strong] compile-flags: -Z stack-protector=strong
+// [basic] compile-flags: -Z stack-protector=basic
+// [none] compile-flags: -Z stack-protector=none
+// compile-flags: -C opt-level=2 -Z merge-functions=disabled
+
+#![crate_type = "lib"]
+
+#![allow(incomplete_features)]
+
+#![feature(unsized_locals, unsized_fn_params)]
+
+
+// CHECK-LABEL: emptyfn:
+#[no_mangle]
+pub fn emptyfn() {
+    // all: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: array_char
+#[no_mangle]
+pub fn array_char(f: fn(*const char)) {
+    let a = ['c'; 1];
+    let b = ['d'; 3];
+    let c = ['e'; 15];
+
+    f(&a as *const _);
+    f(&b as *const _);
+    f(&c as *const _);
+
+    // Any type of local array variable leads to stack protection with the
+    // "strong" heuristic. The 'basic' heuristic only adds stack protection to
+    // functions with local array variables of a byte-sized type, however. Since
+    // 'char' is 4 bytes in Rust, this function is not protected by the 'basic'
+    // heuristic
+    //
+    // (This test *also* takes the address of the local stack variables. We
+    // cannot know that this isn't what triggers the `strong` heuristic.
+    // However, the test strategy of passing the address of a stack array to an
+    // external function is sufficient to trigger the `basic` heuristic (see
+    // test `array_u8_large()`). Since the `basic` heuristic only checks for the
+    // presence of stack-local array variables, we can be confident that this
+    // test also captures this part of the `strong` heuristic specification.)
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: array_u8_1
+#[no_mangle]
+pub fn array_u8_1(f: fn(*const u8)) {
+    let a = [0u8; 1];
+    f(&a as *const _);
+
+    // The 'strong' heuristic adds stack protection to functions with local
+    // array variables regardless of their size.
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: array_u8_small:
+#[no_mangle]
+pub fn array_u8_small(f: fn(*const u8)) {
+    let a = [0u8; 2];
+    let b = [0u8; 7];
+    f(&a as *const _);
+    f(&b as *const _);
+
+    // Small arrays do not lead to stack protection by the 'basic' heuristic.
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: array_u8_large:
+#[no_mangle]
+pub fn array_u8_large(f: fn(*const u8)) {
+    let a = [0u8; 9];
+    f(&a as *const _);
+
+    // Since `a` is a byte array with size greater than 8, the basic heuristic
+    // will also protect this function.
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+#[derive(Copy, Clone)]
+pub struct ByteSizedNewtype(u8);
+
+// CHECK-LABEL: array_bytesizednewtype_9:
+#[no_mangle]
+pub fn array_bytesizednewtype_9(f: fn(*const ByteSizedNewtype)) {
+    let a = [ByteSizedNewtype(0); 9];
+    f(&a as *const _);
+
+    // Since `a` is a byte array in the LLVM output, the basic heuristic will
+    // also protect this function.
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: local_var_addr_used_indirectly
+#[no_mangle]
+pub fn local_var_addr_used_indirectly(f: fn(bool)) {
+    let a = 5;
+    let a_addr = &a as *const _ as usize;
+    f(a_addr & 0x10 == 0);
+
+    // This function takes the address of a local variable taken. Although this
+    // address is never used as a way to refer to stack memory, the `strong`
+    // heuristic adds stack smash protection. This is also the case in C++:
+    // ```
+    // cat << EOF | clang++ -O2 -fstack-protector-strong -S -x c++ - -o - | grep stack_chk
+    // #include <cstdint>
+    // void f(void (*g)(bool)) {
+    //     int32_t x;
+    //     g((reinterpret_cast<uintptr_t>(&x) & 0x10U) == 0);
+    // }
+    // EOF
+    // ```
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+
+// CHECK-LABEL: local_string_addr_taken
+#[no_mangle]
+pub fn local_string_addr_taken(f: fn(&String)) {
+    // CHECK-DAG: .seh_endprologue
+    let x = String::new();
+    f(&x);
+
+    // Taking the address of the local variable `x` leads to stack smash
+    // protection with the `strong` heuristic, but not with the `basic`
+    // heuristic. It does not matter that the reference is not mut.
+    //
+    // An interesting note is that a similar function in C++ *would* be
+    // protected by the `basic` heuristic, because `std::string` has a char
+    // array internally as a small object optimization:
+    // ```
+    // cat <<EOF | clang++ -O2 -fstack-protector -S -x c++ - -o - | grep stack_chk
+    // #include <string>
+    // void f(void (*g)(const std::string&)) {
+    //     std::string x;
+    //     g(x);
+    // }
+    // EOF
+    // ```
+    //
+
+    // We should have a __security_check_cookie call in `all` and `strong` modes but
+    // LLVM does not support generating stack protectors in functions with funclet
+    // based EH personalities.
+    // https://github.com/llvm/llvm-project/blob/37fd3c96b917096d8a550038f6e61cdf0fc4174f/llvm/lib/CodeGen/StackProtector.cpp#L103C1-L109C4
+    // all-NOT: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+
+    // CHECK-DAG: .seh_endproc
+}
+
+pub trait SelfByRef {
+    fn f(&self) -> i32;
+}
+
+impl SelfByRef for i32 {
+    fn f(&self) -> i32 {
+        return self + 1;
+    }
+}
+
+// CHECK-LABEL: local_var_addr_taken_used_locally_only
+#[no_mangle]
+pub fn local_var_addr_taken_used_locally_only(factory: fn() -> i32, sink: fn(i32)) {
+    let x = factory();
+    let g = x.f();
+    sink(g);
+
+    // Even though the local variable conceptually has its address taken, as
+    // it's passed by reference to the trait function, the use of the reference
+    // is easily inlined. There is therefore no stack smash protection even with
+    // the `strong` heuristic.
+
+    // all: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+pub struct Gigastruct {
+    does: u64,
+    not: u64,
+    have: u64,
+    array: u64,
+    members: u64
+}
+
+// CHECK-LABEL: local_large_var_moved
+#[no_mangle]
+pub fn local_large_var_moved(f: fn(Gigastruct)) {
+    let x = Gigastruct { does: 0, not: 1, have: 2, array: 3, members: 4 };
+    f(x);
+
+    // Even though the local variable conceptually doesn't have its address
+    // taken, it's so large that the "move" is implemented with a reference to a
+    // stack-local variable in the ABI. Consequently, this function *is*
+    // protected by the `strong` heuristic. This is also the case for
+    // rvalue-references in C++, regardless of struct size:
+    // ```
+    // cat <<EOF | clang++ -O2 -fstack-protector-strong -S -x c++ - -o - | grep stack_chk
+    // #include <cstdint>
+    // #include <utility>
+    // void f(void (*g)(uint64_t&&)) {
+    //     uint64_t x;
+    //     g(std::move(x));
+    // }
+    // EOF
+    // ```
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: local_large_var_cloned
+#[no_mangle]
+pub fn local_large_var_cloned(f: fn(Gigastruct)) {
+    f(Gigastruct { does: 0, not: 1, have: 2, array: 3, members: 4 });
+
+    // A new instance of `Gigastruct` is passed to `f()`, without any apparent
+    // connection to this stack frame. Still, since instances of `Gigastruct`
+    // are sufficiently large, it is allocated in the caller stack frame and
+    // passed as a pointer. As such, this function is *also* protected by the
+    // `strong` heuristic, just like `local_large_var_moved`. This is also the
+    // case for pass-by-value of sufficiently large structs in C++:
+    // ```
+    // cat <<EOF | clang++ -O2 -fstack-protector-strong -S -x c++ - -o - | grep stack_chk
+    // #include <cstdint>
+    // #include <utility>
+    // struct Gigastruct { uint64_t a, b, c, d, e; };
+    // void f(void (*g)(Gigastruct)) {
+    //     g(Gigastruct{});
+    // }
+    // EOF
+    // ```
+
+
+    // all: __security_check_cookie
+    // strong: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+
+extern "C" {
+    // A call to an external `alloca` function is *not* recognized as an
+    // `alloca(3)` operation. This function is a compiler built-in, as the
+    // man page explains. Clang translates it to an LLVM `alloca`
+    // instruction with a count argument, which is also what the LLVM stack
+    // protector heuristics looks for. The man page for `alloca(3)` details
+    // a way to avoid using the compiler built-in: pass a -std=c11
+    // argument, *and* don't include <alloca.h>. Though this leads to an
+    // external alloca() function being called, it doesn't lead to stack
+    // protection being included. It even fails with a linker error
+    // "undefined reference to `alloca'". Example:
+    // ```
+    // cat<<EOF | clang -fstack-protector-strong -x c -std=c11 - -o /dev/null
+    // #include <stdlib.h>
+    // void * alloca(size_t);
+    // void f(void (*g)(void*)) {
+    //     void * p = alloca(10);
+    //     g(p);
+    // }
+    // int main() { return 0; }
+    // EOF
+    // ```
+    // The following tests demonstrate that calls to an external `alloca`
+    // function in Rust also doesn't trigger stack protection.
+
+    fn alloca(size: usize) -> *mut ();
+}
+
+// CHECK-LABEL: alloca_small_compile_time_constant_arg
+#[no_mangle]
+pub fn alloca_small_compile_time_constant_arg(f: fn(*mut ())) {
+    f(unsafe { alloca(8) });
+
+    // all: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: alloca_large_compile_time_constant_arg
+#[no_mangle]
+pub fn alloca_large_compile_time_constant_arg(f: fn(*mut ())) {
+    f(unsafe { alloca(9) });
+
+    // all: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+
+// CHECK-LABEL: alloca_dynamic_arg
+#[no_mangle]
+pub fn alloca_dynamic_arg(f: fn(*mut ()), n: usize) {
+    f(unsafe { alloca(n) });
+
+    // all: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// The question then is: in what ways can Rust code generate array-`alloca`
+// LLVM instructions? This appears to only be generated by
+// rustc_codegen_ssa::traits::Builder::array_alloca() through
+// rustc_codegen_ssa::mir::operand::OperandValue::store_unsized(). FWICT
+// this is support for the "unsized locals" unstable feature:
+// https://doc.rust-lang.org/unstable-book/language-features/unsized-locals.html.
+
+
+// CHECK-LABEL: unsized_fn_param
+#[no_mangle]
+pub fn unsized_fn_param(s: [u8], l: bool, f: fn([u8])) {
+    let n = if l { 1 } else { 2 };
+    f(*Box::<[u8]>::from(&s[0..n])); // slice-copy with Box::from
+
+    // Even though slices are conceptually passed by-value both into this
+    // function and into `f()`, this is implemented with pass-by-reference
+    // using a suitably constructed fat-pointer (as if the functions
+    // accepted &[u8]). This function therefore doesn't need dynamic array
+    // alloca, and is therefore not protected by the `strong` or `basic`
+    // heuristics.
+
+
+    // We should have a __security_check_cookie call in `all` and `strong` modes but
+    // LLVM does not support generating stack protectors in functions with funclet
+    // based EH personalities.
+    // https://github.com/llvm/llvm-project/blob/37fd3c96b917096d8a550038f6e61cdf0fc4174f/llvm/lib/CodeGen/StackProtector.cpp#L103C1-L109C4
+    // all-NOT: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+
+    // basic-NOT: __security_check_cookie
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
+
+// CHECK-LABEL: unsized_local
+#[no_mangle]
+pub fn unsized_local(s: &[u8], l: bool, f: fn(&mut [u8])) {
+    let n = if l { 1 } else { 2 };
+    let mut a: [u8] = *Box::<[u8]>::from(&s[0..n]); // slice-copy with Box::from
+    f(&mut a);
+
+    // This function allocates a slice as a local variable in its stack
+    // frame. Since the size is not a compile-time constant, an array
+    // alloca is required, and the function is protected by both the
+    // `strong` and `basic` heuristic.
+
+    // We should have a __security_check_cookie call in `all`, `strong` and `basic` modes but
+    // LLVM does not support generating stack protectors in functions with funclet
+    // based EH personalities.
+    // https://github.com/llvm/llvm-project/blob/37fd3c96b917096d8a550038f6e61cdf0fc4174f/llvm/lib/CodeGen/StackProtector.cpp#L103C1-L109C4
+    // all-NOT: __security_check_cookie
+    // strong-NOT: __security_check_cookie
+    // basic-NOT: __security_check_cookie
+
+    // none-NOT: __security_check_cookie
+    // missing-NOT: __security_check_cookie
+}
diff --git a/tests/assembly/stack-protector/stack-protector-heuristics-effect.rs b/tests/assembly/stack-protector/stack-protector-heuristics-effect.rs
index e46b902df07..ca566b6e46a 100644
--- a/tests/assembly/stack-protector/stack-protector-heuristics-effect.rs
+++ b/tests/assembly/stack-protector/stack-protector-heuristics-effect.rs
@@ -1,7 +1,7 @@
 // revisions: all strong basic none missing
 // assembly-output: emit-asm
 // ignore-macos slightly different policy on stack protection of arrays
-// ignore-windows stack check code uses different function names
+// ignore-msvc stack check code uses different function names
 // ignore-nvptx64 stack protector is not supported
 // ignore-wasm32-bare
 // [all] compile-flags: -Z stack-protector=all
diff --git a/tests/codegen-units/item-collection/asm-sym.rs b/tests/codegen-units/item-collection/asm-sym.rs
index 8bafb95bc16..4b05b771a9b 100644
--- a/tests/codegen-units/item-collection/asm-sym.rs
+++ b/tests/codegen-units/item-collection/asm-sym.rs
@@ -6,15 +6,18 @@ pub unsafe fn f() {
     //~ MONO_ITEM static f::S @@ asm_sym-cgu.0[External]
     static S: usize = 1;
     //~ MONO_ITEM fn f::fun @@ asm_sym-cgu.0[External]
+    #[inline(never)]
     fn fun() {}
     core::arch::asm!("/* {0} {1} */", sym S, sym fun);
 }
 
 //~ MONO_ITEM fn g @@ asm_sym-cgu.0[External]
+#[inline(never)]
 pub unsafe fn g() {
     //~ MONO_ITEM static g::S @@ asm_sym-cgu.0[Internal]
     static S: usize = 2;
     //~ MONO_ITEM fn g::fun @@ asm_sym-cgu.0[Internal]
+    #[inline(never)]
     fn fun() {}
     core::arch::asm!("/* {0} {1} */", sym S, sym fun);
 }
diff --git a/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs b/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs
index ecea26dc4be..e94dded55cf 100644
--- a/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs
+++ b/tests/codegen-units/item-collection/auxiliary/cgu_export_trait_method.rs
@@ -1,3 +1,5 @@
+// compile-flags: -Copt-level=0
+
 #![crate_type = "lib"]
 
 pub trait Trait : Sized {
diff --git a/tests/codegen-units/item-collection/cross-crate-trait-method.rs b/tests/codegen-units/item-collection/cross-crate-trait-method.rs
index b7216a14318..778b3820f18 100644
--- a/tests/codegen-units/item-collection/cross-crate-trait-method.rs
+++ b/tests/codegen-units/item-collection/cross-crate-trait-method.rs
@@ -1,4 +1,4 @@
-// compile-flags:-Zprint-mono-items=eager -Zinline-mir=no
+// compile-flags:-Zprint-mono-items=eager -Zinline-mir=no -Copt-level=0
 
 #![deny(dead_code)]
 #![feature(start)]
diff --git a/tests/codegen-units/item-collection/items-within-generic-items.rs b/tests/codegen-units/item-collection/items-within-generic-items.rs
index d37d7f7d9b2..bb1a3be36c5 100644
--- a/tests/codegen-units/item-collection/items-within-generic-items.rs
+++ b/tests/codegen-units/item-collection/items-within-generic-items.rs
@@ -1,4 +1,4 @@
-// compile-flags:-Zprint-mono-items=eager
+// compile-flags:-Zprint-mono-items=eager -Copt-level=0
 
 #![deny(dead_code)]
 #![feature(start)]
diff --git a/tests/codegen-units/item-collection/unreferenced-const-fn.rs b/tests/codegen-units/item-collection/unreferenced-const-fn.rs
index 17b92eae00d..5f59d801504 100644
--- a/tests/codegen-units/item-collection/unreferenced-const-fn.rs
+++ b/tests/codegen-units/item-collection/unreferenced-const-fn.rs
@@ -4,6 +4,7 @@
 #![crate_type = "rlib"]
 
 //~ MONO_ITEM fn foo @@ unreferenced_const_fn-cgu.0[External]
+#[inline(never)]
 pub const fn foo(x: u32) -> u32 {
     x + 0xf00
 }
diff --git a/tests/codegen/asm-sanitize-llvm.rs b/tests/codegen/asm-sanitize-llvm.rs
index 6dcacd08cac..41bed98038e 100644
--- a/tests/codegen/asm-sanitize-llvm.rs
+++ b/tests/codegen/asm-sanitize-llvm.rs
@@ -1,5 +1,5 @@
 // FIXME(nagisa): remove the flags below once all targets support `asm!`.
-// compile-flags: --target x86_64-unknown-linux-gnu
+// compile-flags: --target x86_64-unknown-linux-gnu -Copt-level=0
 // needs-llvm-components: x86
 
 // Verify we sanitize the special tokens for the LLVM inline-assembly, ensuring people won't
diff --git a/tests/codegen/async-fn-debug-awaitee-field.rs b/tests/codegen/async-fn-debug-awaitee-field.rs
index 690505fd72b..03cc46cdcde 100644
--- a/tests/codegen/async-fn-debug-awaitee-field.rs
+++ b/tests/codegen/async-fn-debug-awaitee-field.rs
@@ -1,9 +1,9 @@
-// This test makes sure that the generator field capturing the awaitee in a `.await` expression
+// This test makes sure that the coroutine field capturing the awaitee in a `.await` expression
 // is called "__awaitee" in debuginfo. This name must not be changed since debuggers and debugger
 // extensions rely on the field having this name.
 
 // ignore-tidy-linelength
-// compile-flags: -C debuginfo=2 --edition=2018
+// compile-flags: -C debuginfo=2 --edition=2018 -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/async-fn-debug-msvc.rs b/tests/codegen/async-fn-debug-msvc.rs
index 73c652c9dd1..707a0d27740 100644
--- a/tests/codegen/async-fn-debug-msvc.rs
+++ b/tests/codegen/async-fn-debug-msvc.rs
@@ -1,4 +1,4 @@
-// Verify debuginfo for generators:
+// Verify debuginfo for coroutines:
 //  - Each variant points to the file and line of its yield point
 //  - The discriminants are marked artificial
 //  - Other fields are not marked artificial
diff --git a/tests/codegen/char-ascii-branchless.rs b/tests/codegen/char-ascii-branchless.rs
new file mode 100644
index 00000000000..b612b24c7c7
--- /dev/null
+++ b/tests/codegen/char-ascii-branchless.rs
@@ -0,0 +1,47 @@
+// Checks that these functions are branchless.
+//
+// compile-flags: -O
+
+#![crate_type = "lib"]
+
+// CHECK-LABEL: @is_ascii_alphanumeric_char
+#[no_mangle]
+pub fn is_ascii_alphanumeric_char(x: char) -> bool {
+    // CHECK-NOT: br
+    x.is_ascii_alphanumeric()
+}
+
+// CHECK-LABEL: @is_ascii_alphanumeric_u8
+#[no_mangle]
+pub fn is_ascii_alphanumeric_u8(x: u8) -> bool {
+    // CHECK-NOT: br
+    x.is_ascii_alphanumeric()
+}
+
+// CHECK-LABEL: @is_ascii_hexdigit_char
+#[no_mangle]
+pub fn is_ascii_hexdigit_char(x: char) -> bool {
+    // CHECK-NOT: br
+    x.is_ascii_hexdigit()
+}
+
+// CHECK-LABEL: @is_ascii_hexdigit_u8
+#[no_mangle]
+pub fn is_ascii_hexdigit_u8(x: u8) -> bool {
+    // CHECK-NOT: br
+    x.is_ascii_hexdigit()
+}
+
+// CHECK-LABEL: @is_ascii_punctuation_char
+#[no_mangle]
+pub fn is_ascii_punctuation_char(x: char) -> bool {
+    // CHECK-NOT: br
+    x.is_ascii_punctuation()
+}
+
+// CHECK-LABEL: @is_ascii_punctuation_u8
+#[no_mangle]
+pub fn is_ascii_punctuation_u8(x: u8) -> bool {
+    // CHECK-NOT: br
+    x.is_ascii_punctuation()
+}
diff --git a/tests/codegen/generator-debug-msvc.rs b/tests/codegen/coroutine-debug-msvc.rs
index 9d70ccdef03..6d16e7576c1 100644
--- a/tests/codegen/generator-debug-msvc.rs
+++ b/tests/codegen/coroutine-debug-msvc.rs
@@ -1,4 +1,4 @@
-// Verify debuginfo for generators:
+// Verify debuginfo for coroutines:
 //  - Each variant points to the file and line of its yield point
 //  - The discriminants are marked artificial
 //  - Other fields are not marked artificial
@@ -7,10 +7,10 @@
 // compile-flags: -C debuginfo=2
 // only-msvc
 
-#![feature(generators, generator_trait)]
-use std::ops::Generator;
+#![feature(coroutines, coroutine_trait)]
+use std::ops::Coroutine;
 
-fn generator_test() -> impl Generator<Yield = i32, Return = ()> {
+fn coroutine_test() -> impl Coroutine<Yield = i32, Return = ()> {
     || {
         yield 0;
         let s = String::from("foo");
@@ -20,7 +20,7 @@ fn generator_test() -> impl Generator<Yield = i32, Return = ()> {
 
 // FIXME: No way to reliably check the filename.
 
-// CHECK-DAG:  [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<generator_debug_msvc::generator_test::generator_env$0>"
+// CHECK-DAG:  [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_union_type, name: "enum2$<coroutine_debug_msvc::coroutine_test::coroutine_env$0>"
 // CHECK:      {{!.*}} = !DIDerivedType(tag: DW_TAG_member, name: "variant0", scope: [[GEN]],
 // For brevity, we only check the struct name and members of the last variant.
 // CHECK-SAME: file: [[FILE:![0-9]*]], line: 14,
@@ -55,5 +55,5 @@ fn generator_test() -> impl Generator<Yield = i32, Return = ()> {
 // CHECK-NOT: flags: DIFlagArtificial
 
 fn main() {
-    let _dummy = generator_test();
+    let _dummy = coroutine_test();
 }
diff --git a/tests/codegen/generator-debug.rs b/tests/codegen/coroutine-debug.rs
index 3ec860f2cbc..b060f3bfac7 100644
--- a/tests/codegen/generator-debug.rs
+++ b/tests/codegen/coroutine-debug.rs
@@ -1,4 +1,4 @@
-// Verify debuginfo for generators:
+// Verify debuginfo for coroutines:
 //  - Each variant points to the file and line of its yield point
 //  - The discriminants are marked artificial
 //  - Other fields are not marked artificial
@@ -7,10 +7,10 @@
 // compile-flags: -C debuginfo=2 --edition=2018
 // ignore-msvc
 
-#![feature(generators, generator_trait)]
-use std::ops::Generator;
+#![feature(coroutines, coroutine_trait)]
+use std::ops::Coroutine;
 
-fn generator_test() -> impl Generator<Yield = i32, Return = ()> {
+fn coroutine_test() -> impl Coroutine<Yield = i32, Return = ()> {
     || {
         yield 0;
         let s = String::from("foo");
@@ -20,8 +20,8 @@ fn generator_test() -> impl Generator<Yield = i32, Return = ()> {
 
 // FIXME: No way to reliably check the filename.
 
-// CHECK-DAG:  [[GEN_FN:!.*]] = !DINamespace(name: "generator_test"
-// CHECK-DAG:  [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "{generator_env#0}", scope: [[GEN_FN]]
+// CHECK-DAG:  [[GEN_FN:!.*]] = !DINamespace(name: "coroutine_test"
+// CHECK-DAG:  [[GEN:!.*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "{coroutine_env#0}", scope: [[GEN_FN]]
 // CHECK:      [[VARIANT:!.*]] = !DICompositeType(tag: DW_TAG_variant_part, scope: [[GEN]],
 // CHECK-NOT:  flags: DIFlagArtificial
 // CHECK-SAME: discriminator: [[DISC:![0-9]*]]
@@ -58,5 +58,5 @@ fn generator_test() -> impl Generator<Yield = i32, Return = ()> {
 // CHECK-SAME: flags: DIFlagArtificial
 
 fn main() {
-    let _dummy = generator_test();
+    let _dummy = coroutine_test();
 }
diff --git a/tests/codegen/debug-linkage-name.rs b/tests/codegen/debug-linkage-name.rs
index 9011a7da51d..9bf4d521fc0 100644
--- a/tests/codegen/debug-linkage-name.rs
+++ b/tests/codegen/debug-linkage-name.rs
@@ -1,8 +1,8 @@
 // Verifies that linkage name is omitted when it is
 // the same as variable / function name.
 //
-// compile-flags: -C no-prepopulate-passes
-// compile-flags: -C debuginfo=2
+// compile-flags: -C no-prepopulate-passes -Copt-level=0
+// compile-flags: -C debuginfo=2 -Copt-level=0
 #![crate_type = "lib"]
 
 pub mod xyz {
diff --git a/tests/codegen/default-requires-uwtable.rs b/tests/codegen/default-requires-uwtable.rs
index 5d77d3f14bb..26424f03568 100644
--- a/tests/codegen/default-requires-uwtable.rs
+++ b/tests/codegen/default-requires-uwtable.rs
@@ -1,5 +1,5 @@
 // revisions: WINDOWS ANDROID
-// compile-flags: -C panic=abort
+// compile-flags: -C panic=abort -Copt-level=0
 // [WINDOWS] compile-flags: --target=x86_64-pc-windows-msvc
 // [WINDOWS] needs-llvm-components: x86
 // [ANDROID] compile-flags: --target=armv7-linux-androideabi
diff --git a/tests/codegen/drop.rs b/tests/codegen/drop.rs
index 3615ef47b53..14b5840e2fe 100644
--- a/tests/codegen/drop.rs
+++ b/tests/codegen/drop.rs
@@ -7,10 +7,12 @@
 struct SomeUniqueName;
 
 impl Drop for SomeUniqueName {
+    #[inline(never)]
     fn drop(&mut self) {
     }
 }
 
+#[inline(never)]
 pub fn possibly_unwinding() {
 }
 
diff --git a/tests/codegen/force-frame-pointers.rs b/tests/codegen/force-frame-pointers.rs
index 637c4234654..5791ae47937 100644
--- a/tests/codegen/force-frame-pointers.rs
+++ b/tests/codegen/force-frame-pointers.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -C force-frame-pointers=y
+// compile-flags: -C no-prepopulate-passes -C force-frame-pointers=y -Copt-level=0
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/force-unwind-tables.rs b/tests/codegen/force-unwind-tables.rs
index 4c0a5602c6d..c904978c9ff 100644
--- a/tests/codegen/force-unwind-tables.rs
+++ b/tests/codegen/force-unwind-tables.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C no-prepopulate-passes -C force-unwind-tables=y
+// compile-flags: -C no-prepopulate-passes -C force-unwind-tables=y -Copt-level=0
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/inline-function-args-debug-info.rs b/tests/codegen/inline-function-args-debug-info.rs
index e3d8caa49d4..ffae99e0f24 100644
--- a/tests/codegen/inline-function-args-debug-info.rs
+++ b/tests/codegen/inline-function-args-debug-info.rs
@@ -6,6 +6,7 @@
 
 #![crate_type = "lib"]
 
+#[inline(never)]
 pub fn outer_function(x: usize, y: usize) -> usize {
     inner_function(x, y) + 1
 }
@@ -13,8 +14,8 @@ pub fn outer_function(x: usize, y: usize) -> usize {
 #[inline]
 fn inner_function(aaaa: usize, bbbb: usize) -> usize {
     // CHECK: !DILocalVariable(name: "aaaa", arg: 1
-    // CHECK-SAME: line: 14
+    // CHECK-SAME: line: 15
     // CHECK: !DILocalVariable(name: "bbbb", arg: 2
-    // CHECK-SAME: line: 14
+    // CHECK-SAME: line: 15
     aaaa + bbbb
 }
diff --git a/tests/codegen/instrument-coverage-off.rs b/tests/codegen/instrument-coverage-off.rs
new file mode 100644
index 00000000000..ca803beec0b
--- /dev/null
+++ b/tests/codegen/instrument-coverage-off.rs
@@ -0,0 +1,23 @@
+// Test that `-Cinstrument-coverage=off` does not add coverage instrumentation to LLVM IR.
+
+// needs-profiler-support
+// revisions: n no off false zero
+// [n] compile-flags: -Cinstrument-coverage=n
+// [no] compile-flags: -Cinstrument-coverage=no
+// [off] compile-flags: -Cinstrument-coverage=off
+// [false] compile-flags: -Cinstrument-coverage=false
+// [zero] compile-flags: -Cinstrument-coverage=0
+
+// CHECK-NOT: __llvm_profile_filename
+// CHECK-NOT: __llvm_coverage_mapping
+
+#![crate_type="lib"]
+
+#[inline(never)]
+fn some_function() {
+
+}
+
+pub fn some_other_function() {
+    some_function();
+}
diff --git a/tests/codegen/instrument-coverage.rs b/tests/codegen/instrument-coverage.rs
index 78f8875a2d9..f8437dac463 100644
--- a/tests/codegen/instrument-coverage.rs
+++ b/tests/codegen/instrument-coverage.rs
@@ -1,9 +1,16 @@
 // Test that `-Cinstrument-coverage` creates expected __llvm_profile_filename symbol in LLVM IR.
 
 // needs-profiler-support
-// compile-flags: -Cinstrument-coverage
+// revisions: default y yes on true all
+// [default] compile-flags: -Cinstrument-coverage
+// [y] compile-flags: -Cinstrument-coverage=y
+// [yes] compile-flags: -Cinstrument-coverage=yes
+// [on] compile-flags: -Cinstrument-coverage=on
+// [true] compile-flags: -Cinstrument-coverage=true
+// [all] compile-flags: -Cinstrument-coverage=all
 
 // CHECK: @__llvm_profile_filename = {{.*}}"default_%m_%p.profraw\00"{{.*}}
+// CHECK: @__llvm_coverage_mapping
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/instrument-mcount.rs b/tests/codegen/instrument-mcount.rs
index b26076e7a7b..50823775a41 100644
--- a/tests/codegen/instrument-mcount.rs
+++ b/tests/codegen/instrument-mcount.rs
@@ -1,5 +1,5 @@
 //
-// compile-flags: -Z instrument-mcount
+// compile-flags: -Z instrument-mcount -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/instrument-xray/basic.rs b/tests/codegen/instrument-xray/basic.rs
index d3e49d53174..5da878474f2 100644
--- a/tests/codegen/instrument-xray/basic.rs
+++ b/tests/codegen/instrument-xray/basic.rs
@@ -1,7 +1,7 @@
 // Checks that `-Z instrument-xray` produces expected instrumentation.
 //
 // needs-xray
-// compile-flags: -Z instrument-xray=always
+// compile-flags: -Z instrument-xray=always -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/instrument-xray/options-combine.rs b/tests/codegen/instrument-xray/options-combine.rs
index f7e500b65f6..d1e56586279 100644
--- a/tests/codegen/instrument-xray/options-combine.rs
+++ b/tests/codegen/instrument-xray/options-combine.rs
@@ -1,9 +1,9 @@
 // Checks that `-Z instrument-xray` options can be specified multiple times.
 //
 // needs-xray
-// compile-flags: -Z instrument-xray=skip-exit
-// compile-flags: -Z instrument-xray=instruction-threshold=123
-// compile-flags: -Z instrument-xray=instruction-threshold=456
+// compile-flags: -Z instrument-xray=skip-exit -Copt-level=0
+// compile-flags: -Z instrument-xray=instruction-threshold=123 -Copt-level=0
+// compile-flags: -Z instrument-xray=instruction-threshold=456 -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/instrument-xray/options-override.rs b/tests/codegen/instrument-xray/options-override.rs
index 00f81837902..b1fc4c966dc 100644
--- a/tests/codegen/instrument-xray/options-override.rs
+++ b/tests/codegen/instrument-xray/options-override.rs
@@ -1,8 +1,8 @@
 // Checks that the last `-Z instrument-xray` option wins.
 //
 // needs-xray
-// compile-flags: -Z instrument-xray=always
-// compile-flags: -Z instrument-xray=never
+// compile-flags: -Z instrument-xray=always -Copt-level=0
+// compile-flags: -Z instrument-xray=never -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/panic-unwind-default-uwtable.rs b/tests/codegen/panic-unwind-default-uwtable.rs
index 4c85008cf35..b78b159d20d 100644
--- a/tests/codegen/panic-unwind-default-uwtable.rs
+++ b/tests/codegen/panic-unwind-default-uwtable.rs
@@ -1,4 +1,4 @@
-// compile-flags: -C panic=unwind -C no-prepopulate-passes
+// compile-flags: -C panic=unwind -C no-prepopulate-passes -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/personality_lifetimes.rs b/tests/codegen/personality_lifetimes.rs
index 47243bece98..b39718a8d08 100644
--- a/tests/codegen/personality_lifetimes.rs
+++ b/tests/codegen/personality_lifetimes.rs
@@ -9,10 +9,12 @@
 struct S;
 
 impl Drop for S {
+    #[inline(never)]
     fn drop(&mut self) {
     }
 }
 
+#[inline(never)]
 fn might_unwind() {
 }
 
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
index 084d8bf803c..f16890afad0 100644
--- a/tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs
+++ b/tests/codegen/sanitizer/cfi-emit-type-metadata-attr-cfi-encoding.rs
@@ -1,7 +1,7 @@
 // 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
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
 
 #![crate_type="lib"]
 #![feature(cfi_encoding, extern_types)]
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 2d8b13e2080..4ed7c27fc4e 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
@@ -1,7 +1,7 @@
 // Verifies that type metadata identifiers for functions are emitted correctly.
 //
 // needs-sanitizer-cfi
-// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Copt-level=0
 
 #![crate_type="lib"]
 #![allow(dead_code)]
diff --git a/tests/codegen/sanitizer/cfi-generalize-pointers.rs b/tests/codegen/sanitizer/cfi-generalize-pointers.rs
index 677ebdb27ec..17cb42d3e74 100644
--- a/tests/codegen/sanitizer/cfi-generalize-pointers.rs
+++ b/tests/codegen/sanitizer/cfi-generalize-pointers.rs
@@ -1,7 +1,7 @@
 // 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
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-generalize-pointers -Copt-level=0
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/cfi-normalize-integers.rs b/tests/codegen/sanitizer/cfi-normalize-integers.rs
index aa3913cb8e7..9663aa54c28 100644
--- a/tests/codegen/sanitizer/cfi-normalize-integers.rs
+++ b/tests/codegen/sanitizer/cfi-normalize-integers.rs
@@ -1,7 +1,7 @@
 // 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
+// compile-flags: -Clto -Cno-prepopulate-passes -Ctarget-feature=-crt-static -Zsanitizer=cfi -Zsanitizer-cfi-normalize-integers -Copt-level=0
 
 #![crate_type="lib"]
 
diff --git a/tests/codegen/sanitizer/kasan-emits-instrumentation.rs b/tests/codegen/sanitizer/kasan-emits-instrumentation.rs
index 783bc47b9d0..29d50d8df24 100644
--- a/tests/codegen/sanitizer/kasan-emits-instrumentation.rs
+++ b/tests/codegen/sanitizer/kasan-emits-instrumentation.rs
@@ -1,6 +1,6 @@
 // Verifies that `-Zsanitizer=kernel-address` emits sanitizer instrumentation.
 
-// compile-flags: -Zsanitizer=kernel-address
+// compile-flags: -Zsanitizer=kernel-address -Copt-level=0
 // revisions: aarch64 riscv64imac riscv64gc x86_64
 //[aarch64] compile-flags: --target aarch64-unknown-none
 //[aarch64] needs-llvm-components: aarch64
diff --git a/tests/codegen/sanitizer/memtag-attr-check.rs b/tests/codegen/sanitizer/memtag-attr-check.rs
index 2fd362656d4..3e5e14e8429 100644
--- a/tests/codegen/sanitizer/memtag-attr-check.rs
+++ b/tests/codegen/sanitizer/memtag-attr-check.rs
@@ -2,7 +2,7 @@
 // applied when enabling the memtag sanitizer.
 //
 // needs-sanitizer-memtag
-// compile-flags: -Zsanitizer=memtag -Ctarget-feature=+mte
+// compile-flags: -Zsanitizer=memtag -Ctarget-feature=+mte -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/sanitizer/no-sanitize.rs b/tests/codegen/sanitizer/no-sanitize.rs
index d0b69243453..029cf8e7f5c 100644
--- a/tests/codegen/sanitizer/no-sanitize.rs
+++ b/tests/codegen/sanitizer/no-sanitize.rs
@@ -2,7 +2,7 @@
 // selectively disable sanitizer instrumentation.
 //
 // needs-sanitizer-address
-// compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static
+// compile-flags: -Zsanitizer=address -Ctarget-feature=-crt-static -Copt-level=0
 
 #![crate_type="lib"]
 #![feature(no_sanitize)]
diff --git a/tests/codegen/sanitizer/safestack-attr-check.rs b/tests/codegen/sanitizer/safestack-attr-check.rs
index b73ed00e730..b19e2d13133 100644
--- a/tests/codegen/sanitizer/safestack-attr-check.rs
+++ b/tests/codegen/sanitizer/safestack-attr-check.rs
@@ -1,7 +1,7 @@
 // This tests that the safestack attribute is applied when enabling the safe-stack sanitizer.
 //
 // needs-sanitizer-safestack
-// compile-flags: -Zsanitizer=safestack
+// compile-flags: -Zsanitizer=safestack -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs b/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
index 64be1127786..6ef0f0406d2 100644
--- a/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
+++ b/tests/codegen/src-hash-algorithm/src-hash-algorithm-md5.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g -Z src-hash-algorithm=md5
+// compile-flags: -g -Z src-hash-algorithm=md5 -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
index 54e07152142..ebfa3040aca 100644
--- a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
+++ b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g -Z src-hash-algorithm=sha1
+// compile-flags: -g -Z src-hash-algorithm=sha1 -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
index dc7db8e2372..5ec678d55f3 100644
--- a/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
+++ b/tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs
@@ -1,4 +1,4 @@
-// compile-flags: -g -Z src-hash-algorithm=sha256
+// compile-flags: -g -Z src-hash-algorithm=sha256 -Copt-level=0
 
 #![crate_type = "lib"]
 
diff --git a/tests/codegen/target-cpu-on-functions.rs b/tests/codegen/target-cpu-on-functions.rs
index c043eceb5cd..d5250f22cca 100644
--- a/tests/codegen/target-cpu-on-functions.rs
+++ b/tests/codegen/target-cpu-on-functions.rs
@@ -15,7 +15,8 @@ pub extern "C" fn exported() {
 
 // CHECK-LABEL: ; target_cpu_on_functions::not_exported
 // CHECK-NEXT: ; Function Attrs:
-// CHECK-NEXT: define {{.*}}() {{.*}} #0
+// CHECK-NEXT: define {{.*}}() {{.*}} #1
+#[inline(never)]
 fn not_exported() {}
 
 // CHECK: attributes #0 = {{.*}} "target-cpu"="{{.*}}"
diff --git a/tests/codegen/tied-features-strength.rs b/tests/codegen/tied-features-strength.rs
index 51334c12158..71cea48c4da 100644
--- a/tests/codegen/tied-features-strength.rs
+++ b/tests/codegen/tied-features-strength.rs
@@ -7,16 +7,16 @@
 // are targeting older LLVM versions. Once the min supported version
 // is LLVM-14 we can remove the optional regex matching for this feature.
 
-// [ENABLE_SVE] compile-flags: -C target-feature=+sve
+// [ENABLE_SVE] compile-flags: -C target-feature=+sve -Copt-level=0
 // ENABLE_SVE: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(\+sve,?)|(\+neon,?))*}}" }
 
-// [DISABLE_SVE] compile-flags: -C target-feature=-sve
+// [DISABLE_SVE] compile-flags: -C target-feature=-sve -Copt-level=0
 // DISABLE_SVE: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(-sve,?)|(\+neon,?))*}}" }
 
-// [DISABLE_NEON] compile-flags: -C target-feature=-neon
+// [DISABLE_NEON] compile-flags: -C target-feature=-neon -Copt-level=0
 // DISABLE_NEON: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(-fp-armv8,?)|(-neon,?))*}}" }
 
-// [ENABLE_NEON] compile-flags: -C target-feature=+neon
+// [ENABLE_NEON] compile-flags: -C target-feature=+neon -Copt-level=0
 // ENABLE_NEON: attributes #0 = { {{.*}} "target-features"="{{((\+outline-atomics,?)|(\+v8a,?)?|(\+fp-armv8,?)|(\+neon,?))*}}" }
 
 
diff --git a/tests/codegen/tune-cpu-on-functions.rs b/tests/codegen/tune-cpu-on-functions.rs
index ed8dc0e9383..116f0772d25 100644
--- a/tests/codegen/tune-cpu-on-functions.rs
+++ b/tests/codegen/tune-cpu-on-functions.rs
@@ -3,7 +3,7 @@
 
 // no-prefer-dynamic
 //
-// compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals -Z tune-cpu=generic
+// compile-flags: -C no-prepopulate-passes -C panic=abort -C linker-plugin-lto -Cpasses=name-anon-globals -Z tune-cpu=generic -Copt-level=0
 
 #![crate_type = "staticlib"]
 
diff --git a/tests/codegen/unchecked_shifts.rs b/tests/codegen/unchecked_shifts.rs
index d5f53bedd54..aca9bec77df 100644
--- a/tests/codegen/unchecked_shifts.rs
+++ b/tests/codegen/unchecked_shifts.rs
@@ -2,7 +2,7 @@
 // ignore-debug (because unchecked is checked in debug)
 
 #![crate_type = "lib"]
-#![feature(unchecked_math)]
+#![feature(unchecked_shifts)]
 
 // CHECK-LABEL: @unchecked_shl_unsigned_same
 #[no_mangle]
diff --git a/tests/codegen/vec-reserve-extend.rs b/tests/codegen/vec-reserve-extend.rs
new file mode 100644
index 00000000000..d95220104c2
--- /dev/null
+++ b/tests/codegen/vec-reserve-extend.rs
@@ -0,0 +1,14 @@
+// compile-flags: -O
+
+#![crate_type = "lib"]
+
+// CHECK-LABEL: @should_reserve_once
+#[no_mangle]
+pub fn should_reserve_once(v: &mut Vec<u8>) {
+    // CHECK: tail call void @llvm.assume
+    v.try_reserve(3).unwrap();
+    // CHECK-NOT: call {{.*}}reserve
+    // CHECK-NOT: call {{.*}}do_reserve_and_handle
+    // CHECK-NOT: call {{.*}}__rust_alloc(
+    v.extend([1, 2, 3]);
+}
diff --git a/tests/codegen/vec_pop_push_noop.rs b/tests/codegen/vec_pop_push_noop.rs
new file mode 100644
index 00000000000..8bc7b68a816
--- /dev/null
+++ b/tests/codegen/vec_pop_push_noop.rs
@@ -0,0 +1,24 @@
+// compile-flags: -O
+
+#![crate_type = "lib"]
+
+#[no_mangle]
+// CHECK-LABEL: @noop(
+pub fn noop(v: &mut Vec<u8>) {
+    // CHECK-NOT: reserve_for_push
+    // CHECK-NOT: call
+    // CHECK: tail call void @llvm.assume
+    // CHECK-NOT: reserve_for_push
+    // CHECK-NOT: call
+    // CHECK: ret
+    if let Some(x) = v.pop() {
+        v.push(x)
+    }
+}
+
+#[no_mangle]
+// CHECK-LABEL: @push_byte(
+pub fn push_byte(v: &mut Vec<u8>) {
+    // CHECK: call {{.*}}reserve_for_push
+    v.push(3);
+}
diff --git a/tests/coverage-map/fn_sig_into_try.cov-map b/tests/coverage-map/fn_sig_into_try.cov-map
new file mode 100644
index 00000000000..6e26c61aac9
--- /dev/null
+++ b/tests/coverage-map/fn_sig_into_try.cov-map
@@ -0,0 +1,53 @@
+Function name: fn_sig_into_try::a
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 0a, 01, 04, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Counter(0)) at (prev + 10, 1) to (start + 4, 2)
+
+Function name: fn_sig_into_try::b
+Raw bytes (28): 0x[01, 01, 02, 01, 00, 00, 02, 04, 01, 10, 01, 02, 0f, 00, 02, 0f, 00, 10, 02, 01, 05, 00, 0c, 07, 01, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 2
+- expression 0 operands: lhs = Counter(0), rhs = Zero
+- expression 1 operands: lhs = Zero, rhs = Expression(0, Sub)
+Number of file 0 mappings: 4
+- Code(Counter(0)) at (prev + 16, 1) to (start + 2, 15)
+- Code(Zero) at (prev + 2, 15) to (start + 0, 16)
+- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 12)
+    = (c0 - Zero)
+- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2)
+    = (Zero + (c0 - Zero))
+
+Function name: fn_sig_into_try::c
+Raw bytes (28): 0x[01, 01, 02, 01, 00, 00, 02, 04, 01, 16, 01, 02, 17, 00, 02, 17, 00, 18, 02, 01, 05, 00, 0c, 07, 01, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 2
+- expression 0 operands: lhs = Counter(0), rhs = Zero
+- expression 1 operands: lhs = Zero, rhs = Expression(0, Sub)
+Number of file 0 mappings: 4
+- Code(Counter(0)) at (prev + 22, 1) to (start + 2, 23)
+- Code(Zero) at (prev + 2, 23) to (start + 0, 24)
+- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 12)
+    = (c0 - Zero)
+- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2)
+    = (Zero + (c0 - Zero))
+
+Function name: fn_sig_into_try::d
+Raw bytes (28): 0x[01, 01, 02, 01, 00, 00, 02, 04, 01, 1c, 01, 03, 0f, 00, 03, 0f, 00, 10, 02, 01, 05, 00, 0c, 07, 01, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 2
+- expression 0 operands: lhs = Counter(0), rhs = Zero
+- expression 1 operands: lhs = Zero, rhs = Expression(0, Sub)
+Number of file 0 mappings: 4
+- Code(Counter(0)) at (prev + 28, 1) to (start + 3, 15)
+- Code(Zero) at (prev + 3, 15) to (start + 0, 16)
+- Code(Expression(0, Sub)) at (prev + 1, 5) to (start + 0, 12)
+    = (c0 - Zero)
+- Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2)
+    = (Zero + (c0 - Zero))
+
diff --git a/tests/coverage-map/fn_sig_into_try.rs b/tests/coverage-map/fn_sig_into_try.rs
new file mode 100644
index 00000000000..92850c8a188
--- /dev/null
+++ b/tests/coverage-map/fn_sig_into_try.rs
@@ -0,0 +1,41 @@
+#![feature(coverage_attribute)]
+// compile-flags: --edition=2021
+
+// Regression test for inconsistent handling of function signature spans that
+// are followed by code using the `?` operator.
+//
+// For each of these similar functions, the line containing the function
+// signature should be handled in the same way.
+
+fn a() -> Option<i32>
+{
+    Some(7i32);
+    Some(0)
+}
+
+fn b() -> Option<i32>
+{
+    Some(7i32)?;
+    Some(0)
+}
+
+fn c() -> Option<i32>
+{
+    let _ = Some(7i32)?;
+    Some(0)
+}
+
+fn d() -> Option<i32>
+{
+    let _: () = ();
+    Some(7i32)?;
+    Some(0)
+}
+
+#[coverage(off)]
+fn main() {
+    a();
+    b();
+    c();
+    d();
+}
diff --git a/tests/coverage-map/status-quo/bad_counter_ids.cov-map b/tests/coverage-map/status-quo/bad_counter_ids.cov-map
new file mode 100644
index 00000000000..0b8081acfa6
--- /dev/null
+++ b/tests/coverage-map/status-quo/bad_counter_ids.cov-map
@@ -0,0 +1,98 @@
+Function name: <bad_counter_ids::Foo as core::cmp::PartialEq>::eq
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 11, 00, 1a]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Counter(0)) at (prev + 12, 17) to (start + 0, 26)
+
+Function name: <bad_counter_ids::Foo as core::fmt::Debug>::fmt
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 0a, 00, 0f]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 1
+- Code(Counter(0)) at (prev + 12, 10) to (start + 0, 15)
+
+Function name: bad_counter_ids::eq_bad
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 23, 01, 02, 1f, 00, 03, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 2
+- Code(Counter(0)) at (prev + 35, 1) to (start + 2, 31)
+- Code(Zero) at (prev + 3, 1) to (start + 0, 2)
+
+Function name: bad_counter_ids::eq_bad_message
+Raw bytes (21): 0x[01, 01, 01, 01, 00, 03, 01, 28, 01, 02, 0f, 02, 02, 20, 00, 2b, 00, 01, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 1
+- expression 0 operands: lhs = Counter(0), rhs = Zero
+Number of file 0 mappings: 3
+- Code(Counter(0)) at (prev + 40, 1) to (start + 2, 15)
+- Code(Expression(0, Sub)) at (prev + 2, 32) to (start + 0, 43)
+    = (c0 - Zero)
+- Code(Zero) at (prev + 1, 1) to (start + 0, 2)
+
+Function name: bad_counter_ids::eq_good
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 0f, 01, 02, 1f, 05, 03, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 2
+- Code(Counter(0)) at (prev + 15, 1) to (start + 2, 31)
+- Code(Counter(1)) at (prev + 3, 1) to (start + 0, 2)
+
+Function name: bad_counter_ids::eq_good_message
+Raw bytes (19): 0x[01, 01, 00, 03, 01, 14, 01, 02, 0f, 00, 02, 20, 00, 2b, 05, 01, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 3
+- Code(Counter(0)) at (prev + 20, 1) to (start + 2, 15)
+- Code(Zero) at (prev + 2, 32) to (start + 0, 43)
+- Code(Counter(1)) at (prev + 1, 1) to (start + 0, 2)
+
+Function name: bad_counter_ids::ne_bad
+Raw bytes (14): 0x[01, 01, 00, 02, 01, 2d, 01, 02, 1f, 00, 03, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 2
+- Code(Counter(0)) at (prev + 45, 1) to (start + 2, 31)
+- Code(Zero) at (prev + 3, 1) to (start + 0, 2)
+
+Function name: bad_counter_ids::ne_bad_message
+Raw bytes (19): 0x[01, 01, 00, 03, 01, 32, 01, 02, 0f, 05, 02, 20, 00, 2b, 00, 01, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 0
+Number of file 0 mappings: 3
+- Code(Counter(0)) at (prev + 50, 1) to (start + 2, 15)
+- Code(Counter(1)) at (prev + 2, 32) to (start + 0, 43)
+- Code(Zero) at (prev + 1, 1) to (start + 0, 2)
+
+Function name: bad_counter_ids::ne_good
+Raw bytes (16): 0x[01, 01, 01, 01, 00, 02, 01, 19, 01, 02, 1f, 02, 03, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 1
+- expression 0 operands: lhs = Counter(0), rhs = Zero
+Number of file 0 mappings: 2
+- Code(Counter(0)) at (prev + 25, 1) to (start + 2, 31)
+- Code(Expression(0, Sub)) at (prev + 3, 1) to (start + 0, 2)
+    = (c0 - Zero)
+
+Function name: bad_counter_ids::ne_good_message
+Raw bytes (21): 0x[01, 01, 01, 01, 00, 03, 01, 1e, 01, 02, 0f, 00, 02, 20, 00, 2b, 02, 01, 01, 00, 02]
+Number of files: 1
+- file 0 => global file 1
+Number of expressions: 1
+- expression 0 operands: lhs = Counter(0), rhs = Zero
+Number of file 0 mappings: 3
+- Code(Counter(0)) at (prev + 30, 1) to (start + 2, 15)
+- Code(Zero) at (prev + 2, 32) to (start + 0, 43)
+- Code(Expression(0, Sub)) at (prev + 1, 1) to (start + 0, 2)
+    = (c0 - Zero)
+
diff --git a/tests/coverage-map/status-quo/bad_counter_ids.rs b/tests/coverage-map/status-quo/bad_counter_ids.rs
new file mode 100644
index 00000000000..ef5460102b7
--- /dev/null
+++ b/tests/coverage-map/status-quo/bad_counter_ids.rs
@@ -0,0 +1,66 @@
+#![feature(coverage_attribute)]
+// compile-flags: --edition=2021 -Copt-level=0 -Zmir-opt-level=3
+
+// Regression test for <https://github.com/rust-lang/rust/issues/117012>.
+//
+// If some coverage counters were removed by MIR optimizations, we need to take
+// care not to refer to those counter IDs in coverage mappings, and instead
+// replace them with a constant zero value. If we don't, `llvm-cov` might see
+// a too-large counter ID and silently discard the entire function from its
+// coverage reports.
+
+#[derive(Debug, PartialEq, Eq)]
+struct Foo(u32);
+
+fn eq_good() {
+    println!("a");
+    assert_eq!(Foo(1), Foo(1));
+}
+
+fn eq_good_message() {
+    println!("b");
+    assert_eq!(Foo(1), Foo(1), "message b");
+}
+
+fn ne_good() {
+    println!("c");
+    assert_ne!(Foo(1), Foo(3));
+}
+
+fn ne_good_message() {
+    println!("d");
+    assert_ne!(Foo(1), Foo(3), "message d");
+}
+
+fn eq_bad() {
+    println!("e");
+    assert_eq!(Foo(1), Foo(3));
+}
+
+fn eq_bad_message() {
+    println!("f");
+    assert_eq!(Foo(1), Foo(3), "message f");
+}
+
+fn ne_bad() {
+    println!("g");
+    assert_ne!(Foo(1), Foo(1));
+}
+
+fn ne_bad_message() {
+    println!("h");
+    assert_ne!(Foo(1), Foo(1), "message h");
+}
+
+#[coverage(off)]
+fn main() {
+    eq_good();
+    eq_good_message();
+    ne_good();
+    ne_good_message();
+
+    assert!(std::panic::catch_unwind(eq_bad).is_err());
+    assert!(std::panic::catch_unwind(eq_bad_message).is_err());
+    assert!(std::panic::catch_unwind(ne_bad).is_err());
+    assert!(std::panic::catch_unwind(ne_bad_message).is_err());
+}
diff --git a/tests/coverage-map/status-quo/generator.cov-map b/tests/coverage-map/status-quo/coroutine.cov-map
index 75704bcc223..2f4936d9ab8 100644
--- a/tests/coverage-map/status-quo/generator.cov-map
+++ b/tests/coverage-map/status-quo/coroutine.cov-map
@@ -1,4 +1,4 @@
-Function name: generator::get_u32
+Function name: coroutine::get_u32
 Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 0b, 01, 01, 0b, 05, 01, 0e, 00, 13, 02, 00, 1d, 00, 3c, 07, 01, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
@@ -13,7 +13,7 @@ Number of file 0 mappings: 4
 - Code(Expression(1, Add)) at (prev + 1, 1) to (start + 0, 2)
     = (c1 + (c0 - c1))
 
-Function name: generator::main
+Function name: coroutine::main
 Raw bytes (65): 0x[01, 01, 08, 05, 07, 09, 0d, 11, 15, 1e, 19, 11, 15, 15, 19, 1e, 19, 11, 15, 09, 01, 0f, 01, 02, 16, 01, 07, 0b, 00, 2e, 11, 01, 2b, 00, 2d, 03, 01, 0e, 00, 35, 11, 02, 0b, 00, 2e, 1e, 01, 22, 00, 27, 1a, 00, 2c, 00, 2e, 17, 01, 0e, 00, 35, 1a, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
@@ -42,7 +42,7 @@ Number of file 0 mappings: 9
 - Code(Expression(6, Sub)) at (prev + 2, 1) to (start + 0, 2)
     = ((c4 - c5) - c6)
 
-Function name: generator::main::{closure#0}
+Function name: coroutine::main::{closure#0}
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 11, 1c, 01, 1f, 05, 02, 10, 01, 06]
 Number of files: 1
 - file 0 => global file 1
diff --git a/tests/run-coverage/generator.rs b/tests/coverage-map/status-quo/coroutine.rs
index 4319991021e..86d19af6f4f 100644
--- a/tests/run-coverage/generator.rs
+++ b/tests/coverage-map/status-quo/coroutine.rs
@@ -1,11 +1,11 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 // The following implementation of a function called from a `yield` statement
 // (apparently requiring the Result and the `String` type or constructor)
-// creates conditions where the `generator::StateTransform` MIR transform will
+// creates conditions where the `coroutine::StateTransform` MIR transform will
 // drop all `Counter` `Coverage` statements from a MIR. `simplify.rs` has logic
 // to handle this condition, and still report dead block coverage.
 fn get_u32(val: bool) -> Result<u32, String> {
@@ -14,17 +14,17 @@ fn get_u32(val: bool) -> Result<u32, String> {
 
 fn main() {
     let is_true = std::env::args().len() == 1;
-    let mut generator = || {
+    let mut coroutine = || {
         yield get_u32(is_true);
         return "foo";
     };
 
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Yielded(Ok(1)) => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Yielded(Ok(1)) => {}
         _ => panic!("unexpected return from resume"),
     }
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Complete("foo") => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Complete("foo") => {}
         _ => panic!("unexpected return from resume"),
     }
 }
diff --git a/tests/coverage-map/status-quo/inline-dead.cov-map b/tests/coverage-map/status-quo/inline-dead.cov-map
index 483f7ef79c6..958b423f24c 100644
--- a/tests/coverage-map/status-quo/inline-dead.cov-map
+++ b/tests/coverage-map/status-quo/inline-dead.cov-map
@@ -7,19 +7,19 @@ Number of file 0 mappings: 1
 - Code(Zero) at (prev + 25, 1) to (start + 2, 2)
 
 Function name: inline_dead::live::<false>
-Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 10, 01, 01, 09, 00, 02, 09, 00, 0f, 02, 02, 09, 00, 0a, 07, 02, 01, 00, 02]
+Raw bytes (28): 0x[01, 01, 02, 01, 00, 00, 02, 04, 01, 10, 01, 01, 09, 00, 02, 09, 00, 0f, 02, 02, 09, 00, 0a, 07, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
-- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
+- expression 0 operands: lhs = Counter(0), rhs = Zero
+- expression 1 operands: lhs = Zero, rhs = Expression(0, Sub)
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 16, 1) to (start + 1, 9)
 - Code(Zero) at (prev + 2, 9) to (start + 0, 15)
 - Code(Expression(0, Sub)) at (prev + 2, 9) to (start + 0, 10)
-    = (c0 - c1)
+    = (c0 - Zero)
 - Code(Expression(1, Add)) at (prev + 2, 1) to (start + 0, 2)
-    = (c1 + (c0 - c1))
+    = (Zero + (c0 - Zero))
 
 Function name: inline_dead::main
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 04, 01, 03, 0d, 01, 07, 06, 02, 02]
@@ -31,13 +31,15 @@ Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 7, 6) to (start + 2, 2)
 
 Function name: inline_dead::main::{closure#0}
-Raw bytes (16): 0x[01, 01, 01, 01, 05, 02, 00, 09, 0d, 00, 0e, 03, 02, 05, 00, 06]
+Raw bytes (23): 0x[01, 01, 02, 00, 06, 01, 00, 03, 01, 07, 17, 00, 18, 00, 02, 0d, 00, 0e, 03, 02, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
-Number of expressions: 1
-- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-Number of file 0 mappings: 2
-- Code(Zero) at (prev + 9, 13) to (start + 0, 14)
+Number of expressions: 2
+- expression 0 operands: lhs = Zero, rhs = Expression(1, Sub)
+- expression 1 operands: lhs = Counter(0), rhs = Zero
+Number of file 0 mappings: 3
+- Code(Counter(0)) at (prev + 7, 23) to (start + 0, 24)
+- Code(Zero) at (prev + 2, 13) to (start + 0, 14)
 - Code(Expression(0, Add)) at (prev + 2, 5) to (start + 0, 6)
-    = (c0 + c1)
+    = (Zero + (c0 - Zero))
 
diff --git a/tests/coverage-map/status-quo/issue-84561.cov-map b/tests/coverage-map/status-quo/issue-84561.cov-map
index fe098fd396c..82582b309bf 100644
--- a/tests/coverage-map/status-quo/issue-84561.cov-map
+++ b/tests/coverage-map/status-quo/issue-84561.cov-map
@@ -1,22 +1,21 @@
 Function name: <issue_84561::Foo as core::cmp::PartialEq>::eq
-Raw bytes (14): 0x[01, 01, 00, 02, 01, 04, 0a, 00, 13, 00, 00, 0a, 00, 13]
+Raw bytes (9): 0x[01, 01, 00, 01, 01, 04, 0a, 00, 13]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 0
-Number of file 0 mappings: 2
+Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 4, 10) to (start + 0, 19)
-- Code(Zero) at (prev + 0, 10) to (start + 0, 19)
 
 Function name: <issue_84561::Foo as core::fmt::Debug>::fmt
-Raw bytes (29): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 89, 01, 09, 00, 25, 05, 00, 25, 00, 26, 02, 01, 09, 00, 0f, 07, 01, 05, 00, 06]
+Raw bytes (29): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 88, 01, 05, 01, 25, 05, 01, 25, 00, 26, 02, 01, 09, 00, 0f, 07, 01, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
 Number of file 0 mappings: 4
-- Code(Counter(0)) at (prev + 137, 9) to (start + 0, 37)
-- Code(Counter(1)) at (prev + 0, 37) to (start + 0, 38)
+- Code(Counter(0)) at (prev + 136, 5) to (start + 1, 37)
+- Code(Counter(1)) at (prev + 1, 37) to (start + 0, 38)
 - Code(Expression(0, Sub)) at (prev + 1, 9) to (start + 0, 15)
     = (c0 - c1)
 - Code(Expression(1, Add)) at (prev + 1, 5) to (start + 0, 6)
@@ -86,47 +85,47 @@ Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 165, 9) to (start + 2, 10)
 
 Function name: issue_84561::test3
-Raw bytes (437): 0x[01, 01, 41, 05, 09, 0d, 11, 15, 19, 12, 1d, 15, 19, 21, 25, 1e, 29, 21, 25, 31, 39, 3d, 41, 2e, 45, 3d, 41, 42, 49, 45, 4d, 3f, 51, 42, 49, 45, 4d, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 59, 92, 01, 55, 51, 59, 8f, 01, 5d, 92, 01, 55, 51, 59, 87, 01, 61, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 59, 82, 01, 65, 87, 01, 61, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 59, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, 71, fe, 01, 82, 02, 71, 69, 6d, 69, 6d, 82, 02, 71, 69, 6d, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, f3, 01, 7d, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, ee, 01, 81, 01, f3, 01, 7d, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, 33, 01, 06, 01, 03, 1c, 05, 04, 09, 01, 1c, 02, 02, 05, 04, 1f, 0d, 05, 05, 00, 1f, 06, 01, 05, 00, 1f, 15, 01, 09, 01, 1c, 12, 02, 05, 00, 1f, 0e, 01, 05, 00, 0f, 00, 00, 20, 00, 30, 21, 01, 05, 03, 0f, 00, 03, 20, 00, 30, 00, 00, 33, 00, 41, 00, 00, 4b, 00, 5a, 1e, 01, 05, 00, 0f, 00, 05, 09, 03, 10, 00, 05, 0d, 00, 1b, 00, 02, 0d, 00, 1c, 1a, 04, 09, 05, 06, 31, 06, 05, 03, 06, 22, 04, 05, 03, 06, 3d, 04, 09, 04, 06, 2e, 05, 08, 00, 0f, 45, 01, 09, 03, 0a, 2a, 05, 09, 03, 0a, 3f, 05, 08, 00, 0f, 51, 01, 09, 00, 13, 00, 03, 0d, 00, 1d, 3a, 03, 09, 00, 13, 00, 03, 0d, 00, 1d, 87, 01, 03, 05, 00, 0f, 8f, 01, 01, 0c, 00, 13, 5d, 01, 0d, 00, 13, 8a, 01, 02, 0d, 00, 13, 82, 01, 04, 05, 02, 13, 65, 03, 0d, 00, 13, 7e, 02, 0d, 00, 13, f3, 01, 03, 05, 00, 0f, 69, 01, 0c, 00, 13, 6d, 01, 0d, 03, 0e, 75, 04, 0d, 00, 13, fb, 01, 02, 0d, 00, 17, 82, 02, 01, 14, 00, 1b, 71, 01, 15, 00, 1b, fe, 01, 02, 15, 00, 1b, f6, 01, 04, 0d, 00, 13, 7d, 03, 09, 00, 19, ee, 01, 02, 05, 00, 0f, ea, 01, 03, 09, 00, 22, 00, 02, 05, 00, 0f, 00, 03, 09, 00, 2c, 00, 02, 01, 00, 02]
+Raw bytes (436): 0x[01, 01, 41, 05, 09, 0d, 00, 15, 19, 12, 00, 15, 19, 21, 00, 1e, 00, 21, 00, 31, 00, 3d, 41, 2e, 45, 3d, 41, 42, 49, 45, 00, 3f, 51, 42, 49, 45, 00, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 00, 92, 01, 55, 51, 00, 8f, 01, 5d, 92, 01, 55, 51, 00, 87, 01, 61, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 00, 82, 01, 65, 87, 01, 61, 5d, 8a, 01, 8f, 01, 5d, 92, 01, 55, 51, 00, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, 71, fe, 01, 82, 02, 71, 69, 6d, 69, 6d, 82, 02, 71, 69, 6d, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, f3, 01, 7d, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, ee, 01, 00, f3, 01, 7d, 75, f6, 01, fb, 01, 79, 71, fe, 01, 82, 02, 71, 69, 6d, 33, 01, 06, 01, 03, 1c, 05, 04, 09, 01, 1c, 02, 02, 05, 04, 1f, 0d, 05, 05, 00, 1f, 06, 01, 05, 00, 1f, 15, 01, 09, 01, 1c, 12, 02, 05, 00, 1f, 0e, 01, 05, 00, 0f, 00, 00, 20, 00, 30, 21, 01, 05, 03, 0f, 00, 03, 20, 00, 30, 00, 00, 33, 00, 41, 00, 00, 4b, 00, 5a, 1e, 01, 05, 00, 0f, 00, 05, 09, 03, 10, 00, 05, 0d, 00, 1b, 00, 02, 0d, 00, 1c, 1a, 04, 09, 05, 06, 31, 06, 05, 03, 06, 22, 04, 05, 03, 06, 3d, 04, 09, 04, 06, 2e, 05, 08, 00, 0f, 45, 01, 09, 03, 0a, 2a, 05, 09, 03, 0a, 3f, 05, 08, 00, 0f, 51, 01, 09, 00, 13, 00, 03, 0d, 00, 1d, 3a, 03, 09, 00, 13, 00, 03, 0d, 00, 1d, 87, 01, 03, 05, 00, 0f, 8f, 01, 01, 0c, 00, 13, 5d, 01, 0d, 00, 13, 8a, 01, 02, 0d, 00, 13, 82, 01, 04, 05, 02, 13, 65, 03, 0d, 00, 13, 7e, 02, 0d, 00, 13, f3, 01, 03, 05, 00, 0f, 69, 01, 0c, 00, 13, 6d, 01, 0d, 03, 0e, 75, 04, 0d, 00, 13, fb, 01, 02, 0d, 00, 17, 82, 02, 01, 14, 00, 1b, 71, 01, 15, 00, 1b, fe, 01, 02, 15, 00, 1b, f6, 01, 04, 0d, 00, 13, 7d, 03, 09, 00, 19, ee, 01, 02, 05, 00, 0f, ea, 01, 03, 09, 00, 22, 00, 02, 05, 00, 0f, 00, 03, 09, 00, 2c, 00, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 65
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
-- expression 1 operands: lhs = Counter(3), rhs = Counter(4)
+- expression 1 operands: lhs = Counter(3), rhs = Zero
 - expression 2 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 3 operands: lhs = Expression(4, Sub), rhs = Counter(7)
+- expression 3 operands: lhs = Expression(4, Sub), rhs = Zero
 - expression 4 operands: lhs = Counter(5), rhs = Counter(6)
-- expression 5 operands: lhs = Counter(8), rhs = Counter(9)
-- expression 6 operands: lhs = Expression(7, Sub), rhs = Counter(10)
-- expression 7 operands: lhs = Counter(8), rhs = Counter(9)
-- expression 8 operands: lhs = Counter(12), rhs = Counter(14)
+- expression 5 operands: lhs = Counter(8), rhs = Zero
+- expression 6 operands: lhs = Expression(7, Sub), rhs = Zero
+- expression 7 operands: lhs = Counter(8), rhs = Zero
+- expression 8 operands: lhs = Counter(12), rhs = Zero
 - expression 9 operands: lhs = Counter(15), rhs = Counter(16)
 - expression 10 operands: lhs = Expression(11, Sub), rhs = Counter(17)
 - expression 11 operands: lhs = Counter(15), rhs = Counter(16)
 - expression 12 operands: lhs = Expression(16, Sub), rhs = Counter(18)
-- expression 13 operands: lhs = Counter(17), rhs = Counter(19)
+- expression 13 operands: lhs = Counter(17), rhs = Zero
 - expression 14 operands: lhs = Expression(15, Add), rhs = Counter(20)
 - expression 15 operands: lhs = Expression(16, Sub), rhs = Counter(18)
-- expression 16 operands: lhs = Counter(17), rhs = Counter(19)
+- expression 16 operands: lhs = Counter(17), rhs = Zero
 - expression 17 operands: lhs = Counter(23), rhs = Expression(34, Sub)
 - expression 18 operands: lhs = Expression(35, Add), rhs = Counter(23)
 - expression 19 operands: lhs = Expression(36, Sub), rhs = Counter(21)
-- expression 20 operands: lhs = Counter(20), rhs = Counter(22)
+- expression 20 operands: lhs = Counter(20), rhs = Zero
 - expression 21 operands: lhs = Expression(36, Sub), rhs = Counter(21)
-- expression 22 operands: lhs = Counter(20), rhs = Counter(22)
+- expression 22 operands: lhs = Counter(20), rhs = Zero
 - expression 23 operands: lhs = Expression(35, Add), rhs = Counter(23)
 - expression 24 operands: lhs = Expression(36, Sub), rhs = Counter(21)
-- expression 25 operands: lhs = Counter(20), rhs = Counter(22)
+- expression 25 operands: lhs = Counter(20), rhs = Zero
 - expression 26 operands: lhs = Expression(33, Add), rhs = Counter(24)
 - expression 27 operands: lhs = Counter(23), rhs = Expression(34, Sub)
 - expression 28 operands: lhs = Expression(35, Add), rhs = Counter(23)
 - expression 29 operands: lhs = Expression(36, Sub), rhs = Counter(21)
-- expression 30 operands: lhs = Counter(20), rhs = Counter(22)
+- expression 30 operands: lhs = Counter(20), rhs = Zero
 - expression 31 operands: lhs = Expression(32, Sub), rhs = Counter(25)
 - expression 32 operands: lhs = Expression(33, Add), rhs = Counter(24)
 - expression 33 operands: lhs = Counter(23), rhs = Expression(34, Sub)
 - expression 34 operands: lhs = Expression(35, Add), rhs = Counter(23)
 - expression 35 operands: lhs = Expression(36, Sub), rhs = Counter(21)
-- expression 36 operands: lhs = Counter(20), rhs = Counter(22)
+- expression 36 operands: lhs = Counter(20), rhs = Zero
 - expression 37 operands: lhs = Counter(29), rhs = Expression(61, Sub)
 - expression 38 operands: lhs = Expression(62, Add), rhs = Counter(30)
 - expression 39 operands: lhs = Counter(28), rhs = Expression(63, Sub)
@@ -148,7 +147,7 @@ Number of expressions: 65
 - expression 55 operands: lhs = Counter(28), rhs = Expression(63, Sub)
 - expression 56 operands: lhs = Expression(64, Sub), rhs = Counter(28)
 - expression 57 operands: lhs = Counter(26), rhs = Counter(27)
-- expression 58 operands: lhs = Expression(59, Sub), rhs = Counter(32)
+- expression 58 operands: lhs = Expression(59, Sub), rhs = Zero
 - expression 59 operands: lhs = Expression(60, Add), rhs = Counter(31)
 - expression 60 operands: lhs = Counter(29), rhs = Expression(61, Sub)
 - expression 61 operands: lhs = Expression(62, Add), rhs = Counter(30)
@@ -162,27 +161,27 @@ Number of file 0 mappings: 51
     = (c1 - c2)
 - Code(Counter(3)) at (prev + 5, 5) to (start + 0, 31)
 - Code(Expression(1, Sub)) at (prev + 1, 5) to (start + 0, 31)
-    = (c3 - c4)
+    = (c3 - Zero)
 - Code(Counter(5)) at (prev + 1, 9) to (start + 1, 28)
 - Code(Expression(4, Sub)) at (prev + 2, 5) to (start + 0, 31)
     = (c5 - c6)
 - Code(Expression(3, Sub)) at (prev + 1, 5) to (start + 0, 15)
-    = ((c5 - c6) - c7)
+    = ((c5 - c6) - Zero)
 - Code(Zero) at (prev + 0, 32) to (start + 0, 48)
 - Code(Counter(8)) at (prev + 1, 5) to (start + 3, 15)
 - Code(Zero) at (prev + 3, 32) to (start + 0, 48)
 - Code(Zero) at (prev + 0, 51) to (start + 0, 65)
 - Code(Zero) at (prev + 0, 75) to (start + 0, 90)
 - Code(Expression(7, Sub)) at (prev + 1, 5) to (start + 0, 15)
-    = (c8 - c9)
+    = (c8 - Zero)
 - Code(Zero) at (prev + 5, 9) to (start + 3, 16)
 - Code(Zero) at (prev + 5, 13) to (start + 0, 27)
 - Code(Zero) at (prev + 2, 13) to (start + 0, 28)
 - Code(Expression(6, Sub)) at (prev + 4, 9) to (start + 5, 6)
-    = ((c8 - c9) - c10)
+    = ((c8 - Zero) - Zero)
 - Code(Counter(12)) at (prev + 6, 5) to (start + 3, 6)
 - Code(Expression(8, Sub)) at (prev + 4, 5) to (start + 3, 6)
-    = (c12 - c14)
+    = (c12 - Zero)
 - Code(Counter(15)) at (prev + 4, 9) to (start + 4, 6)
 - Code(Expression(11, Sub)) at (prev + 5, 8) to (start + 0, 15)
     = (c15 - c16)
@@ -190,24 +189,24 @@ Number of file 0 mappings: 51
 - Code(Expression(10, Sub)) at (prev + 5, 9) to (start + 3, 10)
     = ((c15 - c16) - c17)
 - Code(Expression(15, Add)) at (prev + 5, 8) to (start + 0, 15)
-    = ((c17 - c19) + c18)
+    = ((c17 - Zero) + c18)
 - Code(Counter(20)) at (prev + 1, 9) to (start + 0, 19)
 - Code(Zero) at (prev + 3, 13) to (start + 0, 29)
 - Code(Expression(14, Sub)) at (prev + 3, 9) to (start + 0, 19)
-    = (((c17 - c19) + c18) - c20)
+    = (((c17 - Zero) + c18) - c20)
 - Code(Zero) at (prev + 3, 13) to (start + 0, 29)
 - Code(Expression(33, Add)) at (prev + 3, 5) to (start + 0, 15)
-    = (c23 + (((c20 - c22) + c21) - c23))
+    = (c23 + (((c20 - Zero) + c21) - c23))
 - Code(Expression(35, Add)) at (prev + 1, 12) to (start + 0, 19)
-    = ((c20 - c22) + c21)
+    = ((c20 - Zero) + c21)
 - Code(Counter(23)) at (prev + 1, 13) to (start + 0, 19)
 - Code(Expression(34, Sub)) at (prev + 2, 13) to (start + 0, 19)
-    = (((c20 - c22) + c21) - c23)
+    = (((c20 - Zero) + c21) - c23)
 - Code(Expression(32, Sub)) at (prev + 4, 5) to (start + 2, 19)
-    = ((c23 + (((c20 - c22) + c21) - c23)) - c24)
+    = ((c23 + (((c20 - Zero) + c21) - c23)) - c24)
 - Code(Counter(25)) at (prev + 3, 13) to (start + 0, 19)
 - Code(Expression(31, Sub)) at (prev + 2, 13) to (start + 0, 19)
-    = (((c23 + (((c20 - c22) + c21) - c23)) - c24) - c25)
+    = (((c23 + (((c20 - Zero) + c21) - c23)) - c24) - c25)
 - Code(Expression(60, Add)) at (prev + 3, 5) to (start + 0, 15)
     = (c29 + ((c28 + ((c26 - c27) - c28)) - c30))
 - Code(Counter(26)) at (prev + 1, 12) to (start + 0, 19)
@@ -226,7 +225,7 @@ Number of file 0 mappings: 51
 - Code(Expression(59, Sub)) at (prev + 2, 5) to (start + 0, 15)
     = ((c29 + ((c28 + ((c26 - c27) - c28)) - c30)) - c31)
 - Code(Expression(58, Sub)) at (prev + 3, 9) to (start + 0, 34)
-    = (((c29 + ((c28 + ((c26 - c27) - c28)) - c30)) - c31) - c32)
+    = (((c29 + ((c28 + ((c26 - c27) - c28)) - c30)) - c31) - Zero)
 - Code(Zero) at (prev + 2, 5) to (start + 0, 15)
 - Code(Zero) at (prev + 3, 9) to (start + 0, 44)
 - Code(Zero) at (prev + 2, 1) to (start + 0, 2)
diff --git a/tests/coverage-map/status-quo/loops_branches.cov-map b/tests/coverage-map/status-quo/loops_branches.cov-map
index ebace8cbd71..813583a9de7 100644
--- a/tests/coverage-map/status-quo/loops_branches.cov-map
+++ b/tests/coverage-map/status-quo/loops_branches.cov-map
@@ -1,177 +1,177 @@
 Function name: <loops_branches::DebugTest as core::fmt::Debug>::fmt
-Raw bytes (249): 0x[01, 01, 31, 05, 09, 00, 02, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 15, bf, 01, c3, 01, 0d, 00, 11, 15, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 15, b6, 01, 15, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 15, b2, 01, 1d, b6, 01, 15, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 15, 00, ae, 01, b2, 01, 1d, b6, 01, 15, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 15, ab, 01, 11, 00, ae, 01, b2, 01, 1d, b6, 01, 15, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 15, 25, a3, 01, a6, 01, 19, ab, 01, 11, 00, ae, 01, b2, 01, 1d, b6, 01, 15, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 15, 14, 01, 09, 05, 01, 10, 05, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 02, 01, 0e, 00, 0f, 07, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, b6, 01, 03, 0d, 00, 0e, bb, 01, 00, 12, 00, 17, b6, 01, 01, 10, 00, 14, b2, 01, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, ae, 01, 01, 12, 00, 13, ab, 01, 01, 11, 00, 22, a6, 01, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 19, 03, 09, 00, 0f, 9f, 01, 01, 05, 00, 06]
+Raw bytes (249): 0x[01, 01, 31, 05, 00, 00, 02, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, bf, 01, c3, 01, 0d, 00, 11, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, ab, 01, 11, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, 25, a3, 01, a6, 01, 19, ab, 01, 11, 00, ae, 01, b2, 01, 00, b6, 01, 00, bb, 01, 19, bf, 01, c3, 01, 0d, 00, 11, 00, 14, 01, 09, 05, 01, 10, 05, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 02, 01, 0e, 00, 0f, 07, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, b6, 01, 03, 0d, 00, 0e, bb, 01, 00, 12, 00, 17, b6, 01, 01, 10, 00, 14, b2, 01, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, ae, 01, 01, 12, 00, 13, ab, 01, 01, 11, 00, 22, a6, 01, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 19, 03, 09, 00, 0f, 9f, 01, 01, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 49
-- expression 0 operands: lhs = Counter(1), rhs = Counter(2)
+- expression 0 operands: lhs = Counter(1), rhs = Zero
 - expression 1 operands: lhs = Zero, rhs = Expression(0, Sub)
 - expression 2 operands: lhs = Expression(46, Add), rhs = Counter(6)
 - expression 3 operands: lhs = Expression(47, Add), rhs = Expression(48, Add)
 - expression 4 operands: lhs = Counter(3), rhs = Zero
-- expression 5 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 5 operands: lhs = Counter(4), rhs = Zero
 - expression 6 operands: lhs = Expression(47, Add), rhs = Expression(48, Add)
 - expression 7 operands: lhs = Counter(3), rhs = Zero
-- expression 8 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 8 operands: lhs = Counter(4), rhs = Zero
 - expression 9 operands: lhs = Expression(46, Add), rhs = Counter(6)
 - expression 10 operands: lhs = Expression(47, Add), rhs = Expression(48, Add)
 - expression 11 operands: lhs = Counter(3), rhs = Zero
-- expression 12 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 13 operands: lhs = Expression(45, Sub), rhs = Counter(5)
+- expression 12 operands: lhs = Counter(4), rhs = Zero
+- expression 13 operands: lhs = Expression(45, Sub), rhs = Zero
 - expression 14 operands: lhs = Expression(46, Add), rhs = Counter(6)
 - expression 15 operands: lhs = Expression(47, Add), rhs = Expression(48, Add)
 - expression 16 operands: lhs = Counter(3), rhs = Zero
-- expression 17 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 18 operands: lhs = Expression(44, Sub), rhs = Counter(7)
-- expression 19 operands: lhs = Expression(45, Sub), rhs = Counter(5)
+- expression 17 operands: lhs = Counter(4), rhs = Zero
+- expression 18 operands: lhs = Expression(44, Sub), rhs = Zero
+- expression 19 operands: lhs = Expression(45, Sub), rhs = Zero
 - expression 20 operands: lhs = Expression(46, Add), rhs = Counter(6)
 - expression 21 operands: lhs = Expression(47, Add), rhs = Expression(48, Add)
 - expression 22 operands: lhs = Counter(3), rhs = Zero
-- expression 23 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 23 operands: lhs = Counter(4), rhs = Zero
 - expression 24 operands: lhs = Zero, rhs = Expression(43, Sub)
-- expression 25 operands: lhs = Expression(44, Sub), rhs = Counter(7)
-- expression 26 operands: lhs = Expression(45, Sub), rhs = Counter(5)
+- expression 25 operands: lhs = Expression(44, Sub), rhs = Zero
+- expression 26 operands: lhs = Expression(45, Sub), rhs = Zero
 - expression 27 operands: lhs = Expression(46, Add), rhs = Counter(6)
 - expression 28 operands: lhs = Expression(47, Add), rhs = Expression(48, Add)
 - expression 29 operands: lhs = Counter(3), rhs = Zero
-- expression 30 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 30 operands: lhs = Counter(4), rhs = Zero
 - expression 31 operands: lhs = Expression(42, Add), rhs = Counter(4)
 - expression 32 operands: lhs = Zero, rhs = Expression(43, Sub)
-- expression 33 operands: lhs = Expression(44, Sub), rhs = Counter(7)
-- expression 34 operands: lhs = Expression(45, Sub), rhs = Counter(5)
+- expression 33 operands: lhs = Expression(44, Sub), rhs = Zero
+- expression 34 operands: lhs = Expression(45, Sub), rhs = Zero
 - expression 35 operands: lhs = Expression(46, Add), rhs = Counter(6)
 - expression 36 operands: lhs = Expression(47, Add), rhs = Expression(48, Add)
 - expression 37 operands: lhs = Counter(3), rhs = Zero
-- expression 38 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 38 operands: lhs = Counter(4), rhs = Zero
 - expression 39 operands: lhs = Counter(9), rhs = Expression(40, Add)
 - expression 40 operands: lhs = Expression(41, Sub), rhs = Counter(6)
 - expression 41 operands: lhs = Expression(42, Add), rhs = Counter(4)
 - expression 42 operands: lhs = Zero, rhs = Expression(43, Sub)
-- expression 43 operands: lhs = Expression(44, Sub), rhs = Counter(7)
-- expression 44 operands: lhs = Expression(45, Sub), rhs = Counter(5)
+- expression 43 operands: lhs = Expression(44, Sub), rhs = Zero
+- expression 44 operands: lhs = Expression(45, Sub), rhs = Zero
 - expression 45 operands: lhs = Expression(46, Add), rhs = Counter(6)
 - expression 46 operands: lhs = Expression(47, Add), rhs = Expression(48, Add)
 - expression 47 operands: lhs = Counter(3), rhs = Zero
-- expression 48 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 48 operands: lhs = Counter(4), rhs = Zero
 Number of file 0 mappings: 20
 - Code(Counter(0)) at (prev + 9, 5) to (start + 1, 16)
 - Code(Counter(1)) at (prev + 2, 16) to (start + 0, 21)
 - Code(Zero) at (prev + 1, 23) to (start + 0, 27)
 - Code(Zero) at (prev + 0, 28) to (start + 0, 30)
 - Code(Expression(0, Sub)) at (prev + 1, 14) to (start + 0, 15)
-    = (c1 - c2)
+    = (c1 - Zero)
 - Code(Expression(1, Add)) at (prev + 1, 13) to (start + 0, 30)
-    = (Zero + (c1 - c2))
+    = (Zero + (c1 - Zero))
 - Code(Counter(9)) at (prev + 0, 30) to (start + 0, 31)
 - Code(Zero) at (prev + 1, 16) to (start + 1, 10)
 - Code(Expression(45, Sub)) at (prev + 3, 13) to (start + 0, 14)
-    = (((c3 + Zero) + (c4 + c5)) - c6)
+    = (((c3 + Zero) + (c4 + Zero)) - c6)
 - Code(Expression(46, Add)) at (prev + 0, 18) to (start + 0, 23)
-    = ((c3 + Zero) + (c4 + c5))
+    = ((c3 + Zero) + (c4 + Zero))
 - Code(Expression(45, Sub)) at (prev + 1, 16) to (start + 0, 20)
-    = (((c3 + Zero) + (c4 + c5)) - c6)
+    = (((c3 + Zero) + (c4 + Zero)) - c6)
 - Code(Expression(44, Sub)) at (prev + 1, 20) to (start + 0, 25)
-    = ((((c3 + Zero) + (c4 + c5)) - c6) - c5)
+    = ((((c3 + Zero) + (c4 + Zero)) - c6) - Zero)
 - Code(Zero) at (prev + 1, 27) to (start + 0, 31)
 - Code(Zero) at (prev + 0, 32) to (start + 0, 34)
 - Code(Expression(43, Sub)) at (prev + 1, 18) to (start + 0, 19)
-    = (((((c3 + Zero) + (c4 + c5)) - c6) - c5) - c7)
+    = (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - Zero)
 - Code(Expression(42, Add)) at (prev + 1, 17) to (start + 0, 34)
-    = (Zero + (((((c3 + Zero) + (c4 + c5)) - c6) - c5) - c7))
+    = (Zero + (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - Zero))
 - Code(Expression(41, Sub)) at (prev + 0, 34) to (start + 0, 35)
-    = ((Zero + (((((c3 + Zero) + (c4 + c5)) - c6) - c5) - c7)) - c4)
+    = ((Zero + (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - Zero)) - c4)
 - Code(Zero) at (prev + 1, 20) to (start + 1, 14)
 - Code(Counter(6)) at (prev + 3, 9) to (start + 0, 15)
 - Code(Expression(39, Add)) at (prev + 1, 5) to (start + 0, 6)
-    = (c9 + (((Zero + (((((c3 + Zero) + (c4 + c5)) - c6) - c5) - c7)) - c4) + c6))
+    = (c9 + (((Zero + (((((c3 + Zero) + (c4 + Zero)) - c6) - Zero) - Zero)) - c4) + c6))
 
 Function name: <loops_branches::DisplayTest as core::fmt::Display>::fmt
-Raw bytes (253): 0x[01, 01, 33, 01, 05, 02, 09, 00, 0e, 02, 09, bf, 01, 19, c3, 01, c7, 01, 05, 0d, 11, 15, c3, 01, c7, 01, 05, 0d, 11, 15, bf, 01, 19, c3, 01, c7, 01, 05, 0d, 11, 15, ba, 01, 11, bf, 01, 19, c3, 01, c7, 01, 05, 0d, 11, 15, b6, 01, 1d, ba, 01, 11, bf, 01, 19, c3, 01, c7, 01, 05, 0d, 11, 15, 00, b2, 01, b6, 01, 1d, ba, 01, 11, bf, 01, 19, c3, 01, c7, 01, 05, 0d, 11, 15, af, 01, 15, 00, b2, 01, b6, 01, 1d, ba, 01, 11, bf, 01, 19, c3, 01, c7, 01, 05, 0d, 11, 15, aa, 01, cb, 01, af, 01, 15, 00, b2, 01, b6, 01, 1d, ba, 01, 11, bf, 01, 19, c3, 01, c7, 01, 05, 0d, 11, 15, 19, 25, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 02, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 0e, 01, 0e, 00, 0f, 0b, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, ba, 01, 02, 0d, 00, 0e, bf, 01, 00, 12, 00, 17, ba, 01, 01, 10, 00, 15, 00, 00, 16, 01, 0e, b6, 01, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, b2, 01, 01, 12, 00, 13, af, 01, 01, 11, 00, 22, aa, 01, 00, 22, 00, 23, 19, 03, 09, 00, 0f, a7, 01, 01, 05, 00, 06]
+Raw bytes (253): 0x[01, 01, 33, 01, 00, 02, 00, 00, 0e, 02, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, c3, 01, c7, 01, 00, 0d, 00, 15, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, 00, b2, 01, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, af, 01, 15, 00, b2, 01, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, aa, 01, cb, 01, af, 01, 15, 00, b2, 01, b6, 01, 00, ba, 01, 00, bf, 01, 19, c3, 01, c7, 01, 00, 0d, 00, 15, 19, 25, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 02, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 0e, 01, 0e, 00, 0f, 0b, 01, 0d, 00, 1e, 25, 00, 1e, 00, 1f, ba, 01, 02, 0d, 00, 0e, bf, 01, 00, 12, 00, 17, ba, 01, 01, 10, 00, 15, 00, 00, 16, 01, 0e, b6, 01, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, b2, 01, 01, 12, 00, 13, af, 01, 01, 11, 00, 22, aa, 01, 00, 22, 00, 23, 19, 03, 09, 00, 0f, a7, 01, 01, 05, 00, 06]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 51
-- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(0, Sub), rhs = Counter(2)
+- expression 0 operands: lhs = Counter(0), rhs = Zero
+- expression 1 operands: lhs = Expression(0, Sub), rhs = Zero
 - expression 2 operands: lhs = Zero, rhs = Expression(3, Sub)
-- expression 3 operands: lhs = Expression(0, Sub), rhs = Counter(2)
+- expression 3 operands: lhs = Expression(0, Sub), rhs = Zero
 - expression 4 operands: lhs = Expression(47, Add), rhs = Counter(6)
 - expression 5 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
-- expression 6 operands: lhs = Counter(1), rhs = Counter(3)
-- expression 7 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 6 operands: lhs = Zero, rhs = Counter(3)
+- expression 7 operands: lhs = Zero, rhs = Counter(5)
 - expression 8 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
-- expression 9 operands: lhs = Counter(1), rhs = Counter(3)
-- expression 10 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 9 operands: lhs = Zero, rhs = Counter(3)
+- expression 10 operands: lhs = Zero, rhs = Counter(5)
 - expression 11 operands: lhs = Expression(47, Add), rhs = Counter(6)
 - expression 12 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
-- expression 13 operands: lhs = Counter(1), rhs = Counter(3)
-- expression 14 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 15 operands: lhs = Expression(46, Sub), rhs = Counter(4)
+- expression 13 operands: lhs = Zero, rhs = Counter(3)
+- expression 14 operands: lhs = Zero, rhs = Counter(5)
+- expression 15 operands: lhs = Expression(46, Sub), rhs = Zero
 - expression 16 operands: lhs = Expression(47, Add), rhs = Counter(6)
 - expression 17 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
-- expression 18 operands: lhs = Counter(1), rhs = Counter(3)
-- expression 19 operands: lhs = Counter(4), rhs = Counter(5)
-- expression 20 operands: lhs = Expression(45, Sub), rhs = Counter(7)
-- expression 21 operands: lhs = Expression(46, Sub), rhs = Counter(4)
+- expression 18 operands: lhs = Zero, rhs = Counter(3)
+- expression 19 operands: lhs = Zero, rhs = Counter(5)
+- expression 20 operands: lhs = Expression(45, Sub), rhs = Zero
+- expression 21 operands: lhs = Expression(46, Sub), rhs = Zero
 - expression 22 operands: lhs = Expression(47, Add), rhs = Counter(6)
 - expression 23 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
-- expression 24 operands: lhs = Counter(1), rhs = Counter(3)
-- expression 25 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 24 operands: lhs = Zero, rhs = Counter(3)
+- expression 25 operands: lhs = Zero, rhs = Counter(5)
 - expression 26 operands: lhs = Zero, rhs = Expression(44, Sub)
-- expression 27 operands: lhs = Expression(45, Sub), rhs = Counter(7)
-- expression 28 operands: lhs = Expression(46, Sub), rhs = Counter(4)
+- expression 27 operands: lhs = Expression(45, Sub), rhs = Zero
+- expression 28 operands: lhs = Expression(46, Sub), rhs = Zero
 - expression 29 operands: lhs = Expression(47, Add), rhs = Counter(6)
 - expression 30 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
-- expression 31 operands: lhs = Counter(1), rhs = Counter(3)
-- expression 32 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 31 operands: lhs = Zero, rhs = Counter(3)
+- expression 32 operands: lhs = Zero, rhs = Counter(5)
 - expression 33 operands: lhs = Expression(43, Add), rhs = Counter(5)
 - expression 34 operands: lhs = Zero, rhs = Expression(44, Sub)
-- expression 35 operands: lhs = Expression(45, Sub), rhs = Counter(7)
-- expression 36 operands: lhs = Expression(46, Sub), rhs = Counter(4)
+- expression 35 operands: lhs = Expression(45, Sub), rhs = Zero
+- expression 36 operands: lhs = Expression(46, Sub), rhs = Zero
 - expression 37 operands: lhs = Expression(47, Add), rhs = Counter(6)
 - expression 38 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
-- expression 39 operands: lhs = Counter(1), rhs = Counter(3)
-- expression 40 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 39 operands: lhs = Zero, rhs = Counter(3)
+- expression 40 operands: lhs = Zero, rhs = Counter(5)
 - expression 41 operands: lhs = Expression(42, Sub), rhs = Expression(50, Add)
 - expression 42 operands: lhs = Expression(43, Add), rhs = Counter(5)
 - expression 43 operands: lhs = Zero, rhs = Expression(44, Sub)
-- expression 44 operands: lhs = Expression(45, Sub), rhs = Counter(7)
-- expression 45 operands: lhs = Expression(46, Sub), rhs = Counter(4)
+- expression 44 operands: lhs = Expression(45, Sub), rhs = Zero
+- expression 45 operands: lhs = Expression(46, Sub), rhs = Zero
 - expression 46 operands: lhs = Expression(47, Add), rhs = Counter(6)
 - expression 47 operands: lhs = Expression(48, Add), rhs = Expression(49, Add)
-- expression 48 operands: lhs = Counter(1), rhs = Counter(3)
-- expression 49 operands: lhs = Counter(4), rhs = Counter(5)
+- expression 48 operands: lhs = Zero, rhs = Counter(3)
+- expression 49 operands: lhs = Zero, rhs = Counter(5)
 - expression 50 operands: lhs = Counter(6), rhs = Counter(9)
 Number of file 0 mappings: 20
 - Code(Counter(0)) at (prev + 34, 5) to (start + 1, 17)
 - Code(Zero) at (prev + 1, 18) to (start + 1, 10)
 - Code(Expression(0, Sub)) at (prev + 2, 16) to (start + 0, 21)
-    = (c0 - c1)
+    = (c0 - Zero)
 - Code(Zero) at (prev + 1, 23) to (start + 0, 27)
 - Code(Zero) at (prev + 0, 28) to (start + 0, 30)
 - Code(Expression(3, Sub)) at (prev + 1, 14) to (start + 0, 15)
-    = ((c0 - c1) - c2)
+    = ((c0 - Zero) - Zero)
 - Code(Expression(2, Add)) at (prev + 1, 13) to (start + 0, 30)
-    = (Zero + ((c0 - c1) - c2))
+    = (Zero + ((c0 - Zero) - Zero))
 - Code(Counter(9)) at (prev + 0, 30) to (start + 0, 31)
 - Code(Expression(46, Sub)) at (prev + 2, 13) to (start + 0, 14)
-    = (((c1 + c3) + (c4 + c5)) - c6)
+    = (((Zero + c3) + (Zero + c5)) - c6)
 - Code(Expression(47, Add)) at (prev + 0, 18) to (start + 0, 23)
-    = ((c1 + c3) + (c4 + c5))
+    = ((Zero + c3) + (Zero + c5))
 - Code(Expression(46, Sub)) at (prev + 1, 16) to (start + 0, 21)
-    = (((c1 + c3) + (c4 + c5)) - c6)
+    = (((Zero + c3) + (Zero + c5)) - c6)
 - Code(Zero) at (prev + 0, 22) to (start + 1, 14)
 - Code(Expression(45, Sub)) at (prev + 2, 20) to (start + 0, 25)
-    = ((((c1 + c3) + (c4 + c5)) - c6) - c4)
+    = ((((Zero + c3) + (Zero + c5)) - c6) - Zero)
 - Code(Zero) at (prev + 1, 27) to (start + 0, 31)
 - Code(Zero) at (prev + 0, 32) to (start + 0, 34)
 - Code(Expression(44, Sub)) at (prev + 1, 18) to (start + 0, 19)
-    = (((((c1 + c3) + (c4 + c5)) - c6) - c4) - c7)
+    = (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero)
 - Code(Expression(43, Add)) at (prev + 1, 17) to (start + 0, 34)
-    = (Zero + (((((c1 + c3) + (c4 + c5)) - c6) - c4) - c7))
+    = (Zero + (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero))
 - Code(Expression(42, Sub)) at (prev + 0, 34) to (start + 0, 35)
-    = ((Zero + (((((c1 + c3) + (c4 + c5)) - c6) - c4) - c7)) - c5)
+    = ((Zero + (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero)) - c5)
 - Code(Counter(6)) at (prev + 3, 9) to (start + 0, 15)
 - Code(Expression(41, Add)) at (prev + 1, 5) to (start + 0, 6)
-    = (((Zero + (((((c1 + c3) + (c4 + c5)) - c6) - c4) - c7)) - c5) + (c6 + c9))
+    = (((Zero + (((((Zero + c3) + (Zero + c5)) - c6) - Zero) - Zero)) - c5) + (c6 + c9))
 
 Function name: loops_branches::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 37, 01, 05, 02]
diff --git a/tests/coverage-map/status-quo/sort_groups.cov-map b/tests/coverage-map/status-quo/sort_groups.cov-map
index 7156a66cf89..db027f3dc32 100644
--- a/tests/coverage-map/status-quo/sort_groups.cov-map
+++ b/tests/coverage-map/status-quo/sort_groups.cov-map
@@ -44,19 +44,19 @@ Number of file 0 mappings: 4
     = (c1 + (c0 - c1))
 
 Function name: sort_groups::main
-Raw bytes (28): 0x[01, 01, 02, 01, 05, 05, 02, 04, 01, 06, 01, 04, 0d, 00, 04, 0e, 02, 06, 02, 02, 06, 00, 07, 07, 01, 05, 02, 02]
+Raw bytes (28): 0x[01, 01, 02, 01, 00, 00, 02, 04, 01, 06, 01, 04, 0d, 00, 04, 0e, 02, 06, 02, 02, 06, 00, 07, 07, 01, 05, 02, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
-- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Counter(1), rhs = Expression(0, Sub)
+- expression 0 operands: lhs = Counter(0), rhs = Zero
+- expression 1 operands: lhs = Zero, rhs = Expression(0, Sub)
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 6, 1) to (start + 4, 13)
 - Code(Zero) at (prev + 4, 14) to (start + 2, 6)
 - Code(Expression(0, Sub)) at (prev + 2, 6) to (start + 0, 7)
-    = (c0 - c1)
+    = (c0 - Zero)
 - Code(Expression(1, Add)) at (prev + 1, 5) to (start + 2, 2)
-    = (c1 + (c0 - c1))
+    = (Zero + (c0 - Zero))
 
 Function name: sort_groups::other_fn
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 17, 01, 00, 11]
diff --git a/tests/coverage-map/status-quo/tight_inf_loop.cov-map b/tests/coverage-map/status-quo/tight_inf_loop.cov-map
index 76884212c14..7fe3146b080 100644
--- a/tests/coverage-map/status-quo/tight_inf_loop.cov-map
+++ b/tests/coverage-map/status-quo/tight_inf_loop.cov-map
@@ -1,12 +1,12 @@
 Function name: tight_inf_loop::main
-Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 01, 01, 01, 0d, 00, 02, 09, 00, 10, 02, 01, 06, 01, 02]
+Raw bytes (21): 0x[01, 01, 01, 01, 00, 03, 01, 01, 01, 01, 0d, 00, 02, 09, 00, 10, 02, 01, 06, 01, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 1
-- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
+- expression 0 operands: lhs = Counter(0), rhs = Zero
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 1, 1) to (start + 1, 13)
 - Code(Zero) at (prev + 2, 9) to (start + 0, 16)
 - Code(Expression(0, Sub)) at (prev + 1, 6) to (start + 1, 2)
-    = (c0 - c1)
+    = (c0 - Zero)
 
diff --git a/tests/coverage-map/status-quo/while.cov-map b/tests/coverage-map/status-quo/while.cov-map
index cfd2be96a0d..af250f3fb71 100644
--- a/tests/coverage-map/status-quo/while.cov-map
+++ b/tests/coverage-map/status-quo/while.cov-map
@@ -1,15 +1,15 @@
 Function name: while::main
-Raw bytes (28): 0x[01, 01, 02, 01, 05, 03, 05, 04, 01, 01, 01, 01, 10, 03, 02, 0b, 00, 14, 00, 00, 15, 01, 06, 06, 02, 01, 00, 02]
+Raw bytes (28): 0x[01, 01, 02, 01, 00, 03, 00, 04, 01, 01, 01, 01, 10, 03, 02, 0b, 00, 14, 00, 00, 15, 01, 06, 06, 02, 01, 00, 02]
 Number of files: 1
 - file 0 => global file 1
 Number of expressions: 2
-- expression 0 operands: lhs = Counter(0), rhs = Counter(1)
-- expression 1 operands: lhs = Expression(0, Add), rhs = Counter(1)
+- expression 0 operands: lhs = Counter(0), rhs = Zero
+- expression 1 operands: lhs = Expression(0, Add), rhs = Zero
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 1, 1) to (start + 1, 16)
 - Code(Expression(0, Add)) at (prev + 2, 11) to (start + 0, 20)
-    = (c0 + c1)
+    = (c0 + Zero)
 - Code(Zero) at (prev + 0, 21) to (start + 1, 6)
 - Code(Expression(1, Sub)) at (prev + 2, 1) to (start + 0, 2)
-    = ((c0 + c1) - c1)
+    = ((c0 + Zero) - Zero)
 
diff --git a/tests/coverage-map/status-quo/yield.rs b/tests/coverage-map/status-quo/yield.rs
index 361275c9215..b7e2ba31b59 100644
--- a/tests/coverage-map/status-quo/yield.rs
+++ b/tests/coverage-map/status-quo/yield.rs
@@ -1,37 +1,37 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 #![allow(unused_assignments)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 fn main() {
-    let mut generator = || {
+    let mut coroutine = || {
         yield 1;
         return "foo";
     };
 
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Yielded(1) => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Yielded(1) => {}
         _ => panic!("unexpected value from resume"),
     }
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Complete("foo") => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Complete("foo") => {}
         _ => panic!("unexpected value from resume"),
     }
 
-    let mut generator = || {
+    let mut coroutine = || {
         yield 1;
         yield 2;
         yield 3;
         return "foo";
     };
 
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Yielded(1) => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Yielded(1) => {}
         _ => panic!("unexpected value from resume"),
     }
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Yielded(2) => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Yielded(2) => {}
         _ => panic!("unexpected value from resume"),
     }
 }
diff --git a/tests/debuginfo/generator-locals.rs b/tests/debuginfo/coroutine-locals.rs
index fd46c1a8b4d..e5eb1022ff4 100644
--- a/tests/debuginfo/generator-locals.rs
+++ b/tests/debuginfo/coroutine-locals.rs
@@ -54,10 +54,10 @@
 // lldbg-check:(int) $7 = 6
 // lldbr-check:(int) c = 6
 
-#![feature(omit_gdb_pretty_printer_section, generators, generator_trait)]
+#![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait)]
 #![omit_gdb_pretty_printer_section]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 
 fn main() {
diff --git a/tests/debuginfo/generator-objects.rs b/tests/debuginfo/coroutine-objects.rs
index 11c4ae2f659..3e658b2136e 100644
--- a/tests/debuginfo/generator-objects.rs
+++ b/tests/debuginfo/coroutine-objects.rs
@@ -2,7 +2,7 @@
 // min-gdb-version: 8.2
 
 // LLDB without native Rust support cannot read DW_TAG_variant_part,
-// so it prints nothing for generators. But those tests are kept to
+// so it prints nothing for coroutines. But those tests are kept to
 // ensure that LLDB won't crash at least (like #57822).
 
 // compile-flags:-g
@@ -11,62 +11,62 @@
 
 // gdb-command:run
 // gdb-command:print b
-// gdb-check:$1 = generator_objects::main::{generator_env#0}::Unresumed{_ref__a: 0x[...]}
+// gdb-check:$1 = coroutine_objects::main::{coroutine_env#0}::Unresumed{_ref__a: 0x[...]}
 // gdb-command:continue
 // gdb-command:print b
-// gdb-check:$2 = generator_objects::main::{generator_env#0}::Suspend0{c: 6, d: 7, _ref__a: 0x[...]}
+// gdb-check:$2 = coroutine_objects::main::{coroutine_env#0}::Suspend0{c: 6, d: 7, _ref__a: 0x[...]}
 // gdb-command:continue
 // gdb-command:print b
-// gdb-check:$3 = generator_objects::main::{generator_env#0}::Suspend1{c: 7, d: 8, _ref__a: 0x[...]}
+// gdb-check:$3 = coroutine_objects::main::{coroutine_env#0}::Suspend1{c: 7, d: 8, _ref__a: 0x[...]}
 // gdb-command:continue
 // gdb-command:print b
-// gdb-check:$4 = generator_objects::main::{generator_env#0}::Returned{_ref__a: 0x[...]}
+// gdb-check:$4 = coroutine_objects::main::{coroutine_env#0}::Returned{_ref__a: 0x[...]}
 
 // === LLDB TESTS ==================================================================================
 
 // lldb-command:run
 // lldb-command:print b
-// lldbg-check:(generator_objects::main::{generator_env#0}) $0 =
+// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) $0 =
 // lldb-command:continue
 // lldb-command:print b
-// lldbg-check:(generator_objects::main::{generator_env#0}) $1 =
+// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) $1 =
 // lldb-command:continue
 // lldb-command:print b
-// lldbg-check:(generator_objects::main::{generator_env#0}) $2 =
+// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) $2 =
 // lldb-command:continue
 // lldb-command:print b
-// lldbg-check:(generator_objects::main::{generator_env#0}) $3 =
+// lldbg-check:(coroutine_objects::main::{coroutine_env#0}) $3 =
 
 // === CDB TESTS ===================================================================================
 
 // cdb-command: g
 // cdb-command: dx b
-// cdb-check: b                : Unresumed [Type: enum2$<generator_objects::main::generator_env$0>]
+// cdb-check: b                : Unresumed [Type: enum2$<coroutine_objects::main::coroutine_env$0>]
 // cdb-check:    [+0x[...]] _ref__a          : 0x[...] : 5 [Type: int *]
 
 // cdb-command: g
 // cdb-command: dx b
-// cdb-check: b                : Suspend0 [Type: enum2$<generator_objects::main::generator_env$0>]
+// cdb-check: b                : Suspend0 [Type: enum2$<coroutine_objects::main::coroutine_env$0>]
 // cdb-check:    [+0x[...]] c                : 6 [Type: int]
 // cdb-check:    [+0x[...]] d                : 7 [Type: int]
 // cdb-check:    [+0x[...]] _ref__a          : 0x[...] : 5 [Type: int *]
 
 // cdb-command: g
 // cdb-command: dx b
-// cdb-check: b                : Suspend1 [Type: enum2$<generator_objects::main::generator_env$0>]
+// cdb-check: b                : Suspend1 [Type: enum2$<coroutine_objects::main::coroutine_env$0>]
 // cdb-check:    [+0x[...]] c                : 7 [Type: int]
 // cdb-check:    [+0x[...]] d                : 8 [Type: int]
 // cdb-check:    [+0x[...]] _ref__a          : 0x[...] : 6 [Type: int *]
 
 // cdb-command: g
 // cdb-command: dx b
-// cdb-check: b                : Returned [Type: enum2$<generator_objects::main::generator_env$0>]
+// cdb-check: b                : Returned [Type: enum2$<coroutine_objects::main::coroutine_env$0>]
 // cdb-check:    [+0x[...]] _ref__a          : 0x[...] : 6 [Type: int *]
 
-#![feature(omit_gdb_pretty_printer_section, generators, generator_trait)]
+#![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait)]
 #![omit_gdb_pretty_printer_section]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 
 fn main() {
diff --git a/tests/debuginfo/function-names.rs b/tests/debuginfo/function-names.rs
index d9aa03fee62..d29b3ea76b7 100644
--- a/tests/debuginfo/function-names.rs
+++ b/tests/debuginfo/function-names.rs
@@ -31,8 +31,8 @@
 // gdb-check:[...]static fn function_names::main::{closure#0}(*mut function_names::main::{closure_env#0});
 // gdb-check:[...]static fn function_names::{impl#2}::impl_function::{closure#0}<i32, i32>(*mut function_names::{impl#2}::impl_function::{closure_env#0}<i32, i32>);
 
-// Generator
-// Generators don't seem to appear in GDB's symbol table.
+// Coroutine
+// Coroutines don't seem to appear in GDB's symbol table.
 
 // Const generic parameter
 // gdb-command:info functions -q function_names::const_generic_fn.*
@@ -69,9 +69,9 @@
 // cdb-check:[...] a!function_names::main::closure$0 (void)
 // cdb-check:[...] a!function_names::generic_func::closure$0<i32> (void)
 
-// Generator
-// cdb-command:x a!function_names::*::generator*
-// cdb-check:[...] a!function_names::main::generator$1 (void)
+// Coroutine
+// cdb-command:x a!function_names::*::coroutine*
+// cdb-check:[...] a!function_names::main::coroutine$1 (void)
 
 // Const generic parameter
 // cdb-command:x a!function_names::const_generic_fn*
@@ -83,10 +83,10 @@
 #![allow(unused_variables)]
 #![feature(omit_gdb_pretty_printer_section)]
 #![omit_gdb_pretty_printer_section]
-#![feature(adt_const_params, generators, generator_trait)]
+#![feature(adt_const_params, coroutines, coroutine_trait)]
 #![allow(incomplete_features)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 use Mod1::TestTrait2;
 
@@ -110,12 +110,12 @@ fn main() {
     let closure = || TestStruct1;
     closure();
 
-    // Generator
-    let mut generator = || {
+    // Coroutine
+    let mut coroutine = || {
         yield;
         return;
     };
-    Pin::new(&mut generator).resume(());
+    Pin::new(&mut coroutine).resume(());
 
     // Const generic functions
     const_generic_fn_bool::<false>();
diff --git a/tests/debuginfo/issue-57822.rs b/tests/debuginfo/issue-57822.rs
index 62e7eb13c2d..a12a562a033 100644
--- a/tests/debuginfo/issue-57822.rs
+++ b/tests/debuginfo/issue-57822.rs
@@ -1,5 +1,5 @@
 // This test makes sure that the LLDB pretty printer does not throw an exception
-// for nested closures and generators.
+// for nested closures and coroutines.
 
 // Require a gdb that can read DW_TAG_variant_part.
 // min-gdb-version: 8.2
@@ -14,7 +14,7 @@
 // gdb-check:$1 = issue_57822::main::{closure_env#1} {f: issue_57822::main::{closure_env#0} {x: 1}}
 
 // gdb-command:print b
-// gdb-check:$2 = issue_57822::main::{generator_env#3}::Unresumed{a: issue_57822::main::{generator_env#2}::Unresumed{y: 2}}
+// gdb-check:$2 = issue_57822::main::{coroutine_env#3}::Unresumed{a: issue_57822::main::{coroutine_env#2}::Unresumed{y: 2}}
 
 // === LLDB TESTS ==================================================================================
 
@@ -24,12 +24,12 @@
 // lldbg-check:(issue_57822::main::{closure_env#1}) $0 = { f = { x = 1 } }
 
 // lldb-command:print b
-// lldbg-check:(issue_57822::main::{generator_env#3}) $1 =
+// lldbg-check:(issue_57822::main::{coroutine_env#3}) $1 =
 
-#![feature(omit_gdb_pretty_printer_section, generators, generator_trait)]
+#![feature(omit_gdb_pretty_printer_section, coroutines, coroutine_trait)]
 #![omit_gdb_pretty_printer_section]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 
 fn main() {
diff --git a/tests/debuginfo/simple-struct.rs b/tests/debuginfo/simple-struct.rs
index aa3cf023a71..fea8109223a 100644
--- a/tests/debuginfo/simple-struct.rs
+++ b/tests/debuginfo/simple-struct.rs
@@ -1,7 +1,7 @@
 // min-lldb-version: 310
 // ignore-gdb // Test temporarily ignored due to debuginfo tests being disabled, see PR 47155
 
-// compile-flags:-g
+// compile-flags: -g -Zmir-enable-passes=-CheckAlignment
 
 // === GDB TESTS ===================================================================================
 
diff --git a/tests/mir-opt/README.md b/tests/mir-opt/README.md
index 0721d9f7019..39a7b5aea12 100644
--- a/tests/mir-opt/README.md
+++ b/tests/mir-opt/README.md
@@ -49,3 +49,21 @@ This exists mainly for completeness and is rarely useful.
 ```
 // EMIT_MIR $file_name_of_some_mir_dump.before.mir
 ```
+
+# FileCheck directives
+
+The LLVM FileCheck tool is used to verify the contents of output MIR against `CHECK` directives
+present in the test file. This works on the runtime MIR, generated by `--emit=mir`, and not
+on the output of a individual passes.
+
+Use `// skip-filecheck` to prevent FileCheck from running.
+
+To check MIR for function `foo`, start with a `// CHECK-LABEL fn foo(` directive.
+
+`{{regex}}` syntax allows to match `regex`.
+
+`[[name:regex]]` syntax allows to bind `name` to a string matching `regex`, and refer to it
+as `[[name]]` in later directives, `regex` should be written not to match a leading space.
+Use `[[my_local:_.*]]` to name a local, and `[[my_bb:bb.*]]` to name a block.
+
+Documentation for FileCheck is available here: https://www.llvm.org/docs/CommandGuide/FileCheck.html
diff --git a/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir b/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
index 61aa89e445f..76938c14e1e 100644
--- a/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
@@ -1,36 +1,36 @@
 // MIR for `address_of_reborrow` after SimplifyCfg-initial
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:7:5: 7:18, inferred_ty: *const [i32; 10]
-| 1: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:9:5: 9:25, inferred_ty: *const dyn std::marker::Send
-| 2: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
-| 3: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
-| 4: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
-| 5: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
-| 6: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
-| 7: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
-| 8: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
-| 9: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
-| 10: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:18:5: 18:18, inferred_ty: *const [i32; 10]
-| 11: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:20:5: 20:25, inferred_ty: *const dyn std::marker::Send
-| 12: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
-| 13: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
-| 14: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
-| 15: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
-| 16: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
-| 17: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
-| 18: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
-| 19: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
-| 20: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:28:5: 28:16, inferred_ty: *mut [i32; 10]
-| 21: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:30:5: 30:23, inferred_ty: *mut dyn std::marker::Send
-| 22: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
-| 23: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
-| 24: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
-| 25: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
-| 26: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
-| 27: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
-| 28: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
-| 29: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
+| 0: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:8:5: 8:18, inferred_ty: *const [i32; 10]
+| 1: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:10:5: 10:25, inferred_ty: *const dyn std::marker::Send
+| 2: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
+| 3: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:14:12: 14:20, inferred_ty: *const [i32; 10]
+| 4: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:15:12: 15:28, inferred_ty: *const [i32; 10]
+| 5: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:15:12: 15:28, inferred_ty: *const [i32; 10]
+| 6: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:16:12: 16:27, inferred_ty: *const dyn std::marker::Send
+| 7: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:16:12: 16:27, inferred_ty: *const dyn std::marker::Send
+| 8: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:17:12: 17:24, inferred_ty: *const [i32]
+| 9: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:17:12: 17:24, inferred_ty: *const [i32]
+| 10: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:19:5: 19:18, inferred_ty: *const [i32; 10]
+| 11: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:21:5: 21:25, inferred_ty: *const dyn std::marker::Send
+| 12: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
+| 13: user_ty: Canonical { value: Ty(*const ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:24:12: 24:20, inferred_ty: *const [i32; 10]
+| 14: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:25:12: 25:28, inferred_ty: *const [i32; 10]
+| 15: user_ty: Canonical { value: Ty(*const [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:25:12: 25:28, inferred_ty: *const [i32; 10]
+| 16: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:26:12: 26:27, inferred_ty: *const dyn std::marker::Send
+| 17: user_ty: Canonical { value: Ty(*const dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:26:12: 26:27, inferred_ty: *const dyn std::marker::Send
+| 18: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:27:12: 27:24, inferred_ty: *const [i32]
+| 19: user_ty: Canonical { value: Ty(*const [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:27:12: 27:24, inferred_ty: *const [i32]
+| 20: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:29:5: 29:16, inferred_ty: *mut [i32; 10]
+| 21: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:31:5: 31:23, inferred_ty: *mut dyn std::marker::Send
+| 22: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
+| 23: user_ty: Canonical { value: Ty(*mut ^0), max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }] }, span: $DIR/address_of.rs:34:12: 34:18, inferred_ty: *mut [i32; 10]
+| 24: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:35:12: 35:26, inferred_ty: *mut [i32; 10]
+| 25: user_ty: Canonical { value: Ty(*mut [i32; 10]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:35:12: 35:26, inferred_ty: *mut [i32; 10]
+| 26: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:36:12: 36:25, inferred_ty: *mut dyn std::marker::Send
+| 27: user_ty: Canonical { value: Ty(*mut dyn std::marker::Send), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/address_of.rs:36:12: 36:25, inferred_ty: *mut dyn std::marker::Send
+| 28: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:37:12: 37:22, inferred_ty: *mut [i32]
+| 29: user_ty: Canonical { value: Ty(*mut [i32]), max_universe: U0, variables: [] }, span: $DIR/address_of.rs:37:12: 37:22, inferred_ty: *mut [i32]
 |
 fn address_of_reborrow() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/address_of.rs b/tests/mir-opt/address_of.rs
index c4bea5613e4..57a317a4a90 100644
--- a/tests/mir-opt/address_of.rs
+++ b/tests/mir-opt/address_of.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
 
 fn address_of_reborrow() {
diff --git a/tests/mir-opt/array_index_is_temporary.rs b/tests/mir-opt/array_index_is_temporary.rs
index 950429fb6bc..f5edc68905b 100644
--- a/tests/mir-opt/array_index_is_temporary.rs
+++ b/tests/mir-opt/array_index_is_temporary.rs
@@ -1,3 +1,4 @@
+// unit-test: SimplifyCfg-elaborate-drops
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Retagging (from Stacked Borrows) relies on the array index being a fresh
 // temporary, so that side-effects cannot change it.
@@ -11,6 +12,12 @@ unsafe fn foo(z: *mut usize) -> u32 {
 
 // EMIT_MIR array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: debug x => [[x:_.*]];
+    // CHECK: debug y => [[y:_.*]];
+    // CHECK: [[y]] = const 1_usize;
+    // CHECK: [[tmp:_.*]] = [[y]];
+    // CHECK: [[x]][[[tmp]]] =
     let mut x = [42, 43, 44];
     let mut y = 1;
     let z: *mut usize = &mut y;
diff --git a/tests/mir-opt/asm_unwind_panic_abort.rs b/tests/mir-opt/asm_unwind_panic_abort.rs
index ad8f9398e7f..a80dcb385b3 100644
--- a/tests/mir-opt/asm_unwind_panic_abort.rs
+++ b/tests/mir-opt/asm_unwind_panic_abort.rs
@@ -9,6 +9,9 @@
 
 // EMIT_MIR asm_unwind_panic_abort.main.AbortUnwindingCalls.after.mir
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: asm!(
+    // CHECK-SAME: unwind terminate(abi)
     unsafe {
         std::arch::asm!("", options(may_unwind));
     }
diff --git a/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir b/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir
index 75070ffda11..5df6633880e 100644
--- a/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/basic_assignment.main.SimplifyCfg-initial.after.mir
@@ -1,8 +1,8 @@
 // MIR for `main` after SimplifyCfg-initial
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
-| 1: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:20:17: 20:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
+| 0: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:38:17: 38:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
+| 1: user_ty: Canonical { value: Ty(std::option::Option<std::boxed::Box<u32>>), max_universe: U0, variables: [] }, span: $DIR/basic_assignment.rs:38:17: 38:33, inferred_ty: std::option::Option<std::boxed::Box<u32>>
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/basic_assignment.rs b/tests/mir-opt/basic_assignment.rs
index 92434e44aa9..30a41098888 100644
--- a/tests/mir-opt/basic_assignment.rs
+++ b/tests/mir-opt/basic_assignment.rs
@@ -1,3 +1,4 @@
+// unit-test: ElaborateDrops
 // needs-unwind
 // this tests move up progration, which is not yet implemented
 
@@ -10,6 +11,23 @@
 // destruction.
 
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: debug nodrop_x => [[nodrop_x:_.*]];
+    // CHECK: debug nodrop_y => [[nodrop_y:_.*]];
+    // CHECK: debug drop_x => [[drop_x:_.*]];
+    // CHECK: debug drop_y => [[drop_y:_.*]];
+    // CHECK-NOT: drop([[nodrop_x]])
+    // CHECK-NOT: drop([[nodrop_y]])
+    // CHECK-NOT: drop([[drop_x]])
+    // CHECK: [[drop_tmp:_.*]] = move [[drop_x]];
+    // CHECK-NOT: drop([[drop_x]])
+    // CHECK-NOT: drop([[drop_tmp]])
+    // CHECK: [[drop_y]] = move [[drop_tmp]];
+    // CHECK-NOT: drop([[drop_x]])
+    // CHECK-NOT: drop([[drop_tmp]])
+    // CHECK: drop([[drop_y]])
+    // CHECK-NOT: drop([[drop_x]])
+    // CHECK-NOT: drop([[drop_tmp]])
     let nodrop_x = false;
     let nodrop_y;
 
diff --git a/tests/mir-opt/bool_compare.rs b/tests/mir-opt/bool_compare.rs
deleted file mode 100644
index 080f7f72d11..00000000000
--- a/tests/mir-opt/bool_compare.rs
+++ /dev/null
@@ -1,28 +0,0 @@
-// unit-test: InstSimplify
-
-// EMIT_MIR bool_compare.opt1.InstSimplify.diff
-fn opt1(x: bool) -> u32 {
-    if x != true { 0 } else { 1 }
-}
-
-// EMIT_MIR bool_compare.opt2.InstSimplify.diff
-fn opt2(x: bool) -> u32 {
-    if true != x { 0 } else { 1 }
-}
-
-// EMIT_MIR bool_compare.opt3.InstSimplify.diff
-fn opt3(x: bool) -> u32 {
-    if x == false { 0 } else { 1 }
-}
-
-// EMIT_MIR bool_compare.opt4.InstSimplify.diff
-fn opt4(x: bool) -> u32 {
-    if false == x { 0 } else { 1 }
-}
-
-fn main() {
-    opt1(false);
-    opt2(false);
-    opt3(false);
-    opt4(false);
-}
diff --git a/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-abort.mir b/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-abort.mir
deleted file mode 100644
index 1c7ef7f8345..00000000000
--- a/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-abort.mir
+++ /dev/null
@@ -1,71 +0,0 @@
-// MIR for `main` before ElaborateDrops
-
-fn main() -> () {
-    let mut _0: ();
-    let _1: std::boxed::Box<S>;
-    let mut _2: usize;
-    let mut _3: usize;
-    let mut _4: *mut u8;
-    let mut _5: std::boxed::Box<S>;
-    let _6: ();
-    let mut _7: std::boxed::Box<S>;
-    scope 1 {
-        debug x => _1;
-    }
-    scope 2 {
-    }
-
-    bb0: {
-        StorageLive(_1);
-        _2 = SizeOf(S);
-        _3 = AlignOf(S);
-        _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> [return: bb1, unwind: bb9];
-    }
-
-    bb1: {
-        StorageLive(_5);
-        _5 = ShallowInitBox(move _4, S);
-        (*_5) = S::new() -> [return: bb2, unwind: bb8];
-    }
-
-    bb2: {
-        _1 = move _5;
-        drop(_5) -> [return: bb3, unwind: bb9];
-    }
-
-    bb3: {
-        StorageDead(_5);
-        StorageLive(_6);
-        StorageLive(_7);
-        _7 = move _1;
-        _6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6];
-    }
-
-    bb4: {
-        StorageDead(_7);
-        StorageDead(_6);
-        _0 = const ();
-        drop(_1) -> [return: bb5, unwind: bb9];
-    }
-
-    bb5: {
-        StorageDead(_1);
-        return;
-    }
-
-    bb6 (cleanup): {
-        drop(_7) -> [return: bb7, unwind terminate(cleanup)];
-    }
-
-    bb7 (cleanup): {
-        drop(_1) -> [return: bb9, unwind terminate(cleanup)];
-    }
-
-    bb8 (cleanup): {
-        drop(_5) -> [return: bb9, unwind terminate(cleanup)];
-    }
-
-    bb9 (cleanup): {
-        resume;
-    }
-}
diff --git a/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-unwind.mir b/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-unwind.mir
deleted file mode 100644
index 4ad1c2de129..00000000000
--- a/tests/mir-opt/box_expr.main.ElaborateDrops.before.panic-unwind.mir
+++ /dev/null
@@ -1,71 +0,0 @@
-// MIR for `main` before ElaborateDrops
-
-fn main() -> () {
-    let mut _0: ();
-    let _1: std::boxed::Box<S>;
-    let mut _2: usize;
-    let mut _3: usize;
-    let mut _4: *mut u8;
-    let mut _5: std::boxed::Box<S>;
-    let _6: ();
-    let mut _7: std::boxed::Box<S>;
-    scope 1 {
-        debug x => _1;
-    }
-    scope 2 {
-    }
-
-    bb0: {
-        StorageLive(_1);
-        _2 = SizeOf(S);
-        _3 = AlignOf(S);
-        _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> [return: bb1, unwind continue];
-    }
-
-    bb1: {
-        StorageLive(_5);
-        _5 = ShallowInitBox(move _4, S);
-        (*_5) = S::new() -> [return: bb2, unwind: bb8];
-    }
-
-    bb2: {
-        _1 = move _5;
-        drop(_5) -> [return: bb3, unwind continue];
-    }
-
-    bb3: {
-        StorageDead(_5);
-        StorageLive(_6);
-        StorageLive(_7);
-        _7 = move _1;
-        _6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6];
-    }
-
-    bb4: {
-        StorageDead(_7);
-        StorageDead(_6);
-        _0 = const ();
-        drop(_1) -> [return: bb5, unwind continue];
-    }
-
-    bb5: {
-        StorageDead(_1);
-        return;
-    }
-
-    bb6 (cleanup): {
-        drop(_7) -> [return: bb7, unwind terminate(cleanup)];
-    }
-
-    bb7 (cleanup): {
-        drop(_1) -> [return: bb9, unwind terminate(cleanup)];
-    }
-
-    bb8 (cleanup): {
-        drop(_5) -> [return: bb9, unwind terminate(cleanup)];
-    }
-
-    bb9 (cleanup): {
-        resume;
-    }
-}
diff --git a/tests/mir-opt/box_expr.main.ElaborateDrops.diff b/tests/mir-opt/box_expr.main.ElaborateDrops.diff
new file mode 100644
index 00000000000..88b12f19e64
--- /dev/null
+++ b/tests/mir-opt/box_expr.main.ElaborateDrops.diff
@@ -0,0 +1,89 @@
+- // MIR for `main` before ElaborateDrops
++ // MIR for `main` after ElaborateDrops
+  
+  fn main() -> () {
+      let mut _0: ();
+      let _1: std::boxed::Box<S>;
+      let mut _2: usize;
+      let mut _3: usize;
+      let mut _4: *mut u8;
+      let mut _5: std::boxed::Box<S>;
+      let _6: ();
+      let mut _7: std::boxed::Box<S>;
++     let mut _8: &mut std::boxed::Box<S>;
++     let mut _9: ();
+      scope 1 {
+          debug x => _1;
+      }
+      scope 2 {
+      }
+  
+      bb0: {
+          StorageLive(_1);
+          _2 = SizeOf(S);
+          _3 = AlignOf(S);
+          _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> [return: bb1, unwind continue];
+      }
+  
+      bb1: {
+          StorageLive(_5);
+          _5 = ShallowInitBox(move _4, S);
+          (*_5) = S::new() -> [return: bb2, unwind: bb8];
+      }
+  
+      bb2: {
+          _1 = move _5;
+-         drop(_5) -> [return: bb3, unwind continue];
++         goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_5);
+          StorageLive(_6);
+          StorageLive(_7);
+          _7 = move _1;
+          _6 = std::mem::drop::<Box<S>>(move _7) -> [return: bb4, unwind: bb6];
+      }
+  
+      bb4: {
+          StorageDead(_7);
+          StorageDead(_6);
+          _0 = const ();
+-         drop(_1) -> [return: bb5, unwind continue];
++         goto -> bb5;
+      }
+  
+      bb5: {
+          StorageDead(_1);
+          return;
+      }
+  
+      bb6 (cleanup): {
+-         drop(_7) -> [return: bb7, unwind terminate(cleanup)];
++         goto -> bb7;
+      }
+  
+      bb7 (cleanup): {
+-         drop(_1) -> [return: bb9, unwind terminate(cleanup)];
++         goto -> bb9;
+      }
+  
+      bb8 (cleanup): {
+-         drop(_5) -> [return: bb9, unwind terminate(cleanup)];
++         goto -> bb11;
+      }
+  
+      bb9 (cleanup): {
+          resume;
++     }
++ 
++     bb10 (cleanup): {
++         _8 = &mut _5;
++         _9 = <Box<S> as Drop>::drop(move _8) -> [return: bb9, unwind terminate(cleanup)];
++     }
++ 
++     bb11 (cleanup): {
++         goto -> bb10;
+      }
+  }
+  
diff --git a/tests/mir-opt/box_expr.rs b/tests/mir-opt/box_expr.rs
index 780420bda9f..0421e232ae4 100644
--- a/tests/mir-opt/box_expr.rs
+++ b/tests/mir-opt/box_expr.rs
@@ -1,9 +1,22 @@
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+// unit-test: ElaborateDrops
+// needs-unwind
 
 #![feature(rustc_attrs, stmt_expr_attributes)]
 
-// EMIT_MIR box_expr.main.ElaborateDrops.before.mir
+// EMIT_MIR box_expr.main.ElaborateDrops.diff
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK:   [[box:_.*]] = ShallowInitBox(
+    // CHECK:   [[ptr:_.*]] = ((([[box]].0: std::ptr::Unique<S>).0: std::ptr::NonNull<S>).0: *const S);
+    // CHECK:   (*[[ptr]]) = S::new() -> [return: [[ret:bb.*]], unwind: [[unwind:bb.*]]];
+    // CHECK: [[ret]]: {
+    // CHECK:   [[box2:_.*]] = move [[box]];
+    // CHECK:   [[box3:_.*]] = move [[box2]];
+    // CHECK:   std::mem::drop::<Box<S>>(move [[box3]])
+    // CHECK: [[unwind]] (cleanup): {
+    // CHECK:   [[boxref:_.*]] = &mut [[box]];
+    // CHECK:   <Box<S> as Drop>::drop(move [[boxref]])
+
     let x = #[rustc_box]
     Box::new(S::new());
     drop(x);
diff --git a/tests/mir-opt/building/async_await.a-{closure#0}.generator_resume.0.mir b/tests/mir-opt/building/async_await.a-{closure#0}.coroutine_resume.0.mir
index 98b1befc3bf..8b22743d2b0 100644
--- a/tests/mir-opt/building/async_await.a-{closure#0}.generator_resume.0.mir
+++ b/tests/mir-opt/building/async_await.a-{closure#0}.coroutine_resume.0.mir
@@ -1,5 +1,5 @@
-// MIR for `a::{closure#0}` 0 generator_resume
-/* generator_layout = GeneratorLayout {
+// MIR for `a::{closure#0}` 0 coroutine_resume
+/* coroutine_layout = CoroutineLayout {
     field_tys: {},
     variant_fields: {
         Unresumed(0): [],
@@ -9,7 +9,7 @@
     storage_conflicts: BitMatrix(0x0) {},
 } */
 
-fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>, _2: &mut Context<'_>) -> Poll<()> {
+fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>, _2: &mut Context<'_>) -> Poll<()> {
     debug _task_context => _4;
     let mut _0: std::task::Poll<()>;
     let mut _3: ();
@@ -17,7 +17,7 @@ fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>
     let mut _5: u32;
 
     bb0: {
-        _5 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16})));
+        _5 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16})));
         switchInt(move _5) -> [0: bb1, 1: bb4, otherwise: bb5];
     }
 
@@ -29,7 +29,7 @@ fn a::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>
 
     bb2: {
         _0 = Poll::<()>::Ready(move _3);
-        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16}))) = 1;
+        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16}))) = 1;
         return;
     }
 
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}.coroutine_resume.0.mir
index 15330b13cc2..396e4a378f6 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}.coroutine_resume.0.mir
@@ -1,38 +1,38 @@
-// MIR for `b::{closure#0}` 0 generator_resume
-/* generator_layout = GeneratorLayout {
+// MIR for `b::{closure#0}` 0 coroutine_resume
+/* coroutine_layout = CoroutineLayout {
     field_tys: {
-        _0: GeneratorSavedTy {
-            ty: Generator(
+        _0: CoroutineSavedTy {
+            ty: Coroutine(
                 DefId(0:4 ~ async_await[ccf8]::a::{closure#0}),
                 [
                 std::future::ResumeTy,
                 (),
                 (),
-                GeneratorWitness(DefId(0:4 ~ async_await[ccf8]::a::{closure#0}), []),
+                CoroutineWitness(DefId(0:4 ~ async_await[ccf8]::a::{closure#0}), []),
                 (),
                 ],
                 Static,
             ),
             source_info: SourceInfo {
-                span: $DIR/async_await.rs:15:9: 15:14 (#8),
+                span: $DIR/async_await.rs:16:9: 16:14 (#8),
                 scope: scope[0],
             },
             ignore_for_traits: false,
         },
-        _1: GeneratorSavedTy {
-            ty: Generator(
+        _1: CoroutineSavedTy {
+            ty: Coroutine(
                 DefId(0:4 ~ async_await[ccf8]::a::{closure#0}),
                 [
                 std::future::ResumeTy,
                 (),
                 (),
-                GeneratorWitness(DefId(0:4 ~ async_await[ccf8]::a::{closure#0}), []),
+                CoroutineWitness(DefId(0:4 ~ async_await[ccf8]::a::{closure#0}), []),
                 (),
                 ],
                 Static,
             ),
             source_info: SourceInfo {
-                span: $DIR/async_await.rs:16:9: 16:14 (#10),
+                span: $DIR/async_await.rs:17:9: 17:14 (#10),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -51,19 +51,19 @@
     },
 } */
 
-fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>, _2: &mut Context<'_>) -> Poll<()> {
+fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:15:18: 18:2}>, _2: &mut Context<'_>) -> Poll<()> {
     debug _task_context => _38;
     let mut _0: std::task::Poll<()>;
     let _3: ();
-    let mut _4: {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _5: {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _6: {async fn body@$DIR/async_await.rs:11:14: 11:16};
+    let mut _4: {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _5: {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _6: {async fn body@$DIR/async_await.rs:12:14: 12:16};
     let mut _7: ();
     let _8: ();
     let mut _9: std::task::Poll<()>;
-    let mut _10: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>;
-    let mut _11: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _12: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
+    let mut _10: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>;
+    let mut _11: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _12: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
     let mut _13: &mut std::task::Context<'_>;
     let mut _14: &mut std::task::Context<'_>;
     let mut _15: &mut std::task::Context<'_>;
@@ -71,14 +71,14 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     let mut _18: !;
     let mut _19: &mut std::task::Context<'_>;
     let mut _20: ();
-    let mut _21: {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _22: {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _23: {async fn body@$DIR/async_await.rs:11:14: 11:16};
+    let mut _21: {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _22: {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _23: {async fn body@$DIR/async_await.rs:12:14: 12:16};
     let _24: ();
     let mut _25: std::task::Poll<()>;
-    let mut _26: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>;
-    let mut _27: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
-    let mut _28: &mut {async fn body@$DIR/async_await.rs:11:14: 11:16};
+    let mut _26: std::pin::Pin<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>;
+    let mut _27: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
+    let mut _28: &mut {async fn body@$DIR/async_await.rs:12:14: 12:16};
     let mut _29: &mut std::task::Context<'_>;
     let mut _30: &mut std::task::Context<'_>;
     let mut _31: &mut std::task::Context<'_>;
@@ -90,7 +90,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     let mut _38: &mut std::task::Context<'_>;
     let mut _39: u32;
     scope 1 {
-        debug __awaitee => (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16});
+        debug __awaitee => (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
         let _17: ();
         scope 2 {
         }
@@ -99,7 +99,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: {async fn body@$DIR/async_await.rs:11:14: 11:16});
+        debug __awaitee => (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
         let _33: ();
         scope 5 {
         }
@@ -109,7 +109,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     }
 
     bb0: {
-        _39 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})));
+        _39 = discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})));
         switchInt(move _39) -> [0: bb1, 1: bb29, 3: bb27, 4: bb28, otherwise: bb30];
     }
 
@@ -122,13 +122,14 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     }
 
     bb2: {
-        _4 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable];
+        _4 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as IntoFuture>::into_future(move _5) -> [return: bb3, unwind unreachable];
     }
 
     bb3: {
         StorageDead(_5);
+        PlaceMention(_4);
         nop;
-        (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16}) = move _4;
+        (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16}) = move _4;
         goto -> bb4;
     }
 
@@ -138,9 +139,9 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageLive(_10);
         StorageLive(_11);
         StorageLive(_12);
-        _12 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16});
+        _12 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
         _11 = &mut (*_12);
-        _10 = Pin::<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>::new_unchecked(move _11) -> [return: bb5, unwind unreachable];
+        _10 = Pin::<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>::new_unchecked(move _11) -> [return: bb5, unwind unreachable];
     }
 
     bb5: {
@@ -156,12 +157,13 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     bb6: {
         _13 = &mut (*_14);
         StorageDead(_15);
-        _9 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable];
+        _9 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as Future>::poll(move _10, move _13) -> [return: bb7, unwind unreachable];
     }
 
     bb7: {
         StorageDead(_13);
         StorageDead(_10);
+        PlaceMention(_9);
         _16 = discriminant(_9);
         switchInt(move _16) -> [0: bb10, 1: bb8, otherwise: bb9];
     }
@@ -176,7 +178,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageLive(_20);
         _20 = ();
         _0 = Poll::<()>::Pending;
-        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2}))) = 3;
+        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 3;
         return;
     }
 
@@ -193,7 +195,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageDead(_12);
         StorageDead(_9);
         StorageDead(_8);
-        drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:11:14: 11:16})) -> [return: bb12, unwind unreachable];
+        drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#3).0: {async fn body@$DIR/async_await.rs:12:14: 12:16})) -> [return: bb12, unwind unreachable];
     }
 
     bb11: {
@@ -218,13 +220,14 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     }
 
     bb14: {
-        _21 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable];
+        _21 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as IntoFuture>::into_future(move _22) -> [return: bb15, unwind unreachable];
     }
 
     bb15: {
         StorageDead(_22);
+        PlaceMention(_21);
         nop;
-        (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:11:14: 11:16}) = move _21;
+        (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16}) = move _21;
         goto -> bb16;
     }
 
@@ -234,9 +237,9 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageLive(_26);
         StorageLive(_27);
         StorageLive(_28);
-        _28 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:11:14: 11:16});
+        _28 = &mut (((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16});
         _27 = &mut (*_28);
-        _26 = Pin::<&mut {async fn body@$DIR/async_await.rs:11:14: 11:16}>::new_unchecked(move _27) -> [return: bb17, unwind unreachable];
+        _26 = Pin::<&mut {async fn body@$DIR/async_await.rs:12:14: 12:16}>::new_unchecked(move _27) -> [return: bb17, unwind unreachable];
     }
 
     bb17: {
@@ -252,12 +255,13 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
     bb18: {
         _29 = &mut (*_30);
         StorageDead(_31);
-        _25 = <{async fn body@$DIR/async_await.rs:11:14: 11:16} as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable];
+        _25 = <{async fn body@$DIR/async_await.rs:12:14: 12:16} as Future>::poll(move _26, move _29) -> [return: bb19, unwind unreachable];
     }
 
     bb19: {
         StorageDead(_29);
         StorageDead(_26);
+        PlaceMention(_25);
         _32 = discriminant(_25);
         switchInt(move _32) -> [0: bb21, 1: bb20, otherwise: bb9];
     }
@@ -272,7 +276,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageLive(_36);
         _36 = ();
         _0 = Poll::<()>::Pending;
-        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2}))) = 4;
+        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 4;
         return;
     }
 
@@ -285,7 +289,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
         StorageDead(_28);
         StorageDead(_25);
         StorageDead(_24);
-        drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:11:14: 11:16})) -> [return: bb23, unwind unreachable];
+        drop((((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2})) as variant#4).0: {async fn body@$DIR/async_await.rs:12:14: 12:16})) -> [return: bb23, unwind unreachable];
     }
 
     bb22: {
@@ -308,7 +312,7 @@ fn b::{closure#0}(_1: Pin<&mut {async fn body@$DIR/async_await.rs:14:18: 17:2}>,
 
     bb25: {
         _0 = Poll::<()>::Ready(move _37);
-        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:14:18: 17:2}))) = 1;
+        discriminant((*(_1.0: &mut {async fn body@$DIR/async_await.rs:15:18: 18:2}))) = 1;
         return;
     }
 
diff --git a/tests/mir-opt/building/async_await.rs b/tests/mir-opt/building/async_await.rs
index 0b991e3b8f8..abdeafef6e4 100644
--- a/tests/mir-opt/building/async_await.rs
+++ b/tests/mir-opt/building/async_await.rs
@@ -1,4 +1,5 @@
-// This test makes sure that the generator MIR pass eliminates all calls to
+// skip-filecheck
+// This test makes sure that the coroutine MIR pass eliminates all calls to
 // `get_context`, and that the MIR argument type for an async fn and all locals
 // related to `yield` are `&mut Context`, and its return type is `Poll`.
 
@@ -7,10 +8,10 @@
 
 #![crate_type = "lib"]
 
-// EMIT_MIR async_await.a-{closure#0}.generator_resume.0.mir
+// EMIT_MIR async_await.a-{closure#0}.coroutine_resume.0.mir
 async fn a() {}
 
-// EMIT_MIR async_await.b-{closure#0}.generator_resume.0.mir
+// EMIT_MIR async_await.b-{closure#0}.coroutine_resume.0.mir
 pub async fn b() {
     a().await;
     a().await
diff --git a/tests/mir-opt/building/custom/aggregate_exprs.rs b/tests/mir-opt/building/custom/aggregate_exprs.rs
index 554c9c03ba4..d581886247f 100644
--- a/tests/mir-opt/building/custom/aggregate_exprs.rs
+++ b/tests/mir-opt/building/custom/aggregate_exprs.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/arbitrary_let.rs b/tests/mir-opt/building/custom/arbitrary_let.rs
index 776df3151ff..f8ee8504e32 100644
--- a/tests/mir-opt/building/custom/arbitrary_let.rs
+++ b/tests/mir-opt/building/custom/arbitrary_let.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/arrays.rs b/tests/mir-opt/building/custom/arrays.rs
index 8e0a1fd7a43..fe6abc54687 100644
--- a/tests/mir-opt/building/custom/arrays.rs
+++ b/tests/mir-opt/building/custom/arrays.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics, inline_const)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/as_cast.rs b/tests/mir-opt/building/custom/as_cast.rs
index b4b5ac6aa3b..92aea64db07 100644
--- a/tests/mir-opt/building/custom/as_cast.rs
+++ b/tests/mir-opt/building/custom/as_cast.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/composite_return.rs b/tests/mir-opt/building/custom/composite_return.rs
index 701d6b1ab71..33c903fa0f8 100644
--- a/tests/mir-opt/building/custom/composite_return.rs
+++ b/tests/mir-opt/building/custom/composite_return.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/consts.rs b/tests/mir-opt/building/custom/consts.rs
index 16d10eb5968..42abf5019e5 100644
--- a/tests/mir-opt/building/custom/consts.rs
+++ b/tests/mir-opt/building/custom/consts.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics, inline_const)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/consts.statics.built.after.mir b/tests/mir-opt/building/custom/consts.statics.built.after.mir
index ea394c5b727..a5cb6ff992e 100644
--- a/tests/mir-opt/building/custom/consts.statics.built.after.mir
+++ b/tests/mir-opt/building/custom/consts.statics.built.after.mir
@@ -6,16 +6,16 @@ fn statics() -> () {
     let mut _2: *mut i32;
 
     bb0: {
-        _1 = const {alloc1: &i32};
-        _2 = const {alloc2: *mut i32};
+        _1 = const {ALLOC0: &i32};
+        _2 = const {ALLOC1: *mut i32};
         return;
     }
 }
 
-alloc2 (static: T, size: 4, align: 4) {
+ALLOC1 (static: T, size: 4, align: 4) {
     0a 0a 0a 0a                                     │ ....
 }
 
-alloc1 (static: S, size: 4, align: 4) {
+ALLOC0 (static: S, size: 4, align: 4) {
     05 05 05 05                                     │ ....
 }
diff --git a/tests/mir-opt/building/custom/debuginfo.rs b/tests/mir-opt/building/custom/debuginfo.rs
index bfdc3d3eacd..3671a1ef061 100644
--- a/tests/mir-opt/building/custom/debuginfo.rs
+++ b/tests/mir-opt/building/custom/debuginfo.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/enums.rs b/tests/mir-opt/building/custom/enums.rs
index eca5b792ec0..6aab1503c0a 100644
--- a/tests/mir-opt/building/custom/enums.rs
+++ b/tests/mir-opt/building/custom/enums.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/operators.rs b/tests/mir-opt/building/custom/operators.rs
index db7a48317d9..91bdf2b9113 100644
--- a/tests/mir-opt/building/custom/operators.rs
+++ b/tests/mir-opt/building/custom/operators.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: --crate-type=lib
 #![feature(custom_mir, core_intrinsics, inline_const)]
 use std::intrinsics::mir::*;
diff --git a/tests/mir-opt/building/custom/projections.rs b/tests/mir-opt/building/custom/projections.rs
index 3c155deae4b..ac23fe59097 100644
--- a/tests/mir-opt/building/custom/projections.rs
+++ b/tests/mir-opt/building/custom/projections.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/references.rs b/tests/mir-opt/building/custom/references.rs
index f87f6664c7a..04afe6e6494 100644
--- a/tests/mir-opt/building/custom/references.rs
+++ b/tests/mir-opt/building/custom/references.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/simple_assign.rs b/tests/mir-opt/building/custom/simple_assign.rs
index db041aab239..8442272291e 100644
--- a/tests/mir-opt/building/custom/simple_assign.rs
+++ b/tests/mir-opt/building/custom/simple_assign.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/custom/terminators.rs b/tests/mir-opt/building/custom/terminators.rs
index 123118f654e..9e442e0f98a 100644
--- a/tests/mir-opt/building/custom/terminators.rs
+++ b/tests/mir-opt/building/custom/terminators.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 
 extern crate core;
diff --git a/tests/mir-opt/building/enum_cast.rs b/tests/mir-opt/building/enum_cast.rs
index 431b5c708b9..df8e397c8fe 100644
--- a/tests/mir-opt/building/enum_cast.rs
+++ b/tests/mir-opt/building/enum_cast.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR enum_cast.foo.built.after.mir
 // EMIT_MIR enum_cast.bar.built.after.mir
 // EMIT_MIR enum_cast.boo.built.after.mir
diff --git a/tests/mir-opt/building/issue_101867.main.built.after.mir b/tests/mir-opt/building/issue_101867.main.built.after.mir
index 915c5ef112c..57f8cca9abc 100644
--- a/tests/mir-opt/building/issue_101867.main.built.after.mir
+++ b/tests/mir-opt/building/issue_101867.main.built.after.mir
@@ -1,8 +1,8 @@
 // MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
-| 1: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
+| 0: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:4:12: 4:22, inferred_ty: std::option::Option<u8>
+| 1: user_ty: Canonical { value: Ty(std::option::Option<u8>), max_universe: U0, variables: [] }, span: $DIR/issue_101867.rs:4:12: 4:22, inferred_ty: std::option::Option<u8>
 |
 fn main() -> () {
     let mut _0: ();
@@ -25,7 +25,7 @@ fn main() -> () {
         FakeRead(ForLet(None), _1);
         AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] });
         StorageLive(_5);
-        FakeRead(ForMatchedPlace(None), _1);
+        PlaceMention(_1);
         _6 = discriminant(_1);
         switchInt(move _6) -> [1: bb4, otherwise: bb3];
     }
diff --git a/tests/mir-opt/building/issue_101867.rs b/tests/mir-opt/building/issue_101867.rs
index a32d8cb3714..f8a531e8982 100644
--- a/tests/mir-opt/building/issue_101867.rs
+++ b/tests/mir-opt/building/issue_101867.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR issue_101867.main.built.after.mir
 fn main() {
     let x: Option<u8> = Some(1);
diff --git a/tests/mir-opt/building/issue_110508.rs b/tests/mir-opt/building/issue_110508.rs
index bcbb1c29830..e597cd5d06b 100644
--- a/tests/mir-opt/building/issue_110508.rs
+++ b/tests/mir-opt/building/issue_110508.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR issue_110508.{impl#0}-BAR.built.after.mir
 // EMIT_MIR issue_110508.{impl#0}-SELF_BAR.built.after.mir
 
diff --git a/tests/mir-opt/building/issue_110508.{impl#0}-BAR.built.after.mir b/tests/mir-opt/building/issue_110508.{impl#0}-BAR.built.after.mir
index 5fc6d911af3..c3d28fae518 100644
--- a/tests/mir-opt/building/issue_110508.{impl#0}-BAR.built.after.mir
+++ b/tests/mir-opt/building/issue_110508.{impl#0}-BAR.built.after.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR` after built
+// MIR for `<impl at $DIR/issue_110508.rs:9:1: 9:9>::BAR` after built
 
-const <impl at $DIR/issue_110508.rs:8:1: 8:9>::BAR: Foo = {
+const <impl at $DIR/issue_110508.rs:9:1: 9:9>::BAR: Foo = {
     let mut _0: Foo;
     let mut _1: ();
 
diff --git a/tests/mir-opt/building/issue_110508.{impl#0}-SELF_BAR.built.after.mir b/tests/mir-opt/building/issue_110508.{impl#0}-SELF_BAR.built.after.mir
index 1a892559971..177518c30af 100644
--- a/tests/mir-opt/building/issue_110508.{impl#0}-SELF_BAR.built.after.mir
+++ b/tests/mir-opt/building/issue_110508.{impl#0}-SELF_BAR.built.after.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/issue_110508.rs:8:1: 8:9>::SELF_BAR` after built
+// MIR for `<impl at $DIR/issue_110508.rs:9:1: 9:9>::SELF_BAR` after built
 
-const <impl at $DIR/issue_110508.rs:8:1: 8:9>::SELF_BAR: Foo = {
+const <impl at $DIR/issue_110508.rs:9:1: 9:9>::SELF_BAR: Foo = {
     let mut _0: Foo;
     let mut _1: ();
 
diff --git a/tests/mir-opt/building/issue_49232.main.built.after.mir b/tests/mir-opt/building/issue_49232.main.built.after.mir
index f809132bc63..ac50b388910 100644
--- a/tests/mir-opt/building/issue_49232.main.built.after.mir
+++ b/tests/mir-opt/building/issue_49232.main.built.after.mir
@@ -24,7 +24,7 @@ fn main() -> () {
         StorageLive(_2);
         StorageLive(_3);
         _3 = const true;
-        FakeRead(ForMatchedPlace(None), _3);
+        PlaceMention(_3);
         switchInt(_3) -> [0: bb3, otherwise: bb4];
     }
 
diff --git a/tests/mir-opt/building/issue_49232.rs b/tests/mir-opt/building/issue_49232.rs
index 7e9f0de81f7..ac06e02778f 100644
--- a/tests/mir-opt/building/issue_49232.rs
+++ b/tests/mir-opt/building/issue_49232.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // We must mark a variable whose initialization fails due to an
 // abort statement as StorageDead.
 
diff --git a/tests/mir-opt/building/logical_or_in_conditional.rs b/tests/mir-opt/building/logical_or_in_conditional.rs
index ae159f7e122..00e666ed94f 100644
--- a/tests/mir-opt/building/logical_or_in_conditional.rs
+++ b/tests/mir-opt/building/logical_or_in_conditional.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z validate-mir
 #![feature(let_chains)]
 struct Droppy(u8);
diff --git a/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir b/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir
index 096aaec4a38..7407e7a8b2a 100644
--- a/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir
+++ b/tests/mir-opt/building/logical_or_in_conditional.test_complex.built.after.mir
@@ -23,7 +23,7 @@ fn test_complex() -> () {
     }
 
     bb1: {
-        FakeRead(ForMatchedPlace(None), _2);
+        PlaceMention(_2);
         _3 = discriminant(_2);
         switchInt(move _3) -> [0: bb2, otherwise: bb3];
     }
@@ -151,7 +151,7 @@ fn test_complex() -> () {
     }
 
     bb25: {
-        FakeRead(ForMatchedPlace(None), _12);
+        PlaceMention(_12);
         _13 = discriminant(_12);
         switchInt(move _13) -> [1: bb27, otherwise: bb26];
     }
diff --git a/tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir b/tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir
index bd4cd4eb678..1946c70e476 100644
--- a/tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir
+++ b/tests/mir-opt/building/match_false_edges.full_tested_match.built.after.mir
@@ -26,7 +26,7 @@ fn full_tested_match() -> () {
         StorageLive(_1);
         StorageLive(_2);
         _2 = Option::<i32>::Some(const 42_i32);
-        FakeRead(ForMatchedPlace(None), _2);
+        PlaceMention(_2);
         _3 = discriminant(_2);
         switchInt(move _3) -> [0: bb1, 1: bb2, otherwise: bb4];
     }
@@ -45,6 +45,7 @@ fn full_tested_match() -> () {
     }
 
     bb4: {
+        FakeRead(ForMatchedPlace(None), _2);
         unreachable;
     }
 
diff --git a/tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir b/tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir
index 595e3ab9224..b6175b05156 100644
--- a/tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir
+++ b/tests/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir
@@ -26,7 +26,7 @@ fn full_tested_match2() -> () {
         StorageLive(_1);
         StorageLive(_2);
         _2 = Option::<i32>::Some(const 42_i32);
-        FakeRead(ForMatchedPlace(None), _2);
+        PlaceMention(_2);
         _3 = discriminant(_2);
         switchInt(move _3) -> [0: bb1, 1: bb2, otherwise: bb4];
     }
@@ -51,6 +51,7 @@ fn full_tested_match2() -> () {
     }
 
     bb4: {
+        FakeRead(ForMatchedPlace(None), _2);
         unreachable;
     }
 
diff --git a/tests/mir-opt/building/match_false_edges.main.built.after.mir b/tests/mir-opt/building/match_false_edges.main.built.after.mir
index 91fe2f90e35..0b57d1b97e1 100644
--- a/tests/mir-opt/building/match_false_edges.main.built.after.mir
+++ b/tests/mir-opt/building/match_false_edges.main.built.after.mir
@@ -37,7 +37,7 @@ fn main() -> () {
         StorageLive(_1);
         StorageLive(_2);
         _2 = Option::<i32>::Some(const 1_i32);
-        FakeRead(ForMatchedPlace(None), _2);
+        PlaceMention(_2);
         _4 = discriminant(_2);
         switchInt(move _4) -> [1: bb2, otherwise: bb1];
     }
diff --git a/tests/mir-opt/building/match_false_edges.rs b/tests/mir-opt/building/match_false_edges.rs
index ddfcc149319..839eda40c85 100644
--- a/tests/mir-opt/building/match_false_edges.rs
+++ b/tests/mir-opt/building/match_false_edges.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 fn guard() -> bool {
     false
 }
diff --git a/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir b/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir
index fed5e68c3c9..e07c2b6fa9d 100644
--- a/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir
+++ b/tests/mir-opt/building/receiver_ptr_mutability.main.built.after.mir
@@ -1,10 +1,10 @@
 // MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:14:14: 14:23, inferred_ty: *mut Test
-| 1: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:14:14: 14:23, inferred_ty: *mut Test
-| 2: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:18:18: 18:31, inferred_ty: &&&&*mut Test
-| 3: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:18:18: 18:31, inferred_ty: &&&&*mut Test
+| 0: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:15:14: 15:23, inferred_ty: *mut Test
+| 1: user_ty: Canonical { value: Ty(*mut Test), max_universe: U0, variables: [] }, span: $DIR/receiver_ptr_mutability.rs:15:14: 15:23, inferred_ty: *mut Test
+| 2: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:19:18: 19:31, inferred_ty: &&&&*mut Test
+| 3: user_ty: Canonical { value: Ty(&&&&*mut Test), max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }] }, span: $DIR/receiver_ptr_mutability.rs:19:18: 19:31, inferred_ty: &&&&*mut Test
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/building/receiver_ptr_mutability.rs b/tests/mir-opt/building/receiver_ptr_mutability.rs
index 668530968fe..4bb3b4cade5 100644
--- a/tests/mir-opt/building/receiver_ptr_mutability.rs
+++ b/tests/mir-opt/building/receiver_ptr_mutability.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR receiver_ptr_mutability.main.built.after.mir
 
 #![feature(arbitrary_self_types)]
diff --git a/tests/mir-opt/building/shifts.rs b/tests/mir-opt/building/shifts.rs
index 4b63a00a304..c94a142d336 100644
--- a/tests/mir-opt/building/shifts.rs
+++ b/tests/mir-opt/building/shifts.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -C debug-assertions=yes
 
 // EMIT_MIR shifts.shift_signed.built.after.mir
diff --git a/tests/mir-opt/building/simple_match.match_bool.built.after.mir b/tests/mir-opt/building/simple_match.match_bool.built.after.mir
index c89ea2b6c85..06de4c51051 100644
--- a/tests/mir-opt/building/simple_match.match_bool.built.after.mir
+++ b/tests/mir-opt/building/simple_match.match_bool.built.after.mir
@@ -5,7 +5,7 @@ fn match_bool(_1: bool) -> usize {
     let mut _0: usize;
 
     bb0: {
-        FakeRead(ForMatchedPlace(None), _1);
+        PlaceMention(_1);
         switchInt(_1) -> [0: bb2, otherwise: bb1];
     }
 
diff --git a/tests/mir-opt/building/simple_match.rs b/tests/mir-opt/building/simple_match.rs
index 0ef97dde636..4f0a3046a06 100644
--- a/tests/mir-opt/building/simple_match.rs
+++ b/tests/mir-opt/building/simple_match.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that we don't generate unnecessarily large MIR for very simple matches
 
 
diff --git a/tests/mir-opt/building/storage_live_dead_in_statics.rs b/tests/mir-opt/building/storage_live_dead_in_statics.rs
index 79f709148e3..1f569211854 100644
--- a/tests/mir-opt/building/storage_live_dead_in_statics.rs
+++ b/tests/mir-opt/building/storage_live_dead_in_statics.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Check that when we compile the static `XXX` into MIR, we do not
 // generate `StorageStart` or `StorageEnd` statements.
 
diff --git a/tests/mir-opt/building/uniform_array_move_out.rs b/tests/mir-opt/building/uniform_array_move_out.rs
index 4ba107c8704..0682891611d 100644
--- a/tests/mir-opt/building/uniform_array_move_out.rs
+++ b/tests/mir-opt/building/uniform_array_move_out.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(stmt_expr_attributes, rustc_attrs)]
 
 // EMIT_MIR uniform_array_move_out.move_out_from_end.built.after.mir
diff --git a/tests/mir-opt/building/while_storage.rs b/tests/mir-opt/building/while_storage.rs
new file mode 100644
index 00000000000..b06c1639c3f
--- /dev/null
+++ b/tests/mir-opt/building/while_storage.rs
@@ -0,0 +1,60 @@
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+// Test that we correctly generate StorageDead statements for while loop
+// conditions on all branches
+// compile-flags: -Zmir-opt-level=0
+
+fn get_bool(c: bool) -> bool {
+    c
+}
+
+// EMIT_MIR while_storage.while_loop.PreCodegen.after.mir
+fn while_loop(c: bool) {
+    // CHECK-LABEL: fn while_loop(
+    // CHECK: bb0: {
+    // CHECK-NEXT:     goto -> bb1;
+    // CHECK: bb1: {
+    // CHECK-NEXT:     StorageLive(_3);
+    // CHECK-NEXT:     StorageLive(_2);
+    // CHECK-NEXT:     _2 = _1;
+    // CHECK-NEXT:     _3 = get_bool(move _2) -> [return: bb2, unwind
+    // CHECK: bb2: {
+    // CHECK-NEXT:     switchInt(move _3) -> [0: bb3, otherwise: bb4];
+    // CHECK: bb3: {
+    // CHECK-NEXT:     StorageDead(_2);
+    // CHECK-NEXT:     StorageLive(_9);
+    // CHECK-NEXT:     _0 = const ();
+    // CHECK-NEXT:     StorageDead(_9);
+    // CHECK-NEXT:     goto -> bb8;
+    // CHECK: bb4: {
+    // CHECK-NEXT:     StorageDead(_2);
+    // CHECK-NEXT:     StorageLive(_5);
+    // CHECK-NEXT:     StorageLive(_4);
+    // CHECK-NEXT:     _4 = _1;
+    // CHECK-NEXT:     _5 = get_bool(move _4) -> [return: bb5, unwind
+    // CHECK: bb5: {
+    // CHECK-NEXT:     switchInt(move _5) -> [0: bb6, otherwise: bb7];
+    // CHECK: bb6: {
+    // CHECK-NEXT:     StorageDead(_4);
+    // CHECK-NEXT:     _6 = const ();
+    // CHECK-NEXT:     StorageDead(_5);
+    // CHECK-NEXT:     StorageDead(_3);
+    // CHECK-NEXT:     goto -> bb1;
+    // CHECK: bb7: {
+    // CHECK-NEXT:     StorageDead(_4);
+    // CHECK-NEXT:     _0 = const ();
+    // CHECK-NEXT:     StorageDead(_5);
+    // CHECK-NEXT:     goto -> bb8;
+    // CHECK: bb8: {
+    // CHECK-NEXT:     StorageDead(_3);
+    // CHECK-NEXT:     return;
+
+    while get_bool(c) {
+        if get_bool(c) {
+            break;
+        }
+    }
+}
+
+fn main() {
+    while_loop(false);
+}
diff --git a/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-abort.mir
new file mode 100644
index 00000000000..26c82edf2d5
--- /dev/null
+++ b/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-abort.mir
@@ -0,0 +1,70 @@
+// MIR for `while_loop` after PreCodegen
+
+fn while_loop(_1: bool) -> () {
+    debug c => _1;
+    let mut _0: ();
+    let mut _2: bool;
+    let mut _3: bool;
+    let mut _4: bool;
+    let mut _5: bool;
+    let mut _6: ();
+    let mut _7: !;
+    let mut _8: !;
+    let _9: ();
+    let mut _10: !;
+
+    bb0: {
+        goto -> bb1;
+    }
+
+    bb1: {
+        StorageLive(_3);
+        StorageLive(_2);
+        _2 = _1;
+        _3 = get_bool(move _2) -> [return: bb2, unwind unreachable];
+    }
+
+    bb2: {
+        switchInt(move _3) -> [0: bb3, otherwise: bb4];
+    }
+
+    bb3: {
+        StorageDead(_2);
+        StorageLive(_9);
+        _0 = const ();
+        StorageDead(_9);
+        goto -> bb8;
+    }
+
+    bb4: {
+        StorageDead(_2);
+        StorageLive(_5);
+        StorageLive(_4);
+        _4 = _1;
+        _5 = get_bool(move _4) -> [return: bb5, unwind unreachable];
+    }
+
+    bb5: {
+        switchInt(move _5) -> [0: bb6, otherwise: bb7];
+    }
+
+    bb6: {
+        StorageDead(_4);
+        _6 = const ();
+        StorageDead(_5);
+        StorageDead(_3);
+        goto -> bb1;
+    }
+
+    bb7: {
+        StorageDead(_4);
+        _0 = const ();
+        StorageDead(_5);
+        goto -> bb8;
+    }
+
+    bb8: {
+        StorageDead(_3);
+        return;
+    }
+}
diff --git a/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-unwind.mir
new file mode 100644
index 00000000000..1bb72074846
--- /dev/null
+++ b/tests/mir-opt/building/while_storage.while_loop.PreCodegen.after.panic-unwind.mir
@@ -0,0 +1,70 @@
+// MIR for `while_loop` after PreCodegen
+
+fn while_loop(_1: bool) -> () {
+    debug c => _1;
+    let mut _0: ();
+    let mut _2: bool;
+    let mut _3: bool;
+    let mut _4: bool;
+    let mut _5: bool;
+    let mut _6: ();
+    let mut _7: !;
+    let mut _8: !;
+    let _9: ();
+    let mut _10: !;
+
+    bb0: {
+        goto -> bb1;
+    }
+
+    bb1: {
+        StorageLive(_3);
+        StorageLive(_2);
+        _2 = _1;
+        _3 = get_bool(move _2) -> [return: bb2, unwind continue];
+    }
+
+    bb2: {
+        switchInt(move _3) -> [0: bb3, otherwise: bb4];
+    }
+
+    bb3: {
+        StorageDead(_2);
+        StorageLive(_9);
+        _0 = const ();
+        StorageDead(_9);
+        goto -> bb8;
+    }
+
+    bb4: {
+        StorageDead(_2);
+        StorageLive(_5);
+        StorageLive(_4);
+        _4 = _1;
+        _5 = get_bool(move _4) -> [return: bb5, unwind continue];
+    }
+
+    bb5: {
+        switchInt(move _5) -> [0: bb6, otherwise: bb7];
+    }
+
+    bb6: {
+        StorageDead(_4);
+        _6 = const ();
+        StorageDead(_5);
+        StorageDead(_3);
+        goto -> bb1;
+    }
+
+    bb7: {
+        StorageDead(_4);
+        _0 = const ();
+        StorageDead(_5);
+        goto -> bb8;
+    }
+
+    bb8: {
+        StorageDead(_3);
+        return;
+    }
+}
diff --git a/tests/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir b/tests/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir
index 9b17b4b63dd..09a65e6e6a6 100644
--- a/tests/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir
+++ b/tests/mir-opt/byte_slice.main.SimplifyCfg-elaborate-drops.after.mir
@@ -23,6 +23,6 @@ fn main() -> () {
     }
 }
 
-alloc1 (size: 3, align: 1) {
+ALLOC0 (size: 3, align: 1) {
     66 6f 6f                                        │ foo
 }
diff --git a/tests/mir-opt/byte_slice.rs b/tests/mir-opt/byte_slice.rs
index 48e9c48c120..813d9ccfdc2 100644
--- a/tests/mir-opt/byte_slice.rs
+++ b/tests/mir-opt/byte_slice.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=0
 
 // EMIT_MIR byte_slice.main.SimplifyCfg-elaborate-drops.after.mir
diff --git a/tests/mir-opt/casts.redundant.PreCodegen.after.mir b/tests/mir-opt/casts.redundant.PreCodegen.after.mir
deleted file mode 100644
index 2084f44f248..00000000000
--- a/tests/mir-opt/casts.redundant.PreCodegen.after.mir
+++ /dev/null
@@ -1,14 +0,0 @@
-// MIR for `redundant` after PreCodegen
-
-fn redundant(_1: *const &u8) -> *const &u8 {
-    debug x => _1;
-    let mut _0: *const &u8;
-    scope 1 (inlined generic_cast::<&u8, &u8>) {
-        debug x => _1;
-    }
-
-    bb0: {
-        _0 = _1;
-        return;
-    }
-}
diff --git a/tests/mir-opt/casts.roundtrip.PreCodegen.after.mir b/tests/mir-opt/casts.roundtrip.PreCodegen.after.mir
deleted file mode 100644
index f0c35fe9782..00000000000
--- a/tests/mir-opt/casts.roundtrip.PreCodegen.after.mir
+++ /dev/null
@@ -1,15 +0,0 @@
-// MIR for `roundtrip` after PreCodegen
-
-fn roundtrip(_1: *const u8) -> *const u8 {
-    debug x => _1;
-    let mut _0: *const u8;
-    let mut _2: *mut u8;
-
-    bb0: {
-        StorageLive(_2);
-        _2 = _1 as *mut u8 (PtrToPtr);
-        _0 = move _2 as *const u8 (PointerCoercion(MutToConstPointer));
-        StorageDead(_2);
-        return;
-    }
-}
diff --git a/tests/mir-opt/casts.rs b/tests/mir-opt/casts.rs
deleted file mode 100644
index 413b0e09d3f..00000000000
--- a/tests/mir-opt/casts.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-#![crate_type = "lib"]
-
-// 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
-}
-
-#[inline]
-fn generic_cast<T, U>(x: *const T) -> *const U {
-    x as *const U
-}
-
-// EMIT_MIR casts.roundtrip.PreCodegen.after.mir
-pub fn roundtrip(x: *const u8) -> *const u8 {
-    x as *mut u8 as *const u8
-}
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 8c8e6959595..f20bfef8c79 100644
--- a/tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir
+++ b/tests/mir-opt/const_allocation.main.ConstProp.after.32bit.mir
@@ -8,7 +8,7 @@ fn main() -> () {
     bb0: {
         StorageLive(_1);
         StorageLive(_2);
-        _2 = const {alloc1: &&[(Option<i32>, &[&str])]};
+        _2 = const {ALLOC9: &&[(Option<i32>, &[&str])]};
         _1 = (*_2);
         StorageDead(_2);
         StorageDead(_1);
@@ -17,43 +17,43 @@ fn main() -> () {
     }
 }
 
-alloc1 (static: FOO, size: 8, align: 4) {
-    ╾─alloc19─╼ 03 00 00 00                         │ ╾──╼....
+ALLOC9 (static: FOO, size: 8, align: 4) {
+    ╾ALLOC0╼ 03 00 00 00                         │ ╾──╼....
 }
 
-alloc19 (size: 48, align: 4) {
-    0x00 │ 00 00 00 00 __ __ __ __ ╾─alloc6──╼ 00 00 00 00 │ ....░░░░╾──╼....
-    0x10 │ 00 00 00 00 __ __ __ __ ╾─alloc10─╼ 02 00 00 00 │ ....░░░░╾──╼....
-    0x20 │ 01 00 00 00 2a 00 00 00 ╾─alloc15─╼ 03 00 00 00 │ ....*...╾──╼....
+ALLOC0 (size: 48, align: 4) {
+    0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1╼ 00 00 00 00 │ ....░░░░╾──╼....
+    0x10 │ 00 00 00 00 __ __ __ __ ╾ALLOC2╼ 02 00 00 00 │ ....░░░░╾──╼....
+    0x20 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3╼ 03 00 00 00 │ ....*...╾──╼....
 }
 
-alloc6 (size: 0, align: 4) {}
+ALLOC1 (size: 0, align: 4) {}
 
-alloc10 (size: 16, align: 4) {
-    ╾─alloc9──╼ 03 00 00 00 ╾─alloc11─╼ 03 00 00 00 │ ╾──╼....╾──╼....
+ALLOC2 (size: 16, align: 4) {
+    ╾ALLOC4╼ 03 00 00 00 ╾ALLOC5╼ 03 00 00 00 │ ╾──╼....╾──╼....
 }
 
-alloc9 (size: 3, align: 1) {
+ALLOC4 (size: 3, align: 1) {
     66 6f 6f                                        │ foo
 }
 
-alloc11 (size: 3, align: 1) {
+ALLOC5 (size: 3, align: 1) {
     62 61 72                                        │ bar
 }
 
-alloc15 (size: 24, align: 4) {
-    0x00 │ ╾─alloc14─╼ 03 00 00 00 ╾─alloc16─╼ 03 00 00 00 │ ╾──╼....╾──╼....
-    0x10 │ ╾─alloc17─╼ 04 00 00 00                         │ ╾──╼....
+ALLOC3 (size: 24, align: 4) {
+    0x00 │ ╾ALLOC6╼ 03 00 00 00 ╾ALLOC7╼ 03 00 00 00 │ ╾──╼....╾──╼....
+    0x10 │ ╾ALLOC8╼ 04 00 00 00                         │ ╾──╼....
 }
 
-alloc14 (size: 3, align: 1) {
+ALLOC6 (size: 3, align: 1) {
     6d 65 68                                        │ meh
 }
 
-alloc16 (size: 3, align: 1) {
+ALLOC7 (size: 3, align: 1) {
     6d 6f 70                                        │ mop
 }
 
-alloc17 (size: 4, align: 1) {
+ALLOC8 (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 e2254703296..263cae2f3ea 100644
--- a/tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir
+++ b/tests/mir-opt/const_allocation.main.ConstProp.after.64bit.mir
@@ -8,7 +8,7 @@ fn main() -> () {
     bb0: {
         StorageLive(_1);
         StorageLive(_2);
-        _2 = const {alloc1: &&[(Option<i32>, &[&str])]};
+        _2 = const {ALLOC9: &&[(Option<i32>, &[&str])]};
         _1 = (*_2);
         StorageDead(_2);
         StorageDead(_1);
@@ -17,47 +17,47 @@ fn main() -> () {
     }
 }
 
-alloc1 (static: FOO, size: 16, align: 8) {
-    ╾───────alloc19───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+ALLOC9 (static: FOO, size: 16, align: 8) {
+    ╾ALLOC0╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
 }
 
-alloc19 (size: 72, align: 8) {
-    0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc6────────╼ │ ....░░░░╾──────╼
+ALLOC0 (size: 72, align: 8) {
+    0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1╼ │ ....░░░░╾──────╼
     0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
-    0x20 │ ╾───────alloc10───────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
-    0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc15───────╼ │ ....*...╾──────╼
+    0x20 │ ╾ALLOC2╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
+    0x30 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3╼ │ ....*...╾──────╼
     0x40 │ 03 00 00 00 00 00 00 00                         │ ........
 }
 
-alloc6 (size: 0, align: 8) {}
+ALLOC1 (size: 0, align: 8) {}
 
-alloc10 (size: 32, align: 8) {
-    0x00 │ ╾───────alloc9────────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
-    0x10 │ ╾───────alloc11───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+ALLOC2 (size: 32, align: 8) {
+    0x00 │ ╾ALLOC4╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+    0x10 │ ╾ALLOC5╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
 }
 
-alloc9 (size: 3, align: 1) {
+ALLOC4 (size: 3, align: 1) {
     66 6f 6f                                        │ foo
 }
 
-alloc11 (size: 3, align: 1) {
+ALLOC5 (size: 3, align: 1) {
     62 61 72                                        │ bar
 }
 
-alloc15 (size: 48, align: 8) {
-    0x00 │ ╾───────alloc14───────╼ 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 │ ╾──────╼........
+ALLOC3 (size: 48, align: 8) {
+    0x00 │ ╾ALLOC6╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+    0x10 │ ╾ALLOC7╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+    0x20 │ ╾ALLOC8╼ 04 00 00 00 00 00 00 00 │ ╾──────╼........
 }
 
-alloc14 (size: 3, align: 1) {
+ALLOC6 (size: 3, align: 1) {
     6d 65 68                                        │ meh
 }
 
-alloc16 (size: 3, align: 1) {
+ALLOC7 (size: 3, align: 1) {
     6d 6f 70                                        │ mop
 }
 
-alloc17 (size: 4, align: 1) {
+ALLOC8 (size: 4, align: 1) {
     6d c3 b6 70                                     │ m..p
 }
diff --git a/tests/mir-opt/const_allocation.rs b/tests/mir-opt/const_allocation.rs
index 91a2455eb83..577c61aeb7d 100644
--- a/tests/mir-opt/const_allocation.rs
+++ b/tests/mir-opt/const_allocation.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // ignore-endian-big
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
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 c5f6902b4b4..713abb264a7 100644
--- a/tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir
+++ b/tests/mir-opt/const_allocation2.main.ConstProp.after.32bit.mir
@@ -8,7 +8,7 @@ fn main() -> () {
     bb0: {
         StorageLive(_1);
         StorageLive(_2);
-        _2 = const {alloc1: &&[(Option<i32>, &[&u8])]};
+        _2 = const {ALLOC9: &&[(Option<i32>, &[&u8])]};
         _1 = (*_2);
         StorageDead(_2);
         StorageDead(_1);
@@ -17,42 +17,42 @@ fn main() -> () {
     }
 }
 
-alloc1 (static: FOO, size: 8, align: 4) {
-    ╾─alloc23─╼ 03 00 00 00                         │ ╾──╼....
+ALLOC9 (static: FOO, size: 8, align: 4) {
+    ╾ALLOC0╼ 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 │ ....*...╾──╼....
+ALLOC0 (size: 48, align: 4) {
+    0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1╼ 00 00 00 00 │ ....░░░░╾──╼....
+    0x10 │ 00 00 00 00 __ __ __ __ ╾ALLOC2╼ 02 00 00 00 │ ....░░░░╾──╼....
+    0x20 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3╼ 03 00 00 00 │ ....*...╾──╼....
 }
 
-alloc10 (size: 0, align: 4) {}
+ALLOC1 (size: 0, align: 4) {}
 
-alloc15 (size: 8, align: 4) {
-    ╾─alloc13─╼ ╾─alloc14─╼                         │ ╾──╼╾──╼
+ALLOC2 (size: 8, align: 4) {
+    ╾ALLOC4╼ ╾ALLOC5╼                         │ ╾──╼╾──╼
 }
 
-alloc13 (size: 1, align: 1) {
+ALLOC4 (size: 1, align: 1) {
     05                                              │ .
 }
 
-alloc14 (size: 1, align: 1) {
+ALLOC5 (size: 1, align: 1) {
     06                                              │ .
 }
 
-alloc21 (size: 12, align: 4) {
-    ╾─a18+0x3─╼ ╾─alloc19─╼ ╾─a20+0x2─╼             │ ╾──╼╾──╼╾──╼
+ALLOC3 (size: 12, align: 4) {
+    ╾ALLOC6+0x3╼ ╾ALLOC7╼ ╾ALLOC8+0x2╼             │ ╾──╼╾──╼╾──╼
 }
 
-alloc18 (size: 4, align: 1) {
+ALLOC6 (size: 4, align: 1) {
     2a 45 15 6f                                     │ *E.o
 }
 
-alloc19 (size: 1, align: 1) {
+ALLOC7 (size: 1, align: 1) {
     2a                                              │ *
 }
 
-alloc20 (size: 4, align: 1) {
+ALLOC8 (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 b95b8c78748..e9d61ef120c 100644
--- a/tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir
+++ b/tests/mir-opt/const_allocation2.main.ConstProp.after.64bit.mir
@@ -8,7 +8,7 @@ fn main() -> () {
     bb0: {
         StorageLive(_1);
         StorageLive(_2);
-        _2 = const {alloc1: &&[(Option<i32>, &[&u8])]};
+        _2 = const {ALLOC9: &&[(Option<i32>, &[&u8])]};
         _1 = (*_2);
         StorageDead(_2);
         StorageDead(_1);
@@ -17,45 +17,45 @@ fn main() -> () {
     }
 }
 
-alloc1 (static: FOO, size: 16, align: 8) {
-    ╾───────alloc23───────╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
+ALLOC9 (static: FOO, size: 16, align: 8) {
+    ╾ALLOC0╼ 03 00 00 00 00 00 00 00 │ ╾──────╼........
 }
 
-alloc23 (size: 72, align: 8) {
-    0x00 │ 00 00 00 00 __ __ __ __ ╾───────alloc10───────╼ │ ....░░░░╾──────╼
+ALLOC0 (size: 72, align: 8) {
+    0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC1╼ │ ....░░░░╾──────╼
     0x10 │ 00 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ │ ............░░░░
-    0x20 │ ╾───────alloc15───────╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
-    0x30 │ 01 00 00 00 2a 00 00 00 ╾───────alloc21───────╼ │ ....*...╾──────╼
+    0x20 │ ╾ALLOC2╼ 02 00 00 00 00 00 00 00 │ ╾──────╼........
+    0x30 │ 01 00 00 00 2a 00 00 00 ╾ALLOC3╼ │ ....*...╾──────╼
     0x40 │ 03 00 00 00 00 00 00 00                         │ ........
 }
 
-alloc10 (size: 0, align: 8) {}
+ALLOC1 (size: 0, align: 8) {}
 
-alloc15 (size: 16, align: 8) {
-    ╾───────alloc13───────╼ ╾───────alloc14───────╼ │ ╾──────╼╾──────╼
+ALLOC2 (size: 16, align: 8) {
+    ╾ALLOC4╼ ╾ALLOC5╼ │ ╾──────╼╾──────╼
 }
 
-alloc13 (size: 1, align: 1) {
+ALLOC4 (size: 1, align: 1) {
     05                                              │ .
 }
 
-alloc14 (size: 1, align: 1) {
+ALLOC5 (size: 1, align: 1) {
     06                                              │ .
 }
 
-alloc21 (size: 24, align: 8) {
-    0x00 │ ╾─────alloc18+0x3─────╼ ╾───────alloc19───────╼ │ ╾──────╼╾──────╼
-    0x10 │ ╾─────alloc20+0x2─────╼                         │ ╾──────╼
+ALLOC3 (size: 24, align: 8) {
+    0x00 │ ╾ALLOC6+0x3╼ ╾ALLOC7╼ │ ╾──────╼╾──────╼
+    0x10 │ ╾ALLOC8+0x2╼                         │ ╾──────╼
 }
 
-alloc18 (size: 4, align: 1) {
+ALLOC6 (size: 4, align: 1) {
     2a 45 15 6f                                     │ *E.o
 }
 
-alloc19 (size: 1, align: 1) {
+ALLOC7 (size: 1, align: 1) {
     2a                                              │ *
 }
 
-alloc20 (size: 4, align: 1) {
+ALLOC8 (size: 4, align: 1) {
     2a 45 15 6f                                     │ *E.o
 }
diff --git a/tests/mir-opt/const_allocation2.rs b/tests/mir-opt/const_allocation2.rs
index f2870aa47c5..0fcfaad842c 100644
--- a/tests/mir-opt/const_allocation2.rs
+++ b/tests/mir-opt/const_allocation2.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // ignore-endian-big
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
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 e172c754001..c18c067c72e 100644
--- a/tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir
+++ b/tests/mir-opt/const_allocation3.main.ConstProp.after.32bit.mir
@@ -8,7 +8,7 @@ fn main() -> () {
     bb0: {
         StorageLive(_1);
         StorageLive(_2);
-        _2 = const {alloc1: &&Packed};
+        _2 = const {ALLOC4: &&Packed};
         _1 = (*_2);
         StorageDead(_2);
         StorageDead(_1);
@@ -17,31 +17,31 @@ fn main() -> () {
     }
 }
 
-alloc1 (static: FOO, size: 4, align: 4) {
-    ╾─alloc12─╼                                     │ ╾──╼
+ALLOC4 (static: FOO, size: 4, align: 4) {
+    ╾ALLOC0╼                                     │ ╾──╼
 }
 
-alloc12 (size: 168, align: 1) {
+ALLOC0 (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 ╾─alloc7──╼ │ ............╾──╼
+    0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾ALLOC1╼ │ ............╾──╼
     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 ╾─alloc9──╼ 00 00 │ ..........╾──╼..
-    0x90 │ ╾a10+0x63─╼ 00 00 00 00 00 00 00 00 00 00 00 00 │ ╾──╼............
+    0x80 │ 00 00 00 00 00 00 00 00 00 00 ╾ALLOC2╼ 00 00 │ ..........╾──╼..
+    0x90 │ ╾ALLOC3+0x63╼ 00 00 00 00 00 00 00 00 00 00 00 00 │ ╾──╼............
     0xa0 │ 00 00 00 00 00 00 00 00                         │ ........
 }
 
-alloc7 (size: 4, align: 4) {
+ALLOC1 (size: 4, align: 4) {
     2a 00 00 00                                     │ *...
 }
 
-alloc9 (fn: main)
+ALLOC2 (fn: main)
 
-alloc10 (size: 100, align: 1) {
+ALLOC3 (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 d5feea723e7..6af0e3cbd94 100644
--- a/tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir
+++ b/tests/mir-opt/const_allocation3.main.ConstProp.after.64bit.mir
@@ -8,7 +8,7 @@ fn main() -> () {
     bb0: {
         StorageLive(_1);
         StorageLive(_2);
-        _2 = const {alloc1: &&Packed};
+        _2 = const {ALLOC2: &&Packed};
         _1 = (*_2);
         StorageDead(_2);
         StorageDead(_1);
@@ -17,13 +17,13 @@ fn main() -> () {
     }
 }
 
-alloc1 (static: FOO, size: 8, align: 8) {
-    ╾───────alloc12───────╼                         │ ╾──────╼
+ALLOC2 (static: FOO, size: 8, align: 8) {
+    ╾ALLOC0╼                         │ ╾──────╼
 }
 
-alloc12 (size: 180, align: 1) {
+ALLOC0 (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 ╾──alloc7── │ ............╾───
+    0x10 │ ab ab ab ab ab ab ab ab ab ab ab ab ╾──ALLOC3── │ ............╾───
     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 │ ................
@@ -31,18 +31,18 @@ alloc12 (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 │ ─────alloc9─────╼ 00 00 ╾────alloc10+0x63─────╼ │ ─────╼..╾──────╼
+    0x90 │ ─────ALLOC4─────╼ 00 00 ╾ALLOC1+0x63╼ │ ─────╼..╾──────╼
     0xa0 │ 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
     0xb0 │ 00 00 00 00                                     │ ....
 }
 
-alloc7 (size: 4, align: 4) {
+ALLOC3 (size: 4, align: 4) {
     2a 00 00 00                                     │ *...
 }
 
-alloc9 (fn: main)
+ALLOC4 (fn: main)
 
-alloc10 (size: 100, align: 1) {
+ALLOC1 (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.rs b/tests/mir-opt/const_allocation3.rs
index da3fd089b02..b8c9f50977e 100644
--- a/tests/mir-opt/const_allocation3.rs
+++ b/tests/mir-opt/const_allocation3.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // ignore-endian-big
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_debuginfo.main.ConstDebugInfo.diff b/tests/mir-opt/const_debuginfo.main.ConstDebugInfo.diff
index ed47baa67da..87c07279552 100644
--- a/tests/mir-opt/const_debuginfo.main.ConstDebugInfo.diff
+++ b/tests/mir-opt/const_debuginfo.main.ConstDebugInfo.diff
@@ -8,8 +8,8 @@
       let mut _6: u8;
       let mut _7: u8;
       let mut _8: u8;
-      let mut _12: u32;
-      let mut _13: u32;
+      let mut _14: u32;
+      let mut _15: u32;
       scope 1 {
 -         debug x => _1;
 +         debug x => const 1_u8;
@@ -29,29 +29,19 @@
                       scope 5 {
 -                         debug s => _9;
 +                         debug s => const "hello, world!";
-                          let _14: bool;
-                          let _15: bool;
-                          let _16: u32;
+                          let _10: (bool, bool, u32);
                           scope 6 {
--                             debug ((f: (bool, bool, u32)).0: bool) => _14;
--                             debug ((f: (bool, bool, u32)).1: bool) => _15;
--                             debug ((f: (bool, bool, u32)).2: u32) => _16;
-+                             debug ((f: (bool, bool, u32)).0: bool) => const true;
-+                             debug ((f: (bool, bool, u32)).1: bool) => const false;
-+                             debug ((f: (bool, bool, u32)).2: u32) => const 123_u32;
-                              let _10: std::option::Option<u16>;
+                              debug f => _10;
+                              let _11: std::option::Option<u16>;
                               scope 7 {
-                                  debug o => _10;
-                                  let _17: u32;
-                                  let _18: u32;
+                                  debug o => _11;
+                                  let _12: Point;
                                   scope 8 {
--                                     debug ((p: Point).0: u32) => _17;
--                                     debug ((p: Point).1: u32) => _18;
-+                                     debug ((p: Point).0: u32) => const 32_u32;
-+                                     debug ((p: Point).1: u32) => const 32_u32;
-                                      let _11: u32;
+-                                     debug p => _12;
++                                     debug p => const Point {{ x: 32_u32, y: 32_u32 }};
+                                      let _13: u32;
                                       scope 9 {
--                                         debug a => _11;
+-                                         debug a => _13;
 +                                         debug a => const 64_u32;
                                       }
                                   }
@@ -64,36 +54,57 @@
       }
   
       bb0: {
+          StorageLive(_1);
           _1 = const 1_u8;
+          StorageLive(_2);
           _2 = const 2_u8;
+          StorageLive(_3);
           _3 = const 3_u8;
           StorageLive(_4);
           StorageLive(_5);
+          StorageLive(_6);
+          _6 = const 1_u8;
+          StorageLive(_7);
+          _7 = const 2_u8;
           _5 = const 3_u8;
+          StorageDead(_7);
+          StorageDead(_6);
+          StorageLive(_8);
+          _8 = const 3_u8;
           _4 = const 6_u8;
+          StorageDead(_8);
           StorageDead(_5);
           StorageLive(_9);
           _9 = const "hello, world!";
-          StorageLive(_14);
-          StorageLive(_15);
-          StorageLive(_16);
-          _14 = const true;
-          _15 = const false;
-          _16 = const 123_u32;
           StorageLive(_10);
-          _10 = Option::<u16>::Some(const 99_u16);
-          _17 = const 32_u32;
-          _18 = const 32_u32;
+          _10 = (const true, const false, const 123_u32);
           StorageLive(_11);
-          _11 = const 64_u32;
+          _11 = Option::<u16>::Some(const 99_u16);
+          StorageLive(_12);
+          _12 = const Point {{ x: 32_u32, y: 32_u32 }};
+          StorageLive(_13);
+          StorageLive(_14);
+          _14 = const 32_u32;
+          StorageLive(_15);
+          _15 = const 32_u32;
+          _13 = const 64_u32;
+          StorageDead(_15);
+          StorageDead(_14);
+          _0 = const ();
+          StorageDead(_13);
+          StorageDead(_12);
           StorageDead(_11);
           StorageDead(_10);
-          StorageDead(_14);
-          StorageDead(_15);
-          StorageDead(_16);
           StorageDead(_9);
           StorageDead(_4);
+          StorageDead(_3);
+          StorageDead(_2);
+          StorageDead(_1);
           return;
       }
   }
   
+  ALLOC0 (size: 8, align: 4) {
+      20 00 00 00 20 00 00 00                         │  ... ...
+  }
+  
diff --git a/tests/mir-opt/const_debuginfo.rs b/tests/mir-opt/const_debuginfo.rs
index a188da38526..0e5ac4b8bd6 100644
--- a/tests/mir-opt/const_debuginfo.rs
+++ b/tests/mir-opt/const_debuginfo.rs
@@ -1,11 +1,23 @@
-// compile-flags: -C overflow-checks=no -Zunsound-mir-opts
+// unit-test: ConstDebugInfo
+// compile-flags: -C overflow-checks=no -Zmir-enable-passes=+ConstProp
 
 struct Point {
     x: u32,
     y: u32,
 }
 
+// EMIT_MIR const_debuginfo.main.ConstDebugInfo.diff
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: debug x => const 1_u8;
+    // CHECK: debug y => const 2_u8;
+    // CHECK: debug z => const 3_u8;
+    // CHECK: debug sum => const 6_u8;
+    // CHECK: debug s => const "hello, world!";
+    // CHECK: debug f => {{_.*}};
+    // CHECK: debug o => {{_.*}};
+    // CHECK: debug p => const Point
+    // CHECK: debug a => const 64_u32;
     let x = 1u8;
     let y = 2u8;
     let z = 3u8;
@@ -20,5 +32,3 @@ fn main() {
     let p = Point { x: 32, y: 32 };
     let a = p.x + p.y;
 }
-
-// EMIT_MIR const_debuginfo.main.ConstDebugInfo.diff
diff --git a/tests/mir-opt/const_goto.rs b/tests/mir-opt/const_goto.rs
index 6f84f186b31..93cb71c3a0f 100644
--- a/tests/mir-opt/const_goto.rs
+++ b/tests/mir-opt/const_goto.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstGoto
 
 pub enum Foo {
diff --git a/tests/mir-opt/const_goto_const_eval_fail.rs b/tests/mir-opt/const_goto_const_eval_fail.rs
index b2357663a90..869f916001c 100644
--- a/tests/mir-opt/const_goto_const_eval_fail.rs
+++ b/tests/mir-opt/const_goto_const_eval_fail.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(min_const_generics)]
 #![crate_type = "lib"]
 
diff --git a/tests/mir-opt/const_goto_storage.rs b/tests/mir-opt/const_goto_storage.rs
index 459599c73eb..9d43da23990 100644
--- a/tests/mir-opt/const_goto_storage.rs
+++ b/tests/mir-opt/const_goto_storage.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstGoto
 
 // EMIT_MIR const_goto_storage.match_nested_if.ConstGoto.diff
diff --git a/tests/mir-opt/const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir b/tests/mir-opt/const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir
index 5b8d3ca78e3..960b982242d 100644
--- a/tests/mir-opt/const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir
+++ b/tests/mir-opt/const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir
@@ -7,7 +7,7 @@ promoted[0] in BAR: &[&i32; 1] = {
     let mut _3: &i32;
 
     bb0: {
-        _3 = const {alloc1: &i32};
+        _3 = const {ALLOC0: &i32};
         _2 = &(*_3);
         _1 = [move _2];
         _0 = &_1;
@@ -15,6 +15,6 @@ promoted[0] in BAR: &[&i32; 1] = {
     }
 }
 
-alloc1 (static: Y, size: 4, align: 4) {
+ALLOC0 (static: Y, size: 4, align: 4) {
     2a 00 00 00                                     │ *...
 }
diff --git a/tests/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff b/tests/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff
index 14d2d7fc85c..4a93db3fcaa 100644
--- a/tests/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff
+++ b/tests/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff
@@ -16,7 +16,7 @@
 -         StorageLive(_3);
 -         StorageLive(_4);
 -         StorageLive(_5);
--         _5 = const {alloc1: &i32};
+-         _5 = const {ALLOC0: &i32};
 -         _4 = &(*_5);
 -         _3 = [move _4];
 -         _2 = &_3;
@@ -40,7 +40,7 @@
       }
 - }
 - 
-- alloc1 (static: Y, size: 4, align: 4) {
+- ALLOC0 (static: Y, size: 4, align: 4) {
 -     2a 00 00 00                                     │ *...
   }
   
diff --git a/tests/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir b/tests/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir
index 85355389be5..a9c05442764 100644
--- a/tests/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir
+++ b/tests/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir
@@ -7,7 +7,7 @@ promoted[0] in FOO: &[&i32; 1] = {
     let mut _3: *const i32;
 
     bb0: {
-        _3 = const {alloc3: *const i32};
+        _3 = const {ALLOC0: *const i32};
         _2 = &(*_3);
         _1 = [move _2];
         _0 = &_1;
@@ -15,4 +15,4 @@ promoted[0] in FOO: &[&i32; 1] = {
     }
 }
 
-alloc3 (extern static: X)
+ALLOC0 (extern static: X)
diff --git a/tests/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff b/tests/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
index ffdd195eca3..21d21b0eee0 100644
--- a/tests/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
+++ b/tests/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
@@ -18,7 +18,7 @@
 -         StorageLive(_3);
 -         StorageLive(_4);
 -         StorageLive(_5);
--         _5 = const {alloc3: *const i32};
+-         _5 = const {ALLOC0: *const i32};
 -         _4 = &(*_5);
 -         _3 = [move _4];
 -         _2 = &_3;
@@ -42,5 +42,5 @@
       }
   }
 - 
-- alloc3 (extern static: X)
+- ALLOC0 (extern static: X)
   
diff --git a/tests/mir-opt/const_promotion_extern_static.rs b/tests/mir-opt/const_promotion_extern_static.rs
index e4261cfe504..edc3a522338 100644
--- a/tests/mir-opt/const_promotion_extern_static.rs
+++ b/tests/mir-opt/const_promotion_extern_static.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // ignore-endian-big
 extern "C" {
     static X: i32;
diff --git a/tests/mir-opt/const_prop/address_of_pair.rs b/tests/mir-opt/const_prop/address_of_pair.rs
index 43dc9bae625..169469a0739 100644
--- a/tests/mir-opt/const_prop/address_of_pair.rs
+++ b/tests/mir-opt/const_prop/address_of_pair.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 // EMIT_MIR address_of_pair.fn0.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/aggregate.rs b/tests/mir-opt/const_prop/aggregate.rs
index 62cd3dd6889..2e043af08bf 100644
--- a/tests/mir-opt/const_prop/aggregate.rs
+++ b/tests/mir-opt/const_prop/aggregate.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -O
diff --git a/tests/mir-opt/const_prop/array_index.rs b/tests/mir-opt/const_prop/array_index.rs
index f85d23b9789..3bd2321653d 100644
--- a/tests/mir-opt/const_prop/array_index.rs
+++ b/tests/mir-opt/const_prop/array_index.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_prop/bad_op_div_by_zero.rs b/tests/mir-opt/const_prop/bad_op_div_by_zero.rs
index 963084bf7e5..ab41f64a573 100644
--- a/tests/mir-opt/const_prop/bad_op_div_by_zero.rs
+++ b/tests/mir-opt/const_prop/bad_op_div_by_zero.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // EMIT_MIR bad_op_div_by_zero.main.ConstProp.diff
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 9d7d2aa1044..e747b21cf9b 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 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR bad_op_mod_by_zero.main.ConstProp.diff
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 d6b1a93f304..38c97a4cf0e 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,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_prop/boolean_identities.rs b/tests/mir-opt/const_prop/boolean_identities.rs
index c7b609949cd..781cce8c7dd 100644
--- a/tests/mir-opt/const_prop/boolean_identities.rs
+++ b/tests/mir-opt/const_prop/boolean_identities.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // compile-flags: -O -Zmir-opt-level=4
 
diff --git a/tests/mir-opt/const_prop/boxes.rs b/tests/mir-opt/const_prop/boxes.rs
index 78599174b42..c6807ece199 100644
--- a/tests/mir-opt/const_prop/boxes.rs
+++ b/tests/mir-opt/const_prop/boxes.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // compile-flags: -O
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/const_prop/cast.rs b/tests/mir-opt/const_prop/cast.rs
index 984086eda48..3d543badace 100644
--- a/tests/mir-opt/const_prop/cast.rs
+++ b/tests/mir-opt/const_prop/cast.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR cast.main.ConstProp.diff
 
diff --git a/tests/mir-opt/const_prop/checked_add.main.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/checked_add.main.ConstProp.panic-abort.diff
index c2fd7f65f5e..5a958cc7a47 100644
--- a/tests/mir-opt/const_prop/checked_add.main.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/checked_add.main.ConstProp.panic-abort.diff
@@ -26,7 +26,7 @@
       }
 + }
 + 
-+ alloc3 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     02 00 00 00 00 __ __ __                         │ .....░░░
   }
   
diff --git a/tests/mir-opt/const_prop/checked_add.main.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/checked_add.main.ConstProp.panic-unwind.diff
index 21a31f9aba3..ab48186aed9 100644
--- a/tests/mir-opt/const_prop/checked_add.main.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/checked_add.main.ConstProp.panic-unwind.diff
@@ -26,7 +26,7 @@
       }
 + }
 + 
-+ alloc3 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     02 00 00 00 00 __ __ __                         │ .....░░░
   }
   
diff --git a/tests/mir-opt/const_prop/checked_add.rs b/tests/mir-opt/const_prop/checked_add.rs
index fd40876cbc2..6a53aced091 100644
--- a/tests/mir-opt/const_prop/checked_add.rs
+++ b/tests/mir-opt/const_prop/checked_add.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -C overflow-checks=on
diff --git a/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs b/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs
index c92831f926d..5bd4731bf08 100644
--- a/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs
+++ b/tests/mir-opt/const_prop/const_prop_fails_gracefully.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 #[inline(never)]
diff --git a/tests/mir-opt/const_prop/control_flow_simplification.rs b/tests/mir-opt/const_prop/control_flow_simplification.rs
index 21d727b3e50..5fc13e20275 100644
--- a/tests/mir-opt/const_prop/control_flow_simplification.rs
+++ b/tests/mir-opt/const_prop/control_flow_simplification.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -Zmir-opt-level=1
diff --git a/tests/mir-opt/const_prop/discriminant.rs b/tests/mir-opt/const_prop/discriminant.rs
index fdd67ca8ac4..11405f38bdc 100644
--- a/tests/mir-opt/const_prop/discriminant.rs
+++ b/tests/mir-opt/const_prop/discriminant.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // compile-flags: -O
 
diff --git a/tests/mir-opt/const_prop/indirect.main.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/indirect.main.ConstProp.panic-abort.diff
index c0efc873029..530cfc6539a 100644
--- a/tests/mir-opt/const_prop/indirect.main.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/indirect.main.ConstProp.panic-abort.diff
@@ -31,7 +31,7 @@
       }
 + }
 + 
-+ alloc3 (size: 2, align: 1) {
++ ALLOC0 (size: 2, align: 1) {
 +     03 00                                           │ ..
   }
   
diff --git a/tests/mir-opt/const_prop/indirect.main.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/indirect.main.ConstProp.panic-unwind.diff
index 2aee6f164ae..08cf72e47a9 100644
--- a/tests/mir-opt/const_prop/indirect.main.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/indirect.main.ConstProp.panic-unwind.diff
@@ -31,7 +31,7 @@
       }
 + }
 + 
-+ alloc3 (size: 2, align: 1) {
++ ALLOC0 (size: 2, align: 1) {
 +     03 00                                           │ ..
   }
   
diff --git a/tests/mir-opt/const_prop/indirect.rs b/tests/mir-opt/const_prop/indirect.rs
index 72af6cd95b8..0e6e1d78d1e 100644
--- a/tests/mir-opt/const_prop/indirect.rs
+++ b/tests/mir-opt/const_prop/indirect.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -C overflow-checks=on
diff --git a/tests/mir-opt/const_prop_miscompile.bar.ConstProp.diff b/tests/mir-opt/const_prop/indirect_mutation.bar.ConstProp.diff
index 4eafb8d0917..4eafb8d0917 100644
--- a/tests/mir-opt/const_prop_miscompile.bar.ConstProp.diff
+++ b/tests/mir-opt/const_prop/indirect_mutation.bar.ConstProp.diff
diff --git a/tests/mir-opt/const_prop_miscompile.foo.ConstProp.diff b/tests/mir-opt/const_prop/indirect_mutation.foo.ConstProp.diff
index 445d9895d6a..445d9895d6a 100644
--- a/tests/mir-opt/const_prop_miscompile.foo.ConstProp.diff
+++ b/tests/mir-opt/const_prop/indirect_mutation.foo.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/indirect_mutation.rs b/tests/mir-opt/const_prop/indirect_mutation.rs
new file mode 100644
index 00000000000..ec9da6e8e5c
--- /dev/null
+++ b/tests/mir-opt/const_prop/indirect_mutation.rs
@@ -0,0 +1,41 @@
+// unit-test: ConstProp
+// Check that we do not propagate past an indirect mutation.
+#![feature(raw_ref_op)]
+
+// EMIT_MIR indirect_mutation.foo.ConstProp.diff
+fn foo() {
+    // CHECK-LABEL: fn foo(
+    // CHECK: debug u => _1;
+    // CHECK: debug y => _3;
+    // CHECK: _1 = (const 1_i32,);
+    // CHECK: _2 = &mut (_1.0: i32);
+    // CHECK: (*_2) = const 5_i32;
+    // CHECK: _4 = (_1.0: i32);
+    // CHECK: _3 = Eq(move _4, const 5_i32);
+
+    let mut u = (1,);
+    *&mut u.0 = 5;
+    let y = { u.0 } == 5;
+}
+
+// EMIT_MIR indirect_mutation.bar.ConstProp.diff
+fn bar() {
+    // CHECK-LABEL: fn bar(
+    // CHECK: debug v => _1;
+    // CHECK: debug y => _4;
+    // CHECK: _3 = &raw mut (_1.0: i32);
+    // CHECK: (*_3) = const 5_i32;
+    // CHECK: _5 = (_1.0: i32);
+    // CHECK: _4 = Eq(move _5, const 5_i32);
+
+    let mut v = (1,);
+    unsafe {
+        *&raw mut v.0 = 5;
+    }
+    let y = { v.0 } == 5;
+}
+
+fn main() {
+    foo();
+    bar();
+}
diff --git a/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-abort.diff
index d585ae89e82..b30deb2a4d4 100644
--- a/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-abort.diff
@@ -39,7 +39,7 @@
       }
 + }
 + 
-+ alloc3 (size: 2, align: 1) {
++ ALLOC0 (size: 2, align: 1) {
 +     00 01                                           │ ..
   }
   
diff --git a/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-unwind.diff
index 9fe39090638..47c51196c02 100644
--- a/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/inherit_overflow.main.ConstProp.panic-unwind.diff
@@ -39,7 +39,7 @@
       }
 + }
 + 
-+ alloc3 (size: 2, align: 1) {
++ ALLOC0 (size: 2, align: 1) {
 +     00 01                                           │ ..
   }
   
diff --git a/tests/mir-opt/const_prop/inherit_overflow.rs b/tests/mir-opt/const_prop/inherit_overflow.rs
index 6ebd364121a..41989462deb 100644
--- a/tests/mir-opt/const_prop/inherit_overflow.rs
+++ b/tests/mir-opt/const_prop/inherit_overflow.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -Zmir-enable-passes=+Inline
diff --git a/tests/mir-opt/const_prop/invalid_constant.rs b/tests/mir-opt/const_prop/invalid_constant.rs
index bdbc5a1990e..ff6b31a1ee2 100644
--- a/tests/mir-opt/const_prop/invalid_constant.rs
+++ b/tests/mir-opt/const_prop/invalid_constant.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // compile-flags: -Zmir-enable-passes=+RemoveZsts
 // Verify that we can pretty print invalid constants.
diff --git a/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-abort.diff
index 18341ba7db9..6484b4b67af 100644
--- a/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-abort.diff
@@ -20,11 +20,11 @@
       }
 + }
 + 
-+ alloc8 (size: 2, align: 1) {
++ ALLOC0 (size: 2, align: 1) {
 +     00 00                                           │ ..
 + }
 + 
-+ alloc7 (size: 2, align: 1) {
++ ALLOC1 (size: 2, align: 1) {
 +     00 00                                           │ ..
   }
   
diff --git a/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-unwind.diff
index 50763c10f0c..b02f0407839 100644
--- a/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/issue_66971.main.ConstProp.panic-unwind.diff
@@ -20,11 +20,11 @@
       }
 + }
 + 
-+ alloc8 (size: 2, align: 1) {
++ ALLOC0 (size: 2, align: 1) {
 +     00 00                                           │ ..
 + }
 + 
-+ alloc7 (size: 2, align: 1) {
++ ALLOC1 (size: 2, align: 1) {
 +     00 00                                           │ ..
   }
   
diff --git a/tests/mir-opt/const_prop/issue_66971.rs b/tests/mir-opt/const_prop/issue_66971.rs
index a0242ec633f..386c95b5b69 100644
--- a/tests/mir-opt/const_prop/issue_66971.rs
+++ b/tests/mir-opt/const_prop/issue_66971.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -Z mir-opt-level=3
diff --git a/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-abort.diff
index 015180db896..c1ef453e9df 100644
--- a/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-abort.diff
@@ -25,15 +25,15 @@
       }
 + }
 + 
-+ alloc12 (size: 2, align: 1) {
++ ALLOC0 (size: 2, align: 1) {
 +     01 02                                           │ ..
 + }
 + 
-+ alloc11 (size: 2, align: 1) {
++ ALLOC1 (size: 2, align: 1) {
 +     01 02                                           │ ..
 + }
 + 
-+ alloc8 (size: 2, align: 1) {
++ ALLOC2 (size: 2, align: 1) {
 +     01 02                                           │ ..
   }
   
diff --git a/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-unwind.diff
index 8e41705c1af..53cdcc18167 100644
--- a/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/issue_67019.main.ConstProp.panic-unwind.diff
@@ -25,15 +25,15 @@
       }
 + }
 + 
-+ alloc12 (size: 2, align: 1) {
++ ALLOC0 (size: 2, align: 1) {
 +     01 02                                           │ ..
 + }
 + 
-+ alloc11 (size: 2, align: 1) {
++ ALLOC1 (size: 2, align: 1) {
 +     01 02                                           │ ..
 + }
 + 
-+ alloc8 (size: 2, align: 1) {
++ ALLOC2 (size: 2, align: 1) {
 +     01 02                                           │ ..
   }
   
diff --git a/tests/mir-opt/const_prop/issue_67019.rs b/tests/mir-opt/const_prop/issue_67019.rs
index 66b577f5b5f..2f61298bb98 100644
--- a/tests/mir-opt/const_prop/issue_67019.rs
+++ b/tests/mir-opt/const_prop/issue_67019.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -Z mir-opt-level=3
diff --git a/tests/mir-opt/const_prop/large_array_index.rs b/tests/mir-opt/const_prop/large_array_index.rs
index d226bd54671..d98d166ff7c 100644
--- a/tests/mir-opt/const_prop/large_array_index.rs
+++ b/tests/mir-opt/const_prop/large_array_index.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_prop/mult_by_zero.rs b/tests/mir-opt/const_prop/mult_by_zero.rs
index 7bd30975a73..47e15205ea9 100644
--- a/tests/mir-opt/const_prop/mult_by_zero.rs
+++ b/tests/mir-opt/const_prop/mult_by_zero.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 // EMIT_MIR mult_by_zero.test.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/mutable_variable.rs b/tests/mir-opt/const_prop/mutable_variable.rs
index 95987ef7fa9..175d63d46f5 100644
--- a/tests/mir-opt/const_prop/mutable_variable.rs
+++ b/tests/mir-opt/const_prop/mutable_variable.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 // EMIT_MIR mutable_variable.main.ConstProp.diff
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 56a127ae31e..c3ace9687e6 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
@@ -27,11 +27,11 @@
       }
 + }
 + 
-+ alloc7 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     2a 00 00 00 63 00 00 00                         │ *...c...
 + }
 + 
-+ alloc5 (size: 8, align: 4) {
++ ALLOC1 (size: 8, align: 4) {
 +     2a 00 00 00 2b 00 00 00                         │ *...+...
   }
   
diff --git a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
index a145c035438..f926771ae38 100644
--- a/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_aggregate.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 // EMIT_MIR mutable_variable_aggregate.main.ConstProp.diff
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 3099e659f3f..a81aa7b4979 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,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 // EMIT_MIR mutable_variable_aggregate_mut_ref.main.ConstProp.diff
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 30ea5714ae4..54a5d922321 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,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 
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 ac26f8ef4ae..1f74bdcfd03 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
@@ -23,7 +23,7 @@
           StorageLive(_2);
           StorageLive(_3);
           StorageLive(_4);
-          _4 = const {alloc1: *mut u32};
+          _4 = const {ALLOC0: *mut u32};
           _3 = (*_4);
           _1 = move _3;
           StorageDead(_3);
@@ -39,7 +39,7 @@
       }
   }
   
-  alloc1 (static: STATIC, size: 4, align: 4) {
+  ALLOC0 (static: STATIC, size: 4, align: 4) {
       42 42 42 42                                     │ BBBB
   }
   
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 e51c6223555..a7aeeccd861 100644
--- a/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_no_prop.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 static mut STATIC: u32 = 0x42424242;
diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.panic-abort.diff
index a1b433716c8..85bd2b6e722 100644
--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.panic-abort.diff
@@ -48,7 +48,7 @@
       }
 + }
 + 
-+ alloc7 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     01 00 00 00 02 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.panic-unwind.diff
index 2dc514194bc..06e96e57a62 100644
--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.main.ConstProp.panic-unwind.diff
@@ -48,7 +48,7 @@
       }
 + }
 + 
-+ alloc7 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     01 00 00 00 02 00 00 00                         │ ........
   }
   
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 4e7c0597a29..6bdb136a949 100644
--- a/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
+++ b/tests/mir-opt/const_prop/mutable_variable_unprop_assign.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 
diff --git a/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.panic-abort.diff
index c73d217aeec..711db3d21dd 100644
--- a/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.panic-abort.diff
@@ -8,6 +8,9 @@
       let mut _4: usize;
       let mut _6: usize;
       let mut _8: usize;
+      let mut _10: usize;
+      let mut _12: usize;
+      let mut _14: usize;
       scope 1 {
           debug x => _1;
           let _3: usize;
@@ -19,6 +22,18 @@
                   let _7: usize;
                   scope 4 {
                       debug z1 => _7;
+                      let _9: usize;
+                      scope 5 {
+                          debug eA0 => _9;
+                          let _11: usize;
+                          scope 6 {
+                              debug eA1 => _11;
+                              let _13: usize;
+                              scope 7 {
+                                  debug eC => _13;
+                              }
+                          }
+                      }
                   }
               }
           }
@@ -27,7 +42,7 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
--         _2 = OffsetOf(Alpha, [0]);
+-         _2 = OffsetOf(Alpha, [(0, 0)]);
 -         _1 = must_use::<usize>(move _2) -> [return: bb1, unwind unreachable];
 +         _2 = const 4_usize;
 +         _1 = must_use::<usize>(const 4_usize) -> [return: bb1, unwind unreachable];
@@ -37,7 +52,7 @@
           StorageDead(_2);
           StorageLive(_3);
           StorageLive(_4);
--         _4 = OffsetOf(Alpha, [1]);
+-         _4 = OffsetOf(Alpha, [(0, 1)]);
 -         _3 = must_use::<usize>(move _4) -> [return: bb2, unwind unreachable];
 +         _4 = const 0_usize;
 +         _3 = must_use::<usize>(const 0_usize) -> [return: bb2, unwind unreachable];
@@ -47,7 +62,7 @@
           StorageDead(_4);
           StorageLive(_5);
           StorageLive(_6);
--         _6 = OffsetOf(Alpha, [2, 0]);
+-         _6 = OffsetOf(Alpha, [(0, 2), (0, 0)]);
 -         _5 = must_use::<usize>(move _6) -> [return: bb3, unwind unreachable];
 +         _6 = const 2_usize;
 +         _5 = must_use::<usize>(const 2_usize) -> [return: bb3, unwind unreachable];
@@ -57,7 +72,7 @@
           StorageDead(_6);
           StorageLive(_7);
           StorageLive(_8);
--         _8 = OffsetOf(Alpha, [2, 1]);
+-         _8 = OffsetOf(Alpha, [(0, 2), (0, 1)]);
 -         _7 = must_use::<usize>(move _8) -> [return: bb4, unwind unreachable];
 +         _8 = const 3_usize;
 +         _7 = must_use::<usize>(const 3_usize) -> [return: bb4, unwind unreachable];
@@ -65,7 +80,40 @@
   
       bb4: {
           StorageDead(_8);
+          StorageLive(_9);
+          StorageLive(_10);
+-         _10 = OffsetOf(Epsilon, [(0, 0)]);
+-         _9 = must_use::<usize>(move _10) -> [return: bb5, unwind unreachable];
++         _10 = const 1_usize;
++         _9 = must_use::<usize>(const 1_usize) -> [return: bb5, unwind unreachable];
+      }
+  
+      bb5: {
+          StorageDead(_10);
+          StorageLive(_11);
+          StorageLive(_12);
+-         _12 = OffsetOf(Epsilon, [(0, 1)]);
+-         _11 = must_use::<usize>(move _12) -> [return: bb6, unwind unreachable];
++         _12 = const 2_usize;
++         _11 = must_use::<usize>(const 2_usize) -> [return: bb6, unwind unreachable];
+      }
+  
+      bb6: {
+          StorageDead(_12);
+          StorageLive(_13);
+          StorageLive(_14);
+-         _14 = OffsetOf(Epsilon, [(2, 0)]);
+-         _13 = must_use::<usize>(move _14) -> [return: bb7, unwind unreachable];
++         _14 = const 4_usize;
++         _13 = must_use::<usize>(const 4_usize) -> [return: bb7, unwind unreachable];
+      }
+  
+      bb7: {
+          StorageDead(_14);
           _0 = const ();
+          StorageDead(_13);
+          StorageDead(_11);
+          StorageDead(_9);
           StorageDead(_7);
           StorageDead(_5);
           StorageDead(_3);
diff --git a/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.panic-unwind.diff
index 913ffca4ae9..49458145415 100644
--- a/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/offset_of.concrete.ConstProp.panic-unwind.diff
@@ -8,6 +8,9 @@
       let mut _4: usize;
       let mut _6: usize;
       let mut _8: usize;
+      let mut _10: usize;
+      let mut _12: usize;
+      let mut _14: usize;
       scope 1 {
           debug x => _1;
           let _3: usize;
@@ -19,6 +22,18 @@
                   let _7: usize;
                   scope 4 {
                       debug z1 => _7;
+                      let _9: usize;
+                      scope 5 {
+                          debug eA0 => _9;
+                          let _11: usize;
+                          scope 6 {
+                              debug eA1 => _11;
+                              let _13: usize;
+                              scope 7 {
+                                  debug eC => _13;
+                              }
+                          }
+                      }
                   }
               }
           }
@@ -27,7 +42,7 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
--         _2 = OffsetOf(Alpha, [0]);
+-         _2 = OffsetOf(Alpha, [(0, 0)]);
 -         _1 = must_use::<usize>(move _2) -> [return: bb1, unwind continue];
 +         _2 = const 4_usize;
 +         _1 = must_use::<usize>(const 4_usize) -> [return: bb1, unwind continue];
@@ -37,7 +52,7 @@
           StorageDead(_2);
           StorageLive(_3);
           StorageLive(_4);
--         _4 = OffsetOf(Alpha, [1]);
+-         _4 = OffsetOf(Alpha, [(0, 1)]);
 -         _3 = must_use::<usize>(move _4) -> [return: bb2, unwind continue];
 +         _4 = const 0_usize;
 +         _3 = must_use::<usize>(const 0_usize) -> [return: bb2, unwind continue];
@@ -47,7 +62,7 @@
           StorageDead(_4);
           StorageLive(_5);
           StorageLive(_6);
--         _6 = OffsetOf(Alpha, [2, 0]);
+-         _6 = OffsetOf(Alpha, [(0, 2), (0, 0)]);
 -         _5 = must_use::<usize>(move _6) -> [return: bb3, unwind continue];
 +         _6 = const 2_usize;
 +         _5 = must_use::<usize>(const 2_usize) -> [return: bb3, unwind continue];
@@ -57,7 +72,7 @@
           StorageDead(_6);
           StorageLive(_7);
           StorageLive(_8);
--         _8 = OffsetOf(Alpha, [2, 1]);
+-         _8 = OffsetOf(Alpha, [(0, 2), (0, 1)]);
 -         _7 = must_use::<usize>(move _8) -> [return: bb4, unwind continue];
 +         _8 = const 3_usize;
 +         _7 = must_use::<usize>(const 3_usize) -> [return: bb4, unwind continue];
@@ -65,7 +80,40 @@
   
       bb4: {
           StorageDead(_8);
+          StorageLive(_9);
+          StorageLive(_10);
+-         _10 = OffsetOf(Epsilon, [(0, 0)]);
+-         _9 = must_use::<usize>(move _10) -> [return: bb5, unwind continue];
++         _10 = const 1_usize;
++         _9 = must_use::<usize>(const 1_usize) -> [return: bb5, unwind continue];
+      }
+  
+      bb5: {
+          StorageDead(_10);
+          StorageLive(_11);
+          StorageLive(_12);
+-         _12 = OffsetOf(Epsilon, [(0, 1)]);
+-         _11 = must_use::<usize>(move _12) -> [return: bb6, unwind continue];
++         _12 = const 2_usize;
++         _11 = must_use::<usize>(const 2_usize) -> [return: bb6, unwind continue];
+      }
+  
+      bb6: {
+          StorageDead(_12);
+          StorageLive(_13);
+          StorageLive(_14);
+-         _14 = OffsetOf(Epsilon, [(2, 0)]);
+-         _13 = must_use::<usize>(move _14) -> [return: bb7, unwind continue];
++         _14 = const 4_usize;
++         _13 = must_use::<usize>(const 4_usize) -> [return: bb7, unwind continue];
+      }
+  
+      bb7: {
+          StorageDead(_14);
           _0 = const ();
+          StorageDead(_13);
+          StorageDead(_11);
+          StorageDead(_9);
           StorageDead(_7);
           StorageDead(_5);
           StorageDead(_3);
diff --git a/tests/mir-opt/const_prop/offset_of.generic.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/offset_of.generic.ConstProp.panic-abort.diff
index 7519331f6d7..768970a7250 100644
--- a/tests/mir-opt/const_prop/offset_of.generic.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/offset_of.generic.ConstProp.panic-abort.diff
@@ -8,6 +8,9 @@
       let mut _4: usize;
       let mut _6: usize;
       let mut _8: usize;
+      let mut _10: usize;
+      let mut _12: usize;
+      let mut _14: usize;
       scope 1 {
           debug gx => _1;
           let _3: usize;
@@ -19,6 +22,18 @@
                   let _7: usize;
                   scope 4 {
                       debug dy => _7;
+                      let _9: usize;
+                      scope 5 {
+                          debug zA0 => _9;
+                          let _11: usize;
+                          scope 6 {
+                              debug zA1 => _11;
+                              let _13: usize;
+                              scope 7 {
+                                  debug zB => _13;
+                              }
+                          }
+                      }
                   }
               }
           }
@@ -27,7 +42,7 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
-          _2 = OffsetOf(Gamma<T>, [0]);
+          _2 = OffsetOf(Gamma<T>, [(0, 0)]);
           _1 = must_use::<usize>(move _2) -> [return: bb1, unwind unreachable];
       }
   
@@ -35,7 +50,7 @@
           StorageDead(_2);
           StorageLive(_3);
           StorageLive(_4);
-          _4 = OffsetOf(Gamma<T>, [1]);
+          _4 = OffsetOf(Gamma<T>, [(0, 1)]);
           _3 = must_use::<usize>(move _4) -> [return: bb2, unwind unreachable];
       }
   
@@ -43,7 +58,7 @@
           StorageDead(_4);
           StorageLive(_5);
           StorageLive(_6);
-          _6 = OffsetOf(Delta<T>, [1]);
+          _6 = OffsetOf(Delta<T>, [(0, 1)]);
           _5 = must_use::<usize>(move _6) -> [return: bb3, unwind unreachable];
       }
   
@@ -51,13 +66,40 @@
           StorageDead(_6);
           StorageLive(_7);
           StorageLive(_8);
-          _8 = OffsetOf(Delta<T>, [2]);
+          _8 = OffsetOf(Delta<T>, [(0, 2)]);
           _7 = must_use::<usize>(move _8) -> [return: bb4, unwind unreachable];
       }
   
       bb4: {
           StorageDead(_8);
+          StorageLive(_9);
+          StorageLive(_10);
+          _10 = OffsetOf(Zeta<T>, [(0, 0)]);
+          _9 = must_use::<usize>(move _10) -> [return: bb5, unwind unreachable];
+      }
+  
+      bb5: {
+          StorageDead(_10);
+          StorageLive(_11);
+          StorageLive(_12);
+          _12 = OffsetOf(Zeta<T>, [(0, 1)]);
+          _11 = must_use::<usize>(move _12) -> [return: bb6, unwind unreachable];
+      }
+  
+      bb6: {
+          StorageDead(_12);
+          StorageLive(_13);
+          StorageLive(_14);
+          _14 = OffsetOf(Zeta<T>, [(1, 0)]);
+          _13 = must_use::<usize>(move _14) -> [return: bb7, unwind unreachable];
+      }
+  
+      bb7: {
+          StorageDead(_14);
           _0 = const ();
+          StorageDead(_13);
+          StorageDead(_11);
+          StorageDead(_9);
           StorageDead(_7);
           StorageDead(_5);
           StorageDead(_3);
diff --git a/tests/mir-opt/const_prop/offset_of.generic.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/offset_of.generic.ConstProp.panic-unwind.diff
index fd5206e460c..04ccd2b36e0 100644
--- a/tests/mir-opt/const_prop/offset_of.generic.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/offset_of.generic.ConstProp.panic-unwind.diff
@@ -8,6 +8,9 @@
       let mut _4: usize;
       let mut _6: usize;
       let mut _8: usize;
+      let mut _10: usize;
+      let mut _12: usize;
+      let mut _14: usize;
       scope 1 {
           debug gx => _1;
           let _3: usize;
@@ -19,6 +22,18 @@
                   let _7: usize;
                   scope 4 {
                       debug dy => _7;
+                      let _9: usize;
+                      scope 5 {
+                          debug zA0 => _9;
+                          let _11: usize;
+                          scope 6 {
+                              debug zA1 => _11;
+                              let _13: usize;
+                              scope 7 {
+                                  debug zB => _13;
+                              }
+                          }
+                      }
                   }
               }
           }
@@ -27,7 +42,7 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
-          _2 = OffsetOf(Gamma<T>, [0]);
+          _2 = OffsetOf(Gamma<T>, [(0, 0)]);
           _1 = must_use::<usize>(move _2) -> [return: bb1, unwind continue];
       }
   
@@ -35,7 +50,7 @@
           StorageDead(_2);
           StorageLive(_3);
           StorageLive(_4);
-          _4 = OffsetOf(Gamma<T>, [1]);
+          _4 = OffsetOf(Gamma<T>, [(0, 1)]);
           _3 = must_use::<usize>(move _4) -> [return: bb2, unwind continue];
       }
   
@@ -43,7 +58,7 @@
           StorageDead(_4);
           StorageLive(_5);
           StorageLive(_6);
-          _6 = OffsetOf(Delta<T>, [1]);
+          _6 = OffsetOf(Delta<T>, [(0, 1)]);
           _5 = must_use::<usize>(move _6) -> [return: bb3, unwind continue];
       }
   
@@ -51,13 +66,40 @@
           StorageDead(_6);
           StorageLive(_7);
           StorageLive(_8);
-          _8 = OffsetOf(Delta<T>, [2]);
+          _8 = OffsetOf(Delta<T>, [(0, 2)]);
           _7 = must_use::<usize>(move _8) -> [return: bb4, unwind continue];
       }
   
       bb4: {
           StorageDead(_8);
+          StorageLive(_9);
+          StorageLive(_10);
+          _10 = OffsetOf(Zeta<T>, [(0, 0)]);
+          _9 = must_use::<usize>(move _10) -> [return: bb5, unwind continue];
+      }
+  
+      bb5: {
+          StorageDead(_10);
+          StorageLive(_11);
+          StorageLive(_12);
+          _12 = OffsetOf(Zeta<T>, [(0, 1)]);
+          _11 = must_use::<usize>(move _12) -> [return: bb6, unwind continue];
+      }
+  
+      bb6: {
+          StorageDead(_12);
+          StorageLive(_13);
+          StorageLive(_14);
+          _14 = OffsetOf(Zeta<T>, [(1, 0)]);
+          _13 = must_use::<usize>(move _14) -> [return: bb7, unwind continue];
+      }
+  
+      bb7: {
+          StorageDead(_14);
           _0 = const ();
+          StorageDead(_13);
+          StorageDead(_11);
+          StorageDead(_9);
           StorageDead(_7);
           StorageDead(_5);
           StorageDead(_3);
diff --git a/tests/mir-opt/const_prop/offset_of.rs b/tests/mir-opt/const_prop/offset_of.rs
index 164db59572b..2571c3856f4 100644
--- a/tests/mir-opt/const_prop/offset_of.rs
+++ b/tests/mir-opt/const_prop/offset_of.rs
@@ -1,7 +1,8 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
-#![feature(offset_of)]
+#![feature(offset_of, offset_of_enum)]
 
 use std::marker::PhantomData;
 use std::mem::offset_of;
@@ -27,12 +28,26 @@ struct Delta<T> {
     y: u16,
 }
 
+enum Epsilon {
+    A(u8, u16),
+    B,
+    C { c: u32 }
+}
+
+enum Zeta<T> {
+    A(T, bool),
+    B(char),
+}
+
 // EMIT_MIR offset_of.concrete.ConstProp.diff
 fn concrete() {
     let x = offset_of!(Alpha, x);
     let y = offset_of!(Alpha, y);
     let z0 = offset_of!(Alpha, z.0);
     let z1 = offset_of!(Alpha, z.1);
+    let eA0 = offset_of!(Epsilon, A.0);
+    let eA1 = offset_of!(Epsilon, A.1);
+    let eC = offset_of!(Epsilon, C.c);
 }
 
 // EMIT_MIR offset_of.generic.ConstProp.diff
@@ -41,6 +56,9 @@ fn generic<T>() {
     let gy = offset_of!(Gamma<T>, y);
     let dx = offset_of!(Delta<T>, x);
     let dy = offset_of!(Delta<T>, y);
+    let zA0 = offset_of!(Zeta<T>, A.0);
+    let zA1 = offset_of!(Zeta<T>, A.1);
+    let zB = offset_of!(Zeta<T>, B.0);
 }
 
 fn main() {
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 29c455f35b3..e193c82d2c0 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
@@ -16,12 +16,12 @@
           StorageLive(_1);
           StorageLive(_2);
           StorageLive(_3);
-          _3 = const {alloc1: &u8};
+          _3 = const {ALLOC0: &u8};
 -         _2 = (*_3);
 +         _2 = const 2_u8;
           StorageLive(_4);
           StorageLive(_5);
-          _5 = const {alloc1: &u8};
+          _5 = const {ALLOC0: &u8};
 -         _4 = (*_5);
 -         _1 = Add(move _2, move _4);
 +         _4 = const 2_u8;
@@ -36,7 +36,7 @@
       }
   }
   
-  alloc1 (static: FOO, size: 1, align: 1) {
+  ALLOC0 (static: FOO, size: 1, align: 1) {
       02                                              │ .
   }
   
diff --git a/tests/mir-opt/const_prop/read_immutable_static.rs b/tests/mir-opt/const_prop/read_immutable_static.rs
index fb8f9fe996a..a8d8cfacc7c 100644
--- a/tests/mir-opt/const_prop/read_immutable_static.rs
+++ b/tests/mir-opt/const_prop/read_immutable_static.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 
 static FOO: u8 = 2;
diff --git a/tests/mir-opt/const_prop/ref_deref.rs b/tests/mir-opt/const_prop/ref_deref.rs
index 76e56916af0..f2fa024f722 100644
--- a/tests/mir-opt/const_prop/ref_deref.rs
+++ b/tests/mir-opt/const_prop/ref_deref.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR ref_deref.main.ConstProp.diff
 
diff --git a/tests/mir-opt/const_prop/ref_deref_project.rs b/tests/mir-opt/const_prop/ref_deref_project.rs
index 04fc7f8daa1..1b9e0acb2c0 100644
--- a/tests/mir-opt/const_prop/ref_deref_project.rs
+++ b/tests/mir-opt/const_prop/ref_deref_project.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR ref_deref_project.main.ConstProp.diff
 
diff --git a/tests/mir-opt/const_prop/reify_fn_ptr.rs b/tests/mir-opt/const_prop/reify_fn_ptr.rs
index 5f63820669b..da7de80c5f4 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 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR reify_fn_ptr.main.ConstProp.diff
 
diff --git a/tests/mir-opt/const_prop/repeat.rs b/tests/mir-opt/const_prop/repeat.rs
index fb8b825ee36..92194d6bb58 100644
--- a/tests/mir-opt/const_prop/repeat.rs
+++ b/tests/mir-opt/const_prop/repeat.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/const_prop/return_place.add.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/return_place.add.ConstProp.panic-abort.diff
index 6c9de476465..974a42e5078 100644
--- a/tests/mir-opt/const_prop/return_place.add.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/return_place.add.ConstProp.panic-abort.diff
@@ -19,7 +19,7 @@
       }
 + }
 + 
-+ alloc5 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     04 00 00 00 00 __ __ __                         │ .....░░░
   }
   
diff --git a/tests/mir-opt/const_prop/return_place.add.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/return_place.add.ConstProp.panic-unwind.diff
index 0f079278c43..55dbc700285 100644
--- a/tests/mir-opt/const_prop/return_place.add.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/return_place.add.ConstProp.panic-unwind.diff
@@ -19,7 +19,7 @@
       }
 + }
 + 
-+ alloc5 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     04 00 00 00 00 __ __ __                         │ .....░░░
   }
   
diff --git a/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-abort.mir b/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-abort.mir
index c2488f3944c..f87c26bb004 100644
--- a/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-abort.mir
+++ b/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-abort.mir
@@ -15,6 +15,6 @@ fn add() -> u32 {
     }
 }
 
-alloc5 (size: 8, align: 4) {
+ALLOC0 (size: 8, align: 4) {
     04 00 00 00 00 __ __ __                         │ .....░░░
 }
diff --git a/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-unwind.mir b/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-unwind.mir
index fa0b9c77eaf..33f97591387 100644
--- a/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-unwind.mir
+++ b/tests/mir-opt/const_prop/return_place.add.PreCodegen.before.panic-unwind.mir
@@ -15,6 +15,6 @@ fn add() -> u32 {
     }
 }
 
-alloc5 (size: 8, align: 4) {
+ALLOC0 (size: 8, align: 4) {
     04 00 00 00 00 __ __ __                         │ .....░░░
 }
diff --git a/tests/mir-opt/const_prop/return_place.rs b/tests/mir-opt/const_prop/return_place.rs
index 0576b02a845..1263de7931f 100644
--- a/tests/mir-opt/const_prop/return_place.rs
+++ b/tests/mir-opt/const_prop/return_place.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -C overflow-checks=on
diff --git a/tests/mir-opt/const_prop/scalar_literal_propagation.rs b/tests/mir-opt/const_prop/scalar_literal_propagation.rs
index dfe41e6145b..9dcddf7c770 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 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR scalar_literal_propagation.main.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/slice_len.rs b/tests/mir-opt/const_prop/slice_len.rs
index e91724536f9..3b551b6b173 100644
--- a/tests/mir-opt/const_prop/slice_len.rs
+++ b/tests/mir-opt/const_prop/slice_len.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: ConstProp
 // compile-flags: -Zmir-enable-passes=+InstSimplify
diff --git a/tests/mir-opt/const_prop/switch_int.rs b/tests/mir-opt/const_prop/switch_int.rs
index bf708c8298e..7ec56e11e85 100644
--- a/tests/mir-opt/const_prop/switch_int.rs
+++ b/tests/mir-opt/const_prop/switch_int.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // compile-flags: -Zmir-enable-passes=+SimplifyConstCondition-after-const-prop
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/const_prop/transmute.rs b/tests/mir-opt/const_prop/transmute.rs
index 762c421715a..99988d05994 100644
--- a/tests/mir-opt/const_prop/transmute.rs
+++ b/tests/mir-opt/const_prop/transmute.rs
@@ -7,55 +7,77 @@ use std::mem::transmute;
 
 // EMIT_MIR transmute.less_as_i8.ConstProp.diff
 pub fn less_as_i8() -> i8 {
+    // CHECK-LABEL: fn less_as_i8(
+    // CHECK: _0 = const -1_i8;
     unsafe { transmute(std::cmp::Ordering::Less) }
 }
 
 // EMIT_MIR transmute.from_char.ConstProp.diff
 pub fn from_char() -> i32 {
+    // CHECK-LABEL: fn from_char(
+    // CHECK: _0 = const 82_i32;
     unsafe { transmute('R') }
 }
 
 // EMIT_MIR transmute.valid_char.ConstProp.diff
 pub fn valid_char() -> char {
+    // CHECK-LABEL: fn valid_char(
+    // CHECK: _0 = const 'R';
     unsafe { transmute(0x52_u32) }
 }
 
 // EMIT_MIR transmute.invalid_char.ConstProp.diff
 pub unsafe fn invalid_char() -> char {
+    // CHECK-LABEL: fn invalid_char(
+    // CHECK: _0 = const {transmute(0x7fffffff): char};
     unsafe { transmute(i32::MAX) }
 }
 
 // EMIT_MIR transmute.invalid_bool.ConstProp.diff
 pub unsafe fn invalid_bool() -> bool {
+    // CHECK-LABEL: fn invalid_bool(
+    // CHECK: _0 = const {transmute(0xff): bool};
     unsafe { transmute(-1_i8) }
 }
 
 // EMIT_MIR transmute.undef_union_as_integer.ConstProp.diff
 pub unsafe fn undef_union_as_integer() -> u32 {
+    // CHECK-LABEL: fn undef_union_as_integer(
+    // CHECK: _1 = Union32 {
+    // CHECK: _0 = move _1 as u32 (Transmute);
     union Union32 { value: u32, unit: () }
     unsafe { transmute(Union32 { unit: () }) }
 }
 
 // EMIT_MIR transmute.unreachable_direct.ConstProp.diff
 pub unsafe fn unreachable_direct() -> ! {
+    // CHECK-LABEL: fn unreachable_direct(
+    // CHECK: [[unit:_.*]] = ();
+    // CHECK: move [[unit]] as Never (Transmute);
     let x: Never = unsafe { transmute(()) };
     match x {}
 }
 
 // EMIT_MIR transmute.unreachable_ref.ConstProp.diff
 pub unsafe fn unreachable_ref() -> ! {
+    // CHECK-LABEL: fn unreachable_ref(
+    // CHECK: = const {0x1 as &Never};
     let x: &Never = unsafe { transmute(1_usize) };
     match *x {}
 }
 
 // EMIT_MIR transmute.unreachable_mut.ConstProp.diff
 pub unsafe fn unreachable_mut() -> ! {
+    // CHECK-LABEL: fn unreachable_mut(
+    // CHECK: = const {0x1 as &mut Never};
     let x: &mut Never = unsafe { transmute(1_usize) };
     match *x {}
 }
 
 // EMIT_MIR transmute.unreachable_box.ConstProp.diff
 pub unsafe fn unreachable_box() -> ! {
+    // CHECK-LABEL: fn unreachable_box(
+    // CHECK: = const Box::<Never>(
     let x: Box<Never> = unsafe { transmute(1_usize) };
     match *x {}
 }
diff --git a/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.32bit.diff b/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.32bit.diff
index 100982382dd..16519749b82 100644
--- a/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.32bit.diff
+++ b/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.32bit.diff
@@ -4,6 +4,7 @@
   fn unreachable_box() -> ! {
       let mut _0: !;
       let _1: std::boxed::Box<Never>;
+      let mut _2: *const Never;
       scope 1 {
           debug x => _1;
       }
@@ -13,7 +14,9 @@
       bb0: {
           StorageLive(_1);
 -         _1 = const 1_usize as std::boxed::Box<Never> (Transmute);
+-         _2 = (((_1.0: std::ptr::Unique<Never>).0: std::ptr::NonNull<Never>).0: *const Never);
 +         _1 = const Box::<Never>(Unique::<Never> {{ pointer: NonNull::<Never> {{ pointer: {0x1 as *const Never} }}, _marker: PhantomData::<Never> }}, std::alloc::Global);
++         _2 = const {0x1 as *const Never};
           unreachable;
       }
   }
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
index 100982382dd..16519749b82 100644
--- a/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.64bit.diff
+++ b/tests/mir-opt/const_prop/transmute.unreachable_box.ConstProp.64bit.diff
@@ -4,6 +4,7 @@
   fn unreachable_box() -> ! {
       let mut _0: !;
       let _1: std::boxed::Box<Never>;
+      let mut _2: *const Never;
       scope 1 {
           debug x => _1;
       }
@@ -13,7 +14,9 @@
       bb0: {
           StorageLive(_1);
 -         _1 = const 1_usize as std::boxed::Box<Never> (Transmute);
+-         _2 = (((_1.0: std::ptr::Unique<Never>).0: std::ptr::NonNull<Never>).0: *const Never);
 +         _1 = const Box::<Never>(Unique::<Never> {{ pointer: NonNull::<Never> {{ pointer: {0x1 as *const Never} }}, _marker: PhantomData::<Never> }}, std::alloc::Global);
++         _2 = const {0x1 as *const Never};
           unreachable;
       }
   }
diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.panic-abort.diff b/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.panic-abort.diff
index 988ef7dd225..f19650d5a83 100644
--- a/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.panic-abort.diff
@@ -31,15 +31,15 @@
       }
 + }
 + 
-+ alloc9 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     01 00 00 00 02 00 00 00                         │ ........
 + }
 + 
-+ alloc8 (size: 8, align: 4) {
++ ALLOC1 (size: 8, align: 4) {
 +     01 00 00 00 02 00 00 00                         │ ........
 + }
 + 
-+ alloc6 (size: 8, align: 4) {
++ ALLOC2 (size: 8, align: 4) {
 +     01 00 00 00 02 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.panic-unwind.diff b/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.panic-unwind.diff
index 29844619720..67307c42331 100644
--- a/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/const_prop/tuple_literal_propagation.main.ConstProp.panic-unwind.diff
@@ -31,15 +31,15 @@
       }
 + }
 + 
-+ alloc9 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     01 00 00 00 02 00 00 00                         │ ........
 + }
 + 
-+ alloc8 (size: 8, align: 4) {
++ ALLOC1 (size: 8, align: 4) {
 +     01 00 00 00 02 00 00 00                         │ ........
 + }
 + 
-+ alloc6 (size: 8, align: 4) {
++ ALLOC2 (size: 8, align: 4) {
 +     01 00 00 00 02 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/const_prop/tuple_literal_propagation.rs b/tests/mir-opt/const_prop/tuple_literal_propagation.rs
index 5890a343f26..e0bc6e1be37 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 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR tuple_literal_propagation.main.ConstProp.diff
diff --git a/tests/mir-opt/const_prop/while_let_loops.rs b/tests/mir-opt/const_prop/while_let_loops.rs
index 595a94b88be..39081c3550a 100644
--- a/tests/mir-opt/const_prop/while_let_loops.rs
+++ b/tests/mir-opt/const_prop/while_let_loops.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ConstProp
 // EMIT_MIR while_let_loops.change_loop_body.ConstProp.diff
 
diff --git a/tests/mir-opt/const_prop_miscompile.rs b/tests/mir-opt/const_prop_miscompile.rs
deleted file mode 100644
index dbbe5ee0840..00000000000
--- a/tests/mir-opt/const_prop_miscompile.rs
+++ /dev/null
@@ -1,23 +0,0 @@
-// unit-test: ConstProp
-#![feature(raw_ref_op)]
-
-// EMIT_MIR const_prop_miscompile.foo.ConstProp.diff
-fn foo() {
-    let mut u = (1,);
-    *&mut u.0 = 5;
-    let y = { u.0 } == 5;
-}
-
-// EMIT_MIR const_prop_miscompile.bar.ConstProp.diff
-fn bar() {
-    let mut v = (1,);
-    unsafe {
-        *&raw mut v.0 = 5;
-    }
-    let y = { v.0 } == 5;
-}
-
-fn main() {
-    foo();
-    bar();
-}
diff --git a/tests/mir-opt/copy-prop/borrowed_local.rs b/tests/mir-opt/copy-prop/borrowed_local.rs
index bf94dc57d33..c6b8ad3571f 100644
--- a/tests/mir-opt/copy-prop/borrowed_local.rs
+++ b/tests/mir-opt/copy-prop/borrowed_local.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: CopyProp
 
diff --git a/tests/mir-opt/copy-prop/branch.rs b/tests/mir-opt/copy-prop/branch.rs
index c8af1aa7bf9..2785089579f 100644
--- a/tests/mir-opt/copy-prop/branch.rs
+++ b/tests/mir-opt/copy-prop/branch.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Tests that we bail out when there are multiple assignments to the same local.
 // unit-test: CopyProp
diff --git a/tests/mir-opt/copy-prop/calls.rs b/tests/mir-opt/copy-prop/calls.rs
index c1f86f1f412..2970f5f0b8d 100644
--- a/tests/mir-opt/copy-prop/calls.rs
+++ b/tests/mir-opt/copy-prop/calls.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Check that CopyProp does propagate return values of call terminators.
 // unit-test: CopyProp
 // needs-unwind
diff --git a/tests/mir-opt/copy-prop/copy_propagation_arg.rs b/tests/mir-opt/copy-prop/copy_propagation_arg.rs
index 671860da50d..83bbefe09ed 100644
--- a/tests/mir-opt/copy-prop/copy_propagation_arg.rs
+++ b/tests/mir-opt/copy-prop/copy_propagation_arg.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that CopyProp does not propagate an assignment to a function argument
 // (doing so can break usages of the original argument value)
diff --git a/tests/mir-opt/copy-prop/custom_move_arg.rs b/tests/mir-opt/copy-prop/custom_move_arg.rs
index d1c5ffdff0d..2077874ee9a 100644
--- a/tests/mir-opt/copy-prop/custom_move_arg.rs
+++ b/tests/mir-opt/copy-prop/custom_move_arg.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: CopyProp
 
diff --git a/tests/mir-opt/copy-prop/cycle.rs b/tests/mir-opt/copy-prop/cycle.rs
index 56ec7539734..58e049fde4b 100644
--- a/tests/mir-opt/copy-prop/cycle.rs
+++ b/tests/mir-opt/copy-prop/cycle.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Tests that cyclic assignments don't hang CopyProp, and result in reasonable code.
 // unit-test: CopyProp
diff --git a/tests/mir-opt/copy-prop/dead_stores_79191.rs b/tests/mir-opt/copy-prop/dead_stores_79191.rs
index 4260d35b194..81306ab613a 100644
--- a/tests/mir-opt/copy-prop/dead_stores_79191.rs
+++ b/tests/mir-opt/copy-prop/dead_stores_79191.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: CopyProp
 
diff --git a/tests/mir-opt/copy-prop/dead_stores_better.rs b/tests/mir-opt/copy-prop/dead_stores_better.rs
index c5962db6a40..7addf6af23b 100644
--- a/tests/mir-opt/copy-prop/dead_stores_better.rs
+++ b/tests/mir-opt/copy-prop/dead_stores_better.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates
 // that that pass enables this one to do more optimizations.
diff --git a/tests/mir-opt/copy-prop/issue_107511.rs b/tests/mir-opt/copy-prop/issue_107511.rs
index ce6fcc17b57..53fd9366276 100644
--- a/tests/mir-opt/copy-prop/issue_107511.rs
+++ b/tests/mir-opt/copy-prop/issue_107511.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: CopyProp
 
diff --git a/tests/mir-opt/copy-prop/move_arg.rs b/tests/mir-opt/copy-prop/move_arg.rs
index a3a04e57bc1..fc2932a65dd 100644
--- a/tests/mir-opt/copy-prop/move_arg.rs
+++ b/tests/mir-opt/copy-prop/move_arg.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Test that we do not move multiple times from the same local.
 // unit-test: CopyProp
diff --git a/tests/mir-opt/copy-prop/move_projection.rs b/tests/mir-opt/copy-prop/move_projection.rs
index f94addb5629..8629d535bcf 100644
--- a/tests/mir-opt/copy-prop/move_projection.rs
+++ b/tests/mir-opt/copy-prop/move_projection.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: CopyProp
 
diff --git a/tests/mir-opt/copy-prop/mutate_through_pointer.rs b/tests/mir-opt/copy-prop/mutate_through_pointer.rs
index 753787089b5..e36a10846a6 100644
--- a/tests/mir-opt/copy-prop/mutate_through_pointer.rs
+++ b/tests/mir-opt/copy-prop/mutate_through_pointer.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: CopyProp
 //
 // This attempts to mutate `a` via a pointer derived from `addr_of!(a)`. That is UB
diff --git a/tests/mir-opt/copy-prop/non_dominate.rs b/tests/mir-opt/copy-prop/non_dominate.rs
index c0ea838e1c8..c26ac444e5c 100644
--- a/tests/mir-opt/copy-prop/non_dominate.rs
+++ b/tests/mir-opt/copy-prop/non_dominate.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: CopyProp
 
 #![feature(custom_mir, core_intrinsics)]
diff --git a/tests/mir-opt/copy-prop/partial_init.rs b/tests/mir-opt/copy-prop/partial_init.rs
index f5ab9974f71..44cc203de0d 100644
--- a/tests/mir-opt/copy-prop/partial_init.rs
+++ b/tests/mir-opt/copy-prop/partial_init.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: CopyProp
 // Verify that we do not ICE on partial initializations.
 
diff --git a/tests/mir-opt/copy-prop/reborrow.rs b/tests/mir-opt/copy-prop/reborrow.rs
index c37ba5e5c4c..57c4fb8ade9 100644
--- a/tests/mir-opt/copy-prop/reborrow.rs
+++ b/tests/mir-opt/copy-prop/reborrow.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that CopyProp considers reborrows as not mutating the pointer.
 // unit-test: CopyProp
diff --git a/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-abort.mir b/tests/mir-opt/coroutine_drop_cleanup.main-{closure#0}.coroutine_drop.0.panic-abort.mir
index d8bea14204d..25bffbe2488 100644
--- a/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-abort.mir
+++ b/tests/mir-opt/coroutine_drop_cleanup.main-{closure#0}.coroutine_drop.0.panic-abort.mir
@@ -1,10 +1,10 @@
-// MIR for `main::{closure#0}` 0 generator_drop
-/* generator_layout = GeneratorLayout {
+// MIR for `main::{closure#0}` 0 coroutine_drop
+/* coroutine_layout = CoroutineLayout {
     field_tys: {
-        _0: GeneratorSavedTy {
+        _0: CoroutineSavedTy {
             ty: std::string::String,
             source_info: SourceInfo {
-                span: $DIR/generator_drop_cleanup.rs:11:13: 11:15 (#0),
+                span: $DIR/coroutine_drop_cleanup.rs:12:13: 12:15 (#0),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -21,7 +21,7 @@
     },
 } */
 
-fn main::{closure#0}(_1: *mut {generator@$DIR/generator_drop_cleanup.rs:10:15: 10:17}) -> () {
+fn main::{closure#0}(_1: *mut {coroutine@$DIR/coroutine_drop_cleanup.rs:11:15: 11:17}) -> () {
     let mut _0: ();
     let mut _2: ();
     let _3: std::string::String;
diff --git a/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-unwind.mir b/tests/mir-opt/coroutine_drop_cleanup.main-{closure#0}.coroutine_drop.0.panic-unwind.mir
index d8b27eda8f2..2eac754b15c 100644
--- a/tests/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.panic-unwind.mir
+++ b/tests/mir-opt/coroutine_drop_cleanup.main-{closure#0}.coroutine_drop.0.panic-unwind.mir
@@ -1,10 +1,10 @@
-// MIR for `main::{closure#0}` 0 generator_drop
-/* generator_layout = GeneratorLayout {
+// MIR for `main::{closure#0}` 0 coroutine_drop
+/* coroutine_layout = CoroutineLayout {
     field_tys: {
-        _0: GeneratorSavedTy {
+        _0: CoroutineSavedTy {
             ty: std::string::String,
             source_info: SourceInfo {
-                span: $DIR/generator_drop_cleanup.rs:11:13: 11:15 (#0),
+                span: $DIR/coroutine_drop_cleanup.rs:12:13: 12:15 (#0),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -21,7 +21,7 @@
     },
 } */
 
-fn main::{closure#0}(_1: *mut {generator@$DIR/generator_drop_cleanup.rs:10:15: 10:17}) -> () {
+fn main::{closure#0}(_1: *mut {coroutine@$DIR/coroutine_drop_cleanup.rs:11:15: 11:17}) -> () {
     let mut _0: ();
     let mut _2: ();
     let _3: std::string::String;
diff --git a/tests/mir-opt/coroutine_drop_cleanup.rs b/tests/mir-opt/coroutine_drop_cleanup.rs
new file mode 100644
index 00000000000..69984c737fe
--- /dev/null
+++ b/tests/mir-opt/coroutine_drop_cleanup.rs
@@ -0,0 +1,15 @@
+// skip-filecheck
+#![feature(coroutines, coroutine_trait)]
+
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
+// Regression test for #58892, coroutine drop shims should not have blocks
+// spuriously marked as cleanup
+
+// EMIT_MIR coroutine_drop_cleanup.main-{closure#0}.coroutine_drop.0.mir
+fn main() {
+    let gen = || {
+        let _s = String::new();
+        yield;
+    };
+}
diff --git a/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-abort.mir b/tests/mir-opt/coroutine_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-abort.mir
index 4587282de93..8369a3e60dd 100644
--- a/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-abort.mir
+++ b/tests/mir-opt/coroutine_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-abort.mir
@@ -1,6 +1,6 @@
 // MIR for `main::{closure#0}` before StateTransform
 
-fn main::{closure#0}(_1: {generator@$DIR/generator_storage_dead_unwind.rs:22:16: 22:18}, _2: ()) -> ()
+fn main::{closure#0}(_1: {coroutine@$DIR/coroutine_storage_dead_unwind.rs:23:16: 23:18}, _2: ()) -> ()
 yields ()
  {
     let mut _0: ();
@@ -78,6 +78,6 @@ yields ()
     }
 
     bb8: {
-        generator_drop;
+        coroutine_drop;
     }
 }
diff --git a/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-unwind.mir b/tests/mir-opt/coroutine_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-unwind.mir
index 38026f65bbd..1773db1abff 100644
--- a/tests/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-unwind.mir
+++ b/tests/mir-opt/coroutine_storage_dead_unwind.main-{closure#0}.StateTransform.before.panic-unwind.mir
@@ -1,6 +1,6 @@
 // MIR for `main::{closure#0}` before StateTransform
 
-fn main::{closure#0}(_1: {generator@$DIR/generator_storage_dead_unwind.rs:22:16: 22:18}, _2: ()) -> ()
+fn main::{closure#0}(_1: {coroutine@$DIR/coroutine_storage_dead_unwind.rs:23:16: 23:18}, _2: ()) -> ()
 yields ()
  {
     let mut _0: ();
@@ -78,7 +78,7 @@ yields ()
     }
 
     bb8: {
-        generator_drop;
+        coroutine_drop;
     }
 
     bb9 (cleanup): {
diff --git a/tests/mir-opt/generator_storage_dead_unwind.rs b/tests/mir-opt/coroutine_storage_dead_unwind.rs
index 664f7ef67e3..253be1ff698 100644
--- a/tests/mir-opt/generator_storage_dead_unwind.rs
+++ b/tests/mir-opt/coroutine_storage_dead_unwind.rs
@@ -1,11 +1,12 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
-// Test that we generate StorageDead on unwind paths for generators.
+// Test that we generate StorageDead on unwind paths for coroutines.
 //
 // Basic block and local names can safely change, but the StorageDead statements
 // should not go away.
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 struct Foo(i32);
 
@@ -17,7 +18,7 @@ struct Bar(i32);
 
 fn take<T>(_x: T) {}
 
-// EMIT_MIR generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir
+// EMIT_MIR coroutine_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir
 fn main() {
     let _gen = || {
         let a = Foo(5);
diff --git a/tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir b/tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir
index ac7549f93b1..17b99c87c39 100644
--- a/tests/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir
+++ b/tests/mir-opt/coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir
@@ -1,10 +1,10 @@
-// MIR for `main::{closure#0}` 0 generator_resume
-/* generator_layout = GeneratorLayout {
+// MIR for `main::{closure#0}` 0 coroutine_resume
+/* coroutine_layout = CoroutineLayout {
     field_tys: {
-        _0: GeneratorSavedTy {
+        _0: CoroutineSavedTy {
             ty: HasDrop,
             source_info: SourceInfo {
-                span: $DIR/generator_tiny.rs:20:13: 20:15 (#0),
+                span: $DIR/coroutine_tiny.rs:21:13: 21:15 (#0),
                 scope: scope[0],
             },
             ignore_for_traits: false,
@@ -21,9 +21,9 @@
     },
 } */
 
-fn main::{closure#0}(_1: Pin<&mut {generator@$DIR/generator_tiny.rs:19:16: 19:24}>, _2: u8) -> GeneratorState<(), ()> {
+fn main::{closure#0}(_1: Pin<&mut {coroutine@$DIR/coroutine_tiny.rs:20:16: 20:24}>, _2: u8) -> CoroutineState<(), ()> {
     debug _x => _10;
-    let mut _0: std::ops::GeneratorState<(), ()>;
+    let mut _0: std::ops::CoroutineState<(), ()>;
     let _3: HasDrop;
     let mut _4: !;
     let mut _5: ();
@@ -34,18 +34,18 @@ fn main::{closure#0}(_1: Pin<&mut {generator@$DIR/generator_tiny.rs:19:16: 19:24
     let _10: u8;
     let mut _11: u32;
     scope 1 {
-        debug _d => (((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:19:16: 19:24})) as variant#3).0: HasDrop);
+        debug _d => (((*(_1.0: &mut {coroutine@$DIR/coroutine_tiny.rs:20:16: 20:24})) as variant#3).0: HasDrop);
     }
 
     bb0: {
-        _11 = discriminant((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:19:16: 19:24})));
+        _11 = discriminant((*(_1.0: &mut {coroutine@$DIR/coroutine_tiny.rs:20:16: 20:24})));
         switchInt(move _11) -> [0: bb1, 3: bb5, otherwise: bb6];
     }
 
     bb1: {
         _10 = move _2;
         nop;
-        (((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:19:16: 19:24})) as variant#3).0: HasDrop) = HasDrop;
+        (((*(_1.0: &mut {coroutine@$DIR/coroutine_tiny.rs:20:16: 20:24})) as variant#3).0: HasDrop) = HasDrop;
         StorageLive(_4);
         goto -> bb2;
     }
@@ -54,8 +54,8 @@ fn main::{closure#0}(_1: Pin<&mut {generator@$DIR/generator_tiny.rs:19:16: 19:24
         StorageLive(_6);
         StorageLive(_7);
         _7 = ();
-        _0 = GeneratorState::<(), ()>::Yielded(move _7);
-        discriminant((*(_1.0: &mut {generator@$DIR/generator_tiny.rs:19:16: 19:24}))) = 3;
+        _0 = CoroutineState::<(), ()>::Yielded(move _7);
+        discriminant((*(_1.0: &mut {coroutine@$DIR/coroutine_tiny.rs:20:16: 20:24}))) = 3;
         return;
     }
 
diff --git a/tests/mir-opt/generator_tiny.rs b/tests/mir-opt/coroutine_tiny.rs
index 7dad63a61d6..0fd785b28f8 100644
--- a/tests/mir-opt/generator_tiny.rs
+++ b/tests/mir-opt/coroutine_tiny.rs
@@ -1,10 +1,11 @@
-//! Tests that generators that cannot return or unwind don't have unnecessary
+// skip-filecheck
+//! Tests that coroutines that cannot return or unwind don't have unnecessary
 //! panic branches.
 
 // compile-flags: -C panic=abort
 // no-prefer-dynamic
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 struct HasDrop;
 
@@ -14,7 +15,7 @@ impl Drop for HasDrop {
 
 fn callee() {}
 
-// EMIT_MIR generator_tiny.main-{closure#0}.generator_resume.0.mir
+// EMIT_MIR coroutine_tiny.main-{closure#0}.coroutine_resume.0.mir
 fn main() {
     let _gen = |_x: u8| {
         let _d = HasDrop;
diff --git a/tests/mir-opt/dataflow-const-prop/array_index.rs b/tests/mir-opt/dataflow-const-prop/array_index.rs
index ddb3646ca9b..3d420f93007 100644
--- a/tests/mir-opt/dataflow-const-prop/array_index.rs
+++ b/tests/mir-opt/dataflow-const-prop/array_index.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/dataflow-const-prop/boolean_identities.rs b/tests/mir-opt/dataflow-const-prop/boolean_identities.rs
index 9e911e85b88..2605c7019e6 100644
--- a/tests/mir-opt/dataflow-const-prop/boolean_identities.rs
+++ b/tests/mir-opt/dataflow-const-prop/boolean_identities.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR boolean_identities.test.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/cast.rs b/tests/mir-opt/dataflow-const-prop/cast.rs
index 484403f7f0e..c87872609dc 100644
--- a/tests/mir-opt/dataflow-const-prop/cast.rs
+++ b/tests/mir-opt/dataflow-const-prop/cast.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR cast.main.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-abort.diff
index 2f1a70f32d0..4569ffe483b 100644
--- a/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-abort.diff
@@ -43,7 +43,7 @@
 -         _6 = CheckedAdd(_4, _5);
 -         assert(!move (_6.1: bool), "attempt to compute `{} + {}`, which would overflow", move _4, move _5) -> [success: bb1, unwind unreachable];
 +         _5 = const 2_i32;
-+         _6 = CheckedAdd(const 1_i32, const 2_i32);
++         _6 = const (3_i32, false);
 +         assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 1_i32, const 2_i32) -> [success: bb1, unwind unreachable];
       }
   
@@ -60,7 +60,7 @@
 -         _10 = CheckedAdd(_9, const 1_i32);
 -         assert(!move (_10.1: bool), "attempt to compute `{} + {}`, which would overflow", move _9, const 1_i32) -> [success: bb2, unwind unreachable];
 +         _9 = const i32::MAX;
-+         _10 = CheckedAdd(const i32::MAX, const 1_i32);
++         _10 = const (i32::MIN, true);
 +         assert(!const true, "attempt to compute `{} + {}`, which would overflow", const i32::MAX, const 1_i32) -> [success: bb2, unwind unreachable];
       }
   
@@ -76,5 +76,13 @@
           StorageDead(_1);
           return;
       }
++ }
++ 
++ ALLOC0 (size: 8, align: 4) {
++     00 00 00 80 01 __ __ __                         │ .....░░░
++ }
++ 
++ ALLOC1 (size: 8, align: 4) {
++     03 00 00 00 00 __ __ __                         │ .....░░░
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-unwind.diff
index 0d8a9aca3d8..aa7e404eb9f 100644
--- a/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/checked.main.DataflowConstProp.panic-unwind.diff
@@ -43,7 +43,7 @@
 -         _6 = CheckedAdd(_4, _5);
 -         assert(!move (_6.1: bool), "attempt to compute `{} + {}`, which would overflow", move _4, move _5) -> [success: bb1, unwind continue];
 +         _5 = const 2_i32;
-+         _6 = CheckedAdd(const 1_i32, const 2_i32);
++         _6 = const (3_i32, false);
 +         assert(!const false, "attempt to compute `{} + {}`, which would overflow", const 1_i32, const 2_i32) -> [success: bb1, unwind continue];
       }
   
@@ -60,7 +60,7 @@
 -         _10 = CheckedAdd(_9, const 1_i32);
 -         assert(!move (_10.1: bool), "attempt to compute `{} + {}`, which would overflow", move _9, const 1_i32) -> [success: bb2, unwind continue];
 +         _9 = const i32::MAX;
-+         _10 = CheckedAdd(const i32::MAX, const 1_i32);
++         _10 = const (i32::MIN, true);
 +         assert(!const true, "attempt to compute `{} + {}`, which would overflow", const i32::MAX, const 1_i32) -> [success: bb2, unwind continue];
       }
   
@@ -76,5 +76,13 @@
           StorageDead(_1);
           return;
       }
++ }
++ 
++ ALLOC0 (size: 8, align: 4) {
++     00 00 00 80 01 __ __ __                         │ .....░░░
++ }
++ 
++ ALLOC1 (size: 8, align: 4) {
++     03 00 00 00 00 __ __ __                         │ .....░░░
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/checked.rs b/tests/mir-opt/dataflow-const-prop/checked.rs
index 1c301460f5d..f7fac8890a0 100644
--- a/tests/mir-opt/dataflow-const-prop/checked.rs
+++ b/tests/mir-opt/dataflow-const-prop/checked.rs
@@ -1,6 +1,7 @@
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+// skip-filecheck
 // unit-test: DataflowConstProp
 // compile-flags: -Coverflow-checks=on
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // EMIT_MIR checked.main.DataflowConstProp.diff
 #[allow(arithmetic_overflow)]
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-abort.diff
index b9b46f16a8b..9bfd46231c4 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-abort.diff
@@ -87,13 +87,13 @@
 +         _4 = const Unique::<[bool; 0]> {{ pointer: NonNull::<[bool; 0]> {{ pointer: {0x1 as *const [bool; 0]} }}, _marker: PhantomData::<[bool; 0]> }};
           StorageDead(_5);
 -         _3 = move _4 as std::ptr::Unique<[bool]> (PointerCoercion(Unsize));
-+         _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc7, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
++         _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
           StorageDead(_4);
 -         _2 = Box::<[bool]>(_3, const std::alloc::Global);
-+         _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc10, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
++         _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
           StorageDead(_3);
 -         _1 = A { foo: move _2 };
-+         _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc11, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
++         _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC2, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
           StorageDead(_2);
           _0 = const ();
           drop(_1) -> [return: bb1, unwind unreachable];
@@ -105,15 +105,15 @@
       }
 + }
 + 
-+ alloc11 (size: 8, align: 4) {
++ ALLOC2 (size: 8, align: 4) {
 +     01 00 00 00 00 00 00 00                         │ ........
 + }
 + 
-+ alloc10 (size: 8, align: 4) {
++ ALLOC1 (size: 8, align: 4) {
 +     01 00 00 00 00 00 00 00                         │ ........
 + }
 + 
-+ alloc7 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     01 00 00 00 00 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-unwind.diff
index 93b18f23e61..dba50b1428e 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.32bit.panic-unwind.diff
@@ -87,13 +87,13 @@
 +         _4 = const Unique::<[bool; 0]> {{ pointer: NonNull::<[bool; 0]> {{ pointer: {0x1 as *const [bool; 0]} }}, _marker: PhantomData::<[bool; 0]> }};
           StorageDead(_5);
 -         _3 = move _4 as std::ptr::Unique<[bool]> (PointerCoercion(Unsize));
-+         _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc7, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
++         _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
           StorageDead(_4);
 -         _2 = Box::<[bool]>(_3, const std::alloc::Global);
-+         _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc10, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
++         _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
           StorageDead(_3);
 -         _1 = A { foo: move _2 };
-+         _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc11, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
++         _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC2, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
           StorageDead(_2);
           _0 = const ();
           drop(_1) -> [return: bb1, unwind: bb2];
@@ -109,15 +109,15 @@
       }
 + }
 + 
-+ alloc11 (size: 8, align: 4) {
++ ALLOC2 (size: 8, align: 4) {
 +     01 00 00 00 00 00 00 00                         │ ........
 + }
 + 
-+ alloc10 (size: 8, align: 4) {
++ ALLOC1 (size: 8, align: 4) {
 +     01 00 00 00 00 00 00 00                         │ ........
 + }
 + 
-+ alloc7 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     01 00 00 00 00 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-abort.diff
index 3d3af62856b..33fe4628d83 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-abort.diff
@@ -87,13 +87,13 @@
 +         _4 = const Unique::<[bool; 0]> {{ pointer: NonNull::<[bool; 0]> {{ pointer: {0x1 as *const [bool; 0]} }}, _marker: PhantomData::<[bool; 0]> }};
           StorageDead(_5);
 -         _3 = move _4 as std::ptr::Unique<[bool]> (PointerCoercion(Unsize));
-+         _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc7, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
++         _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
           StorageDead(_4);
 -         _2 = Box::<[bool]>(_3, const std::alloc::Global);
-+         _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc10, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
++         _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
           StorageDead(_3);
 -         _1 = A { foo: move _2 };
-+         _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc11, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
++         _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC2, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
           StorageDead(_2);
           _0 = const ();
           drop(_1) -> [return: bb1, unwind unreachable];
@@ -105,15 +105,15 @@
       }
 + }
 + 
-+ alloc11 (size: 16, align: 8) {
++ ALLOC2 (size: 16, align: 8) {
 +     01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
 + }
 + 
-+ alloc10 (size: 16, align: 8) {
++ ALLOC1 (size: 16, align: 8) {
 +     01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
 + }
 + 
-+ alloc7 (size: 16, align: 8) {
++ ALLOC0 (size: 16, align: 8) {
 +     01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-unwind.diff
index 1933f9bafb3..b2d561911de 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.ConstProp.64bit.panic-unwind.diff
@@ -87,13 +87,13 @@
 +         _4 = const Unique::<[bool; 0]> {{ pointer: NonNull::<[bool; 0]> {{ pointer: {0x1 as *const [bool; 0]} }}, _marker: PhantomData::<[bool; 0]> }};
           StorageDead(_5);
 -         _3 = move _4 as std::ptr::Unique<[bool]> (PointerCoercion(Unsize));
-+         _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc7, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
++         _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
           StorageDead(_4);
 -         _2 = Box::<[bool]>(_3, const std::alloc::Global);
-+         _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc10, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
++         _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
           StorageDead(_3);
 -         _1 = A { foo: move _2 };
-+         _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc11, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
++         _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC2, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
           StorageDead(_2);
           _0 = const ();
           drop(_1) -> [return: bb1, unwind: bb2];
@@ -109,15 +109,15 @@
       }
 + }
 + 
-+ alloc11 (size: 16, align: 8) {
++ ALLOC2 (size: 16, align: 8) {
 +     01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
 + }
 + 
-+ alloc10 (size: 16, align: 8) {
++ ALLOC1 (size: 16, align: 8) {
 +     01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
 + }
 + 
-+ alloc7 (size: 16, align: 8) {
++ ALLOC0 (size: 16, align: 8) {
 +     01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff
index 7862c23da80..1751b0de2f1 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-abort.diff
@@ -81,11 +81,11 @@
           StorageDead(_6);
           _4 = const Unique::<[bool; 0]> {{ pointer: NonNull::<[bool; 0]> {{ pointer: {0x1 as *const [bool; 0]} }}, _marker: PhantomData::<[bool; 0]> }};
           StorageDead(_5);
-          _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc7, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
+          _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
           StorageDead(_4);
-          _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc10, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
+          _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
           StorageDead(_3);
-          _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc11, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
+          _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC2, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
           StorageDead(_2);
           _0 = const ();
           drop(_1) -> [return: bb1, unwind unreachable];
@@ -97,15 +97,15 @@
       }
   }
   
-  alloc11 (size: 8, align: 4) {
+  ALLOC2 (size: 8, align: 4) {
       01 00 00 00 00 00 00 00                         │ ........
   }
   
-  alloc10 (size: 8, align: 4) {
+  ALLOC1 (size: 8, align: 4) {
       01 00 00 00 00 00 00 00                         │ ........
   }
   
-  alloc7 (size: 8, align: 4) {
+  ALLOC0 (size: 8, align: 4) {
       01 00 00 00 00 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff
index bd4150ebb45..858a9d33ddf 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.32bit.panic-unwind.diff
@@ -81,11 +81,11 @@
           StorageDead(_6);
           _4 = const Unique::<[bool; 0]> {{ pointer: NonNull::<[bool; 0]> {{ pointer: {0x1 as *const [bool; 0]} }}, _marker: PhantomData::<[bool; 0]> }};
           StorageDead(_5);
-          _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc7, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
+          _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
           StorageDead(_4);
-          _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc10, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
+          _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
           StorageDead(_3);
-          _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc11, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
+          _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC2, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
           StorageDead(_2);
           _0 = const ();
           drop(_1) -> [return: bb1, unwind: bb2];
@@ -101,15 +101,15 @@
       }
   }
   
-  alloc11 (size: 8, align: 4) {
+  ALLOC2 (size: 8, align: 4) {
       01 00 00 00 00 00 00 00                         │ ........
   }
   
-  alloc10 (size: 8, align: 4) {
+  ALLOC1 (size: 8, align: 4) {
       01 00 00 00 00 00 00 00                         │ ........
   }
   
-  alloc7 (size: 8, align: 4) {
+  ALLOC0 (size: 8, align: 4) {
       01 00 00 00 00 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff
index 312fc7b7a82..51707042075 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-abort.diff
@@ -81,11 +81,11 @@
           StorageDead(_6);
           _4 = const Unique::<[bool; 0]> {{ pointer: NonNull::<[bool; 0]> {{ pointer: {0x1 as *const [bool; 0]} }}, _marker: PhantomData::<[bool; 0]> }};
           StorageDead(_5);
-          _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc7, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
+          _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
           StorageDead(_4);
-          _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc10, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
+          _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
           StorageDead(_3);
-          _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc11, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
+          _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC2, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
           StorageDead(_2);
           _0 = const ();
           drop(_1) -> [return: bb1, unwind unreachable];
@@ -97,15 +97,15 @@
       }
   }
   
-  alloc11 (size: 16, align: 8) {
+  ALLOC2 (size: 16, align: 8) {
       01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
   }
   
-  alloc10 (size: 16, align: 8) {
+  ALLOC1 (size: 16, align: 8) {
       01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
   }
   
-  alloc7 (size: 16, align: 8) {
+  ALLOC0 (size: 16, align: 8) {
       01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff
index 3227d8b8435..9141a6c67be 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.main.DataflowConstProp.64bit.panic-unwind.diff
@@ -81,11 +81,11 @@
           StorageDead(_6);
           _4 = const Unique::<[bool; 0]> {{ pointer: NonNull::<[bool; 0]> {{ pointer: {0x1 as *const [bool; 0]} }}, _marker: PhantomData::<[bool; 0]> }};
           StorageDead(_5);
-          _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc7, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
+          _3 = const Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC0, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }};
           StorageDead(_4);
-          _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc10, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
+          _2 = const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC1, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global);
           StorageDead(_3);
-          _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: alloc11, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
+          _1 = A { foo: const Box::<[bool]>(Unique::<[bool]> {{ pointer: NonNull::<[bool]> {{ pointer: Indirect { alloc_id: ALLOC2, offset: Size(0 bytes) }: *const [bool] }}, _marker: PhantomData::<[bool]> }}, std::alloc::Global) };
           StorageDead(_2);
           _0 = const ();
           drop(_1) -> [return: bb1, unwind: bb2];
@@ -101,15 +101,15 @@
       }
   }
   
-  alloc11 (size: 16, align: 8) {
+  ALLOC2 (size: 16, align: 8) {
       01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
   }
   
-  alloc10 (size: 16, align: 8) {
+  ALLOC1 (size: 16, align: 8) {
       01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
   }
   
-  alloc7 (size: 16, align: 8) {
+  ALLOC0 (size: 16, align: 8) {
       01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 │ ................
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs
index dfeccd3eb94..1bb052736c0 100644
--- a/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs
+++ b/tests/mir-opt/dataflow-const-prop/default_boxed_slice.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // compile-flags: -Zmir-enable-passes=+ConstProp,+Inline
 // ignore-debug assertions change the output MIR
diff --git a/tests/mir-opt/dataflow-const-prop/enum.rs b/tests/mir-opt/dataflow-const-prop/enum.rs
index 5a10e9e883d..e35c0e6e85b 100644
--- a/tests/mir-opt/dataflow-const-prop/enum.rs
+++ b/tests/mir-opt/dataflow-const-prop/enum.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
diff --git a/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.32bit.diff
index 3946e7c7d96..798b0c041b4 100644
--- a/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.32bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.32bit.diff
@@ -23,7 +23,8 @@
   
       bb0: {
           StorageLive(_1);
-          _1 = E::V1(const 0_i32);
+-         _1 = E::V1(const 0_i32);
++         _1 = const E::V1(0_i32);
           StorageLive(_2);
 -         _3 = discriminant(_1);
 -         switchInt(move _3) -> [0: bb3, 1: bb1, otherwise: bb2];
@@ -59,5 +60,9 @@
           StorageDead(_1);
           return;
       }
++ }
++ 
++ ALLOC0 (size: 8, align: 4) {
++     00 00 00 00 00 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.64bit.diff
index 3946e7c7d96..798b0c041b4 100644
--- a/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.64bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/enum.simple.DataflowConstProp.64bit.diff
@@ -23,7 +23,8 @@
   
       bb0: {
           StorageLive(_1);
-          _1 = E::V1(const 0_i32);
+-         _1 = E::V1(const 0_i32);
++         _1 = const E::V1(0_i32);
           StorageLive(_2);
 -         _3 = discriminant(_1);
 -         switchInt(move _3) -> [0: bb3, 1: bb1, otherwise: bb2];
@@ -59,5 +60,9 @@
           StorageDead(_1);
           return;
       }
++ }
++ 
++ ALLOC0 (size: 8, align: 4) {
++     00 00 00 00 00 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff
index ae8b44c953e..d502b198239 100644
--- a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.32bit.diff
@@ -43,8 +43,9 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
-          _2 = const {alloc1: &E};
-          _1 = (*_2);
+          _2 = const {ALLOC1: &E};
+-         _1 = (*_2);
++         _1 = const E::V1(0_i32);
           StorageDead(_2);
           StorageLive(_3);
 -         _4 = discriminant(_1);
@@ -78,7 +79,7 @@
       bb4: {
           StorageLive(_7);
           StorageLive(_8);
-          _8 = const {alloc2: &&E};
+          _8 = const {ALLOC2: &&E};
           _7 = (*_8);
           StorageDead(_8);
           StorageLive(_9);
@@ -110,17 +111,21 @@
           StorageDead(_1);
           return;
       }
++ }
++ 
++ ALLOC3 (size: 8, align: 4) {
++     00 00 00 00 00 00 00 00                         │ ........
   }
   
-  alloc2 (static: RC, size: 4, align: 4) {
-      ╾─alloc14─╼                                     │ ╾──╼
+  ALLOC2 (static: RC, size: 4, align: 4) {
+      ╾ALLOC0╼                                     │ ╾──╼
   }
   
-  alloc14 (size: 8, align: 4) {
+  ALLOC0 (size: 8, align: 4) {
       01 00 00 00 04 00 00 00                         │ ........
   }
   
-  alloc1 (static: statics::C, size: 8, align: 4) {
+  ALLOC1 (static: statics::C, size: 8, align: 4) {
       00 00 00 00 00 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff
index 63799b3bac3..5d69572b507 100644
--- a/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/enum.statics.DataflowConstProp.64bit.diff
@@ -43,8 +43,9 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
-          _2 = const {alloc1: &E};
-          _1 = (*_2);
+          _2 = const {ALLOC1: &E};
+-         _1 = (*_2);
++         _1 = const E::V1(0_i32);
           StorageDead(_2);
           StorageLive(_3);
 -         _4 = discriminant(_1);
@@ -78,7 +79,7 @@
       bb4: {
           StorageLive(_7);
           StorageLive(_8);
-          _8 = const {alloc2: &&E};
+          _8 = const {ALLOC2: &&E};
           _7 = (*_8);
           StorageDead(_8);
           StorageLive(_9);
@@ -110,17 +111,21 @@
           StorageDead(_1);
           return;
       }
++ }
++ 
++ ALLOC3 (size: 8, align: 4) {
++     00 00 00 00 00 00 00 00                         │ ........
   }
   
-  alloc2 (static: RC, size: 8, align: 8) {
-      ╾───────alloc14───────╼                         │ ╾──────╼
+  ALLOC2 (static: RC, size: 8, align: 8) {
+      ╾ALLOC0╼                         │ ╾──────╼
   }
   
-  alloc14 (size: 8, align: 4) {
+  ALLOC0 (size: 8, align: 4) {
       01 00 00 00 04 00 00 00                         │ ........
   }
   
-  alloc1 (static: statics::C, size: 8, align: 4) {
+  ALLOC1 (static: statics::C, size: 8, align: 4) {
       00 00 00 00 00 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/if.rs b/tests/mir-opt/dataflow-const-prop/if.rs
index 34fc35790c1..72aabbccf56 100644
--- a/tests/mir-opt/dataflow-const-prop/if.rs
+++ b/tests/mir-opt/dataflow-const-prop/if.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR if.main.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-abort.diff
index 87bb1454c96..2d4591ea2d3 100644
--- a/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-abort.diff
@@ -23,7 +23,7 @@
           StorageLive(_4);
 -         _4 = CheckedAdd(_2, _3);
 -         assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind unreachable];
-+         _4 = CheckedAdd(const u8::MAX, const 1_u8);
++         _4 = const (0_u8, true);
 +         assert(!const true, "attempt to compute `{} + {}`, which would overflow", const u8::MAX, const 1_u8) -> [success: bb1, unwind unreachable];
       }
   
@@ -37,5 +37,9 @@
           _0 = const ();
           return;
       }
++ }
++ 
++ ALLOC0 (size: 2, align: 1) {
++     00 01                                           │ ..
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-unwind.diff
index b2f13640a4c..e99ac782a2f 100644
--- a/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/inherit_overflow.main.DataflowConstProp.panic-unwind.diff
@@ -23,7 +23,7 @@
           StorageLive(_4);
 -         _4 = CheckedAdd(_2, _3);
 -         assert(!move (_4.1: bool), "attempt to compute `{} + {}`, which would overflow", _2, _3) -> [success: bb1, unwind continue];
-+         _4 = CheckedAdd(const u8::MAX, const 1_u8);
++         _4 = const (0_u8, true);
 +         assert(!const true, "attempt to compute `{} + {}`, which would overflow", const u8::MAX, const 1_u8) -> [success: bb1, unwind continue];
       }
   
@@ -37,5 +37,9 @@
           _0 = const ();
           return;
       }
++ }
++ 
++ ALLOC0 (size: 2, align: 1) {
++     00 01                                           │ ..
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs b/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs
index 964c58966f0..664cbcb2c25 100644
--- a/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs
+++ b/tests/mir-opt/dataflow-const-prop/inherit_overflow.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DataflowConstProp
 // compile-flags: -Zmir-enable-passes=+Inline
diff --git a/tests/mir-opt/dataflow-const-prop/issue_81605.rs b/tests/mir-opt/dataflow-const-prop/issue_81605.rs
index d75e2a28bef..7c5eceb8a2b 100644
--- a/tests/mir-opt/dataflow-const-prop/issue_81605.rs
+++ b/tests/mir-opt/dataflow-const-prop/issue_81605.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR issue_81605.f.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/large_array_index.rs b/tests/mir-opt/dataflow-const-prop/large_array_index.rs
index af13c7d1020..d611a54ba71 100644
--- a/tests/mir-opt/dataflow-const-prop/large_array_index.rs
+++ b/tests/mir-opt/dataflow-const-prop/large_array_index.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs b/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs
index dbea1480445..16a45c8e9fb 100644
--- a/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs
+++ b/tests/mir-opt/dataflow-const-prop/mult_by_zero.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR mult_by_zero.test.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/offset_of.concrete.DataflowConstProp.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/offset_of.concrete.DataflowConstProp.panic-abort.diff
index c61414b6541..f8f89175033 100644
--- a/tests/mir-opt/dataflow-const-prop/offset_of.concrete.DataflowConstProp.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/offset_of.concrete.DataflowConstProp.panic-abort.diff
@@ -27,7 +27,7 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
--         _2 = OffsetOf(Alpha, [0]);
+-         _2 = OffsetOf(Alpha, [(0, 0)]);
 -         _1 = must_use::<usize>(move _2) -> [return: bb1, unwind unreachable];
 +         _2 = const 4_usize;
 +         _1 = must_use::<usize>(const 4_usize) -> [return: bb1, unwind unreachable];
@@ -37,7 +37,7 @@
           StorageDead(_2);
           StorageLive(_3);
           StorageLive(_4);
--         _4 = OffsetOf(Alpha, [1]);
+-         _4 = OffsetOf(Alpha, [(0, 1)]);
 -         _3 = must_use::<usize>(move _4) -> [return: bb2, unwind unreachable];
 +         _4 = const 0_usize;
 +         _3 = must_use::<usize>(const 0_usize) -> [return: bb2, unwind unreachable];
@@ -47,7 +47,7 @@
           StorageDead(_4);
           StorageLive(_5);
           StorageLive(_6);
--         _6 = OffsetOf(Alpha, [2, 0]);
+-         _6 = OffsetOf(Alpha, [(0, 2), (0, 0)]);
 -         _5 = must_use::<usize>(move _6) -> [return: bb3, unwind unreachable];
 +         _6 = const 2_usize;
 +         _5 = must_use::<usize>(const 2_usize) -> [return: bb3, unwind unreachable];
@@ -57,7 +57,7 @@
           StorageDead(_6);
           StorageLive(_7);
           StorageLive(_8);
--         _8 = OffsetOf(Alpha, [2, 1]);
+-         _8 = OffsetOf(Alpha, [(0, 2), (0, 1)]);
 -         _7 = must_use::<usize>(move _8) -> [return: bb4, unwind unreachable];
 +         _8 = const 3_usize;
 +         _7 = must_use::<usize>(const 3_usize) -> [return: bb4, unwind unreachable];
diff --git a/tests/mir-opt/dataflow-const-prop/offset_of.concrete.DataflowConstProp.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/offset_of.concrete.DataflowConstProp.panic-unwind.diff
index 0c3939a3456..d4f8cb66704 100644
--- a/tests/mir-opt/dataflow-const-prop/offset_of.concrete.DataflowConstProp.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/offset_of.concrete.DataflowConstProp.panic-unwind.diff
@@ -27,7 +27,7 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
--         _2 = OffsetOf(Alpha, [0]);
+-         _2 = OffsetOf(Alpha, [(0, 0)]);
 -         _1 = must_use::<usize>(move _2) -> [return: bb1, unwind continue];
 +         _2 = const 4_usize;
 +         _1 = must_use::<usize>(const 4_usize) -> [return: bb1, unwind continue];
@@ -37,7 +37,7 @@
           StorageDead(_2);
           StorageLive(_3);
           StorageLive(_4);
--         _4 = OffsetOf(Alpha, [1]);
+-         _4 = OffsetOf(Alpha, [(0, 1)]);
 -         _3 = must_use::<usize>(move _4) -> [return: bb2, unwind continue];
 +         _4 = const 0_usize;
 +         _3 = must_use::<usize>(const 0_usize) -> [return: bb2, unwind continue];
@@ -47,7 +47,7 @@
           StorageDead(_4);
           StorageLive(_5);
           StorageLive(_6);
--         _6 = OffsetOf(Alpha, [2, 0]);
+-         _6 = OffsetOf(Alpha, [(0, 2), (0, 0)]);
 -         _5 = must_use::<usize>(move _6) -> [return: bb3, unwind continue];
 +         _6 = const 2_usize;
 +         _5 = must_use::<usize>(const 2_usize) -> [return: bb3, unwind continue];
@@ -57,7 +57,7 @@
           StorageDead(_6);
           StorageLive(_7);
           StorageLive(_8);
--         _8 = OffsetOf(Alpha, [2, 1]);
+-         _8 = OffsetOf(Alpha, [(0, 2), (0, 1)]);
 -         _7 = must_use::<usize>(move _8) -> [return: bb4, unwind continue];
 +         _8 = const 3_usize;
 +         _7 = must_use::<usize>(const 3_usize) -> [return: bb4, unwind continue];
diff --git a/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff b/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff
index d54d4687060..7f166e4fa35 100644
--- a/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff
+++ b/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-abort.diff
@@ -27,7 +27,7 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
-          _2 = OffsetOf(Gamma<T>, [0]);
+          _2 = OffsetOf(Gamma<T>, [(0, 0)]);
           _1 = must_use::<usize>(move _2) -> [return: bb1, unwind unreachable];
       }
   
@@ -35,7 +35,7 @@
           StorageDead(_2);
           StorageLive(_3);
           StorageLive(_4);
-          _4 = OffsetOf(Gamma<T>, [1]);
+          _4 = OffsetOf(Gamma<T>, [(0, 1)]);
           _3 = must_use::<usize>(move _4) -> [return: bb2, unwind unreachable];
       }
   
@@ -43,7 +43,7 @@
           StorageDead(_4);
           StorageLive(_5);
           StorageLive(_6);
--         _6 = OffsetOf(Delta<T>, [1]);
+-         _6 = OffsetOf(Delta<T>, [(0, 1)]);
 -         _5 = must_use::<usize>(move _6) -> [return: bb3, unwind unreachable];
 +         _6 = const 0_usize;
 +         _5 = must_use::<usize>(const 0_usize) -> [return: bb3, unwind unreachable];
@@ -53,7 +53,7 @@
           StorageDead(_6);
           StorageLive(_7);
           StorageLive(_8);
--         _8 = OffsetOf(Delta<T>, [2]);
+-         _8 = OffsetOf(Delta<T>, [(0, 2)]);
 -         _7 = must_use::<usize>(move _8) -> [return: bb4, unwind unreachable];
 +         _8 = const 2_usize;
 +         _7 = must_use::<usize>(const 2_usize) -> [return: bb4, unwind unreachable];
diff --git a/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-unwind.diff b/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-unwind.diff
index 6032a2274ef..38ad6f79801 100644
--- a/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-unwind.diff
+++ b/tests/mir-opt/dataflow-const-prop/offset_of.generic.DataflowConstProp.panic-unwind.diff
@@ -27,7 +27,7 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
-          _2 = OffsetOf(Gamma<T>, [0]);
+          _2 = OffsetOf(Gamma<T>, [(0, 0)]);
           _1 = must_use::<usize>(move _2) -> [return: bb1, unwind continue];
       }
   
@@ -35,7 +35,7 @@
           StorageDead(_2);
           StorageLive(_3);
           StorageLive(_4);
-          _4 = OffsetOf(Gamma<T>, [1]);
+          _4 = OffsetOf(Gamma<T>, [(0, 1)]);
           _3 = must_use::<usize>(move _4) -> [return: bb2, unwind continue];
       }
   
@@ -43,7 +43,7 @@
           StorageDead(_4);
           StorageLive(_5);
           StorageLive(_6);
--         _6 = OffsetOf(Delta<T>, [1]);
+-         _6 = OffsetOf(Delta<T>, [(0, 1)]);
 -         _5 = must_use::<usize>(move _6) -> [return: bb3, unwind continue];
 +         _6 = const 0_usize;
 +         _5 = must_use::<usize>(const 0_usize) -> [return: bb3, unwind continue];
@@ -53,7 +53,7 @@
           StorageDead(_6);
           StorageLive(_7);
           StorageLive(_8);
--         _8 = OffsetOf(Delta<T>, [2]);
+-         _8 = OffsetOf(Delta<T>, [(0, 2)]);
 -         _7 = must_use::<usize>(move _8) -> [return: bb4, unwind continue];
 +         _8 = const 2_usize;
 +         _7 = must_use::<usize>(const 2_usize) -> [return: bb4, unwind continue];
diff --git a/tests/mir-opt/dataflow-const-prop/offset_of.rs b/tests/mir-opt/dataflow-const-prop/offset_of.rs
index ccc90790e52..e71b3f59eca 100644
--- a/tests/mir-opt/dataflow-const-prop/offset_of.rs
+++ b/tests/mir-opt/dataflow-const-prop/offset_of.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
diff --git a/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs b/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs
index 4ac0a5b3298..2851c0590ad 100644
--- a/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs
+++ b/tests/mir-opt/dataflow-const-prop/ref_without_sb.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DataflowConstProp
 
diff --git a/tests/mir-opt/dataflow-const-prop/repeat.rs b/tests/mir-opt/dataflow-const-prop/repeat.rs
index 9fa353e44c5..b8244819481 100644
--- a/tests/mir-opt/dataflow-const-prop/repeat.rs
+++ b/tests/mir-opt/dataflow-const-prop/repeat.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
diff --git a/tests/mir-opt/dataflow-const-prop/repr_transparent.main.DataflowConstProp.diff b/tests/mir-opt/dataflow-const-prop/repr_transparent.main.DataflowConstProp.diff
index 4b1a8d932c6..98bd40ab2c3 100644
--- a/tests/mir-opt/dataflow-const-prop/repr_transparent.main.DataflowConstProp.diff
+++ b/tests/mir-opt/dataflow-const-prop/repr_transparent.main.DataflowConstProp.diff
@@ -17,7 +17,8 @@
   
       bb0: {
           StorageLive(_1);
-          _1 = I32(const 0_i32);
+-         _1 = I32(const 0_i32);
++         _1 = const I32(0_i32);
           StorageLive(_2);
           StorageLive(_3);
           StorageLive(_4);
@@ -31,12 +32,20 @@
           StorageDead(_5);
           StorageDead(_4);
 -         _2 = I32(move _3);
-+         _2 = I32(const 0_i32);
++         _2 = const I32(0_i32);
           StorageDead(_3);
           _0 = const ();
           StorageDead(_2);
           StorageDead(_1);
           return;
       }
++ }
++ 
++ ALLOC0 (size: 4, align: 4) {
++     00 00 00 00                                     │ ....
++ }
++ 
++ ALLOC1 (size: 4, align: 4) {
++     00 00 00 00                                     │ ....
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/repr_transparent.rs b/tests/mir-opt/dataflow-const-prop/repr_transparent.rs
index 4ce0ca4dff4..8cbed6fbb62 100644
--- a/tests/mir-opt/dataflow-const-prop/repr_transparent.rs
+++ b/tests/mir-opt/dataflow-const-prop/repr_transparent.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // The struct has scalar ABI, but is not a scalar type.
diff --git a/tests/mir-opt/dataflow-const-prop/self_assign.rs b/tests/mir-opt/dataflow-const-prop/self_assign.rs
index 8de2195f93b..c5866c4a9fd 100644
--- a/tests/mir-opt/dataflow-const-prop/self_assign.rs
+++ b/tests/mir-opt/dataflow-const-prop/self_assign.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR self_assign.main.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/self_assign_add.rs b/tests/mir-opt/dataflow-const-prop/self_assign_add.rs
index e3282762459..cfe1458e44b 100644
--- a/tests/mir-opt/dataflow-const-prop/self_assign_add.rs
+++ b/tests/mir-opt/dataflow-const-prop/self_assign_add.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 
 // EMIT_MIR self_assign_add.main.DataflowConstProp.diff
diff --git a/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs b/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs
index 87842f347e4..68aff528695 100644
--- a/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs
+++ b/tests/mir-opt/dataflow-const-prop/sibling_ptr.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // This attempts to modify `x.1` via a pointer derived from `addr_of_mut!(x.0)`.
 // According to Miri, that is UB. However, T-opsem has not finalized that
diff --git a/tests/mir-opt/dataflow-const-prop/slice_len.rs b/tests/mir-opt/dataflow-const-prop/slice_len.rs
index 41367e48497..86266ef5d4e 100644
--- a/tests/mir-opt/dataflow-const-prop/slice_len.rs
+++ b/tests/mir-opt/dataflow-const-prop/slice_len.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DataflowConstProp
 // compile-flags: -Zmir-enable-passes=+InstSimplify
diff --git a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff
index 2de6ba307d5..8499d0a89c3 100644
--- a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.32bit.diff
@@ -7,13 +7,24 @@
       let mut _3: i32;
       let mut _5: i32;
       let mut _6: i32;
-      let mut _11: BigStruct;
-      let mut _16: &&BigStruct;
-      let mut _17: &BigStruct;
-      let mut _18: &BigStruct;
-      let mut _19: &BigStruct;
-      let mut _20: &BigStruct;
-      let mut _21: &BigStruct;
+      let mut _10: SmallStruct;
+      let mut _14: &&SmallStruct;
+      let mut _16: f32;
+      let mut _17: std::option::Option<S>;
+      let mut _18: &[f32];
+      let mut _22: BigStruct;
+      let mut _26: &&BigStruct;
+      let mut _28: f32;
+      let mut _29: std::option::Option<S>;
+      let mut _30: &[f32];
+      let mut _31: &SmallStruct;
+      let mut _32: &SmallStruct;
+      let mut _33: &SmallStruct;
+      let mut _34: &SmallStruct;
+      let mut _35: &BigStruct;
+      let mut _36: &BigStruct;
+      let mut _37: &BigStruct;
+      let mut _38: &BigStruct;
       scope 1 {
           debug s => _1;
           let _2: i32;
@@ -22,24 +33,44 @@
               let _4: i32;
               scope 3 {
                   debug b => _4;
-                  let _7: S;
-                  let _8: u8;
-                  let _9: f32;
-                  let _10: S;
+                  let _7: f32;
+                  let _8: std::option::Option<S>;
+                  let _9: &[f32];
                   scope 4 {
                       debug a => _7;
                       debug b => _8;
                       debug c => _9;
-                      debug d => _10;
-                      let _12: S;
-                      let _13: u8;
-                      let _14: f32;
-                      let _15: S;
+                      let _11: f32;
+                      let _12: std::option::Option<S>;
+                      let _13: &[f32];
                       scope 5 {
-                          debug a => _12;
-                          debug b => _13;
-                          debug c => _14;
-                          debug d => _15;
+                          debug a => _11;
+                          debug b => _12;
+                          debug c => _13;
+                          let _15: SmallStruct;
+                          scope 6 {
+                              debug ss => _15;
+                              let _19: f32;
+                              let _20: std::option::Option<S>;
+                              let _21: &[f32];
+                              scope 7 {
+                                  debug a => _19;
+                                  debug b => _20;
+                                  debug c => _21;
+                                  let _23: f32;
+                                  let _24: std::option::Option<S>;
+                                  let _25: &[f32];
+                                  scope 8 {
+                                      debug a => _23;
+                                      debug b => _24;
+                                      debug c => _25;
+                                      let _27: BigStruct;
+                                      scope 9 {
+                                          debug bs => _27;
+                                      }
+                                  }
+                              }
+                          }
                       }
                   }
               }
@@ -48,7 +79,8 @@
   
       bb0: {
           StorageLive(_1);
-          _1 = S(const 1_i32);
+-         _1 = S(const 1_i32);
++         _1 = const S(1_i32);
           StorageLive(_2);
           StorageLive(_3);
 -         _3 = (_1.0: i32);
@@ -68,47 +100,95 @@
 +         _4 = const 6_i32;
           StorageDead(_6);
           StorageDead(_5);
-          StorageLive(_11);
-          _11 = const _;
+          StorageLive(_10);
+          _10 = const _;
           StorageLive(_7);
--         _7 = (_11.0: S);
-+         _7 = const S(1_i32);
+-         _7 = (_10.0: f32);
++         _7 = const 4f32;
           StorageLive(_8);
--         _8 = (_11.1: u8);
-+         _8 = const 5_u8;
+-         _8 = (_10.1: std::option::Option<S>);
++         _8 = const Option::<S>::Some(S(1_i32));
           StorageLive(_9);
--         _9 = (_11.2: f32);
-+         _9 = const 7f32;
-          StorageLive(_10);
--         _10 = (_11.3: S);
-+         _10 = const S(13_i32);
-          StorageDead(_11);
-          StorageLive(_16);
-          _16 = const {alloc1: &&BigStruct};
-          _17 = deref_copy (*_16);
+          _9 = (_10.2: &[f32]);
+          StorageDead(_10);
+          StorageLive(_14);
+          _14 = const {ALLOC4: &&SmallStruct};
+          _31 = deref_copy (*_14);
+          StorageLive(_11);
+          _32 = deref_copy (*_14);
+-         _11 = ((*_32).0: f32);
++         _11 = const 9f32;
           StorageLive(_12);
-          _18 = deref_copy (*_16);
--         _12 = ((*_18).0: S);
-+         _12 = const S(1_i32);
+          _33 = deref_copy (*_14);
+          _12 = ((*_33).1: std::option::Option<S>);
           StorageLive(_13);
-          _19 = deref_copy (*_16);
--         _13 = ((*_19).1: u8);
-+         _13 = const 5_u8;
-          StorageLive(_14);
-          _20 = deref_copy (*_16);
--         _14 = ((*_20).2: f32);
-+         _14 = const 7f32;
+          _34 = deref_copy (*_14);
+          _13 = ((*_34).2: &[f32]);
+          StorageDead(_14);
           StorageLive(_15);
-          _21 = deref_copy (*_16);
--         _15 = ((*_21).3: S);
-+         _15 = const S(13_i32);
+          StorageLive(_16);
+-         _16 = _11;
++         _16 = const 9f32;
+          StorageLive(_17);
+          _17 = _12;
+          StorageLive(_18);
+          _18 = _13;
+-         _15 = SmallStruct(move _16, move _17, move _18);
++         _15 = SmallStruct(const 9f32, move _17, move _18);
+          StorageDead(_18);
+          StorageDead(_17);
           StorageDead(_16);
+          StorageLive(_22);
+          _22 = const _;
+          StorageLive(_19);
+-         _19 = (_22.0: f32);
++         _19 = const 25f32;
+          StorageLive(_20);
+          _20 = (_22.1: std::option::Option<S>);
+          StorageLive(_21);
+          _21 = (_22.2: &[f32]);
+          StorageDead(_22);
+          StorageLive(_26);
+          _26 = const {ALLOC5: &&BigStruct};
+          _35 = deref_copy (*_26);
+          StorageLive(_23);
+          _36 = deref_copy (*_26);
+-         _23 = ((*_36).0: f32);
++         _23 = const 82f32;
+          StorageLive(_24);
+          _37 = deref_copy (*_26);
+-         _24 = ((*_37).1: std::option::Option<S>);
++         _24 = const Option::<S>::Some(S(35_i32));
+          StorageLive(_25);
+          _38 = deref_copy (*_26);
+          _25 = ((*_38).2: &[f32]);
+          StorageDead(_26);
+          StorageLive(_27);
+          StorageLive(_28);
+-         _28 = _23;
++         _28 = const 82f32;
+          StorageLive(_29);
+-         _29 = _24;
++         _29 = const Option::<S>::Some(S(35_i32));
+          StorageLive(_30);
+          _30 = _25;
+-         _27 = BigStruct(move _28, move _29, move _30);
++         _27 = BigStruct(const 82f32, const Option::<S>::Some(S(35_i32)), move _30);
+          StorageDead(_30);
+          StorageDead(_29);
+          StorageDead(_28);
           _0 = const ();
+          StorageDead(_27);
+          StorageDead(_25);
+          StorageDead(_24);
+          StorageDead(_23);
+          StorageDead(_21);
+          StorageDead(_20);
+          StorageDead(_19);
           StorageDead(_15);
-          StorageDead(_14);
           StorageDead(_13);
           StorageDead(_12);
-          StorageDead(_10);
+          StorageDead(_11);
           StorageDead(_9);
           StorageDead(_8);
           StorageDead(_7);
@@ -117,13 +197,51 @@
           StorageDead(_1);
           return;
       }
++ }
++ 
++ ALLOC6 (size: 8, align: 4) {
++     01 00 00 00 23 00 00 00                         │ ....#...
++ }
++ 
++ ALLOC7 (size: 8, align: 4) {
++     01 00 00 00 23 00 00 00                         │ ....#...
++ }
++ 
++ ALLOC8 (size: 8, align: 4) {
++     01 00 00 00 23 00 00 00                         │ ....#...
++ }
++ 
++ ALLOC9 (size: 8, align: 4) {
++     01 00 00 00 01 00 00 00                         │ ........
++ }
++ 
++ ALLOC10 (size: 4, align: 4) {
++     01 00 00 00                                     │ ....
+  }
+  
+  ALLOC5 (static: BIG_STAT, size: 4, align: 4) {
+      ╾ALLOC0╼                                     │ ╾──╼
+  }
+  
+  ALLOC0 (size: 20, align: 4) {
+      0x00 │ 01 00 00 00 23 00 00 00 ╾ALLOC1╼ 02 00 00 00 │ ....#...╾──╼....
+      0x10 │ 00 00 a4 42                                     │ ...B
+  }
+  
+  ALLOC1 (size: 8, align: 4) {
+      00 00 34 42 00 00 90 42                         │ ..4B...B
+  }
+  
+  ALLOC4 (static: SMALL_STAT, size: 4, align: 4) {
+      ╾ALLOC2╼                                     │ ╾──╼
   }
   
-  alloc1 (static: STAT, size: 4, align: 4) {
-      ╾─alloc15─╼                                     │ ╾──╼
+  ALLOC2 (size: 20, align: 4) {
+      0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC3╼ 01 00 00 00 │ ....░░░░╾──╼....
+      0x10 │ 00 00 10 41                                     │ ...A
   }
   
-  alloc15 (size: 16, align: 4) {
-      01 00 00 00 00 00 e0 40 0d 00 00 00 05 __ __ __ │ .......@.....░░░
+  ALLOC3 (size: 4, align: 4) {
+      00 00 50 41                                     │ ..PA
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff
index 71a28f2165b..01ec3f623d1 100644
--- a/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/struct.main.DataflowConstProp.64bit.diff
@@ -7,13 +7,24 @@
       let mut _3: i32;
       let mut _5: i32;
       let mut _6: i32;
-      let mut _11: BigStruct;
-      let mut _16: &&BigStruct;
-      let mut _17: &BigStruct;
-      let mut _18: &BigStruct;
-      let mut _19: &BigStruct;
-      let mut _20: &BigStruct;
-      let mut _21: &BigStruct;
+      let mut _10: SmallStruct;
+      let mut _14: &&SmallStruct;
+      let mut _16: f32;
+      let mut _17: std::option::Option<S>;
+      let mut _18: &[f32];
+      let mut _22: BigStruct;
+      let mut _26: &&BigStruct;
+      let mut _28: f32;
+      let mut _29: std::option::Option<S>;
+      let mut _30: &[f32];
+      let mut _31: &SmallStruct;
+      let mut _32: &SmallStruct;
+      let mut _33: &SmallStruct;
+      let mut _34: &SmallStruct;
+      let mut _35: &BigStruct;
+      let mut _36: &BigStruct;
+      let mut _37: &BigStruct;
+      let mut _38: &BigStruct;
       scope 1 {
           debug s => _1;
           let _2: i32;
@@ -22,24 +33,44 @@
               let _4: i32;
               scope 3 {
                   debug b => _4;
-                  let _7: S;
-                  let _8: u8;
-                  let _9: f32;
-                  let _10: S;
+                  let _7: f32;
+                  let _8: std::option::Option<S>;
+                  let _9: &[f32];
                   scope 4 {
                       debug a => _7;
                       debug b => _8;
                       debug c => _9;
-                      debug d => _10;
-                      let _12: S;
-                      let _13: u8;
-                      let _14: f32;
-                      let _15: S;
+                      let _11: f32;
+                      let _12: std::option::Option<S>;
+                      let _13: &[f32];
                       scope 5 {
-                          debug a => _12;
-                          debug b => _13;
-                          debug c => _14;
-                          debug d => _15;
+                          debug a => _11;
+                          debug b => _12;
+                          debug c => _13;
+                          let _15: SmallStruct;
+                          scope 6 {
+                              debug ss => _15;
+                              let _19: f32;
+                              let _20: std::option::Option<S>;
+                              let _21: &[f32];
+                              scope 7 {
+                                  debug a => _19;
+                                  debug b => _20;
+                                  debug c => _21;
+                                  let _23: f32;
+                                  let _24: std::option::Option<S>;
+                                  let _25: &[f32];
+                                  scope 8 {
+                                      debug a => _23;
+                                      debug b => _24;
+                                      debug c => _25;
+                                      let _27: BigStruct;
+                                      scope 9 {
+                                          debug bs => _27;
+                                      }
+                                  }
+                              }
+                          }
                       }
                   }
               }
@@ -48,7 +79,8 @@
   
       bb0: {
           StorageLive(_1);
-          _1 = S(const 1_i32);
+-         _1 = S(const 1_i32);
++         _1 = const S(1_i32);
           StorageLive(_2);
           StorageLive(_3);
 -         _3 = (_1.0: i32);
@@ -68,47 +100,95 @@
 +         _4 = const 6_i32;
           StorageDead(_6);
           StorageDead(_5);
-          StorageLive(_11);
-          _11 = const _;
+          StorageLive(_10);
+          _10 = const _;
           StorageLive(_7);
--         _7 = (_11.0: S);
-+         _7 = const S(1_i32);
+-         _7 = (_10.0: f32);
++         _7 = const 4f32;
           StorageLive(_8);
--         _8 = (_11.1: u8);
-+         _8 = const 5_u8;
+-         _8 = (_10.1: std::option::Option<S>);
++         _8 = const Option::<S>::Some(S(1_i32));
           StorageLive(_9);
--         _9 = (_11.2: f32);
-+         _9 = const 7f32;
-          StorageLive(_10);
--         _10 = (_11.3: S);
-+         _10 = const S(13_i32);
-          StorageDead(_11);
-          StorageLive(_16);
-          _16 = const {alloc1: &&BigStruct};
-          _17 = deref_copy (*_16);
+          _9 = (_10.2: &[f32]);
+          StorageDead(_10);
+          StorageLive(_14);
+          _14 = const {ALLOC4: &&SmallStruct};
+          _31 = deref_copy (*_14);
+          StorageLive(_11);
+          _32 = deref_copy (*_14);
+-         _11 = ((*_32).0: f32);
++         _11 = const 9f32;
           StorageLive(_12);
-          _18 = deref_copy (*_16);
--         _12 = ((*_18).0: S);
-+         _12 = const S(1_i32);
+          _33 = deref_copy (*_14);
+          _12 = ((*_33).1: std::option::Option<S>);
           StorageLive(_13);
-          _19 = deref_copy (*_16);
--         _13 = ((*_19).1: u8);
-+         _13 = const 5_u8;
-          StorageLive(_14);
-          _20 = deref_copy (*_16);
--         _14 = ((*_20).2: f32);
-+         _14 = const 7f32;
+          _34 = deref_copy (*_14);
+          _13 = ((*_34).2: &[f32]);
+          StorageDead(_14);
           StorageLive(_15);
-          _21 = deref_copy (*_16);
--         _15 = ((*_21).3: S);
-+         _15 = const S(13_i32);
+          StorageLive(_16);
+-         _16 = _11;
++         _16 = const 9f32;
+          StorageLive(_17);
+          _17 = _12;
+          StorageLive(_18);
+          _18 = _13;
+-         _15 = SmallStruct(move _16, move _17, move _18);
++         _15 = SmallStruct(const 9f32, move _17, move _18);
+          StorageDead(_18);
+          StorageDead(_17);
           StorageDead(_16);
+          StorageLive(_22);
+          _22 = const _;
+          StorageLive(_19);
+-         _19 = (_22.0: f32);
++         _19 = const 25f32;
+          StorageLive(_20);
+          _20 = (_22.1: std::option::Option<S>);
+          StorageLive(_21);
+          _21 = (_22.2: &[f32]);
+          StorageDead(_22);
+          StorageLive(_26);
+          _26 = const {ALLOC5: &&BigStruct};
+          _35 = deref_copy (*_26);
+          StorageLive(_23);
+          _36 = deref_copy (*_26);
+-         _23 = ((*_36).0: f32);
++         _23 = const 82f32;
+          StorageLive(_24);
+          _37 = deref_copy (*_26);
+-         _24 = ((*_37).1: std::option::Option<S>);
++         _24 = const Option::<S>::Some(S(35_i32));
+          StorageLive(_25);
+          _38 = deref_copy (*_26);
+          _25 = ((*_38).2: &[f32]);
+          StorageDead(_26);
+          StorageLive(_27);
+          StorageLive(_28);
+-         _28 = _23;
++         _28 = const 82f32;
+          StorageLive(_29);
+-         _29 = _24;
++         _29 = const Option::<S>::Some(S(35_i32));
+          StorageLive(_30);
+          _30 = _25;
+-         _27 = BigStruct(move _28, move _29, move _30);
++         _27 = BigStruct(const 82f32, const Option::<S>::Some(S(35_i32)), move _30);
+          StorageDead(_30);
+          StorageDead(_29);
+          StorageDead(_28);
           _0 = const ();
+          StorageDead(_27);
+          StorageDead(_25);
+          StorageDead(_24);
+          StorageDead(_23);
+          StorageDead(_21);
+          StorageDead(_20);
+          StorageDead(_19);
           StorageDead(_15);
-          StorageDead(_14);
           StorageDead(_13);
           StorageDead(_12);
-          StorageDead(_10);
+          StorageDead(_11);
           StorageDead(_9);
           StorageDead(_8);
           StorageDead(_7);
@@ -117,13 +197,51 @@
           StorageDead(_1);
           return;
       }
++ }
++ 
++ ALLOC6 (size: 8, align: 4) {
++     01 00 00 00 23 00 00 00                         │ ....#...
++ }
++ 
++ ALLOC7 (size: 8, align: 4) {
++     01 00 00 00 23 00 00 00                         │ ....#...
++ }
++ 
++ ALLOC8 (size: 8, align: 4) {
++     01 00 00 00 23 00 00 00                         │ ....#...
++ }
++ 
++ ALLOC9 (size: 8, align: 4) {
++     01 00 00 00 01 00 00 00                         │ ........
++ }
++ 
++ ALLOC10 (size: 4, align: 4) {
++     01 00 00 00                                     │ ....
+  }
+  
+  ALLOC5 (static: BIG_STAT, size: 8, align: 8) {
+      ╾ALLOC0╼                         │ ╾──────╼
+  }
+  
+  ALLOC0 (size: 32, align: 8) {
+      0x00 │ 01 00 00 00 23 00 00 00 ╾ALLOC1╼ │ ....#...╾──────╼
+      0x10 │ 02 00 00 00 00 00 00 00 00 00 a4 42 __ __ __ __ │ ...........B░░░░
+  }
+  
+  ALLOC1 (size: 8, align: 4) {
+      00 00 34 42 00 00 90 42                         │ ..4B...B
+  }
+  
+  ALLOC4 (static: SMALL_STAT, size: 8, align: 8) {
+      ╾ALLOC2╼                         │ ╾──────╼
   }
   
-  alloc1 (static: STAT, size: 8, align: 8) {
-      ╾───────alloc15───────╼                         │ ╾──────╼
+  ALLOC2 (size: 32, align: 8) {
+      0x00 │ 00 00 00 00 __ __ __ __ ╾ALLOC3╼ │ ....░░░░╾──────╼
+      0x10 │ 01 00 00 00 00 00 00 00 00 00 10 41 __ __ __ __ │ ...........A░░░░
   }
   
-  alloc15 (size: 16, align: 4) {
-      01 00 00 00 00 00 e0 40 0d 00 00 00 05 __ __ __ │ .......@.....░░░
+  ALLOC3 (size: 4, align: 4) {
+      00 00 50 41                                     │ ..PA
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/struct.rs b/tests/mir-opt/dataflow-const-prop/struct.rs
index e92a1676d3f..043981a2954 100644
--- a/tests/mir-opt/dataflow-const-prop/struct.rs
+++ b/tests/mir-opt/dataflow-const-prop/struct.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
@@ -5,7 +6,10 @@
 struct S(i32);
 
 #[derive(Copy, Clone)]
-struct BigStruct(S, u8, f32, S);
+struct SmallStruct(f32, Option<S>, &'static [f32]);
+
+#[derive(Copy, Clone)]
+struct BigStruct(f32, Option<S>, &'static [f32]);
 
 // EMIT_MIR struct.main.DataflowConstProp.diff
 fn main() {
@@ -14,9 +18,21 @@ fn main() {
     s.0 = 3;
     let b = a + s.0;
 
-    const VAL: BigStruct = BigStruct(S(1), 5, 7., S(13));
-    let BigStruct(a, b, c, d) = VAL;
+    const SMALL_VAL: SmallStruct = SmallStruct(4., Some(S(1)), &[]);
+    let SmallStruct(a, b, c) = SMALL_VAL;
+
+    static SMALL_STAT: &SmallStruct = &SmallStruct(9., None, &[13.]);
+    let SmallStruct(a, b, c) = *SMALL_STAT;
+
+    let ss = SmallStruct(a, b, c);
+
+    const BIG_VAL: BigStruct = BigStruct(25., None, &[]);
+    let BigStruct(a, b, c) = BIG_VAL;
+
+    static BIG_STAT: &BigStruct = &BigStruct(82., Some(S(35)), &[45., 72.]);
+    let BigStruct(a, b, c) = *BIG_STAT;
 
-    static STAT: &BigStruct = &BigStruct(S(1), 5, 7., S(13));
-    let BigStruct(a, b, c, d) = *STAT;
+    // We arbitrarily limit the size of synthetized values to 4 pointers.
+    // `BigStruct` can be read, but we will keep a MIR aggregate for this.
+    let bs = BigStruct(a, b, c);
 }
diff --git a/tests/mir-opt/dataflow-const-prop/terminator.rs b/tests/mir-opt/dataflow-const-prop/terminator.rs
index 114dbeca5ac..92a42f22c21 100644
--- a/tests/mir-opt/dataflow-const-prop/terminator.rs
+++ b/tests/mir-opt/dataflow-const-prop/terminator.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DataflowConstProp
 
diff --git a/tests/mir-opt/dataflow-const-prop/transmute.rs b/tests/mir-opt/dataflow-const-prop/transmute.rs
index c25e33ab0b6..bb85e458678 100644
--- a/tests/mir-opt/dataflow-const-prop/transmute.rs
+++ b/tests/mir-opt/dataflow-const-prop/transmute.rs
@@ -7,55 +7,77 @@ use std::mem::transmute;
 
 // EMIT_MIR transmute.less_as_i8.DataflowConstProp.diff
 pub fn less_as_i8() -> i8 {
+    // CHECK-LABEL: fn less_as_i8(
+    // FIXME-CHECK: _0 = const -1_i8;
     unsafe { transmute(std::cmp::Ordering::Less) }
 }
 
 // EMIT_MIR transmute.from_char.DataflowConstProp.diff
 pub fn from_char() -> i32 {
+    // CHECK-LABEL: fn from_char(
+    // CHECK: _0 = const 82_i32;
     unsafe { transmute('R') }
 }
 
 // EMIT_MIR transmute.valid_char.DataflowConstProp.diff
 pub fn valid_char() -> char {
+    // CHECK-LABEL: fn valid_char(
+    // CHECK: _0 = const 'R';
     unsafe { transmute(0x52_u32) }
 }
 
 // EMIT_MIR transmute.invalid_char.DataflowConstProp.diff
 pub unsafe fn invalid_char() -> char {
+    // CHECK-LABEL: fn invalid_char(
+    // CHECK: _0 = const {transmute(0x7fffffff): char};
     unsafe { transmute(i32::MAX) }
 }
 
 // EMIT_MIR transmute.invalid_bool.DataflowConstProp.diff
 pub unsafe fn invalid_bool() -> bool {
+    // CHECK-LABEL: fn invalid_bool(
+    // CHECK: _0 = const {transmute(0xff): bool};
     unsafe { transmute(-1_i8) }
 }
 
 // EMIT_MIR transmute.undef_union_as_integer.DataflowConstProp.diff
 pub unsafe fn undef_union_as_integer() -> u32 {
+    // CHECK-LABEL: fn undef_union_as_integer(
+    // CHECK: _1 = Union32 {
+    // CHECK: _0 = move _1 as u32 (Transmute);
     union Union32 { value: u32, unit: () }
     unsafe { transmute(Union32 { unit: () }) }
 }
 
 // EMIT_MIR transmute.unreachable_direct.DataflowConstProp.diff
 pub unsafe fn unreachable_direct() -> ! {
+    // CHECK-LABEL: fn unreachable_direct(
+    // CHECK: = const ();
+    // CHECK: = const ZeroSized: Never;
     let x: Never = unsafe { transmute(()) };
     match x {}
 }
 
 // EMIT_MIR transmute.unreachable_ref.DataflowConstProp.diff
 pub unsafe fn unreachable_ref() -> ! {
+    // CHECK-LABEL: fn unreachable_ref(
+    // CHECK: = const {0x1 as &Never};
     let x: &Never = unsafe { transmute(1_usize) };
     match *x {}
 }
 
 // EMIT_MIR transmute.unreachable_mut.DataflowConstProp.diff
 pub unsafe fn unreachable_mut() -> ! {
+    // CHECK-LABEL: fn unreachable_mut(
+    // CHECK: = const {0x1 as &mut Never};
     let x: &mut Never = unsafe { transmute(1_usize) };
     match *x {}
 }
 
 // EMIT_MIR transmute.unreachable_box.DataflowConstProp.diff
 pub unsafe fn unreachable_box() -> ! {
+    // CHECK-LABEL: fn unreachable_box(
+    // CHECK: = const Box::<Never>(
     let x: Box<Never> = unsafe { transmute(1_usize) };
     match *x {}
 }
diff --git a/tests/mir-opt/dataflow-const-prop/transmute.undef_union_as_integer.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/transmute.undef_union_as_integer.DataflowConstProp.32bit.diff
index fc0634b1f8f..fb28aa8f6d9 100644
--- a/tests/mir-opt/dataflow-const-prop/transmute.undef_union_as_integer.DataflowConstProp.32bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/transmute.undef_union_as_integer.DataflowConstProp.32bit.diff
@@ -11,8 +11,10 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
-          _2 = ();
-          _1 = Union32 { value: move _2 };
+-         _2 = ();
+-         _1 = Union32 { value: move _2 };
++         _2 = const ();
++         _1 = Union32 { value: const () };
           StorageDead(_2);
           _0 = move _1 as u32 (Transmute);
           StorageDead(_1);
diff --git a/tests/mir-opt/dataflow-const-prop/transmute.undef_union_as_integer.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/transmute.undef_union_as_integer.DataflowConstProp.64bit.diff
index fc0634b1f8f..fb28aa8f6d9 100644
--- a/tests/mir-opt/dataflow-const-prop/transmute.undef_union_as_integer.DataflowConstProp.64bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/transmute.undef_union_as_integer.DataflowConstProp.64bit.diff
@@ -11,8 +11,10 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
-          _2 = ();
-          _1 = Union32 { value: move _2 };
+-         _2 = ();
+-         _1 = Union32 { value: move _2 };
++         _2 = const ();
++         _1 = Union32 { value: const () };
           StorageDead(_2);
           _0 = move _1 as u32 (Transmute);
           StorageDead(_1);
diff --git a/tests/mir-opt/dataflow-const-prop/transmute.unreachable_box.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/transmute.unreachable_box.DataflowConstProp.32bit.diff
index d0c298ba233..5d17c47ae66 100644
--- a/tests/mir-opt/dataflow-const-prop/transmute.unreachable_box.DataflowConstProp.32bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/transmute.unreachable_box.DataflowConstProp.32bit.diff
@@ -4,6 +4,7 @@
   fn unreachable_box() -> ! {
       let mut _0: !;
       let _1: std::boxed::Box<Never>;
+      let mut _2: *const Never;
       scope 1 {
           debug x => _1;
       }
@@ -14,6 +15,7 @@
           StorageLive(_1);
 -         _1 = const 1_usize as std::boxed::Box<Never> (Transmute);
 +         _1 = const Box::<Never>(Unique::<Never> {{ pointer: NonNull::<Never> {{ pointer: {0x1 as *const Never} }}, _marker: PhantomData::<Never> }}, std::alloc::Global);
+          _2 = (((_1.0: std::ptr::Unique<Never>).0: std::ptr::NonNull<Never>).0: *const Never);
           unreachable;
       }
   }
diff --git a/tests/mir-opt/dataflow-const-prop/transmute.unreachable_box.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/transmute.unreachable_box.DataflowConstProp.64bit.diff
index d0c298ba233..5d17c47ae66 100644
--- a/tests/mir-opt/dataflow-const-prop/transmute.unreachable_box.DataflowConstProp.64bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/transmute.unreachable_box.DataflowConstProp.64bit.diff
@@ -4,6 +4,7 @@
   fn unreachable_box() -> ! {
       let mut _0: !;
       let _1: std::boxed::Box<Never>;
+      let mut _2: *const Never;
       scope 1 {
           debug x => _1;
       }
@@ -14,6 +15,7 @@
           StorageLive(_1);
 -         _1 = const 1_usize as std::boxed::Box<Never> (Transmute);
 +         _1 = const Box::<Never>(Unique::<Never> {{ pointer: NonNull::<Never> {{ pointer: {0x1 as *const Never} }}, _marker: PhantomData::<Never> }}, std::alloc::Global);
+          _2 = (((_1.0: std::ptr::Unique<Never>).0: std::ptr::NonNull<Never>).0: *const Never);
           unreachable;
       }
   }
diff --git a/tests/mir-opt/dataflow-const-prop/transmute.unreachable_direct.DataflowConstProp.32bit.diff b/tests/mir-opt/dataflow-const-prop/transmute.unreachable_direct.DataflowConstProp.32bit.diff
index acbb5cd1bc7..c8d4d6edba1 100644
--- a/tests/mir-opt/dataflow-const-prop/transmute.unreachable_direct.DataflowConstProp.32bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/transmute.unreachable_direct.DataflowConstProp.32bit.diff
@@ -14,8 +14,10 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
-          _2 = ();
-          _1 = move _2 as Never (Transmute);
+-         _2 = ();
+-         _1 = move _2 as Never (Transmute);
++         _2 = const ();
++         _1 = const ZeroSized: Never;
           unreachable;
       }
   }
diff --git a/tests/mir-opt/dataflow-const-prop/transmute.unreachable_direct.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/transmute.unreachable_direct.DataflowConstProp.64bit.diff
index acbb5cd1bc7..c8d4d6edba1 100644
--- a/tests/mir-opt/dataflow-const-prop/transmute.unreachable_direct.DataflowConstProp.64bit.diff
+++ b/tests/mir-opt/dataflow-const-prop/transmute.unreachable_direct.DataflowConstProp.64bit.diff
@@ -14,8 +14,10 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
-          _2 = ();
-          _1 = move _2 as Never (Transmute);
+-         _2 = ();
+-         _1 = move _2 as Never (Transmute);
++         _2 = const ();
++         _1 = const ZeroSized: Never;
           unreachable;
       }
   }
diff --git a/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.diff b/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.32bit.diff
index 5e385d21ec6..f5723cac7d9 100644
--- a/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.diff
+++ b/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.32bit.diff
@@ -11,6 +11,9 @@
       let mut _8: i32;
       let mut _9: i32;
       let mut _10: i32;
+      let mut _12: i32;
+      let mut _13: (i32, i32);
+      let mut _14: i32;
       scope 1 {
           debug a => _1;
           let _2: i32;
@@ -19,13 +22,18 @@
               let _6: i32;
               scope 3 {
                   debug c => _6;
+                  let _11: (i32, (i32, i32), i32);
+                  scope 4 {
+                      debug d => _11;
+                  }
               }
           }
       }
   
       bb0: {
           StorageLive(_1);
-          _1 = (const 1_i32, const 2_i32);
+-         _1 = (const 1_i32, const 2_i32);
++         _1 = const (1_i32, 2_i32);
           StorageLive(_2);
           StorageLive(_3);
           StorageLive(_4);
@@ -41,7 +49,8 @@
 -         _2 = Add(move _3, const 3_i32);
 +         _2 = const 6_i32;
           StorageDead(_3);
-          _1 = (const 2_i32, const 3_i32);
+-         _1 = (const 2_i32, const 3_i32);
++         _1 = const (2_i32, 3_i32);
           StorageLive(_6);
           StorageLive(_7);
           StorageLive(_8);
@@ -61,11 +70,43 @@
 +         _6 = const 11_i32;
           StorageDead(_10);
           StorageDead(_7);
+          StorageLive(_11);
+          StorageLive(_12);
+-         _12 = _2;
++         _12 = const 6_i32;
+          StorageLive(_13);
+-         _13 = _1;
++         _13 = const (2_i32, 3_i32);
+          StorageLive(_14);
+-         _14 = _6;
+-         _11 = (move _12, move _13, move _14);
++         _14 = const 11_i32;
++         _11 = (const 6_i32, const (2_i32, 3_i32), const 11_i32);
+          StorageDead(_14);
+          StorageDead(_13);
+          StorageDead(_12);
           _0 = const ();
+          StorageDead(_11);
           StorageDead(_6);
           StorageDead(_2);
           StorageDead(_1);
           return;
       }
++ }
++ 
++ ALLOC0 (size: 8, align: 4) {
++     02 00 00 00 03 00 00 00                         │ ........
++ }
++ 
++ ALLOC1 (size: 8, align: 4) {
++     02 00 00 00 03 00 00 00                         │ ........
++ }
++ 
++ ALLOC2 (size: 8, align: 4) {
++     02 00 00 00 03 00 00 00                         │ ........
++ }
++ 
++ ALLOC3 (size: 8, align: 4) {
++     01 00 00 00 02 00 00 00                         │ ........
   }
   
diff --git a/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.64bit.diff b/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.64bit.diff
new file mode 100644
index 00000000000..f5723cac7d9
--- /dev/null
+++ b/tests/mir-opt/dataflow-const-prop/tuple.main.DataflowConstProp.64bit.diff
@@ -0,0 +1,112 @@
+- // MIR for `main` before DataflowConstProp
++ // MIR for `main` after DataflowConstProp
+  
+  fn main() -> () {
+      let mut _0: ();
+      let mut _1: (i32, i32);
+      let mut _3: i32;
+      let mut _4: i32;
+      let mut _5: i32;
+      let mut _7: i32;
+      let mut _8: i32;
+      let mut _9: i32;
+      let mut _10: i32;
+      let mut _12: i32;
+      let mut _13: (i32, i32);
+      let mut _14: i32;
+      scope 1 {
+          debug a => _1;
+          let _2: i32;
+          scope 2 {
+              debug b => _2;
+              let _6: i32;
+              scope 3 {
+                  debug c => _6;
+                  let _11: (i32, (i32, i32), i32);
+                  scope 4 {
+                      debug d => _11;
+                  }
+              }
+          }
+      }
+  
+      bb0: {
+          StorageLive(_1);
+-         _1 = (const 1_i32, const 2_i32);
++         _1 = const (1_i32, 2_i32);
+          StorageLive(_2);
+          StorageLive(_3);
+          StorageLive(_4);
+-         _4 = (_1.0: i32);
++         _4 = const 1_i32;
+          StorageLive(_5);
+-         _5 = (_1.1: i32);
+-         _3 = Add(move _4, move _5);
++         _5 = const 2_i32;
++         _3 = const 3_i32;
+          StorageDead(_5);
+          StorageDead(_4);
+-         _2 = Add(move _3, const 3_i32);
++         _2 = const 6_i32;
+          StorageDead(_3);
+-         _1 = (const 2_i32, const 3_i32);
++         _1 = const (2_i32, 3_i32);
+          StorageLive(_6);
+          StorageLive(_7);
+          StorageLive(_8);
+-         _8 = (_1.0: i32);
++         _8 = const 2_i32;
+          StorageLive(_9);
+-         _9 = (_1.1: i32);
+-         _7 = Add(move _8, move _9);
++         _9 = const 3_i32;
++         _7 = const 5_i32;
+          StorageDead(_9);
+          StorageDead(_8);
+          StorageLive(_10);
+-         _10 = _2;
+-         _6 = Add(move _7, move _10);
++         _10 = const 6_i32;
++         _6 = const 11_i32;
+          StorageDead(_10);
+          StorageDead(_7);
+          StorageLive(_11);
+          StorageLive(_12);
+-         _12 = _2;
++         _12 = const 6_i32;
+          StorageLive(_13);
+-         _13 = _1;
++         _13 = const (2_i32, 3_i32);
+          StorageLive(_14);
+-         _14 = _6;
+-         _11 = (move _12, move _13, move _14);
++         _14 = const 11_i32;
++         _11 = (const 6_i32, const (2_i32, 3_i32), const 11_i32);
+          StorageDead(_14);
+          StorageDead(_13);
+          StorageDead(_12);
+          _0 = const ();
+          StorageDead(_11);
+          StorageDead(_6);
+          StorageDead(_2);
+          StorageDead(_1);
+          return;
+      }
++ }
++ 
++ ALLOC0 (size: 8, align: 4) {
++     02 00 00 00 03 00 00 00                         │ ........
++ }
++ 
++ ALLOC1 (size: 8, align: 4) {
++     02 00 00 00 03 00 00 00                         │ ........
++ }
++ 
++ ALLOC2 (size: 8, align: 4) {
++     02 00 00 00 03 00 00 00                         │ ........
++ }
++ 
++ ALLOC3 (size: 8, align: 4) {
++     01 00 00 00 02 00 00 00                         │ ........
+  }
+  
diff --git a/tests/mir-opt/dataflow-const-prop/tuple.rs b/tests/mir-opt/dataflow-const-prop/tuple.rs
index 92c70eab0ff..bb706eafe88 100644
--- a/tests/mir-opt/dataflow-const-prop/tuple.rs
+++ b/tests/mir-opt/dataflow-const-prop/tuple.rs
@@ -1,4 +1,6 @@
+// skip-filecheck
 // unit-test: DataflowConstProp
+// EMIT_MIR_FOR_EACH_BIT_WIDTH
 
 // EMIT_MIR tuple.main.DataflowConstProp.diff
 fn main() {
@@ -6,4 +8,6 @@ fn main() {
     let b = a.0 + a.1 + 3;
     a = (2, 3);
     let c = a.0 + a.1 + b;
+
+    let d = (b, a, c);
 }
diff --git a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
index f09cdee1482..dcd15fb2b09 100644
--- a/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
+++ b/tests/mir-opt/dead-store-elimination/call_arg_copy.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DeadStoreElimination
 // compile-flags: -Zmir-enable-passes=+CopyProp
diff --git a/tests/mir-opt/dead-store-elimination/cycle.rs b/tests/mir-opt/dead-store-elimination/cycle.rs
index e3def2f65da..8896f5ff345 100644
--- a/tests/mir-opt/dead-store-elimination/cycle.rs
+++ b/tests/mir-opt/dead-store-elimination/cycle.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // This example is interesting because the non-transitive version of `MaybeLiveLocals` would
 // report that *all* of these stores are live.
 //
diff --git a/tests/mir-opt/dead-store-elimination/place_mention.rs b/tests/mir-opt/dead-store-elimination/place_mention.rs
index 59dc74454a4..4813cf7ee2b 100644
--- a/tests/mir-opt/dead-store-elimination/place_mention.rs
+++ b/tests/mir-opt/dead-store-elimination/place_mention.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DeadStoreElimination
 // compile-flags: -Zmir-keep-place-mention
 
diff --git a/tests/mir-opt/dead-store-elimination/provenance_soundness.rs b/tests/mir-opt/dead-store-elimination/provenance_soundness.rs
index 11314e99098..24ffbe980eb 100644
--- a/tests/mir-opt/dead-store-elimination/provenance_soundness.rs
+++ b/tests/mir-opt/dead-store-elimination/provenance_soundness.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: DeadStoreElimination
 // compile-flags: -Zmir-emit-retag
 
diff --git a/tests/mir-opt/deduplicate_blocks.rs b/tests/mir-opt/deduplicate_blocks.rs
index 0c38c7f215e..d3b89102f0c 100644
--- a/tests/mir-opt/deduplicate_blocks.rs
+++ b/tests/mir-opt/deduplicate_blocks.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DeduplicateBlocks
 
diff --git a/tests/mir-opt/deref-patterns/string.rs b/tests/mir-opt/deref-patterns/string.rs
index 3a99c44aa0e..0c8385b5c48 100644
--- a/tests/mir-opt/deref-patterns/string.rs
+++ b/tests/mir-opt/deref-patterns/string.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=0 -C panic=abort
 
 #![feature(string_deref_patterns)]
diff --git a/tests/mir-opt/derefer_complex_case.main.Derefer.panic-abort.diff b/tests/mir-opt/derefer_complex_case.main.Derefer.panic-abort.diff
index 1f3b3ad649d..0fad716a2cb 100644
--- a/tests/mir-opt/derefer_complex_case.main.Derefer.panic-abort.diff
+++ b/tests/mir-opt/derefer_complex_case.main.Derefer.panic-abort.diff
@@ -35,6 +35,7 @@
   
       bb1: {
           StorageDead(_2);
+          PlaceMention(_1);
           StorageLive(_4);
           _4 = move _1;
           goto -> bb2;
@@ -52,6 +53,7 @@
   
       bb3: {
           StorageDead(_8);
+          PlaceMention(_7);
           _10 = discriminant(_7);
           switchInt(move _10) -> [0: bb6, 1: bb4, otherwise: bb5];
       }
diff --git a/tests/mir-opt/derefer_complex_case.main.Derefer.panic-unwind.diff b/tests/mir-opt/derefer_complex_case.main.Derefer.panic-unwind.diff
index da4cc188cfa..ae5656f02a5 100644
--- a/tests/mir-opt/derefer_complex_case.main.Derefer.panic-unwind.diff
+++ b/tests/mir-opt/derefer_complex_case.main.Derefer.panic-unwind.diff
@@ -35,6 +35,7 @@
   
       bb1: {
           StorageDead(_2);
+          PlaceMention(_1);
           StorageLive(_4);
           _4 = move _1;
           goto -> bb2;
@@ -52,6 +53,7 @@
   
       bb3: {
           StorageDead(_8);
+          PlaceMention(_7);
           _10 = discriminant(_7);
           switchInt(move _10) -> [0: bb6, 1: bb4, otherwise: bb5];
       }
diff --git a/tests/mir-opt/derefer_complex_case.rs b/tests/mir-opt/derefer_complex_case.rs
index cc619879ef3..6097d8739fb 100644
--- a/tests/mir-opt/derefer_complex_case.rs
+++ b/tests/mir-opt/derefer_complex_case.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Derefer
 // EMIT_MIR derefer_complex_case.main.Derefer.diff
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/derefer_inline_test.rs b/tests/mir-opt/derefer_inline_test.rs
index 7ac330e5102..713c051f44a 100644
--- a/tests/mir-opt/derefer_inline_test.rs
+++ b/tests/mir-opt/derefer_inline_test.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Derefer
 // EMIT_MIR derefer_inline_test.main.Derefer.diff
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/derefer_terminator_test.main.Derefer.panic-abort.diff b/tests/mir-opt/derefer_terminator_test.main.Derefer.panic-abort.diff
index 895dcf5798e..f4c034517f7 100644
--- a/tests/mir-opt/derefer_terminator_test.main.Derefer.panic-abort.diff
+++ b/tests/mir-opt/derefer_terminator_test.main.Derefer.panic-abort.diff
@@ -12,6 +12,9 @@
 +     let mut _10: &&&bool;
 +     let mut _11: &&bool;
 +     let mut _12: &bool;
++     let mut _13: &&&bool;
++     let mut _14: &&bool;
++     let mut _15: &bool;
       scope 1 {
           debug b => _1;
           let _2: bool;
@@ -48,11 +51,16 @@
           _6 = &_7;
           _5 = &_6;
           _4 = &_5;
+-         PlaceMention((*(*(*(*_4)))));
 -         switchInt((*(*(*(*_4))))) -> [0: bb3, otherwise: bb4];
 +         _10 = deref_copy (*_4);
 +         _11 = deref_copy (*_10);
 +         _12 = deref_copy (*_11);
-+         switchInt((*_12)) -> [0: bb3, otherwise: bb4];
++         PlaceMention((*_12));
++         _13 = deref_copy (*_4);
++         _14 = deref_copy (*_13);
++         _15 = deref_copy (*_14);
++         switchInt((*_15)) -> [0: bb3, otherwise: bb4];
       }
   
       bb3: {
diff --git a/tests/mir-opt/derefer_terminator_test.main.Derefer.panic-unwind.diff b/tests/mir-opt/derefer_terminator_test.main.Derefer.panic-unwind.diff
index 19b26c901cb..e3c0c6b7dd2 100644
--- a/tests/mir-opt/derefer_terminator_test.main.Derefer.panic-unwind.diff
+++ b/tests/mir-opt/derefer_terminator_test.main.Derefer.panic-unwind.diff
@@ -12,6 +12,9 @@
 +     let mut _10: &&&bool;
 +     let mut _11: &&bool;
 +     let mut _12: &bool;
++     let mut _13: &&&bool;
++     let mut _14: &&bool;
++     let mut _15: &bool;
       scope 1 {
           debug b => _1;
           let _2: bool;
@@ -48,11 +51,16 @@
           _6 = &_7;
           _5 = &_6;
           _4 = &_5;
+-         PlaceMention((*(*(*(*_4)))));
 -         switchInt((*(*(*(*_4))))) -> [0: bb3, otherwise: bb4];
 +         _10 = deref_copy (*_4);
 +         _11 = deref_copy (*_10);
 +         _12 = deref_copy (*_11);
-+         switchInt((*_12)) -> [0: bb3, otherwise: bb4];
++         PlaceMention((*_12));
++         _13 = deref_copy (*_4);
++         _14 = deref_copy (*_13);
++         _15 = deref_copy (*_14);
++         switchInt((*_15)) -> [0: bb3, otherwise: bb4];
       }
   
       bb3: {
diff --git a/tests/mir-opt/derefer_terminator_test.rs b/tests/mir-opt/derefer_terminator_test.rs
index 164aa733a24..3780ff5df7d 100644
--- a/tests/mir-opt/derefer_terminator_test.rs
+++ b/tests/mir-opt/derefer_terminator_test.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Derefer
 // EMIT_MIR derefer_terminator_test.main.Derefer.diff
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/derefer_test.rs b/tests/mir-opt/derefer_test.rs
index fad0fe8eb6f..171925bb19d 100644
--- a/tests/mir-opt/derefer_test.rs
+++ b/tests/mir-opt/derefer_test.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Derefer
 // EMIT_MIR derefer_test.main.Derefer.diff
 fn main() {
diff --git a/tests/mir-opt/derefer_test_multiple.rs b/tests/mir-opt/derefer_test_multiple.rs
index 0b3888b07ab..ac778a9c9b7 100644
--- a/tests/mir-opt/derefer_test_multiple.rs
+++ b/tests/mir-opt/derefer_test_multiple.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Derefer
 // EMIT_MIR derefer_test_multiple.main.Derefer.diff
 fn main () {
diff --git a/tests/mir-opt/dest-prop/branch.rs b/tests/mir-opt/dest-prop/branch.rs
index 5007aafb62f..d8c74a0aa91 100644
--- a/tests/mir-opt/dest-prop/branch.rs
+++ b/tests/mir-opt/dest-prop/branch.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Tests that assignment in both branches of an `if` are eliminated.
 // unit-test: DestinationPropagation
diff --git a/tests/mir-opt/dest-prop/copy_propagation_arg.rs b/tests/mir-opt/dest-prop/copy_propagation_arg.rs
index 1f8d588925c..435cf07ab0c 100644
--- a/tests/mir-opt/dest-prop/copy_propagation_arg.rs
+++ b/tests/mir-opt/dest-prop/copy_propagation_arg.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that DestinationPropagation does not propagate an assignment to a function argument
 // (doing so can break usages of the original argument value)
diff --git a/tests/mir-opt/dest-prop/cycle.rs b/tests/mir-opt/dest-prop/cycle.rs
index 9bc0cb05a35..77cff062cc4 100644
--- a/tests/mir-opt/dest-prop/cycle.rs
+++ b/tests/mir-opt/dest-prop/cycle.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Tests that cyclic assignments don't hang DestinationPropagation, and result in reasonable code.
 // unit-test: DestinationPropagation
diff --git a/tests/mir-opt/dest-prop/dead_stores_79191.rs b/tests/mir-opt/dest-prop/dead_stores_79191.rs
index 2f95ba0e326..a6fd542d3b5 100644
--- a/tests/mir-opt/dest-prop/dead_stores_79191.rs
+++ b/tests/mir-opt/dest-prop/dead_stores_79191.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: DestinationPropagation
 
diff --git a/tests/mir-opt/dest-prop/dead_stores_better.rs b/tests/mir-opt/dest-prop/dead_stores_better.rs
index e67653c57e4..c9895f35cf1 100644
--- a/tests/mir-opt/dest-prop/dead_stores_better.rs
+++ b/tests/mir-opt/dest-prop/dead_stores_better.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // This is a copy of the `dead_stores_79191` test, except that we turn on DSE. This demonstrates
 // that that pass enables this one to do more optimizations.
diff --git a/tests/mir-opt/dest-prop/simple.rs b/tests/mir-opt/dest-prop/simple.rs
index 0bcb2924f1d..03d20962690 100644
--- a/tests/mir-opt/dest-prop/simple.rs
+++ b/tests/mir-opt/dest-prop/simple.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Copy of `nrvo-simple.rs`, to ensure that full dest-prop handles it too.
 // unit-test: DestinationPropagation
diff --git a/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-abort.diff b/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-abort.diff
index d5e58265dcc..142e08f4d6c 100644
--- a/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-abort.diff
+++ b/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-abort.diff
@@ -4,29 +4,20 @@
   fn main() -> () {
       let mut _0: ();
       let _1: main::Un;
-      let mut _2: u32;
-      let mut _3: u32;
       scope 1 {
           debug un => _1;
           scope 2 {
           }
-          scope 3 (inlined std::mem::drop::<u32>) {
-              debug _x => _3;
+          scope 4 (inlined std::mem::drop::<u32>) {
+              debug _x => const 1_u32;
           }
       }
+      scope 3 (inlined val) {
+      }
   
       bb0: {
           StorageLive(_1);
-          StorageLive(_2);
-          _2 = val() -> [return: bb1, unwind unreachable];
-      }
-  
-      bb1: {
-          _1 = Un { us: move _2 };
-          StorageDead(_2);
-          StorageLive(_3);
-          _3 = (_1.0: u32);
-          StorageDead(_3);
+          _1 = Un { us: const 1_u32 };
           StorageDead(_1);
           return;
       }
diff --git a/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-unwind.diff b/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-unwind.diff
index 5eaaeba135b..142e08f4d6c 100644
--- a/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-unwind.diff
+++ b/tests/mir-opt/dest-prop/union.main.DestinationPropagation.panic-unwind.diff
@@ -4,29 +4,20 @@
   fn main() -> () {
       let mut _0: ();
       let _1: main::Un;
-      let mut _2: u32;
-      let mut _3: u32;
       scope 1 {
           debug un => _1;
           scope 2 {
           }
-          scope 3 (inlined std::mem::drop::<u32>) {
-              debug _x => _3;
+          scope 4 (inlined std::mem::drop::<u32>) {
+              debug _x => const 1_u32;
           }
       }
+      scope 3 (inlined val) {
+      }
   
       bb0: {
           StorageLive(_1);
-          StorageLive(_2);
-          _2 = val() -> [return: bb1, unwind continue];
-      }
-  
-      bb1: {
-          _1 = Un { us: move _2 };
-          StorageDead(_2);
-          StorageLive(_3);
-          _3 = (_1.0: u32);
-          StorageDead(_3);
+          _1 = Un { us: const 1_u32 };
           StorageDead(_1);
           return;
       }
diff --git a/tests/mir-opt/dest-prop/union.rs b/tests/mir-opt/dest-prop/union.rs
index 4bc6f28c6c2..6d3e6d7fa76 100644
--- a/tests/mir-opt/dest-prop/union.rs
+++ b/tests/mir-opt/dest-prop/union.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 //! Tests that we can propagate into places that are projections into unions
 // compile-flags: -Zunsound-mir-opts
diff --git a/tests/mir-opt/dest-prop/unreachable.rs b/tests/mir-opt/dest-prop/unreachable.rs
index e950dbbf5c9..a47d2a0c8e2 100644
--- a/tests/mir-opt/dest-prop/unreachable.rs
+++ b/tests/mir-opt/dest-prop/unreachable.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that unreachable code is removed after the destination propagation.
 // Regression test for issue #105428.
diff --git a/tests/mir-opt/dont_inline_type_id.rs b/tests/mir-opt/dont_inline_type_id.rs
index d8a56636094..788c2f55dc0 100644
--- a/tests/mir-opt/dont_inline_type_id.rs
+++ b/tests/mir-opt/dont_inline_type_id.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Inline
 // compile-flags: --crate-type=lib -C panic=abort
 
diff --git a/tests/mir-opt/dont_yeet_assert.rs b/tests/mir-opt/dont_yeet_assert.rs
deleted file mode 100644
index 38cc5a293e8..00000000000
--- a/tests/mir-opt/dont_yeet_assert.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// compile-flags: --crate-type=lib
-// 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.InstSimplify.diff
-pub fn generic<T>() {
-    core::intrinsics::assert_mem_uninitialized_valid::<&T>();
-}
diff --git a/tests/mir-opt/early_otherwise_branch.rs b/tests/mir-opt/early_otherwise_branch.rs
index 7be9fbd0326..b48516c5aa1 100644
--- a/tests/mir-opt/early_otherwise_branch.rs
+++ b/tests/mir-opt/early_otherwise_branch.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EarlyOtherwiseBranch
 // EMIT_MIR early_otherwise_branch.opt1.EarlyOtherwiseBranch.diff
 fn opt1(x: Option<u32>, y: Option<u32>) -> u32 {
diff --git a/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs b/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs
index 76055e1330f..2a0fba9bea4 100644
--- a/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs
+++ b/tests/mir-opt/early_otherwise_branch_3_element_tuple.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EarlyOtherwiseBranch
 
 // EMIT_MIR early_otherwise_branch_3_element_tuple.opt1.EarlyOtherwiseBranch.diff
diff --git a/tests/mir-opt/early_otherwise_branch_68867.rs b/tests/mir-opt/early_otherwise_branch_68867.rs
index a6a56f3a95d..f27527b96ab 100644
--- a/tests/mir-opt/early_otherwise_branch_68867.rs
+++ b/tests/mir-opt/early_otherwise_branch_68867.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EarlyOtherwiseBranch
 
 // FIXME: This test was broken by the derefer change.
diff --git a/tests/mir-opt/early_otherwise_branch_noopt.rs b/tests/mir-opt/early_otherwise_branch_noopt.rs
index ef766bbd4a6..351640c27c5 100644
--- a/tests/mir-opt/early_otherwise_branch_noopt.rs
+++ b/tests/mir-opt/early_otherwise_branch_noopt.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EarlyOtherwiseBranch
 
 // must not optimize as it does not follow the pattern of
diff --git a/tests/mir-opt/early_otherwise_branch_soundness.rs b/tests/mir-opt/early_otherwise_branch_soundness.rs
index cd458923245..02c25a1bd59 100644
--- a/tests/mir-opt/early_otherwise_branch_soundness.rs
+++ b/tests/mir-opt/early_otherwise_branch_soundness.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EarlyOtherwiseBranch
 
 // Tests various cases that the `early_otherwise_branch` opt should *not* optimize
diff --git a/tests/mir-opt/enum_opt.cand.EnumSizeOpt.32bit.diff b/tests/mir-opt/enum_opt.cand.EnumSizeOpt.32bit.diff
index ec5f5c1f1fc..775a60f1c96 100644
--- a/tests/mir-opt/enum_opt.cand.EnumSizeOpt.32bit.diff
+++ b/tests/mir-opt/enum_opt.cand.EnumSizeOpt.32bit.diff
@@ -66,7 +66,7 @@
       }
 + }
 + 
-+ alloc15 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     02 00 00 00 05 20 00 00                         │ ..... ..
   }
   
diff --git a/tests/mir-opt/enum_opt.cand.EnumSizeOpt.64bit.diff b/tests/mir-opt/enum_opt.cand.EnumSizeOpt.64bit.diff
index 9bf8637ec76..c4b57579943 100644
--- a/tests/mir-opt/enum_opt.cand.EnumSizeOpt.64bit.diff
+++ b/tests/mir-opt/enum_opt.cand.EnumSizeOpt.64bit.diff
@@ -66,7 +66,7 @@
       }
 + }
 + 
-+ alloc15 (size: 16, align: 8) {
++ ALLOC0 (size: 16, align: 8) {
 +     02 00 00 00 00 00 00 00 05 20 00 00 00 00 00 00 │ ......... ......
   }
   
diff --git a/tests/mir-opt/enum_opt.rs b/tests/mir-opt/enum_opt.rs
index 2768d708049..7738c431040 100644
--- a/tests/mir-opt/enum_opt.rs
+++ b/tests/mir-opt/enum_opt.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: EnumSizeOpt
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 // compile-flags: -Zunsound-mir-opts
diff --git a/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff b/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff
index 7dc6d21a907..f7d0d1fb56c 100644
--- a/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff
+++ b/tests/mir-opt/enum_opt.unin.EnumSizeOpt.32bit.diff
@@ -66,7 +66,7 @@
       }
 + }
 + 
-+ alloc14 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     05 20 00 00 01 00 00 00                         │ . ......
   }
   
diff --git a/tests/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff b/tests/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff
index 0b000876a86..15f1bd0df51 100644
--- a/tests/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff
+++ b/tests/mir-opt/enum_opt.unin.EnumSizeOpt.64bit.diff
@@ -66,7 +66,7 @@
       }
 + }
 + 
-+ alloc14 (size: 16, align: 8) {
++ ALLOC0 (size: 16, align: 8) {
 +     05 20 00 00 00 00 00 00 01 00 00 00 00 00 00 00 │ . ..............
   }
   
diff --git a/tests/mir-opt/equal_true.opt.InstSimplify.diff b/tests/mir-opt/equal_true.opt.InstSimplify.diff
deleted file mode 100644
index 88a51000c93..00000000000
--- a/tests/mir-opt/equal_true.opt.InstSimplify.diff
+++ /dev/null
@@ -1,36 +0,0 @@
-- // MIR for `opt` before InstSimplify
-+ // MIR for `opt` after InstSimplify
-  
-  fn opt(_1: bool) -> i32 {
-      debug x => _1;
-      let mut _0: i32;
-      let mut _2: bool;
-      let mut _3: bool;
-  
-      bb0: {
-          StorageLive(_2);
-          StorageLive(_3);
-          _3 = _1;
--         _2 = Eq(move _3, const true);
-+         _2 = move _3;
-          switchInt(move _2) -> [0: bb2, otherwise: bb1];
-      }
-  
-      bb1: {
-          StorageDead(_3);
-          _0 = const 0_i32;
-          goto -> bb3;
-      }
-  
-      bb2: {
-          StorageDead(_3);
-          _0 = const 1_i32;
-          goto -> bb3;
-      }
-  
-      bb3: {
-          StorageDead(_2);
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/equal_true.rs b/tests/mir-opt/equal_true.rs
deleted file mode 100644
index fbb5d8d37db..00000000000
--- a/tests/mir-opt/equal_true.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// unit-test InstSimplify
-
-// EMIT_MIR equal_true.opt.InstSimplify.diff
-
-fn opt(x: bool) -> i32 {
-    if x == true { 0 } else { 1 }
-}
-
-fn main() {
-    opt(true);
-}
diff --git a/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir b/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
index fba616d0474..b04e09e88b8 100644
--- a/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
@@ -18,7 +18,7 @@ fn match_tuple(_1: (u32, bool, Option<i32>, u32)) -> u32 {
     }
 
     bb0: {
-        FakeRead(ForMatchedPlace(None), _1);
+        PlaceMention(_1);
         switchInt((_1.0: u32)) -> [1: bb2, 4: bb2, otherwise: bb1];
     }
 
diff --git a/tests/mir-opt/exponential_or.rs b/tests/mir-opt/exponential_or.rs
index 0b8be8385dd..89963b9bdf4 100644
--- a/tests/mir-opt/exponential_or.rs
+++ b/tests/mir-opt/exponential_or.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that simple or-patterns don't get expanded to exponentially large CFGs
 
 // EMIT_MIR exponential_or.match_tuple.SimplifyCfg-initial.after.mir
diff --git a/tests/mir-opt/fn_ptr_shim.rs b/tests/mir-opt/fn_ptr_shim.rs
index 64fbdc9ded1..c82260baefe 100644
--- a/tests/mir-opt/fn_ptr_shim.rs
+++ b/tests/mir-opt/fn_ptr_shim.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Zmir-opt-level=0
 
 // Tests that the `<fn() as Fn>` shim does not create a `Call` terminator with a `Self` callee
diff --git a/tests/mir-opt/funky_arms.float_to_exponential_common.ConstProp.panic-abort.diff b/tests/mir-opt/funky_arms.float_to_exponential_common.ConstProp.panic-abort.diff
index a538756ba2d..298a6084899 100644
--- a/tests/mir-opt/funky_arms.float_to_exponential_common.ConstProp.panic-abort.diff
+++ b/tests/mir-opt/funky_arms.float_to_exponential_common.ConstProp.panic-abort.diff
@@ -7,104 +7,104 @@
       debug upper => _3;
       let mut _0: std::result::Result<(), std::fmt::Error>;
       let _4: bool;
-      let mut _5: &std::fmt::Formatter<'_>;
-      let mut _7: std::option::Option<usize>;
-      let mut _8: &std::fmt::Formatter<'_>;
-      let mut _9: isize;
-      let mut _11: &mut std::fmt::Formatter<'_>;
-      let mut _12: &T;
-      let mut _13: core::num::flt2dec::Sign;
-      let mut _14: u32;
-      let mut _15: u32;
-      let mut _16: usize;
-      let mut _17: bool;
-      let mut _18: &mut std::fmt::Formatter<'_>;
-      let mut _19: &T;
-      let mut _20: core::num::flt2dec::Sign;
-      let mut _21: bool;
+      let mut _6: std::option::Option<usize>;
+      let mut _7: isize;
+      let mut _9: &mut std::fmt::Formatter<'_>;
+      let mut _10: &T;
+      let mut _11: core::num::flt2dec::Sign;
+      let mut _12: u32;
+      let mut _13: u32;
+      let mut _14: usize;
+      let mut _15: bool;
+      let mut _16: &mut std::fmt::Formatter<'_>;
+      let mut _17: &T;
+      let mut _18: core::num::flt2dec::Sign;
+      let mut _19: bool;
       scope 1 {
           debug force_sign => _4;
-          let _6: core::num::flt2dec::Sign;
+          let _5: core::num::flt2dec::Sign;
           scope 2 {
-              debug sign => _6;
+              debug sign => _5;
               scope 3 {
-                  debug precision => _10;
-                  let _10: usize;
+                  debug precision => _8;
+                  let _8: usize;
+                  scope 5 (inlined Formatter::<'_>::precision) {
+                      debug self => _1;
+                  }
               }
           }
       }
+      scope 4 (inlined Formatter::<'_>::sign_plus) {
+          debug self => _1;
+          let mut _20: u32;
+          let mut _21: u32;
+      }
   
       bb0: {
           StorageLive(_4);
+          StorageLive(_20);
+          StorageLive(_21);
+          _21 = ((*_1).0: u32);
+          _20 = BitAnd(move _21, const 1_u32);
+          StorageDead(_21);
+          _4 = Ne(move _20, const 0_u32);
+          StorageDead(_20);
           StorageLive(_5);
-          _5 = &(*_1);
-          _4 = Formatter::<'_>::sign_plus(move _5) -> [return: bb1, unwind unreachable];
+          switchInt(_4) -> [0: bb2, otherwise: bb1];
       }
   
       bb1: {
-          StorageDead(_5);
-          StorageLive(_6);
-          switchInt(_4) -> [0: bb3, otherwise: bb2];
+-         _5 = MinusPlus;
++         _5 = const MinusPlus;
+          goto -> bb3;
       }
   
       bb2: {
--         _6 = MinusPlus;
-+         _6 = const MinusPlus;
-          goto -> bb4;
+-         _5 = Minus;
++         _5 = const Minus;
+          goto -> bb3;
       }
   
       bb3: {
--         _6 = Minus;
-+         _6 = const Minus;
-          goto -> bb4;
+          StorageLive(_6);
+          _6 = ((*_1).4: std::option::Option<usize>);
+          _7 = discriminant(_6);
+          switchInt(move _7) -> [1: bb4, otherwise: bb6];
       }
   
       bb4: {
-          StorageLive(_7);
-          StorageLive(_8);
-          _8 = &(*_1);
-          _7 = Formatter::<'_>::precision(move _8) -> [return: bb5, unwind unreachable];
+          _8 = ((_6 as Some).0: usize);
+          StorageLive(_11);
+          _11 = _5;
+          StorageLive(_12);
+          StorageLive(_13);
+          _13 = _8 as u32 (IntToInt);
+          _12 = Add(move _13, const 1_u32);
+          StorageDead(_13);
+          _0 = float_to_exponential_common_exact::<T>(_1, _2, move _11, move _12, _3) -> [return: bb5, unwind unreachable];
       }
   
       bb5: {
-          StorageDead(_8);
-          _9 = discriminant(_7);
-          switchInt(move _9) -> [1: bb6, otherwise: bb8];
+          StorageDead(_12);
+          StorageDead(_11);
+          goto -> bb8;
       }
   
       bb6: {
-          _10 = ((_7 as Some).0: usize);
-          StorageLive(_13);
-          _13 = _6;
-          StorageLive(_14);
-          StorageLive(_15);
-          _15 = _10 as u32 (IntToInt);
-          _14 = Add(move _15, const 1_u32);
-          StorageDead(_15);
-          _0 = float_to_exponential_common_exact::<T>(_1, _2, move _13, move _14, _3) -> [return: bb7, unwind unreachable];
+          StorageLive(_18);
+          _18 = _5;
+          _0 = float_to_exponential_common_shortest::<T>(_1, _2, move _18, _3) -> [return: bb7, unwind unreachable];
       }
   
       bb7: {
-          StorageDead(_14);
-          StorageDead(_13);
-          goto -> bb10;
+          StorageDead(_18);
+          goto -> bb8;
       }
   
       bb8: {
-          StorageLive(_20);
-          _20 = _6;
-          _0 = float_to_exponential_common_shortest::<T>(_1, _2, move _20, _3) -> [return: bb9, unwind unreachable];
-      }
-  
-      bb9: {
-          StorageDead(_20);
-          goto -> bb10;
-      }
-  
-      bb10: {
-          StorageDead(_6);
+          StorageDead(_5);
           StorageDead(_4);
-          StorageDead(_7);
+          StorageDead(_6);
           return;
       }
   }
diff --git a/tests/mir-opt/funky_arms.float_to_exponential_common.ConstProp.panic-unwind.diff b/tests/mir-opt/funky_arms.float_to_exponential_common.ConstProp.panic-unwind.diff
index 8a3dcfab44b..037f4f7cfac 100644
--- a/tests/mir-opt/funky_arms.float_to_exponential_common.ConstProp.panic-unwind.diff
+++ b/tests/mir-opt/funky_arms.float_to_exponential_common.ConstProp.panic-unwind.diff
@@ -7,104 +7,104 @@
       debug upper => _3;
       let mut _0: std::result::Result<(), std::fmt::Error>;
       let _4: bool;
-      let mut _5: &std::fmt::Formatter<'_>;
-      let mut _7: std::option::Option<usize>;
-      let mut _8: &std::fmt::Formatter<'_>;
-      let mut _9: isize;
-      let mut _11: &mut std::fmt::Formatter<'_>;
-      let mut _12: &T;
-      let mut _13: core::num::flt2dec::Sign;
-      let mut _14: u32;
-      let mut _15: u32;
-      let mut _16: usize;
-      let mut _17: bool;
-      let mut _18: &mut std::fmt::Formatter<'_>;
-      let mut _19: &T;
-      let mut _20: core::num::flt2dec::Sign;
-      let mut _21: bool;
+      let mut _6: std::option::Option<usize>;
+      let mut _7: isize;
+      let mut _9: &mut std::fmt::Formatter<'_>;
+      let mut _10: &T;
+      let mut _11: core::num::flt2dec::Sign;
+      let mut _12: u32;
+      let mut _13: u32;
+      let mut _14: usize;
+      let mut _15: bool;
+      let mut _16: &mut std::fmt::Formatter<'_>;
+      let mut _17: &T;
+      let mut _18: core::num::flt2dec::Sign;
+      let mut _19: bool;
       scope 1 {
           debug force_sign => _4;
-          let _6: core::num::flt2dec::Sign;
+          let _5: core::num::flt2dec::Sign;
           scope 2 {
-              debug sign => _6;
+              debug sign => _5;
               scope 3 {
-                  debug precision => _10;
-                  let _10: usize;
+                  debug precision => _8;
+                  let _8: usize;
+                  scope 5 (inlined Formatter::<'_>::precision) {
+                      debug self => _1;
+                  }
               }
           }
       }
+      scope 4 (inlined Formatter::<'_>::sign_plus) {
+          debug self => _1;
+          let mut _20: u32;
+          let mut _21: u32;
+      }
   
       bb0: {
           StorageLive(_4);
+          StorageLive(_20);
+          StorageLive(_21);
+          _21 = ((*_1).0: u32);
+          _20 = BitAnd(move _21, const 1_u32);
+          StorageDead(_21);
+          _4 = Ne(move _20, const 0_u32);
+          StorageDead(_20);
           StorageLive(_5);
-          _5 = &(*_1);
-          _4 = Formatter::<'_>::sign_plus(move _5) -> [return: bb1, unwind continue];
+          switchInt(_4) -> [0: bb2, otherwise: bb1];
       }
   
       bb1: {
-          StorageDead(_5);
-          StorageLive(_6);
-          switchInt(_4) -> [0: bb3, otherwise: bb2];
+-         _5 = MinusPlus;
++         _5 = const MinusPlus;
+          goto -> bb3;
       }
   
       bb2: {
--         _6 = MinusPlus;
-+         _6 = const MinusPlus;
-          goto -> bb4;
+-         _5 = Minus;
++         _5 = const Minus;
+          goto -> bb3;
       }
   
       bb3: {
--         _6 = Minus;
-+         _6 = const Minus;
-          goto -> bb4;
+          StorageLive(_6);
+          _6 = ((*_1).4: std::option::Option<usize>);
+          _7 = discriminant(_6);
+          switchInt(move _7) -> [1: bb4, otherwise: bb6];
       }
   
       bb4: {
-          StorageLive(_7);
-          StorageLive(_8);
-          _8 = &(*_1);
-          _7 = Formatter::<'_>::precision(move _8) -> [return: bb5, unwind continue];
+          _8 = ((_6 as Some).0: usize);
+          StorageLive(_11);
+          _11 = _5;
+          StorageLive(_12);
+          StorageLive(_13);
+          _13 = _8 as u32 (IntToInt);
+          _12 = Add(move _13, const 1_u32);
+          StorageDead(_13);
+          _0 = float_to_exponential_common_exact::<T>(_1, _2, move _11, move _12, _3) -> [return: bb5, unwind continue];
       }
   
       bb5: {
-          StorageDead(_8);
-          _9 = discriminant(_7);
-          switchInt(move _9) -> [1: bb6, otherwise: bb8];
+          StorageDead(_12);
+          StorageDead(_11);
+          goto -> bb8;
       }
   
       bb6: {
-          _10 = ((_7 as Some).0: usize);
-          StorageLive(_13);
-          _13 = _6;
-          StorageLive(_14);
-          StorageLive(_15);
-          _15 = _10 as u32 (IntToInt);
-          _14 = Add(move _15, const 1_u32);
-          StorageDead(_15);
-          _0 = float_to_exponential_common_exact::<T>(_1, _2, move _13, move _14, _3) -> [return: bb7, unwind continue];
+          StorageLive(_18);
+          _18 = _5;
+          _0 = float_to_exponential_common_shortest::<T>(_1, _2, move _18, _3) -> [return: bb7, unwind continue];
       }
   
       bb7: {
-          StorageDead(_14);
-          StorageDead(_13);
-          goto -> bb10;
+          StorageDead(_18);
+          goto -> bb8;
       }
   
       bb8: {
-          StorageLive(_20);
-          _20 = _6;
-          _0 = float_to_exponential_common_shortest::<T>(_1, _2, move _20, _3) -> [return: bb9, unwind continue];
-      }
-  
-      bb9: {
-          StorageDead(_20);
-          goto -> bb10;
-      }
-  
-      bb10: {
-          StorageDead(_6);
+          StorageDead(_5);
           StorageDead(_4);
-          StorageDead(_7);
+          StorageDead(_6);
           return;
       }
   }
diff --git a/tests/mir-opt/funky_arms.rs b/tests/mir-opt/funky_arms.rs
index 79fd9457ce1..14aad039946 100644
--- a/tests/mir-opt/funky_arms.rs
+++ b/tests/mir-opt/funky_arms.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: --crate-type lib -Cdebug-assertions=no
 
diff --git a/tests/mir-opt/generator_drop_cleanup.rs b/tests/mir-opt/generator_drop_cleanup.rs
deleted file mode 100644
index 7e0d7bb59a5..00000000000
--- a/tests/mir-opt/generator_drop_cleanup.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-#![feature(generators, generator_trait)]
-
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
-
-// Regression test for #58892, generator drop shims should not have blocks
-// spuriously marked as cleanup
-
-// EMIT_MIR generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir
-fn main() {
-    let gen = || {
-        let _s = String::new();
-        yield;
-    };
-}
diff --git a/tests/mir-opt/graphviz.rs b/tests/mir-opt/graphviz.rs
index 6906b86c2a5..61b5a2fb3d8 100644
--- a/tests/mir-opt/graphviz.rs
+++ b/tests/mir-opt/graphviz.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test graphviz output
 // compile-flags: -Z dump-mir-graphviz
 
diff --git a/tests/mir-opt/gvn.arithmetic.GVN.panic-abort.diff b/tests/mir-opt/gvn.arithmetic.GVN.panic-abort.diff
index 3f5173c189e..d524ad242fe 100644
--- a/tests/mir-opt/gvn.arithmetic.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.arithmetic.GVN.panic-abort.diff
@@ -67,11 +67,11 @@
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
--         StorageLive(_4);
--         _4 = _1;
+          StorageLive(_4);
+          _4 = _1;
 -         _3 = Add(move _4, const 0_u64);
--         StorageDead(_4);
 +         _3 = Add(_1, const 0_u64);
+          StorageDead(_4);
           _2 = opaque::<u64>(move _3) -> [return: bb1, unwind unreachable];
       }
   
@@ -80,11 +80,11 @@
           StorageDead(_2);
           StorageLive(_5);
           StorageLive(_6);
--         StorageLive(_7);
--         _7 = _1;
+          StorageLive(_7);
+          _7 = _1;
 -         _6 = Sub(move _7, const 0_u64);
--         StorageDead(_7);
 +         _6 = Sub(_1, const 0_u64);
+          StorageDead(_7);
           _5 = opaque::<u64>(move _6) -> [return: bb2, unwind unreachable];
       }
   
@@ -93,11 +93,11 @@
           StorageDead(_5);
           StorageLive(_8);
           StorageLive(_9);
--         StorageLive(_10);
--         _10 = _1;
+          StorageLive(_10);
+          _10 = _1;
 -         _9 = Mul(move _10, const 0_u64);
--         StorageDead(_10);
 +         _9 = Mul(_1, const 0_u64);
+          StorageDead(_10);
           _8 = opaque::<u64>(move _9) -> [return: bb3, unwind unreachable];
       }
   
@@ -106,11 +106,11 @@
           StorageDead(_8);
           StorageLive(_11);
           StorageLive(_12);
--         StorageLive(_13);
--         _13 = _1;
+          StorageLive(_13);
+          _13 = _1;
 -         _12 = Mul(move _13, const 1_u64);
--         StorageDead(_13);
 +         _12 = Mul(_1, const 1_u64);
+          StorageDead(_13);
           _11 = opaque::<u64>(move _12) -> [return: bb4, unwind unreachable];
       }
   
@@ -119,17 +119,18 @@
           StorageDead(_11);
           StorageLive(_14);
           StorageLive(_15);
--         StorageLive(_16);
--         _16 = _1;
-          _17 = Eq(const 0_u64, const 0_u64);
+          StorageLive(_16);
+          _16 = _1;
+-         _17 = Eq(const 0_u64, const 0_u64);
 -         assert(!move _17, "attempt to divide `{}` by zero", _16) -> [success: bb5, unwind unreachable];
-+         assert(!_17, "attempt to divide `{}` by zero", _1) -> [success: bb5, unwind unreachable];
++         _17 = const true;
++         assert(!const true, "attempt to divide `{}` by zero", _1) -> [success: bb5, unwind unreachable];
       }
   
       bb5: {
 -         _15 = Div(move _16, const 0_u64);
--         StorageDead(_16);
 +         _15 = Div(_1, const 0_u64);
+          StorageDead(_16);
           _14 = opaque::<u64>(move _15) -> [return: bb6, unwind unreachable];
       }
   
@@ -138,17 +139,18 @@
           StorageDead(_14);
           StorageLive(_18);
           StorageLive(_19);
--         StorageLive(_20);
--         _20 = _1;
-          _21 = Eq(const 1_u64, const 0_u64);
+          StorageLive(_20);
+          _20 = _1;
+-         _21 = Eq(const 1_u64, const 0_u64);
 -         assert(!move _21, "attempt to divide `{}` by zero", _20) -> [success: bb7, unwind unreachable];
-+         assert(!_21, "attempt to divide `{}` by zero", _1) -> [success: bb7, unwind unreachable];
++         _21 = const false;
++         assert(!const false, "attempt to divide `{}` by zero", _1) -> [success: bb7, unwind unreachable];
       }
   
       bb7: {
 -         _19 = Div(move _20, const 1_u64);
--         StorageDead(_20);
 +         _19 = Div(_1, const 1_u64);
+          StorageDead(_20);
           _18 = opaque::<u64>(move _19) -> [return: bb8, unwind unreachable];
       }
   
@@ -157,8 +159,8 @@
           StorageDead(_18);
           StorageLive(_22);
           StorageLive(_23);
--         StorageLive(_24);
--         _24 = _1;
+          StorageLive(_24);
+          _24 = _1;
 -         _25 = Eq(_24, const 0_u64);
 -         assert(!move _25, "attempt to divide `{}` by zero", const 0_u64) -> [success: bb9, unwind unreachable];
 +         _25 = Eq(_1, const 0_u64);
@@ -167,8 +169,8 @@
   
       bb9: {
 -         _23 = Div(const 0_u64, move _24);
--         StorageDead(_24);
 +         _23 = Div(const 0_u64, _1);
+          StorageDead(_24);
           _22 = opaque::<u64>(move _23) -> [return: bb10, unwind unreachable];
       }
   
@@ -177,17 +179,18 @@
           StorageDead(_22);
           StorageLive(_26);
           StorageLive(_27);
--         StorageLive(_28);
--         _28 = _1;
+          StorageLive(_28);
+          _28 = _1;
 -         _29 = Eq(_28, const 0_u64);
 -         assert(!move _29, "attempt to divide `{}` by zero", const 1_u64) -> [success: bb11, unwind unreachable];
++         _29 = _25;
 +         assert(!_25, "attempt to divide `{}` by zero", const 1_u64) -> [success: bb11, unwind unreachable];
       }
   
       bb11: {
 -         _27 = Div(const 1_u64, move _28);
--         StorageDead(_28);
 +         _27 = Div(const 1_u64, _1);
+          StorageDead(_28);
           _26 = opaque::<u64>(move _27) -> [return: bb12, unwind unreachable];
       }
   
@@ -196,17 +199,18 @@
           StorageDead(_26);
           StorageLive(_30);
           StorageLive(_31);
--         StorageLive(_32);
--         _32 = _1;
+          StorageLive(_32);
+          _32 = _1;
 -         _33 = Eq(const 0_u64, const 0_u64);
 -         assert(!move _33, "attempt to calculate the remainder of `{}` with a divisor of zero", _32) -> [success: bb13, unwind unreachable];
-+         assert(!_17, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb13, unwind unreachable];
++         _33 = const true;
++         assert(!const true, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb13, unwind unreachable];
       }
   
       bb13: {
 -         _31 = Rem(move _32, const 0_u64);
--         StorageDead(_32);
 +         _31 = Rem(_1, const 0_u64);
+          StorageDead(_32);
           _30 = opaque::<u64>(move _31) -> [return: bb14, unwind unreachable];
       }
   
@@ -215,17 +219,18 @@
           StorageDead(_30);
           StorageLive(_34);
           StorageLive(_35);
--         StorageLive(_36);
--         _36 = _1;
+          StorageLive(_36);
+          _36 = _1;
 -         _37 = Eq(const 1_u64, const 0_u64);
 -         assert(!move _37, "attempt to calculate the remainder of `{}` with a divisor of zero", _36) -> [success: bb15, unwind unreachable];
-+         assert(!_21, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb15, unwind unreachable];
++         _37 = const false;
++         assert(!const false, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb15, unwind unreachable];
       }
   
       bb15: {
 -         _35 = Rem(move _36, const 1_u64);
--         StorageDead(_36);
 +         _35 = Rem(_1, const 1_u64);
+          StorageDead(_36);
           _34 = opaque::<u64>(move _35) -> [return: bb16, unwind unreachable];
       }
   
@@ -234,17 +239,18 @@
           StorageDead(_34);
           StorageLive(_38);
           StorageLive(_39);
--         StorageLive(_40);
--         _40 = _1;
+          StorageLive(_40);
+          _40 = _1;
 -         _41 = Eq(_40, const 0_u64);
 -         assert(!move _41, "attempt to calculate the remainder of `{}` with a divisor of zero", const 0_u64) -> [success: bb17, unwind unreachable];
++         _41 = _25;
 +         assert(!_25, "attempt to calculate the remainder of `{}` with a divisor of zero", const 0_u64) -> [success: bb17, unwind unreachable];
       }
   
       bb17: {
 -         _39 = Rem(const 0_u64, move _40);
--         StorageDead(_40);
 +         _39 = Rem(const 0_u64, _1);
+          StorageDead(_40);
           _38 = opaque::<u64>(move _39) -> [return: bb18, unwind unreachable];
       }
   
@@ -253,17 +259,18 @@
           StorageDead(_38);
           StorageLive(_42);
           StorageLive(_43);
--         StorageLive(_44);
--         _44 = _1;
+          StorageLive(_44);
+          _44 = _1;
 -         _45 = Eq(_44, const 0_u64);
 -         assert(!move _45, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_u64) -> [success: bb19, unwind unreachable];
++         _45 = _25;
 +         assert(!_25, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_u64) -> [success: bb19, unwind unreachable];
       }
   
       bb19: {
 -         _43 = Rem(const 1_u64, move _44);
--         StorageDead(_44);
 +         _43 = Rem(const 1_u64, _1);
+          StorageDead(_44);
           _42 = opaque::<u64>(move _43) -> [return: bb20, unwind unreachable];
       }
   
@@ -272,11 +279,11 @@
           StorageDead(_42);
           StorageLive(_46);
           StorageLive(_47);
--         StorageLive(_48);
--         _48 = _1;
+          StorageLive(_48);
+          _48 = _1;
 -         _47 = BitAnd(move _48, const 0_u64);
--         StorageDead(_48);
 +         _47 = BitAnd(_1, const 0_u64);
+          StorageDead(_48);
           _46 = opaque::<u64>(move _47) -> [return: bb21, unwind unreachable];
       }
   
@@ -285,11 +292,11 @@
           StorageDead(_46);
           StorageLive(_49);
           StorageLive(_50);
--         StorageLive(_51);
--         _51 = _1;
+          StorageLive(_51);
+          _51 = _1;
 -         _50 = BitOr(move _51, const 0_u64);
--         StorageDead(_51);
 +         _50 = BitOr(_1, const 0_u64);
+          StorageDead(_51);
           _49 = opaque::<u64>(move _50) -> [return: bb22, unwind unreachable];
       }
   
@@ -298,11 +305,11 @@
           StorageDead(_49);
           StorageLive(_52);
           StorageLive(_53);
--         StorageLive(_54);
--         _54 = _1;
+          StorageLive(_54);
+          _54 = _1;
 -         _53 = BitXor(move _54, const 0_u64);
--         StorageDead(_54);
 +         _53 = BitXor(_1, const 0_u64);
+          StorageDead(_54);
           _52 = opaque::<u64>(move _53) -> [return: bb23, unwind unreachable];
       }
   
@@ -311,11 +318,11 @@
           StorageDead(_52);
           StorageLive(_55);
           StorageLive(_56);
--         StorageLive(_57);
--         _57 = _1;
+          StorageLive(_57);
+          _57 = _1;
 -         _56 = Shr(move _57, const 0_i32);
--         StorageDead(_57);
 +         _56 = Shr(_1, const 0_i32);
+          StorageDead(_57);
           _55 = opaque::<u64>(move _56) -> [return: bb24, unwind unreachable];
       }
   
@@ -324,11 +331,11 @@
           StorageDead(_55);
           StorageLive(_58);
           StorageLive(_59);
--         StorageLive(_60);
--         _60 = _1;
+          StorageLive(_60);
+          _60 = _1;
 -         _59 = Shl(move _60, const 0_i32);
--         StorageDead(_60);
 +         _59 = Shl(_1, const 0_i32);
+          StorageDead(_60);
           _58 = opaque::<u64>(move _59) -> [return: bb25, unwind unreachable];
       }
   
diff --git a/tests/mir-opt/gvn.arithmetic.GVN.panic-unwind.diff b/tests/mir-opt/gvn.arithmetic.GVN.panic-unwind.diff
index 38da21d91d4..9d69353934c 100644
--- a/tests/mir-opt/gvn.arithmetic.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.arithmetic.GVN.panic-unwind.diff
@@ -67,11 +67,11 @@
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
--         StorageLive(_4);
--         _4 = _1;
+          StorageLive(_4);
+          _4 = _1;
 -         _3 = Add(move _4, const 0_u64);
--         StorageDead(_4);
 +         _3 = Add(_1, const 0_u64);
+          StorageDead(_4);
           _2 = opaque::<u64>(move _3) -> [return: bb1, unwind continue];
       }
   
@@ -80,11 +80,11 @@
           StorageDead(_2);
           StorageLive(_5);
           StorageLive(_6);
--         StorageLive(_7);
--         _7 = _1;
+          StorageLive(_7);
+          _7 = _1;
 -         _6 = Sub(move _7, const 0_u64);
--         StorageDead(_7);
 +         _6 = Sub(_1, const 0_u64);
+          StorageDead(_7);
           _5 = opaque::<u64>(move _6) -> [return: bb2, unwind continue];
       }
   
@@ -93,11 +93,11 @@
           StorageDead(_5);
           StorageLive(_8);
           StorageLive(_9);
--         StorageLive(_10);
--         _10 = _1;
+          StorageLive(_10);
+          _10 = _1;
 -         _9 = Mul(move _10, const 0_u64);
--         StorageDead(_10);
 +         _9 = Mul(_1, const 0_u64);
+          StorageDead(_10);
           _8 = opaque::<u64>(move _9) -> [return: bb3, unwind continue];
       }
   
@@ -106,11 +106,11 @@
           StorageDead(_8);
           StorageLive(_11);
           StorageLive(_12);
--         StorageLive(_13);
--         _13 = _1;
+          StorageLive(_13);
+          _13 = _1;
 -         _12 = Mul(move _13, const 1_u64);
--         StorageDead(_13);
 +         _12 = Mul(_1, const 1_u64);
+          StorageDead(_13);
           _11 = opaque::<u64>(move _12) -> [return: bb4, unwind continue];
       }
   
@@ -119,17 +119,18 @@
           StorageDead(_11);
           StorageLive(_14);
           StorageLive(_15);
--         StorageLive(_16);
--         _16 = _1;
-          _17 = Eq(const 0_u64, const 0_u64);
+          StorageLive(_16);
+          _16 = _1;
+-         _17 = Eq(const 0_u64, const 0_u64);
 -         assert(!move _17, "attempt to divide `{}` by zero", _16) -> [success: bb5, unwind continue];
-+         assert(!_17, "attempt to divide `{}` by zero", _1) -> [success: bb5, unwind continue];
++         _17 = const true;
++         assert(!const true, "attempt to divide `{}` by zero", _1) -> [success: bb5, unwind continue];
       }
   
       bb5: {
 -         _15 = Div(move _16, const 0_u64);
--         StorageDead(_16);
 +         _15 = Div(_1, const 0_u64);
+          StorageDead(_16);
           _14 = opaque::<u64>(move _15) -> [return: bb6, unwind continue];
       }
   
@@ -138,17 +139,18 @@
           StorageDead(_14);
           StorageLive(_18);
           StorageLive(_19);
--         StorageLive(_20);
--         _20 = _1;
-          _21 = Eq(const 1_u64, const 0_u64);
+          StorageLive(_20);
+          _20 = _1;
+-         _21 = Eq(const 1_u64, const 0_u64);
 -         assert(!move _21, "attempt to divide `{}` by zero", _20) -> [success: bb7, unwind continue];
-+         assert(!_21, "attempt to divide `{}` by zero", _1) -> [success: bb7, unwind continue];
++         _21 = const false;
++         assert(!const false, "attempt to divide `{}` by zero", _1) -> [success: bb7, unwind continue];
       }
   
       bb7: {
 -         _19 = Div(move _20, const 1_u64);
--         StorageDead(_20);
 +         _19 = Div(_1, const 1_u64);
+          StorageDead(_20);
           _18 = opaque::<u64>(move _19) -> [return: bb8, unwind continue];
       }
   
@@ -157,8 +159,8 @@
           StorageDead(_18);
           StorageLive(_22);
           StorageLive(_23);
--         StorageLive(_24);
--         _24 = _1;
+          StorageLive(_24);
+          _24 = _1;
 -         _25 = Eq(_24, const 0_u64);
 -         assert(!move _25, "attempt to divide `{}` by zero", const 0_u64) -> [success: bb9, unwind continue];
 +         _25 = Eq(_1, const 0_u64);
@@ -167,8 +169,8 @@
   
       bb9: {
 -         _23 = Div(const 0_u64, move _24);
--         StorageDead(_24);
 +         _23 = Div(const 0_u64, _1);
+          StorageDead(_24);
           _22 = opaque::<u64>(move _23) -> [return: bb10, unwind continue];
       }
   
@@ -177,17 +179,18 @@
           StorageDead(_22);
           StorageLive(_26);
           StorageLive(_27);
--         StorageLive(_28);
--         _28 = _1;
+          StorageLive(_28);
+          _28 = _1;
 -         _29 = Eq(_28, const 0_u64);
 -         assert(!move _29, "attempt to divide `{}` by zero", const 1_u64) -> [success: bb11, unwind continue];
++         _29 = _25;
 +         assert(!_25, "attempt to divide `{}` by zero", const 1_u64) -> [success: bb11, unwind continue];
       }
   
       bb11: {
 -         _27 = Div(const 1_u64, move _28);
--         StorageDead(_28);
 +         _27 = Div(const 1_u64, _1);
+          StorageDead(_28);
           _26 = opaque::<u64>(move _27) -> [return: bb12, unwind continue];
       }
   
@@ -196,17 +199,18 @@
           StorageDead(_26);
           StorageLive(_30);
           StorageLive(_31);
--         StorageLive(_32);
--         _32 = _1;
+          StorageLive(_32);
+          _32 = _1;
 -         _33 = Eq(const 0_u64, const 0_u64);
 -         assert(!move _33, "attempt to calculate the remainder of `{}` with a divisor of zero", _32) -> [success: bb13, unwind continue];
-+         assert(!_17, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb13, unwind continue];
++         _33 = const true;
++         assert(!const true, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb13, unwind continue];
       }
   
       bb13: {
 -         _31 = Rem(move _32, const 0_u64);
--         StorageDead(_32);
 +         _31 = Rem(_1, const 0_u64);
+          StorageDead(_32);
           _30 = opaque::<u64>(move _31) -> [return: bb14, unwind continue];
       }
   
@@ -215,17 +219,18 @@
           StorageDead(_30);
           StorageLive(_34);
           StorageLive(_35);
--         StorageLive(_36);
--         _36 = _1;
+          StorageLive(_36);
+          _36 = _1;
 -         _37 = Eq(const 1_u64, const 0_u64);
 -         assert(!move _37, "attempt to calculate the remainder of `{}` with a divisor of zero", _36) -> [success: bb15, unwind continue];
-+         assert(!_21, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb15, unwind continue];
++         _37 = const false;
++         assert(!const false, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb15, unwind continue];
       }
   
       bb15: {
 -         _35 = Rem(move _36, const 1_u64);
--         StorageDead(_36);
 +         _35 = Rem(_1, const 1_u64);
+          StorageDead(_36);
           _34 = opaque::<u64>(move _35) -> [return: bb16, unwind continue];
       }
   
@@ -234,17 +239,18 @@
           StorageDead(_34);
           StorageLive(_38);
           StorageLive(_39);
--         StorageLive(_40);
--         _40 = _1;
+          StorageLive(_40);
+          _40 = _1;
 -         _41 = Eq(_40, const 0_u64);
 -         assert(!move _41, "attempt to calculate the remainder of `{}` with a divisor of zero", const 0_u64) -> [success: bb17, unwind continue];
++         _41 = _25;
 +         assert(!_25, "attempt to calculate the remainder of `{}` with a divisor of zero", const 0_u64) -> [success: bb17, unwind continue];
       }
   
       bb17: {
 -         _39 = Rem(const 0_u64, move _40);
--         StorageDead(_40);
 +         _39 = Rem(const 0_u64, _1);
+          StorageDead(_40);
           _38 = opaque::<u64>(move _39) -> [return: bb18, unwind continue];
       }
   
@@ -253,17 +259,18 @@
           StorageDead(_38);
           StorageLive(_42);
           StorageLive(_43);
--         StorageLive(_44);
--         _44 = _1;
+          StorageLive(_44);
+          _44 = _1;
 -         _45 = Eq(_44, const 0_u64);
 -         assert(!move _45, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_u64) -> [success: bb19, unwind continue];
++         _45 = _25;
 +         assert(!_25, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_u64) -> [success: bb19, unwind continue];
       }
   
       bb19: {
 -         _43 = Rem(const 1_u64, move _44);
--         StorageDead(_44);
 +         _43 = Rem(const 1_u64, _1);
+          StorageDead(_44);
           _42 = opaque::<u64>(move _43) -> [return: bb20, unwind continue];
       }
   
@@ -272,11 +279,11 @@
           StorageDead(_42);
           StorageLive(_46);
           StorageLive(_47);
--         StorageLive(_48);
--         _48 = _1;
+          StorageLive(_48);
+          _48 = _1;
 -         _47 = BitAnd(move _48, const 0_u64);
--         StorageDead(_48);
 +         _47 = BitAnd(_1, const 0_u64);
+          StorageDead(_48);
           _46 = opaque::<u64>(move _47) -> [return: bb21, unwind continue];
       }
   
@@ -285,11 +292,11 @@
           StorageDead(_46);
           StorageLive(_49);
           StorageLive(_50);
--         StorageLive(_51);
--         _51 = _1;
+          StorageLive(_51);
+          _51 = _1;
 -         _50 = BitOr(move _51, const 0_u64);
--         StorageDead(_51);
 +         _50 = BitOr(_1, const 0_u64);
+          StorageDead(_51);
           _49 = opaque::<u64>(move _50) -> [return: bb22, unwind continue];
       }
   
@@ -298,11 +305,11 @@
           StorageDead(_49);
           StorageLive(_52);
           StorageLive(_53);
--         StorageLive(_54);
--         _54 = _1;
+          StorageLive(_54);
+          _54 = _1;
 -         _53 = BitXor(move _54, const 0_u64);
--         StorageDead(_54);
 +         _53 = BitXor(_1, const 0_u64);
+          StorageDead(_54);
           _52 = opaque::<u64>(move _53) -> [return: bb23, unwind continue];
       }
   
@@ -311,11 +318,11 @@
           StorageDead(_52);
           StorageLive(_55);
           StorageLive(_56);
--         StorageLive(_57);
--         _57 = _1;
+          StorageLive(_57);
+          _57 = _1;
 -         _56 = Shr(move _57, const 0_i32);
--         StorageDead(_57);
 +         _56 = Shr(_1, const 0_i32);
+          StorageDead(_57);
           _55 = opaque::<u64>(move _56) -> [return: bb24, unwind continue];
       }
   
@@ -324,11 +331,11 @@
           StorageDead(_55);
           StorageLive(_58);
           StorageLive(_59);
--         StorageLive(_60);
--         _60 = _1;
+          StorageLive(_60);
+          _60 = _1;
 -         _59 = Shl(move _60, const 0_i32);
--         StorageDead(_60);
 +         _59 = Shl(_1, const 0_i32);
+          StorageDead(_60);
           _58 = opaque::<u64>(move _59) -> [return: bb25, unwind continue];
       }
   
diff --git a/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-abort.diff b/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-abort.diff
index 0c342799e07..6633df3ae70 100644
--- a/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-abort.diff
@@ -20,63 +20,12 @@
       let mut _15: u64;
       let mut _16: u64;
       let mut _17: (u64, bool);
-      let _18: ();
-      let mut _19: u64;
-      let mut _20: u64;
-      let mut _21: bool;
-      let _22: ();
-      let mut _23: u64;
-      let mut _24: u64;
-      let mut _25: bool;
-      let _26: ();
-      let mut _27: u64;
-      let mut _28: u64;
-      let mut _29: bool;
-      let _30: ();
-      let mut _31: u64;
-      let mut _32: u64;
-      let mut _33: bool;
-      let _34: ();
-      let mut _35: u64;
-      let mut _36: u64;
-      let mut _37: bool;
-      let _38: ();
-      let mut _39: u64;
-      let mut _40: u64;
-      let mut _41: bool;
-      let _42: ();
-      let mut _43: u64;
-      let mut _44: u64;
-      let mut _45: bool;
-      let _46: ();
-      let mut _47: u64;
-      let mut _48: u64;
-      let mut _49: bool;
-      let _50: ();
-      let mut _51: u64;
-      let mut _52: u64;
-      let _53: ();
-      let mut _54: u64;
-      let mut _55: u64;
-      let _56: ();
-      let mut _57: u64;
-      let mut _58: u64;
-      let _59: ();
-      let mut _60: u64;
-      let mut _61: u64;
-      let mut _62: u32;
-      let mut _63: bool;
-      let _64: ();
-      let mut _65: u64;
-      let mut _66: u64;
-      let mut _67: u32;
-      let mut _68: bool;
   
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
--         StorageLive(_4);
--         _4 = _1;
+          StorageLive(_4);
+          _4 = _1;
 -         _5 = CheckedAdd(_4, const 0_u64);
 -         assert(!move (_5.1: bool), "attempt to compute `{} + {}`, which would overflow", move _4, const 0_u64) -> [success: bb1, unwind unreachable];
 +         _5 = CheckedAdd(_1, const 0_u64);
@@ -85,7 +34,7 @@
   
       bb1: {
           _3 = move (_5.0: u64);
--         StorageDead(_4);
+          StorageDead(_4);
           _2 = opaque::<u64>(move _3) -> [return: bb2, unwind unreachable];
       }
   
@@ -94,8 +43,8 @@
           StorageDead(_2);
           StorageLive(_6);
           StorageLive(_7);
--         StorageLive(_8);
--         _8 = _1;
+          StorageLive(_8);
+          _8 = _1;
 -         _9 = CheckedSub(_8, const 0_u64);
 -         assert(!move (_9.1: bool), "attempt to compute `{} - {}`, which would overflow", move _8, const 0_u64) -> [success: bb3, unwind unreachable];
 +         _9 = CheckedSub(_1, const 0_u64);
@@ -104,7 +53,7 @@
   
       bb3: {
           _7 = move (_9.0: u64);
--         StorageDead(_8);
+          StorageDead(_8);
           _6 = opaque::<u64>(move _7) -> [return: bb4, unwind unreachable];
       }
   
@@ -113,8 +62,8 @@
           StorageDead(_6);
           StorageLive(_10);
           StorageLive(_11);
--         StorageLive(_12);
--         _12 = _1;
+          StorageLive(_12);
+          _12 = _1;
 -         _13 = CheckedMul(_12, const 0_u64);
 -         assert(!move (_13.1: bool), "attempt to compute `{} * {}`, which would overflow", move _12, const 0_u64) -> [success: bb5, unwind unreachable];
 +         _13 = CheckedMul(_1, const 0_u64);
@@ -123,7 +72,7 @@
   
       bb5: {
           _11 = move (_13.0: u64);
--         StorageDead(_12);
+          StorageDead(_12);
           _10 = opaque::<u64>(move _11) -> [return: bb6, unwind unreachable];
       }
   
@@ -132,8 +81,8 @@
           StorageDead(_10);
           StorageLive(_14);
           StorageLive(_15);
--         StorageLive(_16);
--         _16 = _1;
+          StorageLive(_16);
+          _16 = _1;
 -         _17 = CheckedMul(_16, const 1_u64);
 -         assert(!move (_17.1: bool), "attempt to compute `{} * {}`, which would overflow", move _16, const 1_u64) -> [success: bb7, unwind unreachable];
 +         _17 = CheckedMul(_1, const 1_u64);
@@ -142,246 +91,13 @@
   
       bb7: {
           _15 = move (_17.0: u64);
--         StorageDead(_16);
+          StorageDead(_16);
           _14 = opaque::<u64>(move _15) -> [return: bb8, unwind unreachable];
       }
   
       bb8: {
           StorageDead(_15);
           StorageDead(_14);
-          StorageLive(_18);
-          StorageLive(_19);
--         StorageLive(_20);
--         _20 = _1;
-          _21 = Eq(const 0_u64, const 0_u64);
--         assert(!move _21, "attempt to divide `{}` by zero", _20) -> [success: bb9, unwind unreachable];
-+         assert(!_21, "attempt to divide `{}` by zero", _1) -> [success: bb9, unwind unreachable];
-      }
-  
-      bb9: {
--         _19 = Div(move _20, const 0_u64);
--         StorageDead(_20);
-+         _19 = Div(_1, const 0_u64);
-          _18 = opaque::<u64>(move _19) -> [return: bb10, unwind unreachable];
-      }
-  
-      bb10: {
-          StorageDead(_19);
-          StorageDead(_18);
-          StorageLive(_22);
-          StorageLive(_23);
--         StorageLive(_24);
--         _24 = _1;
-          _25 = Eq(const 1_u64, const 0_u64);
--         assert(!move _25, "attempt to divide `{}` by zero", _24) -> [success: bb11, unwind unreachable];
-+         assert(!_25, "attempt to divide `{}` by zero", _1) -> [success: bb11, unwind unreachable];
-      }
-  
-      bb11: {
--         _23 = Div(move _24, const 1_u64);
--         StorageDead(_24);
-+         _23 = Div(_1, const 1_u64);
-          _22 = opaque::<u64>(move _23) -> [return: bb12, unwind unreachable];
-      }
-  
-      bb12: {
-          StorageDead(_23);
-          StorageDead(_22);
-          StorageLive(_26);
-          StorageLive(_27);
--         StorageLive(_28);
--         _28 = _1;
--         _29 = Eq(_28, const 0_u64);
--         assert(!move _29, "attempt to divide `{}` by zero", const 0_u64) -> [success: bb13, unwind unreachable];
-+         _29 = Eq(_1, const 0_u64);
-+         assert(!_29, "attempt to divide `{}` by zero", const 0_u64) -> [success: bb13, unwind unreachable];
-      }
-  
-      bb13: {
--         _27 = Div(const 0_u64, move _28);
--         StorageDead(_28);
-+         _27 = Div(const 0_u64, _1);
-          _26 = opaque::<u64>(move _27) -> [return: bb14, unwind unreachable];
-      }
-  
-      bb14: {
-          StorageDead(_27);
-          StorageDead(_26);
-          StorageLive(_30);
-          StorageLive(_31);
--         StorageLive(_32);
--         _32 = _1;
--         _33 = Eq(_32, const 0_u64);
--         assert(!move _33, "attempt to divide `{}` by zero", const 1_u64) -> [success: bb15, unwind unreachable];
-+         assert(!_29, "attempt to divide `{}` by zero", const 1_u64) -> [success: bb15, unwind unreachable];
-      }
-  
-      bb15: {
--         _31 = Div(const 1_u64, move _32);
--         StorageDead(_32);
-+         _31 = Div(const 1_u64, _1);
-          _30 = opaque::<u64>(move _31) -> [return: bb16, unwind unreachable];
-      }
-  
-      bb16: {
-          StorageDead(_31);
-          StorageDead(_30);
-          StorageLive(_34);
-          StorageLive(_35);
--         StorageLive(_36);
--         _36 = _1;
--         _37 = Eq(const 0_u64, const 0_u64);
--         assert(!move _37, "attempt to calculate the remainder of `{}` with a divisor of zero", _36) -> [success: bb17, unwind unreachable];
-+         assert(!_21, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb17, unwind unreachable];
-      }
-  
-      bb17: {
--         _35 = Rem(move _36, const 0_u64);
--         StorageDead(_36);
-+         _35 = Rem(_1, const 0_u64);
-          _34 = opaque::<u64>(move _35) -> [return: bb18, unwind unreachable];
-      }
-  
-      bb18: {
-          StorageDead(_35);
-          StorageDead(_34);
-          StorageLive(_38);
-          StorageLive(_39);
--         StorageLive(_40);
--         _40 = _1;
--         _41 = Eq(const 1_u64, const 0_u64);
--         assert(!move _41, "attempt to calculate the remainder of `{}` with a divisor of zero", _40) -> [success: bb19, unwind unreachable];
-+         assert(!_25, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb19, unwind unreachable];
-      }
-  
-      bb19: {
--         _39 = Rem(move _40, const 1_u64);
--         StorageDead(_40);
-+         _39 = Rem(_1, const 1_u64);
-          _38 = opaque::<u64>(move _39) -> [return: bb20, unwind unreachable];
-      }
-  
-      bb20: {
-          StorageDead(_39);
-          StorageDead(_38);
-          StorageLive(_42);
-          StorageLive(_43);
--         StorageLive(_44);
--         _44 = _1;
--         _45 = Eq(_44, const 0_u64);
--         assert(!move _45, "attempt to calculate the remainder of `{}` with a divisor of zero", const 0_u64) -> [success: bb21, unwind unreachable];
-+         assert(!_29, "attempt to calculate the remainder of `{}` with a divisor of zero", const 0_u64) -> [success: bb21, unwind unreachable];
-      }
-  
-      bb21: {
--         _43 = Rem(const 0_u64, move _44);
--         StorageDead(_44);
-+         _43 = Rem(const 0_u64, _1);
-          _42 = opaque::<u64>(move _43) -> [return: bb22, unwind unreachable];
-      }
-  
-      bb22: {
-          StorageDead(_43);
-          StorageDead(_42);
-          StorageLive(_46);
-          StorageLive(_47);
--         StorageLive(_48);
--         _48 = _1;
--         _49 = Eq(_48, const 0_u64);
--         assert(!move _49, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_u64) -> [success: bb23, unwind unreachable];
-+         assert(!_29, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_u64) -> [success: bb23, unwind unreachable];
-      }
-  
-      bb23: {
--         _47 = Rem(const 1_u64, move _48);
--         StorageDead(_48);
-+         _47 = Rem(const 1_u64, _1);
-          _46 = opaque::<u64>(move _47) -> [return: bb24, unwind unreachable];
-      }
-  
-      bb24: {
-          StorageDead(_47);
-          StorageDead(_46);
-          StorageLive(_50);
-          StorageLive(_51);
--         StorageLive(_52);
--         _52 = _1;
--         _51 = BitAnd(move _52, const 0_u64);
--         StorageDead(_52);
-+         _51 = BitAnd(_1, const 0_u64);
-          _50 = opaque::<u64>(move _51) -> [return: bb25, unwind unreachable];
-      }
-  
-      bb25: {
-          StorageDead(_51);
-          StorageDead(_50);
-          StorageLive(_53);
-          StorageLive(_54);
--         StorageLive(_55);
--         _55 = _1;
--         _54 = BitOr(move _55, const 0_u64);
--         StorageDead(_55);
-+         _54 = BitOr(_1, const 0_u64);
-          _53 = opaque::<u64>(move _54) -> [return: bb26, unwind unreachable];
-      }
-  
-      bb26: {
-          StorageDead(_54);
-          StorageDead(_53);
-          StorageLive(_56);
-          StorageLive(_57);
--         StorageLive(_58);
--         _58 = _1;
--         _57 = BitXor(move _58, const 0_u64);
--         StorageDead(_58);
-+         _57 = BitXor(_1, const 0_u64);
-          _56 = opaque::<u64>(move _57) -> [return: bb27, unwind unreachable];
-      }
-  
-      bb27: {
-          StorageDead(_57);
-          StorageDead(_56);
-          StorageLive(_59);
-          StorageLive(_60);
--         StorageLive(_61);
--         _61 = _1;
-          _62 = const 0_i32 as u32 (IntToInt);
--         _63 = Lt(move _62, const 64_u32);
--         assert(move _63, "attempt to shift right by `{}`, which would overflow", const 0_i32) -> [success: bb28, unwind unreachable];
-+         _63 = Lt(_62, const 64_u32);
-+         assert(_63, "attempt to shift right by `{}`, which would overflow", const 0_i32) -> [success: bb28, unwind unreachable];
-      }
-  
-      bb28: {
--         _60 = Shr(move _61, const 0_i32);
--         StorageDead(_61);
-+         _60 = Shr(_1, const 0_i32);
-          _59 = opaque::<u64>(move _60) -> [return: bb29, unwind unreachable];
-      }
-  
-      bb29: {
-          StorageDead(_60);
-          StorageDead(_59);
-          StorageLive(_64);
-          StorageLive(_65);
--         StorageLive(_66);
--         _66 = _1;
--         _67 = const 0_i32 as u32 (IntToInt);
--         _68 = Lt(move _67, const 64_u32);
--         assert(move _68, "attempt to shift left by `{}`, which would overflow", const 0_i32) -> [success: bb30, unwind unreachable];
-+         assert(_63, "attempt to shift left by `{}`, which would overflow", const 0_i32) -> [success: bb30, unwind unreachable];
-      }
-  
-      bb30: {
--         _65 = Shl(move _66, const 0_i32);
--         StorageDead(_66);
-+         _65 = Shl(_1, const 0_i32);
-          _64 = opaque::<u64>(move _65) -> [return: bb31, unwind unreachable];
-      }
-  
-      bb31: {
-          StorageDead(_65);
-          StorageDead(_64);
           _0 = const ();
           return;
       }
diff --git a/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-unwind.diff b/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-unwind.diff
index 7813c29b962..d100a77fee5 100644
--- a/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.arithmetic_checked.GVN.panic-unwind.diff
@@ -20,63 +20,12 @@
       let mut _15: u64;
       let mut _16: u64;
       let mut _17: (u64, bool);
-      let _18: ();
-      let mut _19: u64;
-      let mut _20: u64;
-      let mut _21: bool;
-      let _22: ();
-      let mut _23: u64;
-      let mut _24: u64;
-      let mut _25: bool;
-      let _26: ();
-      let mut _27: u64;
-      let mut _28: u64;
-      let mut _29: bool;
-      let _30: ();
-      let mut _31: u64;
-      let mut _32: u64;
-      let mut _33: bool;
-      let _34: ();
-      let mut _35: u64;
-      let mut _36: u64;
-      let mut _37: bool;
-      let _38: ();
-      let mut _39: u64;
-      let mut _40: u64;
-      let mut _41: bool;
-      let _42: ();
-      let mut _43: u64;
-      let mut _44: u64;
-      let mut _45: bool;
-      let _46: ();
-      let mut _47: u64;
-      let mut _48: u64;
-      let mut _49: bool;
-      let _50: ();
-      let mut _51: u64;
-      let mut _52: u64;
-      let _53: ();
-      let mut _54: u64;
-      let mut _55: u64;
-      let _56: ();
-      let mut _57: u64;
-      let mut _58: u64;
-      let _59: ();
-      let mut _60: u64;
-      let mut _61: u64;
-      let mut _62: u32;
-      let mut _63: bool;
-      let _64: ();
-      let mut _65: u64;
-      let mut _66: u64;
-      let mut _67: u32;
-      let mut _68: bool;
   
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
--         StorageLive(_4);
--         _4 = _1;
+          StorageLive(_4);
+          _4 = _1;
 -         _5 = CheckedAdd(_4, const 0_u64);
 -         assert(!move (_5.1: bool), "attempt to compute `{} + {}`, which would overflow", move _4, const 0_u64) -> [success: bb1, unwind continue];
 +         _5 = CheckedAdd(_1, const 0_u64);
@@ -85,7 +34,7 @@
   
       bb1: {
           _3 = move (_5.0: u64);
--         StorageDead(_4);
+          StorageDead(_4);
           _2 = opaque::<u64>(move _3) -> [return: bb2, unwind continue];
       }
   
@@ -94,8 +43,8 @@
           StorageDead(_2);
           StorageLive(_6);
           StorageLive(_7);
--         StorageLive(_8);
--         _8 = _1;
+          StorageLive(_8);
+          _8 = _1;
 -         _9 = CheckedSub(_8, const 0_u64);
 -         assert(!move (_9.1: bool), "attempt to compute `{} - {}`, which would overflow", move _8, const 0_u64) -> [success: bb3, unwind continue];
 +         _9 = CheckedSub(_1, const 0_u64);
@@ -104,7 +53,7 @@
   
       bb3: {
           _7 = move (_9.0: u64);
--         StorageDead(_8);
+          StorageDead(_8);
           _6 = opaque::<u64>(move _7) -> [return: bb4, unwind continue];
       }
   
@@ -113,8 +62,8 @@
           StorageDead(_6);
           StorageLive(_10);
           StorageLive(_11);
--         StorageLive(_12);
--         _12 = _1;
+          StorageLive(_12);
+          _12 = _1;
 -         _13 = CheckedMul(_12, const 0_u64);
 -         assert(!move (_13.1: bool), "attempt to compute `{} * {}`, which would overflow", move _12, const 0_u64) -> [success: bb5, unwind continue];
 +         _13 = CheckedMul(_1, const 0_u64);
@@ -123,7 +72,7 @@
   
       bb5: {
           _11 = move (_13.0: u64);
--         StorageDead(_12);
+          StorageDead(_12);
           _10 = opaque::<u64>(move _11) -> [return: bb6, unwind continue];
       }
   
@@ -132,8 +81,8 @@
           StorageDead(_10);
           StorageLive(_14);
           StorageLive(_15);
--         StorageLive(_16);
--         _16 = _1;
+          StorageLive(_16);
+          _16 = _1;
 -         _17 = CheckedMul(_16, const 1_u64);
 -         assert(!move (_17.1: bool), "attempt to compute `{} * {}`, which would overflow", move _16, const 1_u64) -> [success: bb7, unwind continue];
 +         _17 = CheckedMul(_1, const 1_u64);
@@ -142,246 +91,13 @@
   
       bb7: {
           _15 = move (_17.0: u64);
--         StorageDead(_16);
+          StorageDead(_16);
           _14 = opaque::<u64>(move _15) -> [return: bb8, unwind continue];
       }
   
       bb8: {
           StorageDead(_15);
           StorageDead(_14);
-          StorageLive(_18);
-          StorageLive(_19);
--         StorageLive(_20);
--         _20 = _1;
-          _21 = Eq(const 0_u64, const 0_u64);
--         assert(!move _21, "attempt to divide `{}` by zero", _20) -> [success: bb9, unwind continue];
-+         assert(!_21, "attempt to divide `{}` by zero", _1) -> [success: bb9, unwind continue];
-      }
-  
-      bb9: {
--         _19 = Div(move _20, const 0_u64);
--         StorageDead(_20);
-+         _19 = Div(_1, const 0_u64);
-          _18 = opaque::<u64>(move _19) -> [return: bb10, unwind continue];
-      }
-  
-      bb10: {
-          StorageDead(_19);
-          StorageDead(_18);
-          StorageLive(_22);
-          StorageLive(_23);
--         StorageLive(_24);
--         _24 = _1;
-          _25 = Eq(const 1_u64, const 0_u64);
--         assert(!move _25, "attempt to divide `{}` by zero", _24) -> [success: bb11, unwind continue];
-+         assert(!_25, "attempt to divide `{}` by zero", _1) -> [success: bb11, unwind continue];
-      }
-  
-      bb11: {
--         _23 = Div(move _24, const 1_u64);
--         StorageDead(_24);
-+         _23 = Div(_1, const 1_u64);
-          _22 = opaque::<u64>(move _23) -> [return: bb12, unwind continue];
-      }
-  
-      bb12: {
-          StorageDead(_23);
-          StorageDead(_22);
-          StorageLive(_26);
-          StorageLive(_27);
--         StorageLive(_28);
--         _28 = _1;
--         _29 = Eq(_28, const 0_u64);
--         assert(!move _29, "attempt to divide `{}` by zero", const 0_u64) -> [success: bb13, unwind continue];
-+         _29 = Eq(_1, const 0_u64);
-+         assert(!_29, "attempt to divide `{}` by zero", const 0_u64) -> [success: bb13, unwind continue];
-      }
-  
-      bb13: {
--         _27 = Div(const 0_u64, move _28);
--         StorageDead(_28);
-+         _27 = Div(const 0_u64, _1);
-          _26 = opaque::<u64>(move _27) -> [return: bb14, unwind continue];
-      }
-  
-      bb14: {
-          StorageDead(_27);
-          StorageDead(_26);
-          StorageLive(_30);
-          StorageLive(_31);
--         StorageLive(_32);
--         _32 = _1;
--         _33 = Eq(_32, const 0_u64);
--         assert(!move _33, "attempt to divide `{}` by zero", const 1_u64) -> [success: bb15, unwind continue];
-+         assert(!_29, "attempt to divide `{}` by zero", const 1_u64) -> [success: bb15, unwind continue];
-      }
-  
-      bb15: {
--         _31 = Div(const 1_u64, move _32);
--         StorageDead(_32);
-+         _31 = Div(const 1_u64, _1);
-          _30 = opaque::<u64>(move _31) -> [return: bb16, unwind continue];
-      }
-  
-      bb16: {
-          StorageDead(_31);
-          StorageDead(_30);
-          StorageLive(_34);
-          StorageLive(_35);
--         StorageLive(_36);
--         _36 = _1;
--         _37 = Eq(const 0_u64, const 0_u64);
--         assert(!move _37, "attempt to calculate the remainder of `{}` with a divisor of zero", _36) -> [success: bb17, unwind continue];
-+         assert(!_21, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb17, unwind continue];
-      }
-  
-      bb17: {
--         _35 = Rem(move _36, const 0_u64);
--         StorageDead(_36);
-+         _35 = Rem(_1, const 0_u64);
-          _34 = opaque::<u64>(move _35) -> [return: bb18, unwind continue];
-      }
-  
-      bb18: {
-          StorageDead(_35);
-          StorageDead(_34);
-          StorageLive(_38);
-          StorageLive(_39);
--         StorageLive(_40);
--         _40 = _1;
--         _41 = Eq(const 1_u64, const 0_u64);
--         assert(!move _41, "attempt to calculate the remainder of `{}` with a divisor of zero", _40) -> [success: bb19, unwind continue];
-+         assert(!_25, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb19, unwind continue];
-      }
-  
-      bb19: {
--         _39 = Rem(move _40, const 1_u64);
--         StorageDead(_40);
-+         _39 = Rem(_1, const 1_u64);
-          _38 = opaque::<u64>(move _39) -> [return: bb20, unwind continue];
-      }
-  
-      bb20: {
-          StorageDead(_39);
-          StorageDead(_38);
-          StorageLive(_42);
-          StorageLive(_43);
--         StorageLive(_44);
--         _44 = _1;
--         _45 = Eq(_44, const 0_u64);
--         assert(!move _45, "attempt to calculate the remainder of `{}` with a divisor of zero", const 0_u64) -> [success: bb21, unwind continue];
-+         assert(!_29, "attempt to calculate the remainder of `{}` with a divisor of zero", const 0_u64) -> [success: bb21, unwind continue];
-      }
-  
-      bb21: {
--         _43 = Rem(const 0_u64, move _44);
--         StorageDead(_44);
-+         _43 = Rem(const 0_u64, _1);
-          _42 = opaque::<u64>(move _43) -> [return: bb22, unwind continue];
-      }
-  
-      bb22: {
-          StorageDead(_43);
-          StorageDead(_42);
-          StorageLive(_46);
-          StorageLive(_47);
--         StorageLive(_48);
--         _48 = _1;
--         _49 = Eq(_48, const 0_u64);
--         assert(!move _49, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_u64) -> [success: bb23, unwind continue];
-+         assert(!_29, "attempt to calculate the remainder of `{}` with a divisor of zero", const 1_u64) -> [success: bb23, unwind continue];
-      }
-  
-      bb23: {
--         _47 = Rem(const 1_u64, move _48);
--         StorageDead(_48);
-+         _47 = Rem(const 1_u64, _1);
-          _46 = opaque::<u64>(move _47) -> [return: bb24, unwind continue];
-      }
-  
-      bb24: {
-          StorageDead(_47);
-          StorageDead(_46);
-          StorageLive(_50);
-          StorageLive(_51);
--         StorageLive(_52);
--         _52 = _1;
--         _51 = BitAnd(move _52, const 0_u64);
--         StorageDead(_52);
-+         _51 = BitAnd(_1, const 0_u64);
-          _50 = opaque::<u64>(move _51) -> [return: bb25, unwind continue];
-      }
-  
-      bb25: {
-          StorageDead(_51);
-          StorageDead(_50);
-          StorageLive(_53);
-          StorageLive(_54);
--         StorageLive(_55);
--         _55 = _1;
--         _54 = BitOr(move _55, const 0_u64);
--         StorageDead(_55);
-+         _54 = BitOr(_1, const 0_u64);
-          _53 = opaque::<u64>(move _54) -> [return: bb26, unwind continue];
-      }
-  
-      bb26: {
-          StorageDead(_54);
-          StorageDead(_53);
-          StorageLive(_56);
-          StorageLive(_57);
--         StorageLive(_58);
--         _58 = _1;
--         _57 = BitXor(move _58, const 0_u64);
--         StorageDead(_58);
-+         _57 = BitXor(_1, const 0_u64);
-          _56 = opaque::<u64>(move _57) -> [return: bb27, unwind continue];
-      }
-  
-      bb27: {
-          StorageDead(_57);
-          StorageDead(_56);
-          StorageLive(_59);
-          StorageLive(_60);
--         StorageLive(_61);
--         _61 = _1;
-          _62 = const 0_i32 as u32 (IntToInt);
--         _63 = Lt(move _62, const 64_u32);
--         assert(move _63, "attempt to shift right by `{}`, which would overflow", const 0_i32) -> [success: bb28, unwind continue];
-+         _63 = Lt(_62, const 64_u32);
-+         assert(_63, "attempt to shift right by `{}`, which would overflow", const 0_i32) -> [success: bb28, unwind continue];
-      }
-  
-      bb28: {
--         _60 = Shr(move _61, const 0_i32);
--         StorageDead(_61);
-+         _60 = Shr(_1, const 0_i32);
-          _59 = opaque::<u64>(move _60) -> [return: bb29, unwind continue];
-      }
-  
-      bb29: {
-          StorageDead(_60);
-          StorageDead(_59);
-          StorageLive(_64);
-          StorageLive(_65);
--         StorageLive(_66);
--         _66 = _1;
--         _67 = const 0_i32 as u32 (IntToInt);
--         _68 = Lt(move _67, const 64_u32);
--         assert(move _68, "attempt to shift left by `{}`, which would overflow", const 0_i32) -> [success: bb30, unwind continue];
-+         assert(_63, "attempt to shift left by `{}`, which would overflow", const 0_i32) -> [success: bb30, unwind continue];
-      }
-  
-      bb30: {
--         _65 = Shl(move _66, const 0_i32);
--         StorageDead(_66);
-+         _65 = Shl(_1, const 0_i32);
-          _64 = opaque::<u64>(move _65) -> [return: bb31, unwind continue];
-      }
-  
-      bb31: {
-          StorageDead(_65);
-          StorageDead(_64);
           _0 = const ();
           return;
       }
diff --git a/tests/mir-opt/gvn.arithmetic_float.GVN.panic-abort.diff b/tests/mir-opt/gvn.arithmetic_float.GVN.panic-abort.diff
index 7d5ac8353fe..b332100eaf0 100644
--- a/tests/mir-opt/gvn.arithmetic_float.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.arithmetic_float.GVN.panic-abort.diff
@@ -37,11 +37,11 @@
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
--         StorageLive(_4);
--         _4 = _1;
+          StorageLive(_4);
+          _4 = _1;
 -         _3 = Add(move _4, const 0f64);
--         StorageDead(_4);
 +         _3 = Add(_1, const 0f64);
+          StorageDead(_4);
           _2 = opaque::<f64>(move _3) -> [return: bb1, unwind unreachable];
       }
   
@@ -50,11 +50,11 @@
           StorageDead(_2);
           StorageLive(_5);
           StorageLive(_6);
--         StorageLive(_7);
--         _7 = _1;
+          StorageLive(_7);
+          _7 = _1;
 -         _6 = Sub(move _7, const 0f64);
--         StorageDead(_7);
 +         _6 = Sub(_1, const 0f64);
+          StorageDead(_7);
           _5 = opaque::<f64>(move _6) -> [return: bb2, unwind unreachable];
       }
   
@@ -63,11 +63,11 @@
           StorageDead(_5);
           StorageLive(_8);
           StorageLive(_9);
--         StorageLive(_10);
--         _10 = _1;
+          StorageLive(_10);
+          _10 = _1;
 -         _9 = Mul(move _10, const 0f64);
--         StorageDead(_10);
 +         _9 = Mul(_1, const 0f64);
+          StorageDead(_10);
           _8 = opaque::<f64>(move _9) -> [return: bb3, unwind unreachable];
       }
   
@@ -76,11 +76,11 @@
           StorageDead(_8);
           StorageLive(_11);
           StorageLive(_12);
--         StorageLive(_13);
--         _13 = _1;
+          StorageLive(_13);
+          _13 = _1;
 -         _12 = Div(move _13, const 0f64);
--         StorageDead(_13);
 +         _12 = Div(_1, const 0f64);
+          StorageDead(_13);
           _11 = opaque::<f64>(move _12) -> [return: bb4, unwind unreachable];
       }
   
@@ -89,11 +89,11 @@
           StorageDead(_11);
           StorageLive(_14);
           StorageLive(_15);
--         StorageLive(_16);
--         _16 = _1;
+          StorageLive(_16);
+          _16 = _1;
 -         _15 = Div(const 0f64, move _16);
--         StorageDead(_16);
 +         _15 = Div(const 0f64, _1);
+          StorageDead(_16);
           _14 = opaque::<f64>(move _15) -> [return: bb5, unwind unreachable];
       }
   
@@ -102,11 +102,11 @@
           StorageDead(_14);
           StorageLive(_17);
           StorageLive(_18);
--         StorageLive(_19);
--         _19 = _1;
+          StorageLive(_19);
+          _19 = _1;
 -         _18 = Rem(move _19, const 0f64);
--         StorageDead(_19);
 +         _18 = Rem(_1, const 0f64);
+          StorageDead(_19);
           _17 = opaque::<f64>(move _18) -> [return: bb6, unwind unreachable];
       }
   
@@ -115,11 +115,11 @@
           StorageDead(_17);
           StorageLive(_20);
           StorageLive(_21);
--         StorageLive(_22);
--         _22 = _1;
+          StorageLive(_22);
+          _22 = _1;
 -         _21 = Rem(const 0f64, move _22);
--         StorageDead(_22);
 +         _21 = Rem(const 0f64, _1);
+          StorageDead(_22);
           _20 = opaque::<f64>(move _21) -> [return: bb7, unwind unreachable];
       }
   
@@ -128,14 +128,14 @@
           StorageDead(_20);
           StorageLive(_23);
           StorageLive(_24);
--         StorageLive(_25);
--         _25 = _1;
--         StorageLive(_26);
--         _26 = _1;
+          StorageLive(_25);
+          _25 = _1;
+          StorageLive(_26);
+          _26 = _1;
 -         _24 = Eq(move _25, move _26);
--         StorageDead(_26);
--         StorageDead(_25);
 +         _24 = Eq(_1, _1);
+          StorageDead(_26);
+          StorageDead(_25);
           _23 = opaque::<bool>(move _24) -> [return: bb8, unwind unreachable];
       }
   
@@ -144,14 +144,14 @@
           StorageDead(_23);
           StorageLive(_27);
           StorageLive(_28);
--         StorageLive(_29);
--         _29 = _1;
--         StorageLive(_30);
--         _30 = _1;
+          StorageLive(_29);
+          _29 = _1;
+          StorageLive(_30);
+          _30 = _1;
 -         _28 = Ne(move _29, move _30);
--         StorageDead(_30);
--         StorageDead(_29);
 +         _28 = Ne(_1, _1);
+          StorageDead(_30);
+          StorageDead(_29);
           _27 = opaque::<bool>(move _28) -> [return: bb9, unwind unreachable];
       }
   
diff --git a/tests/mir-opt/gvn.arithmetic_float.GVN.panic-unwind.diff b/tests/mir-opt/gvn.arithmetic_float.GVN.panic-unwind.diff
index 36c26dc6605..28664cb0ac8 100644
--- a/tests/mir-opt/gvn.arithmetic_float.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.arithmetic_float.GVN.panic-unwind.diff
@@ -37,11 +37,11 @@
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
--         StorageLive(_4);
--         _4 = _1;
+          StorageLive(_4);
+          _4 = _1;
 -         _3 = Add(move _4, const 0f64);
--         StorageDead(_4);
 +         _3 = Add(_1, const 0f64);
+          StorageDead(_4);
           _2 = opaque::<f64>(move _3) -> [return: bb1, unwind continue];
       }
   
@@ -50,11 +50,11 @@
           StorageDead(_2);
           StorageLive(_5);
           StorageLive(_6);
--         StorageLive(_7);
--         _7 = _1;
+          StorageLive(_7);
+          _7 = _1;
 -         _6 = Sub(move _7, const 0f64);
--         StorageDead(_7);
 +         _6 = Sub(_1, const 0f64);
+          StorageDead(_7);
           _5 = opaque::<f64>(move _6) -> [return: bb2, unwind continue];
       }
   
@@ -63,11 +63,11 @@
           StorageDead(_5);
           StorageLive(_8);
           StorageLive(_9);
--         StorageLive(_10);
--         _10 = _1;
+          StorageLive(_10);
+          _10 = _1;
 -         _9 = Mul(move _10, const 0f64);
--         StorageDead(_10);
 +         _9 = Mul(_1, const 0f64);
+          StorageDead(_10);
           _8 = opaque::<f64>(move _9) -> [return: bb3, unwind continue];
       }
   
@@ -76,11 +76,11 @@
           StorageDead(_8);
           StorageLive(_11);
           StorageLive(_12);
--         StorageLive(_13);
--         _13 = _1;
+          StorageLive(_13);
+          _13 = _1;
 -         _12 = Div(move _13, const 0f64);
--         StorageDead(_13);
 +         _12 = Div(_1, const 0f64);
+          StorageDead(_13);
           _11 = opaque::<f64>(move _12) -> [return: bb4, unwind continue];
       }
   
@@ -89,11 +89,11 @@
           StorageDead(_11);
           StorageLive(_14);
           StorageLive(_15);
--         StorageLive(_16);
--         _16 = _1;
+          StorageLive(_16);
+          _16 = _1;
 -         _15 = Div(const 0f64, move _16);
--         StorageDead(_16);
 +         _15 = Div(const 0f64, _1);
+          StorageDead(_16);
           _14 = opaque::<f64>(move _15) -> [return: bb5, unwind continue];
       }
   
@@ -102,11 +102,11 @@
           StorageDead(_14);
           StorageLive(_17);
           StorageLive(_18);
--         StorageLive(_19);
--         _19 = _1;
+          StorageLive(_19);
+          _19 = _1;
 -         _18 = Rem(move _19, const 0f64);
--         StorageDead(_19);
 +         _18 = Rem(_1, const 0f64);
+          StorageDead(_19);
           _17 = opaque::<f64>(move _18) -> [return: bb6, unwind continue];
       }
   
@@ -115,11 +115,11 @@
           StorageDead(_17);
           StorageLive(_20);
           StorageLive(_21);
--         StorageLive(_22);
--         _22 = _1;
+          StorageLive(_22);
+          _22 = _1;
 -         _21 = Rem(const 0f64, move _22);
--         StorageDead(_22);
 +         _21 = Rem(const 0f64, _1);
+          StorageDead(_22);
           _20 = opaque::<f64>(move _21) -> [return: bb7, unwind continue];
       }
   
@@ -128,14 +128,14 @@
           StorageDead(_20);
           StorageLive(_23);
           StorageLive(_24);
--         StorageLive(_25);
--         _25 = _1;
--         StorageLive(_26);
--         _26 = _1;
+          StorageLive(_25);
+          _25 = _1;
+          StorageLive(_26);
+          _26 = _1;
 -         _24 = Eq(move _25, move _26);
--         StorageDead(_26);
--         StorageDead(_25);
 +         _24 = Eq(_1, _1);
+          StorageDead(_26);
+          StorageDead(_25);
           _23 = opaque::<bool>(move _24) -> [return: bb8, unwind continue];
       }
   
@@ -144,14 +144,14 @@
           StorageDead(_23);
           StorageLive(_27);
           StorageLive(_28);
--         StorageLive(_29);
--         _29 = _1;
--         StorageLive(_30);
--         _30 = _1;
+          StorageLive(_29);
+          _29 = _1;
+          StorageLive(_30);
+          _30 = _1;
 -         _28 = Ne(move _29, move _30);
--         StorageDead(_30);
--         StorageDead(_29);
 +         _28 = Ne(_1, _1);
+          StorageDead(_30);
+          StorageDead(_29);
           _27 = opaque::<bool>(move _28) -> [return: bb9, unwind continue];
       }
   
diff --git a/tests/mir-opt/gvn.cast.GVN.panic-abort.diff b/tests/mir-opt/gvn.cast.GVN.panic-abort.diff
index 513fe60b65d..d43198c9911 100644
--- a/tests/mir-opt/gvn.cast.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.cast.GVN.panic-abort.diff
@@ -105,19 +105,24 @@
   
       bb0: {
 -         StorageLive(_1);
++         nop;
           _1 = const 1_i64;
 -         StorageLive(_2);
++         nop;
           _2 = const 1_u64;
 -         StorageLive(_3);
++         nop;
           _3 = const 1f64;
           StorageLive(_4);
           StorageLive(_5);
--         StorageLive(_6);
+          StorageLive(_6);
 -         _6 = _1;
 -         _5 = move _6 as u8 (IntToInt);
--         StorageDead(_6);
-+         _5 = const 1_i64 as u8 (IntToInt);
-          _4 = opaque::<u8>(move _5) -> [return: bb1, unwind unreachable];
++         _6 = const 1_i64;
++         _5 = const 1_u8;
+          StorageDead(_6);
+-         _4 = opaque::<u8>(move _5) -> [return: bb1, unwind unreachable];
++         _4 = opaque::<u8>(const 1_u8) -> [return: bb1, unwind unreachable];
       }
   
       bb1: {
@@ -125,12 +130,14 @@
           StorageDead(_4);
           StorageLive(_7);
           StorageLive(_8);
--         StorageLive(_9);
+          StorageLive(_9);
 -         _9 = _1;
 -         _8 = move _9 as u16 (IntToInt);
--         StorageDead(_9);
-+         _8 = const 1_i64 as u16 (IntToInt);
-          _7 = opaque::<u16>(move _8) -> [return: bb2, unwind unreachable];
++         _9 = const 1_i64;
++         _8 = const 1_u16;
+          StorageDead(_9);
+-         _7 = opaque::<u16>(move _8) -> [return: bb2, unwind unreachable];
++         _7 = opaque::<u16>(const 1_u16) -> [return: bb2, unwind unreachable];
       }
   
       bb2: {
@@ -138,12 +145,14 @@
           StorageDead(_7);
           StorageLive(_10);
           StorageLive(_11);
--         StorageLive(_12);
+          StorageLive(_12);
 -         _12 = _1;
 -         _11 = move _12 as u32 (IntToInt);
--         StorageDead(_12);
-+         _11 = const 1_i64 as u32 (IntToInt);
-          _10 = opaque::<u32>(move _11) -> [return: bb3, unwind unreachable];
++         _12 = const 1_i64;
++         _11 = const 1_u32;
+          StorageDead(_12);
+-         _10 = opaque::<u32>(move _11) -> [return: bb3, unwind unreachable];
++         _10 = opaque::<u32>(const 1_u32) -> [return: bb3, unwind unreachable];
       }
   
       bb3: {
@@ -151,12 +160,14 @@
           StorageDead(_10);
           StorageLive(_13);
           StorageLive(_14);
--         StorageLive(_15);
+          StorageLive(_15);
 -         _15 = _1;
 -         _14 = move _15 as u64 (IntToInt);
--         StorageDead(_15);
-+         _14 = const 1_i64 as u64 (IntToInt);
-          _13 = opaque::<u64>(move _14) -> [return: bb4, unwind unreachable];
++         _15 = const 1_i64;
++         _14 = const 1_u64;
+          StorageDead(_15);
+-         _13 = opaque::<u64>(move _14) -> [return: bb4, unwind unreachable];
++         _13 = opaque::<u64>(const 1_u64) -> [return: bb4, unwind unreachable];
       }
   
       bb4: {
@@ -164,12 +175,14 @@
           StorageDead(_13);
           StorageLive(_16);
           StorageLive(_17);
--         StorageLive(_18);
+          StorageLive(_18);
 -         _18 = _1;
 -         _17 = move _18 as i8 (IntToInt);
--         StorageDead(_18);
-+         _17 = const 1_i64 as i8 (IntToInt);
-          _16 = opaque::<i8>(move _17) -> [return: bb5, unwind unreachable];
++         _18 = const 1_i64;
++         _17 = const 1_i8;
+          StorageDead(_18);
+-         _16 = opaque::<i8>(move _17) -> [return: bb5, unwind unreachable];
++         _16 = opaque::<i8>(const 1_i8) -> [return: bb5, unwind unreachable];
       }
   
       bb5: {
@@ -177,12 +190,14 @@
           StorageDead(_16);
           StorageLive(_19);
           StorageLive(_20);
--         StorageLive(_21);
+          StorageLive(_21);
 -         _21 = _1;
 -         _20 = move _21 as i16 (IntToInt);
--         StorageDead(_21);
-+         _20 = const 1_i64 as i16 (IntToInt);
-          _19 = opaque::<i16>(move _20) -> [return: bb6, unwind unreachable];
++         _21 = const 1_i64;
++         _20 = const 1_i16;
+          StorageDead(_21);
+-         _19 = opaque::<i16>(move _20) -> [return: bb6, unwind unreachable];
++         _19 = opaque::<i16>(const 1_i16) -> [return: bb6, unwind unreachable];
       }
   
       bb6: {
@@ -190,35 +205,40 @@
           StorageDead(_19);
           StorageLive(_22);
           StorageLive(_23);
--         StorageLive(_24);
+          StorageLive(_24);
 -         _24 = _1;
 -         _23 = move _24 as i32 (IntToInt);
--         StorageDead(_24);
-+         _23 = const 1_i64 as i32 (IntToInt);
-          _22 = opaque::<i32>(move _23) -> [return: bb7, unwind unreachable];
++         _24 = const 1_i64;
++         _23 = const 1_i32;
+          StorageDead(_24);
+-         _22 = opaque::<i32>(move _23) -> [return: bb7, unwind unreachable];
++         _22 = opaque::<i32>(const 1_i32) -> [return: bb7, unwind unreachable];
       }
   
       bb7: {
           StorageDead(_23);
           StorageDead(_22);
           StorageLive(_25);
--         StorageLive(_26);
+          StorageLive(_26);
 -         _26 = _1;
 -         _25 = opaque::<i64>(move _26) -> [return: bb8, unwind unreachable];
++         _26 = const 1_i64;
 +         _25 = opaque::<i64>(const 1_i64) -> [return: bb8, unwind unreachable];
       }
   
       bb8: {
--         StorageDead(_26);
+          StorageDead(_26);
           StorageDead(_25);
           StorageLive(_27);
           StorageLive(_28);
--         StorageLive(_29);
+          StorageLive(_29);
 -         _29 = _1;
 -         _28 = move _29 as f32 (IntToFloat);
--         StorageDead(_29);
-+         _28 = const 1_i64 as f32 (IntToFloat);
-          _27 = opaque::<f32>(move _28) -> [return: bb9, unwind unreachable];
++         _29 = const 1_i64;
++         _28 = const 1f32;
+          StorageDead(_29);
+-         _27 = opaque::<f32>(move _28) -> [return: bb9, unwind unreachable];
++         _27 = opaque::<f32>(const 1f32) -> [return: bb9, unwind unreachable];
       }
   
       bb9: {
@@ -226,12 +246,14 @@
           StorageDead(_27);
           StorageLive(_30);
           StorageLive(_31);
--         StorageLive(_32);
+          StorageLive(_32);
 -         _32 = _1;
 -         _31 = move _32 as f64 (IntToFloat);
--         StorageDead(_32);
-+         _31 = const 1_i64 as f64 (IntToFloat);
-          _30 = opaque::<f64>(move _31) -> [return: bb10, unwind unreachable];
++         _32 = const 1_i64;
++         _31 = const 1f64;
+          StorageDead(_32);
+-         _30 = opaque::<f64>(move _31) -> [return: bb10, unwind unreachable];
++         _30 = opaque::<f64>(const 1f64) -> [return: bb10, unwind unreachable];
       }
   
       bb10: {
@@ -239,12 +261,14 @@
           StorageDead(_30);
           StorageLive(_33);
           StorageLive(_34);
--         StorageLive(_35);
+          StorageLive(_35);
 -         _35 = _2;
 -         _34 = move _35 as u8 (IntToInt);
--         StorageDead(_35);
-+         _34 = const 1_u64 as u8 (IntToInt);
-          _33 = opaque::<u8>(move _34) -> [return: bb11, unwind unreachable];
++         _35 = const 1_u64;
++         _34 = const 1_u8;
+          StorageDead(_35);
+-         _33 = opaque::<u8>(move _34) -> [return: bb11, unwind unreachable];
++         _33 = opaque::<u8>(const 1_u8) -> [return: bb11, unwind unreachable];
       }
   
       bb11: {
@@ -252,12 +276,14 @@
           StorageDead(_33);
           StorageLive(_36);
           StorageLive(_37);
--         StorageLive(_38);
+          StorageLive(_38);
 -         _38 = _2;
 -         _37 = move _38 as u16 (IntToInt);
--         StorageDead(_38);
-+         _37 = const 1_u64 as u16 (IntToInt);
-          _36 = opaque::<u16>(move _37) -> [return: bb12, unwind unreachable];
++         _38 = const 1_u64;
++         _37 = const 1_u16;
+          StorageDead(_38);
+-         _36 = opaque::<u16>(move _37) -> [return: bb12, unwind unreachable];
++         _36 = opaque::<u16>(const 1_u16) -> [return: bb12, unwind unreachable];
       }
   
       bb12: {
@@ -265,35 +291,40 @@
           StorageDead(_36);
           StorageLive(_39);
           StorageLive(_40);
--         StorageLive(_41);
+          StorageLive(_41);
 -         _41 = _2;
 -         _40 = move _41 as u32 (IntToInt);
--         StorageDead(_41);
-+         _40 = const 1_u64 as u32 (IntToInt);
-          _39 = opaque::<u32>(move _40) -> [return: bb13, unwind unreachable];
++         _41 = const 1_u64;
++         _40 = const 1_u32;
+          StorageDead(_41);
+-         _39 = opaque::<u32>(move _40) -> [return: bb13, unwind unreachable];
++         _39 = opaque::<u32>(const 1_u32) -> [return: bb13, unwind unreachable];
       }
   
       bb13: {
           StorageDead(_40);
           StorageDead(_39);
           StorageLive(_42);
--         StorageLive(_43);
+          StorageLive(_43);
 -         _43 = _2;
 -         _42 = opaque::<u64>(move _43) -> [return: bb14, unwind unreachable];
++         _43 = const 1_u64;
 +         _42 = opaque::<u64>(const 1_u64) -> [return: bb14, unwind unreachable];
       }
   
       bb14: {
--         StorageDead(_43);
+          StorageDead(_43);
           StorageDead(_42);
           StorageLive(_44);
           StorageLive(_45);
--         StorageLive(_46);
+          StorageLive(_46);
 -         _46 = _2;
 -         _45 = move _46 as i8 (IntToInt);
--         StorageDead(_46);
-+         _45 = const 1_u64 as i8 (IntToInt);
-          _44 = opaque::<i8>(move _45) -> [return: bb15, unwind unreachable];
++         _46 = const 1_u64;
++         _45 = const 1_i8;
+          StorageDead(_46);
+-         _44 = opaque::<i8>(move _45) -> [return: bb15, unwind unreachable];
++         _44 = opaque::<i8>(const 1_i8) -> [return: bb15, unwind unreachable];
       }
   
       bb15: {
@@ -301,12 +332,14 @@
           StorageDead(_44);
           StorageLive(_47);
           StorageLive(_48);
--         StorageLive(_49);
+          StorageLive(_49);
 -         _49 = _2;
 -         _48 = move _49 as i16 (IntToInt);
--         StorageDead(_49);
-+         _48 = const 1_u64 as i16 (IntToInt);
-          _47 = opaque::<i16>(move _48) -> [return: bb16, unwind unreachable];
++         _49 = const 1_u64;
++         _48 = const 1_i16;
+          StorageDead(_49);
+-         _47 = opaque::<i16>(move _48) -> [return: bb16, unwind unreachable];
++         _47 = opaque::<i16>(const 1_i16) -> [return: bb16, unwind unreachable];
       }
   
       bb16: {
@@ -314,12 +347,14 @@
           StorageDead(_47);
           StorageLive(_50);
           StorageLive(_51);
--         StorageLive(_52);
+          StorageLive(_52);
 -         _52 = _2;
 -         _51 = move _52 as i32 (IntToInt);
--         StorageDead(_52);
-+         _51 = const 1_u64 as i32 (IntToInt);
-          _50 = opaque::<i32>(move _51) -> [return: bb17, unwind unreachable];
++         _52 = const 1_u64;
++         _51 = const 1_i32;
+          StorageDead(_52);
+-         _50 = opaque::<i32>(move _51) -> [return: bb17, unwind unreachable];
++         _50 = opaque::<i32>(const 1_i32) -> [return: bb17, unwind unreachable];
       }
   
       bb17: {
@@ -327,12 +362,14 @@
           StorageDead(_50);
           StorageLive(_53);
           StorageLive(_54);
--         StorageLive(_55);
+          StorageLive(_55);
 -         _55 = _2;
 -         _54 = move _55 as i64 (IntToInt);
--         StorageDead(_55);
-+         _54 = const 1_u64 as i64 (IntToInt);
-          _53 = opaque::<i64>(move _54) -> [return: bb18, unwind unreachable];
++         _55 = const 1_u64;
++         _54 = const 1_i64;
+          StorageDead(_55);
+-         _53 = opaque::<i64>(move _54) -> [return: bb18, unwind unreachable];
++         _53 = opaque::<i64>(const 1_i64) -> [return: bb18, unwind unreachable];
       }
   
       bb18: {
@@ -340,12 +377,14 @@
           StorageDead(_53);
           StorageLive(_56);
           StorageLive(_57);
--         StorageLive(_58);
+          StorageLive(_58);
 -         _58 = _2;
 -         _57 = move _58 as f32 (IntToFloat);
--         StorageDead(_58);
-+         _57 = const 1_u64 as f32 (IntToFloat);
-          _56 = opaque::<f32>(move _57) -> [return: bb19, unwind unreachable];
++         _58 = const 1_u64;
++         _57 = const 1f32;
+          StorageDead(_58);
+-         _56 = opaque::<f32>(move _57) -> [return: bb19, unwind unreachable];
++         _56 = opaque::<f32>(const 1f32) -> [return: bb19, unwind unreachable];
       }
   
       bb19: {
@@ -353,12 +392,14 @@
           StorageDead(_56);
           StorageLive(_59);
           StorageLive(_60);
--         StorageLive(_61);
+          StorageLive(_61);
 -         _61 = _2;
 -         _60 = move _61 as f64 (IntToFloat);
--         StorageDead(_61);
-+         _60 = const 1_u64 as f64 (IntToFloat);
-          _59 = opaque::<f64>(move _60) -> [return: bb20, unwind unreachable];
++         _61 = const 1_u64;
++         _60 = const 1f64;
+          StorageDead(_61);
+-         _59 = opaque::<f64>(move _60) -> [return: bb20, unwind unreachable];
++         _59 = opaque::<f64>(const 1f64) -> [return: bb20, unwind unreachable];
       }
   
       bb20: {
@@ -366,12 +407,14 @@
           StorageDead(_59);
           StorageLive(_62);
           StorageLive(_63);
--         StorageLive(_64);
+          StorageLive(_64);
 -         _64 = _3;
 -         _63 = move _64 as u8 (FloatToInt);
--         StorageDead(_64);
-+         _63 = const 1f64 as u8 (FloatToInt);
-          _62 = opaque::<u8>(move _63) -> [return: bb21, unwind unreachable];
++         _64 = const 1f64;
++         _63 = const 1_u8;
+          StorageDead(_64);
+-         _62 = opaque::<u8>(move _63) -> [return: bb21, unwind unreachable];
++         _62 = opaque::<u8>(const 1_u8) -> [return: bb21, unwind unreachable];
       }
   
       bb21: {
@@ -379,12 +422,14 @@
           StorageDead(_62);
           StorageLive(_65);
           StorageLive(_66);
--         StorageLive(_67);
+          StorageLive(_67);
 -         _67 = _3;
 -         _66 = move _67 as u16 (FloatToInt);
--         StorageDead(_67);
-+         _66 = const 1f64 as u16 (FloatToInt);
-          _65 = opaque::<u16>(move _66) -> [return: bb22, unwind unreachable];
++         _67 = const 1f64;
++         _66 = const 1_u16;
+          StorageDead(_67);
+-         _65 = opaque::<u16>(move _66) -> [return: bb22, unwind unreachable];
++         _65 = opaque::<u16>(const 1_u16) -> [return: bb22, unwind unreachable];
       }
   
       bb22: {
@@ -392,12 +437,14 @@
           StorageDead(_65);
           StorageLive(_68);
           StorageLive(_69);
--         StorageLive(_70);
+          StorageLive(_70);
 -         _70 = _3;
 -         _69 = move _70 as u32 (FloatToInt);
--         StorageDead(_70);
-+         _69 = const 1f64 as u32 (FloatToInt);
-          _68 = opaque::<u32>(move _69) -> [return: bb23, unwind unreachable];
++         _70 = const 1f64;
++         _69 = const 1_u32;
+          StorageDead(_70);
+-         _68 = opaque::<u32>(move _69) -> [return: bb23, unwind unreachable];
++         _68 = opaque::<u32>(const 1_u32) -> [return: bb23, unwind unreachable];
       }
   
       bb23: {
@@ -405,12 +452,14 @@
           StorageDead(_68);
           StorageLive(_71);
           StorageLive(_72);
--         StorageLive(_73);
+          StorageLive(_73);
 -         _73 = _3;
 -         _72 = move _73 as u64 (FloatToInt);
--         StorageDead(_73);
-+         _72 = const 1f64 as u64 (FloatToInt);
-          _71 = opaque::<u64>(move _72) -> [return: bb24, unwind unreachable];
++         _73 = const 1f64;
++         _72 = const 1_u64;
+          StorageDead(_73);
+-         _71 = opaque::<u64>(move _72) -> [return: bb24, unwind unreachable];
++         _71 = opaque::<u64>(const 1_u64) -> [return: bb24, unwind unreachable];
       }
   
       bb24: {
@@ -418,12 +467,14 @@
           StorageDead(_71);
           StorageLive(_74);
           StorageLive(_75);
--         StorageLive(_76);
+          StorageLive(_76);
 -         _76 = _3;
 -         _75 = move _76 as i8 (FloatToInt);
--         StorageDead(_76);
-+         _75 = const 1f64 as i8 (FloatToInt);
-          _74 = opaque::<i8>(move _75) -> [return: bb25, unwind unreachable];
++         _76 = const 1f64;
++         _75 = const 1_i8;
+          StorageDead(_76);
+-         _74 = opaque::<i8>(move _75) -> [return: bb25, unwind unreachable];
++         _74 = opaque::<i8>(const 1_i8) -> [return: bb25, unwind unreachable];
       }
   
       bb25: {
@@ -431,12 +482,14 @@
           StorageDead(_74);
           StorageLive(_77);
           StorageLive(_78);
--         StorageLive(_79);
+          StorageLive(_79);
 -         _79 = _3;
 -         _78 = move _79 as i16 (FloatToInt);
--         StorageDead(_79);
-+         _78 = const 1f64 as i16 (FloatToInt);
-          _77 = opaque::<i16>(move _78) -> [return: bb26, unwind unreachable];
++         _79 = const 1f64;
++         _78 = const 1_i16;
+          StorageDead(_79);
+-         _77 = opaque::<i16>(move _78) -> [return: bb26, unwind unreachable];
++         _77 = opaque::<i16>(const 1_i16) -> [return: bb26, unwind unreachable];
       }
   
       bb26: {
@@ -444,12 +497,14 @@
           StorageDead(_77);
           StorageLive(_80);
           StorageLive(_81);
--         StorageLive(_82);
+          StorageLive(_82);
 -         _82 = _3;
 -         _81 = move _82 as i32 (FloatToInt);
--         StorageDead(_82);
-+         _81 = const 1f64 as i32 (FloatToInt);
-          _80 = opaque::<i32>(move _81) -> [return: bb27, unwind unreachable];
++         _82 = const 1f64;
++         _81 = const 1_i32;
+          StorageDead(_82);
+-         _80 = opaque::<i32>(move _81) -> [return: bb27, unwind unreachable];
++         _80 = opaque::<i32>(const 1_i32) -> [return: bb27, unwind unreachable];
       }
   
       bb27: {
@@ -457,12 +512,14 @@
           StorageDead(_80);
           StorageLive(_83);
           StorageLive(_84);
--         StorageLive(_85);
+          StorageLive(_85);
 -         _85 = _3;
 -         _84 = move _85 as i64 (FloatToInt);
--         StorageDead(_85);
-+         _84 = const 1f64 as i64 (FloatToInt);
-          _83 = opaque::<i64>(move _84) -> [return: bb28, unwind unreachable];
++         _85 = const 1f64;
++         _84 = const 1_i64;
+          StorageDead(_85);
+-         _83 = opaque::<i64>(move _84) -> [return: bb28, unwind unreachable];
++         _83 = opaque::<i64>(const 1_i64) -> [return: bb28, unwind unreachable];
       }
   
       bb28: {
@@ -470,31 +527,37 @@
           StorageDead(_83);
           StorageLive(_86);
           StorageLive(_87);
--         StorageLive(_88);
+          StorageLive(_88);
 -         _88 = _3;
 -         _87 = move _88 as f32 (FloatToFloat);
--         StorageDead(_88);
-+         _87 = const 1f64 as f32 (FloatToFloat);
-          _86 = opaque::<f32>(move _87) -> [return: bb29, unwind unreachable];
++         _88 = const 1f64;
++         _87 = const 1f32;
+          StorageDead(_88);
+-         _86 = opaque::<f32>(move _87) -> [return: bb29, unwind unreachable];
++         _86 = opaque::<f32>(const 1f32) -> [return: bb29, unwind unreachable];
       }
   
       bb29: {
           StorageDead(_87);
           StorageDead(_86);
           StorageLive(_89);
--         StorageLive(_90);
+          StorageLive(_90);
 -         _90 = _3;
 -         _89 = opaque::<f64>(move _90) -> [return: bb30, unwind unreachable];
++         _90 = const 1f64;
 +         _89 = opaque::<f64>(const 1f64) -> [return: bb30, unwind unreachable];
       }
   
       bb30: {
--         StorageDead(_90);
+          StorageDead(_90);
           StorageDead(_89);
           _0 = const ();
 -         StorageDead(_3);
 -         StorageDead(_2);
 -         StorageDead(_1);
++         nop;
++         nop;
++         nop;
           return;
       }
   }
diff --git a/tests/mir-opt/gvn.cast.GVN.panic-unwind.diff b/tests/mir-opt/gvn.cast.GVN.panic-unwind.diff
index 33192ed8de0..08b97e13aa0 100644
--- a/tests/mir-opt/gvn.cast.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.cast.GVN.panic-unwind.diff
@@ -105,19 +105,24 @@
   
       bb0: {
 -         StorageLive(_1);
++         nop;
           _1 = const 1_i64;
 -         StorageLive(_2);
++         nop;
           _2 = const 1_u64;
 -         StorageLive(_3);
++         nop;
           _3 = const 1f64;
           StorageLive(_4);
           StorageLive(_5);
--         StorageLive(_6);
+          StorageLive(_6);
 -         _6 = _1;
 -         _5 = move _6 as u8 (IntToInt);
--         StorageDead(_6);
-+         _5 = const 1_i64 as u8 (IntToInt);
-          _4 = opaque::<u8>(move _5) -> [return: bb1, unwind continue];
++         _6 = const 1_i64;
++         _5 = const 1_u8;
+          StorageDead(_6);
+-         _4 = opaque::<u8>(move _5) -> [return: bb1, unwind continue];
++         _4 = opaque::<u8>(const 1_u8) -> [return: bb1, unwind continue];
       }
   
       bb1: {
@@ -125,12 +130,14 @@
           StorageDead(_4);
           StorageLive(_7);
           StorageLive(_8);
--         StorageLive(_9);
+          StorageLive(_9);
 -         _9 = _1;
 -         _8 = move _9 as u16 (IntToInt);
--         StorageDead(_9);
-+         _8 = const 1_i64 as u16 (IntToInt);
-          _7 = opaque::<u16>(move _8) -> [return: bb2, unwind continue];
++         _9 = const 1_i64;
++         _8 = const 1_u16;
+          StorageDead(_9);
+-         _7 = opaque::<u16>(move _8) -> [return: bb2, unwind continue];
++         _7 = opaque::<u16>(const 1_u16) -> [return: bb2, unwind continue];
       }
   
       bb2: {
@@ -138,12 +145,14 @@
           StorageDead(_7);
           StorageLive(_10);
           StorageLive(_11);
--         StorageLive(_12);
+          StorageLive(_12);
 -         _12 = _1;
 -         _11 = move _12 as u32 (IntToInt);
--         StorageDead(_12);
-+         _11 = const 1_i64 as u32 (IntToInt);
-          _10 = opaque::<u32>(move _11) -> [return: bb3, unwind continue];
++         _12 = const 1_i64;
++         _11 = const 1_u32;
+          StorageDead(_12);
+-         _10 = opaque::<u32>(move _11) -> [return: bb3, unwind continue];
++         _10 = opaque::<u32>(const 1_u32) -> [return: bb3, unwind continue];
       }
   
       bb3: {
@@ -151,12 +160,14 @@
           StorageDead(_10);
           StorageLive(_13);
           StorageLive(_14);
--         StorageLive(_15);
+          StorageLive(_15);
 -         _15 = _1;
 -         _14 = move _15 as u64 (IntToInt);
--         StorageDead(_15);
-+         _14 = const 1_i64 as u64 (IntToInt);
-          _13 = opaque::<u64>(move _14) -> [return: bb4, unwind continue];
++         _15 = const 1_i64;
++         _14 = const 1_u64;
+          StorageDead(_15);
+-         _13 = opaque::<u64>(move _14) -> [return: bb4, unwind continue];
++         _13 = opaque::<u64>(const 1_u64) -> [return: bb4, unwind continue];
       }
   
       bb4: {
@@ -164,12 +175,14 @@
           StorageDead(_13);
           StorageLive(_16);
           StorageLive(_17);
--         StorageLive(_18);
+          StorageLive(_18);
 -         _18 = _1;
 -         _17 = move _18 as i8 (IntToInt);
--         StorageDead(_18);
-+         _17 = const 1_i64 as i8 (IntToInt);
-          _16 = opaque::<i8>(move _17) -> [return: bb5, unwind continue];
++         _18 = const 1_i64;
++         _17 = const 1_i8;
+          StorageDead(_18);
+-         _16 = opaque::<i8>(move _17) -> [return: bb5, unwind continue];
++         _16 = opaque::<i8>(const 1_i8) -> [return: bb5, unwind continue];
       }
   
       bb5: {
@@ -177,12 +190,14 @@
           StorageDead(_16);
           StorageLive(_19);
           StorageLive(_20);
--         StorageLive(_21);
+          StorageLive(_21);
 -         _21 = _1;
 -         _20 = move _21 as i16 (IntToInt);
--         StorageDead(_21);
-+         _20 = const 1_i64 as i16 (IntToInt);
-          _19 = opaque::<i16>(move _20) -> [return: bb6, unwind continue];
++         _21 = const 1_i64;
++         _20 = const 1_i16;
+          StorageDead(_21);
+-         _19 = opaque::<i16>(move _20) -> [return: bb6, unwind continue];
++         _19 = opaque::<i16>(const 1_i16) -> [return: bb6, unwind continue];
       }
   
       bb6: {
@@ -190,35 +205,40 @@
           StorageDead(_19);
           StorageLive(_22);
           StorageLive(_23);
--         StorageLive(_24);
+          StorageLive(_24);
 -         _24 = _1;
 -         _23 = move _24 as i32 (IntToInt);
--         StorageDead(_24);
-+         _23 = const 1_i64 as i32 (IntToInt);
-          _22 = opaque::<i32>(move _23) -> [return: bb7, unwind continue];
++         _24 = const 1_i64;
++         _23 = const 1_i32;
+          StorageDead(_24);
+-         _22 = opaque::<i32>(move _23) -> [return: bb7, unwind continue];
++         _22 = opaque::<i32>(const 1_i32) -> [return: bb7, unwind continue];
       }
   
       bb7: {
           StorageDead(_23);
           StorageDead(_22);
           StorageLive(_25);
--         StorageLive(_26);
+          StorageLive(_26);
 -         _26 = _1;
 -         _25 = opaque::<i64>(move _26) -> [return: bb8, unwind continue];
++         _26 = const 1_i64;
 +         _25 = opaque::<i64>(const 1_i64) -> [return: bb8, unwind continue];
       }
   
       bb8: {
--         StorageDead(_26);
+          StorageDead(_26);
           StorageDead(_25);
           StorageLive(_27);
           StorageLive(_28);
--         StorageLive(_29);
+          StorageLive(_29);
 -         _29 = _1;
 -         _28 = move _29 as f32 (IntToFloat);
--         StorageDead(_29);
-+         _28 = const 1_i64 as f32 (IntToFloat);
-          _27 = opaque::<f32>(move _28) -> [return: bb9, unwind continue];
++         _29 = const 1_i64;
++         _28 = const 1f32;
+          StorageDead(_29);
+-         _27 = opaque::<f32>(move _28) -> [return: bb9, unwind continue];
++         _27 = opaque::<f32>(const 1f32) -> [return: bb9, unwind continue];
       }
   
       bb9: {
@@ -226,12 +246,14 @@
           StorageDead(_27);
           StorageLive(_30);
           StorageLive(_31);
--         StorageLive(_32);
+          StorageLive(_32);
 -         _32 = _1;
 -         _31 = move _32 as f64 (IntToFloat);
--         StorageDead(_32);
-+         _31 = const 1_i64 as f64 (IntToFloat);
-          _30 = opaque::<f64>(move _31) -> [return: bb10, unwind continue];
++         _32 = const 1_i64;
++         _31 = const 1f64;
+          StorageDead(_32);
+-         _30 = opaque::<f64>(move _31) -> [return: bb10, unwind continue];
++         _30 = opaque::<f64>(const 1f64) -> [return: bb10, unwind continue];
       }
   
       bb10: {
@@ -239,12 +261,14 @@
           StorageDead(_30);
           StorageLive(_33);
           StorageLive(_34);
--         StorageLive(_35);
+          StorageLive(_35);
 -         _35 = _2;
 -         _34 = move _35 as u8 (IntToInt);
--         StorageDead(_35);
-+         _34 = const 1_u64 as u8 (IntToInt);
-          _33 = opaque::<u8>(move _34) -> [return: bb11, unwind continue];
++         _35 = const 1_u64;
++         _34 = const 1_u8;
+          StorageDead(_35);
+-         _33 = opaque::<u8>(move _34) -> [return: bb11, unwind continue];
++         _33 = opaque::<u8>(const 1_u8) -> [return: bb11, unwind continue];
       }
   
       bb11: {
@@ -252,12 +276,14 @@
           StorageDead(_33);
           StorageLive(_36);
           StorageLive(_37);
--         StorageLive(_38);
+          StorageLive(_38);
 -         _38 = _2;
 -         _37 = move _38 as u16 (IntToInt);
--         StorageDead(_38);
-+         _37 = const 1_u64 as u16 (IntToInt);
-          _36 = opaque::<u16>(move _37) -> [return: bb12, unwind continue];
++         _38 = const 1_u64;
++         _37 = const 1_u16;
+          StorageDead(_38);
+-         _36 = opaque::<u16>(move _37) -> [return: bb12, unwind continue];
++         _36 = opaque::<u16>(const 1_u16) -> [return: bb12, unwind continue];
       }
   
       bb12: {
@@ -265,35 +291,40 @@
           StorageDead(_36);
           StorageLive(_39);
           StorageLive(_40);
--         StorageLive(_41);
+          StorageLive(_41);
 -         _41 = _2;
 -         _40 = move _41 as u32 (IntToInt);
--         StorageDead(_41);
-+         _40 = const 1_u64 as u32 (IntToInt);
-          _39 = opaque::<u32>(move _40) -> [return: bb13, unwind continue];
++         _41 = const 1_u64;
++         _40 = const 1_u32;
+          StorageDead(_41);
+-         _39 = opaque::<u32>(move _40) -> [return: bb13, unwind continue];
++         _39 = opaque::<u32>(const 1_u32) -> [return: bb13, unwind continue];
       }
   
       bb13: {
           StorageDead(_40);
           StorageDead(_39);
           StorageLive(_42);
--         StorageLive(_43);
+          StorageLive(_43);
 -         _43 = _2;
 -         _42 = opaque::<u64>(move _43) -> [return: bb14, unwind continue];
++         _43 = const 1_u64;
 +         _42 = opaque::<u64>(const 1_u64) -> [return: bb14, unwind continue];
       }
   
       bb14: {
--         StorageDead(_43);
+          StorageDead(_43);
           StorageDead(_42);
           StorageLive(_44);
           StorageLive(_45);
--         StorageLive(_46);
+          StorageLive(_46);
 -         _46 = _2;
 -         _45 = move _46 as i8 (IntToInt);
--         StorageDead(_46);
-+         _45 = const 1_u64 as i8 (IntToInt);
-          _44 = opaque::<i8>(move _45) -> [return: bb15, unwind continue];
++         _46 = const 1_u64;
++         _45 = const 1_i8;
+          StorageDead(_46);
+-         _44 = opaque::<i8>(move _45) -> [return: bb15, unwind continue];
++         _44 = opaque::<i8>(const 1_i8) -> [return: bb15, unwind continue];
       }
   
       bb15: {
@@ -301,12 +332,14 @@
           StorageDead(_44);
           StorageLive(_47);
           StorageLive(_48);
--         StorageLive(_49);
+          StorageLive(_49);
 -         _49 = _2;
 -         _48 = move _49 as i16 (IntToInt);
--         StorageDead(_49);
-+         _48 = const 1_u64 as i16 (IntToInt);
-          _47 = opaque::<i16>(move _48) -> [return: bb16, unwind continue];
++         _49 = const 1_u64;
++         _48 = const 1_i16;
+          StorageDead(_49);
+-         _47 = opaque::<i16>(move _48) -> [return: bb16, unwind continue];
++         _47 = opaque::<i16>(const 1_i16) -> [return: bb16, unwind continue];
       }
   
       bb16: {
@@ -314,12 +347,14 @@
           StorageDead(_47);
           StorageLive(_50);
           StorageLive(_51);
--         StorageLive(_52);
+          StorageLive(_52);
 -         _52 = _2;
 -         _51 = move _52 as i32 (IntToInt);
--         StorageDead(_52);
-+         _51 = const 1_u64 as i32 (IntToInt);
-          _50 = opaque::<i32>(move _51) -> [return: bb17, unwind continue];
++         _52 = const 1_u64;
++         _51 = const 1_i32;
+          StorageDead(_52);
+-         _50 = opaque::<i32>(move _51) -> [return: bb17, unwind continue];
++         _50 = opaque::<i32>(const 1_i32) -> [return: bb17, unwind continue];
       }
   
       bb17: {
@@ -327,12 +362,14 @@
           StorageDead(_50);
           StorageLive(_53);
           StorageLive(_54);
--         StorageLive(_55);
+          StorageLive(_55);
 -         _55 = _2;
 -         _54 = move _55 as i64 (IntToInt);
--         StorageDead(_55);
-+         _54 = const 1_u64 as i64 (IntToInt);
-          _53 = opaque::<i64>(move _54) -> [return: bb18, unwind continue];
++         _55 = const 1_u64;
++         _54 = const 1_i64;
+          StorageDead(_55);
+-         _53 = opaque::<i64>(move _54) -> [return: bb18, unwind continue];
++         _53 = opaque::<i64>(const 1_i64) -> [return: bb18, unwind continue];
       }
   
       bb18: {
@@ -340,12 +377,14 @@
           StorageDead(_53);
           StorageLive(_56);
           StorageLive(_57);
--         StorageLive(_58);
+          StorageLive(_58);
 -         _58 = _2;
 -         _57 = move _58 as f32 (IntToFloat);
--         StorageDead(_58);
-+         _57 = const 1_u64 as f32 (IntToFloat);
-          _56 = opaque::<f32>(move _57) -> [return: bb19, unwind continue];
++         _58 = const 1_u64;
++         _57 = const 1f32;
+          StorageDead(_58);
+-         _56 = opaque::<f32>(move _57) -> [return: bb19, unwind continue];
++         _56 = opaque::<f32>(const 1f32) -> [return: bb19, unwind continue];
       }
   
       bb19: {
@@ -353,12 +392,14 @@
           StorageDead(_56);
           StorageLive(_59);
           StorageLive(_60);
--         StorageLive(_61);
+          StorageLive(_61);
 -         _61 = _2;
 -         _60 = move _61 as f64 (IntToFloat);
--         StorageDead(_61);
-+         _60 = const 1_u64 as f64 (IntToFloat);
-          _59 = opaque::<f64>(move _60) -> [return: bb20, unwind continue];
++         _61 = const 1_u64;
++         _60 = const 1f64;
+          StorageDead(_61);
+-         _59 = opaque::<f64>(move _60) -> [return: bb20, unwind continue];
++         _59 = opaque::<f64>(const 1f64) -> [return: bb20, unwind continue];
       }
   
       bb20: {
@@ -366,12 +407,14 @@
           StorageDead(_59);
           StorageLive(_62);
           StorageLive(_63);
--         StorageLive(_64);
+          StorageLive(_64);
 -         _64 = _3;
 -         _63 = move _64 as u8 (FloatToInt);
--         StorageDead(_64);
-+         _63 = const 1f64 as u8 (FloatToInt);
-          _62 = opaque::<u8>(move _63) -> [return: bb21, unwind continue];
++         _64 = const 1f64;
++         _63 = const 1_u8;
+          StorageDead(_64);
+-         _62 = opaque::<u8>(move _63) -> [return: bb21, unwind continue];
++         _62 = opaque::<u8>(const 1_u8) -> [return: bb21, unwind continue];
       }
   
       bb21: {
@@ -379,12 +422,14 @@
           StorageDead(_62);
           StorageLive(_65);
           StorageLive(_66);
--         StorageLive(_67);
+          StorageLive(_67);
 -         _67 = _3;
 -         _66 = move _67 as u16 (FloatToInt);
--         StorageDead(_67);
-+         _66 = const 1f64 as u16 (FloatToInt);
-          _65 = opaque::<u16>(move _66) -> [return: bb22, unwind continue];
++         _67 = const 1f64;
++         _66 = const 1_u16;
+          StorageDead(_67);
+-         _65 = opaque::<u16>(move _66) -> [return: bb22, unwind continue];
++         _65 = opaque::<u16>(const 1_u16) -> [return: bb22, unwind continue];
       }
   
       bb22: {
@@ -392,12 +437,14 @@
           StorageDead(_65);
           StorageLive(_68);
           StorageLive(_69);
--         StorageLive(_70);
+          StorageLive(_70);
 -         _70 = _3;
 -         _69 = move _70 as u32 (FloatToInt);
--         StorageDead(_70);
-+         _69 = const 1f64 as u32 (FloatToInt);
-          _68 = opaque::<u32>(move _69) -> [return: bb23, unwind continue];
++         _70 = const 1f64;
++         _69 = const 1_u32;
+          StorageDead(_70);
+-         _68 = opaque::<u32>(move _69) -> [return: bb23, unwind continue];
++         _68 = opaque::<u32>(const 1_u32) -> [return: bb23, unwind continue];
       }
   
       bb23: {
@@ -405,12 +452,14 @@
           StorageDead(_68);
           StorageLive(_71);
           StorageLive(_72);
--         StorageLive(_73);
+          StorageLive(_73);
 -         _73 = _3;
 -         _72 = move _73 as u64 (FloatToInt);
--         StorageDead(_73);
-+         _72 = const 1f64 as u64 (FloatToInt);
-          _71 = opaque::<u64>(move _72) -> [return: bb24, unwind continue];
++         _73 = const 1f64;
++         _72 = const 1_u64;
+          StorageDead(_73);
+-         _71 = opaque::<u64>(move _72) -> [return: bb24, unwind continue];
++         _71 = opaque::<u64>(const 1_u64) -> [return: bb24, unwind continue];
       }
   
       bb24: {
@@ -418,12 +467,14 @@
           StorageDead(_71);
           StorageLive(_74);
           StorageLive(_75);
--         StorageLive(_76);
+          StorageLive(_76);
 -         _76 = _3;
 -         _75 = move _76 as i8 (FloatToInt);
--         StorageDead(_76);
-+         _75 = const 1f64 as i8 (FloatToInt);
-          _74 = opaque::<i8>(move _75) -> [return: bb25, unwind continue];
++         _76 = const 1f64;
++         _75 = const 1_i8;
+          StorageDead(_76);
+-         _74 = opaque::<i8>(move _75) -> [return: bb25, unwind continue];
++         _74 = opaque::<i8>(const 1_i8) -> [return: bb25, unwind continue];
       }
   
       bb25: {
@@ -431,12 +482,14 @@
           StorageDead(_74);
           StorageLive(_77);
           StorageLive(_78);
--         StorageLive(_79);
+          StorageLive(_79);
 -         _79 = _3;
 -         _78 = move _79 as i16 (FloatToInt);
--         StorageDead(_79);
-+         _78 = const 1f64 as i16 (FloatToInt);
-          _77 = opaque::<i16>(move _78) -> [return: bb26, unwind continue];
++         _79 = const 1f64;
++         _78 = const 1_i16;
+          StorageDead(_79);
+-         _77 = opaque::<i16>(move _78) -> [return: bb26, unwind continue];
++         _77 = opaque::<i16>(const 1_i16) -> [return: bb26, unwind continue];
       }
   
       bb26: {
@@ -444,12 +497,14 @@
           StorageDead(_77);
           StorageLive(_80);
           StorageLive(_81);
--         StorageLive(_82);
+          StorageLive(_82);
 -         _82 = _3;
 -         _81 = move _82 as i32 (FloatToInt);
--         StorageDead(_82);
-+         _81 = const 1f64 as i32 (FloatToInt);
-          _80 = opaque::<i32>(move _81) -> [return: bb27, unwind continue];
++         _82 = const 1f64;
++         _81 = const 1_i32;
+          StorageDead(_82);
+-         _80 = opaque::<i32>(move _81) -> [return: bb27, unwind continue];
++         _80 = opaque::<i32>(const 1_i32) -> [return: bb27, unwind continue];
       }
   
       bb27: {
@@ -457,12 +512,14 @@
           StorageDead(_80);
           StorageLive(_83);
           StorageLive(_84);
--         StorageLive(_85);
+          StorageLive(_85);
 -         _85 = _3;
 -         _84 = move _85 as i64 (FloatToInt);
--         StorageDead(_85);
-+         _84 = const 1f64 as i64 (FloatToInt);
-          _83 = opaque::<i64>(move _84) -> [return: bb28, unwind continue];
++         _85 = const 1f64;
++         _84 = const 1_i64;
+          StorageDead(_85);
+-         _83 = opaque::<i64>(move _84) -> [return: bb28, unwind continue];
++         _83 = opaque::<i64>(const 1_i64) -> [return: bb28, unwind continue];
       }
   
       bb28: {
@@ -470,31 +527,37 @@
           StorageDead(_83);
           StorageLive(_86);
           StorageLive(_87);
--         StorageLive(_88);
+          StorageLive(_88);
 -         _88 = _3;
 -         _87 = move _88 as f32 (FloatToFloat);
--         StorageDead(_88);
-+         _87 = const 1f64 as f32 (FloatToFloat);
-          _86 = opaque::<f32>(move _87) -> [return: bb29, unwind continue];
++         _88 = const 1f64;
++         _87 = const 1f32;
+          StorageDead(_88);
+-         _86 = opaque::<f32>(move _87) -> [return: bb29, unwind continue];
++         _86 = opaque::<f32>(const 1f32) -> [return: bb29, unwind continue];
       }
   
       bb29: {
           StorageDead(_87);
           StorageDead(_86);
           StorageLive(_89);
--         StorageLive(_90);
+          StorageLive(_90);
 -         _90 = _3;
 -         _89 = opaque::<f64>(move _90) -> [return: bb30, unwind continue];
++         _90 = const 1f64;
 +         _89 = opaque::<f64>(const 1f64) -> [return: bb30, unwind continue];
       }
   
       bb30: {
--         StorageDead(_90);
+          StorageDead(_90);
           StorageDead(_89);
           _0 = const ();
 -         StorageDead(_3);
 -         StorageDead(_2);
 -         StorageDead(_1);
++         nop;
++         nop;
++         nop;
           return;
       }
   }
diff --git a/tests/mir-opt/gvn.comparison.GVN.panic-abort.diff b/tests/mir-opt/gvn.comparison.GVN.panic-abort.diff
new file mode 100644
index 00000000000..ee3b9da2122
--- /dev/null
+++ b/tests/mir-opt/gvn.comparison.GVN.panic-abort.diff
@@ -0,0 +1,94 @@
+- // MIR for `comparison` before GVN
++ // MIR for `comparison` after GVN
+  
+  fn comparison(_1: u64, _2: u64) -> () {
+      debug x => _1;
+      debug y => _2;
+      let mut _0: ();
+      let _3: ();
+      let mut _4: bool;
+      let mut _5: u64;
+      let mut _6: u64;
+      let _7: ();
+      let mut _8: bool;
+      let mut _9: u64;
+      let mut _10: u64;
+      let _11: ();
+      let mut _12: bool;
+      let mut _13: u64;
+      let mut _14: u64;
+      let _15: ();
+      let mut _16: bool;
+      let mut _17: u64;
+      let mut _18: u64;
+  
+      bb0: {
+          StorageLive(_3);
+          StorageLive(_4);
+          StorageLive(_5);
+          _5 = _1;
+          StorageLive(_6);
+          _6 = _1;
+-         _4 = Eq(move _5, move _6);
++         _4 = Eq(_1, _1);
+          StorageDead(_6);
+          StorageDead(_5);
+          _3 = opaque::<bool>(move _4) -> [return: bb1, unwind unreachable];
+      }
+  
+      bb1: {
+          StorageDead(_4);
+          StorageDead(_3);
+          StorageLive(_7);
+          StorageLive(_8);
+          StorageLive(_9);
+          _9 = _1;
+          StorageLive(_10);
+          _10 = _1;
+-         _8 = Ne(move _9, move _10);
++         _8 = Ne(_1, _1);
+          StorageDead(_10);
+          StorageDead(_9);
+          _7 = opaque::<bool>(move _8) -> [return: bb2, unwind unreachable];
+      }
+  
+      bb2: {
+          StorageDead(_8);
+          StorageDead(_7);
+          StorageLive(_11);
+          StorageLive(_12);
+          StorageLive(_13);
+          _13 = _1;
+          StorageLive(_14);
+          _14 = _2;
+-         _12 = Eq(move _13, move _14);
++         _12 = Eq(_1, _2);
+          StorageDead(_14);
+          StorageDead(_13);
+          _11 = opaque::<bool>(move _12) -> [return: bb3, unwind unreachable];
+      }
+  
+      bb3: {
+          StorageDead(_12);
+          StorageDead(_11);
+          StorageLive(_15);
+          StorageLive(_16);
+          StorageLive(_17);
+          _17 = _1;
+          StorageLive(_18);
+          _18 = _2;
+-         _16 = Ne(move _17, move _18);
++         _16 = Ne(_1, _2);
+          StorageDead(_18);
+          StorageDead(_17);
+          _15 = opaque::<bool>(move _16) -> [return: bb4, unwind unreachable];
+      }
+  
+      bb4: {
+          StorageDead(_16);
+          StorageDead(_15);
+          _0 = const ();
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/gvn.comparison.GVN.panic-unwind.diff b/tests/mir-opt/gvn.comparison.GVN.panic-unwind.diff
new file mode 100644
index 00000000000..a1408fe3434
--- /dev/null
+++ b/tests/mir-opt/gvn.comparison.GVN.panic-unwind.diff
@@ -0,0 +1,94 @@
+- // MIR for `comparison` before GVN
++ // MIR for `comparison` after GVN
+  
+  fn comparison(_1: u64, _2: u64) -> () {
+      debug x => _1;
+      debug y => _2;
+      let mut _0: ();
+      let _3: ();
+      let mut _4: bool;
+      let mut _5: u64;
+      let mut _6: u64;
+      let _7: ();
+      let mut _8: bool;
+      let mut _9: u64;
+      let mut _10: u64;
+      let _11: ();
+      let mut _12: bool;
+      let mut _13: u64;
+      let mut _14: u64;
+      let _15: ();
+      let mut _16: bool;
+      let mut _17: u64;
+      let mut _18: u64;
+  
+      bb0: {
+          StorageLive(_3);
+          StorageLive(_4);
+          StorageLive(_5);
+          _5 = _1;
+          StorageLive(_6);
+          _6 = _1;
+-         _4 = Eq(move _5, move _6);
++         _4 = Eq(_1, _1);
+          StorageDead(_6);
+          StorageDead(_5);
+          _3 = opaque::<bool>(move _4) -> [return: bb1, unwind continue];
+      }
+  
+      bb1: {
+          StorageDead(_4);
+          StorageDead(_3);
+          StorageLive(_7);
+          StorageLive(_8);
+          StorageLive(_9);
+          _9 = _1;
+          StorageLive(_10);
+          _10 = _1;
+-         _8 = Ne(move _9, move _10);
++         _8 = Ne(_1, _1);
+          StorageDead(_10);
+          StorageDead(_9);
+          _7 = opaque::<bool>(move _8) -> [return: bb2, unwind continue];
+      }
+  
+      bb2: {
+          StorageDead(_8);
+          StorageDead(_7);
+          StorageLive(_11);
+          StorageLive(_12);
+          StorageLive(_13);
+          _13 = _1;
+          StorageLive(_14);
+          _14 = _2;
+-         _12 = Eq(move _13, move _14);
++         _12 = Eq(_1, _2);
+          StorageDead(_14);
+          StorageDead(_13);
+          _11 = opaque::<bool>(move _12) -> [return: bb3, unwind continue];
+      }
+  
+      bb3: {
+          StorageDead(_12);
+          StorageDead(_11);
+          StorageLive(_15);
+          StorageLive(_16);
+          StorageLive(_17);
+          _17 = _1;
+          StorageLive(_18);
+          _18 = _2;
+-         _16 = Ne(move _17, move _18);
++         _16 = Ne(_1, _2);
+          StorageDead(_18);
+          StorageDead(_17);
+          _15 = opaque::<bool>(move _16) -> [return: bb4, unwind continue];
+      }
+  
+      bb4: {
+          StorageDead(_16);
+          StorageDead(_15);
+          _0 = const ();
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/gvn.dereferences.GVN.panic-abort.diff b/tests/mir-opt/gvn.dereferences.GVN.panic-abort.diff
index ee320cf6787..a587b1e6b1d 100644
--- a/tests/mir-opt/gvn.dereferences.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.dereferences.GVN.panic-abort.diff
@@ -72,7 +72,8 @@
       bb2: {
           StorageDead(_7);
           StorageDead(_6);
-          StorageLive(_8);
+-         StorageLive(_8);
++         nop;
           _8 = &raw const (*_1);
           StorageLive(_9);
           StorageLive(_10);
@@ -92,7 +93,8 @@
       bb4: {
           StorageDead(_12);
           StorageDead(_11);
-          StorageLive(_13);
+-         StorageLive(_13);
++         nop;
           _13 = &raw mut (*_1);
           StorageLive(_14);
           StorageLive(_15);
@@ -112,10 +114,12 @@
       bb6: {
           StorageDead(_17);
           StorageDead(_16);
-          StorageLive(_18);
+-         StorageLive(_18);
++         nop;
           _18 = &(*_1);
           StorageLive(_19);
 -         StorageLive(_20);
++         nop;
           _20 = (*_18);
 -         _19 = opaque::<u32>(move _20) -> [return: bb7, unwind unreachable];
 +         _19 = opaque::<u32>(_20) -> [return: bb7, unwind unreachable];
@@ -123,16 +127,18 @@
   
       bb7: {
 -         StorageDead(_20);
++         nop;
           StorageDead(_19);
           StorageLive(_21);
--         StorageLive(_22);
+          StorageLive(_22);
 -         _22 = (*_18);
 -         _21 = opaque::<u32>(move _22) -> [return: bb8, unwind unreachable];
++         _22 = _20;
 +         _21 = opaque::<u32>(_20) -> [return: bb8, unwind unreachable];
       }
   
       bb8: {
--         StorageDead(_22);
+          StorageDead(_22);
           StorageDead(_21);
           StorageLive(_23);
           StorageLive(_24);
@@ -163,6 +169,7 @@
           StorageDead(_27);
           StorageLive(_29);
 -         StorageLive(_30);
++         nop;
           _30 = ((*_3).0: u32);
 -         _29 = opaque::<u32>(move _30) -> [return: bb12, unwind unreachable];
 +         _29 = opaque::<u32>(_30) -> [return: bb12, unwind unreachable];
@@ -170,21 +177,26 @@
   
       bb12: {
 -         StorageDead(_30);
++         nop;
           StorageDead(_29);
           StorageLive(_31);
--         StorageLive(_32);
+          StorageLive(_32);
 -         _32 = ((*_3).0: u32);
 -         _31 = opaque::<u32>(move _32) -> [return: bb13, unwind unreachable];
++         _32 = _30;
 +         _31 = opaque::<u32>(_30) -> [return: bb13, unwind unreachable];
       }
   
       bb13: {
--         StorageDead(_32);
+          StorageDead(_32);
           StorageDead(_31);
           _0 = const ();
-          StorageDead(_18);
-          StorageDead(_13);
-          StorageDead(_8);
+-         StorageDead(_18);
+-         StorageDead(_13);
+-         StorageDead(_8);
++         nop;
++         nop;
++         nop;
           return;
       }
   }
diff --git a/tests/mir-opt/gvn.dereferences.GVN.panic-unwind.diff b/tests/mir-opt/gvn.dereferences.GVN.panic-unwind.diff
index f627b4d5988..6fdda5e9988 100644
--- a/tests/mir-opt/gvn.dereferences.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.dereferences.GVN.panic-unwind.diff
@@ -72,7 +72,8 @@
       bb2: {
           StorageDead(_7);
           StorageDead(_6);
-          StorageLive(_8);
+-         StorageLive(_8);
++         nop;
           _8 = &raw const (*_1);
           StorageLive(_9);
           StorageLive(_10);
@@ -92,7 +93,8 @@
       bb4: {
           StorageDead(_12);
           StorageDead(_11);
-          StorageLive(_13);
+-         StorageLive(_13);
++         nop;
           _13 = &raw mut (*_1);
           StorageLive(_14);
           StorageLive(_15);
@@ -112,10 +114,12 @@
       bb6: {
           StorageDead(_17);
           StorageDead(_16);
-          StorageLive(_18);
+-         StorageLive(_18);
++         nop;
           _18 = &(*_1);
           StorageLive(_19);
 -         StorageLive(_20);
++         nop;
           _20 = (*_18);
 -         _19 = opaque::<u32>(move _20) -> [return: bb7, unwind continue];
 +         _19 = opaque::<u32>(_20) -> [return: bb7, unwind continue];
@@ -123,16 +127,18 @@
   
       bb7: {
 -         StorageDead(_20);
++         nop;
           StorageDead(_19);
           StorageLive(_21);
--         StorageLive(_22);
+          StorageLive(_22);
 -         _22 = (*_18);
 -         _21 = opaque::<u32>(move _22) -> [return: bb8, unwind continue];
++         _22 = _20;
 +         _21 = opaque::<u32>(_20) -> [return: bb8, unwind continue];
       }
   
       bb8: {
--         StorageDead(_22);
+          StorageDead(_22);
           StorageDead(_21);
           StorageLive(_23);
           StorageLive(_24);
@@ -163,6 +169,7 @@
           StorageDead(_27);
           StorageLive(_29);
 -         StorageLive(_30);
++         nop;
           _30 = ((*_3).0: u32);
 -         _29 = opaque::<u32>(move _30) -> [return: bb12, unwind continue];
 +         _29 = opaque::<u32>(_30) -> [return: bb12, unwind continue];
@@ -170,21 +177,26 @@
   
       bb12: {
 -         StorageDead(_30);
++         nop;
           StorageDead(_29);
           StorageLive(_31);
--         StorageLive(_32);
+          StorageLive(_32);
 -         _32 = ((*_3).0: u32);
 -         _31 = opaque::<u32>(move _32) -> [return: bb13, unwind continue];
++         _32 = _30;
 +         _31 = opaque::<u32>(_30) -> [return: bb13, unwind continue];
       }
   
       bb13: {
--         StorageDead(_32);
+          StorageDead(_32);
           StorageDead(_31);
           _0 = const ();
-          StorageDead(_18);
-          StorageDead(_13);
-          StorageDead(_8);
+-         StorageDead(_18);
+-         StorageDead(_13);
+-         StorageDead(_8);
++         nop;
++         nop;
++         nop;
           return;
       }
   }
diff --git a/tests/mir-opt/gvn.duplicate_slice.GVN.panic-abort.diff b/tests/mir-opt/gvn.duplicate_slice.GVN.panic-abort.diff
new file mode 100644
index 00000000000..7ae1fae68e8
--- /dev/null
+++ b/tests/mir-opt/gvn.duplicate_slice.GVN.panic-abort.diff
@@ -0,0 +1,38 @@
+- // MIR for `duplicate_slice` before GVN
++ // MIR for `duplicate_slice` after GVN
+  
+  fn duplicate_slice() -> (bool, bool) {
+      let mut _0: (bool, bool);
+      let mut _1: u128;
+      let mut _2: u128;
+      let mut _3: u128;
+      let mut _4: u128;
+      let mut _5: &str;
+      let mut _6: &str;
+      let mut _7: (&str,);
+      let mut _8: &str;
+      let mut _9: bool;
+      let mut _10: bool;
+  
+      bb0: {
+          _7 = (const "a",);
+          _1 = (_7.0: &str) as u128 (Transmute);
+          _5 = identity::<&str>((_7.0: &str)) -> [return: bb1, unwind unreachable];
+      }
+  
+      bb1: {
+          _3 = _5 as u128 (Transmute);
+          _8 = const "a";
+          _2 = _8 as u128 (Transmute);
+          _6 = identity::<&str>(_8) -> [return: bb2, unwind unreachable];
+      }
+  
+      bb2: {
+          _4 = _6 as u128 (Transmute);
+          _9 = Eq(_1, _2);
+          _10 = Eq(_3, _4);
+          _0 = (_9, _10);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/gvn.duplicate_slice.GVN.panic-unwind.diff b/tests/mir-opt/gvn.duplicate_slice.GVN.panic-unwind.diff
new file mode 100644
index 00000000000..8c96edaa280
--- /dev/null
+++ b/tests/mir-opt/gvn.duplicate_slice.GVN.panic-unwind.diff
@@ -0,0 +1,38 @@
+- // MIR for `duplicate_slice` before GVN
++ // MIR for `duplicate_slice` after GVN
+  
+  fn duplicate_slice() -> (bool, bool) {
+      let mut _0: (bool, bool);
+      let mut _1: u128;
+      let mut _2: u128;
+      let mut _3: u128;
+      let mut _4: u128;
+      let mut _5: &str;
+      let mut _6: &str;
+      let mut _7: (&str,);
+      let mut _8: &str;
+      let mut _9: bool;
+      let mut _10: bool;
+  
+      bb0: {
+          _7 = (const "a",);
+          _1 = (_7.0: &str) as u128 (Transmute);
+          _5 = identity::<&str>((_7.0: &str)) -> [return: bb1, unwind continue];
+      }
+  
+      bb1: {
+          _3 = _5 as u128 (Transmute);
+          _8 = const "a";
+          _2 = _8 as u128 (Transmute);
+          _6 = identity::<&str>(_8) -> [return: bb2, unwind continue];
+      }
+  
+      bb2: {
+          _4 = _6 as u128 (Transmute);
+          _9 = Eq(_1, _2);
+          _10 = Eq(_3, _4);
+          _0 = (_9, _10);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff b/tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff
new file mode 100644
index 00000000000..d8248d22d38
--- /dev/null
+++ b/tests/mir-opt/gvn.fn_pointers.GVN.panic-abort.diff
@@ -0,0 +1,118 @@
+- // MIR for `fn_pointers` before GVN
++ // MIR for `fn_pointers` after GVN
+  
+  fn fn_pointers() -> () {
+      let mut _0: ();
+      let _1: fn(u8) -> u8;
+      let _2: ();
+      let mut _3: fn(u8) -> u8;
+      let _5: ();
+      let mut _6: fn(u8) -> u8;
+      let mut _9: {closure@$DIR/gvn.rs:591:19: 591:21};
+      let _10: ();
+      let mut _11: fn();
+      let mut _13: {closure@$DIR/gvn.rs:591:19: 591:21};
+      let _14: ();
+      let mut _15: fn();
+      scope 1 {
+          debug f => _1;
+          let _4: fn(u8) -> u8;
+          scope 2 {
+              debug g => _4;
+              let _7: {closure@$DIR/gvn.rs:591:19: 591:21};
+              scope 3 {
+                  debug closure => _7;
+                  let _8: fn();
+                  scope 4 {
+                      debug cf => _8;
+                      let _12: fn();
+                      scope 5 {
+                          debug cg => _12;
+                      }
+                  }
+              }
+          }
+      }
+  
+      bb0: {
+-         StorageLive(_1);
++         nop;
+          _1 = identity::<u8> as fn(u8) -> u8 (PointerCoercion(ReifyFnPointer));
+          StorageLive(_2);
+          StorageLive(_3);
+          _3 = _1;
+-         _2 = opaque::<fn(u8) -> u8>(move _3) -> [return: bb1, unwind unreachable];
++         _2 = opaque::<fn(u8) -> u8>(_1) -> [return: bb1, unwind unreachable];
+      }
+  
+      bb1: {
+          StorageDead(_3);
+          StorageDead(_2);
+-         StorageLive(_4);
++         nop;
+          _4 = identity::<u8> as fn(u8) -> u8 (PointerCoercion(ReifyFnPointer));
+          StorageLive(_5);
+          StorageLive(_6);
+          _6 = _4;
+-         _5 = opaque::<fn(u8) -> u8>(move _6) -> [return: bb2, unwind unreachable];
++         _5 = opaque::<fn(u8) -> u8>(_4) -> [return: bb2, unwind unreachable];
+      }
+  
+      bb2: {
+          StorageDead(_6);
+          StorageDead(_5);
+-         StorageLive(_7);
+-         _7 = {closure@$DIR/gvn.rs:591:19: 591:21};
+-         StorageLive(_8);
++         nop;
++         _7 = const ZeroSized: {closure@$DIR/gvn.rs:591:19: 591:21};
++         nop;
+          StorageLive(_9);
+-         _9 = _7;
+-         _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Normal)));
++         _9 = const ZeroSized: {closure@$DIR/gvn.rs:591:19: 591:21};
++         _8 = const ZeroSized: {closure@$DIR/gvn.rs:591:19: 591:21} as fn() (PointerCoercion(ClosureFnPointer(Normal)));
+          StorageDead(_9);
+          StorageLive(_10);
+          StorageLive(_11);
+          _11 = _8;
+-         _10 = opaque::<fn()>(move _11) -> [return: bb3, unwind unreachable];
++         _10 = opaque::<fn()>(_8) -> [return: bb3, unwind unreachable];
+      }
+  
+      bb3: {
+          StorageDead(_11);
+          StorageDead(_10);
+-         StorageLive(_12);
++         nop;
+          StorageLive(_13);
+-         _13 = _7;
+-         _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Normal)));
++         _13 = const ZeroSized: {closure@$DIR/gvn.rs:591:19: 591:21};
++         _12 = const ZeroSized: {closure@$DIR/gvn.rs:591:19: 591:21} as fn() (PointerCoercion(ClosureFnPointer(Normal)));
+          StorageDead(_13);
+          StorageLive(_14);
+          StorageLive(_15);
+          _15 = _12;
+-         _14 = opaque::<fn()>(move _15) -> [return: bb4, unwind unreachable];
++         _14 = opaque::<fn()>(_12) -> [return: bb4, unwind unreachable];
+      }
+  
+      bb4: {
+          StorageDead(_15);
+          StorageDead(_14);
+          _0 = const ();
+-         StorageDead(_12);
+-         StorageDead(_8);
+-         StorageDead(_7);
+-         StorageDead(_4);
+-         StorageDead(_1);
++         nop;
++         nop;
++         nop;
++         nop;
++         nop;
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff b/tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff
new file mode 100644
index 00000000000..e38a3d85209
--- /dev/null
+++ b/tests/mir-opt/gvn.fn_pointers.GVN.panic-unwind.diff
@@ -0,0 +1,118 @@
+- // MIR for `fn_pointers` before GVN
++ // MIR for `fn_pointers` after GVN
+  
+  fn fn_pointers() -> () {
+      let mut _0: ();
+      let _1: fn(u8) -> u8;
+      let _2: ();
+      let mut _3: fn(u8) -> u8;
+      let _5: ();
+      let mut _6: fn(u8) -> u8;
+      let mut _9: {closure@$DIR/gvn.rs:591:19: 591:21};
+      let _10: ();
+      let mut _11: fn();
+      let mut _13: {closure@$DIR/gvn.rs:591:19: 591:21};
+      let _14: ();
+      let mut _15: fn();
+      scope 1 {
+          debug f => _1;
+          let _4: fn(u8) -> u8;
+          scope 2 {
+              debug g => _4;
+              let _7: {closure@$DIR/gvn.rs:591:19: 591:21};
+              scope 3 {
+                  debug closure => _7;
+                  let _8: fn();
+                  scope 4 {
+                      debug cf => _8;
+                      let _12: fn();
+                      scope 5 {
+                          debug cg => _12;
+                      }
+                  }
+              }
+          }
+      }
+  
+      bb0: {
+-         StorageLive(_1);
++         nop;
+          _1 = identity::<u8> as fn(u8) -> u8 (PointerCoercion(ReifyFnPointer));
+          StorageLive(_2);
+          StorageLive(_3);
+          _3 = _1;
+-         _2 = opaque::<fn(u8) -> u8>(move _3) -> [return: bb1, unwind continue];
++         _2 = opaque::<fn(u8) -> u8>(_1) -> [return: bb1, unwind continue];
+      }
+  
+      bb1: {
+          StorageDead(_3);
+          StorageDead(_2);
+-         StorageLive(_4);
++         nop;
+          _4 = identity::<u8> as fn(u8) -> u8 (PointerCoercion(ReifyFnPointer));
+          StorageLive(_5);
+          StorageLive(_6);
+          _6 = _4;
+-         _5 = opaque::<fn(u8) -> u8>(move _6) -> [return: bb2, unwind continue];
++         _5 = opaque::<fn(u8) -> u8>(_4) -> [return: bb2, unwind continue];
+      }
+  
+      bb2: {
+          StorageDead(_6);
+          StorageDead(_5);
+-         StorageLive(_7);
+-         _7 = {closure@$DIR/gvn.rs:591:19: 591:21};
+-         StorageLive(_8);
++         nop;
++         _7 = const ZeroSized: {closure@$DIR/gvn.rs:591:19: 591:21};
++         nop;
+          StorageLive(_9);
+-         _9 = _7;
+-         _8 = move _9 as fn() (PointerCoercion(ClosureFnPointer(Normal)));
++         _9 = const ZeroSized: {closure@$DIR/gvn.rs:591:19: 591:21};
++         _8 = const ZeroSized: {closure@$DIR/gvn.rs:591:19: 591:21} as fn() (PointerCoercion(ClosureFnPointer(Normal)));
+          StorageDead(_9);
+          StorageLive(_10);
+          StorageLive(_11);
+          _11 = _8;
+-         _10 = opaque::<fn()>(move _11) -> [return: bb3, unwind continue];
++         _10 = opaque::<fn()>(_8) -> [return: bb3, unwind continue];
+      }
+  
+      bb3: {
+          StorageDead(_11);
+          StorageDead(_10);
+-         StorageLive(_12);
++         nop;
+          StorageLive(_13);
+-         _13 = _7;
+-         _12 = move _13 as fn() (PointerCoercion(ClosureFnPointer(Normal)));
++         _13 = const ZeroSized: {closure@$DIR/gvn.rs:591:19: 591:21};
++         _12 = const ZeroSized: {closure@$DIR/gvn.rs:591:19: 591:21} as fn() (PointerCoercion(ClosureFnPointer(Normal)));
+          StorageDead(_13);
+          StorageLive(_14);
+          StorageLive(_15);
+          _15 = _12;
+-         _14 = opaque::<fn()>(move _15) -> [return: bb4, unwind continue];
++         _14 = opaque::<fn()>(_12) -> [return: bb4, unwind continue];
+      }
+  
+      bb4: {
+          StorageDead(_15);
+          StorageDead(_14);
+          _0 = const ();
+-         StorageDead(_12);
+-         StorageDead(_8);
+-         StorageDead(_7);
+-         StorageDead(_4);
+-         StorageDead(_1);
++         nop;
++         nop;
++         nop;
++         nop;
++         nop;
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/gvn.indirect_static.GVN.panic-abort.diff b/tests/mir-opt/gvn.indirect_static.GVN.panic-abort.diff
new file mode 100644
index 00000000000..f853942bbb6
--- /dev/null
+++ b/tests/mir-opt/gvn.indirect_static.GVN.panic-abort.diff
@@ -0,0 +1,19 @@
+- // MIR for `indirect_static` before GVN
++ // MIR for `indirect_static` after GVN
+  
+  fn indirect_static() -> () {
+      let mut _0: ();
+      let mut _1: &std::option::Option<u8>;
+      let mut _2: u8;
+  
+      bb0: {
+          _1 = const {ALLOC0: &Option<u8>};
+          _2 = (((*_1) as variant#1).0: u8);
+          return;
+      }
+  }
+  
+  ALLOC0 (static: A, size: 2, align: 1) {
+      00 __                                           │ .░
+  }
+  
diff --git a/tests/mir-opt/gvn.indirect_static.GVN.panic-unwind.diff b/tests/mir-opt/gvn.indirect_static.GVN.panic-unwind.diff
new file mode 100644
index 00000000000..f853942bbb6
--- /dev/null
+++ b/tests/mir-opt/gvn.indirect_static.GVN.panic-unwind.diff
@@ -0,0 +1,19 @@
+- // MIR for `indirect_static` before GVN
++ // MIR for `indirect_static` after GVN
+  
+  fn indirect_static() -> () {
+      let mut _0: ();
+      let mut _1: &std::option::Option<u8>;
+      let mut _2: u8;
+  
+      bb0: {
+          _1 = const {ALLOC0: &Option<u8>};
+          _2 = (((*_1) as variant#1).0: u8);
+          return;
+      }
+  }
+  
+  ALLOC0 (static: A, size: 2, align: 1) {
+      00 __                                           │ .░
+  }
+  
diff --git a/tests/mir-opt/gvn.multiple_branches.GVN.panic-abort.diff b/tests/mir-opt/gvn.multiple_branches.GVN.panic-abort.diff
index 0a66900283b..29ca1ba5902 100644
--- a/tests/mir-opt/gvn.multiple_branches.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.multiple_branches.GVN.panic-abort.diff
@@ -39,9 +39,9 @@
       let mut _34: u8;
   
       bb0: {
--         StorageLive(_4);
--         StorageLive(_5);
--         _5 = _1;
+          StorageLive(_4);
+          StorageLive(_5);
+          _5 = _1;
 -         switchInt(move _5) -> [0: bb4, otherwise: bb1];
 +         switchInt(_1) -> [0: bb4, otherwise: bb1];
       }
@@ -49,121 +49,130 @@
       bb1: {
           StorageLive(_6);
 -         StorageLive(_7);
--         StorageLive(_8);
--         _8 = _2;
--         StorageLive(_9);
--         _9 = _3;
++         nop;
+          StorageLive(_8);
+          _8 = _2;
+          StorageLive(_9);
+          _9 = _3;
 -         _7 = Add(move _8, move _9);
--         StorageDead(_9);
--         StorageDead(_8);
--         _6 = opaque::<u8>(move _7) -> [return: bb2, unwind unreachable];
 +         _7 = Add(_2, _3);
+          StorageDead(_9);
+          StorageDead(_8);
+-         _6 = opaque::<u8>(move _7) -> [return: bb2, unwind unreachable];
 +         _6 = opaque::<u8>(_7) -> [return: bb2, unwind unreachable];
       }
   
       bb2: {
 -         StorageDead(_7);
++         nop;
           StorageDead(_6);
           StorageLive(_10);
--         StorageLive(_11);
--         StorageLive(_12);
--         _12 = _2;
--         StorageLive(_13);
--         _13 = _3;
+          StorageLive(_11);
+          StorageLive(_12);
+          _12 = _2;
+          StorageLive(_13);
+          _13 = _3;
 -         _11 = Add(move _12, move _13);
--         StorageDead(_13);
--         StorageDead(_12);
++         _11 = _7;
+          StorageDead(_13);
+          StorageDead(_12);
 -         _10 = opaque::<u8>(move _11) -> [return: bb3, unwind unreachable];
 +         _10 = opaque::<u8>(_7) -> [return: bb3, unwind unreachable];
       }
   
       bb3: {
--         StorageDead(_11);
+          StorageDead(_11);
           StorageDead(_10);
--         _4 = const ();
+          _4 = const ();
           goto -> bb7;
       }
   
       bb4: {
           StorageLive(_14);
 -         StorageLive(_15);
--         StorageLive(_16);
--         _16 = _2;
--         StorageLive(_17);
--         _17 = _3;
++         nop;
+          StorageLive(_16);
+          _16 = _2;
+          StorageLive(_17);
+          _17 = _3;
 -         _15 = Add(move _16, move _17);
--         StorageDead(_17);
--         StorageDead(_16);
--         _14 = opaque::<u8>(move _15) -> [return: bb5, unwind unreachable];
 +         _15 = Add(_2, _3);
+          StorageDead(_17);
+          StorageDead(_16);
+-         _14 = opaque::<u8>(move _15) -> [return: bb5, unwind unreachable];
 +         _14 = opaque::<u8>(_15) -> [return: bb5, unwind unreachable];
       }
   
       bb5: {
 -         StorageDead(_15);
++         nop;
           StorageDead(_14);
           StorageLive(_18);
--         StorageLive(_19);
--         StorageLive(_20);
--         _20 = _2;
--         StorageLive(_21);
--         _21 = _3;
+          StorageLive(_19);
+          StorageLive(_20);
+          _20 = _2;
+          StorageLive(_21);
+          _21 = _3;
 -         _19 = Add(move _20, move _21);
--         StorageDead(_21);
--         StorageDead(_20);
++         _19 = _15;
+          StorageDead(_21);
+          StorageDead(_20);
 -         _18 = opaque::<u8>(move _19) -> [return: bb6, unwind unreachable];
 +         _18 = opaque::<u8>(_15) -> [return: bb6, unwind unreachable];
       }
   
       bb6: {
--         StorageDead(_19);
+          StorageDead(_19);
           StorageDead(_18);
--         _4 = const ();
+          _4 = const ();
           goto -> bb7;
       }
   
       bb7: {
--         StorageDead(_5);
--         StorageDead(_4);
+          StorageDead(_5);
+          StorageDead(_4);
           StorageLive(_22);
 -         StorageLive(_23);
--         StorageLive(_24);
--         _24 = _2;
--         StorageLive(_25);
--         _25 = _3;
++         nop;
+          StorageLive(_24);
+          _24 = _2;
+          StorageLive(_25);
+          _25 = _3;
 -         _23 = Add(move _24, move _25);
--         StorageDead(_25);
--         StorageDead(_24);
--         _22 = opaque::<u8>(move _23) -> [return: bb8, unwind unreachable];
 +         _23 = Add(_2, _3);
+          StorageDead(_25);
+          StorageDead(_24);
+-         _22 = opaque::<u8>(move _23) -> [return: bb8, unwind unreachable];
 +         _22 = opaque::<u8>(_23) -> [return: bb8, unwind unreachable];
       }
   
       bb8: {
 -         StorageDead(_23);
++         nop;
           StorageDead(_22);
--         StorageLive(_26);
--         _26 = _1;
+          StorageLive(_26);
+          _26 = _1;
 -         switchInt(move _26) -> [0: bb11, otherwise: bb9];
 +         switchInt(_1) -> [0: bb11, otherwise: bb9];
       }
   
       bb9: {
           StorageLive(_27);
--         StorageLive(_28);
--         StorageLive(_29);
--         _29 = _2;
--         StorageLive(_30);
--         _30 = _3;
+          StorageLive(_28);
+          StorageLive(_29);
+          _29 = _2;
+          StorageLive(_30);
+          _30 = _3;
 -         _28 = Add(move _29, move _30);
--         StorageDead(_30);
--         StorageDead(_29);
++         _28 = _23;
+          StorageDead(_30);
+          StorageDead(_29);
 -         _27 = opaque::<u8>(move _28) -> [return: bb10, unwind unreachable];
 +         _27 = opaque::<u8>(_23) -> [return: bb10, unwind unreachable];
       }
   
       bb10: {
--         StorageDead(_28);
+          StorageDead(_28);
           StorageDead(_27);
           _0 = const ();
           goto -> bb13;
@@ -171,27 +180,28 @@
   
       bb11: {
           StorageLive(_31);
--         StorageLive(_32);
--         StorageLive(_33);
--         _33 = _2;
--         StorageLive(_34);
--         _34 = _3;
+          StorageLive(_32);
+          StorageLive(_33);
+          _33 = _2;
+          StorageLive(_34);
+          _34 = _3;
 -         _32 = Add(move _33, move _34);
--         StorageDead(_34);
--         StorageDead(_33);
++         _32 = _23;
+          StorageDead(_34);
+          StorageDead(_33);
 -         _31 = opaque::<u8>(move _32) -> [return: bb12, unwind unreachable];
 +         _31 = opaque::<u8>(_23) -> [return: bb12, unwind unreachable];
       }
   
       bb12: {
--         StorageDead(_32);
+          StorageDead(_32);
           StorageDead(_31);
           _0 = const ();
           goto -> bb13;
       }
   
       bb13: {
--         StorageDead(_26);
+          StorageDead(_26);
           return;
       }
   }
diff --git a/tests/mir-opt/gvn.multiple_branches.GVN.panic-unwind.diff b/tests/mir-opt/gvn.multiple_branches.GVN.panic-unwind.diff
index 0199f2720a9..5394dc8be8a 100644
--- a/tests/mir-opt/gvn.multiple_branches.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.multiple_branches.GVN.panic-unwind.diff
@@ -39,9 +39,9 @@
       let mut _34: u8;
   
       bb0: {
--         StorageLive(_4);
--         StorageLive(_5);
--         _5 = _1;
+          StorageLive(_4);
+          StorageLive(_5);
+          _5 = _1;
 -         switchInt(move _5) -> [0: bb4, otherwise: bb1];
 +         switchInt(_1) -> [0: bb4, otherwise: bb1];
       }
@@ -49,121 +49,130 @@
       bb1: {
           StorageLive(_6);
 -         StorageLive(_7);
--         StorageLive(_8);
--         _8 = _2;
--         StorageLive(_9);
--         _9 = _3;
++         nop;
+          StorageLive(_8);
+          _8 = _2;
+          StorageLive(_9);
+          _9 = _3;
 -         _7 = Add(move _8, move _9);
--         StorageDead(_9);
--         StorageDead(_8);
--         _6 = opaque::<u8>(move _7) -> [return: bb2, unwind continue];
 +         _7 = Add(_2, _3);
+          StorageDead(_9);
+          StorageDead(_8);
+-         _6 = opaque::<u8>(move _7) -> [return: bb2, unwind continue];
 +         _6 = opaque::<u8>(_7) -> [return: bb2, unwind continue];
       }
   
       bb2: {
 -         StorageDead(_7);
++         nop;
           StorageDead(_6);
           StorageLive(_10);
--         StorageLive(_11);
--         StorageLive(_12);
--         _12 = _2;
--         StorageLive(_13);
--         _13 = _3;
+          StorageLive(_11);
+          StorageLive(_12);
+          _12 = _2;
+          StorageLive(_13);
+          _13 = _3;
 -         _11 = Add(move _12, move _13);
--         StorageDead(_13);
--         StorageDead(_12);
++         _11 = _7;
+          StorageDead(_13);
+          StorageDead(_12);
 -         _10 = opaque::<u8>(move _11) -> [return: bb3, unwind continue];
 +         _10 = opaque::<u8>(_7) -> [return: bb3, unwind continue];
       }
   
       bb3: {
--         StorageDead(_11);
+          StorageDead(_11);
           StorageDead(_10);
--         _4 = const ();
+          _4 = const ();
           goto -> bb7;
       }
   
       bb4: {
           StorageLive(_14);
 -         StorageLive(_15);
--         StorageLive(_16);
--         _16 = _2;
--         StorageLive(_17);
--         _17 = _3;
++         nop;
+          StorageLive(_16);
+          _16 = _2;
+          StorageLive(_17);
+          _17 = _3;
 -         _15 = Add(move _16, move _17);
--         StorageDead(_17);
--         StorageDead(_16);
--         _14 = opaque::<u8>(move _15) -> [return: bb5, unwind continue];
 +         _15 = Add(_2, _3);
+          StorageDead(_17);
+          StorageDead(_16);
+-         _14 = opaque::<u8>(move _15) -> [return: bb5, unwind continue];
 +         _14 = opaque::<u8>(_15) -> [return: bb5, unwind continue];
       }
   
       bb5: {
 -         StorageDead(_15);
++         nop;
           StorageDead(_14);
           StorageLive(_18);
--         StorageLive(_19);
--         StorageLive(_20);
--         _20 = _2;
--         StorageLive(_21);
--         _21 = _3;
+          StorageLive(_19);
+          StorageLive(_20);
+          _20 = _2;
+          StorageLive(_21);
+          _21 = _3;
 -         _19 = Add(move _20, move _21);
--         StorageDead(_21);
--         StorageDead(_20);
++         _19 = _15;
+          StorageDead(_21);
+          StorageDead(_20);
 -         _18 = opaque::<u8>(move _19) -> [return: bb6, unwind continue];
 +         _18 = opaque::<u8>(_15) -> [return: bb6, unwind continue];
       }
   
       bb6: {
--         StorageDead(_19);
+          StorageDead(_19);
           StorageDead(_18);
--         _4 = const ();
+          _4 = const ();
           goto -> bb7;
       }
   
       bb7: {
--         StorageDead(_5);
--         StorageDead(_4);
+          StorageDead(_5);
+          StorageDead(_4);
           StorageLive(_22);
 -         StorageLive(_23);
--         StorageLive(_24);
--         _24 = _2;
--         StorageLive(_25);
--         _25 = _3;
++         nop;
+          StorageLive(_24);
+          _24 = _2;
+          StorageLive(_25);
+          _25 = _3;
 -         _23 = Add(move _24, move _25);
--         StorageDead(_25);
--         StorageDead(_24);
--         _22 = opaque::<u8>(move _23) -> [return: bb8, unwind continue];
 +         _23 = Add(_2, _3);
+          StorageDead(_25);
+          StorageDead(_24);
+-         _22 = opaque::<u8>(move _23) -> [return: bb8, unwind continue];
 +         _22 = opaque::<u8>(_23) -> [return: bb8, unwind continue];
       }
   
       bb8: {
 -         StorageDead(_23);
++         nop;
           StorageDead(_22);
--         StorageLive(_26);
--         _26 = _1;
+          StorageLive(_26);
+          _26 = _1;
 -         switchInt(move _26) -> [0: bb11, otherwise: bb9];
 +         switchInt(_1) -> [0: bb11, otherwise: bb9];
       }
   
       bb9: {
           StorageLive(_27);
--         StorageLive(_28);
--         StorageLive(_29);
--         _29 = _2;
--         StorageLive(_30);
--         _30 = _3;
+          StorageLive(_28);
+          StorageLive(_29);
+          _29 = _2;
+          StorageLive(_30);
+          _30 = _3;
 -         _28 = Add(move _29, move _30);
--         StorageDead(_30);
--         StorageDead(_29);
++         _28 = _23;
+          StorageDead(_30);
+          StorageDead(_29);
 -         _27 = opaque::<u8>(move _28) -> [return: bb10, unwind continue];
 +         _27 = opaque::<u8>(_23) -> [return: bb10, unwind continue];
       }
   
       bb10: {
--         StorageDead(_28);
+          StorageDead(_28);
           StorageDead(_27);
           _0 = const ();
           goto -> bb13;
@@ -171,27 +180,28 @@
   
       bb11: {
           StorageLive(_31);
--         StorageLive(_32);
--         StorageLive(_33);
--         _33 = _2;
--         StorageLive(_34);
--         _34 = _3;
+          StorageLive(_32);
+          StorageLive(_33);
+          _33 = _2;
+          StorageLive(_34);
+          _34 = _3;
 -         _32 = Add(move _33, move _34);
--         StorageDead(_34);
--         StorageDead(_33);
++         _32 = _23;
+          StorageDead(_34);
+          StorageDead(_33);
 -         _31 = opaque::<u8>(move _32) -> [return: bb12, unwind continue];
 +         _31 = opaque::<u8>(_23) -> [return: bb12, unwind continue];
       }
   
       bb12: {
--         StorageDead(_32);
+          StorageDead(_32);
           StorageDead(_31);
           _0 = const ();
           goto -> bb13;
       }
   
       bb13: {
--         StorageDead(_26);
+          StorageDead(_26);
           return;
       }
   }
diff --git a/tests/mir-opt/gvn.references.GVN.panic-abort.diff b/tests/mir-opt/gvn.references.GVN.panic-abort.diff
index b7ad4ab1fd3..7799c611445 100644
--- a/tests/mir-opt/gvn.references.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.references.GVN.panic-abort.diff
@@ -20,6 +20,24 @@
       let mut _15: *mut impl Sized;
       let _16: ();
       let mut _17: *mut impl Sized;
+      let _18: &mut impl Sized;
+      let mut _20: S<&mut impl Sized>;
+      let mut _21: &mut impl Sized;
+      let _22: ();
+      let mut _23: &impl Sized;
+      let _24: ();
+      let mut _25: &mut impl Sized;
+      let _26: ();
+      let mut _27: *const impl Sized;
+      let _28: ();
+      let mut _29: *mut impl Sized;
+      scope 1 {
+          debug r => _18;
+          let _19: &mut impl Sized;
+          scope 2 {
+              debug s => _19;
+          }
+      }
   
       bb0: {
           StorageLive(_2);
@@ -94,11 +112,68 @@
       bb8: {
           StorageDead(_17);
           StorageDead(_16);
-          _0 = const ();
-          drop(_1) -> [return: bb9, unwind unreachable];
+-         StorageLive(_18);
++         nop;
+          _18 = &mut _1;
+          StorageLive(_19);
+          StorageLive(_20);
+          StorageLive(_21);
+-         _21 = move _18;
+-         _20 = S::<&mut impl Sized>(move _21);
++         _21 = _18;
++         _20 = S::<&mut impl Sized>(_18);
+          StorageDead(_21);
+-         _19 = move (_20.0: &mut impl Sized);
++         _19 = _18;
+          StorageDead(_20);
+          StorageLive(_22);
+          StorageLive(_23);
+-         _23 = &(*_19);
++         _23 = &(*_18);
+          _22 = opaque::<&impl Sized>(move _23) -> [return: bb9, unwind unreachable];
       }
   
       bb9: {
+          StorageDead(_23);
+          StorageDead(_22);
+          StorageLive(_24);
+          StorageLive(_25);
+-         _25 = &mut (*_19);
++         _25 = &mut (*_18);
+          _24 = opaque::<&mut impl Sized>(move _25) -> [return: bb10, unwind unreachable];
+      }
+  
+      bb10: {
+          StorageDead(_25);
+          StorageDead(_24);
+          StorageLive(_26);
+          StorageLive(_27);
+-         _27 = &raw const (*_19);
++         _27 = &raw const (*_18);
+          _26 = opaque::<*const impl Sized>(move _27) -> [return: bb11, unwind unreachable];
+      }
+  
+      bb11: {
+          StorageDead(_27);
+          StorageDead(_26);
+          StorageLive(_28);
+          StorageLive(_29);
+-         _29 = &raw mut (*_19);
++         _29 = &raw mut (*_18);
+          _28 = opaque::<*mut impl Sized>(move _29) -> [return: bb12, unwind unreachable];
+      }
+  
+      bb12: {
+          StorageDead(_29);
+          StorageDead(_28);
+          _0 = const ();
+          StorageDead(_19);
+-         StorageDead(_18);
++         nop;
+          drop(_1) -> [return: bb13, unwind unreachable];
+      }
+  
+      bb13: {
           return;
       }
   }
diff --git a/tests/mir-opt/gvn.references.GVN.panic-unwind.diff b/tests/mir-opt/gvn.references.GVN.panic-unwind.diff
index 08ed4c629a6..880e7913fa9 100644
--- a/tests/mir-opt/gvn.references.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.references.GVN.panic-unwind.diff
@@ -20,12 +20,30 @@
       let mut _15: *mut impl Sized;
       let _16: ();
       let mut _17: *mut impl Sized;
+      let _18: &mut impl Sized;
+      let mut _20: S<&mut impl Sized>;
+      let mut _21: &mut impl Sized;
+      let _22: ();
+      let mut _23: &impl Sized;
+      let _24: ();
+      let mut _25: &mut impl Sized;
+      let _26: ();
+      let mut _27: *const impl Sized;
+      let _28: ();
+      let mut _29: *mut impl Sized;
+      scope 1 {
+          debug r => _18;
+          let _19: &mut impl Sized;
+          scope 2 {
+              debug s => _19;
+          }
+      }
   
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
           _3 = &_1;
-          _2 = opaque::<&impl Sized>(move _3) -> [return: bb1, unwind: bb10];
+          _2 = opaque::<&impl Sized>(move _3) -> [return: bb1, unwind: bb14];
       }
   
       bb1: {
@@ -34,7 +52,7 @@
           StorageLive(_4);
           StorageLive(_5);
           _5 = &_1;
-          _4 = opaque::<&impl Sized>(move _5) -> [return: bb2, unwind: bb10];
+          _4 = opaque::<&impl Sized>(move _5) -> [return: bb2, unwind: bb14];
       }
   
       bb2: {
@@ -43,7 +61,7 @@
           StorageLive(_6);
           StorageLive(_7);
           _7 = &mut _1;
-          _6 = opaque::<&mut impl Sized>(move _7) -> [return: bb3, unwind: bb10];
+          _6 = opaque::<&mut impl Sized>(move _7) -> [return: bb3, unwind: bb14];
       }
   
       bb3: {
@@ -52,7 +70,7 @@
           StorageLive(_8);
           StorageLive(_9);
           _9 = &mut _1;
-          _8 = opaque::<&mut impl Sized>(move _9) -> [return: bb4, unwind: bb10];
+          _8 = opaque::<&mut impl Sized>(move _9) -> [return: bb4, unwind: bb14];
       }
   
       bb4: {
@@ -61,7 +79,7 @@
           StorageLive(_10);
           StorageLive(_11);
           _11 = &raw const _1;
-          _10 = opaque::<*const impl Sized>(move _11) -> [return: bb5, unwind: bb10];
+          _10 = opaque::<*const impl Sized>(move _11) -> [return: bb5, unwind: bb14];
       }
   
       bb5: {
@@ -70,7 +88,7 @@
           StorageLive(_12);
           StorageLive(_13);
           _13 = &raw const _1;
-          _12 = opaque::<*const impl Sized>(move _13) -> [return: bb6, unwind: bb10];
+          _12 = opaque::<*const impl Sized>(move _13) -> [return: bb6, unwind: bb14];
       }
   
       bb6: {
@@ -79,7 +97,7 @@
           StorageLive(_14);
           StorageLive(_15);
           _15 = &raw mut _1;
-          _14 = opaque::<*mut impl Sized>(move _15) -> [return: bb7, unwind: bb10];
+          _14 = opaque::<*mut impl Sized>(move _15) -> [return: bb7, unwind: bb14];
       }
   
       bb7: {
@@ -88,25 +106,82 @@
           StorageLive(_16);
           StorageLive(_17);
           _17 = &raw mut _1;
-          _16 = opaque::<*mut impl Sized>(move _17) -> [return: bb8, unwind: bb10];
+          _16 = opaque::<*mut impl Sized>(move _17) -> [return: bb8, unwind: bb14];
       }
   
       bb8: {
           StorageDead(_17);
           StorageDead(_16);
-          _0 = const ();
-          drop(_1) -> [return: bb9, unwind: bb11];
+-         StorageLive(_18);
++         nop;
+          _18 = &mut _1;
+          StorageLive(_19);
+          StorageLive(_20);
+          StorageLive(_21);
+-         _21 = move _18;
+-         _20 = S::<&mut impl Sized>(move _21);
++         _21 = _18;
++         _20 = S::<&mut impl Sized>(_18);
+          StorageDead(_21);
+-         _19 = move (_20.0: &mut impl Sized);
++         _19 = _18;
+          StorageDead(_20);
+          StorageLive(_22);
+          StorageLive(_23);
+-         _23 = &(*_19);
++         _23 = &(*_18);
+          _22 = opaque::<&impl Sized>(move _23) -> [return: bb9, unwind: bb14];
       }
   
       bb9: {
+          StorageDead(_23);
+          StorageDead(_22);
+          StorageLive(_24);
+          StorageLive(_25);
+-         _25 = &mut (*_19);
++         _25 = &mut (*_18);
+          _24 = opaque::<&mut impl Sized>(move _25) -> [return: bb10, unwind: bb14];
+      }
+  
+      bb10: {
+          StorageDead(_25);
+          StorageDead(_24);
+          StorageLive(_26);
+          StorageLive(_27);
+-         _27 = &raw const (*_19);
++         _27 = &raw const (*_18);
+          _26 = opaque::<*const impl Sized>(move _27) -> [return: bb11, unwind: bb14];
+      }
+  
+      bb11: {
+          StorageDead(_27);
+          StorageDead(_26);
+          StorageLive(_28);
+          StorageLive(_29);
+-         _29 = &raw mut (*_19);
++         _29 = &raw mut (*_18);
+          _28 = opaque::<*mut impl Sized>(move _29) -> [return: bb12, unwind: bb14];
+      }
+  
+      bb12: {
+          StorageDead(_29);
+          StorageDead(_28);
+          _0 = const ();
+          StorageDead(_19);
+-         StorageDead(_18);
++         nop;
+          drop(_1) -> [return: bb13, unwind: bb15];
+      }
+  
+      bb13: {
           return;
       }
   
-      bb10 (cleanup): {
-          drop(_1) -> [return: bb11, unwind terminate(cleanup)];
+      bb14 (cleanup): {
+          drop(_1) -> [return: bb15, unwind terminate(cleanup)];
       }
   
-      bb11 (cleanup): {
+      bb15 (cleanup): {
           resume;
       }
   }
diff --git a/tests/mir-opt/gvn.repeat.GVN.panic-abort.diff b/tests/mir-opt/gvn.repeat.GVN.panic-abort.diff
new file mode 100644
index 00000000000..37915f8578d
--- /dev/null
+++ b/tests/mir-opt/gvn.repeat.GVN.panic-abort.diff
@@ -0,0 +1,79 @@
+- // MIR for `repeat` before GVN
++ // MIR for `repeat` after GVN
+  
+  fn repeat() -> () {
+      let mut _0: ();
+      let _1: i32;
+      let mut _3: i32;
+      let mut _4: i32;
+      let mut _5: i32;
+      let mut _6: i32;
+      let mut _7: i32;
+      let mut _8: i32;
+      let mut _9: i32;
+      let mut _10: i32;
+      let mut _11: i32;
+      let mut _12: i32;
+      scope 1 {
+          debug val => _1;
+          let _2: [i32; 10];
+          scope 2 {
+              debug array => _2;
+          }
+      }
+  
+      bb0: {
+-         StorageLive(_1);
++         nop;
+          _1 = const 5_i32;
+          StorageLive(_2);
+          StorageLive(_3);
+-         _3 = _1;
++         _3 = const 5_i32;
+          StorageLive(_4);
+-         _4 = _1;
++         _4 = const 5_i32;
+          StorageLive(_5);
+-         _5 = _1;
++         _5 = const 5_i32;
+          StorageLive(_6);
+-         _6 = _1;
++         _6 = const 5_i32;
+          StorageLive(_7);
+-         _7 = _1;
++         _7 = const 5_i32;
+          StorageLive(_8);
+-         _8 = _1;
++         _8 = const 5_i32;
+          StorageLive(_9);
+-         _9 = _1;
++         _9 = const 5_i32;
+          StorageLive(_10);
+-         _10 = _1;
++         _10 = const 5_i32;
+          StorageLive(_11);
+-         _11 = _1;
++         _11 = const 5_i32;
+          StorageLive(_12);
+-         _12 = _1;
+-         _2 = [move _3, move _4, move _5, move _6, move _7, move _8, move _9, move _10, move _11, move _12];
++         _12 = const 5_i32;
++         _2 = [const 5_i32; 10];
+          StorageDead(_12);
+          StorageDead(_11);
+          StorageDead(_10);
+          StorageDead(_9);
+          StorageDead(_8);
+          StorageDead(_7);
+          StorageDead(_6);
+          StorageDead(_5);
+          StorageDead(_4);
+          StorageDead(_3);
+          _0 = const ();
+          StorageDead(_2);
+-         StorageDead(_1);
++         nop;
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/gvn.repeat.GVN.panic-unwind.diff b/tests/mir-opt/gvn.repeat.GVN.panic-unwind.diff
new file mode 100644
index 00000000000..37915f8578d
--- /dev/null
+++ b/tests/mir-opt/gvn.repeat.GVN.panic-unwind.diff
@@ -0,0 +1,79 @@
+- // MIR for `repeat` before GVN
++ // MIR for `repeat` after GVN
+  
+  fn repeat() -> () {
+      let mut _0: ();
+      let _1: i32;
+      let mut _3: i32;
+      let mut _4: i32;
+      let mut _5: i32;
+      let mut _6: i32;
+      let mut _7: i32;
+      let mut _8: i32;
+      let mut _9: i32;
+      let mut _10: i32;
+      let mut _11: i32;
+      let mut _12: i32;
+      scope 1 {
+          debug val => _1;
+          let _2: [i32; 10];
+          scope 2 {
+              debug array => _2;
+          }
+      }
+  
+      bb0: {
+-         StorageLive(_1);
++         nop;
+          _1 = const 5_i32;
+          StorageLive(_2);
+          StorageLive(_3);
+-         _3 = _1;
++         _3 = const 5_i32;
+          StorageLive(_4);
+-         _4 = _1;
++         _4 = const 5_i32;
+          StorageLive(_5);
+-         _5 = _1;
++         _5 = const 5_i32;
+          StorageLive(_6);
+-         _6 = _1;
++         _6 = const 5_i32;
+          StorageLive(_7);
+-         _7 = _1;
++         _7 = const 5_i32;
+          StorageLive(_8);
+-         _8 = _1;
++         _8 = const 5_i32;
+          StorageLive(_9);
+-         _9 = _1;
++         _9 = const 5_i32;
+          StorageLive(_10);
+-         _10 = _1;
++         _10 = const 5_i32;
+          StorageLive(_11);
+-         _11 = _1;
++         _11 = const 5_i32;
+          StorageLive(_12);
+-         _12 = _1;
+-         _2 = [move _3, move _4, move _5, move _6, move _7, move _8, move _9, move _10, move _11, move _12];
++         _12 = const 5_i32;
++         _2 = [const 5_i32; 10];
+          StorageDead(_12);
+          StorageDead(_11);
+          StorageDead(_10);
+          StorageDead(_9);
+          StorageDead(_8);
+          StorageDead(_7);
+          StorageDead(_6);
+          StorageDead(_5);
+          StorageDead(_4);
+          StorageDead(_3);
+          _0 = const ();
+          StorageDead(_2);
+-         StorageDead(_1);
++         nop;
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/gvn.repeated_index.GVN.panic-abort.diff b/tests/mir-opt/gvn.repeated_index.GVN.panic-abort.diff
index 4c29523d6b2..d937902e891 100644
--- a/tests/mir-opt/gvn.repeated_index.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.repeated_index.GVN.panic-abort.diff
@@ -23,11 +23,11 @@
   
       bb0: {
           StorageLive(_3);
--         StorageLive(_4);
--         _4 = _1;
+          StorageLive(_4);
+          _4 = _1;
 -         _3 = [move _4; N];
--         StorageDead(_4);
 +         _3 = [_1; N];
+          StorageDead(_4);
           StorageLive(_5);
           StorageLive(_6);
           StorageLive(_7);
@@ -40,8 +40,10 @@
       }
   
       bb1: {
-          _6 = _3[_7];
-          _5 = opaque::<T>(move _6) -> [return: bb2, unwind unreachable];
+-         _6 = _3[_7];
+-         _5 = opaque::<T>(move _6) -> [return: bb2, unwind unreachable];
++         _6 = _1;
++         _5 = opaque::<T>(_1) -> [return: bb2, unwind unreachable];
       }
   
       bb2: {
@@ -55,13 +57,16 @@
 -         _13 = Len(_3);
 -         _14 = Lt(_12, _13);
 -         assert(move _14, "index out of bounds: the length is {} but the index is {}", move _13, _12) -> [success: bb3, unwind unreachable];
++         _13 = _8;
 +         _14 = Lt(_2, _8);
 +         assert(move _14, "index out of bounds: the length is {} but the index is {}", _8, _2) -> [success: bb3, unwind unreachable];
       }
   
       bb3: {
-          _11 = _3[_12];
-          _10 = opaque::<T>(move _11) -> [return: bb4, unwind unreachable];
+-         _11 = _3[_12];
+-         _10 = opaque::<T>(move _11) -> [return: bb4, unwind unreachable];
++         _11 = _1;
++         _10 = opaque::<T>(_1) -> [return: bb4, unwind unreachable];
       }
   
       bb4: {
diff --git a/tests/mir-opt/gvn.repeated_index.GVN.panic-unwind.diff b/tests/mir-opt/gvn.repeated_index.GVN.panic-unwind.diff
index e44f54cf3cf..dd4d24b12ea 100644
--- a/tests/mir-opt/gvn.repeated_index.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.repeated_index.GVN.panic-unwind.diff
@@ -23,11 +23,11 @@
   
       bb0: {
           StorageLive(_3);
--         StorageLive(_4);
--         _4 = _1;
+          StorageLive(_4);
+          _4 = _1;
 -         _3 = [move _4; N];
--         StorageDead(_4);
 +         _3 = [_1; N];
+          StorageDead(_4);
           StorageLive(_5);
           StorageLive(_6);
           StorageLive(_7);
@@ -40,8 +40,10 @@
       }
   
       bb1: {
-          _6 = _3[_7];
-          _5 = opaque::<T>(move _6) -> [return: bb2, unwind continue];
+-         _6 = _3[_7];
+-         _5 = opaque::<T>(move _6) -> [return: bb2, unwind continue];
++         _6 = _1;
++         _5 = opaque::<T>(_1) -> [return: bb2, unwind continue];
       }
   
       bb2: {
@@ -55,13 +57,16 @@
 -         _13 = Len(_3);
 -         _14 = Lt(_12, _13);
 -         assert(move _14, "index out of bounds: the length is {} but the index is {}", move _13, _12) -> [success: bb3, unwind continue];
++         _13 = _8;
 +         _14 = Lt(_2, _8);
 +         assert(move _14, "index out of bounds: the length is {} but the index is {}", _8, _2) -> [success: bb3, unwind continue];
       }
   
       bb3: {
-          _11 = _3[_12];
-          _10 = opaque::<T>(move _11) -> [return: bb4, unwind continue];
+-         _11 = _3[_12];
+-         _10 = opaque::<T>(move _11) -> [return: bb4, unwind continue];
++         _11 = _1;
++         _10 = opaque::<T>(_1) -> [return: bb4, unwind continue];
       }
   
       bb4: {
diff --git a/tests/mir-opt/gvn.rs b/tests/mir-opt/gvn.rs
index a85e2ae368b..10a66ced026 100644
--- a/tests/mir-opt/gvn.rs
+++ b/tests/mir-opt/gvn.rs
@@ -1,55 +1,133 @@
 // unit-test: GVN
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+// only-64bit
 
 #![feature(raw_ref_op)]
 #![feature(rustc_attrs)]
+#![feature(custom_mir)]
+#![feature(core_intrinsics)]
 #![allow(unconditional_panic)]
 
+use std::intrinsics::mir::*;
+use std::mem::transmute;
+
 struct S<T>(T);
 
 fn subexpression_elimination(x: u64, y: u64, mut z: u64) {
+    // CHECK-LABEL: fn subexpression_elimination(
+
+    // CHECK: [[add:_.*]] = Add(_1, _2);
+    // CHECK: opaque::<u64>([[add]])
     opaque(x + y);
+    // CHECK: [[mul:_.*]] = Mul(_1, _2);
+    // CHECK: opaque::<u64>([[mul]])
     opaque(x * y);
+    // CHECK: [[sub:_.*]] = Sub(_1, _2);
+    // CHECK: opaque::<u64>([[sub]])
     opaque(x - y);
+    // CHECK: [[div:_.*]] = Div(_1, _2);
+    // CHECK: opaque::<u64>([[div]])
     opaque(x / y);
+    // CHECK: [[rem:_.*]] = Rem(_1, _2);
+    // CHECK: opaque::<u64>([[rem]])
     opaque(x % y);
+    // CHECK: [[and:_.*]] = BitAnd(_1, _2);
+    // CHECK: opaque::<u64>([[and]])
     opaque(x & y);
+    // CHECK: [[or:_.*]] = BitOr(_1, _2);
+    // CHECK: opaque::<u64>([[or]])
     opaque(x | y);
+    // CHECK: [[xor:_.*]] = BitXor(_1, _2);
+    // CHECK: opaque::<u64>([[xor]])
     opaque(x ^ y);
+    // CHECK: [[shl:_.*]] = Shl(_1, _2);
+    // CHECK: opaque::<u64>([[shl]])
     opaque(x << y);
+    // CHECK: [[shr:_.*]] = Shr(_1, _2);
+    // CHECK: opaque::<u64>([[shr]])
     opaque(x >> y);
+    // CHECK: [[int:_.*]] = _1 as u32 (IntToInt);
+    // CHECK: opaque::<u32>([[int]])
     opaque(x as u32);
+    // CHECK: [[float:_.*]] = _1 as f32 (IntToFloat);
+    // CHECK: opaque::<f32>([[float]])
     opaque(x as f32);
+    // CHECK: [[wrap:_.*]] = S::<u64>(_1);
+    // CHECK: opaque::<S<u64>>([[wrap]])
     opaque(S(x));
+    // CHECK: opaque::<u64>(_1)
     opaque(S(x).0);
 
     // Those are duplicates to substitute somehow.
-    opaque((x + y) + z);
-    opaque((x * y) + z);
-    opaque((x - y) + z);
-    opaque((x / y) + z);
-    opaque((x % y) + z);
-    opaque((x & y) + z);
-    opaque((x | y) + z);
-    opaque((x ^ y) + z);
-    opaque((x << y) + z);
-    opaque((x >> y) + z);
+    // CHECK: opaque::<u64>([[add]])
+    opaque(x + y);
+    // CHECK: opaque::<u64>([[mul]])
+    opaque(x * y);
+    // CHECK: opaque::<u64>([[sub]])
+    opaque(x - y);
+    // CHECK: opaque::<u64>([[div]])
+    opaque(x / y);
+    // CHECK: opaque::<u64>([[rem]])
+    opaque(x % y);
+    // CHECK: opaque::<u64>([[and]])
+    opaque(x & y);
+    // CHECK: opaque::<u64>([[or]])
+    opaque(x | y);
+    // CHECK: opaque::<u64>([[xor]])
+    opaque(x ^ y);
+    // CHECK: opaque::<u64>([[shl]])
+    opaque(x << y);
+    // CHECK: opaque::<u64>([[shr]])
+    opaque(x >> y);
+    // CHECK: opaque::<u32>([[int]])
+    opaque(x as u32);
+    // CHECK: opaque::<f32>([[float]])
+    opaque(x as f32);
+    // CHECK: opaque::<S<u64>>([[wrap]])
     opaque(S(x));
+    // CHECK: opaque::<u64>(_1)
     opaque(S(x).0);
 
+    // We can substitute through a complex expression.
+    // CHECK: [[compound:_.*]] = Sub([[mul]], _2);
+    // CHECK: opaque::<u64>([[compound]])
+    // CHECK: opaque::<u64>([[compound]])
+    opaque((x * y) - y);
+    opaque((x * y) - y);
+
     // We can substitute through an immutable reference too.
+    // CHECK: [[ref:_.*]] = &_3;
+    // CHECK: [[deref:_.*]] = (*[[ref]]);
+    // CHECK: [[addref:_.*]] = Add([[deref]], _1);
+    // CHECK: opaque::<u64>([[addref]])
+    // CHECK: opaque::<u64>([[addref]])
     let a = &z;
     opaque(*a + x);
     opaque(*a + x);
 
     // But not through a mutable reference or a pointer.
+    // CHECK: [[mut:_.*]] = &mut _3;
+    // CHECK: [[addmut:_.*]] = Add(
+    // CHECK: opaque::<u64>(move [[addmut]])
+    // CHECK: [[addmut2:_.*]] = Add(
+    // CHECK: opaque::<u64>(move [[addmut2]])
     let b = &mut z;
     opaque(*b + x);
     opaque(*b + x);
     unsafe {
+        // CHECK: [[raw:_.*]] = &raw const _3;
+        // CHECK: [[addraw:_.*]] = Add(
+        // CHECK: opaque::<u64>(move [[addraw]])
+        // CHECK: [[addraw2:_.*]] = Add(
+        // CHECK: opaque::<u64>(move [[addraw2]])
         let c = &raw const z;
         opaque(*c + x);
         opaque(*c + x);
+        // CHECK: [[ptr:_.*]] = &raw mut _3;
+        // CHECK: [[addptr:_.*]] = Add(
+        // CHECK: opaque::<u64>(move [[addptr]])
+        // CHECK: [[addptr2:_.*]] = Add(
+        // CHECK: opaque::<u64>(move [[addptr2]])
         let d = &raw mut z;
         opaque(*d + x);
         opaque(*d + x);
@@ -57,13 +135,21 @@ fn subexpression_elimination(x: u64, y: u64, mut z: u64) {
 
     // We can substitute again, but not with the earlier computations.
     // Important: `e` is not `a`!
+    // CHECK: [[ref2:_.*]] = &_3;
+    // CHECK: [[deref2:_.*]] = (*[[ref2]]);
+    // CHECK: [[addref2:_.*]] = Add([[deref2]], _1);
+    // CHECK: opaque::<u64>([[addref2]])
+    // CHECK: opaque::<u64>([[addref2]])
     let e = &z;
     opaque(*e + x);
     opaque(*e + x);
-
 }
 
 fn wrap_unwrap<T: Copy>(x: T) -> T {
+    // CHECK-LABEL: fn wrap_unwrap(
+    // CHECK: [[some:_.*]] = Option::<T>::Some(_1);
+    // CHECK: switchInt(const 1_isize)
+    // CHECK: _0 = _1;
     match Some(x) {
         Some(y) => y,
         None => panic!(),
@@ -71,163 +157,464 @@ fn wrap_unwrap<T: Copy>(x: T) -> T {
 }
 
 fn repeated_index<T: Copy, const N: usize>(x: T, idx: usize) {
+    // CHECK-LABEL: fn repeated_index(
+    // CHECK: [[a:_.*]] = [_1; N];
     let a = [x; N];
+    // CHECK: opaque::<T>(_1)
     opaque(a[0]);
+    // CHECK: opaque::<T>(_1)
     opaque(a[idx]);
 }
 
+/// Verify symbolic integer arithmetic simplifications.
 fn arithmetic(x: u64) {
+    // CHECK-LABEL: fn arithmetic(
+    // CHECK: [[add:_.*]] = Add(_1, const 0_u64);
+    // CHECK: opaque::<u64>(move [[add]])
     opaque(x + 0);
+    // CHECK: [[sub:_.*]] = Sub(_1, const 0_u64);
+    // CHECK: opaque::<u64>(move [[sub]])
     opaque(x - 0);
+    // CHECK: [[mul0:_.*]] = Mul(_1, const 0_u64);
+    // CHECK: opaque::<u64>(move [[mul0]])
     opaque(x * 0);
+    // CHECK: [[mul1:_.*]] = Mul(_1, const 1_u64);
+    // CHECK: opaque::<u64>(move [[mul1]])
     opaque(x * 1);
+    // CHECK: [[div0:_.*]] = Div(_1, const 0_u64);
+    // CHECK: opaque::<u64>(move [[div0]])
     opaque(x / 0);
+    // CHECK: [[div1:_.*]] = Div(_1, const 1_u64);
+    // CHECK: opaque::<u64>(move [[div1]])
     opaque(x / 1);
+    // CHECK: [[zdiv:_.*]] = Div(const 0_u64, _1);
+    // CHECK: opaque::<u64>(move [[zdiv]])
     opaque(0 / x);
+    // CHECK: [[odiv:_.*]] = Div(const 1_u64, _1);
+    // CHECK: opaque::<u64>(move [[odiv]])
     opaque(1 / x);
+    // CHECK: [[rem0:_.*]] = Rem(_1, const 0_u64);
+    // CHECK: opaque::<u64>(move [[rem0]])
     opaque(x % 0);
+    // CHECK: [[rem1:_.*]] = Rem(_1, const 1_u64);
+    // CHECK: opaque::<u64>(move [[rem1]])
     opaque(x % 1);
+    // CHECK: [[zrem:_.*]] = Rem(const 0_u64, _1);
+    // CHECK: opaque::<u64>(move [[zrem]])
     opaque(0 % x);
+    // CHECK: [[orem:_.*]] = Rem(const 1_u64, _1);
+    // CHECK: opaque::<u64>(move [[orem]])
     opaque(1 % x);
+    // CHECK: [[and:_.*]] = BitAnd(_1, const 0_u64);
+    // CHECK: opaque::<u64>(move [[and]])
     opaque(x & 0);
+    // CHECK: [[or:_.*]] = BitOr(_1, const 0_u64);
+    // CHECK: opaque::<u64>(move [[or]])
     opaque(x | 0);
+    // CHECK: [[xor:_.*]] = BitXor(_1, const 0_u64);
+    // CHECK: opaque::<u64>(move [[xor]])
     opaque(x ^ 0);
+    // CHECK: [[shr:_.*]] = Shr(_1, const 0_i32);
+    // CHECK: opaque::<u64>(move [[shr]])
     opaque(x >> 0);
+    // CHECK: [[shl:_.*]] = Shl(_1, const 0_i32);
+    // CHECK: opaque::<u64>(move [[shl]])
     opaque(x << 0);
 }
 
+fn comparison(x: u64, y: u64) {
+    // CHECK-LABEL: fn comparison(
+    // CHECK: [[eqxx:_.*]] = Eq(_1, _1);
+    // CHECK: opaque::<bool>(move [[eqxx]])
+    opaque(x == x);
+    // CHECK: [[nexx:_.*]] = Ne(_1, _1);
+    // CHECK: opaque::<bool>(move [[nexx]])
+    opaque(x != x);
+    // CHECK: [[eqxy:_.*]] = Eq(_1, _2);
+    // CHECK: opaque::<bool>(move [[eqxy]])
+    opaque(x == y);
+    // CHECK: [[nexy:_.*]] = Ne(_1, _2);
+    // CHECK: opaque::<bool>(move [[nexy]])
+    opaque(x != y);
+}
+
+/// Verify symbolic integer arithmetic simplifications on checked ops.
 #[rustc_inherit_overflow_checks]
 fn arithmetic_checked(x: u64) {
+    // CHECK-LABEL: fn arithmetic_checked(
+    // CHECK: [[cadd:_.*]] = CheckedAdd(_1, const 0_u64);
+    // CHECK: [[add:_.*]] = move ([[cadd]].0: u64);
+    // CHECK: opaque::<u64>(move [[add]])
     opaque(x + 0);
+    // CHECK: [[csub:_.*]] = CheckedSub(_1, const 0_u64);
+    // CHECK: [[sub:_.*]] = move ([[csub]].0: u64);
+    // CHECK: opaque::<u64>(move [[sub]])
     opaque(x - 0);
+    // CHECK: [[cmul0:_.*]] = CheckedMul(_1, const 0_u64);
+    // CHECK: [[mul0:_.*]] = move ([[cmul0]].0: u64);
+    // CHECK: opaque::<u64>(move [[mul0]])
     opaque(x * 0);
+    // CHECK: [[cmul1:_.*]] = CheckedMul(_1, const 1_u64);
+    // CHECK: [[mul1:_.*]] = move ([[cmul1]].0: u64);
+    // CHECK: opaque::<u64>(move [[mul1]])
     opaque(x * 1);
-    opaque(x / 0);
-    opaque(x / 1);
-    opaque(0 / x);
-    opaque(1 / x);
-    opaque(x % 0);
-    opaque(x % 1);
-    opaque(0 % x);
-    opaque(1 % x);
-    opaque(x & 0);
-    opaque(x | 0);
-    opaque(x ^ 0);
-    opaque(x >> 0);
-    opaque(x << 0);
 }
 
+/// Verify that we do not apply arithmetic simplifications on floats.
 fn arithmetic_float(x: f64) {
+    // CHECK-LABEL: fn arithmetic_float(
+    // CHECK: [[add:_.*]] = Add(_1, const 0f64);
+    // CHECK: opaque::<f64>(move [[add]])
     opaque(x + 0.);
+    // CHECK: [[sub:_.*]] = Sub(_1, const 0f64);
+    // CHECK: opaque::<f64>(move [[sub]])
     opaque(x - 0.);
+    // CHECK: [[mul:_.*]] = Mul(_1, const 0f64);
+    // CHECK: opaque::<f64>(move [[mul]])
     opaque(x * 0.);
+    // CHECK: [[div0:_.*]] = Div(_1, const 0f64);
+    // CHECK: opaque::<f64>(move [[div0]])
     opaque(x / 0.);
+    // CHECK: [[zdiv:_.*]] = Div(const 0f64, _1);
+    // CHECK: opaque::<f64>(move [[zdiv]])
     opaque(0. / x);
+    // CHECK: [[rem0:_.*]] = Rem(_1, const 0f64);
+    // CHECK: opaque::<f64>(move [[rem0]])
     opaque(x % 0.);
+    // CHECK: [[zrem:_.*]] = Rem(const 0f64, _1);
+    // CHECK: opaque::<f64>(move [[zrem]])
     opaque(0. % x);
     // Those are not simplifiable to `true`/`false`, thanks to NaNs.
+    // CHECK: [[eq:_.*]] = Eq(_1, _1);
+    // CHECK: opaque::<bool>(move [[eq]])
     opaque(x == x);
+    // CHECK: [[ne:_.*]] = Ne(_1, _1);
+    // CHECK: opaque::<bool>(move [[ne]])
     opaque(x != x);
 }
 
 fn cast() {
+    // CHECK-LABEL: fn cast(
     let i = 1_i64;
     let u = 1_u64;
     let f = 1_f64;
+    // CHECK: opaque::<u8>(const 1_u8)
     opaque(i as u8);
+    // CHECK: opaque::<u16>(const 1_u16)
     opaque(i as u16);
+    // CHECK: opaque::<u32>(const 1_u32)
     opaque(i as u32);
+    // CHECK: opaque::<u64>(const 1_u64)
     opaque(i as u64);
+    // CHECK: opaque::<i8>(const 1_i8)
     opaque(i as i8);
+    // CHECK: opaque::<i16>(const 1_i16)
     opaque(i as i16);
+    // CHECK: opaque::<i32>(const 1_i32)
     opaque(i as i32);
+    // CHECK: opaque::<i64>(const 1_i64)
     opaque(i as i64);
+    // CHECK: opaque::<f32>(const 1f32)
     opaque(i as f32);
+    // CHECK: opaque::<f64>(const 1f64)
     opaque(i as f64);
+    // CHECK: opaque::<u8>(const 1_u8)
     opaque(u as u8);
+    // CHECK: opaque::<u16>(const 1_u16)
     opaque(u as u16);
+    // CHECK: opaque::<u32>(const 1_u32)
     opaque(u as u32);
+    // CHECK: opaque::<u64>(const 1_u64)
     opaque(u as u64);
+    // CHECK: opaque::<i8>(const 1_i8)
     opaque(u as i8);
+    // CHECK: opaque::<i16>(const 1_i16)
     opaque(u as i16);
+    // CHECK: opaque::<i32>(const 1_i32)
     opaque(u as i32);
+    // CHECK: opaque::<i64>(const 1_i64)
     opaque(u as i64);
+    // CHECK: opaque::<f32>(const 1f32)
     opaque(u as f32);
+    // CHECK: opaque::<f64>(const 1f64)
     opaque(u as f64);
+    // CHECK: opaque::<u8>(const 1_u8)
     opaque(f as u8);
+    // CHECK: opaque::<u16>(const 1_u16)
     opaque(f as u16);
+    // CHECK: opaque::<u32>(const 1_u32)
     opaque(f as u32);
+    // CHECK: opaque::<u64>(const 1_u64)
     opaque(f as u64);
+    // CHECK: opaque::<i8>(const 1_i8)
     opaque(f as i8);
+    // CHECK: opaque::<i16>(const 1_i16)
     opaque(f as i16);
+    // CHECK: opaque::<i32>(const 1_i32)
     opaque(f as i32);
+    // CHECK: opaque::<i64>(const 1_i64)
     opaque(f as i64);
+    // CHECK: opaque::<f32>(const 1f32)
     opaque(f as f32);
+    // CHECK: opaque::<f64>(const 1f64)
     opaque(f as f64);
 }
 
 fn multiple_branches(t: bool, x: u8, y: u8) {
+    // CHECK-LABEL: fn multiple_branches(
+    // CHECK: switchInt(_1) -> [0: [[bbf:bb.*]], otherwise: [[bbt:bb.*]]];
     if t {
-        opaque(x + y); // a
-        opaque(x + y); // should reuse a
+        // CHECK: [[bbt]]: {
+        // CHECK: [[a:_.*]] = Add(_2, _3);
+        // CHECK: opaque::<u8>([[a]])
+        // CHECK: opaque::<u8>([[a]])
+        // CHECK: goto -> [[bbc:bb.*]];
+        opaque(x + y);
+        opaque(x + y);
     } else {
-        opaque(x + y); // b
-        opaque(x + y); // shoud reuse b
+        // CHECK: [[bbf]]: {
+        // CHECK: [[b:_.*]] = Add(_2, _3);
+        // CHECK: opaque::<u8>([[b]])
+        // CHECK: opaque::<u8>([[b]])
+        // CHECK: goto -> [[bbc:bb.*]];
+        opaque(x + y);
+        opaque(x + y);
     }
-    opaque(x + y); // c
+    // Neither `a` nor `b` dominate `c`, so we cannot reuse any of them.
+    // CHECK: [[bbc]]: {
+    // CHECK: [[c:_.*]] = Add(_2, _3);
+    // CHECK: opaque::<u8>([[c]])
+    opaque(x + y);
+
+    // `c` dominates both calls, so we can reuse it.
     if t {
-        opaque(x + y); // should reuse c
+        // CHECK: opaque::<u8>([[c]])
+        opaque(x + y);
     } else {
-        opaque(x + y); // should reuse c
+        // CHECK: opaque::<u8>([[c]])
+        opaque(x + y);
     }
 }
 
+/// Verify that we do not reuse a `&raw? mut?` rvalue.
 fn references(mut x: impl Sized) {
+    // CHECK-LABEL: fn references(
+    // CHECK: [[ref1:_.*]] = &_1;
+    // CHECK: opaque::<&impl Sized>(move [[ref1]])
     opaque(&x);
-    opaque(&x); // should not reuse a
+    // CHECK: [[ref2:_.*]] = &_1;
+    // CHECK: opaque::<&impl Sized>(move [[ref2]])
+    opaque(&x);
+    // CHECK: [[ref3:_.*]] = &mut _1;
+    // CHECK: opaque::<&mut impl Sized>(move [[ref3]])
+    opaque(&mut x);
+    // CHECK: [[ref4:_.*]] = &mut _1;
+    // CHECK: opaque::<&mut impl Sized>(move [[ref4]])
     opaque(&mut x);
-    opaque(&mut x); // should not reuse a
+    // CHECK: [[ref5:_.*]] = &raw const _1;
+    // CHECK: opaque::<*const impl Sized>(move [[ref5]])
     opaque(&raw const x);
-    opaque(&raw const x); // should not reuse a
+    // CHECK: [[ref6:_.*]] = &raw const _1;
+    // CHECK: opaque::<*const impl Sized>(move [[ref6]])
+    opaque(&raw const x);
+    // CHECK: [[ref7:_.*]] = &raw mut _1;
+    // CHECK: opaque::<*mut impl Sized>(move [[ref7]])
+    opaque(&raw mut x);
+    // CHECK: [[ref8:_.*]] = &raw mut _1;
+    // CHECK: opaque::<*mut impl Sized>(move [[ref8]])
     opaque(&raw mut x);
-    opaque(&raw mut x); // should not reuse a
+
+    let r = &mut x;
+    let s = S(r).0; // Obfuscate `r`. Following lines should still reborrow `r`.
+    // CHECK: [[ref9:_.*]] = &mut _1;
+    // CHECK: [[ref10:_.*]] = &(*[[ref9]]);
+    // CHECK: opaque::<&impl Sized>(move [[ref10]])
+    opaque(&*s);
+    // CHECK: [[ref11:_.*]] = &mut (*[[ref9]]);
+    // CHECK: opaque::<&mut impl Sized>(move [[ref11]])
+    opaque(&mut *s);
+    // CHECK: [[ref12:_.*]] = &raw const (*[[ref9]]);
+    // CHECK: opaque::<*const impl Sized>(move [[ref12]])
+    opaque(&raw const *s);
+    // CHECK: [[ref12:_.*]] = &raw mut (*[[ref9]]);
+    // CHECK: opaque::<*mut impl Sized>(move [[ref12]])
+    opaque(&raw mut *s);
 }
 
 fn dereferences(t: &mut u32, u: &impl Copy, s: &S<u32>) {
+    // CHECK-LABEL: fn dereferences(
+
+    // Do not reuse dereferences of `&mut`.
+    // CHECK: [[st1:_.*]] = (*_1);
+    // CHECK: opaque::<u32>(move [[st1]])
+    // CHECK: [[st2:_.*]] = (*_1);
+    // CHECK: opaque::<u32>(move [[st2]])
     opaque(*t);
-    opaque(*t); // this cannot reuse a, as x is &mut.
+    opaque(*t);
+
+    // Do not reuse dereferences of `*const`.
+    // CHECK: [[raw:_.*]] = &raw const (*_1);
+    // CHECK: [[st3:_.*]] = (*[[raw]]);
+    // CHECK: opaque::<u32>(move [[st3]])
+    // CHECK: [[st4:_.*]] = (*[[raw]]);
+    // CHECK: opaque::<u32>(move [[st4]])
     let z = &raw const *t;
     unsafe { opaque(*z) };
-    unsafe { opaque(*z) }; // this cannot reuse a, as x is *const.
+    unsafe { opaque(*z) };
+
+    // Do not reuse dereferences of `*mut`.
+    // CHECK: [[ptr:_.*]] = &raw mut (*_1);
+    // CHECK: [[st5:_.*]] = (*[[ptr]]);
+    // CHECK: opaque::<u32>(move [[st5]])
+    // CHECK: [[st6:_.*]] = (*[[ptr]]);
+    // CHECK: opaque::<u32>(move [[st6]])
     let z = &raw mut *t;
     unsafe { opaque(*z) };
-    unsafe { opaque(*z) }; // this cannot reuse a, as x is *mut.
+    unsafe { opaque(*z) };
+
+    // We can reuse dereferences of `&Freeze`.
+    // CHECK: [[ref:_.*]] = &(*_1);
+    // CHECK: [[st7:_.*]] = (*[[ref]]);
+    // CHECK: opaque::<u32>([[st7]])
+    // CHECK: opaque::<u32>([[st7]])
     let z = &*t;
     opaque(*z);
-    opaque(*z); // this can reuse, as `z` is immutable ref, Freeze and Copy.
-    opaque(&*z); // but not for a reborrow.
+    opaque(*z);
+    // But not in reborrows.
+    // CHECK: [[reborrow:_.*]] = &(*[[ref]]);
+    // CHECK: opaque::<&u32>(move [[reborrow]])
+    opaque(&*z);
+
+    // `*u` is not Freeze, so we cannot reuse.
+    // CHECK: [[st8:_.*]] = (*_2);
+    // CHECK: opaque::<impl Copy>(move [[st8]])
+    // CHECK: [[st9:_.*]] = (*_2);
+    // CHECK: opaque::<impl Copy>(move [[st9]])
     opaque(*u);
-    opaque(*u); // this cannot reuse, as `z` is not Freeze.
+    opaque(*u);
+
+    // `*s` is not Copy, by `(*s).0` is, so we can reuse.
+    // CHECK: [[st10:_.*]] = ((*_3).0: u32);
+    // CHECK: opaque::<u32>([[st10]])
+    // CHECK: opaque::<u32>([[st10]])
+    opaque(s.0);
     opaque(s.0);
-    opaque(s.0); // *s is not Copy, by (*s).0 is, so we can reuse.
 }
 
 fn slices() {
+    // CHECK-LABEL: fn slices(
+    // CHECK: {{_.*}} = const "
+    // CHECK-NOT: {{_.*}} = const "
     let s = "my favourite slice"; // This is a `Const::Slice` in MIR.
     opaque(s);
     let t = s; // This should be the same pointer, so cannot be a `Const::Slice`.
     opaque(t);
     assert_eq!(s.as_ptr(), t.as_ptr());
-    let u = unsafe { std::mem::transmute::<&str, &[u8]>(s) };
+    let u = unsafe { transmute::<&str, &[u8]>(s) };
     opaque(u);
     assert_eq!(s.as_ptr(), u.as_ptr());
 }
 
+#[custom_mir(dialect = "analysis")]
+fn duplicate_slice() -> (bool, bool) {
+    // CHECK-LABEL: fn duplicate_slice(
+    mir!(
+        let au: u128;
+        let bu: u128;
+        let cu: u128;
+        let du: u128;
+        let c: &str;
+        let d: &str;
+        {
+            // CHECK: [[a:_.*]] = (const "a",);
+            // CHECK: [[au:_.*]] = ([[a]].0: &str) as u128 (Transmute);
+            let a = ("a",);
+            Call(au = transmute::<_, u128>(a.0), bb1)
+        }
+        bb1 = {
+            // CHECK: [[c:_.*]] = identity::<&str>(([[a]].0: &str))
+            Call(c = identity(a.0), bb2)
+        }
+        bb2 = {
+            // CHECK: [[cu:_.*]] = [[c]] as u128 (Transmute);
+            Call(cu = transmute::<_, u128>(c), bb3)
+        }
+        bb3 = {
+            // This slice is different from `a.0`. Hence `bu` is not `au`.
+            // CHECK: [[b:_.*]] = const "a";
+            // CHECK: [[bu:_.*]] = [[b]] as u128 (Transmute);
+            let b = "a";
+            Call(bu = transmute::<_, u128>(b), bb4)
+        }
+        bb4 = {
+            // This returns a copy of `b`, which is not `a`.
+            // CHECK: [[d:_.*]] = identity::<&str>([[b]])
+            Call(d = identity(b), bb5)
+        }
+        bb5 = {
+            // CHECK: [[du:_.*]] = [[d]] as u128 (Transmute);
+            Call(du = transmute::<_, u128>(d), bb6)
+        }
+        bb6 = {
+            // `direct` must not fold to `true`, as `indirect` will not.
+            // CHECK: = Eq([[au]], [[bu]]);
+            // CHECK: = Eq([[cu]], [[du]]);
+            let direct = au == bu;
+            let indirect = cu == du;
+            RET = (direct, indirect);
+            Return()
+        }
+    )
+}
+
+fn repeat() {
+    // CHECK-LABEL: fn repeat(
+    // CHECK: = [const 5_i32; 10];
+    let val = 5;
+    let array = [val, val, val, val, val, val, val, val, val, val];
+}
+
+/// Verify that we do not merge fn pointers created by casts.
+fn fn_pointers() {
+    // CHECK-LABEL: fn fn_pointers(
+    // CHECK: [[f:_.*]] = identity::<u8> as fn(u8) -> u8 (PointerCoercion(ReifyFnPointer
+    // CHECK: opaque::<fn(u8) -> u8>([[f]])
+    let f = identity as fn(u8) -> u8;
+    opaque(f);
+    // CHECK: [[g:_.*]] = identity::<u8> as fn(u8) -> u8 (PointerCoercion(ReifyFnPointer
+    // CHECK: opaque::<fn(u8) -> u8>([[g]])
+    let g = identity as fn(u8) -> u8;
+    opaque(g);
+
+    // CHECK: [[cf:_.*]] = const {{.*}} as fn() (PointerCoercion(ClosureFnPointer
+    // CHECK: opaque::<fn()>([[cf]])
+    let closure = || {};
+    let cf = closure as fn();
+    opaque(cf);
+    // CHECK: [[cg:_.*]] = const {{.*}} as fn() (PointerCoercion(ClosureFnPointer
+    // CHECK: opaque::<fn()>([[cg]])
+    let cg = closure as fn();
+    opaque(cg);
+}
+
+/// Verify that we do not create a `ConstValue::Indirect` backed by a static's AllocId.
+#[custom_mir(dialect = "analysis")]
+fn indirect_static() {
+    static A: Option<u8> = None;
+
+    mir!({
+        let ptr = Static(A);
+        let out = Field::<u8>(Variant(*ptr, 1), 0);
+        Return()
+    })
+}
+
 fn main() {
     subexpression_elimination(2, 4, 5);
     wrap_unwrap(5);
     repeated_index::<u32, 7>(5, 3);
     arithmetic(5);
+    comparison(5, 6);
     arithmetic_checked(5);
     arithmetic_float(5.);
     cast();
@@ -235,15 +622,26 @@ fn main() {
     references(5);
     dereferences(&mut 5, &6, &S(7));
     slices();
+    let (direct, indirect) = duplicate_slice();
+    assert_eq!(direct, indirect);
+    repeat();
+    fn_pointers();
+    indirect_static();
 }
 
 #[inline(never)]
 fn opaque(_: impl Sized) {}
 
+#[inline(never)]
+fn identity<T>(x: T) -> T {
+    x
+}
+
 // EMIT_MIR gvn.subexpression_elimination.GVN.diff
 // EMIT_MIR gvn.wrap_unwrap.GVN.diff
 // EMIT_MIR gvn.repeated_index.GVN.diff
 // EMIT_MIR gvn.arithmetic.GVN.diff
+// EMIT_MIR gvn.comparison.GVN.diff
 // EMIT_MIR gvn.arithmetic_checked.GVN.diff
 // EMIT_MIR gvn.arithmetic_float.GVN.diff
 // EMIT_MIR gvn.cast.GVN.diff
@@ -251,3 +649,7 @@ fn opaque(_: impl Sized) {}
 // EMIT_MIR gvn.references.GVN.diff
 // EMIT_MIR gvn.dereferences.GVN.diff
 // EMIT_MIR gvn.slices.GVN.diff
+// EMIT_MIR gvn.duplicate_slice.GVN.diff
+// EMIT_MIR gvn.repeat.GVN.diff
+// EMIT_MIR gvn.fn_pointers.GVN.diff
+// EMIT_MIR gvn.indirect_static.GVN.diff
diff --git a/tests/mir-opt/gvn.slices.GVN.panic-abort.diff b/tests/mir-opt/gvn.slices.GVN.panic-abort.diff
index de3d28d0575..ec449980312 100644
--- a/tests/mir-opt/gvn.slices.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.slices.GVN.panic-abort.diff
@@ -85,32 +85,35 @@
   
       bb0: {
 -         StorageLive(_1);
++         nop;
           _1 = const "my favourite slice";
           StorageLive(_2);
--         StorageLive(_3);
--         _3 = _1;
+          StorageLive(_3);
+          _3 = _1;
 -         _2 = opaque::<&str>(move _3) -> [return: bb1, unwind unreachable];
 +         _2 = opaque::<&str>(_1) -> [return: bb1, unwind unreachable];
       }
   
       bb1: {
--         StorageDead(_3);
+          StorageDead(_3);
           StorageDead(_2);
           StorageLive(_4);
           _4 = _1;
           StorageLive(_5);
--         StorageLive(_6);
+          StorageLive(_6);
 -         _6 = _4;
 -         _5 = opaque::<&str>(move _6) -> [return: bb2, unwind unreachable];
++         _6 = _1;
 +         _5 = opaque::<&str>(_1) -> [return: bb2, unwind unreachable];
       }
   
       bb2: {
--         StorageDead(_6);
+          StorageDead(_6);
           StorageDead(_5);
--         StorageLive(_7);
+          StorageLive(_7);
           StorageLive(_8);
-          StorageLive(_9);
+-         StorageLive(_9);
++         nop;
           StorageLive(_10);
           StorageLive(_11);
           _11 = &(*_1);
@@ -120,28 +123,37 @@
       bb3: {
           StorageDead(_11);
           _9 = &_10;
-          StorageLive(_12);
+-         StorageLive(_12);
++         nop;
           StorageLive(_13);
           StorageLive(_14);
-          _14 = &(*_4);
+-         _14 = &(*_4);
++         _14 = &(*_1);
           _13 = core::str::<impl str>::as_ptr(move _14) -> [return: bb4, unwind unreachable];
       }
   
       bb4: {
           StorageDead(_14);
           _12 = &_13;
-          _8 = (move _9, move _12);
-          StorageDead(_12);
-          StorageDead(_9);
+-         _8 = (move _9, move _12);
+-         StorageDead(_12);
+-         StorageDead(_9);
++         _8 = (_9, _12);
++         nop;
++         nop;
           StorageLive(_15);
-          _15 = (_8.0: &*const u8);
+-         _15 = (_8.0: &*const u8);
++         _15 = _9;
           StorageLive(_16);
-          _16 = (_8.1: &*const u8);
+-         _16 = (_8.1: &*const u8);
++         _16 = _12;
           StorageLive(_17);
           StorageLive(_18);
-          _18 = (*_15);
+-         _18 = (*_15);
++         _18 = (*_9);
           StorageLive(_19);
-          _19 = (*_16);
+-         _19 = (*_16);
++         _19 = (*_12);
           _17 = Eq(move _18, move _19);
           switchInt(move _17) -> [0: bb6, otherwise: bb5];
       }
@@ -149,22 +161,23 @@
       bb5: {
           StorageDead(_19);
           StorageDead(_18);
--         _7 = const ();
+          _7 = const ();
           StorageDead(_17);
           StorageDead(_16);
           StorageDead(_15);
           StorageDead(_13);
           StorageDead(_10);
           StorageDead(_8);
--         StorageDead(_7);
+          StorageDead(_7);
 -         StorageLive(_29);
++         nop;
           StorageLive(_30);
           _30 = &(*_1);
           _29 = move _30 as &[u8] (Transmute);
           StorageDead(_30);
           StorageLive(_31);
--         StorageLive(_32);
--         _32 = _29;
+          StorageLive(_32);
+          _32 = _29;
 -         _31 = opaque::<&[u8]>(move _32) -> [return: bb7, unwind unreachable];
 +         _31 = opaque::<&[u8]>(_29) -> [return: bb7, unwind unreachable];
       }
@@ -173,30 +186,38 @@
           StorageDead(_19);
           StorageDead(_18);
 -         StorageLive(_21);
-          _21 = core::panicking::AssertKind::Eq;
+-         _21 = core::panicking::AssertKind::Eq;
++         nop;
++         _21 = const core::panicking::AssertKind::Eq;
           StorageLive(_22);
--         StorageLive(_23);
+          StorageLive(_23);
 -         _23 = move _21;
++         _23 = const core::panicking::AssertKind::Eq;
           StorageLive(_24);
-          StorageLive(_25);
-          _25 = &(*_15);
+-         StorageLive(_25);
+-         _25 = &(*_15);
++         nop;
++         _25 = &(*_9);
           _24 = &(*_25);
           StorageLive(_26);
-          StorageLive(_27);
-          _27 = &(*_16);
+-         StorageLive(_27);
+-         _27 = &(*_16);
++         nop;
++         _27 = &(*_12);
           _26 = &(*_27);
           StorageLive(_28);
           _28 = Option::<Arguments<'_>>::None;
--         _22 = core::panicking::assert_failed::<*const u8, *const u8>(move _23, move _24, move _26, move _28) -> unwind unreachable;
-+         _22 = core::panicking::assert_failed::<*const u8, *const u8>(_21, move _24, move _26, move _28) -> unwind unreachable;
+-         _22 = assert_failed::<*const u8, *const u8>(move _23, move _24, move _26, move _28) -> unwind unreachable;
++         _22 = assert_failed::<*const u8, *const u8>(const core::panicking::AssertKind::Eq, move _24, move _26, move _28) -> unwind unreachable;
       }
   
       bb7: {
--         StorageDead(_32);
+          StorageDead(_32);
           StorageDead(_31);
--         StorageLive(_33);
+          StorageLive(_33);
           StorageLive(_34);
-          StorageLive(_35);
+-         StorageLive(_35);
++         nop;
           StorageLive(_36);
           StorageLive(_37);
           _37 = &(*_1);
@@ -206,7 +227,8 @@
       bb8: {
           StorageDead(_37);
           _35 = &_36;
-          StorageLive(_38);
+-         StorageLive(_38);
++         nop;
           StorageLive(_39);
           StorageLive(_40);
           _40 = &(*_29);
@@ -216,18 +238,25 @@
       bb9: {
           StorageDead(_40);
           _38 = &_39;
-          _34 = (move _35, move _38);
-          StorageDead(_38);
-          StorageDead(_35);
+-         _34 = (move _35, move _38);
+-         StorageDead(_38);
+-         StorageDead(_35);
++         _34 = (_35, _38);
++         nop;
++         nop;
           StorageLive(_41);
-          _41 = (_34.0: &*const u8);
+-         _41 = (_34.0: &*const u8);
++         _41 = _35;
           StorageLive(_42);
-          _42 = (_34.1: &*const u8);
+-         _42 = (_34.1: &*const u8);
++         _42 = _38;
           StorageLive(_43);
           StorageLive(_44);
-          _44 = (*_41);
+-         _44 = (*_41);
++         _44 = (*_35);
           StorageLive(_45);
-          _45 = (*_42);
+-         _45 = (*_42);
++         _45 = (*_38);
           _43 = Eq(move _44, move _45);
           switchInt(move _43) -> [0: bb11, otherwise: bb10];
       }
@@ -235,18 +264,20 @@
       bb10: {
           StorageDead(_45);
           StorageDead(_44);
--         _33 = const ();
+          _33 = const ();
           StorageDead(_43);
           StorageDead(_42);
           StorageDead(_41);
           StorageDead(_39);
           StorageDead(_36);
           StorageDead(_34);
--         StorageDead(_33);
+          StorageDead(_33);
           _0 = const ();
 -         StorageDead(_29);
++         nop;
           StorageDead(_4);
 -         StorageDead(_1);
++         nop;
           return;
       }
   
@@ -254,22 +285,29 @@
           StorageDead(_45);
           StorageDead(_44);
 -         StorageLive(_47);
-          _47 = core::panicking::AssertKind::Eq;
+-         _47 = core::panicking::AssertKind::Eq;
++         nop;
++         _47 = const core::panicking::AssertKind::Eq;
           StorageLive(_48);
--         StorageLive(_49);
+          StorageLive(_49);
 -         _49 = move _47;
++         _49 = const core::panicking::AssertKind::Eq;
           StorageLive(_50);
-          StorageLive(_51);
-          _51 = &(*_41);
+-         StorageLive(_51);
+-         _51 = &(*_41);
++         nop;
++         _51 = &(*_35);
           _50 = &(*_51);
           StorageLive(_52);
-          StorageLive(_53);
-          _53 = &(*_42);
+-         StorageLive(_53);
+-         _53 = &(*_42);
++         nop;
++         _53 = &(*_38);
           _52 = &(*_53);
           StorageLive(_54);
           _54 = Option::<Arguments<'_>>::None;
--         _48 = core::panicking::assert_failed::<*const u8, *const u8>(move _49, move _50, move _52, move _54) -> unwind unreachable;
-+         _48 = core::panicking::assert_failed::<*const u8, *const u8>(_47, move _50, move _52, move _54) -> unwind unreachable;
+-         _48 = assert_failed::<*const u8, *const u8>(move _49, move _50, move _52, move _54) -> unwind unreachable;
++         _48 = assert_failed::<*const u8, *const u8>(const core::panicking::AssertKind::Eq, move _50, move _52, move _54) -> unwind unreachable;
       }
   }
   
diff --git a/tests/mir-opt/gvn.slices.GVN.panic-unwind.diff b/tests/mir-opt/gvn.slices.GVN.panic-unwind.diff
index f22bb25436f..56a78ca8694 100644
--- a/tests/mir-opt/gvn.slices.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.slices.GVN.panic-unwind.diff
@@ -85,32 +85,35 @@
   
       bb0: {
 -         StorageLive(_1);
++         nop;
           _1 = const "my favourite slice";
           StorageLive(_2);
--         StorageLive(_3);
--         _3 = _1;
+          StorageLive(_3);
+          _3 = _1;
 -         _2 = opaque::<&str>(move _3) -> [return: bb1, unwind continue];
 +         _2 = opaque::<&str>(_1) -> [return: bb1, unwind continue];
       }
   
       bb1: {
--         StorageDead(_3);
+          StorageDead(_3);
           StorageDead(_2);
           StorageLive(_4);
           _4 = _1;
           StorageLive(_5);
--         StorageLive(_6);
+          StorageLive(_6);
 -         _6 = _4;
 -         _5 = opaque::<&str>(move _6) -> [return: bb2, unwind continue];
++         _6 = _1;
 +         _5 = opaque::<&str>(_1) -> [return: bb2, unwind continue];
       }
   
       bb2: {
--         StorageDead(_6);
+          StorageDead(_6);
           StorageDead(_5);
--         StorageLive(_7);
+          StorageLive(_7);
           StorageLive(_8);
-          StorageLive(_9);
+-         StorageLive(_9);
++         nop;
           StorageLive(_10);
           StorageLive(_11);
           _11 = &(*_1);
@@ -120,28 +123,37 @@
       bb3: {
           StorageDead(_11);
           _9 = &_10;
-          StorageLive(_12);
+-         StorageLive(_12);
++         nop;
           StorageLive(_13);
           StorageLive(_14);
-          _14 = &(*_4);
+-         _14 = &(*_4);
++         _14 = &(*_1);
           _13 = core::str::<impl str>::as_ptr(move _14) -> [return: bb4, unwind continue];
       }
   
       bb4: {
           StorageDead(_14);
           _12 = &_13;
-          _8 = (move _9, move _12);
-          StorageDead(_12);
-          StorageDead(_9);
+-         _8 = (move _9, move _12);
+-         StorageDead(_12);
+-         StorageDead(_9);
++         _8 = (_9, _12);
++         nop;
++         nop;
           StorageLive(_15);
-          _15 = (_8.0: &*const u8);
+-         _15 = (_8.0: &*const u8);
++         _15 = _9;
           StorageLive(_16);
-          _16 = (_8.1: &*const u8);
+-         _16 = (_8.1: &*const u8);
++         _16 = _12;
           StorageLive(_17);
           StorageLive(_18);
-          _18 = (*_15);
+-         _18 = (*_15);
++         _18 = (*_9);
           StorageLive(_19);
-          _19 = (*_16);
+-         _19 = (*_16);
++         _19 = (*_12);
           _17 = Eq(move _18, move _19);
           switchInt(move _17) -> [0: bb6, otherwise: bb5];
       }
@@ -149,22 +161,23 @@
       bb5: {
           StorageDead(_19);
           StorageDead(_18);
--         _7 = const ();
+          _7 = const ();
           StorageDead(_17);
           StorageDead(_16);
           StorageDead(_15);
           StorageDead(_13);
           StorageDead(_10);
           StorageDead(_8);
--         StorageDead(_7);
+          StorageDead(_7);
 -         StorageLive(_29);
++         nop;
           StorageLive(_30);
           _30 = &(*_1);
           _29 = move _30 as &[u8] (Transmute);
           StorageDead(_30);
           StorageLive(_31);
--         StorageLive(_32);
--         _32 = _29;
+          StorageLive(_32);
+          _32 = _29;
 -         _31 = opaque::<&[u8]>(move _32) -> [return: bb7, unwind continue];
 +         _31 = opaque::<&[u8]>(_29) -> [return: bb7, unwind continue];
       }
@@ -173,30 +186,38 @@
           StorageDead(_19);
           StorageDead(_18);
 -         StorageLive(_21);
-          _21 = core::panicking::AssertKind::Eq;
+-         _21 = core::panicking::AssertKind::Eq;
++         nop;
++         _21 = const core::panicking::AssertKind::Eq;
           StorageLive(_22);
--         StorageLive(_23);
+          StorageLive(_23);
 -         _23 = move _21;
++         _23 = const core::panicking::AssertKind::Eq;
           StorageLive(_24);
-          StorageLive(_25);
-          _25 = &(*_15);
+-         StorageLive(_25);
+-         _25 = &(*_15);
++         nop;
++         _25 = &(*_9);
           _24 = &(*_25);
           StorageLive(_26);
-          StorageLive(_27);
-          _27 = &(*_16);
+-         StorageLive(_27);
+-         _27 = &(*_16);
++         nop;
++         _27 = &(*_12);
           _26 = &(*_27);
           StorageLive(_28);
           _28 = Option::<Arguments<'_>>::None;
--         _22 = core::panicking::assert_failed::<*const u8, *const u8>(move _23, move _24, move _26, move _28) -> unwind continue;
-+         _22 = core::panicking::assert_failed::<*const u8, *const u8>(_21, move _24, move _26, move _28) -> unwind continue;
+-         _22 = assert_failed::<*const u8, *const u8>(move _23, move _24, move _26, move _28) -> unwind continue;
++         _22 = assert_failed::<*const u8, *const u8>(const core::panicking::AssertKind::Eq, move _24, move _26, move _28) -> unwind continue;
       }
   
       bb7: {
--         StorageDead(_32);
+          StorageDead(_32);
           StorageDead(_31);
--         StorageLive(_33);
+          StorageLive(_33);
           StorageLive(_34);
-          StorageLive(_35);
+-         StorageLive(_35);
++         nop;
           StorageLive(_36);
           StorageLive(_37);
           _37 = &(*_1);
@@ -206,7 +227,8 @@
       bb8: {
           StorageDead(_37);
           _35 = &_36;
-          StorageLive(_38);
+-         StorageLive(_38);
++         nop;
           StorageLive(_39);
           StorageLive(_40);
           _40 = &(*_29);
@@ -216,18 +238,25 @@
       bb9: {
           StorageDead(_40);
           _38 = &_39;
-          _34 = (move _35, move _38);
-          StorageDead(_38);
-          StorageDead(_35);
+-         _34 = (move _35, move _38);
+-         StorageDead(_38);
+-         StorageDead(_35);
++         _34 = (_35, _38);
++         nop;
++         nop;
           StorageLive(_41);
-          _41 = (_34.0: &*const u8);
+-         _41 = (_34.0: &*const u8);
++         _41 = _35;
           StorageLive(_42);
-          _42 = (_34.1: &*const u8);
+-         _42 = (_34.1: &*const u8);
++         _42 = _38;
           StorageLive(_43);
           StorageLive(_44);
-          _44 = (*_41);
+-         _44 = (*_41);
++         _44 = (*_35);
           StorageLive(_45);
-          _45 = (*_42);
+-         _45 = (*_42);
++         _45 = (*_38);
           _43 = Eq(move _44, move _45);
           switchInt(move _43) -> [0: bb11, otherwise: bb10];
       }
@@ -235,18 +264,20 @@
       bb10: {
           StorageDead(_45);
           StorageDead(_44);
--         _33 = const ();
+          _33 = const ();
           StorageDead(_43);
           StorageDead(_42);
           StorageDead(_41);
           StorageDead(_39);
           StorageDead(_36);
           StorageDead(_34);
--         StorageDead(_33);
+          StorageDead(_33);
           _0 = const ();
 -         StorageDead(_29);
++         nop;
           StorageDead(_4);
 -         StorageDead(_1);
++         nop;
           return;
       }
   
@@ -254,22 +285,29 @@
           StorageDead(_45);
           StorageDead(_44);
 -         StorageLive(_47);
-          _47 = core::panicking::AssertKind::Eq;
+-         _47 = core::panicking::AssertKind::Eq;
++         nop;
++         _47 = const core::panicking::AssertKind::Eq;
           StorageLive(_48);
--         StorageLive(_49);
+          StorageLive(_49);
 -         _49 = move _47;
++         _49 = const core::panicking::AssertKind::Eq;
           StorageLive(_50);
-          StorageLive(_51);
-          _51 = &(*_41);
+-         StorageLive(_51);
+-         _51 = &(*_41);
++         nop;
++         _51 = &(*_35);
           _50 = &(*_51);
           StorageLive(_52);
-          StorageLive(_53);
-          _53 = &(*_42);
+-         StorageLive(_53);
+-         _53 = &(*_42);
++         nop;
++         _53 = &(*_38);
           _52 = &(*_53);
           StorageLive(_54);
           _54 = Option::<Arguments<'_>>::None;
--         _48 = core::panicking::assert_failed::<*const u8, *const u8>(move _49, move _50, move _52, move _54) -> unwind continue;
-+         _48 = core::panicking::assert_failed::<*const u8, *const u8>(_47, move _50, move _52, move _54) -> unwind continue;
+-         _48 = assert_failed::<*const u8, *const u8>(move _49, move _50, move _52, move _54) -> unwind continue;
++         _48 = assert_failed::<*const u8, *const u8>(const core::panicking::AssertKind::Eq, move _50, move _52, move _54) -> unwind continue;
       }
   }
   
diff --git a/tests/mir-opt/gvn.subexpression_elimination.GVN.panic-abort.diff b/tests/mir-opt/gvn.subexpression_elimination.GVN.panic-abort.diff
index bf866e2f4d2..0a747d3aef0 100644
--- a/tests/mir-opt/gvn.subexpression_elimination.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.subexpression_elimination.GVN.panic-abort.diff
@@ -65,11 +65,11 @@
       let mut _60: u64;
       let mut _61: u64;
       let mut _62: u64;
-      let mut _63: u64;
+      let _63: ();
       let mut _64: u64;
-      let _65: ();
+      let mut _65: u64;
       let mut _66: u64;
-      let mut _67: u64;
+      let _67: ();
       let mut _68: u64;
       let mut _69: u64;
       let mut _70: u64;
@@ -77,25 +77,25 @@
       let mut _72: u64;
       let mut _73: u64;
       let mut _74: u64;
-      let mut _75: u64;
-      let mut _76: u64;
-      let _77: ();
+      let mut _75: bool;
+      let _76: ();
+      let mut _77: u64;
       let mut _78: u64;
       let mut _79: u64;
-      let mut _80: u64;
-      let mut _81: u64;
-      let mut _82: bool;
+      let mut _80: bool;
+      let _81: ();
+      let mut _82: u64;
       let mut _83: u64;
-      let _84: ();
-      let mut _85: u64;
+      let mut _84: u64;
+      let _85: ();
       let mut _86: u64;
       let mut _87: u64;
       let mut _88: u64;
-      let mut _89: bool;
+      let _89: ();
       let mut _90: u64;
-      let _91: ();
+      let mut _91: u64;
       let mut _92: u64;
-      let mut _93: u64;
+      let _93: ();
       let mut _94: u64;
       let mut _95: u64;
       let mut _96: u64;
@@ -103,93 +103,91 @@
       let mut _98: u64;
       let mut _99: u64;
       let mut _100: u64;
-      let mut _101: u64;
-      let mut _102: u64;
-      let _103: ();
-      let mut _104: u64;
-      let mut _105: u64;
+      let _101: ();
+      let mut _102: u32;
+      let mut _103: u64;
+      let _104: ();
+      let mut _105: f32;
       let mut _106: u64;
-      let mut _107: u64;
-      let mut _108: u64;
-      let _109: ();
-      let mut _110: u64;
+      let _107: ();
+      let mut _108: S<u64>;
+      let mut _109: u64;
+      let _110: ();
       let mut _111: u64;
-      let mut _112: u64;
+      let mut _112: S<u64>;
       let mut _113: u64;
-      let mut _114: u64;
-      let _115: ();
+      let _114: ();
+      let mut _115: u64;
       let mut _116: u64;
       let mut _117: u64;
       let mut _118: u64;
       let mut _119: u64;
-      let mut _120: u64;
-      let _121: ();
-      let mut _122: S<u64>;
+      let _120: ();
+      let mut _121: u64;
+      let mut _122: u64;
       let mut _123: u64;
-      let _124: ();
+      let mut _124: u64;
       let mut _125: u64;
-      let mut _126: S<u64>;
-      let mut _127: u64;
-      let _128: &u64;
-      let _129: ();
+      let _126: &u64;
+      let _127: ();
+      let mut _128: u64;
+      let mut _129: u64;
       let mut _130: u64;
-      let mut _131: u64;
+      let _131: ();
       let mut _132: u64;
-      let _133: ();
+      let mut _133: u64;
       let mut _134: u64;
-      let mut _135: u64;
-      let mut _136: u64;
-      let _138: ();
+      let _136: ();
+      let mut _137: u64;
+      let mut _138: u64;
       let mut _139: u64;
-      let mut _140: u64;
+      let _140: ();
       let mut _141: u64;
-      let _142: ();
+      let mut _142: u64;
       let mut _143: u64;
-      let mut _144: u64;
-      let mut _145: u64;
+      let _144: ();
       let _146: ();
-      let _148: ();
+      let mut _147: u64;
+      let mut _148: u64;
       let mut _149: u64;
-      let mut _150: u64;
+      let _150: ();
       let mut _151: u64;
-      let _152: ();
+      let mut _152: u64;
       let mut _153: u64;
-      let mut _154: u64;
-      let mut _155: u64;
-      let _157: ();
+      let _155: ();
+      let mut _156: u64;
+      let mut _157: u64;
       let mut _158: u64;
-      let mut _159: u64;
+      let _159: ();
       let mut _160: u64;
-      let _161: ();
+      let mut _161: u64;
       let mut _162: u64;
-      let mut _163: u64;
-      let mut _164: u64;
-      let _166: ();
+      let _164: ();
+      let mut _165: u64;
+      let mut _166: u64;
       let mut _167: u64;
-      let mut _168: u64;
+      let _168: ();
       let mut _169: u64;
-      let _170: ();
+      let mut _170: u64;
       let mut _171: u64;
-      let mut _172: u64;
-      let mut _173: u64;
       scope 1 {
-          debug a => _128;
-          let _137: &mut u64;
+          debug a => _126;
+          let _135: &mut u64;
           scope 2 {
-              debug b => _137;
-              let _165: &u64;
+              debug b => _135;
+              let _163: &u64;
               scope 3 {
-                  let _147: *const u64;
+                  let _145: *const u64;
                   scope 4 {
-                      debug c => _147;
-                      let _156: *mut u64;
+                      debug c => _145;
+                      let _154: *mut u64;
                       scope 5 {
-                          debug d => _156;
+                          debug d => _154;
                       }
                   }
               }
               scope 6 {
-                  debug e => _165;
+                  debug e => _163;
               }
           }
       }
@@ -197,61 +195,68 @@
       bb0: {
           StorageLive(_4);
 -         StorageLive(_5);
--         StorageLive(_6);
--         _6 = _1;
--         StorageLive(_7);
--         _7 = _2;
++         nop;
+          StorageLive(_6);
+          _6 = _1;
+          StorageLive(_7);
+          _7 = _2;
 -         _5 = Add(move _6, move _7);
--         StorageDead(_7);
--         StorageDead(_6);
--         _4 = opaque::<u64>(move _5) -> [return: bb1, unwind unreachable];
 +         _5 = Add(_1, _2);
+          StorageDead(_7);
+          StorageDead(_6);
+-         _4 = opaque::<u64>(move _5) -> [return: bb1, unwind unreachable];
 +         _4 = opaque::<u64>(_5) -> [return: bb1, unwind unreachable];
       }
   
       bb1: {
 -         StorageDead(_5);
++         nop;
           StorageDead(_4);
           StorageLive(_8);
 -         StorageLive(_9);
--         StorageLive(_10);
--         _10 = _1;
--         StorageLive(_11);
--         _11 = _2;
++         nop;
+          StorageLive(_10);
+          _10 = _1;
+          StorageLive(_11);
+          _11 = _2;
 -         _9 = Mul(move _10, move _11);
--         StorageDead(_11);
--         StorageDead(_10);
--         _8 = opaque::<u64>(move _9) -> [return: bb2, unwind unreachable];
 +         _9 = Mul(_1, _2);
+          StorageDead(_11);
+          StorageDead(_10);
+-         _8 = opaque::<u64>(move _9) -> [return: bb2, unwind unreachable];
 +         _8 = opaque::<u64>(_9) -> [return: bb2, unwind unreachable];
       }
   
       bb2: {
 -         StorageDead(_9);
++         nop;
           StorageDead(_8);
           StorageLive(_12);
 -         StorageLive(_13);
--         StorageLive(_14);
--         _14 = _1;
--         StorageLive(_15);
--         _15 = _2;
++         nop;
+          StorageLive(_14);
+          _14 = _1;
+          StorageLive(_15);
+          _15 = _2;
 -         _13 = Sub(move _14, move _15);
--         StorageDead(_15);
--         StorageDead(_14);
--         _12 = opaque::<u64>(move _13) -> [return: bb3, unwind unreachable];
 +         _13 = Sub(_1, _2);
+          StorageDead(_15);
+          StorageDead(_14);
+-         _12 = opaque::<u64>(move _13) -> [return: bb3, unwind unreachable];
 +         _12 = opaque::<u64>(_13) -> [return: bb3, unwind unreachable];
       }
   
       bb3: {
 -         StorageDead(_13);
++         nop;
           StorageDead(_12);
           StorageLive(_16);
 -         StorageLive(_17);
--         StorageLive(_18);
--         _18 = _1;
--         StorageLive(_19);
--         _19 = _2;
++         nop;
+          StorageLive(_18);
+          _18 = _1;
+          StorageLive(_19);
+          _19 = _2;
 -         _20 = Eq(_19, const 0_u64);
 -         assert(!move _20, "attempt to divide `{}` by zero", _18) -> [success: bb4, unwind unreachable];
 +         _20 = Eq(_2, const 0_u64);
@@ -260,623 +265,701 @@
   
       bb4: {
 -         _17 = Div(move _18, move _19);
--         StorageDead(_19);
--         StorageDead(_18);
--         _16 = opaque::<u64>(move _17) -> [return: bb5, unwind unreachable];
 +         _17 = Div(_1, _2);
+          StorageDead(_19);
+          StorageDead(_18);
+-         _16 = opaque::<u64>(move _17) -> [return: bb5, unwind unreachable];
 +         _16 = opaque::<u64>(_17) -> [return: bb5, unwind unreachable];
       }
   
       bb5: {
 -         StorageDead(_17);
++         nop;
           StorageDead(_16);
           StorageLive(_21);
 -         StorageLive(_22);
--         StorageLive(_23);
--         _23 = _1;
--         StorageLive(_24);
--         _24 = _2;
++         nop;
+          StorageLive(_23);
+          _23 = _1;
+          StorageLive(_24);
+          _24 = _2;
 -         _25 = Eq(_24, const 0_u64);
 -         assert(!move _25, "attempt to calculate the remainder of `{}` with a divisor of zero", _23) -> [success: bb6, unwind unreachable];
++         _25 = _20;
 +         assert(!_20, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb6, unwind unreachable];
       }
   
       bb6: {
 -         _22 = Rem(move _23, move _24);
--         StorageDead(_24);
--         StorageDead(_23);
--         _21 = opaque::<u64>(move _22) -> [return: bb7, unwind unreachable];
 +         _22 = Rem(_1, _2);
+          StorageDead(_24);
+          StorageDead(_23);
+-         _21 = opaque::<u64>(move _22) -> [return: bb7, unwind unreachable];
 +         _21 = opaque::<u64>(_22) -> [return: bb7, unwind unreachable];
       }
   
       bb7: {
 -         StorageDead(_22);
++         nop;
           StorageDead(_21);
           StorageLive(_26);
 -         StorageLive(_27);
--         StorageLive(_28);
--         _28 = _1;
--         StorageLive(_29);
--         _29 = _2;
++         nop;
+          StorageLive(_28);
+          _28 = _1;
+          StorageLive(_29);
+          _29 = _2;
 -         _27 = BitAnd(move _28, move _29);
--         StorageDead(_29);
--         StorageDead(_28);
--         _26 = opaque::<u64>(move _27) -> [return: bb8, unwind unreachable];
 +         _27 = BitAnd(_1, _2);
+          StorageDead(_29);
+          StorageDead(_28);
+-         _26 = opaque::<u64>(move _27) -> [return: bb8, unwind unreachable];
 +         _26 = opaque::<u64>(_27) -> [return: bb8, unwind unreachable];
       }
   
       bb8: {
 -         StorageDead(_27);
++         nop;
           StorageDead(_26);
           StorageLive(_30);
 -         StorageLive(_31);
--         StorageLive(_32);
--         _32 = _1;
--         StorageLive(_33);
--         _33 = _2;
++         nop;
+          StorageLive(_32);
+          _32 = _1;
+          StorageLive(_33);
+          _33 = _2;
 -         _31 = BitOr(move _32, move _33);
--         StorageDead(_33);
--         StorageDead(_32);
--         _30 = opaque::<u64>(move _31) -> [return: bb9, unwind unreachable];
 +         _31 = BitOr(_1, _2);
+          StorageDead(_33);
+          StorageDead(_32);
+-         _30 = opaque::<u64>(move _31) -> [return: bb9, unwind unreachable];
 +         _30 = opaque::<u64>(_31) -> [return: bb9, unwind unreachable];
       }
   
       bb9: {
 -         StorageDead(_31);
++         nop;
           StorageDead(_30);
           StorageLive(_34);
 -         StorageLive(_35);
--         StorageLive(_36);
--         _36 = _1;
--         StorageLive(_37);
--         _37 = _2;
++         nop;
+          StorageLive(_36);
+          _36 = _1;
+          StorageLive(_37);
+          _37 = _2;
 -         _35 = BitXor(move _36, move _37);
--         StorageDead(_37);
--         StorageDead(_36);
--         _34 = opaque::<u64>(move _35) -> [return: bb10, unwind unreachable];
 +         _35 = BitXor(_1, _2);
+          StorageDead(_37);
+          StorageDead(_36);
+-         _34 = opaque::<u64>(move _35) -> [return: bb10, unwind unreachable];
 +         _34 = opaque::<u64>(_35) -> [return: bb10, unwind unreachable];
       }
   
       bb10: {
 -         StorageDead(_35);
++         nop;
           StorageDead(_34);
           StorageLive(_38);
 -         StorageLive(_39);
--         StorageLive(_40);
--         _40 = _1;
--         StorageLive(_41);
--         _41 = _2;
++         nop;
+          StorageLive(_40);
+          _40 = _1;
+          StorageLive(_41);
+          _41 = _2;
 -         _39 = Shl(move _40, move _41);
--         StorageDead(_41);
--         StorageDead(_40);
--         _38 = opaque::<u64>(move _39) -> [return: bb11, unwind unreachable];
 +         _39 = Shl(_1, _2);
+          StorageDead(_41);
+          StorageDead(_40);
+-         _38 = opaque::<u64>(move _39) -> [return: bb11, unwind unreachable];
 +         _38 = opaque::<u64>(_39) -> [return: bb11, unwind unreachable];
       }
   
       bb11: {
 -         StorageDead(_39);
++         nop;
           StorageDead(_38);
           StorageLive(_42);
 -         StorageLive(_43);
--         StorageLive(_44);
--         _44 = _1;
--         StorageLive(_45);
--         _45 = _2;
++         nop;
+          StorageLive(_44);
+          _44 = _1;
+          StorageLive(_45);
+          _45 = _2;
 -         _43 = Shr(move _44, move _45);
--         StorageDead(_45);
--         StorageDead(_44);
--         _42 = opaque::<u64>(move _43) -> [return: bb12, unwind unreachable];
 +         _43 = Shr(_1, _2);
+          StorageDead(_45);
+          StorageDead(_44);
+-         _42 = opaque::<u64>(move _43) -> [return: bb12, unwind unreachable];
 +         _42 = opaque::<u64>(_43) -> [return: bb12, unwind unreachable];
       }
   
       bb12: {
 -         StorageDead(_43);
++         nop;
           StorageDead(_42);
           StorageLive(_46);
-          StorageLive(_47);
--         StorageLive(_48);
--         _48 = _1;
+-         StorageLive(_47);
++         nop;
+          StorageLive(_48);
+          _48 = _1;
 -         _47 = move _48 as u32 (IntToInt);
--         StorageDead(_48);
 +         _47 = _1 as u32 (IntToInt);
-          _46 = opaque::<u32>(move _47) -> [return: bb13, unwind unreachable];
+          StorageDead(_48);
+-         _46 = opaque::<u32>(move _47) -> [return: bb13, unwind unreachable];
++         _46 = opaque::<u32>(_47) -> [return: bb13, unwind unreachable];
       }
   
       bb13: {
-          StorageDead(_47);
+-         StorageDead(_47);
++         nop;
           StorageDead(_46);
           StorageLive(_49);
-          StorageLive(_50);
--         StorageLive(_51);
--         _51 = _1;
+-         StorageLive(_50);
++         nop;
+          StorageLive(_51);
+          _51 = _1;
 -         _50 = move _51 as f32 (IntToFloat);
--         StorageDead(_51);
 +         _50 = _1 as f32 (IntToFloat);
-          _49 = opaque::<f32>(move _50) -> [return: bb14, unwind unreachable];
+          StorageDead(_51);
+-         _49 = opaque::<f32>(move _50) -> [return: bb14, unwind unreachable];
++         _49 = opaque::<f32>(_50) -> [return: bb14, unwind unreachable];
       }
   
       bb14: {
-          StorageDead(_50);
+-         StorageDead(_50);
++         nop;
           StorageDead(_49);
           StorageLive(_52);
 -         StorageLive(_53);
--         StorageLive(_54);
--         _54 = _1;
++         nop;
+          StorageLive(_54);
+          _54 = _1;
 -         _53 = S::<u64>(move _54);
--         StorageDead(_54);
--         _52 = opaque::<S<u64>>(move _53) -> [return: bb15, unwind unreachable];
 +         _53 = S::<u64>(_1);
+          StorageDead(_54);
+-         _52 = opaque::<S<u64>>(move _53) -> [return: bb15, unwind unreachable];
 +         _52 = opaque::<S<u64>>(_53) -> [return: bb15, unwind unreachable];
       }
   
       bb15: {
 -         StorageDead(_53);
++         nop;
           StorageDead(_52);
           StorageLive(_55);
--         StorageLive(_56);
--         StorageLive(_57);
--         StorageLive(_58);
--         _58 = _1;
+          StorageLive(_56);
+          StorageLive(_57);
+          StorageLive(_58);
+          _58 = _1;
 -         _57 = S::<u64>(move _58);
--         StorageDead(_58);
++         _57 = _53;
+          StorageDead(_58);
 -         _56 = (_57.0: u64);
 -         _55 = opaque::<u64>(move _56) -> [return: bb16, unwind unreachable];
-+         _56 = (_53.0: u64);
-+         _55 = opaque::<u64>(_56) -> [return: bb16, unwind unreachable];
++         _56 = _1;
++         _55 = opaque::<u64>(_1) -> [return: bb16, unwind unreachable];
       }
   
       bb16: {
--         StorageDead(_56);
--         StorageDead(_57);
+          StorageDead(_56);
+          StorageDead(_57);
           StorageDead(_55);
           StorageLive(_59);
           StorageLive(_60);
--         StorageLive(_61);
--         StorageLive(_62);
--         _62 = _1;
--         StorageLive(_63);
--         _63 = _2;
--         _61 = Add(move _62, move _63);
--         StorageDead(_63);
--         StorageDead(_62);
-          StorageLive(_64);
-          _64 = _3;
--         _60 = Add(move _61, move _64);
-+         _60 = Add(_5, move _64);
-          StorageDead(_64);
--         StorageDead(_61);
-          _59 = opaque::<u64>(move _60) -> [return: bb17, unwind unreachable];
+          StorageLive(_61);
+          _61 = _1;
+          StorageLive(_62);
+          _62 = _2;
+-         _60 = Add(move _61, move _62);
++         _60 = _5;
+          StorageDead(_62);
+          StorageDead(_61);
+-         _59 = opaque::<u64>(move _60) -> [return: bb17, unwind unreachable];
++         _59 = opaque::<u64>(_5) -> [return: bb17, unwind unreachable];
       }
   
       bb17: {
           StorageDead(_60);
           StorageDead(_59);
+          StorageLive(_63);
+          StorageLive(_64);
           StorageLive(_65);
+          _65 = _1;
           StorageLive(_66);
--         StorageLive(_67);
--         StorageLive(_68);
--         _68 = _1;
--         StorageLive(_69);
--         _69 = _2;
--         _67 = Mul(move _68, move _69);
--         StorageDead(_69);
--         StorageDead(_68);
+          _66 = _2;
+-         _64 = Mul(move _65, move _66);
++         _64 = _9;
+          StorageDead(_66);
+          StorageDead(_65);
+-         _63 = opaque::<u64>(move _64) -> [return: bb18, unwind unreachable];
++         _63 = opaque::<u64>(_9) -> [return: bb18, unwind unreachable];
+      }
+  
+      bb18: {
+          StorageDead(_64);
+          StorageDead(_63);
+          StorageLive(_67);
+          StorageLive(_68);
+          StorageLive(_69);
+          _69 = _1;
           StorageLive(_70);
-          _70 = _3;
--         _66 = Add(move _67, move _70);
-+         _66 = Add(_9, move _70);
+          _70 = _2;
+-         _68 = Sub(move _69, move _70);
++         _68 = _13;
           StorageDead(_70);
--         StorageDead(_67);
-          _65 = opaque::<u64>(move _66) -> [return: bb18, unwind unreachable];
+          StorageDead(_69);
+-         _67 = opaque::<u64>(move _68) -> [return: bb19, unwind unreachable];
++         _67 = opaque::<u64>(_13) -> [return: bb19, unwind unreachable];
       }
   
-      bb18: {
-          StorageDead(_66);
-          StorageDead(_65);
+      bb19: {
+          StorageDead(_68);
+          StorageDead(_67);
           StorageLive(_71);
           StorageLive(_72);
--         StorageLive(_73);
--         StorageLive(_74);
--         _74 = _1;
--         StorageLive(_75);
--         _75 = _2;
--         _73 = Sub(move _74, move _75);
--         StorageDead(_75);
--         StorageDead(_74);
-          StorageLive(_76);
-          _76 = _3;
--         _72 = Add(move _73, move _76);
-+         _72 = Add(_13, move _76);
-          StorageDead(_76);
--         StorageDead(_73);
-          _71 = opaque::<u64>(move _72) -> [return: bb19, unwind unreachable];
+          StorageLive(_73);
+          _73 = _1;
+          StorageLive(_74);
+          _74 = _2;
+-         _75 = Eq(_74, const 0_u64);
+-         assert(!move _75, "attempt to divide `{}` by zero", _73) -> [success: bb20, unwind unreachable];
++         _75 = _20;
++         assert(!_20, "attempt to divide `{}` by zero", _1) -> [success: bb20, unwind unreachable];
       }
   
-      bb19: {
+      bb20: {
+-         _72 = Div(move _73, move _74);
++         _72 = _17;
+          StorageDead(_74);
+          StorageDead(_73);
+-         _71 = opaque::<u64>(move _72) -> [return: bb21, unwind unreachable];
++         _71 = opaque::<u64>(_17) -> [return: bb21, unwind unreachable];
+      }
+  
+      bb21: {
           StorageDead(_72);
           StorageDead(_71);
+          StorageLive(_76);
           StorageLive(_77);
           StorageLive(_78);
--         StorageLive(_79);
--         StorageLive(_80);
--         _80 = _1;
--         StorageLive(_81);
--         _81 = _2;
--         _82 = Eq(_81, const 0_u64);
--         assert(!move _82, "attempt to divide `{}` by zero", _80) -> [success: bb20, unwind unreachable];
-+         assert(!_20, "attempt to divide `{}` by zero", _1) -> [success: bb20, unwind unreachable];
+          _78 = _1;
+          StorageLive(_79);
+          _79 = _2;
+-         _80 = Eq(_79, const 0_u64);
+-         assert(!move _80, "attempt to calculate the remainder of `{}` with a divisor of zero", _78) -> [success: bb22, unwind unreachable];
++         _80 = _20;
++         assert(!_20, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb22, unwind unreachable];
       }
   
-      bb20: {
--         _79 = Div(move _80, move _81);
--         StorageDead(_81);
--         StorageDead(_80);
-          StorageLive(_83);
-          _83 = _3;
--         _78 = Add(move _79, move _83);
-+         _78 = Add(_17, move _83);
-          StorageDead(_83);
--         StorageDead(_79);
-          _77 = opaque::<u64>(move _78) -> [return: bb21, unwind unreachable];
+      bb22: {
+-         _77 = Rem(move _78, move _79);
++         _77 = _22;
+          StorageDead(_79);
+          StorageDead(_78);
+-         _76 = opaque::<u64>(move _77) -> [return: bb23, unwind unreachable];
++         _76 = opaque::<u64>(_22) -> [return: bb23, unwind unreachable];
       }
   
-      bb21: {
-          StorageDead(_78);
+      bb23: {
           StorageDead(_77);
+          StorageDead(_76);
+          StorageLive(_81);
+          StorageLive(_82);
+          StorageLive(_83);
+          _83 = _1;
           StorageLive(_84);
-          StorageLive(_85);
--         StorageLive(_86);
--         StorageLive(_87);
--         _87 = _1;
--         StorageLive(_88);
--         _88 = _2;
--         _89 = Eq(_88, const 0_u64);
--         assert(!move _89, "attempt to calculate the remainder of `{}` with a divisor of zero", _87) -> [success: bb22, unwind unreachable];
-+         assert(!_20, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb22, unwind unreachable];
+          _84 = _2;
+-         _82 = BitAnd(move _83, move _84);
++         _82 = _27;
+          StorageDead(_84);
+          StorageDead(_83);
+-         _81 = opaque::<u64>(move _82) -> [return: bb24, unwind unreachable];
++         _81 = opaque::<u64>(_27) -> [return: bb24, unwind unreachable];
       }
   
-      bb22: {
--         _86 = Rem(move _87, move _88);
--         StorageDead(_88);
--         StorageDead(_87);
-          StorageLive(_90);
-          _90 = _3;
--         _85 = Add(move _86, move _90);
-+         _85 = Add(_22, move _90);
-          StorageDead(_90);
--         StorageDead(_86);
-          _84 = opaque::<u64>(move _85) -> [return: bb23, unwind unreachable];
+      bb24: {
+          StorageDead(_82);
+          StorageDead(_81);
+          StorageLive(_85);
+          StorageLive(_86);
+          StorageLive(_87);
+          _87 = _1;
+          StorageLive(_88);
+          _88 = _2;
+-         _86 = BitOr(move _87, move _88);
++         _86 = _31;
+          StorageDead(_88);
+          StorageDead(_87);
+-         _85 = opaque::<u64>(move _86) -> [return: bb25, unwind unreachable];
++         _85 = opaque::<u64>(_31) -> [return: bb25, unwind unreachable];
       }
   
-      bb23: {
+      bb25: {
+          StorageDead(_86);
           StorageDead(_85);
-          StorageDead(_84);
+          StorageLive(_89);
+          StorageLive(_90);
           StorageLive(_91);
+          _91 = _1;
           StorageLive(_92);
--         StorageLive(_93);
--         StorageLive(_94);
--         _94 = _1;
--         StorageLive(_95);
--         _95 = _2;
--         _93 = BitAnd(move _94, move _95);
--         StorageDead(_95);
--         StorageDead(_94);
+          _92 = _2;
+-         _90 = BitXor(move _91, move _92);
++         _90 = _35;
+          StorageDead(_92);
+          StorageDead(_91);
+-         _89 = opaque::<u64>(move _90) -> [return: bb26, unwind unreachable];
++         _89 = opaque::<u64>(_35) -> [return: bb26, unwind unreachable];
+      }
+  
+      bb26: {
+          StorageDead(_90);
+          StorageDead(_89);
+          StorageLive(_93);
+          StorageLive(_94);
+          StorageLive(_95);
+          _95 = _1;
           StorageLive(_96);
-          _96 = _3;
--         _92 = Add(move _93, move _96);
-+         _92 = Add(_27, move _96);
+          _96 = _2;
+-         _94 = Shl(move _95, move _96);
++         _94 = _39;
           StorageDead(_96);
--         StorageDead(_93);
-          _91 = opaque::<u64>(move _92) -> [return: bb24, unwind unreachable];
+          StorageDead(_95);
+-         _93 = opaque::<u64>(move _94) -> [return: bb27, unwind unreachable];
++         _93 = opaque::<u64>(_39) -> [return: bb27, unwind unreachable];
       }
   
-      bb24: {
-          StorageDead(_92);
-          StorageDead(_91);
+      bb27: {
+          StorageDead(_94);
+          StorageDead(_93);
           StorageLive(_97);
           StorageLive(_98);
--         StorageLive(_99);
--         StorageLive(_100);
--         _100 = _1;
--         StorageLive(_101);
--         _101 = _2;
--         _99 = BitOr(move _100, move _101);
--         StorageDead(_101);
--         StorageDead(_100);
-          StorageLive(_102);
-          _102 = _3;
--         _98 = Add(move _99, move _102);
-+         _98 = Add(_31, move _102);
-          StorageDead(_102);
--         StorageDead(_99);
-          _97 = opaque::<u64>(move _98) -> [return: bb25, unwind unreachable];
+          StorageLive(_99);
+          _99 = _1;
+          StorageLive(_100);
+          _100 = _2;
+-         _98 = Shr(move _99, move _100);
++         _98 = _43;
+          StorageDead(_100);
+          StorageDead(_99);
+-         _97 = opaque::<u64>(move _98) -> [return: bb28, unwind unreachable];
++         _97 = opaque::<u64>(_43) -> [return: bb28, unwind unreachable];
       }
   
-      bb25: {
+      bb28: {
           StorageDead(_98);
           StorageDead(_97);
+          StorageLive(_101);
+          StorageLive(_102);
           StorageLive(_103);
+          _103 = _1;
+-         _102 = move _103 as u32 (IntToInt);
++         _102 = _47;
+          StorageDead(_103);
+-         _101 = opaque::<u32>(move _102) -> [return: bb29, unwind unreachable];
++         _101 = opaque::<u32>(_47) -> [return: bb29, unwind unreachable];
+      }
+  
+      bb29: {
+          StorageDead(_102);
+          StorageDead(_101);
           StorageLive(_104);
--         StorageLive(_105);
--         StorageLive(_106);
--         _106 = _1;
--         StorageLive(_107);
--         _107 = _2;
--         _105 = BitXor(move _106, move _107);
--         StorageDead(_107);
--         StorageDead(_106);
-          StorageLive(_108);
-          _108 = _3;
--         _104 = Add(move _105, move _108);
-+         _104 = Add(_35, move _108);
-          StorageDead(_108);
--         StorageDead(_105);
-          _103 = opaque::<u64>(move _104) -> [return: bb26, unwind unreachable];
+          StorageLive(_105);
+          StorageLive(_106);
+          _106 = _1;
+-         _105 = move _106 as f32 (IntToFloat);
++         _105 = _50;
+          StorageDead(_106);
+-         _104 = opaque::<f32>(move _105) -> [return: bb30, unwind unreachable];
++         _104 = opaque::<f32>(_50) -> [return: bb30, unwind unreachable];
       }
   
-      bb26: {
+      bb30: {
+          StorageDead(_105);
           StorageDead(_104);
-          StorageDead(_103);
+          StorageLive(_107);
+          StorageLive(_108);
           StorageLive(_109);
+          _109 = _1;
+-         _108 = S::<u64>(move _109);
++         _108 = _53;
+          StorageDead(_109);
+-         _107 = opaque::<S<u64>>(move _108) -> [return: bb31, unwind unreachable];
++         _107 = opaque::<S<u64>>(_53) -> [return: bb31, unwind unreachable];
+      }
+  
+      bb31: {
+          StorageDead(_108);
+          StorageDead(_107);
           StorageLive(_110);
--         StorageLive(_111);
--         StorageLive(_112);
--         _112 = _1;
--         StorageLive(_113);
--         _113 = _2;
--         _111 = Shl(move _112, move _113);
--         StorageDead(_113);
--         StorageDead(_112);
-          StorageLive(_114);
-          _114 = _3;
--         _110 = Add(move _111, move _114);
-+         _110 = Add(_39, move _114);
-          StorageDead(_114);
--         StorageDead(_111);
-          _109 = opaque::<u64>(move _110) -> [return: bb27, unwind unreachable];
+          StorageLive(_111);
+          StorageLive(_112);
+          StorageLive(_113);
+          _113 = _1;
+-         _112 = S::<u64>(move _113);
++         _112 = _53;
+          StorageDead(_113);
+-         _111 = (_112.0: u64);
+-         _110 = opaque::<u64>(move _111) -> [return: bb32, unwind unreachable];
++         _111 = _1;
++         _110 = opaque::<u64>(_1) -> [return: bb32, unwind unreachable];
       }
   
-      bb27: {
+      bb32: {
+          StorageDead(_111);
+          StorageDead(_112);
           StorageDead(_110);
-          StorageDead(_109);
-          StorageLive(_115);
+          StorageLive(_114);
+-         StorageLive(_115);
++         nop;
           StorageLive(_116);
--         StorageLive(_117);
--         StorageLive(_118);
--         _118 = _1;
--         StorageLive(_119);
--         _119 = _2;
--         _117 = Shr(move _118, move _119);
--         StorageDead(_119);
--         StorageDead(_118);
-          StorageLive(_120);
-          _120 = _3;
--         _116 = Add(move _117, move _120);
-+         _116 = Add(_43, move _120);
-          StorageDead(_120);
--         StorageDead(_117);
-          _115 = opaque::<u64>(move _116) -> [return: bb28, unwind unreachable];
+          StorageLive(_117);
+          _117 = _1;
+          StorageLive(_118);
+          _118 = _2;
+-         _116 = Mul(move _117, move _118);
++         _116 = _9;
+          StorageDead(_118);
+          StorageDead(_117);
+          StorageLive(_119);
+          _119 = _2;
+-         _115 = Sub(move _116, move _119);
++         _115 = Sub(_9, _2);
+          StorageDead(_119);
+          StorageDead(_116);
+-         _114 = opaque::<u64>(move _115) -> [return: bb33, unwind unreachable];
++         _114 = opaque::<u64>(_115) -> [return: bb33, unwind unreachable];
       }
   
-      bb28: {
-          StorageDead(_116);
-          StorageDead(_115);
+      bb33: {
+-         StorageDead(_115);
++         nop;
+          StorageDead(_114);
+          StorageLive(_120);
           StorageLive(_121);
--         StorageLive(_122);
--         StorageLive(_123);
--         _123 = _1;
--         _122 = S::<u64>(move _123);
--         StorageDead(_123);
--         _121 = opaque::<S<u64>>(move _122) -> [return: bb29, unwind unreachable];
-+         _121 = opaque::<S<u64>>(_53) -> [return: bb29, unwind unreachable];
+          StorageLive(_122);
+          StorageLive(_123);
+          _123 = _1;
+          StorageLive(_124);
+          _124 = _2;
+-         _122 = Mul(move _123, move _124);
++         _122 = _9;
+          StorageDead(_124);
+          StorageDead(_123);
+          StorageLive(_125);
+          _125 = _2;
+-         _121 = Sub(move _122, move _125);
++         _121 = _115;
+          StorageDead(_125);
+          StorageDead(_122);
+-         _120 = opaque::<u64>(move _121) -> [return: bb34, unwind unreachable];
++         _120 = opaque::<u64>(_115) -> [return: bb34, unwind unreachable];
       }
   
-      bb29: {
--         StorageDead(_122);
+      bb34: {
           StorageDead(_121);
-          StorageLive(_124);
--         StorageLive(_125);
+          StorageDead(_120);
 -         StorageLive(_126);
--         StorageLive(_127);
--         _127 = _1;
--         _126 = S::<u64>(move _127);
--         StorageDead(_127);
--         _125 = (_126.0: u64);
--         _124 = opaque::<u64>(move _125) -> [return: bb30, unwind unreachable];
-+         _124 = opaque::<u64>(_56) -> [return: bb30, unwind unreachable];
-      }
-  
-      bb30: {
--         StorageDead(_125);
--         StorageDead(_126);
-          StorageDead(_124);
-          StorageLive(_128);
-          _128 = &_3;
-          StorageLive(_129);
--         StorageLive(_130);
--         StorageLive(_131);
-          _131 = (*_128);
--         StorageLive(_132);
--         _132 = _1;
--         _130 = Add(move _131, move _132);
--         StorageDead(_132);
--         StorageDead(_131);
--         _129 = opaque::<u64>(move _130) -> [return: bb31, unwind unreachable];
-+         _130 = Add(_131, _1);
-+         _129 = opaque::<u64>(_130) -> [return: bb31, unwind unreachable];
++         nop;
+          _126 = &_3;
+          StorageLive(_127);
+-         StorageLive(_128);
+-         StorageLive(_129);
++         nop;
++         nop;
+          _129 = (*_126);
+          StorageLive(_130);
+          _130 = _1;
+-         _128 = Add(move _129, move _130);
++         _128 = Add(_129, _1);
+          StorageDead(_130);
+-         StorageDead(_129);
+-         _127 = opaque::<u64>(move _128) -> [return: bb35, unwind unreachable];
++         nop;
++         _127 = opaque::<u64>(_128) -> [return: bb35, unwind unreachable];
       }
   
-      bb31: {
--         StorageDead(_130);
-          StorageDead(_129);
+      bb35: {
+-         StorageDead(_128);
++         nop;
+          StorageDead(_127);
+          StorageLive(_131);
+          StorageLive(_132);
           StorageLive(_133);
--         StorageLive(_134);
--         StorageLive(_135);
--         _135 = (*_128);
--         StorageLive(_136);
--         _136 = _1;
--         _134 = Add(move _135, move _136);
--         StorageDead(_136);
--         StorageDead(_135);
--         _133 = opaque::<u64>(move _134) -> [return: bb32, unwind unreachable];
-+         _133 = opaque::<u64>(_130) -> [return: bb32, unwind unreachable];
+-         _133 = (*_126);
++         _133 = _129;
+          StorageLive(_134);
+          _134 = _1;
+-         _132 = Add(move _133, move _134);
++         _132 = _128;
+          StorageDead(_134);
+          StorageDead(_133);
+-         _131 = opaque::<u64>(move _132) -> [return: bb36, unwind unreachable];
++         _131 = opaque::<u64>(_128) -> [return: bb36, unwind unreachable];
       }
   
-      bb32: {
--         StorageDead(_134);
-          StorageDead(_133);
+      bb36: {
+          StorageDead(_132);
+          StorageDead(_131);
+-         StorageLive(_135);
++         nop;
+          _135 = &mut _3;
+          StorageLive(_136);
           StorageLive(_137);
-          _137 = &mut _3;
           StorageLive(_138);
+          _138 = (*_135);
           StorageLive(_139);
-          StorageLive(_140);
-          _140 = (*_137);
--         StorageLive(_141);
--         _141 = _1;
--         _139 = Add(move _140, move _141);
--         StorageDead(_141);
-+         _139 = Add(move _140, _1);
-          StorageDead(_140);
-          _138 = opaque::<u64>(move _139) -> [return: bb33, unwind unreachable];
-      }
-  
-      bb33: {
+          _139 = _1;
+-         _137 = Add(move _138, move _139);
++         _137 = Add(move _138, _1);
           StorageDead(_139);
           StorageDead(_138);
-          StorageLive(_142);
-          StorageLive(_143);
-          StorageLive(_144);
-          _144 = (*_137);
--         StorageLive(_145);
--         _145 = _1;
--         _143 = Add(move _144, move _145);
--         StorageDead(_145);
-+         _143 = Add(move _144, _1);
-          StorageDead(_144);
-          _142 = opaque::<u64>(move _143) -> [return: bb34, unwind unreachable];
+          _136 = opaque::<u64>(move _137) -> [return: bb37, unwind unreachable];
       }
   
-      bb34: {
+      bb37: {
+          StorageDead(_137);
+          StorageDead(_136);
+          StorageLive(_140);
+          StorageLive(_141);
+          StorageLive(_142);
+          _142 = (*_135);
+          StorageLive(_143);
+          _143 = _1;
+-         _141 = Add(move _142, move _143);
++         _141 = Add(move _142, _1);
           StorageDead(_143);
           StorageDead(_142);
--         StorageLive(_146);
+          _140 = opaque::<u64>(move _141) -> [return: bb38, unwind unreachable];
+      }
+  
+      bb38: {
+          StorageDead(_141);
+          StorageDead(_140);
+          StorageLive(_144);
+-         StorageLive(_145);
++         nop;
+          _145 = &raw const _3;
+          StorageLive(_146);
           StorageLive(_147);
-          _147 = &raw const _3;
           StorageLive(_148);
+          _148 = (*_145);
           StorageLive(_149);
-          StorageLive(_150);
-          _150 = (*_147);
--         StorageLive(_151);
--         _151 = _1;
--         _149 = Add(move _150, move _151);
--         StorageDead(_151);
-+         _149 = Add(move _150, _1);
-          StorageDead(_150);
-          _148 = opaque::<u64>(move _149) -> [return: bb35, unwind unreachable];
-      }
-  
-      bb35: {
+          _149 = _1;
+-         _147 = Add(move _148, move _149);
++         _147 = Add(move _148, _1);
           StorageDead(_149);
           StorageDead(_148);
-          StorageLive(_152);
-          StorageLive(_153);
-          StorageLive(_154);
-          _154 = (*_147);
--         StorageLive(_155);
--         _155 = _1;
--         _153 = Add(move _154, move _155);
--         StorageDead(_155);
-+         _153 = Add(move _154, _1);
-          StorageDead(_154);
-          _152 = opaque::<u64>(move _153) -> [return: bb36, unwind unreachable];
+          _146 = opaque::<u64>(move _147) -> [return: bb39, unwind unreachable];
       }
   
-      bb36: {
+      bb39: {
+          StorageDead(_147);
+          StorageDead(_146);
+          StorageLive(_150);
+          StorageLive(_151);
+          StorageLive(_152);
+          _152 = (*_145);
+          StorageLive(_153);
+          _153 = _1;
+-         _151 = Add(move _152, move _153);
++         _151 = Add(move _152, _1);
           StorageDead(_153);
           StorageDead(_152);
+          _150 = opaque::<u64>(move _151) -> [return: bb40, unwind unreachable];
+      }
+  
+      bb40: {
+          StorageDead(_151);
+          StorageDead(_150);
+-         StorageLive(_154);
++         nop;
+          _154 = &raw mut _3;
+          StorageLive(_155);
           StorageLive(_156);
-          _156 = &raw mut _3;
           StorageLive(_157);
+          _157 = (*_154);
           StorageLive(_158);
-          StorageLive(_159);
-          _159 = (*_156);
--         StorageLive(_160);
--         _160 = _1;
--         _158 = Add(move _159, move _160);
--         StorageDead(_160);
-+         _158 = Add(move _159, _1);
-          StorageDead(_159);
-          _157 = opaque::<u64>(move _158) -> [return: bb37, unwind unreachable];
-      }
-  
-      bb37: {
+          _158 = _1;
+-         _156 = Add(move _157, move _158);
++         _156 = Add(move _157, _1);
           StorageDead(_158);
           StorageDead(_157);
-          StorageLive(_161);
-          StorageLive(_162);
-          StorageLive(_163);
-          _163 = (*_156);
--         StorageLive(_164);
--         _164 = _1;
--         _162 = Add(move _163, move _164);
--         StorageDead(_164);
-+         _162 = Add(move _163, _1);
-          StorageDead(_163);
-          _161 = opaque::<u64>(move _162) -> [return: bb38, unwind unreachable];
+          _155 = opaque::<u64>(move _156) -> [return: bb41, unwind unreachable];
       }
   
-      bb38: {
+      bb41: {
+          StorageDead(_156);
+          StorageDead(_155);
+          StorageLive(_159);
+          StorageLive(_160);
+          StorageLive(_161);
+          _161 = (*_154);
+          StorageLive(_162);
+          _162 = _1;
+-         _160 = Add(move _161, move _162);
++         _160 = Add(move _161, _1);
           StorageDead(_162);
           StorageDead(_161);
--         _146 = const ();
-          StorageDead(_156);
-          StorageDead(_147);
--         StorageDead(_146);
-          StorageLive(_165);
-          _165 = &_3;
-          StorageLive(_166);
--         StorageLive(_167);
--         StorageLive(_168);
-          _168 = (*_165);
--         StorageLive(_169);
--         _169 = _1;
--         _167 = Add(move _168, move _169);
--         StorageDead(_169);
--         StorageDead(_168);
--         _166 = opaque::<u64>(move _167) -> [return: bb39, unwind unreachable];
-+         _167 = Add(_168, _1);
-+         _166 = opaque::<u64>(_167) -> [return: bb39, unwind unreachable];
+          _159 = opaque::<u64>(move _160) -> [return: bb42, unwind unreachable];
       }
   
-      bb39: {
--         StorageDead(_167);
-          StorageDead(_166);
+      bb42: {
+          StorageDead(_160);
+          StorageDead(_159);
+          _144 = const ();
+-         StorageDead(_154);
+-         StorageDead(_145);
++         nop;
++         nop;
+          StorageDead(_144);
+-         StorageLive(_163);
++         nop;
+          _163 = &_3;
+          StorageLive(_164);
+-         StorageLive(_165);
+-         StorageLive(_166);
++         nop;
++         nop;
+          _166 = (*_163);
+          StorageLive(_167);
+          _167 = _1;
+-         _165 = Add(move _166, move _167);
++         _165 = Add(_166, _1);
+          StorageDead(_167);
+-         StorageDead(_166);
+-         _164 = opaque::<u64>(move _165) -> [return: bb43, unwind unreachable];
++         nop;
++         _164 = opaque::<u64>(_165) -> [return: bb43, unwind unreachable];
+      }
+  
+      bb43: {
+-         StorageDead(_165);
++         nop;
+          StorageDead(_164);
+          StorageLive(_168);
+          StorageLive(_169);
           StorageLive(_170);
--         StorageLive(_171);
--         StorageLive(_172);
--         _172 = (*_165);
--         StorageLive(_173);
--         _173 = _1;
--         _171 = Add(move _172, move _173);
--         StorageDead(_173);
--         StorageDead(_172);
--         _170 = opaque::<u64>(move _171) -> [return: bb40, unwind unreachable];
-+         _170 = opaque::<u64>(_167) -> [return: bb40, unwind unreachable];
+-         _170 = (*_163);
++         _170 = _166;
+          StorageLive(_171);
+          _171 = _1;
+-         _169 = Add(move _170, move _171);
++         _169 = _165;
+          StorageDead(_171);
+          StorageDead(_170);
+-         _168 = opaque::<u64>(move _169) -> [return: bb44, unwind unreachable];
++         _168 = opaque::<u64>(_165) -> [return: bb44, unwind unreachable];
       }
   
-      bb40: {
--         StorageDead(_171);
-          StorageDead(_170);
+      bb44: {
+          StorageDead(_169);
+          StorageDead(_168);
           _0 = const ();
-          StorageDead(_165);
-          StorageDead(_137);
-          StorageDead(_128);
+-         StorageDead(_163);
+-         StorageDead(_135);
+-         StorageDead(_126);
++         nop;
++         nop;
++         nop;
           return;
       }
   }
diff --git a/tests/mir-opt/gvn.subexpression_elimination.GVN.panic-unwind.diff b/tests/mir-opt/gvn.subexpression_elimination.GVN.panic-unwind.diff
index 68b05290719..119a4d9bbe9 100644
--- a/tests/mir-opt/gvn.subexpression_elimination.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.subexpression_elimination.GVN.panic-unwind.diff
@@ -65,11 +65,11 @@
       let mut _60: u64;
       let mut _61: u64;
       let mut _62: u64;
-      let mut _63: u64;
+      let _63: ();
       let mut _64: u64;
-      let _65: ();
+      let mut _65: u64;
       let mut _66: u64;
-      let mut _67: u64;
+      let _67: ();
       let mut _68: u64;
       let mut _69: u64;
       let mut _70: u64;
@@ -77,25 +77,25 @@
       let mut _72: u64;
       let mut _73: u64;
       let mut _74: u64;
-      let mut _75: u64;
-      let mut _76: u64;
-      let _77: ();
+      let mut _75: bool;
+      let _76: ();
+      let mut _77: u64;
       let mut _78: u64;
       let mut _79: u64;
-      let mut _80: u64;
-      let mut _81: u64;
-      let mut _82: bool;
+      let mut _80: bool;
+      let _81: ();
+      let mut _82: u64;
       let mut _83: u64;
-      let _84: ();
-      let mut _85: u64;
+      let mut _84: u64;
+      let _85: ();
       let mut _86: u64;
       let mut _87: u64;
       let mut _88: u64;
-      let mut _89: bool;
+      let _89: ();
       let mut _90: u64;
-      let _91: ();
+      let mut _91: u64;
       let mut _92: u64;
-      let mut _93: u64;
+      let _93: ();
       let mut _94: u64;
       let mut _95: u64;
       let mut _96: u64;
@@ -103,93 +103,91 @@
       let mut _98: u64;
       let mut _99: u64;
       let mut _100: u64;
-      let mut _101: u64;
-      let mut _102: u64;
-      let _103: ();
-      let mut _104: u64;
-      let mut _105: u64;
+      let _101: ();
+      let mut _102: u32;
+      let mut _103: u64;
+      let _104: ();
+      let mut _105: f32;
       let mut _106: u64;
-      let mut _107: u64;
-      let mut _108: u64;
-      let _109: ();
-      let mut _110: u64;
+      let _107: ();
+      let mut _108: S<u64>;
+      let mut _109: u64;
+      let _110: ();
       let mut _111: u64;
-      let mut _112: u64;
+      let mut _112: S<u64>;
       let mut _113: u64;
-      let mut _114: u64;
-      let _115: ();
+      let _114: ();
+      let mut _115: u64;
       let mut _116: u64;
       let mut _117: u64;
       let mut _118: u64;
       let mut _119: u64;
-      let mut _120: u64;
-      let _121: ();
-      let mut _122: S<u64>;
+      let _120: ();
+      let mut _121: u64;
+      let mut _122: u64;
       let mut _123: u64;
-      let _124: ();
+      let mut _124: u64;
       let mut _125: u64;
-      let mut _126: S<u64>;
-      let mut _127: u64;
-      let _128: &u64;
-      let _129: ();
+      let _126: &u64;
+      let _127: ();
+      let mut _128: u64;
+      let mut _129: u64;
       let mut _130: u64;
-      let mut _131: u64;
+      let _131: ();
       let mut _132: u64;
-      let _133: ();
+      let mut _133: u64;
       let mut _134: u64;
-      let mut _135: u64;
-      let mut _136: u64;
-      let _138: ();
+      let _136: ();
+      let mut _137: u64;
+      let mut _138: u64;
       let mut _139: u64;
-      let mut _140: u64;
+      let _140: ();
       let mut _141: u64;
-      let _142: ();
+      let mut _142: u64;
       let mut _143: u64;
-      let mut _144: u64;
-      let mut _145: u64;
+      let _144: ();
       let _146: ();
-      let _148: ();
+      let mut _147: u64;
+      let mut _148: u64;
       let mut _149: u64;
-      let mut _150: u64;
+      let _150: ();
       let mut _151: u64;
-      let _152: ();
+      let mut _152: u64;
       let mut _153: u64;
-      let mut _154: u64;
-      let mut _155: u64;
-      let _157: ();
+      let _155: ();
+      let mut _156: u64;
+      let mut _157: u64;
       let mut _158: u64;
-      let mut _159: u64;
+      let _159: ();
       let mut _160: u64;
-      let _161: ();
+      let mut _161: u64;
       let mut _162: u64;
-      let mut _163: u64;
-      let mut _164: u64;
-      let _166: ();
+      let _164: ();
+      let mut _165: u64;
+      let mut _166: u64;
       let mut _167: u64;
-      let mut _168: u64;
+      let _168: ();
       let mut _169: u64;
-      let _170: ();
+      let mut _170: u64;
       let mut _171: u64;
-      let mut _172: u64;
-      let mut _173: u64;
       scope 1 {
-          debug a => _128;
-          let _137: &mut u64;
+          debug a => _126;
+          let _135: &mut u64;
           scope 2 {
-              debug b => _137;
-              let _165: &u64;
+              debug b => _135;
+              let _163: &u64;
               scope 3 {
-                  let _147: *const u64;
+                  let _145: *const u64;
                   scope 4 {
-                      debug c => _147;
-                      let _156: *mut u64;
+                      debug c => _145;
+                      let _154: *mut u64;
                       scope 5 {
-                          debug d => _156;
+                          debug d => _154;
                       }
                   }
               }
               scope 6 {
-                  debug e => _165;
+                  debug e => _163;
               }
           }
       }
@@ -197,61 +195,68 @@
       bb0: {
           StorageLive(_4);
 -         StorageLive(_5);
--         StorageLive(_6);
--         _6 = _1;
--         StorageLive(_7);
--         _7 = _2;
++         nop;
+          StorageLive(_6);
+          _6 = _1;
+          StorageLive(_7);
+          _7 = _2;
 -         _5 = Add(move _6, move _7);
--         StorageDead(_7);
--         StorageDead(_6);
--         _4 = opaque::<u64>(move _5) -> [return: bb1, unwind continue];
 +         _5 = Add(_1, _2);
+          StorageDead(_7);
+          StorageDead(_6);
+-         _4 = opaque::<u64>(move _5) -> [return: bb1, unwind continue];
 +         _4 = opaque::<u64>(_5) -> [return: bb1, unwind continue];
       }
   
       bb1: {
 -         StorageDead(_5);
++         nop;
           StorageDead(_4);
           StorageLive(_8);
 -         StorageLive(_9);
--         StorageLive(_10);
--         _10 = _1;
--         StorageLive(_11);
--         _11 = _2;
++         nop;
+          StorageLive(_10);
+          _10 = _1;
+          StorageLive(_11);
+          _11 = _2;
 -         _9 = Mul(move _10, move _11);
--         StorageDead(_11);
--         StorageDead(_10);
--         _8 = opaque::<u64>(move _9) -> [return: bb2, unwind continue];
 +         _9 = Mul(_1, _2);
+          StorageDead(_11);
+          StorageDead(_10);
+-         _8 = opaque::<u64>(move _9) -> [return: bb2, unwind continue];
 +         _8 = opaque::<u64>(_9) -> [return: bb2, unwind continue];
       }
   
       bb2: {
 -         StorageDead(_9);
++         nop;
           StorageDead(_8);
           StorageLive(_12);
 -         StorageLive(_13);
--         StorageLive(_14);
--         _14 = _1;
--         StorageLive(_15);
--         _15 = _2;
++         nop;
+          StorageLive(_14);
+          _14 = _1;
+          StorageLive(_15);
+          _15 = _2;
 -         _13 = Sub(move _14, move _15);
--         StorageDead(_15);
--         StorageDead(_14);
--         _12 = opaque::<u64>(move _13) -> [return: bb3, unwind continue];
 +         _13 = Sub(_1, _2);
+          StorageDead(_15);
+          StorageDead(_14);
+-         _12 = opaque::<u64>(move _13) -> [return: bb3, unwind continue];
 +         _12 = opaque::<u64>(_13) -> [return: bb3, unwind continue];
       }
   
       bb3: {
 -         StorageDead(_13);
++         nop;
           StorageDead(_12);
           StorageLive(_16);
 -         StorageLive(_17);
--         StorageLive(_18);
--         _18 = _1;
--         StorageLive(_19);
--         _19 = _2;
++         nop;
+          StorageLive(_18);
+          _18 = _1;
+          StorageLive(_19);
+          _19 = _2;
 -         _20 = Eq(_19, const 0_u64);
 -         assert(!move _20, "attempt to divide `{}` by zero", _18) -> [success: bb4, unwind continue];
 +         _20 = Eq(_2, const 0_u64);
@@ -260,623 +265,701 @@
   
       bb4: {
 -         _17 = Div(move _18, move _19);
--         StorageDead(_19);
--         StorageDead(_18);
--         _16 = opaque::<u64>(move _17) -> [return: bb5, unwind continue];
 +         _17 = Div(_1, _2);
+          StorageDead(_19);
+          StorageDead(_18);
+-         _16 = opaque::<u64>(move _17) -> [return: bb5, unwind continue];
 +         _16 = opaque::<u64>(_17) -> [return: bb5, unwind continue];
       }
   
       bb5: {
 -         StorageDead(_17);
++         nop;
           StorageDead(_16);
           StorageLive(_21);
 -         StorageLive(_22);
--         StorageLive(_23);
--         _23 = _1;
--         StorageLive(_24);
--         _24 = _2;
++         nop;
+          StorageLive(_23);
+          _23 = _1;
+          StorageLive(_24);
+          _24 = _2;
 -         _25 = Eq(_24, const 0_u64);
 -         assert(!move _25, "attempt to calculate the remainder of `{}` with a divisor of zero", _23) -> [success: bb6, unwind continue];
++         _25 = _20;
 +         assert(!_20, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb6, unwind continue];
       }
   
       bb6: {
 -         _22 = Rem(move _23, move _24);
--         StorageDead(_24);
--         StorageDead(_23);
--         _21 = opaque::<u64>(move _22) -> [return: bb7, unwind continue];
 +         _22 = Rem(_1, _2);
+          StorageDead(_24);
+          StorageDead(_23);
+-         _21 = opaque::<u64>(move _22) -> [return: bb7, unwind continue];
 +         _21 = opaque::<u64>(_22) -> [return: bb7, unwind continue];
       }
   
       bb7: {
 -         StorageDead(_22);
++         nop;
           StorageDead(_21);
           StorageLive(_26);
 -         StorageLive(_27);
--         StorageLive(_28);
--         _28 = _1;
--         StorageLive(_29);
--         _29 = _2;
++         nop;
+          StorageLive(_28);
+          _28 = _1;
+          StorageLive(_29);
+          _29 = _2;
 -         _27 = BitAnd(move _28, move _29);
--         StorageDead(_29);
--         StorageDead(_28);
--         _26 = opaque::<u64>(move _27) -> [return: bb8, unwind continue];
 +         _27 = BitAnd(_1, _2);
+          StorageDead(_29);
+          StorageDead(_28);
+-         _26 = opaque::<u64>(move _27) -> [return: bb8, unwind continue];
 +         _26 = opaque::<u64>(_27) -> [return: bb8, unwind continue];
       }
   
       bb8: {
 -         StorageDead(_27);
++         nop;
           StorageDead(_26);
           StorageLive(_30);
 -         StorageLive(_31);
--         StorageLive(_32);
--         _32 = _1;
--         StorageLive(_33);
--         _33 = _2;
++         nop;
+          StorageLive(_32);
+          _32 = _1;
+          StorageLive(_33);
+          _33 = _2;
 -         _31 = BitOr(move _32, move _33);
--         StorageDead(_33);
--         StorageDead(_32);
--         _30 = opaque::<u64>(move _31) -> [return: bb9, unwind continue];
 +         _31 = BitOr(_1, _2);
+          StorageDead(_33);
+          StorageDead(_32);
+-         _30 = opaque::<u64>(move _31) -> [return: bb9, unwind continue];
 +         _30 = opaque::<u64>(_31) -> [return: bb9, unwind continue];
       }
   
       bb9: {
 -         StorageDead(_31);
++         nop;
           StorageDead(_30);
           StorageLive(_34);
 -         StorageLive(_35);
--         StorageLive(_36);
--         _36 = _1;
--         StorageLive(_37);
--         _37 = _2;
++         nop;
+          StorageLive(_36);
+          _36 = _1;
+          StorageLive(_37);
+          _37 = _2;
 -         _35 = BitXor(move _36, move _37);
--         StorageDead(_37);
--         StorageDead(_36);
--         _34 = opaque::<u64>(move _35) -> [return: bb10, unwind continue];
 +         _35 = BitXor(_1, _2);
+          StorageDead(_37);
+          StorageDead(_36);
+-         _34 = opaque::<u64>(move _35) -> [return: bb10, unwind continue];
 +         _34 = opaque::<u64>(_35) -> [return: bb10, unwind continue];
       }
   
       bb10: {
 -         StorageDead(_35);
++         nop;
           StorageDead(_34);
           StorageLive(_38);
 -         StorageLive(_39);
--         StorageLive(_40);
--         _40 = _1;
--         StorageLive(_41);
--         _41 = _2;
++         nop;
+          StorageLive(_40);
+          _40 = _1;
+          StorageLive(_41);
+          _41 = _2;
 -         _39 = Shl(move _40, move _41);
--         StorageDead(_41);
--         StorageDead(_40);
--         _38 = opaque::<u64>(move _39) -> [return: bb11, unwind continue];
 +         _39 = Shl(_1, _2);
+          StorageDead(_41);
+          StorageDead(_40);
+-         _38 = opaque::<u64>(move _39) -> [return: bb11, unwind continue];
 +         _38 = opaque::<u64>(_39) -> [return: bb11, unwind continue];
       }
   
       bb11: {
 -         StorageDead(_39);
++         nop;
           StorageDead(_38);
           StorageLive(_42);
 -         StorageLive(_43);
--         StorageLive(_44);
--         _44 = _1;
--         StorageLive(_45);
--         _45 = _2;
++         nop;
+          StorageLive(_44);
+          _44 = _1;
+          StorageLive(_45);
+          _45 = _2;
 -         _43 = Shr(move _44, move _45);
--         StorageDead(_45);
--         StorageDead(_44);
--         _42 = opaque::<u64>(move _43) -> [return: bb12, unwind continue];
 +         _43 = Shr(_1, _2);
+          StorageDead(_45);
+          StorageDead(_44);
+-         _42 = opaque::<u64>(move _43) -> [return: bb12, unwind continue];
 +         _42 = opaque::<u64>(_43) -> [return: bb12, unwind continue];
       }
   
       bb12: {
 -         StorageDead(_43);
++         nop;
           StorageDead(_42);
           StorageLive(_46);
-          StorageLive(_47);
--         StorageLive(_48);
--         _48 = _1;
+-         StorageLive(_47);
++         nop;
+          StorageLive(_48);
+          _48 = _1;
 -         _47 = move _48 as u32 (IntToInt);
--         StorageDead(_48);
 +         _47 = _1 as u32 (IntToInt);
-          _46 = opaque::<u32>(move _47) -> [return: bb13, unwind continue];
+          StorageDead(_48);
+-         _46 = opaque::<u32>(move _47) -> [return: bb13, unwind continue];
++         _46 = opaque::<u32>(_47) -> [return: bb13, unwind continue];
       }
   
       bb13: {
-          StorageDead(_47);
+-         StorageDead(_47);
++         nop;
           StorageDead(_46);
           StorageLive(_49);
-          StorageLive(_50);
--         StorageLive(_51);
--         _51 = _1;
+-         StorageLive(_50);
++         nop;
+          StorageLive(_51);
+          _51 = _1;
 -         _50 = move _51 as f32 (IntToFloat);
--         StorageDead(_51);
 +         _50 = _1 as f32 (IntToFloat);
-          _49 = opaque::<f32>(move _50) -> [return: bb14, unwind continue];
+          StorageDead(_51);
+-         _49 = opaque::<f32>(move _50) -> [return: bb14, unwind continue];
++         _49 = opaque::<f32>(_50) -> [return: bb14, unwind continue];
       }
   
       bb14: {
-          StorageDead(_50);
+-         StorageDead(_50);
++         nop;
           StorageDead(_49);
           StorageLive(_52);
 -         StorageLive(_53);
--         StorageLive(_54);
--         _54 = _1;
++         nop;
+          StorageLive(_54);
+          _54 = _1;
 -         _53 = S::<u64>(move _54);
--         StorageDead(_54);
--         _52 = opaque::<S<u64>>(move _53) -> [return: bb15, unwind continue];
 +         _53 = S::<u64>(_1);
+          StorageDead(_54);
+-         _52 = opaque::<S<u64>>(move _53) -> [return: bb15, unwind continue];
 +         _52 = opaque::<S<u64>>(_53) -> [return: bb15, unwind continue];
       }
   
       bb15: {
 -         StorageDead(_53);
++         nop;
           StorageDead(_52);
           StorageLive(_55);
--         StorageLive(_56);
--         StorageLive(_57);
--         StorageLive(_58);
--         _58 = _1;
+          StorageLive(_56);
+          StorageLive(_57);
+          StorageLive(_58);
+          _58 = _1;
 -         _57 = S::<u64>(move _58);
--         StorageDead(_58);
++         _57 = _53;
+          StorageDead(_58);
 -         _56 = (_57.0: u64);
 -         _55 = opaque::<u64>(move _56) -> [return: bb16, unwind continue];
-+         _56 = (_53.0: u64);
-+         _55 = opaque::<u64>(_56) -> [return: bb16, unwind continue];
++         _56 = _1;
++         _55 = opaque::<u64>(_1) -> [return: bb16, unwind continue];
       }
   
       bb16: {
--         StorageDead(_56);
--         StorageDead(_57);
+          StorageDead(_56);
+          StorageDead(_57);
           StorageDead(_55);
           StorageLive(_59);
           StorageLive(_60);
--         StorageLive(_61);
--         StorageLive(_62);
--         _62 = _1;
--         StorageLive(_63);
--         _63 = _2;
--         _61 = Add(move _62, move _63);
--         StorageDead(_63);
--         StorageDead(_62);
-          StorageLive(_64);
-          _64 = _3;
--         _60 = Add(move _61, move _64);
-+         _60 = Add(_5, move _64);
-          StorageDead(_64);
--         StorageDead(_61);
-          _59 = opaque::<u64>(move _60) -> [return: bb17, unwind continue];
+          StorageLive(_61);
+          _61 = _1;
+          StorageLive(_62);
+          _62 = _2;
+-         _60 = Add(move _61, move _62);
++         _60 = _5;
+          StorageDead(_62);
+          StorageDead(_61);
+-         _59 = opaque::<u64>(move _60) -> [return: bb17, unwind continue];
++         _59 = opaque::<u64>(_5) -> [return: bb17, unwind continue];
       }
   
       bb17: {
           StorageDead(_60);
           StorageDead(_59);
+          StorageLive(_63);
+          StorageLive(_64);
           StorageLive(_65);
+          _65 = _1;
           StorageLive(_66);
--         StorageLive(_67);
--         StorageLive(_68);
--         _68 = _1;
--         StorageLive(_69);
--         _69 = _2;
--         _67 = Mul(move _68, move _69);
--         StorageDead(_69);
--         StorageDead(_68);
+          _66 = _2;
+-         _64 = Mul(move _65, move _66);
++         _64 = _9;
+          StorageDead(_66);
+          StorageDead(_65);
+-         _63 = opaque::<u64>(move _64) -> [return: bb18, unwind continue];
++         _63 = opaque::<u64>(_9) -> [return: bb18, unwind continue];
+      }
+  
+      bb18: {
+          StorageDead(_64);
+          StorageDead(_63);
+          StorageLive(_67);
+          StorageLive(_68);
+          StorageLive(_69);
+          _69 = _1;
           StorageLive(_70);
-          _70 = _3;
--         _66 = Add(move _67, move _70);
-+         _66 = Add(_9, move _70);
+          _70 = _2;
+-         _68 = Sub(move _69, move _70);
++         _68 = _13;
           StorageDead(_70);
--         StorageDead(_67);
-          _65 = opaque::<u64>(move _66) -> [return: bb18, unwind continue];
+          StorageDead(_69);
+-         _67 = opaque::<u64>(move _68) -> [return: bb19, unwind continue];
++         _67 = opaque::<u64>(_13) -> [return: bb19, unwind continue];
       }
   
-      bb18: {
-          StorageDead(_66);
-          StorageDead(_65);
+      bb19: {
+          StorageDead(_68);
+          StorageDead(_67);
           StorageLive(_71);
           StorageLive(_72);
--         StorageLive(_73);
--         StorageLive(_74);
--         _74 = _1;
--         StorageLive(_75);
--         _75 = _2;
--         _73 = Sub(move _74, move _75);
--         StorageDead(_75);
--         StorageDead(_74);
-          StorageLive(_76);
-          _76 = _3;
--         _72 = Add(move _73, move _76);
-+         _72 = Add(_13, move _76);
-          StorageDead(_76);
--         StorageDead(_73);
-          _71 = opaque::<u64>(move _72) -> [return: bb19, unwind continue];
+          StorageLive(_73);
+          _73 = _1;
+          StorageLive(_74);
+          _74 = _2;
+-         _75 = Eq(_74, const 0_u64);
+-         assert(!move _75, "attempt to divide `{}` by zero", _73) -> [success: bb20, unwind continue];
++         _75 = _20;
++         assert(!_20, "attempt to divide `{}` by zero", _1) -> [success: bb20, unwind continue];
       }
   
-      bb19: {
+      bb20: {
+-         _72 = Div(move _73, move _74);
++         _72 = _17;
+          StorageDead(_74);
+          StorageDead(_73);
+-         _71 = opaque::<u64>(move _72) -> [return: bb21, unwind continue];
++         _71 = opaque::<u64>(_17) -> [return: bb21, unwind continue];
+      }
+  
+      bb21: {
           StorageDead(_72);
           StorageDead(_71);
+          StorageLive(_76);
           StorageLive(_77);
           StorageLive(_78);
--         StorageLive(_79);
--         StorageLive(_80);
--         _80 = _1;
--         StorageLive(_81);
--         _81 = _2;
--         _82 = Eq(_81, const 0_u64);
--         assert(!move _82, "attempt to divide `{}` by zero", _80) -> [success: bb20, unwind continue];
-+         assert(!_20, "attempt to divide `{}` by zero", _1) -> [success: bb20, unwind continue];
+          _78 = _1;
+          StorageLive(_79);
+          _79 = _2;
+-         _80 = Eq(_79, const 0_u64);
+-         assert(!move _80, "attempt to calculate the remainder of `{}` with a divisor of zero", _78) -> [success: bb22, unwind continue];
++         _80 = _20;
++         assert(!_20, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb22, unwind continue];
       }
   
-      bb20: {
--         _79 = Div(move _80, move _81);
--         StorageDead(_81);
--         StorageDead(_80);
-          StorageLive(_83);
-          _83 = _3;
--         _78 = Add(move _79, move _83);
-+         _78 = Add(_17, move _83);
-          StorageDead(_83);
--         StorageDead(_79);
-          _77 = opaque::<u64>(move _78) -> [return: bb21, unwind continue];
+      bb22: {
+-         _77 = Rem(move _78, move _79);
++         _77 = _22;
+          StorageDead(_79);
+          StorageDead(_78);
+-         _76 = opaque::<u64>(move _77) -> [return: bb23, unwind continue];
++         _76 = opaque::<u64>(_22) -> [return: bb23, unwind continue];
       }
   
-      bb21: {
-          StorageDead(_78);
+      bb23: {
           StorageDead(_77);
+          StorageDead(_76);
+          StorageLive(_81);
+          StorageLive(_82);
+          StorageLive(_83);
+          _83 = _1;
           StorageLive(_84);
-          StorageLive(_85);
--         StorageLive(_86);
--         StorageLive(_87);
--         _87 = _1;
--         StorageLive(_88);
--         _88 = _2;
--         _89 = Eq(_88, const 0_u64);
--         assert(!move _89, "attempt to calculate the remainder of `{}` with a divisor of zero", _87) -> [success: bb22, unwind continue];
-+         assert(!_20, "attempt to calculate the remainder of `{}` with a divisor of zero", _1) -> [success: bb22, unwind continue];
+          _84 = _2;
+-         _82 = BitAnd(move _83, move _84);
++         _82 = _27;
+          StorageDead(_84);
+          StorageDead(_83);
+-         _81 = opaque::<u64>(move _82) -> [return: bb24, unwind continue];
++         _81 = opaque::<u64>(_27) -> [return: bb24, unwind continue];
       }
   
-      bb22: {
--         _86 = Rem(move _87, move _88);
--         StorageDead(_88);
--         StorageDead(_87);
-          StorageLive(_90);
-          _90 = _3;
--         _85 = Add(move _86, move _90);
-+         _85 = Add(_22, move _90);
-          StorageDead(_90);
--         StorageDead(_86);
-          _84 = opaque::<u64>(move _85) -> [return: bb23, unwind continue];
+      bb24: {
+          StorageDead(_82);
+          StorageDead(_81);
+          StorageLive(_85);
+          StorageLive(_86);
+          StorageLive(_87);
+          _87 = _1;
+          StorageLive(_88);
+          _88 = _2;
+-         _86 = BitOr(move _87, move _88);
++         _86 = _31;
+          StorageDead(_88);
+          StorageDead(_87);
+-         _85 = opaque::<u64>(move _86) -> [return: bb25, unwind continue];
++         _85 = opaque::<u64>(_31) -> [return: bb25, unwind continue];
       }
   
-      bb23: {
+      bb25: {
+          StorageDead(_86);
           StorageDead(_85);
-          StorageDead(_84);
+          StorageLive(_89);
+          StorageLive(_90);
           StorageLive(_91);
+          _91 = _1;
           StorageLive(_92);
--         StorageLive(_93);
--         StorageLive(_94);
--         _94 = _1;
--         StorageLive(_95);
--         _95 = _2;
--         _93 = BitAnd(move _94, move _95);
--         StorageDead(_95);
--         StorageDead(_94);
+          _92 = _2;
+-         _90 = BitXor(move _91, move _92);
++         _90 = _35;
+          StorageDead(_92);
+          StorageDead(_91);
+-         _89 = opaque::<u64>(move _90) -> [return: bb26, unwind continue];
++         _89 = opaque::<u64>(_35) -> [return: bb26, unwind continue];
+      }
+  
+      bb26: {
+          StorageDead(_90);
+          StorageDead(_89);
+          StorageLive(_93);
+          StorageLive(_94);
+          StorageLive(_95);
+          _95 = _1;
           StorageLive(_96);
-          _96 = _3;
--         _92 = Add(move _93, move _96);
-+         _92 = Add(_27, move _96);
+          _96 = _2;
+-         _94 = Shl(move _95, move _96);
++         _94 = _39;
           StorageDead(_96);
--         StorageDead(_93);
-          _91 = opaque::<u64>(move _92) -> [return: bb24, unwind continue];
+          StorageDead(_95);
+-         _93 = opaque::<u64>(move _94) -> [return: bb27, unwind continue];
++         _93 = opaque::<u64>(_39) -> [return: bb27, unwind continue];
       }
   
-      bb24: {
-          StorageDead(_92);
-          StorageDead(_91);
+      bb27: {
+          StorageDead(_94);
+          StorageDead(_93);
           StorageLive(_97);
           StorageLive(_98);
--         StorageLive(_99);
--         StorageLive(_100);
--         _100 = _1;
--         StorageLive(_101);
--         _101 = _2;
--         _99 = BitOr(move _100, move _101);
--         StorageDead(_101);
--         StorageDead(_100);
-          StorageLive(_102);
-          _102 = _3;
--         _98 = Add(move _99, move _102);
-+         _98 = Add(_31, move _102);
-          StorageDead(_102);
--         StorageDead(_99);
-          _97 = opaque::<u64>(move _98) -> [return: bb25, unwind continue];
+          StorageLive(_99);
+          _99 = _1;
+          StorageLive(_100);
+          _100 = _2;
+-         _98 = Shr(move _99, move _100);
++         _98 = _43;
+          StorageDead(_100);
+          StorageDead(_99);
+-         _97 = opaque::<u64>(move _98) -> [return: bb28, unwind continue];
++         _97 = opaque::<u64>(_43) -> [return: bb28, unwind continue];
       }
   
-      bb25: {
+      bb28: {
           StorageDead(_98);
           StorageDead(_97);
+          StorageLive(_101);
+          StorageLive(_102);
           StorageLive(_103);
+          _103 = _1;
+-         _102 = move _103 as u32 (IntToInt);
++         _102 = _47;
+          StorageDead(_103);
+-         _101 = opaque::<u32>(move _102) -> [return: bb29, unwind continue];
++         _101 = opaque::<u32>(_47) -> [return: bb29, unwind continue];
+      }
+  
+      bb29: {
+          StorageDead(_102);
+          StorageDead(_101);
           StorageLive(_104);
--         StorageLive(_105);
--         StorageLive(_106);
--         _106 = _1;
--         StorageLive(_107);
--         _107 = _2;
--         _105 = BitXor(move _106, move _107);
--         StorageDead(_107);
--         StorageDead(_106);
-          StorageLive(_108);
-          _108 = _3;
--         _104 = Add(move _105, move _108);
-+         _104 = Add(_35, move _108);
-          StorageDead(_108);
--         StorageDead(_105);
-          _103 = opaque::<u64>(move _104) -> [return: bb26, unwind continue];
+          StorageLive(_105);
+          StorageLive(_106);
+          _106 = _1;
+-         _105 = move _106 as f32 (IntToFloat);
++         _105 = _50;
+          StorageDead(_106);
+-         _104 = opaque::<f32>(move _105) -> [return: bb30, unwind continue];
++         _104 = opaque::<f32>(_50) -> [return: bb30, unwind continue];
       }
   
-      bb26: {
+      bb30: {
+          StorageDead(_105);
           StorageDead(_104);
-          StorageDead(_103);
+          StorageLive(_107);
+          StorageLive(_108);
           StorageLive(_109);
+          _109 = _1;
+-         _108 = S::<u64>(move _109);
++         _108 = _53;
+          StorageDead(_109);
+-         _107 = opaque::<S<u64>>(move _108) -> [return: bb31, unwind continue];
++         _107 = opaque::<S<u64>>(_53) -> [return: bb31, unwind continue];
+      }
+  
+      bb31: {
+          StorageDead(_108);
+          StorageDead(_107);
           StorageLive(_110);
--         StorageLive(_111);
--         StorageLive(_112);
--         _112 = _1;
--         StorageLive(_113);
--         _113 = _2;
--         _111 = Shl(move _112, move _113);
--         StorageDead(_113);
--         StorageDead(_112);
-          StorageLive(_114);
-          _114 = _3;
--         _110 = Add(move _111, move _114);
-+         _110 = Add(_39, move _114);
-          StorageDead(_114);
--         StorageDead(_111);
-          _109 = opaque::<u64>(move _110) -> [return: bb27, unwind continue];
+          StorageLive(_111);
+          StorageLive(_112);
+          StorageLive(_113);
+          _113 = _1;
+-         _112 = S::<u64>(move _113);
++         _112 = _53;
+          StorageDead(_113);
+-         _111 = (_112.0: u64);
+-         _110 = opaque::<u64>(move _111) -> [return: bb32, unwind continue];
++         _111 = _1;
++         _110 = opaque::<u64>(_1) -> [return: bb32, unwind continue];
       }
   
-      bb27: {
+      bb32: {
+          StorageDead(_111);
+          StorageDead(_112);
           StorageDead(_110);
-          StorageDead(_109);
-          StorageLive(_115);
+          StorageLive(_114);
+-         StorageLive(_115);
++         nop;
           StorageLive(_116);
--         StorageLive(_117);
--         StorageLive(_118);
--         _118 = _1;
--         StorageLive(_119);
--         _119 = _2;
--         _117 = Shr(move _118, move _119);
--         StorageDead(_119);
--         StorageDead(_118);
-          StorageLive(_120);
-          _120 = _3;
--         _116 = Add(move _117, move _120);
-+         _116 = Add(_43, move _120);
-          StorageDead(_120);
--         StorageDead(_117);
-          _115 = opaque::<u64>(move _116) -> [return: bb28, unwind continue];
+          StorageLive(_117);
+          _117 = _1;
+          StorageLive(_118);
+          _118 = _2;
+-         _116 = Mul(move _117, move _118);
++         _116 = _9;
+          StorageDead(_118);
+          StorageDead(_117);
+          StorageLive(_119);
+          _119 = _2;
+-         _115 = Sub(move _116, move _119);
++         _115 = Sub(_9, _2);
+          StorageDead(_119);
+          StorageDead(_116);
+-         _114 = opaque::<u64>(move _115) -> [return: bb33, unwind continue];
++         _114 = opaque::<u64>(_115) -> [return: bb33, unwind continue];
       }
   
-      bb28: {
-          StorageDead(_116);
-          StorageDead(_115);
+      bb33: {
+-         StorageDead(_115);
++         nop;
+          StorageDead(_114);
+          StorageLive(_120);
           StorageLive(_121);
--         StorageLive(_122);
--         StorageLive(_123);
--         _123 = _1;
--         _122 = S::<u64>(move _123);
--         StorageDead(_123);
--         _121 = opaque::<S<u64>>(move _122) -> [return: bb29, unwind continue];
-+         _121 = opaque::<S<u64>>(_53) -> [return: bb29, unwind continue];
+          StorageLive(_122);
+          StorageLive(_123);
+          _123 = _1;
+          StorageLive(_124);
+          _124 = _2;
+-         _122 = Mul(move _123, move _124);
++         _122 = _9;
+          StorageDead(_124);
+          StorageDead(_123);
+          StorageLive(_125);
+          _125 = _2;
+-         _121 = Sub(move _122, move _125);
++         _121 = _115;
+          StorageDead(_125);
+          StorageDead(_122);
+-         _120 = opaque::<u64>(move _121) -> [return: bb34, unwind continue];
++         _120 = opaque::<u64>(_115) -> [return: bb34, unwind continue];
       }
   
-      bb29: {
--         StorageDead(_122);
+      bb34: {
           StorageDead(_121);
-          StorageLive(_124);
--         StorageLive(_125);
+          StorageDead(_120);
 -         StorageLive(_126);
--         StorageLive(_127);
--         _127 = _1;
--         _126 = S::<u64>(move _127);
--         StorageDead(_127);
--         _125 = (_126.0: u64);
--         _124 = opaque::<u64>(move _125) -> [return: bb30, unwind continue];
-+         _124 = opaque::<u64>(_56) -> [return: bb30, unwind continue];
-      }
-  
-      bb30: {
--         StorageDead(_125);
--         StorageDead(_126);
-          StorageDead(_124);
-          StorageLive(_128);
-          _128 = &_3;
-          StorageLive(_129);
--         StorageLive(_130);
--         StorageLive(_131);
-          _131 = (*_128);
--         StorageLive(_132);
--         _132 = _1;
--         _130 = Add(move _131, move _132);
--         StorageDead(_132);
--         StorageDead(_131);
--         _129 = opaque::<u64>(move _130) -> [return: bb31, unwind continue];
-+         _130 = Add(_131, _1);
-+         _129 = opaque::<u64>(_130) -> [return: bb31, unwind continue];
++         nop;
+          _126 = &_3;
+          StorageLive(_127);
+-         StorageLive(_128);
+-         StorageLive(_129);
++         nop;
++         nop;
+          _129 = (*_126);
+          StorageLive(_130);
+          _130 = _1;
+-         _128 = Add(move _129, move _130);
++         _128 = Add(_129, _1);
+          StorageDead(_130);
+-         StorageDead(_129);
+-         _127 = opaque::<u64>(move _128) -> [return: bb35, unwind continue];
++         nop;
++         _127 = opaque::<u64>(_128) -> [return: bb35, unwind continue];
       }
   
-      bb31: {
--         StorageDead(_130);
-          StorageDead(_129);
+      bb35: {
+-         StorageDead(_128);
++         nop;
+          StorageDead(_127);
+          StorageLive(_131);
+          StorageLive(_132);
           StorageLive(_133);
--         StorageLive(_134);
--         StorageLive(_135);
--         _135 = (*_128);
--         StorageLive(_136);
--         _136 = _1;
--         _134 = Add(move _135, move _136);
--         StorageDead(_136);
--         StorageDead(_135);
--         _133 = opaque::<u64>(move _134) -> [return: bb32, unwind continue];
-+         _133 = opaque::<u64>(_130) -> [return: bb32, unwind continue];
+-         _133 = (*_126);
++         _133 = _129;
+          StorageLive(_134);
+          _134 = _1;
+-         _132 = Add(move _133, move _134);
++         _132 = _128;
+          StorageDead(_134);
+          StorageDead(_133);
+-         _131 = opaque::<u64>(move _132) -> [return: bb36, unwind continue];
++         _131 = opaque::<u64>(_128) -> [return: bb36, unwind continue];
       }
   
-      bb32: {
--         StorageDead(_134);
-          StorageDead(_133);
+      bb36: {
+          StorageDead(_132);
+          StorageDead(_131);
+-         StorageLive(_135);
++         nop;
+          _135 = &mut _3;
+          StorageLive(_136);
           StorageLive(_137);
-          _137 = &mut _3;
           StorageLive(_138);
+          _138 = (*_135);
           StorageLive(_139);
-          StorageLive(_140);
-          _140 = (*_137);
--         StorageLive(_141);
--         _141 = _1;
--         _139 = Add(move _140, move _141);
--         StorageDead(_141);
-+         _139 = Add(move _140, _1);
-          StorageDead(_140);
-          _138 = opaque::<u64>(move _139) -> [return: bb33, unwind continue];
-      }
-  
-      bb33: {
+          _139 = _1;
+-         _137 = Add(move _138, move _139);
++         _137 = Add(move _138, _1);
           StorageDead(_139);
           StorageDead(_138);
-          StorageLive(_142);
-          StorageLive(_143);
-          StorageLive(_144);
-          _144 = (*_137);
--         StorageLive(_145);
--         _145 = _1;
--         _143 = Add(move _144, move _145);
--         StorageDead(_145);
-+         _143 = Add(move _144, _1);
-          StorageDead(_144);
-          _142 = opaque::<u64>(move _143) -> [return: bb34, unwind continue];
+          _136 = opaque::<u64>(move _137) -> [return: bb37, unwind continue];
       }
   
-      bb34: {
+      bb37: {
+          StorageDead(_137);
+          StorageDead(_136);
+          StorageLive(_140);
+          StorageLive(_141);
+          StorageLive(_142);
+          _142 = (*_135);
+          StorageLive(_143);
+          _143 = _1;
+-         _141 = Add(move _142, move _143);
++         _141 = Add(move _142, _1);
           StorageDead(_143);
           StorageDead(_142);
--         StorageLive(_146);
+          _140 = opaque::<u64>(move _141) -> [return: bb38, unwind continue];
+      }
+  
+      bb38: {
+          StorageDead(_141);
+          StorageDead(_140);
+          StorageLive(_144);
+-         StorageLive(_145);
++         nop;
+          _145 = &raw const _3;
+          StorageLive(_146);
           StorageLive(_147);
-          _147 = &raw const _3;
           StorageLive(_148);
+          _148 = (*_145);
           StorageLive(_149);
-          StorageLive(_150);
-          _150 = (*_147);
--         StorageLive(_151);
--         _151 = _1;
--         _149 = Add(move _150, move _151);
--         StorageDead(_151);
-+         _149 = Add(move _150, _1);
-          StorageDead(_150);
-          _148 = opaque::<u64>(move _149) -> [return: bb35, unwind continue];
-      }
-  
-      bb35: {
+          _149 = _1;
+-         _147 = Add(move _148, move _149);
++         _147 = Add(move _148, _1);
           StorageDead(_149);
           StorageDead(_148);
-          StorageLive(_152);
-          StorageLive(_153);
-          StorageLive(_154);
-          _154 = (*_147);
--         StorageLive(_155);
--         _155 = _1;
--         _153 = Add(move _154, move _155);
--         StorageDead(_155);
-+         _153 = Add(move _154, _1);
-          StorageDead(_154);
-          _152 = opaque::<u64>(move _153) -> [return: bb36, unwind continue];
+          _146 = opaque::<u64>(move _147) -> [return: bb39, unwind continue];
       }
   
-      bb36: {
+      bb39: {
+          StorageDead(_147);
+          StorageDead(_146);
+          StorageLive(_150);
+          StorageLive(_151);
+          StorageLive(_152);
+          _152 = (*_145);
+          StorageLive(_153);
+          _153 = _1;
+-         _151 = Add(move _152, move _153);
++         _151 = Add(move _152, _1);
           StorageDead(_153);
           StorageDead(_152);
+          _150 = opaque::<u64>(move _151) -> [return: bb40, unwind continue];
+      }
+  
+      bb40: {
+          StorageDead(_151);
+          StorageDead(_150);
+-         StorageLive(_154);
++         nop;
+          _154 = &raw mut _3;
+          StorageLive(_155);
           StorageLive(_156);
-          _156 = &raw mut _3;
           StorageLive(_157);
+          _157 = (*_154);
           StorageLive(_158);
-          StorageLive(_159);
-          _159 = (*_156);
--         StorageLive(_160);
--         _160 = _1;
--         _158 = Add(move _159, move _160);
--         StorageDead(_160);
-+         _158 = Add(move _159, _1);
-          StorageDead(_159);
-          _157 = opaque::<u64>(move _158) -> [return: bb37, unwind continue];
-      }
-  
-      bb37: {
+          _158 = _1;
+-         _156 = Add(move _157, move _158);
++         _156 = Add(move _157, _1);
           StorageDead(_158);
           StorageDead(_157);
-          StorageLive(_161);
-          StorageLive(_162);
-          StorageLive(_163);
-          _163 = (*_156);
--         StorageLive(_164);
--         _164 = _1;
--         _162 = Add(move _163, move _164);
--         StorageDead(_164);
-+         _162 = Add(move _163, _1);
-          StorageDead(_163);
-          _161 = opaque::<u64>(move _162) -> [return: bb38, unwind continue];
+          _155 = opaque::<u64>(move _156) -> [return: bb41, unwind continue];
       }
   
-      bb38: {
+      bb41: {
+          StorageDead(_156);
+          StorageDead(_155);
+          StorageLive(_159);
+          StorageLive(_160);
+          StorageLive(_161);
+          _161 = (*_154);
+          StorageLive(_162);
+          _162 = _1;
+-         _160 = Add(move _161, move _162);
++         _160 = Add(move _161, _1);
           StorageDead(_162);
           StorageDead(_161);
--         _146 = const ();
-          StorageDead(_156);
-          StorageDead(_147);
--         StorageDead(_146);
-          StorageLive(_165);
-          _165 = &_3;
-          StorageLive(_166);
--         StorageLive(_167);
--         StorageLive(_168);
-          _168 = (*_165);
--         StorageLive(_169);
--         _169 = _1;
--         _167 = Add(move _168, move _169);
--         StorageDead(_169);
--         StorageDead(_168);
--         _166 = opaque::<u64>(move _167) -> [return: bb39, unwind continue];
-+         _167 = Add(_168, _1);
-+         _166 = opaque::<u64>(_167) -> [return: bb39, unwind continue];
+          _159 = opaque::<u64>(move _160) -> [return: bb42, unwind continue];
       }
   
-      bb39: {
--         StorageDead(_167);
-          StorageDead(_166);
+      bb42: {
+          StorageDead(_160);
+          StorageDead(_159);
+          _144 = const ();
+-         StorageDead(_154);
+-         StorageDead(_145);
++         nop;
++         nop;
+          StorageDead(_144);
+-         StorageLive(_163);
++         nop;
+          _163 = &_3;
+          StorageLive(_164);
+-         StorageLive(_165);
+-         StorageLive(_166);
++         nop;
++         nop;
+          _166 = (*_163);
+          StorageLive(_167);
+          _167 = _1;
+-         _165 = Add(move _166, move _167);
++         _165 = Add(_166, _1);
+          StorageDead(_167);
+-         StorageDead(_166);
+-         _164 = opaque::<u64>(move _165) -> [return: bb43, unwind continue];
++         nop;
++         _164 = opaque::<u64>(_165) -> [return: bb43, unwind continue];
+      }
+  
+      bb43: {
+-         StorageDead(_165);
++         nop;
+          StorageDead(_164);
+          StorageLive(_168);
+          StorageLive(_169);
           StorageLive(_170);
--         StorageLive(_171);
--         StorageLive(_172);
--         _172 = (*_165);
--         StorageLive(_173);
--         _173 = _1;
--         _171 = Add(move _172, move _173);
--         StorageDead(_173);
--         StorageDead(_172);
--         _170 = opaque::<u64>(move _171) -> [return: bb40, unwind continue];
-+         _170 = opaque::<u64>(_167) -> [return: bb40, unwind continue];
+-         _170 = (*_163);
++         _170 = _166;
+          StorageLive(_171);
+          _171 = _1;
+-         _169 = Add(move _170, move _171);
++         _169 = _165;
+          StorageDead(_171);
+          StorageDead(_170);
+-         _168 = opaque::<u64>(move _169) -> [return: bb44, unwind continue];
++         _168 = opaque::<u64>(_165) -> [return: bb44, unwind continue];
       }
   
-      bb40: {
--         StorageDead(_171);
-          StorageDead(_170);
+      bb44: {
+          StorageDead(_169);
+          StorageDead(_168);
           _0 = const ();
-          StorageDead(_165);
-          StorageDead(_137);
-          StorageDead(_128);
+-         StorageDead(_163);
+-         StorageDead(_135);
+-         StorageDead(_126);
++         nop;
++         nop;
++         nop;
           return;
       }
   }
diff --git a/tests/mir-opt/gvn.wrap_unwrap.GVN.panic-abort.diff b/tests/mir-opt/gvn.wrap_unwrap.GVN.panic-abort.diff
index f33845502ad..62710ba8fbf 100644
--- a/tests/mir-opt/gvn.wrap_unwrap.GVN.panic-abort.diff
+++ b/tests/mir-opt/gvn.wrap_unwrap.GVN.panic-abort.diff
@@ -15,13 +15,15 @@
   
       bb0: {
           StorageLive(_2);
--         StorageLive(_3);
--         _3 = _1;
+          StorageLive(_3);
+          _3 = _1;
 -         _2 = Option::<T>::Some(move _3);
--         StorageDead(_3);
 +         _2 = Option::<T>::Some(_1);
-          _4 = discriminant(_2);
-          switchInt(move _4) -> [0: bb1, 1: bb3, otherwise: bb2];
+          StorageDead(_3);
+-         _4 = discriminant(_2);
+-         switchInt(move _4) -> [0: bb1, 1: bb3, otherwise: bb2];
++         _4 = const 1_isize;
++         switchInt(const 1_isize) -> [0: bb1, 1: bb3, otherwise: bb2];
       }
   
       bb1: {
@@ -34,10 +36,12 @@
       }
   
       bb3: {
--         StorageLive(_5);
-          _5 = ((_2 as Some).0: T);
-          _0 = _5;
--         StorageDead(_5);
+          StorageLive(_5);
+-         _5 = ((_2 as Some).0: T);
+-         _0 = _5;
++         _5 = _1;
++         _0 = _1;
+          StorageDead(_5);
           StorageDead(_2);
           return;
       }
diff --git a/tests/mir-opt/gvn.wrap_unwrap.GVN.panic-unwind.diff b/tests/mir-opt/gvn.wrap_unwrap.GVN.panic-unwind.diff
index edc05f99fe2..ad46a065b1e 100644
--- a/tests/mir-opt/gvn.wrap_unwrap.GVN.panic-unwind.diff
+++ b/tests/mir-opt/gvn.wrap_unwrap.GVN.panic-unwind.diff
@@ -15,13 +15,15 @@
   
       bb0: {
           StorageLive(_2);
--         StorageLive(_3);
--         _3 = _1;
+          StorageLive(_3);
+          _3 = _1;
 -         _2 = Option::<T>::Some(move _3);
--         StorageDead(_3);
 +         _2 = Option::<T>::Some(_1);
-          _4 = discriminant(_2);
-          switchInt(move _4) -> [0: bb1, 1: bb3, otherwise: bb2];
+          StorageDead(_3);
+-         _4 = discriminant(_2);
+-         switchInt(move _4) -> [0: bb1, 1: bb3, otherwise: bb2];
++         _4 = const 1_isize;
++         switchInt(const 1_isize) -> [0: bb1, 1: bb3, otherwise: bb2];
       }
   
       bb1: {
@@ -34,10 +36,12 @@
       }
   
       bb3: {
--         StorageLive(_5);
-          _5 = ((_2 as Some).0: T);
-          _0 = _5;
--         StorageDead(_5);
+          StorageLive(_5);
+-         _5 = ((_2 as Some).0: T);
+-         _0 = _5;
++         _5 = _1;
++         _0 = _1;
+          StorageDead(_5);
           StorageDead(_2);
           return;
       }
diff --git a/tests/mir-opt/if_condition_int.rs b/tests/mir-opt/if_condition_int.rs
index 398311e6bb8..a3dd74d9a37 100644
--- a/tests/mir-opt/if_condition_int.rs
+++ b/tests/mir-opt/if_condition_int.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: SimplifyComparisonIntegral
 // EMIT_MIR if_condition_int.opt_u32.SimplifyComparisonIntegral.diff
 // EMIT_MIR if_condition_int.opt_negative.SimplifyComparisonIntegral.diff
diff --git a/tests/mir-opt/inline/asm_unwind.rs b/tests/mir-opt/inline/asm_unwind.rs
index 573ae1ba68d..0ae20e52211 100644
--- a/tests/mir-opt/inline/asm_unwind.rs
+++ b/tests/mir-opt/inline/asm_unwind.rs
@@ -2,6 +2,7 @@
 //
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // needs-asm-support
+// needs-unwind
 // compile-flags: -Zinline-mir-hint-threshold=1000
 #![feature(asm_unwind)]
 
@@ -19,5 +20,9 @@ fn foo() {
 
 // EMIT_MIR asm_unwind.main.Inline.diff
 pub fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: (inlined foo)
+    // CHECK: asm!("", options(MAY_UNWIND)) -> [return: {{bb.*}}, unwind: [[unwind:bb.*]]];
+    // CHECK: [[unwind]] (cleanup)
     foo();
 }
diff --git a/tests/mir-opt/inline/caller_with_trivial_bound.rs b/tests/mir-opt/inline/caller_with_trivial_bound.rs
index a8f101d488c..40f7f4bbab2 100644
--- a/tests/mir-opt/inline/caller_with_trivial_bound.rs
+++ b/tests/mir-opt/inline/caller_with_trivial_bound.rs
@@ -15,8 +15,13 @@ impl<T> Factory<T> for IntFactory {
 // EMIT_MIR caller_with_trivial_bound.foo.Inline.diff
 pub fn foo<T>()
 where
+    // Because of this trivial bound, the inliner fails to normalize
+    // `<IntFactory as Factory<T>>::Item`.
+    // Verify that we do not inline anything, which would cause validation ICEs.
     IntFactory: Factory<T>,
 {
+    // CHECK-LABEL: fn foo(
+    // CHECK-NOT: (inlined bar::<T>)
     let mut x: <IntFactory as Factory<T>>::Item = bar::<T>();
 }
 
diff --git a/tests/mir-opt/inline/cycle.rs b/tests/mir-opt/inline/cycle.rs
index 1b74d818451..350724235ba 100644
--- a/tests/mir-opt/inline/cycle.rs
+++ b/tests/mir-opt/inline/cycle.rs
@@ -4,16 +4,26 @@
 // EMIT_MIR cycle.f.Inline.diff
 #[inline(always)]
 fn f(g: impl Fn()) {
+    // CHECK-LABEL: fn f(
+    // CHECK-NOT: inlined
     g();
 }
 
 // EMIT_MIR cycle.g.Inline.diff
 #[inline(always)]
 fn g() {
+    // CHECK-LABEL: fn g(
+    // CHECK-NOT: inlined
+    // CHECK: (inlined f::<fn() {main}>)
+    // CHECK-NOT: inlined
     f(main);
 }
 
 // EMIT_MIR cycle.main.Inline.diff
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK-NOT: inlined
+    // CHECK: (inlined f::<fn() {g}>)
+    // CHECK-NOT: inlined
     f(g);
 }
diff --git a/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs b/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs
index 971223c72ca..ce5e1855a71 100644
--- a/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs
+++ b/tests/mir-opt/inline/dont_ice_on_generic_rust_call.rs
@@ -7,5 +7,7 @@ use std::marker::Tuple;
 
 // EMIT_MIR dont_ice_on_generic_rust_call.call.Inline.diff
 pub fn call<I: Tuple>(mut mock: Box<dyn FnMut<I, Output = ()>>, input: I) {
+    // CHECK-LABEL: fn call(
+    // CHECK-NOT: inlined
     mock.call_mut(input)
 }
diff --git a/tests/mir-opt/inline/dyn_trait.rs b/tests/mir-opt/inline/dyn_trait.rs
index 0faeec0bbab..ecf220a85e6 100644
--- a/tests/mir-opt/inline/dyn_trait.rs
+++ b/tests/mir-opt/inline/dyn_trait.rs
@@ -19,18 +19,26 @@ pub trait Query {
 // EMIT_MIR dyn_trait.mk_cycle.Inline.diff
 #[inline(always)]
 pub fn mk_cycle<V: Debug>(c: &dyn Cache<V = V>) {
+    // CHECK-LABEL: fn mk_cycle(
+    // CHECK-NOT: inlined
     c.store_nocache()
 }
 
 // EMIT_MIR dyn_trait.try_execute_query.Inline.diff
 #[inline(always)]
 pub fn try_execute_query<C: Cache>(c: &C) {
+    // CHECK-LABEL: fn try_execute_query(
+    // CHECK: (inlined mk_cycle::<<C as Cache>::V>)
     mk_cycle(c)
 }
 
 // EMIT_MIR dyn_trait.get_query.Inline.diff
 #[inline(always)]
 pub fn get_query<Q: Query, T>(t: &T) {
+    // CHECK-LABEL: fn get_query(
+    // CHECK-NOT: inlined
     let c = Q::cache(t);
+    // CHECK: (inlined try_execute_query::<<Q as Query>::C>)
+    // CHECK: (inlined mk_cycle::<<Q as Query>::V>)
     try_execute_query(c)
 }
diff --git a/tests/mir-opt/inline/exponential_runtime.rs b/tests/mir-opt/inline/exponential_runtime.rs
index cfa9ff210f8..1199ce4e558 100644
--- a/tests/mir-opt/inline/exponential_runtime.rs
+++ b/tests/mir-opt/inline/exponential_runtime.rs
@@ -84,5 +84,14 @@ impl A for () {
 
 // EMIT_MIR exponential_runtime.main.Inline.diff
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK-NOT: inlined
+    // CHECK: (inlined <() as G>::call)
+    // CHECK: (inlined <() as F>::call)
+    // CHECK: (inlined <() as E>::call)
+    // CHECK: (inlined <() as D>::call)
+    // CHECK: (inlined <() as C>::call)
+    // CHECK: (inlined <() as B>::call)
+    // CHECK-NOT: inlined
     <() as G>::call();
 }
diff --git a/tests/mir-opt/inline/inline_any_operand.rs b/tests/mir-opt/inline/inline_any_operand.rs
index fb0de020f73..659b7c3a0a1 100644
--- a/tests/mir-opt/inline/inline_any_operand.rs
+++ b/tests/mir-opt/inline/inline_any_operand.rs
@@ -8,6 +8,8 @@ fn main() {
 
 // EMIT_MIR inline_any_operand.bar.Inline.after.mir
 fn bar() -> bool {
+    // CHECK-LABEL: fn bar(
+    // CHECK: (inlined foo)
     let f = foo;
     f(1, -1)
 }
diff --git a/tests/mir-opt/inline/inline_async.rs b/tests/mir-opt/inline/inline_async.rs
index 5c838159b98..1de87e1e43c 100644
--- a/tests/mir-opt/inline/inline_async.rs
+++ b/tests/mir-opt/inline/inline_async.rs
@@ -1,4 +1,5 @@
-// Checks that inliner doesn't introduce cycles when optimizing generators.
+// skip-filecheck
+// Checks that inliner doesn't introduce cycles when optimizing coroutines.
 // The outcome of optimization is not verfied, just the absence of the cycle.
 // Regression test for #76181.
 //
diff --git a/tests/mir-opt/inline/inline_box_fn.rs b/tests/mir-opt/inline/inline_box_fn.rs
index 348f0e77f92..d2da2393992 100644
--- a/tests/mir-opt/inline/inline_box_fn.rs
+++ b/tests/mir-opt/inline/inline_box_fn.rs
@@ -4,5 +4,7 @@
 
 // EMIT_MIR inline_box_fn.call.Inline.diff
 fn call(x: Box<dyn Fn(i32)>) {
+    // CHECK-LABEL: fn call(
+    // CHECK-NOT: inlined
     x(1);
 }
diff --git a/tests/mir-opt/inline/inline_closure.rs b/tests/mir-opt/inline/inline_closure.rs
index 715fd0138a7..65f55d49a80 100644
--- a/tests/mir-opt/inline/inline_closure.rs
+++ b/tests/mir-opt/inline/inline_closure.rs
@@ -9,5 +9,8 @@ fn main() {
 // EMIT_MIR inline_closure.foo.Inline.after.mir
 fn foo<T: Copy>(_t: T, q: i32) -> i32 {
     let x = |_t, _q| _t;
+
+    // CHECK-LABEL: fn foo(
+    // CHECK: (inlined foo::<T>::{closure#0})
     x(q, q)
 }
diff --git a/tests/mir-opt/inline/inline_closure_borrows_arg.rs b/tests/mir-opt/inline/inline_closure_borrows_arg.rs
index d76bc33f52e..1570ab057c7 100644
--- a/tests/mir-opt/inline/inline_closure_borrows_arg.rs
+++ b/tests/mir-opt/inline/inline_closure_borrows_arg.rs
@@ -13,5 +13,8 @@ fn foo<T: Copy>(_t: T, q: &i32) -> i32 {
         let variable = &*r;
         *variable
     };
+
+    // CHECK-LABEL: fn foo(
+    // CHECK: (inlined foo::<T>::{closure#0})
     x(q, q)
 }
diff --git a/tests/mir-opt/inline/inline_closure_captures.rs b/tests/mir-opt/inline/inline_closure_captures.rs
index 52b6817e401..2b08b106887 100644
--- a/tests/mir-opt/inline/inline_closure_captures.rs
+++ b/tests/mir-opt/inline/inline_closure_captures.rs
@@ -9,5 +9,8 @@ fn main() {
 // EMIT_MIR inline_closure_captures.foo.Inline.after.mir
 fn foo<T: Copy>(t: T, q: i32) -> (i32, T) {
     let x = |_q| (q, t);
+
+    // CHECK-LABEL: fn foo(
+    // CHECK: (inlined foo::<T>::{closure#0})
     x(q)
 }
diff --git a/tests/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.panic-abort.diff
deleted file mode 100644
index eac51000cac..00000000000
--- a/tests/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.panic-abort.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-- // MIR for `inlined_no_sanitize` before Inline
-+ // MIR for `inlined_no_sanitize` after Inline
-  
-  fn inlined_no_sanitize() -> () {
-      let mut _0: ();
-      let _1: ();
-+     scope 1 (inlined no_sanitize) {
-+     }
-  
-      bb0: {
-          StorageLive(_1);
--         _1 = no_sanitize() -> [return: bb1, unwind unreachable];
--     }
-- 
--     bb1: {
-          StorageDead(_1);
-          _0 = const ();
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.panic-unwind.diff
deleted file mode 100644
index eba5ad9cf26..00000000000
--- a/tests/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.panic-unwind.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-- // MIR for `inlined_no_sanitize` before Inline
-+ // MIR for `inlined_no_sanitize` after Inline
-  
-  fn inlined_no_sanitize() -> () {
-      let mut _0: ();
-      let _1: ();
-+     scope 1 (inlined no_sanitize) {
-+     }
-  
-      bb0: {
-          StorageLive(_1);
--         _1 = no_sanitize() -> [return: bb1, unwind continue];
--     }
-- 
--     bb1: {
-          StorageDead(_1);
-          _0 = const ();
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.panic-abort.diff
deleted file mode 100644
index c2a81b9804e..00000000000
--- a/tests/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.panic-abort.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-- // MIR for `inlined_target_feature` before Inline
-+ // MIR for `inlined_target_feature` after Inline
-  
-  fn inlined_target_feature() -> () {
-      let mut _0: ();
-      let _1: ();
-+     scope 1 (inlined target_feature) {
-+     }
-  
-      bb0: {
-          StorageLive(_1);
--         _1 = target_feature() -> [return: bb1, unwind unreachable];
--     }
-- 
--     bb1: {
-          StorageDead(_1);
-          _0 = const ();
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.panic-unwind.diff
deleted file mode 100644
index 24457819b2c..00000000000
--- a/tests/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.panic-unwind.diff
+++ /dev/null
@@ -1,21 +0,0 @@
-- // MIR for `inlined_target_feature` before Inline
-+ // MIR for `inlined_target_feature` after Inline
-  
-  fn inlined_target_feature() -> () {
-      let mut _0: ();
-      let _1: ();
-+     scope 1 (inlined target_feature) {
-+     }
-  
-      bb0: {
-          StorageLive(_1);
--         _1 = target_feature() -> [return: bb1, unwind continue];
--     }
-- 
--     bb1: {
-          StorageDead(_1);
-          _0 = const ();
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.panic-abort.diff
deleted file mode 100644
index 791c5a0f29f..00000000000
--- a/tests/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.panic-abort.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-- // MIR for `not_inlined_c_variadic` before Inline
-+ // MIR for `not_inlined_c_variadic` after Inline
-  
-  fn not_inlined_c_variadic() -> () {
-      let mut _0: ();
-      let _1: u32;
-      scope 1 {
-          debug s => _1;
-      }
-  
-      bb0: {
-          StorageLive(_1);
-          _1 = sum(const 4_u32, const 4_u32, const 30_u32, const 200_u32, const 1000_u32) -> [return: bb1, unwind unreachable];
-      }
-  
-      bb1: {
-          _0 = const ();
-          StorageDead(_1);
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.panic-unwind.diff
deleted file mode 100644
index 364acab6d93..00000000000
--- a/tests/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.panic-unwind.diff
+++ /dev/null
@@ -1,22 +0,0 @@
-- // MIR for `not_inlined_c_variadic` before Inline
-+ // MIR for `not_inlined_c_variadic` after Inline
-  
-  fn not_inlined_c_variadic() -> () {
-      let mut _0: ();
-      let _1: u32;
-      scope 1 {
-          debug s => _1;
-      }
-  
-      bb0: {
-          StorageLive(_1);
-          _1 = sum(const 4_u32, const 4_u32, const 30_u32, const 200_u32, const 1000_u32) -> [return: bb1, unwind continue];
-      }
-  
-      bb1: {
-          _0 = const ();
-          StorageDead(_1);
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.panic-abort.diff
deleted file mode 100644
index b9d0946b7c3..00000000000
--- a/tests/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.panic-abort.diff
+++ /dev/null
@@ -1,19 +0,0 @@
-- // MIR for `not_inlined_no_sanitize` before Inline
-+ // MIR for `not_inlined_no_sanitize` after Inline
-  
-  fn not_inlined_no_sanitize() -> () {
-      let mut _0: ();
-      let _1: ();
-  
-      bb0: {
-          StorageLive(_1);
-          _1 = no_sanitize() -> [return: bb1, unwind unreachable];
-      }
-  
-      bb1: {
-          StorageDead(_1);
-          _0 = const ();
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.panic-unwind.diff
deleted file mode 100644
index 965b7ddca32..00000000000
--- a/tests/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.panic-unwind.diff
+++ /dev/null
@@ -1,19 +0,0 @@
-- // MIR for `not_inlined_no_sanitize` before Inline
-+ // MIR for `not_inlined_no_sanitize` after Inline
-  
-  fn not_inlined_no_sanitize() -> () {
-      let mut _0: ();
-      let _1: ();
-  
-      bb0: {
-          StorageLive(_1);
-          _1 = no_sanitize() -> [return: bb1, unwind continue];
-      }
-  
-      bb1: {
-          StorageDead(_1);
-          _0 = const ();
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.panic-abort.diff
deleted file mode 100644
index 7c689a73482..00000000000
--- a/tests/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.panic-abort.diff
+++ /dev/null
@@ -1,19 +0,0 @@
-- // MIR for `not_inlined_target_feature` before Inline
-+ // MIR for `not_inlined_target_feature` after Inline
-  
-  fn not_inlined_target_feature() -> () {
-      let mut _0: ();
-      let _1: ();
-  
-      bb0: {
-          StorageLive(_1);
-          _1 = target_feature() -> [return: bb1, unwind unreachable];
-      }
-  
-      bb1: {
-          StorageDead(_1);
-          _0 = const ();
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.panic-unwind.diff
deleted file mode 100644
index bcdbd6e3314..00000000000
--- a/tests/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.panic-unwind.diff
+++ /dev/null
@@ -1,19 +0,0 @@
-- // MIR for `not_inlined_target_feature` before Inline
-+ // MIR for `not_inlined_target_feature` after Inline
-  
-  fn not_inlined_target_feature() -> () {
-      let mut _0: ();
-      let _1: ();
-  
-      bb0: {
-          StorageLive(_1);
-          _1 = target_feature() -> [return: bb1, unwind continue];
-      }
-  
-      bb1: {
-          StorageDead(_1);
-          _0 = const ();
-          return;
-      }
-  }
-  
diff --git a/tests/mir-opt/inline/inline_compatibility.rs b/tests/mir-opt/inline/inline_compatibility.rs
index 1527fea1c93..3ad880715fe 100644
--- a/tests/mir-opt/inline/inline_compatibility.rs
+++ b/tests/mir-opt/inline/inline_compatibility.rs
@@ -1,50 +1,71 @@
 // Checks that only functions with compatible attributes are inlined.
-//
 // only-x86_64
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+// compile-flags: -Cpanic=abort
 
 #![crate_type = "lib"]
 #![feature(no_sanitize)]
 #![feature(target_feature_11)]
 #![feature(c_variadic)]
 
-// EMIT_MIR inline_compatibility.inlined_target_feature.Inline.diff
+#[inline]
+#[target_feature(enable = "sse2")]
+unsafe fn sse2() {}
+
+#[inline]
+fn nop() {}
+
+// CHECK-LABEL: fn f0()
+// CHECK:       bb0: {
+// CHECK-NEXT:  return;
 #[target_feature(enable = "sse2")]
-pub unsafe fn inlined_target_feature() {
-    target_feature();
+pub unsafe fn f0() {
+    sse2();
 }
 
-// EMIT_MIR inline_compatibility.not_inlined_target_feature.Inline.diff
-pub unsafe fn not_inlined_target_feature() {
-    target_feature();
+// CHECK-LABEL: fn f1()
+// CHECK:       bb0: {
+// CHECK-NEXT:  sse2()
+pub unsafe fn f1() {
+    sse2();
 }
 
-// EMIT_MIR inline_compatibility.inlined_no_sanitize.Inline.diff
+// CHECK-LABEL: fn f2()
+// CHECK:       bb0: {
+// CHECK-NEXT:  nop()
+#[target_feature(enable = "avx")]
+pub unsafe fn f2() {
+    nop();
+}
+
+#[inline]
+#[no_sanitize(address)]
+pub unsafe fn no_sanitize() {}
+
+// CHECK-LABEL: fn inlined_no_sanitize()
+// CHECK:       bb0: {
+// CHECK-NEXT:  return;
 #[no_sanitize(address)]
 pub unsafe fn inlined_no_sanitize() {
     no_sanitize();
 }
 
-// EMIT_MIR inline_compatibility.not_inlined_no_sanitize.Inline.diff
+// CHECK-LABEL: fn not_inlined_no_sanitize()
+// CHECK:       bb0: {
+// CHECK-NEXT:  no_sanitize()
 pub unsafe fn not_inlined_no_sanitize() {
     no_sanitize();
 }
 
-#[inline]
-#[target_feature(enable = "sse2")]
-pub unsafe fn target_feature() {}
-
-#[inline]
-#[no_sanitize(address)]
-pub unsafe fn no_sanitize() {}
-
-// EMIT_MIR inline_compatibility.not_inlined_c_variadic.Inline.diff
+// CHECK-LABEL: fn not_inlined_c_variadic()
+// CHECK:       bb0: {
+// CHECK-NEXT:  StorageLive(_1)
+// CHECK-NEXT:  _1 = sum
 pub unsafe fn not_inlined_c_variadic() {
-    let s = sum(4u32, 4u32, 30u32, 200u32, 1000u32);
+    let _ = sum(4u32, 4u32, 30u32, 200u32, 1000u32);
 }
 
-#[no_mangle]
 #[inline(always)]
+#[no_mangle]
 unsafe extern "C" fn sum(n: u32, mut vs: ...) -> u32 {
     let mut s = 0;
     let mut i = 0;
diff --git a/tests/mir-opt/inline/inline_generator.main.Inline.panic-abort.diff b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff
index 06ee8c464d5..40eeda53908 100644
--- a/tests/mir-opt/inline/inline_generator.main.Inline.panic-abort.diff
+++ b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-abort.diff
@@ -3,27 +3,27 @@
   
   fn main() -> () {
       let mut _0: ();
-      let _1: std::ops::GeneratorState<i32, bool>;
-      let mut _2: std::pin::Pin<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>;
-      let mut _3: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8};
-      let mut _4: {generator@$DIR/inline_generator.rs:16:5: 16:8};
+      let _1: std::ops::CoroutineState<i32, bool>;
+      let mut _2: std::pin::Pin<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>;
+      let mut _3: &mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8};
+      let mut _4: {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8};
 +     let mut _5: bool;
       scope 1 {
           debug _r => _1;
       }
 +     scope 2 (inlined g) {
 +     }
-+     scope 3 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new) {
++     scope 3 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new) {
 +         debug pointer => _3;
 +         scope 4 {
-+             scope 5 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new_unchecked) {
++             scope 5 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new_unchecked) {
 +                 debug pointer => _3;
 +             }
 +         }
 +     }
 +     scope 6 (inlined g::{closure#0}) {
 +         debug a => _5;
-+         let mut _6: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8};
++         let mut _6: &mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8};
 +         let mut _7: u32;
 +         let mut _8: i32;
 +     }
@@ -34,22 +34,22 @@
           StorageLive(_3);
           StorageLive(_4);
 -         _4 = g() -> [return: bb1, unwind unreachable];
-+         _4 = {generator@$DIR/inline_generator.rs:16:5: 16:8 (#0)};
++         _4 = {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8 (#0)};
 +         _3 = &mut _4;
-+         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}> { pointer: move _3 };
++         _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}> { pointer: move _3 };
 +         StorageDead(_3);
 +         StorageLive(_5);
 +         _5 = const false;
 +         StorageLive(_6);
 +         StorageLive(_7);
-+         _6 = (_2.0: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8});
++         _6 = (_2.0: &mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8});
 +         _7 = discriminant((*_6));
 +         switchInt(move _7) -> [0: bb3, 1: bb7, 3: bb8, otherwise: bb9];
       }
   
       bb1: {
 -         _3 = &mut _4;
--         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new(move _3) -> [return: bb2, unwind unreachable];
+-         _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new(move _3) -> [return: bb2, unwind unreachable];
 +         StorageDead(_7);
 +         StorageDead(_6);
 +         StorageDead(_5);
@@ -59,7 +59,7 @@
   
       bb2: {
 -         StorageDead(_3);
--         _1 = <{generator@$DIR/inline_generator.rs:16:5: 16:8} as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind unreachable];
+-         _1 = <{coroutine@$DIR/inline_coroutine.rs:19:5: 19:8} as Coroutine<bool>>::resume(move _2, const false) -> [return: bb3, unwind unreachable];
 +         StorageDead(_4);
 +         _0 = const ();
 +         StorageDead(_1);
@@ -88,19 +88,19 @@
 +     }
 + 
 +     bb6: {
-+         _1 = GeneratorState::<i32, bool>::Yielded(move _8);
++         _1 = CoroutineState::<i32, bool>::Yielded(move _8);
 +         discriminant((*_6)) = 3;
 +         goto -> bb1;
 +     }
 + 
 +     bb7: {
-+         assert(const false, "generator resumed after completion") -> [success: bb7, unwind unreachable];
++         assert(const false, "coroutine resumed after completion") -> [success: bb7, unwind unreachable];
 +     }
 + 
 +     bb8: {
 +         StorageLive(_8);
 +         StorageDead(_8);
-+         _1 = GeneratorState::<i32, bool>::Complete(_5);
++         _1 = CoroutineState::<i32, bool>::Complete(_5);
 +         discriminant((*_6)) = 1;
 +         goto -> bb1;
 +     }
diff --git a/tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff
index da29ba5f50d..fdb42bf3d8a 100644
--- a/tests/mir-opt/inline/inline_generator.main.Inline.panic-unwind.diff
+++ b/tests/mir-opt/inline/inline_coroutine.main.Inline.panic-unwind.diff
@@ -3,27 +3,27 @@
   
   fn main() -> () {
       let mut _0: ();
-      let _1: std::ops::GeneratorState<i32, bool>;
-      let mut _2: std::pin::Pin<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>;
-      let mut _3: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8};
-      let mut _4: {generator@$DIR/inline_generator.rs:16:5: 16:8};
+      let _1: std::ops::CoroutineState<i32, bool>;
+      let mut _2: std::pin::Pin<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>;
+      let mut _3: &mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8};
+      let mut _4: {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8};
 +     let mut _5: bool;
       scope 1 {
           debug _r => _1;
       }
 +     scope 2 (inlined g) {
 +     }
-+     scope 3 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new) {
++     scope 3 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new) {
 +         debug pointer => _3;
 +         scope 4 {
-+             scope 5 (inlined Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new_unchecked) {
++             scope 5 (inlined Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new_unchecked) {
 +                 debug pointer => _3;
 +             }
 +         }
 +     }
 +     scope 6 (inlined g::{closure#0}) {
 +         debug a => _5;
-+         let mut _6: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8};
++         let mut _6: &mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8};
 +         let mut _7: u32;
 +         let mut _8: i32;
 +     }
@@ -37,20 +37,20 @@
 -     }
 - 
 -     bb1: {
-+         _4 = {generator@$DIR/inline_generator.rs:16:5: 16:8 (#0)};
++         _4 = {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8 (#0)};
           _3 = &mut _4;
--         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}>::new(move _3) -> [return: bb2, unwind: bb5];
+-         _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}>::new(move _3) -> [return: bb2, unwind: bb5];
 -     }
 - 
 -     bb2: {
-+         _2 = Pin::<&mut {generator@$DIR/inline_generator.rs:16:5: 16:8}> { pointer: move _3 };
++         _2 = Pin::<&mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8}> { pointer: move _3 };
           StorageDead(_3);
--         _1 = <{generator@$DIR/inline_generator.rs:16:5: 16:8} as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb5];
+-         _1 = <{coroutine@$DIR/inline_coroutine.rs:19:5: 19:8} as Coroutine<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb5];
 +         StorageLive(_5);
 +         _5 = const false;
 +         StorageLive(_6);
 +         StorageLive(_7);
-+         _6 = (_2.0: &mut {generator@$DIR/inline_generator.rs:16:5: 16:8});
++         _6 = (_2.0: &mut {coroutine@$DIR/inline_coroutine.rs:19:5: 19:8});
 +         _7 = discriminant((*_6));
 +         switchInt(move _7) -> [0: bb5, 1: bb9, 3: bb10, otherwise: bb11];
       }
@@ -100,19 +100,19 @@
 +     }
 + 
 +     bb8: {
-+         _1 = GeneratorState::<i32, bool>::Yielded(move _8);
++         _1 = CoroutineState::<i32, bool>::Yielded(move _8);
 +         discriminant((*_6)) = 3;
 +         goto -> bb1;
 +     }
 + 
 +     bb9: {
-+         assert(const false, "generator resumed after completion") -> [success: bb9, unwind: bb3];
++         assert(const false, "coroutine resumed after completion") -> [success: bb9, unwind: bb3];
 +     }
 + 
 +     bb10: {
 +         StorageLive(_8);
 +         StorageDead(_8);
-+         _1 = GeneratorState::<i32, bool>::Complete(_5);
++         _1 = CoroutineState::<i32, bool>::Complete(_5);
 +         discriminant((*_6)) = 1;
 +         goto -> bb1;
 +     }
diff --git a/tests/mir-opt/inline/inline_coroutine.rs b/tests/mir-opt/inline/inline_coroutine.rs
new file mode 100644
index 00000000000..a82586bf2bf
--- /dev/null
+++ b/tests/mir-opt/inline/inline_coroutine.rs
@@ -0,0 +1,20 @@
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+// compile-flags: -Zinline-mir-hint-threshold=1000
+#![feature(coroutines, coroutine_trait)]
+
+use std::ops::Coroutine;
+use std::pin::Pin;
+
+// EMIT_MIR inline_coroutine.main.Inline.diff
+fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: (inlined g)
+    // CHECK: (inlined g::{closure#0})
+    let _r = Pin::new(&mut g()).resume(false);
+}
+
+#[inline]
+pub fn g() -> impl Coroutine<bool> {
+    #[inline]
+    |a| { yield if a { 7 } else { 13 } }
+}
diff --git a/tests/mir-opt/inline/inline_cycle.rs b/tests/mir-opt/inline/inline_cycle.rs
index 42a6914c965..e3dd082556b 100644
--- a/tests/mir-opt/inline/inline_cycle.rs
+++ b/tests/mir-opt/inline/inline_cycle.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that inliner handles various forms of recursion and doesn't fall into
 // an infinite inlining cycle. The particular outcome of inlining is not
diff --git a/tests/mir-opt/inline/inline_cycle_generic.rs b/tests/mir-opt/inline/inline_cycle_generic.rs
index ef261b04c80..667bf7f9254 100644
--- a/tests/mir-opt/inline/inline_cycle_generic.rs
+++ b/tests/mir-opt/inline/inline_cycle_generic.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Check that inliner handles various forms of recursion and doesn't fall into
 // an infinite inlining cycle. The particular outcome of inlining is not
diff --git a/tests/mir-opt/inline/inline_diverging.rs b/tests/mir-opt/inline/inline_diverging.rs
index e01c4c1dd02..25a5b9c5c5e 100644
--- a/tests/mir-opt/inline/inline_diverging.rs
+++ b/tests/mir-opt/inline/inline_diverging.rs
@@ -6,6 +6,8 @@
 
 // EMIT_MIR inline_diverging.f.Inline.diff
 pub fn f() {
+    // CHECK-LABEL: fn f(
+    // CHECK: (inlined sleep)
     sleep();
 }
 
@@ -14,12 +16,17 @@ pub fn g(i: i32) -> u32 {
     if i > 0 {
         i as u32
     } else {
+        // CHECK-LABEL: fn g(
+        // CHECK: (inlined panic)
         panic();
     }
 }
 
 // EMIT_MIR inline_diverging.h.Inline.diff
 pub fn h() {
+    // CHECK-LABEL: fn h(
+    // CHECK: (inlined call_twice::<!, fn() -> ! {sleep}>)
+    // CHECK-NOT: inlined
     call_twice(sleep);
 }
 
diff --git a/tests/mir-opt/inline/inline_generator.rs b/tests/mir-opt/inline/inline_generator.rs
deleted file mode 100644
index 2d71458c174..00000000000
--- a/tests/mir-opt/inline/inline_generator.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
-// compile-flags: -Zinline-mir-hint-threshold=1000
-#![feature(generators, generator_trait)]
-
-use std::ops::Generator;
-use std::pin::Pin;
-
-// EMIT_MIR inline_generator.main.Inline.diff
-fn main() {
-    let _r = Pin::new(&mut g()).resume(false);
-}
-
-#[inline]
-pub fn g() -> impl Generator<bool> {
-    #[inline]
-    |a| { yield if a { 7 } else { 13 } }
-}
diff --git a/tests/mir-opt/inline/inline_instruction_set.rs b/tests/mir-opt/inline/inline_instruction_set.rs
index 5dfb04943e3..7cb59645587 100644
--- a/tests/mir-opt/inline/inline_instruction_set.rs
+++ b/tests/mir-opt/inline/inline_instruction_set.rs
@@ -46,16 +46,26 @@ fn inline_always_and_using_inline_asm() {
 // EMIT_MIR inline_instruction_set.t32.Inline.diff
 #[instruction_set(arm::t32)]
 pub fn t32() {
+    // CHECK-LABEL: fn t32(
+    // CHECK-NOT: (inlined instruction_set_a32)
     instruction_set_a32();
+    // CHECK: (inlined instruction_set_t32)
     instruction_set_t32();
+    // CHECK: (inlined instruction_set_default)
     instruction_set_default();
+    // CHECK-NOT: (inlined inline_always_and_using_inline_asm)
     inline_always_and_using_inline_asm();
 }
 
 // EMIT_MIR inline_instruction_set.default.Inline.diff
 pub fn default() {
+    // CHECK-LABEL: fn default(
+    // CHECK-NOT: (inlined instruction_set_a32)
     instruction_set_a32();
+    // CHECK-NOT: (inlined instruction_set_t32)
     instruction_set_t32();
+    // CHECK: (inlined instruction_set_default)
     instruction_set_default();
+    // CHECK: (inlined inline_always_and_using_inline_asm)
     inline_always_and_using_inline_asm();
 }
diff --git a/tests/mir-opt/inline/inline_into_box_place.rs b/tests/mir-opt/inline/inline_into_box_place.rs
index 56f174e515b..65f8e2916b6 100644
--- a/tests/mir-opt/inline/inline_into_box_place.rs
+++ b/tests/mir-opt/inline/inline_into_box_place.rs
@@ -5,5 +5,7 @@
 
 // EMIT_MIR inline_into_box_place.main.Inline.diff
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: (inlined Box::<Vec<u32>>::new)
     let _x: Box<Vec<u32>> = Box::new(Vec::new());
 }
diff --git a/tests/mir-opt/inline/inline_options.rs b/tests/mir-opt/inline/inline_options.rs
index b247ecd0bc0..b940c64f0b8 100644
--- a/tests/mir-opt/inline/inline_options.rs
+++ b/tests/mir-opt/inline/inline_options.rs
@@ -7,7 +7,10 @@
 
 // EMIT_MIR inline_options.main.Inline.after.mir
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK-NOT: (inlined not_inlined)
     not_inlined();
+    // CHECK: (inlined inlined::<u32>)
     inlined::<u32>();
 }
 
diff --git a/tests/mir-opt/inline/inline_retag.rs b/tests/mir-opt/inline/inline_retag.rs
index c6950f26925..9fb6f709223 100644
--- a/tests/mir-opt/inline/inline_retag.rs
+++ b/tests/mir-opt/inline/inline_retag.rs
@@ -8,6 +8,17 @@ fn main() {
 
 // EMIT_MIR inline_retag.bar.Inline.after.mir
 fn bar() -> bool {
+    // CHECK-LABEL: fn bar(
+    // CHECK: (inlined foo)
+    // CHECK: debug x => [[x:_.*]];
+    // CHECK: debug y => [[y:_.*]];
+    // CHECK: bb0: {
+    // CHECK: Retag
+    // CHECK: Retag
+    // CHECK: Retag([[x]]);
+    // CHECK: Retag([[y]]);
+    // CHECK: return;
+    // CHECK-NEXT: }
     let f = foo;
     f(&1, &-1)
 }
diff --git a/tests/mir-opt/inline/inline_shims.rs b/tests/mir-opt/inline/inline_shims.rs
index eafbb962efb..a223c2d2614 100644
--- a/tests/mir-opt/inline/inline_shims.rs
+++ b/tests/mir-opt/inline/inline_shims.rs
@@ -3,11 +3,15 @@
 
 // EMIT_MIR inline_shims.clone.Inline.diff
 pub fn clone<A, B>(f: fn(A, B)) -> fn(A, B) {
+    // CHECK-LABEL: fn clone(
+    // CHECK: (inlined <fn(A, B) as Clone>::clone - shim(fn(A, B)))
     f.clone()
 }
 
 // EMIT_MIR inline_shims.drop.Inline.diff
 pub fn drop<A, B>(a: *mut Vec<A>, b: *mut Option<B>) {
+    // CHECK-LABEL: fn drop(
+    // CHECK: (inlined std::ptr::drop_in_place::<Option<B>> - shim(Some(Option<B>)))
     unsafe { std::ptr::drop_in_place(a) }
     unsafe { std::ptr::drop_in_place(b) }
 }
diff --git a/tests/mir-opt/inline/inline_specialization.rs b/tests/mir-opt/inline/inline_specialization.rs
index 0311531dc3f..6453abc0081 100644
--- a/tests/mir-opt/inline/inline_specialization.rs
+++ b/tests/mir-opt/inline/inline_specialization.rs
@@ -3,6 +3,8 @@
 
 // EMIT_MIR inline_specialization.main.Inline.diff
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: (inlined <Vec<()> as Foo>::bar)
     let x = <Vec::<()> as Foo>::bar();
 }
 
diff --git a/tests/mir-opt/inline/inline_trait_method.rs b/tests/mir-opt/inline/inline_trait_method.rs
index a9d2168c2ec..b39355637a1 100644
--- a/tests/mir-opt/inline/inline_trait_method.rs
+++ b/tests/mir-opt/inline/inline_trait_method.rs
@@ -1,3 +1,4 @@
+// Verify that we do not inline the default impl in a trait object.
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -Z span_free_formats
 
@@ -7,6 +8,8 @@ fn main() {
 
 // EMIT_MIR inline_trait_method.test.Inline.after.mir
 fn test(x: &dyn X) -> u32 {
+    // CHECK-LABEL: fn test(
+    // CHECK-NOT: inlined
     x.y()
 }
 
diff --git a/tests/mir-opt/inline/inline_trait_method_2.rs b/tests/mir-opt/inline/inline_trait_method_2.rs
index 62ec7ebde6a..b0b6a7b9b01 100644
--- a/tests/mir-opt/inline/inline_trait_method_2.rs
+++ b/tests/mir-opt/inline/inline_trait_method_2.rs
@@ -3,6 +3,9 @@
 
 // EMIT_MIR inline_trait_method_2.test2.Inline.after.mir
 fn test2(x: &dyn X) -> bool {
+    // CHECK-LABEL: fn test2(
+    // CHECK: (inlined test)
+    // CHECK-NOT: (inlined <dyn X as X>::y)
     test(x)
 }
 
diff --git a/tests/mir-opt/inline/issue_106141.rs b/tests/mir-opt/inline/issue_106141.rs
index eed1d89172c..592b4d9b723 100644
--- a/tests/mir-opt/inline/issue_106141.rs
+++ b/tests/mir-opt/inline/issue_106141.rs
@@ -1,14 +1,21 @@
+// Verify that we do not ICE inlining a function which uses _0 as an index.
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
 pub fn outer() -> usize {
+    // CHECK-LABEL: fn outer(
+    // CHECK: = {{.*}}[_0];
     inner()
 }
 
+#[inline(never)]
 fn index() -> usize {
     loop {}
 }
 
 #[inline]
 fn inner() -> usize {
+    // CHECK-LABEL: fn inner(
+    // CHECK: = {{.*}}[_0];
     let buffer = &[true];
     let index = index();
     if buffer[index] {
diff --git a/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs b/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs
index 94f926d3964..4517c88d713 100644
--- a/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs
+++ b/tests/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs
@@ -1,20 +1,28 @@
 // EMIT_MIR issue_58867_inline_as_ref_as_mut.a.Inline.after.mir
 pub fn a<T>(x: &mut [T]) -> &mut [T] {
+    // CHECK-LABEL: fn a(
+    // CHECK: (inlined <[T] as AsMut<[T]>>::as_mut)
     x.as_mut()
 }
 
 // EMIT_MIR issue_58867_inline_as_ref_as_mut.b.Inline.after.mir
 pub fn b<T>(x: &mut Box<T>) -> &mut T {
+    // CHECK-LABEL: fn b(
+    // CHECK: (inlined <Box<T> as AsMut<T>>::as_mut)
     x.as_mut()
 }
 
 // EMIT_MIR issue_58867_inline_as_ref_as_mut.c.Inline.after.mir
 pub fn c<T>(x: &[T]) -> &[T] {
+    // CHECK-LABEL: fn c(
+    // CHECK: (inlined <[T] as AsRef<[T]>>::as_ref)
     x.as_ref()
 }
 
 // EMIT_MIR issue_58867_inline_as_ref_as_mut.d.Inline.after.mir
 pub fn d<T>(x: &Box<T>) -> &T {
+    // CHECK-LABEL: fn d(
+    // CHECK: (inlined <Box<T> as AsRef<T>>::as_ref)
     x.as_ref()
 }
 
diff --git a/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir b/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
index 4d170c41f97..ba4f91b28d5 100644
--- a/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
+++ b/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
@@ -2,8 +2,8 @@
 
 fn main() -> () {
     let mut _0: ();
-    let _1: {closure@$DIR/issue_76997_inline_scopes_parenting.rs:5:13: 5:16};
-    let mut _2: &{closure@$DIR/issue_76997_inline_scopes_parenting.rs:5:13: 5:16};
+    let _1: {closure@$DIR/issue_76997_inline_scopes_parenting.rs:15:13: 15:16};
+    let mut _2: &{closure@$DIR/issue_76997_inline_scopes_parenting.rs:15:13: 15:16};
     let mut _3: ((),);
     let mut _4: ();
     let mut _5: ();
@@ -19,7 +19,7 @@ fn main() -> () {
 
     bb0: {
         StorageLive(_1);
-        _1 = {closure@$DIR/issue_76997_inline_scopes_parenting.rs:5:13: 5:16};
+        _1 = {closure@$DIR/issue_76997_inline_scopes_parenting.rs:15:13: 15:16};
         StorageLive(_2);
         _2 = &_1;
         StorageLive(_3);
diff --git a/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.rs b/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.rs
index 76d806acc63..2fb363c1904 100644
--- a/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.rs
+++ b/tests/mir-opt/inline/issue_76997_inline_scopes_parenting.rs
@@ -2,6 +2,16 @@
 
 // EMIT_MIR issue_76997_inline_scopes_parenting.main.Inline.after.mir
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: scope 1 {
+    // CHECK-NEXT: debug f
+    // CHECK-NEXT: scope 2 (inlined main::{closure#0}) {
+    // CHECK-NEXT: debug x
+    // CHECK-NEXT: scope 3 {
+    // CHECK-NEXT: debug y
+    // CHECK-NEXT: }
+    // CHECK-NEXT: }
+    // CHECK-NEXT: }
     let f = |x| { let y = x; y };
     f(())
 }
diff --git a/tests/mir-opt/inline/issue_78442.bar.Inline.panic-abort.diff b/tests/mir-opt/inline/issue_78442.bar.Inline.panic-abort.diff
index bee01a5f97b..b9f268df351 100644
--- a/tests/mir-opt/inline/issue_78442.bar.Inline.panic-abort.diff
+++ b/tests/mir-opt/inline/issue_78442.bar.Inline.panic-abort.diff
@@ -8,31 +8,37 @@
       let mut _3: &fn() {foo};
       let _4: fn() {foo};
       let mut _5: ();
++     scope 1 (inlined hide_foo) {
++     }
   
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
           StorageLive(_4);
-          _4 = hide_foo() -> [return: bb1, unwind unreachable];
-      }
-  
-      bb1: {
+-         _4 = hide_foo() -> [return: bb1, unwind unreachable];
+-     }
+- 
+-     bb1: {
           _3 = &_4;
           StorageLive(_5);
           _5 = ();
-          _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind unreachable];
+-         _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind unreachable];
++         _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb1, unwind unreachable];
       }
   
-      bb2: {
+-     bb2: {
++     bb1: {
           StorageDead(_5);
           StorageDead(_3);
           StorageDead(_4);
           StorageDead(_2);
           _0 = const ();
-          drop(_1) -> [return: bb3, unwind unreachable];
+-         drop(_1) -> [return: bb3, unwind unreachable];
++         drop(_1) -> [return: bb2, unwind unreachable];
       }
   
-      bb3: {
+-     bb3: {
++     bb2: {
           return;
       }
   }
diff --git a/tests/mir-opt/inline/issue_78442.bar.Inline.panic-unwind.diff b/tests/mir-opt/inline/issue_78442.bar.Inline.panic-unwind.diff
index 5a946712ea4..8495164df9c 100644
--- a/tests/mir-opt/inline/issue_78442.bar.Inline.panic-unwind.diff
+++ b/tests/mir-opt/inline/issue_78442.bar.Inline.panic-unwind.diff
@@ -8,39 +8,48 @@
       let mut _3: &fn() {foo};
       let _4: fn() {foo};
       let mut _5: ();
++     scope 1 (inlined hide_foo) {
++     }
   
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
           StorageLive(_4);
-          _4 = hide_foo() -> [return: bb1, unwind: bb4];
-      }
-  
-      bb1: {
+-         _4 = hide_foo() -> [return: bb1, unwind: bb4];
+-     }
+- 
+-     bb1: {
           _3 = &_4;
           StorageLive(_5);
           _5 = ();
-          _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4];
+-         _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4];
++         _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb1, unwind: bb3];
       }
   
-      bb2: {
+-     bb2: {
++     bb1: {
           StorageDead(_5);
           StorageDead(_3);
           StorageDead(_4);
           StorageDead(_2);
           _0 = const ();
-          drop(_1) -> [return: bb3, unwind: bb5];
+-         drop(_1) -> [return: bb3, unwind: bb5];
++         drop(_1) -> [return: bb2, unwind: bb4];
       }
   
-      bb3: {
+-     bb3: {
++     bb2: {
           return;
       }
   
-      bb4 (cleanup): {
-          drop(_1) -> [return: bb5, unwind terminate(cleanup)];
+-     bb4 (cleanup): {
+-         drop(_1) -> [return: bb5, unwind terminate(cleanup)];
++     bb3 (cleanup): {
++         drop(_1) -> [return: bb4, unwind terminate(cleanup)];
       }
   
-      bb5 (cleanup): {
+-     bb5 (cleanup): {
++     bb4 (cleanup): {
           resume;
       }
   }
diff --git a/tests/mir-opt/inline/issue_78442.rs b/tests/mir-opt/inline/issue_78442.rs
index d956e62414c..f9a5234283a 100644
--- a/tests/mir-opt/inline/issue_78442.rs
+++ b/tests/mir-opt/inline/issue_78442.rs
@@ -8,6 +8,11 @@ pub fn bar<P>(
     // Error won't happen if "bar" is not generic
     _baz: P,
 ) {
+    // CHECK-LABEL: fn bar(
+    // CHECK: let mut {{.*}}: &fn() {foo};
+    // CHECK: let {{.*}}: fn() {foo};
+    // CHECK: (inlined hide_foo)
+    // CHECK-NOT: inlined
     hide_foo()();
 }
 
diff --git a/tests/mir-opt/inline/polymorphic_recursion.rs b/tests/mir-opt/inline/polymorphic_recursion.rs
index 7388722b776..f71e382e867 100644
--- a/tests/mir-opt/inline/polymorphic_recursion.rs
+++ b/tests/mir-opt/inline/polymorphic_recursion.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Make sure that the MIR inliner does not loop indefinitely on polymorphic recursion.
 // compile-flags: --crate-type lib
 
diff --git a/tests/mir-opt/inline/unchecked_shifts.rs b/tests/mir-opt/inline/unchecked_shifts.rs
index 22f84e44a64..0de80641c9c 100644
--- a/tests/mir-opt/inline/unchecked_shifts.rs
+++ b/tests/mir-opt/inline/unchecked_shifts.rs
@@ -1,6 +1,6 @@
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 #![crate_type = "lib"]
-#![feature(unchecked_math)]
+#![feature(unchecked_shifts)]
 
 // ignore-debug: the debug assertions prevent the inlining we are testing for
 // compile-flags: -Zmir-opt-level=2 -Zinline-mir
@@ -8,23 +8,31 @@
 // EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_smaller.Inline.diff
 // EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_smaller.PreCodegen.after.mir
 pub unsafe fn unchecked_shl_unsigned_smaller(a: u16, b: u32) -> u16 {
+    // CHECK-LABEL: fn unchecked_shl_unsigned_smaller(
+    // CHECK: (inlined core::num::<impl u16>::unchecked_shl)
     a.unchecked_shl(b)
 }
 
 // EMIT_MIR unchecked_shifts.unchecked_shr_signed_smaller.Inline.diff
 // EMIT_MIR unchecked_shifts.unchecked_shr_signed_smaller.PreCodegen.after.mir
 pub unsafe fn unchecked_shr_signed_smaller(a: i16, b: u32) -> i16 {
+    // CHECK-LABEL: fn unchecked_shr_signed_smaller(
+    // CHECK: (inlined core::num::<impl i16>::unchecked_shr)
     a.unchecked_shr(b)
 }
 
 // EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_bigger.Inline.diff
 // EMIT_MIR unchecked_shifts.unchecked_shl_unsigned_bigger.PreCodegen.after.mir
 pub unsafe fn unchecked_shl_unsigned_bigger(a: u64, b: u32) -> u64 {
+    // CHECK-LABEL: fn unchecked_shl_unsigned_bigger(
+    // CHECK: (inlined core::num::<impl u64>::unchecked_shl)
     a.unchecked_shl(b)
 }
 
 // EMIT_MIR unchecked_shifts.unchecked_shr_signed_bigger.Inline.diff
 // EMIT_MIR unchecked_shifts.unchecked_shr_signed_bigger.PreCodegen.after.mir
 pub unsafe fn unchecked_shr_signed_bigger(a: i64, b: u32) -> i64 {
+    // CHECK-LABEL: fn unchecked_shr_signed_bigger(
+    // CHECK: (inlined core::num::<impl i64>::unchecked_shr)
     a.unchecked_shr(b)
 }
diff --git a/tests/mir-opt/inline/unit_test.rs b/tests/mir-opt/inline/unit_test.rs
new file mode 100644
index 00000000000..0d877bb10b4
--- /dev/null
+++ b/tests/mir-opt/inline/unit_test.rs
@@ -0,0 +1,19 @@
+// Check that `-Zmir-enable-passes=+Inline` does not ICE because of stolen MIR.
+// unit-test: Inline
+// skip-filecheck
+#![crate_type = "lib"]
+
+// Randomize `def_path_hash` by defining them under a module with different names
+macro_rules! emit {
+    ($($m:ident)*) => {$(
+        pub mod $m {
+            pub fn main() {
+                let func = || 123u8;
+                func();
+            }
+        }
+    )*};
+}
+
+// Increase the chance of triggering the bug
+emit!(m00 m01 m02 m03 m04 m05 m06 m07 m08 m09 m10 m11 m12 m13 m14 m15 m16 m17 m18 m19);
diff --git a/tests/mir-opt/inline/unsized_argument.caller.Inline.diff b/tests/mir-opt/inline/unsized_argument.caller.Inline.diff
index ab81f707148..37083973fd1 100644
--- a/tests/mir-opt/inline/unsized_argument.caller.Inline.diff
+++ b/tests/mir-opt/inline/unsized_argument.caller.Inline.diff
@@ -6,24 +6,18 @@
       let mut _0: ();
       let _2: ();
       let mut _3: std::boxed::Box<[i32]>;
-      let mut _4: &mut std::boxed::Box<[i32]>;
-      let mut _5: ();
-      let mut _6: &mut std::boxed::Box<[i32]>;
-      let mut _7: ();
-      let mut _8: &mut std::boxed::Box<[i32]>;
-      let mut _9: ();
-      let mut _10: *const [i32];
+      let mut _4: *const [i32];
   
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
           _3 = move _1;
-          _10 = (((_3.0: std::ptr::Unique<[i32]>).0: std::ptr::NonNull<[i32]>).0: *const [i32]);
-          _2 = callee(move (*_10)) -> [return: bb3, unwind: bb4];
+          _4 = (((_3.0: std::ptr::Unique<[i32]>).0: std::ptr::NonNull<[i32]>).0: *const [i32]);
+          _2 = callee(move (*_4)) -> [return: bb1, unwind: bb3];
       }
   
-      bb1 (cleanup): {
-          resume;
+      bb1: {
+          drop(_3) -> [return: bb2, unwind: bb4];
       }
   
       bb2: {
@@ -33,14 +27,12 @@
           return;
       }
   
-      bb3: {
-          _4 = &mut _3;
-          _5 = <Box<[i32]> as Drop>::drop(move _4) -> [return: bb2, unwind: bb1];
+      bb3 (cleanup): {
+          drop(_3) -> [return: bb4, unwind terminate(cleanup)];
       }
   
       bb4 (cleanup): {
-          _8 = &mut _3;
-          _9 = <Box<[i32]> as Drop>::drop(move _8) -> [return: bb1, unwind terminate(cleanup)];
+          resume;
       }
   }
   
diff --git a/tests/mir-opt/inline/unsized_argument.rs b/tests/mir-opt/inline/unsized_argument.rs
index b2c51407fd5..e8c2bc10be2 100644
--- a/tests/mir-opt/inline/unsized_argument.rs
+++ b/tests/mir-opt/inline/unsized_argument.rs
@@ -6,6 +6,8 @@ fn callee(y: [i32]) {}
 
 // EMIT_MIR unsized_argument.caller.Inline.diff
 fn caller(x: Box<[i32]>) {
+    // CHECK-LABEL: fn caller(
+    // CHECK-NOT: (inlined callee)
     callee(*x);
 }
 
diff --git a/tests/mir-opt/inline/unwrap_unchecked.rs b/tests/mir-opt/inline/unwrap_unchecked.rs
index f28aef7a808..be133706e5c 100644
--- a/tests/mir-opt/inline/unwrap_unchecked.rs
+++ b/tests/mir-opt/inline/unwrap_unchecked.rs
@@ -7,5 +7,7 @@
 // EMIT_MIR unwrap_unchecked.unwrap_unchecked.Inline.diff
 // EMIT_MIR unwrap_unchecked.unwrap_unchecked.PreCodegen.after.mir
 pub unsafe fn unwrap_unchecked<T>(slf: Option<T>) -> T {
+    // CHECK-LABEL: fn unwrap_unchecked(
+    // CHECK: (inlined #[track_caller] Option::<T>::unwrap_unchecked)
     slf.unwrap_unchecked()
 }
diff --git a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-abort.diff b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-abort.diff
index 018b6c1ee95..2a36ad9230e 100644
--- a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-abort.diff
+++ b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-abort.diff
@@ -9,6 +9,7 @@
 +         debug self => _2;
 +         let mut _3: &std::option::Option<T>;
 +         let mut _4: isize;
++         let mut _5: bool;
 +         scope 2 {
 +             debug val => _0;
 +         }
@@ -29,18 +30,17 @@
           StorageLive(_2);
           _2 = move _1;
 -         _0 = Option::<T>::unwrap_unchecked(move _2) -> [return: bb1, unwind unreachable];
+-     }
+- 
+-     bb1: {
 +         StorageLive(_3);
 +         StorageLive(_4);
++         StorageLive(_5);
 +         _4 = discriminant(_2);
-+         switchInt(move _4) -> [1: bb2, otherwise: bb1];
-      }
-  
-      bb1: {
-+         unreachable;
-+     }
-+ 
-+     bb2: {
++         _5 = Eq(_4, const 1_isize);
++         assume(move _5);
 +         _0 = move ((_2 as Some).0: T);
++         StorageDead(_5);
 +         StorageDead(_4);
 +         StorageDead(_3);
           StorageDead(_2);
diff --git a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-unwind.diff b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-unwind.diff
index 47845758a3f..14c8c671d3f 100644
--- a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-unwind.diff
+++ b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.Inline.panic-unwind.diff
@@ -9,6 +9,7 @@
 +         debug self => _2;
 +         let mut _3: &std::option::Option<T>;
 +         let mut _4: isize;
++         let mut _5: bool;
 +         scope 2 {
 +             debug val => _0;
 +         }
@@ -29,26 +30,25 @@
           StorageLive(_2);
           _2 = move _1;
 -         _0 = Option::<T>::unwrap_unchecked(move _2) -> [return: bb1, unwind: bb2];
+-     }
+- 
+-     bb1: {
 +         StorageLive(_3);
 +         StorageLive(_4);
++         StorageLive(_5);
 +         _4 = discriminant(_2);
-+         switchInt(move _4) -> [1: bb2, otherwise: bb1];
-      }
-  
-      bb1: {
--         StorageDead(_2);
--         return;
-+         unreachable;
-      }
-  
--     bb2 (cleanup): {
--         resume;
-+     bb2: {
++         _5 = Eq(_4, const 1_isize);
++         assume(move _5);
 +         _0 = move ((_2 as Some).0: T);
++         StorageDead(_5);
 +         StorageDead(_4);
 +         StorageDead(_3);
-+         StorageDead(_2);
-+         return;
+          StorageDead(_2);
+          return;
+-     }
+- 
+-     bb2 (cleanup): {
+-         resume;
       }
   }
   
diff --git a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-abort.mir b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-abort.mir
index 392f085bd4d..aeb93bd334f 100644
--- a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-abort.mir
@@ -6,7 +6,8 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
     scope 1 (inlined #[track_caller] Option::<T>::unwrap_unchecked) {
         debug self => _1;
         let mut _2: isize;
-        let mut _3: &std::option::Option<T>;
+        let mut _3: bool;
+        let mut _4: &std::option::Option<T>;
         scope 2 {
             debug val => _0;
         }
@@ -19,25 +20,21 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
             }
         }
         scope 4 (inlined Option::<T>::is_some) {
-            debug self => _3;
+            debug self => _4;
         }
     }
 
     bb0: {
-        StorageLive(_3);
+        StorageLive(_4);
         StorageLive(_2);
+        StorageLive(_3);
         _2 = discriminant(_1);
-        switchInt(move _2) -> [1: bb1, otherwise: bb2];
-    }
-
-    bb1: {
+        _3 = Eq(_2, const 1_isize);
+        assume(move _3);
         _0 = move ((_1 as Some).0: T);
-        StorageDead(_2);
         StorageDead(_3);
+        StorageDead(_2);
+        StorageDead(_4);
         return;
     }
-
-    bb2: {
-        unreachable;
-    }
 }
diff --git a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-unwind.mir
index 392f085bd4d..aeb93bd334f 100644
--- a/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/inline/unwrap_unchecked.unwrap_unchecked.PreCodegen.after.panic-unwind.mir
@@ -6,7 +6,8 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
     scope 1 (inlined #[track_caller] Option::<T>::unwrap_unchecked) {
         debug self => _1;
         let mut _2: isize;
-        let mut _3: &std::option::Option<T>;
+        let mut _3: bool;
+        let mut _4: &std::option::Option<T>;
         scope 2 {
             debug val => _0;
         }
@@ -19,25 +20,21 @@ fn unwrap_unchecked(_1: Option<T>) -> T {
             }
         }
         scope 4 (inlined Option::<T>::is_some) {
-            debug self => _3;
+            debug self => _4;
         }
     }
 
     bb0: {
-        StorageLive(_3);
+        StorageLive(_4);
         StorageLive(_2);
+        StorageLive(_3);
         _2 = discriminant(_1);
-        switchInt(move _2) -> [1: bb1, otherwise: bb2];
-    }
-
-    bb1: {
+        _3 = Eq(_2, const 1_isize);
+        assume(move _3);
         _0 = move ((_1 as Some).0: T);
-        StorageDead(_2);
         StorageDead(_3);
+        StorageDead(_2);
+        StorageDead(_4);
         return;
     }
-
-    bb2: {
-        unreachable;
-    }
 }
diff --git a/tests/mir-opt/inline_generically_if_sized.rs b/tests/mir-opt/inline_generically_if_sized.rs
index 1acfff7a56b..1a7512a4b8d 100644
--- a/tests/mir-opt/inline_generically_if_sized.rs
+++ b/tests/mir-opt/inline_generically_if_sized.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: Inline
 // compile-flags: --crate-type=lib -C panic=abort
 
diff --git a/tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff b/tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
index 28a7ffda371..1ef6b69ef5b 100644
--- a/tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
+++ b/tests/mir-opt/instrument_coverage.bar.InstrumentCoverage.diff
@@ -4,8 +4,10 @@
   fn bar() -> bool {
       let mut _0: bool;
   
++     coverage Counter(0) => /the/src/instrument_coverage.rs:21:1 - 23:2;
++ 
       bb0: {
-+         Coverage::Counter(0) for [/the/src/instrument_coverage.rs:20:1 - 22:2];
++         Coverage::CounterIncrement(0);
           _0 = const true;
           return;
       }
diff --git a/tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff b/tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff
index 9a8caa26307..14b4833a515 100644
--- a/tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff
+++ b/tests/mir-opt/instrument_coverage.main.InstrumentCoverage.diff
@@ -7,13 +7,21 @@
       let mut _2: bool;
       let mut _3: !;
   
++     coverage ExpressionId(0) => Expression { lhs: Counter(0), op: Add, rhs: Counter(1) };
++     coverage ExpressionId(1) => Expression { lhs: Expression(0), op: Subtract, rhs: Counter(1) };
++     coverage Counter(0) => /the/src/instrument_coverage.rs:12:1 - 12:11;
++     coverage Expression(0) => /the/src/instrument_coverage.rs:13:5 - 14:17;
++     coverage Expression(1) => /the/src/instrument_coverage.rs:15:13 - 15:18;
++     coverage Expression(1) => /the/src/instrument_coverage.rs:18:1 - 18:2;
++     coverage Counter(1) => /the/src/instrument_coverage.rs:16:10 - 16:11;
++ 
       bb0: {
-+         Coverage::Counter(0) for [/the/src/instrument_coverage.rs:11:1 - 11:11];
++         Coverage::CounterIncrement(0);
           goto -> bb1;
       }
   
       bb1: {
-+         Coverage::Expression(0) = Counter(0) + Counter(1) for [/the/src/instrument_coverage.rs:12:5 - 13:17];
++         Coverage::ExpressionUsed(0);
           falseUnwind -> [real: bb2, unwind: bb6];
       }
   
@@ -27,14 +35,14 @@
       }
   
       bb4: {
-+         Coverage::Expression(1) = Expression(0) - Counter(1) for [/the/src/instrument_coverage.rs:14:13 - 14:18, /the/src/instrument_coverage.rs:17:1 - 17:2];
++         Coverage::ExpressionUsed(1);
           _0 = const ();
           StorageDead(_2);
           return;
       }
   
       bb5: {
-+         Coverage::Counter(1) for [/the/src/instrument_coverage.rs:15:10 - 15:11];
++         Coverage::CounterIncrement(1);
           _1 = const ();
           StorageDead(_2);
           goto -> bb1;
diff --git a/tests/mir-opt/instrument_coverage.rs b/tests/mir-opt/instrument_coverage.rs
index 7f6a0a0eb09..f131fc0a324 100644
--- a/tests/mir-opt/instrument_coverage.rs
+++ b/tests/mir-opt/instrument_coverage.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that `-C instrument-coverage` injects Coverage statements. The Coverage Counter statements
 // are later converted into LLVM instrprof.increment intrinsics, during codegen.
 
diff --git a/tests/mir-opt/bool_compare.opt3.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.eq_false.InstSimplify.diff
index 034d5e44013..5c09963d433 100644
--- a/tests/mir-opt/bool_compare.opt3.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/bool_compare.eq_false.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `opt3` before InstSimplify
-+ // MIR for `opt3` after InstSimplify
+- // MIR for `eq_false` before InstSimplify
++ // MIR for `eq_false` after InstSimplify
   
-  fn opt3(_1: bool) -> u32 {
+  fn eq_false(_1: bool) -> u32 {
       debug x => _1;
       let mut _0: u32;
       let mut _2: bool;
diff --git a/tests/mir-opt/instsimplify/bool_compare.eq_true.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.eq_true.InstSimplify.diff
new file mode 100644
index 00000000000..a80133b0eb0
--- /dev/null
+++ b/tests/mir-opt/instsimplify/bool_compare.eq_true.InstSimplify.diff
@@ -0,0 +1,36 @@
+- // MIR for `eq_true` before InstSimplify
++ // MIR for `eq_true` after InstSimplify
+  
+  fn eq_true(_1: bool) -> u32 {
+      debug x => _1;
+      let mut _0: u32;
+      let mut _2: bool;
+      let mut _3: bool;
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          _3 = _1;
+-         _2 = Eq(move _3, const true);
++         _2 = move _3;
+          switchInt(move _2) -> [0: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+          StorageDead(_3);
+          _0 = const 0_u32;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          StorageDead(_3);
+          _0 = const 1_u32;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_2);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/bool_compare.opt4.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.false_eq.InstSimplify.diff
index d3096da6c5a..8235d5263bb 100644
--- a/tests/mir-opt/bool_compare.opt4.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/bool_compare.false_eq.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `opt4` before InstSimplify
-+ // MIR for `opt4` after InstSimplify
+- // MIR for `false_eq` before InstSimplify
++ // MIR for `false_eq` after InstSimplify
   
-  fn opt4(_1: bool) -> u32 {
+  fn false_eq(_1: bool) -> u32 {
       debug x => _1;
       let mut _0: u32;
       let mut _2: bool;
diff --git a/tests/mir-opt/instsimplify/bool_compare.false_ne.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.false_ne.InstSimplify.diff
new file mode 100644
index 00000000000..77d076c6c14
--- /dev/null
+++ b/tests/mir-opt/instsimplify/bool_compare.false_ne.InstSimplify.diff
@@ -0,0 +1,36 @@
+- // MIR for `false_ne` before InstSimplify
++ // MIR for `false_ne` after InstSimplify
+  
+  fn false_ne(_1: bool) -> u32 {
+      debug x => _1;
+      let mut _0: u32;
+      let mut _2: bool;
+      let mut _3: bool;
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          _3 = _1;
+-         _2 = Ne(const false, move _3);
++         _2 = move _3;
+          switchInt(move _2) -> [0: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+          StorageDead(_3);
+          _0 = const 0_u32;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          StorageDead(_3);
+          _0 = const 1_u32;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_2);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/not_equal_false.opt.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.ne_false.InstSimplify.diff
index 1342966aa15..2362b11297e 100644
--- a/tests/mir-opt/not_equal_false.opt.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/bool_compare.ne_false.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `opt` before InstSimplify
-+ // MIR for `opt` after InstSimplify
+- // MIR for `ne_false` before InstSimplify
++ // MIR for `ne_false` after InstSimplify
   
-  fn opt(_1: bool) -> u32 {
+  fn ne_false(_1: bool) -> u32 {
       debug x => _1;
       let mut _0: u32;
       let mut _2: bool;
diff --git a/tests/mir-opt/bool_compare.opt1.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.ne_true.InstSimplify.diff
index 657c11516a1..6ccbd2fb7a1 100644
--- a/tests/mir-opt/bool_compare.opt1.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/bool_compare.ne_true.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `opt1` before InstSimplify
-+ // MIR for `opt1` after InstSimplify
+- // MIR for `ne_true` before InstSimplify
++ // MIR for `ne_true` after InstSimplify
   
-  fn opt1(_1: bool) -> u32 {
+  fn ne_true(_1: bool) -> u32 {
       debug x => _1;
       let mut _0: u32;
       let mut _2: bool;
diff --git a/tests/mir-opt/instsimplify/bool_compare.rs b/tests/mir-opt/instsimplify/bool_compare.rs
new file mode 100644
index 00000000000..77f427b0d7c
--- /dev/null
+++ b/tests/mir-opt/instsimplify/bool_compare.rs
@@ -0,0 +1,68 @@
+// unit-test: InstSimplify
+
+// EMIT_MIR bool_compare.eq_true.InstSimplify.diff
+fn eq_true(x: bool) -> u32 {
+    // CHECK-LABEL: fn eq_true(
+    // CHECK-NOT: Eq(
+    if x == true { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.true_eq.InstSimplify.diff
+fn true_eq(x: bool) -> u32 {
+    // CHECK-LABEL: fn true_eq(
+    // CHECK-NOT: Eq(
+    if true == x { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.ne_true.InstSimplify.diff
+fn ne_true(x: bool) -> u32 {
+    // CHECK-LABEL: fn ne_true(
+    // CHECK: Not(
+    if x != true { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.true_ne.InstSimplify.diff
+fn true_ne(x: bool) -> u32 {
+    // CHECK-LABEL: fn true_ne(
+    // CHECK: Not(
+    if true != x { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.eq_false.InstSimplify.diff
+fn eq_false(x: bool) -> u32 {
+    // CHECK-LABEL: fn eq_false(
+    // CHECK: Not(
+    if x == false { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.false_eq.InstSimplify.diff
+fn false_eq(x: bool) -> u32 {
+    // CHECK-LABEL: fn false_eq(
+    // CHECK: Not(
+    if false == x { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.ne_false.InstSimplify.diff
+fn ne_false(x: bool) -> u32 {
+    // CHECK-LABEL: fn ne_false(
+    // CHECK-NOT: Ne(
+    if x != false { 0 } else { 1 }
+}
+
+// EMIT_MIR bool_compare.false_ne.InstSimplify.diff
+fn false_ne(x: bool) -> u32 {
+    // CHECK-LABEL: fn false_ne(
+    // CHECK-NOT: Ne(
+    if false != x { 0 } else { 1 }
+}
+
+fn main() {
+    eq_true(false);
+    true_eq(false);
+    ne_true(false);
+    true_ne(false);
+    eq_false(false);
+    false_eq(false);
+    ne_false(false);
+    false_ne(false);
+}
diff --git a/tests/mir-opt/instsimplify/bool_compare.true_eq.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.true_eq.InstSimplify.diff
new file mode 100644
index 00000000000..18675329a2e
--- /dev/null
+++ b/tests/mir-opt/instsimplify/bool_compare.true_eq.InstSimplify.diff
@@ -0,0 +1,36 @@
+- // MIR for `true_eq` before InstSimplify
++ // MIR for `true_eq` after InstSimplify
+  
+  fn true_eq(_1: bool) -> u32 {
+      debug x => _1;
+      let mut _0: u32;
+      let mut _2: bool;
+      let mut _3: bool;
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          _3 = _1;
+-         _2 = Eq(const true, move _3);
++         _2 = move _3;
+          switchInt(move _2) -> [0: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+          StorageDead(_3);
+          _0 = const 0_u32;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          StorageDead(_3);
+          _0 = const 1_u32;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_2);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/bool_compare.opt2.InstSimplify.diff b/tests/mir-opt/instsimplify/bool_compare.true_ne.InstSimplify.diff
index bc8be62bd49..dc91cf8a5c4 100644
--- a/tests/mir-opt/bool_compare.opt2.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/bool_compare.true_ne.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `opt2` before InstSimplify
-+ // MIR for `opt2` after InstSimplify
+- // MIR for `true_ne` before InstSimplify
++ // MIR for `true_ne` after InstSimplify
   
-  fn opt2(_1: bool) -> u32 {
+  fn true_ne(_1: bool) -> u32 {
       debug x => _1;
       let mut _0: u32;
       let mut _2: bool;
diff --git a/tests/mir-opt/casts.redundant.InstSimplify.diff b/tests/mir-opt/instsimplify/casts.redundant.InstSimplify.diff
index f5ea78aecbe..9e1bce1ee20 100644
--- a/tests/mir-opt/casts.redundant.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/casts.redundant.InstSimplify.diff
@@ -6,18 +6,27 @@
       let mut _0: *const &u8;
       let mut _2: *const &u8;
       let mut _3: *const &u8;
+      let mut _4: *const &u8;
       scope 1 (inlined generic_cast::<&u8, &u8>) {
-          debug x => _1;
+          debug x => _4;
+          let mut _5: *const &u8;
       }
   
       bb0: {
           StorageLive(_2);
           StorageLive(_3);
-          _3 = _1;
--         _2 = _3 as *const &u8 (PtrToPtr);
-+         _2 = _3;
-          StorageDead(_3);
+          StorageLive(_4);
+          _4 = _1;
+          StorageLive(_5);
+          _5 = _4;
+-         _3 = move _5 as *const &u8 (PtrToPtr);
++         _3 = move _5;
+          StorageDead(_5);
+          StorageDead(_4);
+-         _2 = move _3 as *const &u8 (PtrToPtr);
++         _2 = move _3;
           _0 = _2;
+          StorageDead(_3);
           StorageDead(_2);
           return;
       }
diff --git a/tests/mir-opt/instsimplify/casts.roundtrip.InstSimplify.diff b/tests/mir-opt/instsimplify/casts.roundtrip.InstSimplify.diff
new file mode 100644
index 00000000000..a6d68cd4e4b
--- /dev/null
+++ b/tests/mir-opt/instsimplify/casts.roundtrip.InstSimplify.diff
@@ -0,0 +1,26 @@
+- // MIR for `roundtrip` before InstSimplify
++ // MIR for `roundtrip` after InstSimplify
+  
+  fn roundtrip(_1: *const u8) -> *const u8 {
+      debug x => _1;
+      let mut _0: *const u8;
+      let mut _2: *const u8;
+      let mut _3: *mut u8;
+      let mut _4: *const u8;
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          StorageLive(_4);
+          _4 = _1;
+          _3 = move _4 as *mut u8 (PtrToPtr);
+          _2 = move _3 as *const u8 (PointerCoercion(MutToConstPointer));
+          StorageDead(_4);
+          StorageDead(_3);
+-         _0 = move _2 as *const u8 (PtrToPtr);
++         _0 = move _2;
+          StorageDead(_2);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/instsimplify/casts.rs b/tests/mir-opt/instsimplify/casts.rs
new file mode 100644
index 00000000000..86f9b34ea04
--- /dev/null
+++ b/tests/mir-opt/instsimplify/casts.rs
@@ -0,0 +1,25 @@
+// unit-test: InstSimplify
+// compile-flags: -Zinline-mir
+#![crate_type = "lib"]
+
+#[inline(always)]
+fn generic_cast<T, U>(x: *const T) -> *const U {
+    x as *const U
+}
+
+// EMIT_MIR casts.redundant.InstSimplify.diff
+pub fn redundant<'a, 'b: 'a>(x: *const &'a u8) -> *const &'a u8 {
+    // CHECK-LABEL: fn redundant(
+    // CHECK: inlined generic_cast
+    // CHECK-NOT: as
+    generic_cast::<&'a u8, &'b u8>(x) as *const &'a u8
+}
+
+// EMIT_MIR casts.roundtrip.InstSimplify.diff
+pub fn roundtrip(x: *const u8) -> *const u8 {
+    // CHECK-LABEL: fn roundtrip(
+    // CHECK: _4 = _1;
+    // CHECK: _3 = move _4 as *mut u8 (PtrToPtr);
+    // CHECK: _2 = move _3 as *const u8 (PointerCoercion(MutToConstPointer));
+    x as *mut u8 as *const u8
+}
diff --git a/tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-abort.diff b/tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-abort.diff
index 3e7d0ce51e2..3e7d0ce51e2 100644
--- a/tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-abort.diff
+++ b/tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-abort.diff
diff --git a/tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-unwind.diff b/tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-unwind.diff
index 4833c1089e3..4833c1089e3 100644
--- a/tests/mir-opt/combine_array_len.norm2.InstSimplify.panic-unwind.diff
+++ b/tests/mir-opt/instsimplify/combine_array_len.norm2.InstSimplify.panic-unwind.diff
diff --git a/tests/mir-opt/combine_array_len.rs b/tests/mir-opt/instsimplify/combine_array_len.rs
index e971ab4781e..3b6795bc943 100644
--- a/tests/mir-opt/combine_array_len.rs
+++ b/tests/mir-opt/instsimplify/combine_array_len.rs
@@ -1,8 +1,10 @@
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: InstSimplify
-// EMIT_MIR combine_array_len.norm2.InstSimplify.diff
 
+// EMIT_MIR combine_array_len.norm2.InstSimplify.diff
 fn norm2(x: [f32; 2]) -> f32 {
+    // CHECK-LABEL: fn norm2(
+    // CHECK-NOT: Len(
     let a = x[0];
     let b = x[1];
     a*a + b*b
diff --git a/tests/mir-opt/combine_clone_of_primitives.rs b/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs
index c19f9ee105f..2adbe778d23 100644
--- a/tests/mir-opt/combine_clone_of_primitives.rs
+++ b/tests/mir-opt/instsimplify/combine_clone_of_primitives.rs
@@ -2,7 +2,6 @@
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // EMIT_MIR combine_clone_of_primitives.{impl#0}-clone.InstSimplify.diff
-
 #[derive(Clone)]
 struct MyThing<T> {
     v: T,
@@ -10,6 +9,11 @@ struct MyThing<T> {
     a: [f32; 3],
 }
 
+// CHECK-LABEL: ::clone(
+// CHECK: <T as Clone>::clone(
+// CHECK-NOT: <u64 as Clone>::clone(
+// CHECK-NOT: <[f32; 3] as Clone>::clone(
+
 fn main() {
     let x = MyThing::<i16> { v: 2, i: 3, a: [0.0; 3] };
     let y = x.clone();
diff --git a/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff b/tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff
index 124c2dc7e4b..48586f8b334 100644
--- a/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff
+++ b/tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-abort.diff
@@ -1,7 +1,7 @@
-- // 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
+- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` before InstSimplify
++ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` after InstSimplify
   
-  fn <impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
+  fn <impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
       debug self => _1;
       let mut _0: MyThing<T>;
       let mut _2: T;
diff --git a/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff b/tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff
index f2b87221f2b..a57266e9c12 100644
--- a/tests/mir-opt/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff
+++ b/tests/mir-opt/instsimplify/combine_clone_of_primitives.{impl#0}-clone.InstSimplify.panic-unwind.diff
@@ -1,7 +1,7 @@
-- // 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
+- // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` before InstSimplify
++ // MIR for `<impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone` after InstSimplify
   
-  fn <impl at $DIR/combine_clone_of_primitives.rs:6:10: 6:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
+  fn <impl at $DIR/combine_clone_of_primitives.rs:5:10: 5:15>::clone(_1: &MyThing<T>) -> MyThing<T> {
       debug self => _1;
       let mut _0: MyThing<T>;
       let mut _2: T;
diff --git a/tests/mir-opt/combine_transmutes.adt_transmutes.InstSimplify.diff b/tests/mir-opt/instsimplify/combine_transmutes.adt_transmutes.InstSimplify.diff
index cb623e83f52..cb623e83f52 100644
--- a/tests/mir-opt/combine_transmutes.adt_transmutes.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/combine_transmutes.adt_transmutes.InstSimplify.diff
diff --git a/tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff b/tests/mir-opt/instsimplify/combine_transmutes.identity_transmutes.InstSimplify.diff
index 58ae5919071..58ae5919071 100644
--- a/tests/mir-opt/combine_transmutes.identity_transmutes.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/combine_transmutes.identity_transmutes.InstSimplify.diff
diff --git a/tests/mir-opt/combine_transmutes.integer_transmutes.InstSimplify.diff b/tests/mir-opt/instsimplify/combine_transmutes.integer_transmutes.InstSimplify.diff
index 8eff802dd3c..8eff802dd3c 100644
--- a/tests/mir-opt/combine_transmutes.integer_transmutes.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/combine_transmutes.integer_transmutes.InstSimplify.diff
diff --git a/tests/mir-opt/combine_transmutes.rs b/tests/mir-opt/instsimplify/combine_transmutes.rs
index 403f9356ce2..b8e15da905b 100644
--- a/tests/mir-opt/combine_transmutes.rs
+++ b/tests/mir-opt/instsimplify/combine_transmutes.rs
@@ -10,6 +10,10 @@ use std::mem::{MaybeUninit, ManuallyDrop, transmute};
 
 // EMIT_MIR combine_transmutes.identity_transmutes.InstSimplify.diff
 pub unsafe fn identity_transmutes() {
+    // CHECK-LABEL: fn identity_transmutes(
+    // CHECK-NOT: as i32 (Transmute);
+    // CHECK-NOT: as Vec<i32> (Transmute);
+
     // These are nops and should be removed
     let _a = transmute::<i32, i32>(1);
     let _a = transmute::<Vec<i32>, Vec<i32>>(Vec::new());
@@ -18,6 +22,16 @@ pub unsafe fn identity_transmutes() {
 #[custom_mir(dialect = "runtime", phase = "initial")]
 // EMIT_MIR combine_transmutes.integer_transmutes.InstSimplify.diff
 pub unsafe fn integer_transmutes() {
+    // CHECK-LABEL: fn integer_transmutes(
+    // CHECK-NOT: _i32 as u32 (Transmute);
+    // CHECK: _i32 as u32 (IntToInt);
+    // CHECK: _i32 as i64 (Transmute);
+    // CHECK-NOT: _u64 as i64 (Transmute);
+    // CHECK: _u64 as i64 (IntToInt);
+    // CHECK: _u64 as u32 (Transmute);
+    // CHECK-NOT: _isize as usize (Transmute);
+    // CHECK: _isize as usize (IntToInt);
+
     mir! {
         {
             let A = CastTransmute::<i32, u32>(1); // Can be a cast
@@ -32,6 +46,14 @@ pub unsafe fn integer_transmutes() {
 
 // EMIT_MIR combine_transmutes.adt_transmutes.InstSimplify.diff
 pub unsafe fn adt_transmutes() {
+    // CHECK-LABEL: fn adt_transmutes(
+    // CHECK: as u8 (Transmute);
+    // CHECK: ({{_.*}}.0: i16);
+    // CHECK: as u16 (Transmute);
+    // CHECK: as u32 (Transmute);
+    // CHECK: as i32 (Transmute);
+    // CHECK: ({{_.*}}.1: std::mem::ManuallyDrop<std::string::String>);
+
     let _a: u8 = transmute(Some(std::num::NonZeroU8::MAX));
     let _a: i16 = transmute(std::num::Wrapping(0_i16));
     let _a: u16 = transmute(std::num::Wrapping(0_i16));
diff --git a/tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff b/tests/mir-opt/instsimplify/duplicate_switch_targets.assert_zero.InstSimplify.diff
index e2b45c882d6..e2b45c882d6 100644
--- a/tests/mir-opt/instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/duplicate_switch_targets.assert_zero.InstSimplify.diff
diff --git a/tests/mir-opt/instsimplify_duplicate_switch_targets.rs b/tests/mir-opt/instsimplify/duplicate_switch_targets.rs
index 3e280a40fda..e40bc7edaac 100644
--- a/tests/mir-opt/instsimplify_duplicate_switch_targets.rs
+++ b/tests/mir-opt/instsimplify/duplicate_switch_targets.rs
@@ -1,13 +1,15 @@
+// unit-test: InstSimplify
+
 #![feature(custom_mir, core_intrinsics)]
 #![crate_type = "lib"]
 
 use std::intrinsics::mir::*;
 
-// unit-test: InstSimplify
-
-// EMIT_MIR instsimplify_duplicate_switch_targets.assert_zero.InstSimplify.diff
+// EMIT_MIR duplicate_switch_targets.assert_zero.InstSimplify.diff
 #[custom_mir(dialect = "runtime", phase = "post-cleanup")]
 pub unsafe fn assert_zero(x: u8) -> u8 {
+    // CHECK-LABEL: fn assert_zero(
+    // CHECK: switchInt({{.*}}) -> [0: {{bb.*}}, otherwise: {{bb.*}}]
     mir!(
         {
             match x {
diff --git a/tests/mir-opt/intrinsic_asserts.generic.InstSimplify.diff b/tests/mir-opt/instsimplify/intrinsic_asserts.generic.InstSimplify.diff
index efa52798e65..2ecacb5e39f 100644
--- a/tests/mir-opt/intrinsic_asserts.generic.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/intrinsic_asserts.generic.InstSimplify.diff
@@ -8,25 +8,25 @@
       let _3: ();
   
       bb0: {
-          nop;
+          StorageLive(_1);
           _1 = assert_inhabited::<T>() -> [return: bb1, unwind unreachable];
       }
   
       bb1: {
-          nop;
-          nop;
+          StorageDead(_1);
+          StorageLive(_2);
           _2 = assert_zero_valid::<T>() -> [return: bb2, unwind unreachable];
       }
   
       bb2: {
-          nop;
-          nop;
+          StorageDead(_2);
+          StorageLive(_3);
           _3 = assert_mem_uninitialized_valid::<T>() -> [return: bb3, unwind unreachable];
       }
   
       bb3: {
-          nop;
-          nop;
+          StorageDead(_3);
+          _0 = const ();
           return;
       }
   }
diff --git a/tests/mir-opt/dont_yeet_assert.generic.InstSimplify.diff b/tests/mir-opt/instsimplify/intrinsic_asserts.generic_ref.InstSimplify.diff
index 98d9d24af34..d29af0945f7 100644
--- a/tests/mir-opt/dont_yeet_assert.generic.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/intrinsic_asserts.generic_ref.InstSimplify.diff
@@ -1,7 +1,7 @@
-- // MIR for `generic` before InstSimplify
-+ // MIR for `generic` after InstSimplify
+- // MIR for `generic_ref` before InstSimplify
++ // MIR for `generic_ref` after InstSimplify
   
-  fn generic() -> () {
+  fn generic_ref() -> () {
       let mut _0: ();
       let _1: ();
   
diff --git a/tests/mir-opt/intrinsic_asserts.panics.InstSimplify.diff b/tests/mir-opt/instsimplify/intrinsic_asserts.panics.InstSimplify.diff
index 46e05337809..1be386acfcc 100644
--- a/tests/mir-opt/intrinsic_asserts.panics.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/intrinsic_asserts.panics.InstSimplify.diff
@@ -8,28 +8,28 @@
       let _3: ();
   
       bb0: {
-          nop;
+          StorageLive(_1);
 -         _1 = assert_inhabited::<Never>() -> [return: bb1, unwind unreachable];
 +         _1 = assert_inhabited::<Never>() -> unwind unreachable;
       }
   
       bb1: {
-          nop;
-          nop;
+          StorageDead(_1);
+          StorageLive(_2);
 -         _2 = assert_zero_valid::<&u8>() -> [return: bb2, unwind unreachable];
 +         _2 = assert_zero_valid::<&u8>() -> unwind unreachable;
       }
   
       bb2: {
-          nop;
-          nop;
+          StorageDead(_2);
+          StorageLive(_3);
 -         _3 = assert_mem_uninitialized_valid::<&u8>() -> [return: bb3, unwind unreachable];
 +         _3 = assert_mem_uninitialized_valid::<&u8>() -> unwind unreachable;
       }
   
       bb3: {
-          nop;
-          nop;
+          StorageDead(_3);
+          _0 = const ();
           return;
       }
   }
diff --git a/tests/mir-opt/intrinsic_asserts.removable.InstSimplify.diff b/tests/mir-opt/instsimplify/intrinsic_asserts.removable.InstSimplify.diff
index 70c3e8830f4..f2e69783842 100644
--- a/tests/mir-opt/intrinsic_asserts.removable.InstSimplify.diff
+++ b/tests/mir-opt/instsimplify/intrinsic_asserts.removable.InstSimplify.diff
@@ -8,28 +8,28 @@
       let _3: ();
   
       bb0: {
-          nop;
+          StorageLive(_1);
 -         _1 = assert_inhabited::<()>() -> [return: bb1, unwind unreachable];
 +         goto -> bb1;
       }
   
       bb1: {
-          nop;
-          nop;
+          StorageDead(_1);
+          StorageLive(_2);
 -         _2 = assert_zero_valid::<u8>() -> [return: bb2, unwind unreachable];
 +         goto -> bb2;
       }
   
       bb2: {
-          nop;
-          nop;
+          StorageDead(_2);
+          StorageLive(_3);
 -         _3 = assert_mem_uninitialized_valid::<u8>() -> [return: bb3, unwind unreachable];
 +         goto -> bb3;
       }
   
       bb3: {
-          nop;
-          nop;
+          StorageDead(_3);
+          _0 = const ();
           return;
       }
   }
diff --git a/tests/mir-opt/intrinsic_asserts.rs b/tests/mir-opt/instsimplify/intrinsic_asserts.rs
index 302d4bda188..43998b2dbf0 100644
--- a/tests/mir-opt/intrinsic_asserts.rs
+++ b/tests/mir-opt/instsimplify/intrinsic_asserts.rs
@@ -1,9 +1,15 @@
+// unit-test: InstSimplify
+
 #![crate_type = "lib"]
 #![feature(core_intrinsics)]
 
 // All these assertions pass, so all the intrinsic calls should be deleted.
 // EMIT_MIR intrinsic_asserts.removable.InstSimplify.diff
 pub fn removable() {
+    // CHECK-LABEL: fn removable(
+    // CHECK-NOT: assert_inhabited
+    // CHECK-NOT: assert_zero_valid
+    // CHECK-NOT: assert_mem_uninitialized_valid
     core::intrinsics::assert_inhabited::<()>();
     core::intrinsics::assert_zero_valid::<u8>();
     core::intrinsics::assert_mem_uninitialized_valid::<u8>();
@@ -14,6 +20,10 @@ enum Never {}
 // These assertions all diverge, so their target blocks should become None.
 // EMIT_MIR intrinsic_asserts.panics.InstSimplify.diff
 pub fn panics() {
+    // CHECK-LABEL: fn panics(
+    // CHECK: assert_inhabited::<Never>() -> unwind
+    // CHECK: assert_zero_valid::<&u8>() -> unwind
+    // CHECK: assert_mem_uninitialized_valid::<&u8>() -> unwind
     core::intrinsics::assert_inhabited::<Never>();
     core::intrinsics::assert_zero_valid::<&u8>();
     core::intrinsics::assert_mem_uninitialized_valid::<&u8>();
@@ -22,7 +32,19 @@ pub fn panics() {
 // Whether or not these asserts pass isn't known, so they shouldn't be modified.
 // EMIT_MIR intrinsic_asserts.generic.InstSimplify.diff
 pub fn generic<T>() {
+    // CHECK-LABEL: fn generic(
+    // CHECK: assert_inhabited::<T>() -> [return:
+    // CHECK: assert_zero_valid::<T>() -> [return:
+    // CHECK: assert_mem_uninitialized_valid::<T>() -> [return:
     core::intrinsics::assert_inhabited::<T>();
     core::intrinsics::assert_zero_valid::<T>();
     core::intrinsics::assert_mem_uninitialized_valid::<T>();
 }
+
+// Whether or not these asserts pass isn't known, so they shouldn't be modified.
+// EMIT_MIR intrinsic_asserts.generic_ref.InstSimplify.diff
+pub fn generic_ref<T>() {
+    // CHECK-LABEL: fn generic_ref(
+    // CHECK: assert_mem_uninitialized_valid::<&T>() -> [return:
+    core::intrinsics::assert_mem_uninitialized_valid::<&T>();
+}
diff --git a/tests/mir-opt/issue_101973.rs b/tests/mir-opt/issue_101973.rs
index 01b342f4dc3..3de325bc170 100644
--- a/tests/mir-opt/issue_101973.rs
+++ b/tests/mir-opt/issue_101973.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -O -C debug-assertions=on
 // This needs inlining followed by ConstProp to reproduce, so we cannot use "unit-test".
diff --git a/tests/mir-opt/issue_104451_unwindable_intrinsics.rs b/tests/mir-opt/issue_104451_unwindable_intrinsics.rs
index 54112627e4e..cd068f12236 100644
--- a/tests/mir-opt/issue_104451_unwindable_intrinsics.rs
+++ b/tests/mir-opt/issue_104451_unwindable_intrinsics.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Check that `UnwindAction::Unreachable` is not generated for unwindable intrinsics.
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 #![feature(core_intrinsics)]
diff --git a/tests/mir-opt/issue_38669.rs b/tests/mir-opt/issue_38669.rs
index db3f89472c9..9da4c89bb12 100644
--- a/tests/mir-opt/issue_38669.rs
+++ b/tests/mir-opt/issue_38669.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // check that we don't StorageDead booleans before they are used
 
 // EMIT_MIR issue_38669.main.SimplifyCfg-initial.after.mir
diff --git a/tests/mir-opt/issue_41110.rs b/tests/mir-opt/issue_41110.rs
index d8665b23d26..38602d5eaef 100644
--- a/tests/mir-opt/issue_41110.rs
+++ b/tests/mir-opt/issue_41110.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // check that we don't emit multiple drop flags when they are not needed.
diff --git a/tests/mir-opt/issue_41697.rs b/tests/mir-opt/issue_41697.rs
index cbd8633a345..92d382c3940 100644
--- a/tests/mir-opt/issue_41697.rs
+++ b/tests/mir-opt/issue_41697.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Regression test for #41697. Using dump-mir was triggering
 // artificial cycles: during type-checking, we had to get the MIR for
 // the constant expressions in `[u8; 2]`, which in turn would trigger
diff --git a/tests/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir b/tests/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir
index 0b48e58dabd..7dafeabaacc 100644
--- a/tests/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir
+++ b/tests/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/issue_41697.rs:18:1: 18:23>::{constant#0}` after SimplifyCfg-promote-consts
+// MIR for `<impl at $DIR/issue_41697.rs:19:1: 19:23>::{constant#0}` after SimplifyCfg-promote-consts
 
-<impl at $DIR/issue_41697.rs:18:1: 18:23>::{constant#0}: usize = {
+<impl at $DIR/issue_41697.rs:19:1: 19:23>::{constant#0}: usize = {
     let mut _0: usize;
     let mut _1: (usize, bool);
 
diff --git a/tests/mir-opt/issue_41888.main.ElaborateDrops.panic-abort.diff b/tests/mir-opt/issue_41888.main.ElaborateDrops.panic-abort.diff
index b57fe348c2d..55d2629a551 100644
--- a/tests/mir-opt/issue_41888.main.ElaborateDrops.panic-abort.diff
+++ b/tests/mir-opt/issue_41888.main.ElaborateDrops.panic-abort.diff
@@ -10,9 +10,8 @@
       let mut _5: isize;
 +     let mut _7: bool;
 +     let mut _8: bool;
-+     let mut _9: bool;
++     let mut _9: isize;
 +     let mut _10: isize;
-+     let mut _11: isize;
       scope 1 {
           debug e => _1;
           scope 2 {
@@ -24,7 +23,6 @@
       bb0: {
 +         _7 = const false;
 +         _8 = const false;
-+         _9 = const false;
           StorageLive(_1);
           StorageLive(_2);
           _2 = cond() -> [return: bb1, unwind: bb11];
@@ -47,7 +45,6 @@
       bb3: {
 +         _7 = const true;
 +         _8 = const true;
-+         _9 = const true;
           _1 = move _3;
 -         drop(_3) -> [return: bb5, unwind: bb11];
 +         goto -> bb5;
@@ -56,7 +53,6 @@
       bb4 (cleanup): {
 +         _7 = const true;
 +         _8 = const true;
-+         _9 = const true;
           _1 = move _3;
 -         drop(_3) -> [return: bb11, unwind terminate(cleanup)];
 +         goto -> bb11;
@@ -64,13 +60,13 @@
   
       bb5: {
           StorageDead(_3);
+          PlaceMention(_1);
           _5 = discriminant(_1);
           switchInt(move _5) -> [0: bb6, otherwise: bb7];
       }
   
       bb6: {
           StorageLive(_6);
-+         _9 = const false;
           _6 = move ((_1 as F).0: K);
           _0 = const ();
           StorageDead(_6);
@@ -90,13 +86,12 @@
       bb9: {
           StorageDead(_2);
 -         drop(_1) -> [return: bb10, unwind: bb12];
-+         goto -> bb18;
++         goto -> bb19;
       }
   
       bb10: {
 +         _7 = const false;
 +         _8 = const false;
-+         _9 = const false;
           StorageDead(_1);
           return;
       }
@@ -116,33 +111,37 @@
 +     }
 + 
 +     bb14 (cleanup): {
-+         goto -> bb12;
++         drop(((_1 as F).0: K)) -> [return: bb12, unwind terminate(cleanup)];
 +     }
 + 
-+     bb15: {
-+         drop(_1) -> [return: bb13, unwind: bb12];
++     bb15 (cleanup): {
++         switchInt(_7) -> [0: bb12, otherwise: bb14];
 +     }
 + 
-+     bb16 (cleanup): {
-+         drop(_1) -> [return: bb12, unwind terminate(cleanup)];
++     bb16: {
++         drop(_1) -> [return: bb13, unwind: bb12];
 +     }
 + 
-+     bb17: {
-+         _10 = discriminant(_1);
-+         switchInt(move _10) -> [0: bb13, otherwise: bb15];
++     bb17 (cleanup): {
++         drop(_1) -> [return: bb12, unwind terminate(cleanup)];
 +     }
 + 
 +     bb18: {
-+         switchInt(_7) -> [0: bb13, otherwise: bb17];
++         _9 = discriminant(_1);
++         switchInt(move _9) -> [0: bb13, otherwise: bb16];
 +     }
 + 
-+     bb19 (cleanup): {
-+         _11 = discriminant(_1);
-+         switchInt(move _11) -> [0: bb14, otherwise: bb16];
++     bb19: {
++         switchInt(_7) -> [0: bb13, otherwise: bb18];
 +     }
 + 
 +     bb20 (cleanup): {
-+         switchInt(_7) -> [0: bb12, otherwise: bb19];
++         _10 = discriminant(_1);
++         switchInt(move _10) -> [0: bb15, otherwise: bb17];
++     }
++ 
++     bb21 (cleanup): {
++         switchInt(_7) -> [0: bb12, otherwise: bb20];
       }
   }
   
diff --git a/tests/mir-opt/issue_41888.main.ElaborateDrops.panic-unwind.diff b/tests/mir-opt/issue_41888.main.ElaborateDrops.panic-unwind.diff
index 2156850e38c..c731b5646f6 100644
--- a/tests/mir-opt/issue_41888.main.ElaborateDrops.panic-unwind.diff
+++ b/tests/mir-opt/issue_41888.main.ElaborateDrops.panic-unwind.diff
@@ -10,9 +10,8 @@
       let mut _5: isize;
 +     let mut _7: bool;
 +     let mut _8: bool;
-+     let mut _9: bool;
++     let mut _9: isize;
 +     let mut _10: isize;
-+     let mut _11: isize;
       scope 1 {
           debug e => _1;
           scope 2 {
@@ -24,7 +23,6 @@
       bb0: {
 +         _7 = const false;
 +         _8 = const false;
-+         _9 = const false;
           StorageLive(_1);
           StorageLive(_2);
           _2 = cond() -> [return: bb1, unwind: bb11];
@@ -47,7 +45,6 @@
       bb3: {
 +         _7 = const true;
 +         _8 = const true;
-+         _9 = const true;
           _1 = move _3;
 -         drop(_3) -> [return: bb5, unwind: bb11];
 +         goto -> bb5;
@@ -56,7 +53,6 @@
       bb4 (cleanup): {
 +         _7 = const true;
 +         _8 = const true;
-+         _9 = const true;
           _1 = move _3;
 -         drop(_3) -> [return: bb11, unwind terminate(cleanup)];
 +         goto -> bb11;
@@ -64,13 +60,13 @@
   
       bb5: {
           StorageDead(_3);
+          PlaceMention(_1);
           _5 = discriminant(_1);
           switchInt(move _5) -> [0: bb6, otherwise: bb7];
       }
   
       bb6: {
           StorageLive(_6);
-+         _9 = const false;
           _6 = move ((_1 as F).0: K);
           _0 = const ();
           StorageDead(_6);
@@ -90,13 +86,12 @@
       bb9: {
           StorageDead(_2);
 -         drop(_1) -> [return: bb10, unwind continue];
-+         goto -> bb18;
++         goto -> bb19;
       }
   
       bb10: {
 +         _7 = const false;
 +         _8 = const false;
-+         _9 = const false;
           StorageDead(_1);
           return;
       }
@@ -116,33 +111,37 @@
 +     }
 + 
 +     bb14 (cleanup): {
-+         goto -> bb12;
++         drop(((_1 as F).0: K)) -> [return: bb12, unwind terminate(cleanup)];
 +     }
 + 
-+     bb15: {
-+         drop(_1) -> [return: bb13, unwind: bb12];
++     bb15 (cleanup): {
++         switchInt(_7) -> [0: bb12, otherwise: bb14];
 +     }
 + 
-+     bb16 (cleanup): {
-+         drop(_1) -> [return: bb12, unwind terminate(cleanup)];
++     bb16: {
++         drop(_1) -> [return: bb13, unwind: bb12];
 +     }
 + 
-+     bb17: {
-+         _10 = discriminant(_1);
-+         switchInt(move _10) -> [0: bb13, otherwise: bb15];
++     bb17 (cleanup): {
++         drop(_1) -> [return: bb12, unwind terminate(cleanup)];
 +     }
 + 
 +     bb18: {
-+         switchInt(_7) -> [0: bb13, otherwise: bb17];
++         _9 = discriminant(_1);
++         switchInt(move _9) -> [0: bb13, otherwise: bb16];
 +     }
 + 
-+     bb19 (cleanup): {
-+         _11 = discriminant(_1);
-+         switchInt(move _11) -> [0: bb14, otherwise: bb16];
++     bb19: {
++         switchInt(_7) -> [0: bb13, otherwise: bb18];
 +     }
 + 
 +     bb20 (cleanup): {
-+         switchInt(_7) -> [0: bb12, otherwise: bb19];
++         _10 = discriminant(_1);
++         switchInt(move _10) -> [0: bb15, otherwise: bb17];
++     }
++ 
++     bb21 (cleanup): {
++         switchInt(_7) -> [0: bb12, otherwise: bb20];
       }
   }
   
diff --git a/tests/mir-opt/issue_41888.rs b/tests/mir-opt/issue_41888.rs
index 9b16caf92fe..70b20218633 100644
--- a/tests/mir-opt/issue_41888.rs
+++ b/tests/mir-opt/issue_41888.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // check that we clear the "ADT master drop flag" even when there are
 // no fields to be dropped.
diff --git a/tests/mir-opt/issue_62289.rs b/tests/mir-opt/issue_62289.rs
index fece6bb7cf5..40e8352cff4 100644
--- a/tests/mir-opt/issue_62289.rs
+++ b/tests/mir-opt/issue_62289.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // check that we don't forget to drop the Box if we early return before
 // initializing it
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-abort.mir b/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-abort.mir
index 73462967850..fadfdfc87be 100644
--- a/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-abort.mir
+++ b/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-abort.mir
@@ -45,6 +45,7 @@ fn test() -> Option<Box<u32>> {
 
     bb2: {
         StorageDead(_7);
+        PlaceMention(_6);
         _8 = discriminant(_6);
         switchInt(move _8) -> [0: bb3, 1: bb5, otherwise: bb4];
     }
diff --git a/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-unwind.mir b/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-unwind.mir
index 8264e2cabbc..8f94165a108 100644
--- a/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-unwind.mir
+++ b/tests/mir-opt/issue_62289.test.ElaborateDrops.before.panic-unwind.mir
@@ -45,6 +45,7 @@ fn test() -> Option<Box<u32>> {
 
     bb2: {
         StorageDead(_7);
+        PlaceMention(_6);
         _8 = discriminant(_6);
         switchInt(move _8) -> [0: bb3, 1: bb5, otherwise: bb4];
     }
diff --git a/tests/mir-opt/issue_72181.rs b/tests/mir-opt/issue_72181.rs
index 6a32d4bbee2..226709bab2f 100644
--- a/tests/mir-opt/issue_72181.rs
+++ b/tests/mir-opt/issue_72181.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=1
 // Regression test for #72181, this ICE requires `-Z mir-opt-level=1` flags.
 
diff --git a/tests/mir-opt/issue_72181_1.f.built.after.mir b/tests/mir-opt/issue_72181_1.f.built.after.mir
index 16f34e4a449..89da9a80113 100644
--- a/tests/mir-opt/issue_72181_1.f.built.after.mir
+++ b/tests/mir-opt/issue_72181_1.f.built.after.mir
@@ -5,6 +5,7 @@ fn f(_1: Void) -> ! {
     let mut _0: !;
 
     bb0: {
+        PlaceMention(_1);
         FakeRead(ForMatchedPlace(None), _1);
         unreachable;
     }
diff --git a/tests/mir-opt/issue_72181_1.main.built.after.mir b/tests/mir-opt/issue_72181_1.main.built.after.mir
index f5ab5b526df..d35aada95f8 100644
--- a/tests/mir-opt/issue_72181_1.main.built.after.mir
+++ b/tests/mir-opt/issue_72181_1.main.built.after.mir
@@ -1,8 +1,8 @@
 // MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: Ty(Void), max_universe: U0, variables: [] }, span: $DIR/issue_72181_1.rs:16:12: 16:16, inferred_ty: Void
-| 1: user_ty: Canonical { value: Ty(Void), max_universe: U0, variables: [] }, span: $DIR/issue_72181_1.rs:16:12: 16:16, inferred_ty: Void
+| 0: user_ty: Canonical { value: Ty(Void), max_universe: U0, variables: [] }, span: $DIR/issue_72181_1.rs:17:12: 17:16, inferred_ty: Void
+| 1: user_ty: Canonical { value: Ty(Void), max_universe: U0, variables: [] }, span: $DIR/issue_72181_1.rs:17:12: 17:16, inferred_ty: Void
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/issue_72181_1.rs b/tests/mir-opt/issue_72181_1.rs
index 8ae2599ec73..f9ee33ef991 100644
--- a/tests/mir-opt/issue_72181_1.rs
+++ b/tests/mir-opt/issue_72181_1.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=1
 // Regression test for #72181, this ICE requires `-Z mir-opt-level=1` flags.
 
diff --git a/tests/mir-opt/issue_76432.rs b/tests/mir-opt/issue_76432.rs
index 2a8e1283b0c..f0f12c535c5 100644
--- a/tests/mir-opt/issue_76432.rs
+++ b/tests/mir-opt/issue_76432.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -Zmir-enable-passes=-NormalizeArrayLen
 // Check that we do not insert StorageDead at each target if StorageDead was never seen
diff --git a/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff b/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff
index 9d8f272abea..b2539f391d1 100644
--- a/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff
+++ b/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-abort.diff
@@ -7,22 +7,18 @@
       let _2: &[T];
       let mut _3: &[T; 3];
       let _4: [T; 3];
-      let mut _5: T;
-      let mut _6: T;
-      let mut _7: T;
-      let mut _8: usize;
-      let mut _9: usize;
-      let mut _10: bool;
-      let mut _14: !;
+      let mut _5: usize;
+      let mut _6: bool;
+      let mut _10: !;
       scope 1 {
           debug v => _2;
-          let _11: &T;
-          let _12: &T;
-          let _13: &T;
+          let _7: &T;
+          let _8: &T;
+          let _9: &T;
           scope 2 {
-              debug v1 => _11;
-              debug v2 => _12;
-              debug v3 => _13;
+              debug v1 => _7;
+              debug v2 => _8;
+              debug v3 => _9;
           }
       }
   
@@ -33,26 +29,25 @@
           _3 = &_4;
           _2 = move _3 as &[T] (PointerCoercion(Unsize));
           StorageDead(_3);
-          _8 = const 3_usize;
-          _9 = const 3_usize;
-          _10 = const true;
+          _5 = const 3_usize;
+          _6 = const true;
           goto -> bb2;
       }
   
       bb1: {
-          _14 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind unreachable;
+          _10 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind unreachable;
       }
   
       bb2: {
-          StorageLive(_11);
-          _11 = &(*_2)[0 of 3];
-          StorageLive(_12);
-          _12 = &(*_2)[1 of 3];
-          StorageLive(_13);
-          _13 = &(*_2)[2 of 3];
-          StorageDead(_13);
-          StorageDead(_12);
-          StorageDead(_11);
+          StorageLive(_7);
+          _7 = &(*_2)[0 of 3];
+          StorageLive(_8);
+          _8 = &(*_2)[1 of 3];
+          StorageLive(_9);
+          _9 = &(*_2)[2 of 3];
+          StorageDead(_9);
+          StorageDead(_8);
+          StorageDead(_7);
           StorageDead(_4);
           return;
       }
diff --git a/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-unwind.diff b/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-unwind.diff
index 738b0b1b3e5..ff7f12c093c 100644
--- a/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-unwind.diff
+++ b/tests/mir-opt/issue_76432.test.SimplifyComparisonIntegral.panic-unwind.diff
@@ -7,22 +7,18 @@
       let _2: &[T];
       let mut _3: &[T; 3];
       let _4: [T; 3];
-      let mut _5: T;
-      let mut _6: T;
-      let mut _7: T;
-      let mut _8: usize;
-      let mut _9: usize;
-      let mut _10: bool;
-      let mut _14: !;
+      let mut _5: usize;
+      let mut _6: bool;
+      let mut _10: !;
       scope 1 {
           debug v => _2;
-          let _11: &T;
-          let _12: &T;
-          let _13: &T;
+          let _7: &T;
+          let _8: &T;
+          let _9: &T;
           scope 2 {
-              debug v1 => _11;
-              debug v2 => _12;
-              debug v3 => _13;
+              debug v1 => _7;
+              debug v2 => _8;
+              debug v3 => _9;
           }
       }
   
@@ -33,26 +29,25 @@
           _3 = &_4;
           _2 = move _3 as &[T] (PointerCoercion(Unsize));
           StorageDead(_3);
-          _8 = const 3_usize;
-          _9 = const 3_usize;
-          _10 = const true;
+          _5 = const 3_usize;
+          _6 = const true;
           goto -> bb2;
       }
   
       bb1: {
-          _14 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind continue;
+          _10 = core::panicking::panic(const "internal error: entered unreachable code") -> unwind continue;
       }
   
       bb2: {
-          StorageLive(_11);
-          _11 = &(*_2)[0 of 3];
-          StorageLive(_12);
-          _12 = &(*_2)[1 of 3];
-          StorageLive(_13);
-          _13 = &(*_2)[2 of 3];
-          StorageDead(_13);
-          StorageDead(_12);
-          StorageDead(_11);
+          StorageLive(_7);
+          _7 = &(*_2)[0 of 3];
+          StorageLive(_8);
+          _8 = &(*_2)[1 of 3];
+          StorageLive(_9);
+          _9 = &(*_2)[2 of 3];
+          StorageDead(_9);
+          StorageDead(_8);
+          StorageDead(_7);
           StorageDead(_4);
           return;
       }
diff --git a/tests/mir-opt/issue_78192.rs b/tests/mir-opt/issue_78192.rs
index 95142a3e463..b08c3615e8b 100644
--- a/tests/mir-opt/issue_78192.rs
+++ b/tests/mir-opt/issue_78192.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Zmir-opt-level=1 -Zinline-mir
 pub fn f<T>(a: &T) -> *const T {
     let b: &*const T = &(a as *const T);
diff --git a/tests/mir-opt/issue_91633.rs b/tests/mir-opt/issue_91633.rs
index 9127cacc97c..047a0cd9bdb 100644
--- a/tests/mir-opt/issue_91633.rs
+++ b/tests/mir-opt/issue_91633.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=0
 // EMIT_MIR issue_91633.hey.built.after.mir
 fn hey<T> (it: &[T])
diff --git a/tests/mir-opt/issue_99325.main.built.after.32bit.mir b/tests/mir-opt/issue_99325.main.built.after.32bit.mir
index 132b713356e..ffb1aedd2ea 100644
--- a/tests/mir-opt/issue_99325.main.built.after.32bit.mir
+++ b/tests/mir-opt/issue_99325.main.built.after.32bit.mir
@@ -1,8 +1,8 @@
 // MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:12:16: 12:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
-| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[22bb]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
+| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
+| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[22bb]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
 |
 fn main() -> () {
     let mut _0: ();
@@ -81,7 +81,7 @@ fn main() -> () {
         _2 = (move _3, move _5);
         StorageDead(_5);
         StorageDead(_3);
-        FakeRead(ForMatchedPlace(None), _2);
+        PlaceMention(_2);
         StorageLive(_8);
         _8 = (_2.0: &&[u8]);
         StorageLive(_9);
@@ -180,7 +180,7 @@ fn main() -> () {
         _23 = (move _24, move _26);
         StorageDead(_26);
         StorageDead(_24);
-        FakeRead(ForMatchedPlace(None), _23);
+        PlaceMention(_23);
         StorageLive(_28);
         _28 = (_23.0: &&[u8]);
         StorageLive(_29);
@@ -271,6 +271,6 @@ fn main() -> () {
     }
 }
 
-alloc4 (size: 4, align: 1) {
+ALLOC0 (size: 4, align: 1) {
     41 41 41 41                                     │ AAAA
 }
diff --git a/tests/mir-opt/issue_99325.main.built.after.64bit.mir b/tests/mir-opt/issue_99325.main.built.after.64bit.mir
index 132b713356e..ffb1aedd2ea 100644
--- a/tests/mir-opt/issue_99325.main.built.after.64bit.mir
+++ b/tests/mir-opt/issue_99325.main.built.after.64bit.mir
@@ -1,8 +1,8 @@
 // MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:12:16: 12:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
-| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[22bb]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
+| 0: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [&*b"AAAA"], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:13:16: 13:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
+| 1: user_ty: Canonical { value: TypeOf(DefId(0:3 ~ issue_99325[22bb]::function_with_bytes), UserArgs { args: [UnevaluatedConst { def: DefId(0:8 ~ issue_99325[22bb]::main::{constant#1}), args: [] }: &ReStatic [u8; 4_usize]], user_self_ty: None }), max_universe: U0, variables: [] }, span: $DIR/issue_99325.rs:14:16: 14:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
 |
 fn main() -> () {
     let mut _0: ();
@@ -81,7 +81,7 @@ fn main() -> () {
         _2 = (move _3, move _5);
         StorageDead(_5);
         StorageDead(_3);
-        FakeRead(ForMatchedPlace(None), _2);
+        PlaceMention(_2);
         StorageLive(_8);
         _8 = (_2.0: &&[u8]);
         StorageLive(_9);
@@ -180,7 +180,7 @@ fn main() -> () {
         _23 = (move _24, move _26);
         StorageDead(_26);
         StorageDead(_24);
-        FakeRead(ForMatchedPlace(None), _23);
+        PlaceMention(_23);
         StorageLive(_28);
         _28 = (_23.0: &&[u8]);
         StorageLive(_29);
@@ -271,6 +271,6 @@ fn main() -> () {
     }
 }
 
-alloc4 (size: 4, align: 1) {
+ALLOC0 (size: 4, align: 1) {
     41 41 41 41                                     │ AAAA
 }
diff --git a/tests/mir-opt/issue_99325.rs b/tests/mir-opt/issue_99325.rs
index 3603228a502..2638b69e2ee 100644
--- a/tests/mir-opt/issue_99325.rs
+++ b/tests/mir-opt/issue_99325.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_BIT_WIDTH
 
 #![feature(adt_const_params)]
diff --git a/tests/mir-opt/issues/issue_59352.rs b/tests/mir-opt/issues/issue_59352.rs
index 7cadf8f227f..1cbeaec28bb 100644
--- a/tests/mir-opt/issues/issue_59352.rs
+++ b/tests/mir-opt/issues/issue_59352.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // This test is a mirror of codegen/issue-59352.rs.
 // The LLVM inliner doesn't inline `char::method::is_digit()` and so it doesn't recognize this case
diff --git a/tests/mir-opt/issues/issue_75439.rs b/tests/mir-opt/issues/issue_75439.rs
index 4c749a150c0..0ab496e474d 100644
--- a/tests/mir-opt/issues/issue_75439.rs
+++ b/tests/mir-opt/issues/issue_75439.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR issue_75439.foo.MatchBranchSimplification.diff
 // ignore-endian-big
 
diff --git a/tests/mir-opt/jump_threading.custom_discr.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.custom_discr.JumpThreading.panic-abort.diff
new file mode 100644
index 00000000000..462cc207785
--- /dev/null
+++ b/tests/mir-opt/jump_threading.custom_discr.JumpThreading.panic-abort.diff
@@ -0,0 +1,57 @@
+- // MIR for `custom_discr` before JumpThreading
++ // MIR for `custom_discr` after JumpThreading
+  
+  fn custom_discr(_1: bool) -> u8 {
+      debug x => _1;
+      let mut _0: u8;
+      let mut _2: CustomDiscr;
+      let mut _3: bool;
+      let mut _4: u8;
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          _3 = _1;
+          switchInt(move _3) -> [0: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+          _2 = CustomDiscr::A;
+-         goto -> bb3;
++         goto -> bb7;
+      }
+  
+      bb2: {
+          _2 = CustomDiscr::B;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_3);
+          _4 = discriminant(_2);
+-         switchInt(move _4) -> [35: bb5, otherwise: bb4];
++         goto -> bb4;
+      }
+  
+      bb4: {
+          _0 = const 13_u8;
+          goto -> bb6;
+      }
+  
+      bb5: {
+          _0 = const 5_u8;
+          goto -> bb6;
+      }
+  
+      bb6: {
+          StorageDead(_2);
+          return;
++     }
++ 
++     bb7: {
++         StorageDead(_3);
++         _4 = discriminant(_2);
++         goto -> bb5;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.custom_discr.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.custom_discr.JumpThreading.panic-unwind.diff
new file mode 100644
index 00000000000..462cc207785
--- /dev/null
+++ b/tests/mir-opt/jump_threading.custom_discr.JumpThreading.panic-unwind.diff
@@ -0,0 +1,57 @@
+- // MIR for `custom_discr` before JumpThreading
++ // MIR for `custom_discr` after JumpThreading
+  
+  fn custom_discr(_1: bool) -> u8 {
+      debug x => _1;
+      let mut _0: u8;
+      let mut _2: CustomDiscr;
+      let mut _3: bool;
+      let mut _4: u8;
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          _3 = _1;
+          switchInt(move _3) -> [0: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+          _2 = CustomDiscr::A;
+-         goto -> bb3;
++         goto -> bb7;
+      }
+  
+      bb2: {
+          _2 = CustomDiscr::B;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_3);
+          _4 = discriminant(_2);
+-         switchInt(move _4) -> [35: bb5, otherwise: bb4];
++         goto -> bb4;
+      }
+  
+      bb4: {
+          _0 = const 13_u8;
+          goto -> bb6;
+      }
+  
+      bb5: {
+          _0 = const 5_u8;
+          goto -> bb6;
+      }
+  
+      bb6: {
+          StorageDead(_2);
+          return;
++     }
++ 
++     bb7: {
++         StorageDead(_3);
++         _4 = discriminant(_2);
++         goto -> bb5;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.dfa.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.dfa.JumpThreading.panic-abort.diff
new file mode 100644
index 00000000000..ad5846c97de
--- /dev/null
+++ b/tests/mir-opt/jump_threading.dfa.JumpThreading.panic-abort.diff
@@ -0,0 +1,68 @@
+- // MIR for `dfa` before JumpThreading
++ // MIR for `dfa` after JumpThreading
+  
+  fn dfa() -> () {
+      let mut _0: ();
+      let mut _1: DFA;
+      let mut _2: !;
+      let mut _3: ();
+      let mut _4: isize;
+      let mut _5: DFA;
+      let mut _6: DFA;
+      let mut _7: DFA;
+      let mut _8: !;
+      scope 1 {
+          debug state => _1;
+      }
+  
+      bb0: {
+          StorageLive(_1);
+          _1 = DFA::A;
+          StorageLive(_2);
+          goto -> bb1;
+      }
+  
+      bb1: {
+          _4 = discriminant(_1);
+          switchInt(move _4) -> [0: bb4, 1: bb5, 2: bb6, 3: bb2, otherwise: bb3];
+      }
+  
+      bb2: {
+          _0 = const ();
+          StorageDead(_2);
+          StorageDead(_1);
+          return;
+      }
+  
+      bb3: {
+          unreachable;
+      }
+  
+      bb4: {
+          StorageLive(_5);
+          _5 = DFA::B;
+          _1 = move _5;
+          _3 = const ();
+          StorageDead(_5);
+          goto -> bb1;
+      }
+  
+      bb5: {
+          StorageLive(_6);
+          _6 = DFA::C;
+          _1 = move _6;
+          _3 = const ();
+          StorageDead(_6);
+          goto -> bb1;
+      }
+  
+      bb6: {
+          StorageLive(_7);
+          _7 = DFA::D;
+          _1 = move _7;
+          _3 = const ();
+          StorageDead(_7);
+          goto -> bb1;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.dfa.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.dfa.JumpThreading.panic-unwind.diff
new file mode 100644
index 00000000000..ad5846c97de
--- /dev/null
+++ b/tests/mir-opt/jump_threading.dfa.JumpThreading.panic-unwind.diff
@@ -0,0 +1,68 @@
+- // MIR for `dfa` before JumpThreading
++ // MIR for `dfa` after JumpThreading
+  
+  fn dfa() -> () {
+      let mut _0: ();
+      let mut _1: DFA;
+      let mut _2: !;
+      let mut _3: ();
+      let mut _4: isize;
+      let mut _5: DFA;
+      let mut _6: DFA;
+      let mut _7: DFA;
+      let mut _8: !;
+      scope 1 {
+          debug state => _1;
+      }
+  
+      bb0: {
+          StorageLive(_1);
+          _1 = DFA::A;
+          StorageLive(_2);
+          goto -> bb1;
+      }
+  
+      bb1: {
+          _4 = discriminant(_1);
+          switchInt(move _4) -> [0: bb4, 1: bb5, 2: bb6, 3: bb2, otherwise: bb3];
+      }
+  
+      bb2: {
+          _0 = const ();
+          StorageDead(_2);
+          StorageDead(_1);
+          return;
+      }
+  
+      bb3: {
+          unreachable;
+      }
+  
+      bb4: {
+          StorageLive(_5);
+          _5 = DFA::B;
+          _1 = move _5;
+          _3 = const ();
+          StorageDead(_5);
+          goto -> bb1;
+      }
+  
+      bb5: {
+          StorageLive(_6);
+          _6 = DFA::C;
+          _1 = move _6;
+          _3 = const ();
+          StorageDead(_6);
+          goto -> bb1;
+      }
+  
+      bb6: {
+          StorageLive(_7);
+          _7 = DFA::D;
+          _1 = move _7;
+          _3 = const ();
+          StorageDead(_7);
+          goto -> bb1;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.disappearing_bb.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.disappearing_bb.JumpThreading.panic-abort.diff
new file mode 100644
index 00000000000..f290da84e5d
--- /dev/null
+++ b/tests/mir-opt/jump_threading.disappearing_bb.JumpThreading.panic-abort.diff
@@ -0,0 +1,59 @@
+- // MIR for `disappearing_bb` before JumpThreading
++ // MIR for `disappearing_bb` after JumpThreading
+  
+  fn disappearing_bb(_1: u8) -> u8 {
+      let mut _0: u8;
+      let mut _2: bool;
+      let mut _3: bool;
+  
+      bb0: {
+          _2 = const true;
+          _3 = const true;
+          switchInt(_1) -> [0: bb3, 1: bb3, 2: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _3 = const false;
+-         goto -> bb4;
++         goto -> bb9;
+      }
+  
+      bb2: {
+          unreachable;
+      }
+  
+      bb3: {
+          _2 = const false;
+          goto -> bb4;
+      }
+  
+      bb4: {
+          switchInt(_3) -> [0: bb5, otherwise: bb7];
+      }
+  
+      bb5: {
+          switchInt(_2) -> [0: bb6, otherwise: bb8];
+      }
+  
+      bb6: {
+          return;
+      }
+  
+      bb7: {
+-         goto -> bb5;
++         goto -> bb10;
+      }
+  
+      bb8: {
++         goto -> bb6;
++     }
++ 
++     bb9: {
++         goto -> bb5;
++     }
++ 
++     bb10: {
+          goto -> bb6;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.disappearing_bb.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.disappearing_bb.JumpThreading.panic-unwind.diff
new file mode 100644
index 00000000000..f290da84e5d
--- /dev/null
+++ b/tests/mir-opt/jump_threading.disappearing_bb.JumpThreading.panic-unwind.diff
@@ -0,0 +1,59 @@
+- // MIR for `disappearing_bb` before JumpThreading
++ // MIR for `disappearing_bb` after JumpThreading
+  
+  fn disappearing_bb(_1: u8) -> u8 {
+      let mut _0: u8;
+      let mut _2: bool;
+      let mut _3: bool;
+  
+      bb0: {
+          _2 = const true;
+          _3 = const true;
+          switchInt(_1) -> [0: bb3, 1: bb3, 2: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _3 = const false;
+-         goto -> bb4;
++         goto -> bb9;
+      }
+  
+      bb2: {
+          unreachable;
+      }
+  
+      bb3: {
+          _2 = const false;
+          goto -> bb4;
+      }
+  
+      bb4: {
+          switchInt(_3) -> [0: bb5, otherwise: bb7];
+      }
+  
+      bb5: {
+          switchInt(_2) -> [0: bb6, otherwise: bb8];
+      }
+  
+      bb6: {
+          return;
+      }
+  
+      bb7: {
+-         goto -> bb5;
++         goto -> bb10;
+      }
+  
+      bb8: {
++         goto -> bb6;
++     }
++ 
++     bb9: {
++         goto -> bb5;
++     }
++ 
++     bb10: {
+          goto -> bb6;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.duplicate_chain.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.duplicate_chain.JumpThreading.panic-abort.diff
new file mode 100644
index 00000000000..adcedfb3667
--- /dev/null
+++ b/tests/mir-opt/jump_threading.duplicate_chain.JumpThreading.panic-abort.diff
@@ -0,0 +1,45 @@
+- // MIR for `duplicate_chain` before JumpThreading
++ // MIR for `duplicate_chain` after JumpThreading
+  
+  fn duplicate_chain(_1: bool) -> u8 {
+      let mut _0: u8;
+      let mut _2: u8;
+      let mut _3: i32;
+      let mut _4: i32;
+  
+      bb0: {
+          switchInt(_1) -> [1: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _2 = const 5_u8;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          _2 = const 5_u8;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          _3 = const 13_i32;
+          goto -> bb4;
+      }
+  
+      bb4: {
+          _4 = const 15_i32;
+-         switchInt(_2) -> [5: bb5, otherwise: bb6];
++         goto -> bb5;
+      }
+  
+      bb5: {
+          _0 = const 7_u8;
+          return;
+      }
+  
+      bb6: {
+          _0 = const 9_u8;
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.duplicate_chain.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.duplicate_chain.JumpThreading.panic-unwind.diff
new file mode 100644
index 00000000000..adcedfb3667
--- /dev/null
+++ b/tests/mir-opt/jump_threading.duplicate_chain.JumpThreading.panic-unwind.diff
@@ -0,0 +1,45 @@
+- // MIR for `duplicate_chain` before JumpThreading
++ // MIR for `duplicate_chain` after JumpThreading
+  
+  fn duplicate_chain(_1: bool) -> u8 {
+      let mut _0: u8;
+      let mut _2: u8;
+      let mut _3: i32;
+      let mut _4: i32;
+  
+      bb0: {
+          switchInt(_1) -> [1: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _2 = const 5_u8;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          _2 = const 5_u8;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          _3 = const 13_i32;
+          goto -> bb4;
+      }
+  
+      bb4: {
+          _4 = const 15_i32;
+-         switchInt(_2) -> [5: bb5, otherwise: bb6];
++         goto -> bb5;
+      }
+  
+      bb5: {
+          _0 = const 7_u8;
+          return;
+      }
+  
+      bb6: {
+          _0 = const 9_u8;
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff
new file mode 100644
index 00000000000..f17c9ba3f9f
--- /dev/null
+++ b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-abort.diff
@@ -0,0 +1,139 @@
+- // MIR for `identity` before JumpThreading
++ // MIR for `identity` after JumpThreading
+  
+  fn identity(_1: Result<i32, i32>) -> Result<i32, i32> {
+      debug x => _1;
+      let mut _0: std::result::Result<i32, i32>;
+      let mut _2: i32;
+      let mut _3: std::ops::ControlFlow<std::result::Result<std::convert::Infallible, i32>, i32>;
+      let mut _4: std::result::Result<i32, i32>;
+      let mut _5: isize;
+      let _6: std::result::Result<std::convert::Infallible, i32>;
+      let mut _7: !;
+      let mut _8: std::result::Result<std::convert::Infallible, i32>;
+      let _9: i32;
+      scope 1 {
+          debug residual => _6;
+          scope 2 {
+              scope 8 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) {
+                  debug residual => _8;
+                  let _14: i32;
+                  let mut _15: i32;
+                  scope 9 {
+                      debug e => _14;
+                      scope 10 (inlined <i32 as From<i32>>::from) {
+                          debug t => _14;
+                      }
+                  }
+              }
+          }
+      }
+      scope 3 {
+          debug val => _9;
+          scope 4 {
+          }
+      }
+      scope 5 (inlined <Result<i32, i32> as Try>::branch) {
+          debug self => _4;
+          let mut _10: isize;
+          let _11: i32;
+          let _12: i32;
+          let mut _13: std::result::Result<std::convert::Infallible, i32>;
+          scope 6 {
+              debug v => _11;
+          }
+          scope 7 {
+              debug e => _12;
+          }
+      }
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          StorageLive(_4);
+          _4 = _1;
+          StorageLive(_10);
+          StorageLive(_11);
+          StorageLive(_12);
+          _10 = discriminant(_4);
+          switchInt(move _10) -> [0: bb8, 1: bb6, otherwise: bb7];
+      }
+  
+      bb1: {
+          StorageDead(_12);
+          StorageDead(_11);
+          StorageDead(_10);
+          StorageDead(_4);
+          _5 = discriminant(_3);
+-         switchInt(move _5) -> [0: bb2, 1: bb4, otherwise: bb3];
++         goto -> bb2;
+      }
+  
+      bb2: {
+          StorageLive(_9);
+          _9 = ((_3 as Continue).0: i32);
+          _2 = _9;
+          StorageDead(_9);
+          _0 = Result::<i32, i32>::Ok(move _2);
+          StorageDead(_2);
+          StorageDead(_3);
+          goto -> bb5;
+      }
+  
+      bb3: {
+          unreachable;
+      }
+  
+      bb4: {
+          StorageLive(_6);
+          _6 = ((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>);
+          StorageLive(_8);
+          _8 = _6;
+          StorageLive(_14);
+          _14 = move ((_8 as Err).0: i32);
+          StorageLive(_15);
+          _15 = move _14;
+          _0 = Result::<i32, i32>::Err(move _15);
+          StorageDead(_15);
+          StorageDead(_14);
+          StorageDead(_8);
+          StorageDead(_6);
+          StorageDead(_2);
+          StorageDead(_3);
+          goto -> bb5;
+      }
+  
+      bb5: {
+          return;
+      }
+  
+      bb6: {
+          _12 = move ((_4 as Err).0: i32);
+          StorageLive(_13);
+          _13 = Result::<Infallible, i32>::Err(move _12);
+          _3 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _13);
+          StorageDead(_13);
+-         goto -> bb1;
++         goto -> bb9;
+      }
+  
+      bb7: {
+          unreachable;
+      }
+  
+      bb8: {
+          _11 = move ((_4 as Ok).0: i32);
+          _3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(move _11);
+          goto -> bb1;
++     }
++ 
++     bb9: {
++         StorageDead(_12);
++         StorageDead(_11);
++         StorageDead(_10);
++         StorageDead(_4);
++         _5 = discriminant(_3);
++         goto -> bb4;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff
new file mode 100644
index 00000000000..f17c9ba3f9f
--- /dev/null
+++ b/tests/mir-opt/jump_threading.identity.JumpThreading.panic-unwind.diff
@@ -0,0 +1,139 @@
+- // MIR for `identity` before JumpThreading
++ // MIR for `identity` after JumpThreading
+  
+  fn identity(_1: Result<i32, i32>) -> Result<i32, i32> {
+      debug x => _1;
+      let mut _0: std::result::Result<i32, i32>;
+      let mut _2: i32;
+      let mut _3: std::ops::ControlFlow<std::result::Result<std::convert::Infallible, i32>, i32>;
+      let mut _4: std::result::Result<i32, i32>;
+      let mut _5: isize;
+      let _6: std::result::Result<std::convert::Infallible, i32>;
+      let mut _7: !;
+      let mut _8: std::result::Result<std::convert::Infallible, i32>;
+      let _9: i32;
+      scope 1 {
+          debug residual => _6;
+          scope 2 {
+              scope 8 (inlined #[track_caller] <Result<i32, i32> as FromResidual<Result<Infallible, i32>>>::from_residual) {
+                  debug residual => _8;
+                  let _14: i32;
+                  let mut _15: i32;
+                  scope 9 {
+                      debug e => _14;
+                      scope 10 (inlined <i32 as From<i32>>::from) {
+                          debug t => _14;
+                      }
+                  }
+              }
+          }
+      }
+      scope 3 {
+          debug val => _9;
+          scope 4 {
+          }
+      }
+      scope 5 (inlined <Result<i32, i32> as Try>::branch) {
+          debug self => _4;
+          let mut _10: isize;
+          let _11: i32;
+          let _12: i32;
+          let mut _13: std::result::Result<std::convert::Infallible, i32>;
+          scope 6 {
+              debug v => _11;
+          }
+          scope 7 {
+              debug e => _12;
+          }
+      }
+  
+      bb0: {
+          StorageLive(_2);
+          StorageLive(_3);
+          StorageLive(_4);
+          _4 = _1;
+          StorageLive(_10);
+          StorageLive(_11);
+          StorageLive(_12);
+          _10 = discriminant(_4);
+          switchInt(move _10) -> [0: bb8, 1: bb6, otherwise: bb7];
+      }
+  
+      bb1: {
+          StorageDead(_12);
+          StorageDead(_11);
+          StorageDead(_10);
+          StorageDead(_4);
+          _5 = discriminant(_3);
+-         switchInt(move _5) -> [0: bb2, 1: bb4, otherwise: bb3];
++         goto -> bb2;
+      }
+  
+      bb2: {
+          StorageLive(_9);
+          _9 = ((_3 as Continue).0: i32);
+          _2 = _9;
+          StorageDead(_9);
+          _0 = Result::<i32, i32>::Ok(move _2);
+          StorageDead(_2);
+          StorageDead(_3);
+          goto -> bb5;
+      }
+  
+      bb3: {
+          unreachable;
+      }
+  
+      bb4: {
+          StorageLive(_6);
+          _6 = ((_3 as Break).0: std::result::Result<std::convert::Infallible, i32>);
+          StorageLive(_8);
+          _8 = _6;
+          StorageLive(_14);
+          _14 = move ((_8 as Err).0: i32);
+          StorageLive(_15);
+          _15 = move _14;
+          _0 = Result::<i32, i32>::Err(move _15);
+          StorageDead(_15);
+          StorageDead(_14);
+          StorageDead(_8);
+          StorageDead(_6);
+          StorageDead(_2);
+          StorageDead(_3);
+          goto -> bb5;
+      }
+  
+      bb5: {
+          return;
+      }
+  
+      bb6: {
+          _12 = move ((_4 as Err).0: i32);
+          StorageLive(_13);
+          _13 = Result::<Infallible, i32>::Err(move _12);
+          _3 = ControlFlow::<Result<Infallible, i32>, i32>::Break(move _13);
+          StorageDead(_13);
+-         goto -> bb1;
++         goto -> bb9;
+      }
+  
+      bb7: {
+          unreachable;
+      }
+  
+      bb8: {
+          _11 = move ((_4 as Ok).0: i32);
+          _3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(move _11);
+          goto -> bb1;
++     }
++ 
++     bb9: {
++         StorageDead(_12);
++         StorageDead(_11);
++         StorageDead(_10);
++         StorageDead(_4);
++         _5 = discriminant(_3);
++         goto -> bb4;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.multiple_match.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.multiple_match.JumpThreading.panic-abort.diff
new file mode 100644
index 00000000000..2ca03e439a0
--- /dev/null
+++ b/tests/mir-opt/jump_threading.multiple_match.JumpThreading.panic-abort.diff
@@ -0,0 +1,54 @@
+- // MIR for `multiple_match` before JumpThreading
++ // MIR for `multiple_match` after JumpThreading
+  
+  fn multiple_match(_1: u8) -> u8 {
+      let mut _0: u8;
+      let mut _2: u8;
+      let mut _3: u8;
+  
+      bb0: {
+          switchInt(_1) -> [3: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _2 = _1;
+-         switchInt(_2) -> [3: bb3, otherwise: bb4];
++         goto -> bb3;
+      }
+  
+      bb2: {
+          _3 = _1;
+-         switchInt(_3) -> [3: bb5, otherwise: bb6];
++         goto -> bb6;
+      }
+  
+      bb3: {
+          _0 = const 5_u8;
+          return;
+      }
+  
+      bb4: {
+          _0 = const 7_u8;
+          return;
+      }
+  
+      bb5: {
+          _0 = const 9_u8;
+          return;
+      }
+  
+      bb6: {
+          switchInt(_3) -> [1: bb7, otherwise: bb8];
+      }
+  
+      bb7: {
+          _0 = const 9_u8;
+          return;
+      }
+  
+      bb8: {
+          _0 = const 11_u8;
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.multiple_match.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.multiple_match.JumpThreading.panic-unwind.diff
new file mode 100644
index 00000000000..2ca03e439a0
--- /dev/null
+++ b/tests/mir-opt/jump_threading.multiple_match.JumpThreading.panic-unwind.diff
@@ -0,0 +1,54 @@
+- // MIR for `multiple_match` before JumpThreading
++ // MIR for `multiple_match` after JumpThreading
+  
+  fn multiple_match(_1: u8) -> u8 {
+      let mut _0: u8;
+      let mut _2: u8;
+      let mut _3: u8;
+  
+      bb0: {
+          switchInt(_1) -> [3: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _2 = _1;
+-         switchInt(_2) -> [3: bb3, otherwise: bb4];
++         goto -> bb3;
+      }
+  
+      bb2: {
+          _3 = _1;
+-         switchInt(_3) -> [3: bb5, otherwise: bb6];
++         goto -> bb6;
+      }
+  
+      bb3: {
+          _0 = const 5_u8;
+          return;
+      }
+  
+      bb4: {
+          _0 = const 7_u8;
+          return;
+      }
+  
+      bb5: {
+          _0 = const 9_u8;
+          return;
+      }
+  
+      bb6: {
+          switchInt(_3) -> [1: bb7, otherwise: bb8];
+      }
+  
+      bb7: {
+          _0 = const 9_u8;
+          return;
+      }
+  
+      bb8: {
+          _0 = const 11_u8;
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.mutable_ref.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.mutable_ref.JumpThreading.panic-abort.diff
new file mode 100644
index 00000000000..80a42263643
--- /dev/null
+++ b/tests/mir-opt/jump_threading.mutable_ref.JumpThreading.panic-abort.diff
@@ -0,0 +1,56 @@
+- // MIR for `mutable_ref` before JumpThreading
++ // MIR for `mutable_ref` after JumpThreading
+  
+  fn mutable_ref() -> bool {
+      let mut _0: bool;
+      let mut _1: i32;
+      let _3: ();
+      let mut _4: bool;
+      let mut _5: i32;
+      scope 1 {
+          debug x => _1;
+          let _2: *mut i32;
+          scope 2 {
+              debug a => _2;
+              scope 3 {
+              }
+          }
+      }
+  
+      bb0: {
+          StorageLive(_1);
+          _1 = const 5_i32;
+          StorageLive(_2);
+          _2 = &raw mut _1;
+          _1 = const 7_i32;
+          StorageLive(_3);
+          (*_2) = const 8_i32;
+          _3 = const ();
+          StorageDead(_3);
+          StorageLive(_4);
+          StorageLive(_5);
+          _5 = _1;
+          _4 = Eq(move _5, const 7_i32);
+          switchInt(move _4) -> [0: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+          StorageDead(_5);
+          _0 = const true;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          StorageDead(_5);
+          _0 = const false;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_4);
+          StorageDead(_2);
+          StorageDead(_1);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.mutable_ref.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.mutable_ref.JumpThreading.panic-unwind.diff
new file mode 100644
index 00000000000..80a42263643
--- /dev/null
+++ b/tests/mir-opt/jump_threading.mutable_ref.JumpThreading.panic-unwind.diff
@@ -0,0 +1,56 @@
+- // MIR for `mutable_ref` before JumpThreading
++ // MIR for `mutable_ref` after JumpThreading
+  
+  fn mutable_ref() -> bool {
+      let mut _0: bool;
+      let mut _1: i32;
+      let _3: ();
+      let mut _4: bool;
+      let mut _5: i32;
+      scope 1 {
+          debug x => _1;
+          let _2: *mut i32;
+          scope 2 {
+              debug a => _2;
+              scope 3 {
+              }
+          }
+      }
+  
+      bb0: {
+          StorageLive(_1);
+          _1 = const 5_i32;
+          StorageLive(_2);
+          _2 = &raw mut _1;
+          _1 = const 7_i32;
+          StorageLive(_3);
+          (*_2) = const 8_i32;
+          _3 = const ();
+          StorageDead(_3);
+          StorageLive(_4);
+          StorageLive(_5);
+          _5 = _1;
+          _4 = Eq(move _5, const 7_i32);
+          switchInt(move _4) -> [0: bb2, otherwise: bb1];
+      }
+  
+      bb1: {
+          StorageDead(_5);
+          _0 = const true;
+          goto -> bb3;
+      }
+  
+      bb2: {
+          StorageDead(_5);
+          _0 = const false;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          StorageDead(_4);
+          StorageDead(_2);
+          StorageDead(_1);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.mutate_discriminant.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.mutate_discriminant.JumpThreading.panic-abort.diff
new file mode 100644
index 00000000000..8821b47c345
--- /dev/null
+++ b/tests/mir-opt/jump_threading.mutate_discriminant.JumpThreading.panic-abort.diff
@@ -0,0 +1,26 @@
+- // MIR for `mutate_discriminant` before JumpThreading
++ // MIR for `mutate_discriminant` after JumpThreading
+  
+  fn mutate_discriminant() -> u8 {
+      let mut _0: u8;
+      let mut _1: std::option::Option<NonZeroUsize>;
+      let mut _2: isize;
+  
+      bb0: {
+          discriminant(_1) = 1;
+          (((_1 as variant#1).0: NonZeroUsize).0: usize) = const 0_usize;
+          _2 = discriminant(_1);
+          switchInt(_2) -> [0: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _0 = const 1_u8;
+          return;
+      }
+  
+      bb2: {
+          _0 = const 2_u8;
+          unreachable;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.mutate_discriminant.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.mutate_discriminant.JumpThreading.panic-unwind.diff
new file mode 100644
index 00000000000..8821b47c345
--- /dev/null
+++ b/tests/mir-opt/jump_threading.mutate_discriminant.JumpThreading.panic-unwind.diff
@@ -0,0 +1,26 @@
+- // MIR for `mutate_discriminant` before JumpThreading
++ // MIR for `mutate_discriminant` after JumpThreading
+  
+  fn mutate_discriminant() -> u8 {
+      let mut _0: u8;
+      let mut _1: std::option::Option<NonZeroUsize>;
+      let mut _2: isize;
+  
+      bb0: {
+          discriminant(_1) = 1;
+          (((_1 as variant#1).0: NonZeroUsize).0: usize) = const 0_usize;
+          _2 = discriminant(_1);
+          switchInt(_2) -> [0: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _0 = const 1_u8;
+          return;
+      }
+  
+      bb2: {
+          _0 = const 2_u8;
+          unreachable;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.renumbered_bb.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.renumbered_bb.JumpThreading.panic-abort.diff
new file mode 100644
index 00000000000..2d943a4bee2
--- /dev/null
+++ b/tests/mir-opt/jump_threading.renumbered_bb.JumpThreading.panic-abort.diff
@@ -0,0 +1,57 @@
+- // MIR for `renumbered_bb` before JumpThreading
++ // MIR for `renumbered_bb` after JumpThreading
+  
+  fn renumbered_bb(_1: bool) -> u8 {
+      let mut _0: u8;
+      let mut _2: bool;
+      let mut _3: bool;
+  
+      bb0: {
+          _3 = const false;
+          switchInt(_1) -> [1: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _2 = const false;
+-         goto -> bb3;
++         goto -> bb8;
+      }
+  
+      bb2: {
+          _2 = _1;
+          _3 = _1;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          switchInt(_2) -> [0: bb4, otherwise: bb5];
+      }
+  
+      bb4: {
+          switchInt(_3) -> [0: bb6, otherwise: bb7];
+      }
+  
+      bb5: {
+          _0 = const 7_u8;
+          return;
+      }
+  
+      bb6: {
+          _0 = const 9_u8;
+          return;
+      }
+  
+      bb7: {
+          _0 = const 11_u8;
+          return;
++     }
++ 
++     bb8: {
++         goto -> bb9;
++     }
++ 
++     bb9: {
++         goto -> bb6;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.renumbered_bb.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.renumbered_bb.JumpThreading.panic-unwind.diff
new file mode 100644
index 00000000000..2d943a4bee2
--- /dev/null
+++ b/tests/mir-opt/jump_threading.renumbered_bb.JumpThreading.panic-unwind.diff
@@ -0,0 +1,57 @@
+- // MIR for `renumbered_bb` before JumpThreading
++ // MIR for `renumbered_bb` after JumpThreading
+  
+  fn renumbered_bb(_1: bool) -> u8 {
+      let mut _0: u8;
+      let mut _2: bool;
+      let mut _3: bool;
+  
+      bb0: {
+          _3 = const false;
+          switchInt(_1) -> [1: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          _2 = const false;
+-         goto -> bb3;
++         goto -> bb8;
+      }
+  
+      bb2: {
+          _2 = _1;
+          _3 = _1;
+          goto -> bb3;
+      }
+  
+      bb3: {
+          switchInt(_2) -> [0: bb4, otherwise: bb5];
+      }
+  
+      bb4: {
+          switchInt(_3) -> [0: bb6, otherwise: bb7];
+      }
+  
+      bb5: {
+          _0 = const 7_u8;
+          return;
+      }
+  
+      bb6: {
+          _0 = const 9_u8;
+          return;
+      }
+  
+      bb7: {
+          _0 = const 11_u8;
+          return;
++     }
++ 
++     bb8: {
++         goto -> bb9;
++     }
++ 
++     bb9: {
++         goto -> bb6;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.rs b/tests/mir-opt/jump_threading.rs
new file mode 100644
index 00000000000..852dcd0db01
--- /dev/null
+++ b/tests/mir-opt/jump_threading.rs
@@ -0,0 +1,480 @@
+// unit-test: JumpThreading
+// compile-flags: -Zmir-enable-passes=+Inline
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
+#![feature(control_flow_enum)]
+#![feature(try_trait_v2)]
+#![feature(custom_mir, core_intrinsics, rustc_attrs)]
+
+use std::intrinsics::mir::*;
+use std::ops::ControlFlow;
+
+fn too_complex(x: Result<i32, usize>) -> Option<i32> {
+    // CHECK-LABEL: fn too_complex(
+    // CHECK: bb0: {
+    // CHECK:     switchInt(move {{_.*}}) -> [0: bb3, 1: bb1, otherwise: bb2];
+    // CHECK: bb1: {
+    // CHECK:     [[controlflow:_.*]] = ControlFlow::<usize, i32>::Break(
+    // CHECK:     goto -> bb8;
+    // CHECK: bb2: {
+    // CHECK:     unreachable;
+    // CHECK: bb3: {
+    // CHECK:     [[controlflow]] = ControlFlow::<usize, i32>::Continue(
+    // CHECK:     goto -> bb4;
+    // CHECK: bb4: {
+    // CHECK:     goto -> bb6;
+    // CHECK: bb5: {
+    // CHECK:     {{_.*}} = (([[controlflow]] as Break).0: usize);
+    // CHECK:     _0 = Option::<i32>::None;
+    // CHECK:     goto -> bb7;
+    // CHECK: bb6: {
+    // CHECK:     {{_.*}} = (([[controlflow]] as Continue).0: i32);
+    // CHECK:     _0 = Option::<i32>::Some(
+    // CHECK:     goto -> bb7;
+    // CHECK: bb7: {
+    // CHECK:     return;
+    // CHECK: bb8: {
+    // CHECK:     goto -> bb5;
+    match {
+        match x {
+            Ok(v) => ControlFlow::Continue(v),
+            Err(r) => ControlFlow::Break(r),
+        }
+    } {
+        ControlFlow::Continue(v) => Some(v),
+        ControlFlow::Break(r) => None,
+    }
+}
+
+fn identity(x: Result<i32, i32>) -> Result<i32, i32> {
+    // CHECK-LABEL: fn identity(
+    // CHECK: bb0: {
+    // CHECK:     [[x:_.*]] = _1;
+    // CHECK:     switchInt(move {{_.*}}) -> [0: bb8, 1: bb6, otherwise: bb7];
+    // CHECK: bb1: {
+    // CHECK:     goto -> bb2;
+    // CHECK: bb2: {
+    // CHECK:     {{_.*}} = (([[controlflow:_.*]] as Continue).0: i32);
+    // CHECK:     _0 = Result::<i32, i32>::Ok(
+    // CHECK:     goto -> bb5;
+    // CHECK: bb3: {
+    // CHECK:     unreachable;
+    // CHECK: bb4: {
+    // CHECK:     {{_.*}} = (([[controlflow]] as Break).0: std::result::Result<std::convert::Infallible, i32>);
+    // CHECK:     _0 = Result::<i32, i32>::Err(
+    // CHECK:     goto -> bb5;
+    // CHECK: bb5: {
+    // CHECK:     return;
+    // CHECK: bb6: {
+    // CHECK:     {{_.*}} = move (([[x]] as Err).0: i32);
+    // CHECK:     [[controlflow]] = ControlFlow::<Result<Infallible, i32>, i32>::Break(
+    // CHECK:     goto -> bb9;
+    // CHECK: bb7: {
+    // CHECK:     unreachable;
+    // CHECK: bb8: {
+    // CHECK:     {{_.*}} = move (([[x]] as Ok).0: i32);
+    // CHECK:     [[controlflow]] = ControlFlow::<Result<Infallible, i32>, i32>::Continue(
+    // CHECK:     goto -> bb1;
+    // CHECK: bb9: {
+    // CHECK:     goto -> bb4;
+    Ok(x?)
+}
+
+enum DFA {
+    A,
+    B,
+    C,
+    D,
+}
+
+/// Check that we do not thread through a loop header,
+/// to avoid creating an irreducible CFG.
+fn dfa() {
+    // CHECK-LABEL: fn dfa(
+    // CHECK: bb0: {
+    // CHECK:     {{_.*}} = DFA::A;
+    // CHECK:     goto -> bb1;
+    // CHECK: bb1: {
+    // CHECK:     switchInt({{.*}}) -> [0: bb4, 1: bb5, 2: bb6, 3: bb2, otherwise: bb3];
+    // CHECK: bb2: {
+    // CHECK:     return;
+    // CHECK: bb3: {
+    // CHECK:     unreachable;
+    // CHECK: bb4: {
+    // CHECK:     {{_.*}} = DFA::B;
+    // CHECK:     goto -> bb1;
+    // CHECK: bb5: {
+    // CHECK:     {{_.*}} = DFA::C;
+    // CHECK:     goto -> bb1;
+    // CHECK: bb6: {
+    // CHECK:     {{_.*}} = DFA::D;
+    // CHECK:     goto -> bb1;
+    let mut state = DFA::A;
+    loop {
+        match state {
+            DFA::A => state = DFA::B,
+            DFA::B => state = DFA::C,
+            DFA::C => state = DFA::D,
+            DFA::D => return,
+        }
+    }
+}
+
+#[repr(u8)]
+enum CustomDiscr {
+    A = 35,
+    B = 73,
+    C = 99,
+}
+
+/// Verify that we correctly match the discriminant value, and not its index.
+fn custom_discr(x: bool) -> u8 {
+    // CHECK-LABEL: fn custom_discr(
+    // CHECK: bb0: {
+    // CHECK:     switchInt({{.*}}) -> [0: bb2, otherwise: bb1];
+    // CHECK: bb1: {
+    // CHECK:     {{_.*}} = CustomDiscr::A;
+    // CHECK:     goto -> bb7;
+    // CHECK: bb2: {
+    // CHECK:     {{_.*}} = CustomDiscr::B;
+    // CHECK:     goto -> bb3;
+    // CHECK: bb3: {
+    // CHECK:     goto -> bb4;
+    // CHECK: bb4: {
+    // CHECK:     _0 = const 13_u8;
+    // CHECK:     goto -> bb6;
+    // CHECK: bb5: {
+    // CHECK:     _0 = const 5_u8;
+    // CHECK:     goto -> bb6;
+    // CHECK: bb6: {
+    // CHECK:     return;
+    // CHECK: bb7: {
+    // CHECK:     goto -> bb5;
+    match if x { CustomDiscr::A } else { CustomDiscr::B } {
+        CustomDiscr::A => 5,
+        _ => 13,
+    }
+}
+
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+fn multiple_match(x: u8) -> u8 {
+    // CHECK-LABEL: fn multiple_match(
+    mir!(
+        {
+            // CHECK: bb0: {
+            // CHECK:     switchInt([[x:_.*]]) -> [3: bb1, otherwise: bb2];
+            match x { 3 => bb1, _ => bb2 }
+        }
+        bb1 = {
+            // We know `x == 3`, so we can take `bb3`.
+            // CHECK: bb1: {
+            // CHECK:     {{_.*}} = [[x]];
+            // CHECK:     goto -> bb3;
+            let y = x;
+            match y { 3 => bb3, _ => bb4 }
+        }
+        bb2 = {
+            // We know `x != 3`, so we can take `bb6`.
+            // CHECK: bb2: {
+            // CHECK:     [[z:_.*]] = [[x]];
+            // CHECK:     goto -> bb6;
+            let z = x;
+            match z { 3 => bb5, _ => bb6 }
+        }
+        bb3 = {
+            // CHECK: bb3: {
+            // CHECK:     _0 = const 5_u8;
+            // CHECK:     return;
+            RET = 5;
+            Return()
+        }
+        bb4 = {
+            // CHECK: bb4: {
+            // CHECK:     _0 = const 7_u8;
+            // CHECK:     return;
+            RET = 7;
+            Return()
+        }
+        bb5 = {
+            // CHECK: bb5: {
+            // CHECK:     _0 = const 9_u8;
+            // CHECK:     return;
+            RET = 9;
+            Return()
+        }
+        bb6 = {
+            // We know `z != 3`, so we CANNOT take `bb7`.
+            // CHECK: bb6: {
+            // CHECK:     switchInt([[z]]) -> [1: bb7, otherwise: bb8];
+            match z { 1 => bb7, _ => bb8 }
+        }
+        bb7 = {
+            // CHECK: bb7: {
+            // CHECK:     _0 = const 9_u8;
+            // CHECK:     return;
+            RET = 9;
+            Return()
+        }
+        bb8 = {
+            // CHECK: bb8: {
+            // CHECK:     _0 = const 11_u8;
+            // CHECK:     return;
+            RET = 11;
+            Return()
+        }
+    )
+}
+
+/// Both 1-3-4 and 2-3-4 are threadable. As 1 and 2 are the only predecessors of 3,
+/// verify that we only thread the 3-4 part.
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+fn duplicate_chain(x: bool) -> u8 {
+    // CHECK-LABEL: fn duplicate_chain(
+    mir!(
+        let a: u8;
+        {
+            // CHECK: bb0: {
+            // CHECK:     switchInt({{.*}}) -> [1: bb1, otherwise: bb2];
+            match x { true => bb1, _ => bb2 }
+        }
+        bb1 = {
+            // CHECK: bb1: {
+            // CHECK:     [[a:_.*]] = const 5_u8;
+            // CHECK:     goto -> bb3;
+            a = 5;
+            Goto(bb3)
+        }
+        bb2 = {
+            // CHECK: bb2: {
+            // CHECK:     [[a]] = const 5_u8;
+            // CHECK:     goto -> bb3;
+            a = 5;
+            Goto(bb3)
+        }
+        bb3 = {
+            // CHECK: bb3: {
+            // CHECK:     {{_.*}} = const 13_i32;
+            // CHECK:     goto -> bb4;
+            let b = 13;
+            Goto(bb4)
+        }
+        bb4 = {
+            // CHECK: bb4: {
+            // CHECK:     {{_.*}} = const 15_i32;
+            // CHECK-NOT: switchInt(
+            // CHECK:     goto -> bb5;
+            let c = 15;
+            match a { 5 => bb5, _ => bb6 }
+        }
+        bb5 = {
+            // CHECK: bb5: {
+            // CHECK:     _0 = const 7_u8;
+            // CHECK:     return;
+            RET = 7;
+            Return()
+        }
+        bb6 = {
+            // CHECK: bb6: {
+            // CHECK:     _0 = const 9_u8;
+            // CHECK:     return;
+            RET = 9;
+            Return()
+        }
+    )
+}
+
+#[rustc_layout_scalar_valid_range_start(1)]
+#[rustc_nonnull_optimization_guaranteed]
+struct NonZeroUsize(usize);
+
+/// Verify that we correctly discard threads that may mutate a discriminant by aliasing.
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+fn mutate_discriminant() -> u8 {
+    // CHECK-LABEL: fn mutate_discriminant(
+    // CHECK-NOT: goto -> {{bb.*}};
+    // CHECK: switchInt(
+    // CHECK-NOT: goto -> {{bb.*}};
+    mir!(
+        let x: Option<NonZeroUsize>;
+        {
+            SetDiscriminant(x, 1);
+            // This assignment overwrites the niche in which the discriminant is stored.
+            place!(Field(Field(Variant(x, 1), 0), 0)) = 0_usize;
+            // So we cannot know the value of this discriminant.
+            let a = Discriminant(x);
+            match a {
+                0 => bb1,
+                _ => bad,
+            }
+        }
+        bb1 = {
+            RET = 1;
+            Return()
+        }
+        bad = {
+            RET = 2;
+            Unreachable()
+        }
+    )
+}
+
+/// Verify that we do not try to reason when there are mutable pointers involved.
+fn mutable_ref() -> bool {
+    // CHECK-LABEL: fn mutable_ref(
+    // CHECK-NOT: goto -> {{bb.*}};
+    // CHECK: switchInt(
+    // CHECK: goto -> [[bbret:bb.*]];
+    // CHECK: goto -> [[bbret]];
+    // CHECK: [[bbret]]: {
+    // CHECK-NOT: {{bb.*}}: {
+    // CHECK: return;
+    let mut x = 5;
+    let a = std::ptr::addr_of_mut!(x);
+    x = 7;
+    unsafe { *a = 8 };
+    if x == 7 {
+        true
+    } else {
+        false
+    }
+}
+
+/// This function has 2 TOs: 1-3-4 and 0-1-3-4-6.
+/// We verify that the second TO does not modify 3 once the first has been applied.
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+fn renumbered_bb(x: bool) -> u8 {
+    // CHECK-LABEL: fn renumbered_bb(
+    mir!(
+        let a: bool;
+        let b: bool;
+        {
+            // CHECK: bb0: {
+            // CHECK:     switchInt({{.*}}) -> [1: bb1, otherwise: bb2];
+            b = false;
+            match x { true => bb1, _ => bb2 }
+        }
+        bb1 = {
+            // CHECK: bb1: {
+            // CHECK:     goto -> bb8;
+            a = false;
+            Goto(bb3)
+        }
+        bb2 = {
+            // CHECK: bb2: {
+            // CHECK:     goto -> bb3;
+            a = x;
+            b = x;
+            Goto(bb3)
+        }
+        bb3 = {
+            // CHECK: bb3: {
+            // CHECK:     switchInt({{.*}}) -> [0: bb4, otherwise: bb5];
+            match a { false => bb4, _ => bb5 }
+        }
+        bb4 = {
+            // CHECK: bb4: {
+            // CHECK:     switchInt({{.*}}) -> [0: bb6, otherwise: bb7];
+            match b { false => bb6, _ => bb7 }
+        }
+        bb5 = {
+            // CHECK: bb5: {
+            // CHECK:     _0 = const 7_u8;
+            RET = 7;
+            Return()
+        }
+        bb6 = {
+            // CHECK: bb6: {
+            // CHECK:     _0 = const 9_u8;
+            RET = 9;
+            Return()
+        }
+        bb7 = {
+            // CHECK: bb7: {
+            // CHECK:     _0 = const 11_u8;
+            RET = 11;
+            Return()
+        }
+        // Duplicate of bb3.
+        // CHECK: bb8: {
+        // CHECK-NEXT: goto -> bb9;
+        // Duplicate of bb4.
+        // CHECK: bb9: {
+        // CHECK-NEXT: goto -> bb6;
+    )
+}
+
+/// This function has 3 TOs: 1-4-5, 0-1-4-7-5-8 and 3-4-7-5-6
+/// After applying the first TO, we create bb9 to replace 4, and rename 1-4 edge by 1-9. The
+/// second TO may try to thread non-existing edge 9-4.
+/// This test verifies that we preserve semantics by bailing out of this second TO.
+#[custom_mir(dialect = "runtime", phase = "post-cleanup")]
+fn disappearing_bb(x: u8) -> u8 {
+    // CHECK-LABEL: fn disappearing_bb(
+    mir!(
+        let a: bool;
+        let b: bool;
+        {
+            a = true;
+            b = true;
+            match x { 0 => bb3, 1 => bb3, 2 => bb1, _ => bb2 }
+        }
+        bb1 = {
+            // CHECK: bb1: {
+            // CHECK: goto -> bb9;
+            b = false;
+            Goto(bb4)
+        }
+        bb2 = {
+            Unreachable()
+        }
+        bb3 = {
+            // CHECK: bb3: {
+            // CHECK: goto -> bb10;
+            a = false;
+            Goto(bb4)
+        }
+        bb4 = {
+            match b { false => bb5, _ => bb7 }
+        }
+        bb5 = {
+            match a { false => bb6, _ => bb8 }
+        }
+        bb6 = {
+            Return()
+        }
+        bb7 = {
+            Goto(bb5)
+        }
+        bb8 = {
+            Goto(bb6)
+        }
+        // CHECK: bb9: {
+        // CHECK: goto -> bb5;
+        // CHECK: bb10: {
+        // CHECK: goto -> bb6;
+    )
+}
+
+fn main() {
+    too_complex(Ok(0));
+    identity(Ok(0));
+    custom_discr(false);
+    dfa();
+    multiple_match(5);
+    duplicate_chain(false);
+    mutate_discriminant();
+    mutable_ref();
+    renumbered_bb(true);
+    disappearing_bb(7);
+}
+
+// EMIT_MIR jump_threading.too_complex.JumpThreading.diff
+// EMIT_MIR jump_threading.identity.JumpThreading.diff
+// EMIT_MIR jump_threading.custom_discr.JumpThreading.diff
+// EMIT_MIR jump_threading.dfa.JumpThreading.diff
+// EMIT_MIR jump_threading.multiple_match.JumpThreading.diff
+// EMIT_MIR jump_threading.duplicate_chain.JumpThreading.diff
+// EMIT_MIR jump_threading.mutate_discriminant.JumpThreading.diff
+// EMIT_MIR jump_threading.mutable_ref.JumpThreading.diff
+// EMIT_MIR jump_threading.renumbered_bb.JumpThreading.diff
+// EMIT_MIR jump_threading.disappearing_bb.JumpThreading.diff
diff --git a/tests/mir-opt/jump_threading.too_complex.JumpThreading.panic-abort.diff b/tests/mir-opt/jump_threading.too_complex.JumpThreading.panic-abort.diff
new file mode 100644
index 00000000000..f5eade4a914
--- /dev/null
+++ b/tests/mir-opt/jump_threading.too_complex.JumpThreading.panic-abort.diff
@@ -0,0 +1,98 @@
+- // MIR for `too_complex` before JumpThreading
++ // MIR for `too_complex` after JumpThreading
+  
+  fn too_complex(_1: Result<i32, usize>) -> Option<i32> {
+      debug x => _1;
+      let mut _0: std::option::Option<i32>;
+      let mut _2: std::ops::ControlFlow<usize, i32>;
+      let mut _3: isize;
+      let _4: i32;
+      let mut _5: i32;
+      let _6: usize;
+      let mut _7: usize;
+      let mut _8: isize;
+      let _9: i32;
+      let mut _10: i32;
+      let _11: usize;
+      scope 1 {
+          debug v => _4;
+      }
+      scope 2 {
+          debug r => _6;
+      }
+      scope 3 {
+          debug v => _9;
+      }
+      scope 4 {
+          debug r => _11;
+      }
+  
+      bb0: {
+          StorageLive(_2);
+          _3 = discriminant(_1);
+          switchInt(move _3) -> [0: bb3, 1: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          StorageLive(_6);
+          _6 = ((_1 as Err).0: usize);
+          StorageLive(_7);
+          _7 = _6;
+          _2 = ControlFlow::<usize, i32>::Break(move _7);
+          StorageDead(_7);
+          StorageDead(_6);
+-         goto -> bb4;
++         goto -> bb8;
+      }
+  
+      bb2: {
+          unreachable;
+      }
+  
+      bb3: {
+          StorageLive(_4);
+          _4 = ((_1 as Ok).0: i32);
+          StorageLive(_5);
+          _5 = _4;
+          _2 = ControlFlow::<usize, i32>::Continue(move _5);
+          StorageDead(_5);
+          StorageDead(_4);
+          goto -> bb4;
+      }
+  
+      bb4: {
+          _8 = discriminant(_2);
+-         switchInt(move _8) -> [0: bb6, 1: bb5, otherwise: bb2];
++         goto -> bb6;
+      }
+  
+      bb5: {
+          StorageLive(_11);
+          _11 = ((_2 as Break).0: usize);
+          _0 = Option::<i32>::None;
+          StorageDead(_11);
+          goto -> bb7;
+      }
+  
+      bb6: {
+          StorageLive(_9);
+          _9 = ((_2 as Continue).0: i32);
+          StorageLive(_10);
+          _10 = _9;
+          _0 = Option::<i32>::Some(move _10);
+          StorageDead(_10);
+          StorageDead(_9);
+          goto -> bb7;
+      }
+  
+      bb7: {
+          StorageDead(_2);
+          return;
++     }
++ 
++     bb8: {
++         _8 = discriminant(_2);
++         goto -> bb5;
+      }
+  }
+  
diff --git a/tests/mir-opt/jump_threading.too_complex.JumpThreading.panic-unwind.diff b/tests/mir-opt/jump_threading.too_complex.JumpThreading.panic-unwind.diff
new file mode 100644
index 00000000000..f5eade4a914
--- /dev/null
+++ b/tests/mir-opt/jump_threading.too_complex.JumpThreading.panic-unwind.diff
@@ -0,0 +1,98 @@
+- // MIR for `too_complex` before JumpThreading
++ // MIR for `too_complex` after JumpThreading
+  
+  fn too_complex(_1: Result<i32, usize>) -> Option<i32> {
+      debug x => _1;
+      let mut _0: std::option::Option<i32>;
+      let mut _2: std::ops::ControlFlow<usize, i32>;
+      let mut _3: isize;
+      let _4: i32;
+      let mut _5: i32;
+      let _6: usize;
+      let mut _7: usize;
+      let mut _8: isize;
+      let _9: i32;
+      let mut _10: i32;
+      let _11: usize;
+      scope 1 {
+          debug v => _4;
+      }
+      scope 2 {
+          debug r => _6;
+      }
+      scope 3 {
+          debug v => _9;
+      }
+      scope 4 {
+          debug r => _11;
+      }
+  
+      bb0: {
+          StorageLive(_2);
+          _3 = discriminant(_1);
+          switchInt(move _3) -> [0: bb3, 1: bb1, otherwise: bb2];
+      }
+  
+      bb1: {
+          StorageLive(_6);
+          _6 = ((_1 as Err).0: usize);
+          StorageLive(_7);
+          _7 = _6;
+          _2 = ControlFlow::<usize, i32>::Break(move _7);
+          StorageDead(_7);
+          StorageDead(_6);
+-         goto -> bb4;
++         goto -> bb8;
+      }
+  
+      bb2: {
+          unreachable;
+      }
+  
+      bb3: {
+          StorageLive(_4);
+          _4 = ((_1 as Ok).0: i32);
+          StorageLive(_5);
+          _5 = _4;
+          _2 = ControlFlow::<usize, i32>::Continue(move _5);
+          StorageDead(_5);
+          StorageDead(_4);
+          goto -> bb4;
+      }
+  
+      bb4: {
+          _8 = discriminant(_2);
+-         switchInt(move _8) -> [0: bb6, 1: bb5, otherwise: bb2];
++         goto -> bb6;
+      }
+  
+      bb5: {
+          StorageLive(_11);
+          _11 = ((_2 as Break).0: usize);
+          _0 = Option::<i32>::None;
+          StorageDead(_11);
+          goto -> bb7;
+      }
+  
+      bb6: {
+          StorageLive(_9);
+          _9 = ((_2 as Continue).0: i32);
+          StorageLive(_10);
+          _10 = _9;
+          _0 = Option::<i32>::Some(move _10);
+          StorageDead(_10);
+          StorageDead(_9);
+          goto -> bb7;
+      }
+  
+      bb7: {
+          StorageDead(_2);
+          return;
++     }
++ 
++     bb8: {
++         _8 = discriminant(_2);
++         goto -> bb5;
+      }
+  }
+  
diff --git a/tests/mir-opt/loop_test.rs b/tests/mir-opt/loop_test.rs
index 7ded5b5757f..81a0d9df0a0 100644
--- a/tests/mir-opt/loop_test.rs
+++ b/tests/mir-opt/loop_test.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z identify_regions
 
 // Tests to make sure we correctly generate falseUnwind edges in loops
diff --git a/tests/mir-opt/lower_array_len.rs b/tests/mir-opt/lower_array_len.rs
index 7d69e175921..effd83b6af0 100644
--- a/tests/mir-opt/lower_array_len.rs
+++ b/tests/mir-opt/lower_array_len.rs
@@ -4,6 +4,9 @@
 
 // EMIT_MIR lower_array_len.array_bound.NormalizeArrayLen.diff
 pub fn array_bound<const N: usize>(index: usize, slice: &[u8; N]) -> u8 {
+    // CHECK-LABEL: fn array_bound(
+    // CHECK: [[len:_.*]] = const N;
+    // CHECK: Lt(move {{_.*}}, move [[len]]);
     if index < slice.len() {
         slice[index]
     } else {
@@ -13,6 +16,9 @@ pub fn array_bound<const N: usize>(index: usize, slice: &[u8; N]) -> u8 {
 
 // EMIT_MIR lower_array_len.array_bound_mut.NormalizeArrayLen.diff
 pub fn array_bound_mut<const N: usize>(index: usize, slice: &mut [u8; N]) -> u8 {
+    // CHECK-LABEL: fn array_bound_mut(
+    // CHECK: [[len:_.*]] = const N;
+    // CHECK: Lt(move {{_.*}}, move [[len]]);
     if index < slice.len() {
         slice[index]
     } else {
@@ -24,16 +30,22 @@ pub fn array_bound_mut<const N: usize>(index: usize, slice: &mut [u8; N]) -> u8
 
 // EMIT_MIR lower_array_len.array_len.NormalizeArrayLen.diff
 pub fn array_len<const N: usize>(arr: &[u8; N]) -> usize {
+    // CHECK-LABEL: fn array_len(
+    // CHECK: _0 = const N;
     arr.len()
 }
 
 // EMIT_MIR lower_array_len.array_len_by_value.NormalizeArrayLen.diff
 pub fn array_len_by_value<const N: usize>(arr: [u8; N]) -> usize {
+    // CHECK-LABEL: fn array_len_by_value(
+    // CHECK: _0 = const N;
     arr.len()
 }
 
 // EMIT_MIR lower_array_len.array_len_reborrow.NormalizeArrayLen.diff
 pub fn array_len_reborrow<const N: usize>(mut arr: [u8; N]) -> usize {
+    // CHECK-LABEL: fn array_len_reborrow(
+    // CHECK: _0 = const N;
     let arr: &mut [_] = &mut arr;
     let arr = &*arr;
     arr.len()
@@ -41,6 +53,8 @@ pub fn array_len_reborrow<const N: usize>(mut arr: [u8; N]) -> usize {
 
 // EMIT_MIR lower_array_len.array_len_raw.NormalizeArrayLen.diff
 pub fn array_len_raw<const N: usize>(arr: [u8; N]) -> usize {
+    // CHECK-LABEL: fn array_len_raw(
+    // CHECK: _0 = const N;
     let arr: &[_] = &arr;
     let arr = std::ptr::addr_of!(*arr);
     unsafe { &*arr }.len()
diff --git a/tests/mir-opt/lower_intrinsics.rs b/tests/mir-opt/lower_intrinsics.rs
index 0758e9b775b..913605cc2b2 100644
--- a/tests/mir-opt/lower_intrinsics.rs
+++ b/tests/mir-opt/lower_intrinsics.rs
@@ -6,6 +6,10 @@
 
 // EMIT_MIR lower_intrinsics.wrapping.LowerIntrinsics.diff
 pub fn wrapping(a: i32, b: i32) {
+    // CHECK-LABEL: fn wrapping(
+    // CHECK: {{_.*}} = Add(
+    // CHECK: {{_.*}} = Sub(
+    // CHECK: {{_.*}} = Mul(
     let _x = core::intrinsics::wrapping_add(a, b);
     let _y = core::intrinsics::wrapping_sub(a, b);
     let _z = core::intrinsics::wrapping_mul(a, b);
@@ -13,6 +17,14 @@ pub fn wrapping(a: i32, b: i32) {
 
 // EMIT_MIR lower_intrinsics.unchecked.LowerIntrinsics.diff
 pub unsafe fn unchecked(a: i32, b: i32) {
+    // CHECK-LABEL: fn unchecked(
+    // CHECK: {{_.*}} = AddUnchecked(
+    // CHECK: {{_.*}} = SubUnchecked(
+    // CHECK: {{_.*}} = MulUnchecked(
+    // CHECK: {{_.*}} = Div(
+    // CHECK: {{_.*}} = Rem(
+    // CHECK: {{_.*}} = ShlUnchecked(
+    // CHECK: {{_.*}} = ShrUnchecked(
     let _a = core::intrinsics::unchecked_add(a, b);
     let _b = core::intrinsics::unchecked_sub(a, b);
     let _c = core::intrinsics::unchecked_mul(a, b);
@@ -24,26 +36,39 @@ pub unsafe fn unchecked(a: i32, b: i32) {
 
 // EMIT_MIR lower_intrinsics.size_of.LowerIntrinsics.diff
 pub fn size_of<T>() -> usize {
+    // CHECK-LABEL: fn size_of(
+    // CHECK: {{_.*}} = SizeOf(T);
     core::intrinsics::size_of::<T>()
 }
 
 // EMIT_MIR lower_intrinsics.align_of.LowerIntrinsics.diff
 pub fn align_of<T>() -> usize {
+    // CHECK-LABEL: fn align_of(
+    // CHECK: {{_.*}} = AlignOf(T);
     core::intrinsics::min_align_of::<T>()
 }
 
 // EMIT_MIR lower_intrinsics.forget.LowerIntrinsics.diff
 pub fn forget<T>(t: T) {
+    // CHECK-LABEL: fn forget(
+    // CHECK-NOT: Drop(
+    // CHECK: return;
+    // CHECK-NOT: Drop(
     core::intrinsics::forget(t)
 }
 
 // EMIT_MIR lower_intrinsics.unreachable.LowerIntrinsics.diff
 pub fn unreachable() -> ! {
+    // CHECK-LABEL: fn unreachable(
+    // CHECK: unreachable;
     unsafe { core::intrinsics::unreachable() };
 }
 
 // EMIT_MIR lower_intrinsics.non_const.LowerIntrinsics.diff
 pub fn non_const<T>() -> usize {
+    // CHECK-LABEL: fn non_const(
+    // CHECK: SizeOf(T);
+
     // Check that lowering works with non-const operand as a func.
     let size_of_t = core::intrinsics::size_of::<T>;
     size_of_t()
@@ -51,33 +76,55 @@ pub fn non_const<T>() -> usize {
 
 // EMIT_MIR lower_intrinsics.transmute_inhabited.LowerIntrinsics.diff
 pub fn transmute_inhabited(c: std::cmp::Ordering) -> i8 {
+    // CHECK-LABEL: fn transmute_inhabited(
+    // CHECK: {{_.*}} = {{.*}} as i8 (Transmute);
+
     unsafe { std::mem::transmute(c) }
 }
 
 // EMIT_MIR lower_intrinsics.transmute_uninhabited.LowerIntrinsics.diff
 pub unsafe fn transmute_uninhabited(u: ()) -> Never {
+    // CHECK-LABEL: fn transmute_uninhabited(
+    // CHECK: {{_.*}} = {{.*}} as Never (Transmute);
+    // CHECK: unreachable;
+
     unsafe { std::mem::transmute::<(), Never>(u) }
 }
 
 // EMIT_MIR lower_intrinsics.transmute_ref_dst.LowerIntrinsics.diff
 pub unsafe fn transmute_ref_dst<T: ?Sized>(u: &T) -> *const T {
+    // CHECK-LABEL: fn transmute_ref_dst(
+    // CHECK: {{_.*}} = {{.*}} as *const T (Transmute);
+
     unsafe { std::mem::transmute(u) }
 }
 
 // EMIT_MIR lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.diff
 pub unsafe fn transmute_to_ref_uninhabited() -> ! {
+    // CHECK-LABEL: fn transmute_to_ref_uninhabited(
+    // CHECK: {{_.*}} = {{.*}} as &Never (Transmute);
+    // CHECK: unreachable;
+
     let x: &Never = std::mem::transmute(1usize);
     match *x {}
 }
 
 // EMIT_MIR lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.diff
 pub unsafe fn transmute_to_mut_uninhabited() -> ! {
+    // CHECK-LABEL: fn transmute_to_mut_uninhabited(
+    // CHECK: {{_.*}} = {{.*}} as &mut Never (Transmute);
+    // CHECK: unreachable;
+
     let x: &mut Never = std::mem::transmute(1usize);
     match *x {}
 }
 
 // EMIT_MIR lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.diff
 pub unsafe fn transmute_to_box_uninhabited() -> ! {
+    // CHECK-LABEL: fn transmute_to_box_uninhabited(
+    // CHECK: {{_.*}} = {{.*}} as std::boxed::Box<Never> (Transmute);
+    // CHECK: unreachable;
+
     let x: Box<Never> = std::mem::transmute(1usize);
     match *x {}
 }
@@ -90,6 +137,12 @@ pub enum E {
 
 // EMIT_MIR lower_intrinsics.discriminant.LowerIntrinsics.diff
 pub fn discriminant<T>(t: T) {
+    // CHECK-LABEL: fn discriminant(
+    // CHECK: {{_.*}} = discriminant(
+    // CHECK: {{_.*}} = discriminant(
+    // CHECK: {{_.*}} = discriminant(
+    // CHECK: {{_.*}} = discriminant(
+
     core::intrinsics::discriminant_value(&t);
     core::intrinsics::discriminant_value(&0);
     core::intrinsics::discriminant_value(&());
@@ -104,6 +157,9 @@ extern "rust-intrinsic" {
 
 // EMIT_MIR lower_intrinsics.f_copy_nonoverlapping.LowerIntrinsics.diff
 pub fn f_copy_nonoverlapping() {
+    // CHECK-LABEL: fn f_copy_nonoverlapping(
+    // CHECK: copy_nonoverlapping({{.*}});
+
     let src = ();
     let mut dst = ();
     unsafe {
@@ -113,6 +169,9 @@ pub fn f_copy_nonoverlapping() {
 
 // EMIT_MIR lower_intrinsics.assume.LowerIntrinsics.diff
 pub fn assume() {
+    // CHECK-LABEL: fn assume(
+    // CHECK: assume({{.*}});
+
     unsafe {
         std::intrinsics::assume(true);
     }
@@ -120,6 +179,11 @@ pub fn assume() {
 
 // EMIT_MIR lower_intrinsics.with_overflow.LowerIntrinsics.diff
 pub fn with_overflow(a: i32, b: i32) {
+    // CHECK-LABEL: fn with_overflow(
+    // CHECK: CheckedAdd(
+    // CHECK: CheckedSub(
+    // CHECK: CheckedMul(
+
     let _x = core::intrinsics::add_with_overflow(a, b);
     let _y = core::intrinsics::sub_with_overflow(a, b);
     let _z = core::intrinsics::mul_with_overflow(a, b);
@@ -127,16 +191,32 @@ pub fn with_overflow(a: i32, b: i32) {
 
 // EMIT_MIR lower_intrinsics.read_via_copy_primitive.LowerIntrinsics.diff
 pub fn read_via_copy_primitive(r: &i32) -> i32 {
+    // CHECK-LABEL: fn read_via_copy_primitive(
+    // CHECK: [[tmp:_.*]] = &raw const (*_1);
+    // CHECK: _0 = (*[[tmp]]);
+    // CHECK: return;
+
     unsafe { core::intrinsics::read_via_copy(r) }
 }
 
 // EMIT_MIR lower_intrinsics.read_via_copy_uninhabited.LowerIntrinsics.diff
 pub fn read_via_copy_uninhabited(r: &Never) -> Never {
+    // CHECK-LABEL: fn read_via_copy_uninhabited(
+    // CHECK: [[tmp:_.*]] = &raw const (*_1);
+    // CHECK: _0 = (*[[tmp]]);
+    // CHECK: unreachable;
+
     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) {
+    // CHECK-LABEL: fn write_via_move_string(
+    // CHECK: [[ptr:_.*]] = &raw mut (*_1);
+    // CHECK: [[tmp:_.*]] = move _2;
+    // CHECK: (*[[ptr]]) = move [[tmp]];
+    // CHECK: return;
+
     unsafe { core::intrinsics::write_via_move(r, v) }
 }
 
@@ -144,6 +224,10 @@ pub enum Never {}
 
 // EMIT_MIR lower_intrinsics.option_payload.LowerIntrinsics.diff
 pub fn option_payload(o: &Option<usize>, p: &Option<String>) {
+    // CHECK-LABEL: fn option_payload(
+    // CHECK: {{_.*}} = &raw const (((*{{_.*}}) as Some).0: usize);
+    // CHECK: {{_.*}} = &raw const (((*{{_.*}}) as Some).0: std::string::String);
+
     unsafe {
         let _x = core::intrinsics::option_payload_ptr(o);
         let _y = core::intrinsics::option_payload_ptr(p);
@@ -152,5 +236,8 @@ pub fn option_payload(o: &Option<usize>, p: &Option<String>) {
 
 // EMIT_MIR lower_intrinsics.ptr_offset.LowerIntrinsics.diff
 pub unsafe fn ptr_offset(p: *const i32, d: isize) -> *const i32 {
+    // CHECK-LABEL: fn ptr_offset(
+    // CHECK: _0 = Offset(
+
     core::intrinsics::offset(p, d)
 }
diff --git a/tests/mir-opt/lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.panic-abort.diff b/tests/mir-opt/lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.panic-abort.diff
index 49cc8b1afe3..c4a3358ffa3 100644
--- a/tests/mir-opt/lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.panic-abort.diff
+++ b/tests/mir-opt/lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.panic-abort.diff
@@ -4,6 +4,7 @@
   fn transmute_to_box_uninhabited() -> ! {
       let mut _0: !;
       let _1: std::boxed::Box<Never>;
+      let mut _2: *const Never;
       scope 1 {
           debug x => _1;
       }
@@ -16,6 +17,8 @@
       }
   
       bb1: {
+          _2 = (((_1.0: std::ptr::Unique<Never>).0: std::ptr::NonNull<Never>).0: *const Never);
+          PlaceMention((*_2));
           unreachable;
       }
   }
diff --git a/tests/mir-opt/lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.panic-unwind.diff b/tests/mir-opt/lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.panic-unwind.diff
index 49cc8b1afe3..c4a3358ffa3 100644
--- a/tests/mir-opt/lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.panic-unwind.diff
+++ b/tests/mir-opt/lower_intrinsics.transmute_to_box_uninhabited.LowerIntrinsics.panic-unwind.diff
@@ -4,6 +4,7 @@
   fn transmute_to_box_uninhabited() -> ! {
       let mut _0: !;
       let _1: std::boxed::Box<Never>;
+      let mut _2: *const Never;
       scope 1 {
           debug x => _1;
       }
@@ -16,6 +17,8 @@
       }
   
       bb1: {
+          _2 = (((_1.0: std::ptr::Unique<Never>).0: std::ptr::NonNull<Never>).0: *const Never);
+          PlaceMention((*_2));
           unreachable;
       }
   }
diff --git a/tests/mir-opt/lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.panic-abort.diff b/tests/mir-opt/lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.panic-abort.diff
index 94c7ebe1520..c2c4ec0003c 100644
--- a/tests/mir-opt/lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.panic-abort.diff
+++ b/tests/mir-opt/lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.panic-abort.diff
@@ -16,6 +16,7 @@
       }
   
       bb1: {
+          PlaceMention((*_1));
           unreachable;
       }
   }
diff --git a/tests/mir-opt/lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.panic-unwind.diff b/tests/mir-opt/lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.panic-unwind.diff
index 94c7ebe1520..c2c4ec0003c 100644
--- a/tests/mir-opt/lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.panic-unwind.diff
+++ b/tests/mir-opt/lower_intrinsics.transmute_to_mut_uninhabited.LowerIntrinsics.panic-unwind.diff
@@ -16,6 +16,7 @@
       }
   
       bb1: {
+          PlaceMention((*_1));
           unreachable;
       }
   }
diff --git a/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.panic-abort.diff b/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.panic-abort.diff
index 6576616e0ca..1b516a1f53b 100644
--- a/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.panic-abort.diff
+++ b/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.panic-abort.diff
@@ -16,6 +16,7 @@
       }
   
       bb1: {
+          PlaceMention((*_1));
           unreachable;
       }
   }
diff --git a/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.panic-unwind.diff b/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.panic-unwind.diff
index 6576616e0ca..1b516a1f53b 100644
--- a/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.panic-unwind.diff
+++ b/tests/mir-opt/lower_intrinsics.transmute_to_ref_uninhabited.LowerIntrinsics.panic-unwind.diff
@@ -16,6 +16,7 @@
       }
   
       bb1: {
+          PlaceMention((*_1));
           unreachable;
       }
   }
diff --git a/tests/mir-opt/lower_slice_len.rs b/tests/mir-opt/lower_slice_len.rs
index b0c512aec89..7b967a16588 100644
--- a/tests/mir-opt/lower_slice_len.rs
+++ b/tests/mir-opt/lower_slice_len.rs
@@ -1,8 +1,10 @@
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: LowerSliceLenCalls
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // EMIT_MIR lower_slice_len.bound.LowerSliceLenCalls.diff
 pub fn bound(index: usize, slice: &[u8]) -> u8 {
+    // CHECK-LABEL: fn bound(
+    // CHECK-NOT: ::len(
     if index < slice.len() {
         slice[index]
     } else {
diff --git a/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff b/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff
index 3e817ff433b..2989582d038 100644
--- a/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff
+++ b/tests/mir-opt/match_arm_scopes.complicated_match.panic-abort.SimplifyCfg-initial.after-ElaborateDrops.after.diff
@@ -31,7 +31,7 @@
       }
   
       bb0: {
--         FakeRead(ForMatchedPlace(None), _2);
+          PlaceMention(_2);
 -         switchInt((_2.0: bool)) -> [0: bb1, otherwise: bb2];
 +         switchInt((_2.0: bool)) -> [0: bb5, otherwise: bb1];
       }
diff --git a/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff b/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff
index 3e817ff433b..2989582d038 100644
--- a/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff
+++ b/tests/mir-opt/match_arm_scopes.complicated_match.panic-unwind.SimplifyCfg-initial.after-ElaborateDrops.after.diff
@@ -31,7 +31,7 @@
       }
   
       bb0: {
--         FakeRead(ForMatchedPlace(None), _2);
+          PlaceMention(_2);
 -         switchInt((_2.0: bool)) -> [0: bb1, otherwise: bb2];
 +         switchInt((_2.0: bool)) -> [0: bb5, otherwise: bb1];
       }
diff --git a/tests/mir-opt/match_arm_scopes.rs b/tests/mir-opt/match_arm_scopes.rs
index e0249de8601..43746e99398 100644
--- a/tests/mir-opt/match_arm_scopes.rs
+++ b/tests/mir-opt/match_arm_scopes.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // Test that StorageDead and Drops are generated properly for bindings in
 // matches:
diff --git a/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir b/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
index 7f8eb82c772..90ec3ab49ad 100644
--- a/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
+++ b/tests/mir-opt/match_test.main.SimplifyCfg-initial.after.mir
@@ -26,7 +26,7 @@ fn main() -> () {
         _2 = const true;
         FakeRead(ForLet(None), _2);
         StorageLive(_3);
-        FakeRead(ForMatchedPlace(None), _1);
+        PlaceMention(_1);
         _6 = Le(const 0_i32, _1);
         switchInt(move _6) -> [0: bb4, otherwise: bb1];
     }
diff --git a/tests/mir-opt/match_test.rs b/tests/mir-opt/match_test.rs
index 3a21077905b..e465289e427 100644
--- a/tests/mir-opt/match_test.rs
+++ b/tests/mir-opt/match_test.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Make sure redundant testing paths in `match` expressions are sorted out.
 
 #![feature(exclusive_range_pattern)]
diff --git a/tests/mir-opt/matches_reduce_branches.rs b/tests/mir-opt/matches_reduce_branches.rs
index a81d5f7b4e8..13db7973414 100644
--- a/tests/mir-opt/matches_reduce_branches.rs
+++ b/tests/mir-opt/matches_reduce_branches.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: MatchBranchSimplification
 
 
diff --git a/tests/mir-opt/matches_u8.rs b/tests/mir-opt/matches_u8.rs
index 422c3a95e8e..47c4ffee024 100644
--- a/tests/mir-opt/matches_u8.rs
+++ b/tests/mir-opt/matches_u8.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: MatchBranchSimplification
 
 
diff --git a/tests/mir-opt/multiple_return_terminators.rs b/tests/mir-opt/multiple_return_terminators.rs
index a2b902d1483..f33243ecf73 100644
--- a/tests/mir-opt/multiple_return_terminators.rs
+++ b/tests/mir-opt/multiple_return_terminators.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=4
 // EMIT_MIR multiple_return_terminators.test.MultipleReturnTerminators.diff
 
diff --git a/tests/mir-opt/nll/named_lifetimes_basic.rs b/tests/mir-opt/nll/named_lifetimes_basic.rs
index 843716033ca..5a9312de284 100644
--- a/tests/mir-opt/nll/named_lifetimes_basic.rs
+++ b/tests/mir-opt/nll/named_lifetimes_basic.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Basic test for named lifetime translation. Check that we
 // instantiate the types that appear in function arguments with
 // suitable variables and that we setup the outlives relationship
diff --git a/tests/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir b/tests/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir
index 1d6b8307390..49f0a43295a 100644
--- a/tests/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir
+++ b/tests/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir
@@ -24,14 +24,14 @@
 | '?2 live at {bb0[0..=1]}
 | '?3 live at {bb0[0..=1]}
 | '?4 live at {bb0[0..=1]}
-| '?1: '?5 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:26: 12:27) ($DIR/named_lifetimes_basic.rs:12:26: 12:27 (#0)
-| '?1: '?7 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:54: 12:55) ($DIR/named_lifetimes_basic.rs:12:54: 12:55 (#0)
-| '?2: '?6 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:42: 12:43) ($DIR/named_lifetimes_basic.rs:12:42: 12:43 (#0)
-| '?3: '?8 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:66: 12:67) ($DIR/named_lifetimes_basic.rs:12:66: 12:67 (#0)
-| '?5: '?1 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:26: 12:27) ($DIR/named_lifetimes_basic.rs:12:26: 12:27 (#0)
-| '?6: '?2 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:42: 12:43) ($DIR/named_lifetimes_basic.rs:12:42: 12:43 (#0)
-| '?7: '?1 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:54: 12:55) ($DIR/named_lifetimes_basic.rs:12:54: 12:55 (#0)
-| '?8: '?3 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:66: 12:67) ($DIR/named_lifetimes_basic.rs:12:66: 12:67 (#0)
+| '?1: '?5 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:26: 13:27) ($DIR/named_lifetimes_basic.rs:13:26: 13:27 (#0)
+| '?1: '?7 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:54: 13:55) ($DIR/named_lifetimes_basic.rs:13:54: 13:55 (#0)
+| '?2: '?6 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:42: 13:43) ($DIR/named_lifetimes_basic.rs:13:42: 13:43 (#0)
+| '?3: '?8 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:66: 13:67) ($DIR/named_lifetimes_basic.rs:13:66: 13:67 (#0)
+| '?5: '?1 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:26: 13:27) ($DIR/named_lifetimes_basic.rs:13:26: 13:27 (#0)
+| '?6: '?2 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:42: 13:43) ($DIR/named_lifetimes_basic.rs:13:42: 13:43 (#0)
+| '?7: '?1 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:54: 13:55) ($DIR/named_lifetimes_basic.rs:13:54: 13:55 (#0)
+| '?8: '?3 due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:13:66: 13:67) ($DIR/named_lifetimes_basic.rs:13:66: 13:67 (#0)
 |
 fn use_x(_1: &'?5 mut i32, _2: &'?6 u32, _3: &'?7 u32, _4: &'?8 u32) -> bool {
     debug w => _1;
diff --git a/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir b/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
index c581d0f8471..ad456600b0a 100644
--- a/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
+++ b/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
@@ -17,8 +17,8 @@
 | '?2 live at {bb1[0]}
 | '?3 live at {bb1[1..=3]}
 | '?4 live at {bb1[4..=7], bb2[0..=2]}
-| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:18:13: 18:18 (#0)
-| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:19:13: 19:14 (#0)
+| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:19:13: 19:18 (#0)
+| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:20:13: 20:14 (#0)
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir b/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir
index 48243e34d08..a15d47cd66f 100644
--- a/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir
+++ b/tests/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir
@@ -17,8 +17,8 @@
 | '?2 live at {bb1[0]}
 | '?3 live at {bb1[1..=3]}
 | '?4 live at {bb1[4..=7], bb2[0..=2]}
-| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:18:13: 18:18 (#0)
-| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:19:13: 19:14 (#0)
+| '?2: '?3 due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:19:13: 19:18 (#0)
+| '?3: '?4 due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:20:13: 20:14 (#0)
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/nll/region_subtyping_basic.rs b/tests/mir-opt/nll/region_subtyping_basic.rs
index 64332f302e8..83f756acdc3 100644
--- a/tests/mir-opt/nll/region_subtyping_basic.rs
+++ b/tests/mir-opt/nll/region_subtyping_basic.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Basic test for liveness constraints: the region (`R1`) that appears
 // in the type of `p` includes the points after `&v[0]` up to (but not
 // including) the call to `use_x`. The `else` branch is not included.
diff --git a/tests/mir-opt/no_drop_for_inactive_variant.rs b/tests/mir-opt/no_drop_for_inactive_variant.rs
index adbd1f353fc..dd20e4a548e 100644
--- a/tests/mir-opt/no_drop_for_inactive_variant.rs
+++ b/tests/mir-opt/no_drop_for_inactive_variant.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // Ensure that there are no drop terminators in `unwrap<T>` (except the one along the cleanup
diff --git a/tests/mir-opt/no_spurious_drop_after_call.rs b/tests/mir-opt/no_spurious_drop_after_call.rs
index 71f050502cb..cd7b8fb7942 100644
--- a/tests/mir-opt/no_spurious_drop_after_call.rs
+++ b/tests/mir-opt/no_spurious_drop_after_call.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 // Test that after the call to `std::mem::drop` we do not generate a
diff --git a/tests/mir-opt/not_equal_false.rs b/tests/mir-opt/not_equal_false.rs
deleted file mode 100644
index e0560732900..00000000000
--- a/tests/mir-opt/not_equal_false.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// unit-test: InstSimplify
-// EMIT_MIR not_equal_false.opt.InstSimplify.diff
-
-fn opt(x: bool) -> u32 {
-    if x != false { 0 } else { 1 }
-}
-
-fn main() {
-    opt(false);
-}
diff --git a/tests/mir-opt/nrvo_miscompile_111005.rs b/tests/mir-opt/nrvo_miscompile_111005.rs
index a9f391b79d5..aff037ae4f2 100644
--- a/tests/mir-opt/nrvo_miscompile_111005.rs
+++ b/tests/mir-opt/nrvo_miscompile_111005.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // This is a miscompilation, #111005 to track
 
 // unit-test: RenameReturnPlace
diff --git a/tests/mir-opt/nrvo_simple.rs b/tests/mir-opt/nrvo_simple.rs
index 9e822ed51d4..5b403c560a7 100644
--- a/tests/mir-opt/nrvo_simple.rs
+++ b/tests/mir-opt/nrvo_simple.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: RenameReturnPlace
 
diff --git a/tests/mir-opt/packed_struct_drop_aligned.rs b/tests/mir-opt/packed_struct_drop_aligned.rs
index f88a683535c..079c4e68f50 100644
--- a/tests/mir-opt/packed_struct_drop_aligned.rs
+++ b/tests/mir-opt/packed_struct_drop_aligned.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 
 
diff --git a/tests/mir-opt/pre-codegen/chained_comparison.rs b/tests/mir-opt/pre-codegen/chained_comparison.rs
index 43030041983..d1d400af22f 100644
--- a/tests/mir-opt/pre-codegen/chained_comparison.rs
+++ b/tests/mir-opt/pre-codegen/chained_comparison.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
 
 #![crate_type = "lib"]
diff --git a/tests/mir-opt/pre-codegen/checked_ops.rs b/tests/mir-opt/pre-codegen/checked_ops.rs
index 23d78e98777..d386219f4a6 100644
--- a/tests/mir-opt/pre-codegen/checked_ops.rs
+++ b/tests/mir-opt/pre-codegen/checked_ops.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
 // needs-unwind
 // only-x86_64
diff --git a/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs b/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs
index d8af6b14dad..b1a00d29372 100644
--- a/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs
+++ b/tests/mir-opt/pre-codegen/duplicate_switch_targets.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=0
 // ignore-debug: standard library debug assertions add a panic that breaks this optimization
 
diff --git a/tests/mir-opt/pre-codegen/duplicate_switch_targets.ub_if_b.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/duplicate_switch_targets.ub_if_b.PreCodegen.after.mir
index 65d71199aae..0114309dbb5 100644
--- a/tests/mir-opt/pre-codegen/duplicate_switch_targets.ub_if_b.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/duplicate_switch_targets.ub_if_b.PreCodegen.after.mir
@@ -4,6 +4,7 @@ fn ub_if_b(_1: Thing) -> Thing {
     debug t => _1;
     let mut _0: Thing;
     let mut _2: isize;
+    let mut _3: bool;
     scope 1 (inlined unreachable_unchecked) {
         scope 2 {
             scope 3 (inlined unreachable_unchecked::runtime) {
@@ -13,15 +14,9 @@ fn ub_if_b(_1: Thing) -> Thing {
 
     bb0: {
         _2 = discriminant(_1);
-        switchInt(move _2) -> [0: bb1, otherwise: bb2];
-    }
-
-    bb1: {
+        _3 = Eq(_2, const 0_isize);
+        assume(move _3);
         _0 = move _1;
         return;
     }
-
-    bb2: {
-        unreachable;
-    }
 }
diff --git a/tests/mir-opt/pre-codegen/intrinsics.rs b/tests/mir-opt/pre-codegen/intrinsics.rs
index e32e04384c4..565bd89e571 100644
--- a/tests/mir-opt/pre-codegen/intrinsics.rs
+++ b/tests/mir-opt/pre-codegen/intrinsics.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff
new file mode 100644
index 00000000000..50189d192ce
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-abort.diff
@@ -0,0 +1,123 @@
+- // MIR for `main` before GVN
++ // MIR for `main` after GVN
+  
+  fn main() -> () {
+      let mut _0: ();
+      let _1: std::alloc::Layout;
+      let mut _2: std::option::Option<std::alloc::Layout>;
+      let mut _3: *mut u8;
+      let mut _4: *mut [u8];
+      let mut _5: std::ptr::NonNull<[u8]>;
+      let mut _6: std::result::Result<std::ptr::NonNull<[u8]>, std::alloc::AllocError>;
+      let mut _7: &std::alloc::Global;
+      let mut _8: std::alloc::Layout;
+      scope 1 {
+          debug layout => _1;
+          let mut _9: &std::alloc::Global;
+          scope 2 {
+              debug ptr => _3;
+          }
+          scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
+              debug self => _9;
+              debug layout => _1;
+          }
+          scope 6 (inlined #[track_caller] Result::<NonNull<[u8]>, std::alloc::AllocError>::unwrap) {
+              debug self => _6;
+              let mut _12: isize;
+              let _13: std::alloc::AllocError;
+              let mut _14: !;
+              let _15: &str;
+              let mut _16: &dyn std::fmt::Debug;
+              let mut _17: &std::alloc::AllocError;
+              scope 7 {
+                  debug t => _5;
+              }
+              scope 8 {
+                  debug e => const std::alloc::AllocError;
+              }
+          }
+          scope 9 (inlined NonNull::<[u8]>::as_ptr) {
+              debug self => _5;
+              let mut _18: *const [u8];
+          }
+      }
+      scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
+          debug self => _2;
+          let mut _10: isize;
+          let mut _11: !;
+          scope 4 {
+              debug val => _1;
+          }
+      }
+  
+      bb0: {
+          StorageLive(_2);
+-         _2 = Option::<Layout>::None;
++         _2 = const Option::<Layout>::None;
+          StorageLive(_10);
+          _10 = const 0_isize;
+          switchInt(const 0_isize) -> [0: bb1, 1: bb3, otherwise: bb2];
+      }
+  
+      bb1: {
+          _11 = core::panicking::panic(const "called `Option::unwrap()` on a `None` value") -> unwind unreachable;
+      }
+  
+      bb2: {
+          unreachable;
+      }
+  
+      bb3: {
+-         _1 = move ((_2 as Some).0: std::alloc::Layout);
++         _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }};
+          StorageDead(_10);
+          StorageDead(_2);
+          StorageLive(_3);
+          StorageLive(_4);
+          StorageLive(_5);
+          StorageLive(_6);
+          _9 = const _;
+-         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb4, unwind unreachable];
++         _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb4, unwind unreachable];
+      }
+  
+      bb4: {
+          StorageLive(_12);
+          StorageLive(_15);
+          _12 = discriminant(_6);
+          switchInt(move _12) -> [0: bb6, 1: bb5, otherwise: bb2];
+      }
+  
+      bb5: {
+          _15 = const "called `Result::unwrap()` on an `Err` value";
+          StorageLive(_16);
+          StorageLive(_17);
+          _17 = &_13;
+          _16 = move _17 as &dyn std::fmt::Debug (PointerCoercion(Unsize));
+          StorageDead(_17);
+          _14 = result::unwrap_failed(move _15, move _16) -> unwind unreachable;
+      }
+  
+      bb6: {
+          _5 = move ((_6 as Ok).0: std::ptr::NonNull<[u8]>);
+          StorageDead(_15);
+          StorageDead(_12);
+          StorageDead(_6);
+          StorageLive(_18);
+          _18 = (_5.0: *const [u8]);
+          _4 = move _18 as *mut [u8] (PtrToPtr);
+          StorageDead(_18);
+          StorageDead(_5);
+          _3 = move _4 as *mut u8 (PtrToPtr);
+          StorageDead(_4);
+          StorageDead(_3);
+          return;
+      }
+  }
++ 
++ ALLOC0 (size: 8, align: 4) {
++     00 00 00 00 __ __ __ __                         │ ....░░░░
++ }
++ 
++ ALLOC1 (size: 0, align: 1) {}
+  
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff
new file mode 100644
index 00000000000..6966762a1b8
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.32bit.panic-unwind.diff
@@ -0,0 +1,92 @@
+- // MIR for `main` before GVN
++ // MIR for `main` after GVN
+  
+  fn main() -> () {
+      let mut _0: ();
+      let _1: std::alloc::Layout;
+      let mut _2: std::option::Option<std::alloc::Layout>;
+      let mut _3: *mut u8;
+      let mut _4: *mut [u8];
+      let mut _5: std::ptr::NonNull<[u8]>;
+      let mut _6: std::result::Result<std::ptr::NonNull<[u8]>, std::alloc::AllocError>;
+      let mut _7: &std::alloc::Global;
+      let mut _8: std::alloc::Layout;
+      scope 1 {
+          debug layout => _1;
+          let mut _9: &std::alloc::Global;
+          scope 2 {
+              debug ptr => _3;
+          }
+          scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
+              debug self => _9;
+              debug layout => _1;
+          }
+          scope 6 (inlined NonNull::<[u8]>::as_ptr) {
+              debug self => _5;
+              let mut _12: *const [u8];
+          }
+      }
+      scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
+          debug self => _2;
+          let mut _10: isize;
+          let mut _11: !;
+          scope 4 {
+              debug val => _1;
+          }
+      }
+  
+      bb0: {
+          StorageLive(_2);
+-         _2 = Option::<Layout>::None;
++         _2 = const Option::<Layout>::None;
+          StorageLive(_10);
+          _10 = const 0_isize;
+          switchInt(const 0_isize) -> [0: bb2, 1: bb4, otherwise: bb3];
+      }
+  
+      bb1: {
+          StorageDead(_6);
+          StorageLive(_12);
+          _12 = (_5.0: *const [u8]);
+          _4 = move _12 as *mut [u8] (PtrToPtr);
+          StorageDead(_12);
+          StorageDead(_5);
+          _3 = move _4 as *mut u8 (PtrToPtr);
+          StorageDead(_4);
+          StorageDead(_3);
+          return;
+      }
+  
+      bb2: {
+          _11 = core::panicking::panic(const "called `Option::unwrap()` on a `None` value") -> unwind continue;
+      }
+  
+      bb3: {
+          unreachable;
+      }
+  
+      bb4: {
+-         _1 = move ((_2 as Some).0: std::alloc::Layout);
++         _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }};
+          StorageDead(_10);
+          StorageDead(_2);
+          StorageLive(_3);
+          StorageLive(_4);
+          StorageLive(_5);
+          StorageLive(_6);
+          _9 = const _;
+-         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb5, unwind continue];
++         _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(4 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x00000000): ptr::alignment::AlignmentEnum32) }}, const false) -> [return: bb5, unwind continue];
+      }
+  
+      bb5: {
+          _5 = Result::<NonNull<[u8]>, std::alloc::AllocError>::unwrap(move _6) -> [return: bb1, unwind continue];
+      }
+  }
++ 
++ ALLOC0 (size: 8, align: 4) {
++     00 00 00 00 __ __ __ __                         │ ....░░░░
++ }
++ 
++ ALLOC1 (size: 0, align: 1) {}
+  
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff
new file mode 100644
index 00000000000..08a185bad9c
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-abort.diff
@@ -0,0 +1,123 @@
+- // MIR for `main` before GVN
++ // MIR for `main` after GVN
+  
+  fn main() -> () {
+      let mut _0: ();
+      let _1: std::alloc::Layout;
+      let mut _2: std::option::Option<std::alloc::Layout>;
+      let mut _3: *mut u8;
+      let mut _4: *mut [u8];
+      let mut _5: std::ptr::NonNull<[u8]>;
+      let mut _6: std::result::Result<std::ptr::NonNull<[u8]>, std::alloc::AllocError>;
+      let mut _7: &std::alloc::Global;
+      let mut _8: std::alloc::Layout;
+      scope 1 {
+          debug layout => _1;
+          let mut _9: &std::alloc::Global;
+          scope 2 {
+              debug ptr => _3;
+          }
+          scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
+              debug self => _9;
+              debug layout => _1;
+          }
+          scope 6 (inlined #[track_caller] Result::<NonNull<[u8]>, std::alloc::AllocError>::unwrap) {
+              debug self => _6;
+              let mut _12: isize;
+              let _13: std::alloc::AllocError;
+              let mut _14: !;
+              let _15: &str;
+              let mut _16: &dyn std::fmt::Debug;
+              let mut _17: &std::alloc::AllocError;
+              scope 7 {
+                  debug t => _5;
+              }
+              scope 8 {
+                  debug e => const std::alloc::AllocError;
+              }
+          }
+          scope 9 (inlined NonNull::<[u8]>::as_ptr) {
+              debug self => _5;
+              let mut _18: *const [u8];
+          }
+      }
+      scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
+          debug self => _2;
+          let mut _10: isize;
+          let mut _11: !;
+          scope 4 {
+              debug val => _1;
+          }
+      }
+  
+      bb0: {
+          StorageLive(_2);
+-         _2 = Option::<Layout>::None;
++         _2 = const Option::<Layout>::None;
+          StorageLive(_10);
+          _10 = const 0_isize;
+          switchInt(const 0_isize) -> [0: bb1, 1: bb3, otherwise: bb2];
+      }
+  
+      bb1: {
+          _11 = core::panicking::panic(const "called `Option::unwrap()` on a `None` value") -> unwind unreachable;
+      }
+  
+      bb2: {
+          unreachable;
+      }
+  
+      bb3: {
+-         _1 = move ((_2 as Some).0: std::alloc::Layout);
++         _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }};
+          StorageDead(_10);
+          StorageDead(_2);
+          StorageLive(_3);
+          StorageLive(_4);
+          StorageLive(_5);
+          StorageLive(_6);
+          _9 = const _;
+-         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb4, unwind unreachable];
++         _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb4, unwind unreachable];
+      }
+  
+      bb4: {
+          StorageLive(_12);
+          StorageLive(_15);
+          _12 = discriminant(_6);
+          switchInt(move _12) -> [0: bb6, 1: bb5, otherwise: bb2];
+      }
+  
+      bb5: {
+          _15 = const "called `Result::unwrap()` on an `Err` value";
+          StorageLive(_16);
+          StorageLive(_17);
+          _17 = &_13;
+          _16 = move _17 as &dyn std::fmt::Debug (PointerCoercion(Unsize));
+          StorageDead(_17);
+          _14 = result::unwrap_failed(move _15, move _16) -> unwind unreachable;
+      }
+  
+      bb6: {
+          _5 = move ((_6 as Ok).0: std::ptr::NonNull<[u8]>);
+          StorageDead(_15);
+          StorageDead(_12);
+          StorageDead(_6);
+          StorageLive(_18);
+          _18 = (_5.0: *const [u8]);
+          _4 = move _18 as *mut [u8] (PtrToPtr);
+          StorageDead(_18);
+          StorageDead(_5);
+          _3 = move _4 as *mut u8 (PtrToPtr);
+          StorageDead(_4);
+          StorageDead(_3);
+          return;
+      }
+  }
++ 
++ ALLOC0 (size: 16, align: 8) {
++     00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ __ │ ........░░░░░░░░
++ }
++ 
++ ALLOC1 (size: 0, align: 1) {}
+  
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff
new file mode 100644
index 00000000000..6501cb85e8a
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.main.GVN.64bit.panic-unwind.diff
@@ -0,0 +1,92 @@
+- // MIR for `main` before GVN
++ // MIR for `main` after GVN
+  
+  fn main() -> () {
+      let mut _0: ();
+      let _1: std::alloc::Layout;
+      let mut _2: std::option::Option<std::alloc::Layout>;
+      let mut _3: *mut u8;
+      let mut _4: *mut [u8];
+      let mut _5: std::ptr::NonNull<[u8]>;
+      let mut _6: std::result::Result<std::ptr::NonNull<[u8]>, std::alloc::AllocError>;
+      let mut _7: &std::alloc::Global;
+      let mut _8: std::alloc::Layout;
+      scope 1 {
+          debug layout => _1;
+          let mut _9: &std::alloc::Global;
+          scope 2 {
+              debug ptr => _3;
+          }
+          scope 5 (inlined <std::alloc::Global as Allocator>::allocate) {
+              debug self => _9;
+              debug layout => _1;
+          }
+          scope 6 (inlined NonNull::<[u8]>::as_ptr) {
+              debug self => _5;
+              let mut _12: *const [u8];
+          }
+      }
+      scope 3 (inlined #[track_caller] Option::<Layout>::unwrap) {
+          debug self => _2;
+          let mut _10: isize;
+          let mut _11: !;
+          scope 4 {
+              debug val => _1;
+          }
+      }
+  
+      bb0: {
+          StorageLive(_2);
+-         _2 = Option::<Layout>::None;
++         _2 = const Option::<Layout>::None;
+          StorageLive(_10);
+          _10 = const 0_isize;
+          switchInt(const 0_isize) -> [0: bb2, 1: bb4, otherwise: bb3];
+      }
+  
+      bb1: {
+          StorageDead(_6);
+          StorageLive(_12);
+          _12 = (_5.0: *const [u8]);
+          _4 = move _12 as *mut [u8] (PtrToPtr);
+          StorageDead(_12);
+          StorageDead(_5);
+          _3 = move _4 as *mut u8 (PtrToPtr);
+          StorageDead(_4);
+          StorageDead(_3);
+          return;
+      }
+  
+      bb2: {
+          _11 = core::panicking::panic(const "called `Option::unwrap()` on a `None` value") -> unwind continue;
+      }
+  
+      bb3: {
+          unreachable;
+      }
+  
+      bb4: {
+-         _1 = move ((_2 as Some).0: std::alloc::Layout);
++         _1 = const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }};
+          StorageDead(_10);
+          StorageDead(_2);
+          StorageLive(_3);
+          StorageLive(_4);
+          StorageLive(_5);
+          StorageLive(_6);
+          _9 = const _;
+-         _6 = std::alloc::Global::alloc_impl(_9, _1, const false) -> [return: bb5, unwind continue];
++         _6 = std::alloc::Global::alloc_impl(const {ALLOC1: &std::alloc::Global}, const Layout {{ size: Indirect { alloc_id: ALLOC0, offset: Size(8 bytes) }: usize, align: std::ptr::Alignment(Scalar(0x0000000000000000): ptr::alignment::AlignmentEnum64) }}, const false) -> [return: bb5, unwind continue];
+      }
+  
+      bb5: {
+          _5 = Result::<NonNull<[u8]>, std::alloc::AllocError>::unwrap(move _6) -> [return: bb1, unwind continue];
+      }
+  }
++ 
++ ALLOC0 (size: 16, align: 8) {
++     00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ __ │ ........░░░░░░░░
++ }
++ 
++ ALLOC1 (size: 0, align: 1) {}
+  
diff --git a/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.rs b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.rs
new file mode 100644
index 00000000000..c92424f2983
--- /dev/null
+++ b/tests/mir-opt/pre-codegen/issue_117368_print_invalid_constant.rs
@@ -0,0 +1,15 @@
+// Verify that we do not ICE when printing an invalid constant.
+// EMIT_MIR_FOR_EACH_BIT_WIDTH
+// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
+#![feature(allocator_api)]
+
+use std::alloc::{Allocator, Global, Layout};
+
+// EMIT_MIR issue_117368_print_invalid_constant.main.GVN.diff
+fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: debug layout => const Layout
+    let layout: Layout = None.unwrap();
+    let ptr: *mut u8 = Global.allocate(layout).unwrap().as_ptr() as _;
+}
diff --git a/tests/mir-opt/pre-codegen/loops.rs b/tests/mir-opt/pre-codegen/loops.rs
index f3ba409229d..7f9c26f4fff 100644
--- a/tests/mir-opt/pre-codegen/loops.rs
+++ b/tests/mir-opt/pre-codegen/loops.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -Zmir-opt-level=2 -g
 // needs-unwind
 
diff --git a/tests/mir-opt/pre-codegen/mem_replace.rs b/tests/mir-opt/pre-codegen/mem_replace.rs
index a139848bab2..18c4653d4c6 100644
--- a/tests/mir-opt/pre-codegen/mem_replace.rs
+++ b/tests/mir-opt/pre-codegen/mem_replace.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 // ignore-debug the standard library debug assertions leak into this test
diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-abort.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-abort.diff
index 681e9666e0f..bddd961c933 100644
--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-abort.diff
+++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-abort.diff
@@ -57,7 +57,7 @@
       }
 + }
 + 
-+ alloc5 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     04 00 00 00 00 __ __ __                         │ .....░░░
   }
   
diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff
index db16b8d82d2..297ebd79fad 100644
--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff
+++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.32bit.panic-unwind.diff
@@ -57,7 +57,7 @@
       }
 + }
 + 
-+ alloc5 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     04 00 00 00 00 __ __ __                         │ .....░░░
   }
   
diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.64bit.panic-abort.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.64bit.panic-abort.diff
index 681e9666e0f..bddd961c933 100644
--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.64bit.panic-abort.diff
+++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.64bit.panic-abort.diff
@@ -57,7 +57,7 @@
       }
 + }
 + 
-+ alloc5 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     04 00 00 00 00 __ __ __                         │ .....░░░
   }
   
diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.64bit.panic-unwind.diff b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.64bit.panic-unwind.diff
index db16b8d82d2..297ebd79fad 100644
--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.64bit.panic-unwind.diff
+++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.main.ConstProp.64bit.panic-unwind.diff
@@ -57,7 +57,7 @@
       }
 + }
 + 
-+ alloc5 (size: 8, align: 4) {
++ ALLOC0 (size: 8, align: 4) {
 +     04 00 00 00 00 __ __ __                         │ .....░░░
   }
   
diff --git a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs
index 704f8f887e3..bb089ea4455 100644
--- a/tests/mir-opt/pre-codegen/optimizes_into_variable.rs
+++ b/tests/mir-opt/pre-codegen/optimizes_into_variable.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -C overflow-checks=on
 
diff --git a/tests/mir-opt/pre-codegen/range_iter.rs b/tests/mir-opt/pre-codegen/range_iter.rs
index 9552144787d..80b1a5b2fa5 100644
--- a/tests/mir-opt/pre-codegen/range_iter.rs
+++ b/tests/mir-opt/pre-codegen/range_iter.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir
index 80a470c9482..af5d385a979 100644
--- a/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/simple_option_map.ezmap.PreCodegen.after.mir
@@ -3,9 +3,9 @@
 fn ezmap(_1: Option<i32>) -> Option<i32> {
     debug x => _1;
     let mut _0: std::option::Option<i32>;
-    scope 1 (inlined map::<i32, i32, {closure@$DIR/simple_option_map.rs:17:12: 17:15}>) {
+    scope 1 (inlined map::<i32, i32, {closure@$DIR/simple_option_map.rs:18:12: 18:15}>) {
         debug slf => _1;
-        debug f => const ZeroSized: {closure@$DIR/simple_option_map.rs:17:12: 17:15};
+        debug f => const ZeroSized: {closure@$DIR/simple_option_map.rs:18:12: 18:15};
         let mut _2: isize;
         let _3: i32;
         let mut _4: i32;
diff --git a/tests/mir-opt/pre-codegen/simple_option_map.rs b/tests/mir-opt/pre-codegen/simple_option_map.rs
index d4f28dda6c6..35f9ab3e154 100644
--- a/tests/mir-opt/pre-codegen/simple_option_map.rs
+++ b/tests/mir-opt/pre-codegen/simple_option_map.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 
diff --git a/tests/mir-opt/pre-codegen/slice_filter.rs b/tests/mir-opt/pre-codegen/slice_filter.rs
index aba951acdd0..483e5876615 100644
--- a/tests/mir-opt/pre-codegen/slice_filter.rs
+++ b/tests/mir-opt/pre-codegen/slice_filter.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
 // ignore-debug: standard library debug assertions add a panic that breaks this optimization
 
diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
index b35d3a105ba..548767dca0d 100644
--- a/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/slice_filter.variant_a-{closure#0}.PreCodegen.after.mir
@@ -1,6 +1,6 @@
 // MIR for `variant_a::{closure#0}` after PreCodegen
 
-fn variant_a::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:7:25: 7:39}, _2: &&(usize, usize, usize, usize)) -> bool {
+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;
     let mut _3: &(usize, usize, usize, usize);
     let _4: &usize;
diff --git a/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
index 80c8cebff45..e2ed1d101dc 100644
--- a/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
+++ b/tests/mir-opt/pre-codegen/slice_filter.variant_b-{closure#0}.PreCodegen.after.mir
@@ -1,6 +1,6 @@
 // MIR for `variant_b::{closure#0}` after PreCodegen
 
-fn variant_b::{closure#0}(_1: &mut {closure@$DIR/slice_filter.rs:11:25: 11:41}, _2: &&(usize, usize, usize, usize)) -> bool {
+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;
     let mut _3: &(usize, usize, usize, usize);
     let _4: usize;
diff --git a/tests/mir-opt/pre-codegen/slice_index.rs b/tests/mir-opt/pre-codegen/slice_index.rs
index 57ffb07e294..5225fc5c6e1 100644
--- a/tests/mir-opt/pre-codegen/slice_index.rs
+++ b/tests/mir-opt/pre-codegen/slice_index.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 // ignore-debug the standard library debug assertions leak into this test
diff --git a/tests/mir-opt/pre-codegen/slice_iter.rs b/tests/mir-opt/pre-codegen/slice_iter.rs
index 1790056369c..10a5c3070d8 100644
--- a/tests/mir-opt/pre-codegen/slice_iter.rs
+++ b/tests/mir-opt/pre-codegen/slice_iter.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 // ignore-debug the standard library debug assertions leak into this test
diff --git a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir
index 1d3317efd41..485dc9179ce 100644
--- a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir
+++ b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-abort.mir
@@ -1,21 +1,18 @@
 // MIR for `outer` after PreCodegen
 
 fn outer(_1: u8) -> u8 {
-    debug v => _1;                       // in scope 0 at $DIR/spans.rs:9:14: 9:15
-    let mut _0: u8;                      // return place in scope 0 at $DIR/spans.rs:9:24: 9:26
-    let mut _2: &u8;                     // in scope 0 at $DIR/spans.rs:10:11: 10:13
-
-    bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/spans.rs:10:11: 10:13
-        _2 = &_1;                        // scope 0 at $DIR/spans.rs:10:11: 10:13
-        _0 = inner(move _2) -> [return: bb1, unwind unreachable]; // scope 0 at $DIR/spans.rs:10:5: 10:14
-                                         // mir::ConstOperand
-                                         // + span: $DIR/spans.rs:10:5: 10:10
-                                         // + const_: Const { ty: for<'a> fn(&'a u8) -> u8 {inner}, val: Value(inner) }
+    debug v => _1;                       // in scope 0 at $DIR/spans.rs:10:14: 10:15
+    let mut _0: u8;                      // return place in scope 0 at $DIR/spans.rs:10:24: 10:26
+    let mut _2: &u8;                     // in scope 0 at $DIR/spans.rs:11:11: 11:13
+    scope 1 (inlined inner) {            // at $DIR/spans.rs:11:5: 11:14
+        debug x => _2;                   // in scope 1 at $DIR/spans.rs:14:14: 14:15
     }
 
-    bb1: {
-        StorageDead(_2);                 // scope 0 at $DIR/spans.rs:10:13: 10:14
-        return;                          // scope 0 at $DIR/spans.rs:11:2: 11:2
+    bb0: {
+        StorageLive(_2);                 // scope 0 at $DIR/spans.rs:11:11: 11:13
+        _2 = &_1;                        // scope 0 at $DIR/spans.rs:11:11: 11:13
+        _0 = _1;                         // scope 1 at $DIR/spans.rs:15:5: 15:7
+        StorageDead(_2);                 // scope 0 at $DIR/spans.rs:11:13: 11:14
+        return;                          // scope 0 at $DIR/spans.rs:12:2: 12:2
     }
 }
diff --git a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir
index aba66861f7d..485dc9179ce 100644
--- a/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir
+++ b/tests/mir-opt/pre-codegen/spans.outer.PreCodegen.after.panic-unwind.mir
@@ -1,21 +1,18 @@
 // MIR for `outer` after PreCodegen
 
 fn outer(_1: u8) -> u8 {
-    debug v => _1;                       // in scope 0 at $DIR/spans.rs:9:14: 9:15
-    let mut _0: u8;                      // return place in scope 0 at $DIR/spans.rs:9:24: 9:26
-    let mut _2: &u8;                     // in scope 0 at $DIR/spans.rs:10:11: 10:13
-
-    bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/spans.rs:10:11: 10:13
-        _2 = &_1;                        // scope 0 at $DIR/spans.rs:10:11: 10:13
-        _0 = inner(move _2) -> [return: bb1, unwind continue]; // scope 0 at $DIR/spans.rs:10:5: 10:14
-                                         // mir::ConstOperand
-                                         // + span: $DIR/spans.rs:10:5: 10:10
-                                         // + const_: Const { ty: for<'a> fn(&'a u8) -> u8 {inner}, val: Value(inner) }
+    debug v => _1;                       // in scope 0 at $DIR/spans.rs:10:14: 10:15
+    let mut _0: u8;                      // return place in scope 0 at $DIR/spans.rs:10:24: 10:26
+    let mut _2: &u8;                     // in scope 0 at $DIR/spans.rs:11:11: 11:13
+    scope 1 (inlined inner) {            // at $DIR/spans.rs:11:5: 11:14
+        debug x => _2;                   // in scope 1 at $DIR/spans.rs:14:14: 14:15
     }
 
-    bb1: {
-        StorageDead(_2);                 // scope 0 at $DIR/spans.rs:10:13: 10:14
-        return;                          // scope 0 at $DIR/spans.rs:11:2: 11:2
+    bb0: {
+        StorageLive(_2);                 // scope 0 at $DIR/spans.rs:11:11: 11:13
+        _2 = &_1;                        // scope 0 at $DIR/spans.rs:11:11: 11:13
+        _0 = _1;                         // scope 1 at $DIR/spans.rs:15:5: 15:7
+        StorageDead(_2);                 // scope 0 at $DIR/spans.rs:11:13: 11:14
+        return;                          // scope 0 at $DIR/spans.rs:12:2: 12:2
     }
 }
diff --git a/tests/mir-opt/pre-codegen/spans.rs b/tests/mir-opt/pre-codegen/spans.rs
index 295eb0476db..aa36648ce39 100644
--- a/tests/mir-opt/pre-codegen/spans.rs
+++ b/tests/mir-opt/pre-codegen/spans.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that the comments we emit in MIR opts are accurate.
 //
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/pre-codegen/try_identity.rs b/tests/mir-opt/pre-codegen/try_identity.rs
index a227c82d6a3..b6e4eaad7e1 100644
--- a/tests/mir-opt/pre-codegen/try_identity.rs
+++ b/tests/mir-opt/pre-codegen/try_identity.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -O -C debuginfo=0 -Zmir-opt-level=2
 // only-64bit
 
diff --git a/tests/mir-opt/reference_prop.rs b/tests/mir-opt/reference_prop.rs
index 610660131b1..36134e019ad 100644
--- a/tests/mir-opt/reference_prop.rs
+++ b/tests/mir-opt/reference_prop.rs
@@ -8,16 +8,31 @@
 fn opaque(_: impl Sized) {}
 
 fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
+    // CHECK-LABEL: fn reference_propagation(
+
     // Propagation through a reference.
     {
+        // CHECK: bb0: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         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.
+    // Propagation through two references.
     {
+        // CHECK: bb1: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[a2:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[btmp:_.*]] = &[[a2]];
+        // CHECK: [[b]] = move [[btmp]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let a2 = 7_usize;
         let mut b = &a;
@@ -29,6 +44,12 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Propagation through a borrowed reference.
     {
+        // CHECK: bb2: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let b = &a;
         let d = &b;
@@ -36,8 +57,14 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
         opaque(d); // prevent `d` from being removed.
     }
 
-    // Propagation through a borrowed reference.
+    // Propagation through a mutably borrowed reference.
     {
+        // CHECK: bb3: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[d:_.*]] = &raw mut [[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let mut b = &a;
         let d = &raw mut b;
@@ -47,6 +74,11 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Propagation through an escaping borrow.
     {
+        // CHECK: bb4: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         let a = 7_usize;
         let b = &a;
         let c = *b;
@@ -55,6 +87,14 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Propagation through a transitively escaping borrow.
     {
+        // CHECK: bb5: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b1:_.*]] = &[[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+        // CHECK: [[b2:_.*]] = [[b1]];
+        // CHECK: [[c2:_.*]] = [[a]];
+        // CHECK: [[b3:_.*]] = [[b2]];
+
         let a = 7_usize;
         let b1 = &a;
         let c = *b1;
@@ -68,6 +108,10 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Propagation a reborrow of an argument.
     {
+        // CHECK: bb6: {
+        // CHECK-NOT: {{_.*}} = &(*_1);
+        // CHECK: [[b:_.*]] = (*_1);
+
         let a = &*single;
         let b = *a; // This should be optimized as `*single`.
         opaque(());
@@ -75,6 +119,12 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Propagation a reborrow of a mutated argument.
     {
+        // CHECK: bb7: {
+        // CHECK: [[a:_.*]] = &(*_2);
+        // CHECK: [[tmp:_.*]] = &(*_1);
+        // CHECK: _2 = move [[tmp]];
+        // CHECK: [[b:_.*]] = (*[[a]]);
+
         let a = &*multiple;
         multiple = &*single;
         let b = *a; // This should not be optimized.
@@ -83,6 +133,13 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 
     // Fixed-point propagation through a borrowed reference.
     {
+        // CHECK: bb8: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let b = &a;
         let d = &b; // first round promotes debuginfo for `d`
@@ -90,8 +147,15 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
         opaque(());
     }
 
-    // Fixed-point propagation through a borrowed reference.
+    // Fixed-point propagation through a mutably borrowed reference.
     {
+        // CHECK: bb9: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &[[a]];
+        // CHECK: [[d:_.*]] = &mut [[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let mut b = &a;
         let d = &mut b; // first round promotes debuginfo for `d`
@@ -101,16 +165,31 @@ fn reference_propagation<'a, T: Copy>(single: &'a T, mut multiple: &'a T) {
 }
 
 fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a mut T) {
+    // CHECK-LABEL: fn reference_propagation_mut(
+
     // Propagation through a reference.
     {
+        // CHECK: bb0: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         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.
+    // Propagation through two references.
     {
+        // CHECK: bb1: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[a2:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[btmp:_.*]] = &mut [[a2]];
+        // CHECK: [[b]] = move [[btmp]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut a2 = 7_usize;
         let mut b = &mut a;
@@ -122,6 +201,12 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Propagation through a borrowed reference.
     {
+        // CHECK: bb2: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let b = &mut a;
         let d = &b;
@@ -129,8 +214,14 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
         opaque(d); // prevent `d` from being removed.
     }
 
-    // Propagation through a borrowed reference.
+    // Propagation through a mutably borrowed reference.
     {
+        // CHECK: bb3: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[d:_.*]] = &raw mut [[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut b = &mut a;
         let d = &raw mut b;
@@ -140,6 +231,11 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Propagation through an escaping borrow.
     {
+        // CHECK: bb4: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 7_usize;
         let b = &mut a;
         let c = *b;
@@ -148,6 +244,14 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Propagation through a transitively escaping borrow.
     {
+        // CHECK: bb5: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b1:_.*]] = &mut [[a]];
+        // CHECK: [[c:_.*]] = (*[[b1]]);
+        // CHECK: [[b2:_.*]] = move [[b1]];
+        // CHECK: [[c2:_.*]] = (*[[b2]]);
+        // CHECK: [[b3:_.*]] = move [[b2]];
+
         let mut a = 7_usize;
         let b1 = &mut a;
         let c = *b1;
@@ -161,6 +265,10 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Propagation a reborrow of an argument.
     {
+        // CHECK: bb6: {
+        // CHECK-NOT: {{_.*}} = &(*_1);
+        // CHECK: [[b:_.*]] = (*_1);
+
         let a = &mut *single;
         let b = *a; // This should be optimized as `*single`.
         opaque(());
@@ -168,6 +276,12 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Propagation a reborrow of a mutated argument.
     {
+        // CHECK: bb7: {
+        // CHECK: [[a:_.*]] = &mut (*_2);
+        // CHECK: [[tmp:_.*]] = &mut (*_1);
+        // CHECK: _2 = move [[tmp]];
+        // CHECK: [[b:_.*]] = (*[[a]]);
+
         let a = &mut *multiple;
         multiple = &mut *single;
         let b = *a; // This should not be optimized.
@@ -176,6 +290,13 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 
     // Fixed-point propagation through a borrowed reference.
     {
+        // CHECK: bb8: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let b = &mut a;
         let d = &b; // first round promotes debuginfo for `d`
@@ -183,8 +304,15 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
         opaque(());
     }
 
-    // Fixed-point propagation through a borrowed reference.
+    // Fixed-point propagation through a mutably borrowed reference.
     {
+        // CHECK: bb9: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &mut [[a]];
+        // CHECK: [[d:_.*]] = &mut [[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut b = &mut a;
         let d = &mut b; // first round promotes debuginfo for `d`
@@ -194,16 +322,31 @@ fn reference_propagation_mut<'a, T: Copy>(single: &'a mut T, mut multiple: &'a m
 }
 
 fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *const T) {
+    // CHECK-LABEL: fn reference_propagation_const_ptr(
+
     // Propagation through a reference.
     unsafe {
+        // CHECK: bb0: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         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.
+    // Propagation through two references.
     unsafe {
+        // CHECK: bb1: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[a2:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[btmp:_.*]] = &raw const [[a2]];
+        // CHECK: [[b]] = move [[btmp]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let a2 = 7_usize;
         let mut b = &raw const a;
@@ -215,6 +358,12 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation through a borrowed reference.
     unsafe {
+        // CHECK: bb2: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let b = &raw const a;
         let d = &b;
@@ -222,8 +371,14 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
         opaque(d); // prevent `d` from being removed.
     }
 
-    // Propagation through a borrowed reference.
+    // Propagation through a mutably borrowed reference.
     unsafe {
+        // CHECK: bb3: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[d:_.*]] = &raw mut [[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let mut b = &raw const a;
         let d = &raw mut b;
@@ -233,6 +388,11 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation through an escaping borrow.
     unsafe {
+        // CHECK: bb4: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         let a = 7_usize;
         let b = &raw const a;
         let c = *b;
@@ -241,6 +401,14 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation through a transitively escaping borrow.
     unsafe {
+        // CHECK: bb5: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b1:_.*]] = &raw const [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+        // CHECK: [[b2:_.*]] = [[b1]];
+        // CHECK: [[c2:_.*]] = [[a]];
+        // CHECK: [[b3:_.*]] = [[b2]];
+
         let a = 7_usize;
         let b1 = &raw const a;
         let c = *b1;
@@ -254,6 +422,10 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation a reborrow of an argument.
     unsafe {
+        // CHECK: bb6: {
+        // CHECK-NOT: {{_.*}} = &(*_1);
+        // CHECK: [[b:_.*]] = (*_1);
+
         let a = &raw const *single;
         let b = *a; // This should be optimized as `*single`.
         opaque(());
@@ -261,6 +433,12 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation a reborrow of a mutated argument.
     unsafe {
+        // CHECK: bb7: {
+        // CHECK: [[a:_.*]] = &raw const (*_2);
+        // CHECK: [[tmp:_.*]] = &raw const (*_1);
+        // CHECK: _2 = move [[tmp]];
+        // CHECK: [[b:_.*]] = (*[[a]]);
+
         let a = &raw const *multiple;
         multiple = &raw const *single;
         let b = *a; // This should not be optimized.
@@ -269,6 +447,12 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Propagation through a reborrow.
     unsafe {
+        // CHECK: bb8: {
+        // CHECK: [[a:_.*]] = const 13_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[d:_.*]] = &raw const [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         let a = 13_usize;
         let b = &raw const a;
         let c = &raw const *b;
@@ -278,6 +462,13 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Fixed-point propagation through a borrowed reference.
     unsafe {
+        // CHECK: bb9: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let b = &raw const a;
         let d = &b; // first round promotes debuginfo for `d`
@@ -287,6 +478,13 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 
     // Fixed-point propagation through a borrowed reference.
     unsafe {
+        // CHECK: bb10: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw const [[a]];
+        // CHECK: [[d:_.*]] = &mut [[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let a = 5_usize;
         let mut b = &raw const a;
         let d = &mut b; // first round promotes debuginfo for `d`
@@ -296,16 +494,31 @@ fn reference_propagation_const_ptr<T: Copy>(single: *const T, mut multiple: *con
 }
 
 fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T) {
+    // CHECK-LABEL: fn reference_propagation_mut_ptr(
+
     // Propagation through a reference.
     unsafe {
+        // CHECK: bb0: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[c:_.*]] = [[a]];
+
         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.
+    // Propagation through two references.
     unsafe {
+        // CHECK: bb1: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[a2:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[btmp:_.*]] = &raw mut [[a2]];
+        // CHECK: [[b]] = move [[btmp]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut a2 = 7_usize;
         let mut b = &raw mut a;
@@ -317,6 +530,12 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Propagation through a borrowed reference.
     unsafe {
+        // CHECK: bb2: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let b = &raw mut a;
         let d = &b;
@@ -324,8 +543,14 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
         opaque(d); // prevent `d` from being removed.
     }
 
-    // Propagation through a borrowed reference.
+    // Propagation through a mutably borrowed reference.
     unsafe {
+        // CHECK: bb3: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[d:_.*]] = &raw mut [[b]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut b = &raw mut a;
         let d = &raw mut b;
@@ -335,6 +560,11 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Propagation through an escaping borrow.
     unsafe {
+        // CHECK: bb4: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 7_usize;
         let b = &raw mut a;
         let c = *b;
@@ -343,6 +573,14 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Propagation through a transitively escaping borrow.
     unsafe {
+        // CHECK: bb5: {
+        // CHECK: [[a:_.*]] = const 7_usize;
+        // CHECK: [[b1:_.*]] = &raw mut [[a]];
+        // CHECK: [[c:_.*]] = (*[[b1]]);
+        // CHECK: [[b2:_.*]] = [[b1]];
+        // CHECK: [[c2:_.*]] = (*[[b2]]);
+        // CHECK: [[b3:_.*]] = [[b2]];
+
         let mut a = 7_usize;
         let b1 = &raw mut a;
         let c = *b1;
@@ -356,6 +594,10 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Propagation a reborrow of an argument.
     unsafe {
+        // CHECK: bb6: {
+        // CHECK-NOT: {{_.*}} = &(*_1);
+        // CHECK: [[b:_.*]] = (*_1);
+
         let a = &raw mut *single;
         let b = *a; // This should be optimized as `*single`.
         opaque(());
@@ -363,6 +605,12 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Propagation a reborrow of a mutated argument.
     unsafe {
+        // CHECK: bb7: {
+        // CHECK: [[a:_.*]] = &raw mut (*_2);
+        // CHECK: [[tmp:_.*]] = &raw mut (*_1);
+        // CHECK: _2 = move [[tmp]];
+        // CHECK: [[b:_.*]] = (*[[a]]);
+
         let a = &raw mut *multiple;
         multiple = &raw mut *single;
         let b = *a; // This should not be optimized.
@@ -371,6 +619,13 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
     // Fixed-point propagation through a borrowed reference.
     unsafe {
+        // CHECK: bb8: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[d:_.*]] = &[[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let b = &raw mut a;
         let d = &b; // first round promotes debuginfo for `d`
@@ -378,8 +633,15 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
         opaque(());
     }
 
-    // Fixed-point propagation through a borrowed reference.
+    // Fixed-point propagation through a mutably borrowed reference.
     unsafe {
+        // CHECK: bb9: {
+        // CHECK: [[a:_.*]] = const 5_usize;
+        // CHECK: [[b:_.*]] = &raw mut [[a]];
+        // CHECK: [[d:_.*]] = &mut [[b]];
+        // FIXME this could be [[a]]
+        // CHECK: [[c:_.*]] = (*[[b]]);
+
         let mut a = 5_usize;
         let mut b = &raw mut a;
         let d = &mut b; // first round promotes debuginfo for `d`
@@ -390,8 +652,13 @@ fn reference_propagation_mut_ptr<T: Copy>(single: *mut T, mut multiple: *mut T)
 
 #[custom_mir(dialect = "runtime", phase = "post-cleanup")]
 fn read_through_raw(x: &mut usize) -> usize {
-    use std::intrinsics::mir::*;
+    // CHECK-LABEL: read_through_raw
+    // CHECK: bb0: {
+    // CHECK-NEXT: _0 = (*_1);
+    // CHECK-NEXT: _0 = (*_1);
+    // CHECK-NEXT: return;
 
+    use std::intrinsics::mir::*;
     mir!(
         let r1: &mut usize;
         let r2: &mut usize;
@@ -413,8 +680,10 @@ fn read_through_raw(x: &mut usize) -> usize {
 
 #[custom_mir(dialect = "runtime", phase = "post-cleanup")]
 fn multiple_storage() {
-    use std::intrinsics::mir::*;
+    // CHECK-LABEL: multiple_storage
+    // CHECK: _3 = (*_2);
 
+    use std::intrinsics::mir::*;
     mir!(
         let x: i32;
         {
@@ -437,8 +706,10 @@ fn multiple_storage() {
 
 #[custom_mir(dialect = "runtime", phase = "post-cleanup")]
 fn dominate_storage() {
-    use std::intrinsics::mir::*;
+    // CHECK-LABEL: dominate_storage
+    // CHECK: _5 = (*_2);
 
+    use std::intrinsics::mir::*;
     mir!(
         let x: i32;
         let r: &i32;
@@ -465,8 +736,10 @@ fn dominate_storage() {
 
 #[custom_mir(dialect = "runtime", phase = "post-cleanup")]
 fn maybe_dead(m: bool) {
-    use std::intrinsics::mir::*;
+    // CHECK-LABEL: fn maybe_dead(
+    // CHECK: (*_5) = const 7_i32;
 
+    use std::intrinsics::mir::*;
     mir!(
         let x: i32;
         let y: i32;
@@ -506,6 +779,9 @@ fn maybe_dead(m: bool) {
 }
 
 fn mut_raw_then_mut_shr() -> (i32, i32) {
+    // CHECK-LABEL: fn mut_raw_then_mut_shr(
+    // CHECK-NOT: (*{{_.*}})
+
     let mut x = 2;
     let xref = &mut x;
     let xraw = &mut *xref as *mut _;
@@ -517,6 +793,18 @@ fn mut_raw_then_mut_shr() -> (i32, i32) {
 }
 
 fn unique_with_copies() {
+    // CHECK-LABEL: fn unique_with_copies(
+    // CHECK: [[a:_.*]] = const 0_i32;
+    // CHECK: [[x:_.*]] = &raw mut [[a]];
+    // CHECK-NOT: [[a]]
+    // CHECK: [[tmp:_.*]] = (*[[x]]);
+    // CHECK-NEXT: opaque::<i32>(move [[tmp]])
+    // CHECK-NOT: [[a]]
+    // CHECK: StorageDead([[a]]);
+    // CHECK-NOT: [[a]]
+    // CHECK: [[tmp:_.*]] = (*[[x]]);
+    // CHECK-NEXT: opaque::<i32>(move [[tmp]])
+
     let y = {
         let mut a = 0;
         let x = &raw mut a;
@@ -529,6 +817,17 @@ fn unique_with_copies() {
 }
 
 fn debuginfo() {
+    // CHECK-LABEL: fn debuginfo(
+    // FIXME: This features waits for DWARF implicit pointers in LLVM.
+    // CHECK: debug ref_mut_u8 => _{{.*}};
+    // CHECK: debug field => _{{.*}};
+    // CHECK: debug reborrow => _{{.*}};
+    // CHECK: debug variant_field => _{{.*}};
+    // CHECK: debug constant_index => _{{.*}};
+    // CHECK: debug subslice => _{{.*}};
+    // CHECK: debug constant_index_from_end => _{{.*}};
+    // CHECK: debug multiple_borrow => _{{.*}};
+
     struct T(u8);
 
     let ref_mut_u8 = &mut 5_u8;
@@ -551,6 +850,10 @@ fn debuginfo() {
 }
 
 fn many_debuginfo() {
+    // CHECK-LABEL: fn many_debuginfo(
+    // FIXME: This features waits for DWARF implicit pointers in LLVM.
+    // CHECK: debug many_borrow => _{{.*}};
+
     let a = 0;
 
     // Verify that we do not ICE on deeply nested borrows.
diff --git a/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-abort.diff b/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-abort.diff
index 33322c41b01..61329bb75d1 100644
--- a/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-abort.diff
+++ b/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-abort.diff
@@ -13,8 +13,7 @@
       let mut _8: bool;
   
       bb0: {
--         FakeRead(ForMatchedPlace(None), _1);
-+         nop;
+          PlaceMention(_1);
           _3 = discriminant(_1);
           switchInt(move _3) -> [1: bb2, otherwise: bb1];
       }
diff --git a/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-unwind.diff b/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-unwind.diff
index 33322c41b01..61329bb75d1 100644
--- a/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-unwind.diff
+++ b/tests/mir-opt/remove_fake_borrows.match_guard.CleanupPostBorrowck.panic-unwind.diff
@@ -13,8 +13,7 @@
       let mut _8: bool;
   
       bb0: {
--         FakeRead(ForMatchedPlace(None), _1);
-+         nop;
+          PlaceMention(_1);
           _3 = discriminant(_1);
           switchInt(move _3) -> [1: bb2, otherwise: bb1];
       }
diff --git a/tests/mir-opt/remove_fake_borrows.rs b/tests/mir-opt/remove_fake_borrows.rs
index f0ee98f777c..21c7b46ee1a 100644
--- a/tests/mir-opt/remove_fake_borrows.rs
+++ b/tests/mir-opt/remove_fake_borrows.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that the fake borrows for matches are removed after borrow checking.
 
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
diff --git a/tests/mir-opt/remove_never_const.rs b/tests/mir-opt/remove_never_const.rs
index 160cc955534..c144edaffaf 100644
--- a/tests/mir-opt/remove_never_const.rs
+++ b/tests/mir-opt/remove_never_const.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // This was originally a regression test for #66975 - ensure that we do not generate never typed
 // consts in codegen. We also have tests for this that catches the error, see
 // tests/ui/consts/const-eval/index-out-of-bounds-never-type.rs.
diff --git a/tests/mir-opt/remove_storage_markers.rs b/tests/mir-opt/remove_storage_markers.rs
index 330264461d7..6666ff3b726 100644
--- a/tests/mir-opt/remove_storage_markers.rs
+++ b/tests/mir-opt/remove_storage_markers.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: RemoveStorageMarkers
 
diff --git a/tests/mir-opt/remove_unneeded_drops.rs b/tests/mir-opt/remove_unneeded_drops.rs
index 178d0924c5e..cad79e0aa0c 100644
--- a/tests/mir-opt/remove_unneeded_drops.rs
+++ b/tests/mir-opt/remove_unneeded_drops.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // EMIT_MIR remove_unneeded_drops.opt.RemoveUnneededDrops.diff
 fn opt(x: bool) {
diff --git a/tests/mir-opt/remove_zsts.rs b/tests/mir-opt/remove_zsts.rs
index 1cf7ad6e366..e33a272fe16 100644
--- a/tests/mir-opt/remove_zsts.rs
+++ b/tests/mir-opt/remove_zsts.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 union Foo {
     x: (),
     y: u64,
diff --git a/tests/mir-opt/retag.rs b/tests/mir-opt/retag.rs
index e0696de4df3..1e4b017dad5 100644
--- a/tests/mir-opt/retag.rs
+++ b/tests/mir-opt/retag.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: AddRetag
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // ignore-tidy-linelength
diff --git a/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-abort.mir b/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-abort.mir
index d7247744074..285db435f5a 100644
--- a/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-abort.mir
+++ b/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-abort.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/retag.rs:12:1: 12:10>::foo` after SimplifyCfg-elaborate-drops
+// MIR for `<impl at $DIR/retag.rs:13:1: 13:10>::foo` after SimplifyCfg-elaborate-drops
 
-fn <impl at $DIR/retag.rs:12:1: 12:10>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
+fn <impl at $DIR/retag.rs:13:1: 13:10>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
     debug self => _1;
     debug x => _2;
     let mut _0: &mut i32;
diff --git a/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-unwind.mir b/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
index d7247744074..285db435f5a 100644
--- a/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
+++ b/tests/mir-opt/retag.{impl#0}-foo.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/retag.rs:12:1: 12:10>::foo` after SimplifyCfg-elaborate-drops
+// MIR for `<impl at $DIR/retag.rs:13:1: 13:10>::foo` after SimplifyCfg-elaborate-drops
 
-fn <impl at $DIR/retag.rs:12:1: 12:10>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
+fn <impl at $DIR/retag.rs:13:1: 13:10>::foo(_1: &Test, _2: &mut i32) -> &mut i32 {
     debug self => _1;
     debug x => _2;
     let mut _0: &mut i32;
diff --git a/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-abort.mir b/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-abort.mir
index de3eb0d52cf..9ad607b2fe2 100644
--- a/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-abort.mir
+++ b/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-abort.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/retag.rs:12:1: 12:10>::foo_shr` after SimplifyCfg-elaborate-drops
+// MIR for `<impl at $DIR/retag.rs:13:1: 13:10>::foo_shr` after SimplifyCfg-elaborate-drops
 
-fn <impl at $DIR/retag.rs:12:1: 12:10>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
+fn <impl at $DIR/retag.rs:13:1: 13:10>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
     debug self => _1;
     debug x => _2;
     let mut _0: &i32;
diff --git a/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-unwind.mir b/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
index de3eb0d52cf..9ad607b2fe2 100644
--- a/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
+++ b/tests/mir-opt/retag.{impl#0}-foo_shr.SimplifyCfg-elaborate-drops.after.panic-unwind.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/retag.rs:12:1: 12:10>::foo_shr` after SimplifyCfg-elaborate-drops
+// MIR for `<impl at $DIR/retag.rs:13:1: 13:10>::foo_shr` after SimplifyCfg-elaborate-drops
 
-fn <impl at $DIR/retag.rs:12:1: 12:10>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
+fn <impl at $DIR/retag.rs:13:1: 13:10>::foo_shr(_1: &Test, _2: &i32) -> &i32 {
     debug self => _1;
     debug x => _2;
     let mut _0: &i32;
diff --git a/tests/mir-opt/return_an_array.rs b/tests/mir-opt/return_an_array.rs
index bea3c317c89..09146a824fc 100644
--- a/tests/mir-opt/return_an_array.rs
+++ b/tests/mir-opt/return_an_array.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // this tests move up progration, which is not yet implemented
 
 fn foo() -> [u8; 1024] {
diff --git a/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff b/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
index 491db551a7d..fe4b33001fc 100644
--- a/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
+++ b/tests/mir-opt/separate_const_switch.identity.SeparateConstSwitch.diff
@@ -52,7 +52,7 @@
           StorageLive(_10);
           StorageLive(_11);
           _9 = discriminant(_1);
-          switchInt(move _9) -> [0: bb7, 1: bb5, otherwise: bb6];
+          switchInt(move _9) -> [0: bb6, 1: bb5, otherwise: bb3];
       }
   
       bb1: {
@@ -92,10 +92,6 @@
       }
   
       bb6: {
-          unreachable;
-      }
-  
-      bb7: {
           _10 = ((_1 as Ok).0: i32);
           _3 = ControlFlow::<Result<Infallible, i32>, i32>::Continue(move _10);
           goto -> bb1;
diff --git a/tests/mir-opt/separate_const_switch.rs b/tests/mir-opt/separate_const_switch.rs
index d333d4b6be2..3f43cdf4350 100644
--- a/tests/mir-opt/separate_const_switch.rs
+++ b/tests/mir-opt/separate_const_switch.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(control_flow_enum)]
 #![feature(try_trait_v2)]
 
diff --git a/tests/mir-opt/simplify_arm.rs b/tests/mir-opt/simplify_arm.rs
index 4c471ce0468..e933cb987d8 100644
--- a/tests/mir-opt/simplify_arm.rs
+++ b/tests/mir-opt/simplify_arm.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Z mir-opt-level=3 -Zunsound-mir-opts
 // EMIT_MIR simplify_arm.id.SimplifyArmIdentity.diff
 // EMIT_MIR simplify_arm.id.SimplifyBranchSame.diff
diff --git a/tests/mir-opt/simplify_arm_identity.rs b/tests/mir-opt/simplify_arm_identity.rs
index e122cd50e00..1b546c3938e 100644
--- a/tests/mir-opt/simplify_arm_identity.rs
+++ b/tests/mir-opt/simplify_arm_identity.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Checks that `SimplifyArmIdentity` is not applied if enums have incompatible layouts.
 // Regression test for issue #66856.
 //
diff --git a/tests/mir-opt/simplify_cfg.rs b/tests/mir-opt/simplify_cfg.rs
index cf7eac4403a..a87aaca544c 100644
--- a/tests/mir-opt/simplify_cfg.rs
+++ b/tests/mir-opt/simplify_cfg.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that the goto chain starting from bb0 is collapsed.
 // compile-flags: -Cpanic=abort
 // no-prefer-dynamic
diff --git a/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs b/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs
index e2578407fea..5c4277898cd 100644
--- a/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs
+++ b/tests/mir-opt/simplify_duplicate_unreachable_blocks.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(custom_mir, core_intrinsics)]
 #![crate_type = "lib"]
 
diff --git a/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-abort.diff b/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-abort.diff
index d3957158360..64a435f2245 100644
--- a/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-abort.diff
+++ b/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-abort.diff
@@ -3,18 +3,15 @@
   
   fn main() -> () {
       let mut _0: ();
-      let mut _1: bool;
-      let _2: ();
+      let _1: ();
   
       bb0: {
-          StorageLive(_1);
-          _1 = const false;
 -         switchInt(const false) -> [0: bb3, otherwise: bb1];
 +         goto -> bb3;
       }
   
       bb1: {
-          _2 = noop() -> [return: bb2, unwind unreachable];
+          _1 = noop() -> [return: bb2, unwind unreachable];
       }
   
       bb2: {
@@ -26,7 +23,6 @@
       }
   
       bb4: {
-          StorageDead(_1);
           return;
       }
   }
diff --git a/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-unwind.diff b/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-unwind.diff
index 81903c64dbd..146e00686ed 100644
--- a/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-unwind.diff
+++ b/tests/mir-opt/simplify_if.main.SimplifyConstCondition-after-const-prop.panic-unwind.diff
@@ -3,18 +3,15 @@
   
   fn main() -> () {
       let mut _0: ();
-      let mut _1: bool;
-      let _2: ();
+      let _1: ();
   
       bb0: {
-          StorageLive(_1);
-          _1 = const false;
 -         switchInt(const false) -> [0: bb3, otherwise: bb1];
 +         goto -> bb3;
       }
   
       bb1: {
-          _2 = noop() -> [return: bb2, unwind continue];
+          _1 = noop() -> [return: bb2, unwind continue];
       }
   
       bb2: {
@@ -26,7 +23,6 @@
       }
   
       bb4: {
-          StorageDead(_1);
           return;
       }
   }
diff --git a/tests/mir-opt/simplify_if.rs b/tests/mir-opt/simplify_if.rs
index fff23b3ce7f..19b5806f720 100644
--- a/tests/mir-opt/simplify_if.rs
+++ b/tests/mir-opt/simplify_if.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 #[inline(never)]
 fn noop() {}
diff --git a/tests/mir-opt/simplify_locals.rs b/tests/mir-opt/simplify_locals.rs
index 7bbc0481c68..d4052e521de 100644
--- a/tests/mir-opt/simplify_locals.rs
+++ b/tests/mir-opt/simplify_locals.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: SimplifyLocals-before-const-prop
 
 
diff --git a/tests/mir-opt/simplify_locals_fixedpoint.rs b/tests/mir-opt/simplify_locals_fixedpoint.rs
index 4da18b7fe58..b0c6e2d8eb5 100644
--- a/tests/mir-opt/simplify_locals_fixedpoint.rs
+++ b/tests/mir-opt/simplify_locals_fixedpoint.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // compile-flags: -Zmir-opt-level=1
 
diff --git a/tests/mir-opt/simplify_locals_removes_unused_consts.rs b/tests/mir-opt/simplify_locals_removes_unused_consts.rs
index 1e404c3a48c..42879254d71 100644
--- a/tests/mir-opt/simplify_locals_removes_unused_consts.rs
+++ b/tests/mir-opt/simplify_locals_removes_unused_consts.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 // unit-test: SimplifyLocals-before-const-prop
 // compile-flags: -C overflow-checks=no
diff --git a/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs b/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
index de65857412c..615b972209c 100644
--- a/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
+++ b/tests/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: SimplifyLocals-before-const-prop
 
 fn map(x: Option<Box<()>>) -> Option<Box<()>> {
diff --git a/tests/mir-opt/simplify_match.rs b/tests/mir-opt/simplify_match.rs
index 5d8e94b0935..eb385005cd9 100644
--- a/tests/mir-opt/simplify_match.rs
+++ b/tests/mir-opt/simplify_match.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
 #[inline(never)]
 fn noop() {}
diff --git a/tests/mir-opt/simplify_try_if_let.rs b/tests/mir-opt/simplify_try_if_let.rs
index fba67de4033..3a59d78500c 100644
--- a/tests/mir-opt/simplify_try_if_let.rs
+++ b/tests/mir-opt/simplify_try_if_let.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Zmir-opt-level=1 -Zunsound-mir-opts
 // ignore-test
 // FIXME: the pass is unsound and causes ICEs in the MIR validator
diff --git a/tests/mir-opt/slice_drop_shim.rs b/tests/mir-opt/slice_drop_shim.rs
index 344c1af2c91..cac0a349128 100644
--- a/tests/mir-opt/slice_drop_shim.rs
+++ b/tests/mir-opt/slice_drop_shim.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // compile-flags: -Zmir-opt-level=0
 
 
diff --git a/tests/mir-opt/spanview_block.main.built.after.html b/tests/mir-opt/spanview_block.main.built.after.html
index 56f4e4f9370..54ef00f56f3 100644
--- a/tests/mir-opt/spanview_block.main.built.after.html
+++ b/tests/mir-opt/spanview_block.main.built.after.html
@@ -60,8 +60,8 @@
 </style>
 </head>
 <body>
-<div class="code" style="counter-reset: line 4"><span class="line"><span class="code" style="--layer: 0">fn main() </span><span><span class="code even" style="--layer: 1" title="0: $DIR/spanview_block.rs:5:11: 5:13:
-    5:11-5:13: Assign: _0 = const ()
-    5:13-5:13: Return: return"><span class="annotation">0⦊</span>{}<span class="annotation">⦉0</span></span></span></span></div>
+<div class="code" style="counter-reset: line 5"><span class="line"><span class="code" style="--layer: 0">fn main() </span><span><span class="code even" style="--layer: 1" title="0: $DIR/spanview_block.rs:6:11: 6:13:
+    6:11-6:13: Assign: _0 = const ()
+    6:13-6:13: Return: return"><span class="annotation">0⦊</span>{}<span class="annotation">⦉0</span></span></span></span></div>
 </body>
 </html>
diff --git a/tests/mir-opt/spanview_block.rs b/tests/mir-opt/spanview_block.rs
index 0ecf35ad6a2..e8bc3d16348 100644
--- a/tests/mir-opt/spanview_block.rs
+++ b/tests/mir-opt/spanview_block.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test spanview block output
 // compile-flags: -Z dump-mir-spanview=block
 
diff --git a/tests/mir-opt/spanview_statement.main.built.after.html b/tests/mir-opt/spanview_statement.main.built.after.html
index 91af08d80a8..5e782b05f3b 100644
--- a/tests/mir-opt/spanview_statement.main.built.after.html
+++ b/tests/mir-opt/spanview_statement.main.built.after.html
@@ -60,8 +60,8 @@
 </style>
 </head>
 <body>
-<div class="code" style="counter-reset: line 4"><span class="line"><span class="code" style="--layer: 0">fn main() </span><span><span class="code even" style="--layer: 1" title="0[0]: $DIR/spanview_statement.rs:5:11: 5:13:
-    5:11-5:13: Assign: _0 = const ()"><span class="annotation">0[0]⦊</span>{}<span class="annotation">⦉0[0]</span></span></span><span><span class="code odd" style="--layer: 1" title="0:Return: $DIR/spanview_statement.rs:5:13: 5:13:
-    5:13-5:13: Return: return"><span class="annotation">0:Return⦊</span>‸<span class="annotation">⦉0:Return</span></span></span></span></div>
+<div class="code" style="counter-reset: line 5"><span class="line"><span class="code" style="--layer: 0">fn main() </span><span><span class="code even" style="--layer: 1" title="0[0]: $DIR/spanview_statement.rs:6:11: 6:13:
+    6:11-6:13: Assign: _0 = const ()"><span class="annotation">0[0]⦊</span>{}<span class="annotation">⦉0[0]</span></span></span><span><span class="code odd" style="--layer: 1" title="0:Return: $DIR/spanview_statement.rs:6:13: 6:13:
+    6:13-6:13: Return: return"><span class="annotation">0:Return⦊</span>‸<span class="annotation">⦉0:Return</span></span></span></span></div>
 </body>
 </html>
diff --git a/tests/mir-opt/spanview_statement.rs b/tests/mir-opt/spanview_statement.rs
index 457052617b7..d547e6cb1e0 100644
--- a/tests/mir-opt/spanview_statement.rs
+++ b/tests/mir-opt/spanview_statement.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test spanview output (the default value for `-Z dump-mir-spanview` is "statement")
 // compile-flags: -Z dump-mir-spanview
 
diff --git a/tests/mir-opt/spanview_terminator.main.built.after.html b/tests/mir-opt/spanview_terminator.main.built.after.html
index 1f42faedd1e..2a651489e23 100644
--- a/tests/mir-opt/spanview_terminator.main.built.after.html
+++ b/tests/mir-opt/spanview_terminator.main.built.after.html
@@ -60,7 +60,7 @@
 </style>
 </head>
 <body>
-<div class="code" style="counter-reset: line 4"><span class="line"><span class="code" style="--layer: 0">fn main() {}</span><span><span class="code even" style="--layer: 1" title="0:Return: $DIR/spanview_terminator.rs:5:13: 5:13:
-    5:13-5:13: Return: return"><span class="annotation">0:Return⦊</span>‸<span class="annotation">⦉0:Return</span></span></span></span></div>
+<div class="code" style="counter-reset: line 5"><span class="line"><span class="code" style="--layer: 0">fn main() {}</span><span><span class="code even" style="--layer: 1" title="0:Return: $DIR/spanview_terminator.rs:6:13: 6:13:
+    6:13-6:13: Return: return"><span class="annotation">0:Return⦊</span>‸<span class="annotation">⦉0:Return</span></span></span></span></div>
 </body>
 </html>
diff --git a/tests/mir-opt/spanview_terminator.rs b/tests/mir-opt/spanview_terminator.rs
index 76fced188f1..a2c68b98ef5 100644
--- a/tests/mir-opt/spanview_terminator.rs
+++ b/tests/mir-opt/spanview_terminator.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test spanview terminator output
 // compile-flags: -Z dump-mir-spanview=terminator
 
diff --git a/tests/mir-opt/sroa/lifetimes.rs b/tests/mir-opt/sroa/lifetimes.rs
index 2356d212f3f..cc5c0c9bbcd 100644
--- a/tests/mir-opt/sroa/lifetimes.rs
+++ b/tests/mir-opt/sroa/lifetimes.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ScalarReplacementOfAggregates
 // compile-flags: -Cpanic=abort
 // no-prefer-dynamic
diff --git a/tests/mir-opt/sroa/structs.rs b/tests/mir-opt/sroa/structs.rs
index 7946eeaeae4..73563e12c94 100644
--- a/tests/mir-opt/sroa/structs.rs
+++ b/tests/mir-opt/sroa/structs.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // unit-test: ScalarReplacementOfAggregates
 // compile-flags: -Cpanic=abort
 // no-prefer-dynamic
diff --git a/tests/mir-opt/ssa_unreachable_116212.rs b/tests/mir-opt/ssa_unreachable_116212.rs
index f588665876c..9f1cf223e26 100644
--- a/tests/mir-opt/ssa_unreachable_116212.rs
+++ b/tests/mir-opt/ssa_unreachable_116212.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Regression test for issue #116212.
 
 #![feature(never_type)]
diff --git a/tests/mir-opt/storage_ranges.main.nll.0.mir b/tests/mir-opt/storage_ranges.main.nll.0.mir
index 13732daa7ad..782efd5acc6 100644
--- a/tests/mir-opt/storage_ranges.main.nll.0.mir
+++ b/tests/mir-opt/storage_ranges.main.nll.0.mir
@@ -15,7 +15,7 @@
 | '?1 live at {bb0[0..=22]}
 | '?2 live at {bb0[10]}
 | '?3 live at {bb0[11]}
-| '?2: '?3 due to Assignment at Single(bb0[10]) ($DIR/storage_ranges.rs:6:17: 6:25 (#0)
+| '?2: '?3 due to Assignment at Single(bb0[10]) ($DIR/storage_ranges.rs:7:17: 7:25 (#0)
 |
 fn main() -> () {
     let mut _0: ();
diff --git a/tests/mir-opt/storage_ranges.rs b/tests/mir-opt/storage_ranges.rs
index 996051a2941..5a68d568465 100644
--- a/tests/mir-opt/storage_ranges.rs
+++ b/tests/mir-opt/storage_ranges.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR storage_ranges.main.nll.0.mir
 
 fn main() {
diff --git a/tests/mir-opt/switch_to_self.rs b/tests/mir-opt/switch_to_self.rs
index 6678e4b3bd2..fc270fd33cf 100644
--- a/tests/mir-opt/switch_to_self.rs
+++ b/tests/mir-opt/switch_to_self.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that MatchBranchSimplification doesn't ICE on a SwitchInt where
 // one of the targets is the block that the SwitchInt terminates.
 #![crate_type = "lib"]
diff --git a/tests/mir-opt/tls_access.rs b/tests/mir-opt/tls_access.rs
index 19344c86862..450dd9b4730 100644
--- a/tests/mir-opt/tls_access.rs
+++ b/tests/mir-opt/tls_access.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // EMIT_MIR tls_access.main.PreCodegen.after.mir
 // compile-flags: -Zmir-opt-level=0
 
diff --git a/tests/mir-opt/uninhabited_enum.rs b/tests/mir-opt/uninhabited_enum.rs
index 19db548157a..8816f31f9df 100644
--- a/tests/mir-opt/uninhabited_enum.rs
+++ b/tests/mir-opt/uninhabited_enum.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 #![feature(never_type)]
 
 pub enum Void {}
diff --git a/tests/mir-opt/uninhabited_enum_branching2.main.UninhabitedEnumBranching.diff b/tests/mir-opt/uninhabited_enum_branching.byref.UninhabitedEnumBranching.diff
index 12ce6505af9..7919450cdc5 100644
--- a/tests/mir-opt/uninhabited_enum_branching2.main.UninhabitedEnumBranching.diff
+++ b/tests/mir-opt/uninhabited_enum_branching.byref.UninhabitedEnumBranching.diff
@@ -1,12 +1,12 @@
-- // MIR for `main` before UninhabitedEnumBranching
-+ // MIR for `main` after UninhabitedEnumBranching
+- // MIR for `byref` before UninhabitedEnumBranching
++ // MIR for `byref` after UninhabitedEnumBranching
   
-  fn main() -> () {
+  fn byref() -> () {
       let mut _0: ();
       let _1: Plop;
-      let mut _2: Test1;
+      let mut _2: Test3;
       let _3: &str;
-      let mut _4: &Test1;
+      let mut _4: &Test3;
       let mut _5: isize;
       let _6: &str;
       let _7: &str;
@@ -23,15 +23,15 @@
       bb0: {
           StorageLive(_1);
           StorageLive(_2);
-          _2 = Test1::C;
-          _1 = Plop { xx: const 51_u32, test1: move _2 };
+          _2 = Test3::C;
+          _1 = Plop { xx: const 51_u32, test3: move _2 };
           StorageDead(_2);
           StorageLive(_3);
           StorageLive(_4);
-          _4 = &(_1.1: Test1);
+          _4 = &(_1.1: Test3);
           _5 = discriminant((*_4));
 -         switchInt(move _5) -> [0: bb3, 1: bb4, 2: bb5, 3: bb1, otherwise: bb2];
-+         switchInt(move _5) -> [2: bb5, 3: bb1, otherwise: bb2];
++         switchInt(move _5) -> [0: bb12, 1: bb12, 2: bb5, 3: bb1, otherwise: bb12];
       }
   
       bb1: {
@@ -71,9 +71,9 @@
           StorageDead(_4);
           StorageDead(_3);
           StorageLive(_9);
-          _10 = discriminant((_1.1: Test1));
+          _10 = discriminant((_1.1: Test3));
 -         switchInt(move _10) -> [0: bb8, 1: bb9, 2: bb10, 3: bb7, otherwise: bb2];
-+         switchInt(move _10) -> [2: bb10, 3: bb7, otherwise: bb2];
++         switchInt(move _10) -> [0: bb12, 1: bb12, 2: bb10, 3: bb7, otherwise: bb12];
       }
   
       bb7: {
@@ -110,6 +110,10 @@
           _0 = const ();
           StorageDead(_1);
           return;
++     }
++ 
++     bb12: {
++         unreachable;
       }
   }
   
diff --git a/tests/mir-opt/uninhabited_enum_branching.custom_discriminant.UninhabitedEnumBranching.diff b/tests/mir-opt/uninhabited_enum_branching.custom_discriminant.UninhabitedEnumBranching.diff
new file mode 100644
index 00000000000..5e15298a78c
--- /dev/null
+++ b/tests/mir-opt/uninhabited_enum_branching.custom_discriminant.UninhabitedEnumBranching.diff
@@ -0,0 +1,48 @@
+- // MIR for `custom_discriminant` before UninhabitedEnumBranching
++ // MIR for `custom_discriminant` after UninhabitedEnumBranching
+  
+  fn custom_discriminant() -> () {
+      let mut _0: ();
+      let _1: &str;
+      let mut _2: Test2;
+      let mut _3: isize;
+      let _4: &str;
+  
+      bb0: {
+          StorageLive(_1);
+          StorageLive(_2);
+          _2 = Test2::D;
+          _3 = discriminant(_2);
+-         switchInt(move _3) -> [4: bb3, 5: bb1, otherwise: bb2];
++         switchInt(move _3) -> [4: bb3, 5: bb1, otherwise: bb5];
+      }
+  
+      bb1: {
+          StorageLive(_4);
+          _4 = const "E";
+          _1 = &(*_4);
+          StorageDead(_4);
+          goto -> bb4;
+      }
+  
+      bb2: {
+          unreachable;
+      }
+  
+      bb3: {
+          _1 = const "D";
+          goto -> bb4;
+      }
+  
+      bb4: {
+          StorageDead(_2);
+          StorageDead(_1);
+          _0 = const ();
+          return;
++     }
++ 
++     bb5: {
++         unreachable;
+      }
+  }
+  
diff --git a/tests/mir-opt/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir b/tests/mir-opt/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
deleted file mode 100644
index 474f43104bb..00000000000
--- a/tests/mir-opt/uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
+++ /dev/null
@@ -1,60 +0,0 @@
-// MIR for `main` after SimplifyCfg-after-uninhabited-enum-branching
-
-fn main() -> () {
-    let mut _0: ();
-    let _1: &str;
-    let mut _2: Test1;
-    let mut _3: isize;
-    let _4: &str;
-    let _5: &str;
-    let _6: &str;
-    let mut _7: Test2;
-    let mut _8: isize;
-    let _9: &str;
-
-    bb0: {
-        StorageLive(_1);
-        StorageLive(_2);
-        _2 = Test1::C;
-        _3 = discriminant(_2);
-        switchInt(move _3) -> [2: bb1, otherwise: bb2];
-    }
-
-    bb1: {
-        StorageLive(_5);
-        _5 = const "C";
-        _1 = &(*_5);
-        StorageDead(_5);
-        StorageDead(_2);
-        StorageDead(_1);
-        StorageLive(_6);
-        StorageLive(_7);
-        _7 = Test2::D;
-        _8 = discriminant(_7);
-        switchInt(move _8) -> [4: bb4, 5: bb3, otherwise: bb2];
-    }
-
-    bb2: {
-        unreachable;
-    }
-
-    bb3: {
-        StorageLive(_9);
-        _9 = const "E";
-        _6 = &(*_9);
-        StorageDead(_9);
-        goto -> bb5;
-    }
-
-    bb4: {
-        _6 = const "D";
-        goto -> bb5;
-    }
-
-    bb5: {
-        StorageDead(_7);
-        StorageDead(_6);
-        _0 = const ();
-        return;
-    }
-}
diff --git a/tests/mir-opt/uninhabited_enum_branching.rs b/tests/mir-opt/uninhabited_enum_branching.rs
index 0ef604c3088..60389117b16 100644
--- a/tests/mir-opt/uninhabited_enum_branching.rs
+++ b/tests/mir-opt/uninhabited_enum_branching.rs
@@ -1,10 +1,11 @@
-enum Empty { }
+// unit-test: UninhabitedEnumBranching
+enum Empty {}
 
 // test matching an enum with uninhabited variants
 enum Test1 {
     A(Empty),
     B(Empty),
-    C
+    C,
 }
 
 // test an enum where the discriminants don't match the variant indexes
@@ -14,17 +15,75 @@ enum Test2 {
     E = 5,
 }
 
-// EMIT_MIR uninhabited_enum_branching.main.UninhabitedEnumBranching.diff
-// EMIT_MIR uninhabited_enum_branching.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
-fn main() {
+// test matching an enum with uninhabited variants and multiple inhabited
+enum Test3 {
+    A(Empty),
+    B(Empty),
+    C,
+    D,
+}
+
+struct Plop {
+    xx: u32,
+    test3: Test3,
+}
+
+// EMIT_MIR uninhabited_enum_branching.simple.UninhabitedEnumBranching.diff
+fn simple() {
+    // CHECK-LABEL: fn simple(
+    // CHECK: [[discr:_.*]] = discriminant(
+    // CHECK: switchInt(move [[discr]]) -> [0: [[unreachable:bb.*]], 1: [[unreachable]], 2: bb1, otherwise: [[unreachable]]];
+    // CHECK: [[unreachable]]: {
+    // CHECK-NEXT: unreachable;
     match Test1::C {
         Test1::A(_) => "A(Empty)",
         Test1::B(_) => "B(Empty)",
         Test1::C => "C",
     };
+}
 
+// EMIT_MIR uninhabited_enum_branching.custom_discriminant.UninhabitedEnumBranching.diff
+fn custom_discriminant() {
+    // CHECK-LABEL: fn custom_discriminant(
+    // CHECK: [[discr:_.*]] = discriminant(
+    // CHECK: switchInt(move [[discr]]) -> [4: bb3, 5: bb1, otherwise: bb5];
+    // CHECK: bb5: {
+    // CHECK-NEXT: unreachable;
     match Test2::D {
         Test2::D => "D",
         Test2::E => "E",
     };
 }
+
+// EMIT_MIR uninhabited_enum_branching.byref.UninhabitedEnumBranching.diff
+fn byref() {
+    // CHECK-LABEL: fn byref(
+    let plop = Plop { xx: 51, test3: Test3::C };
+
+    // CHECK: [[ref_discr:_.*]] = discriminant((*
+    // CHECK: switchInt(move [[ref_discr]]) -> [0: [[unreachable:bb.*]], 1: [[unreachable]], 2: bb5, 3: bb1, otherwise: [[unreachable]]];
+    match &plop.test3 {
+        Test3::A(_) => "A(Empty)",
+        Test3::B(_) => "B(Empty)",
+        Test3::C => "C",
+        Test3::D => "D",
+    };
+
+    // CHECK: [[discr:_.*]] = discriminant(
+    // CHECK: switchInt(move [[discr]]) -> [0: [[unreachable]], 1: [[unreachable]], 2: bb10, 3: bb7, otherwise: [[unreachable]]];
+    match plop.test3 {
+        Test3::A(_) => "A(Empty)",
+        Test3::B(_) => "B(Empty)",
+        Test3::C => "C",
+        Test3::D => "D",
+    };
+
+    // CHECK: [[unreachable]]: {
+    // CHECK-NEXT: unreachable;
+}
+
+fn main() {
+    simple();
+    custom_discriminant();
+    byref();
+}
diff --git a/tests/mir-opt/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff b/tests/mir-opt/uninhabited_enum_branching.simple.UninhabitedEnumBranching.diff
index 9db95abec34..410db79802e 100644
--- a/tests/mir-opt/uninhabited_enum_branching.main.UninhabitedEnumBranching.diff
+++ b/tests/mir-opt/uninhabited_enum_branching.simple.UninhabitedEnumBranching.diff
@@ -1,17 +1,13 @@
-- // MIR for `main` before UninhabitedEnumBranching
-+ // MIR for `main` after UninhabitedEnumBranching
+- // MIR for `simple` before UninhabitedEnumBranching
++ // MIR for `simple` after UninhabitedEnumBranching
   
-  fn main() -> () {
+  fn simple() -> () {
       let mut _0: ();
       let _1: &str;
       let mut _2: Test1;
       let mut _3: isize;
       let _4: &str;
       let _5: &str;
-      let _6: &str;
-      let mut _7: Test2;
-      let mut _8: isize;
-      let _9: &str;
   
       bb0: {
           StorageLive(_1);
@@ -19,7 +15,7 @@
           _2 = Test1::C;
           _3 = discriminant(_2);
 -         switchInt(move _3) -> [0: bb3, 1: bb4, 2: bb1, otherwise: bb2];
-+         switchInt(move _3) -> [2: bb1, otherwise: bb2];
++         switchInt(move _3) -> [0: bb6, 1: bb6, 2: bb1, otherwise: bb6];
       }
   
       bb1: {
@@ -50,31 +46,12 @@
       bb5: {
           StorageDead(_2);
           StorageDead(_1);
-          StorageLive(_6);
-          StorageLive(_7);
-          _7 = Test2::D;
-          _8 = discriminant(_7);
-          switchInt(move _8) -> [4: bb7, 5: bb6, otherwise: bb2];
-      }
-  
-      bb6: {
-          StorageLive(_9);
-          _9 = const "E";
-          _6 = &(*_9);
-          StorageDead(_9);
-          goto -> bb8;
-      }
-  
-      bb7: {
-          _6 = const "D";
-          goto -> bb8;
-      }
-  
-      bb8: {
-          StorageDead(_7);
-          StorageDead(_6);
           _0 = const ();
           return;
++     }
++ 
++     bb6: {
++         unreachable;
       }
   }
   
diff --git a/tests/mir-opt/uninhabited_enum_branching2.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir b/tests/mir-opt/uninhabited_enum_branching2.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
deleted file mode 100644
index 9c0c5d18917..00000000000
--- a/tests/mir-opt/uninhabited_enum_branching2.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
+++ /dev/null
@@ -1,85 +0,0 @@
-// MIR for `main` after SimplifyCfg-after-uninhabited-enum-branching
-
-fn main() -> () {
-    let mut _0: ();
-    let _1: Plop;
-    let mut _2: Test1;
-    let _3: &str;
-    let mut _4: &Test1;
-    let mut _5: isize;
-    let _6: &str;
-    let _7: &str;
-    let _8: &str;
-    let _9: &str;
-    let mut _10: isize;
-    let _11: &str;
-    let _12: &str;
-    let _13: &str;
-    scope 1 {
-        debug plop => _1;
-    }
-
-    bb0: {
-        StorageLive(_1);
-        StorageLive(_2);
-        _2 = Test1::C;
-        _1 = Plop { xx: const 51_u32, test1: move _2 };
-        StorageDead(_2);
-        StorageLive(_3);
-        StorageLive(_4);
-        _4 = &(_1.1: Test1);
-        _5 = discriminant((*_4));
-        switchInt(move _5) -> [2: bb3, 3: bb1, otherwise: bb2];
-    }
-
-    bb1: {
-        StorageLive(_8);
-        _8 = const "D";
-        _3 = &(*_8);
-        StorageDead(_8);
-        goto -> bb4;
-    }
-
-    bb2: {
-        unreachable;
-    }
-
-    bb3: {
-        StorageLive(_7);
-        _7 = const "C";
-        _3 = &(*_7);
-        StorageDead(_7);
-        goto -> bb4;
-    }
-
-    bb4: {
-        StorageDead(_4);
-        StorageDead(_3);
-        StorageLive(_9);
-        _10 = discriminant((_1.1: Test1));
-        switchInt(move _10) -> [2: bb6, 3: bb5, otherwise: bb2];
-    }
-
-    bb5: {
-        StorageLive(_13);
-        _13 = const "D";
-        _9 = &(*_13);
-        StorageDead(_13);
-        goto -> bb7;
-    }
-
-    bb6: {
-        StorageLive(_12);
-        _12 = const "C";
-        _9 = &(*_12);
-        StorageDead(_12);
-        goto -> bb7;
-    }
-
-    bb7: {
-        StorageDead(_9);
-        _0 = const ();
-        StorageDead(_1);
-        return;
-    }
-}
diff --git a/tests/mir-opt/uninhabited_enum_branching2.rs b/tests/mir-opt/uninhabited_enum_branching2.rs
deleted file mode 100644
index e22e94314d9..00000000000
--- a/tests/mir-opt/uninhabited_enum_branching2.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-enum Empty { }
-
-// test matching an enum with uninhabited variants
-enum Test1 {
-    A(Empty),
-    B(Empty),
-    C,
-    D,
-}
-
-struct Plop {
-    xx: u32,
-    test1: Test1,
-}
-
-// EMIT_MIR uninhabited_enum_branching2.main.UninhabitedEnumBranching.diff
-// EMIT_MIR uninhabited_enum_branching2.main.SimplifyCfg-after-uninhabited-enum-branching.after.mir
-fn main() {
-    let plop = Plop { xx: 51, test1: Test1::C };
-
-    match &plop.test1 {
-        Test1::A(_) => "A(Empty)",
-        Test1::B(_) => "B(Empty)",
-        Test1::C => "C",
-        Test1::D => "D",
-    };
-
-    match plop.test1 {
-        Test1::A(_) => "A(Empty)",
-        Test1::B(_) => "B(Empty)",
-        Test1::C => "C",
-        Test1::D => "D",
-    };
-}
diff --git a/tests/mir-opt/uninhabited_fallthrough_elimination.keep_fallthrough.UninhabitedEnumBranching.diff b/tests/mir-opt/uninhabited_fallthrough_elimination.keep_fallthrough.UninhabitedEnumBranching.diff
index 498e1e20f8a..79948139f88 100644
--- a/tests/mir-opt/uninhabited_fallthrough_elimination.keep_fallthrough.UninhabitedEnumBranching.diff
+++ b/tests/mir-opt/uninhabited_fallthrough_elimination.keep_fallthrough.UninhabitedEnumBranching.diff
@@ -9,7 +9,7 @@
       bb0: {
           _2 = discriminant(_1);
 -         switchInt(move _2) -> [0: bb2, 1: bb3, otherwise: bb1];
-+         switchInt(move _2) -> [1: bb3, otherwise: bb1];
++         switchInt(move _2) -> [0: bb5, 1: bb3, otherwise: bb1];
       }
   
       bb1: {
@@ -29,6 +29,10 @@
   
       bb4: {
           return;
++     }
++ 
++     bb5: {
++         unreachable;
       }
   }
   
diff --git a/tests/mir-opt/uninhabited_fallthrough_elimination.rs b/tests/mir-opt/uninhabited_fallthrough_elimination.rs
index 0853883f8b8..7dd41aea5ed 100644
--- a/tests/mir-opt/uninhabited_fallthrough_elimination.rs
+++ b/tests/mir-opt/uninhabited_fallthrough_elimination.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 enum Empty {}
 
 enum S {
diff --git a/tests/mir-opt/unreachable.as_match.UnreachablePropagation.panic-abort.diff b/tests/mir-opt/unreachable.as_match.UnreachablePropagation.panic-abort.diff
new file mode 100644
index 00000000000..f6e594ffac7
--- /dev/null
+++ b/tests/mir-opt/unreachable.as_match.UnreachablePropagation.panic-abort.diff
@@ -0,0 +1,45 @@
+- // MIR for `as_match` before UnreachablePropagation
++ // MIR for `as_match` after UnreachablePropagation
+  
+  fn as_match() -> () {
+      let mut _0: ();
+      let mut _1: std::option::Option<Empty>;
+      let mut _2: isize;
+      let _3: Empty;
+      let mut _4: !;
++     let mut _5: bool;
+      scope 1 {
+          debug _x => _3;
+      }
+  
+      bb0: {
+          StorageLive(_1);
+          _1 = empty() -> [return: bb1, unwind unreachable];
+      }
+  
+      bb1: {
+          _2 = discriminant(_1);
+-         switchInt(move _2) -> [0: bb4, 1: bb2, otherwise: bb3];
++         _5 = Eq(_2, const 0_isize);
++         assume(move _5);
++         goto -> bb4;
+      }
+  
+      bb2: {
+-         StorageLive(_3);
+-         _3 = move ((_1 as Some).0: Empty);
+-         StorageLive(_4);
+          unreachable;
+      }
+  
+      bb3: {
+          unreachable;
+      }
+  
+      bb4: {
+          _0 = const ();
+          StorageDead(_1);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/unreachable.as_match.UnreachablePropagation.panic-unwind.diff b/tests/mir-opt/unreachable.as_match.UnreachablePropagation.panic-unwind.diff
new file mode 100644
index 00000000000..2813d64672e
--- /dev/null
+++ b/tests/mir-opt/unreachable.as_match.UnreachablePropagation.panic-unwind.diff
@@ -0,0 +1,45 @@
+- // MIR for `as_match` before UnreachablePropagation
++ // MIR for `as_match` after UnreachablePropagation
+  
+  fn as_match() -> () {
+      let mut _0: ();
+      let mut _1: std::option::Option<Empty>;
+      let mut _2: isize;
+      let _3: Empty;
+      let mut _4: !;
++     let mut _5: bool;
+      scope 1 {
+          debug _x => _3;
+      }
+  
+      bb0: {
+          StorageLive(_1);
+          _1 = empty() -> [return: bb1, unwind continue];
+      }
+  
+      bb1: {
+          _2 = discriminant(_1);
+-         switchInt(move _2) -> [0: bb4, 1: bb2, otherwise: bb3];
++         _5 = Eq(_2, const 0_isize);
++         assume(move _5);
++         goto -> bb4;
+      }
+  
+      bb2: {
+-         StorageLive(_3);
+-         _3 = move ((_1 as Some).0: Empty);
+-         StorageLive(_4);
+          unreachable;
+      }
+  
+      bb3: {
+          unreachable;
+      }
+  
+      bb4: {
+          _0 = const ();
+          StorageDead(_1);
+          return;
+      }
+  }
+  
diff --git a/tests/mir-opt/unreachable.main.UnreachablePropagation.panic-abort.diff b/tests/mir-opt/unreachable.if_let.UnreachablePropagation.panic-abort.diff
index eb5a0c39b0b..61959732720 100644
--- a/tests/mir-opt/unreachable.main.UnreachablePropagation.panic-abort.diff
+++ b/tests/mir-opt/unreachable.if_let.UnreachablePropagation.panic-abort.diff
@@ -1,13 +1,14 @@
-- // MIR for `main` before UnreachablePropagation
-+ // MIR for `main` after UnreachablePropagation
+- // MIR for `if_let` before UnreachablePropagation
++ // MIR for `if_let` after UnreachablePropagation
   
-  fn main() -> () {
+  fn if_let() -> () {
       let mut _0: ();
       let mut _1: std::option::Option<Empty>;
       let mut _2: isize;
       let _5: ();
       let mut _6: bool;
       let mut _7: !;
++     let mut _8: bool;
       scope 1 {
           debug _x => _3;
           let _3: Empty;
@@ -25,7 +26,9 @@
       bb1: {
           _2 = discriminant(_1);
 -         switchInt(move _2) -> [1: bb2, otherwise: bb6];
-+         switchInt(move _2) -> [1: bb2, otherwise: bb3];
++         _8 = Ne(_2, const 1_isize);
++         assume(move _8);
++         goto -> bb6;
       }
   
       bb2: {
@@ -36,29 +39,31 @@
 -         StorageLive(_6);
 -         _6 = const true;
 -         switchInt(move _6) -> [0: bb4, otherwise: bb3];
--     }
-- 
--     bb3: {
++         unreachable;
+      }
+  
+      bb3: {
 -         _4 = const 21_i32;
 -         _5 = const ();
 -         goto -> bb5;
--     }
-- 
--     bb4: {
++         unreachable;
+      }
+  
+      bb4: {
 -         _4 = const 42_i32;
 -         _5 = const ();
 -         goto -> bb5;
--     }
-- 
--     bb5: {
++         unreachable;
+      }
+  
+      bb5: {
 -         StorageDead(_6);
 -         StorageDead(_5);
 -         StorageLive(_7);
           unreachable;
       }
   
--     bb6: {
-+     bb3: {
+      bb6: {
           _0 = const ();
           StorageDead(_1);
           return;
diff --git a/tests/mir-opt/unreachable.main.UnreachablePropagation.panic-unwind.diff b/tests/mir-opt/unreachable.if_let.UnreachablePropagation.panic-unwind.diff
index 906dce9819f..476e2f55994 100644
--- a/tests/mir-opt/unreachable.main.UnreachablePropagation.panic-unwind.diff
+++ b/tests/mir-opt/unreachable.if_let.UnreachablePropagation.panic-unwind.diff
@@ -1,13 +1,14 @@
-- // MIR for `main` before UnreachablePropagation
-+ // MIR for `main` after UnreachablePropagation
+- // MIR for `if_let` before UnreachablePropagation
++ // MIR for `if_let` after UnreachablePropagation
   
-  fn main() -> () {
+  fn if_let() -> () {
       let mut _0: ();
       let mut _1: std::option::Option<Empty>;
       let mut _2: isize;
       let _5: ();
       let mut _6: bool;
       let mut _7: !;
++     let mut _8: bool;
       scope 1 {
           debug _x => _3;
           let _3: Empty;
@@ -25,7 +26,9 @@
       bb1: {
           _2 = discriminant(_1);
 -         switchInt(move _2) -> [1: bb2, otherwise: bb6];
-+         switchInt(move _2) -> [1: bb2, otherwise: bb3];
++         _8 = Ne(_2, const 1_isize);
++         assume(move _8);
++         goto -> bb6;
       }
   
       bb2: {
@@ -36,29 +39,31 @@
 -         StorageLive(_6);
 -         _6 = const true;
 -         switchInt(move _6) -> [0: bb4, otherwise: bb3];
--     }
-- 
--     bb3: {
++         unreachable;
+      }
+  
+      bb3: {
 -         _4 = const 21_i32;
 -         _5 = const ();
 -         goto -> bb5;
--     }
-- 
--     bb4: {
++         unreachable;
+      }
+  
+      bb4: {
 -         _4 = const 42_i32;
 -         _5 = const ();
 -         goto -> bb5;
--     }
-- 
--     bb5: {
++         unreachable;
+      }
+  
+      bb5: {
 -         StorageDead(_6);
 -         StorageDead(_5);
 -         StorageLive(_7);
           unreachable;
       }
   
--     bb6: {
-+     bb3: {
+      bb6: {
           _0 = const ();
           StorageDead(_1);
           return;
diff --git a/tests/mir-opt/unreachable.rs b/tests/mir-opt/unreachable.rs
index 23fad4737fe..5b96681d9df 100644
--- a/tests/mir-opt/unreachable.rs
+++ b/tests/mir-opt/unreachable.rs
@@ -1,12 +1,31 @@
+// unit-test: UnreachablePropagation
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
 enum Empty {}
 
 fn empty() -> Option<Empty> {
     None
 }
 
-// EMIT_MIR unreachable.main.UnreachablePropagation.diff
-fn main() {
+// EMIT_MIR unreachable.if_let.UnreachablePropagation.diff
+fn if_let() {
+    // CHECK-LABEL: fn if_let(
+    // CHECK: bb0: {
+    // CHECK: {{_.*}} = empty()
+    // CHECK: bb1: {
+    // CHECK: [[ne:_.*]] = Ne({{.*}}, const 1_isize);
+    // CHECK-NEXT: assume(move [[ne]]);
+    // CHECK-NEXT: goto -> bb6;
+    // CHECK: bb2: {
+    // CHECK-NEXT: unreachable;
+    // CHECK: bb3: {
+    // CHECK-NEXT: unreachable;
+    // CHECK: bb4: {
+    // CHECK-NEXT: unreachable;
+    // CHECK: bb5: {
+    // CHECK-NEXT: unreachable;
+    // CHECK: bb6: {
+    // CHECK: return;
     if let Some(_x) = empty() {
         let mut _y;
 
@@ -19,3 +38,29 @@ fn main() {
         match _x { }
     }
 }
+
+// EMIT_MIR unreachable.as_match.UnreachablePropagation.diff
+fn as_match() {
+    // CHECK-LABEL: fn as_match(
+    // CHECK: bb0: {
+    // CHECK: {{_.*}} = empty()
+    // CHECK: bb1: {
+    // CHECK: [[eq:_.*]] = Eq({{.*}}, const 0_isize);
+    // CHECK-NEXT: assume(move [[eq]]);
+    // CHECK-NEXT: goto -> bb4;
+    // CHECK: bb2: {
+    // CHECK-NEXT: unreachable;
+    // CHECK: bb3: {
+    // CHECK-NEXT: unreachable;
+    // CHECK: bb4: {
+    // CHECK: return;
+    match empty() {
+        None => {}
+        Some(_x) => match _x {}
+    }
+}
+
+fn main() {
+    if_let();
+    as_match();
+}
diff --git a/tests/mir-opt/unreachable_diverging.main.UnreachablePropagation.panic-abort.diff b/tests/mir-opt/unreachable_diverging.main.UnreachablePropagation.panic-abort.diff
index 713757ce6e0..11d7924e736 100644
--- a/tests/mir-opt/unreachable_diverging.main.UnreachablePropagation.panic-abort.diff
+++ b/tests/mir-opt/unreachable_diverging.main.UnreachablePropagation.panic-abort.diff
@@ -9,6 +9,7 @@
       let _5: ();
       let mut _6: bool;
       let mut _7: !;
++     let mut _8: bool;
       scope 1 {
           debug x => _1;
           scope 2 {
@@ -35,7 +36,10 @@
           StorageLive(_5);
           StorageLive(_6);
           _6 = _1;
-          switchInt(move _6) -> [0: bb4, otherwise: bb3];
+-         switchInt(move _6) -> [0: bb4, otherwise: bb3];
++         _8 = Ne(_6, const false);
++         assume(move _8);
++         goto -> bb3;
       }
   
       bb3: {
diff --git a/tests/mir-opt/unreachable_diverging.main.UnreachablePropagation.panic-unwind.diff b/tests/mir-opt/unreachable_diverging.main.UnreachablePropagation.panic-unwind.diff
index a0479fb9130..df6f5609fbf 100644
--- a/tests/mir-opt/unreachable_diverging.main.UnreachablePropagation.panic-unwind.diff
+++ b/tests/mir-opt/unreachable_diverging.main.UnreachablePropagation.panic-unwind.diff
@@ -9,6 +9,7 @@
       let _5: ();
       let mut _6: bool;
       let mut _7: !;
++     let mut _8: bool;
       scope 1 {
           debug x => _1;
           scope 2 {
@@ -35,7 +36,10 @@
           StorageLive(_5);
           StorageLive(_6);
           _6 = _1;
-          switchInt(move _6) -> [0: bb4, otherwise: bb3];
+-         switchInt(move _6) -> [0: bb4, otherwise: bb3];
++         _8 = Ne(_6, const false);
++         assume(move _8);
++         goto -> bb3;
       }
   
       bb3: {
diff --git a/tests/mir-opt/unreachable_diverging.rs b/tests/mir-opt/unreachable_diverging.rs
index b7d308b8630..b1df6f85262 100644
--- a/tests/mir-opt/unreachable_diverging.rs
+++ b/tests/mir-opt/unreachable_diverging.rs
@@ -1,4 +1,6 @@
+// unit-test: UnreachablePropagation
 // EMIT_MIR_FOR_EACH_PANIC_STRATEGY
+
 pub enum Empty {}
 
 fn empty() -> Option<Empty> {
@@ -11,6 +13,23 @@ fn loop_forever() {
 
 // EMIT_MIR unreachable_diverging.main.UnreachablePropagation.diff
 fn main() {
+    // CHECK-LABEL: fn main(
+    // CHECK: bb0: {
+    // CHECK: {{_.*}} = empty()
+    // CHECK: bb1: {
+    // CHECK: switchInt({{.*}}) -> [1: bb2, otherwise: bb6];
+    // CHECK: bb2: {
+    // CHECK: [[ne:_.*]] = Ne({{.*}}, const false);
+    // CHECK: assume(move [[ne]]);
+    // CHECK: goto -> bb3;
+    // CHECK: bb3: {
+    // CHECK: {{_.*}} = loop_forever()
+    // CHECK: bb4: {
+    // CHECK: unreachable;
+    // CHECK: bb5: {
+    // CHECK: unreachable;
+    // CHECK: bb6: {
+    // CHECK: return;
     let x = true;
     if let Some(bomb) = empty() {
         if x {
diff --git a/tests/mir-opt/unusual_item_types.rs b/tests/mir-opt/unusual_item_types.rs
index 6dad636416f..49b663b4f82 100644
--- a/tests/mir-opt/unusual_item_types.rs
+++ b/tests/mir-opt/unusual_item_types.rs
@@ -1,3 +1,4 @@
+// skip-filecheck
 // Test that we don't ICE when trying to dump MIR for unusual item types and
 // that we don't create filenames containing `<` and `>`
 // compile-flags: -Zmir-opt-level=0
diff --git a/tests/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir b/tests/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
index e2edbfcd4fa..a5121ae550d 100644
--- a/tests/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
+++ b/tests/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
@@ -1,6 +1,6 @@
-// MIR for `<impl at $DIR/unusual_item_types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT` after built
+// MIR for `<impl at $DIR/unusual_item_types.rs:10:1: 10:7>::ASSOCIATED_CONSTANT` after built
 
-const <impl at $DIR/unusual_item_types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT: i32 = {
+const <impl at $DIR/unusual_item_types.rs:10:1: 10:7>::ASSOCIATED_CONSTANT: i32 = {
     let mut _0: i32;
 
     bb0: {
diff --git a/tests/mir-opt/while_storage.rs b/tests/mir-opt/while_storage.rs
deleted file mode 100644
index d4fb54da575..00000000000
--- a/tests/mir-opt/while_storage.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
-// Test that we correctly generate StorageDead statements for while loop
-// conditions on all branches
-
-fn get_bool(c: bool) -> bool {
-    c
-}
-
-// EMIT_MIR while_storage.while_loop.PreCodegen.after.mir
-fn while_loop(c: bool) {
-    while get_bool(c) {
-        if get_bool(c) {
-            break;
-        }
-    }
-}
-
-fn main() {
-    while_loop(false);
-}
diff --git a/tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-abort.mir b/tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-abort.mir
deleted file mode 100644
index c04fdeb637d..00000000000
--- a/tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-abort.mir
+++ /dev/null
@@ -1,46 +0,0 @@
-// MIR for `while_loop` after PreCodegen
-
-fn while_loop(_1: bool) -> () {
-    debug c => _1;
-    let mut _0: ();
-    let mut _2: bool;
-    let mut _3: bool;
-
-    bb0: {
-        goto -> bb1;
-    }
-
-    bb1: {
-        StorageLive(_2);
-        _2 = get_bool(_1) -> [return: bb2, unwind unreachable];
-    }
-
-    bb2: {
-        switchInt(move _2) -> [0: bb7, otherwise: bb3];
-    }
-
-    bb3: {
-        StorageLive(_3);
-        _3 = get_bool(_1) -> [return: bb4, unwind unreachable];
-    }
-
-    bb4: {
-        switchInt(move _3) -> [0: bb5, otherwise: bb6];
-    }
-
-    bb5: {
-        StorageDead(_3);
-        StorageDead(_2);
-        goto -> bb1;
-    }
-
-    bb6: {
-        StorageDead(_3);
-        goto -> bb7;
-    }
-
-    bb7: {
-        StorageDead(_2);
-        return;
-    }
-}
diff --git a/tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-unwind.mir
deleted file mode 100644
index 7dc4f7ab1a8..00000000000
--- a/tests/mir-opt/while_storage.while_loop.PreCodegen.after.panic-unwind.mir
+++ /dev/null
@@ -1,46 +0,0 @@
-// MIR for `while_loop` after PreCodegen
-
-fn while_loop(_1: bool) -> () {
-    debug c => _1;
-    let mut _0: ();
-    let mut _2: bool;
-    let mut _3: bool;
-
-    bb0: {
-        goto -> bb1;
-    }
-
-    bb1: {
-        StorageLive(_2);
-        _2 = get_bool(_1) -> [return: bb2, unwind continue];
-    }
-
-    bb2: {
-        switchInt(move _2) -> [0: bb7, otherwise: bb3];
-    }
-
-    bb3: {
-        StorageLive(_3);
-        _3 = get_bool(_1) -> [return: bb4, unwind continue];
-    }
-
-    bb4: {
-        switchInt(move _3) -> [0: bb5, otherwise: bb6];
-    }
-
-    bb5: {
-        StorageDead(_3);
-        StorageDead(_2);
-        goto -> bb1;
-    }
-
-    bb6: {
-        StorageDead(_3);
-        goto -> bb7;
-    }
-
-    bb7: {
-        StorageDead(_2);
-        return;
-    }
-}
diff --git a/tests/pretty/format-args-str-escape.pp b/tests/pretty/format-args-str-escape.pp
new file mode 100644
index 00000000000..b84bc2303b7
--- /dev/null
+++ b/tests/pretty/format-args-str-escape.pp
@@ -0,0 +1,21 @@
+#![feature(prelude_import)]
+#![no_std]
+#[prelude_import]
+use ::std::prelude::rust_2015::*;
+#[macro_use]
+extern crate std;
+// pretty-compare-only
+// pretty-mode:expanded
+// pp-exact:format-args-str-escape.pp
+
+fn main() {
+    { ::std::io::_print(format_args!("\u{1b}[1mHello, world!\u{1b}[0m\n")); };
+    { ::std::io::_print(format_args!("\u{1b}[1mHello, world!\u{1b}[0m\n")); };
+    {
+        ::std::io::_print(format_args!("Not an escape sequence: \\u{{1B}}[1mbold\\x1B[0m\n"));
+    };
+    {
+        ::std::io::_print(format_args!("{0}\n",
+                "\x1B[1mHello, world!\x1B[0m"));
+    };
+}
diff --git a/tests/pretty/format-args-str-escape.rs b/tests/pretty/format-args-str-escape.rs
new file mode 100644
index 00000000000..e596fcfd8bc
--- /dev/null
+++ b/tests/pretty/format-args-str-escape.rs
@@ -0,0 +1,10 @@
+// pretty-compare-only
+// pretty-mode:expanded
+// pp-exact:format-args-str-escape.pp
+
+fn main() {
+    println!("\x1B[1mHello, world!\x1B[0m");
+    println!("\u{1B}[1mHello, world!\u{1B}[0m");
+    println!("Not an escape sequence: \\u{{1B}}[1mbold\\x1B[0m");
+    println!("{}", "\x1B[1mHello, world!\x1B[0m");
+}
diff --git a/tests/pretty/hir-fn-variadic.pp b/tests/pretty/hir-fn-variadic.pp
new file mode 100644
index 00000000000..577d9400ad4
--- /dev/null
+++ b/tests/pretty/hir-fn-variadic.pp
@@ -0,0 +1,15 @@
+// pretty-compare-only
+// pretty-mode:hir
+// pp-exact:hir-fn-variadic.pp
+
+#![feature(c_variadic)]
+#[prelude_import]
+use ::std::prelude::rust_2015::*;
+#[macro_use]
+extern crate std;
+
+extern "C" {
+    fn foo(x: i32, va1: ...);
+}
+
+unsafe extern "C" fn bar(_: i32, mut va2: ...) -> usize { va2.arg::<usize>() }
diff --git a/tests/pretty/hir-fn-variadic.rs b/tests/pretty/hir-fn-variadic.rs
new file mode 100644
index 00000000000..efb2754df62
--- /dev/null
+++ b/tests/pretty/hir-fn-variadic.rs
@@ -0,0 +1,13 @@
+// pretty-compare-only
+// pretty-mode:hir
+// pp-exact:hir-fn-variadic.pp
+
+#![feature(c_variadic)]
+
+extern "C" {
+    pub fn foo(x: i32, va1: ...);
+}
+
+pub unsafe extern "C" fn bar(_: i32, mut va2: ...) -> usize {
+    va2.arg::<usize>()
+}
diff --git a/tests/run-coverage/bad_counter_ids.coverage b/tests/run-coverage/bad_counter_ids.coverage
new file mode 100644
index 00000000000..d69ebf160ea
--- /dev/null
+++ b/tests/run-coverage/bad_counter_ids.coverage
@@ -0,0 +1,69 @@
+   LL|       |#![feature(coverage_attribute)]
+   LL|       |// compile-flags: --edition=2021 -Copt-level=0 -Zmir-opt-level=3
+   LL|       |
+   LL|       |// Regression test for <https://github.com/rust-lang/rust/issues/117012>.
+   LL|       |//
+   LL|       |// If some coverage counters were removed by MIR optimizations, we need to take
+   LL|       |// care not to refer to those counter IDs in coverage mappings, and instead
+   LL|       |// replace them with a constant zero value. If we don't, `llvm-cov` might see
+   LL|       |// a too-large counter ID and silently discard the entire function from its
+   LL|       |// coverage reports.
+   LL|       |
+   LL|      8|#[derive(Debug, PartialEq, Eq)]
+   LL|       |struct Foo(u32);
+   LL|       |
+   LL|      1|fn eq_good() {
+   LL|      1|    println!("a");
+   LL|      1|    assert_eq!(Foo(1), Foo(1));
+   LL|      1|}
+   LL|       |
+   LL|      1|fn eq_good_message() {
+   LL|      1|    println!("b");
+   LL|      1|    assert_eq!(Foo(1), Foo(1), "message b");
+                                             ^0
+   LL|      1|}
+   LL|       |
+   LL|      1|fn ne_good() {
+   LL|      1|    println!("c");
+   LL|      1|    assert_ne!(Foo(1), Foo(3));
+   LL|      1|}
+   LL|       |
+   LL|      1|fn ne_good_message() {
+   LL|      1|    println!("d");
+   LL|      1|    assert_ne!(Foo(1), Foo(3), "message d");
+                                             ^0
+   LL|      1|}
+   LL|       |
+   LL|      1|fn eq_bad() {
+   LL|      1|    println!("e");
+   LL|      1|    assert_eq!(Foo(1), Foo(3));
+   LL|      0|}
+   LL|       |
+   LL|      1|fn eq_bad_message() {
+   LL|      1|    println!("f");
+   LL|      1|    assert_eq!(Foo(1), Foo(3), "message f");
+   LL|      0|}
+   LL|       |
+   LL|      1|fn ne_bad() {
+   LL|      1|    println!("g");
+   LL|      1|    assert_ne!(Foo(1), Foo(1));
+   LL|      0|}
+   LL|       |
+   LL|      1|fn ne_bad_message() {
+   LL|      1|    println!("h");
+   LL|      1|    assert_ne!(Foo(1), Foo(1), "message h");
+   LL|      0|}
+   LL|       |
+   LL|       |#[coverage(off)]
+   LL|       |fn main() {
+   LL|       |    eq_good();
+   LL|       |    eq_good_message();
+   LL|       |    ne_good();
+   LL|       |    ne_good_message();
+   LL|       |
+   LL|       |    assert!(std::panic::catch_unwind(eq_bad).is_err());
+   LL|       |    assert!(std::panic::catch_unwind(eq_bad_message).is_err());
+   LL|       |    assert!(std::panic::catch_unwind(ne_bad).is_err());
+   LL|       |    assert!(std::panic::catch_unwind(ne_bad_message).is_err());
+   LL|       |}
+
diff --git a/tests/run-coverage/bad_counter_ids.rs b/tests/run-coverage/bad_counter_ids.rs
new file mode 100644
index 00000000000..ef5460102b7
--- /dev/null
+++ b/tests/run-coverage/bad_counter_ids.rs
@@ -0,0 +1,66 @@
+#![feature(coverage_attribute)]
+// compile-flags: --edition=2021 -Copt-level=0 -Zmir-opt-level=3
+
+// Regression test for <https://github.com/rust-lang/rust/issues/117012>.
+//
+// If some coverage counters were removed by MIR optimizations, we need to take
+// care not to refer to those counter IDs in coverage mappings, and instead
+// replace them with a constant zero value. If we don't, `llvm-cov` might see
+// a too-large counter ID and silently discard the entire function from its
+// coverage reports.
+
+#[derive(Debug, PartialEq, Eq)]
+struct Foo(u32);
+
+fn eq_good() {
+    println!("a");
+    assert_eq!(Foo(1), Foo(1));
+}
+
+fn eq_good_message() {
+    println!("b");
+    assert_eq!(Foo(1), Foo(1), "message b");
+}
+
+fn ne_good() {
+    println!("c");
+    assert_ne!(Foo(1), Foo(3));
+}
+
+fn ne_good_message() {
+    println!("d");
+    assert_ne!(Foo(1), Foo(3), "message d");
+}
+
+fn eq_bad() {
+    println!("e");
+    assert_eq!(Foo(1), Foo(3));
+}
+
+fn eq_bad_message() {
+    println!("f");
+    assert_eq!(Foo(1), Foo(3), "message f");
+}
+
+fn ne_bad() {
+    println!("g");
+    assert_ne!(Foo(1), Foo(1));
+}
+
+fn ne_bad_message() {
+    println!("h");
+    assert_ne!(Foo(1), Foo(1), "message h");
+}
+
+#[coverage(off)]
+fn main() {
+    eq_good();
+    eq_good_message();
+    ne_good();
+    ne_good_message();
+
+    assert!(std::panic::catch_unwind(eq_bad).is_err());
+    assert!(std::panic::catch_unwind(eq_bad_message).is_err());
+    assert!(std::panic::catch_unwind(ne_bad).is_err());
+    assert!(std::panic::catch_unwind(ne_bad_message).is_err());
+}
diff --git a/tests/run-coverage/generator.coverage b/tests/run-coverage/coroutine.coverage
index daba2bea8b8..3a9791a0dbd 100644
--- a/tests/run-coverage/generator.coverage
+++ b/tests/run-coverage/coroutine.coverage
@@ -1,11 +1,11 @@
-   LL|       |#![feature(generators, generator_trait)]
+   LL|       |#![feature(coroutines, coroutine_trait)]
    LL|       |
-   LL|       |use std::ops::{Generator, GeneratorState};
+   LL|       |use std::ops::{Coroutine, CoroutineState};
    LL|       |use std::pin::Pin;
    LL|       |
    LL|       |// The following implementation of a function called from a `yield` statement
    LL|       |// (apparently requiring the Result and the `String` type or constructor)
-   LL|       |// creates conditions where the `generator::StateTransform` MIR transform will
+   LL|       |// creates conditions where the `coroutine::StateTransform` MIR transform will
    LL|       |// drop all `Counter` `Coverage` statements from a MIR. `simplify.rs` has logic
    LL|       |// to handle this condition, and still report dead block coverage.
    LL|      1|fn get_u32(val: bool) -> Result<u32, String> {
@@ -15,17 +15,17 @@
    LL|       |
    LL|      1|fn main() {
    LL|      1|    let is_true = std::env::args().len() == 1;
-   LL|      1|    let mut generator = || {
+   LL|      1|    let mut coroutine = || {
    LL|      1|        yield get_u32(is_true);
    LL|      1|        return "foo";
    LL|      1|    };
    LL|       |
-   LL|      1|    match Pin::new(&mut generator).resume(()) {
-   LL|      1|        GeneratorState::Yielded(Ok(1)) => {}
+   LL|      1|    match Pin::new(&mut coroutine).resume(()) {
+   LL|      1|        CoroutineState::Yielded(Ok(1)) => {}
    LL|      0|        _ => panic!("unexpected return from resume"),
    LL|       |    }
-   LL|      1|    match Pin::new(&mut generator).resume(()) {
-   LL|      1|        GeneratorState::Complete("foo") => {}
+   LL|      1|    match Pin::new(&mut coroutine).resume(()) {
+   LL|      1|        CoroutineState::Complete("foo") => {}
    LL|      0|        _ => panic!("unexpected return from resume"),
    LL|       |    }
    LL|      1|}
diff --git a/tests/coverage-map/status-quo/generator.rs b/tests/run-coverage/coroutine.rs
index 4319991021e..86d19af6f4f 100644
--- a/tests/coverage-map/status-quo/generator.rs
+++ b/tests/run-coverage/coroutine.rs
@@ -1,11 +1,11 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 // The following implementation of a function called from a `yield` statement
 // (apparently requiring the Result and the `String` type or constructor)
-// creates conditions where the `generator::StateTransform` MIR transform will
+// creates conditions where the `coroutine::StateTransform` MIR transform will
 // drop all `Counter` `Coverage` statements from a MIR. `simplify.rs` has logic
 // to handle this condition, and still report dead block coverage.
 fn get_u32(val: bool) -> Result<u32, String> {
@@ -14,17 +14,17 @@ fn get_u32(val: bool) -> Result<u32, String> {
 
 fn main() {
     let is_true = std::env::args().len() == 1;
-    let mut generator = || {
+    let mut coroutine = || {
         yield get_u32(is_true);
         return "foo";
     };
 
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Yielded(Ok(1)) => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Yielded(Ok(1)) => {}
         _ => panic!("unexpected return from resume"),
     }
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Complete("foo") => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Complete("foo") => {}
         _ => panic!("unexpected return from resume"),
     }
 }
diff --git a/tests/run-coverage/fn_sig_into_try.coverage b/tests/run-coverage/fn_sig_into_try.coverage
new file mode 100644
index 00000000000..f1ddb1da780
--- /dev/null
+++ b/tests/run-coverage/fn_sig_into_try.coverage
@@ -0,0 +1,45 @@
+   LL|       |#![feature(coverage_attribute)]
+   LL|       |// compile-flags: --edition=2021
+   LL|       |
+   LL|       |// Regression test for inconsistent handling of function signature spans that
+   LL|       |// are followed by code using the `?` operator.
+   LL|       |//
+   LL|       |// For each of these similar functions, the line containing the function
+   LL|       |// signature should be handled in the same way.
+   LL|       |
+   LL|      1|fn a() -> Option<i32>
+   LL|      1|{
+   LL|      1|    Some(7i32);
+   LL|      1|    Some(0)
+   LL|      1|}
+   LL|       |
+   LL|      1|fn b() -> Option<i32>
+   LL|      1|{
+   LL|      1|    Some(7i32)?;
+                            ^0
+   LL|      1|    Some(0)
+   LL|      1|}
+   LL|       |
+   LL|      1|fn c() -> Option<i32>
+   LL|      1|{
+   LL|      1|    let _ = Some(7i32)?;
+                                    ^0
+   LL|      1|    Some(0)
+   LL|      1|}
+   LL|       |
+   LL|      1|fn d() -> Option<i32>
+   LL|      1|{
+   LL|      1|    let _: () = ();
+   LL|      1|    Some(7i32)?;
+                            ^0
+   LL|      1|    Some(0)
+   LL|      1|}
+   LL|       |
+   LL|       |#[coverage(off)]
+   LL|       |fn main() {
+   LL|       |    a();
+   LL|       |    b();
+   LL|       |    c();
+   LL|       |    d();
+   LL|       |}
+
diff --git a/tests/run-coverage/fn_sig_into_try.rs b/tests/run-coverage/fn_sig_into_try.rs
new file mode 100644
index 00000000000..92850c8a188
--- /dev/null
+++ b/tests/run-coverage/fn_sig_into_try.rs
@@ -0,0 +1,41 @@
+#![feature(coverage_attribute)]
+// compile-flags: --edition=2021
+
+// Regression test for inconsistent handling of function signature spans that
+// are followed by code using the `?` operator.
+//
+// For each of these similar functions, the line containing the function
+// signature should be handled in the same way.
+
+fn a() -> Option<i32>
+{
+    Some(7i32);
+    Some(0)
+}
+
+fn b() -> Option<i32>
+{
+    Some(7i32)?;
+    Some(0)
+}
+
+fn c() -> Option<i32>
+{
+    let _ = Some(7i32)?;
+    Some(0)
+}
+
+fn d() -> Option<i32>
+{
+    let _: () = ();
+    Some(7i32)?;
+    Some(0)
+}
+
+#[coverage(off)]
+fn main() {
+    a();
+    b();
+    c();
+    d();
+}
diff --git a/tests/run-coverage/issue-84561.coverage b/tests/run-coverage/issue-84561.coverage
index 222f877d36a..e693866e277 100644
--- a/tests/run-coverage/issue-84561.coverage
+++ b/tests/run-coverage/issue-84561.coverage
@@ -135,7 +135,7 @@
    LL|      0|}
    LL|       |
    LL|       |impl std::fmt::Debug for Foo {
-   LL|       |    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
+   LL|      7|    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
    LL|      7|        write!(f, "try and succeed")?;
                                                   ^0
    LL|      7|        Ok(())
diff --git a/tests/run-coverage/yield.coverage b/tests/run-coverage/yield.coverage
index 90c2641a7d6..d7e455f211e 100644
--- a/tests/run-coverage/yield.coverage
+++ b/tests/run-coverage/yield.coverage
@@ -1,37 +1,37 @@
-   LL|       |#![feature(generators, generator_trait)]
+   LL|       |#![feature(coroutines, coroutine_trait)]
    LL|       |#![allow(unused_assignments)]
    LL|       |
-   LL|       |use std::ops::{Generator, GeneratorState};
+   LL|       |use std::ops::{Coroutine, CoroutineState};
    LL|       |use std::pin::Pin;
    LL|       |
    LL|      1|fn main() {
-   LL|      1|    let mut generator = || {
+   LL|      1|    let mut coroutine = || {
    LL|      1|        yield 1;
    LL|      1|        return "foo";
    LL|      1|    };
    LL|       |
-   LL|      1|    match Pin::new(&mut generator).resume(()) {
-   LL|      1|        GeneratorState::Yielded(1) => {}
+   LL|      1|    match Pin::new(&mut coroutine).resume(()) {
+   LL|      1|        CoroutineState::Yielded(1) => {}
    LL|      0|        _ => panic!("unexpected value from resume"),
    LL|       |    }
-   LL|      1|    match Pin::new(&mut generator).resume(()) {
-   LL|      1|        GeneratorState::Complete("foo") => {}
+   LL|      1|    match Pin::new(&mut coroutine).resume(()) {
+   LL|      1|        CoroutineState::Complete("foo") => {}
    LL|      0|        _ => panic!("unexpected value from resume"),
    LL|       |    }
    LL|       |
-   LL|      1|    let mut generator = || {
+   LL|      1|    let mut coroutine = || {
    LL|      1|        yield 1;
    LL|      1|        yield 2;
    LL|      0|        yield 3;
    LL|      0|        return "foo";
    LL|      0|    };
    LL|       |
-   LL|      1|    match Pin::new(&mut generator).resume(()) {
-   LL|      1|        GeneratorState::Yielded(1) => {}
+   LL|      1|    match Pin::new(&mut coroutine).resume(()) {
+   LL|      1|        CoroutineState::Yielded(1) => {}
    LL|      0|        _ => panic!("unexpected value from resume"),
    LL|       |    }
-   LL|      1|    match Pin::new(&mut generator).resume(()) {
-   LL|      1|        GeneratorState::Yielded(2) => {}
+   LL|      1|    match Pin::new(&mut coroutine).resume(()) {
+   LL|      1|        CoroutineState::Yielded(2) => {}
    LL|      0|        _ => panic!("unexpected value from resume"),
    LL|       |    }
    LL|      1|}
diff --git a/tests/run-coverage/yield.rs b/tests/run-coverage/yield.rs
index 361275c9215..b7e2ba31b59 100644
--- a/tests/run-coverage/yield.rs
+++ b/tests/run-coverage/yield.rs
@@ -1,37 +1,37 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 #![allow(unused_assignments)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 fn main() {
-    let mut generator = || {
+    let mut coroutine = || {
         yield 1;
         return "foo";
     };
 
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Yielded(1) => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Yielded(1) => {}
         _ => panic!("unexpected value from resume"),
     }
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Complete("foo") => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Complete("foo") => {}
         _ => panic!("unexpected value from resume"),
     }
 
-    let mut generator = || {
+    let mut coroutine = || {
         yield 1;
         yield 2;
         yield 3;
         return "foo";
     };
 
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Yielded(1) => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Yielded(1) => {}
         _ => panic!("unexpected value from resume"),
     }
-    match Pin::new(&mut generator).resume(()) {
-        GeneratorState::Yielded(2) => {}
+    match Pin::new(&mut coroutine).resume(()) {
+        CoroutineState::Yielded(2) => {}
         _ => panic!("unexpected value from resume"),
     }
 }
diff --git a/tests/run-make-fulldeps/issue-19371/foo.rs b/tests/run-make-fulldeps/issue-19371/foo.rs
index 1c9d33dcc8e..1a94649163b 100644
--- a/tests/run-make-fulldeps/issue-19371/foo.rs
+++ b/tests/run-make-fulldeps/issue-19371/foo.rs
@@ -7,7 +7,7 @@ extern crate rustc_span;
 
 use rustc_interface::interface;
 use rustc_session::config::{Input, Options, OutFileName, OutputType, OutputTypes};
-use rustc_span::source_map::FileName;
+use rustc_span::FileName;
 
 use std::path::PathBuf;
 
@@ -57,10 +57,12 @@ fn compile(code: String, output: PathBuf, sysroot: PathBuf) {
         locale_resources: &[],
         lint_caps: Default::default(),
         parse_sess_created: None,
+        hash_untracked_state: None,
         register_lints: None,
         override_queries: None,
         make_codegen_backend: None,
         registry: rustc_driver::diagnostics_registry(),
+        using_internal_features: std::sync::Arc::default(),
         expanded_args: Default::default(),
     };
 
diff --git a/tests/run-make/coverage-llvmir/filecheck.testprog.txt b/tests/run-make/coverage-llvmir/filecheck.testprog.txt
index 9d63fabd788..8ab18da21a2 100644
--- a/tests/run-make/coverage-llvmir/filecheck.testprog.txt
+++ b/tests/run-make/coverage-llvmir/filecheck.testprog.txt
@@ -3,12 +3,12 @@
 
 WINDOWS:      $__llvm_profile_runtime_user = comdat any
 
-CHECK:        @__covrec_{{[A-F0-9]+}}u = linkonce_odr hidden constant
-CHECK-SAME:   section "[[INSTR_PROF_COVFUN]]"[[COMDAT_IF_SUPPORTED]], align 8
-
 CHECK:        @__llvm_coverage_mapping = private constant
 CHECK-SAME:   section "[[INSTR_PROF_COVMAP]]", align 8
 
+CHECK:        @__covrec_{{[A-F0-9]+}}u = linkonce_odr hidden constant
+CHECK-SAME:   section "[[INSTR_PROF_COVFUN]]"[[COMDAT_IF_SUPPORTED]], align 8
+
 WINDOWS:      @__llvm_profile_runtime = external{{.*}}global i32
 
 CHECK:        @__profc__R{{[a-zA-Z0-9_]+}}testprog14will_be_called = {{private|internal}} global
diff --git a/tests/run-make/crate-hash-rustc-version/Makefile b/tests/run-make/crate-hash-rustc-version/Makefile
index f1d2a360410..6bf504bf01b 100644
--- a/tests/run-make/crate-hash-rustc-version/Makefile
+++ b/tests/run-make/crate-hash-rustc-version/Makefile
@@ -4,7 +4,7 @@ include ../tools.mk
 # Ensure that crates compiled with different rustc versions cannot
 # be dynamically linked.
 
-FLAGS := -Cprefer-dynamic -Zsymbol-mangling-version=v0
+FLAGS := -Cprefer-dynamic -Csymbol-mangling-version=v0
 UNAME := $(shell uname)
 ifeq ($(UNAME),Linux)
   EXT=".so"
diff --git a/tests/run-make/dump-ice-to-disk/check.sh b/tests/run-make/dump-ice-to-disk/check.sh
index ab6f9ab6018..ff6e4be35af 100644
--- a/tests/run-make/dump-ice-to-disk/check.sh
+++ b/tests/run-make/dump-ice-to-disk/check.sh
@@ -11,6 +11,12 @@ export RUSTC_ICE=$TMPDIR
 $RUSTC src/lib.rs -Z treat-err-as-bug=1 1>$TMPDIR/rust-test-default-set.log 2>&1
 default_set=$(cat $TMPDIR/rustc-ice-*.txt | wc -l)
 content=$(cat $TMPDIR/rustc-ice-*.txt)
+# Ensure that the ICE dump path doesn't contain `:` because they cause problems on Windows
+windows_safe=$(echo rustc-ice-*.txt | grep ':')
+if [ ! -z "$windows_safe" ]; then
+    exit 1
+fi
+
 rm $TMPDIR/rustc-ice-*.txt
 RUST_BACKTRACE=short $RUSTC src/lib.rs -Z treat-err-as-bug=1 1>$TMPDIR/rust-test-short.log 2>&1
 short=$(cat $TMPDIR/rustc-ice-*.txt | wc -l)
diff --git a/tests/run-make/emit-stack-sizes/foo.rs b/tests/run-make/emit-stack-sizes/foo.rs
index ee51ae32886..fd0b5120578 100644
--- a/tests/run-make/emit-stack-sizes/foo.rs
+++ b/tests/run-make/emit-stack-sizes/foo.rs
@@ -1,3 +1,4 @@
 #![crate_type = "lib"]
 
+#[inline(never)]
 pub fn foo() {}
diff --git a/tests/run-make/intrinsic-unreachable/exit-ret.rs b/tests/run-make/intrinsic-unreachable/exit-ret.rs
index e7b9694d9f2..c8ba5b4599f 100644
--- a/tests/run-make/intrinsic-unreachable/exit-ret.rs
+++ b/tests/run-make/intrinsic-unreachable/exit-ret.rs
@@ -2,6 +2,7 @@
 use std::arch::asm;
 
 #[deny(unreachable_code)]
+#[inline(never)]
 pub fn exit(n: usize) -> i32 {
     unsafe {
         // Pretend this asm is an exit() syscall.
diff --git a/tests/run-make/intrinsic-unreachable/exit-unreachable.rs b/tests/run-make/intrinsic-unreachable/exit-unreachable.rs
index ec85db733df..75f893eb2df 100644
--- a/tests/run-make/intrinsic-unreachable/exit-unreachable.rs
+++ b/tests/run-make/intrinsic-unreachable/exit-unreachable.rs
@@ -5,6 +5,7 @@ use std::arch::asm;
 use std::intrinsics;
 
 #[allow(unreachable_code)]
+#[inline(never)]
 pub fn exit(n: usize) -> i32 {
     unsafe {
         // Pretend this asm is an exit() syscall.
diff --git a/tests/run-make/issue-96498/Makefile b/tests/run-make/issue-96498/Makefile
deleted file mode 100644
index efdd328c671..00000000000
--- a/tests/run-make/issue-96498/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# only-windows
-# needs-rust-lld
-
-include ../tools.mk
-
-# Ensure that LLD can link
-all:
-	$(RUSTC) -C linker=rust-lld foo.rs
diff --git a/tests/run-make/remap-path-prefix-dwarf/Makefile b/tests/run-make/remap-path-prefix-dwarf/Makefile
index c9ede1b6027..8905a00ea28 100644
--- a/tests/run-make/remap-path-prefix-dwarf/Makefile
+++ b/tests/run-make/remap-path-prefix-dwarf/Makefile
@@ -3,17 +3,26 @@
 
 # ignore-windows
 
+include ../tools.mk
+
 SRC_DIR := $(abspath .)
 SRC_DIR_PARENT := $(abspath ..)
 
-include ../tools.mk
+ifeq ($(UNAME),Darwin)
+  DEBUGINFOOPTS := -Csplit-debuginfo=off
+else
+  DEBUGINFOOPTS :=
+endif
 
 all: \
   abs_input_outside_working_dir \
   rel_input_remap_working_dir \
+  rel_input_remap_working_dir_scope \
   rel_input_remap_working_dir_parent \
   rel_input_remap_working_dir_child \
+  rel_input_remap_working_dir_diagnostics \
   abs_input_inside_working_dir \
+  abs_input_inside_working_dir_scope \
   abs_input_outside_working_dir
 
 # The compiler is called with an *ABSOLUTE PATH* as input, and that absolute path *is* within
@@ -27,6 +36,17 @@ abs_input_inside_working_dir:
 	# No weird duplication of remapped components (see #78479)
 	"$(LLVM_BIN_DIR)"/llvm-dwarfdump $(TMPDIR)/abs_input_inside_working_dir.rlib | $(CGREP) -v "REMAPPED/REMAPPED"
 
+# The compiler is called with an *ABSOLUTE PATH* as input, and that absolute path *is* within
+# the working directory of the compiler. We are remapping the path that contains `src`.
+abs_input_inside_working_dir_scope:
+	# We explicitly switch to a directory that *is* a prefix of the directory our
+	# source code is contained in.
+	cd $(SRC_DIR) && $(RUSTC) $(SRC_DIR)/src/quux.rs -o "$(TMPDIR)/abs_input_inside_working_dir_scope.rlib" -Cdebuginfo=2 --remap-path-prefix $(SRC_DIR)=REMAPPED -Zremap-path-scope=object $(DEBUGINFOOPTS)
+	# We expect the path to the main source file to be remapped.
+	"$(LLVM_BIN_DIR)"/llvm-dwarfdump $(TMPDIR)/abs_input_inside_working_dir_scope.rlib | $(CGREP) "REMAPPED/src/quux.rs"
+	# No weird duplication of remapped components (see #78479)
+	"$(LLVM_BIN_DIR)"/llvm-dwarfdump $(TMPDIR)/abs_input_inside_working_dir_scope.rlib | $(CGREP) -v "REMAPPED/REMAPPED"
+
 # The compiler is called with an *ABSOLUTE PATH* as input, and that absolute path is *not* within
 # the working directory of the compiler. We are remapping both the path that contains `src` and
 # the working directory to the same thing. This setup corresponds to a workaround that is needed
@@ -52,6 +72,21 @@ rel_input_remap_working_dir:
 	# No weird duplication of remapped components (see #78479)
 	"$(LLVM_BIN_DIR)"/llvm-dwarfdump "$(TMPDIR)/rel_input_remap_working_dir.rlib" | $(CGREP) -v "REMAPPED/REMAPPED"
 
+# The compiler is called with a *RELATIVE PATH* as input. We are remapping the working directory of
+# the compiler, which naturally is an implicit prefix of our relative input path. Debuginfo will
+# expand the relative path to an absolute path and we expect the working directory to be remapped
+# in that expansion.
+rel_input_remap_working_dir_scope:
+	cd $(SRC_DIR) && $(RUSTC) src/quux.rs -o "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" -Cdebuginfo=2 --remap-path-prefix "$(SRC_DIR)=REMAPPED" -Zremap-path-scope=object $(DEBUGINFOOPTS)
+	"$(LLVM_BIN_DIR)"/llvm-dwarfdump "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" | $(CGREP) "REMAPPED/src/quux.rs"
+	# No weird duplication of remapped components (see #78479)
+	"$(LLVM_BIN_DIR)"/llvm-dwarfdump "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" | $(CGREP) -v "REMAPPED/REMAPPED"
+
+rel_input_remap_working_dir_diagnostics:
+	cd $(SRC_DIR) && $(RUSTC) src/quux.rs -o "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" -Cdebuginfo=2 --remap-path-prefix "$(SRC_DIR)=REMAPPED" -Zremap-path-scope=diagnostics $(DEBUGINFOOPTS)
+	"$(LLVM_BIN_DIR)"/llvm-dwarfdump "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" | $(CGREP) -v "REMAPPED/src/quux.rs"
+	"$(LLVM_BIN_DIR)"/llvm-dwarfdump "$(TMPDIR)/rel_input_remap_working_dir_scope.rlib" | $(CGREP) -v "REMAPPED/REMAPPED"
+
 # The compiler is called with a *RELATIVE PATH* as input. We are remapping a *SUB-DIRECTORY* of the
 # compiler's working directory. This test makes sure that that directory is remapped even though it
 # won't actually show up in this form in the compiler's SourceMap and instead is only constructed
diff --git a/tests/run-make/remap-path-prefix/Makefile b/tests/run-make/remap-path-prefix/Makefile
index 2a7378fdf9e..35f65240ff9 100644
--- a/tests/run-make/remap-path-prefix/Makefile
+++ b/tests/run-make/remap-path-prefix/Makefile
@@ -2,8 +2,38 @@ include ../tools.mk
 
 # ignore-windows
 
+ifeq ($(UNAME),Darwin)
+  DEBUGINFOOPTS := -Csplit-debuginfo=off
+else
+  DEBUGINFOOPTS :=
+endif
+
+all: remap remap-with-scope
+
 # Checks if remapping works if the remap-from string contains path to the working directory plus more
-all:
+remap:
 	$(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux --crate-type=lib --emit=metadata auxiliary/lib.rs
 	grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
 	! grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1
+
+remap-with-scope:
+	$(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux -Zremap-path-scope=object $(DEBUGINFOOPTS) --crate-type=lib --emit=metadata auxiliary/lib.rs
+	grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
+	! grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1
+
+	$(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux -Zremap-path-scope=diagnostics $(DEBUGINFOOPTS) --crate-type=lib --emit=metadata auxiliary/lib.rs
+	! grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
+	grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1
+
+	$(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux -Zremap-path-scope=diagnostics,object $(DEBUGINFOOPTS) --crate-type=lib --emit=metadata auxiliary/lib.rs
+	grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
+	! grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1
+
+	$(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux -Zremap-path-scope=split-debuginfo $(DEBUGINFOOPTS) --crate-type=lib --emit=metadata auxiliary/lib.rs
+	! grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
+	grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1
+
+    # FIXME: We should test the split debuginfo files, but we don't currently a good infra for that
+	$(RUSTC) --remap-path-prefix $$PWD/auxiliary=/the/aux -Zremap-path-scope=split-debuginfo -Zunstable-options -Csplit-debuginfo=packed --crate-type=lib --emit=metadata auxiliary/lib.rs
+	grep "/the/aux/lib.rs" $(TMPDIR)/liblib.rmeta || exit 1
+	! grep "$$PWD/auxiliary" $(TMPDIR)/liblib.rmeta || exit 1
diff --git a/tests/run-make/rust-lld-custom-target/Makefile b/tests/run-make/rust-lld-custom-target/Makefile
new file mode 100644
index 00000000000..007493ab0b9
--- /dev/null
+++ b/tests/run-make/rust-lld-custom-target/Makefile
@@ -0,0 +1,7 @@
+include ../tools.mk
+
+# needs-rust-lld
+# only-x86_64-unknown-linux-gnu
+all:
+	RUSTC_LOG=rustc_codegen_ssa::back::link=info $(RUSTC) --crate-type cdylib --target custom-target.json -Clink-args=-Wl,-v lib.rs 2> $(TMPDIR)/output.txt
+	$(CGREP) -e "^LLD [0-9]+\.[0-9]+\.[0-9]+" < $(TMPDIR)/output.txt
diff --git a/tests/run-make/rust-lld-custom-target/custom-target.json b/tests/run-make/rust-lld-custom-target/custom-target.json
new file mode 100644
index 00000000000..7828a99f235
--- /dev/null
+++ b/tests/run-make/rust-lld-custom-target/custom-target.json
@@ -0,0 +1,57 @@
+{
+  "arch": "x86_64",
+  "cpu": "x86-64",
+  "crt-static-respected": true,
+  "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128",
+  "dynamic-linking": true,
+  "env": "gnu",
+  "has-rpath": true,
+  "has-thread-local": true,
+  "link-self-contained": {
+    "components": [
+      "linker"
+    ]
+  },
+  "linker-flavor": "gnu-lld-cc",
+  "llvm-target": "x86_64-unknown-linux-gnu",
+  "max-atomic-width": 64,
+  "os": "linux",
+  "plt-by-default": false,
+  "position-independent-executables": true,
+  "pre-link-args": {
+    "gnu-cc": [
+      "-m64"
+    ],
+    "gnu-lld-cc": [
+      "-m64"
+    ]
+  },
+  "relro-level": "full",
+  "stack-probes": {
+    "kind": "inline-or-call",
+    "min-llvm-version-for-inline": [
+      16,
+      0,
+      0
+    ]
+  },
+  "static-position-independent-executables": true,
+  "supported-sanitizers": [
+    "address",
+    "cfi",
+    "leak",
+    "memory",
+    "thread",
+    "safestack"
+  ],
+  "supported-split-debuginfo": [
+    "packed",
+    "unpacked",
+    "off"
+  ],
+  "supports-xray": true,
+  "target-family": [
+    "unix"
+  ],
+  "target-pointer-width": "64"
+}
diff --git a/tests/run-make/rust-lld-custom-target/lib.rs b/tests/run-make/rust-lld-custom-target/lib.rs
new file mode 100644
index 00000000000..d8f5e310821
--- /dev/null
+++ b/tests/run-make/rust-lld-custom-target/lib.rs
@@ -0,0 +1,9 @@
+// Test linking using `cc` with `rust-lld`, using a custom target with features described in MCP 510
+// see https://github.com/rust-lang/compiler-team/issues/510 for more info:
+//
+// Starting from the `x86_64-unknown-linux-gnu` target spec, we add the following options:
+// - a linker-flavor using lld via a C compiler
+// - the self-contained linker component is enabled
+
+#![feature(no_core)]
+#![no_core]
diff --git a/tests/run-make/split-debuginfo/Makefile b/tests/run-make/split-debuginfo/Makefile
index 71e014c1f71..9e05c8dc179 100644
--- a/tests/run-make/split-debuginfo/Makefile
+++ b/tests/run-make/split-debuginfo/Makefile
@@ -104,7 +104,7 @@ packed-lto-single:
 	ls $(TMPDIR)/*.dwp && exit 1 || exit 0
 	rm $(TMPDIR)/libbaz.rlib
 
-packed-remapped: packed-remapped-split packed-remapped-single
+packed-remapped: packed-remapped-split packed-remapped-single packed-remapped-scope packed-remapped-wrong-scope
 
 # - Debuginfo in `.dwo` files
 # - `.o` and binary refer to remapped `.dwo` paths which do not exist
@@ -134,6 +134,36 @@ packed-remapped-single:
 	rm $(TMPDIR)/foo.dwp
 	rm $(TMPDIR)/$(call BIN,foo)
 
+# - Debuginfo in `.o` files
+# - `.o` and binary refer to remapped `.o` paths which do not exist
+# - `.o` deleted
+# - `.dwo` never created
+# - `.dwp` present
+packed-remapped-scope:
+	$(RUSTC) $(UNSTABLEOPTS) -C split-debuginfo=packed -C debuginfo=2 \
+		-Z split-dwarf-kind=single --remap-path-prefix $(TMPDIR)=/a \
+		-Z remap-path-scope=split-debuginfo-path foo.rs -g
+	objdump -Wi $(TMPDIR)/foo | grep DW_AT_GNU_dwo_name | (! grep $(TMPDIR)) || exit 1
+	ls $(TMPDIR)/*.o && exit 1 || exit 0
+	ls $(TMPDIR)/*.dwo && exit 1 || exit 0
+	rm $(TMPDIR)/foo.dwp
+	rm $(TMPDIR)/$(call BIN,foo)
+
+# - Debuginfo in `.o` files
+# - `.o` and binary refer to remapped `.o` paths which do not exist
+# - `.o` deleted
+# - `.dwo` never created
+# - `.dwp` present
+packed-remapped-wrong-scope:
+	$(RUSTC) $(UNSTABLEOPTS) -C split-debuginfo=packed -C debuginfo=2 \
+		-Z split-dwarf-kind=single --remap-path-prefix $(TMPDIR)=/a \
+		-Z remap-path-scope=macro foo.rs -g
+	objdump -Wi $(TMPDIR)/foo | grep DW_AT_GNU_dwo_name | (grep $(TMPDIR)) || exit 1
+	ls $(TMPDIR)/*.o && exit 1 || exit 0
+	ls $(TMPDIR)/*.dwo && exit 1 || exit 0
+	rm $(TMPDIR)/foo.dwp
+	rm $(TMPDIR)/$(call BIN,foo)
+
 packed-crosscrate: packed-crosscrate-split packed-crosscrate-single
 
 # - Debuginfo in `.dwo` files
@@ -230,7 +260,7 @@ unpacked-lto-single:
 	ls $(TMPDIR)/*.dwp && exit 1 || exit 0
 	rm $(TMPDIR)/libbaz.rlib
 
-unpacked-remapped: unpacked-remapped-split unpacked-remapped-single
+unpacked-remapped: unpacked-remapped-split unpacked-remapped-single unpacked-remapped-scope unpacked-remapped-wrong-scope
 
 # - Debuginfo in `.dwo` files
 # - `.o` and binary refer to remapped `.dwo` paths which do not exist
@@ -260,6 +290,36 @@ unpacked-remapped-single:
 	ls $(TMPDIR)/*.dwp && exit 1 || exit 0
 	rm $(TMPDIR)/$(call BIN,foo)
 
+# - Debuginfo in `.o` files
+# - `.o` and binary refer to remapped `.o` paths which do not exist
+# - `.o` present
+# - `.dwo` never created
+# - `.dwp` never created
+unpacked-remapped-scope:
+	$(RUSTC) $(UNSTABLEOPTS) -C split-debuginfo=unpacked -C debuginfo=2 \
+		-Z split-dwarf-kind=single --remap-path-prefix $(TMPDIR)=/a \
+		-Z remap-path-scope=split-debuginfo-path foo.rs -g
+	objdump -Wi $(TMPDIR)/foo | grep DW_AT_GNU_dwo_name | (! grep $(TMPDIR)) || exit 1
+	rm $(TMPDIR)/*.o
+	ls $(TMPDIR)/*.dwo && exit 1 || exit 0
+	ls $(TMPDIR)/*.dwp && exit 1 || exit 0
+	rm $(TMPDIR)/$(call BIN,foo)
+
+# - Debuginfo in `.o` files
+# - `.o` and binary refer to remapped `.o` paths which do not exist
+# - `.o` present
+# - `.dwo` never created
+# - `.dwp` never created
+unpacked-remapped-wrong-scope:
+	$(RUSTC) $(UNSTABLEOPTS) -C split-debuginfo=unpacked -C debuginfo=2 \
+		-Z split-dwarf-kind=single --remap-path-prefix $(TMPDIR)=/a \
+		-Z remap-path-scope=macro foo.rs -g
+	objdump -Wi $(TMPDIR)/foo | grep DW_AT_GNU_dwo_name | (grep $(TMPDIR)) || exit 1
+	rm $(TMPDIR)/*.o
+	ls $(TMPDIR)/*.dwo && exit 1 || exit 0
+	ls $(TMPDIR)/*.dwp && exit 1 || exit 0
+	rm $(TMPDIR)/$(call BIN,foo)
+
 unpacked-crosscrate: unpacked-crosscrate-split unpacked-crosscrate-single
 
 # - Debuginfo in `.dwo` files
diff --git a/tests/run-make/unknown-mod-stdin/unknown-mod.stderr b/tests/run-make/unknown-mod-stdin/unknown-mod.stderr
index d7258fe4f68..81ff8393837 100644
--- a/tests/run-make/unknown-mod-stdin/unknown-mod.stderr
+++ b/tests/run-make/unknown-mod-stdin/unknown-mod.stderr
@@ -5,6 +5,7 @@ error[E0583]: file not found for module `unknown`
   | ^^^^^^^^^^^^
   |
   = help: to create the module `unknown`, create file "unknown.rs" or "unknown/mod.rs"
+  = note: if there is a `mod unknown` elsewhere in the crate already, import it with `use crate::...` instead
 
 error: aborting due to previous error
 
diff --git a/tests/run-make/use-extern-for-plugins/Makefile b/tests/run-make/use-extern-for-plugins/Makefile
deleted file mode 100644
index b8ec7e8dcda..00000000000
--- a/tests/run-make/use-extern-for-plugins/Makefile
+++ /dev/null
@@ -1,17 +0,0 @@
-include ../tools.mk
-
-# ignore-freebsd
-# ignore-openbsd
-# ignore-solaris
-
-HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
-ifeq ($(findstring i686,$(HOST)),i686)
-TARGET := $(subst i686,x86_64,$(HOST))
-else
-TARGET := $(subst x86_64,i686,$(HOST))
-endif
-
-all:
-	$(RUSTC) foo.rs -C extra-filename=-host
-	$(RUSTC) bar.rs -C extra-filename=-targ --target $(TARGET)
-	$(RUSTC) baz.rs --extern a=$(TMPDIR)/liba-targ.rlib --target $(TARGET)
diff --git a/tests/run-make/use-extern-for-plugins/bar.rs b/tests/run-make/use-extern-for-plugins/bar.rs
deleted file mode 100644
index 704d2120362..00000000000
--- a/tests/run-make/use-extern-for-plugins/bar.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-#![feature(no_core)]
-#![no_core]
-#![crate_type = "lib"]
-#![crate_name = "a"]
-
-#[macro_export]
-macro_rules! bar {
-    () => ()
-}
diff --git a/tests/run-make/use-extern-for-plugins/baz.rs b/tests/run-make/use-extern-for-plugins/baz.rs
deleted file mode 100644
index 49a96a0c80b..00000000000
--- a/tests/run-make/use-extern-for-plugins/baz.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![feature(no_core)]
-#![no_core]
-#![crate_type = "lib"]
-
-#[macro_use]
-extern crate a;
-
-bar!();
diff --git a/tests/run-make/use-extern-for-plugins/foo.rs b/tests/run-make/use-extern-for-plugins/foo.rs
deleted file mode 100644
index dffdc079887..00000000000
--- a/tests/run-make/use-extern-for-plugins/foo.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![no_std]
-#![crate_type = "lib"]
-#![crate_name = "a"]
-
-#[macro_export]
-macro_rules! foo {
-    () => ()
-}
diff --git a/tests/run-make/windows-safeseh/Makefile b/tests/run-make/windows-safeseh/Makefile
new file mode 100644
index 00000000000..d6a403961d7
--- /dev/null
+++ b/tests/run-make/windows-safeseh/Makefile
@@ -0,0 +1,19 @@
+# only-windows
+# needs-rust-lld
+
+include ../tools.mk
+
+all: foo bar
+
+# Ensure that LLD can link when an .rlib contains a synthetic object
+# file referencing exported or used symbols.
+foo:
+	$(RUSTC) -C linker=rust-lld foo.rs
+
+# Ensure that LLD can link when /WHOLEARCHIVE: is used with an .rlib.
+# Previously, lib.rmeta was not marked as (trivially) SAFESEH-aware.
+bar: baz
+	$(RUSTC) -C linker=rust-lld -C link-arg=/WHOLEARCHIVE:libbaz.rlib bar.rs
+
+baz:
+	$(RUSTC) baz.rs
diff --git a/tests/run-make/windows-safeseh/bar.rs b/tests/run-make/windows-safeseh/bar.rs
new file mode 100644
index 00000000000..f328e4d9d04
--- /dev/null
+++ b/tests/run-make/windows-safeseh/bar.rs
@@ -0,0 +1 @@
+fn main() {}
diff --git a/tests/run-make/windows-safeseh/baz.rs b/tests/run-make/windows-safeseh/baz.rs
new file mode 100644
index 00000000000..8d5b9dc5aea
--- /dev/null
+++ b/tests/run-make/windows-safeseh/baz.rs
@@ -0,0 +1,4 @@
+#![crate_type = "rlib"]
+
+#[no_mangle]
+extern "C" fn baz() {}
diff --git a/tests/run-make/issue-96498/foo.rs b/tests/run-make/windows-safeseh/foo.rs
index 93ac3641b09..93ac3641b09 100644
--- a/tests/run-make/issue-96498/foo.rs
+++ b/tests/run-make/windows-safeseh/foo.rs
diff --git a/tests/rustdoc-gui/code-tags.goml b/tests/rustdoc-gui/code-tags.goml
index 3405d3295e6..577f932e576 100644
--- a/tests/rustdoc-gui/code-tags.goml
+++ b/tests/rustdoc-gui/code-tags.goml
@@ -1,6 +1,6 @@
 // This test ensures that items and documentation code blocks are wrapped in <pre><code>
 
-// We need to disable this check because `implementors/test_docs/trait.AnotherOne.js`
+// We need to disable this check because `trait.impl/test_docs/trait.AnotherOne.js`
 // doesn't exist.
 fail-on-request-error: false
 go-to: "file://" + |DOC_PATH| + "/test_docs/fn.foo.html"
diff --git a/tests/rustdoc-gui/impl_on_foreign_order.goml b/tests/rustdoc-gui/impl_on_foreign_order.goml
new file mode 100644
index 00000000000..a6f5343beb2
--- /dev/null
+++ b/tests/rustdoc-gui/impl_on_foreign_order.goml
@@ -0,0 +1,6 @@
+// This test ensures that the "implementations on foreign types" of a trait are correctly sorted.
+go-to: "file://" + |DOC_PATH| + "/test_docs/foreign_impl_order/trait.Foo.html"
+assert-text: ("details:nth-of-type(1) h3", "impl Foo<1> for [u8; 1]")
+assert-text: ("details:nth-of-type(2) h3", "impl Foo<2> for [u8; 2]")
+assert-text: ("details:nth-of-type(3) h3", "impl Foo<3> for [u8; 3]")
+assert-text: ("details:nth-of-type(4) h3", "impl Foo<4> for [u8; 4]")
diff --git a/tests/rustdoc-gui/item-decl-colors.goml b/tests/rustdoc-gui/item-decl-colors.goml
index a777842735c..7bbd20c4ee0 100644
--- a/tests/rustdoc-gui/item-decl-colors.goml
+++ b/tests/rustdoc-gui/item-decl-colors.goml
@@ -1,6 +1,6 @@
 // This test ensures that the color of the items in the type decl are working as expected.
 
-// We need to disable this check because `implementors/test_docs/trait.TraitWithoutGenerics.js`
+// We need to disable this check because `trait.impl/test_docs/trait.TraitWithoutGenerics.js`
 // doesn't exist.
 fail-on-request-error: false
 
diff --git a/tests/rustdoc-gui/no-docblock.goml b/tests/rustdoc-gui/no-docblock.goml
index 1b4638ef067..2115b6f5390 100644
--- a/tests/rustdoc-gui/no-docblock.goml
+++ b/tests/rustdoc-gui/no-docblock.goml
@@ -1,6 +1,6 @@
 // This test checks that there are margins applied to methods with no docblocks.
 
-// We need to disable this check because `implementors/test_docs/trait.TraitWithNoDocblock.js`
+// We need to disable this check because `trait.impl/test_docs/trait.TraitWithNoDocblock.js`
 // doesn't exist.
 fail-on-request-error: false
 
diff --git a/tests/rustdoc-gui/search-tab.goml b/tests/rustdoc-gui/search-tab.goml
index 427201e1b5d..db1605ff220 100644
--- a/tests/rustdoc-gui/search-tab.goml
+++ b/tests/rustdoc-gui/search-tab.goml
@@ -79,8 +79,8 @@ call-function: ("check-colors", {
 set-window-size: (851, 600)
 
 // Check the size and count in tabs
-assert-text: ("#search-tabs > button:nth-child(1) > .count", " (23) ")
-assert-text: ("#search-tabs > button:nth-child(2) > .count", " (4)  ")
+assert-text: ("#search-tabs > button:nth-child(1) > .count", " (25) ")
+assert-text: ("#search-tabs > button:nth-child(2) > .count", " (5)  ")
 assert-text: ("#search-tabs > button:nth-child(3) > .count", " (0)  ")
 store-property: ("#search-tabs > button:nth-child(1)", {"offsetWidth": buttonWidth})
 assert-property: ("#search-tabs > button:nth-child(2)", {"offsetWidth": |buttonWidth|})
diff --git a/tests/rustdoc-gui/setting-auto-hide-content-large-items.goml b/tests/rustdoc-gui/setting-auto-hide-content-large-items.goml
index 6cd725043f4..b55a1cfd92b 100644
--- a/tests/rustdoc-gui/setting-auto-hide-content-large-items.goml
+++ b/tests/rustdoc-gui/setting-auto-hide-content-large-items.goml
@@ -1,7 +1,7 @@
 // This test ensures that the "Auto-hide item contents for large items" setting is working as
 // expected.
 
-// We need to disable this check because `implementors/test_docs/trait.Iterator.js` doesn't exist.
+// We need to disable this check because `trait.impl/test_docs/trait.Iterator.js` doesn't exist.
 fail-on-request-error: false
 
 define-function: (
diff --git a/tests/rustdoc-gui/src/lib2/lib.rs b/tests/rustdoc-gui/src/lib2/lib.rs
index 34e67d9d254..a2a3c31878b 100644
--- a/tests/rustdoc-gui/src/lib2/lib.rs
+++ b/tests/rustdoc-gui/src/lib2/lib.rs
@@ -147,13 +147,13 @@ pub struct LongItemInfo2;
 #[doc(cfg(any(target_os = "android", target_os = "linux", target_os = "emscripten", target_os = "dragonfly", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd")))]
 impl SimpleTrait for LongItemInfo2 {}
 
-pub struct WhereWhitespace<T>;
+pub struct WhereWhitespace<T>(T);
 
 impl<T> WhereWhitespace<T> {
     pub fn new<F>(f: F) -> Self
     where
         F: FnMut() -> i32,
-    {}
+    {todo!()}
 }
 
 impl<K, T> Whitespace<&K> for WhereWhitespace<T>
@@ -187,6 +187,11 @@ impl ItemInfoAlignmentTest {
 pub mod scroll_traits {
     use std::iter::*;
 
+    struct Intersperse<T>(T);
+    struct IntersperseWith<T, U>(T, U);
+    struct Flatten<T>(T);
+    struct Peekable<T>(T);
+
     /// Shamelessly (partially) copied from `std::iter::Iterator`.
     /// It allows us to check that the scroll is working as expected on "hidden" items.
     pub trait Iterator {
diff --git a/tests/rustdoc-gui/src/test_docs/lib.rs b/tests/rustdoc-gui/src/test_docs/lib.rs
index 5c91bcbb4ee..c7d115bdb98 100644
--- a/tests/rustdoc-gui/src/test_docs/lib.rs
+++ b/tests/rustdoc-gui/src/test_docs/lib.rs
@@ -160,6 +160,33 @@ pub mod keyword {}
 /// Just some type alias.
 pub type SomeType = u32;
 
+/// Another type alias, this time with methods.
+pub type SomeOtherTypeWithMethodsAndInlining = Foo;
+
+impl SomeOtherTypeWithMethodsAndInlining {
+    pub fn some_other_method_directly(&self) {}
+}
+
+/// Another type alias, this time with methods.
+pub struct UnderlyingFooBarBaz;
+pub type SomeOtherTypeWithMethodsAndInliningAndTraits = UnderlyingFooBarBaz;
+
+impl AsRef<str> for UnderlyingFooBarBaz {
+    fn as_ref(&self) -> &str {
+        "hello"
+    }
+}
+
+impl UnderlyingFooBarBaz {
+    pub fn inherent_fn(&self) {}
+}
+
+impl AsRef<u8> for SomeOtherTypeWithMethodsAndInliningAndTraits {
+    fn as_ref(&self) -> &u8 {
+        b"hello"
+    }
+}
+
 pub mod huge_amount_of_consts {
     include!(concat!(env!("OUT_DIR"), "/huge_amount_of_consts.rs"));
 }
@@ -547,3 +574,22 @@ impl ZyxwvutTrait for ZyxwvutMethodDisambiguation {
         x
     }
 }
+
+pub mod foreign_impl_order {
+    pub trait Foo<const W: usize> {
+        fn f(&mut self, with: [u8; W]);
+    }
+
+    impl Foo<4> for [u8; 4] {
+        fn f(&mut self, fg: [u8; 4]) {}
+    }
+    impl Foo<2> for [u8; 2] {
+        fn f(&mut self, fg: [u8; 2]) {}
+    }
+    impl Foo<1> for [u8; 1] {
+        fn f(&mut self, fg: [u8; 1]) {}
+    }
+    impl Foo<3> for [u8; 3] {
+        fn f(&mut self, fg: [u8; 3]) {}
+    }
+}
diff --git a/tests/rustdoc-gui/trait-sidebar-item-order.goml b/tests/rustdoc-gui/trait-sidebar-item-order.goml
index 9330ef040ec..73e362ca813 100644
--- a/tests/rustdoc-gui/trait-sidebar-item-order.goml
+++ b/tests/rustdoc-gui/trait-sidebar-item-order.goml
@@ -1,6 +1,6 @@
 // Checks that the elements in the sidebar are alphabetically sorted.
 
-// We need to disable this check because `implementors/test_docs/trait.AnotherOne.js`
+// We need to disable this check because `trait.impl/test_docs/trait.AnotherOne.js`
 // doesn't exist.
 fail-on-request-error: false
 
diff --git a/tests/rustdoc-gui/type-declation-overflow.goml b/tests/rustdoc-gui/type-declation-overflow.goml
index f212781e9b3..5780f5c88f8 100644
--- a/tests/rustdoc-gui/type-declation-overflow.goml
+++ b/tests/rustdoc-gui/type-declation-overflow.goml
@@ -2,7 +2,7 @@
 // This test ensures that the items declaration content overflow is handled inside the <pre> directly.
 
 // We need to disable this check because
-// `implementors/test_docs/trait.ALongNameBecauseItHelpsTestingTheCurrentProblem.js`
+// `trait.impl/test_docs/trait.ALongNameBecauseItHelpsTestingTheCurrentProblem.js`
 // doesn't exist.
 fail-on-request-error: false
 
diff --git a/tests/rustdoc-gui/type-impls.goml b/tests/rustdoc-gui/type-impls.goml
new file mode 100644
index 00000000000..870a9cbe53f
--- /dev/null
+++ b/tests/rustdoc-gui/type-impls.goml
@@ -0,0 +1,86 @@
+// The goal of this test is to check that the inlined type alias impls, generated with JS,
+// have the same display than the "local" ones.
+go-to: "file://" + |DOC_PATH| + "/test_docs/type.SomeOtherTypeWithMethodsAndInlining.html"
+
+// method directly on type alias
+wait-for: "//*[@id='method.some_other_method_directly']"
+
+// methods on foo
+assert: "//*[@id='method.as_ref']"
+assert: "//*[@id='method.must_use']"
+assert: "//*[@id='method.warning1']"
+assert: "//*[@id='method.warning2']"
+
+// sidebar items
+assert: "//*[@class='sidebar-elems']//li/a[@href='#method.must_use']"
+assert: "//*[@class='sidebar-elems']//li/a[@href='#method.some_other_method_directly']"
+assert: "//*[@class='sidebar-elems']//li/a[@href='#method.warning1']"
+assert: "//*[@class='sidebar-elems']//li/a[@href='#method.warning2']"
+assert: "//*[@class='sidebar-elems']//li/a[@href='#impl-AsRef%3Cstr%3E-for-Foo']"
+
+// sorting
+assert-text: (".block.method li:nth-child(1)", 'must_use')
+assert-text: (".block.method li:nth-child(2)", 'some_other_method_directly')
+assert-text: (".block.method li:nth-child(3)", 'warning1')
+assert-text: (".block.method li:nth-child(4)", 'warning2')
+
+// Now try trait implementation merging and duplicate renumbering
+go-to: "file://" + |DOC_PATH| + "/test_docs/type.SomeOtherTypeWithMethodsAndInliningAndTraits.html"
+
+// method directly on type alias
+assert: "//*[@id='method.as_ref']"
+assert-count: ("//*[@id='method.as_ref']", 1)
+// method on underlying type
+assert: "//*[@id='method.as_ref-1']"
+
+// sidebar items
+assert-count: (
+    "//*[@class='sidebar-elems']//h3/a[@href='#trait-implementations']",
+    1
+)
+assert-text: ("//*[@class='sidebar-elems']//li/a[@href='#impl-AsRef%3Cstr%3E-for-UnderlyingFooBarBaz']", "AsRef<str>")
+assert-text: (
+    "//*[@class='sidebar-elems']//li/a[@href='#impl-AsRef%3Cu8%3E-for-UnderlyingFooBarBaz']",
+    "AsRef<u8>"
+)
+assert-count: ("#trait-implementations-list", 1)
+assert-count: ("#trait-implementations-list > details", 2)
+// Both links point at the underlying trait
+store-property: ("//*[@id='method.as_ref']//a[@class='fn']", {"href": href})
+assert-property: ("//*[@id='method.as_ref-1']//a[@class='fn']", {"href": |href|})
+// Both links have a self-anchor
+assert: "//*[@id='method.as_ref']//a[@class='anchor'][@href='#method.as_ref']"
+assert: "//*[@id='method.as_ref-1']//a[@class='anchor'][@href='#method.as_ref-1']"
+
+///////////////////////////////////////////////////////////////////////////
+// Now, if JavaScript is disabled, only the first method will be present //
+///////////////////////////////////////////////////////////////////////////
+javascript: false
+go-to: "file://" + |DOC_PATH| + "/test_docs/type.SomeOtherTypeWithMethodsAndInlining.html"
+
+// method directly on type alias
+wait-for: "//*[@id='method.some_other_method_directly']"
+
+// methods on foo
+assert-false: "//*[@id='method.must_use']"
+assert-false: "//*[@id='method.warning1']"
+assert-false: "//*[@id='method.warning2']"
+
+// Now try trait implementation merging and duplicate renumbering
+go-to: "file://" + |DOC_PATH| + "/test_docs/type.SomeOtherTypeWithMethodsAndInliningAndTraits.html"
+
+// methods directly on type alias
+assert: "//*[@id='method.as_ref']"
+assert-count: ("//*[@id='method.as_ref']", 1)
+// method on target type
+assert-false: "//*[@id='method.as_ref-1']"
+
+// sidebar items
+assert-count: (
+    "//*[@class='sidebar-elems']//h3/a[@href='#trait-implementations']",
+    1
+)
+assert-false: "//a[@href='#impl-AsRef%3Cstr%3E-for-UnderlyingFooBarBaz']"
+assert: "//a[@href='#impl-AsRef%3Cu8%3E-for-UnderlyingFooBarBaz']"
+assert-count: ("#trait-implementations-list", 1)
+assert-count: ("#trait-implementations-list > details", 1)
diff --git a/tests/rustdoc-json/enums/field_hidden.rs b/tests/rustdoc-json/enums/field_hidden.rs
index 5c0d0ffd3df..f2409858057 100644
--- a/tests/rustdoc-json/enums/field_hidden.rs
+++ b/tests/rustdoc-json/enums/field_hidden.rs
@@ -1,7 +1,10 @@
 // Regression test for <https://github.com/rust-lang/rust/issues/100529>.
 
 #![no_core]
-#![feature(no_core)]
+#![feature(no_core, lang_items)]
+
+#[lang = "sized"]
+trait Sized {}
 
 // @has "$.index[*][?(@.name=='ParseError')]"
 // @has "$.index[*][?(@.name=='UnexpectedEndTag')]"
diff --git a/tests/rustdoc-json/enums/kind.rs b/tests/rustdoc-json/enums/kind.rs
index e283c074006..777161c4e4b 100644
--- a/tests/rustdoc-json/enums/kind.rs
+++ b/tests/rustdoc-json/enums/kind.rs
@@ -1,8 +1,11 @@
 // ignore-tidy-linelength
 
-#![feature(no_core)]
+#![feature(no_core, lang_items)]
 #![no_core]
 
+#[lang = "sized"]
+trait Sized {}
+
 pub enum Foo {
     // @set Unit = "$.index[*][?(@.name=='Unit')].id"
     // @is "$.index[*][?(@.name=='Unit')].inner.variant.kind" '"plain"'
diff --git a/tests/rustdoc-json/enums/tuple_fields_hidden.rs b/tests/rustdoc-json/enums/tuple_fields_hidden.rs
index 3aeb0356420..34a4f4aec53 100644
--- a/tests/rustdoc-json/enums/tuple_fields_hidden.rs
+++ b/tests/rustdoc-json/enums/tuple_fields_hidden.rs
@@ -1,6 +1,9 @@
-#![feature(no_core)]
+#![feature(no_core, lang_items)]
 #![no_core]
 
+#[lang = "sized"]
+trait Sized {}
+
 // @set 1.1.0 = "$.index[*][?(@.docs=='1.1.0')].id"
 // @set 2.1.0 = "$.index[*][?(@.docs=='2.1.0')].id"
 // @set 2.1.1 = "$.index[*][?(@.docs=='2.1.1')].id"
diff --git a/tests/rustdoc-json/generic-associated-types/gats.rs b/tests/rustdoc-json/generic-associated-types/gats.rs
index 99c57ff6540..9cfe649243f 100644
--- a/tests/rustdoc-json/generic-associated-types/gats.rs
+++ b/tests/rustdoc-json/generic-associated-types/gats.rs
@@ -1,11 +1,14 @@
 // ignore-tidy-linelength
 
 #![no_core]
-#![feature(lang_items, no_core)]
+#![feature(lang_items, no_core, arbitrary_self_types)]
 
 #[lang = "sized"]
 pub trait Sized {}
 
+#[lang = "receiver"]
+pub trait Receiver {}
+
 pub trait Display {}
 
 pub trait LendingIterator {
diff --git a/tests/rustdoc-json/impls/auto.rs b/tests/rustdoc-json/impls/auto.rs
index ace37e5b3df..96c3ab08b99 100644
--- a/tests/rustdoc-json/impls/auto.rs
+++ b/tests/rustdoc-json/impls/auto.rs
@@ -1,9 +1,12 @@
-#![feature(no_core, auto_traits, lang_items)]
+#![feature(no_core, auto_traits, lang_items, arbitrary_self_types)]
 #![no_core]
 
 #[lang = "sized"]
 trait Sized {}
 
+#[lang = "receiver"]
+pub trait Receiver {}
+
 pub auto trait Bar {}
 
 /// has span
@@ -12,8 +15,8 @@ impl Foo {
 }
 
 // Testing spans, so all tests below code
-// @is "$.index[*][?(@.docs=='has span')].span.begin" "[10, 0]"
-// @is "$.index[*][?(@.docs=='has span')].span.end" "[12, 1]"
+// @is "$.index[*][?(@.docs=='has span')].span.begin" "[13, 0]"
+// @is "$.index[*][?(@.docs=='has span')].span.end" "[15, 1]"
 // FIXME: this doesn't work due to https://github.com/freestrings/jsonpath/issues/91
 // is "$.index[*][?(@.inner.impl.synthetic==true)].span" null
 pub struct Foo;
diff --git a/tests/rustdoc-json/type/inherent_associated_type_bound.rs b/tests/rustdoc-json/type/inherent_associated_type_bound.rs
index 8e39f471824..6da23c8fb4e 100644
--- a/tests/rustdoc-json/type/inherent_associated_type_bound.rs
+++ b/tests/rustdoc-json/type/inherent_associated_type_bound.rs
@@ -16,5 +16,5 @@ pub struct Carrier<'a>(&'a ());
 pub fn user(_: for<'b> fn(Carrier<'b>::Focus<i32>)) {}
 
 impl<'a> Carrier<'a> {
-    pub type Focus<T> = &'a mut T;
+    pub type Focus<T> = &'a mut T where T: 'a;
 }
diff --git a/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs
index 5c500ce6ce0..806b6d1253d 100644
--- a/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs
+++ b/tests/rustdoc-ui/check-cfg/check-cfg-unstable.rs
@@ -1,2 +1,2 @@
 // check-fail
-// compile-flags: --check-cfg=names()
+// compile-flags: --check-cfg=cfg()
diff --git a/tests/rustdoc-ui/check-cfg/check-cfg.rs b/tests/rustdoc-ui/check-cfg/check-cfg.rs
index fa8789ad3ed..96fa9e08dde 100644
--- a/tests/rustdoc-ui/check-cfg/check-cfg.rs
+++ b/tests/rustdoc-ui/check-cfg/check-cfg.rs
@@ -1,5 +1,5 @@
 // check-pass
-// compile-flags: --check-cfg=names() -Z unstable-options
+// compile-flags: --check-cfg=cfg() -Z unstable-options
 
 /// uniz is nor a builtin nor pass as arguments so is unexpected
 #[cfg(uniz)]
diff --git a/tests/rustdoc-ui/doctest/check-cfg-test.rs b/tests/rustdoc-ui/doctest/check-cfg-test.rs
index 49a801c3fb3..38cd59aa790 100644
--- a/tests/rustdoc-ui/doctest/check-cfg-test.rs
+++ b/tests/rustdoc-ui/doctest/check-cfg-test.rs
@@ -1,5 +1,5 @@
 // check-pass
-// compile-flags: --test --nocapture --check-cfg=values(feature,"test") -Z unstable-options
+// compile-flags: --test --nocapture --check-cfg=cfg(feature,values("test")) -Z unstable-options
 // 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"
diff --git a/tests/rustdoc-ui/error-in-impl-trait/closure.rs b/tests/rustdoc-ui/error-in-impl-trait/closure.rs
index f1fd85bb23c..628c61a6a1a 100644
--- a/tests/rustdoc-ui/error-in-impl-trait/closure.rs
+++ b/tests/rustdoc-ui/error-in-impl-trait/closure.rs
@@ -1,5 +1,5 @@
 // check-pass
-// manually desugared version of an `async fn` (but with a closure instead of a generator)
+// manually desugared version of an `async fn` (but with a closure instead of a coroutine)
 pub fn a() -> impl Fn() -> u32 {
     || content::doesnt::matter()
 }
diff --git a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.rs b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.rs
index e49fe079813..7151ebd599f 100644
--- a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.rs
+++ b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.rs
@@ -1,7 +1,6 @@
-// check-pass
-
 pub fn f() -> impl Sized {
     pub enum E {
+        //~^ ERROR: recursive type
         V(E),
     }
 
diff --git a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.stderr b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.stderr
new file mode 100644
index 00000000000..edb5dfd4d55
--- /dev/null
+++ b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type-2.stderr
@@ -0,0 +1,17 @@
+error[E0072]: recursive type `f::E` has infinite size
+  --> $DIR/infinite-recursive-type-2.rs:2:5
+   |
+LL |     pub enum E {
+   |     ^^^^^^^^^^
+LL |
+LL |         V(E),
+   |           - recursive without indirection
+   |
+help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
+   |
+LL |         V(Box<E>),
+   |           ++++ +
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.rs b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.rs
index 096130d7768..1f855051729 100644
--- a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.rs
+++ b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.rs
@@ -1,7 +1,6 @@
-// check-pass
-
 fn f() -> impl Sized {
     enum E {
+        //~^ ERROR: recursive type
         V(E),
     }
 
diff --git a/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.stderr b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.stderr
new file mode 100644
index 00000000000..349a569414c
--- /dev/null
+++ b/tests/rustdoc-ui/error-in-impl-trait/infinite-recursive-type.stderr
@@ -0,0 +1,17 @@
+error[E0072]: recursive type `f::E` has infinite size
+  --> $DIR/infinite-recursive-type.rs:2:5
+   |
+LL |     enum E {
+   |     ^^^^^^
+LL |
+LL |         V(E),
+   |           - recursive without indirection
+   |
+help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
+   |
+LL |         V(Box<E>),
+   |           ++++ +
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/rustdoc/issue-31808.rs b/tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs
index e55c5bd4f7c..6e4709403a4 100644
--- a/tests/rustdoc/issue-31808.rs
+++ b/tests/rustdoc-ui/ice-assoc-const-for-primitive-31808.rs
@@ -1,5 +1,10 @@
+// check-pass
+
 // Test that associated item impls on primitive types don't crash rustdoc
 
+// https://github.com/rust-lang/rust/issues/31808
+#![crate_name="issue_31808"]
+
 pub trait Foo {
     const BAR: usize;
     type BAZ;
diff --git a/tests/rustdoc-ui/invalid_const_in_lifetime_position.rs b/tests/rustdoc-ui/invalid_const_in_lifetime_position.rs
index c3f4fd63bac..07fc239a8f8 100644
--- a/tests/rustdoc-ui/invalid_const_in_lifetime_position.rs
+++ b/tests/rustdoc-ui/invalid_const_in_lifetime_position.rs
@@ -4,3 +4,8 @@ trait X {
 fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
 //~^ ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
 //~| ERROR associated type takes 0 generic arguments but 1 generic argument
+//~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+//~| ERROR associated type takes 0 generic arguments but 1 generic argument
+//~| ERROR associated type takes 1 lifetime argument but 0 lifetime arguments
+//~| ERROR associated type takes 0 generic arguments but 1 generic argument
+//~| ERROR trait `X` cannot be made into an object
diff --git a/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr b/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr
index 527729a8228..50d55284754 100644
--- a/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr
+++ b/tests/rustdoc-ui/invalid_const_in_lifetime_position.stderr
@@ -28,6 +28,86 @@ note: associated type defined here, with 0 generic parameters
 LL |     type Y<'a>;
    |          ^
 
-error: aborting due to 2 previous errors
+error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/invalid_const_in_lifetime_position.rs:4:26
+   |
+LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+   |                          ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/invalid_const_in_lifetime_position.rs:2:10
+   |
+LL |     type Y<'a>;
+   |          ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL | fn f<'a>(arg : Box<dyn X<Y<'_, 1> = &'a ()>>) {}
+   |                            +++
+
+error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/invalid_const_in_lifetime_position.rs:4:26
+   |
+LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+   |                          ^--- help: remove these generics
+   |                          |
+   |                          expected 0 generic arguments
+   |
+note: associated type defined here, with 0 generic parameters
+  --> $DIR/invalid_const_in_lifetime_position.rs:2:10
+   |
+LL |     type Y<'a>;
+   |          ^
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0107]: associated type takes 1 lifetime argument but 0 lifetime arguments were supplied
+  --> $DIR/invalid_const_in_lifetime_position.rs:4:26
+   |
+LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+   |                          ^ expected 1 lifetime argument
+   |
+note: associated type defined here, with 1 lifetime parameter: `'a`
+  --> $DIR/invalid_const_in_lifetime_position.rs:2:10
+   |
+LL |     type Y<'a>;
+   |          ^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing lifetime argument
+   |
+LL | fn f<'a>(arg : Box<dyn X<Y<'_, 1> = &'a ()>>) {}
+   |                            +++
+
+error[E0107]: associated type takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/invalid_const_in_lifetime_position.rs:4:26
+   |
+LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+   |                          ^--- help: remove these generics
+   |                          |
+   |                          expected 0 generic arguments
+   |
+note: associated type defined here, with 0 generic parameters
+  --> $DIR/invalid_const_in_lifetime_position.rs:2:10
+   |
+LL |     type Y<'a>;
+   |          ^
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0038]: the trait `X` cannot be made into an object
+  --> $DIR/invalid_const_in_lifetime_position.rs:4:20
+   |
+LL | fn f<'a>(arg : Box<dyn X<Y<1> = &'a ()>>) {}
+   |                    ^^^^^^^^^^^^^^^^^^^^ `X` 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/invalid_const_in_lifetime_position.rs:2:10
+   |
+LL | trait X {
+   |       - this trait cannot be made into an object...
+LL |     type Y<'a>;
+   |          ^ ...because it contains the generic associated type `Y`
+   = help: consider moving `Y` to another trait
+
+error: aborting due to 7 previous errors
 
-For more information about this error, try `rustc --explain E0107`.
+Some errors have detailed explanations: E0038, E0107.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/rustdoc-ui/issues/issue-105742.rs b/tests/rustdoc-ui/issues/issue-105742.rs
index 1fbb70c7808..5e493515cad 100644
--- a/tests/rustdoc-ui/issues/issue-105742.rs
+++ b/tests/rustdoc-ui/issues/issue-105742.rs
@@ -21,6 +21,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
@@ -30,6 +32,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
@@ -47,6 +51,10 @@ 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`
+    //~| missing generics for associated type `SVec::Item`
+    //~| missing generics for associated type `SVec::Item`
 > {
     type Item<'a, T>;
 
diff --git a/tests/rustdoc-ui/issues/issue-105742.stderr b/tests/rustdoc-ui/issues/issue-105742.stderr
index 4d3f9f5bced..ad1020a1f08 100644
--- a/tests/rustdoc-ui/issues/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:51:10
+  --> $DIR/issue-105742.rs:59: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:51:10
+  --> $DIR/issue-105742.rs:59: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:24:37
+  --> $DIR/issue-105742.rs:26: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
+  --> $DIR/issue-105742.rs:59: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:24:37
+  --> $DIR/issue-105742.rs:26: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
+  --> $DIR/issue-105742.rs:59: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:33:30
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59: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:33:30
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59: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:33:46
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59: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:33:46
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59: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:51:10
+  --> $DIR/issue-105742.rs:59: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:51:10
+  --> $DIR/issue-105742.rs:59: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:51:10
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -182,7 +182,7 @@ 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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -193,13 +193,13 @@ LL |     <Self as SVec>::Item<T>,
    |                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:24:37
+  --> $DIR/issue-105742.rs:26: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -210,13 +210,13 @@ LL |     Output = <Index<<Self as SVec>::Item<'a>,
    |                                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:24:37
+  --> $DIR/issue-105742.rs:26: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -227,13 +227,13 @@ LL |     Output = <Index<<Self as SVec>::Item<T>,
    |                                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:33:30
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -244,13 +244,13 @@ 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
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -261,13 +261,13 @@ 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
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -278,13 +278,13 @@ 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
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -331,7 +331,7 @@ 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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -348,7 +348,7 @@ 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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -359,13 +359,13 @@ LL |     <Self as SVec>::Item<T>,
    |                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:24:37
+  --> $DIR/issue-105742.rs:26: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -376,13 +376,13 @@ LL |     Output = <Index<<Self as SVec>::Item<'a>,
    |                                         ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:24:37
+  --> $DIR/issue-105742.rs:26: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -393,13 +393,13 @@ LL |     Output = <Index<<Self as SVec>::Item<T>,
    |                                         +++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:33:30
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -410,13 +410,13 @@ 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
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -427,13 +427,13 @@ 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
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -444,13 +444,13 @@ 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
+  --> $DIR/issue-105742.rs:37: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
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -461,13 +461,13 @@ 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
+  --> $DIR/issue-105742.rs:61: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:51:10
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^ --
@@ -477,13 +477,13 @@ LL |     fn len(&self) -> <Self as SVec>::Item<'_>;
    |                                          ++++
 
 error[E0107]: missing generics for associated type `SVec::Item`
-  --> $DIR/issue-105742.rs:53:38
+  --> $DIR/issue-105742.rs:61: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:51:10
+  --> $DIR/issue-105742.rs:59:10
    |
 LL |     type Item<'a, T>;
    |          ^^^^     -
@@ -492,7 +492,143 @@ help: add missing generic argument
 LL |     fn len(&self) -> <Self as SVec>::Item<T>;
    |                                          +++
 
-error: aborting due to 29 previous errors
+error[E0107]: missing generics for associated type `SVec::Item`
+  --> $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:59:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+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:59:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^     -
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing generic argument
+   |
+LL |     <Self as SVec>::Item<T>,
+   |                         +++
+
+error[E0107]: missing generics for associated type `SVec::Item`
+  --> $DIR/issue-105742.rs:26: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:59:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+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:26: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:59:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^     -
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+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:37: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:59:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+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:37: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:59:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^     -
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+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:37: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:59:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^ --
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+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:37: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:59:10
+   |
+LL |     type Item<'a, T>;
+   |          ^^^^     -
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+help: add missing generic argument
+   |
+LL |     Output = <Self as SVec>::Item> as SVec>::Item<T>,
+   |                                                  +++
+
+error: aborting due to 37 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/issues/issue-83883-describe-lints.stdout b/tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout
index bbf66a31583..6021bce6939 100644
--- a/tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout
+++ b/tests/rustdoc-ui/issues/issue-83883-describe-lints.stdout
@@ -14,11 +14,11 @@ Lint groups provided by rustc:
 
     $NAMES  $SUB_LINTS
 
-Lint checks provided by plugins loaded by this crate:
+Lint checks loaded by this crate:
 
     $NAMES  $LEVELS  $MEANINGS
 
-Lint groups provided by plugins loaded by this crate:
+Lint groups loaded by this crate:
 
     $NAMES  $SUB_LINTS
 
diff --git a/tests/rustdoc-ui/issues/issue-96287.stderr b/tests/rustdoc-ui/issues/issue-96287.stderr
index 7722eb96028..c4809a311fc 100644
--- a/tests/rustdoc-ui/issues/issue-96287.stderr
+++ b/tests/rustdoc-ui/issues/issue-96287.stderr
@@ -2,7 +2,12 @@ error[E0220]: associated type `Assoc` not found for `V`
   --> $DIR/issue-96287.rs:7:33
    |
 LL | pub type Foo<V> = impl Trait<V::Assoc>;
-   |                                 ^^^^^ there is a similarly named associated type `Assoc` in the trait `TraitWithAssoc`
+   |                                 ^^^^^ there is an associated type `Assoc` in the trait `TraitWithAssoc`
+   |
+help: consider restricting type parameter `V`
+   |
+LL | pub type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
+   |               ++++++++++++++++
 
 error: aborting due to previous error
 
diff --git a/tests/rustdoc/not-wf-ambiguous-normalization.rs b/tests/rustdoc-ui/not-wf-ambiguous-normalization.rs
index 1e9f925f845..3e4825d83b1 100644
--- a/tests/rustdoc/not-wf-ambiguous-normalization.rs
+++ b/tests/rustdoc-ui/not-wf-ambiguous-normalization.rs
@@ -12,6 +12,7 @@ struct DefaultAllocator;
 // `<DefaultAllocator as Allocator>::Buffer` to be ambiguous,
 // which caused an ICE with `-Znormalize-docs`.
 impl<T> Allocator for DefaultAllocator {
+    //~^ ERROR: type annotations needed
     type Buffer = ();
 }
 
diff --git a/tests/rustdoc-ui/not-wf-ambiguous-normalization.stderr b/tests/rustdoc-ui/not-wf-ambiguous-normalization.stderr
new file mode 100644
index 00000000000..34b20a0b32c
--- /dev/null
+++ b/tests/rustdoc-ui/not-wf-ambiguous-normalization.stderr
@@ -0,0 +1,9 @@
+error[E0282]: type annotations needed
+  --> $DIR/not-wf-ambiguous-normalization.rs:14:23
+   |
+LL | impl<T> Allocator for DefaultAllocator {
+   |                       ^^^^^^^^^^^^^^^^ cannot infer type for type parameter `T`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/rustdoc-ui/recursive-deref-ice.rs b/tests/rustdoc-ui/recursive-deref-ice.rs
index c44fd27f403..9e62841f99b 100644
--- a/tests/rustdoc-ui/recursive-deref-ice.rs
+++ b/tests/rustdoc-ui/recursive-deref-ice.rs
@@ -4,7 +4,10 @@
 
 pub struct Attribute;
 
-pub struct Map<'hir> {}
+pub struct Map<'hir> {
+    lt: &'hir (),
+}
+
 impl<'hir> Map<'hir> {
     pub fn attrs(&self) -> &'hir [Attribute] { &[] }
 }
diff --git a/tests/rustdoc-ui/unable-fulfill-trait.rs b/tests/rustdoc-ui/unable-fulfill-trait.rs
index 70357082248..10887ab1903 100644
--- a/tests/rustdoc-ui/unable-fulfill-trait.rs
+++ b/tests/rustdoc-ui/unable-fulfill-trait.rs
@@ -3,7 +3,8 @@
 pub struct Foo<'a, 'b, T> {
     field1: dyn Bar<'a, 'b,>,
     //~^ ERROR
-    //~^^ ERROR
+    //~| ERROR
+    //~| ERROR
 }
 
 pub trait Bar<'x, 's, U>
diff --git a/tests/rustdoc-ui/unable-fulfill-trait.stderr b/tests/rustdoc-ui/unable-fulfill-trait.stderr
index 72f35cb9224..d7735a4fd11 100644
--- a/tests/rustdoc-ui/unable-fulfill-trait.stderr
+++ b/tests/rustdoc-ui/unable-fulfill-trait.stderr
@@ -5,7 +5,7 @@ LL |     field1: dyn Bar<'a, 'b,>,
    |                 ^^^ expected 1 generic argument
    |
 note: trait defined here, with 1 generic parameter: `U`
-  --> $DIR/unable-fulfill-trait.rs:9:11
+  --> $DIR/unable-fulfill-trait.rs:10:11
    |
 LL | pub trait Bar<'x, 's, U>
    |           ^^^         -
@@ -20,7 +20,24 @@ error[E0227]: ambiguous lifetime bound, explicit lifetime bound required
 LL |     field1: dyn Bar<'a, 'b,>,
    |             ^^^^^^^^^^^^^^^^
 
-error: aborting due to 2 previous errors
+error[E0478]: lifetime bound not satisfied
+  --> $DIR/unable-fulfill-trait.rs:4:13
+   |
+LL |     field1: dyn Bar<'a, 'b,>,
+   |             ^^^^^^^^^^^^^^^^
+   |
+note: lifetime parameter instantiated with the lifetime `'b` as defined here
+  --> $DIR/unable-fulfill-trait.rs:3:20
+   |
+LL | pub struct Foo<'a, 'b, T> {
+   |                    ^^
+note: but lifetime parameter must outlive the lifetime `'a` as defined here
+  --> $DIR/unable-fulfill-trait.rs:3:16
+   |
+LL | pub struct Foo<'a, 'b, T> {
+   |                ^^
+
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0107, E0227.
+Some errors have detailed explanations: E0107, E0227, E0478.
 For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/rustdoc/issue-29503.rs b/tests/rustdoc/blanket-impl-29503.rs
index 01ae4438500..d6a132e1c26 100644
--- a/tests/rustdoc/issue-29503.rs
+++ b/tests/rustdoc/blanket-impl-29503.rs
@@ -1,3 +1,6 @@
+// https://github.com/rust-lang/rust/issues/29503
+#![crate_name="issue_29503"]
+
 use std::fmt;
 
 // @has issue_29503/trait.MyTrait.html
diff --git a/tests/rustdoc/const-generics/add-impl.rs b/tests/rustdoc/const-generics/add-impl.rs
index 195e47bc8ba..df490d2c636 100644
--- a/tests/rustdoc/const-generics/add-impl.rs
+++ b/tests/rustdoc/const-generics/add-impl.rs
@@ -7,7 +7,7 @@ pub struct Simd<T, const WIDTH: usize> {
     inner: T,
 }
 
-// @has foo/struct.Simd.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl Add<Simd<u8, 16>> for Simd<u8, 16>'
+// @has foo/struct.Simd.html '//div[@id="trait-implementations-list"]//h3[@class="code-header"]' 'impl Add for Simd<u8, 16>'
 impl Add for Simd<u8, 16> {
     type Output = Self;
 
diff --git a/tests/rustdoc/const-generics/const-impl.rs b/tests/rustdoc/const-generics/const-impl.rs
index b424ea4b33c..f4eefcc1c33 100644
--- a/tests/rustdoc/const-generics/const-impl.rs
+++ b/tests/rustdoc/const-generics/const-impl.rs
@@ -2,7 +2,9 @@
 #![feature(adt_const_params)]
 #![crate_name = "foo"]
 
-#[derive(PartialEq, Eq)]
+use std::marker::ConstParamTy;
+
+#[derive(PartialEq, Eq, ConstParamTy)]
 pub enum Order {
     Sorted,
     Unsorted,
diff --git a/tests/rustdoc/issue-33302.rs b/tests/rustdoc/const-rendering-macros-33302.rs
index a316f3ad99b..0f5cb921411 100644
--- a/tests/rustdoc/issue-33302.rs
+++ b/tests/rustdoc/const-rendering-macros-33302.rs
@@ -1,3 +1,6 @@
+// https://github.com/rust-lang/rust/issues/33302
+#![crate_name="issue_33302"]
+
 // Ensure constant and array length values are not taken from source
 // code, which wreaks havoc with macros.
 
diff --git a/tests/rustdoc/decl-trailing-whitespace.declaration.html b/tests/rustdoc/decl-trailing-whitespace.declaration.html
index d73393633f3..59c318c16f3 100644
--- a/tests/rustdoc/decl-trailing-whitespace.declaration.html
+++ b/tests/rustdoc/decl-trailing-whitespace.declaration.html
@@ -1,22 +1,16 @@
 <code>pub trait Write {
     // Required methods
     fn <a href="#tymethod.poll_write" class="fn">poll_write</a>(
-        self: <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
+        self,
         cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
         buf: &amp;mut [<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>]
     ) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt;;
-<span class="item-spacer" />    fn <a href="#tymethod.poll_flush" class="fn">poll_flush</a>(
-        self: <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
-        cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;
-    ) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt;;
-<span class="item-spacer" />    fn <a href="#tymethod.poll_close" class="fn">poll_close</a>(
-        self: <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
-        cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;
-    ) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt;;
+<span class="item-spacer" />    fn <a href="#tymethod.poll_flush" class="fn">poll_flush</a>(self, cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt;;
+<span class="item-spacer" />    fn <a href="#tymethod.poll_close" class="fn">poll_close</a>(self, cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt;;
 
     // Provided method
     fn <a href="#method.poll_write_vectored" class="fn">poll_write_vectored</a>(
-        self: <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
+        self,
         cx: &amp;mut <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="struct" href="{{channel}}/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>&gt;,
         bufs: &amp;[<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>]
     ) -&gt; <a class="enum" href="{{channel}}/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="enum" href="{{channel}}/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.usize.html">usize</a>, <a class="struct" href="struct.Error.html" title="struct foo::Error">Error</a>&gt;&gt; { ... }
diff --git a/tests/rustdoc/decl-trailing-whitespace.rs b/tests/rustdoc/decl-trailing-whitespace.rs
index d2a12435d8f..66783774308 100644
--- a/tests/rustdoc/decl-trailing-whitespace.rs
+++ b/tests/rustdoc/decl-trailing-whitespace.rs
@@ -9,21 +9,21 @@ pub struct Error;
 pub trait Write {
     // @snapshot 'declaration' - '//*[@class="rust item-decl"]//code'
     fn poll_write(
-        self: Option<String>,
+        self,
         cx: &mut Option<String>,
         buf: &mut [usize]
     ) -> Option<Result<usize, Error>>;
     fn poll_flush(
-        self: Option<String>,
+        self,
         cx: &mut Option<String>
     ) -> Option<Result<(), Error>>;
     fn poll_close(
-        self: Option<String>,
+        self,
         cx: &mut Option<String>,
     ) -> Option<Result<(), Error>>;
 
     fn poll_write_vectored(
-        self: Option<String>,
+        self,
         cx: &mut Option<String>,
         bufs: &[usize]
     ) -> Option<Result<usize, Error>> {}
diff --git a/tests/rustdoc/deprecated-future-staged-api.rs b/tests/rustdoc/deprecated-future-staged-api.rs
index 2670e7f5d04..09120b8d411 100644
--- a/tests/rustdoc/deprecated-future-staged-api.rs
+++ b/tests/rustdoc/deprecated-future-staged-api.rs
@@ -1,12 +1,12 @@
 #![feature(staged_api)]
-#![stable(feature = "deprecated-future-staged-api", since = "1.0.0")]
+#![stable(feature = "deprecated_future_staged_api", since = "1.0.0")]
 
 // @has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \
 //      'Deprecation planned'
 // @has deprecated_future_staged_api/struct.S1.html '//*[@class="stab deprecated"]' \
 //      'Deprecating in 99.99.99: effectively never'
 #[deprecated(since = "99.99.99", note = "effectively never")]
-#[stable(feature = "deprecated-future-staged-api", since = "1.0.0")]
+#[stable(feature = "deprecated_future_staged_api", since = "1.0.0")]
 pub struct S1;
 
 // @has deprecated_future_staged_api/index.html '//*[@class="stab deprecated"]' \
@@ -14,5 +14,5 @@ pub struct S1;
 // @has deprecated_future_staged_api/struct.S2.html '//*[@class="stab deprecated"]' \
 //      'Deprecating in a future Rust version: literally never'
 #[deprecated(since = "TBD", note = "literally never")]
-#[stable(feature = "deprecated-future-staged-api", since = "1.0.0")]
+#[stable(feature = "deprecated_future_staged_api", since = "1.0.0")]
 pub struct S2;
diff --git a/tests/rustdoc/deref/deref-mut-methods.rs b/tests/rustdoc/deref/deref-mut-methods.rs
index fdf8434224f..65681f81245 100644
--- a/tests/rustdoc/deref/deref-mut-methods.rs
+++ b/tests/rustdoc/deref/deref-mut-methods.rs
@@ -9,7 +9,7 @@ impl Foo {
 }
 
 // @has foo/struct.Bar.html
-// @has - '//*[@class="sidebar-elems"]//*[@class="block"]//a[@href="#method.foo"]' 'foo'
+// @has - '//*[@class="sidebar-elems"]//*[@class="block deref-methods"]//a[@href="#method.foo"]' 'foo'
 pub struct Bar {
     foo: Foo,
 }
diff --git a/tests/rustdoc/deref/deref-recursive-pathbuf.rs b/tests/rustdoc/deref/deref-recursive-pathbuf.rs
index be2b42b5ac6..7aee3147ba8 100644
--- a/tests/rustdoc/deref/deref-recursive-pathbuf.rs
+++ b/tests/rustdoc/deref/deref-recursive-pathbuf.rs
@@ -8,9 +8,9 @@
 // @has '-' '//*[@id="deref-methods-Path"]' 'Methods from Deref<Target = Path>'
 // @has '-' '//*[@class="impl-items"]//*[@id="method.exists"]' 'pub fn exists(&self)'
 // @has '-' '//div[@class="sidebar-elems"]//h3/a[@href="#deref-methods-PathBuf"]' 'Methods from Deref<Target=PathBuf>'
-// @has '-' '//*[@class="sidebar-elems"]//*[@class="block"]//a[@href="#method.as_path"]' 'as_path'
+// @has '-' '//*[@class="sidebar-elems"]//*[@class="block deref-methods"]//a[@href="#method.as_path"]' 'as_path'
 // @has '-' '//div[@class="sidebar-elems"]//h3/a[@href="#deref-methods-Path"]' 'Methods from Deref<Target=Path>'
-// @has '-' '//*[@class="sidebar-elems"]//*[@class="block"]//a[@href="#method.exists"]' 'exists'
+// @has '-' '//*[@class="sidebar-elems"]//*[@class="block deref-methods"]//a[@href="#method.exists"]' 'exists'
 
 #![crate_name = "foo"]
 
diff --git a/tests/rustdoc/issue-32890.rs b/tests/rustdoc/disambiguate-anchors-32890.rs
index 970954433ec..d88601d65d3 100644
--- a/tests/rustdoc/issue-32890.rs
+++ b/tests/rustdoc/disambiguate-anchors-32890.rs
@@ -1,3 +1,6 @@
+// https://github.com/rust-lang/rust/issues/32890
+#![crate_name="issue_32890"]
+
 // @has issue_32890/struct.Foo.html
 pub struct Foo<T>(T);
 
diff --git a/tests/rustdoc/issue-29449.rs b/tests/rustdoc/disambiguate-anchors-header-29449.rs
index 0d829cf6fcf..38a4954fc13 100644
--- a/tests/rustdoc/issue-29449.rs
+++ b/tests/rustdoc/disambiguate-anchors-header-29449.rs
@@ -1,3 +1,6 @@
+// https://github.com/rust-lang/rust/issues/29449
+#![crate_name="issue_29449"]
+
 // @has issue_29449/struct.Foo.html
 pub struct Foo;
 
diff --git a/tests/rustdoc/issue-33069.rs b/tests/rustdoc/doc-hidden-trait-implementors-33069.rs
index 0213a53cab5..35570668ea1 100644
--- a/tests/rustdoc/issue-33069.rs
+++ b/tests/rustdoc/doc-hidden-trait-implementors-33069.rs
@@ -1,3 +1,6 @@
+// https://github.com/rust-lang/rust/issues/33069
+#![crate_name="issue_33069"]
+
 pub trait Bar {}
 
 #[doc(hidden)]
diff --git a/tests/rustdoc/issue-30252.rs b/tests/rustdoc/doctest-cfg-feature-30252.rs
index c3777362a66..ceb8076fe35 100644
--- a/tests/rustdoc/issue-30252.rs
+++ b/tests/rustdoc/doctest-cfg-feature-30252.rs
@@ -1,5 +1,8 @@
 // compile-flags:--test --cfg feature="bar"
 
+// https://github.com/rust-lang/rust/issues/30252
+#![crate_name="issue_30252"]
+
 /// ```rust
 /// assert_eq!(cfg!(feature = "bar"), true);
 /// ```
diff --git a/tests/rustdoc/issue-32556.rs b/tests/rustdoc/doctest-ignore-32556.rs
index e1cf1150997..99da9358bd6 100644
--- a/tests/rustdoc/issue-32556.rs
+++ b/tests/rustdoc/doctest-ignore-32556.rs
@@ -1,3 +1,6 @@
+// https://github.com/rust-lang/rust/issues/32556
+#![crate_name="issue_32556"]
+
 /// Blah blah blah
 /// ```ignore (testing rustdoc's handling of ignore)
 /// bad_assert!();
diff --git a/tests/rustdoc/issue-34025.rs b/tests/rustdoc/hidden-extern-34025.rs
index 9b9f21cb316..81ccf2a0e5c 100644
--- a/tests/rustdoc/issue-34025.rs
+++ b/tests/rustdoc/hidden-extern-34025.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/34025
 #![crate_name = "foo"]
 
 // @!has 'foo/sys/index.html'
diff --git a/tests/rustdoc/hidden-impls.rs b/tests/rustdoc/hidden-impls.rs
index 26e2e0e0660..3283fbfecce 100644
--- a/tests/rustdoc/hidden-impls.rs
+++ b/tests/rustdoc/hidden-impls.rs
@@ -12,6 +12,6 @@ pub mod __hidden {
 
 // @has foo/trait.Clone.html
 // @!hasraw - 'Foo'
-// @has implementors/core/clone/trait.Clone.js
+// @has trait.impl/core/clone/trait.Clone.js
 // @!hasraw - 'Foo'
 pub use std::clone::Clone;
diff --git a/tests/rustdoc/hide-complex-unevaluated-const-arguments.rs b/tests/rustdoc/hide-complex-unevaluated-const-arguments.rs
index 6006354eba4..d728f772a69 100644
--- a/tests/rustdoc/hide-complex-unevaluated-const-arguments.rs
+++ b/tests/rustdoc/hide-complex-unevaluated-const-arguments.rs
@@ -4,9 +4,11 @@
 //
 // Read the documentation of `rustdoc::clean::utils::print_const_expr`
 // for further details.
-#![feature(const_trait_impl, generic_const_exprs)]
+#![feature(const_trait_impl, generic_const_exprs, adt_const_params, generic_const_items)]
 #![allow(incomplete_features)]
 
+use std::marker::ConstParamTy;
+
 // @has hide_complex_unevaluated_const_arguments/trait.Stage.html
 pub trait Stage {
     // A helper constant that prevents const expressions containing it
@@ -29,11 +31,13 @@ pub trait Stage {
     //
     // @has - '//*[@id="associatedconstant.ARRAY1"]' \
     //        'const ARRAY1: [u8; { _ }]'
-    const ARRAY1: [u8; Struct::new(/* ... */).do_something(Self::ABSTRACT * 1_000)];
+    const ARRAY1: [u8; Struct::new(/* ... */).do_something(Self::ABSTRACT * 1_000)]
+        where [(); Struct::new(/* ... */).do_something(Self::ABSTRACT * 1_000)]:;
 
     // @has - '//*[@id="associatedconstant.VERBOSE"]' \
     //        'const VERBOSE: [u16; { _ }]'
-    const VERBOSE: [u16; compute("thing", 9 + 9) * Self::ABSTRACT];
+    const VERBOSE: [u16; compute("thing", 9 + 9) * Self::ABSTRACT]
+        where [(); compute("thing", 9 + 9) * Self::ABSTRACT]:;
 
     // Check that we do not leak the private struct field contained within
     // the path. The output could definitely be improved upon
@@ -69,6 +73,7 @@ pub trait Sub: Sup<{ 90 * 20 * 4 }, { Struct { private: () } }> {}
 
 pub trait Sup<const N: usize, const S: Struct> {}
 
+#[derive(ConstParamTy, PartialEq, Eq)]
 pub struct Struct { private: () }
 
 impl Struct {
diff --git a/tests/rustdoc/html-no-source.rs b/tests/rustdoc/html-no-source.rs
index 25615a73c3f..b91aa41207a 100644
--- a/tests/rustdoc/html-no-source.rs
+++ b/tests/rustdoc/html-no-source.rs
@@ -11,20 +11,20 @@
 // @files 'src/foo' '[]'
 
 // @has foo/fn.foo.html
-// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · '
-// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
+// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0.0 · '
+// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0.0 · source · '
 #[stable(feature = "bar", since = "1.0")]
 pub fn foo() {}
 
 // @has foo/struct.Bar.html
-// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · '
-// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
+// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0.0 · '
+// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0.0 · source · '
 #[stable(feature = "bar", since = "1.0")]
 pub struct Bar;
 
 impl Bar {
-    // @has - '//*[@id="method.bar"]/*[@class="since rightside"]' '2.0'
-    // @!has - '//*[@id="method.bar"]/*[@class="rightside"]' '2.0 ·'
+    // @has - '//*[@id="method.bar"]/*[@class="since rightside"]' '2.0.0'
+    // @!has - '//*[@id="method.bar"]/*[@class="rightside"]' '2.0.0 ·'
     #[stable(feature = "foobar", since = "2.0")]
     pub fn bar() {}
 }
diff --git a/tests/rustdoc/impl-parts-crosscrate.rs b/tests/rustdoc/impl-parts-crosscrate.rs
index 34733f1f8cc..da109ea7090 100644
--- a/tests/rustdoc/impl-parts-crosscrate.rs
+++ b/tests/rustdoc/impl-parts-crosscrate.rs
@@ -12,7 +12,7 @@ pub struct Bar<T> { t: T }
 // full impl string.  Instead, just make sure something from each part
 // is mentioned.
 
-// @hasraw implementors/rustdoc_impl_parts_crosscrate/trait.AnAutoTrait.js Bar
+// @hasraw trait.impl/rustdoc_impl_parts_crosscrate/trait.AnAutoTrait.js Bar
 // @hasraw - Send
 // @hasraw - !AnAutoTrait
 // @hasraw - Copy
diff --git a/tests/rustdoc/issue-33592.rs b/tests/rustdoc/impl-type-parameter-33592.rs
index 7a128f0b897..77f53710e5e 100644
--- a/tests/rustdoc/issue-33592.rs
+++ b/tests/rustdoc/impl-type-parameter-33592.rs
@@ -1,3 +1,4 @@
+// https://github.com/rust-lang/rust/issues/33592
 #![crate_name = "foo"]
 
 pub trait Foo<T> {}
diff --git a/tests/rustdoc/implementor-stable-version.rs b/tests/rustdoc/implementor-stable-version.rs
index a1f3fd5a8c5..9c5b9b7e303 100644
--- a/tests/rustdoc/implementor-stable-version.rs
+++ b/tests/rustdoc/implementor-stable-version.rs
@@ -1,21 +1,21 @@
-#![stable(feature = "bar", since = "OLD 1.0")]
+#![stable(feature = "bar", since = "3.3.3")]
 #![crate_name = "foo"]
 
 #![feature(staged_api)]
 
-#[stable(feature = "bar", since = "OLD 1.0")]
+#[stable(feature = "bar", since = "3.3.3")]
 pub trait Bar {}
 
-#[stable(feature = "baz", since = "OLD 1.0")]
+#[stable(feature = "baz", since = "3.3.3")]
 pub trait Baz {}
 
-#[stable(feature = "baz", since = "OLD 1.0")]
+#[stable(feature = "baz", since = "3.3.3")]
 pub struct Foo;
 
-// @has foo/trait.Bar.html '//div[@id="implementors-list"]//span[@class="since"]' 'NEW 2.0'
-#[stable(feature = "foobar", since = "NEW 2.0")]
+// @has foo/trait.Bar.html '//div[@id="implementors-list"]//span[@class="since"]' '4.4.4'
+#[stable(feature = "foobar", since = "4.4.4")]
 impl Bar for Foo {}
 
-// @!has foo/trait.Baz.html '//div[@id="implementors-list"]//span[@class="since"]' 'OLD 1.0'
-#[stable(feature = "foobaz", since = "OLD 1.0")]
+// @!has foo/trait.Baz.html '//div[@id="implementors-list"]//span[@class="since"]' '3.3.3'
+#[stable(feature = "foobaz", since = "3.3.3")]
 impl Baz for Foo {}
diff --git a/tests/rustdoc/inline_cross/auxiliary/default-generic-args.rs b/tests/rustdoc/inline_cross/auxiliary/default-generic-args.rs
new file mode 100644
index 00000000000..1e31f18927e
--- /dev/null
+++ b/tests/rustdoc/inline_cross/auxiliary/default-generic-args.rs
@@ -0,0 +1,45 @@
+pub type BoxedStr = Box<str>;
+pub type IntMap = std::collections::HashMap<i64, u64>;
+
+pub struct TyPair<T, U = T>(T, U);
+
+pub type T0 = TyPair<i32>;
+pub type T1 = TyPair<i32, u32>;
+pub type T2<K> = TyPair<i32, K>;
+pub type T3<Q> = TyPair<Q, Q>;
+
+pub struct CtPair<const C: u32, const D: u32 = C>;
+
+pub type C0 = CtPair<43, 43>;
+pub type C1 = CtPair<0, 1>;
+pub type C2 = CtPair<{1 + 2}, 3>;
+
+pub struct Re<'a, U = &'a ()>(&'a (), U);
+
+pub type R0<'q> = Re<'q>;
+pub type R1<'q> = Re<'q, &'q ()>;
+pub type R2<'q> = Re<'q, &'static ()>;
+pub type H0 = fn(for<'a> fn(Re<'a>));
+pub type H1 = for<'b> fn(for<'a> fn(Re<'a, &'b ()>));
+pub type H2 = for<'a> fn(for<'b> fn(Re<'a, &'b ()>));
+
+pub struct Proj<T: Basis, U = <T as Basis>::Assoc>(T, U);
+pub trait Basis { type Assoc; }
+impl Basis for () { type Assoc = bool; }
+
+pub type P0 = Proj<()>;
+pub type P1 = Proj<(), bool>;
+pub type P2 = Proj<(), ()>;
+
+pub struct Alpha<T = for<'any> fn(&'any ())>(T);
+
+pub type A0 = Alpha;
+pub type A1 = Alpha<for<'arbitrary> fn(&'arbitrary ())>;
+
+pub struct Multi<A = u64, B = u64>(A, B);
+
+pub type M0 = Multi<u64, ()>;
+
+pub trait Trait<'a, T = &'a ()> {}
+
+pub type F = dyn for<'a> Trait<'a>;
diff --git a/tests/rustdoc/auxiliary/issue-29584.rs b/tests/rustdoc/inline_cross/auxiliary/issue-29584.rs
index a9b8796c0fe..a9b8796c0fe 100644
--- a/tests/rustdoc/auxiliary/issue-29584.rs
+++ b/tests/rustdoc/inline_cross/auxiliary/issue-29584.rs
diff --git a/tests/rustdoc/inline_cross/default-generic-args.rs b/tests/rustdoc/inline_cross/default-generic-args.rs
new file mode 100644
index 00000000000..c9a87a19901
--- /dev/null
+++ b/tests/rustdoc/inline_cross/default-generic-args.rs
@@ -0,0 +1,104 @@
+#![crate_name = "user"]
+// aux-crate:default_generic_args=default-generic-args.rs
+// edition:2021
+
+// @has user/type.BoxedStr.html
+// @has - '//*[@class="rust item-decl"]//code' "Box<str>"
+pub use default_generic_args::BoxedStr;
+
+// @has user/type.IntMap.html
+// @has - '//*[@class="rust item-decl"]//code' "HashMap<i64, u64>"
+pub use default_generic_args::IntMap;
+
+// @has user/type.T0.html
+// @has - '//*[@class="rust item-decl"]//code' "TyPair<i32>"
+pub use default_generic_args::T0;
+
+// @has user/type.T1.html
+// @has - '//*[@class="rust item-decl"]//code' "TyPair<i32, u32>"
+pub use default_generic_args::T1;
+
+// @has user/type.T2.html
+// @has - '//*[@class="rust item-decl"]//code' "TyPair<i32, K>"
+pub use default_generic_args::T2;
+
+// @has user/type.T3.html
+// @has - '//*[@class="rust item-decl"]//code' "TyPair<Q>"
+pub use default_generic_args::T3;
+
+// @has user/type.C0.html
+// @has - '//*[@class="rust item-decl"]//code' "CtPair<43>"
+pub use default_generic_args::C0;
+
+// @has user/type.C1.html
+// @has - '//*[@class="rust item-decl"]//code' "CtPair<0, 1>"
+pub use default_generic_args::C1;
+
+// @has user/type.C2.html
+// @has - '//*[@class="rust item-decl"]//code' "CtPair<default_generic_args::::C2::{constant#0}, 3>"
+pub use default_generic_args::C2;
+
+// @has user/type.R0.html
+// @has - '//*[@class="rust item-decl"]//code' "Re<'q>"
+pub use default_generic_args::R0;
+
+// @has user/type.R1.html
+// @has - '//*[@class="rust item-decl"]//code' "Re<'q>"
+pub use default_generic_args::R1;
+
+// @has user/type.R2.html
+// Check that we consider regions:
+// @has - '//*[@class="rust item-decl"]//code' "Re<'q, &'static ()>"
+pub use default_generic_args::R2;
+
+// @has user/type.H0.html
+// Check that we handle higher-ranked regions correctly:
+// @has - '//*[@class="rust item-decl"]//code' "fn(_: for<'a> fn(_: Re<'a>))"
+pub use default_generic_args::H0;
+
+// @has user/type.H1.html
+// Check that we don't conflate distinct universially quantified regions (#1):
+// @has - '//*[@class="rust item-decl"]//code' "for<'b> fn(_: for<'a> fn(_: Re<'a, &'b ()>))"
+pub use default_generic_args::H1;
+
+// @has user/type.H2.html
+// Check that we don't conflate distinct universially quantified regions (#2):
+// @has - '//*[@class="rust item-decl"]//code' "for<'a> fn(_: for<'b> fn(_: Re<'a, &'b ()>))"
+pub use default_generic_args::H2;
+
+// @has user/type.P0.html
+// @has - '//*[@class="rust item-decl"]//code' "Proj<()>"
+pub use default_generic_args::P0;
+
+// @has user/type.P1.html
+// @has - '//*[@class="rust item-decl"]//code' "Proj<(), bool>"
+pub use default_generic_args::P1;
+
+// @has user/type.P2.html
+// @has - '//*[@class="rust item-decl"]//code' "Proj<(), ()>"
+pub use default_generic_args::P2;
+
+// @has user/type.A0.html
+// Ensure that we elide generic arguments that are alpha-equivalent to their respective
+// generic parameter (modulo substs) (#1):
+// @has - '//*[@class="rust item-decl"]//code' "Alpha"
+pub use default_generic_args::A0;
+
+// @has user/type.A1.html
+// Ensure that we elide generic arguments that are alpha-equivalent to their respective
+// generic parameter (modulo substs) (#1):
+// @has - '//*[@class="rust item-decl"]//code' "Alpha"
+pub use default_generic_args::A1;
+
+// @has user/type.M0.html
+// Test that we don't elide `u64` even if it coincides with `A`'s default precisely because
+// `()` is not the default of `B`. Mindlessly eliding `u64` would lead to `M<()>` which is a
+// different type (`M<(), u64>` versus `M<u64, ()>`).
+// @has - '//*[@class="rust item-decl"]//code' "Multi<u64, ()>"
+pub use default_generic_args::M0;
+
+// @has user/type.F.html
+// FIXME: Ideally, we would elide `&'a ()` but `'a` is an escaping bound var which we can't reason
+//        about at the moment since we don't keep track of bound vars.
+// @has - '//*[@class="rust item-decl"]//code' "dyn for<'a> Trait<'a, &'a ()>"
+pub use default_generic_args::F;
diff --git a/tests/rustdoc/issue-29584.rs b/tests/rustdoc/inline_cross/doc-hidden-extern-trait-impl-29584.rs
index 4364a9649b5..b246e94e048 100644
--- a/tests/rustdoc/issue-29584.rs
+++ b/tests/rustdoc/inline_cross/doc-hidden-extern-trait-impl-29584.rs
@@ -1,6 +1,9 @@
 // aux-build:issue-29584.rs
 // ignore-cross-compile
 
+// https://github.com/rust-lang/rust/issues/29584
+#![crate_name="issue_29584"]
+
 extern crate issue_29584;
 
 // @has issue_29584/struct.Foo.html
diff --git a/tests/rustdoc/inline_cross/dyn_trait.rs b/tests/rustdoc/inline_cross/dyn_trait.rs
index 679972f035a..9871be79ca3 100644
--- a/tests/rustdoc/inline_cross/dyn_trait.rs
+++ b/tests/rustdoc/inline_cross/dyn_trait.rs
@@ -75,16 +75,16 @@ pub use dyn_trait::AmbiguousBoundWrappedEarly1;
 pub use dyn_trait::AmbiguousBoundWrappedStatic;
 
 // @has user/type.NoBoundsWrappedDefaulted.html
-// @has - '//*[@class="rust item-decl"]//code' "Box<dyn Trait, Global>;"
+// @has - '//*[@class="rust item-decl"]//code' "Box<dyn Trait>;"
 pub use dyn_trait::NoBoundsWrappedDefaulted;
 // @has user/type.NoBoundsWrappedEarly.html
-// @has - '//*[@class="rust item-decl"]//code' "Box<dyn Trait + 'e, Global>;"
+// @has - '//*[@class="rust item-decl"]//code' "Box<dyn Trait + 'e>;"
 pub use dyn_trait::NoBoundsWrappedEarly;
 // @has user/fn.nbwl.html
-// @has - '//pre[@class="rust item-decl"]' "nbwl<'l>(_: Box<dyn Trait + 'l, Global>)"
+// @has - '//pre[@class="rust item-decl"]' "nbwl<'l>(_: Box<dyn Trait + 'l>)"
 pub use dyn_trait::no_bounds_wrapped_late as nbwl;
 // @has user/fn.nbwel.html
-// @has - '//pre[@class="rust item-decl"]' "nbwel(_: Box<dyn Trait + '_, Global>)"
+// @has - '//pre[@class="rust item-decl"]' "nbwel(_: Box<dyn Trait + '_>)"
 // NB: It might seem counterintuitive to display the explicitly elided lifetime `'_` here instead of
 // eliding it but this behavior is correct: The default is `'static` here which != `'_`.
 pub use dyn_trait::no_bounds_wrapped_elided as nbwel;
diff --git a/tests/rustdoc/inline_cross/impl_trait.rs b/tests/rustdoc/inline_cross/impl_trait.rs
index 9b22026e490..3a2f5d16004 100644
--- a/tests/rustdoc/inline_cross/impl_trait.rs
+++ b/tests/rustdoc/inline_cross/impl_trait.rs
@@ -4,7 +4,7 @@
 extern crate impl_trait_aux;
 
 // @has impl_trait/fn.func.html
-// @has - '//pre[@class="rust item-decl"]' "pub fn func<'a>(_x: impl Clone + Into<Vec<u8, Global>> + 'a)"
+// @has - '//pre[@class="rust item-decl"]' "pub fn func<'a>(_x: impl Clone + Into<Vec<u8>> + 'a)"
 // @!has - '//pre[@class="rust item-decl"]' 'where'
 pub use impl_trait_aux::func;
 
@@ -34,6 +34,6 @@ pub use impl_trait_aux::func4;
 pub use impl_trait_aux::func5;
 
 // @has impl_trait/struct.Foo.html
-// @has - '//*[@id="method.method"]//h4[@class="code-header"]' "pub fn method<'a>(_x: impl Clone + Into<Vec<u8, Global>> + 'a)"
+// @has - '//*[@id="method.method"]//h4[@class="code-header"]' "pub fn method<'a>(_x: impl Clone + Into<Vec<u8>> + 'a)"
 // @!has - '//*[@id="method.method"]//h4[@class="code-header"]' 'where'
 pub use impl_trait_aux::Foo;
diff --git a/tests/rustdoc/inline_cross/implementors-js.rs b/tests/rustdoc/inline_cross/implementors-js.rs
index c79f05d8d3c..c17d52d0f41 100644
--- a/tests/rustdoc/inline_cross/implementors-js.rs
+++ b/tests/rustdoc/inline_cross/implementors-js.rs
@@ -4,13 +4,13 @@
 
 extern crate implementors_inline;
 
-// @!has implementors/implementors_js/trait.MyTrait.js
-// @has implementors/implementors_inline/my_trait/trait.MyTrait.js
-// @!has implementors/implementors_inline/prelude/trait.MyTrait.js
+// @!has trait.impl/implementors_js/trait.MyTrait.js
+// @has trait.impl/implementors_inline/my_trait/trait.MyTrait.js
+// @!has trait.impl/implementors_inline/prelude/trait.MyTrait.js
 // @has implementors_inline/my_trait/trait.MyTrait.html
-// @has - '//script/@src' '../../implementors/implementors_inline/my_trait/trait.MyTrait.js'
+// @has - '//script/@src' '../../trait.impl/implementors_inline/my_trait/trait.MyTrait.js'
 // @has implementors_js/trait.MyTrait.html
-// @has - '//script/@src' '../implementors/implementors_inline/my_trait/trait.MyTrait.js'
+// @has - '//script/@src' '../trait.impl/implementors_inline/my_trait/trait.MyTrait.js'
 /// When re-exporting this trait, the HTML will be inlined,
 /// but, vitally, the JavaScript will be located only at the
 /// one canonical path.
diff --git a/tests/rustdoc/intra-doc/prim-associated-traits.rs b/tests/rustdoc/intra-doc/prim-associated-traits.rs
index 8639a24f7f3..71d7d2189e6 100644
--- a/tests/rustdoc/intra-doc/prim-associated-traits.rs
+++ b/tests/rustdoc/intra-doc/prim-associated-traits.rs
@@ -41,6 +41,6 @@ pub struct Number {
     pub u_128: u128,
     pub ch: char,
     pub boolean: bool,
-    pub string: str,
+    pub string: &'static str,
     pub n: !,
 }
diff --git a/tests/rustdoc/issue-43701.rs b/tests/rustdoc/issue-43701.rs
index 44335e961f9..de772881e73 100644
--- a/tests/rustdoc/issue-43701.rs
+++ b/tests/rustdoc/issue-43701.rs
@@ -2,4 +2,4 @@
 
 pub use std::vec::Vec;
 
-// @!has implementors/core/clone/trait.Clone.js
+// @!has trait.impl/core/clone/trait.Clone.js
diff --git a/tests/rustdoc/issue-33178.rs b/tests/rustdoc/link-extern-crate-33178.rs
index ed643f5ae11..6a63712c4a7 100644
--- a/tests/rustdoc/issue-33178.rs
+++ b/tests/rustdoc/link-extern-crate-33178.rs
@@ -3,6 +3,9 @@
 // build-aux-docs
 // ignore-cross-compile
 
+// https://github.com/rust-lang/rust/issues/33178
+#![crate_name="issue_33178"]
+
 // @has issue_33178/index.html
 // @has - '//a[@title="mod empty"][@href="../empty/index.html"]' empty
 pub extern crate empty;
diff --git a/tests/rustdoc/issue-30109.rs b/tests/rustdoc/link-extern-crate-item-30109.rs
index e9447538ad7..c83234352ad 100644
--- a/tests/rustdoc/issue-30109.rs
+++ b/tests/rustdoc/link-extern-crate-item-30109.rs
@@ -2,6 +2,9 @@
 // aux-build:issue-30109-1.rs
 // ignore-cross-compile
 
+// https://github.com/rust-lang/rust/issues/30109
+#![crate_name="issue_30109"]
+
 pub mod quux {
     extern crate issue_30109_1 as bar;
     use self::bar::Bar;
diff --git a/tests/rustdoc/issue-33178-1.rs b/tests/rustdoc/link-extern-crate-title-33178.rs
index 4dc425346ab..d2f115a386e 100644
--- a/tests/rustdoc/issue-33178-1.rs
+++ b/tests/rustdoc/link-extern-crate-title-33178.rs
@@ -2,6 +2,9 @@
 // aux-build:variant-struct.rs
 // ignore-cross-compile
 
+// https://github.com/rust-lang/rust/issues/33178
+#![crate_name="issue_33178_1"]
+
 // @has issue_33178_1/index.html
 // @!has - //a/@title empty
 pub extern crate empty;
diff --git a/tests/rustdoc/normalize-assoc-item.rs b/tests/rustdoc/normalize-assoc-item.rs
index c6fd5e1101e..d39e1b15a4c 100644
--- a/tests/rustdoc/normalize-assoc-item.rs
+++ b/tests/rustdoc/normalize-assoc-item.rs
@@ -30,7 +30,7 @@ pub fn f2() -> <isize as Trait>::X {
 }
 
 pub struct S {
-    // @has 'normalize_assoc_item/struct.S.html' '//span[@id="structfield.box_me_up"]' 'box_me_up: Box<S, Global>'
+    // @has 'normalize_assoc_item/struct.S.html' '//span[@id="structfield.box_me_up"]' 'box_me_up: Box<S>'
     pub box_me_up: <S as Trait>::X,
     // @has 'normalize_assoc_item/struct.S.html' '//span[@id="structfield.generic"]' 'generic: (usize, isize)'
     pub generic: <Generic<usize> as Trait>::X,
@@ -76,7 +76,7 @@ extern crate inner;
 // @has 'normalize_assoc_item/fn.foo.html' '//pre[@class="rust item-decl"]' "pub fn foo() -> i32"
 pub use inner::foo;
 
-// @has 'normalize_assoc_item/fn.h.html' '//pre[@class="rust item-decl"]' "pub fn h<T>() -> IntoIter<T, Global>"
+// @has 'normalize_assoc_item/fn.h.html' '//pre[@class="rust item-decl"]' "pub fn h<T>() -> IntoIter<T>"
 pub fn h<T>() -> <Vec<T> as IntoIterator>::IntoIter {
     vec![].into_iter()
 }
diff --git a/tests/rustdoc/notable-trait/doc-notable_trait_box_is_not_an_iterator.rs b/tests/rustdoc/notable-trait/doc-notable_trait_box_is_not_an_iterator.rs
index 3fb00c7db84..6b94d799483 100644
--- a/tests/rustdoc/notable-trait/doc-notable_trait_box_is_not_an_iterator.rs
+++ b/tests/rustdoc/notable-trait/doc-notable_trait_box_is_not_an_iterator.rs
@@ -3,25 +3,28 @@
 #![feature(no_core)]
 #![no_core]
 #[lang = "owned_box"]
-pub struct Box<T>;
+pub struct Box<T>(*const T);
 
 impl<T> Box<T> {
     pub fn new(x: T) -> Box<T> {
-        Box
+        Box(std::ptr::null())
     }
 }
 
+#[lang = "sized"]
+trait Sized {}
+
 #[doc(notable_trait)]
 pub trait FakeIterator {}
 
 impl<I: FakeIterator> FakeIterator for Box<I> {}
 
 #[lang = "pin"]
-pub struct Pin<T>;
+pub struct Pin<T>(T);
 
 impl<T> Pin<T> {
     pub fn new(x: T) -> Pin<T> {
-        Pin
+        Pin(x)
     }
 }
 
diff --git a/tests/rustdoc/issue-32395.rs b/tests/rustdoc/render-enum-variant-structlike-32395.rs
index 5552300f9fe..2200d8ec637 100644
--- a/tests/rustdoc/issue-32395.rs
+++ b/tests/rustdoc/render-enum-variant-structlike-32395.rs
@@ -2,6 +2,9 @@
 // build-aux-docs
 // ignore-cross-compile
 
+// https://github.com/rust-lang/rust/issues/32395
+#![crate_name="issue_32395"]
+
 // @has variant_struct/enum.Foo.html
 // @!hasraw - 'pub qux'
 // @!hasraw - 'pub(crate) qux'
diff --git a/tests/rustdoc/sidebar-items.rs b/tests/rustdoc/sidebar-items.rs
index 6f7afa59bdd..b746f698264 100644
--- a/tests/rustdoc/sidebar-items.rs
+++ b/tests/rustdoc/sidebar-items.rs
@@ -14,6 +14,7 @@
 // @has - '//*[@class="sidebar-elems"]//section//a' 'Output'
 // @has - '//div[@class="sidebar-elems"]//h3/a[@href="#provided-associated-types"]' 'Provided Associated Types'
 // @has - '//*[@class="sidebar-elems"]//section//a' 'Extra'
+// @has - '//div[@class="sidebar-elems"]//h3/a[@href="#object-safety"]' 'Object Safety'
 pub trait Foo {
     const FOO: usize;
     const BAR: u32 = 0;
@@ -24,6 +25,12 @@ pub trait Foo {
     fn bar() -> Self::Output;
 }
 
+// @has foo/trait.Safe.html
+// @!has - '//div[@class="sidebar-elems"]//h3/a[@href="#object-safety"]' ''
+pub trait Safe {
+    fn access(&self);
+}
+
 // @has foo/struct.Bar.html
 // @has - '//div[@class="sidebar-elems"]//h3/a[@href="#fields"]' 'Fields'
 // @has - '//*[@class="sidebar-elems"]//section//a[@href="#structfield.f"]' 'f'
diff --git a/tests/rustdoc/source-version-separator.rs b/tests/rustdoc/source-version-separator.rs
index 14580373b3b..7256f731573 100644
--- a/tests/rustdoc/source-version-separator.rs
+++ b/tests/rustdoc/source-version-separator.rs
@@ -3,23 +3,23 @@
 #![feature(staged_api)]
 
 // @has foo/trait.Bar.html
-// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
+// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0.0 · source · '
 #[stable(feature = "bar", since = "1.0")]
 pub trait Bar {
-    // @has - '//*[@id="tymethod.foo"]/*[@class="rightside"]' '3.0 · source'
+    // @has - '//*[@id="tymethod.foo"]/*[@class="rightside"]' '3.0.0 · source'
     #[stable(feature = "foobar", since = "3.0")]
     fn foo();
 }
 
-// @has - '//div[@id="implementors-list"]//*[@class="rightside"]' '4.0 · source'
+// @has - '//div[@id="implementors-list"]//*[@class="rightside"]' '4.0.0 · source'
 
 // @has foo/struct.Foo.html
-// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
+// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0.0 · source · '
 #[stable(feature = "baz", since = "1.0")]
 pub struct Foo;
 
 impl Foo {
-    // @has - '//*[@id="method.foofoo"]/*[@class="rightside"]' '3.0 · source'
+    // @has - '//*[@id="method.foofoo"]/*[@class="rightside"]' '3.0.0 · source'
     #[stable(feature = "foobar", since = "3.0")]
     pub fn foofoo() {}
 }
diff --git a/tests/rustdoc/issue-34274.rs b/tests/rustdoc/src-links-inlined-34274.rs
index ce5be84a549..a3c9bf7e45c 100644
--- a/tests/rustdoc/issue-34274.rs
+++ b/tests/rustdoc/src-links-inlined-34274.rs
@@ -2,6 +2,7 @@
 // build-aux-docs
 // ignore-cross-compile
 
+// https://github.com/rust-lang/rust/issues/34274
 #![crate_name = "foo"]
 
 extern crate issue_34274;
diff --git a/tests/rustdoc/issue-32374.rs b/tests/rustdoc/staged-api-deprecated-unstable-32374.rs
index 985bf03a121..d282dea907e 100644
--- a/tests/rustdoc/issue-32374.rs
+++ b/tests/rustdoc/staged-api-deprecated-unstable-32374.rs
@@ -1,6 +1,8 @@
+// https://github.com/rust-lang/rust/issues/32374
 #![feature(staged_api)]
 #![doc(issue_tracker_base_url = "https://issue_url/")]
 #![unstable(feature = "test", issue = "32374")]
+#![crate_name="issue_32374"]
 
 // @matches issue_32374/index.html '//*[@class="item-name"]/span[@class="stab deprecated"]' \
 //      'Deprecated'
diff --git a/tests/rustdoc/strip-enum-variant.no-not-shown.html b/tests/rustdoc/strip-enum-variant.no-not-shown.html
index 782198956a0..e072335297d 100644
--- a/tests/rustdoc/strip-enum-variant.no-not-shown.html
+++ b/tests/rustdoc/strip-enum-variant.no-not-shown.html
@@ -1 +1 @@
-<ul class="block"><li><a href="#variant.Shown">Shown</a></li></ul>
\ No newline at end of file
+<ul class="block variant"><li><a href="#variant.Shown">Shown</a></li></ul>
\ No newline at end of file
diff --git a/tests/rustdoc/strip-enum-variant.rs b/tests/rustdoc/strip-enum-variant.rs
index 8753a7dc613..2512fa34b39 100644
--- a/tests/rustdoc/strip-enum-variant.rs
+++ b/tests/rustdoc/strip-enum-variant.rs
@@ -3,7 +3,7 @@
 // @!has - '//code' 'NotShown'
 // @has - '//code' '// some variants omitted'
 // Also check that `NotShown` isn't displayed in the sidebar.
-// @snapshot no-not-shown - '//*[@class="sidebar-elems"]/section/*[@class="block"][1]'
+// @snapshot no-not-shown - '//*[@class="sidebar-elems"]/section/*[@class="block variant"]'
 pub enum MyThing {
     Shown,
     #[doc(hidden)]
diff --git a/tests/rustdoc/issue-31899.rs b/tests/rustdoc/summary-codeblock-31899.rs
index 3eee374465d..c1b33058c9e 100644
--- a/tests/rustdoc/issue-31899.rs
+++ b/tests/rustdoc/summary-codeblock-31899.rs
@@ -1,3 +1,6 @@
+// https://github.com/rust-lang/rust/issues/31899
+#![crate_name="issue_31899"]
+
 // @has issue_31899/index.html
 // @hasraw - 'Make this line a bit longer.'
 // @!hasraw - 'rust rust-example-rendered'
diff --git a/tests/rustdoc/issue-30366.rs b/tests/rustdoc/summary-reference-link-30366.rs
index c6274a058b0..5b9854c5390 100644
--- a/tests/rustdoc/issue-30366.rs
+++ b/tests/rustdoc/summary-reference-link-30366.rs
@@ -1,5 +1,8 @@
 // @has issue_30366/index.html '//a/@href' 'http://www.rust-lang.org/'
 
+// https://github.com/rust-lang/rust/issues/30366
+#![crate_name="issue_30366"]
+
 /// Describe it. [Link somewhere][1].
 ///
 /// [1]: http://www.rust-lang.org/
diff --git a/tests/rustdoc/trait-object-safe.rs b/tests/rustdoc/trait-object-safe.rs
new file mode 100644
index 00000000000..818843f7558
--- /dev/null
+++ b/tests/rustdoc/trait-object-safe.rs
@@ -0,0 +1,27 @@
+#![crate_name = "foo"]
+
+// @has 'foo/trait.Unsafe.html'
+// @has - '//*[@class="object-safety-info"]' 'This trait is not object safe.'
+// @has - '//*[@id="object-safety"]' 'Object Safety'
+pub trait Unsafe {
+    fn foo() -> Self;
+}
+
+// @has 'foo/trait.Unsafe2.html'
+// @has - '//*[@class="object-safety-info"]' 'This trait is not object safe.'
+// @has - '//*[@id="object-safety"]' 'Object Safety'
+pub trait Unsafe2<T> {
+    fn foo(i: T);
+}
+
+// @has 'foo/trait.Safe.html'
+// @!has - '//*[@class="object-safety-info"]' ''
+// @!has - '//*[@id="object-safety"]' ''
+pub trait Safe {
+    fn foo(&self);
+}
+
+// @has 'foo/struct.Foo.html'
+// @!has - '//*[@class="object-safety-info"]' ''
+// @!has - '//*[@id="object-safety"]' ''
+pub struct Foo;
diff --git a/tests/rustdoc/type-alias/auxiliary/parent-crate-115718.rs b/tests/rustdoc/type-alias/auxiliary/parent-crate-115718.rs
new file mode 100644
index 00000000000..3607612c27a
--- /dev/null
+++ b/tests/rustdoc/type-alias/auxiliary/parent-crate-115718.rs
@@ -0,0 +1,9 @@
+pub struct MyStruct<T>(T);
+
+pub trait MyTrait1 {
+    fn method_trait_1();
+}
+
+impl MyTrait1 for MyStruct<u16> {
+    fn method_trait_1() {}
+}
diff --git a/tests/rustdoc/type-alias/cross-crate-115718.rs b/tests/rustdoc/type-alias/cross-crate-115718.rs
new file mode 100644
index 00000000000..372e62e4213
--- /dev/null
+++ b/tests/rustdoc/type-alias/cross-crate-115718.rs
@@ -0,0 +1,34 @@
+// aux-build: parent-crate-115718.rs
+
+// https://github.com/rust-lang/rust/issues/115718
+#![crate_name = "foo"]
+
+extern crate parent_crate_115718;
+
+use parent_crate_115718::MyStruct;
+
+pub trait MyTrait2 {
+    fn method_trait_2();
+}
+
+impl MyTrait2 for MyStruct<u16> {
+    fn method_trait_2() {}
+}
+
+pub trait MyTrait3 {
+    fn method_trait_3();
+}
+
+impl MyTrait3 for MyType {
+    fn method_trait_3() {}
+}
+
+// @hasraw 'type.impl/parent_crate_115718/struct.MyStruct.js' 'method_trait_1'
+// @hasraw 'type.impl/parent_crate_115718/struct.MyStruct.js' 'method_trait_2'
+// Avoid duplicating these docs.
+// @!hasraw 'foo/type.MyType.html' 'method_trait_1'
+// @!hasraw 'foo/type.MyType.html' 'method_trait_2'
+// The one made directly on the type alias should be attached to the HTML instead.
+// @!hasraw 'type.impl/parent_crate_115718/struct.MyStruct.js' 'method_trait_3'
+// @hasraw 'foo/type.MyType.html' 'method_trait_3'
+pub type MyType = MyStruct<u16>;
diff --git a/tests/rustdoc/issue-112515-impl-ty-alias.rs b/tests/rustdoc/type-alias/deeply-nested-112515.rs
index 161188ee576..161188ee576 100644
--- a/tests/rustdoc/issue-112515-impl-ty-alias.rs
+++ b/tests/rustdoc/type-alias/deeply-nested-112515.rs
diff --git a/tests/rustdoc/issue-32077-type-alias-impls.rs b/tests/rustdoc/type-alias/deref-32077.rs
index 664b678093e..186ebb1a632 100644
--- a/tests/rustdoc/issue-32077-type-alias-impls.rs
+++ b/tests/rustdoc/type-alias/deref-32077.rs
@@ -24,18 +24,19 @@ impl Bar for GenericStruct<u32> {}
 // We check that we have the implementation of the type alias itself.
 // @has - '//*[@id="impl-GenericStruct%3Cu8%3E"]/h3' 'impl TypedefStruct'
 // @has - '//*[@id="method.on_alias"]/h4' 'pub fn on_alias()'
-// @has - '//*[@id="impl-GenericStruct%3CT%3E"]/h3' 'impl<T> GenericStruct<T>'
-// @has - '//*[@id="method.on_gen"]/h4' 'pub fn on_gen(arg: T)'
-// @has - '//*[@id="impl-Foo-for-GenericStruct%3CT%3E"]/h3' 'impl<T> Foo for GenericStruct<T>'
 // This trait implementation doesn't match the type alias parameters so shouldn't appear in docs.
 // @!has - '//h3' 'impl Bar for GenericStruct<u32> {}'
 // Same goes for the `Deref` impl.
 // @!has - '//h2' 'Methods from Deref<Target = u32>'
 // @count - '//nav[@class="sidebar"]//a' 'on_alias' 1
-// @count - '//nav[@class="sidebar"]//a' 'on_gen' 1
-// @count - '//nav[@class="sidebar"]//a' 'Foo' 1
+// @!has - '//nav[@class="sidebar"]//a' 'on_gen'
+// @!has - '//nav[@class="sidebar"]//a' 'Foo'
 // @!has - '//nav[@class="sidebar"]//a' 'Bar'
 // @!has - '//nav[@class="sidebar"]//a' 'on_u32'
+// TypedefStruct inlined to GenericStruct
+// @hasraw 'type.impl/foo/struct.GenericStruct.js' 'TypedefStruct'
+// @hasraw 'type.impl/foo/struct.GenericStruct.js' 'method.on_gen'
+// @hasraw 'type.impl/foo/struct.GenericStruct.js' 'Foo'
 pub type TypedefStruct = GenericStruct<u8>;
 
 impl TypedefStruct {
@@ -53,8 +54,11 @@ impl std::ops::Deref for GenericStruct<u32> {
 pub struct Wrap<T>(GenericStruct<T>);
 
 // @has 'foo/type.Alias.html'
-// @has - '//h2' 'Methods from Deref<Target = u32>'
-// @has - '//*[@id="impl-Deref-for-Wrap%3CT%3E"]/h3' 'impl<T> Deref for Wrap<T>'
+// @!has - '//h2' 'Methods from Deref<Target = u32>'
+// @!has - '//*[@id="impl-Deref-for-Wrap%3CT%3E"]/h3' 'impl<T> Deref for Wrap<T>'
+// @hasraw 'type.impl/foo/struct.Wrap.js' 'impl-Deref-for-Wrap%3CT%3E'
+// Deref Methods aren't gathered for type aliases, though the actual impl is.
+// @!hasraw 'type.impl/foo/struct.Wrap.js' 'BITS'
 pub type Alias = Wrap<u32>;
 
 impl<T> std::ops::Deref for Wrap<T> {
diff --git a/tests/rustdoc/type-alias/same-crate-115718.rs b/tests/rustdoc/type-alias/same-crate-115718.rs
new file mode 100644
index 00000000000..26e5db85cd6
--- /dev/null
+++ b/tests/rustdoc/type-alias/same-crate-115718.rs
@@ -0,0 +1,34 @@
+// https://github.com/rust-lang/rust/issues/115718
+#![crate_name = "foo"]
+
+pub trait MyTrait1 {
+    fn method_trait_1();
+}
+
+pub trait MyTrait2 {
+    fn method_trait_2();
+}
+
+pub struct MyStruct<T>(T);
+
+impl MyStruct<u32> {
+    pub fn method_u32() {}
+}
+
+impl MyStruct<u16> {
+    pub fn method_u16() {}
+}
+
+impl MyTrait1 for MyStruct<u32> {
+    fn method_trait_1() {}
+}
+
+impl MyTrait2 for MyStruct<u16> {
+    fn method_trait_2() {}
+}
+
+// @hasraw 'type.impl/foo/struct.MyStruct.js' 'method_u16'
+// @!hasraw 'type.impl/foo/struct.MyStruct.js' 'method_u32'
+// @!hasraw 'type.impl/foo/struct.MyStruct.js' 'method_trait_1'
+// @hasraw 'type.impl/foo/struct.MyStruct.js' 'method_trait_2'
+pub type MyType = MyStruct<u16>;
diff --git a/tests/rustdoc/version-separator-without-source.rs b/tests/rustdoc/version-separator-without-source.rs
index 04ea46a7f3a..4a855b7bb29 100644
--- a/tests/rustdoc/version-separator-without-source.rs
+++ b/tests/rustdoc/version-separator-without-source.rs
@@ -4,20 +4,20 @@
 #![crate_name = "foo"]
 
 // @has foo/fn.foo.html
-// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · '
-// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
+// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0.0 · '
+// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0.0 · source · '
 #[stable(feature = "bar", since = "1.0")]
 pub fn foo() {}
 
 // @has foo/struct.Bar.html
-// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · '
-// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0 · source · '
+// @has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0.0 · '
+// @!has - '//div[@class="main-heading"]/*[@class="out-of-band"]' '1.0.0 · source · '
 #[stable(feature = "bar", since = "1.0")]
 pub struct Bar;
 
 impl Bar {
-    // @has - '//*[@id="method.bar"]/*[@class="since rightside"]' '2.0'
-    // @!has - '//*[@id="method.bar"]/*[@class="rightside"]' '2.0 ·'
+    // @has - '//*[@id="method.bar"]/*[@class="since rightside"]' '2.0.0'
+    // @!has - '//*[@id="method.bar"]/*[@class="rightside"]' '2.0.0 ·'
     #[stable(feature = "foobar", since = "2.0")]
     pub fn bar() {}
 }
diff --git a/tests/rustdoc/where-clause-order.rs b/tests/rustdoc/where-clause-order.rs
index 7261dfa7dd9..e3184b646bf 100644
--- a/tests/rustdoc/where-clause-order.rs
+++ b/tests/rustdoc/where-clause-order.rs
@@ -7,7 +7,7 @@ where
 }
 
 // @has 'foo/trait.SomeTrait.html'
-// @has - "//*[@id='impl-SomeTrait-for-(A,+B,+C,+D,+E)']/h3" "impl<A, B, C, D, E> SomeTrait<(A, B, C, D, E)> for (A, B, C, D, E)where A: PartialOrd<A> + PartialEq<A>, B: PartialOrd<B> + PartialEq<B>, C: PartialOrd<C> + PartialEq<C>, D: PartialOrd<D> + PartialEq<D>, E: PartialOrd<E> + PartialEq<E> + ?Sized, "
+// @has - "//*[@id='impl-SomeTrait-for-(A,+B,+C,+D,+E)']/h3" "impl<A, B, C, D, E> SomeTrait for (A, B, C, D, E)where A: PartialOrd<A> + PartialEq<A>, B: PartialOrd<B> + PartialEq<B>, C: PartialOrd<C> + PartialEq<C>, D: PartialOrd<D> + PartialEq<D>, E: PartialOrd<E> + PartialEq<E> + ?Sized, "
 impl<A, B, C, D, E> SomeTrait<(A, B, C, D, E)> for (A, B, C, D, E)
 where
     A: PartialOrd<A> + PartialEq<A>,
diff --git a/tests/rustdoc/whitespace-after-where-clause.enum.html b/tests/rustdoc/whitespace-after-where-clause.enum.html
index 20b60b68e88..ff4971f33cd 100644
--- a/tests/rustdoc/whitespace-after-where-clause.enum.html
+++ b/tests/rustdoc/whitespace-after-where-clause.enum.html
@@ -1,5 +1,5 @@
 <pre class="rust item-decl"><code>pub enum Cow&lt;'a, B&gt;<span class="where fmt-newline">where
-    B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;dyn <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
+    B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
     Borrowed(<a class="primitive" href="{{channel}}/std/primitive.reference.html">&amp;'a B</a>),
     Whatever(<a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a>),
 }</code></pre>
\ No newline at end of file
diff --git a/tests/rustdoc/whitespace-after-where-clause.enum2.html b/tests/rustdoc/whitespace-after-where-clause.enum2.html
index 065ce757de1..bfc50f8adcd 100644
--- a/tests/rustdoc/whitespace-after-where-clause.enum2.html
+++ b/tests/rustdoc/whitespace-after-where-clause.enum2.html
@@ -1,4 +1,4 @@
-<pre class="rust item-decl"><code>pub enum Cow2&lt;'a, B: ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;dyn <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; + 'a&gt; {
+<pre class="rust item-decl"><code>pub enum Cow2&lt;'a, B: ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + 'a&gt; {
     Borrowed(<a class="primitive" href="{{channel}}/std/primitive.reference.html">&amp;'a B</a>),
     Whatever(<a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a>),
 }</code></pre>
\ No newline at end of file
diff --git a/tests/rustdoc/whitespace-after-where-clause.rs b/tests/rustdoc/whitespace-after-where-clause.rs
index b540c7c97c1..832d3728e75 100644
--- a/tests/rustdoc/whitespace-after-where-clause.rs
+++ b/tests/rustdoc/whitespace-after-where-clause.rs
@@ -6,7 +6,8 @@
 // @has 'foo/trait.ToOwned.html'
 // @snapshot trait - '//*[@class="rust item-decl"]'
 pub trait ToOwned<T>
-where T: Clone
+where
+    T: Clone,
 {
     type Owned;
     fn to_owned(&self) -> Self::Owned;
@@ -26,7 +27,7 @@ pub trait ToOwned2<T: Clone> {
 // @snapshot enum - '//*[@class="rust item-decl"]'
 pub enum Cow<'a, B: ?Sized + 'a>
 where
-    B: ToOwned<Clone>,
+    B: ToOwned<()>,
 {
     Borrowed(&'a B),
     Whatever(u32),
@@ -35,7 +36,7 @@ where
 // @has 'foo/enum.Cow2.html'
 // @snapshot enum2 - '//*[@class="rust item-decl"]'
 // There should be a whitespace before `{` in this case!
-pub enum Cow2<'a, B: ?Sized + ToOwned<Clone> + 'a> {
+pub enum Cow2<'a, B: ?Sized + ToOwned<()> + 'a> {
     Borrowed(&'a B),
     Whatever(u32),
 }
@@ -44,7 +45,7 @@ pub enum Cow2<'a, B: ?Sized + ToOwned<Clone> + 'a> {
 // @snapshot struct - '//*[@class="rust item-decl"]'
 pub struct Struct<'a, B: ?Sized + 'a>
 where
-    B: ToOwned<Clone>,
+    B: ToOwned<()>,
 {
     pub a: &'a B,
     pub b: u32,
@@ -53,7 +54,7 @@ where
 // @has 'foo/struct.Struct2.html'
 // @snapshot struct2 - '//*[@class="rust item-decl"]'
 // There should be a whitespace before `{` in this case!
-pub struct Struct2<'a, B: ?Sized + ToOwned<Clone> + 'a> {
+pub struct Struct2<'a, B: ?Sized + ToOwned<()> + 'a> {
     pub a: &'a B,
     pub b: u32,
 }
@@ -62,7 +63,7 @@ pub struct Struct2<'a, B: ?Sized + ToOwned<Clone> + 'a> {
 // @snapshot union - '//*[@class="rust item-decl"]'
 pub union Union<'a, B: ?Sized + 'a>
 where
-    B: ToOwned<Clone>,
+    B: ToOwned<()>,
 {
     a: &'a B,
     b: u32,
@@ -71,7 +72,7 @@ where
 // @has 'foo/union.Union2.html'
 // @snapshot union2 - '//*[@class="rust item-decl"]'
 // There should be a whitespace before `{` in this case!
-pub union Union2<'a, B: ?Sized + ToOwned<Clone> + 'a> {
+pub union Union2<'a, B: ?Sized + ToOwned<()> + 'a> {
     a: &'a B,
     b: u32,
 }
diff --git a/tests/rustdoc/whitespace-after-where-clause.struct.html b/tests/rustdoc/whitespace-after-where-clause.struct.html
index 948ddc499da..ca685358633 100644
--- a/tests/rustdoc/whitespace-after-where-clause.struct.html
+++ b/tests/rustdoc/whitespace-after-where-clause.struct.html
@@ -1,5 +1,5 @@
 <pre class="rust item-decl"><code>pub struct Struct&lt;'a, B&gt;<span class="where fmt-newline">where
-    B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;dyn <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
+    B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
     pub a: <a class="primitive" href="{{channel}}/std/primitive.reference.html">&amp;'a B</a>,
     pub b: <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a>,
 }</code></pre>
\ No newline at end of file
diff --git a/tests/rustdoc/whitespace-after-where-clause.struct2.html b/tests/rustdoc/whitespace-after-where-clause.struct2.html
index c647e8d7121..5aa8110c18f 100644
--- a/tests/rustdoc/whitespace-after-where-clause.struct2.html
+++ b/tests/rustdoc/whitespace-after-where-clause.struct2.html
@@ -1,4 +1,4 @@
-<pre class="rust item-decl"><code>pub struct Struct2&lt;'a, B: ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;dyn <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; + 'a&gt; {
+<pre class="rust item-decl"><code>pub struct Struct2&lt;'a, B: ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + 'a&gt; {
     pub a: <a class="primitive" href="{{channel}}/std/primitive.reference.html">&amp;'a B</a>,
     pub b: <a class="primitive" href="{{channel}}/std/primitive.u32.html">u32</a>,
 }</code></pre>
\ No newline at end of file
diff --git a/tests/rustdoc/whitespace-after-where-clause.union.html b/tests/rustdoc/whitespace-after-where-clause.union.html
index 38b6cb8b5c6..40b0c671284 100644
--- a/tests/rustdoc/whitespace-after-where-clause.union.html
+++ b/tests/rustdoc/whitespace-after-where-clause.union.html
@@ -1,4 +1,4 @@
 <pre class="rust item-decl"><code>pub union Union&lt;'a, B&gt;<span class="where fmt-newline">where
-    B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;dyn <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
+    B: <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + 'a,</span>{
     /* private fields */
 }</code></pre>
\ No newline at end of file
diff --git a/tests/rustdoc/whitespace-after-where-clause.union2.html b/tests/rustdoc/whitespace-after-where-clause.union2.html
index 66ad30c9200..177a161b83a 100644
--- a/tests/rustdoc/whitespace-after-where-clause.union2.html
+++ b/tests/rustdoc/whitespace-after-where-clause.union2.html
@@ -1,3 +1,3 @@
-<pre class="rust item-decl"><code>pub union Union2&lt;'a, B: ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;dyn <a class="trait" href="{{channel}}/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a>&gt; + 'a&gt; {
+<pre class="rust item-decl"><code>pub union Union2&lt;'a, B: ?<a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ToOwned.html" title="trait foo::ToOwned">ToOwned</a>&lt;<a class="primitive" href="{{channel}}/std/primitive.unit.html">()</a>&gt; + 'a&gt; {
     /* private fields */
 }</code></pre>
\ No newline at end of file
diff --git a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs
new file mode 100644
index 00000000000..aeb68bf05e1
--- /dev/null
+++ b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.rs
@@ -0,0 +1,15 @@
+// Test the `rustc::span_use_eq_ctxt` internal lint
+// #[cfg(bootstrap)]
+// ignore-stage1
+// compile-flags: -Z unstable-options
+
+#![feature(rustc_private)]
+#![deny(rustc::span_use_eq_ctxt)]
+#![crate_type = "lib"]
+
+extern crate rustc_span;
+use rustc_span::Span;
+
+pub fn f(s: Span, t: Span) -> bool {
+    s.ctxt() == t.ctxt() //~ ERROR use `.eq_ctxt()` instead of `.ctxt() == .ctxt()`
+}
diff --git a/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr
new file mode 100644
index 00000000000..3d8a7dd1ec0
--- /dev/null
+++ b/tests/ui-fulldeps/internal-lints/span_use_eq_ctxt.stderr
@@ -0,0 +1,14 @@
+error: use `.eq_ctxt()` instead of `.ctxt() == .ctxt()`
+  --> $DIR/span_use_eq_ctxt.rs:14:5
+   |
+LL |     s.ctxt() == t.ctxt()
+   |     ^^^^^^^^^^^^^^^^^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/span_use_eq_ctxt.rs:7:9
+   |
+LL | #![deny(rustc::span_use_eq_ctxt)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs b/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs
index 3f7429a5fcc..ae7f341fe4e 100644
--- a/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs
+++ b/tests/ui-fulldeps/internal-lints/ty_tykind_usage.rs
@@ -29,8 +29,8 @@ fn main() {
         TyKind::FnPtr(..) => (),            //~ ERROR usage of `ty::TyKind::<kind>`
         TyKind::Dynamic(..) => (),          //~ ERROR usage of `ty::TyKind::<kind>`
         TyKind::Closure(..) => (),          //~ ERROR usage of `ty::TyKind::<kind>`
-        TyKind::Generator(..) => (),        //~ ERROR usage of `ty::TyKind::<kind>`
-        TyKind::GeneratorWitness(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
+        TyKind::Coroutine(..) => (),        //~ ERROR usage of `ty::TyKind::<kind>`
+        TyKind::CoroutineWitness(..) => (), //~ ERROR usage of `ty::TyKind::<kind>`
         TyKind::Never => (),                //~ ERROR usage of `ty::TyKind::<kind>`
         TyKind::Tuple(..) => (),            //~ ERROR usage of `ty::TyKind::<kind>`
         TyKind::Alias(..) => (),            //~ ERROR usage of `ty::TyKind::<kind>`
diff --git a/tests/ui-fulldeps/internal-lints/ty_tykind_usage.stderr b/tests/ui-fulldeps/internal-lints/ty_tykind_usage.stderr
index 1f49d6b6464..45b7c26faad 100644
--- a/tests/ui-fulldeps/internal-lints/ty_tykind_usage.stderr
+++ b/tests/ui-fulldeps/internal-lints/ty_tykind_usage.stderr
@@ -109,13 +109,13 @@ LL |         TyKind::Closure(..) => (),
 error: usage of `ty::TyKind::<kind>`
   --> $DIR/ty_tykind_usage.rs:32:9
    |
-LL |         TyKind::Generator(..) => (),
+LL |         TyKind::Coroutine(..) => (),
    |         ^^^^^^ help: try using `ty::<kind>` directly: `ty`
 
 error: usage of `ty::TyKind::<kind>`
   --> $DIR/ty_tykind_usage.rs:33:9
    |
-LL |         TyKind::GeneratorWitness(..) => (),
+LL |         TyKind::CoroutineWitness(..) => (),
    |         ^^^^^^ help: try using `ty::<kind>` directly: `ty`
 
 error: usage of `ty::TyKind::<kind>`
diff --git a/tests/ui-fulldeps/plugin/auxiliary/empty-plugin.rs b/tests/ui-fulldeps/plugin/auxiliary/empty-plugin.rs
deleted file mode 100644
index c24cdc97aa5..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/empty-plugin.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-extern crate rustc_driver;
-use rustc_driver::plugin::Registry;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_: &mut Registry) {}
diff --git a/tests/ui-fulldeps/plugin/auxiliary/issue-40001-plugin.rs b/tests/ui-fulldeps/plugin/auxiliary/issue-40001-plugin.rs
deleted file mode 100644
index 3f6caecaa5a..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/issue-40001-plugin.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-#![feature(plugin, rustc_private)]
-#![crate_type = "dylib"]
-
-extern crate rustc_ast_pretty;
-extern crate rustc_driver;
-extern crate rustc_hir;
-extern crate rustc_lint;
-#[macro_use]
-extern crate rustc_session;
-extern crate rustc_ast;
-extern crate rustc_span;
-
-use rustc_ast_pretty::pprust;
-use rustc_driver::plugin::Registry;
-use rustc_hir as hir;
-use rustc_hir::intravisit;
-use rustc_hir::Node;
-use rustc_lint::{LateContext, LateLintPass, LintContext};
-use rustc_span::def_id::LocalDefId;
-use rustc_span::source_map;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(reg: &mut Registry) {
-    reg.lint_store.register_lints(&[&MISSING_ALLOWED_ATTR]);
-    reg.lint_store.register_late_pass(|_| Box::new(MissingAllowedAttrPass));
-}
-
-declare_lint! {
-    MISSING_ALLOWED_ATTR,
-    Deny,
-    "Checks for missing `allowed_attr` attribute"
-}
-
-declare_lint_pass!(MissingAllowedAttrPass => [MISSING_ALLOWED_ATTR]);
-
-impl<'tcx> LateLintPass<'tcx> for MissingAllowedAttrPass {
-    fn check_fn(
-        &mut self,
-        cx: &LateContext<'tcx>,
-        _: intravisit::FnKind<'tcx>,
-        _: &'tcx hir::FnDecl,
-        _: &'tcx hir::Body,
-        span: source_map::Span,
-        def_id: LocalDefId,
-    ) {
-        let id = cx.tcx.hir().local_def_id_to_hir_id(def_id);
-        let item = match cx.tcx.hir().get(id) {
-            Node::Item(item) => item,
-            _ => cx.tcx.hir().expect_item(cx.tcx.hir().get_parent_item(id).def_id),
-        };
-
-        let allowed = |attr| pprust::attribute_to_string(attr).contains("allowed_attr");
-        if !cx.tcx.hir().attrs(item.hir_id()).iter().any(allowed) {
-            cx.lint(
-                MISSING_ALLOWED_ATTR,
-                "Missing 'allowed_attr' attribute",
-                |lint| lint.set_span(span)
-            );
-        }
-    }
-}
diff --git a/tests/ui-fulldeps/plugin/auxiliary/lint-for-crate.rs b/tests/ui-fulldeps/plugin/auxiliary/lint-for-crate.rs
deleted file mode 100644
index 6304c07d2c7..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/lint-for-crate.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-extern crate rustc_driver;
-extern crate rustc_hir;
-extern crate rustc_lint;
-#[macro_use]
-extern crate rustc_session;
-extern crate rustc_ast;
-extern crate rustc_span;
-
-use rustc_ast::attr;
-use rustc_driver::plugin::Registry;
-use rustc_lint::{LateContext, LateLintPass, LintContext};
-use rustc_span::def_id::CRATE_DEF_ID;
-use rustc_span::symbol::Symbol;
-
-declare_lint! {
-    CRATE_NOT_OKAY,
-    Warn,
-    "crate not marked with #![crate_okay]"
-}
-
-declare_lint_pass!(Pass => [CRATE_NOT_OKAY]);
-
-impl<'tcx> LateLintPass<'tcx> for Pass {
-    fn check_crate(&mut self, cx: &LateContext) {
-        let attrs = cx.tcx.hir().attrs(rustc_hir::CRATE_HIR_ID);
-        let span = cx.tcx.def_span(CRATE_DEF_ID);
-        if !attr::contains_name(attrs, Symbol::intern("crate_okay")) {
-            cx.lint(CRATE_NOT_OKAY, "crate is not marked with #![crate_okay]", |lint| {
-                lint.set_span(span)
-            });
-        }
-    }
-}
-
-#[no_mangle]
-fn __rustc_plugin_registrar(reg: &mut Registry) {
-    reg.lint_store.register_lints(&[&CRATE_NOT_OKAY]);
-    reg.lint_store.register_late_pass(|_| Box::new(Pass));
-}
diff --git a/tests/ui-fulldeps/plugin/auxiliary/lint-group-plugin-test.rs b/tests/ui-fulldeps/plugin/auxiliary/lint-group-plugin-test.rs
deleted file mode 100644
index 150f0c6b9a2..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/lint-group-plugin-test.rs
+++ /dev/null
@@ -1,43 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-// Load rustc as a plugin to get macros.
-extern crate rustc_driver;
-extern crate rustc_hir;
-extern crate rustc_lint;
-#[macro_use]
-extern crate rustc_session;
-
-use rustc_driver::plugin::Registry;
-use rustc_lint::{LateContext, LateLintPass, LintContext, LintId};
-
-declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
-
-declare_lint!(PLEASE_LINT, Warn, "Warn about items named 'pleaselintme'");
-
-declare_lint_pass!(Pass => [TEST_LINT, PLEASE_LINT]);
-
-impl<'tcx> LateLintPass<'tcx> for Pass {
-    fn check_item(&mut self, cx: &LateContext, it: &rustc_hir::Item) {
-        match it.ident.as_str() {
-            "lintme" => cx.lint(TEST_LINT, "item is named 'lintme'", |lint| lint.set_span(it.span)),
-            "pleaselintme" => {
-                cx.lint(PLEASE_LINT, "item is named 'pleaselintme'", |lint| lint.set_span(it.span))
-            }
-            _ => {}
-        }
-    }
-}
-
-#[no_mangle]
-fn __rustc_plugin_registrar(reg: &mut Registry) {
-    reg.lint_store.register_lints(&[&TEST_LINT, &PLEASE_LINT]);
-    reg.lint_store.register_late_pass(|_| Box::new(Pass));
-    reg.lint_store.register_group(
-        true,
-        "lint_me",
-        None,
-        vec![LintId::of(&TEST_LINT), LintId::of(&PLEASE_LINT)],
-    );
-}
diff --git a/tests/ui-fulldeps/plugin/auxiliary/lint-plugin-test.rs b/tests/ui-fulldeps/plugin/auxiliary/lint-plugin-test.rs
deleted file mode 100644
index acc5fe76051..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/lint-plugin-test.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-extern crate rustc_ast;
-
-// Load rustc as a plugin to get macros
-extern crate rustc_driver;
-extern crate rustc_lint;
-#[macro_use]
-extern crate rustc_session;
-
-use rustc_ast::ast;
-use rustc_driver::plugin::Registry;
-use rustc_lint::{EarlyContext, EarlyLintPass, LintContext};
-
-declare_lint!(TEST_LINT, Warn, "Warn about items named 'lintme'");
-
-declare_lint_pass!(Pass => [TEST_LINT]);
-
-impl EarlyLintPass for Pass {
-    fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) {
-        if it.ident.name.as_str() == "lintme" {
-            cx.lint(TEST_LINT, "item is named 'lintme'", |lint| lint.set_span(it.span));
-        }
-    }
-}
-
-#[no_mangle]
-fn __rustc_plugin_registrar(reg: &mut Registry) {
-    reg.lint_store.register_lints(&[&TEST_LINT]);
-    reg.lint_store.register_early_pass(|| Box::new(Pass));
-}
diff --git a/tests/ui-fulldeps/plugin/auxiliary/lint-tool-test.rs b/tests/ui-fulldeps/plugin/auxiliary/lint-tool-test.rs
deleted file mode 100644
index 21de4aa7008..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/lint-tool-test.rs
+++ /dev/null
@@ -1,52 +0,0 @@
-#![feature(rustc_private)]
-
-extern crate rustc_ast;
-
-// Load rustc as a plugin to get macros
-extern crate rustc_driver;
-extern crate rustc_lint;
-#[macro_use]
-extern crate rustc_session;
-
-use rustc_ast as ast;
-use rustc_driver::plugin::Registry;
-use rustc_lint::{EarlyContext, EarlyLintPass, LintContext, LintId};
-
-declare_tool_lint!(pub clippy::TEST_LINT, Warn, "Warn about stuff");
-declare_tool_lint!(
-    /// Some docs
-    pub clippy::TEST_GROUP,
-    Warn, "Warn about other stuff"
-);
-
-declare_tool_lint!(
-    /// Some docs
-    pub rustc::TEST_RUSTC_TOOL_LINT,
-    Deny,
-    "Deny internal stuff"
-);
-
-declare_lint_pass!(Pass => [TEST_LINT, TEST_GROUP, TEST_RUSTC_TOOL_LINT]);
-
-impl EarlyLintPass for Pass {
-    fn check_item(&mut self, cx: &EarlyContext, it: &ast::Item) {
-        if it.ident.name.as_str() == "lintme" {
-            cx.lint(TEST_LINT, "item is named 'lintme'", |lint| lint.set_span(it.span));
-        }
-        if it.ident.name.as_str() == "lintmetoo" {
-            cx.lint(TEST_GROUP, "item is named 'lintmetoo'", |lint| lint.set_span(it.span));
-        }
-    }
-}
-
-#[no_mangle]
-fn __rustc_plugin_registrar(reg: &mut Registry) {
-    reg.lint_store.register_lints(&[&TEST_RUSTC_TOOL_LINT, &TEST_LINT, &TEST_GROUP]);
-    reg.lint_store.register_early_pass(|| Box::new(Pass));
-    reg.lint_store.register_group(
-        true,
-        "clippy::group",
-        Some("clippy_group"),
-        vec![LintId::of(&TEST_LINT), LintId::of(&TEST_GROUP)],
-    );
-}
diff --git a/tests/ui-fulldeps/plugin/auxiliary/lto-syntax-extension-lib.rs b/tests/ui-fulldeps/plugin/auxiliary/lto-syntax-extension-lib.rs
deleted file mode 100644
index 954a1e554da..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/lto-syntax-extension-lib.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-
-pub fn foo() {}
diff --git a/tests/ui-fulldeps/plugin/auxiliary/lto-syntax-extension-plugin.rs b/tests/ui-fulldeps/plugin/auxiliary/lto-syntax-extension-plugin.rs
deleted file mode 100644
index 9b075c1a5b9..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/lto-syntax-extension-plugin.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-extern crate rustc_middle;
-extern crate rustc_driver;
-
-use rustc_driver::plugin::Registry;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_reg: &mut Registry) {}
diff --git a/tests/ui-fulldeps/plugin/auxiliary/multiple-plugins-1.rs b/tests/ui-fulldeps/plugin/auxiliary/multiple-plugins-1.rs
deleted file mode 100644
index fd6e9e20f03..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/multiple-plugins-1.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![crate_type = "dylib"]
-#![feature(rustc_private)]
-
-extern crate rustc_middle;
-extern crate rustc_driver;
-
-use rustc_driver::plugin::Registry;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_: &mut Registry) {}
diff --git a/tests/ui-fulldeps/plugin/auxiliary/multiple-plugins-2.rs b/tests/ui-fulldeps/plugin/auxiliary/multiple-plugins-2.rs
deleted file mode 100644
index fd6e9e20f03..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/multiple-plugins-2.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-#![crate_type = "dylib"]
-#![feature(rustc_private)]
-
-extern crate rustc_middle;
-extern crate rustc_driver;
-
-use rustc_driver::plugin::Registry;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_: &mut Registry) {}
diff --git a/tests/ui-fulldeps/plugin/auxiliary/outlive-expansion-phase.rs b/tests/ui-fulldeps/plugin/auxiliary/outlive-expansion-phase.rs
deleted file mode 100644
index e83dfe80463..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/outlive-expansion-phase.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// force-host
-
-#![feature(rustc_private)]
-
-extern crate rustc_middle;
-extern crate rustc_driver;
-
-use std::any::Any;
-use std::cell::RefCell;
-use rustc_driver::plugin::Registry;
-
-struct Foo {
-    foo: isize
-}
-
-impl Drop for Foo {
-    fn drop(&mut self) {}
-}
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_: &mut Registry) {
-    thread_local!(static FOO: RefCell<Option<Box<Any+Send>>> = RefCell::new(None));
-    FOO.with(|s| *s.borrow_mut() = Some(Box::new(Foo { foo: 10 }) as Box<Any+Send>));
-}
diff --git a/tests/ui-fulldeps/plugin/auxiliary/rlib-crate-test.rs b/tests/ui-fulldeps/plugin/auxiliary/rlib-crate-test.rs
deleted file mode 100644
index 3ba73538ecf..00000000000
--- a/tests/ui-fulldeps/plugin/auxiliary/rlib-crate-test.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// no-prefer-dynamic
-
-#![crate_type = "rlib"]
-#![feature(rustc_private)]
-
-extern crate rustc_middle;
-extern crate rustc_driver;
-
-use rustc_driver::plugin::Registry;
-
-#[no_mangle]
-fn __rustc_plugin_registrar(_: &mut Registry) {}
diff --git a/tests/ui-fulldeps/plugin/feature-gate-plugin.rs b/tests/ui-fulldeps/plugin/feature-gate-plugin.rs
deleted file mode 100644
index 85eaf533643..00000000000
--- a/tests/ui-fulldeps/plugin/feature-gate-plugin.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// aux-build:empty-plugin.rs
-// ignore-stage1
-
-#![plugin(empty_plugin)]
-//~^ ERROR compiler plugins are deprecated
-//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
-
-fn main() {}
diff --git a/tests/ui-fulldeps/plugin/feature-gate-plugin.stderr b/tests/ui-fulldeps/plugin/feature-gate-plugin.stderr
deleted file mode 100644
index 5e40561c7f5..00000000000
--- a/tests/ui-fulldeps/plugin/feature-gate-plugin.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0658]: compiler plugins are deprecated
-  --> $DIR/feature-gate-plugin.rs:4:1
-   |
-LL | #![plugin(empty_plugin)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #29597 <https://github.com/rust-lang/rust/issues/29597> for more information
-   = help: add `#![feature(plugin)]` to the crate attributes to enable
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/feature-gate-plugin.rs:4:1
-   |
-LL | #![plugin(empty_plugin)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui-fulldeps/plugin/gated-plugin.rs b/tests/ui-fulldeps/plugin/gated-plugin.rs
deleted file mode 100644
index 85eaf533643..00000000000
--- a/tests/ui-fulldeps/plugin/gated-plugin.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// aux-build:empty-plugin.rs
-// ignore-stage1
-
-#![plugin(empty_plugin)]
-//~^ ERROR compiler plugins are deprecated
-//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
-
-fn main() {}
diff --git a/tests/ui-fulldeps/plugin/gated-plugin.stderr b/tests/ui-fulldeps/plugin/gated-plugin.stderr
deleted file mode 100644
index f48f1eab60b..00000000000
--- a/tests/ui-fulldeps/plugin/gated-plugin.stderr
+++ /dev/null
@@ -1,20 +0,0 @@
-error[E0658]: compiler plugins are deprecated
-  --> $DIR/gated-plugin.rs:4:1
-   |
-LL | #![plugin(empty_plugin)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: see issue #29597 <https://github.com/rust-lang/rust/issues/29597> for more information
-   = help: add `#![feature(plugin)]` to the crate attributes to enable
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/gated-plugin.rs:4:1
-   |
-LL | #![plugin(empty_plugin)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui-fulldeps/plugin/issue-15778-fail.rs b/tests/ui-fulldeps/plugin/issue-15778-fail.rs
deleted file mode 100644
index beecaadf955..00000000000
--- a/tests/ui-fulldeps/plugin/issue-15778-fail.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// aux-build:lint-for-crate.rs
-// ignore-stage1
-// compile-flags: -D crate-not-okay
-
-#![feature(plugin)] //~ ERROR crate is not marked with #![crate_okay]
-#![plugin(lint_for_crate)]
-//~^ WARN use of deprecated attribute `plugin`
-
-pub fn main() { }
diff --git a/tests/ui-fulldeps/plugin/issue-15778-fail.stderr b/tests/ui-fulldeps/plugin/issue-15778-fail.stderr
deleted file mode 100644
index a37893e1203..00000000000
--- a/tests/ui-fulldeps/plugin/issue-15778-fail.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/issue-15778-fail.rs:6:1
-   |
-LL | #![plugin(lint_for_crate)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: crate is not marked with #![crate_okay]
-  --> $DIR/issue-15778-fail.rs:5:1
-   |
-LL | / #![feature(plugin)]
-LL | | #![plugin(lint_for_crate)]
-LL | |
-LL | |
-LL | | pub fn main() { }
-   | |_________________^
-   |
-   = note: requested on the command line with `-D crate-not-okay`
-
-error: aborting due to previous error; 1 warning emitted
-
diff --git a/tests/ui-fulldeps/plugin/issue-40001.rs b/tests/ui-fulldeps/plugin/issue-40001.rs
deleted file mode 100644
index e14338fdbbf..00000000000
--- a/tests/ui-fulldeps/plugin/issue-40001.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// run-pass
-// aux-build:issue-40001-plugin.rs
-// ignore-stage1
-
-#![feature(plugin, register_tool)]
-#![plugin(issue_40001_plugin)] //~ WARNING compiler plugins are deprecated
-#![register_tool(plugin)]
-
-#[plugin::allowed_attr]
-fn main() {}
diff --git a/tests/ui-fulldeps/plugin/issue-40001.stderr b/tests/ui-fulldeps/plugin/issue-40001.stderr
deleted file mode 100644
index 73ec0692464..00000000000
--- a/tests/ui-fulldeps/plugin/issue-40001.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/issue-40001.rs:6:1
-   |
-LL | #![plugin(issue_40001_plugin)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui-fulldeps/plugin/lint-group-plugin-deny-cmdline.rs b/tests/ui-fulldeps/plugin/lint-group-plugin-deny-cmdline.rs
deleted file mode 100644
index 9f8a879608c..00000000000
--- a/tests/ui-fulldeps/plugin/lint-group-plugin-deny-cmdline.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// aux-build:lint-group-plugin-test.rs
-// ignore-stage1
-// compile-flags: -D lint-me
-
-#![feature(plugin)]
-
-#![plugin(lint_group_plugin_test)]
-//~^ WARN use of deprecated attribute `plugin`
-
-fn lintme() { } //~ ERROR item is named 'lintme'
-
-fn pleaselintme() { } //~ ERROR item is named 'pleaselintme'
-
-pub fn main() {
-    lintme();
-    pleaselintme();
-}
diff --git a/tests/ui-fulldeps/plugin/lint-group-plugin-deny-cmdline.stderr b/tests/ui-fulldeps/plugin/lint-group-plugin-deny-cmdline.stderr
deleted file mode 100644
index 6e17bbde021..00000000000
--- a/tests/ui-fulldeps/plugin/lint-group-plugin-deny-cmdline.stderr
+++ /dev/null
@@ -1,28 +0,0 @@
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/lint-group-plugin-deny-cmdline.rs:7:1
-   |
-LL | #![plugin(lint_group_plugin_test)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: item is named 'lintme'
-  --> $DIR/lint-group-plugin-deny-cmdline.rs:10:1
-   |
-LL | fn lintme() { }
-   | ^^^^^^^^^^^^^^^
-   |
-   = note: `-D test-lint` implied by `-D lint-me`
-   = help: to override `-D lint-me` add `#[allow(test_lint)]`
-
-error: item is named 'pleaselintme'
-  --> $DIR/lint-group-plugin-deny-cmdline.rs:12:1
-   |
-LL | fn pleaselintme() { }
-   | ^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `-D please-lint` implied by `-D lint-me`
-   = help: to override `-D lint-me` add `#[allow(please_lint)]`
-
-error: aborting due to 2 previous errors; 1 warning emitted
-
diff --git a/tests/ui-fulldeps/plugin/lint-group-plugin.rs b/tests/ui-fulldeps/plugin/lint-group-plugin.rs
deleted file mode 100644
index 7b74be7a954..00000000000
--- a/tests/ui-fulldeps/plugin/lint-group-plugin.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-// run-pass
-// aux-build:lint-group-plugin-test.rs
-// ignore-stage1
-
-#![feature(plugin)]
-#![plugin(lint_group_plugin_test)] //~ WARNING use of deprecated attribute
-#![allow(dead_code)]
-
-fn lintme() { } //~ WARNING item is named 'lintme'
-fn pleaselintme() { } //~ WARNING item is named 'pleaselintme'
-
-#[allow(lint_me)]
-pub fn main() {
-    fn lintme() { }
-
-    fn pleaselintme() { }
-}
diff --git a/tests/ui-fulldeps/plugin/lint-group-plugin.stderr b/tests/ui-fulldeps/plugin/lint-group-plugin.stderr
deleted file mode 100644
index 6f429dad017..00000000000
--- a/tests/ui-fulldeps/plugin/lint-group-plugin.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/lint-group-plugin.rs:6:1
-   |
-LL | #![plugin(lint_group_plugin_test)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: item is named 'lintme'
-  --> $DIR/lint-group-plugin.rs:9:1
-   |
-LL | fn lintme() { }
-   | ^^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(test_lint)]` on by default
-
-warning: item is named 'pleaselintme'
-  --> $DIR/lint-group-plugin.rs:10:1
-   |
-LL | fn pleaselintme() { }
-   | ^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(please_lint)]` on by default
-
-warning: 3 warnings emitted
-
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-cmdline-allow.rs b/tests/ui-fulldeps/plugin/lint-plugin-cmdline-allow.rs
deleted file mode 100644
index 1cc16e2fd1c..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-cmdline-allow.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// check-pass
-// aux-build:lint-plugin-test.rs
-// ignore-stage1
-// compile-flags: -A test-lint
-
-#![feature(plugin)]
-#![plugin(lint_plugin_test)] //~ WARNING compiler plugins are deprecated
-
-fn lintme() { }
-
-pub fn main() {
-}
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-cmdline-allow.stderr b/tests/ui-fulldeps/plugin/lint-plugin-cmdline-allow.stderr
deleted file mode 100644
index f06703a2784..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-cmdline-allow.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/lint-plugin-cmdline-allow.rs:7:1
-   |
-LL | #![plugin(lint_plugin_test)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-cmdline-load.rs b/tests/ui-fulldeps/plugin/lint-plugin-cmdline-load.rs
deleted file mode 100644
index 0bd95dfbd14..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-cmdline-load.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// check-pass
-// aux-build:lint-plugin-test.rs
-// ignore-stage1
-// compile-flags: -Z crate-attr=plugin(lint_plugin_test)
-
-#![feature(plugin)]
-
-fn lintme() { } //~ WARNING item is named 'lintme'
-
-#[allow(test_lint)]
-pub fn main() {
-    fn lintme() { }
-}
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-cmdline-load.stderr b/tests/ui-fulldeps/plugin/lint-plugin-cmdline-load.stderr
deleted file mode 100644
index 82679c9e10a..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-cmdline-load.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-warning: item is named 'lintme'
-  --> $DIR/lint-plugin-cmdline-load.rs:8:1
-   |
-LL | fn lintme() { }
-   | ^^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(test_lint)]` on by default
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> <crate attribute>:1:1
-   |
-LL | plugin(lint_plugin_test)
-   | ^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-deny-attr.rs b/tests/ui-fulldeps/plugin/lint-plugin-deny-attr.rs
deleted file mode 100644
index 04230a8e883..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-deny-attr.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// aux-build:lint-plugin-test.rs
-// ignore-stage1
-
-#![feature(plugin)]
-#![plugin(lint_plugin_test)]
-//~^ WARN use of deprecated attribute `plugin`
-#![deny(test_lint)]
-
-fn lintme() { } //~ ERROR item is named 'lintme'
-
-pub fn main() {
-    lintme();
-}
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-deny-attr.stderr b/tests/ui-fulldeps/plugin/lint-plugin-deny-attr.stderr
deleted file mode 100644
index 5e8891bf1f1..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-deny-attr.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-error: item is named 'lintme'
-  --> $DIR/lint-plugin-deny-attr.rs:9:1
-   |
-LL | fn lintme() { }
-   | ^^^^^^^^^^^^^^^
-   |
-note: the lint level is defined here
-  --> $DIR/lint-plugin-deny-attr.rs:7:9
-   |
-LL | #![deny(test_lint)]
-   |         ^^^^^^^^^
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/lint-plugin-deny-attr.rs:5:1
-   |
-LL | #![plugin(lint_plugin_test)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-deny-cmdline.rs b/tests/ui-fulldeps/plugin/lint-plugin-deny-cmdline.rs
deleted file mode 100644
index c460cfd5f94..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-deny-cmdline.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// aux-build:lint-plugin-test.rs
-// ignore-stage1
-// compile-flags: -D test-lint
-
-#![feature(plugin)]
-#![plugin(lint_plugin_test)]
-//~^ WARN use of deprecated attribute `plugin`
-
-fn lintme() { } //~ ERROR item is named 'lintme'
-
-pub fn main() {
-    lintme();
-}
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-deny-cmdline.stderr b/tests/ui-fulldeps/plugin/lint-plugin-deny-cmdline.stderr
deleted file mode 100644
index d5d6b535214..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-deny-cmdline.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error: item is named 'lintme'
-  --> $DIR/lint-plugin-deny-cmdline.rs:9:1
-   |
-LL | fn lintme() { }
-   | ^^^^^^^^^^^^^^^
-   |
-   = note: requested on the command line with `-D test-lint`
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/lint-plugin-deny-cmdline.rs:6:1
-   |
-LL | #![plugin(lint_plugin_test)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-forbid-attrs.rs b/tests/ui-fulldeps/plugin/lint-plugin-forbid-attrs.rs
deleted file mode 100644
index cf31b3ec158..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-forbid-attrs.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-// aux-build:lint-plugin-test.rs
-// ignore-stage1
-
-#![feature(plugin)]
-#![plugin(lint_plugin_test)]
-//~^ WARN use of deprecated attribute `plugin`
-#![forbid(test_lint)]
-
-fn lintme() {} //~ ERROR item is named 'lintme'
-
-#[allow(test_lint)]
-//~^ ERROR allow(test_lint) incompatible
-//~| ERROR allow(test_lint) incompatible
-pub fn main() {
-    lintme();
-}
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-forbid-attrs.stderr b/tests/ui-fulldeps/plugin/lint-plugin-forbid-attrs.stderr
deleted file mode 100644
index 66ea2e88f0c..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-forbid-attrs.stderr
+++ /dev/null
@@ -1,43 +0,0 @@
-error[E0453]: allow(test_lint) incompatible with previous forbid
-  --> $DIR/lint-plugin-forbid-attrs.rs:11:9
-   |
-LL | #![forbid(test_lint)]
-   |           --------- `forbid` level set here
-...
-LL | #[allow(test_lint)]
-   |         ^^^^^^^^^ overruled by previous forbid
-
-error: item is named 'lintme'
-  --> $DIR/lint-plugin-forbid-attrs.rs:9:1
-   |
-LL | fn lintme() {}
-   | ^^^^^^^^^^^^^^
-   |
-note: the lint level is defined here
-  --> $DIR/lint-plugin-forbid-attrs.rs:7:11
-   |
-LL | #![forbid(test_lint)]
-   |           ^^^^^^^^^
-
-error[E0453]: allow(test_lint) incompatible with previous forbid
-  --> $DIR/lint-plugin-forbid-attrs.rs:11:9
-   |
-LL | #![forbid(test_lint)]
-   |           --------- `forbid` level set here
-...
-LL | #[allow(test_lint)]
-   |         ^^^^^^^^^ overruled by previous forbid
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/lint-plugin-forbid-attrs.rs:5:1
-   |
-LL | #![plugin(lint_plugin_test)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to 3 previous errors; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0453`.
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-forbid-cmdline.rs b/tests/ui-fulldeps/plugin/lint-plugin-forbid-cmdline.rs
deleted file mode 100644
index b9d1aa85a69..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-forbid-cmdline.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// aux-build:lint-plugin-test.rs
-// ignore-stage1
-// compile-flags: -F test-lint
-
-#![feature(plugin)]
-#![plugin(lint_plugin_test)]
-//~^ WARN use of deprecated attribute `plugin`
-fn lintme() { } //~ ERROR item is named 'lintme'
-
-#[allow(test_lint)] //~ ERROR allow(test_lint) incompatible
-                    //~| ERROR allow(test_lint) incompatible
-
-pub fn main() {
-    lintme();
-}
diff --git a/tests/ui-fulldeps/plugin/lint-plugin-forbid-cmdline.stderr b/tests/ui-fulldeps/plugin/lint-plugin-forbid-cmdline.stderr
deleted file mode 100644
index 9dbad702545..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin-forbid-cmdline.stderr
+++ /dev/null
@@ -1,36 +0,0 @@
-error[E0453]: allow(test_lint) incompatible with previous forbid
-  --> $DIR/lint-plugin-forbid-cmdline.rs:10:9
-   |
-LL | #[allow(test_lint)]
-   |         ^^^^^^^^^ overruled by previous forbid
-   |
-   = note: `forbid` lint level was set on command line
-
-error: item is named 'lintme'
-  --> $DIR/lint-plugin-forbid-cmdline.rs:8:1
-   |
-LL | fn lintme() { }
-   | ^^^^^^^^^^^^^^^
-   |
-   = note: requested on the command line with `-F test-lint`
-
-error[E0453]: allow(test_lint) incompatible with previous forbid
-  --> $DIR/lint-plugin-forbid-cmdline.rs:10:9
-   |
-LL | #[allow(test_lint)]
-   |         ^^^^^^^^^ overruled by previous forbid
-   |
-   = note: `forbid` lint level was set on command line
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/lint-plugin-forbid-cmdline.rs:6:1
-   |
-LL | #![plugin(lint_plugin_test)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to 3 previous errors; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0453`.
diff --git a/tests/ui-fulldeps/plugin/lint-plugin.rs b/tests/ui-fulldeps/plugin/lint-plugin.rs
deleted file mode 100644
index 66057eea6bc..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// run-pass
-// aux-build:lint-plugin-test.rs
-// ignore-stage1
-#![feature(plugin)]
-#![plugin(lint_plugin_test)] //~ WARNING use of deprecated attribute
-#![allow(dead_code)]
-
-fn lintme() { } //~ WARNING item is named 'lintme'
-
-#[allow(test_lint)]
-pub fn main() {
-    fn lintme() { }
-}
diff --git a/tests/ui-fulldeps/plugin/lint-plugin.stderr b/tests/ui-fulldeps/plugin/lint-plugin.stderr
deleted file mode 100644
index dd5d3d72ecf..00000000000
--- a/tests/ui-fulldeps/plugin/lint-plugin.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-warning: item is named 'lintme'
-  --> $DIR/lint-plugin.rs:8:1
-   |
-LL | fn lintme() { }
-   | ^^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(test_lint)]` on by default
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/lint-plugin.rs:5:1
-   |
-LL | #![plugin(lint_plugin_test)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui-fulldeps/plugin/lint-tool-cmdline-allow.rs b/tests/ui-fulldeps/plugin/lint-tool-cmdline-allow.rs
deleted file mode 100644
index 83a8b3e1a7e..00000000000
--- a/tests/ui-fulldeps/plugin/lint-tool-cmdline-allow.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// check-pass
-// aux-build:lint-tool-test.rs
-// ignore-stage1
-// compile-flags: -A test-lint
-
-#![feature(plugin)]
-#![plugin(lint_tool_test)] //~ WARNING compiler plugins are deprecated
-
-fn lintme() {}
-//~^ WARNING item is named 'lintme' [clippy::test_lint]
-
-pub fn main() {}
diff --git a/tests/ui-fulldeps/plugin/lint-tool-cmdline-allow.stderr b/tests/ui-fulldeps/plugin/lint-tool-cmdline-allow.stderr
deleted file mode 100644
index 4916b180a36..00000000000
--- a/tests/ui-fulldeps/plugin/lint-tool-cmdline-allow.stderr
+++ /dev/null
@@ -1,36 +0,0 @@
-warning: lint name `test_lint` is deprecated and may not have an effect in the future.
-   |
-   = help: change it to clippy::test_lint
-   = note: requested on the command line with `-A test_lint`
-   = note: `#[warn(renamed_and_removed_lints)]` on by default
-
-warning: lint name `test_lint` is deprecated and may not have an effect in the future.
-   |
-   = help: change it to clippy::test_lint
-   = note: requested on the command line with `-A test_lint`
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-warning: item is named 'lintme'
-  --> $DIR/lint-tool-cmdline-allow.rs:9:1
-   |
-LL | fn lintme() {}
-   | ^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(clippy::test_lint)]` on by default
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/lint-tool-cmdline-allow.rs:7:1
-   |
-LL | #![plugin(lint_tool_test)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: lint name `test_lint` is deprecated and may not have an effect in the future.
-   |
-   = help: change it to clippy::test_lint
-   = note: requested on the command line with `-A test_lint`
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-warning: 5 warnings emitted
-
diff --git a/tests/ui-fulldeps/plugin/lint-tool-test.rs b/tests/ui-fulldeps/plugin/lint-tool-test.rs
deleted file mode 100644
index f92bcd213b8..00000000000
--- a/tests/ui-fulldeps/plugin/lint-tool-test.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-// aux-build:lint-tool-test.rs
-// ignore-stage1
-// compile-flags: --cfg foo
-
-#![feature(plugin)]
-#![plugin(lint_tool_test)]
-//~^ WARN use of deprecated attribute `plugin`
-#![allow(dead_code)]
-#![cfg_attr(foo, warn(test_lint))]
-//~^ WARNING lint name `test_lint` is deprecated and may not have an effect in the future
-//~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
-//~| WARNING lint name `test_lint` is deprecated and may not have an effect in the future
-#![deny(clippy_group)]
-//~^ WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
-//~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
-//~| WARNING lint name `clippy_group` is deprecated and may not have an effect in the future
-
-fn lintme() { } //~ ERROR item is named 'lintme'
-
-#[allow(clippy::group)]
-fn lintmetoo() {}
-
-#[allow(clippy::test_lint)]
-pub fn main() {
-    fn lintme() { }
-    fn lintmetoo() { } //~ ERROR item is named 'lintmetoo'
-}
-
-#[allow(test_group)]
-//~^ WARNING lint name `test_group` is deprecated and may not have an effect in the future
-//~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
-//~| WARNING lint name `test_group` is deprecated and may not have an effect in the future
-#[deny(this_lint_does_not_exist)] //~ WARNING unknown lint: `this_lint_does_not_exist`
-fn hello() {
-    fn lintmetoo() { }
-}
diff --git a/tests/ui-fulldeps/plugin/lint-tool-test.stderr b/tests/ui-fulldeps/plugin/lint-tool-test.stderr
deleted file mode 100644
index d1f0714f042..00000000000
--- a/tests/ui-fulldeps/plugin/lint-tool-test.stderr
+++ /dev/null
@@ -1,107 +0,0 @@
-warning: lint name `test_lint` is deprecated and may not have an effect in the future.
-  --> $DIR/lint-tool-test.rs:9:23
-   |
-LL | #![cfg_attr(foo, warn(test_lint))]
-   |                       ^^^^^^^^^ help: change it to: `clippy::test_lint`
-   |
-   = note: `#[warn(renamed_and_removed_lints)]` on by default
-
-warning: lint name `clippy_group` is deprecated and may not have an effect in the future.
-  --> $DIR/lint-tool-test.rs:13:9
-   |
-LL | #![deny(clippy_group)]
-   |         ^^^^^^^^^^^^ help: change it to: `clippy::group`
-
-warning: lint name `test_group` is deprecated and may not have an effect in the future.
-  --> $DIR/lint-tool-test.rs:29:9
-   |
-LL | #[allow(test_group)]
-   |         ^^^^^^^^^^ help: change it to: `clippy::test_group`
-
-warning: lint name `test_lint` is deprecated and may not have an effect in the future.
-  --> $DIR/lint-tool-test.rs:9:23
-   |
-LL | #![cfg_attr(foo, warn(test_lint))]
-   |                       ^^^^^^^^^ help: change it to: `clippy::test_lint`
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-warning: lint name `clippy_group` is deprecated and may not have an effect in the future.
-  --> $DIR/lint-tool-test.rs:13:9
-   |
-LL | #![deny(clippy_group)]
-   |         ^^^^^^^^^^^^ help: change it to: `clippy::group`
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: item is named 'lintme'
-  --> $DIR/lint-tool-test.rs:18:1
-   |
-LL | fn lintme() { }
-   | ^^^^^^^^^^^^^^^
-   |
-note: the lint level is defined here
-  --> $DIR/lint-tool-test.rs:13:9
-   |
-LL | #![deny(clippy_group)]
-   |         ^^^^^^^^^^^^
-   = note: `#[deny(clippy::test_lint)]` implied by `#[deny(clippy::group)]`
-
-error: item is named 'lintmetoo'
-  --> $DIR/lint-tool-test.rs:26:5
-   |
-LL |     fn lintmetoo() { }
-   |     ^^^^^^^^^^^^^^^^^^
-   |
-   = note: `#[deny(clippy::test_group)]` implied by `#[deny(clippy::group)]`
-
-warning: lint name `test_group` is deprecated and may not have an effect in the future.
-  --> $DIR/lint-tool-test.rs:29:9
-   |
-LL | #[allow(test_group)]
-   |         ^^^^^^^^^^ help: change it to: `clippy::test_group`
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-warning: unknown lint: `this_lint_does_not_exist`
-  --> $DIR/lint-tool-test.rs:33:8
-   |
-LL | #[deny(this_lint_does_not_exist)]
-   |        ^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: `#[warn(unknown_lints)]` on by default
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/lint-tool-test.rs:6:1
-   |
-LL | #![plugin(lint_tool_test)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: lint name `test_lint` is deprecated and may not have an effect in the future.
-  --> $DIR/lint-tool-test.rs:9:23
-   |
-LL | #![cfg_attr(foo, warn(test_lint))]
-   |                       ^^^^^^^^^ help: change it to: `clippy::test_lint`
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-warning: lint name `clippy_group` is deprecated and may not have an effect in the future.
-  --> $DIR/lint-tool-test.rs:13:9
-   |
-LL | #![deny(clippy_group)]
-   |         ^^^^^^^^^^^^ help: change it to: `clippy::group`
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-warning: lint name `test_group` is deprecated and may not have an effect in the future.
-  --> $DIR/lint-tool-test.rs:29:9
-   |
-LL | #[allow(test_group)]
-   |         ^^^^^^^^^^ help: change it to: `clippy::test_group`
-   |
-   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
-
-error: aborting due to 2 previous errors; 11 warnings emitted
-
diff --git a/tests/ui-fulldeps/plugin/lto-syntax-extension.rs b/tests/ui-fulldeps/plugin/lto-syntax-extension.rs
deleted file mode 100644
index 5964e70f195..00000000000
--- a/tests/ui-fulldeps/plugin/lto-syntax-extension.rs
+++ /dev/null
@@ -1,15 +0,0 @@
-// run-pass
-// aux-build:lto-syntax-extension-lib.rs
-// aux-build:lto-syntax-extension-plugin.rs
-// compile-flags:-C lto
-// ignore-stage1
-// no-prefer-dynamic
-
-#![feature(plugin)]
-#![plugin(lto_syntax_extension_plugin)] //~ WARNING compiler plugins are deprecated
-
-extern crate lto_syntax_extension_lib;
-
-fn main() {
-    lto_syntax_extension_lib::foo();
-}
diff --git a/tests/ui-fulldeps/plugin/lto-syntax-extension.stderr b/tests/ui-fulldeps/plugin/lto-syntax-extension.stderr
deleted file mode 100644
index 555493f3230..00000000000
--- a/tests/ui-fulldeps/plugin/lto-syntax-extension.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/lto-syntax-extension.rs:9:1
-   |
-LL | #![plugin(lto_syntax_extension_plugin)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui-fulldeps/plugin/macro-crate-rlib.rs b/tests/ui-fulldeps/plugin/macro-crate-rlib.rs
deleted file mode 100644
index 38bd340539b..00000000000
--- a/tests/ui-fulldeps/plugin/macro-crate-rlib.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// aux-build:rlib-crate-test.rs
-// ignore-stage1
-// ignore-cross-compile gives a different error message
-
-#![feature(plugin)]
-#![plugin(rlib_crate_test)]
-//~^ ERROR: plugin `rlib_crate_test` only found in rlib format, but must be available in dylib
-
-fn main() {}
diff --git a/tests/ui-fulldeps/plugin/macro-crate-rlib.stderr b/tests/ui-fulldeps/plugin/macro-crate-rlib.stderr
deleted file mode 100644
index 0651cee56f7..00000000000
--- a/tests/ui-fulldeps/plugin/macro-crate-rlib.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0457]: plugin `rlib_crate_test` only found in rlib format, but must be available in dylib format
-  --> $DIR/macro-crate-rlib.rs:6:11
-   |
-LL | #![plugin(rlib_crate_test)]
-   |           ^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0457`.
diff --git a/tests/ui-fulldeps/plugin/multiple-plugins.rs b/tests/ui-fulldeps/plugin/multiple-plugins.rs
deleted file mode 100644
index 9af3ebd570c..00000000000
--- a/tests/ui-fulldeps/plugin/multiple-plugins.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-// run-pass
-// aux-build:multiple-plugins-1.rs
-// aux-build:multiple-plugins-2.rs
-// ignore-stage1
-
-// Check that the plugin registrar of multiple plugins doesn't conflict
-
-#![feature(plugin)]
-#![plugin(multiple_plugins_1)] //~ WARN use of deprecated attribute `plugin`
-#![plugin(multiple_plugins_2)] //~ WARN use of deprecated attribute `plugin`
-
-fn main() {}
diff --git a/tests/ui-fulldeps/plugin/multiple-plugins.stderr b/tests/ui-fulldeps/plugin/multiple-plugins.stderr
deleted file mode 100644
index 878ffabfc7f..00000000000
--- a/tests/ui-fulldeps/plugin/multiple-plugins.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/multiple-plugins.rs:9:1
-   |
-LL | #![plugin(multiple_plugins_1)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/multiple-plugins.rs:10:1
-   |
-LL | #![plugin(multiple_plugins_2)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-
-warning: 2 warnings emitted
-
diff --git a/tests/ui-fulldeps/plugin/outlive-expansion-phase.rs b/tests/ui-fulldeps/plugin/outlive-expansion-phase.rs
deleted file mode 100644
index fb22888d98a..00000000000
--- a/tests/ui-fulldeps/plugin/outlive-expansion-phase.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-// run-pass
-// aux-build:outlive-expansion-phase.rs
-// ignore-stage1
-
-#![feature(plugin)]
-#![plugin(outlive_expansion_phase)] //~ WARNING compiler plugins are deprecated
-
-pub fn main() {}
diff --git a/tests/ui-fulldeps/plugin/outlive-expansion-phase.stderr b/tests/ui-fulldeps/plugin/outlive-expansion-phase.stderr
deleted file mode 100644
index e40a08ae73b..00000000000
--- a/tests/ui-fulldeps/plugin/outlive-expansion-phase.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/outlive-expansion-phase.rs:6:1
-   |
-LL | #![plugin(outlive_expansion_phase)]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-warning: 1 warning emitted
-
diff --git a/tests/ui-fulldeps/plugin/plugin-args.rs b/tests/ui-fulldeps/plugin/plugin-args.rs
deleted file mode 100644
index 488f2b775bf..00000000000
--- a/tests/ui-fulldeps/plugin/plugin-args.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// aux-build:empty-plugin.rs
-// ignore-stage1
-
-#![feature(plugin)]
-#![plugin(empty_plugin(args))]
-//~^ ERROR malformed `plugin` attribute
-//~| WARNING compiler plugins are deprecated
-
-fn main() {}
diff --git a/tests/ui-fulldeps/plugin/plugin-args.stderr b/tests/ui-fulldeps/plugin/plugin-args.stderr
deleted file mode 100644
index 177f33005c8..00000000000
--- a/tests/ui-fulldeps/plugin/plugin-args.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0498]: malformed `plugin` attribute
-  --> $DIR/plugin-args.rs:5:11
-   |
-LL | #![plugin(empty_plugin(args))]
-   |           ^^^^^^^^^^^^^^^^^^ malformed attribute
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/plugin-args.rs:5:1
-   |
-LL | #![plugin(empty_plugin(args))]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0498`.
diff --git a/tests/ui-fulldeps/plugin/plugin-as-extern-crate.rs b/tests/ui-fulldeps/plugin/plugin-as-extern-crate.rs
deleted file mode 100644
index 4d26e08d81e..00000000000
--- a/tests/ui-fulldeps/plugin/plugin-as-extern-crate.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// check-pass
-// aux-build:empty-plugin.rs
-// ignore-cross-compile
-//
-// empty_plugin will not compile on a cross-compiled target because
-// librustc_ast is not compiled for it.
-
-extern crate empty_plugin; // OK, plugin crates are still crates
-
-fn main() {}
diff --git a/tests/ui-fulldeps/pprust-expr-roundtrip.rs b/tests/ui-fulldeps/pprust-expr-roundtrip.rs
index 541be7ebbc0..685a029dcb2 100644
--- a/tests/ui-fulldeps/pprust-expr-roundtrip.rs
+++ b/tests/ui-fulldeps/pprust-expr-roundtrip.rs
@@ -38,9 +38,9 @@ use rustc_ast::*;
 use rustc_ast_pretty::pprust;
 use rustc_parse::new_parser_from_source_str;
 use rustc_session::parse::ParseSess;
-use rustc_span::source_map::FilePathMapping;
-use rustc_span::source_map::{FileName, Spanned, DUMMY_SP};
+use rustc_span::source_map::{FilePathMapping, Spanned};
 use rustc_span::symbol::Ident;
+use rustc_span::{FileName, DUMMY_SP};
 use thin_vec::{thin_vec, ThinVec};
 
 fn parse_expr(ps: &ParseSess, src: &str) -> Option<P<Expr>> {
@@ -130,7 +130,7 @@ fn iter_exprs(depth: usize, f: &mut dyn FnMut(P<Expr>)) {
                 iter_exprs(depth - 1, &mut |e| {
                     g(ExprKind::Closure(Box::new(Closure {
                         binder: ClosureBinder::NotPresent,
-                        capture_clause: CaptureBy::Value,
+                        capture_clause: CaptureBy::Value { move_kw: DUMMY_SP },
                         constness: Const::No,
                         asyncness: Async::No,
                         movability: Movability::Movable,
diff --git a/tests/ui-fulldeps/stable-mir/check_instance.rs b/tests/ui-fulldeps/stable-mir/check_instance.rs
new file mode 100644
index 00000000000..a340877752d
--- /dev/null
+++ b/tests/ui-fulldeps/stable-mir/check_instance.rs
@@ -0,0 +1,122 @@
+// run-pass
+//! Test that users are able to use stable mir APIs to retrieve monomorphized instances
+
+// ignore-stage1
+// ignore-cross-compile
+// ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
+// edition: 2021
+
+#![feature(rustc_private)]
+#![feature(assert_matches)]
+#![feature(control_flow_enum)]
+
+extern crate rustc_middle;
+#[macro_use]
+extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
+extern crate stable_mir;
+
+use mir::{mono::Instance, TerminatorKind::*};
+use rustc_middle::ty::TyCtxt;
+use rustc_smir::rustc_internal;
+use stable_mir::ty::{RigidTy, TyKind};
+use stable_mir::*;
+use std::io::Write;
+use std::ops::ControlFlow;
+
+const CRATE_NAME: &str = "input";
+
+/// This function uses the Stable MIR APIs to get information about the test crate.
+fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
+    let items = stable_mir::all_local_items();
+
+    // Get all items and split generic vs monomorphic items.
+    let (generic, mono): (Vec<_>, Vec<_>) =
+        items.into_iter().partition(|item| item.requires_monomorphization());
+    assert_eq!(mono.len(), 3, "Expected 2 mono functions and one constant");
+    assert_eq!(generic.len(), 2, "Expected 2 generic functions");
+
+    // For all monomorphic items, get the correspondent instances.
+    let instances = mono
+        .iter()
+        .filter_map(|item| mir::mono::Instance::try_from(*item).ok())
+        .collect::<Vec<mir::mono::Instance>>();
+    assert_eq!(instances.len(), mono.len());
+
+    // For all generic items, try_from should fail.
+    assert!(generic.iter().all(|item| mir::mono::Instance::try_from(*item).is_err()));
+
+    for instance in instances {
+        test_body(instance.body())
+    }
+    ControlFlow::Continue(())
+}
+
+/// Inspect the instance body
+fn test_body(body: mir::Body) {
+    for term in body.blocks.iter().map(|bb| &bb.terminator) {
+        match &term.kind {
+            Call { func, .. } => {
+                let TyKind::RigidTy(ty) = func.ty(body.locals()).kind() else { unreachable!() };
+                let RigidTy::FnDef(def, args) = ty else { unreachable!() };
+                let result = Instance::resolve(def, &args);
+                assert!(result.is_ok());
+            }
+            Goto { .. } | Assert { .. } | SwitchInt { .. } | Return | Drop { .. } => {
+                /* Do nothing */
+            }
+            _ => {
+                unreachable!("Unexpected terminator {term:?}")
+            }
+        }
+    }
+}
+
+/// This test will generate and analyze a dummy crate using the stable mir.
+/// For that, it will first write the dummy crate into a file.
+/// Then it will create a `StableMir` using custom arguments and then
+/// it will run the compiler.
+fn main() {
+    let path = "instance_input.rs";
+    generate_input(&path).unwrap();
+    let args = vec![
+        "rustc".to_string(),
+        "-Cpanic=abort".to_string(),
+        "--crate-type=lib".to_string(),
+        "--crate-name".to_string(),
+        CRATE_NAME.to_string(),
+        path.to_string(),
+    ];
+    run!(args, tcx, test_stable_mir(tcx)).unwrap();
+}
+
+fn generate_input(path: &str) -> std::io::Result<()> {
+    let mut file = std::fs::File::create(path)?;
+    write!(
+        file,
+        r#"
+    pub fn ty_param<T>(t: &T) -> T where T: Clone {{
+        t.clone()
+    }}
+
+    pub fn const_param<const LEN: usize>(a: [bool; LEN]) -> bool {{
+        LEN > 0 && a[0]
+    }}
+
+    pub fn monomorphic() {{
+        let v = vec![10];
+        let dup = ty_param(&v);
+        assert_eq!(v, dup);
+    }}
+
+    pub mod foo {{
+        pub fn bar_mono(i: i32) -> i64 {{
+            i as i64
+        }}
+    }}
+    "#
+    )?;
+    Ok(())
+}
diff --git a/tests/ui-fulldeps/stable-mir/compilation-result.rs b/tests/ui-fulldeps/stable-mir/compilation-result.rs
index 3ec1519fb13..fc56e24814b 100644
--- a/tests/ui-fulldeps/stable-mir/compilation-result.rs
+++ b/tests/ui-fulldeps/stable-mir/compilation-result.rs
@@ -4,19 +4,22 @@
 // ignore-stage1
 // ignore-cross-compile
 // ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
 // edition: 2021
 
 #![feature(rustc_private)]
 #![feature(assert_matches)]
 
 extern crate rustc_middle;
+#[macro_use]
 extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
 extern crate stable_mir;
 
 use rustc_middle::ty::TyCtxt;
 use rustc_smir::rustc_internal;
 use std::io::Write;
-use std::ops::ControlFlow;
 
 /// This test will generate and analyze a dummy crate using the stable mir.
 /// For that, it will first write the dummy crate into a file.
@@ -33,28 +36,26 @@ fn main() {
 }
 
 fn test_continue(args: Vec<String>) {
-    let continue_fn = |_: TyCtxt| ControlFlow::Continue::<(), bool>(true);
-    let result = rustc_internal::StableMir::new(args, continue_fn).run();
+    let result = run!(args, ControlFlow::Continue::<(), bool>(true));
     assert_eq!(result, Ok(true));
 }
 
 fn test_break(args: Vec<String>) {
-    let continue_fn = |_: TyCtxt| ControlFlow::Break::<bool, i32>(false);
-    let result = rustc_internal::StableMir::new(args, continue_fn).run();
+    let result = run!(args, ControlFlow::Break::<bool, i32>(false));
     assert_eq!(result, Err(stable_mir::CompilerError::Interrupted(false)));
 }
 
+#[allow(unreachable_code)]
 fn test_skipped(mut args: Vec<String>) {
     args.push("--version".to_string());
-    let unreach_fn = |_: TyCtxt| -> ControlFlow<()> { unreachable!() };
-    let result = rustc_internal::StableMir::new(args, unreach_fn).run();
+    let result = run!(args, unreachable!() as ControlFlow<()>);
     assert_eq!(result, Err(stable_mir::CompilerError::Skipped));
 }
 
+#[allow(unreachable_code)]
 fn test_failed(mut args: Vec<String>) {
     args.push("--cfg=broken".to_string());
-    let unreach_fn = |_: TyCtxt| -> ControlFlow<()> { unreachable!() };
-    let result = rustc_internal::StableMir::new(args, unreach_fn).run();
+    let result = run!(args, unreachable!() as ControlFlow<()>);
     assert_eq!(result, Err(stable_mir::CompilerError::CompilationFailed));
 }
 
diff --git a/tests/ui-fulldeps/stable-mir/crate-info.rs b/tests/ui-fulldeps/stable-mir/crate-info.rs
index 8a812bd3265..ed6b786f5e1 100644
--- a/tests/ui-fulldeps/stable-mir/crate-info.rs
+++ b/tests/ui-fulldeps/stable-mir/crate-info.rs
@@ -4,6 +4,7 @@
 // ignore-stage1
 // ignore-cross-compile
 // ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
 // edition: 2021
 
 #![feature(rustc_private)]
@@ -12,14 +13,17 @@
 
 extern crate rustc_hir;
 extern crate rustc_middle;
+#[macro_use]
 extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
 extern crate stable_mir;
 
 use rustc_hir::def::DefKind;
 use rustc_middle::ty::TyCtxt;
 use rustc_smir::rustc_internal;
-
-use stable_mir::fold::Foldable;
+use stable_mir::mir::mono::Instance;
+use stable_mir::ty::{RigidTy, TyKind};
 use std::assert_matches::assert_matches;
 use std::io::Write;
 use std::ops::ControlFlow;
@@ -43,7 +47,7 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
 
     let bar = get_item(&items, (DefKind::Fn, "bar")).unwrap();
     let body = bar.body();
-    assert_eq!(body.locals.len(), 2);
+    assert_eq!(body.locals().len(), 2);
     assert_eq!(body.blocks.len(), 1);
     let block = &body.blocks[0];
     assert_eq!(block.statements.len(), 1);
@@ -58,7 +62,7 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
 
     let foo_bar = get_item(&items, (DefKind::Fn, "foo_bar")).unwrap();
     let body = foo_bar.body();
-    assert_eq!(body.locals.len(), 5);
+    assert_eq!(body.locals().len(), 5);
     assert_eq!(body.blocks.len(), 4);
     let block = &body.blocks[0];
     match &block.terminator.kind {
@@ -68,29 +72,29 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
 
     let types = get_item(&items, (DefKind::Fn, "types")).unwrap();
     let body = types.body();
-    assert_eq!(body.locals.len(), 6);
+    assert_eq!(body.locals().len(), 6);
     assert_matches!(
-        body.locals[0].ty.kind(),
+        body.locals()[0].ty.kind(),
         stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Bool)
     );
     assert_matches!(
-        body.locals[1].ty.kind(),
+        body.locals()[1].ty.kind(),
         stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Bool)
     );
     assert_matches!(
-        body.locals[2].ty.kind(),
+        body.locals()[2].ty.kind(),
         stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Char)
     );
     assert_matches!(
-        body.locals[3].ty.kind(),
+        body.locals()[3].ty.kind(),
         stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Int(stable_mir::ty::IntTy::I32))
     );
     assert_matches!(
-        body.locals[4].ty.kind(),
+        body.locals()[4].ty.kind(),
         stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Uint(stable_mir::ty::UintTy::U64))
     );
     assert_matches!(
-        body.locals[5].ty.kind(),
+        body.locals()[5].ty.kind(),
         stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Float(
             stable_mir::ty::FloatTy::F64
         ))
@@ -115,40 +119,18 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
     }
 
     let monomorphic = get_item(&items, (DefKind::Fn, "monomorphic")).unwrap();
-    for block in monomorphic.body().blocks {
+    let instance = Instance::try_from(monomorphic.clone()).unwrap();
+    for block in instance.body().blocks {
         match &block.terminator.kind {
-            stable_mir::mir::TerminatorKind::Call { func, .. } => match func {
-                stable_mir::mir::Operand::Constant(c) => match &c.literal.literal {
-                    stable_mir::ty::ConstantKind::Allocated(alloc) => {
-                        assert!(alloc.bytes.is_empty());
-                        match c.literal.ty.kind() {
-                            stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::FnDef(
-                                def,
-                                mut args,
-                            )) => {
-                                let func = def.body();
-                                match func.locals[1].ty
-                                    .fold(&mut args)
-                                    .continue_value()
-                                    .unwrap()
-                                    .kind()
-                                {
-                                    stable_mir::ty::TyKind::RigidTy(
-                                        stable_mir::ty::RigidTy::Uint(_),
-                                    ) => {}
-                                    stable_mir::ty::TyKind::RigidTy(
-                                        stable_mir::ty::RigidTy::Tuple(_),
-                                    ) => {}
-                                    other => panic!("{other:?}"),
-                                }
-                            }
-                            other => panic!("{other:?}"),
-                        }
-                    }
+            stable_mir::mir::TerminatorKind::Call { func, .. } => {
+                let TyKind::RigidTy(ty) = func.ty(&body.locals()).kind() else { unreachable!() };
+                let RigidTy::FnDef(def, args) = ty else { unreachable!() };
+                let next_func = Instance::resolve(def, &args).unwrap();
+                match next_func.body().locals()[1].ty.kind() {
+                    TyKind::RigidTy(RigidTy::Uint(_)) | TyKind::RigidTy(RigidTy::Tuple(_)) => {}
                     other => panic!("{other:?}"),
-                },
-                other => panic!("{other:?}"),
-            },
+                }
+            }
             stable_mir::mir::TerminatorKind::Return => {}
             other => panic!("{other:?}"),
         }
@@ -158,6 +140,29 @@ fn test_stable_mir(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
     // Ensure we don't panic trying to get the body of a constant.
     foo_const.body();
 
+    let locals_fn = get_item(&items, (DefKind::Fn, "locals")).unwrap();
+    let body = locals_fn.body();
+    assert_eq!(body.locals().len(), 4);
+    assert_matches!(
+        body.ret_local().ty.kind(),
+        stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Char)
+    );
+    assert_eq!(body.arg_locals().len(), 2);
+    assert_matches!(
+        body.arg_locals()[0].ty.kind(),
+        stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Int(stable_mir::ty::IntTy::I32))
+    );
+    assert_matches!(
+        body.arg_locals()[1].ty.kind(),
+        stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Uint(stable_mir::ty::UintTy::U64))
+    );
+    assert_eq!(body.inner_locals().len(), 1);
+    // If conditions have an extra inner local to hold their results
+    assert_matches!(
+        body.inner_locals()[0].ty.kind(),
+        stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Bool)
+    );
+
     ControlFlow::Continue(())
 }
 
@@ -185,7 +190,7 @@ fn main() {
         CRATE_NAME.to_string(),
         path.to_string(),
     ];
-    rustc_internal::StableMir::new(args, test_stable_mir).run().unwrap();
+    run!(args, tcx, test_stable_mir(tcx)).unwrap();
 }
 
 fn generate_input(path: &str) -> std::io::Result<()> {
@@ -229,6 +234,14 @@ fn generate_input(path: &str) -> std::io::Result<()> {
 
     pub fn assert(x: i32) -> i32 {{
         x + 1
+    }}
+
+    pub fn locals(a: i32, _: u64) -> char {{
+        if a > 5 {{
+            'a'
+        }} else {{
+            'b'
+        }}
     }}"#
     )?;
     Ok(())
diff --git a/tests/ui-fulldeps/stable-mir/smir_internal.rs b/tests/ui-fulldeps/stable-mir/smir_internal.rs
new file mode 100644
index 00000000000..b0596b18823
--- /dev/null
+++ b/tests/ui-fulldeps/stable-mir/smir_internal.rs
@@ -0,0 +1,64 @@
+// run-pass
+//! Test that users are able to use retrieve internal constructs from stable ones to help with
+//! the migration.
+
+// ignore-stage1
+// ignore-cross-compile
+// ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
+// edition: 2021
+
+#![feature(rustc_private)]
+#![feature(assert_matches)]
+#![feature(control_flow_enum)]
+
+#[macro_use]
+extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
+extern crate rustc_middle;
+extern crate stable_mir;
+
+use rustc_middle::ty::TyCtxt;
+use rustc_smir::rustc_internal;
+use std::io::Write;
+use std::ops::ControlFlow;
+
+const CRATE_NAME: &str = "input";
+
+fn test_translation(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
+    let main_fn = stable_mir::entry_fn().unwrap();
+    let body = main_fn.body();
+    let orig_ty = body.locals()[0].ty;
+    let rustc_ty = rustc_internal::internal(&orig_ty);
+    assert!(rustc_ty.is_unit());
+    ControlFlow::Continue(())
+}
+
+/// This test will generate and analyze a dummy crate using the stable mir.
+/// For that, it will first write the dummy crate into a file.
+/// Then it will create a `StableMir` using custom arguments and then
+/// it will run the compiler.
+fn main() {
+    let path = "internal_input.rs";
+    generate_input(&path).unwrap();
+    let args = vec![
+        "rustc".to_string(),
+        "--crate-name".to_string(),
+        CRATE_NAME.to_string(),
+        path.to_string(),
+    ];
+    run!(args, tcx, test_translation(tcx)).unwrap();
+}
+
+fn generate_input(path: &str) -> std::io::Result<()> {
+    let mut file = std::fs::File::create(path)?;
+    write!(
+        file,
+        r#"
+    pub fn main() {{
+    }}
+    "#
+    )?;
+    Ok(())
+}
diff --git a/tests/ui-fulldeps/stable-mir/smir_visitor.rs b/tests/ui-fulldeps/stable-mir/smir_visitor.rs
new file mode 100644
index 00000000000..de5148bb5f4
--- /dev/null
+++ b/tests/ui-fulldeps/stable-mir/smir_visitor.rs
@@ -0,0 +1,148 @@
+// run-pass
+//! Sanity check Stable MIR Visitor
+
+// ignore-stage1
+// ignore-cross-compile
+// ignore-remote
+// ignore-windows-gnu mingw has troubles with linking https://github.com/rust-lang/rust/pull/116837
+// edition: 2021
+
+#![feature(rustc_private)]
+#![feature(assert_matches)]
+#![feature(control_flow_enum)]
+
+extern crate rustc_middle;
+#[macro_use]
+extern crate rustc_smir;
+extern crate rustc_driver;
+extern crate rustc_interface;
+extern crate stable_mir;
+
+use std::collections::HashSet;
+use rustc_middle::ty::TyCtxt;
+use rustc_smir::rustc_internal;
+use stable_mir::*;
+use stable_mir::mir::MirVisitor;
+use std::io::Write;
+use std::ops::ControlFlow;
+
+const CRATE_NAME: &str = "input";
+
+fn test_visitor(_tcx: TyCtxt<'_>) -> ControlFlow<()> {
+    let main_fn = stable_mir::entry_fn();
+    let main_body = main_fn.unwrap().body();
+    let main_visitor = TestVisitor::collect(&main_body);
+    assert!(main_visitor.ret_val.is_some());
+    assert!(main_visitor.args.is_empty());
+    assert!(main_visitor.tys.contains(&main_visitor.ret_val.unwrap().ty));
+    assert!(!main_visitor.calls.is_empty());
+
+    let exit_fn = main_visitor.calls.last().unwrap();
+    assert!(exit_fn.mangled_name().contains("exit_fn"), "Unexpected last function: {exit_fn:?}");
+
+    let exit_body = exit_fn.body();
+    let exit_visitor = TestVisitor::collect(&exit_body);
+    assert!(exit_visitor.ret_val.is_some());
+    assert_eq!(exit_visitor.args.len(), 1);
+    assert!(exit_visitor.tys.contains(&exit_visitor.ret_val.unwrap().ty));
+    assert!(exit_visitor.tys.contains(&exit_visitor.args[0].ty));
+    ControlFlow::Continue(())
+}
+
+struct TestVisitor<'a> {
+    pub body: &'a mir::Body,
+    pub tys: HashSet<ty::Ty>,
+    pub ret_val: Option<mir::LocalDecl>,
+    pub args: Vec<mir::LocalDecl>,
+    pub calls: Vec<mir::mono::Instance>
+}
+
+impl<'a> TestVisitor<'a> {
+    fn collect(body: &'a mir::Body) -> TestVisitor<'a> {
+        let mut visitor = TestVisitor {
+            body: &body,
+            tys: Default::default(),
+            ret_val: None,
+            args: vec![],
+            calls: vec![],
+        };
+        visitor.visit_body(&body);
+        visitor
+    }
+}
+
+impl<'a> mir::MirVisitor for TestVisitor<'a> {
+    fn visit_ty(&mut self, ty: &ty::Ty, _location: mir::visit::Location) {
+        self.tys.insert(*ty);
+        self.super_ty(ty)
+    }
+
+    fn visit_ret_decl(&mut self, local: mir::Local, decl: &mir::LocalDecl) {
+        assert!(local == mir::RETURN_LOCAL);
+        assert!(self.ret_val.is_none());
+        self.ret_val = Some(decl.clone());
+        self.super_ret_decl(local, decl);
+    }
+
+    fn visit_arg_decl(&mut self, local: mir::Local, decl: &mir::LocalDecl) {
+        self.args.push(decl.clone());
+        assert_eq!(local, self.args.len());
+        self.super_arg_decl(local, decl);
+    }
+
+    fn visit_terminator(&mut self, term: &mir::Terminator, location: mir::visit::Location) {
+        if let mir::TerminatorKind::Call { func, .. } = &term.kind {
+            let ty::TyKind::RigidTy(ty) = func.ty(self.body.locals()).kind() else { unreachable!
+            () };
+            let ty::RigidTy::FnDef(def, args) = ty else { unreachable!() };
+            self.calls.push(mir::mono::Instance::resolve(def, &args).unwrap());
+        }
+        self.super_terminator(term, location);
+    }
+}
+
+/// This test will generate and analyze a dummy crate using the stable mir.
+/// For that, it will first write the dummy crate into a file.
+/// Then it will create a `StableMir` using custom arguments and then
+/// it will run the compiler.
+fn main() {
+    let path = "sim_visitor_input.rs";
+    generate_input(&path).unwrap();
+    let args = vec![
+        "rustc".to_string(),
+        "-Cpanic=abort".to_string(),
+        "--crate-name".to_string(),
+        CRATE_NAME.to_string(),
+        path.to_string(),
+    ];
+    run!(args, tcx, test_visitor(tcx)).unwrap();
+}
+
+fn generate_input(path: &str) -> std::io::Result<()> {
+    let mut file = std::fs::File::create(path)?;
+    write!(
+        file,
+        r#"
+    fn main() -> std::process::ExitCode {{
+        let inputs = Inputs::new();
+        let total = inputs.values.iter().sum();
+        exit_fn(total)
+    }}
+
+    fn exit_fn(code: u8) -> std::process::ExitCode {{
+        std::process::ExitCode::from(code)
+    }}
+
+    struct Inputs {{
+        values: [u8; 3],
+    }}
+
+    impl Inputs {{
+        fn new() -> Inputs {{
+            Inputs {{ values: [0, 1, 2] }}
+        }}
+    }}
+    "#
+    )?;
+    Ok(())
+}
diff --git a/tests/ui/abi/compatibility.rs b/tests/ui/abi/compatibility.rs
index 1f049b1785a..0cdf229711a 100644
--- a/tests/ui/abi/compatibility.rs
+++ b/tests/ui/abi/compatibility.rs
@@ -30,6 +30,7 @@
 // revisions: loongarch64
 //[loongarch64] compile-flags: --target loongarch64-unknown-linux-gnu
 //[loongarch64] needs-llvm-components: loongarch
+//[loongarch64] min-llvm-version: 17
 // revisions: wasm
 //[wasm] compile-flags: --target wasm32-unknown-unknown
 //[wasm] needs-llvm-components: webassembly
diff --git a/tests/ui/asm/aarch64/interpolated-idents.stderr b/tests/ui/asm/aarch64/interpolated-idents.stderr
index f6c50c2e1fd..74cb992f2ad 100644
--- a/tests/ui/asm/aarch64/interpolated-idents.stderr
+++ b/tests/ui/asm/aarch64/interpolated-idents.stderr
@@ -33,12 +33,7 @@ LL |               asm!("", $in(x) x, $out(x) x, $lateout(x) x, $inout(x) x, $in
 LL | /     m!(in out lateout inout inlateout const sym
 LL | |        pure nomem readonly preserves_flags
 LL | |        noreturn nostack options);
-   | |                                -
-   | |________________________________|
-   | |________________________________in this macro invocation
-   | |________________________________in this macro invocation
-   | |________________________________in this macro invocation
-   |                                  in this macro invocation
+   | |________________________________- in this macro invocation
    |
    = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/asm/x86_64/interpolated-idents.stderr b/tests/ui/asm/x86_64/interpolated-idents.stderr
index 80a8c8c77cf..a91bc768fc4 100644
--- a/tests/ui/asm/x86_64/interpolated-idents.stderr
+++ b/tests/ui/asm/x86_64/interpolated-idents.stderr
@@ -33,12 +33,7 @@ LL |               asm!("", $in(x) x, $out(x) x, $lateout(x) x, $inout(x) x, $in
 LL | /     m!(in out lateout inout inlateout const sym
 LL | |        pure nomem readonly preserves_flags
 LL | |        noreturn nostack att_syntax options);
-   | |                                           -
-   | |___________________________________________|
-   | |___________________________________________in this macro invocation
-   | |___________________________________________in this macro invocation
-   | |___________________________________________in this macro invocation
-   |                                             in this macro invocation
+   | |___________________________________________- in this macro invocation
    |
    = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
 
diff --git a/tests/ui/associated-consts/associated-const-ambiguity-report.stderr b/tests/ui/associated-consts/associated-const-ambiguity-report.stderr
index 5435f22321c..e39224f2c16 100644
--- a/tests/ui/associated-consts/associated-const-ambiguity-report.stderr
+++ b/tests/ui/associated-consts/associated-const-ambiguity-report.stderr
@@ -14,14 +14,12 @@ note: candidate #2 is defined in an impl of the trait `Bar` for the type `i32`
    |
 LL |     const ID: i32 = 3;
    |     ^^^^^^^^^^^^^
-help: disambiguate the associated constant for candidate #1
-   |
-LL | const X: i32 = <i32 as Foo>::ID;
-   |                ~~~~~~~~~~~~~~
-help: disambiguate the associated constant for candidate #2
+help: use fully-qualified syntax to disambiguate
    |
 LL | const X: i32 = <i32 as Bar>::ID;
    |                ~~~~~~~~~~~~~~
+LL | const X: i32 = <i32 as Foo>::ID;
+   |                ~~~~~~~~~~~~~~
 
 error: aborting due to previous error
 
diff --git a/tests/ui/associated-consts/issue-105330.rs b/tests/ui/associated-consts/issue-105330.rs
index 86e45f10b0e..6c6dae864f3 100644
--- a/tests/ui/associated-consts/issue-105330.rs
+++ b/tests/ui/associated-consts/issue-105330.rs
@@ -9,13 +9,11 @@ impl TraitWAssocConst for impl Demo { //~ ERROR E0404
 }
 
 fn foo<A: TraitWAssocConst<A=32>>() { //~ ERROR E0658
-    foo::<Demo>()(); //~ ERROR E0271
-    //~^ ERROR E0618
-    //~| ERROR E0277
+    foo::<Demo>()();
 }
 
-fn main<A: TraitWAssocConst<A=32>>() { //~ ERROR E0131
+fn main<A: TraitWAssocConst<A=32>>() {
     //~^ ERROR E0658
-    foo::<Demo>(); //~ ERROR E0277
-    //~^ ERROR E0271
+    //~| ERROR E0131
+    foo::<Demo>();
 }
diff --git a/tests/ui/associated-consts/issue-105330.stderr b/tests/ui/associated-consts/issue-105330.stderr
index 200856caa25..aeedf6b1949 100644
--- a/tests/ui/associated-consts/issue-105330.stderr
+++ b/tests/ui/associated-consts/issue-105330.stderr
@@ -25,7 +25,7 @@ LL | fn foo<A: TraitWAssocConst<A=32>>() {
    = help: add `#![feature(associated_const_equality)]` to the crate attributes to enable
 
 error[E0658]: associated const equality is incomplete
-  --> $DIR/issue-105330.rs:17:29
+  --> $DIR/issue-105330.rs:15:29
    |
 LL | fn main<A: TraitWAssocConst<A=32>>() {
    |                             ^^^^
@@ -40,84 +40,12 @@ LL | impl TraitWAssocConst for impl Demo {
    |                           ^^^^^^^^^
 
 error[E0131]: `main` function is not allowed to have generic parameters
-  --> $DIR/issue-105330.rs:17:8
+  --> $DIR/issue-105330.rs:15:8
    |
 LL | fn main<A: TraitWAssocConst<A=32>>() {
    |        ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `main` cannot have generic parameters
 
-error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
-  --> $DIR/issue-105330.rs:12:11
-   |
-LL |     foo::<Demo>()();
-   |           ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
-   |
-help: this trait has no implementations, consider adding one
-  --> $DIR/issue-105330.rs:1:1
-   |
-LL | pub trait TraitWAssocConst {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: required by a bound in `foo`
-  --> $DIR/issue-105330.rs:11:11
-   |
-LL | fn foo<A: TraitWAssocConst<A=32>>() {
-   |           ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
-
-error[E0271]: type mismatch resolving `<Demo as TraitWAssocConst>::A == 32`
-  --> $DIR/issue-105330.rs:12:11
-   |
-LL |     foo::<Demo>()();
-   |           ^^^^ expected `32`, found `<Demo as TraitWAssocConst>::A`
-   |
-   = note: expected constant `32`
-              found constant `<Demo as TraitWAssocConst>::A`
-note: required by a bound in `foo`
-  --> $DIR/issue-105330.rs:11:28
-   |
-LL | fn foo<A: TraitWAssocConst<A=32>>() {
-   |                            ^^^^ required by this bound in `foo`
-
-error[E0618]: expected function, found `()`
-  --> $DIR/issue-105330.rs:12:5
-   |
-LL | fn foo<A: TraitWAssocConst<A=32>>() {
-   | ----------------------------------- `foo::<Demo>` defined here returns `()`
-LL |     foo::<Demo>()();
-   |     ^^^^^^^^^^^^^--
-   |     |
-   |     call expression requires function
-
-error[E0277]: the trait bound `Demo: TraitWAssocConst` is not satisfied
-  --> $DIR/issue-105330.rs:19:11
-   |
-LL |     foo::<Demo>();
-   |           ^^^^ the trait `TraitWAssocConst` is not implemented for `Demo`
-   |
-help: this trait has no implementations, consider adding one
-  --> $DIR/issue-105330.rs:1:1
-   |
-LL | pub trait TraitWAssocConst {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: required by a bound in `foo`
-  --> $DIR/issue-105330.rs:11:11
-   |
-LL | fn foo<A: TraitWAssocConst<A=32>>() {
-   |           ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `foo`
-
-error[E0271]: type mismatch resolving `<Demo as TraitWAssocConst>::A == 32`
-  --> $DIR/issue-105330.rs:19:11
-   |
-LL |     foo::<Demo>();
-   |           ^^^^ expected `32`, found `<Demo as TraitWAssocConst>::A`
-   |
-   = note: expected constant `32`
-              found constant `<Demo as TraitWAssocConst>::A`
-note: required by a bound in `foo`
-  --> $DIR/issue-105330.rs:11:28
-   |
-LL | fn foo<A: TraitWAssocConst<A=32>>() {
-   |                            ^^^^ required by this bound in `foo`
-
-error: aborting due to 11 previous errors
+error: aborting due to 6 previous errors
 
-Some errors have detailed explanations: E0131, E0271, E0277, E0404, E0562, E0618, E0658.
+Some errors have detailed explanations: E0131, E0404, E0562, E0658.
 For more information about an error, try `rustc --explain E0131`.
diff --git a/tests/ui/associated-consts/issue-58022.rs b/tests/ui/associated-consts/issue-58022.rs
index 2a8a1eaa6d3..8e2a441f239 100644
--- a/tests/ui/associated-consts/issue-58022.rs
+++ b/tests/ui/associated-consts/issue-58022.rs
@@ -11,6 +11,7 @@ impl Bar<[u8]> {
     const SIZE: usize = 32;
 
     fn new(slice: &[u8; Self::SIZE]) -> Self {
+        //~^ ERROR: the size for values of type `[u8]` cannot be known at compilation time
         Foo(Box::new(*slice))
         //~^ ERROR: expected function, tuple struct or tuple variant, found trait `Foo`
     }
diff --git a/tests/ui/associated-consts/issue-58022.stderr b/tests/ui/associated-consts/issue-58022.stderr
index 56d85c066a8..82cbc9ed3b0 100644
--- a/tests/ui/associated-consts/issue-58022.stderr
+++ b/tests/ui/associated-consts/issue-58022.stderr
@@ -7,13 +7,27 @@ LL |
 LL |     fn new(slice: &[u8; Foo::SIZE]) -> Self;
    |                         ^^^^^^^^^ cannot refer to the associated constant of trait
 
+error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
+  --> $DIR/issue-58022.rs:13:41
+   |
+LL |     fn new(slice: &[u8; Self::SIZE]) -> Self {
+   |                                         ^^^^ doesn't have a size known at compile-time
+   |
+   = help: within `Bar<[u8]>`, the trait `Sized` is not implemented for `[u8]`
+note: required because it appears within the type `Bar<[u8]>`
+  --> $DIR/issue-58022.rs:8:12
+   |
+LL | pub struct Bar<T: ?Sized>(T);
+   |            ^^^
+   = note: the return type of a function must have a statically known size
+
 error[E0423]: expected function, tuple struct or tuple variant, found trait `Foo`
-  --> $DIR/issue-58022.rs:14:9
+  --> $DIR/issue-58022.rs:15:9
    |
 LL |         Foo(Box::new(*slice))
    |         ^^^ not a function, tuple struct or tuple variant
 
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
-Some errors have detailed explanations: E0423, E0790.
-For more information about an error, try `rustc --explain E0423`.
+Some errors have detailed explanations: E0277, E0423, E0790.
+For more information about an error, try `rustc --explain E0277`.
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
index 464b59c249f..0620725ca33 100644
--- a/tests/ui/associated-inherent-types/generic-associated-types-bad.item.stderr
+++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.item.stderr
@@ -10,6 +10,18 @@ note: required by a bound in `Ty::Pr`
 LL |     type Pr<T: Copy> = T;
    |                ^^^^ required by this bound in `Ty::Pr`
 
-error: aborting due to previous error
+error[E0277]: the trait bound `String: Copy` is not satisfied
+  --> $DIR/generic-associated-types-bad.rs:16:27
+   |
+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 2 previous errors
 
 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
index 4f371b24e80..fcf828c21c7 100644
--- a/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr
+++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.local.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `Vec<()>: Copy` is not satisfied
-  --> $DIR/generic-associated-types-bad.rs:20:12
+  --> $DIR/generic-associated-types-bad.rs:21:12
    |
 LL |     let _: Ty::Pr<Vec<()>>;
    |            ^^^^^^^^^^^^^^^ the trait `Copy` is not implemented for `Vec<()>`
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
index 74ec39424ed..94c20521857 100644
--- a/tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr
+++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.region.stderr
@@ -1,5 +1,5 @@
 error: lifetime may not live long enough
-  --> $DIR/generic-associated-types-bad.rs:25:12
+  --> $DIR/generic-associated-types-bad.rs:26:12
    |
 LL | fn user<'a>() {
    |         -- lifetime `'a` defined here
diff --git a/tests/ui/associated-inherent-types/generic-associated-types-bad.rs b/tests/ui/associated-inherent-types/generic-associated-types-bad.rs
index e66392a0a94..f5deec422f5 100644
--- a/tests/ui/associated-inherent-types/generic-associated-types-bad.rs
+++ b/tests/ui/associated-inherent-types/generic-associated-types-bad.rs
@@ -14,6 +14,7 @@ impl Ty {
 
 #[cfg(item)]
 const _: Ty::Pr<String> = String::new(); //[item]~ the trait bound `String: Copy` is not satisfied
+//[item]~^ the trait bound `String: Copy` is not satisfied
 
 fn main() {
     #[cfg(local)]
diff --git a/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr b/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr
index 6f206f2b89c..866a53f57fc 100644
--- a/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr
+++ b/tests/ui/associated-inherent-types/issue-109071.no_gate.stderr
@@ -33,7 +33,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/issue-109071.rs:15:22
    |
 LL |     fn T() -> Option<Self::Item> {}
-   |                      ^^^^^^^^^^ help: use the fully-qualified path: `<Windows<T> as IntoIterator>::Item`
+   |                      ^^^^^^^^^^ help: use fully-qualified syntax: `<Windows<T> as IntoIterator>::Item`
 
 error: aborting due to 4 previous errors
 
diff --git a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr
index 88c72042ce2..9206b4f6db7 100644
--- a/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr
+++ b/tests/ui/associated-inherent-types/not-found-self-type-differs-shadowing-trait-item.uncovered.stderr
@@ -2,7 +2,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/not-found-self-type-differs-shadowing-trait-item.rs:28:12
    |
 LL |     let _: S::<bool>::Pr = ();
-   |            ^^^^^^^^^^^^^ help: use the fully-qualified path: `<S<bool> as Tr>::Pr`
+   |            ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<S<bool> as Tr>::Pr`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr b/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr
index 97088b79fd6..f7a47be8dc3 100644
--- a/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr
+++ b/tests/ui/associated-item/ambiguous-associated-type-with-generics.stderr
@@ -2,7 +2,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/ambiguous-associated-type-with-generics.rs:13:13
    |
 LL |     let _x: <dyn Trait<i32>>::Ty;
-   |             ^^^^^^^^^^^^^^^^^^^^ help: use the fully-qualified path: `<dyn Trait<i32> as Assoc>::Ty`
+   |             ^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<dyn Trait<i32> as Assoc>::Ty`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/associated-item/associated-item-duplicate-names-3.stderr b/tests/ui/associated-item/associated-item-duplicate-names-3.stderr
index d0c17062076..a2346e292ac 100644
--- a/tests/ui/associated-item/associated-item-duplicate-names-3.stderr
+++ b/tests/ui/associated-item/associated-item-duplicate-names-3.stderr
@@ -13,7 +13,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/associated-item-duplicate-names-3.rs:18:12
    |
 LL |     let x: Baz::Bar = 5;
-   |            ^^^^^^^^ help: use the fully-qualified path: `<Baz as Foo>::Bar`
+   |            ^^^^^^^^ help: use fully-qualified syntax: `<Baz as Foo>::Bar`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs
new file mode 100644
index 00000000000..c1047d85645
--- /dev/null
+++ b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs
@@ -0,0 +1,28 @@
+use std::collections::HashMap;
+use std::hash::Hash;
+
+trait LowT: Identify {}
+
+trait Identify {
+    type Id: Clone + Hash + PartialEq + Eq;
+    fn identify(&self) -> Self::Id;
+}
+
+struct MapStore<L, I>
+where
+    L: LowT + Identify<Id = I>,
+{
+    lows: HashMap<I, L>,
+}
+
+impl<L, I> MapStore<L, I>
+where
+    L: LowT + Identify<Id = I>,
+    I: Clone + Hash + PartialEq + Eq,
+{
+    fn remove_low(&mut self, low: &impl LowT) {
+        let _low = self.lows.remove(low.identify()).unwrap(); //~ ERROR mismatched types
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr
new file mode 100644
index 00000000000..78bf93c32d5
--- /dev/null
+++ b/tests/ui/associated-type-bounds/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.stderr
@@ -0,0 +1,18 @@
+error[E0308]: mismatched types
+  --> $DIR/do-not-look-at-parent-item-in-suggestion-for-type-param-of-current-assoc-item.rs:24:37
+   |
+LL |         let _low = self.lows.remove(low.identify()).unwrap();
+   |                              ------ ^^^^^^^^^^^^^^ expected `&I`, found associated type
+   |                              |
+   |                              arguments to this method are incorrect
+   |
+   = note:    expected reference `&I`
+           found associated type `<impl LowT as Identify>::Id`
+   = help: consider constraining the associated type `<impl LowT as Identify>::Id` to `&I`
+   = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
+note: method defined here
+  --> $SRC_DIR/std/src/collections/hash/map.rs:LL:COL
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-type-bounds/duplicate.rs b/tests/ui/associated-type-bounds/duplicate.rs
index 4b8bf52c374..5019804d494 100644
--- a/tests/ui/associated-type-bounds/duplicate.rs
+++ b/tests/ui/associated-type-bounds/duplicate.rs
@@ -5,258 +5,258 @@ use std::iter;
 use std::mem::ManuallyDrop;
 
 struct SI1<T: 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` in trait `Iterator` is already specified [E0719]
     f: T,
 }
 struct SI2<T: 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` in trait `Iterator` is already specified [E0719]
     f: T,
 }
 struct SI3<T: 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` in trait `Iterator` is already specified [E0719]
     f: T,
 }
 struct SW1<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
     f: T,
 }
 struct SW2<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
     f: T,
 }
 struct SW3<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
     f: T,
 }
 
 enum EI1<T: 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` in trait `Iterator` is already specified [E0719]
     V(T),
 }
 enum EI2<T: 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` in trait `Iterator` is already specified [E0719]
     V(T),
 }
 enum EI3<T: 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` in trait `Iterator` is already specified [E0719]
     V(T),
 }
 enum EW1<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
     V(T),
 }
 enum EW2<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
     V(T),
 }
 enum EW3<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
     V(T),
 }
 
 union UI1<T: 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` in trait `Iterator` is already specified [E0719]
     f: ManuallyDrop<T>,
 }
 union UI2<T: 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` in trait `Iterator` is already specified [E0719]
     f: ManuallyDrop<T>,
 }
 union UI3<T: 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` in trait `Iterator` is already specified [E0719]
     f: ManuallyDrop<T>,
 }
 union UW1<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
     f: ManuallyDrop<T>,
 }
 union UW2<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
     f: ManuallyDrop<T>,
 }
 union UW3<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
     f: ManuallyDrop<T>,
 }
 
 fn FI1<T: 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` in trait `Iterator` is already specified [E0719]
 fn FI2<T: 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` in trait `Iterator` is already specified [E0719]
 fn FI3<T: 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` in trait `Iterator` is already specified [E0719]
 fn FW1<T>()
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
 }
 fn FW2<T>()
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
 }
 fn FW3<T>()
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
 }
 
 fn FRPIT1() -> impl 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` in trait `Iterator` is already specified [E0719]
     iter::empty()
 }
 fn FRPIT2() -> impl 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` in trait `Iterator` is already specified [E0719]
     iter::empty()
 }
 fn FRPIT3() -> impl 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` in trait `Iterator` is already specified [E0719]
     iter::empty()
 }
 fn FAPIT1(_: impl 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` in trait `Iterator` is already specified [E0719]
 fn FAPIT2(_: impl 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` in trait `Iterator` is already specified [E0719]
 fn FAPIT3(_: impl 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` in trait `Iterator` is already specified [E0719]
 
 type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 type TAW1<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 = T;
 type TAW2<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 = T;
 type TAW3<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 = T;
 
 type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
-//~^ ERROR the value of the associated type `Item` (from trait `Iterator`) is already specified [E0719]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 type ETAI4 = impl 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` in trait `Iterator` is already specified [E0719]
 type ETAI5 = impl 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` in trait `Iterator` is already specified [E0719]
 type ETAI6 = impl 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` in trait `Iterator` is already specified [E0719]
 
 trait TRI1<T: 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` in trait `Iterator` is already specified [E0719]
 trait TRI2<T: 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` in trait `Iterator` is already specified [E0719]
 trait TRI3<T: 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` in 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]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+//~| ERROR the value of the associated type `Item` in 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]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+//~| ERROR the value of the associated type `Item` in 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]
+//~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+//~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 trait TRW1<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
 }
 trait TRW2<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
 }
 trait TRW3<T>
 where
     T: 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` in trait `Iterator` is already specified [E0719]
 {
 }
 trait TRSW1
 where
     Self: 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]
+    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 {
 }
 trait TRSW2
 where
     Self: 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]
+    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 {
 }
 trait TRSW3
 where
     Self: 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]
+    //~^ ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
+    //~| ERROR the value of the associated type `Item` in trait `Iterator` is already specified [E0719]
 {
 }
 trait TRA1 {
     type A: 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` in trait `Iterator` is already specified [E0719]
 }
 trait TRA2 {
     type A: 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` in trait `Iterator` is already specified [E0719]
 }
 trait TRA3 {
     type A: 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` in trait `Iterator` is already specified [E0719]
 }
 
 type TADyn1 = dyn 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` in trait `Iterator` is already specified [E0719]
 type TADyn2 = Box<dyn 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` in trait `Iterator` is already specified [E0719]
 type TADyn3 = dyn 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` in trait `Iterator` is already specified [E0719]
 
 fn main() {}
diff --git a/tests/ui/associated-type-bounds/duplicate.stderr b/tests/ui/associated-type-bounds/duplicate.stderr
index 3629aa4fcea..3888e62230f 100644
--- a/tests/ui/associated-type-bounds/duplicate.stderr
+++ b/tests/ui/associated-type-bounds/duplicate.stderr
@@ -1,4 +1,4 @@
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:7:36
    |
 LL | struct SI1<T: Iterator<Item: Copy, Item: Send>> {
@@ -6,7 +6,7 @@ LL | struct SI1<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:11:36
    |
 LL | struct SI2<T: Iterator<Item: Copy, Item: Copy>> {
@@ -14,7 +14,7 @@ LL | struct SI2<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:15:39
    |
 LL | struct SI3<T: Iterator<Item: 'static, Item: 'static>> {
@@ -22,7 +22,7 @@ LL | struct SI3<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:21:29
    |
 LL |     T: Iterator<Item: Copy, Item: Send>,
@@ -30,7 +30,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:28:29
    |
 LL |     T: Iterator<Item: Copy, Item: Copy>,
@@ -38,7 +38,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:35:32
    |
 LL |     T: Iterator<Item: 'static, Item: 'static>,
@@ -46,7 +46,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:41:34
    |
 LL | enum EI1<T: Iterator<Item: Copy, Item: Send>> {
@@ -54,7 +54,7 @@ LL | enum EI1<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:45:34
    |
 LL | enum EI2<T: Iterator<Item: Copy, Item: Copy>> {
@@ -62,7 +62,7 @@ LL | enum EI2<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:49:37
    |
 LL | enum EI3<T: Iterator<Item: 'static, Item: 'static>> {
@@ -70,7 +70,7 @@ LL | enum EI3<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:55:29
    |
 LL |     T: Iterator<Item: Copy, Item: Send>,
@@ -78,7 +78,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:62:29
    |
 LL |     T: Iterator<Item: Copy, Item: Copy>,
@@ -86,7 +86,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:69:32
    |
 LL |     T: Iterator<Item: 'static, Item: 'static>,
@@ -94,7 +94,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:75:35
    |
 LL | union UI1<T: Iterator<Item: Copy, Item: Send>> {
@@ -102,7 +102,7 @@ LL | union UI1<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:79:35
    |
 LL | union UI2<T: Iterator<Item: Copy, Item: Copy>> {
@@ -110,7 +110,7 @@ LL | union UI2<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:83:38
    |
 LL | union UI3<T: Iterator<Item: 'static, Item: 'static>> {
@@ -118,7 +118,7 @@ LL | union UI3<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:89:29
    |
 LL |     T: Iterator<Item: Copy, Item: Send>,
@@ -126,7 +126,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:96:29
    |
 LL |     T: Iterator<Item: Copy, Item: Copy>,
@@ -134,7 +134,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:103:32
    |
 LL |     T: Iterator<Item: 'static, Item: 'static>,
@@ -142,7 +142,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:109:32
    |
 LL | fn FI1<T: Iterator<Item: Copy, Item: Send>>() {}
@@ -150,7 +150,7 @@ LL | fn FI1<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:111:32
    |
 LL | fn FI2<T: Iterator<Item: Copy, Item: Copy>>() {}
@@ -158,7 +158,7 @@ LL | fn FI2<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:113:35
    |
 LL | fn FI3<T: Iterator<Item: 'static, Item: 'static>>() {}
@@ -166,7 +166,7 @@ LL | fn FI3<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:117:29
    |
 LL |     T: Iterator<Item: Copy, Item: Send>,
@@ -174,7 +174,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:123:29
    |
 LL |     T: Iterator<Item: Copy, Item: Copy>,
@@ -182,7 +182,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:129:32
    |
 LL |     T: Iterator<Item: 'static, Item: 'static>,
@@ -190,7 +190,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:134:42
    |
 LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
@@ -198,7 +198,7 @@ LL | fn FRPIT1() -> impl Iterator<Item: Copy, Item: Send> {
    |                              |
    |                              `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:138:42
    |
 LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
@@ -206,7 +206,7 @@ LL | fn FRPIT2() -> impl Iterator<Item: Copy, Item: Copy> {
    |                              |
    |                              `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:142:45
    |
 LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
@@ -214,7 +214,7 @@ LL | fn FRPIT3() -> impl Iterator<Item: 'static, Item: 'static> {
    |                              |
    |                              `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:146:40
    |
 LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
@@ -222,7 +222,7 @@ LL | fn FAPIT1(_: impl Iterator<Item: Copy, Item: Send>) {}
    |                            |
    |                            `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:148:40
    |
 LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
@@ -230,7 +230,7 @@ LL | fn FAPIT2(_: impl Iterator<Item: Copy, Item: Copy>) {}
    |                            |
    |                            `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:150:43
    |
 LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
@@ -238,7 +238,7 @@ LL | fn FAPIT3(_: impl Iterator<Item: 'static, Item: 'static>) {}
    |                            |
    |                            `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:153:35
    |
 LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
@@ -246,7 +246,7 @@ LL | type TAI1<T: Iterator<Item: Copy, Item: Send>> = T;
    |                       |
    |                       `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:155:35
    |
 LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
@@ -254,7 +254,7 @@ LL | type TAI2<T: Iterator<Item: Copy, Item: Copy>> = T;
    |                       |
    |                       `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:157:38
    |
 LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
@@ -262,7 +262,7 @@ LL | type TAI3<T: Iterator<Item: 'static, Item: 'static>> = T;
    |                       |
    |                       `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:161:29
    |
 LL |     T: Iterator<Item: Copy, Item: Send>,
@@ -270,7 +270,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:166:29
    |
 LL |     T: Iterator<Item: Copy, Item: Copy>,
@@ -278,7 +278,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:171:32
    |
 LL |     T: Iterator<Item: 'static, Item: 'static>,
@@ -286,7 +286,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:175:36
    |
 LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
@@ -294,7 +294,7 @@ LL | type ETAI1<T: Iterator<Item: Copy, Item: Send>> = impl Copy;
    |                        |
    |                        `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:177:36
    |
 LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
@@ -302,7 +302,7 @@ LL | type ETAI2<T: Iterator<Item: Copy, Item: Copy>> = impl Copy;
    |                        |
    |                        `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:179:39
    |
 LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
@@ -310,7 +310,7 @@ LL | type ETAI3<T: Iterator<Item: 'static, Item: 'static>> = impl Copy;
    |                        |
    |                        `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:181:40
    |
 LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
@@ -318,7 +318,7 @@ LL | type ETAI4 = impl Iterator<Item: Copy, Item: Send>;
    |                            |
    |                            `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:183:40
    |
 LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
@@ -326,7 +326,7 @@ LL | type ETAI5 = impl Iterator<Item: Copy, Item: Copy>;
    |                            |
    |                            `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:185:43
    |
 LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
@@ -334,7 +334,7 @@ LL | type ETAI6 = impl Iterator<Item: 'static, Item: 'static>;
    |                            |
    |                            `Item` bound here first
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:188:36
    |
 LL | trait TRI1<T: Iterator<Item: Copy, Item: Send>> {}
@@ -342,7 +342,7 @@ LL | trait TRI1<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:190:36
    |
 LL | trait TRI2<T: Iterator<Item: Copy, Item: Copy>> {}
@@ -350,7 +350,7 @@ LL | trait TRI2<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:192:39
    |
 LL | trait TRI3<T: Iterator<Item: 'static, Item: 'static>> {}
@@ -358,7 +358,7 @@ LL | trait TRI3<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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:194:34
    |
 LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
@@ -366,7 +366,7 @@ 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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:194:34
    |
 LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
@@ -376,7 +376,7 @@ LL | trait TRS1: Iterator<Item: Copy, Item: Send> {}
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:197:34
    |
 LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
@@ -384,7 +384,7 @@ 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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:197:34
    |
 LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
@@ -394,7 +394,7 @@ LL | trait TRS2: Iterator<Item: Copy, Item: Copy> {}
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:200:37
    |
 LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
@@ -402,7 +402,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:200:37
    |
 LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
@@ -412,7 +412,7 @@ LL | trait TRS3: Iterator<Item: 'static, Item: 'static> {}
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:205:29
    |
 LL |     T: Iterator<Item: Copy, Item: Send>,
@@ -420,7 +420,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:211:29
    |
 LL |     T: Iterator<Item: Copy, Item: Copy>,
@@ -428,7 +428,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:217:32
    |
 LL |     T: Iterator<Item: 'static, Item: 'static>,
@@ -436,7 +436,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:223:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Send>,
@@ -444,7 +444,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:223:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Send>,
@@ -454,7 +454,7 @@ LL |     Self: Iterator<Item: Copy, Item: Send>,
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:230:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Copy>,
@@ -462,7 +462,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:230:32
    |
 LL |     Self: Iterator<Item: Copy, Item: Copy>,
@@ -472,7 +472,7 @@ LL |     Self: Iterator<Item: Copy, Item: Copy>,
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:237:35
    |
 LL |     Self: Iterator<Item: 'static, Item: 'static>,
@@ -480,7 +480,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:237:35
    |
 LL |     Self: Iterator<Item: 'static, Item: 'static>,
@@ -490,7 +490,7 @@ LL |     Self: Iterator<Item: 'static, Item: 'static>,
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:255:40
    |
 LL | type TADyn1 = dyn Iterator<Item: Copy, Item: Send>;
@@ -498,7 +498,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:257:44
    |
 LL | type TADyn2 = Box<dyn Iterator<Item: Copy, Item: Copy>>;
@@ -506,7 +506,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:259:43
    |
 LL | type TADyn3 = dyn Iterator<Item: 'static, Item: 'static>;
@@ -514,7 +514,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:243:34
    |
 LL |     type A: Iterator<Item: Copy, Item: Send>;
@@ -522,7 +522,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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:247:34
    |
 LL |     type A: Iterator<Item: Copy, Item: Copy>;
@@ -530,7 +530,7 @@ 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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/duplicate.rs:251:37
    |
 LL |     type A: Iterator<Item: 'static, Item: 'static>;
diff --git a/tests/ui/associated-type-bounds/elision.stderr b/tests/ui/associated-type-bounds/elision.stderr
index cc10bbcc0b5..a29e32a784f 100644
--- a/tests/ui/associated-type-bounds/elision.stderr
+++ b/tests/ui/associated-type-bounds/elision.stderr
@@ -17,7 +17,7 @@ LL | fn f(x: &mut dyn Iterator<Item: Iterator<Item = &'_ ()>>) -> Option<&'_ ()>
    |                           -----------------------------      --------------   ^^^^^^^^ expected `Option<&()>`, found `Option<impl Iterator<Item = &'_ ()>>`
    |                           |                                  |
    |                           |                                  expected `Option<&()>` because of return type
-   |                           this type parameter
+   |                           found this type parameter
    |
    = note: expected enum `Option<&()>`
               found enum `Option<impl Iterator<Item = &'_ ()>>`
diff --git a/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr b/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr
index 61299550e98..2a308f83731 100644
--- a/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr
+++ b/tests/ui/associated-type-bounds/overlaping-bound-suggestion.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated types `IntoIter` (from trait `IntoIterator`), `IntoIter` (from trait `IntoIterator`), `Item` (from trait `IntoIterator`), `Item` (from trait `IntoIterator`) must be specified
+error[E0191]: the value of the associated types `Item`, `Item`, `IntoIter` and `IntoIter` in `IntoIterator` must be specified
   --> $DIR/overlaping-bound-suggestion.rs:7:13
    |
 LL |     inner: <IntoIterator<Item: IntoIterator<Item: >>::IntoIterator as Item>::Core,
diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed
new file mode 100644
index 00000000000..b9f26a40219
--- /dev/null
+++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.fixed
@@ -0,0 +1,14 @@
+// run-rustfix
+trait O {
+    type M;
+}
+trait U<A: O> {
+    const N: A::M;
+}
+impl<D> O for D {
+    type M = u8;
+}
+impl<C: O<M = u8>> U<C> for u16 {
+    const N: C::M = 4u8; //~ ERROR mismatched types
+}
+fn main() {}
diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs
new file mode 100644
index 00000000000..abff6af73e2
--- /dev/null
+++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.rs
@@ -0,0 +1,14 @@
+// run-rustfix
+trait O {
+    type M;
+}
+trait U<A: O> {
+    const N: A::M;
+}
+impl<D> O for D {
+    type M = u8;
+}
+impl<C: O> U<C> for u16 {
+    const N: C::M = 4u8; //~ ERROR mismatched types
+}
+fn main() {}
diff --git a/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr
new file mode 100644
index 00000000000..b104f38ce90
--- /dev/null
+++ b/tests/ui/associated-type-bounds/suggest-contraining-assoc-type-because-of-assoc-const.stderr
@@ -0,0 +1,16 @@
+error[E0308]: mismatched types
+  --> $DIR/suggest-contraining-assoc-type-because-of-assoc-const.rs:12:21
+   |
+LL |     const N: C::M = 4u8;
+   |                     ^^^ expected associated type, found `u8`
+   |
+   = note: expected associated type `<C as O>::M`
+                         found type `u8`
+help: consider constraining the associated type `<C as O>::M` to `u8`
+   |
+LL | impl<C: O<M = u8>> U<C> for u16 {
+   |          ++++++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.stderr b/tests/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.stderr
index 236552baf92..df01e1e3768 100644
--- a/tests/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.stderr
+++ b/tests/ui/associated-types/associated-type-projection-ambig-between-bound-and-where-clause.stderr
@@ -10,11 +10,11 @@ LL |     type Color;
 LL | fn a<C:Vehicle+Box>(_: C::Color) {
    |                        ^^^^^^^^ ambiguous associated type `Color`
    |
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | fn a<C:Vehicle+Box>(_: <C as Box>::Color) {
    |                        ~~~~~~~~~~~~
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | fn a<C:Vehicle+Box>(_: <C as Vehicle>::Color) {
    |                        ~~~~~~~~~~~~~~~~
@@ -31,11 +31,11 @@ LL |     type Color;
 LL | fn b<C>(_: C::Color) where C : Vehicle+Box {
    |            ^^^^^^^^ ambiguous associated type `Color`
    |
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | fn b<C>(_: <C as Box>::Color) where C : Vehicle+Box {
    |            ~~~~~~~~~~~~
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | fn b<C>(_: <C as Vehicle>::Color) where C : Vehicle+Box {
    |            ~~~~~~~~~~~~~~~~
@@ -52,11 +52,11 @@ LL |     type Color;
 LL | fn c<C>(_: C::Color) where C : Vehicle, C : Box {
    |            ^^^^^^^^ ambiguous associated type `Color`
    |
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | fn c<C>(_: <C as Box>::Color) where C : Vehicle, C : Box {
    |            ~~~~~~~~~~~~
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | fn c<C>(_: <C as Vehicle>::Color) where C : Vehicle, C : Box {
    |            ~~~~~~~~~~~~~~~~
@@ -73,11 +73,11 @@ LL |     type Color;
 LL |     fn e(&self, _: X::Color) where X : Box;
    |                    ^^^^^^^^ ambiguous associated type `Color`
    |
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL |     fn e(&self, _: <X as Box>::Color) where X : Box;
    |                    ~~~~~~~~~~~~
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL |     fn e(&self, _: <X as Vehicle>::Color) where X : Box;
    |                    ~~~~~~~~~~~~~~~~
@@ -94,11 +94,11 @@ LL |     type Color;
 LL |     fn f(&self, _: X::Color) where X : Box { }
    |                    ^^^^^^^^ ambiguous associated type `Color`
    |
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL |     fn f(&self, _: <X as Box>::Color) where X : Box { }
    |                    ~~~~~~~~~~~~
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL |     fn f(&self, _: <X as Vehicle>::Color) where X : Box { }
    |                    ~~~~~~~~~~~~~~~~
@@ -115,11 +115,11 @@ LL |     type Color;
 LL |     fn d(&self, _: X::Color) where X : Box { }
    |                    ^^^^^^^^ ambiguous associated type `Color`
    |
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL |     fn d(&self, _: <X as Box>::Color) where X : Box { }
    |                    ~~~~~~~~~~~~
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL |     fn d(&self, _: <X as Vehicle>::Color) where X : Box { }
    |                    ~~~~~~~~~~~~~~~~
diff --git a/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr b/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr
index e765f932398..66037054e06 100644
--- a/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr
+++ b/tests/ui/associated-types/associated-type-projection-from-multiple-supertraits.stderr
@@ -18,11 +18,11 @@ LL |     type Color;
 LL | fn dent<C:BoxCar>(c: C, color: C::Color) {
    |                                ^^^^^^^^ ambiguous associated type `Color`
    |
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | fn dent<C:BoxCar>(c: C, color: <C as Vehicle>::Color) {
    |                                ~~~~~~~~~~~~~~~~
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | fn dent<C:BoxCar>(c: C, color: <C as Box>::Color) {
    |                                ~~~~~~~~~~~~
@@ -45,7 +45,7 @@ LL | fn dent_object<COLOR>(c: dyn BoxCar<Color=COLOR>) {
                    T: Vehicle::Color = COLOR,
                    T: Box::Color = COLOR
 
-error[E0191]: the value of the associated types `Color` (from trait `Box`), `Color` (from trait `Vehicle`) must be specified
+error[E0191]: the value of the associated types `Color` in `Box`, `Color` in `Vehicle` must be specified
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:23:30
    |
 LL |     type Color;
@@ -71,16 +71,16 @@ LL |     type Color;
 LL | fn paint<C:BoxCar>(c: C, d: C::Color) {
    |                             ^^^^^^^^ ambiguous associated type `Color`
    |
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | fn paint<C:BoxCar>(c: C, d: <C as Vehicle>::Color) {
    |                             ~~~~~~~~~~~~~~~~
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | fn paint<C:BoxCar>(c: C, d: <C as Box>::Color) {
    |                             ~~~~~~~~~~~~
 
-error[E0191]: the value of the associated types `Color` (from trait `Box`), `Color` (from trait `Vehicle`) must be specified
+error[E0191]: the value of the associated types `Color` in `Box`, `Color` in `Vehicle` must be specified
   --> $DIR/associated-type-projection-from-multiple-supertraits.rs:32:32
    |
 LL |     type Color;
diff --git a/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr b/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr
index 1ff6fd4b821..d361643f024 100644
--- a/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr
+++ b/tests/ui/associated-types/associated-types-in-ambiguous-context.stderr
@@ -13,7 +13,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/associated-types-in-ambiguous-context.rs:22:17
    |
 LL | trait Foo where Foo::Assoc: Bar {
-   |                 ^^^^^^^^^^ help: use the fully-qualified path: `<Self as Foo>::Assoc`
+   |                 ^^^^^^^^^^ help: use fully-qualified syntax: `<Self as Foo>::Assoc`
 
 error[E0223]: ambiguous associated type
   --> $DIR/associated-types-in-ambiguous-context.rs:27:10
@@ -21,7 +21,7 @@ error[E0223]: ambiguous associated type
 LL | type X = std::ops::Deref::Target;
    |          ^^^^^^^^^^^^^^^^^^^^^^^
    |
-help: use the fully-qualified path
+help: use fully-qualified syntax
    |
 LL | type X = <CString as Deref>::Target;
    |          ~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -37,7 +37,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/associated-types-in-ambiguous-context.rs:13:23
    |
 LL |     fn grab(&self) -> Grab::Value;
-   |                       ^^^^^^^^^^^ help: use the fully-qualified path: `<Self as Grab>::Value`
+   |                       ^^^^^^^^^^^ help: use fully-qualified syntax: `<Self as Grab>::Value`
 
 error[E0223]: ambiguous associated type
   --> $DIR/associated-types-in-ambiguous-context.rs:16:22
diff --git a/tests/ui/associated-types/associated-types-incomplete-object.rs b/tests/ui/associated-types/associated-types-incomplete-object.rs
index 4627dfd2b78..f6e4bdfbf37 100644
--- a/tests/ui/associated-types/associated-types-incomplete-object.rs
+++ b/tests/ui/associated-types/associated-types-incomplete-object.rs
@@ -21,11 +21,11 @@ pub fn main() {
     let a = &42isize as &dyn Foo<A=usize, B=char>;
 
     let b = &42isize as &dyn Foo<A=usize>;
-    //~^ ERROR the value of the associated type `B` (from trait `Foo`) must be specified
+    //~^ ERROR the value of the associated type `B` in `Foo` must be specified
 
     let c = &42isize as &dyn Foo<B=char>;
-    //~^ ERROR the value of the associated type `A` (from trait `Foo`) must be specified
+    //~^ ERROR the value of the associated type `A` in `Foo` must be specified
 
     let d = &42isize as &dyn Foo;
-    //~^ ERROR the value of the associated types `A` (from trait `Foo`), `B` (from trait
+    //~^ ERROR the value of the associated types `A` and `B` in `Foo`
 }
diff --git a/tests/ui/associated-types/associated-types-incomplete-object.stderr b/tests/ui/associated-types/associated-types-incomplete-object.stderr
index 32866c71468..0c9761afeb5 100644
--- a/tests/ui/associated-types/associated-types-incomplete-object.stderr
+++ b/tests/ui/associated-types/associated-types-incomplete-object.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `B` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated type `B` in `Foo` must be specified
   --> $DIR/associated-types-incomplete-object.rs:23:30
    |
 LL |     type B;
@@ -7,7 +7,7 @@ LL |     type B;
 LL |     let b = &42isize as &dyn Foo<A=usize>;
    |                              ^^^^^^^^^^^^ help: specify the associated type: `Foo<A=usize, B = Type>`
 
-error[E0191]: the value of the associated type `A` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated type `A` in `Foo` must be specified
   --> $DIR/associated-types-incomplete-object.rs:26:30
    |
 LL |     type A;
@@ -16,7 +16,7 @@ LL |     type A;
 LL |     let c = &42isize as &dyn Foo<B=char>;
    |                              ^^^^^^^^^^^ help: specify the associated type: `Foo<B=char, A = Type>`
 
-error[E0191]: the value of the associated types `A` (from trait `Foo`), `B` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated types `A` and `B` in `Foo` must be specified
   --> $DIR/associated-types-incomplete-object.rs:29:30
    |
 LL |     type A;
diff --git a/tests/ui/associated-types/associated-types-issue-20346.stderr b/tests/ui/associated-types/associated-types-issue-20346.stderr
index b1708b96e52..f384079862f 100644
--- a/tests/ui/associated-types/associated-types-issue-20346.stderr
+++ b/tests/ui/associated-types/associated-types-issue-20346.stderr
@@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<Adapter<I> as Iterator>::Item == Option<
   --> $DIR/associated-types-issue-20346.rs:34:36
    |
 LL | fn test_adapter<T, I: Iterator<Item=Option<T>>>(it: I) {
-   |                 - this type parameter
+   |                 - found this type parameter
 ...
 LL |     is_iterator_of::<Option<T>, _>(&adapter);
    |     ------------------------------ ^^^^^^^^ type mismatch resolving `<Adapter<I> as Iterator>::Item == Option<T>`
diff --git a/tests/ui/associated-types/associated-types-no-suitable-supertrait.rs b/tests/ui/associated-types/associated-types-no-suitable-supertrait.rs
index c373c5855cd..cc0101d63cf 100644
--- a/tests/ui/associated-types/associated-types-no-suitable-supertrait.rs
+++ b/tests/ui/associated-types/associated-types-no-suitable-supertrait.rs
@@ -21,6 +21,7 @@ trait Other {
 impl<T:Get> Other for T {
     fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
     //~^ ERROR the trait bound `(T, U): Get` is not satisfied
+    //~| ERROR the trait bound `(T, U): Get` is not satisfied
 }
 
 fn main() { }
diff --git a/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr b/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr
index b3f2e16ba0d..9ebc45387e8 100644
--- a/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr
+++ b/tests/ui/associated-types/associated-types-no-suitable-supertrait.stderr
@@ -21,6 +21,18 @@ help: consider further restricting `Self`
 LL |     fn uhoh<U:Get>(&self, foo: U, bar: <Self as Get>::Value) where Self: Get {}
    |                                                              +++++++++++++++
 
-error: aborting due to 2 previous errors
+error[E0277]: the trait bound `(T, U): Get` is not satisfied
+  --> $DIR/associated-types-no-suitable-supertrait.rs:22:5
+   |
+LL |     fn uhoh<U:Get>(&self, foo: U, bar: <(T, U) as Get>::Value) {}
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Get` is not implemented for `(T, U)`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/associated-types-no-suitable-supertrait.rs:12:1
+   |
+LL | trait Get {
+   | ^^^^^^^^^
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/associated-types/associated-types-path-1.stderr b/tests/ui/associated-types/associated-types-path-1.stderr
index a67f77e37c7..cab9dcec0b6 100644
--- a/tests/ui/associated-types/associated-types-path-1.stderr
+++ b/tests/ui/associated-types/associated-types-path-1.stderr
@@ -16,11 +16,11 @@ LL |     type A;
 LL | pub fn f2<T: Foo + Bar>(a: T, x: T::A) {}
    |                                  ^^^^ ambiguous associated type `A`
    |
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | pub fn f2<T: Foo + Bar>(a: T, x: <T as Bar>::A) {}
    |                                  ~~~~~~~~~~~~
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL | pub fn f2<T: Foo + Bar>(a: T, x: <T as Foo>::A) {}
    |                                  ~~~~~~~~~~~~
diff --git a/tests/ui/associated-types/hr-associated-type-projection-1.stderr b/tests/ui/associated-types/hr-associated-type-projection-1.stderr
index dd0389c34e6..425cfdca01d 100644
--- a/tests/ui/associated-types/hr-associated-type-projection-1.stderr
+++ b/tests/ui/associated-types/hr-associated-type-projection-1.stderr
@@ -2,7 +2,9 @@ error[E0271]: type mismatch resolving `<T as Deref>::Target == T`
   --> $DIR/hr-associated-type-projection-1.rs:13:33
    |
 LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<'_, T> for T {
-   |      - this type parameter      ^^^^^^^^^^^^^^^^^ expected type parameter `T`, found associated type
+   |      -                          ^^^^^^^^^^^^^^^^^ expected type parameter `T`, found associated type
+   |      |
+   |      expected this type parameter
    |
    = note: expected type parameter `T`
              found associated type `<T as Deref>::Target`
diff --git a/tests/ui/associated-types/issue-22560.stderr b/tests/ui/associated-types/issue-22560.stderr
index 2b88cf0b441..46e6e3951a5 100644
--- a/tests/ui/associated-types/issue-22560.stderr
+++ b/tests/ui/associated-types/issue-22560.stderr
@@ -9,7 +9,7 @@ LL | type Test = dyn Add + Sub;
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add + Sub {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
+error[E0191]: the value of the associated types `Output` in `Add`, `Output` in `Sub` must be specified
   --> $DIR/issue-22560.rs:9:17
    |
 LL |     type Output;
diff --git a/tests/ui/associated-types/issue-23595-1.stderr b/tests/ui/associated-types/issue-23595-1.stderr
index 4307477a56a..3443c4925f4 100644
--- a/tests/ui/associated-types/issue-23595-1.stderr
+++ b/tests/ui/associated-types/issue-23595-1.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated types `ChildKey` (from trait `Hierarchy`), `Children` (from trait `Hierarchy`), `Value` (from trait `Hierarchy`) must be specified
+error[E0191]: the value of the associated types `Value`, `ChildKey` and `Children` in `Hierarchy` must be specified
   --> $DIR/issue-23595-1.rs:8:58
    |
 LL |     type Value;
diff --git a/tests/ui/associated-types/missing-associated-types.stderr b/tests/ui/associated-types/missing-associated-types.stderr
index f617df984ae..e9669afe8c7 100644
--- a/tests/ui/associated-types/missing-associated-types.stderr
+++ b/tests/ui/associated-types/missing-associated-types.stderr
@@ -9,7 +9,7 @@ LL | type Foo<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs>;
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Y<Rhs> {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified
+error[E0191]: the value of the associated types `A` in `Y`, `Output` in `Add`, `Output` in `Mul`, `Output` in `Sub` must be specified
   --> $DIR/missing-associated-types.rs:12:21
    |
 LL |     type A;
@@ -38,7 +38,7 @@ LL | type Bar<Rhs> = dyn Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs>;
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + X<Rhs> + Z<Rhs> {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0191]: the value of the associated types `A` (from trait `Z`), `B` (from trait `Z`), `Output` (from trait `Add`), `Output` (from trait `Div`), `Output` (from trait `Div`), `Output` (from trait `Mul`), `Output` (from trait `Sub`) must be specified
+error[E0191]: the value of the associated types `A` and `B` in `Z`, `Output` and `Output` in `Div`, `Output` in `Add`, `Output` in `Mul`, `Output` in `Sub` must be specified
   --> $DIR/missing-associated-types.rs:15:21
    |
 LL |     type A;
@@ -74,7 +74,7 @@ LL | type Baz<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Y<Rhs>;
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Y<Rhs> {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0191]: the value of the associated types `A` (from trait `Y`), `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
+error[E0191]: the value of the associated types `A` in `Y`, `Output` in `Add`, `Output` in `Sub` must be specified
   --> $DIR/missing-associated-types.rs:18:21
    |
 LL |     type A;
@@ -102,7 +102,7 @@ LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
    = help: consider creating a new trait with all of these as supertraits and using that trait here instead: `trait NewTrait: Add<Rhs> + Sub<Rhs> + Fine<Rhs> {}`
    = note: auto-traits like `Send` and `Sync` are traits that have special properties; for more information on them, visit <https://doc.rust-lang.org/reference/special-types-and-traits.html#auto-traits>
 
-error[E0191]: the value of the associated types `Output` (from trait `Add`), `Output` (from trait `Sub`) must be specified
+error[E0191]: the value of the associated types `Output` in `Add`, `Output` in `Sub` must be specified
   --> $DIR/missing-associated-types.rs:21:21
    |
 LL | type Bat<Rhs> = dyn Add<Rhs> + Sub<Rhs> + Fine<Rhs>;
@@ -115,7 +115,7 @@ help: specify the associated types
 LL | type Bat<Rhs> = dyn Add<Rhs, Output = Type> + Sub<Rhs, Output = Type> + Fine<Rhs>;
    |                     ~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~
 
-error[E0191]: the value of the associated types `Output` (from trait `Div`), `Output` (from trait `Mul`) must be specified
+error[E0191]: the value of the associated types `Output` in `Div`, `Output` in `Mul` must be specified
   --> $DIR/missing-associated-types.rs:24:21
    |
 LL | type Bal<Rhs> = dyn X<Rhs>;
diff --git a/tests/ui/async-await/async-await-let-else.stderr b/tests/ui/async-await/async-await-let-else.stderr
index c3b4e761824..b360aab6b59 100644
--- a/tests/ui/async-await/async-await-let-else.stderr
+++ b/tests/ui/async-await/async-await-let-else.stderr
@@ -30,7 +30,7 @@ LL |     is_send(foo2(Some(true)));
    |     required by a bound introduced by this call
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `Rc<()>`
-note: required because it's used within this `async fn` body
+note: required because it's used within this `async` fn body
   --> $DIR/async-await-let-else.rs:24:29
    |
 LL |   async fn bar2<T>(_: T) -> ! {
@@ -39,7 +39,7 @@ LL | |     panic!()
 LL | | }
    | |_^
    = note: required because it captures the following types: `impl Future<Output = !>`
-note: required because it's used within this `async fn` body
+note: required because it's used within this `async` fn body
   --> $DIR/async-await-let-else.rs:18:32
    |
 LL |   async fn foo2(x: Option<bool>) {
diff --git a/tests/ui/async-await/async-unsafe-fn-call-in-safe.mir.stderr b/tests/ui/async-await/async-unsafe-fn-call-in-safe.mir.stderr
index 2114fb59ba3..f9e5bf675cb 100644
--- a/tests/ui/async-await/async-unsafe-fn-call-in-safe.mir.stderr
+++ b/tests/ui/async-await/async-unsafe-fn-call-in-safe.mir.stderr
@@ -23,7 +23,7 @@ LL |     S::f();
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
-  --> $DIR/async-unsafe-fn-call-in-safe.rs:24:5
+  --> $DIR/async-unsafe-fn-call-in-safe.rs:26:5
    |
 LL |     f();
    |     ^^^ call to unsafe function
diff --git a/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs b/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs
index c941dc27aa3..14cc0dc614f 100644
--- a/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs
+++ b/tests/ui/async-await/async-unsafe-fn-call-in-safe.rs
@@ -20,6 +20,10 @@ async fn g() {
 }
 
 fn main() {
-    S::f(); //[mir]~ ERROR call to unsafe function is unsafe
-    f(); //[mir]~ ERROR call to unsafe function is unsafe
+    S::f();
+    //[mir]~^ ERROR call to unsafe function is unsafe
+    //[thir]~^^ ERROR call to unsafe function `S::f` is unsafe
+    f();
+    //[mir]~^ ERROR call to unsafe function is unsafe
+    //[thir]~^^ ERROR call to unsafe function `f` is unsafe
 }
diff --git a/tests/ui/async-await/async-unsafe-fn-call-in-safe.thir.stderr b/tests/ui/async-await/async-unsafe-fn-call-in-safe.thir.stderr
index 68d97d3fd7d..ba3303fe793 100644
--- a/tests/ui/async-await/async-unsafe-fn-call-in-safe.thir.stderr
+++ b/tests/ui/async-await/async-unsafe-fn-call-in-safe.thir.stderr
@@ -14,6 +14,22 @@ LL |     f();
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
-error: aborting due to 2 previous errors
+error[E0133]: call to unsafe function `S::f` is unsafe and requires unsafe function or block
+  --> $DIR/async-unsafe-fn-call-in-safe.rs:23:5
+   |
+LL |     S::f();
+   |     ^^^^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function `f` is unsafe and requires unsafe function or block
+  --> $DIR/async-unsafe-fn-call-in-safe.rs:26:5
+   |
+LL |     f();
+   |     ^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/async-await/generator-desc.rs b/tests/ui/async-await/coroutine-desc.rs
index 50081201667..50081201667 100644
--- a/tests/ui/async-await/generator-desc.rs
+++ b/tests/ui/async-await/coroutine-desc.rs
diff --git a/tests/ui/async-await/generator-desc.stderr b/tests/ui/async-await/coroutine-desc.stderr
index d3e951cfe49..e4cb0915a10 100644
--- a/tests/ui/async-await/generator-desc.stderr
+++ b/tests/ui/async-await/coroutine-desc.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/generator-desc.rs:10:19
+  --> $DIR/coroutine-desc.rs:10:19
    |
 LL |     fun(async {}, async {});
    |     --- --------  ^^^^^^^^ expected `async` block, found a different `async` block
@@ -7,16 +7,16 @@ LL |     fun(async {}, async {});
    |     |   the expected `async` block
    |     arguments to this function are incorrect
    |
-   = note: expected `async` block `{async block@$DIR/generator-desc.rs:10:9: 10:17}`
-              found `async` block `{async block@$DIR/generator-desc.rs:10:19: 10:27}`
+   = note: expected `async` block `{async block@$DIR/coroutine-desc.rs:10:9: 10:17}`
+              found `async` block `{async block@$DIR/coroutine-desc.rs:10:19: 10:27}`
 note: function defined here
-  --> $DIR/generator-desc.rs:8:4
+  --> $DIR/coroutine-desc.rs:8:4
    |
 LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
    |    ^^^                                -----
 
 error[E0308]: mismatched types
-  --> $DIR/generator-desc.rs:12:16
+  --> $DIR/coroutine-desc.rs:12:16
    |
 LL |     fun(one(), two());
    |     ---        ^^^^^ expected future, found a different future
@@ -26,13 +26,13 @@ LL |     fun(one(), two());
    = help: consider `await`ing on both `Future`s
    = note: distinct uses of `impl Trait` result in different opaque types
 note: function defined here
-  --> $DIR/generator-desc.rs:8:4
+  --> $DIR/coroutine-desc.rs:8:4
    |
 LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
    |    ^^^                                -----
 
 error[E0308]: mismatched types
-  --> $DIR/generator-desc.rs:14:26
+  --> $DIR/coroutine-desc.rs:14:26
    |
 LL |     fun((async || {})(), (async || {})());
    |     ---           --     ^^^^^^^^^^^^^^^ expected `async` closure body, found a different `async` closure body
@@ -40,10 +40,10 @@ LL |     fun((async || {})(), (async || {})());
    |     |             the expected `async` closure body
    |     arguments to this function are incorrect
    |
-   = note: expected `async` closure body `{async closure body@$DIR/generator-desc.rs:14:19: 14:21}`
-              found `async` closure body `{async closure body@$DIR/generator-desc.rs:14:36: 14:38}`
+   = note: expected `async` closure body `{async closure body@$DIR/coroutine-desc.rs:14:19: 14:21}`
+              found `async` closure body `{async closure body@$DIR/coroutine-desc.rs:14:36: 14:38}`
 note: function defined here
-  --> $DIR/generator-desc.rs:8:4
+  --> $DIR/coroutine-desc.rs:8:4
    |
 LL | fn fun<F: Future<Output = ()>>(f1: F, f2: F) {}
    |    ^^^                                -----
diff --git a/tests/ui/async-await/generator-not-future.rs b/tests/ui/async-await/coroutine-not-future.rs
index 37d7cfa6fb7..b18635fea39 100644
--- a/tests/ui/async-await/generator-not-future.rs
+++ b/tests/ui/async-await/coroutine-not-future.rs
@@ -1,42 +1,42 @@
 // edition:2018
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::future::Future;
-use std::ops::Generator;
+use std::ops::Coroutine;
 
 async fn async_fn() {}
 fn returns_async_block() -> impl Future<Output = ()> {
     async {}
 }
-fn returns_generator() -> impl Generator<(), Yield = (), Return = ()> {
+fn returns_coroutine() -> impl Coroutine<(), Yield = (), Return = ()> {
     || {
         let _: () = yield ();
     }
 }
 
 fn takes_future(_f: impl Future<Output = ()>) {}
-fn takes_generator<ResumeTy>(_g: impl Generator<ResumeTy, Yield = (), Return = ()>) {}
+fn takes_coroutine<ResumeTy>(_g: impl Coroutine<ResumeTy, Yield = (), Return = ()>) {}
 
 fn main() {
     // okay:
     takes_future(async_fn());
     takes_future(returns_async_block());
     takes_future(async {});
-    takes_generator(returns_generator());
-    takes_generator(|| {
+    takes_coroutine(returns_coroutine());
+    takes_coroutine(|| {
         let _: () = yield ();
     });
 
-    // async futures are not generators:
-    takes_generator(async_fn());
+    // async futures are not coroutines:
+    takes_coroutine(async_fn());
     //~^ ERROR the trait bound
-    takes_generator(returns_async_block());
+    takes_coroutine(returns_async_block());
     //~^ ERROR the trait bound
-    takes_generator(async {});
+    takes_coroutine(async {});
     //~^ ERROR the trait bound
 
-    // generators are not futures:
-    takes_future(returns_generator());
+    // coroutines are not futures:
+    takes_future(returns_coroutine());
     //~^ ERROR is not a future
     takes_future(|ctx| {
         //~^ ERROR is not a future
diff --git a/tests/ui/async-await/coroutine-not-future.stderr b/tests/ui/async-await/coroutine-not-future.stderr
new file mode 100644
index 00000000000..130c5ef526b
--- /dev/null
+++ b/tests/ui/async-await/coroutine-not-future.stderr
@@ -0,0 +1,81 @@
+error[E0277]: the trait bound `impl Future<Output = ()>: Coroutine<_>` is not satisfied
+  --> $DIR/coroutine-not-future.rs:31:21
+   |
+LL |     takes_coroutine(async_fn());
+   |     --------------- ^^^^^^^^^^ the trait `Coroutine<_>` is not implemented for `impl Future<Output = ()>`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `takes_coroutine`
+  --> $DIR/coroutine-not-future.rs:18:39
+   |
+LL | fn takes_coroutine<ResumeTy>(_g: impl Coroutine<ResumeTy, Yield = (), Return = ()>) {}
+   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_coroutine`
+
+error[E0277]: the trait bound `impl Future<Output = ()>: Coroutine<_>` is not satisfied
+  --> $DIR/coroutine-not-future.rs:33:21
+   |
+LL |     takes_coroutine(returns_async_block());
+   |     --------------- ^^^^^^^^^^^^^^^^^^^^^ the trait `Coroutine<_>` is not implemented for `impl Future<Output = ()>`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `takes_coroutine`
+  --> $DIR/coroutine-not-future.rs:18:39
+   |
+LL | fn takes_coroutine<ResumeTy>(_g: impl Coroutine<ResumeTy, Yield = (), Return = ()>) {}
+   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_coroutine`
+
+error[E0277]: the trait bound `{async block@$DIR/coroutine-not-future.rs:35:21: 35:29}: Coroutine<_>` is not satisfied
+  --> $DIR/coroutine-not-future.rs:35:21
+   |
+LL |     takes_coroutine(async {});
+   |     --------------- ^^^^^^^^ the trait `Coroutine<_>` is not implemented for `{async block@$DIR/coroutine-not-future.rs:35:21: 35:29}`
+   |     |
+   |     required by a bound introduced by this call
+   |
+note: required by a bound in `takes_coroutine`
+  --> $DIR/coroutine-not-future.rs:18:39
+   |
+LL | fn takes_coroutine<ResumeTy>(_g: impl Coroutine<ResumeTy, Yield = (), Return = ()>) {}
+   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_coroutine`
+
+error[E0277]: `impl Coroutine<Yield = (), Return = ()>` is not a future
+  --> $DIR/coroutine-not-future.rs:39:18
+   |
+LL |     takes_future(returns_coroutine());
+   |     ------------ ^^^^^^^^^^^^^^^^^^^ `impl Coroutine<Yield = (), Return = ()>` is not a future
+   |     |
+   |     required by a bound introduced by this call
+   |
+   = help: the trait `Future` is not implemented for `impl Coroutine<Yield = (), Return = ()>`
+   = note: impl Coroutine<Yield = (), Return = ()> must be a future or must implement `IntoFuture` to be awaited
+note: required by a bound in `takes_future`
+  --> $DIR/coroutine-not-future.rs:17:26
+   |
+LL | fn takes_future(_f: impl Future<Output = ()>) {}
+   |                          ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future`
+
+error[E0277]: `{coroutine@$DIR/coroutine-not-future.rs:41:18: 41:23}` is not a future
+  --> $DIR/coroutine-not-future.rs:41:18
+   |
+LL |       takes_future(|ctx| {
+   |  _____------------_^
+   | |     |
+   | |     required by a bound introduced by this call
+LL | |
+LL | |         ctx = yield ();
+LL | |     });
+   | |_____^ `{coroutine@$DIR/coroutine-not-future.rs:41:18: 41:23}` is not a future
+   |
+   = help: the trait `Future` is not implemented for `{coroutine@$DIR/coroutine-not-future.rs:41:18: 41:23}`
+   = note: {coroutine@$DIR/coroutine-not-future.rs:41:18: 41:23} must be a future or must implement `IntoFuture` to be awaited
+note: required by a bound in `takes_future`
+  --> $DIR/coroutine-not-future.rs:17:26
+   |
+LL | fn takes_future(_f: impl Future<Output = ()>) {}
+   |                          ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future`
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs b/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs
new file mode 100644
index 00000000000..ced4434a7a7
--- /dev/null
+++ b/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.rs
@@ -0,0 +1,10 @@
+// check-fail
+// edition:2021
+
+// test for issue-114912 - debug ice: attempted to add with overflow
+
+async fn main() {
+    //~^ ERROR `main` function is not allowed to be `async`
+    [0usize; 0xffff_ffff_ffff_ffff].await;
+    //~^ ERROR `[usize; usize::MAX]` is not a future
+}
diff --git a/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.stderr b/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.stderr
new file mode 100644
index 00000000000..8c9d06c79ca
--- /dev/null
+++ b/tests/ui/async-await/debug-ice-attempted-to-add-with-overflow.stderr
@@ -0,0 +1,23 @@
+error[E0277]: `[usize; usize::MAX]` is not a future
+  --> $DIR/debug-ice-attempted-to-add-with-overflow.rs:8:37
+   |
+LL |     [0usize; 0xffff_ffff_ffff_ffff].await;
+   |                                    -^^^^^
+   |                                    ||
+   |                                    |`[usize; usize::MAX]` is not a future
+   |                                    help: remove the `.await`
+   |
+   = help: the trait `Future` is not implemented for `[usize; usize::MAX]`
+   = note: [usize; usize::MAX] must be a future or must implement `IntoFuture` to be awaited
+   = note: required for `[usize; usize::MAX]` to implement `IntoFuture`
+
+error[E0752]: `main` function is not allowed to be `async`
+  --> $DIR/debug-ice-attempted-to-add-with-overflow.rs:6:1
+   |
+LL | async fn main() {
+   | ^^^^^^^^^^^^^^^ `main` function is not allowed to be `async`
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0277, E0752.
+For more information about an error, try `rustc --explain E0277`.
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 d63911b0d3c..b0447a58261 100644
--- a/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
+++ b/tests/ui/async-await/future-sizes/async-awaiting-fut.stdout
@@ -19,18 +19,18 @@ print-type-size     variant `Suspend0`: 2052 bytes
 print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
 print-type-size         padding: 1 bytes
 print-type-size         local `.fut`: 1025 bytes, alignment: 1 bytes
-print-type-size         local `..generator_field4`: 1 bytes
+print-type-size         local `..coroutine_field4`: 1 bytes
 print-type-size         local `.__awaitee`: 1 bytes
 print-type-size     variant `Suspend1`: 3076 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         local `..coroutine_field4`: 1 bytes, alignment: 1 bytes
 print-type-size         local `.__awaitee`: 1025 bytes
 print-type-size     variant `Suspend2`: 2052 bytes
 print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
 print-type-size         padding: 1 bytes
 print-type-size         local `.fut`: 1025 bytes, alignment: 1 bytes
-print-type-size         local `..generator_field4`: 1 bytes
+print-type-size         local `..coroutine_field4`: 1 bytes
 print-type-size         local `.__awaitee`: 1 bytes
 print-type-size     variant `Returned`: 1025 bytes
 print-type-size         upvar `.fut`: 1025 bytes, offset: 0 bytes, alignment: 1 bytes
diff --git a/tests/ui/async-await/generator-not-future.stderr b/tests/ui/async-await/generator-not-future.stderr
deleted file mode 100644
index 540501b9826..00000000000
--- a/tests/ui/async-await/generator-not-future.stderr
+++ /dev/null
@@ -1,81 +0,0 @@
-error[E0277]: the trait bound `impl Future<Output = ()>: Generator<_>` is not satisfied
-  --> $DIR/generator-not-future.rs:31:21
-   |
-LL |     takes_generator(async_fn());
-   |     --------------- ^^^^^^^^^^ the trait `Generator<_>` is not implemented for `impl Future<Output = ()>`
-   |     |
-   |     required by a bound introduced by this call
-   |
-note: required by a bound in `takes_generator`
-  --> $DIR/generator-not-future.rs:18:39
-   |
-LL | fn takes_generator<ResumeTy>(_g: impl Generator<ResumeTy, Yield = (), Return = ()>) {}
-   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_generator`
-
-error[E0277]: the trait bound `impl Future<Output = ()>: Generator<_>` is not satisfied
-  --> $DIR/generator-not-future.rs:33:21
-   |
-LL |     takes_generator(returns_async_block());
-   |     --------------- ^^^^^^^^^^^^^^^^^^^^^ the trait `Generator<_>` is not implemented for `impl Future<Output = ()>`
-   |     |
-   |     required by a bound introduced by this call
-   |
-note: required by a bound in `takes_generator`
-  --> $DIR/generator-not-future.rs:18:39
-   |
-LL | fn takes_generator<ResumeTy>(_g: impl Generator<ResumeTy, Yield = (), Return = ()>) {}
-   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_generator`
-
-error[E0277]: the trait bound `{async block@$DIR/generator-not-future.rs:35:21: 35:29}: Generator<_>` is not satisfied
-  --> $DIR/generator-not-future.rs:35:21
-   |
-LL |     takes_generator(async {});
-   |     --------------- ^^^^^^^^ the trait `Generator<_>` is not implemented for `{async block@$DIR/generator-not-future.rs:35:21: 35:29}`
-   |     |
-   |     required by a bound introduced by this call
-   |
-note: required by a bound in `takes_generator`
-  --> $DIR/generator-not-future.rs:18:39
-   |
-LL | fn takes_generator<ResumeTy>(_g: impl Generator<ResumeTy, Yield = (), Return = ()>) {}
-   |                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_generator`
-
-error[E0277]: `impl Generator<Yield = (), Return = ()>` is not a future
-  --> $DIR/generator-not-future.rs:39:18
-   |
-LL |     takes_future(returns_generator());
-   |     ------------ ^^^^^^^^^^^^^^^^^^^ `impl Generator<Yield = (), Return = ()>` is not a future
-   |     |
-   |     required by a bound introduced by this call
-   |
-   = help: the trait `Future` is not implemented for `impl Generator<Yield = (), Return = ()>`
-   = note: impl Generator<Yield = (), Return = ()> must be a future or must implement `IntoFuture` to be awaited
-note: required by a bound in `takes_future`
-  --> $DIR/generator-not-future.rs:17:26
-   |
-LL | fn takes_future(_f: impl Future<Output = ()>) {}
-   |                          ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future`
-
-error[E0277]: `{generator@$DIR/generator-not-future.rs:41:18: 41:23}` is not a future
-  --> $DIR/generator-not-future.rs:41:18
-   |
-LL |       takes_future(|ctx| {
-   |  _____------------_^
-   | |     |
-   | |     required by a bound introduced by this call
-LL | |
-LL | |         ctx = yield ();
-LL | |     });
-   | |_____^ `{generator@$DIR/generator-not-future.rs:41:18: 41:23}` is not a future
-   |
-   = help: the trait `Future` is not implemented for `{generator@$DIR/generator-not-future.rs:41:18: 41:23}`
-   = note: {generator@$DIR/generator-not-future.rs:41:18: 41:23} must be a future or must implement `IntoFuture` to be awaited
-note: required by a bound in `takes_future`
-  --> $DIR/generator-not-future.rs:17:26
-   |
-LL | fn takes_future(_f: impl Future<Output = ()>) {}
-   |                          ^^^^^^^^^^^^^^^^^^^ required by this bound in `takes_future`
-
-error: aborting due to 5 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs
index 3cc11d241f7..c26f6625f00 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.rs
@@ -1,7 +1,5 @@
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 use std::future::Future;
 use std::pin::Pin;
 
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr
index e6dd83b6b0a..b70b36adb4a 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr
+++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed-in-trait.stderr
@@ -1,11 +1,11 @@
 error[E0053]: method `foo` has an incompatible type for trait
-  --> $DIR/async-example-desugared-boxed-in-trait.rs:13:5
+  --> $DIR/async-example-desugared-boxed-in-trait.rs:11:5
    |
 LL |     async fn foo(&self) -> i32 {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Pin<Box<dyn Future<Output = i32>>>`, found future
    |
 note: type in trait
-  --> $DIR/async-example-desugared-boxed-in-trait.rs:9:22
+  --> $DIR/async-example-desugared-boxed-in-trait.rs:7:22
    |
 LL |     fn foo(&self) -> Pin<Box<dyn Future<Output = i32> + '_>>;
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs b/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs
index 81d25ce27ae..c5a9841029e 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed.rs
@@ -1,7 +1,5 @@
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 use std::future::Future;
 use std::pin::Pin;
 
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr b/tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr
index cd18790fdfb..6392ce86e4a 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr
+++ b/tests/ui/async-await/in-trait/async-example-desugared-boxed.stderr
@@ -1,5 +1,5 @@
 error: method `foo` should be async because the method from the trait is async
-  --> $DIR/async-example-desugared-boxed.rs:13:5
+  --> $DIR/async-example-desugared-boxed.rs:11:5
    |
 LL |     async fn foo(&self) -> i32;
    |     --------------------------- required because the trait method is async
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-extra.rs b/tests/ui/async-await/in-trait/async-example-desugared-extra.rs
index f0c59180fb5..ce93bd62608 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-extra.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared-extra.rs
@@ -2,7 +2,6 @@
 // edition: 2021
 
 #![feature(lint_reasons)]
-#![allow(incomplete_features)]
 
 use std::future::Future;
 use std::pin::Pin;
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs b/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs
index deca28af853..f7a351efff5 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared-in-trait.rs
@@ -1,8 +1,6 @@
 // check-pass
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 use std::future::Future;
 
 trait MyTrait {
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-manual.rs b/tests/ui/async-await/in-trait/async-example-desugared-manual.rs
index fdba4d93c77..c287b9a5b84 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-manual.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared-manual.rs
@@ -1,7 +1,5 @@
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 use std::future::Future;
 use std::task::Poll;
 
diff --git a/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr b/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr
index 463892f21bf..1eda6fe6532 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr
+++ b/tests/ui/async-await/in-trait/async-example-desugared-manual.stderr
@@ -1,5 +1,5 @@
 error: method `foo` should be async because the method from the trait is async
-  --> $DIR/async-example-desugared-manual.rs:21:5
+  --> $DIR/async-example-desugared-manual.rs:19:5
    |
 LL |     async fn foo(&self) -> i32;
    |     --------------------------- required because the trait method is async
diff --git a/tests/ui/async-await/in-trait/async-example-desugared.rs b/tests/ui/async-await/in-trait/async-example-desugared.rs
index 7fc78f7da6d..78904d87abc 100644
--- a/tests/ui/async-await/in-trait/async-example-desugared.rs
+++ b/tests/ui/async-await/in-trait/async-example-desugared.rs
@@ -1,8 +1,6 @@
 // check-pass
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 use std::future::Future;
 
 trait MyTrait {
diff --git a/tests/ui/async-await/in-trait/async-example.rs b/tests/ui/async-await/in-trait/async-example.rs
index 62ed490bf05..a32f979df6b 100644
--- a/tests/ui/async-await/in-trait/async-example.rs
+++ b/tests/ui/async-await/in-trait/async-example.rs
@@ -1,8 +1,6 @@
 // check-pass
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 trait MyTrait {
     #[allow(async_fn_in_trait)]
     async fn foo(&self) -> i32;
diff --git a/tests/ui/async-await/in-trait/async-generics-and-bounds.rs b/tests/ui/async-await/in-trait/async-generics-and-bounds.rs
index 4e859fb27a9..8dc0574c757 100644
--- a/tests/ui/async-await/in-trait/async-generics-and-bounds.rs
+++ b/tests/ui/async-await/in-trait/async-generics-and-bounds.rs
@@ -2,8 +2,6 @@
 // known-bug: #102682
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 use std::fmt::Debug;
 use std::hash::Hash;
 
diff --git a/tests/ui/async-await/in-trait/async-generics-and-bounds.stderr b/tests/ui/async-await/in-trait/async-generics-and-bounds.stderr
index d7251a52863..3cc35b21409 100644
--- a/tests/ui/async-await/in-trait/async-generics-and-bounds.stderr
+++ b/tests/ui/async-await/in-trait/async-generics-and-bounds.stderr
@@ -1,5 +1,5 @@
 error[E0311]: the parameter type `U` may not live long enough
-  --> $DIR/async-generics-and-bounds.rs:11:5
+  --> $DIR/async-generics-and-bounds.rs:9:5
    |
 LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
    |     ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL |     async fn foo<'a>(&'a self) -> &'a (T, U) where T: Debug + Sized, U: Has
    |                 ++++  ++           ++                                       +++++++
 
 error[E0311]: the parameter type `T` may not live long enough
-  --> $DIR/async-generics-and-bounds.rs:11:5
+  --> $DIR/async-generics-and-bounds.rs:9:5
    |
 LL |     async fn foo(&self) -> &(T, U) where T: Debug + Sized, U: Hash;
    |     ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/async-await/in-trait/async-generics.rs b/tests/ui/async-await/in-trait/async-generics.rs
index 2d342592848..6004916a4e5 100644
--- a/tests/ui/async-await/in-trait/async-generics.rs
+++ b/tests/ui/async-await/in-trait/async-generics.rs
@@ -2,8 +2,6 @@
 // known-bug: #102682
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 trait MyTrait<T, U> {
     async fn foo(&self) -> &(T, U);
 }
diff --git a/tests/ui/async-await/in-trait/async-generics.stderr b/tests/ui/async-await/in-trait/async-generics.stderr
index aec62d12201..3b27f8fe2f0 100644
--- a/tests/ui/async-await/in-trait/async-generics.stderr
+++ b/tests/ui/async-await/in-trait/async-generics.stderr
@@ -1,5 +1,5 @@
 error[E0311]: the parameter type `U` may not live long enough
-  --> $DIR/async-generics.rs:8:5
+  --> $DIR/async-generics.rs:6:5
    |
 LL |     async fn foo(&self) -> &(T, U);
    |     ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL |     async fn foo<'a>(&'a self) -> &'a (T, U) where U: 'a;
    |                 ++++  ++           ++        +++++++++++
 
 error[E0311]: the parameter type `T` may not live long enough
-  --> $DIR/async-generics.rs:8:5
+  --> $DIR/async-generics.rs:6:5
    |
 LL |     async fn foo(&self) -> &(T, U);
    |     ^^^^^^^^^^^^^-^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs b/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs
index ea8330a4b52..3721b01350d 100644
--- a/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs
+++ b/tests/ui/async-await/in-trait/async-lifetimes-and-bounds.rs
@@ -1,8 +1,6 @@
 // check-pass
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 use std::fmt::Debug;
 
 trait MyTrait<'a, 'b, T> {
diff --git a/tests/ui/async-await/in-trait/async-lifetimes.rs b/tests/ui/async-await/in-trait/async-lifetimes.rs
index 6e573b9cc8b..cb4b871cbe1 100644
--- a/tests/ui/async-await/in-trait/async-lifetimes.rs
+++ b/tests/ui/async-await/in-trait/async-lifetimes.rs
@@ -1,8 +1,6 @@
 // check-pass
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 trait MyTrait<'a, 'b, T> {
     #[allow(async_fn_in_trait)]
     async fn foo(&'a self, key: &'b T) -> (&'a Self, &'b T);
diff --git a/tests/ui/async-await/in-trait/async-recursive-generic.rs b/tests/ui/async-await/in-trait/async-recursive-generic.rs
index 34f1b09756e..c6031ce28d1 100644
--- a/tests/ui/async-await/in-trait/async-recursive-generic.rs
+++ b/tests/ui/async-await/in-trait/async-recursive-generic.rs
@@ -1,7 +1,5 @@
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 trait MyTrait<T> {
     async fn foo_recursive(&self, n: usize) -> T;
 }
diff --git a/tests/ui/async-await/in-trait/async-recursive-generic.stderr b/tests/ui/async-await/in-trait/async-recursive-generic.stderr
index 7c2df6683f0..cf0bcd741fc 100644
--- a/tests/ui/async-await/in-trait/async-recursive-generic.stderr
+++ b/tests/ui/async-await/in-trait/async-recursive-generic.stderr
@@ -1,5 +1,5 @@
 error[E0733]: recursion in an `async fn` requires boxing
-  --> $DIR/async-recursive-generic.rs:10:5
+  --> $DIR/async-recursive-generic.rs:8:5
    |
 LL |     async fn foo_recursive(&self, n: usize) -> T {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive `async fn`
diff --git a/tests/ui/async-await/in-trait/async-recursive.rs b/tests/ui/async-await/in-trait/async-recursive.rs
index ddf119b252f..09f1ffe499e 100644
--- a/tests/ui/async-await/in-trait/async-recursive.rs
+++ b/tests/ui/async-await/in-trait/async-recursive.rs
@@ -1,7 +1,5 @@
 // edition: 2021
 
-#![allow(incomplete_features)]
-
 trait MyTrait {
     async fn foo_recursive(&self, n: usize) -> i32;
 }
diff --git a/tests/ui/async-await/in-trait/async-recursive.stderr b/tests/ui/async-await/in-trait/async-recursive.stderr
index 1253252cc40..b959652ea16 100644
--- a/tests/ui/async-await/in-trait/async-recursive.stderr
+++ b/tests/ui/async-await/in-trait/async-recursive.stderr
@@ -1,5 +1,5 @@
 error[E0733]: recursion in an `async fn` requires boxing
-  --> $DIR/async-recursive.rs:10:5
+  --> $DIR/async-recursive.rs:8:5
    |
 LL |     async fn foo_recursive(&self, n: usize) -> i32 {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive `async fn`
diff --git a/tests/ui/async-await/in-trait/coherence-constrained.rs b/tests/ui/async-await/in-trait/coherence-constrained.rs
new file mode 100644
index 00000000000..8e62b3e0e90
--- /dev/null
+++ b/tests/ui/async-await/in-trait/coherence-constrained.rs
@@ -0,0 +1,26 @@
+// edition: 2021
+
+trait Foo {
+    type T;
+
+    async fn foo(&self) -> Self::T;
+}
+
+struct Bar;
+
+impl Foo for Bar {
+    type T = ();
+
+    async fn foo(&self) {}
+    //~^ ERROR type annotations needed: cannot satisfy `<Bar as Foo>::T == ()`
+}
+
+impl Foo for Bar {
+    //~^ ERROR conflicting implementations of trait `Foo` for type `Bar`
+    type T = ();
+
+    async fn foo(&self) {}
+    //~^ ERROR type annotations needed: cannot satisfy `<Bar as Foo>::T == ()`
+}
+
+fn main() {}
diff --git a/tests/ui/async-await/in-trait/coherence-constrained.stderr b/tests/ui/async-await/in-trait/coherence-constrained.stderr
new file mode 100644
index 00000000000..570a357ca8f
--- /dev/null
+++ b/tests/ui/async-await/in-trait/coherence-constrained.stderr
@@ -0,0 +1,25 @@
+error[E0284]: type annotations needed: cannot satisfy `<Bar as Foo>::T == ()`
+  --> $DIR/coherence-constrained.rs:14:5
+   |
+LL |     async fn foo(&self) {}
+   |     ^^^^^^^^^^^^^^^^^^^ cannot satisfy `<Bar as Foo>::T == ()`
+
+error[E0284]: type annotations needed: cannot satisfy `<Bar as Foo>::T == ()`
+  --> $DIR/coherence-constrained.rs:22:5
+   |
+LL |     async fn foo(&self) {}
+   |     ^^^^^^^^^^^^^^^^^^^ cannot satisfy `<Bar as Foo>::T == ()`
+
+error[E0119]: conflicting implementations of trait `Foo` for type `Bar`
+  --> $DIR/coherence-constrained.rs:18:1
+   |
+LL | impl Foo for Bar {
+   | ---------------- first implementation here
+...
+LL | impl Foo for Bar {
+   | ^^^^^^^^^^^^^^^^ conflicting implementation for `Bar`
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0119, E0284.
+For more information about an error, try `rustc --explain E0119`.
diff --git a/tests/ui/async-await/in-trait/early-bound-1.rs b/tests/ui/async-await/in-trait/early-bound-1.rs
index f79d6f23c93..ddcb477a1dc 100644
--- a/tests/ui/async-await/in-trait/early-bound-1.rs
+++ b/tests/ui/async-await/in-trait/early-bound-1.rs
@@ -1,8 +1,6 @@
 // check-pass
 // edition:2021
 
-#![allow(incomplete_features)]
-
 pub trait Foo {
     #[allow(async_fn_in_trait)]
     async fn foo(&mut self);
diff --git a/tests/ui/async-await/in-trait/unconstrained-impl-region.rs b/tests/ui/async-await/in-trait/unconstrained-impl-region.rs
new file mode 100644
index 00000000000..c06f9f005f1
--- /dev/null
+++ b/tests/ui/async-await/in-trait/unconstrained-impl-region.rs
@@ -0,0 +1,19 @@
+// edition: 2021
+
+pub(crate) trait Inbox<M> {
+    async fn next(self) -> M;
+}
+
+pub(crate) trait Actor: Sized {
+    type Message;
+
+    async fn on_mount(self, _: impl Inbox<Self::Message>);
+}
+
+impl<'a> Actor for () {
+//~^ ERROR the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+    type Message = &'a ();
+    async fn on_mount(self, _: impl Inbox<&'a ()>) {}
+}
+
+fn main() {}
diff --git a/tests/ui/async-await/in-trait/unconstrained-impl-region.stderr b/tests/ui/async-await/in-trait/unconstrained-impl-region.stderr
new file mode 100644
index 00000000000..2cb0da2e8bc
--- /dev/null
+++ b/tests/ui/async-await/in-trait/unconstrained-impl-region.stderr
@@ -0,0 +1,9 @@
+error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
+  --> $DIR/unconstrained-impl-region.rs:13:6
+   |
+LL | impl<'a> Actor for () {
+   |      ^^ unconstrained lifetime parameter
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0207`.
diff --git a/tests/ui/async-await/issue-60709.rs b/tests/ui/async-await/issue-60709.rs
index 61f6ed1b7b2..2cda40e9e11 100644
--- a/tests/ui/async-await/issue-60709.rs
+++ b/tests/ui/async-await/issue-60709.rs
@@ -1,5 +1,5 @@
 // This used to compile the future down to ud2, due to uninhabited types being
-// handled incorrectly in generators.
+// handled incorrectly in coroutines.
 // compile-flags: -Copt-level=z -Cdebuginfo=2 --edition=2018
 
 // run-pass
diff --git a/tests/ui/async-await/issue-61793.rs b/tests/ui/async-await/issue-61793.rs
index 9180e1d811a..bb861cf60b1 100644
--- a/tests/ui/async-await/issue-61793.rs
+++ b/tests/ui/async-await/issue-61793.rs
@@ -1,5 +1,5 @@
 // This testcase used to ICE in codegen due to inconsistent field reordering
-// in the generator state, claiming a ZST field was after a non-ZST field,
+// in the coroutine state, claiming a ZST field was after a non-ZST field,
 // while those two fields were at the same offset (which is impossible).
 // That is, memory ordering of `(X, ())`, but offsets of `((), X)`.
 
diff --git a/tests/ui/async-await/issue-62658.rs b/tests/ui/async-await/issue-62658.rs
index d0af01e0c00..8e6d070ea3f 100644
--- a/tests/ui/async-await/issue-62658.rs
+++ b/tests/ui/async-await/issue-62658.rs
@@ -1,4 +1,4 @@
-// This test created a generator whose size was not rounded to a multiple of its
+// This test created a coroutine whose size was not rounded to a multiple of its
 // alignment. This caused an assertion error in codegen.
 
 // build-pass
diff --git a/tests/ui/async-await/issue-66312.rs b/tests/ui/async-await/issue-66312.rs
index 9224971ecb1..fbc58697d48 100644
--- a/tests/ui/async-await/issue-66312.rs
+++ b/tests/ui/async-await/issue-66312.rs
@@ -6,7 +6,7 @@ trait Test<T> {
 
 async fn f() {
     let x = Some(2);
-    if x.is_some() {
+    if x.is_some() { //~ ERROR mismatched types
         println!("Some");
     }
 }
diff --git a/tests/ui/async-await/issue-66312.stderr b/tests/ui/async-await/issue-66312.stderr
index 80d294a10a0..dad5807cb50 100644
--- a/tests/ui/async-await/issue-66312.stderr
+++ b/tests/ui/async-await/issue-66312.stderr
@@ -7,6 +7,13 @@ LL |     fn is_some(self: T);
    = note: type of `self` must be `Self` or a type that dereferences to it
    = help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
 
-error: aborting due to previous error
+error[E0308]: mismatched types
+  --> $DIR/issue-66312.rs:9:8
+   |
+LL |     if x.is_some() {
+   |        ^^^^^^^^^^^ expected `bool`, found `()`
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0307`.
+Some errors have detailed explanations: E0307, E0308.
+For more information about an error, try `rustc --explain E0307`.
diff --git a/tests/ui/async-await/issue-68112.stderr b/tests/ui/async-await/issue-68112.stderr
index 17b619ebee3..1cd8beac260 100644
--- a/tests/ui/async-await/issue-68112.stderr
+++ b/tests/ui/async-await/issue-68112.stderr
@@ -45,7 +45,7 @@ LL |     require_send(send_fut);
    = help: the trait `Sync` is not implemented for `RefCell<i32>`
    = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
    = note: required for `Arc<RefCell<i32>>` to implement `Send`
-note: required because it's used within this `async fn` body
+note: required because it's used within this `async` fn body
   --> $DIR/issue-68112.rs:47:31
    |
 LL |   async fn ready2<T>(t: T) -> T {
diff --git a/tests/ui/async-await/issue-70935-complex-spans.stderr b/tests/ui/async-await/issue-70935-complex-spans.stderr
index ab834daa85d..d0605d7e1a6 100644
--- a/tests/ui/async-await/issue-70935-complex-spans.stderr
+++ b/tests/ui/async-await/issue-70935-complex-spans.stderr
@@ -18,7 +18,7 @@ note: required because it's used within this closure
    |
 LL |         baz(|| async {
    |             ^^
-note: required because it's used within this `async fn` body
+note: required because it's used within this `async` fn body
   --> $DIR/issue-70935-complex-spans.rs:12:67
    |
 LL |   async fn baz<T>(_c: impl FnMut() -> T) where T: Future<Output=()> {
diff --git a/tests/ui/async-await/issue-73137.rs b/tests/ui/async-await/issue-73137.rs
index c43ce2cadba..2d16f193644 100644
--- a/tests/ui/async-await/issue-73137.rs
+++ b/tests/ui/async-await/issue-73137.rs
@@ -28,7 +28,7 @@ fn main() {
             a: async { 0 }.await,
         };
 
-        // An error in the generator transform caused `b` to be overwritten with `a` when `b` was
+        // An error in the coroutine transform caused `b` to be overwritten with `a` when `b` was
         // borrowed.
         nop(&action.b);
         assert_ne!(0usize, unsafe { std::mem::transmute(action.b) });
diff --git a/tests/ui/async-await/issues/issue-51719.rs b/tests/ui/async-await/issues/issue-51719.rs
index 09241f982aa..1cf388cd8ab 100644
--- a/tests/ui/async-await/issues/issue-51719.rs
+++ b/tests/ui/async-await/issues/issue-51719.rs
@@ -1,10 +1,10 @@
 // edition:2018
 //
-// Tests that the .await syntax can't be used to make a generator
+// Tests that the .await syntax can't be used to make a coroutine
 
 async fn foo() {}
 
-fn make_generator() {
+fn make_coroutine() {
     let _gen = || foo().await;
     //~^ ERROR `await` is only allowed inside `async` functions and blocks
 }
diff --git a/tests/ui/async-await/issues/issue-59972.rs b/tests/ui/async-await/issues/issue-59972.rs
index c2e24a96b1d..f60ec04c31e 100644
--- a/tests/ui/async-await/issues/issue-59972.rs
+++ b/tests/ui/async-await/issues/issue-59972.rs
@@ -1,4 +1,4 @@
-// Incorrect handling of uninhabited types could cause us to mark generator
+// Incorrect handling of uninhabited types could cause us to mark coroutine
 // types as entirely uninhabited, when they were in fact constructible. This
 // caused us to hit "unreachable" code (illegal instruction on x86).
 
diff --git a/tests/ui/async-await/issues/issue-60655-latebound-regions.rs b/tests/ui/async-await/issues/issue-60655-latebound-regions.rs
index 66a3b07c3bd..ee28a2733ad 100644
--- a/tests/ui/async-await/issues/issue-60655-latebound-regions.rs
+++ b/tests/ui/async-await/issues/issue-60655-latebound-regions.rs
@@ -19,7 +19,7 @@ async fn async_nop(_: &u8) {}
 
 pub type ServeFut = impl Future<Output=()>;
 
-// Late bound regions occur in the generator witness type here.
+// Late bound regions occur in the coroutine witness type here.
 fn serve() -> ServeFut {
     async move {
         let x = 5;
diff --git a/tests/ui/async-await/issues/issue-64477-2.rs b/tests/ui/async-await/issues/issue-64477-2.rs
index 2360b57cc45..53ec3b06566 100644
--- a/tests/ui/async-await/issues/issue-64477-2.rs
+++ b/tests/ui/async-await/issues/issue-64477-2.rs
@@ -2,7 +2,7 @@
 //
 // In the past, the code generated by `format!` produced temporaries in the surrounding scope that
 // borrowed the arguments through `&dyn Trait`. These temporaries do not implement `Send`, which
-// meant that when `format!` was used in an async block, the resulting generator was not `Send`.
+// meant that when `format!` was used in an async block, the resulting coroutine was not `Send`.
 // See https://github.com/rust-lang/rust/issues/64477#issuecomment-534669068 for details
 // and https://github.com/rust-lang/rust/issues/64477#issuecomment-531882958 for an example.
 //
diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
index 725caddae0b..9ed7a5d210e 100644
--- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
+++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-completion.rs
@@ -1,4 +1,4 @@
-// issue 65419 - Attempting to run an async fn after completion mentions generators when it should
+// issue 65419 - Attempting to run an async fn after completion mentions coroutines when it should
 // be talking about `async fn`s instead.
 
 // run-fail
@@ -8,7 +8,7 @@
 // ignore-wasm no panic or subprocess support
 // ignore-emscripten no panic or subprocess support
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 async fn foo() {
 }
diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
index 5909c3a5ecc..51e9a54e48a 100644
--- a/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
+++ b/tests/ui/async-await/issues/issue-65419/issue-65419-async-fn-resume-after-panic.rs
@@ -1,4 +1,4 @@
-// issue 65419 - Attempting to run an async fn after completion mentions generators when it should
+// issue 65419 - Attempting to run an async fn after completion mentions coroutines when it should
 // be talking about `async fn`s instead. Should also test what happens when it panics.
 
 // run-fail
@@ -8,7 +8,7 @@
 // edition:2018
 // ignore-wasm no panic or subprocess support
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::panic;
 
diff --git a/tests/ui/async-await/issues/issue-65419/issue-65419-generator-resume-after-completion.rs b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs
index 9fc5667d684..e16b86f9579 100644
--- a/tests/ui/async-await/issues/issue-65419/issue-65419-generator-resume-after-completion.rs
+++ b/tests/ui/async-await/issues/issue-65419/issue-65419-coroutine-resume-after-completion.rs
@@ -1,17 +1,17 @@
-// issue 65419 - Attempting to run an `async fn` after completion mentions generators when it should
-// be talking about `async fn`s instead. Regression test added to make sure generators still
+// issue 65419 - Attempting to run an `async fn` after completion mentions coroutines when it should
+// be talking about `async fn`s instead. Regression test added to make sure coroutines still
 // panic when resumed after completion.
 
 // run-fail
-// error-pattern:generator resumed after completion
+// error-pattern:coroutine resumed after completion
 // edition:2018
 // ignore-wasm no panic or subprocess support
 // ignore-emscripten no panic or subprocess support
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::{
-    ops::Generator,
+    ops::Coroutine,
     pin::Pin,
 };
 
diff --git a/tests/ui/async-await/issues/issue-67893.stderr b/tests/ui/async-await/issues/issue-67893.stderr
index 3d6d1fb5c09..2a712aee9c4 100644
--- a/tests/ui/async-await/issues/issue-67893.stderr
+++ b/tests/ui/async-await/issues/issue-67893.stderr
@@ -13,7 +13,7 @@ LL | pub async fn run() {
    |
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `MutexGuard<'_, ()>`
    = note: required because it captures the following types: `Arc<Mutex<()>>`, `MutexGuard<'_, ()>`, `impl Future<Output = ()>`
-note: required because it's used within this `async fn` body
+note: required because it's used within this `async` fn body
   --> $DIR/auxiliary/issue_67893.rs:9:20
    |
 LL |   pub async fn run() {
diff --git a/tests/ui/async-await/non-trivial-drop.rs b/tests/ui/async-await/non-trivial-drop.rs
index 3fed7c972a1..1004303d5c1 100644
--- a/tests/ui/async-await/non-trivial-drop.rs
+++ b/tests/ui/async-await/non-trivial-drop.rs
@@ -1,7 +1,7 @@
 // build-pass
 // edition:2018
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
     foo();
diff --git a/tests/ui/async-await/partial-drop-partial-reinit.rs b/tests/ui/async-await/partial-drop-partial-reinit.rs
index 75acb442e7a..815cc916b41 100644
--- a/tests/ui/async-await/partial-drop-partial-reinit.rs
+++ b/tests/ui/async-await/partial-drop-partial-reinit.rs
@@ -26,7 +26,7 @@ impl Drop for NotSend {
 impl !Send for NotSend {}
 
 async fn foo() {
-    //~^ NOTE used within this `async fn` body
+    //~^ NOTE used within this `async` fn body
     //~| NOTE within this `impl Future
     let mut x = (NotSend {},);
     drop(x.0);
diff --git a/tests/ui/async-await/partial-drop-partial-reinit.stderr b/tests/ui/async-await/partial-drop-partial-reinit.stderr
index d115c1b1cc4..310a2923955 100644
--- a/tests/ui/async-await/partial-drop-partial-reinit.stderr
+++ b/tests/ui/async-await/partial-drop-partial-reinit.stderr
@@ -12,7 +12,7 @@ LL | async fn foo() {
    = help: within `impl Future<Output = ()>`, the trait `Send` is not implemented for `NotSend`
    = note: required because it appears within the type `(NotSend,)`
    = note: required because it captures the following types: `(NotSend,)`, `impl Future<Output = ()>`
-note: required because it's used within this `async fn` body
+note: required because it's used within this `async` fn body
   --> $DIR/partial-drop-partial-reinit.rs:28:16
    |
 LL |   async fn foo() {
diff --git a/tests/ui/async-await/send-bound-async-closure.rs b/tests/ui/async-await/send-bound-async-closure.rs
index 4e9e7309be0..2ec006da359 100644
--- a/tests/ui/async-await/send-bound-async-closure.rs
+++ b/tests/ui/async-await/send-bound-async-closure.rs
@@ -2,7 +2,7 @@
 // check-pass
 
 // This test verifies that we do not create a query cycle when typechecking has several inference
-// variables that point to the same generator interior type.
+// variables that point to the same coroutine interior type.
 
 use std::future::Future;
 use std::pin::Pin;
diff --git a/tests/ui/async-await/task-context-arg.rs b/tests/ui/async-await/task-context-arg.rs
index 937723ca743..45b18d56b1c 100644
--- a/tests/ui/async-await/task-context-arg.rs
+++ b/tests/ui/async-await/task-context-arg.rs
@@ -10,7 +10,7 @@
 use std::future::Future;
 
 // The compiler produces a closure as part of this function. That closure initially takes an
-// argument _task_context. Later, when the MIR for that closure is transformed into a generator
+// argument _task_context. Later, when the MIR for that closure is transformed into a coroutine
 // state machine, _task_context is demoted to not be an argument, but just part of an unnamed
 // argument. If we emit debug info saying that both _task_context and the unnamed argument are both
 // argument number 2, then LLVM will fail with "conflicting debug info for argument". See
diff --git a/tests/ui/async-await/unnecessary-await.rs b/tests/ui/async-await/unnecessary-await.rs
index cd1e2871432..93b68f018e4 100644
--- a/tests/ui/async-await/unnecessary-await.rs
+++ b/tests/ui/async-await/unnecessary-await.rs
@@ -31,4 +31,9 @@ async fn with_macros() {
     f!(());
 }
 
+// Regression test for issue #117014.
+async fn desugaring_span_ctxt() {
+    for x in [] {}.await //~ ERROR `()` is not a future
+}
+
 fn main() {}
diff --git a/tests/ui/async-await/unnecessary-await.stderr b/tests/ui/async-await/unnecessary-await.stderr
index 9a2a035b2dd..620370a6113 100644
--- a/tests/ui/async-await/unnecessary-await.stderr
+++ b/tests/ui/async-await/unnecessary-await.stderr
@@ -49,6 +49,19 @@ LL |     f!(());
    = 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
+error[E0277]: `()` is not a future
+  --> $DIR/unnecessary-await.rs:36:20
+   |
+LL |     for x in [] {}.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: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/atomic-from-mut-not-available.stderr b/tests/ui/atomic-from-mut-not-available.stderr
index d1ebca8a29e..c15d19b1594 100644
--- a/tests/ui/atomic-from-mut-not-available.stderr
+++ b/tests/ui/atomic-from-mut-not-available.stderr
@@ -3,6 +3,10 @@ error[E0599]: no function or associated item named `from_mut` found for struct `
    |
 LL |     core::sync::atomic::AtomicU64::from_mut(&mut 0u64);
    |                                    ^^^^^^^^ function or associated item not found in `AtomicU64`
+   |
+note: if you're trying to build a new `AtomicU64`, consider using `AtomicU64::new` which returns `AtomicU64`
+  --> $SRC_DIR/core/src/sync/atomic.rs:LL:COL
+   = note: this error originates in the macro `atomic_int` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
 
diff --git a/tests/ui/attributes/const-stability-on-macro.rs b/tests/ui/attributes/const-stability-on-macro.rs
index 412af195d7a..af268ccd536 100644
--- a/tests/ui/attributes/const-stability-on-macro.rs
+++ b/tests/ui/attributes/const-stability-on-macro.rs
@@ -1,7 +1,7 @@
 #![feature(staged_api)]
 #![stable(feature = "rust1", since = "1.0.0")]
 
-#[rustc_const_stable(feature = "foo", since = "0")]
+#[rustc_const_stable(feature = "foo", since = "3.3.3")]
 //~^ ERROR macros cannot have const stability attributes
 macro_rules! foo {
     () => {};
diff --git a/tests/ui/attributes/const-stability-on-macro.stderr b/tests/ui/attributes/const-stability-on-macro.stderr
index c3da02c79cb..28f31e3d4f6 100644
--- a/tests/ui/attributes/const-stability-on-macro.stderr
+++ b/tests/ui/attributes/const-stability-on-macro.stderr
@@ -1,8 +1,8 @@
 error: macros cannot have const stability attributes
   --> $DIR/const-stability-on-macro.rs:4:1
    |
-LL | #[rustc_const_stable(feature = "foo", since = "0")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid const stability attribute
+LL | #[rustc_const_stable(feature = "foo", since = "3.3.3")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid const stability attribute
 LL |
 LL | macro_rules! foo {
    | ---------------- const stability attribute affects this macro
diff --git a/tests/ui/attributes/statement-attribute-validation.rs b/tests/ui/attributes/statement-attribute-validation.rs
new file mode 100644
index 00000000000..31407364acf
--- /dev/null
+++ b/tests/ui/attributes/statement-attribute-validation.rs
@@ -0,0 +1,39 @@
+// test for #117058 - check that attributes are validated on various kinds of statements.
+
+struct A;
+
+fn func() {}
+
+fn main() {
+    #[allow(two-words)]
+    //~^ ERROR expected one of `(`, `,`, `::`, or `=`, found `-`
+    if true {
+    } else {
+    }
+    #[allow(two-words)]
+    //~^ ERROR expected one of `(`, `,`, `::`, or `=`, found `-`
+    (1);
+    #[allow(two-words)]
+    //~^ ERROR expected one of `(`, `,`, `::`, or `=`, found `-`
+    match 1 {
+        _ => {}
+    }
+    #[allow(two-words)]
+    //~^ ERROR expected one of `(`, `,`, `::`, or `=`, found `-`
+    while false {}
+    #[allow(two-words)]
+    //~^ ERROR expected one of `(`, `,`, `::`, or `=`, found `-`
+    {}
+    #[allow(two-words)]
+    //~^ ERROR expected one of `(`, `,`, `::`, or `=`, found `-`
+    A {};
+    #[allow(two-words)]
+    //~^ ERROR expected one of `(`, `,`, `::`, or `=`, found `-`
+    func();
+    #[allow(two-words)]
+    //~^ ERROR expected one of `(`, `,`, `::`, or `=`, found `-`
+    A;
+    #[allow(two-words)]
+    //~^ ERROR expected one of `(`, `,`, `::`, or `=`, found `-`
+    loop {}
+}
diff --git a/tests/ui/attributes/statement-attribute-validation.stderr b/tests/ui/attributes/statement-attribute-validation.stderr
new file mode 100644
index 00000000000..06f447be562
--- /dev/null
+++ b/tests/ui/attributes/statement-attribute-validation.stderr
@@ -0,0 +1,56 @@
+error: expected one of `(`, `,`, `::`, or `=`, found `-`
+  --> $DIR/statement-attribute-validation.rs:8:16
+   |
+LL |     #[allow(two-words)]
+   |                ^ expected one of `(`, `,`, `::`, or `=`
+
+error: expected one of `(`, `,`, `::`, or `=`, found `-`
+  --> $DIR/statement-attribute-validation.rs:13:16
+   |
+LL |     #[allow(two-words)]
+   |                ^ expected one of `(`, `,`, `::`, or `=`
+
+error: expected one of `(`, `,`, `::`, or `=`, found `-`
+  --> $DIR/statement-attribute-validation.rs:16:16
+   |
+LL |     #[allow(two-words)]
+   |                ^ expected one of `(`, `,`, `::`, or `=`
+
+error: expected one of `(`, `,`, `::`, or `=`, found `-`
+  --> $DIR/statement-attribute-validation.rs:21:16
+   |
+LL |     #[allow(two-words)]
+   |                ^ expected one of `(`, `,`, `::`, or `=`
+
+error: expected one of `(`, `,`, `::`, or `=`, found `-`
+  --> $DIR/statement-attribute-validation.rs:24:16
+   |
+LL |     #[allow(two-words)]
+   |                ^ expected one of `(`, `,`, `::`, or `=`
+
+error: expected one of `(`, `,`, `::`, or `=`, found `-`
+  --> $DIR/statement-attribute-validation.rs:27:16
+   |
+LL |     #[allow(two-words)]
+   |                ^ expected one of `(`, `,`, `::`, or `=`
+
+error: expected one of `(`, `,`, `::`, or `=`, found `-`
+  --> $DIR/statement-attribute-validation.rs:30:16
+   |
+LL |     #[allow(two-words)]
+   |                ^ expected one of `(`, `,`, `::`, or `=`
+
+error: expected one of `(`, `,`, `::`, or `=`, found `-`
+  --> $DIR/statement-attribute-validation.rs:33:16
+   |
+LL |     #[allow(two-words)]
+   |                ^ expected one of `(`, `,`, `::`, or `=`
+
+error: expected one of `(`, `,`, `::`, or `=`, found `-`
+  --> $DIR/statement-attribute-validation.rs:36:16
+   |
+LL |     #[allow(two-words)]
+   |                ^ expected one of `(`, `,`, `::`, or `=`
+
+error: aborting due to 9 previous errors
+
diff --git a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr
index a1fb4d6787c..225b8e8f32f 100644
--- a/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr
+++ b/tests/ui/attributes/unix_sigpipe/unix_sigpipe-crate.stderr
@@ -3,11 +3,15 @@ error: `unix_sigpipe` attribute cannot be used at crate level
    |
 LL | #![unix_sigpipe = "inherit"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |
+LL | fn main() {}
+   |    ---- the inner attribute doesn't annotate this function
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[unix_sigpipe = "inherit"]
-   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL - #![unix_sigpipe = "inherit"]
+LL + #[unix_sigpipe = "inherit"]
+   |
 
 error: aborting due to previous error
 
diff --git a/tests/ui/binding/issue-53114-borrow-checks.rs b/tests/ui/binding/issue-53114-borrow-checks.rs
index 7646472f45f..6ab1f4f47df 100644
--- a/tests/ui/binding/issue-53114-borrow-checks.rs
+++ b/tests/ui/binding/issue-53114-borrow-checks.rs
@@ -1,8 +1,9 @@
+// check-pass
 // Issue #53114: NLL's borrow check had some deviations from the old borrow
 // checker, and both had some deviations from our ideal state. This test
 // captures the behavior of how `_` bindings are handled with respect to how we
 // flag expressions that are meant to request unsafe blocks.
-#![allow(irrefutable_let_patterns)]
+#![allow(irrefutable_let_patterns, dropping_references)]
 struct M;
 
 fn let_wild_gets_moved_expr() {
@@ -19,29 +20,23 @@ fn let_wild_gets_moved_expr() {
 fn match_moved_expr_to_wild() {
     let m = M;
     drop(m);
-    match m { _ => { } } // #53114: should eventually be accepted too
-    //~^ ERROR [E0382]
+    match m { _ => { } } // #53114: accepted too
 
     let mm = (M, M); // variation on above with `_` in substructure
     match mm { (_x, _) => { } }
     match mm { (_, _y) => { } }
-    //~^ ERROR [E0382]
     match mm { (_, _) => { } }
-    //~^ ERROR [E0382]
 }
 
 fn if_let_moved_expr_to_wild() {
     let m = M;
     drop(m);
-    if let _ = m { } // #53114: should eventually be accepted too
-    //~^ ERROR [E0382]
+    if let _ = m { } // #53114: accepted too
 
     let mm = (M, M); // variation on above with `_` in substructure
     if let (_x, _) = mm { }
     if let (_, _y) = mm { }
-    //~^ ERROR [E0382]
     if let (_, _) = mm { }
-    //~^ ERROR [E0382]
 }
 
 fn let_wild_gets_borrowed_expr() {
diff --git a/tests/ui/binding/issue-53114-borrow-checks.stderr b/tests/ui/binding/issue-53114-borrow-checks.stderr
deleted file mode 100644
index 0ec2ae8839e..00000000000
--- a/tests/ui/binding/issue-53114-borrow-checks.stderr
+++ /dev/null
@@ -1,81 +0,0 @@
-error[E0382]: use of moved value: `m`
-  --> $DIR/issue-53114-borrow-checks.rs:22:11
-   |
-LL |     let m = M;
-   |         - move occurs because `m` has type `M`, which does not implement the `Copy` trait
-LL |     drop(m);
-   |          - value moved here
-LL |     match m { _ => { } } // #53114: should eventually be accepted too
-   |           ^ value used here after move
-
-error[E0382]: use of partially moved value: `mm`
-  --> $DIR/issue-53114-borrow-checks.rs:27:11
-   |
-LL |     match mm { (_x, _) => { } }
-   |                 -- value partially moved here
-LL |     match mm { (_, _y) => { } }
-   |           ^^ value used here after partial move
-   |
-   = note: partial move occurs because `mm.0` has type `M`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |     match mm { (ref _x, _) => { } }
-   |                 +++
-
-error[E0382]: use of partially moved value: `mm`
-  --> $DIR/issue-53114-borrow-checks.rs:29:11
-   |
-LL |     match mm { (_, _y) => { } }
-   |                    -- value partially moved here
-LL |
-LL |     match mm { (_, _) => { } }
-   |           ^^ value used here after partial move
-   |
-   = note: partial move occurs because `mm.1` has type `M`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |     match mm { (_, ref _y) => { } }
-   |                    +++
-
-error[E0382]: use of moved value: `m`
-  --> $DIR/issue-53114-borrow-checks.rs:36:16
-   |
-LL |     let m = M;
-   |         - move occurs because `m` has type `M`, which does not implement the `Copy` trait
-LL |     drop(m);
-   |          - value moved here
-LL |     if let _ = m { } // #53114: should eventually be accepted too
-   |                ^ value used here after move
-
-error[E0382]: use of partially moved value: `mm`
-  --> $DIR/issue-53114-borrow-checks.rs:41:22
-   |
-LL |     if let (_x, _) = mm { }
-   |             -- value partially moved here
-LL |     if let (_, _y) = mm { }
-   |                      ^^ value used here after partial move
-   |
-   = note: partial move occurs because `mm.0` has type `M`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |     if let (ref _x, _) = mm { }
-   |             +++
-
-error[E0382]: use of partially moved value: `mm`
-  --> $DIR/issue-53114-borrow-checks.rs:43:21
-   |
-LL |     if let (_, _y) = mm { }
-   |                -- value partially moved here
-LL |
-LL |     if let (_, _) = mm { }
-   |                     ^^ value used here after partial move
-   |
-   = note: partial move occurs because `mm.1` has type `M`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |     if let (_, ref _y) = mm { }
-   |                +++
-
-error: aborting due to 6 previous errors
-
-For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/binop/false-binop-caused-by-missing-semi.fixed b/tests/ui/binop/false-binop-caused-by-missing-semi.fixed
new file mode 100644
index 00000000000..b47372c9064
--- /dev/null
+++ b/tests/ui/binop/false-binop-caused-by-missing-semi.fixed
@@ -0,0 +1,10 @@
+// run-rustfix
+fn foo() {}
+fn main() {
+    let mut y = 42;
+    let x = &mut y;
+    foo();
+    *x = 0;  //~ ERROR invalid left-hand side of assignment
+    let _ = x;
+    println!("{y}");
+}
diff --git a/tests/ui/binop/false-binop-caused-by-missing-semi.rs b/tests/ui/binop/false-binop-caused-by-missing-semi.rs
new file mode 100644
index 00000000000..14671de7e51
--- /dev/null
+++ b/tests/ui/binop/false-binop-caused-by-missing-semi.rs
@@ -0,0 +1,10 @@
+// run-rustfix
+fn foo() {}
+fn main() {
+    let mut y = 42;
+    let x = &mut y;
+    foo()
+    *x = 0;  //~ ERROR invalid left-hand side of assignment
+    let _ = x;
+    println!("{y}");
+}
diff --git a/tests/ui/binop/false-binop-caused-by-missing-semi.stderr b/tests/ui/binop/false-binop-caused-by-missing-semi.stderr
new file mode 100644
index 00000000000..fca042b1c57
--- /dev/null
+++ b/tests/ui/binop/false-binop-caused-by-missing-semi.stderr
@@ -0,0 +1,17 @@
+error[E0070]: invalid left-hand side of assignment
+  --> $DIR/false-binop-caused-by-missing-semi.rs:7:8
+   |
+LL | /     foo()
+LL | |     *x = 0;
+   | |      - ^
+   | |______|
+   |        cannot assign to this expression
+   |
+help: you might have meant to write a semicolon here
+   |
+LL |     foo();
+   |          +
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0070`.
diff --git a/tests/ui/borrowck/alias-liveness/escaping-bounds-2.rs b/tests/ui/borrowck/alias-liveness/escaping-bounds-2.rs
new file mode 100644
index 00000000000..05884f6741c
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/escaping-bounds-2.rs
@@ -0,0 +1,14 @@
+trait Trait {
+    type Gat<'a: 'b, 'b: 'c, 'c>: 'c;
+}
+
+fn get_func<'a, T: Trait>(_: &'a str) -> fn(T::Gat<'a, '_, 'static>) {
+    loop {}
+}
+
+fn test<T: Trait>() {
+    let func = get_func::<T>(&String::new()); //~ ERROR temporary value dropped
+    drop(func);
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/alias-liveness/escaping-bounds-2.stderr b/tests/ui/borrowck/alias-liveness/escaping-bounds-2.stderr
new file mode 100644
index 00000000000..7fd0cb9bb02
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/escaping-bounds-2.stderr
@@ -0,0 +1,19 @@
+error[E0716]: temporary value dropped while borrowed
+  --> $DIR/escaping-bounds-2.rs:10:31
+   |
+LL |     let func = get_func::<T>(&String::new());
+   |                               ^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
+   |                               |
+   |                               creates a temporary value which is freed while still in use
+LL |     drop(func);
+   |          ---- borrow later used here
+   |
+help: consider using a `let` binding to create a longer lived value
+   |
+LL ~     let binding = String::new();
+LL ~     let func = get_func::<T>(&binding);
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/borrowck/alias-liveness/escaping-bounds.rs b/tests/ui/borrowck/alias-liveness/escaping-bounds.rs
new file mode 100644
index 00000000000..3ccdc78e60a
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/escaping-bounds.rs
@@ -0,0 +1,22 @@
+// check-pass
+
+// Ensure that we don't ICE when an alias that has escaping bound vars is
+// required to be live. This is because the code that allows us to deduce an
+// appropriate outlives bound for a given alias type (in this test, a
+// projection) does not handle aliases with escaping bound vars.
+// See <https://github.com/rust-lang/rust/issues/117455>.
+
+trait Foo {
+    type Assoc<'a, 'b>: 'static;
+}
+
+struct MentionsLifetimeAndType<'a, T>(&'a (), T);
+
+fn foo<'a, 'b, T: Foo>(_: <T as Foo>::Assoc<'a, 'b>) {}
+
+fn test<'b, T: Foo>() {
+    let y: MentionsLifetimeAndType<'_, for<'a> fn(<T as Foo>::Assoc<'a, 'b>)> =
+        MentionsLifetimeAndType(&(), foo);
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/alias-liveness/gat-static.rs b/tests/ui/borrowck/alias-liveness/gat-static.rs
new file mode 100644
index 00000000000..92153124af9
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/gat-static.rs
@@ -0,0 +1,29 @@
+// check-pass
+
+trait Foo {
+    type Assoc<'a>
+    where
+        Self: 'a;
+
+    fn assoc(&mut self) -> Self::Assoc<'_>;
+}
+
+fn overlapping_mut<T>(mut t: T)
+where
+    T: Foo,
+    for<'a> T::Assoc<'a>: 'static,
+{
+    let a = t.assoc();
+    let b = t.assoc();
+}
+
+fn live_past_borrow<T>(mut t: T)
+where
+    T: Foo,
+    for<'a> T::Assoc<'a>: 'static {
+    let x = t.assoc();
+    drop(t);
+    drop(x);
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs
new file mode 100644
index 00000000000..1f26c7babf2
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.rs
@@ -0,0 +1,16 @@
+// known-bug: #42940
+
+trait Captures<'a> {}
+impl<T> Captures<'_> for T {}
+
+trait Outlives<'a>: 'a {}
+impl<'a, T: 'a> Outlives<'a> for T {}
+
+// Test that we treat `for<'a> Opaque: 'a` as `Opaque: 'static`
+fn test<'o>(v: &'o Vec<i32>) -> impl Captures<'o> + for<'a> Outlives<'a> {}
+
+fn statik() -> impl Sized {
+    test(&vec![])
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr
new file mode 100644
index 00000000000..58a42d8afe4
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/higher-ranked-outlives-for-capture.stderr
@@ -0,0 +1,16 @@
+error[E0716]: temporary value dropped while borrowed
+  --> $DIR/higher-ranked-outlives-for-capture.rs:13:11
+   |
+LL |     test(&vec![])
+   |     ------^^^^^^-
+   |     |     |
+   |     |     creates a temporary value which is freed while still in use
+   |     argument requires that borrow lasts for `'static`
+LL | }
+   | - temporary value is freed at the end of this statement
+   |
+   = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/borrowck/alias-liveness/higher-ranked.rs b/tests/ui/borrowck/alias-liveness/higher-ranked.rs
new file mode 100644
index 00000000000..afd0d3b31e3
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/higher-ranked.rs
@@ -0,0 +1,16 @@
+// check-pass
+
+trait Captures<'a> {}
+impl<T> Captures<'_> for T {}
+
+trait Outlives<'a>: 'a {}
+impl<'a, T: 'a> Outlives<'a> for T {}
+
+// Test that we treat `for<'a> Opaque: 'a` as `Opaque: 'static`
+fn test<'o>(v: &'o Vec<i32>) -> impl Captures<'o> + for<'a> Outlives<'a> {}
+
+fn opaque_doesnt_use_temporary() {
+    let a = test(&vec![]);
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/alias-liveness/opaque-capture.rs b/tests/ui/borrowck/alias-liveness/opaque-capture.rs
new file mode 100644
index 00000000000..f4ca2728bdb
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/opaque-capture.rs
@@ -0,0 +1,17 @@
+// check-pass
+
+// Check that opaques capturing early and late-bound vars correctly mark
+// regions required to be live using the item bounds.
+
+trait Captures<'a> {}
+impl<T> Captures<'_> for T {}
+
+fn captures_temp_late<'a>(x: &'a Vec<i32>) -> impl Sized + Captures<'a> + 'static {}
+fn captures_temp_early<'a: 'a>(x: &'a Vec<i32>) -> impl Sized + Captures<'a> + 'static {}
+
+fn test() {
+    let x = captures_temp_early(&vec![]);
+    let y = captures_temp_late(&vec![]);
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/alias-liveness/opaque-type-param.rs b/tests/ui/borrowck/alias-liveness/opaque-type-param.rs
new file mode 100644
index 00000000000..a292463b2ac
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/opaque-type-param.rs
@@ -0,0 +1,14 @@
+// known-bug: #42940
+
+trait Trait {}
+impl Trait for () {}
+
+fn foo<'a>(s: &'a str) -> impl Trait + 'static {
+    bar(s)
+}
+
+fn bar<P: AsRef<str>>(s: P) -> impl Trait + 'static {
+    ()
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/alias-liveness/opaque-type-param.stderr b/tests/ui/borrowck/alias-liveness/opaque-type-param.stderr
new file mode 100644
index 00000000000..e1fbbc14f44
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/opaque-type-param.stderr
@@ -0,0 +1,13 @@
+error[E0700]: hidden type for `impl Trait + 'static` captures lifetime that does not appear in bounds
+  --> $DIR/opaque-type-param.rs:7:5
+   |
+LL | fn foo<'a>(s: &'a str) -> impl Trait + 'static {
+   |        --                 -------------------- opaque type defined here
+   |        |
+   |        hidden type `impl Trait + 'static` captures the lifetime `'a` as defined here
+LL |     bar(s)
+   |     ^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0700`.
diff --git a/tests/ui/borrowck/alias-liveness/rpit-static.rs b/tests/ui/borrowck/alias-liveness/rpit-static.rs
new file mode 100644
index 00000000000..45da3edb878
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/rpit-static.rs
@@ -0,0 +1,22 @@
+// check-pass
+
+trait Captures<'a> {}
+impl<T> Captures<'_> for T {}
+
+fn foo(x: &mut i32) -> impl Sized + Captures<'_> + 'static {}
+
+fn overlapping_mut() {
+    let i = &mut 1;
+    let x = foo(i);
+    let y = foo(i);
+}
+
+fn live_past_borrow() {
+    let y;
+    {
+        let x = &mut 1;
+        y = foo(x);
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/alias-liveness/rpitit-static.rs b/tests/ui/borrowck/alias-liveness/rpitit-static.rs
new file mode 100644
index 00000000000..2cc68d2bf3d
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/rpitit-static.rs
@@ -0,0 +1,18 @@
+// check-pass
+
+trait Foo {
+    fn rpitit(&mut self) -> impl Sized + 'static;
+}
+
+fn live_past_borrow<T: Foo>(mut t: T) {
+    let x = t.rpitit();
+    drop(t);
+    drop(x);
+}
+
+fn overlapping_mut<T: Foo>(mut t: T) {
+    let a = t.rpitit();
+    let b = t.rpitit();
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/alias-liveness/rtn-static.rs b/tests/ui/borrowck/alias-liveness/rtn-static.rs
new file mode 100644
index 00000000000..1f136b8b998
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/rtn-static.rs
@@ -0,0 +1,23 @@
+// check-pass
+
+#![feature(return_type_notation)]
+//~^ WARN the feature `return_type_notation` is incomplete
+
+trait Foo {
+    fn borrow(&mut self) -> impl Sized + '_;
+}
+
+fn live_past_borrow<T: Foo<borrow(): 'static>>(mut t: T) {
+    let x = t.borrow();
+    drop(t);
+    drop(x);
+}
+
+// Test that the `'_` item bound in `borrow` does not cause us to
+// overlook the `'static` RTN bound.
+fn overlapping_mut<T: Foo<borrow(): 'static>>(mut t: T) {
+    let x = t.borrow();
+    let x = t.borrow();
+}
+
+fn main() {}
diff --git a/tests/ui/borrowck/alias-liveness/rtn-static.stderr b/tests/ui/borrowck/alias-liveness/rtn-static.stderr
new file mode 100644
index 00000000000..e9202db2c79
--- /dev/null
+++ b/tests/ui/borrowck/alias-liveness/rtn-static.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/rtn-static.rs:3:12
+   |
+LL | #![feature(return_type_notation)]
+   |            ^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #109417 <https://github.com/rust-lang/rust/issues/109417> for more information
+   = note: `#[warn(incomplete_features)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-match.rs b/tests/ui/borrowck/borrowck-move-out-from-array-match.rs
index ced4d002b38..d2a5da66de9 100644
--- a/tests/ui/borrowck/borrowck-move-out-from-array-match.rs
+++ b/tests/ui/borrowck/borrowck-move-out-from-array-match.rs
@@ -42,8 +42,8 @@ fn move_out_by_const_index_and_subslice() {
         [_x, _, _] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_y @ .., _, _] => {}
+        //~^ ERROR use of partially moved value
     }
 }
 
@@ -53,8 +53,8 @@ fn move_out_by_const_index_end_and_subslice() {
         [.., _x] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_, _, _y @ ..] => {}
+        //~^ ERROR use of partially moved value
     }
 }
 
@@ -64,8 +64,8 @@ fn move_out_by_const_index_field_and_subslice() {
         [(_x, _), _, _] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_y @ .., _, _] => {}
+        //~^ ERROR use of partially moved value
     }
 }
 
@@ -75,8 +75,8 @@ fn move_out_by_const_index_end_field_and_subslice() {
         [.., (_x, _)] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_, _, _y @ ..] => {}
+        //~^ ERROR use of partially moved value
     }
 }
 
@@ -108,8 +108,8 @@ fn move_out_by_subslice_and_subslice() {
         [x @ .., _] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_, _y @ ..] => {}
+        //~^ ERROR use of partially moved value
     }
 }
 
diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-match.stderr b/tests/ui/borrowck/borrowck-move-out-from-array-match.stderr
index 67b00c1dd90..d827776845e 100644
--- a/tests/ui/borrowck/borrowck-move-out-from-array-match.stderr
+++ b/tests/ui/borrowck/borrowck-move-out-from-array-match.stderr
@@ -44,13 +44,13 @@ LL |         [_, _, (ref _x, _)] => {}
    |                 +++
 
 error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-match.rs:44:11
+  --> $DIR/borrowck-move-out-from-array-match.rs:45:10
    |
 LL |         [_x, _, _] => {}
    |          -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
+...
+LL |         [_y @ .., _, _] => {}
+   |          ^^ value used here after partial move
    |
    = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
 help: borrow this binding in the pattern to avoid moving the value
@@ -59,13 +59,13 @@ LL |         [ref _x, _, _] => {}
    |          +++
 
 error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-match.rs:55:11
+  --> $DIR/borrowck-move-out-from-array-match.rs:56:16
    |
 LL |         [.., _x] => {}
    |              -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
+...
+LL |         [_, _, _y @ ..] => {}
+   |                ^^ value used here after partial move
    |
    = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
 help: borrow this binding in the pattern to avoid moving the value
@@ -74,13 +74,13 @@ LL |         [.., ref _x] => {}
    |              +++
 
 error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-match.rs:66:11
+  --> $DIR/borrowck-move-out-from-array-match.rs:67:10
    |
 LL |         [(_x, _), _, _] => {}
    |           -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
+...
+LL |         [_y @ .., _, _] => {}
+   |          ^^ value used here after partial move
    |
    = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
 help: borrow this binding in the pattern to avoid moving the value
@@ -89,13 +89,13 @@ LL |         [(ref _x, _), _, _] => {}
    |           +++
 
 error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-match.rs:77:11
+  --> $DIR/borrowck-move-out-from-array-match.rs:78:16
    |
 LL |         [.., (_x, _)] => {}
    |               -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
+...
+LL |         [_, _, _y @ ..] => {}
+   |                ^^ value used here after partial move
    |
    = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
 help: borrow this binding in the pattern to avoid moving the value
@@ -134,13 +134,13 @@ LL |         [_, _, ref _y @ ..] => {}
    |                +++
 
 error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-match.rs:110:11
+  --> $DIR/borrowck-move-out-from-array-match.rs:111:13
    |
 LL |         [x @ .., _] => {}
    |          - value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
+...
+LL |         [_, _y @ ..] => {}
+   |             ^^ value used here after partial move
    |
    = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
 help: borrow this binding in the pattern to avoid moving the value
diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs
index 97db70f34cc..1e401b7e92e 100644
--- a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs
+++ b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.rs
@@ -1,3 +1,4 @@
+// check-pass
 // Due to #53114, which causes a "read" of the `_` patterns,
 // the borrow-checker refuses this code, while it should probably be allowed.
 // Once the bug is fixed, the test, which is derived from a
@@ -15,7 +16,6 @@ fn move_out_from_begin_and_one_from_end() {
         [_, _, _x] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [.., _y, _] => {}
     }
 }
@@ -26,7 +26,6 @@ fn move_out_from_begin_field_and_end_field() {
         [_, _, (_x, _)] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [.., (_, _y)] => {}
     }
 }
@@ -39,7 +38,6 @@ fn move_out_by_const_index_and_subslice() {
         [_x, _, _] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_, _y @ ..] => {}
     }
 }
@@ -50,7 +48,6 @@ fn move_out_by_const_index_end_and_subslice() {
         [.., _x] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_y @ .., _] => {}
     }
 }
@@ -61,7 +58,6 @@ fn move_out_by_const_index_field_and_subslice() {
         [(_x, _), _, _] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_, _y @ ..] => {}
     }
 }
@@ -72,7 +68,6 @@ fn move_out_by_const_index_end_field_and_subslice() {
         [.., (_x, _)] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_y @ .., _] => {}
     }
 }
@@ -83,7 +78,6 @@ fn move_out_by_const_subslice_and_index_field() {
         [_, _y @ ..] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [(_x, _), _, _] => {}
     }
 }
@@ -94,7 +88,6 @@ fn move_out_by_const_subslice_and_end_index_field() {
         [_y @ .., _] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [.., (_x, _)] => {}
     }
 }
@@ -107,7 +100,6 @@ fn move_out_by_subslice_and_subslice() {
         [x @ .., _, _] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_, _y @ ..] => {}
     }
 }
diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr b/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr
deleted file mode 100644
index 47429ea3eeb..00000000000
--- a/tests/ui/borrowck/borrowck-move-out-from-array-no-overlap-match.stderr
+++ /dev/null
@@ -1,138 +0,0 @@
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:17:11
-   |
-LL |         [_, _, _x] => {}
-   |                -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [_, _, ref _x] => {}
-   |                +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:28:11
-   |
-LL |         [_, _, (_x, _)] => {}
-   |                 -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [_, _, (ref _x, _)] => {}
-   |                 +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:41:11
-   |
-LL |         [_x, _, _] => {}
-   |          -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [ref _x, _, _] => {}
-   |          +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:52:11
-   |
-LL |         [.., _x] => {}
-   |              -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [.., ref _x] => {}
-   |              +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:63:11
-   |
-LL |         [(_x, _), _, _] => {}
-   |           -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [(ref _x, _), _, _] => {}
-   |           +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:74:11
-   |
-LL |         [.., (_x, _)] => {}
-   |               -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [.., (ref _x, _)] => {}
-   |               +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:85:11
-   |
-LL |         [_, _y @ ..] => {}
-   |             -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [_, ref _y @ ..] => {}
-   |             +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:96:11
-   |
-LL |         [_y @ .., _] => {}
-   |          -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [ref _y @ .., _] => {}
-   |          +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-no-overlap-match.rs:109:11
-   |
-LL |         [x @ .., _, _] => {}
-   |          - value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [ref x @ .., _, _] => {}
-   |          +++
-
-error: aborting due to 9 previous errors
-
-For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-use-match.rs b/tests/ui/borrowck/borrowck-move-out-from-array-use-match.rs
index 604a25cdcc1..fbcf126f3ea 100644
--- a/tests/ui/borrowck/borrowck-move-out-from-array-use-match.rs
+++ b/tests/ui/borrowck/borrowck-move-out-from-array-use-match.rs
@@ -42,8 +42,8 @@ fn move_out_by_const_index_and_subslice() {
         [_x, _, _] => {}
     }
     match a {
-        //~^ ERROR [E0382]
         [ref _y @ .., _, _] => {}
+        //~^ ERROR [E0382]
     }
 }
 
@@ -53,8 +53,8 @@ fn move_out_by_const_index_end_and_subslice() {
         [.., _x] => {}
     }
     match a {
-        //~^ ERROR [E0382]
         [_, _, ref _y @ ..] => {}
+        //~^ ERROR [E0382]
     }
 }
 
@@ -64,8 +64,8 @@ fn move_out_by_const_index_field_and_subslice() {
         [(_x, _), _, _] => {}
     }
     match a {
-        //~^ ERROR [E0382]
         [ref _y @ .., _, _] => {}
+        //~^ ERROR [E0382]
     }
 }
 
@@ -75,8 +75,8 @@ fn move_out_by_const_index_end_field_and_subslice() {
         [.., (_x, _)] => {}
     }
     match a {
-        //~^ ERROR [E0382]
         [_, _, ref _y @ ..] => {}
+        //~^ ERROR [E0382]
     }
 }
 
@@ -108,8 +108,8 @@ fn move_out_by_subslice_and_subslice() {
         [x @ .., _] => {}
     }
     match a {
-        //~^ ERROR [E0382]
         [_, ref _y @ ..] => {}
+        //~^ ERROR [E0382]
     }
 }
 
diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-use-match.stderr b/tests/ui/borrowck/borrowck-move-out-from-array-use-match.stderr
index bfab13d42d2..da76b5c4a65 100644
--- a/tests/ui/borrowck/borrowck-move-out-from-array-use-match.stderr
+++ b/tests/ui/borrowck/borrowck-move-out-from-array-use-match.stderr
@@ -43,14 +43,14 @@ help: borrow this binding in the pattern to avoid moving the value
 LL |         [_, _, (ref _x, _)] => {}
    |                 +++
 
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-match.rs:44:11
+error[E0382]: borrow of partially moved value: `a`
+  --> $DIR/borrowck-move-out-from-array-use-match.rs:45:10
    |
 LL |         [_x, _, _] => {}
    |          -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
+...
+LL |         [ref _y @ .., _, _] => {}
+   |          ^^^^^^ value borrowed here after partial move
    |
    = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
 help: borrow this binding in the pattern to avoid moving the value
@@ -58,14 +58,14 @@ help: borrow this binding in the pattern to avoid moving the value
 LL |         [ref _x, _, _] => {}
    |          +++
 
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-match.rs:55:11
+error[E0382]: borrow of partially moved value: `a`
+  --> $DIR/borrowck-move-out-from-array-use-match.rs:56:16
    |
 LL |         [.., _x] => {}
    |              -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
+...
+LL |         [_, _, ref _y @ ..] => {}
+   |                ^^^^^^ value borrowed here after partial move
    |
    = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
 help: borrow this binding in the pattern to avoid moving the value
@@ -73,14 +73,14 @@ help: borrow this binding in the pattern to avoid moving the value
 LL |         [.., ref _x] => {}
    |              +++
 
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-match.rs:66:11
+error[E0382]: borrow of partially moved value: `a`
+  --> $DIR/borrowck-move-out-from-array-use-match.rs:67:10
    |
 LL |         [(_x, _), _, _] => {}
    |           -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
+...
+LL |         [ref _y @ .., _, _] => {}
+   |          ^^^^^^ value borrowed here after partial move
    |
    = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
 help: borrow this binding in the pattern to avoid moving the value
@@ -88,14 +88,14 @@ help: borrow this binding in the pattern to avoid moving the value
 LL |         [(ref _x, _), _, _] => {}
    |           +++
 
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-match.rs:77:11
+error[E0382]: borrow of partially moved value: `a`
+  --> $DIR/borrowck-move-out-from-array-use-match.rs:78:16
    |
 LL |         [.., (_x, _)] => {}
    |               -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
+...
+LL |         [_, _, ref _y @ ..] => {}
+   |                ^^^^^^ value borrowed here after partial move
    |
    = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
 help: borrow this binding in the pattern to avoid moving the value
@@ -133,14 +133,14 @@ help: borrow this binding in the pattern to avoid moving the value
 LL |         [_, _, ref _y @ ..] => {}
    |                +++
 
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-match.rs:110:11
+error[E0382]: borrow of partially moved value: `a`
+  --> $DIR/borrowck-move-out-from-array-use-match.rs:111:13
    |
 LL |         [x @ .., _] => {}
    |          - value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
+...
+LL |         [_, ref _y @ ..] => {}
+   |             ^^^^^^ value borrowed here after partial move
    |
    = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
 help: borrow this binding in the pattern to avoid moving the value
diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs
index 017ca90b81a..2f6ce430b35 100644
--- a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs
+++ b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.rs
@@ -1,3 +1,4 @@
+// check-pass
 // Due to #53114, which causes a "read" of the `_` patterns,
 // the borrow-checker refuses this code, while it should probably be allowed.
 // Once the bug is fixed, the test, which is derived from a
@@ -15,7 +16,6 @@ fn move_out_from_begin_and_one_from_end() {
         [_, _, _x] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [.., ref _y, _] => {}
     }
 }
@@ -26,7 +26,6 @@ fn move_out_from_begin_field_and_end_field() {
         [_, _, (_x, _)] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [.., (_, ref _y)] => {}
     }
 }
@@ -39,7 +38,6 @@ fn move_out_by_const_index_and_subslice() {
         [_x, _, _] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_, ref _y @ ..] => {}
     }
 }
@@ -50,7 +48,6 @@ fn move_out_by_const_index_end_and_subslice() {
         [.., _x] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [ref _y @ .., _] => {}
     }
 }
@@ -61,7 +58,6 @@ fn move_out_by_const_index_field_and_subslice() {
         [(_x, _), _, _] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_, ref _y @ ..] => {}
     }
 }
@@ -72,7 +68,6 @@ fn move_out_by_const_index_end_field_and_subslice() {
         [.., (_x, _)] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [ref _y @ .., _] => {}
     }
 }
@@ -83,7 +78,6 @@ fn move_out_by_const_subslice_and_index_field() {
         [_, _y @ ..] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [(ref _x, _), _, _] => {}
     }
 }
@@ -94,7 +88,6 @@ fn move_out_by_const_subslice_and_end_index_field() {
         [_y @ .., _] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [.., (ref _x, _)] => {}
     }
 }
@@ -107,7 +100,6 @@ fn move_out_by_subslice_and_subslice() {
         [x @ .., _, _] => {}
     }
     match a {
-        //~^ ERROR use of partially moved value
         [_, ref _y @ ..] => {}
     }
 }
diff --git a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.stderr b/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.stderr
deleted file mode 100644
index 8412c24fe61..00000000000
--- a/tests/ui/borrowck/borrowck-move-out-from-array-use-no-overlap-match.stderr
+++ /dev/null
@@ -1,138 +0,0 @@
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:17:11
-   |
-LL |         [_, _, _x] => {}
-   |                -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [_, _, ref _x] => {}
-   |                +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:28:11
-   |
-LL |         [_, _, (_x, _)] => {}
-   |                 -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [_, _, (ref _x, _)] => {}
-   |                 +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:41:11
-   |
-LL |         [_x, _, _] => {}
-   |          -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [ref _x, _, _] => {}
-   |          +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:52:11
-   |
-LL |         [.., _x] => {}
-   |              -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [.., ref _x] => {}
-   |              +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:63:11
-   |
-LL |         [(_x, _), _, _] => {}
-   |           -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [(ref _x, _), _, _] => {}
-   |           +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:74:11
-   |
-LL |         [.., (_x, _)] => {}
-   |               -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..].0` has type `String`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [.., (ref _x, _)] => {}
-   |               +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:85:11
-   |
-LL |         [_, _y @ ..] => {}
-   |             -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [_, ref _y @ ..] => {}
-   |             +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:96:11
-   |
-LL |         [_y @ .., _] => {}
-   |          -- value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [ref _y @ .., _] => {}
-   |          +++
-
-error[E0382]: use of partially moved value: `a`
-  --> $DIR/borrowck-move-out-from-array-use-no-overlap-match.rs:109:11
-   |
-LL |         [x @ .., _, _] => {}
-   |          - value partially moved here
-LL |     }
-LL |     match a {
-   |           ^ value used here after partial move
-   |
-   = note: partial move occurs because `a[..]` has type `(String, String)`, which does not implement the `Copy` trait
-help: borrow this binding in the pattern to avoid moving the value
-   |
-LL |         [ref x @ .., _, _] => {}
-   |          +++
-
-error: aborting due to 9 previous errors
-
-For more information about this error, try `rustc --explain E0382`.
diff --git a/tests/ui/borrowck/issue-62107-match-arm-scopes.rs b/tests/ui/borrowck/issue-62107-match-arm-scopes.rs
index 93ce34d2fe5..7dbcad9d37f 100644
--- a/tests/ui/borrowck/issue-62107-match-arm-scopes.rs
+++ b/tests/ui/borrowck/issue-62107-match-arm-scopes.rs
@@ -1,8 +1,8 @@
 fn main() {
     let e: i32;
     match e {
-        //~^ ERROR E0381
         ref u if true => {}
+        //~^ ERROR E0381
         ref v if true => {
             let tx = 0;
             &tx;
diff --git a/tests/ui/borrowck/issue-62107-match-arm-scopes.stderr b/tests/ui/borrowck/issue-62107-match-arm-scopes.stderr
index 9683da919aa..8fe8fa71064 100644
--- a/tests/ui/borrowck/issue-62107-match-arm-scopes.stderr
+++ b/tests/ui/borrowck/issue-62107-match-arm-scopes.stderr
@@ -1,10 +1,11 @@
 error[E0381]: used binding `e` isn't initialized
-  --> $DIR/issue-62107-match-arm-scopes.rs:3:11
+  --> $DIR/issue-62107-match-arm-scopes.rs:4:9
    |
 LL |     let e: i32;
    |         - binding declared here but left uninitialized
 LL |     match e {
-   |           ^ `e` used here but it isn't initialized
+LL |         ref u if true => {}
+   |         ^^^^^ `e` used here but it isn't initialized
    |
 help: consider assigning a value
    |
diff --git a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs
index d067ff44704..b52939ffc11 100644
--- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs
+++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.rs
@@ -13,10 +13,10 @@ impl MarketMultiplier {
     }
 }
 
-async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
+async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
     //~^ ERROR struct takes 0 lifetime arguments but 1 lifetime argument was supplied
     //~^^ ERROR struct takes 1 generic argument but 0 generic arguments were supplied
-    LockedMarket(generator.lock().unwrap().buy())
+    LockedMarket(coroutine.lock().unwrap().buy())
 }
 
 struct LockedMarket<T>(T);
diff --git a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr
index 73e0aaf1e45..516c1d065e6 100644
--- a/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr
+++ b/tests/ui/borrowck/issue-82126-mismatched-subst-and-hir.stderr
@@ -1,7 +1,7 @@
 error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
    |
-LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
+LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
    |                                                           ^^^^^^^^^^^^---- help: remove these generics
    |                                                           |
    |                                                           expected 0 lifetime arguments
@@ -15,7 +15,7 @@ LL | struct LockedMarket<T>(T);
 error[E0107]: struct takes 1 generic argument but 0 generic arguments were supplied
   --> $DIR/issue-82126-mismatched-subst-and-hir.rs:16:59
    |
-LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
+LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_> {
    |                                                           ^^^^^^^^^^^^ expected 1 generic argument
    |
 note: struct defined here, with 1 generic parameter: `T`
@@ -25,7 +25,7 @@ LL | struct LockedMarket<T>(T);
    |        ^^^^^^^^^^^^ -
 help: add missing generic argument
    |
-LL | async fn buy_lock(generator: &Mutex<MarketMultiplier>) -> LockedMarket<'_, T> {
+LL | async fn buy_lock(coroutine: &Mutex<MarketMultiplier>) -> LockedMarket<'_, T> {
    |                                                                          +++
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/borrowck/let_underscore_temporary.rs b/tests/ui/borrowck/let_underscore_temporary.rs
index 835cd20798f..a5ea3b3a7ab 100644
--- a/tests/ui/borrowck/let_underscore_temporary.rs
+++ b/tests/ui/borrowck/let_underscore_temporary.rs
@@ -52,4 +52,42 @@ fn let_ascribe(string: &Option<&str>, mut num: Option<i32>) {
     };
 }
 
+fn matched(string: &Option<&str>, mut num: Option<i32>) {
+    match if let Some(s) = *string { s.len() } else { 0 } {
+        _ => {}
+    };
+    match if let Some(s) = &num { s } else { &0 } {
+        _ => {}
+    };
+    match if let Some(s) = &mut num {
+        *s += 1;
+        s
+    } else {
+        &mut 0
+        //~^ ERROR temporary value dropped while borrowed
+    } {
+        _ => {}
+    };
+    match if let Some(ref s) = num { s } else { &0 } {
+        _ => {}
+    };
+    match if let Some(mut s) = num {
+        s += 1;
+        s
+    } else {
+        0
+    } {
+        _ => {}
+    };
+    match if let Some(ref mut s) = num {
+        *s += 1;
+        s
+    } else {
+        &mut 0
+        //~^ ERROR temporary value dropped while borrowed
+    } {
+        _ => {}
+    };
+}
+
 fn main() {}
diff --git a/tests/ui/borrowck/let_underscore_temporary.stderr b/tests/ui/borrowck/let_underscore_temporary.stderr
index 74f3598c4d0..6bccf329181 100644
--- a/tests/ui/borrowck/let_underscore_temporary.stderr
+++ b/tests/ui/borrowck/let_underscore_temporary.stderr
@@ -74,6 +74,44 @@ LL | |     };
    |
    = note: consider using a `let` binding to create a longer lived value
 
-error: aborting due to 4 previous errors
+error[E0716]: temporary value dropped while borrowed
+  --> $DIR/let_underscore_temporary.rs:66:14
+   |
+LL |       match if let Some(s) = &mut num {
+   |  ___________-
+LL | |         *s += 1;
+LL | |         s
+LL | |     } else {
+LL | |         &mut 0
+   | |              ^ creates a temporary value which is freed while still in use
+LL | |
+LL | |     } {
+   | |     -
+   | |     |
+   | |_____temporary value is freed at the end of this statement
+   |       borrow later used here
+   |
+   = note: consider using a `let` binding to create a longer lived value
+
+error[E0716]: temporary value dropped while borrowed
+  --> $DIR/let_underscore_temporary.rs:86:14
+   |
+LL |       match if let Some(ref mut s) = num {
+   |  ___________-
+LL | |         *s += 1;
+LL | |         s
+LL | |     } else {
+LL | |         &mut 0
+   | |              ^ creates a temporary value which is freed while still in use
+LL | |
+LL | |     } {
+   | |     -
+   | |     |
+   | |_____temporary value is freed at the end of this statement
+   |       borrow later used here
+   |
+   = note: consider using a `let` binding to create a longer lived value
+
+error: aborting due to 6 previous errors
 
 For more information about this error, try `rustc --explain E0716`.
diff --git a/tests/ui/bounds-lifetime.rs b/tests/ui/bounds-lifetime.rs
index 31aa4011b91..e3e635a4e84 100644
--- a/tests/ui/bounds-lifetime.rs
+++ b/tests/ui/bounds-lifetime.rs
@@ -2,6 +2,6 @@ type A = for<'b, 'a: 'b> fn(); //~ ERROR lifetime bounds cannot be used in this
 type B = for<'b, 'a: 'b,> fn(); //~ ERROR lifetime bounds cannot be used in this context
 type C = for<'b, 'a: 'b +> fn(); //~ ERROR lifetime bounds cannot be used in this context
 type D = for<'a, T> fn(); //~ ERROR only lifetime parameters can be used in this context
-type E = dyn for<T> Fn(); //~ ERROR only lifetime parameters can be used in this context
+type E = dyn for<T, U> Fn(); //~ ERROR only lifetime parameters can be used in this context
 
 fn main() {}
diff --git a/tests/ui/bounds-lifetime.stderr b/tests/ui/bounds-lifetime.stderr
index f0bfe784ccc..bbae835d875 100644
--- a/tests/ui/bounds-lifetime.stderr
+++ b/tests/ui/bounds-lifetime.stderr
@@ -28,8 +28,8 @@ LL | type D = for<'a, T> fn();
 error[E0658]: only lifetime parameters can be used in this context
   --> $DIR/bounds-lifetime.rs:5:18
    |
-LL | type E = dyn for<T> Fn();
-   |                  ^
+LL | type E = dyn for<T, U> Fn();
+   |                  ^  ^
    |
    = note: see issue #108185 <https://github.com/rust-lang/rust/issues/108185> for more information
    = help: add `#![feature(non_lifetime_binders)]` to the crate attributes to enable
diff --git a/tests/ui/c-variadic/issue-86053-1.stderr b/tests/ui/c-variadic/issue-86053-1.stderr
index 5a02f4aa93a..69e19e1d4d2 100644
--- a/tests/ui/c-variadic/issue-86053-1.stderr
+++ b/tests/ui/c-variadic/issue-86053-1.stderr
@@ -50,13 +50,7 @@ error: only foreign or `unsafe extern "C"` functions may be C-variadic
   --> $DIR/issue-86053-1.rs:11:12
    |
 LL |     self , ... ,   self ,   self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
-   |            ^^^
-
-error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/issue-86053-1.rs:11:36
-   |
-LL |     self , ... ,   self ,   self , ... ) where F : FnOnce ( & 'a & 'b usize ) {
-   |                                    ^^^
+   |            ^^^                     ^^^
 
 error[E0412]: cannot find type `F` in this scope
   --> $DIR/issue-86053-1.rs:11:48
@@ -76,6 +70,6 @@ help: you might be missing a type parameter
 LL | fn ordering4 < 'a , 'b, F     > ( a :            ,   self , self ,   self ,
    |                       +++
 
-error: aborting due to 11 previous errors
+error: aborting due to 10 previous errors
 
 For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/cast/ptr-to-ptr-different-regions.rs b/tests/ui/cast/ptr-to-ptr-different-regions.rs
new file mode 100644
index 00000000000..5592e613ac1
--- /dev/null
+++ b/tests/ui/cast/ptr-to-ptr-different-regions.rs
@@ -0,0 +1,24 @@
+// check-pass
+
+// https://github.com/rust-lang/rust/issues/113257
+
+#![deny(trivial_casts)] // The casts here are not trivial.
+
+struct Foo<'a> { a: &'a () }
+
+fn extend_lifetime_very_very_safely<'a>(v: *const Foo<'a>) -> *const Foo<'static> {
+    // This should pass because raw pointer casts can do anything they want.
+    v as *const Foo<'static>
+}
+
+trait Trait {}
+
+fn assert_static<'a>(ptr: *mut (dyn Trait + 'a)) -> *mut (dyn Trait + 'static) {
+    ptr as _
+}
+
+fn main() {
+    let unit = ();
+    let foo = Foo { a: &unit };
+    let _long: *const Foo<'static> = extend_lifetime_very_very_safely(&foo);
+}
diff --git a/tests/ui/check-cfg/allow-at-crate-level.rs b/tests/ui/check-cfg/allow-at-crate-level.rs
index ce3383a2961..1629d2e0b67 100644
--- a/tests/ui/check-cfg/allow-at-crate-level.rs
+++ b/tests/ui/check-cfg/allow-at-crate-level.rs
@@ -1,7 +1,7 @@
 // This test check that #![allow(unexpected_cfgs)] works with --cfg
 //
 // check-pass
-// compile-flags: --cfg=unexpected --check-cfg=names() -Z unstable-options
+// compile-flags: --cfg=unexpected --check-cfg=cfg() -Z unstable-options
 
 #![allow(unexpected_cfgs)]
 
diff --git a/tests/ui/check-cfg/allow-macro-cfg.rs b/tests/ui/check-cfg/allow-macro-cfg.rs
index 8016a4d190c..ea26355aca8 100644
--- a/tests/ui/check-cfg/allow-macro-cfg.rs
+++ b/tests/ui/check-cfg/allow-macro-cfg.rs
@@ -1,7 +1,7 @@
 // This test check that local #[allow(unexpected_cfgs)] works
 //
 // check-pass
-// compile-flags:--check-cfg=names() -Z unstable-options
+// compile-flags: --check-cfg=cfg() -Z unstable-options
 
 #[allow(unexpected_cfgs)]
 fn foo() {
diff --git a/tests/ui/check-cfg/allow-same-level.rs b/tests/ui/check-cfg/allow-same-level.rs
index 6c869dc4202..29491e0b39e 100644
--- a/tests/ui/check-cfg/allow-same-level.rs
+++ b/tests/ui/check-cfg/allow-same-level.rs
@@ -1,7 +1,7 @@
 // This test check that #[allow(unexpected_cfgs)] doesn't work if put on the same level
 //
 // check-pass
-// compile-flags:--check-cfg=names() -Z unstable-options
+// compile-flags: --check-cfg=cfg() -Z unstable-options
 
 #[allow(unexpected_cfgs)]
 #[cfg(FALSE)]
diff --git a/tests/ui/check-cfg/allow-top-level.rs b/tests/ui/check-cfg/allow-top-level.rs
index d14b0eae5cc..df06f655d9a 100644
--- a/tests/ui/check-cfg/allow-top-level.rs
+++ b/tests/ui/check-cfg/allow-top-level.rs
@@ -1,7 +1,7 @@
 // This test check that a top-level #![allow(unexpected_cfgs)] works
 //
 // check-pass
-// compile-flags:--check-cfg=names() -Z unstable-options
+// compile-flags: --check-cfg=cfg() -Z unstable-options
 
 #![allow(unexpected_cfgs)]
 
diff --git a/tests/ui/check-cfg/allow-upper-level.rs b/tests/ui/check-cfg/allow-upper-level.rs
index 04340694d9c..bd5c97815f2 100644
--- a/tests/ui/check-cfg/allow-upper-level.rs
+++ b/tests/ui/check-cfg/allow-upper-level.rs
@@ -1,7 +1,7 @@
 // This test check that #[allow(unexpected_cfgs)] work if put on an upper level
 //
 // check-pass
-// compile-flags:--check-cfg=names() -Z unstable-options
+// compile-flags: --check-cfg=cfg() -Z unstable-options
 
 #[allow(unexpected_cfgs)]
 mod aa {
diff --git a/tests/ui/check-cfg/compact-names.rs b/tests/ui/check-cfg/compact-names.rs
index bff80740039..4f7168255cf 100644
--- a/tests/ui/check-cfg/compact-names.rs
+++ b/tests/ui/check-cfg/compact-names.rs
@@ -1,7 +1,7 @@
 // This test check that we correctly emit an warning for compact cfg
 //
 // check-pass
-// compile-flags:--check-cfg=names() -Z unstable-options
+// compile-flags: --check-cfg=cfg() -Z unstable-options
 
 #![feature(cfg_target_compact)]
 
diff --git a/tests/ui/check-cfg/compact-values.rs b/tests/ui/check-cfg/compact-values.rs
index 1f17057840c..13c072fe920 100644
--- a/tests/ui/check-cfg/compact-values.rs
+++ b/tests/ui/check-cfg/compact-values.rs
@@ -1,7 +1,7 @@
 // This test check that we correctly emit an warning for compact cfg
 //
 // check-pass
-// compile-flags:--check-cfg=values() -Z unstable-options
+// compile-flags: --check-cfg=cfg() -Z unstable-options
 
 #![feature(cfg_target_compact)]
 
diff --git a/tests/ui/check-cfg/concat-values.rs b/tests/ui/check-cfg/concat-values.rs
new file mode 100644
index 00000000000..0f9178ce6a5
--- /dev/null
+++ b/tests/ui/check-cfg/concat-values.rs
@@ -0,0 +1,13 @@
+// check-pass
+// compile-flags: -Z unstable-options
+// compile-flags: --check-cfg=cfg(my_cfg,values("foo")) --check-cfg=cfg(my_cfg,values("bar"))
+
+#[cfg(my_cfg)]
+//~^ WARNING unexpected `cfg` condition value
+fn my_cfg() {}
+
+#[cfg(my_cfg = "unk")]
+//~^ WARNING unexpected `cfg` condition value
+fn my_cfg() {}
+
+fn main() {}
diff --git a/tests/ui/check-cfg/concat-values.stderr b/tests/ui/check-cfg/concat-values.stderr
new file mode 100644
index 00000000000..da2bd7d6ad9
--- /dev/null
+++ b/tests/ui/check-cfg/concat-values.stderr
@@ -0,0 +1,19 @@
+warning: unexpected `cfg` condition value: (none)
+  --> $DIR/concat-values.rs:5:7
+   |
+LL | #[cfg(my_cfg)]
+   |       ^^^^^^
+   |
+   = note: expected values for `my_cfg` are: `bar`, `foo`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: `unk`
+  --> $DIR/concat-values.rs:9:7
+   |
+LL | #[cfg(my_cfg = "unk")]
+   |       ^^^^^^^^^^^^^^
+   |
+   = note: expected values for `my_cfg` are: `bar`, `foo`
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/check-cfg/diagnotics.rs b/tests/ui/check-cfg/diagnotics.rs
index 49e127d079a..45875bddc17 100644
--- a/tests/ui/check-cfg/diagnotics.rs
+++ b/tests/ui/check-cfg/diagnotics.rs
@@ -1,5 +1,5 @@
 // check-pass
-// compile-flags: --check-cfg=names() --check-cfg=values(feature,"foo") --check-cfg=values(no_values) -Z unstable-options
+// compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) -Z unstable-options
 
 #[cfg(featur)]
 //~^ WARNING unexpected `cfg` condition name
diff --git a/tests/ui/check-cfg/empty-names.rs b/tests/ui/check-cfg/empty-names.rs
deleted file mode 100644
index 046ff0364e2..00000000000
--- a/tests/ui/check-cfg/empty-names.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Check warning for unexpected cfg
-//
-// check-pass
-// compile-flags: --check-cfg=names() -Z unstable-options
-
-#[cfg(unknown_key = "value")]
-//~^ WARNING unexpected `cfg` condition name
-pub fn f() {}
-
-fn main() {}
diff --git a/tests/ui/check-cfg/empty-values.rs b/tests/ui/check-cfg/empty-values.rs
deleted file mode 100644
index 9bda42e5d15..00000000000
--- a/tests/ui/check-cfg/empty-values.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-// Check warning for unexpected cfg value
-//
-// check-pass
-// compile-flags: --check-cfg=values() -Z unstable-options
-
-#[cfg(test = "value")]
-//~^ WARNING unexpected `cfg` condition value
-pub fn f() {}
-
-fn main() {}
diff --git a/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr b/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr
new file mode 100644
index 00000000000..53ccc0f4d31
--- /dev/null
+++ b/tests/ui/check-cfg/exhaustive-names-values.empty_cfg.stderr
@@ -0,0 +1,25 @@
+warning: unexpected `cfg` condition name: `unknown_key`
+  --> $DIR/exhaustive-names-values.rs:12:7
+   |
+LL | #[cfg(unknown_key = "value")]
+   |       ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: `value`
+  --> $DIR/exhaustive-names-values.rs:16:7
+   |
+LL | #[cfg(test = "value")]
+   |       ^^^^----------
+   |           |
+   |           help: remove the value
+   |
+   = note: no expected value for `test`
+
+warning: unexpected `empty_cfg` as condition name
+   |
+   = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
+
+warning: 3 warnings emitted
+
diff --git a/tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr b/tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr
new file mode 100644
index 00000000000..5e8b74054ce
--- /dev/null
+++ b/tests/ui/check-cfg/exhaustive-names-values.empty_names_values.stderr
@@ -0,0 +1,25 @@
+warning: unexpected `cfg` condition name: `unknown_key`
+  --> $DIR/exhaustive-names-values.rs:12:7
+   |
+LL | #[cfg(unknown_key = "value")]
+   |       ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: `value`
+  --> $DIR/exhaustive-names-values.rs:16:7
+   |
+LL | #[cfg(test = "value")]
+   |       ^^^^----------
+   |           |
+   |           help: remove the value
+   |
+   = note: no expected value for `test`
+
+warning: unexpected `empty_names_values` as condition name
+   |
+   = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
+
+warning: 3 warnings emitted
+
diff --git a/tests/ui/check-cfg/exhaustive-names-values.feature.stderr b/tests/ui/check-cfg/exhaustive-names-values.feature.stderr
new file mode 100644
index 00000000000..7705a665eb7
--- /dev/null
+++ b/tests/ui/check-cfg/exhaustive-names-values.feature.stderr
@@ -0,0 +1,33 @@
+warning: unexpected `cfg` condition name: `unknown_key`
+  --> $DIR/exhaustive-names-values.rs:12:7
+   |
+LL | #[cfg(unknown_key = "value")]
+   |       ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: `value`
+  --> $DIR/exhaustive-names-values.rs:16:7
+   |
+LL | #[cfg(test = "value")]
+   |       ^^^^----------
+   |           |
+   |           help: remove the value
+   |
+   = note: no expected value for `test`
+
+warning: unexpected `cfg` condition value: `unk`
+  --> $DIR/exhaustive-names-values.rs:20:7
+   |
+LL | #[cfg(feature = "unk")]
+   |       ^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `std`
+
+warning: unexpected condition value `` for condition name `feature`
+   |
+   = help: was set with `--cfg` but isn't in the `--check-cfg` expected values
+
+warning: 4 warnings emitted
+
diff --git a/tests/ui/check-cfg/exhaustive-names-values.full.stderr b/tests/ui/check-cfg/exhaustive-names-values.full.stderr
new file mode 100644
index 00000000000..f0224a2e33c
--- /dev/null
+++ b/tests/ui/check-cfg/exhaustive-names-values.full.stderr
@@ -0,0 +1,33 @@
+warning: unexpected `cfg` condition name: `unknown_key`
+  --> $DIR/exhaustive-names-values.rs:12:7
+   |
+LL | #[cfg(unknown_key = "value")]
+   |       ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: `value`
+  --> $DIR/exhaustive-names-values.rs:16:7
+   |
+LL | #[cfg(test = "value")]
+   |       ^^^^----------
+   |           |
+   |           help: remove the value
+   |
+   = note: no expected value for `test`
+
+warning: unexpected `cfg` condition value: `unk`
+  --> $DIR/exhaustive-names-values.rs:20:7
+   |
+LL | #[cfg(feature = "unk")]
+   |       ^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `std`
+
+warning: unexpected `full` as condition name
+   |
+   = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
+
+warning: 4 warnings emitted
+
diff --git a/tests/ui/check-cfg/exhaustive-names-values.rs b/tests/ui/check-cfg/exhaustive-names-values.rs
new file mode 100644
index 00000000000..f553d93cae2
--- /dev/null
+++ b/tests/ui/check-cfg/exhaustive-names-values.rs
@@ -0,0 +1,34 @@
+// Check warning for unexpected cfg in the code and in the CLI
+// arguments (here the revision cfg).
+//
+// check-pass
+// revisions: empty_names_values empty_cfg feature full
+// compile-flags: -Z unstable-options
+// [empty_names_values]compile-flags: --check-cfg=names() --check-cfg=values()
+// [empty_cfg]compile-flags: --check-cfg=cfg()
+// [feature]compile-flags: --check-cfg=cfg(feature,values("std"))
+// [full]compile-flags: --check-cfg=cfg(feature,values("std")) --check-cfg=cfg()
+
+#[cfg(unknown_key = "value")]
+//~^ WARNING unexpected `cfg` condition name
+pub fn f() {}
+
+#[cfg(test = "value")]
+//~^ WARNING unexpected `cfg` condition value
+pub fn f() {}
+
+#[cfg(feature = "unk")]
+//[feature]~^ WARNING unexpected `cfg` condition value
+//[full]~^^ WARNING unexpected `cfg` condition value
+pub fn feat() {}
+
+#[cfg(feature = "std")]
+pub fn feat() {}
+
+#[cfg(windows)]
+pub fn win() {}
+
+#[cfg(unix)]
+pub fn unix() {}
+
+fn main() {}
diff --git a/tests/ui/check-cfg/empty-names.stderr b/tests/ui/check-cfg/exhaustive-names.empty_names.stderr
index 9bba852c6de..6190ff71464 100644
--- a/tests/ui/check-cfg/empty-names.stderr
+++ b/tests/ui/check-cfg/exhaustive-names.empty_names.stderr
@@ -1,5 +1,5 @@
 warning: unexpected `cfg` condition name: `unknown_key`
-  --> $DIR/empty-names.rs:6:7
+  --> $DIR/exhaustive-names.rs:8:7
    |
 LL | #[cfg(unknown_key = "value")]
    |       ^^^^^^^^^^^^^^^^^^^^^
@@ -7,5 +7,9 @@ LL | #[cfg(unknown_key = "value")]
    = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
    = note: `#[warn(unexpected_cfgs)]` on by default
 
-warning: 1 warning emitted
+warning: unexpected `empty_names` as condition name
+   |
+   = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
+
+warning: 2 warnings emitted
 
diff --git a/tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr b/tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr
new file mode 100644
index 00000000000..f338434cd29
--- /dev/null
+++ b/tests/ui/check-cfg/exhaustive-names.exhaustive_names.stderr
@@ -0,0 +1,15 @@
+warning: unexpected `cfg` condition name: `unknown_key`
+  --> $DIR/exhaustive-names.rs:8:7
+   |
+LL | #[cfg(unknown_key = "value")]
+   |       ^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `exhaustive_names` as condition name
+   |
+   = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/check-cfg/exhaustive-names.rs b/tests/ui/check-cfg/exhaustive-names.rs
new file mode 100644
index 00000000000..b86a7f84eb4
--- /dev/null
+++ b/tests/ui/check-cfg/exhaustive-names.rs
@@ -0,0 +1,12 @@
+// Check warning for unexpected cfg
+//
+// check-pass
+// revisions: empty_names exhaustive_names
+// [empty_names]compile-flags: --check-cfg=names() -Z unstable-options
+// [exhaustive_names]compile-flags: --check-cfg=cfg() -Z unstable-options
+
+#[cfg(unknown_key = "value")]
+//~^ WARNING unexpected `cfg` condition name
+pub fn f() {}
+
+fn main() {}
diff --git a/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr b/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr
new file mode 100644
index 00000000000..999b2702849
--- /dev/null
+++ b/tests/ui/check-cfg/exhaustive-values.empty_cfg.stderr
@@ -0,0 +1,17 @@
+warning: unexpected `cfg` condition value: `value`
+  --> $DIR/exhaustive-values.rs:9:7
+   |
+LL | #[cfg(test = "value")]
+   |       ^^^^----------
+   |           |
+   |           help: remove the value
+   |
+   = note: no expected value for `test`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `empty_cfg` as condition name
+   |
+   = help: was set with `--cfg` but isn't in the `--check-cfg` expected names
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/check-cfg/empty-values.stderr b/tests/ui/check-cfg/exhaustive-values.empty_values.stderr
index 932651c5bfe..77ddc35100a 100644
--- a/tests/ui/check-cfg/empty-values.stderr
+++ b/tests/ui/check-cfg/exhaustive-values.empty_values.stderr
@@ -1,5 +1,5 @@
 warning: unexpected `cfg` condition value: `value`
-  --> $DIR/empty-values.rs:6:7
+  --> $DIR/exhaustive-values.rs:9:7
    |
 LL | #[cfg(test = "value")]
    |       ^^^^----------
diff --git a/tests/ui/check-cfg/exhaustive-values.rs b/tests/ui/check-cfg/exhaustive-values.rs
new file mode 100644
index 00000000000..8a1689ba86b
--- /dev/null
+++ b/tests/ui/check-cfg/exhaustive-values.rs
@@ -0,0 +1,13 @@
+// Check warning for unexpected cfg value
+//
+// check-pass
+// revisions: empty_values empty_cfg without_names
+// [empty_values]compile-flags: --check-cfg=values() -Z unstable-options
+// [empty_cfg]compile-flags: --check-cfg=cfg() -Z unstable-options
+// [without_names]compile-flags: --check-cfg=cfg(any()) -Z unstable-options
+
+#[cfg(test = "value")]
+//~^ WARNING unexpected `cfg` condition value
+pub fn f() {}
+
+fn main() {}
diff --git a/tests/ui/check-cfg/exhaustive-values.without_names.stderr b/tests/ui/check-cfg/exhaustive-values.without_names.stderr
new file mode 100644
index 00000000000..77ddc35100a
--- /dev/null
+++ b/tests/ui/check-cfg/exhaustive-values.without_names.stderr
@@ -0,0 +1,13 @@
+warning: unexpected `cfg` condition value: `value`
+  --> $DIR/exhaustive-values.rs:9:7
+   |
+LL | #[cfg(test = "value")]
+   |       ^^^^----------
+   |           |
+   |           help: remove the value
+   |
+   = note: no expected value for `test`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/check-cfg/invalid-arguments.any_values.stderr b/tests/ui/check-cfg/invalid-arguments.any_values.stderr
new file mode 100644
index 00000000000..f9a9c4a6e13
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.any_values.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(any(),values())` (`values()` cannot be specified before the names)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.anything_else.stderr b/tests/ui/check-cfg/invalid-arguments.anything_else.stderr
index 850924d993a..925664bb3fc 100644
--- a/tests/ui/check-cfg/invalid-arguments.anything_else.stderr
+++ b/tests/ui/check-cfg/invalid-arguments.anything_else.stderr
@@ -1,2 +1,2 @@
-error: invalid `--check-cfg` argument: `anything_else(...)` (expected `names(name1, name2, ... nameN)` or `values(name, "value1", "value2", ... "valueN")`)
+error: invalid `--check-cfg` argument: `anything_else(...)` (expected `cfg(name, values("value1", "value2", ... "valueN"))`)
 
diff --git a/tests/ui/check-cfg/invalid-arguments.giberich.stderr b/tests/ui/check-cfg/invalid-arguments.giberich.stderr
new file mode 100644
index 00000000000..d427033fcc2
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.giberich.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(...)` (expected `cfg(name, values("value1", "value2", ... "valueN"))`)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.ident_in_values_1.stderr b/tests/ui/check-cfg/invalid-arguments.ident_in_values_1.stderr
new file mode 100644
index 00000000000..0dc44d9ac76
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.ident_in_values_1.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(foo,values(bar))` (`values()` arguments must be string literals or `any()`)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.ident_in_values_2.stderr b/tests/ui/check-cfg/invalid-arguments.ident_in_values_2.stderr
new file mode 100644
index 00000000000..d0a1453e3c4
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.ident_in_values_2.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(foo,values("bar",bar,"bar"))` (`values()` arguments must be string literals or `any()`)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.mixed_any.stderr b/tests/ui/check-cfg/invalid-arguments.mixed_any.stderr
new file mode 100644
index 00000000000..9239f8cce94
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.mixed_any.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(any(),values(any()))` (`values()` cannot be specified before the names)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.mixed_values_any.stderr b/tests/ui/check-cfg/invalid-arguments.mixed_values_any.stderr
new file mode 100644
index 00000000000..4c406143d08
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.mixed_values_any.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(foo,values("bar",any()))` (`values()` arguments cannot specify string literals and `any()` at the same time)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.multiple_any.stderr b/tests/ui/check-cfg/invalid-arguments.multiple_any.stderr
new file mode 100644
index 00000000000..6f1db1b13c3
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.multiple_any.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(any(),any())` (`any()` cannot be specified multiple times)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.multiple_values.stderr b/tests/ui/check-cfg/invalid-arguments.multiple_values.stderr
new file mode 100644
index 00000000000..bce305b09c3
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.multiple_values.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(foo,values(),values())` (`values()` cannot be specified multiple times)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.multiple_values_any.stderr b/tests/ui/check-cfg/invalid-arguments.multiple_values_any.stderr
new file mode 100644
index 00000000000..748ce231af7
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.multiple_values_any.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(foo,values(any(),any()))` (`any()` in `values()` cannot be specified multiple times)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.not_empty_any.stderr b/tests/ui/check-cfg/invalid-arguments.not_empty_any.stderr
new file mode 100644
index 00000000000..daf38147fe5
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.not_empty_any.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(any(foo))` (`any()` must be empty)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.not_empty_values_any.stderr b/tests/ui/check-cfg/invalid-arguments.not_empty_values_any.stderr
new file mode 100644
index 00000000000..79f83e802ca
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.not_empty_values_any.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(foo,values(any(bar)))` (`any()` must be empty)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.rs b/tests/ui/check-cfg/invalid-arguments.rs
index 5090ce3e845..a56f48e0af9 100644
--- a/tests/ui/check-cfg/invalid-arguments.rs
+++ b/tests/ui/check-cfg/invalid-arguments.rs
@@ -2,9 +2,35 @@
 //
 // check-fail
 // revisions: anything_else names_simple_ident values_simple_ident values_string_literals
-// [anything_else]compile-flags: -Z unstable-options --check-cfg=anything_else(...)
-// [names_simple_ident]compile-flags: -Z unstable-options --check-cfg=names("NOT_IDENT")
-// [values_simple_ident]compile-flags: -Z unstable-options --check-cfg=values("NOT_IDENT")
-// [values_string_literals]compile-flags: -Z unstable-options --check-cfg=values(test,12)
+// revisions: string_for_name_1 string_for_name_2 multiple_any multiple_values
+// revisions: multiple_values_any not_empty_any not_empty_values_any
+// revisions: values_any_missing_values values_any_before_ident ident_in_values_1
+// revisions: ident_in_values_2 unknown_meta_item_1 unknown_meta_item_2 unknown_meta_item_3
+// revisions: mixed_values_any mixed_any any_values giberich unterminated
+//
+// compile-flags: -Z unstable-options
+// [anything_else]compile-flags: --check-cfg=anything_else(...)
+// [names_simple_ident]compile-flags: --check-cfg=names("NOT_IDENT")
+// [values_simple_ident]compile-flags: --check-cfg=values("NOT_IDENT")
+// [values_string_literals]compile-flags: --check-cfg=values(test,12)
+// [string_for_name_1]compile-flags: --check-cfg=cfg("NOT_IDENT")
+// [string_for_name_2]compile-flags: --check-cfg=cfg(foo,"NOT_IDENT",bar)
+// [multiple_any]compile-flags: --check-cfg=cfg(any(),any())
+// [multiple_values]compile-flags: --check-cfg=cfg(foo,values(),values())
+// [multiple_values_any]compile-flags: --check-cfg=cfg(foo,values(any(),any()))
+// [not_empty_any]compile-flags: --check-cfg=cfg(any(foo))
+// [not_empty_values_any]compile-flags: --check-cfg=cfg(foo,values(any(bar)))
+// [values_any_missing_values]compile-flags: --check-cfg=cfg(foo,any())
+// [values_any_before_ident]compile-flags: --check-cfg=cfg(values(any()),foo)
+// [ident_in_values_1]compile-flags: --check-cfg=cfg(foo,values(bar))
+// [ident_in_values_2]compile-flags: --check-cfg=cfg(foo,values("bar",bar,"bar"))
+// [unknown_meta_item_1]compile-flags: --check-cfg=abc()
+// [unknown_meta_item_2]compile-flags: --check-cfg=cfg(foo,test())
+// [unknown_meta_item_3]compile-flags: --check-cfg=cfg(foo,values(test()))
+// [mixed_values_any]compile-flags: --check-cfg=cfg(foo,values("bar",any()))
+// [mixed_any]compile-flags: --check-cfg=cfg(any(),values(any()))
+// [any_values]compile-flags: --check-cfg=cfg(any(),values())
+// [giberich]compile-flags: --check-cfg=cfg(...)
+// [unterminated]compile-flags: --check-cfg=cfg(
 
 fn main() {}
diff --git a/tests/ui/check-cfg/invalid-arguments.string_for_name_1.stderr b/tests/ui/check-cfg/invalid-arguments.string_for_name_1.stderr
new file mode 100644
index 00000000000..c6f6834ffd3
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.string_for_name_1.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg("NOT_IDENT")` (`cfg()` arguments must be simple identifiers, `any()` or `values(...)`)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.string_for_name_2.stderr b/tests/ui/check-cfg/invalid-arguments.string_for_name_2.stderr
new file mode 100644
index 00000000000..ab3dc86cd1a
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.string_for_name_2.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(foo,"NOT_IDENT",bar)` (`cfg()` arguments must be simple identifiers, `any()` or `values(...)`)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_1.stderr b/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_1.stderr
new file mode 100644
index 00000000000..c04b15ec265
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_1.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `abc()` (expected `cfg(name, values("value1", "value2", ... "valueN"))`)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_2.stderr b/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_2.stderr
new file mode 100644
index 00000000000..cee65f9887b
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_2.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(foo,test())` (`cfg()` arguments must be simple identifiers, `any()` or `values(...)`)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_3.stderr b/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_3.stderr
new file mode 100644
index 00000000000..2441e2537b7
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.unknown_meta_item_3.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(foo,values(test()))` (`values()` arguments must be string literals or `any()`)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.unterminated.stderr b/tests/ui/check-cfg/invalid-arguments.unterminated.stderr
new file mode 100644
index 00000000000..80161a6aa0f
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.unterminated.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(` (expected `cfg(name, values("value1", "value2", ... "valueN"))`)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.values_any_before_ident.stderr b/tests/ui/check-cfg/invalid-arguments.values_any_before_ident.stderr
new file mode 100644
index 00000000000..fc93ec8fbdf
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.values_any_before_ident.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(values(any()),foo)` (`values()` cannot be specified before the names)
+
diff --git a/tests/ui/check-cfg/invalid-arguments.values_any_missing_values.stderr b/tests/ui/check-cfg/invalid-arguments.values_any_missing_values.stderr
new file mode 100644
index 00000000000..f41672fcbdb
--- /dev/null
+++ b/tests/ui/check-cfg/invalid-arguments.values_any_missing_values.stderr
@@ -0,0 +1,2 @@
+error: invalid `--check-cfg` argument: `cfg(foo,any())` (`cfg(any())` can only be provided in isolation)
+
diff --git a/tests/ui/check-cfg/invalid-cfg-name.rs b/tests/ui/check-cfg/invalid-cfg-name.rs
deleted file mode 100644
index 8499d3d4448..00000000000
--- a/tests/ui/check-cfg/invalid-cfg-name.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Check warning for invalid configuration name
-//
-// edition:2018
-// check-pass
-// compile-flags: --check-cfg=names() -Z unstable-options
-
-#[cfg(widnows)]
-//~^ WARNING unexpected `cfg` condition name
-pub fn f() {}
-
-#[cfg(windows)]
-pub fn g() {}
-
-pub fn main() {}
diff --git a/tests/ui/check-cfg/invalid-cfg-value.rs b/tests/ui/check-cfg/invalid-cfg-value.rs
deleted file mode 100644
index 9e428d367fd..00000000000
--- a/tests/ui/check-cfg/invalid-cfg-value.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-// Check warning for invalid configuration value
-//
-// edition:2018
-// check-pass
-// compile-flags: --check-cfg=values(feature,"serde","full") --cfg=feature="rand" -Z unstable-options
-
-#[cfg(feature = "sedre")]
-//~^ WARNING unexpected `cfg` condition value
-pub fn f() {}
-
-#[cfg(feature = "serde")]
-pub fn g() {}
-
-#[cfg(feature = "rand")]
-//~^ WARNING unexpected `cfg` condition value
-pub fn h() {}
-
-pub fn main() {}
diff --git a/tests/ui/check-cfg/mix.stderr b/tests/ui/check-cfg/mix.cfg.stderr
index 23da9f22a72..daa200440cc 100644
--- a/tests/ui/check-cfg/mix.stderr
+++ b/tests/ui/check-cfg/mix.cfg.stderr
@@ -1,5 +1,5 @@
 warning: unexpected `cfg` condition name: `widnows`
-  --> $DIR/mix.rs:11:7
+  --> $DIR/mix.rs:15:7
    |
 LL | #[cfg(widnows)]
    |       ^^^^^^^ help: there is a config with a similar name: `windows`
@@ -7,7 +7,7 @@ LL | #[cfg(widnows)]
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: (none)
-  --> $DIR/mix.rs:15:7
+  --> $DIR/mix.rs:19:7
    |
 LL | #[cfg(feature)]
    |       ^^^^^^^- help: specify a config value: `= "foo"`
@@ -15,7 +15,7 @@ LL | #[cfg(feature)]
    = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition value: `bar`
-  --> $DIR/mix.rs:22:7
+  --> $DIR/mix.rs:26:7
    |
 LL | #[cfg(feature = "bar")]
    |       ^^^^^^^^^^^^^^^
@@ -23,7 +23,7 @@ LL | #[cfg(feature = "bar")]
    = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:26:7
+  --> $DIR/mix.rs:30:7
    |
 LL | #[cfg(feature = "zebra")]
    |       ^^^^^^^^^^^^^^^^^
@@ -31,12 +31,12 @@ LL | #[cfg(feature = "zebra")]
    = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition name: `uu`
-  --> $DIR/mix.rs:30:12
+  --> $DIR/mix.rs:34:12
    |
 LL | #[cfg_attr(uu, test)]
    |            ^^
    |
-   = help: expected names are: `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+   = help: expected names are: `cfg`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `names_values`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
 
 warning: unexpected condition value `bar` for condition name `feature`
    |
@@ -47,13 +47,13 @@ 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: `widnows`
-  --> $DIR/mix.rs:39:10
+  --> $DIR/mix.rs:43:10
    |
 LL |     cfg!(widnows);
    |          ^^^^^^^ help: there is a config with a similar name: `windows`
 
 warning: unexpected `cfg` condition value: `bar`
-  --> $DIR/mix.rs:42:10
+  --> $DIR/mix.rs:46:10
    |
 LL |     cfg!(feature = "bar");
    |          ^^^^^^^^^^^^^^^
@@ -61,7 +61,7 @@ LL |     cfg!(feature = "bar");
    = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:44:10
+  --> $DIR/mix.rs:48:10
    |
 LL |     cfg!(feature = "zebra");
    |          ^^^^^^^^^^^^^^^^^
@@ -69,25 +69,25 @@ LL |     cfg!(feature = "zebra");
    = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:46:10
+  --> $DIR/mix.rs:50:10
    |
 LL |     cfg!(xxx = "foo");
    |          ^^^^^^^^^^^
 
 warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:48:10
+  --> $DIR/mix.rs:52:10
    |
 LL |     cfg!(xxx);
    |          ^^^
 
 warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:50:14
+  --> $DIR/mix.rs:54:14
    |
 LL |     cfg!(any(xxx, windows));
    |              ^^^
 
 warning: unexpected `cfg` condition value: `bad`
-  --> $DIR/mix.rs:52:14
+  --> $DIR/mix.rs:56:14
    |
 LL |     cfg!(any(feature = "bad", windows));
    |              ^^^^^^^^^^^^^^^
@@ -95,43 +95,43 @@ LL |     cfg!(any(feature = "bad", windows));
    = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:54:23
+  --> $DIR/mix.rs:58:23
    |
 LL |     cfg!(any(windows, xxx));
    |                       ^^^
 
 warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:56:20
+  --> $DIR/mix.rs:60:20
    |
 LL |     cfg!(all(unix, xxx));
    |                    ^^^
 
 warning: unexpected `cfg` condition name: `aa`
-  --> $DIR/mix.rs:58:14
+  --> $DIR/mix.rs:62:14
    |
 LL |     cfg!(all(aa, bb));
    |              ^^
 
 warning: unexpected `cfg` condition name: `bb`
-  --> $DIR/mix.rs:58:18
+  --> $DIR/mix.rs:62:18
    |
 LL |     cfg!(all(aa, bb));
    |                  ^^
 
 warning: unexpected `cfg` condition name: `aa`
-  --> $DIR/mix.rs:61:14
+  --> $DIR/mix.rs:65:14
    |
 LL |     cfg!(any(aa, bb));
    |              ^^
 
 warning: unexpected `cfg` condition name: `bb`
-  --> $DIR/mix.rs:61:18
+  --> $DIR/mix.rs:65:18
    |
 LL |     cfg!(any(aa, bb));
    |                  ^^
 
 warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:64:20
+  --> $DIR/mix.rs:68:20
    |
 LL |     cfg!(any(unix, feature = "zebra"));
    |                    ^^^^^^^^^^^^^^^^^
@@ -139,13 +139,13 @@ LL |     cfg!(any(unix, feature = "zebra"));
    = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:66:14
+  --> $DIR/mix.rs:70:14
    |
 LL |     cfg!(any(xxx, feature = "zebra"));
    |              ^^^
 
 warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:66:19
+  --> $DIR/mix.rs:70:19
    |
 LL |     cfg!(any(xxx, feature = "zebra"));
    |                   ^^^^^^^^^^^^^^^^^
@@ -153,19 +153,19 @@ LL |     cfg!(any(xxx, feature = "zebra"));
    = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:69:14
+  --> $DIR/mix.rs:73:14
    |
 LL |     cfg!(any(xxx, unix, xxx));
    |              ^^^
 
 warning: unexpected `cfg` condition name: `xxx`
-  --> $DIR/mix.rs:69:25
+  --> $DIR/mix.rs:73:25
    |
 LL |     cfg!(any(xxx, unix, xxx));
    |                         ^^^
 
 warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:72:14
+  --> $DIR/mix.rs:76:14
    |
 LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
    |              ^^^^^^^^^^^^^^^^^
@@ -173,7 +173,7 @@ LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
    = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:72:33
+  --> $DIR/mix.rs:76:33
    |
 LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
    |                                 ^^^^^^^^^^^^^^^^^
@@ -181,7 +181,7 @@ LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
    = note: expected values for `feature` are: `foo`
 
 warning: unexpected `cfg` condition value: `zebra`
-  --> $DIR/mix.rs:72:52
+  --> $DIR/mix.rs:76:52
    |
 LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
    |                                                    ^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/check-cfg/mix.names_values.stderr b/tests/ui/check-cfg/mix.names_values.stderr
new file mode 100644
index 00000000000..daa200440cc
--- /dev/null
+++ b/tests/ui/check-cfg/mix.names_values.stderr
@@ -0,0 +1,192 @@
+warning: unexpected `cfg` condition name: `widnows`
+  --> $DIR/mix.rs:15:7
+   |
+LL | #[cfg(widnows)]
+   |       ^^^^^^^ help: there is a config with a similar name: `windows`
+   |
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: (none)
+  --> $DIR/mix.rs:19:7
+   |
+LL | #[cfg(feature)]
+   |       ^^^^^^^- help: specify a config value: `= "foo"`
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: unexpected `cfg` condition value: `bar`
+  --> $DIR/mix.rs:26:7
+   |
+LL | #[cfg(feature = "bar")]
+   |       ^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: unexpected `cfg` condition value: `zebra`
+  --> $DIR/mix.rs:30:7
+   |
+LL | #[cfg(feature = "zebra")]
+   |       ^^^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: unexpected `cfg` condition name: `uu`
+  --> $DIR/mix.rs:34:12
+   |
+LL | #[cfg_attr(uu, test)]
+   |            ^^
+   |
+   = help: expected names are: `cfg`, `debug_assertions`, `doc`, `doctest`, `feature`, `miri`, `names_values`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `sanitize`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `unix`, `windows`
+
+warning: unexpected condition value `bar` for condition name `feature`
+   |
+   = help: was set with `--cfg` but isn't in the `--check-cfg` expected values
+
+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: `widnows`
+  --> $DIR/mix.rs:43:10
+   |
+LL |     cfg!(widnows);
+   |          ^^^^^^^ help: there is a config with a similar name: `windows`
+
+warning: unexpected `cfg` condition value: `bar`
+  --> $DIR/mix.rs:46:10
+   |
+LL |     cfg!(feature = "bar");
+   |          ^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: unexpected `cfg` condition value: `zebra`
+  --> $DIR/mix.rs:48:10
+   |
+LL |     cfg!(feature = "zebra");
+   |          ^^^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: unexpected `cfg` condition name: `xxx`
+  --> $DIR/mix.rs:50:10
+   |
+LL |     cfg!(xxx = "foo");
+   |          ^^^^^^^^^^^
+
+warning: unexpected `cfg` condition name: `xxx`
+  --> $DIR/mix.rs:52:10
+   |
+LL |     cfg!(xxx);
+   |          ^^^
+
+warning: unexpected `cfg` condition name: `xxx`
+  --> $DIR/mix.rs:54:14
+   |
+LL |     cfg!(any(xxx, windows));
+   |              ^^^
+
+warning: unexpected `cfg` condition value: `bad`
+  --> $DIR/mix.rs:56:14
+   |
+LL |     cfg!(any(feature = "bad", windows));
+   |              ^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: unexpected `cfg` condition name: `xxx`
+  --> $DIR/mix.rs:58:23
+   |
+LL |     cfg!(any(windows, xxx));
+   |                       ^^^
+
+warning: unexpected `cfg` condition name: `xxx`
+  --> $DIR/mix.rs:60:20
+   |
+LL |     cfg!(all(unix, xxx));
+   |                    ^^^
+
+warning: unexpected `cfg` condition name: `aa`
+  --> $DIR/mix.rs:62:14
+   |
+LL |     cfg!(all(aa, bb));
+   |              ^^
+
+warning: unexpected `cfg` condition name: `bb`
+  --> $DIR/mix.rs:62:18
+   |
+LL |     cfg!(all(aa, bb));
+   |                  ^^
+
+warning: unexpected `cfg` condition name: `aa`
+  --> $DIR/mix.rs:65:14
+   |
+LL |     cfg!(any(aa, bb));
+   |              ^^
+
+warning: unexpected `cfg` condition name: `bb`
+  --> $DIR/mix.rs:65:18
+   |
+LL |     cfg!(any(aa, bb));
+   |                  ^^
+
+warning: unexpected `cfg` condition value: `zebra`
+  --> $DIR/mix.rs:68:20
+   |
+LL |     cfg!(any(unix, feature = "zebra"));
+   |                    ^^^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: unexpected `cfg` condition name: `xxx`
+  --> $DIR/mix.rs:70:14
+   |
+LL |     cfg!(any(xxx, feature = "zebra"));
+   |              ^^^
+
+warning: unexpected `cfg` condition value: `zebra`
+  --> $DIR/mix.rs:70:19
+   |
+LL |     cfg!(any(xxx, feature = "zebra"));
+   |                   ^^^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: unexpected `cfg` condition name: `xxx`
+  --> $DIR/mix.rs:73:14
+   |
+LL |     cfg!(any(xxx, unix, xxx));
+   |              ^^^
+
+warning: unexpected `cfg` condition name: `xxx`
+  --> $DIR/mix.rs:73:25
+   |
+LL |     cfg!(any(xxx, unix, xxx));
+   |                         ^^^
+
+warning: unexpected `cfg` condition value: `zebra`
+  --> $DIR/mix.rs:76:14
+   |
+LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
+   |              ^^^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: unexpected `cfg` condition value: `zebra`
+  --> $DIR/mix.rs:76:33
+   |
+LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
+   |                                 ^^^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: unexpected `cfg` condition value: `zebra`
+  --> $DIR/mix.rs:76:52
+   |
+LL |     cfg!(all(feature = "zebra", feature = "zebra", feature = "zebra"));
+   |                                                    ^^^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `foo`
+
+warning: 28 warnings emitted
+
diff --git a/tests/ui/check-cfg/mix.rs b/tests/ui/check-cfg/mix.rs
index 9adf5c46e43..d7b3b4953b7 100644
--- a/tests/ui/check-cfg/mix.rs
+++ b/tests/ui/check-cfg/mix.rs
@@ -3,7 +3,11 @@
 // we correctly lint on the `cfg!` macro and `cfg_attr` attribute.
 //
 // check-pass
-// compile-flags: --check-cfg=names() --check-cfg=values(feature,"foo") --cfg feature="bar" --cfg unknown_name -Z unstable-options
+// revisions: names_values cfg
+// compile-flags: --cfg feature="bar" --cfg unknown_name -Z unstable-options
+// compile-flags: --check-cfg=cfg(names_values,cfg)
+// [names_values]compile-flags: --check-cfg=names() --check-cfg=values(feature,"foo")
+// [cfg]compile-flags: --check-cfg=cfg(feature,values("foo"))
 
 #[cfg(windows)]
 fn do_windows_stuff() {}
diff --git a/tests/ui/check-cfg/no-values.stderr b/tests/ui/check-cfg/no-expected-values.empty.stderr
index b05a569dd01..5d261b2a5e6 100644
--- a/tests/ui/check-cfg/no-values.stderr
+++ b/tests/ui/check-cfg/no-expected-values.empty.stderr
@@ -1,5 +1,5 @@
 warning: unexpected `cfg` condition value: `foo`
-  --> $DIR/no-values.rs:6:7
+  --> $DIR/no-expected-values.rs:12:7
    |
 LL | #[cfg(feature = "foo")]
    |       ^^^^^^^--------
@@ -10,7 +10,7 @@ LL | #[cfg(feature = "foo")]
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: `foo`
-  --> $DIR/no-values.rs:10:7
+  --> $DIR/no-expected-values.rs:16:7
    |
 LL | #[cfg(test = "foo")]
    |       ^^^^--------
diff --git a/tests/ui/check-cfg/no-expected-values.mixed.stderr b/tests/ui/check-cfg/no-expected-values.mixed.stderr
new file mode 100644
index 00000000000..5d261b2a5e6
--- /dev/null
+++ b/tests/ui/check-cfg/no-expected-values.mixed.stderr
@@ -0,0 +1,23 @@
+warning: unexpected `cfg` condition value: `foo`
+  --> $DIR/no-expected-values.rs:12:7
+   |
+LL | #[cfg(feature = "foo")]
+   |       ^^^^^^^--------
+   |              |
+   |              help: remove the value
+   |
+   = note: no expected value for `feature`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: `foo`
+  --> $DIR/no-expected-values.rs:16:7
+   |
+LL | #[cfg(test = "foo")]
+   |       ^^^^--------
+   |           |
+   |           help: remove the value
+   |
+   = note: no expected value for `test`
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/check-cfg/no-expected-values.rs b/tests/ui/check-cfg/no-expected-values.rs
new file mode 100644
index 00000000000..9e2a9f09aed
--- /dev/null
+++ b/tests/ui/check-cfg/no-expected-values.rs
@@ -0,0 +1,20 @@
+// Check that we detect unexpected value when none are allowed
+//
+// check-pass
+// revisions: values simple mixed empty
+// compile-flags: -Z unstable-options
+// compile-flags: --check-cfg=cfg(values,simple,mixed,empty)
+// [values]compile-flags: --check-cfg=values(test) --check-cfg=values(feature)
+// [simple]compile-flags: --check-cfg=cfg(test) --check-cfg=cfg(feature)
+// [mixed]compile-flags: --check-cfg=cfg(test,feature)
+// [empty]compile-flags: --check-cfg=cfg(test,feature,values())
+
+#[cfg(feature = "foo")]
+//~^ WARNING unexpected `cfg` condition value
+fn do_foo() {}
+
+#[cfg(test = "foo")]
+//~^ WARNING unexpected `cfg` condition value
+fn do_foo() {}
+
+fn main() {}
diff --git a/tests/ui/check-cfg/no-expected-values.simple.stderr b/tests/ui/check-cfg/no-expected-values.simple.stderr
new file mode 100644
index 00000000000..5d261b2a5e6
--- /dev/null
+++ b/tests/ui/check-cfg/no-expected-values.simple.stderr
@@ -0,0 +1,23 @@
+warning: unexpected `cfg` condition value: `foo`
+  --> $DIR/no-expected-values.rs:12:7
+   |
+LL | #[cfg(feature = "foo")]
+   |       ^^^^^^^--------
+   |              |
+   |              help: remove the value
+   |
+   = note: no expected value for `feature`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: `foo`
+  --> $DIR/no-expected-values.rs:16:7
+   |
+LL | #[cfg(test = "foo")]
+   |       ^^^^--------
+   |           |
+   |           help: remove the value
+   |
+   = note: no expected value for `test`
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/check-cfg/no-expected-values.values.stderr b/tests/ui/check-cfg/no-expected-values.values.stderr
new file mode 100644
index 00000000000..5d261b2a5e6
--- /dev/null
+++ b/tests/ui/check-cfg/no-expected-values.values.stderr
@@ -0,0 +1,23 @@
+warning: unexpected `cfg` condition value: `foo`
+  --> $DIR/no-expected-values.rs:12:7
+   |
+LL | #[cfg(feature = "foo")]
+   |       ^^^^^^^--------
+   |              |
+   |              help: remove the value
+   |
+   = note: no expected value for `feature`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: `foo`
+  --> $DIR/no-expected-values.rs:16:7
+   |
+LL | #[cfg(test = "foo")]
+   |       ^^^^--------
+   |           |
+   |           help: remove the value
+   |
+   = note: no expected value for `test`
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/check-cfg/no-values.rs b/tests/ui/check-cfg/no-values.rs
deleted file mode 100644
index 8c80f56cb5a..00000000000
--- a/tests/ui/check-cfg/no-values.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-// Check that we detect unexpected value when none are allowed
-//
-// check-pass
-// compile-flags: --check-cfg=values(test) --check-cfg=values(feature) -Z unstable-options
-
-#[cfg(feature = "foo")]
-//~^ WARNING unexpected `cfg` condition value
-fn do_foo() {}
-
-#[cfg(test = "foo")]
-//~^ WARNING unexpected `cfg` condition value
-fn do_foo() {}
-
-fn main() {}
diff --git a/tests/ui/check-cfg/stmt-no-ice.rs b/tests/ui/check-cfg/stmt-no-ice.rs
index cf76487ed46..383e830a1b2 100644
--- a/tests/ui/check-cfg/stmt-no-ice.rs
+++ b/tests/ui/check-cfg/stmt-no-ice.rs
@@ -1,7 +1,7 @@
 // This test checks that there is no ICE with this code
 //
 // check-pass
-// compile-flags:--check-cfg=names() -Z unstable-options
+// compile-flags:--check-cfg=cfg() -Z unstable-options
 
 fn main() {
     #[cfg(crossbeam_loom)]
diff --git a/tests/ui/check-cfg/invalid-cfg-name.stderr b/tests/ui/check-cfg/unexpected-cfg-name.exhaustive.stderr
index 8c3c72c9667..513f7ac7fd1 100644
--- a/tests/ui/check-cfg/invalid-cfg-name.stderr
+++ b/tests/ui/check-cfg/unexpected-cfg-name.exhaustive.stderr
@@ -1,5 +1,5 @@
 warning: unexpected `cfg` condition name: `widnows`
-  --> $DIR/invalid-cfg-name.rs:7:7
+  --> $DIR/unexpected-cfg-name.rs:9:7
    |
 LL | #[cfg(widnows)]
    |       ^^^^^^^ help: there is a config with a similar name: `windows`
diff --git a/tests/ui/check-cfg/unexpected-cfg-name.names.stderr b/tests/ui/check-cfg/unexpected-cfg-name.names.stderr
new file mode 100644
index 00000000000..513f7ac7fd1
--- /dev/null
+++ b/tests/ui/check-cfg/unexpected-cfg-name.names.stderr
@@ -0,0 +1,10 @@
+warning: unexpected `cfg` condition name: `widnows`
+  --> $DIR/unexpected-cfg-name.rs:9:7
+   |
+LL | #[cfg(widnows)]
+   |       ^^^^^^^ help: there is a config with a similar name: `windows`
+   |
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/check-cfg/unexpected-cfg-name.rs b/tests/ui/check-cfg/unexpected-cfg-name.rs
new file mode 100644
index 00000000000..15c3aa6e081
--- /dev/null
+++ b/tests/ui/check-cfg/unexpected-cfg-name.rs
@@ -0,0 +1,16 @@
+// Check warning for unexpected configuration name
+//
+// check-pass
+// revisions: names exhaustive
+// compile-flags: --check-cfg=cfg(names,exhaustive)
+// [names]compile-flags: --check-cfg=names() -Z unstable-options
+// [exhaustive]compile-flags: --check-cfg=cfg() -Z unstable-options
+
+#[cfg(widnows)]
+//~^ WARNING unexpected `cfg` condition name
+pub fn f() {}
+
+#[cfg(windows)]
+pub fn g() {}
+
+pub fn main() {}
diff --git a/tests/ui/check-cfg/invalid-cfg-value.stderr b/tests/ui/check-cfg/unexpected-cfg-value.cfg.stderr
index 947beac6ffd..2ed7f900557 100644
--- a/tests/ui/check-cfg/invalid-cfg-value.stderr
+++ b/tests/ui/check-cfg/unexpected-cfg-value.cfg.stderr
@@ -1,5 +1,5 @@
 warning: unexpected `cfg` condition value: `sedre`
-  --> $DIR/invalid-cfg-value.rs:7:7
+  --> $DIR/unexpected-cfg-value.rs:11:7
    |
 LL | #[cfg(feature = "sedre")]
    |       ^^^^^^^^^^-------
@@ -10,7 +10,7 @@ LL | #[cfg(feature = "sedre")]
    = note: `#[warn(unexpected_cfgs)]` on by default
 
 warning: unexpected `cfg` condition value: `rand`
-  --> $DIR/invalid-cfg-value.rs:14:7
+  --> $DIR/unexpected-cfg-value.rs:18:7
    |
 LL | #[cfg(feature = "rand")]
    |       ^^^^^^^^^^^^^^^^
diff --git a/tests/ui/check-cfg/unexpected-cfg-value.rs b/tests/ui/check-cfg/unexpected-cfg-value.rs
new file mode 100644
index 00000000000..a84458071de
--- /dev/null
+++ b/tests/ui/check-cfg/unexpected-cfg-value.rs
@@ -0,0 +1,22 @@
+// Check warning for invalid configuration value in the code and
+// in the cli
+//
+// check-pass
+// revisions: values cfg
+// compile-flags: --cfg=feature="rand" -Z unstable-options
+// compile-flags: --check-cfg=cfg(values,cfg)
+// [values]compile-flags: --check-cfg=values(feature,"serde","full")
+// [cfg]compile-flags: --check-cfg=cfg(feature,values("serde","full"))
+
+#[cfg(feature = "sedre")]
+//~^ WARNING unexpected `cfg` condition value
+pub fn f() {}
+
+#[cfg(feature = "serde")]
+pub fn g() {}
+
+#[cfg(feature = "rand")]
+//~^ WARNING unexpected `cfg` condition value
+pub fn h() {}
+
+pub fn main() {}
diff --git a/tests/ui/check-cfg/unexpected-cfg-value.values.stderr b/tests/ui/check-cfg/unexpected-cfg-value.values.stderr
new file mode 100644
index 00000000000..2ed7f900557
--- /dev/null
+++ b/tests/ui/check-cfg/unexpected-cfg-value.values.stderr
@@ -0,0 +1,25 @@
+warning: unexpected `cfg` condition value: `sedre`
+  --> $DIR/unexpected-cfg-value.rs:11:7
+   |
+LL | #[cfg(feature = "sedre")]
+   |       ^^^^^^^^^^-------
+   |                 |
+   |                 help: there is a expected value with a similar name: `"serde"`
+   |
+   = note: expected values for `feature` are: `full`, `serde`
+   = note: `#[warn(unexpected_cfgs)]` on by default
+
+warning: unexpected `cfg` condition value: `rand`
+  --> $DIR/unexpected-cfg-value.rs:18:7
+   |
+LL | #[cfg(feature = "rand")]
+   |       ^^^^^^^^^^^^^^^^
+   |
+   = note: expected values for `feature` are: `full`, `serde`
+
+warning: unexpected condition value `rand` for condition name `feature`
+   |
+   = help: was set with `--cfg` but isn't in the `--check-cfg` expected values
+
+warning: 3 warnings emitted
+
diff --git a/tests/ui/check-cfg/unknown-values.rs b/tests/ui/check-cfg/unknown-values.rs
new file mode 100644
index 00000000000..c082a2f25ac
--- /dev/null
+++ b/tests/ui/check-cfg/unknown-values.rs
@@ -0,0 +1,17 @@
+// Check that no warning is emitted for unknown cfg value
+//
+// check-pass
+// revisions: simple mixed with_values
+// compile-flags: -Z unstable-options
+// compile-flags: --check-cfg=cfg(simple,mixed,with_values)
+// [simple]compile-flags: --check-cfg=cfg(foo,values(any()))
+// [mixed]compile-flags: --check-cfg=cfg(foo) --check-cfg=cfg(foo,values(any()))
+// [with_values]compile-flags:--check-cfg=cfg(foo,values(any())) --check-cfg=cfg(foo,values("aa"))
+
+#[cfg(foo = "value")]
+pub fn f() {}
+
+#[cfg(foo)]
+pub fn f() {}
+
+fn main() {}
diff --git a/tests/ui/check-cfg/well-known-names.rs b/tests/ui/check-cfg/well-known-names.rs
index e57fb69a1e0..1dcb419b4a7 100644
--- a/tests/ui/check-cfg/well-known-names.rs
+++ b/tests/ui/check-cfg/well-known-names.rs
@@ -1,7 +1,7 @@
 // This test checks that we lint on non well known names and that we don't lint on well known names
 //
 // check-pass
-// compile-flags: --check-cfg=names() -Z unstable-options
+// compile-flags: --check-cfg=cfg() -Z unstable-options
 
 #[cfg(target_oz = "linux")]
 //~^ WARNING unexpected `cfg` condition name
diff --git a/tests/ui/check-cfg/well-known-names.stderr b/tests/ui/check-cfg/well-known-names.stderr
index a5d38a99eee..3001289b7e0 100644
--- a/tests/ui/check-cfg/well-known-names.stderr
+++ b/tests/ui/check-cfg/well-known-names.stderr
@@ -2,11 +2,13 @@ warning: unexpected `cfg` condition name: `target_oz`
   --> $DIR/well-known-names.rs:6:7
    |
 LL | #[cfg(target_oz = "linux")]
-   |       ---------^^^^^^^^^^
-   |       |
-   |       help: there is a config with a similar name: `target_os`
+   |       ^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unexpected_cfgs)]` on by default
+help: there is a config with a similar name and value
+   |
+LL | #[cfg(target_os = "linux")]
+   |       ~~~~~~~~~
 
 warning: unexpected `cfg` condition name: `features`
   --> $DIR/well-known-names.rs:13:7
diff --git a/tests/ui/check-cfg/well-known-values.rs b/tests/ui/check-cfg/well-known-values.rs
index 96375dc8d31..8b56c8729d8 100644
--- a/tests/ui/check-cfg/well-known-values.rs
+++ b/tests/ui/check-cfg/well-known-values.rs
@@ -2,7 +2,7 @@
 // values
 //
 // check-pass
-// compile-flags: --check-cfg=values() -Z unstable-options
+// compile-flags: --check-cfg=cfg() -Z unstable-options
 
 #[cfg(target_os = "linuz")]
 //~^ WARNING unexpected `cfg` condition value
diff --git a/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.stderr b/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.stderr
index 0807f459029..85426dd9a5e 100644
--- a/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.stderr
+++ b/tests/ui/closures/2229_closure_analysis/match/non-exhaustive-match.stderr
@@ -5,10 +5,10 @@ LL |     let _b = || { match l1 { L1::A => () } };
    |                         ^^ pattern `L1::B` not covered
    |
 note: `L1` defined here
-  --> $DIR/non-exhaustive-match.rs:12:14
+  --> $DIR/non-exhaustive-match.rs:12:6
    |
 LL | enum L1 { A, B }
-   |      --      ^ not covered
+   |      ^^      - not covered
    = note: the matched value is of type `L1`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/tests/ui/closures/closure-expected.rs b/tests/ui/closures/closure-expected.rs
index 68cac3dd85e..d730bcd1faf 100644
--- a/tests/ui/closures/closure-expected.rs
+++ b/tests/ui/closures/closure-expected.rs
@@ -1,5 +1,5 @@
 fn main() {
     let x = Some(1);
     let y = x.or_else(4);
-    //~^ ERROR expected a `FnOnce<()>` closure, found `{integer}`
+    //~^ ERROR expected a `FnOnce()` closure, found `{integer}`
 }
diff --git a/tests/ui/closures/closure-expected.stderr b/tests/ui/closures/closure-expected.stderr
index 87a5d67a420..565038f5144 100644
--- a/tests/ui/closures/closure-expected.stderr
+++ b/tests/ui/closures/closure-expected.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
+error[E0277]: expected a `FnOnce()` closure, found `{integer}`
   --> $DIR/closure-expected.rs:3:23
    |
 LL |     let y = x.or_else(4);
-   |               ------- ^ expected an `FnOnce<()>` closure, found `{integer}`
+   |               ------- ^ expected an `FnOnce()` closure, found `{integer}`
    |               |
    |               required by a bound introduced by this call
    |
diff --git a/tests/ui/closures/coerce-unsafe-to-closure.stderr b/tests/ui/closures/coerce-unsafe-to-closure.stderr
index 449cd0b3177..bd4ab13a205 100644
--- a/tests/ui/closures/coerce-unsafe-to-closure.stderr
+++ b/tests/ui/closures/coerce-unsafe-to-closure.stderr
@@ -1,4 +1,4 @@
-error[E0277]: expected a `FnOnce<(&str,)>` closure, found `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}`
+error[E0277]: expected a `FnOnce(&str)` closure, found `unsafe extern "rust-intrinsic" fn(_) -> _ {transmute::<_, _>}`
   --> $DIR/coerce-unsafe-to-closure.rs:2:44
    |
 LL |     let x: Option<&[u8]> = Some("foo").map(std::mem::transmute);
diff --git a/tests/ui/closures/infer-signature-from-impl.next.stderr b/tests/ui/closures/infer-signature-from-impl.next.stderr
new file mode 100644
index 00000000000..97351706699
--- /dev/null
+++ b/tests/ui/closures/infer-signature-from-impl.next.stderr
@@ -0,0 +1,16 @@
+error[E0282]: type annotations needed
+  --> $DIR/infer-signature-from-impl.rs:17:16
+   |
+LL |     needs_foo(|x| {
+   |                ^
+LL |         x.to_string();
+   |         - type must be known at this point
+   |
+help: consider giving this closure parameter an explicit type
+   |
+LL |     needs_foo(|x: /* Type */| {
+   |                 ++++++++++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0282`.
diff --git a/tests/ui/closures/infer-signature-from-impl.rs b/tests/ui/closures/infer-signature-from-impl.rs
new file mode 100644
index 00000000000..6e8c94177bf
--- /dev/null
+++ b/tests/ui/closures/infer-signature-from-impl.rs
@@ -0,0 +1,20 @@
+// revisions: current next
+//[next] compile-flags: -Ztrait-solver=next
+//[next] known-bug: trait-system-refactor-initiative#71
+//[current] check-pass
+
+trait Foo {}
+fn needs_foo<T>(_: T)
+where
+    Wrap<T>: Foo,
+{
+}
+
+struct Wrap<T>(T);
+impl<T> Foo for Wrap<T> where T: Fn(i32) {}
+
+fn main() {
+    needs_foo(|x| {
+        x.to_string();
+    });
+}
diff --git a/tests/ui/closures/issue-25439.rs b/tests/ui/closures/issue-25439.rs
index 4f73ff3e38b..0269270b1b0 100644
--- a/tests/ui/closures/issue-25439.rs
+++ b/tests/ui/closures/issue-25439.rs
@@ -5,5 +5,5 @@ fn fix<F>(f: F) -> i32 where F: Fn(Helper<F>, i32) -> i32 {
 }
 
 fn main() {
-    fix(|_, x| x); //~ ERROR closure/generator type that references itself [E0644]
+    fix(|_, x| x); //~ ERROR closure/coroutine type that references itself [E0644]
 }
diff --git a/tests/ui/closures/issue-25439.stderr b/tests/ui/closures/issue-25439.stderr
index dadae23fdf3..5e889e6c184 100644
--- a/tests/ui/closures/issue-25439.stderr
+++ b/tests/ui/closures/issue-25439.stderr
@@ -1,4 +1,4 @@
-error[E0644]: closure/generator type that references itself
+error[E0644]: closure/coroutine type that references itself
   --> $DIR/issue-25439.rs:8:9
    |
 LL |     fix(|_, x| x);
diff --git a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs b/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs
index 20ff875491f..bce3b0fd729 100644
--- a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs
+++ b/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.rs
@@ -6,5 +6,6 @@
 trait NotObjectSafe { fn eq(&self, other: Self); }
 impl NotObjectSafe for dyn NotObjectSafe { }
 //~^ ERROR E0038
+//~| ERROR E0046
 
 fn main() { }
diff --git a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr b/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr
index e9090c1b6bc..1dcc30ee652 100644
--- a/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr
+++ b/tests/ui/coherence/coherence-impl-trait-for-trait-object-safe.stderr
@@ -13,6 +13,15 @@ LL | trait NotObjectSafe { fn eq(&self, other: Self); }
    |       this trait cannot be made into an object...
    = help: consider moving `eq` to another trait
 
-error: aborting due to previous error
+error[E0046]: not all trait items implemented, missing: `eq`
+  --> $DIR/coherence-impl-trait-for-trait-object-safe.rs:7:1
+   |
+LL | trait NotObjectSafe { fn eq(&self, other: Self); }
+   |                       -------------------------- `eq` from trait
+LL | impl NotObjectSafe for dyn NotObjectSafe { }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `eq` in implementation
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0038`.
+Some errors have detailed explanations: E0038, E0046.
+For more information about an error, try `rustc --explain E0038`.
diff --git a/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs b/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs
index 3acf0d8d39a..0e16d12a181 100644
--- a/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs
+++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.rs
@@ -1,5 +1,5 @@
 // revisions: stock with_negative_coherence
-//[with_negative_coherence] check-pass
+//[with_negative_coherence] known-bug: unknown
 
 #![feature(negative_impls)]
 #![cfg_attr(with_negative_coherence, feature(with_negative_coherence))]
diff --git a/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr b/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr
new file mode 100644
index 00000000000..097cc4e0fe3
--- /dev/null
+++ b/tests/ui/coherence/coherence-negative-outlives-lifetimes.with_negative_coherence.stderr
@@ -0,0 +1,11 @@
+error[E0119]: conflicting implementations of trait `MyTrait<'_>` for type `&_`
+  --> $DIR/coherence-negative-outlives-lifetimes.rs:14:1
+   |
+LL | impl<'a, T: MyPredicate<'a>> MyTrait<'a> for T {}
+   | ---------------------------------------------- first implementation here
+LL | impl<'a, T> MyTrait<'a> for &'a T {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-trait-alias.rs b/tests/ui/coherence/coherence-overlap-trait-alias.rs
index 9d9c76af91d..d42a666c54f 100644
--- a/tests/ui/coherence/coherence-overlap-trait-alias.rs
+++ b/tests/ui/coherence/coherence-overlap-trait-alias.rs
@@ -13,8 +13,6 @@ impl B for u32 {}
 trait C {}
 impl<T: AB> C for T {}
 impl C for u32 {}
-//~^ ERROR
-// FIXME it's giving an ungreat error but unsure if we care given that it's using an internal rustc
-// attribute and an artificial code path for testing purposes
+//~^ ERROR conflicting implementations of trait `C` for type `u32`
 
 fn main() {}
diff --git a/tests/ui/coherence/coherence-overlap-trait-alias.stderr b/tests/ui/coherence/coherence-overlap-trait-alias.stderr
index 668b8319b38..687f3af0040 100644
--- a/tests/ui/coherence/coherence-overlap-trait-alias.stderr
+++ b/tests/ui/coherence/coherence-overlap-trait-alias.stderr
@@ -1,17 +1,11 @@
-error[E0283]: type annotations needed: cannot satisfy `u32: C`
-  --> $DIR/coherence-overlap-trait-alias.rs:15:12
-   |
-LL | impl C for u32 {}
-   |            ^^^
-   |
-note: multiple `impl`s satisfying `u32: C` found
-  --> $DIR/coherence-overlap-trait-alias.rs:14:1
+error[E0119]: conflicting implementations of trait `C` for type `u32`
+  --> $DIR/coherence-overlap-trait-alias.rs:15:1
    |
 LL | impl<T: AB> C for T {}
-   | ^^^^^^^^^^^^^^^^^^^
+   | ------------------- first implementation here
 LL | impl C for u32 {}
-   | ^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^ conflicting implementation for `u32`
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0283`.
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-overlap-with-regions.rs b/tests/ui/coherence/coherence-overlap-with-regions.rs
index 32f01f41801..9945c8e6cfd 100644
--- a/tests/ui/coherence/coherence-overlap-with-regions.rs
+++ b/tests/ui/coherence/coherence-overlap-with-regions.rs
@@ -1,4 +1,10 @@
-// check-pass
+// known-bug: unknown
+
+// This fails because we currently perform negative coherence in coherence mode.
+// This means that when looking for a negative predicate, we also assemble a
+// coherence-unknowable predicate. Since confirming the negative impl has region
+// obligations, we don't prefer the impl over the unknowable predicate
+// unconditionally and instead flounder.
 
 #![feature(negative_impls)]
 #![feature(rustc_attrs)]
diff --git a/tests/ui/coherence/coherence-overlap-with-regions.stderr b/tests/ui/coherence/coherence-overlap-with-regions.stderr
new file mode 100644
index 00000000000..fd25f0978ba
--- /dev/null
+++ b/tests/ui/coherence/coherence-overlap-with-regions.stderr
@@ -0,0 +1,11 @@
+error[E0119]: conflicting implementations of trait `Bar` for type `&_`
+  --> $DIR/coherence-overlap-with-regions.rs:20:1
+   |
+LL | impl<T: Foo> Bar for T {}
+   | ---------------------- first implementation here
+LL | impl<T> Bar for &T where T: 'static {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/coherence-with-generator.rs b/tests/ui/coherence/coherence-with-coroutine.rs
index 5eb8dc2a468..21857d7fe66 100644
--- a/tests/ui/coherence/coherence-with-generator.rs
+++ b/tests/ui/coherence/coherence-with-coroutine.rs
@@ -1,13 +1,13 @@
 // Test that encountering closures during coherence does not cause issues.
-#![feature(type_alias_impl_trait, generators)]
+#![feature(type_alias_impl_trait, coroutines)]
 #![cfg_attr(specialized, feature(specialization))]
 #![allow(incomplete_features)]
 
 // revisions: stock specialized
 // [specialized]check-pass
 
-type OpaqueGenerator = impl Sized;
-fn defining_use() -> OpaqueGenerator {
+type OpaqueCoroutine = impl Sized;
+fn defining_use() -> OpaqueCoroutine {
     || {
         for i in 0..10 {
             yield i;
@@ -17,8 +17,8 @@ fn defining_use() -> OpaqueGenerator {
 
 struct Wrapper<T>(T);
 trait Trait {}
-impl Trait for Wrapper<OpaqueGenerator> {}
+impl Trait for Wrapper<OpaqueCoroutine> {}
 impl<T: Sync> Trait for Wrapper<T> {}
-//[stock]~^ ERROR conflicting implementations of trait `Trait` for type `Wrapper<OpaqueGenerator>`
+//[stock]~^ ERROR conflicting implementations of trait `Trait` for type `Wrapper<OpaqueCoroutine>`
 
 fn main() {}
diff --git a/tests/ui/coherence/coherence-with-generator.stock.stderr b/tests/ui/coherence/coherence-with-coroutine.stock.stderr
index 478ac491264..b2a9135c542 100644
--- a/tests/ui/coherence/coherence-with-generator.stock.stderr
+++ b/tests/ui/coherence/coherence-with-coroutine.stock.stderr
@@ -1,10 +1,10 @@
-error[E0119]: conflicting implementations of trait `Trait` for type `Wrapper<OpaqueGenerator>`
-  --> $DIR/coherence-with-generator.rs:21:1
+error[E0119]: conflicting implementations of trait `Trait` for type `Wrapper<OpaqueCoroutine>`
+  --> $DIR/coherence-with-coroutine.rs:21:1
    |
-LL | impl Trait for Wrapper<OpaqueGenerator> {}
+LL | impl Trait for Wrapper<OpaqueCoroutine> {}
    | --------------------------------------- first implementation here
 LL | impl<T: Sync> Trait for Wrapper<T> {}
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Wrapper<OpaqueGenerator>`
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Wrapper<OpaqueCoroutine>`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr b/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr
new file mode 100644
index 00000000000..4cf50b4f208
--- /dev/null
+++ b/tests/ui/coherence/negative-coherence-considering-regions.any_lt.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `Bar` for type `&_`
+  --> $DIR/negative-coherence-considering-regions.rs:22:1
+   |
+LL | impl<T> Bar for T where T: Foo {}
+   | ------------------------------ first implementation here
+...
+LL | impl<T> Bar for &T {}
+   | ^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/negative-coherence-considering-regions.rs b/tests/ui/coherence/negative-coherence-considering-regions.rs
new file mode 100644
index 00000000000..597a5972628
--- /dev/null
+++ b/tests/ui/coherence/negative-coherence-considering-regions.rs
@@ -0,0 +1,29 @@
+// revisions: any_lt static_lt
+//[static_lt] known-bug: unknown
+
+// This fails because we currently perform negative coherence in coherence mode.
+// This means that when looking for a negative predicate, we also assemble a
+// coherence-unknowable predicate. Since confirming the negative impl has region
+// obligations, we don't prefer the impl over the unknowable predicate
+// unconditionally and instead flounder.
+
+#![feature(negative_impls)]
+#![feature(with_negative_coherence)]
+
+trait Foo {}
+
+impl<T> !Foo for &'static T {}
+
+trait Bar {}
+
+impl<T> Bar for T where T: Foo {}
+
+#[cfg(any_lt)]
+impl<T> Bar for &T {}
+//[any_lt]~^ ERROR conflicting implementations of trait `Bar` for type `&_`
+
+#[cfg(static_lt)]
+impl<T> Bar for &'static T {}
+
+
+fn main() {}
diff --git a/tests/ui/coherence/negative-coherence-considering-regions.static_lt.stderr b/tests/ui/coherence/negative-coherence-considering-regions.static_lt.stderr
new file mode 100644
index 00000000000..87e7be2aa44
--- /dev/null
+++ b/tests/ui/coherence/negative-coherence-considering-regions.static_lt.stderr
@@ -0,0 +1,12 @@
+error[E0119]: conflicting implementations of trait `Bar` for type `&'static _`
+  --> $DIR/negative-coherence-considering-regions.rs:26:1
+   |
+LL | impl<T> Bar for T where T: Foo {}
+   | ------------------------------ first implementation here
+...
+LL | impl<T> Bar for &'static T {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&'static _`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0119`.
diff --git a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
index ecc73d994f9..4f32639a631 100644
--- a/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
+++ b/tests/ui/coherence/warn-when-cycle-is-error-in-coherence.stderr
@@ -24,3 +24,28 @@ LL | #![deny(coinductive_overlap_in_coherence)]
 
 error: aborting due to previous error
 
+Future incompatibility report: Future breakage diagnostic:
+error: implementations of `PartialEq<Interval<_>>` for `Interval<_>` will conflict in the future
+  --> $DIR/warn-when-cycle-is-error-in-coherence.rs:13:1
+   |
+LL |   #[derive(PartialEq, Default)]
+   |            --------- the second impl is here
+...
+LL | / impl<T, Q> PartialEq<Q> for Interval<T>
+LL | |
+LL | |
+LL | | where
+LL | |     T: Borrow<Q>,
+LL | |     Q: ?Sized + PartialOrd,
+   | |___________________________^ the first impl is here
+   |
+   = 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 #114040 <https://github.com/rust-lang/rust/issues/114040>
+   = note: impls that are not considered to overlap may be considered to overlap in the future
+   = note: `Interval<_>: PartialOrd` may be considered to hold in future releases, causing the impls to overlap
+note: the lint level is defined here
+  --> $DIR/warn-when-cycle-is-error-in-coherence.rs:1:9
+   |
+LL | #![deny(coinductive_overlap_in_coherence)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
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 9eaa54347f1..c1a4c3dc348 100644
--- a/tests/ui/const-generics/const-arg-in-const-arg.rs
+++ b/tests/ui/const-generics/const-arg-in-const-arg.rs
@@ -1,5 +1,5 @@
 // revisions: min
-// we use a single revision because t his shoudl have a `full` revision
+// we use a single revision because this should 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))]
diff --git a/tests/ui/const-generics/defaults/default-annotation.rs b/tests/ui/const-generics/defaults/default-annotation.rs
index 7a9f5732f7f..587ad78e298 100644
--- a/tests/ui/const-generics/defaults/default-annotation.rs
+++ b/tests/ui/const-generics/defaults/default-annotation.rs
@@ -4,12 +4,12 @@
 // FIXME(const_generics_defaults): It seems like we aren't testing the right thing here,
 // I would assume that we want the attributes to apply to the const parameter defaults
 // themselves.
-#![stable(feature = "const_default_test", since="none")]
+#![stable(feature = "const_default_test", since = "3.3.3")]
 
-#[unstable(feature = "const_default_stable", issue="none")]
+#[unstable(feature = "const_default_stable", issue = "none")]
 pub struct ConstDefaultUnstable<const N: usize = 3>;
 
-#[stable(feature = "const_default_unstable", since="none")]
+#[stable(feature = "const_default_unstable", since = "3.3.3")]
 pub struct ConstDefaultStable<const N: usize = {
     3
 }>;
diff --git a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.rs b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.rs
index 29aa0f59d74..c254b4ee09d 100644
--- a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.rs
+++ b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.rs
@@ -15,7 +15,7 @@ fn bad_infer_fn<_>() {}
 
 
 fn main() {
-  let a: All<_, _, _>;
+  let a: All<_, _, _>; //~ ERROR struct takes 2 generic arguments but 3
   all_fn();
   let v: [u8; _];
   let v: [u8; 10] = [0; _];
diff --git a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr
index e6d0c743d01..a6b736261e0 100644
--- a/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr
+++ b/tests/ui/const-generics/generic_arg_infer/infer-arg-test.stderr
@@ -19,6 +19,21 @@ LL | struct BadInfer<_>;
    = help: consider removing `_`, referring to it in a field, or using a marker such as `PhantomData`
    = help: if you intended `_` to be a const parameter, use `const _: usize` instead
 
-error: aborting due to 3 previous errors
+error[E0107]: struct takes 2 generic arguments but 3 generic arguments were supplied
+  --> $DIR/infer-arg-test.rs:18:10
+   |
+LL |   let a: All<_, _, _>;
+   |          ^^^       - help: remove this generic argument
+   |          |
+   |          expected 2 generic arguments
+   |
+note: struct defined here, with 2 generic parameters: `T`, `N`
+  --> $DIR/infer-arg-test.rs:3:8
+   |
+LL | struct All<'a, T, const N: usize> {
+   |        ^^^     -  --------------
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0392`.
+Some errors have detailed explanations: E0107, E0392.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs
index 6b2a0153f51..5f612780f39 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-80742.rs
+++ b/tests/ui/const-generics/generic_const_exprs/issue-80742.rs
@@ -3,6 +3,7 @@
 // failure-status: 101
 // normalize-stderr-test "note: .*\n\n" -> ""
 // normalize-stderr-test "thread 'rustc' panicked.*\n" -> ""
+// normalize-stderr-test "(error: internal compiler error: [^:]+):\d+:\d+: " -> "$1:LL:CC: "
 // rustc-env:RUST_BACKTRACE=0
 
 // This test used to cause an ICE in rustc_mir::interpret::step::eval_rvalue_into_place
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr b/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr
index 00b8a397702..9b66fc502b7 100644
--- a/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr
@@ -1,9 +1,9 @@
-error: internal compiler error: compiler/rustc_const_eval/src/interpret/step.rs:274:21: SizeOf MIR operator called for unsized type dyn Debug
+error: internal compiler error: compiler/rustc_const_eval/src/interpret/step.rs:LL:CC: SizeOf MIR operator called for unsized type dyn Debug
   --> $SRC_DIR/core/src/mem/mod.rs:LL:COL
 
 Box<dyn Any>
 query stack during panic:
-#0 [eval_to_allocation_raw] const-evaluating + checking `<impl at $DIR/issue-80742.rs:25:1: 27:32>::{constant#0}`
+#0 [eval_to_allocation_raw] const-evaluating + checking `<impl at $DIR/issue-80742.rs:26:1: 28:32>::{constant#0}`
 #1 [eval_to_valtree] evaluating type-level constant
 end of query stack
 error: aborting due to previous error
diff --git a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr b/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr
index 4e1d71f1545..b7ec657120c 100644
--- a/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr
+++ b/tests/ui/const-generics/generic_const_exprs/object-safety-err-ret.stderr
@@ -5,13 +5,17 @@ LL | fn use_dyn(v: &dyn Foo) {
    |                ^^^^^^^ `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-err-ret.rs:8:23
+  --> $DIR/object-safety-err-ret.rs:8:8
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
 LL |     fn test(&self) -> [u8; bar::<Self>()];
-   |                       ^^^^^^^^^^^^^^^^^^^ ...because method `test` references the `Self` type in its return type
+   |        ^^^^           ^^^^^^^^^^^^^^^^^^^ ...because method `test` references the `Self` type in its return type
+   |        |
+   |        ...because method `test` references the `Self` type in its `where` clause
    = help: consider moving `test` to another trait
+   = help: consider moving `test` to another trait
+   = help: only type `()` implements the trait, consider using it directly instead
 
 error: aborting due to previous error
 
diff --git a/tests/ui/const-generics/generic_const_exprs/type_mismatch.rs b/tests/ui/const-generics/generic_const_exprs/type_mismatch.rs
new file mode 100644
index 00000000000..5813f098184
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/type_mismatch.rs
@@ -0,0 +1,13 @@
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+trait Q {
+    const ASSOC: usize;
+}
+
+impl<const N: u64> Q for [u8; N] {}
+//~^ ERROR not all trait items implemented
+
+pub fn q_user() -> [u8; <[u8; 13] as Q>::ASSOC] {}
+
+pub fn main() {}
diff --git a/tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr b/tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr
new file mode 100644
index 00000000000..0314d7ed23d
--- /dev/null
+++ b/tests/ui/const-generics/generic_const_exprs/type_mismatch.stderr
@@ -0,0 +1,12 @@
+error[E0046]: not all trait items implemented, missing: `ASSOC`
+  --> $DIR/type_mismatch.rs:8:1
+   |
+LL |     const ASSOC: usize;
+   |     ------------------ `ASSOC` from trait
+...
+LL | impl<const N: u64> Q for [u8; N] {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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/const-generics/issues/issue-100313.stderr b/tests/ui/const-generics/issues/issue-100313.stderr
index 796966b22d5..5832dbe1777 100644
--- a/tests/ui/const-generics/issues/issue-100313.stderr
+++ b/tests/ui/const-generics/issues/issue-100313.stderr
@@ -11,7 +11,7 @@ error[E0080]: evaluation of constant value failed
   --> $DIR/issue-100313.rs:10:13
    |
 LL |             *(B as *const bool as *mut bool) = false;
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to alloc7 which is read-only
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ writing to ALLOC0 which is read-only
    |
 note: inside `T::<&true>::set_false`
   --> $DIR/issue-100313.rs:10:13
diff --git a/tests/ui/const-generics/issues/issue-67945-1.full.stderr b/tests/ui/const-generics/issues/issue-67945-1.full.stderr
index 8879aec35e5..ee17ec3c698 100644
--- a/tests/ui/const-generics/issues/issue-67945-1.full.stderr
+++ b/tests/ui/const-generics/issues/issue-67945-1.full.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-67945-1.rs:10:20
    |
 LL | struct Bug<S> {
-   |            - this type parameter
+   |            - expected this type parameter
 ...
 LL |         let x: S = MaybeUninit::uninit();
    |                -   ^^^^^^^^^^^^^^^^^^^^^ expected type parameter `S`, found `MaybeUninit<_>`
diff --git a/tests/ui/const-ptr/allowed_slices.rs b/tests/ui/const-ptr/allowed_slices.rs
index 3f19cd4d804..3561338a758 100644
--- a/tests/ui/const-ptr/allowed_slices.rs
+++ b/tests/ui/const-ptr/allowed_slices.rs
@@ -2,8 +2,6 @@
 #![feature(
     slice_from_ptr_range,
     const_slice_from_ptr_range,
-    pointer_byte_offsets,
-    const_pointer_byte_offsets
 )]
 use std::{
     mem::MaybeUninit,
diff --git a/tests/ui/const-ptr/forbidden_slices.rs b/tests/ui/const-ptr/forbidden_slices.rs
index 192b6a46de6..0374ac7f714 100644
--- a/tests/ui/const-ptr/forbidden_slices.rs
+++ b/tests/ui/const-ptr/forbidden_slices.rs
@@ -1,13 +1,10 @@
 // Strip out raw byte dumps to make comparison platform-independent:
 // 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"
-// normalize-stderr-test "alloc\d+" -> "allocN"
-// error-pattern: could not evaluate static initializer
+// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*A(LLOC)?[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
+
 #![feature(
     slice_from_ptr_range,
     const_slice_from_ptr_range,
-    pointer_byte_offsets,
-    const_pointer_byte_offsets
 )]
 use std::{
     mem::{size_of, MaybeUninit},
@@ -17,10 +14,13 @@ use std::{
 
 // Null is never valid for reads
 pub static S0: &[u32] = unsafe { from_raw_parts(ptr::null(), 0) };
+//~^ ERROR: it is undefined behavior to use this value
 pub static S1: &[()] = unsafe { from_raw_parts(ptr::null(), 0) };
+//~^ ERROR: it is undefined behavior to use this value
 
 // Out of bounds
 pub static S2: &[u32] = unsafe { from_raw_parts(&D0, 2) };
+//~^ ERROR: it is undefined behavior to use this value
 
 // Reading uninitialized  data
 pub static S4: &[u8] = unsafe { from_raw_parts((&D1) as *const _ as _, 1) }; //~ ERROR: it is undefined behavior to use this value
@@ -39,6 +39,7 @@ pub static S7: &[u16] = unsafe {
 
 // Unaligned read
 pub static S8: &[u64] = unsafe {
+    //~^ ERROR: it is undefined behavior to use this value
     let ptr = (&D4 as *const [u32; 2] as *const u32).byte_add(1).cast::<u64>();
 
     from_raw_parts(ptr, 1)
@@ -66,8 +67,9 @@ pub static R6: &[bool] = unsafe {
     from_ptr_range(ptr..ptr.add(4))
 };
 pub static R7: &[u16] = unsafe {
+    //~^ ERROR: it is undefined behavior to use this value
     let ptr = (&D2 as *const Struct as *const u16).byte_add(1);
-    from_ptr_range(ptr..ptr.add(4)) //~ inside `R7`
+    from_ptr_range(ptr..ptr.add(4))
 };
 pub static R8: &[u64] = unsafe {
     let ptr = (&D4 as *const [u32; 2] as *const u32).byte_add(1).cast::<u64>();
diff --git a/tests/ui/const-ptr/forbidden_slices.stderr b/tests/ui/const-ptr/forbidden_slices.stderr
index 294bc77aa31..105683940cf 100644
--- a/tests/ui/const-ptr/forbidden_slices.stderr
+++ b/tests/ui/const-ptr/forbidden_slices.stderr
@@ -1,41 +1,35 @@
-error[E0080]: could not evaluate static initializer
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-   |
-   = note: dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
-   |
-note: inside `std::slice::from_raw_parts::<'_, u32>`
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-note: inside `S0`
-  --> $DIR/forbidden_slices.rs:19:34
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/forbidden_slices.rs:16:1
    |
 LL | pub static S0: &[u32] = unsafe { from_raw_parts(ptr::null(), 0) };
-   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error[E0080]: could not evaluate static initializer
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-   |
-   = note: dereferencing pointer failed: null pointer is a dangling pointer (it has no provenance)
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
    |
-note: inside `std::slice::from_raw_parts::<'_, ()>`
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-note: inside `S1`
-  --> $DIR/forbidden_slices.rs:20:33
-   |
-LL | pub static S1: &[()] = unsafe { from_raw_parts(ptr::null(), 0) };
-   |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = 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: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
 
-error[E0080]: could not evaluate static initializer
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/forbidden_slices.rs:18:1
    |
-   = note: dereferencing pointer failed: allocN has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
+LL | pub static S1: &[()] = unsafe { from_raw_parts(ptr::null(), 0) };
+   | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a null reference
    |
-note: inside `std::slice::from_raw_parts::<'_, u32>`
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-note: inside `S2`
-  --> $DIR/forbidden_slices.rs:23:34
+   = 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: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
+
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/forbidden_slices.rs:22:1
    |
 LL | pub static S2: &[u32] = unsafe { from_raw_parts(&D0, 2) };
-   |                                  ^^^^^^^^^^^^^^^^^^^^^^
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
+   |
+   = 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: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/forbidden_slices.rs:26:1
@@ -83,18 +77,16 @@ LL | pub static S7: &[u16] = unsafe {
                HEX_DUMP
            }
 
-error[E0080]: could not evaluate static initializer
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-   |
-   = note: dereferencing pointer failed: allocN has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/forbidden_slices.rs:41:1
    |
-note: inside `std::slice::from_raw_parts::<'_, u64>`
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-note: inside `S8`
-  --> $DIR/forbidden_slices.rs:44:5
+LL | pub static S8: &[u64] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered a dangling reference (going beyond the bounds of its allocation)
    |
-LL |     from_raw_parts(ptr, 1)
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+   = 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: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
 
 error[E0080]: could not evaluate static initializer
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -106,7 +98,7 @@ note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
 note: inside `from_ptr_range::<'_, u32>`
   --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
 note: inside `R0`
-  --> $DIR/forbidden_slices.rs:47:34
+  --> $DIR/forbidden_slices.rs:48:34
    |
 LL | pub static R0: &[u32] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -121,7 +113,7 @@ note: inside `ptr::const_ptr::<impl *const ()>::sub_ptr`
 note: inside `from_ptr_range::<'_, ()>`
   --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
 note: inside `R1`
-  --> $DIR/forbidden_slices.rs:48:33
+  --> $DIR/forbidden_slices.rs:49:33
    |
 LL | pub static R1: &[()] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
    |                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -130,18 +122,18 @@ LL | pub static R1: &[()] = unsafe { from_ptr_range(ptr::null()..ptr::null()) };
 error[E0080]: could not evaluate static initializer
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
    |
-   = note: out-of-bounds pointer arithmetic: allocN has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
+   = note: out-of-bounds pointer arithmetic: ALLOC10 has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
    |
 note: inside `ptr::const_ptr::<impl *const u32>::add`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `R2`
-  --> $DIR/forbidden_slices.rs:51:25
+  --> $DIR/forbidden_slices.rs:52:25
    |
 LL |     from_ptr_range(ptr..ptr.add(2))
    |                         ^^^^^^^^^^
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/forbidden_slices.rs:53:1
+  --> $DIR/forbidden_slices.rs:54:1
    |
 LL | pub static R4: &[u8] = unsafe {
    | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered uninitialized memory, but expected an integer
@@ -152,7 +144,7 @@ LL | pub static R4: &[u8] = unsafe {
            }
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/forbidden_slices.rs:58:1
+  --> $DIR/forbidden_slices.rs:59:1
    |
 LL | pub static R5: &[u8] = unsafe {
    | ^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered a pointer, but expected an integer
@@ -165,7 +157,7 @@ LL | pub static R5: &[u8] = unsafe {
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
 error[E0080]: it is undefined behavior to use this value
-  --> $DIR/forbidden_slices.rs:63:1
+  --> $DIR/forbidden_slices.rs:64:1
    |
 LL | pub static R6: &[bool] = unsafe {
    | ^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<deref>[0]: encountered 0x11, but expected a boolean
@@ -175,30 +167,26 @@ LL | pub static R6: &[bool] = unsafe {
                HEX_DUMP
            }
 
-error[E0080]: could not evaluate static initializer
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/forbidden_slices.rs:69:1
    |
-   = note: accessing memory with alignment 1, but alignment 2 is required
+LL | pub static R7: &[u16] = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered an unaligned reference (required 2 byte alignment but found 1)
    |
-note: inside `std::slice::from_raw_parts::<'_, u16>`
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-note: inside `from_ptr_range::<'_, u16>`
-  --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
-note: inside `R7`
-  --> $DIR/forbidden_slices.rs:70:5
-   |
-LL |     from_ptr_range(ptr..ptr.add(4))
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = 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: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
 
 error[E0080]: could not evaluate static initializer
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
    |
-   = note: out-of-bounds pointer arithmetic: allocN has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
+   = note: out-of-bounds pointer arithmetic: ALLOC11 has size 8, so pointer to 8 bytes starting at offset 1 is out-of-bounds
    |
 note: inside `ptr::const_ptr::<impl *const u64>::add`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `R8`
-  --> $DIR/forbidden_slices.rs:74:25
+  --> $DIR/forbidden_slices.rs:76:25
    |
 LL |     from_ptr_range(ptr..ptr.add(1))
    |                         ^^^^^^^^^^
@@ -213,7 +201,7 @@ note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
 note: inside `from_ptr_range::<'_, u32>`
   --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
 note: inside `R9`
-  --> $DIR/forbidden_slices.rs:79:34
+  --> $DIR/forbidden_slices.rs:81:34
    |
 LL | pub static R9: &[u32] = unsafe { from_ptr_range(&D0..(&D0 as *const u32).add(1)) };
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -228,7 +216,7 @@ note: inside `ptr::const_ptr::<impl *const u32>::sub_ptr`
 note: inside `from_ptr_range::<'_, u32>`
   --> $SRC_DIR/core/src/slice/raw.rs:LL:COL
 note: inside `R10`
-  --> $DIR/forbidden_slices.rs:80:35
+  --> $DIR/forbidden_slices.rs:82:35
    |
 LL | pub static R10: &[u32] = unsafe { from_ptr_range(&D0..&D0) };
    |                                   ^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/const-ptr/out_of_bounds_read.stderr b/tests/ui/const-ptr/out_of_bounds_read.stderr
index c5c0a1cdefc..be75f76b26f 100644
--- a/tests/ui/const-ptr/out_of_bounds_read.stderr
+++ b/tests/ui/const-ptr/out_of_bounds_read.stderr
@@ -1,7 +1,7 @@
 error[E0080]: evaluation of constant value failed
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
    |
-   = note: dereferencing pointer failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
+   = note: memory access failed: ALLOC0 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
    |
 note: inside `std::ptr::read::<u32>`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
@@ -14,7 +14,7 @@ LL |     const _READ: u32 = unsafe { ptr::read(PAST_END_PTR) };
 error[E0080]: evaluation of constant value failed
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
    |
-   = note: dereferencing pointer failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
+   = note: memory access failed: ALLOC0 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
    |
 note: inside `std::ptr::read::<u32>`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
@@ -29,7 +29,7 @@ LL |     const _CONST_READ: u32 = unsafe { PAST_END_PTR.read() };
 error[E0080]: evaluation of constant value failed
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
    |
-   = note: dereferencing pointer failed: alloc5 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
+   = note: memory access failed: ALLOC0 has size 4, so pointer to 4 bytes starting at offset 4 is out-of-bounds
    |
 note: inside `std::ptr::read::<u32>`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
diff --git a/tests/ui/consts/assert-type-intrinsics.rs b/tests/ui/consts/assert-type-intrinsics.rs
index b4fd423becd..32b5f5c92c5 100644
--- a/tests/ui/consts/assert-type-intrinsics.rs
+++ b/tests/ui/consts/assert-type-intrinsics.rs
@@ -1,5 +1,4 @@
 #![feature(never_type)]
-#![feature(const_assert_type2)]
 #![feature(core_intrinsics)]
 
 use std::intrinsics;
diff --git a/tests/ui/consts/assert-type-intrinsics.stderr b/tests/ui/consts/assert-type-intrinsics.stderr
index 3c03b03deee..66c4f0f9cd6 100644
--- a/tests/ui/consts/assert-type-intrinsics.stderr
+++ b/tests/ui/consts/assert-type-intrinsics.stderr
@@ -1,20 +1,20 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/assert-type-intrinsics.rs:12:9
+  --> $DIR/assert-type-intrinsics.rs:11:9
    |
 LL |         MaybeUninit::<!>::uninit().assume_init();
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'aborted execution: attempted to instantiate uninhabited type `!`', $DIR/assert-type-intrinsics.rs:12:36
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'aborted execution: attempted to instantiate uninhabited type `!`', $DIR/assert-type-intrinsics.rs:11:36
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/assert-type-intrinsics.rs:16:9
+  --> $DIR/assert-type-intrinsics.rs:15:9
    |
 LL |         intrinsics::assert_mem_uninitialized_valid::<&'static i32>();
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'aborted execution: attempted to leave type `&i32` uninitialized, which is invalid', $DIR/assert-type-intrinsics.rs:16:9
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'aborted execution: attempted to leave type `&i32` uninitialized, which is invalid', $DIR/assert-type-intrinsics.rs:15:9
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/assert-type-intrinsics.rs:20:9
+  --> $DIR/assert-type-intrinsics.rs:19:9
    |
 LL |         intrinsics::assert_zero_valid::<&'static i32>();
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'aborted execution: attempted to zero-initialize type `&i32`, which is invalid', $DIR/assert-type-intrinsics.rs:20:9
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'aborted execution: attempted to zero-initialize type `&i32`, which is invalid', $DIR/assert-type-intrinsics.rs:19:9
 
 error: aborting due to 3 previous errors
 
diff --git a/tests/ui/consts/const-compare-bytes-ub.stderr b/tests/ui/consts/const-compare-bytes-ub.stderr
index 54fafded07b..d8971eb9969 100644
--- a/tests/ui/consts/const-compare-bytes-ub.stderr
+++ b/tests/ui/consts/const-compare-bytes-ub.stderr
@@ -20,25 +20,25 @@ error[E0080]: evaluation of constant value failed
   --> $DIR/const-compare-bytes-ub.rs:22:9
    |
 LL |         compare_bytes([1, 2, 3].as_ptr(), [1, 2, 3, 4].as_ptr(), 4)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc6 has size 3, so pointer to 4 bytes starting at offset 0 is out-of-bounds
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: ALLOC0 has size 3, so pointer to 4 bytes starting at offset 0 is out-of-bounds
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-compare-bytes-ub.rs:26:9
    |
 LL |         compare_bytes([1, 2, 3, 4].as_ptr(), [1, 2, 3].as_ptr(), 4)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc13 has size 3, so pointer to 4 bytes starting at offset 0 is out-of-bounds
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: ALLOC1 has size 3, so pointer to 4 bytes starting at offset 0 is out-of-bounds
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-compare-bytes-ub.rs:30:9
    |
 LL |         compare_bytes(MaybeUninit::uninit().as_ptr(), [1].as_ptr(), 1)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at alloc17[0x0..0x1], but memory is uninitialized at [0x0..0x1], and this operation requires initialized memory
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at ALLOC2[0x0..0x1], but memory is uninitialized at [0x0..0x1], and this operation requires initialized memory
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-compare-bytes-ub.rs:34:9
    |
 LL |         compare_bytes([1].as_ptr(), MaybeUninit::uninit().as_ptr(), 1)
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at alloc25[0x0..0x1], but memory is uninitialized at [0x0..0x1], and this operation requires initialized memory
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at ALLOC3[0x0..0x1], but memory is uninitialized at [0x0..0x1], and this operation requires initialized memory
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const-compare-bytes-ub.rs:38:9
diff --git a/tests/ui/consts/const-deref-ptr.rs b/tests/ui/consts/const-deref-ptr.rs
index 4aca75e3a17..2607d4de229 100644
--- a/tests/ui/consts/const-deref-ptr.rs
+++ b/tests/ui/consts/const-deref-ptr.rs
@@ -3,5 +3,6 @@
 fn main() {
     static C: u64 = unsafe {*(0xdeadbeef as *const u64)};
     //~^ ERROR could not evaluate static initializer
+    //~| dangling pointer
     println!("{}", C);
 }
diff --git a/tests/ui/consts/const-deref-ptr.stderr b/tests/ui/consts/const-deref-ptr.stderr
index 22cb6451e87..16eb6b0162d 100644
--- a/tests/ui/consts/const-deref-ptr.stderr
+++ b/tests/ui/consts/const-deref-ptr.stderr
@@ -2,7 +2,7 @@ error[E0080]: could not evaluate static initializer
   --> $DIR/const-deref-ptr.rs:4:29
    |
 LL |     static C: u64 = unsafe {*(0xdeadbeef as *const u64)};
-   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: 0xdeadbeef[noalloc] is a dangling pointer (it has no provenance)
+   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: 0xdeadbeef[noalloc] is a dangling pointer (it has no provenance)
 
 error: aborting due to previous error
 
diff --git a/tests/ui/consts/const-eval/const_raw_ptr_ops2.stderr b/tests/ui/consts/const-eval/const_raw_ptr_ops2.stderr
index e41dea873ac..e6cd25e42ff 100644
--- a/tests/ui/consts/const-eval/const_raw_ptr_ops2.stderr
+++ b/tests/ui/consts/const-eval/const_raw_ptr_ops2.stderr
@@ -2,13 +2,13 @@ error[E0080]: evaluation of constant value failed
   --> $DIR/const_raw_ptr_ops2.rs:7:26
    |
 LL | const Z2: i32 = unsafe { *(42 as *const i32) };
-   |                          ^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: 0x2a[noalloc] is a dangling pointer (it has no provenance)
+   |                          ^^^^^^^^^^^^^^^^^^^ memory access failed: 0x2a[noalloc] is a dangling pointer (it has no provenance)
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/const_raw_ptr_ops2.rs:9:26
    |
 LL | const Z3: i32 = unsafe { *(44 as *const i32) };
-   |                          ^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: 0x2c[noalloc] is a dangling pointer (it has no provenance)
+   |                          ^^^^^^^^^^^^^^^^^^^ memory access failed: 0x2c[noalloc] is a dangling pointer (it has no provenance)
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-eval/dangling.rs b/tests/ui/consts/const-eval/dangling.rs
deleted file mode 100644
index 4fcf879218b..00000000000
--- a/tests/ui/consts/const-eval/dangling.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-use std::mem;
-
-// Make sure we error with the right kind of error on a too large slice.
-const TEST: () = { unsafe {
-    let slice: *const [u8] = mem::transmute((1usize, usize::MAX));
-    let _val = &*slice; //~ ERROR: evaluation of constant value failed
-    //~| slice is bigger than largest supported object
-} };
-
-fn main() {}
diff --git a/tests/ui/consts/const-eval/dangling.stderr b/tests/ui/consts/const-eval/dangling.stderr
deleted file mode 100644
index 92d70573d98..00000000000
--- a/tests/ui/consts/const-eval/dangling.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/dangling.rs:6:16
-   |
-LL |     let _val = &*slice;
-   |                ^^^^^^^ invalid metadata in wide pointer: slice is bigger than largest supported object
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr
index a0f4519eaad..82de91effe7 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.32bit.stderr
@@ -6,7 +6,7 @@ LL | const BAR: &i32 = unsafe { &*(intrinsics::const_allocate(4, 4) as *mut i32)
    |
    = 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: 4, align: 4) {
-               ╾─alloc2──╼                                     │ ╾──╼
+               ╾ALLOC0╼                                     │ ╾──╼
            }
 
 error: aborting due to previous error
diff --git a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr
index d2bffa42561..de23aafe05c 100644
--- a/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr
+++ b/tests/ui/consts/const-eval/heap/alloc_intrinsic_uninit.64bit.stderr
@@ -6,7 +6,7 @@ LL | const BAR: &i32 = unsafe { &*(intrinsics::const_allocate(4, 4) as *mut i32)
    |
    = 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: 8) {
-               ╾───────alloc2────────╼                         │ ╾──────╼
+               ╾ALLOC0╼                         │ ╾──────╼
            }
 
 error: aborting due to previous error
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs
index b6d89a58dce..a717a5f8292 100644
--- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs
+++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.rs
@@ -5,10 +5,10 @@
 use std::intrinsics;
 
 const _X: &'static u8 = unsafe {
+    //~^ error: dangling pointer in final constant
     let ptr = intrinsics::const_allocate(4, 4);
     intrinsics::const_deallocate(ptr, 4, 4);
     &*ptr
-    //~^ error: evaluation of constant value failed
 };
 
 const _Y: u8 = unsafe {
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr
index b50ef0c68a1..5f4630f6f4b 100644
--- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr
+++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_dangling.stderr
@@ -1,14 +1,14 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/dealloc_intrinsic_dangling.rs:10:5
+error: encountered dangling pointer in final constant
+  --> $DIR/dealloc_intrinsic_dangling.rs:7:1
    |
-LL |     &*ptr
-   |     ^^^^^ dereferencing pointer failed: alloc2 has been freed, so this pointer is dangling
+LL | const _X: &'static u8 = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/dealloc_intrinsic_dangling.rs:18:5
    |
 LL |     *reference
-   |     ^^^^^^^^^^ dereferencing pointer failed: alloc4 has been freed, so this pointer is dangling
+   |     ^^^^^^^^^^ memory access failed: ALLOC0 has been freed, so this pointer is dangling
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr
index 0884ade45a7..916344a7b81 100644
--- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr
+++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_duplicate.stderr
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
   --> $DIR/dealloc_intrinsic_duplicate.rs:9:5
    |
 LL |     intrinsics::const_deallocate(ptr, 4, 4);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc2 has been freed, so this pointer is dangling
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: ALLOC0 has been freed, so this pointer is dangling
 
 error: aborting due to previous error
 
diff --git a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.stderr b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.stderr
index 4c23957a1f8..4b1f0f686ca 100644
--- a/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.stderr
+++ b/tests/ui/consts/const-eval/heap/dealloc_intrinsic_incorrect_layout.stderr
@@ -2,19 +2,19 @@ error[E0080]: evaluation of constant value failed
   --> $DIR/dealloc_intrinsic_incorrect_layout.rs:8:5
    |
 LL |     intrinsics::const_deallocate(ptr, 4, 2);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: alloc2 has size 4 and alignment 4, but gave size 4 and alignment 2
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC0 has size 4 and alignment 4, but gave size 4 and alignment 2
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/dealloc_intrinsic_incorrect_layout.rs:13:5
    |
 LL |     intrinsics::const_deallocate(ptr, 2, 4);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: alloc4 has size 4 and alignment 4, but gave size 2 and alignment 4
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC1 has size 4 and alignment 4, but gave size 2 and alignment 4
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/dealloc_intrinsic_incorrect_layout.rs:19:5
    |
 LL |     intrinsics::const_deallocate(ptr, 3, 4);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: alloc6 has size 4 and alignment 4, but gave size 3 and alignment 4
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC2 has size 4 and alignment 4, but gave size 3 and alignment 4
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/dealloc_intrinsic_incorrect_layout.rs:25:5
diff --git a/tests/ui/consts/const-eval/issue-49296.stderr b/tests/ui/consts/const-eval/issue-49296.stderr
index 45ba0ea183e..2022a16e789 100644
--- a/tests/ui/consts/const-eval/issue-49296.stderr
+++ b/tests/ui/consts/const-eval/issue-49296.stderr
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
   --> $DIR/issue-49296.rs:9:16
    |
 LL | const X: u64 = *wat(42);
-   |                ^^^^^^^^ dereferencing pointer failed: alloc3 has been freed, so this pointer is dangling
+   |                ^^^^^^^^ memory access failed: ALLOC0 has been freed, so this pointer is dangling
 
 error: aborting due to previous error
 
diff --git a/tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr b/tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr
new file mode 100644
index 00000000000..6454ce3d1ae
--- /dev/null
+++ b/tests/ui/consts/const-eval/issue-50814-2.mir-opt.stderr
@@ -0,0 +1,21 @@
+error[E0080]: evaluation of `<A<()> as Foo<()>>::BAR` failed
+  --> $DIR/issue-50814-2.rs:16:24
+   |
+LL |     const BAR: usize = [5, 6, 7][T::BOO];
+   |                        ^^^^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 42
+
+note: erroneous constant encountered
+  --> $DIR/issue-50814-2.rs:20:6
+   |
+LL |     &<A<T> as Foo<T>>::BAR
+   |      ^^^^^^^^^^^^^^^^^^^^^
+
+note: erroneous constant encountered
+  --> $DIR/issue-50814-2.rs:20:5
+   |
+LL |     &<A<T> as Foo<T>>::BAR
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/issue-50814-2.stderr b/tests/ui/consts/const-eval/issue-50814-2.normal.stderr
index 450fb002373..c6b1df6c8f4 100644
--- a/tests/ui/consts/const-eval/issue-50814-2.stderr
+++ b/tests/ui/consts/const-eval/issue-50814-2.normal.stderr
@@ -1,17 +1,17 @@
 error[E0080]: evaluation of `<A<()> as Foo<()>>::BAR` failed
-  --> $DIR/issue-50814-2.rs:14:24
+  --> $DIR/issue-50814-2.rs:16:24
    |
 LL |     const BAR: usize = [5, 6, 7][T::BOO];
    |                        ^^^^^^^^^^^^^^^^^ index out of bounds: the length is 3 but the index is 42
 
 note: erroneous constant encountered
-  --> $DIR/issue-50814-2.rs:18:6
+  --> $DIR/issue-50814-2.rs:20:6
    |
 LL |     &<A<T> as Foo<T>>::BAR
    |      ^^^^^^^^^^^^^^^^^^^^^
 
 note: the above error was encountered while instantiating `fn foo::<()>`
-  --> $DIR/issue-50814-2.rs:30:22
+  --> $DIR/issue-50814-2.rs:32:22
    |
 LL |     println!("{:x}", foo::<()>() as *const usize as usize);
    |                      ^^^^^^^^^^^
diff --git a/tests/ui/consts/const-eval/issue-50814-2.rs b/tests/ui/consts/const-eval/issue-50814-2.rs
index 53eb7b149f9..2eab93beb20 100644
--- a/tests/ui/consts/const-eval/issue-50814-2.rs
+++ b/tests/ui/consts/const-eval/issue-50814-2.rs
@@ -1,4 +1,6 @@
 // build-fail
+// revisions: normal mir-opt
+// [mir-opt]compile-flags: -Zmir-opt-level=4
 
 trait C {
     const BOO: usize;
diff --git a/tests/ui/consts/const-eval/nonnull_as_ref_ub.rs b/tests/ui/consts/const-eval/nonnull_as_ref_ub.rs
index 3b48e972923..19ab5239986 100644
--- a/tests/ui/consts/const-eval/nonnull_as_ref_ub.rs
+++ b/tests/ui/consts/const-eval/nonnull_as_ref_ub.rs
@@ -1,6 +1,6 @@
 use std::ptr::NonNull;
 
 const NON_NULL: NonNull<u8> = unsafe { NonNull::dangling() };
-const _: () = assert!(42 == *unsafe { NON_NULL.as_ref() });
+const _: () = assert!(42 == *unsafe { NON_NULL.as_ref() }); //~ERROR: evaluation of constant value failed
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr b/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr
index de93cb0c3ca..e34f3f43c64 100644
--- a/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr
+++ b/tests/ui/consts/const-eval/nonnull_as_ref_ub.stderr
@@ -1,15 +1,8 @@
 error[E0080]: evaluation of constant value failed
-  --> $SRC_DIR/core/src/ptr/non_null.rs:LL:COL
-   |
-   = note: dereferencing pointer failed: 0x1[noalloc] is a dangling pointer (it has no provenance)
-   |
-note: inside `NonNull::<u8>::as_ref::<'_>`
-  --> $SRC_DIR/core/src/ptr/non_null.rs:LL:COL
-note: inside `_`
-  --> $DIR/nonnull_as_ref_ub.rs:4:39
+  --> $DIR/nonnull_as_ref_ub.rs:4:29
    |
 LL | const _: () = assert!(42 == *unsafe { NON_NULL.as_ref() });
-   |                                       ^^^^^^^^^^^^^^^^^
+   |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: 0x1[noalloc] is a dangling pointer (it has no provenance)
 
 error: aborting due to previous error
 
diff --git a/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr b/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr
index 13ca4379b7b..b948e07b92d 100644
--- a/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr
+++ b/tests/ui/consts/const-eval/partial_ptr_overwrite.stderr
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
   --> $DIR/partial_ptr_overwrite.rs:8:9
    |
 LL |         *(ptr as *mut u8) = 123;
-   |         ^^^^^^^^^^^^^^^^^^^^^^^ unable to overwrite parts of a pointer in memory at alloc4
+   |         ^^^^^^^^^^^^^^^^^^^^^^^ unable to overwrite parts of a pointer in memory at ALLOC0
    |
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
diff --git a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
index 042e7eeb31e..689ebf75223 100644
--- a/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
+++ b/tests/ui/consts/const-eval/raw-bytes.32bit.stderr
@@ -211,7 +211,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/raw-bytes.rs:106:1
    |
 LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered allocN, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3, but expected a function pointer
    |
    = 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: 4, align: 4) {
@@ -385,7 +385,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/raw-bytes.rs:175:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC17, but expected a vtable pointer
    |
    = 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) {
@@ -396,7 +396,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/raw-bytes.rs:179:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC19, but expected a vtable pointer
    |
    = 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) {
@@ -418,7 +418,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/raw-bytes.rs:186:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC22, but expected a vtable pointer
    |
    = 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) {
@@ -451,7 +451,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/raw-bytes.rs:196:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC27, but expected a vtable pointer
    |
    = 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) {
diff --git a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
index 8426a95055c..3447a8ab432 100644
--- a/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
+++ b/tests/ui/consts/const-eval/raw-bytes.64bit.stderr
@@ -211,7 +211,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/raw-bytes.rs:106:1
    |
 LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered allocN, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3, but expected a function pointer
    |
    = 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: 8) {
@@ -385,7 +385,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/raw-bytes.rs:175:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC17, but expected a vtable pointer
    |
    = 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) {
@@ -396,7 +396,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/raw-bytes.rs:179:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC19, but expected a vtable pointer
    |
    = 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) {
@@ -418,7 +418,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/raw-bytes.rs:186:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC22, but expected a vtable pointer
    |
    = 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) {
@@ -451,7 +451,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/raw-bytes.rs:196:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC27, but expected a vtable pointer
    |
    = 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) {
diff --git a/tests/ui/consts/const-eval/raw-bytes.rs b/tests/ui/consts/const-eval/raw-bytes.rs
index 6c1238c0a06..e005922223a 100644
--- a/tests/ui/consts/const-eval/raw-bytes.rs
+++ b/tests/ui/consts/const-eval/raw-bytes.rs
@@ -1,8 +1,8 @@
 // stderr-per-bitwidth
 // ignore-endian-big
 // ignore-tidy-linelength
-// normalize-stderr-test "╾─*a(lloc)?[0-9]+(\+[a-z0-9]+)?─*╼" -> "╾ALLOC_ID$2╼"
-// normalize-stderr-test "alloc\d+" -> "allocN"
+// normalize-stderr-test "╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼" -> "╾ALLOC_ID$1╼"
+
 #![feature(never_type, rustc_attrs, ptr_metadata, slice_from_ptr_range, const_slice_from_ptr_range)]
 #![allow(invalid_value)]
 
diff --git a/tests/ui/consts/const-eval/raw-pointer-ub.rs b/tests/ui/consts/const-eval/raw-pointer-ub.rs
index e53865309eb..3341f3c78e0 100644
--- a/tests/ui/consts/const-eval/raw-pointer-ub.rs
+++ b/tests/ui/consts/const-eval/raw-pointer-ub.rs
@@ -1,20 +1,18 @@
-// normalize-stderr-test "alloc\d+" -> "allocN"
-#![feature(const_pointer_byte_offsets)]
-#![feature(pointer_byte_offsets)]
 #![feature(const_mut_refs)]
 
+
 const MISALIGNED_LOAD: () = unsafe {
     let mem = [0u32; 8];
     let ptr = mem.as_ptr().byte_add(1);
     let _val = *ptr; //~ERROR: evaluation of constant value failed
-    //~^NOTE: accessing memory with alignment 1, but alignment 4 is required
+    //~^NOTE: based on pointer with alignment 1, but alignment 4 is required
 };
 
 const MISALIGNED_STORE: () = unsafe {
     let mut mem = [0u32; 8];
     let ptr = mem.as_mut_ptr().byte_add(1);
     *ptr = 0; //~ERROR: evaluation of constant value failed
-    //~^NOTE: accessing memory with alignment 1, but alignment 4 is required
+    //~^NOTE: based on pointer with alignment 1, but alignment 4 is required
 };
 
 const MISALIGNED_COPY: () = unsafe {
@@ -26,6 +24,17 @@ const MISALIGNED_COPY: () = unsafe {
     // The actual error points into the implementation of `copy_to_nonoverlapping`.
 };
 
+const MISALIGNED_FIELD: () = unsafe {
+    #[repr(align(16))]
+    struct Aligned(f32);
+
+    let mem = [0f32; 8];
+    let ptr = mem.as_ptr().cast::<Aligned>();
+    // Accessing an f32 field but we still require the alignment of the pointer type.
+    let _val = (*ptr).0; //~ERROR: evaluation of constant value failed
+    //~^NOTE: based on pointer with alignment 4, but alignment 16 is required
+};
+
 const OOB: () = unsafe {
     let mem = [0u32; 1];
     let ptr = mem.as_ptr().cast::<u64>();
diff --git a/tests/ui/consts/const-eval/raw-pointer-ub.stderr b/tests/ui/consts/const-eval/raw-pointer-ub.stderr
index 96b7f4f58f9..60fcd461cde 100644
--- a/tests/ui/consts/const-eval/raw-pointer-ub.stderr
+++ b/tests/ui/consts/const-eval/raw-pointer-ub.stderr
@@ -1,14 +1,14 @@
 error[E0080]: evaluation of constant value failed
-  --> $DIR/raw-pointer-ub.rs:9:16
+  --> $DIR/raw-pointer-ub.rs:7:16
    |
 LL |     let _val = *ptr;
-   |                ^^^^ accessing memory with alignment 1, but alignment 4 is required
+   |                ^^^^ accessing memory based on pointer with alignment 1, but alignment 4 is required
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/raw-pointer-ub.rs:16:5
+  --> $DIR/raw-pointer-ub.rs:14:5
    |
 LL |     *ptr = 0;
-   |     ^^^^^^^^ accessing memory with alignment 1, but alignment 4 is required
+   |     ^^^^^^^^ accessing memory based on pointer with alignment 1, but alignment 4 is required
 
 error[E0080]: evaluation of constant value failed
   --> $SRC_DIR/core/src/intrinsics.rs:LL:COL
@@ -20,17 +20,23 @@ note: inside `copy_nonoverlapping::<u32>`
 note: inside `ptr::const_ptr::<impl *const u32>::copy_to_nonoverlapping`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
 note: inside `MISALIGNED_COPY`
-  --> $DIR/raw-pointer-ub.rs:24:5
+  --> $DIR/raw-pointer-ub.rs:22:5
    |
 LL |     y.copy_to_nonoverlapping(&mut z, 1);
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/raw-pointer-ub.rs:32:16
+  --> $DIR/raw-pointer-ub.rs:34:16
+   |
+LL |     let _val = (*ptr).0;
+   |                ^^^^^^^^ accessing memory based on pointer with alignment 4, but alignment 16 is required
+
+error[E0080]: evaluation of constant value failed
+  --> $DIR/raw-pointer-ub.rs:41:16
    |
 LL |     let _val = *ptr;
-   |                ^^^^ dereferencing pointer failed: allocN has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
+   |                ^^^^ memory access failed: ALLOC0 has size 4, so pointer to 8 bytes starting at offset 0 is out-of-bounds
 
-error: aborting due to 4 previous errors
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-eval/ub-enum.rs b/tests/ui/consts/const-eval/ub-enum.rs
index 078283fbd1f..72a0c9efed2 100644
--- a/tests/ui/consts/const-eval/ub-enum.rs
+++ b/tests/ui/consts/const-eval/ub-enum.rs
@@ -2,7 +2,7 @@
 // Strip out raw byte dumps to make comparison platform-independent:
 // 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"
-#![feature(never_type, const_discriminant)]
+#![feature(never_type)]
 #![allow(invalid_value)]
 
 use std::mem;
diff --git a/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr b/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr
index 965256de21a..7b30233c025 100644
--- a/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr
+++ b/tests/ui/consts/const-eval/ub-incorrect-vtable.32bit.stderr
@@ -1,46 +1,56 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-incorrect-vtable.rs:19:14
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/ub-incorrect-vtable.rs:18:1
+   |
+LL | const INVALID_VTABLE_ALIGNMENT: &dyn Trait =
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC1, but expected a vtable pointer
    |
-LL |     unsafe { std::mem::transmute((&92u8, &[0usize, 1usize, 1000usize])) };
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
+   = 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) {
+               ╾ALLOC0╼ ╾ALLOC1╼                         │ ╾──╼╾──╼
+           }
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-incorrect-vtable.rs:24:14
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/ub-incorrect-vtable.rs:23:1
+   |
+LL | const INVALID_VTABLE_SIZE: &dyn Trait =
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3, but expected a vtable pointer
    |
-LL |     unsafe { std::mem::transmute((&92u8, &[1usize, usize::MAX, 1usize])) };
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
+   = 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) {
+               ╾ALLOC2╼ ╾ALLOC3╼                         │ ╾──╼╾──╼
+           }
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-incorrect-vtable.rs:33:1
    |
 LL | const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC5, but expected a vtable pointer
    |
    = 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) {
-               ╾─allocN─╼ ╾─allocN─╼                         │ ╾──╼╾──╼
+               ╾ALLOC4╼ ╾ALLOC5╼                         │ ╾──╼╾──╼
            }
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-incorrect-vtable.rs:38:1
    |
 LL | const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC7, but expected a vtable pointer
    |
    = 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) {
-               ╾─allocN─╼ ╾─allocN─╼                         │ ╾──╼╾──╼
+               ╾ALLOC6╼ ╾ALLOC7╼                         │ ╾──╼╾──╼
            }
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-incorrect-vtable.rs:44:1
    |
 LL | const INVALID_VTABLE_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC9, but expected a vtable pointer
    |
    = 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) {
-               ╾─allocN─╼ ╾─allocN─╼                         │ ╾──╼╾──╼
+               ╾ALLOC8╼ ╾ALLOC9╼                         │ ╾──╼╾──╼
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -51,7 +61,7 @@ LL | const G: Wide = unsafe { Transmute { t: FOO }.u };
    |
    = 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) {
-               ╾─allocN─╼ ╾─allocN─╼                         │ ╾──╼╾──╼
+               ╾ALLOC10╼ ╾ALLOC11╼                         │ ╾──╼╾──╼
            }
 
 error: aborting due to 6 previous errors
diff --git a/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr b/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr
index bd542a7a5f2..9330ae3c9a6 100644
--- a/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr
+++ b/tests/ui/consts/const-eval/ub-incorrect-vtable.64bit.stderr
@@ -1,46 +1,56 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-incorrect-vtable.rs:19:14
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/ub-incorrect-vtable.rs:18:1
+   |
+LL | const INVALID_VTABLE_ALIGNMENT: &dyn Trait =
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC1, but expected a vtable pointer
    |
-LL |     unsafe { std::mem::transmute((&92u8, &[0usize, 1usize, 1000usize])) };
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
+   = 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) {
+               ╾ALLOC0╼ ╾ALLOC1╼ │ ╾──────╼╾──────╼
+           }
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-incorrect-vtable.rs:24:14
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/ub-incorrect-vtable.rs:23:1
+   |
+LL | const INVALID_VTABLE_SIZE: &dyn Trait =
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC3, but expected a vtable pointer
    |
-LL |     unsafe { std::mem::transmute((&92u8, &[1usize, usize::MAX, 1usize])) };
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
+   = 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) {
+               ╾ALLOC2╼ ╾ALLOC3╼ │ ╾──────╼╾──────╼
+           }
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-incorrect-vtable.rs:33:1
    |
 LL | const INVALID_VTABLE_ALIGNMENT_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC5, but expected a vtable pointer
    |
    = 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) {
-               ╾───────allocN───────╼ ╾───────allocN───────╼ │ ╾──────╼╾──────╼
+               ╾ALLOC4╼ ╾ALLOC5╼ │ ╾──────╼╾──────╼
            }
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-incorrect-vtable.rs:38:1
    |
 LL | const INVALID_VTABLE_SIZE_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC7, but expected a vtable pointer
    |
    = 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) {
-               ╾───────allocN───────╼ ╾───────allocN───────╼ │ ╾──────╼╾──────╼
+               ╾ALLOC6╼ ╾ALLOC7╼ │ ╾──────╼╾──────╼
            }
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-incorrect-vtable.rs:44:1
    |
 LL | const INVALID_VTABLE_UB: W<&dyn Trait> =
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC9, but expected a vtable pointer
    |
    = 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) {
-               ╾───────allocN───────╼ ╾───────allocN───────╼ │ ╾──────╼╾──────╼
+               ╾ALLOC8╼ ╾ALLOC9╼ │ ╾──────╼╾──────╼
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -51,7 +61,7 @@ LL | const G: Wide = unsafe { Transmute { t: FOO }.u };
    |
    = 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) {
-               ╾───────allocN───────╼ ╾───────allocN───────╼ │ ╾──────╼╾──────╼
+               ╾ALLOC10╼ ╾ALLOC11╼ │ ╾──────╼╾──────╼
            }
 
 error: aborting due to 6 previous errors
diff --git a/tests/ui/consts/const-eval/ub-incorrect-vtable.rs b/tests/ui/consts/const-eval/ub-incorrect-vtable.rs
index 4bb30b75bc8..7d1927253f2 100644
--- a/tests/ui/consts/const-eval/ub-incorrect-vtable.rs
+++ b/tests/ui/consts/const-eval/ub-incorrect-vtable.rs
@@ -11,19 +11,19 @@
 // errors are emitted instead of ICEs.
 
 // stderr-per-bitwidth
-// normalize-stderr-test "alloc\d+" -> "allocN"
+
 
 trait Trait {}
 
 const INVALID_VTABLE_ALIGNMENT: &dyn Trait =
     unsafe { std::mem::transmute((&92u8, &[0usize, 1usize, 1000usize])) };
-//~^ ERROR evaluation of constant value failed
-//~| does not point to a vtable
+//~^^ ERROR it is undefined behavior to use this value
+//~| expected a vtable pointer
 
 const INVALID_VTABLE_SIZE: &dyn Trait =
     unsafe { std::mem::transmute((&92u8, &[1usize, usize::MAX, 1usize])) };
-//~^ ERROR evaluation of constant value failed
-//~| does not point to a vtable
+//~^^ ERROR it is undefined behavior to use this value
+//~| expected a vtable pointer
 
 #[repr(transparent)]
 struct W<T>(T);
diff --git a/tests/ui/consts/const-eval/ub-nonnull.rs b/tests/ui/consts/const-eval/ub-nonnull.rs
index a64b3a74cf6..fe4ec4d23d0 100644
--- a/tests/ui/consts/const-eval/ub-nonnull.rs
+++ b/tests/ui/consts/const-eval/ub-nonnull.rs
@@ -1,6 +1,6 @@
 // Strip out raw byte dumps to make comparison platform-independent:
 // 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"
+// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
 #![feature(rustc_attrs, ptr_metadata)]
 #![allow(invalid_value)] // make sure we cannot allow away the errors tested here
 
diff --git a/tests/ui/consts/const-eval/ub-nonnull.stderr b/tests/ui/consts/const-eval/ub-nonnull.stderr
index 96164870804..7822306b654 100644
--- a/tests/ui/consts/const-eval/ub-nonnull.stderr
+++ b/tests/ui/consts/const-eval/ub-nonnull.stderr
@@ -10,10 +10,10 @@ LL | const NULL_PTR: NonNull<u8> = unsafe { mem::transmute(0usize) };
            }
 
 error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-nonnull.rs:20:30
+  --> $DIR/ub-nonnull.rs:20:29
    |
 LL |     let out_of_bounds_ptr = &ptr[255];
-   |                              ^^^^^^^^ dereferencing pointer failed: alloc11 has size 1, so pointer to 256 bytes starting at offset 0 is out-of-bounds
+   |                             ^^^^^^^^^ out-of-bounds pointer arithmetic: ALLOC1 has size 1, so pointer to 255 bytes starting at offset 0 is out-of-bounds
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-nonnull.rs:24:1
diff --git a/tests/ui/consts/const-eval/ub-ref-ptr.rs b/tests/ui/consts/const-eval/ub-ref-ptr.rs
index a5d2ea01486..08d4dce4d17 100644
--- a/tests/ui/consts/const-eval/ub-ref-ptr.rs
+++ b/tests/ui/consts/const-eval/ub-ref-ptr.rs
@@ -1,7 +1,7 @@
 // ignore-tidy-linelength
 // Strip out raw byte dumps to make comparison platform-independent:
 // 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"
+// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
 #![allow(invalid_value)]
 
 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 6d5c36cea7d..c608bad2a47 100644
--- a/tests/ui/consts/const-eval/ub-ref-ptr.stderr
+++ b/tests/ui/consts/const-eval/ub-ref-ptr.stderr
@@ -141,7 +141,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-ref-ptr.rs:59:1
    |
 LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered alloc39, but expected a function pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC2, but expected a function pointer
    |
    = 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: $SIZE, align: $ALIGN) {
@@ -151,7 +151,7 @@ LL | const DATA_FN_PTR: fn() = unsafe { mem::transmute(&13) };
 error[E0080]: evaluation of constant value failed
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
    |
-   = note: accessing memory with alignment 1, but alignment 4 is required
+   = note: accessing memory based on pointer with alignment 1, but alignment 4 is required
    |
 note: inside `std::ptr::read::<u32>`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
diff --git a/tests/ui/consts/const-eval/ub-upvars.32bit.stderr b/tests/ui/consts/const-eval/ub-upvars.32bit.stderr
index f7898e55ee2..353a9b78224 100644
--- a/tests/ui/consts/const-eval/ub-upvars.32bit.stderr
+++ b/tests/ui/consts/const-eval/ub-upvars.32bit.stderr
@@ -6,7 +6,7 @@ LL | const BAD_UPVAR: &dyn FnOnce() = &{
    |
    = 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) {
-               ╾─alloc3──╼ ╾─alloc4──╼                         │ ╾──╼╾──╼
+               ╾ALLOC0╼ ╾ALLOC1╼                         │ ╾──╼╾──╼
            }
 
 error: aborting due to previous error
diff --git a/tests/ui/consts/const-eval/ub-upvars.64bit.stderr b/tests/ui/consts/const-eval/ub-upvars.64bit.stderr
index 60432380e13..097f6b049dc 100644
--- a/tests/ui/consts/const-eval/ub-upvars.64bit.stderr
+++ b/tests/ui/consts/const-eval/ub-upvars.64bit.stderr
@@ -6,7 +6,7 @@ LL | const BAD_UPVAR: &dyn FnOnce() = &{
    |
    = 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) {
-               ╾───────alloc3────────╼ ╾───────alloc4────────╼ │ ╾──────╼╾──────╼
+               ╾ALLOC0╼ ╾ALLOC1╼ │ ╾──────╼╾──────╼
            }
 
 error: aborting due to previous error
diff --git a/tests/ui/consts/const-eval/ub-wide-ptr.rs b/tests/ui/consts/const-eval/ub-wide-ptr.rs
index a765dc71273..dc8d4c640c2 100644
--- a/tests/ui/consts/const-eval/ub-wide-ptr.rs
+++ b/tests/ui/consts/const-eval/ub-wide-ptr.rs
@@ -5,11 +5,11 @@ use std::mem;
 
 // Strip out raw byte dumps to make comparison platform-independent:
 // 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"
+// normalize-stderr-test "([0-9a-f][0-9a-f] |╾─*ALLOC[0-9]+(\+[a-z0-9]+)?─*╼ )+ *│.*" -> "HEX_DUMP"
 // normalize-stderr-test "offset \d+" -> "offset N"
-// normalize-stderr-test "alloc\d+" -> "allocN"
 // normalize-stderr-test "size \d+" -> "size N"
 
+
 /// A newtype wrapper to prevent MIR generation from inserting reborrows that would affect the error
 /// message.
 #[repr(transparent)]
@@ -122,14 +122,14 @@ const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, 4u
 //~^ ERROR it is undefined behavior to use this value
 //~| expected a vtable
 const TRAIT_OBJ_UNALIGNED_VTABLE: &dyn Trait = unsafe { mem::transmute((&92u8, &[0u8; 128])) };
-//~^ ERROR evaluation of constant value failed
-//~| does not point to a vtable
+//~^ ERROR it is undefined behavior to use this value
+//~| expected a vtable
 const TRAIT_OBJ_BAD_DROP_FN_NULL: &dyn Trait = unsafe { mem::transmute((&92u8, &[0usize; 8])) };
-//~^ ERROR evaluation of constant value failed
-//~| does not point to a vtable
+//~^ ERROR it is undefined behavior to use this value
+//~| expected a vtable
 const TRAIT_OBJ_BAD_DROP_FN_INT: &dyn Trait = unsafe { mem::transmute((&92u8, &[1usize; 8])) };
-//~^ ERROR evaluation of constant value failed
-//~| does not point to a vtable
+//~^ ERROR it is undefined behavior to use this value
+//~| expected a vtable
 const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
 //~^ ERROR it is undefined behavior to use this value
 //~| expected a vtable
@@ -148,12 +148,12 @@ const RAW_TRAIT_OBJ_CONTENT_INVALID: *const dyn Trait = unsafe { mem::transmute:
 
 // Const eval fails for these, so they need to be statics to error.
 static mut RAW_TRAIT_OBJ_VTABLE_NULL_THROUGH_REF: *const dyn Trait = unsafe {
+//~^ ERROR it is undefined behavior to use this value
     mem::transmute::<_, &dyn Trait>((&92u8, 0usize))
-    //~^ ERROR could not evaluate static initializer
 };
 static mut RAW_TRAIT_OBJ_VTABLE_INVALID_THROUGH_REF: *const dyn Trait = unsafe {
+//~^ ERROR it is undefined behavior to use this value
     mem::transmute::<_, &dyn Trait>((&92u8, &3u64))
-    //~^ ERROR could not evaluate static initializer
 };
 
 fn main() {}
diff --git a/tests/ui/consts/const-eval/ub-wide-ptr.stderr b/tests/ui/consts/const-eval/ub-wide-ptr.stderr
index d8add67fac1..b203794858a 100644
--- a/tests/ui/consts/const-eval/ub-wide-ptr.stderr
+++ b/tests/ui/consts/const-eval/ub-wide-ptr.stderr
@@ -189,7 +189,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:113:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_1: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u8))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC12, but expected a vtable pointer
    |
    = 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: $SIZE, align: $ALIGN) {
@@ -200,7 +200,7 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:117:1
    |
 LL | const TRAIT_OBJ_SHORT_VTABLE_2: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &3u64))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC14, but expected a vtable pointer
    |
    = 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: $SIZE, align: $ALIGN) {
@@ -218,29 +218,44 @@ LL | const TRAIT_OBJ_INT_VTABLE: W<&dyn Trait> = unsafe { mem::transmute(W((&92u
                HEX_DUMP
            }
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-wide-ptr.rs:124:57
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/ub-wide-ptr.rs:124:1
    |
 LL | const TRAIT_OBJ_UNALIGNED_VTABLE: &dyn Trait = unsafe { mem::transmute((&92u8, &[0u8; 128])) };
-   |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC17, but expected a vtable pointer
+   |
+   = 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: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-wide-ptr.rs:127:57
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/ub-wide-ptr.rs:127:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NULL: &dyn Trait = unsafe { mem::transmute((&92u8, &[0usize; 8])) };
-   |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC19, but expected a vtable pointer
+   |
+   = 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: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
 
-error[E0080]: evaluation of constant value failed
-  --> $DIR/ub-wide-ptr.rs:130:56
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/ub-wide-ptr.rs:130:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_INT: &dyn Trait = unsafe { mem::transmute((&92u8, &[1usize; 8])) };
-   |                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC21, but expected a vtable pointer
+   |
+   = 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: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
 
 error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:133:1
    |
 LL | const TRAIT_OBJ_BAD_DROP_FN_NOT_FN_PTR: W<&dyn Trait> = unsafe { mem::transmute(W((&92u8, &[&42u8; 8]))) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .0: encountered ALLOC23, but expected a vtable pointer
    |
    = 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: $SIZE, align: $ALIGN) {
@@ -273,24 +288,34 @@ error[E0080]: it is undefined behavior to use this value
   --> $DIR/ub-wide-ptr.rs:145:1
    |
 LL | const RAW_TRAIT_OBJ_VTABLE_INVALID: *const dyn Trait = unsafe { mem::transmute((&92u8, &3u64)) };
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered allocN, but expected a vtable pointer
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC28, but expected a vtable pointer
    |
    = 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: $SIZE, align: $ALIGN) {
                HEX_DUMP
            }
 
-error[E0080]: could not evaluate static initializer
-  --> $DIR/ub-wide-ptr.rs:151:5
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/ub-wide-ptr.rs:150:1
+   |
+LL | static mut RAW_TRAIT_OBJ_VTABLE_NULL_THROUGH_REF: *const dyn Trait = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered null pointer, but expected a vtable pointer
    |
-LL |     mem::transmute::<_, &dyn Trait>((&92u8, 0usize))
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds pointer use: null pointer is a dangling pointer (it has no provenance)
+   = 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: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
 
-error[E0080]: could not evaluate static initializer
-  --> $DIR/ub-wide-ptr.rs:155:5
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/ub-wide-ptr.rs:154:1
+   |
+LL | static mut RAW_TRAIT_OBJ_VTABLE_INVALID_THROUGH_REF: *const dyn Trait = unsafe {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value: encountered ALLOC31, but expected a vtable pointer
    |
-LL |     mem::transmute::<_, &dyn Trait>((&92u8, &3u64))
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using allocN as vtable pointer but it does not point to a vtable
+   = 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: $SIZE, align: $ALIGN) {
+               HEX_DUMP
+           }
 
 error: aborting due to 29 previous errors
 
diff --git a/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs b/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs
index afe645ae881..6c4f0a5accf 100644
--- a/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs
+++ b/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.rs
@@ -11,4 +11,5 @@ fn main() {
     //[thir]~^^ call to unsafe function `foo` is unsafe and requires unsafe function or block
     foo();
     //[mir]~^ ERROR call to unsafe function is unsafe and requires unsafe function or block
+    //[thir]~^^ ERROR call to unsafe function `foo` is unsafe and requires unsafe function or block
 }
diff --git a/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.thir.stderr b/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.thir.stderr
index b313f06539f..e6b8173eb05 100644
--- a/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.thir.stderr
+++ b/tests/ui/consts/const-extern-fn/const-extern-fn-requires-unsafe.thir.stderr
@@ -1,4 +1,12 @@
 error[E0133]: call to unsafe function `foo` is unsafe and requires unsafe function or block
+  --> $DIR/const-extern-fn-requires-unsafe.rs:12:5
+   |
+LL |     foo();
+   |     ^^^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function `foo` is unsafe and requires unsafe function or block
   --> $DIR/const-extern-fn-requires-unsafe.rs:9:17
    |
 LL |     let a: [u8; foo()];
@@ -6,6 +14,6 @@ LL |     let a: [u8; foo()];
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr
new file mode 100644
index 00000000000..33d4fec7016
--- /dev/null
+++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.32bit.stderr
@@ -0,0 +1,20 @@
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/mut_ref_in_final_dynamic_check.rs:17:1
+   |
+LL | const A: Option<&mut i32> = helper();
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered mutable reference in a `const`
+   |
+   = 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: 4, align: 4) {
+               2a 00 00 00                                     │ *...
+           }
+
+error: encountered dangling pointer in final constant
+  --> $DIR/mut_ref_in_final_dynamic_check.rs:24:1
+   |
+LL | const B: Option<&mut i32> = helper2();
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr
new file mode 100644
index 00000000000..9eb2675856f
--- /dev/null
+++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.64bit.stderr
@@ -0,0 +1,20 @@
+error[E0080]: it is undefined behavior to use this value
+  --> $DIR/mut_ref_in_final_dynamic_check.rs:17:1
+   |
+LL | const A: Option<&mut i32> = helper();
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^ constructing invalid value at .<enum-variant(Some)>.0: encountered mutable reference in a `const`
+   |
+   = 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: 8) {
+               2a 00 00 00 00 00 00 00                         │ *.......
+           }
+
+error: encountered dangling pointer in final constant
+  --> $DIR/mut_ref_in_final_dynamic_check.rs:24:1
+   |
+LL | const B: Option<&mut i32> = helper2();
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs
index 074beaab2c4..22e7a74e5fb 100644
--- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs
+++ b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.rs
@@ -1,3 +1,4 @@
+// stderr-per-bitwidth
 #![feature(const_mut_refs)]
 #![feature(raw_ref_op)]
 
@@ -9,17 +10,15 @@
 
 const fn helper() -> Option<&'static mut i32> { unsafe {
     // Undefined behaviour (integer as pointer), who doesn't love tests like this.
-    // This code never gets executed, because the static checks fail before that.
-    Some(&mut *(42 as *mut i32)) //~ ERROR evaluation of constant value failed
-    //~| 0x2a[noalloc] is a dangling pointer
+    Some(&mut *(42 as *mut i32))
 } }
 // The error is an evaluation error and not a validation error, so the error is reported
 // directly at the site where it occurs.
-const A: Option<&mut i32> = helper();
+const A: Option<&mut i32> = helper(); //~ ERROR it is undefined behavior to use this value
+//~^ encountered mutable reference in a `const`
 
 const fn helper2() -> Option<&'static mut i32> { unsafe {
     // Undefined behaviour (dangling pointer), who doesn't love tests like this.
-    // This code never gets executed, because the static checks fail before that.
     Some(&mut *(&mut 42 as *mut i32))
 } }
 const B: Option<&mut i32> = helper2(); //~ ERROR encountered dangling pointer in final constant
diff --git a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr b/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr
deleted file mode 100644
index 6e110dbdd64..00000000000
--- a/tests/ui/consts/const-mut-refs/mut_ref_in_final_dynamic_check.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error[E0080]: evaluation of constant value failed
-  --> $DIR/mut_ref_in_final_dynamic_check.rs:13:10
-   |
-LL |     Some(&mut *(42 as *mut i32))
-   |          ^^^^^^^^^^^^^^^^^^^^^^ dereferencing pointer failed: 0x2a[noalloc] is a dangling pointer (it has no provenance)
-   |
-note: inside `helper`
-  --> $DIR/mut_ref_in_final_dynamic_check.rs:13:10
-   |
-LL |     Some(&mut *(42 as *mut i32))
-   |          ^^^^^^^^^^^^^^^^^^^^^^
-note: inside `A`
-  --> $DIR/mut_ref_in_final_dynamic_check.rs:18:29
-   |
-LL | const A: Option<&mut i32> = helper();
-   |                             ^^^^^^^^
-
-error: encountered dangling pointer in final constant
-  --> $DIR/mut_ref_in_final_dynamic_check.rs:25:1
-   |
-LL | const B: Option<&mut i32> = helper2();
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/const-points-to-static.32bit.stderr b/tests/ui/consts/const-points-to-static.32bit.stderr
index c7a435a1ee3..12cc7fbb1fc 100644
--- a/tests/ui/consts/const-points-to-static.32bit.stderr
+++ b/tests/ui/consts/const-points-to-static.32bit.stderr
@@ -6,7 +6,7 @@ LL | const TEST: &u8 = &MY_STATIC;
    |
    = 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: 4, align: 4) {
-               ╾─alloc1──╼                                     │ ╾──╼
+               ╾ALLOC0╼                                     │ ╾──╼
            }
 
 warning: skipping const checks
diff --git a/tests/ui/consts/const-points-to-static.64bit.stderr b/tests/ui/consts/const-points-to-static.64bit.stderr
index 4d5b8eac541..86506e6ca01 100644
--- a/tests/ui/consts/const-points-to-static.64bit.stderr
+++ b/tests/ui/consts/const-points-to-static.64bit.stderr
@@ -6,7 +6,7 @@ LL | const TEST: &u8 = &MY_STATIC;
    |
    = 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: 8) {
-               ╾───────alloc1────────╼                         │ ╾──────╼
+               ╾ALLOC0╼                         │ ╾──────╼
            }
 
 warning: skipping const checks
diff --git a/tests/ui/consts/const-unsized.rs b/tests/ui/consts/const-unsized.rs
index 319b8ef97de..e0b06a27109 100644
--- a/tests/ui/consts/const-unsized.rs
+++ b/tests/ui/consts/const-unsized.rs
@@ -2,15 +2,19 @@ use std::fmt::Debug;
 
 const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
 //~^ ERROR the size for values of type
+//~| ERROR the size for values of type
 
 const CONST_FOO: str = *"foo";
 //~^ ERROR the size for values of type
+//~| ERROR the size for values of type
 
 static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
 //~^ ERROR the size for values of type
+//~| ERROR the size for values of type
 
 static STATIC_BAR: str = *"bar";
 //~^ ERROR the size for values of type
+//~| ERROR the size for values of type
 
 fn main() {
     println!("{:?} {:?} {:?} {:?}", &CONST_0, &CONST_FOO, &STATIC_1, &STATIC_BAR);
diff --git a/tests/ui/consts/const-unsized.stderr b/tests/ui/consts/const-unsized.stderr
index 27b200648eb..674f0cb99e7 100644
--- a/tests/ui/consts/const-unsized.stderr
+++ b/tests/ui/consts/const-unsized.stderr
@@ -7,7 +7,7 @@ LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
    = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/const-unsized.rs:6:18
+  --> $DIR/const-unsized.rs:7:18
    |
 LL | const CONST_FOO: str = *"foo";
    |                  ^^^ doesn't have a size known at compile-time
@@ -15,7 +15,7 @@ LL | const CONST_FOO: str = *"foo";
    = help: the trait `Sized` is not implemented for `str`
 
 error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
-  --> $DIR/const-unsized.rs:9:18
+  --> $DIR/const-unsized.rs:11:18
    |
 LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
    |                  ^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -23,13 +23,49 @@ LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
    = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/const-unsized.rs:12:20
+  --> $DIR/const-unsized.rs:15:20
    |
 LL | static STATIC_BAR: str = *"bar";
    |                    ^^^ doesn't have a size known at compile-time
    |
    = help: the trait `Sized` is not implemented for `str`
 
-error: aborting due to 4 previous errors
+error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
+  --> $DIR/const-unsized.rs:3:35
+   |
+LL | const CONST_0: dyn Debug + Sync = *(&0 as &(dyn Debug + Sync));
+   |                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
+   = note: constant expressions must have a statically known size
+
+error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/const-unsized.rs:7:24
+   |
+LL | const CONST_FOO: str = *"foo";
+   |                        ^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `str`
+   = note: constant expressions must have a statically known size
+
+error[E0277]: the size for values of type `(dyn Debug + Sync + 'static)` cannot be known at compilation time
+  --> $DIR/const-unsized.rs:11:37
+   |
+LL | static STATIC_1: dyn Debug + Sync = *(&1 as &(dyn Debug + Sync));
+   |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Debug + Sync + 'static)`
+   = note: constant expressions must have a statically known size
+
+error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/const-unsized.rs:15:26
+   |
+LL | static STATIC_BAR: str = *"bar";
+   |                          ^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `str`
+   = note: constant expressions must have a statically known size
+
+error: aborting due to 8 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/consts/const_discriminant.rs b/tests/ui/consts/const_discriminant.rs
index b1180faa697..80deb0f784d 100644
--- a/tests/ui/consts/const_discriminant.rs
+++ b/tests/ui/consts/const_discriminant.rs
@@ -1,5 +1,4 @@
 // run-pass
-#![feature(const_discriminant)]
 #![allow(dead_code)]
 
 use std::mem::{discriminant, Discriminant};
diff --git a/tests/ui/consts/copy-intrinsic.stderr b/tests/ui/consts/copy-intrinsic.stderr
index be41c2db398..0e4e6a6ad6c 100644
--- a/tests/ui/consts/copy-intrinsic.stderr
+++ b/tests/ui/consts/copy-intrinsic.stderr
@@ -2,13 +2,13 @@ error[E0080]: evaluation of constant value failed
   --> $DIR/copy-intrinsic.rs:27:5
    |
 LL |     copy_nonoverlapping(0x100 as *const i32, dangle, 0);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc5 has size 4, so pointer at offset 40 is out-of-bounds
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: ALLOC0 has size 4, so pointer at offset 40 is out-of-bounds
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/copy-intrinsic.rs:34:5
    |
 LL |     copy_nonoverlapping(dangle, 0x100 as *mut i32, 0);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: alloc7 has size 4, so pointer at offset 40 is out-of-bounds
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: ALLOC1 has size 4, so pointer at offset 40 is out-of-bounds
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/copy-intrinsic.rs:41:5
diff --git a/tests/ui/consts/effect_param.rs b/tests/ui/consts/effect_param.rs
new file mode 100644
index 00000000000..f11ec739fce
--- /dev/null
+++ b/tests/ui/consts/effect_param.rs
@@ -0,0 +1,11 @@
+//! Ensure we don't allow accessing const effect parameters from stable Rust.
+
+fn main() {
+    i8::checked_sub::<true>(42, 43);
+    //~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
+}
+
+const FOO: () = {
+    i8::checked_sub::<false>(42, 43);
+    //~^ ERROR: method takes 0 generic arguments but 1 generic argument was supplied
+};
diff --git a/tests/ui/consts/effect_param.stderr b/tests/ui/consts/effect_param.stderr
new file mode 100644
index 00000000000..f8c4bfc02e5
--- /dev/null
+++ b/tests/ui/consts/effect_param.stderr
@@ -0,0 +1,19 @@
+error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/effect_param.rs:9:9
+   |
+LL |     i8::checked_sub::<false>(42, 43);
+   |         ^^^^^^^^^^^--------- help: remove these generics
+   |         |
+   |         expected 0 generic arguments
+
+error[E0107]: method takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/effect_param.rs:4:9
+   |
+LL |     i8::checked_sub::<true>(42, 43);
+   |         ^^^^^^^^^^^-------- help: remove these generics
+   |         |
+   |         expected 0 generic arguments
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0107`.
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 37b37e9659e..39f918379d1 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,7 @@
 // revisions: no_flag with_flag
 // [no_flag] check-pass
 // [with_flag] compile-flags: -Zextra-const-ub-checks
-#![feature(never_type, pointer_byte_offsets)]
+#![feature(never_type)]
 
 use std::mem::transmute;
 use std::ptr::addr_of;
@@ -88,4 +88,15 @@ const PARTIAL_POINTER: () = unsafe {
 const VALID_ENUM1: E = { let e = E::A; e };
 const VALID_ENUM2: Result<&'static [u8], ()> = { let e = Err(()); e };
 
+// Htting the (non-integer) array code in validation with an immediate local.
+const VALID_ARRAY: [Option<i32>; 0] = { let e = [None; 0]; e };
+
+// Detecting oversized references.
+const OVERSIZED_REF: () = { unsafe {
+    let slice: *const [u8] = transmute((1usize, usize::MAX));
+    let _val = &*slice;
+    //[with_flag]~^ ERROR: evaluation of constant value failed
+    //[with_flag]~| slice is bigger than largest supported object
+} };
+
 fn main() {}
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 4ee12d501e8..0100aafb6b7 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
@@ -52,6 +52,12 @@ LL |     let _val = *(&mem as *const Align as *const [*const u8; 2]);
    = help: this code performed an operation that depends on the underlying bytes representing a pointer
    = help: the absolute address of a pointer is not known at compile-time, so such operations are not supported
 
-error: aborting due to 7 previous errors
+error[E0080]: evaluation of constant value failed
+  --> $DIR/detect-extra-ub.rs:97:16
+   |
+LL |     let _val = &*slice;
+   |                ^^^^^^^ constructing invalid value: encountered invalid reference metadata: slice is bigger than largest supported object
+
+error: aborting due to 8 previous errors
 
 For more information about this error, try `rustc --explain E0080`.
diff --git a/tests/ui/consts/invalid-union.32bit.stderr b/tests/ui/consts/invalid-union.32bit.stderr
index 0c57751cbfa..32b67a13061 100644
--- a/tests/ui/consts/invalid-union.32bit.stderr
+++ b/tests/ui/consts/invalid-union.32bit.stderr
@@ -6,7 +6,7 @@ LL | fn main() {
    |
    = 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: 4, align: 4) {
-               ╾─alloc7──╼                                     │ ╾──╼
+               ╾ALLOC0╼                                     │ ╾──╼
            }
 
 note: erroneous constant encountered
diff --git a/tests/ui/consts/invalid-union.64bit.stderr b/tests/ui/consts/invalid-union.64bit.stderr
index 6c4d5882158..45f999eb23c 100644
--- a/tests/ui/consts/invalid-union.64bit.stderr
+++ b/tests/ui/consts/invalid-union.64bit.stderr
@@ -6,7 +6,7 @@ LL | fn main() {
    |
    = 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: 8) {
-               ╾───────alloc7────────╼                         │ ╾──────╼
+               ╾ALLOC0╼                         │ ╾──────╼
            }
 
 note: erroneous constant encountered
diff --git a/tests/ui/consts/issue-116186.rs b/tests/ui/consts/issue-116186.rs
new file mode 100644
index 00000000000..a77c38c64dc
--- /dev/null
+++ b/tests/ui/consts/issue-116186.rs
@@ -0,0 +1,12 @@
+#![allow(incomplete_features)]
+#![feature(generic_const_exprs)]
+
+fn something(path: [usize; N]) -> impl Clone {
+    //~^ ERROR cannot find value `N` in this scope
+    match path {
+        [] => 0, //~ ERROR cannot pattern-match on an array without a fixed length
+        _ => 1,
+    };
+}
+
+fn main() {}
diff --git a/tests/ui/consts/issue-116186.stderr b/tests/ui/consts/issue-116186.stderr
new file mode 100644
index 00000000000..e6eae2d9f55
--- /dev/null
+++ b/tests/ui/consts/issue-116186.stderr
@@ -0,0 +1,21 @@
+error[E0425]: cannot find value `N` in this scope
+  --> $DIR/issue-116186.rs:4:28
+   |
+LL | fn something(path: [usize; N]) -> impl Clone {
+   |                            ^ not found in this scope
+   |
+help: you might be missing a const parameter
+   |
+LL | fn something<const N: /* Type */>(path: [usize; N]) -> impl Clone {
+   |             +++++++++++++++++++++
+
+error[E0730]: cannot pattern-match on an array without a fixed length
+  --> $DIR/issue-116186.rs:7:9
+   |
+LL |         [] => 0,
+   |         ^^
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0425, E0730.
+For more information about an error, try `rustc --explain E0425`.
diff --git a/tests/ui/consts/issue-39974.rs b/tests/ui/consts/issue-39974.rs
index 503647ef4a8..9cb180014b8 100644
--- a/tests/ui/consts/issue-39974.rs
+++ b/tests/ui/consts/issue-39974.rs
@@ -1,4 +1,5 @@
 const LENGTH: f64 = 2;
+//~^ ERROR mismatched types
 
 struct Thing {
     f: [[f64; 2]; LENGTH],
diff --git a/tests/ui/consts/issue-39974.stderr b/tests/ui/consts/issue-39974.stderr
index 56365e51e0a..4bde599039e 100644
--- a/tests/ui/consts/issue-39974.stderr
+++ b/tests/ui/consts/issue-39974.stderr
@@ -1,9 +1,18 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-39974.rs:4:19
+  --> $DIR/issue-39974.rs:5:19
    |
 LL |     f: [[f64; 2]; LENGTH],
    |                   ^^^^^^ expected `usize`, found `f64`
 
-error: aborting due to previous error
+error[E0308]: mismatched types
+  --> $DIR/issue-39974.rs:1:21
+   |
+LL | const LENGTH: f64 = 2;
+   |                     ^
+   |                     |
+   |                     expected `f64`, found integer
+   |                     help: use a float literal: `2.0`
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/consts/issue-63952.32bit.stderr b/tests/ui/consts/issue-63952.32bit.stderr
index 755c7fb7d4d..5375ec1188a 100644
--- a/tests/ui/consts/issue-63952.32bit.stderr
+++ b/tests/ui/consts/issue-63952.32bit.stderr
@@ -6,7 +6,7 @@ LL | const SLICE_WAY_TOO_LONG: &[u8] = unsafe {
    |
    = 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) {
-               ╾─alloc4──╼ ff ff ff ff                         │ ╾──╼....
+               ╾ALLOC0╼ ff ff ff ff                         │ ╾──╼....
            }
 
 error: aborting due to previous error
diff --git a/tests/ui/consts/issue-63952.64bit.stderr b/tests/ui/consts/issue-63952.64bit.stderr
index abdb9a4f792..a6edbf9321b 100644
--- a/tests/ui/consts/issue-63952.64bit.stderr
+++ b/tests/ui/consts/issue-63952.64bit.stderr
@@ -6,7 +6,7 @@ LL | const SLICE_WAY_TOO_LONG: &[u8] = unsafe {
    |
    = 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) {
-               ╾───────alloc4────────╼ ff ff ff ff ff ff ff ff │ ╾──────╼........
+               ╾ALLOC0╼ ff ff ff ff ff ff ff ff │ ╾──────╼........
            }
 
 error: aborting due to previous error
diff --git a/tests/ui/consts/issue-79690.64bit.stderr b/tests/ui/consts/issue-79690.64bit.stderr
index b8798a9755f..af59729d438 100644
--- a/tests/ui/consts/issue-79690.64bit.stderr
+++ b/tests/ui/consts/issue-79690.64bit.stderr
@@ -6,7 +6,7 @@ LL | const G: Fat = unsafe { Transmute { t: FOO }.u };
    |
    = 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) {
-               ╾───────alloc3────────╼ ╾───────alloc4────────╼ │ ╾──────╼╾──────╼
+               ╾ALLOC0╼ ╾ALLOC1╼ │ ╾──────╼╾──────╼
            }
 
 error: aborting due to previous error
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr
index a6f467b9ef4..4a3344a5b04 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.32bit.stderr
@@ -24,7 +24,7 @@ LL | const REF_INTERIOR_MUT: &usize = {
    |
    = 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: 4, align: 4) {
-               ╾─alloc4──╼                                     │ ╾──╼
+               ╾ALLOC0╼                                     │ ╾──╼
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -35,7 +35,7 @@ LL | const READ_IMMUT: &usize = {
    |
    = 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: 4, align: 4) {
-               ╾─alloc5──╼                                     │ ╾──╼
+               ╾ALLOC1╼                                     │ ╾──╼
            }
 
 warning: skipping const checks
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr
index cfaf31a6e0c..7573bfa39ec 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static.64bit.stderr
@@ -24,7 +24,7 @@ LL | const REF_INTERIOR_MUT: &usize = {
    |
    = 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: 8) {
-               ╾───────alloc4────────╼                         │ ╾──────╼
+               ╾ALLOC0╼                         │ ╾──────╼
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -35,7 +35,7 @@ LL | const READ_IMMUT: &usize = {
    |
    = 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: 8) {
-               ╾───────alloc5────────╼                         │ ╾──────╼
+               ╾ALLOC1╼                         │ ╾──────╼
            }
 
 warning: skipping const checks
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
index e3a0d93f09b..492d8718a13 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.32bit.stderr
@@ -6,7 +6,7 @@ LL | const SLICE_MUT: &[u8; 1] = {
    |
    = 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: 4, align: 4) {
-               ╾─alloc1──╼                                     │ ╾──╼
+               ╾ALLOC0╼                                     │ ╾──╼
            }
 
 error: could not evaluate constant pattern
@@ -23,7 +23,7 @@ LL | const U8_MUT: &u8 = {
    |
    = 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: 4, align: 4) {
-               ╾─alloc1──╼                                     │ ╾──╼
+               ╾ALLOC0╼                                     │ ╾──╼
            }
 
 error: could not evaluate constant pattern
@@ -108,6 +108,11 @@ help: skipping check that does not even have a feature gate
    |
 LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: skipping check that does not even have a feature gate
+  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+   |
+LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 8 previous errors; 1 warning emitted
 
diff --git a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
index a323e9a05f0..f6d82d6c0ba 100644
--- a/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
+++ b/tests/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.64bit.stderr
@@ -6,7 +6,7 @@ LL | const SLICE_MUT: &[u8; 1] = {
    |
    = 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: 8) {
-               ╾───────alloc1────────╼                         │ ╾──────╼
+               ╾ALLOC0╼                         │ ╾──────╼
            }
 
 error: could not evaluate constant pattern
@@ -23,7 +23,7 @@ LL | const U8_MUT: &u8 = {
    |
    = 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: 8) {
-               ╾───────alloc1────────╼                         │ ╾──────╼
+               ╾ALLOC0╼                         │ ╾──────╼
            }
 
 error: could not evaluate constant pattern
@@ -108,6 +108,11 @@ help: skipping check that does not even have a feature gate
    |
 LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: skipping check that does not even have a feature gate
+  --> $DIR/const_refers_to_static_cross_crate.rs:27:20
+   |
+LL |     unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
+   |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 8 previous errors; 1 warning emitted
 
diff --git a/tests/ui/consts/miri_unleashed/mutable_references_err.32bit.stderr b/tests/ui/consts/miri_unleashed/mutable_references_err.32bit.stderr
index 0ea1792409b..c9da91a9597 100644
--- a/tests/ui/consts/miri_unleashed/mutable_references_err.32bit.stderr
+++ b/tests/ui/consts/miri_unleashed/mutable_references_err.32bit.stderr
@@ -6,7 +6,7 @@ LL | const MUH: Meh = Meh {
    |
    = 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: 4, align: 4) {
-               ╾─alloc3──╼                                     │ ╾──╼
+               ╾ALLOC0╼                                     │ ╾──╼
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -17,7 +17,7 @@ LL | const SNEAKY: &dyn Sync = &Synced { x: UnsafeCell::new(42) };
    |
    = 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) {
-               ╾─alloc7──╼ ╾─alloc8──╼                         │ ╾──╼╾──╼
+               ╾ALLOC1╼ ╾ALLOC2╼                         │ ╾──╼╾──╼
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -28,7 +28,7 @@ LL | const BLUNT: &mut i32 = &mut 42;
    |
    = 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: 4, align: 4) {
-               ╾─alloc10─╼                                     │ ╾──╼
+               ╾ALLOC3╼                                     │ ╾──╼
            }
 
 warning: skipping const checks
diff --git a/tests/ui/consts/miri_unleashed/mutable_references_err.64bit.stderr b/tests/ui/consts/miri_unleashed/mutable_references_err.64bit.stderr
index 67959d25634..71be616b7ed 100644
--- a/tests/ui/consts/miri_unleashed/mutable_references_err.64bit.stderr
+++ b/tests/ui/consts/miri_unleashed/mutable_references_err.64bit.stderr
@@ -6,7 +6,7 @@ LL | const MUH: Meh = Meh {
    |
    = 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: 8) {
-               ╾───────alloc3────────╼                         │ ╾──────╼
+               ╾ALLOC0╼                         │ ╾──────╼
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -17,7 +17,7 @@ LL | const SNEAKY: &dyn Sync = &Synced { x: UnsafeCell::new(42) };
    |
    = 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) {
-               ╾───────alloc7────────╼ ╾───────alloc8────────╼ │ ╾──────╼╾──────╼
+               ╾ALLOC1╼ ╾ALLOC2╼ │ ╾──────╼╾──────╼
            }
 
 error[E0080]: it is undefined behavior to use this value
@@ -28,7 +28,7 @@ LL | const BLUNT: &mut i32 = &mut 42;
    |
    = 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: 8) {
-               ╾───────alloc10───────╼                         │ ╾──────╼
+               ╾ALLOC3╼                         │ ╾──────╼
            }
 
 warning: skipping const checks
diff --git a/tests/ui/consts/miri_unleashed/ptr_arith.rs b/tests/ui/consts/miri_unleashed/ptr_arith.rs
index 5cda3c41152..e59c6725269 100644
--- a/tests/ui/consts/miri_unleashed/ptr_arith.rs
+++ b/tests/ui/consts/miri_unleashed/ptr_arith.rs
@@ -1,5 +1,4 @@
 // compile-flags: -Zunleash-the-miri-inside-of-you
-#![feature(core_intrinsics, pointer_byte_offsets)]
 
 // During CTFE, we prevent pointer-to-int casts.
 // Pointer comparisons are prevented in the trait system.
diff --git a/tests/ui/consts/miri_unleashed/ptr_arith.stderr b/tests/ui/consts/miri_unleashed/ptr_arith.stderr
index 25ca6bc4eaa..213966f90b8 100644
--- a/tests/ui/consts/miri_unleashed/ptr_arith.stderr
+++ b/tests/ui/consts/miri_unleashed/ptr_arith.stderr
@@ -1,11 +1,11 @@
 error[E0080]: could not evaluate static initializer
-  --> $DIR/ptr_arith.rs:8:13
+  --> $DIR/ptr_arith.rs:7:13
    |
 LL |     let x = &0 as *const _ as usize;
    |             ^^^^^^^^^^^^^^^^^^^^^^^ exposing pointers is not possible at compile-time
 
 error[E0080]: could not evaluate static initializer
-  --> $DIR/ptr_arith.rs:16:14
+  --> $DIR/ptr_arith.rs:15:14
    |
 LL |     let _v = x + 0;
    |              ^ unable to turn pointer into integer
@@ -16,7 +16,7 @@ LL |     let _v = x + 0;
 warning: skipping const checks
    |
 help: skipping check that does not even have a feature gate
-  --> $DIR/ptr_arith.rs:8:13
+  --> $DIR/ptr_arith.rs:7:13
    |
 LL |     let x = &0 as *const _ as usize;
    |             ^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/consts/missing_span_in_backtrace.rs b/tests/ui/consts/missing_span_in_backtrace.rs
index dd2b81c5af2..1ac3777f5fe 100644
--- a/tests/ui/consts/missing_span_in_backtrace.rs
+++ b/tests/ui/consts/missing_span_in_backtrace.rs
@@ -1,5 +1,5 @@
 // compile-flags: -Z ui-testing=no
-// normalize-stderr-test "alloc[0-9]+" -> "ALLOC_ID"
+
 
 #![feature(const_swap)]
 #![feature(const_mut_refs)]
diff --git a/tests/ui/consts/missing_span_in_backtrace.stderr b/tests/ui/consts/missing_span_in_backtrace.stderr
index fcfb9fbb3f8..6860cee4184 100644
--- a/tests/ui/consts/missing_span_in_backtrace.stderr
+++ b/tests/ui/consts/missing_span_in_backtrace.stderr
@@ -1,7 +1,7 @@
 error[E0080]: evaluation of constant value failed
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
    |
-   = note: unable to copy parts of a pointer from memory at ALLOC_ID
+   = note: unable to copy parts of a pointer from memory at ALLOC0
    |
 note: inside `std::ptr::read::<MaybeUninit<MaybeUninit<u8>>>`
   --> $SRC_DIR/core/src/ptr/mod.rs:LL:COL
diff --git a/tests/ui/consts/offset_from_ub.stderr b/tests/ui/consts/offset_from_ub.stderr
index 97ff6efdd79..1ef727e5b0f 100644
--- a/tests/ui/consts/offset_from_ub.stderr
+++ b/tests/ui/consts/offset_from_ub.stderr
@@ -39,19 +39,19 @@ error[E0080]: evaluation of constant value failed
   --> $DIR/offset_from_ub.rs:53:14
    |
 LL |     unsafe { ptr_offset_from(end_ptr, start_ptr) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds `offset_from`: alloc17 has size 4, so pointer to 10 bytes starting at offset 0 is out-of-bounds
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds `offset_from`: ALLOC0 has size 4, so pointer to 10 bytes starting at offset 0 is out-of-bounds
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/offset_from_ub.rs:62:14
    |
 LL |     unsafe { ptr_offset_from(start_ptr, end_ptr) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds `offset_from`: alloc20 has size 4, so pointer to 10 bytes starting at offset 0 is out-of-bounds
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds `offset_from`: ALLOC1 has size 4, so pointer to 10 bytes starting at offset 0 is out-of-bounds
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/offset_from_ub.rs:70:14
    |
 LL |     unsafe { ptr_offset_from(end_ptr, end_ptr) }
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds `offset_from`: alloc23 has size 4, so pointer at offset 10 is out-of-bounds
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ out-of-bounds `offset_from`: ALLOC2 has size 4, so pointer at offset 10 is out-of-bounds
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/offset_from_ub.rs:79:14
diff --git a/tests/ui/consts/offset_ub.rs b/tests/ui/consts/offset_ub.rs
index 1b01e4fd147..db28a6c6a2b 100644
--- a/tests/ui/consts/offset_ub.rs
+++ b/tests/ui/consts/offset_ub.rs
@@ -1,6 +1,6 @@
 use std::ptr;
 
-// normalize-stderr-test "alloc\d+" -> "allocN"
+
 // normalize-stderr-test "0x7f+" -> "0x7f..f"
 
 
diff --git a/tests/ui/consts/offset_ub.stderr b/tests/ui/consts/offset_ub.stderr
index c0c851df507..8bc59d50ee4 100644
--- a/tests/ui/consts/offset_ub.stderr
+++ b/tests/ui/consts/offset_ub.stderr
@@ -14,7 +14,7 @@ LL | pub const BEFORE_START: *const u8 = unsafe { (&0u8 as *const u8).offset(-1)
 error[E0080]: evaluation of constant value failed
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
    |
-   = note: out-of-bounds pointer arithmetic: allocN has size 1, so pointer to 2 bytes starting at offset 0 is out-of-bounds
+   = note: out-of-bounds pointer arithmetic: ALLOC0 has size 1, so pointer to 2 bytes starting at offset 0 is out-of-bounds
    |
 note: inside `ptr::const_ptr::<impl *const u8>::offset`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -27,7 +27,7 @@ LL | pub const AFTER_END: *const u8 = unsafe { (&0u8 as *const u8).offset(2) };
 error[E0080]: evaluation of constant value failed
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
    |
-   = note: out-of-bounds pointer arithmetic: allocN has size 100, so pointer to 101 bytes starting at offset 0 is out-of-bounds
+   = note: out-of-bounds pointer arithmetic: ALLOC1 has size 100, so pointer to 101 bytes starting at offset 0 is out-of-bounds
    |
 note: inside `ptr::const_ptr::<impl *const u8>::offset`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -92,7 +92,7 @@ LL | pub const UNDERFLOW_ADDRESS_SPACE: *const u8 = unsafe { (1 as *const u8).of
 error[E0080]: evaluation of constant value failed
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
    |
-   = note: out-of-bounds pointer arithmetic: allocN has size 1, so pointer to 2 bytes starting at offset -4 is out-of-bounds
+   = note: out-of-bounds pointer arithmetic: ALLOC2 has size 1, so pointer to 2 bytes starting at offset -4 is out-of-bounds
    |
 note: inside `ptr::const_ptr::<impl *const u8>::offset`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
@@ -105,7 +105,7 @@ LL | pub const NEGATIVE_OFFSET: *const u8 = unsafe { [0u8; 1].as_ptr().wrapping_
 error[E0080]: evaluation of constant value failed
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
    |
-   = note: out-of-bounds pointer arithmetic: allocN has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds
+   = note: out-of-bounds pointer arithmetic: ALLOC3 has size 0, so pointer to 1 byte starting at offset 0 is out-of-bounds
    |
 note: inside `ptr::const_ptr::<impl *const u8>::offset`
   --> $SRC_DIR/core/src/ptr/const_ptr.rs:LL:COL
diff --git a/tests/ui/generator/addassign-yield.rs b/tests/ui/coroutine/addassign-yield.rs
index 66f22bf31fc..919a559f85b 100644
--- a/tests/ui/generator/addassign-yield.rs
+++ b/tests/ui/coroutine/addassign-yield.rs
@@ -5,7 +5,7 @@
 // is being used), we were failing to account for all types that might
 // possibly be live across a yield point.
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn foo() {
     let _x = static || {
diff --git a/tests/ui/coroutine/async-coroutine-issue-67158.rs b/tests/ui/coroutine/async-coroutine-issue-67158.rs
new file mode 100644
index 00000000000..420454656d4
--- /dev/null
+++ b/tests/ui/coroutine/async-coroutine-issue-67158.rs
@@ -0,0 +1,6 @@
+#![feature(coroutines)]
+// edition:2018
+// Regression test for #67158.
+fn main() {
+    async { yield print!(":C") }; //~ ERROR `async` coroutines are not yet supported
+}
diff --git a/tests/ui/generator/async-generator-issue-67158.stderr b/tests/ui/coroutine/async-coroutine-issue-67158.stderr
index 7270d188e8b..d583d3d5ea0 100644
--- a/tests/ui/generator/async-generator-issue-67158.stderr
+++ b/tests/ui/coroutine/async-coroutine-issue-67158.stderr
@@ -1,5 +1,5 @@
-error[E0727]: `async` generators are not yet supported
-  --> $DIR/async-generator-issue-67158.rs:5:13
+error[E0727]: `async` coroutines are not yet supported
+  --> $DIR/async-coroutine-issue-67158.rs:5:13
    |
 LL |     async { yield print!(":C") };
    |             ^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/generator/auto-trait-regions.rs b/tests/ui/coroutine/auto-trait-regions.rs
index aa4218e13a4..5fce70e8e54 100644
--- a/tests/ui/generator/auto-trait-regions.rs
+++ b/tests/ui/coroutine/auto-trait-regions.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 #![feature(auto_traits)]
 #![feature(negative_impls)]
 
@@ -21,7 +21,7 @@ impl<'a> Foo for &'a OnlyFooIfRef {}
 fn assert_foo<T: Foo>(f: T) {}
 
 fn main() {
-    // Make sure 'static is erased for generator interiors so we can't match it in trait selection
+    // Make sure 'static is erased for coroutine interiors so we can't match it in trait selection
     let x: &'static _ = &OnlyFooIfStaticRef(No);
     let gen = move || {
         let x = x;
@@ -40,7 +40,7 @@ fn main() {
     };
     assert_foo(gen); // ok
 
-    // Disallow impls which relates lifetimes in the generator interior
+    // Disallow impls which relates lifetimes in the coroutine interior
     let gen = move || {
         let a = A(&mut true, &mut true, No);
         //~^ temporary value dropped while borrowed
diff --git a/tests/ui/generator/auto-trait-regions.stderr b/tests/ui/coroutine/auto-trait-regions.stderr
index a9a0bde2ba0..a9a0bde2ba0 100644
--- a/tests/ui/generator/auto-trait-regions.stderr
+++ b/tests/ui/coroutine/auto-trait-regions.stderr
diff --git a/tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs b/tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs
new file mode 100644
index 00000000000..dc052185340
--- /dev/null
+++ b/tests/ui/coroutine/auxiliary/metadata-sufficient-for-layout.rs
@@ -0,0 +1,11 @@
+// compile-flags: --emit metadata
+#![feature(coroutines, coroutine_trait)]
+
+use std::marker::Unpin;
+use std::ops::Coroutine;
+
+pub fn g() -> impl Coroutine<(), Yield = (), Return = ()> {
+    || {
+        yield;
+    }
+}
diff --git a/tests/ui/coroutine/auxiliary/xcrate-reachable.rs b/tests/ui/coroutine/auxiliary/xcrate-reachable.rs
new file mode 100644
index 00000000000..673153f0619
--- /dev/null
+++ b/tests/ui/coroutine/auxiliary/xcrate-reachable.rs
@@ -0,0 +1,14 @@
+#![feature(coroutines, coroutine_trait)]
+
+use std::ops::Coroutine;
+
+fn msg() -> u32 {
+    0
+}
+
+pub fn foo() -> impl Coroutine<(), Yield = (), Return = u32> {
+    || {
+        yield;
+        return msg();
+    }
+}
diff --git a/tests/ui/coroutine/auxiliary/xcrate.rs b/tests/ui/coroutine/auxiliary/xcrate.rs
new file mode 100644
index 00000000000..f749a95ad35
--- /dev/null
+++ b/tests/ui/coroutine/auxiliary/xcrate.rs
@@ -0,0 +1,18 @@
+#![feature(coroutines, coroutine_trait)]
+
+use std::marker::Unpin;
+use std::ops::Coroutine;
+
+pub fn foo() -> impl Coroutine<(), Yield = (), Return = ()> {
+    || {
+        if false {
+            yield;
+        }
+    }
+}
+
+pub fn bar<T: 'static>(t: T) -> Box<Coroutine<(), Yield = T, Return = ()> + Unpin> {
+    Box::new(|| {
+        yield t;
+    })
+}
diff --git a/tests/ui/generator/borrow-in-tail-expr.rs b/tests/ui/coroutine/borrow-in-tail-expr.rs
index 540f5e3e1dd..c1497ad2911 100644
--- a/tests/ui/generator/borrow-in-tail-expr.rs
+++ b/tests/ui/coroutine/borrow-in-tail-expr.rs
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
     let _a = || {
diff --git a/tests/ui/generator/borrowing.rs b/tests/ui/coroutine/borrowing.rs
index d36592583cd..778eed8bd0d 100644
--- a/tests/ui/generator/borrowing.rs
+++ b/tests/ui/coroutine/borrowing.rs
@@ -1,6 +1,6 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 
 fn main() {
diff --git a/tests/ui/coroutine/borrowing.stderr b/tests/ui/coroutine/borrowing.stderr
new file mode 100644
index 00000000000..acd4cdafdfd
--- /dev/null
+++ b/tests/ui/coroutine/borrowing.stderr
@@ -0,0 +1,31 @@
+error[E0597]: `a` does not live long enough
+  --> $DIR/borrowing.rs:9: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 coroutine
+LL |
+LL |     };
+   |     - `a` dropped here while still borrowed
+
+error[E0597]: `a` does not live long enough
+  --> $DIR/borrowing.rs:16:20
+   |
+LL |     let _b = {
+   |         -- borrow later stored here
+LL |         let a = 3;
+LL |         || {
+   |         -- value captured here by coroutine
+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/clone-impl-async.rs b/tests/ui/coroutine/clone-impl-async.rs
index 9e9b59d3633..e8e82f1994d 100644
--- a/tests/ui/generator/clone-impl-async.rs
+++ b/tests/ui/coroutine/clone-impl-async.rs
@@ -1,8 +1,8 @@
 // edition:2021
-// gate-test-generator_clone
-// Verifies that feature(generator_clone) doesn't allow async blocks to be cloned/copied.
+// gate-test-coroutine_clone
+// Verifies that feature(coroutine_clone) doesn't allow async blocks to be cloned/copied.
 
-#![feature(generators, generator_clone)]
+#![feature(coroutines, coroutine_clone)]
 
 use std::future::ready;
 
diff --git a/tests/ui/generator/clone-impl-async.stderr b/tests/ui/coroutine/clone-impl-async.stderr
index d172dff3abd..d172dff3abd 100644
--- a/tests/ui/generator/clone-impl-async.stderr
+++ b/tests/ui/coroutine/clone-impl-async.stderr
diff --git a/tests/ui/generator/clone-impl-static.rs b/tests/ui/coroutine/clone-impl-static.rs
index 55ed0f281e0..9a165cf4672 100644
--- a/tests/ui/generator/clone-impl-static.rs
+++ b/tests/ui/coroutine/clone-impl-static.rs
@@ -1,7 +1,7 @@
-// gate-test-generator_clone
-// Verifies that static generators cannot be cloned/copied.
+// gate-test-coroutine_clone
+// Verifies that static coroutines cannot be cloned/copied.
 
-#![feature(generators, generator_clone)]
+#![feature(coroutines, coroutine_clone)]
 
 fn main() {
     let gen = static move || {
diff --git a/tests/ui/generator/clone-impl-static.stderr b/tests/ui/coroutine/clone-impl-static.stderr
index 8b51824c7d2..8fa9fb12bf6 100644
--- a/tests/ui/generator/clone-impl-static.stderr
+++ b/tests/ui/coroutine/clone-impl-static.stderr
@@ -1,8 +1,8 @@
-error[E0277]: the trait bound `{static generator@$DIR/clone-impl-static.rs:7:15: 7:29}: Copy` is not satisfied
+error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:7:15: 7:29}: Copy` is not satisfied
   --> $DIR/clone-impl-static.rs:10:16
    |
 LL |     check_copy(&gen);
-   |     ---------- ^^^^ the trait `Copy` is not implemented for `{static generator@$DIR/clone-impl-static.rs:7:15: 7:29}`
+   |     ---------- ^^^^ the trait `Copy` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:7:15: 7:29}`
    |     |
    |     required by a bound introduced by this call
    |
@@ -12,11 +12,11 @@ note: required by a bound in `check_copy`
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `{static generator@$DIR/clone-impl-static.rs:7:15: 7:29}: Clone` is not satisfied
+error[E0277]: the trait bound `{static coroutine@$DIR/clone-impl-static.rs:7:15: 7:29}: Clone` is not satisfied
   --> $DIR/clone-impl-static.rs:12:17
    |
 LL |     check_clone(&gen);
-   |     ----------- ^^^^ the trait `Clone` is not implemented for `{static generator@$DIR/clone-impl-static.rs:7:15: 7:29}`
+   |     ----------- ^^^^ the trait `Clone` is not implemented for `{static coroutine@$DIR/clone-impl-static.rs:7:15: 7:29}`
    |     |
    |     required by a bound introduced by this call
    |
diff --git a/tests/ui/generator/clone-impl.rs b/tests/ui/coroutine/clone-impl.rs
index cbfd65a5309..eed6f851bd0 100644
--- a/tests/ui/generator/clone-impl.rs
+++ b/tests/ui/coroutine/clone-impl.rs
@@ -1,8 +1,8 @@
-// gate-test-generator_clone
-// Verifies that non-static generators can be cloned/copied if all their upvars and locals held
+// gate-test-coroutine_clone
+// Verifies that non-static coroutines can be cloned/copied if all their upvars and locals held
 // across awaits can be cloned/copied.
 
-#![feature(generators, generator_clone)]
+#![feature(coroutines, coroutine_clone)]
 
 struct NonClone;
 
diff --git a/tests/ui/generator/clone-impl.stderr b/tests/ui/coroutine/clone-impl.stderr
index 870216398b1..82a6d0495c0 100644
--- a/tests/ui/generator/clone-impl.stderr
+++ b/tests/ui/coroutine/clone-impl.stderr
@@ -1,11 +1,11 @@
-error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{generator@$DIR/clone-impl.rs:36:23: 36:30}`
+error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
   --> $DIR/clone-impl.rs:42:5
    |
 LL |     let gen_clone_0 = move || {
-   |                       ------- within this `{generator@$DIR/clone-impl.rs:36:23: 36:30}`
+   |                       ------- within this `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
 ...
 LL |     check_copy(&gen_clone_0);
-   |     ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<u32>`
+   |     ^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<u32>`
    |
 note: captured value does not implement `Copy`
   --> $DIR/clone-impl.rs:40:14
@@ -18,16 +18,16 @@ note: required by a bound in `check_copy`
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{generator@$DIR/clone-impl.rs:36:23: 36:30}`
+error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
   --> $DIR/clone-impl.rs:42:5
    |
 LL |     let gen_clone_0 = move || {
-   |                       ------- within this `{generator@$DIR/clone-impl.rs:36:23: 36:30}`
+   |                       ------- within this `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`
 ...
 LL |     check_copy(&gen_clone_0);
-   |     ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<char>`
+   |     ^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:36:23: 36:30}`, the trait `Copy` is not implemented for `Vec<char>`
    |
-note: generator does not implement `Copy` as this value is used across a yield
+note: coroutine does not implement `Copy` as this value is used across a yield
   --> $DIR/clone-impl.rs:38:9
    |
 LL |         let v = vec!['a'];
@@ -40,14 +40,14 @@ note: required by a bound in `check_copy`
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{generator@$DIR/clone-impl.rs:46:23: 46:30}`
+error[E0277]: the trait bound `Vec<u32>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
   --> $DIR/clone-impl.rs:58:5
    |
 LL |     let gen_clone_1 = move || {
-   |                       ------- within this `{generator@$DIR/clone-impl.rs:46:23: 46:30}`
+   |                       ------- within this `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
 ...
 LL |     check_copy(&gen_clone_1);
-   |     ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<u32>`
+   |     ^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<u32>`
    |
 note: captured value does not implement `Copy`
   --> $DIR/clone-impl.rs:56:14
@@ -60,16 +60,16 @@ note: required by a bound in `check_copy`
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{generator@$DIR/clone-impl.rs:46:23: 46:30}`
+error[E0277]: the trait bound `Vec<char>: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
   --> $DIR/clone-impl.rs:58:5
    |
 LL |     let gen_clone_1 = move || {
-   |                       ------- within this `{generator@$DIR/clone-impl.rs:46:23: 46:30}`
+   |                       ------- within this `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`
 ...
 LL |     check_copy(&gen_clone_1);
-   |     ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<char>`
+   |     ^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:46:23: 46:30}`, the trait `Copy` is not implemented for `Vec<char>`
    |
-note: generator does not implement `Copy` as this value is used across a yield
+note: coroutine does not implement `Copy` as this value is used across a yield
   --> $DIR/clone-impl.rs:52:9
    |
 LL |         let v = vec!['a'];
@@ -83,14 +83,14 @@ note: required by a bound in `check_copy`
 LL | fn check_copy<T: Copy>(_x: &T) {}
    |                  ^^^^ required by this bound in `check_copy`
 
-error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{generator@$DIR/clone-impl.rs:62:25: 62:32}`
+error[E0277]: the trait bound `NonClone: Copy` is not satisfied in `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
   --> $DIR/clone-impl.rs:66:5
    |
 LL |     let gen_non_clone = move || {
-   |                         ------- within this `{generator@$DIR/clone-impl.rs:62:25: 62:32}`
+   |                         ------- within this `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
 ...
 LL |     check_copy(&gen_non_clone);
-   |     ^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Copy` is not implemented for `NonClone`
+   |     ^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Copy` is not implemented for `NonClone`
    |
 note: captured value does not implement `Copy`
   --> $DIR/clone-impl.rs:64:14
@@ -108,14 +108,14 @@ LL + #[derive(Copy)]
 LL | struct NonClone;
    |
 
-error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{generator@$DIR/clone-impl.rs:62:25: 62:32}`
+error[E0277]: the trait bound `NonClone: Clone` is not satisfied in `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
   --> $DIR/clone-impl.rs:68:5
    |
 LL |     let gen_non_clone = move || {
-   |                         ------- within this `{generator@$DIR/clone-impl.rs:62:25: 62:32}`
+   |                         ------- within this `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`
 ...
 LL |     check_clone(&gen_non_clone);
-   |     ^^^^^^^^^^^ within `{generator@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Clone` is not implemented for `NonClone`
+   |     ^^^^^^^^^^^ within `{coroutine@$DIR/clone-impl.rs:62:25: 62:32}`, the trait `Clone` is not implemented for `NonClone`
    |
 note: captured value does not implement `Clone`
   --> $DIR/clone-impl.rs:64:14
diff --git a/tests/ui/generator/conditional-drop.rs b/tests/ui/coroutine/conditional-drop.rs
index 0927df86927..634095c7acc 100644
--- a/tests/ui/generator/conditional-drop.rs
+++ b/tests/ui/coroutine/conditional-drop.rs
@@ -3,9 +3,9 @@
 // revisions: default nomiropt
 //[nomiropt]compile-flags: -Z mir-opt-level=0
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 use std::sync::atomic::{AtomicUsize, Ordering};
 
diff --git a/tests/ui/generator/control-flow.rs b/tests/ui/coroutine/control-flow.rs
index 4f69c785560..709b135b2ee 100644
--- a/tests/ui/generator/control-flow.rs
+++ b/tests/ui/coroutine/control-flow.rs
@@ -3,19 +3,19 @@
 // revisions: default nomiropt
 //[nomiropt]compile-flags: -Z mir-opt-level=0
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::marker::Unpin;
-use std::ops::{GeneratorState, Generator};
+use std::ops::{CoroutineState, Coroutine};
 use std::pin::Pin;
 
 fn finish<T>(mut amt: usize, mut t: T) -> T::Return
-    where T: Generator<(), Yield = ()> + Unpin,
+    where T: Coroutine<(), Yield = ()> + Unpin,
 {
     loop {
         match Pin::new(&mut t).resume(()) {
-            GeneratorState::Yielded(()) => amt = amt.checked_sub(1).unwrap(),
-            GeneratorState::Complete(ret) => {
+            CoroutineState::Yielded(()) => amt = amt.checked_sub(1).unwrap(),
+            CoroutineState::Complete(ret) => {
                 assert_eq!(amt, 0);
                 return ret
             }
diff --git a/tests/ui/generator/generator-region-requirements.migrate.stderr b/tests/ui/coroutine/coroutine-region-requirements.migrate.stderr
index 8a96d187f6b..8a96d187f6b 100644
--- a/tests/ui/generator/generator-region-requirements.migrate.stderr
+++ b/tests/ui/coroutine/coroutine-region-requirements.migrate.stderr
diff --git a/tests/ui/generator/generator-region-requirements.rs b/tests/ui/coroutine/coroutine-region-requirements.rs
index 7269a79ca3f..8bc34fdd2f0 100644
--- a/tests/ui/generator/generator-region-requirements.rs
+++ b/tests/ui/coroutine/coroutine-region-requirements.rs
@@ -1,5 +1,5 @@
-#![feature(generators, generator_trait)]
-use std::ops::{Generator, GeneratorState};
+#![feature(coroutines, coroutine_trait)]
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 fn dangle(x: &mut i32) -> &'static mut i32 {
@@ -9,9 +9,9 @@ fn dangle(x: &mut i32) -> &'static mut i32 {
     };
     loop {
         match Pin::new(&mut g).resume(()) {
-            GeneratorState::Complete(c) => return c,
+            CoroutineState::Complete(c) => return c,
             //~^ ERROR lifetime may not live long enough
-            GeneratorState::Yielded(_) => (),
+            CoroutineState::Yielded(_) => (),
         }
     }
 }
diff --git a/tests/ui/generator/generator-region-requirements.stderr b/tests/ui/coroutine/coroutine-region-requirements.stderr
index 87f60467287..ad3183e7612 100644
--- a/tests/ui/generator/generator-region-requirements.stderr
+++ b/tests/ui/coroutine/coroutine-region-requirements.stderr
@@ -1,10 +1,10 @@
 error: lifetime may not live long enough
-  --> $DIR/generator-region-requirements.rs:12:51
+  --> $DIR/coroutine-region-requirements.rs:12:51
    |
 LL | fn dangle(x: &mut i32) -> &'static mut i32 {
    |              - let's call the lifetime of this reference `'1`
 ...
-LL |             GeneratorState::Complete(c) => return c,
+LL |             CoroutineState::Complete(c) => return c,
    |                                                   ^ returning this value requires that `'1` must outlive `'static`
 
 error: aborting due to previous error
diff --git a/tests/ui/generator/generator-resume-after-panic.rs b/tests/ui/coroutine/coroutine-resume-after-panic.rs
index f2e67f1f750..5915f5ad9a9 100644
--- a/tests/ui/generator/generator-resume-after-panic.rs
+++ b/tests/ui/coroutine/coroutine-resume-after-panic.rs
@@ -1,14 +1,14 @@
 // run-fail
 // needs-unwind
-// error-pattern:generator resumed after panicking
+// error-pattern:coroutine resumed after panicking
 // ignore-emscripten no processes
 
-// Test that we get the correct message for resuming a panicked generator.
+// Test that we get the correct message for resuming a panicked coroutine.
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::{
-    ops::Generator,
+    ops::Coroutine,
     pin::Pin,
     panic,
 };
diff --git a/tests/ui/generator/generator-with-nll.rs b/tests/ui/coroutine/coroutine-with-nll.rs
index cee3e6d226c..28a3643fbc9 100644
--- a/tests/ui/generator/generator-with-nll.rs
+++ b/tests/ui/coroutine/coroutine-with-nll.rs
@@ -1,11 +1,11 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
     || {
         // The reference in `_a` is a Legal with NLL since it ends before the yield
         let _a = &mut true;
         let b = &mut true;
-        //~^ borrow may still be in use when generator yields
+        //~^ borrow may still be in use when coroutine yields
         yield ();
         println!("{}", b);
     };
diff --git a/tests/ui/generator/generator-with-nll.stderr b/tests/ui/coroutine/coroutine-with-nll.stderr
index 14199aeb930..ed58debe2b4 100644
--- a/tests/ui/generator/generator-with-nll.stderr
+++ b/tests/ui/coroutine/coroutine-with-nll.stderr
@@ -1,5 +1,5 @@
-error[E0626]: borrow may still be in use when generator yields
-  --> $DIR/generator-with-nll.rs:7:17
+error[E0626]: borrow may still be in use when coroutine yields
+  --> $DIR/coroutine-with-nll.rs:7:17
    |
 LL |         let b = &mut true;
    |                 ^^^^^^^^^
diff --git a/tests/ui/coroutine/coroutine-yielding-or-returning-itself.rs b/tests/ui/coroutine/coroutine-yielding-or-returning-itself.rs
new file mode 100644
index 00000000000..3c91b3c9329
--- /dev/null
+++ b/tests/ui/coroutine/coroutine-yielding-or-returning-itself.rs
@@ -0,0 +1,35 @@
+#![feature(coroutine_trait)]
+#![feature(coroutines)]
+
+// Test that we cannot create a coroutine that returns a value of its
+// own type.
+
+use std::ops::Coroutine;
+
+pub fn want_cyclic_coroutine_return<T>(_: T)
+    where T: Coroutine<Yield = (), Return = T>
+{
+}
+
+fn supply_cyclic_coroutine_return() {
+    want_cyclic_coroutine_return(|| {
+        //~^ ERROR type mismatch
+        if false { yield None.unwrap(); }
+        None.unwrap()
+    })
+}
+
+pub fn want_cyclic_coroutine_yield<T>(_: T)
+    where T: Coroutine<Yield = T, Return = ()>
+{
+}
+
+fn supply_cyclic_coroutine_yield() {
+    want_cyclic_coroutine_yield(|| {
+        //~^ ERROR type mismatch
+        if false { yield None.unwrap(); }
+        None.unwrap()
+    })
+}
+
+fn main() { }
diff --git a/tests/ui/generator/generator-yielding-or-returning-itself.stderr b/tests/ui/coroutine/coroutine-yielding-or-returning-itself.stderr
index 7841a0854ca..325030524ba 100644
--- a/tests/ui/generator/generator-yielding-or-returning-itself.stderr
+++ b/tests/ui/coroutine/coroutine-yielding-or-returning-itself.stderr
@@ -1,7 +1,7 @@
-error[E0271]: type mismatch resolving `<{generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 15:36} as Generator>::Return == {generator@$DIR/generator-yielding-or-returning-itself.rs:15:34: 15:36}`
-  --> $DIR/generator-yielding-or-returning-itself.rs:15:34
+error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine-yielding-or-returning-itself.rs:15:34: 15:36} as Coroutine>::Return == {coroutine@$DIR/coroutine-yielding-or-returning-itself.rs:15:34: 15:36}`
+  --> $DIR/coroutine-yielding-or-returning-itself.rs:15:34
    |
-LL |       want_cyclic_generator_return(|| {
+LL |       want_cyclic_coroutine_return(|| {
    |  _____----------------------------_^
    | |     |
    | |     required by a bound introduced by this call
@@ -15,18 +15,18 @@ LL | |     })
            this error may be the result of a recent compiler bug-fix,
            see issue #46062 <https://github.com/rust-lang/rust/issues/46062>
            for more information
-note: required by a bound in `want_cyclic_generator_return`
-  --> $DIR/generator-yielding-or-returning-itself.rs:10:36
+note: required by a bound in `want_cyclic_coroutine_return`
+  --> $DIR/coroutine-yielding-or-returning-itself.rs:10:36
    |
-LL | pub fn want_cyclic_generator_return<T>(_: T)
+LL | pub fn want_cyclic_coroutine_return<T>(_: T)
    |        ---------------------------- required by a bound in this function
-LL |     where T: Generator<Yield = (), Return = T>
-   |                                    ^^^^^^^^^^ required by this bound in `want_cyclic_generator_return`
+LL |     where T: Coroutine<Yield = (), Return = T>
+   |                                    ^^^^^^^^^^ required by this bound in `want_cyclic_coroutine_return`
 
-error[E0271]: type mismatch resolving `<{generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 28:35} as Generator>::Yield == {generator@$DIR/generator-yielding-or-returning-itself.rs:28:33: 28:35}`
-  --> $DIR/generator-yielding-or-returning-itself.rs:28:33
+error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine-yielding-or-returning-itself.rs:28:33: 28:35} as Coroutine>::Yield == {coroutine@$DIR/coroutine-yielding-or-returning-itself.rs:28:33: 28:35}`
+  --> $DIR/coroutine-yielding-or-returning-itself.rs:28:33
    |
-LL |       want_cyclic_generator_yield(|| {
+LL |       want_cyclic_coroutine_yield(|| {
    |  _____---------------------------_^
    | |     |
    | |     required by a bound introduced by this call
@@ -40,13 +40,13 @@ LL | |     })
            this error may be the result of a recent compiler bug-fix,
            see issue #46062 <https://github.com/rust-lang/rust/issues/46062>
            for more information
-note: required by a bound in `want_cyclic_generator_yield`
-  --> $DIR/generator-yielding-or-returning-itself.rs:23:24
+note: required by a bound in `want_cyclic_coroutine_yield`
+  --> $DIR/coroutine-yielding-or-returning-itself.rs:23:24
    |
-LL | pub fn want_cyclic_generator_yield<T>(_: T)
+LL | pub fn want_cyclic_coroutine_yield<T>(_: T)
    |        --------------------------- required by a bound in this function
-LL |     where T: Generator<Yield = T, Return = ()>
-   |                        ^^^^^^^^^ required by this bound in `want_cyclic_generator_yield`
+LL |     where T: Coroutine<Yield = T, Return = ()>
+   |                        ^^^^^^^^^ required by this bound in `want_cyclic_coroutine_yield`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/generator/derived-drop-parent-expr.rs b/tests/ui/coroutine/derived-drop-parent-expr.rs
index e381924517d..59a3e847838 100644
--- a/tests/ui/generator/derived-drop-parent-expr.rs
+++ b/tests/ui/coroutine/derived-drop-parent-expr.rs
@@ -1,7 +1,7 @@
 // build-pass
 
 //! Like drop-tracking-parent-expression, but also tests that this doesn't ICE when building MIR
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn assert_send<T: Send>(_thing: T) {}
 
diff --git a/tests/ui/generator/discriminant.rs b/tests/ui/coroutine/discriminant.rs
index 195e7702299..73bdd9c8671 100644
--- a/tests/ui/generator/discriminant.rs
+++ b/tests/ui/coroutine/discriminant.rs
@@ -1,12 +1,12 @@
-//! Tests that generator discriminant sizes and ranges are chosen optimally and that they are
+//! Tests that coroutine discriminant sizes and ranges are chosen optimally and that they are
 //! reflected in the output of `mem::discriminant`.
 
 // run-pass
 
-#![feature(generators, generator_trait, core_intrinsics, discriminant_kind)]
+#![feature(coroutines, coroutine_trait, core_intrinsics, discriminant_kind)]
 
 use std::intrinsics::discriminant_value;
-use std::marker::{Unpin, DiscriminantKind};
+use std::marker::{DiscriminantKind, Unpin};
 use std::mem::size_of_val;
 use std::{cmp, ops::*};
 
@@ -66,16 +66,16 @@ macro_rules! yield250 {
 }
 
 fn cycle(
-    gen: impl Generator<()> + Unpin + DiscriminantKind<Discriminant = u32>,
-    expected_max_discr: u32
+    gen: impl Coroutine<()> + Unpin + DiscriminantKind<Discriminant = u32>,
+    expected_max_discr: u32,
 ) {
     let mut gen = Box::pin(gen);
     let mut max_discr = 0;
     loop {
         max_discr = cmp::max(max_discr, discriminant_value(gen.as_mut().get_mut()));
         match gen.as_mut().resume(()) {
-            GeneratorState::Yielded(_) => {}
-            GeneratorState::Complete(_) => {
+            CoroutineState::Yielded(_) => {}
+            CoroutineState::Complete(_) => {
                 assert_eq!(max_discr, expected_max_discr);
                 return;
             }
diff --git a/tests/ui/generator/drop-and-replace.rs b/tests/ui/coroutine/drop-and-replace.rs
index a9a50a122a1..38b757fac29 100644
--- a/tests/ui/generator/drop-and-replace.rs
+++ b/tests/ui/coroutine/drop-and-replace.rs
@@ -1,19 +1,19 @@
 // run-pass
 // Regression test for incorrect DropAndReplace behavior introduced in #60840
 // and fixed in #61373. When combined with the optimization implemented in
-// #60187, this produced incorrect code for generators when a saved local was
+// #60187, this produced incorrect code for coroutines when a saved local was
 // re-assigned.
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 #[derive(Debug, PartialEq)]
 struct Foo(i32);
 
 impl Drop for Foo {
-    fn drop(&mut self) { }
+    fn drop(&mut self) {}
 }
 
 fn main() {
@@ -38,7 +38,7 @@ fn main() {
 
     loop {
         match Pin::new(&mut a).resume(()) {
-            GeneratorState::Complete(()) => break,
+            CoroutineState::Complete(()) => break,
             _ => (),
         }
     }
diff --git a/tests/ui/generator/drop-control-flow.rs b/tests/ui/coroutine/drop-control-flow.rs
index 1c25c06ba4c..55d08b8d5b5 100644
--- a/tests/ui/generator/drop-control-flow.rs
+++ b/tests/ui/coroutine/drop-control-flow.rs
@@ -1,10 +1,10 @@
 // build-pass
 
-// A test to ensure generators capture values that were conditionally dropped,
+// A test to ensure coroutines capture values that were conditionally dropped,
 // and also that values that are dropped along all paths to a yield do not get
-// included in the generator type.
+// included in the coroutine type.
 
-#![feature(generators, negative_impls)]
+#![feature(coroutines, negative_impls)]
 #![allow(unused_assignments, dead_code)]
 
 struct Ptr;
diff --git a/tests/ui/generator/drop-env.rs b/tests/ui/coroutine/drop-env.rs
index 137a407931a..404c043431d 100644
--- a/tests/ui/generator/drop-env.rs
+++ b/tests/ui/coroutine/drop-env.rs
@@ -3,10 +3,10 @@
 // revisions: default nomiropt
 //[nomiropt]compile-flags: -Z mir-opt-level=0
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 #![allow(dropping_copy_types)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 use std::sync::atomic::{AtomicUsize, Ordering};
 
diff --git a/tests/ui/generator/drop-track-addassign-yield.rs b/tests/ui/coroutine/drop-track-addassign-yield.rs
index 1e64f1d2ec7..6c5897458ec 100644
--- a/tests/ui/generator/drop-track-addassign-yield.rs
+++ b/tests/ui/coroutine/drop-track-addassign-yield.rs
@@ -3,7 +3,7 @@
 // Based on addassign-yield.rs, but with drop tracking enabled. Originally we did not implement
 // the fake_read callback on ExprUseVisitor which caused this case to break.
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn foo() {
     let _y = static || {
diff --git a/tests/ui/generator/drop-tracking-parent-expression.rs b/tests/ui/coroutine/drop-tracking-parent-expression.rs
index 198b14528aa..4d40192c07a 100644
--- a/tests/ui/generator/drop-tracking-parent-expression.rs
+++ b/tests/ui/coroutine/drop-tracking-parent-expression.rs
@@ -1,4 +1,4 @@
-#![feature(generators, negative_impls, rustc_attrs)]
+#![feature(coroutines, negative_impls, rustc_attrs)]
 
 macro_rules! type_combinations {
     (
diff --git a/tests/ui/generator/drop-tracking-parent-expression.stderr b/tests/ui/coroutine/drop-tracking-parent-expression.stderr
index e85bb1347a7..6cd4ec83377 100644
--- a/tests/ui/generator/drop-tracking-parent-expression.stderr
+++ b/tests/ui/coroutine/drop-tracking-parent-expression.stderr
@@ -1,8 +1,8 @@
-error: generator cannot be sent between threads safely
+error: coroutine cannot be sent between threads safely
   --> $DIR/drop-tracking-parent-expression.rs:23:13
    |
 LL |               assert_send(g);
-   |               ^^^^^^^^^^^ generator is not `Send`
+   |               ^^^^^^^^^^^ coroutine is not `Send`
 ...
 LL | /     type_combinations!(
 LL | |         // OK
@@ -13,8 +13,8 @@ LL | |         };
 LL | |     );
    | |_____- in this macro invocation
    |
-   = help: within `{generator@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `derived_drop::Client`
-note: generator is not `Send` as this value is used across a yield
+   = help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `derived_drop::Client`
+note: coroutine is not `Send` as this value is used across a yield
   --> $DIR/drop-tracking-parent-expression.rs:21:22
    |
 LL |               let g = move || match drop($name::Client { ..$name::Client::default() }) {
@@ -38,11 +38,11 @@ LL | fn assert_send<T: Send>(_thing: T) {}
    |                   ^^^^ required by this bound in `assert_send`
    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: generator cannot be sent between threads safely
+error: coroutine cannot be sent between threads safely
   --> $DIR/drop-tracking-parent-expression.rs:23:13
    |
 LL |               assert_send(g);
-   |               ^^^^^^^^^^^ generator is not `Send`
+   |               ^^^^^^^^^^^ coroutine is not `Send`
 ...
 LL | /     type_combinations!(
 LL | |         // OK
@@ -53,8 +53,8 @@ LL | |         };
 LL | |     );
    | |_____- in this macro invocation
    |
-   = help: within `{generator@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `significant_drop::Client`
-note: generator is not `Send` as this value is used across a yield
+   = help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `significant_drop::Client`
+note: coroutine is not `Send` as this value is used across a yield
   --> $DIR/drop-tracking-parent-expression.rs:21:22
    |
 LL |               let g = move || match drop($name::Client { ..$name::Client::default() }) {
@@ -78,11 +78,11 @@ LL | fn assert_send<T: Send>(_thing: T) {}
    |                   ^^^^ required by this bound in `assert_send`
    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: generator cannot be sent between threads safely
+error: coroutine cannot be sent between threads safely
   --> $DIR/drop-tracking-parent-expression.rs:23:13
    |
 LL |               assert_send(g);
-   |               ^^^^^^^^^^^ generator is not `Send`
+   |               ^^^^^^^^^^^ coroutine is not `Send`
 ...
 LL | /     type_combinations!(
 LL | |         // OK
@@ -93,8 +93,8 @@ LL | |         };
 LL | |     );
    | |_____- in this macro invocation
    |
-   = help: within `{generator@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `insignificant_dtor::Client`
-note: generator is not `Send` as this value is used across a yield
+   = help: within `{coroutine@$DIR/drop-tracking-parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `insignificant_dtor::Client`
+note: coroutine is not `Send` as this value is used across a yield
   --> $DIR/drop-tracking-parent-expression.rs:21:22
    |
 LL |               let g = move || match drop($name::Client { ..$name::Client::default() }) {
diff --git a/tests/ui/generator/drop-tracking-yielding-in-match-guards.rs b/tests/ui/coroutine/drop-tracking-yielding-in-match-guards.rs
index 92e0136d51b..622765d82aa 100644
--- a/tests/ui/generator/drop-tracking-yielding-in-match-guards.rs
+++ b/tests/ui/coroutine/drop-tracking-yielding-in-match-guards.rs
@@ -1,7 +1,7 @@
 // build-pass
 // edition:2018
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
     let _ = static |x: u8| match x {
diff --git a/tests/ui/generator/drop-yield-twice.rs b/tests/ui/coroutine/drop-yield-twice.rs
index f484cbb8d67..015343a2776 100644
--- a/tests/ui/generator/drop-yield-twice.rs
+++ b/tests/ui/coroutine/drop-yield-twice.rs
@@ -1,10 +1,10 @@
-#![feature(negative_impls, generators)]
+#![feature(negative_impls, coroutines)]
 
 struct Foo(i32);
 impl !Send for Foo {}
 
 fn main() {
-    assert_send(|| { //~ ERROR generator cannot be sent between threads safely
+    assert_send(|| { //~ ERROR coroutine cannot be sent between threads safely
         let guard = Foo(42);
         yield;
         drop(guard);
diff --git a/tests/ui/generator/drop-yield-twice.stderr b/tests/ui/coroutine/drop-yield-twice.stderr
index 39a906f0bf4..fbbedac5775 100644
--- a/tests/ui/generator/drop-yield-twice.stderr
+++ b/tests/ui/coroutine/drop-yield-twice.stderr
@@ -1,11 +1,11 @@
-error: generator cannot be sent between threads safely
+error: coroutine cannot be sent between threads safely
   --> $DIR/drop-yield-twice.rs:7:5
    |
 LL |     assert_send(|| {
-   |     ^^^^^^^^^^^ generator is not `Send`
+   |     ^^^^^^^^^^^ coroutine is not `Send`
    |
-   = help: within `{generator@$DIR/drop-yield-twice.rs:7:17: 7:19}`, the trait `Send` is not implemented for `Foo`
-note: generator is not `Send` as this value is used across a yield
+   = help: within `{coroutine@$DIR/drop-yield-twice.rs:7:17: 7:19}`, the trait `Send` is not implemented for `Foo`
+note: coroutine is not `Send` as this value is used across a yield
   --> $DIR/drop-yield-twice.rs:9:9
    |
 LL |         let guard = Foo(42);
diff --git a/tests/ui/generator/dropck-resume.rs b/tests/ui/coroutine/dropck-resume.rs
index 4c18077f335..07ca4d37aba 100644
--- a/tests/ui/generator/dropck-resume.rs
+++ b/tests/ui/coroutine/dropck-resume.rs
@@ -1,6 +1,6 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 struct SetToNone<'a: 'b, 'b>(&'b mut Option<&'a i32>);
@@ -11,7 +11,7 @@ impl<'a, 'b> Drop for SetToNone<'a, 'b> {
     }
 }
 
-fn drop_using_generator() -> i32 {
+fn drop_using_coroutine() -> i32 {
     let mut y = Some(&0);
     let z = &mut y;
     let r;
@@ -29,5 +29,5 @@ fn drop_using_generator() -> i32 {
 }
 
 fn main() {
-    println!("{}", drop_using_generator());
+    println!("{}", drop_using_coroutine());
 }
diff --git a/tests/ui/generator/dropck-resume.stderr b/tests/ui/coroutine/dropck-resume.stderr
index ecf92e7e3ae..028523978f9 100644
--- a/tests/ui/generator/dropck-resume.stderr
+++ b/tests/ui/coroutine/dropck-resume.stderr
@@ -8,7 +8,7 @@ LL |         r = y.as_ref().unwrap();
    |             ^ immutable borrow occurs here
 LL |
 LL |     }
-   |     - mutable borrow might be used here, when `g` is dropped and runs the destructor for generator
+   |     - mutable borrow might be used here, when `g` is dropped and runs the destructor for coroutine
 
 error: aborting due to previous error
 
diff --git a/tests/ui/generator/dropck.rs b/tests/ui/coroutine/dropck.rs
index f82111a76b1..450361c8dd0 100644
--- a/tests/ui/generator/dropck.rs
+++ b/tests/ui/coroutine/dropck.rs
@@ -1,7 +1,7 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::cell::RefCell;
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 
 fn main() {
@@ -11,7 +11,7 @@ fn main() {
     //~^ ERROR `*cell` does not live long enough [E0597]
     // the upvar is the non-dropck `&mut Option<Ref<'a, i32>>`.
     gen = || {
-        // but the generator can use it to drop a `Ref<'a, i32>`.
+        // but the coroutine can use it to drop a `Ref<'a, i32>`.
         let _d = ref_.take(); //~ ERROR `ref_` does not live long enough
         yield;
     };
diff --git a/tests/ui/generator/dropck.stderr b/tests/ui/coroutine/dropck.stderr
index 246ac99f83f..241d6dfe0a1 100644
--- a/tests/ui/generator/dropck.stderr
+++ b/tests/ui/coroutine/dropck.stderr
@@ -11,7 +11,7 @@ LL | }
    | -
    | |
    | `*cell` dropped here while still borrowed
-   | borrow might be used here, when `gen` is dropped and runs the destructor for generator
+   | borrow might be used here, when `gen` is dropped and runs the destructor for coroutine
    |
    = note: values in a scope are dropped in the opposite order they are defined
 
@@ -19,8 +19,8 @@ error[E0597]: `ref_` does not live long enough
   --> $DIR/dropck.rs:15:18
    |
 LL |     gen = || {
-   |           -- value captured here by generator
-LL |         // but the generator can use it to drop a `Ref<'a, i32>`.
+   |           -- value captured here by coroutine
+LL |         // but the coroutine can use it to drop a `Ref<'a, i32>`.
 LL |         let _d = ref_.take();
    |                  ^^^^ borrowed value does not live long enough
 ...
@@ -28,7 +28,7 @@ LL | }
    | -
    | |
    | `ref_` dropped here while still borrowed
-   | borrow might be used here, when `gen` is dropped and runs the destructor for generator
+   | borrow might be used here, when `gen` is dropped and runs the destructor for coroutine
    |
    = note: values in a scope are dropped in the opposite order they are defined
 
diff --git a/tests/ui/coroutine/gen_block.e2024.stderr b/tests/ui/coroutine/gen_block.e2024.stderr
new file mode 100644
index 00000000000..f250e2f79c7
--- /dev/null
+++ b/tests/ui/coroutine/gen_block.e2024.stderr
@@ -0,0 +1,19 @@
+error[E0658]: yield syntax is experimental
+  --> $DIR/gen_block.rs:15:16
+   |
+LL |     let _ = || yield true;
+   |                ^^^^^^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+
+error[E0282]: type annotations needed
+  --> $DIR/gen_block.rs:6:17
+   |
+LL |     let x = gen {};
+   |                 ^^ cannot infer type
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0282, E0658.
+For more information about an error, try `rustc --explain E0282`.
diff --git a/tests/ui/coroutine/gen_block.none.stderr b/tests/ui/coroutine/gen_block.none.stderr
new file mode 100644
index 00000000000..012a8308c7f
--- /dev/null
+++ b/tests/ui/coroutine/gen_block.none.stderr
@@ -0,0 +1,49 @@
+error: expected identifier, found reserved keyword `yield`
+  --> $DIR/gen_block.rs:9:19
+   |
+LL |     let y = gen { yield 42 };
+   |             ---   ^^^^^ expected identifier, found reserved keyword
+   |             |
+   |             while parsing this struct
+
+error[E0422]: cannot find struct, variant or union type `gen` in this scope
+  --> $DIR/gen_block.rs:6:13
+   |
+LL |     let x = gen {};
+   |             ^^^ not found in this scope
+
+error[E0422]: cannot find struct, variant or union type `gen` in this scope
+  --> $DIR/gen_block.rs:9:13
+   |
+LL |     let y = gen { yield 42 };
+   |             ^^^ not found in this scope
+
+error[E0422]: cannot find struct, variant or union type `gen` in this scope
+  --> $DIR/gen_block.rs:12:5
+   |
+LL |     gen {};
+   |     ^^^ not found in this scope
+
+error[E0658]: yield syntax is experimental
+  --> $DIR/gen_block.rs:15:16
+   |
+LL |     let _ = || yield true;
+   |                ^^^^^^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+
+error[E0658]: yield syntax is experimental
+  --> $DIR/gen_block.rs:15:16
+   |
+LL |     let _ = || yield true;
+   |                ^^^^^^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0422, E0658.
+For more information about an error, try `rustc --explain E0422`.
diff --git a/tests/ui/coroutine/gen_block.rs b/tests/ui/coroutine/gen_block.rs
new file mode 100644
index 00000000000..852c7c455a6
--- /dev/null
+++ b/tests/ui/coroutine/gen_block.rs
@@ -0,0 +1,17 @@
+// revisions: e2024 none
+//[e2024] compile-flags: --edition 2024 -Zunstable-options
+#![cfg_attr(e2024, feature(gen_blocks))]
+
+fn main() {
+    let x = gen {};
+    //[none]~^ ERROR: cannot find
+    //[e2024]~^^ ERROR: type annotations needed
+    let y = gen { yield 42 };
+    //[none]~^ ERROR: found reserved keyword `yield`
+    //[none]~| ERROR: cannot find
+    gen {};
+    //[none]~^ ERROR: cannot find
+
+    let _ = || yield true; //[none]~ ERROR yield syntax is experimental
+    //~^ ERROR yield syntax is experimental
+}
diff --git a/tests/ui/coroutine/gen_block_is_coro.rs b/tests/ui/coroutine/gen_block_is_coro.rs
new file mode 100644
index 00000000000..c66ccefba85
--- /dev/null
+++ b/tests/ui/coroutine/gen_block_is_coro.rs
@@ -0,0 +1,18 @@
+//compile-flags: --edition 2024 -Zunstable-options
+#![feature(coroutines, coroutine_trait, gen_blocks)]
+
+use std::ops::Coroutine;
+
+fn foo() -> impl Coroutine<Yield = u32, Return = ()> { //~ ERROR: Coroutine` is not satisfied
+    gen { yield 42 }
+}
+
+fn bar() -> impl Coroutine<Yield = i64, Return = ()> { //~ ERROR: Coroutine` is not satisfied
+    gen { yield 42 }
+}
+
+fn baz() -> impl Coroutine<Yield = i32, Return = ()> { //~ ERROR: Coroutine` is not satisfied
+    gen { yield 42 }
+}
+
+fn main() {}
diff --git a/tests/ui/coroutine/gen_block_is_coro.stderr b/tests/ui/coroutine/gen_block_is_coro.stderr
new file mode 100644
index 00000000000..83a674fa53c
--- /dev/null
+++ b/tests/ui/coroutine/gen_block_is_coro.stderr
@@ -0,0 +1,21 @@
+error[E0277]: the trait bound `{gen block@$DIR/gen_block_is_coro.rs:7:5: 7:21}: Coroutine` is not satisfied
+  --> $DIR/gen_block_is_coro.rs:6:13
+   |
+LL | fn foo() -> impl Coroutine<Yield = u32, Return = ()> {
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Coroutine` is not implemented for `{gen block@$DIR/gen_block_is_coro.rs:7:5: 7:21}`
+
+error[E0277]: the trait bound `{gen block@$DIR/gen_block_is_coro.rs:11:5: 11:21}: Coroutine` is not satisfied
+  --> $DIR/gen_block_is_coro.rs:10:13
+   |
+LL | fn bar() -> impl Coroutine<Yield = i64, Return = ()> {
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Coroutine` is not implemented for `{gen block@$DIR/gen_block_is_coro.rs:11:5: 11:21}`
+
+error[E0277]: the trait bound `{gen block@$DIR/gen_block_is_coro.rs:15:5: 15:21}: Coroutine` is not satisfied
+  --> $DIR/gen_block_is_coro.rs:14:13
+   |
+LL | fn baz() -> impl Coroutine<Yield = i32, Return = ()> {
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Coroutine` is not implemented for `{gen block@$DIR/gen_block_is_coro.rs:15:5: 15:21}`
+
+error: aborting due to 3 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/coroutine/gen_block_is_iter.rs b/tests/ui/coroutine/gen_block_is_iter.rs
new file mode 100644
index 00000000000..92625cf7c28
--- /dev/null
+++ b/tests/ui/coroutine/gen_block_is_iter.rs
@@ -0,0 +1,19 @@
+// revisions: next old
+//compile-flags: --edition 2024 -Zunstable-options
+//[next] compile-flags: -Ztrait-solver=next
+// check-pass
+#![feature(gen_blocks)]
+
+fn foo() -> impl Iterator<Item = u32> {
+    gen { yield 42 }
+}
+
+fn bar() -> impl Iterator<Item = i64> {
+    gen { yield 42 }
+}
+
+fn baz() -> impl Iterator<Item = i32> {
+    gen { yield 42 }
+}
+
+fn main() {}
diff --git a/tests/ui/coroutine/gen_block_is_no_future.rs b/tests/ui/coroutine/gen_block_is_no_future.rs
new file mode 100644
index 00000000000..94766519738
--- /dev/null
+++ b/tests/ui/coroutine/gen_block_is_no_future.rs
@@ -0,0 +1,8 @@
+//compile-flags: --edition 2024 -Zunstable-options
+#![feature(gen_blocks)]
+
+fn foo() -> impl std::future::Future { //~ ERROR is not a future
+    gen { yield 42 }
+}
+
+fn main() {}
diff --git a/tests/ui/coroutine/gen_block_is_no_future.stderr b/tests/ui/coroutine/gen_block_is_no_future.stderr
new file mode 100644
index 00000000000..db0c3c19b58
--- /dev/null
+++ b/tests/ui/coroutine/gen_block_is_no_future.stderr
@@ -0,0 +1,12 @@
+error[E0277]: `{gen block@$DIR/gen_block_is_no_future.rs:5:5: 5:21}` is not a future
+  --> $DIR/gen_block_is_no_future.rs:4:13
+   |
+LL | fn foo() -> impl std::future::Future {
+   |             ^^^^^^^^^^^^^^^^^^^^^^^^ `{gen block@$DIR/gen_block_is_no_future.rs:5:5: 5:21}` is not a future
+   |
+   = help: the trait `Future` is not implemented for `{gen block@$DIR/gen_block_is_no_future.rs:5:5: 5:21}`
+   = note: {gen block@$DIR/gen_block_is_no_future.rs:5:5: 5:21} must be a future or must implement `IntoFuture` to be awaited
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/coroutine/gen_block_iterate.rs b/tests/ui/coroutine/gen_block_iterate.rs
new file mode 100644
index 00000000000..18e1bb88772
--- /dev/null
+++ b/tests/ui/coroutine/gen_block_iterate.rs
@@ -0,0 +1,35 @@
+// revisions: next old
+//compile-flags: --edition 2024 -Zunstable-options
+//[next] compile-flags: -Ztrait-solver=next
+// run-pass
+#![feature(gen_blocks)]
+
+fn foo() -> impl Iterator<Item = u32> {
+    gen { yield 42; for x in 3..6 { yield x } }
+}
+
+fn moved() -> impl Iterator<Item = u32> {
+    let mut x = "foo".to_string();
+    gen move {
+        yield 42;
+        if x == "foo" { return }
+        x.clear();
+        for x in 3..6 { yield x }
+    }
+}
+
+fn main() {
+    let mut iter = foo();
+    assert_eq!(iter.next(), Some(42));
+    assert_eq!(iter.next(), Some(3));
+    assert_eq!(iter.next(), Some(4));
+    assert_eq!(iter.next(), Some(5));
+    assert_eq!(iter.next(), None);
+    // `gen` blocks are fused
+    assert_eq!(iter.next(), None);
+
+    let mut iter = moved();
+    assert_eq!(iter.next(), Some(42));
+    assert_eq!(iter.next(), None);
+
+}
diff --git a/tests/ui/coroutine/gen_block_move.fixed b/tests/ui/coroutine/gen_block_move.fixed
new file mode 100644
index 00000000000..5c6c8062322
--- /dev/null
+++ b/tests/ui/coroutine/gen_block_move.fixed
@@ -0,0 +1,17 @@
+// compile-flags: --edition 2024 -Zunstable-options
+// run-rustfix
+#![feature(gen_blocks)]
+
+fn moved() -> impl Iterator<Item = u32> {
+    let mut x = "foo".to_string();
+    gen move { //~ ERROR: gen block may outlive the current function
+        yield 42;
+        if x == "foo" { return }
+        x.clear();
+        for x in 3..6 { yield x }
+    }
+}
+
+fn main() {
+    for _ in moved() {}
+}
diff --git a/tests/ui/coroutine/gen_block_move.rs b/tests/ui/coroutine/gen_block_move.rs
new file mode 100644
index 00000000000..abbf8132476
--- /dev/null
+++ b/tests/ui/coroutine/gen_block_move.rs
@@ -0,0 +1,17 @@
+// compile-flags: --edition 2024 -Zunstable-options
+// run-rustfix
+#![feature(gen_blocks)]
+
+fn moved() -> impl Iterator<Item = u32> {
+    let mut x = "foo".to_string();
+    gen { //~ ERROR: gen block may outlive the current function
+        yield 42;
+        if x == "foo" { return }
+        x.clear();
+        for x in 3..6 { yield x }
+    }
+}
+
+fn main() {
+    for _ in moved() {}
+}
diff --git a/tests/ui/coroutine/gen_block_move.stderr b/tests/ui/coroutine/gen_block_move.stderr
new file mode 100644
index 00000000000..b93ac65f5e7
--- /dev/null
+++ b/tests/ui/coroutine/gen_block_move.stderr
@@ -0,0 +1,30 @@
+error[E0373]: gen block may outlive the current function, but it borrows `x`, which is owned by the current function
+  --> $DIR/gen_block_move.rs:7:5
+   |
+LL | /     gen {
+LL | |         yield 42;
+LL | |         if x == "foo" { return }
+LL | |         x.clear();
+   | |         - `x` is borrowed here
+LL | |         for x in 3..6 { yield x }
+LL | |     }
+   | |_____^ may outlive borrowed value `x`
+   |
+note: gen block is returned here
+  --> $DIR/gen_block_move.rs:7:5
+   |
+LL | /     gen {
+LL | |         yield 42;
+LL | |         if x == "foo" { return }
+LL | |         x.clear();
+LL | |         for x in 3..6 { yield x }
+LL | |     }
+   | |_____^
+help: to force the gen block to take ownership of `x` (and any other referenced variables), use the `move` keyword
+   |
+LL |     gen move {
+   |         ++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0373`.
diff --git a/tests/ui/coroutine/gen_block_panic.rs b/tests/ui/coroutine/gen_block_panic.rs
new file mode 100644
index 00000000000..2da0eb512cc
--- /dev/null
+++ b/tests/ui/coroutine/gen_block_panic.rs
@@ -0,0 +1,26 @@
+//compile-flags: --edition 2024 -Zunstable-options
+// run-pass
+// needs-unwind
+#![feature(gen_blocks)]
+
+fn main() {
+    let mut iter = gen {
+        yield 42;
+        panic!("foo");
+        yield 69; //~ WARN: unreachable statement
+    };
+    assert_eq!(iter.next(), Some(42));
+    let mut tmp = std::panic::AssertUnwindSafe(&mut iter);
+    match std::panic::catch_unwind(move || tmp.next()) {
+        Ok(_) => unreachable!(),
+        Err(err) => assert_eq!(*err.downcast::<&'static str>().unwrap(), "foo"),
+    }
+
+    match std::panic::catch_unwind(move || iter.next()) {
+        Ok(_) => unreachable!(),
+        Err(err) => assert_eq!(
+            *err.downcast::<&'static str>().unwrap(),
+            "`gen fn` should just keep returning `None` after panicking",
+        ),
+    }
+}
diff --git a/tests/ui/coroutine/gen_block_panic.stderr b/tests/ui/coroutine/gen_block_panic.stderr
new file mode 100644
index 00000000000..a0a6d1063c4
--- /dev/null
+++ b/tests/ui/coroutine/gen_block_panic.stderr
@@ -0,0 +1,12 @@
+warning: unreachable statement
+  --> $DIR/gen_block_panic.rs:10:9
+   |
+LL |         panic!("foo");
+   |         ------------- any code following this expression is unreachable
+LL |         yield 69;
+   |         ^^^^^^^^^ unreachable statement
+   |
+   = note: `#[warn(unreachable_code)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/coroutine/gen_fn.e2024.stderr b/tests/ui/coroutine/gen_fn.e2024.stderr
new file mode 100644
index 00000000000..388e10fd65e
--- /dev/null
+++ b/tests/ui/coroutine/gen_fn.e2024.stderr
@@ -0,0 +1,10 @@
+error: `gen` functions are not yet implemented
+  --> $DIR/gen_fn.rs:4:1
+   |
+LL | gen fn foo() {}
+   | ^^^
+   |
+   = help: for now you can use `gen {}` blocks and return `impl Iterator` instead
+
+error: aborting due to previous error
+
diff --git a/tests/ui/coroutine/gen_fn.none.stderr b/tests/ui/coroutine/gen_fn.none.stderr
new file mode 100644
index 00000000000..5e7bd9d8bbf
--- /dev/null
+++ b/tests/ui/coroutine/gen_fn.none.stderr
@@ -0,0 +1,8 @@
+error: expected one of `#`, `async`, `const`, `default`, `extern`, `fn`, `pub`, `unsafe`, or `use`, found `gen`
+  --> $DIR/gen_fn.rs:4:1
+   |
+LL | gen fn foo() {}
+   | ^^^ expected one of 9 possible tokens
+
+error: aborting due to previous error
+
diff --git a/tests/ui/coroutine/gen_fn.rs b/tests/ui/coroutine/gen_fn.rs
new file mode 100644
index 00000000000..da515f263b0
--- /dev/null
+++ b/tests/ui/coroutine/gen_fn.rs
@@ -0,0 +1,8 @@
+// revisions: e2024 none
+//[e2024] compile-flags: --edition 2024 -Zunstable-options
+
+gen fn foo() {}
+//[none]~^ ERROR: expected one of `#`, `async`, `const`, `default`, `extern`, `fn`, `pub`, `unsafe`, or `use`, found `gen`
+//[e2024]~^^ ERROR: `gen` functions are not yet implemented
+
+fn main() {}
diff --git a/tests/ui/generator/issue-102645.rs b/tests/ui/coroutine/issue-102645.rs
index 677cc69d3f2..a0263510e13 100644
--- a/tests/ui/generator/issue-102645.rs
+++ b/tests/ui/coroutine/issue-102645.rs
@@ -1,6 +1,6 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 
 fn main() {
diff --git a/tests/ui/generator/issue-102645.stderr b/tests/ui/coroutine/issue-102645.stderr
index 5d28dfc45b3..3db090346cd 100644
--- a/tests/ui/generator/issue-102645.stderr
+++ b/tests/ui/coroutine/issue-102645.stderr
@@ -5,7 +5,7 @@ LL |     Pin::new(&mut b).resume();
    |                      ^^^^^^-- an argument of type `()` is missing
    |
 note: method defined here
-  --> $SRC_DIR/core/src/ops/generator.rs:LL:COL
+  --> $SRC_DIR/core/src/ops/coroutine.rs:LL:COL
 help: provide the argument
    |
 LL |     Pin::new(&mut b).resume(());
diff --git a/tests/ui/generator/issue-105084.rs b/tests/ui/coroutine/issue-105084.rs
index 50b5da6e6ad..7801f1bcea0 100644
--- a/tests/ui/generator/issue-105084.rs
+++ b/tests/ui/coroutine/issue-105084.rs
@@ -1,9 +1,9 @@
-#![feature(generators)]
-#![feature(generator_clone)]
-#![feature(generator_trait)]
+#![feature(coroutines)]
+#![feature(coroutine_clone)]
+#![feature(coroutine_trait)]
 #![feature(rustc_attrs, stmt_expr_attributes)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 
 fn copy<T: Copy>(x: T) -> T {
@@ -25,9 +25,9 @@ fn main() {
     // Allocate the temporary box.
     Pin::new(&mut g).resume(());
 
-    // The temporary box is in generator locals.
+    // The temporary box is in coroutine locals.
     // As it is not taken into account for trait computation,
-    // the generator is `Copy`.
+    // the coroutine is `Copy`.
     let mut h = copy(g);
     //~^ ERROR the trait bound `Box<(i32, ())>: Copy` is not satisfied in
 
diff --git a/tests/ui/generator/issue-105084.stderr b/tests/ui/coroutine/issue-105084.stderr
index 573c31f1134..38f114ff774 100644
--- a/tests/ui/generator/issue-105084.stderr
+++ b/tests/ui/coroutine/issue-105084.stderr
@@ -2,7 +2,7 @@ error[E0382]: borrow of moved value: `g`
   --> $DIR/issue-105084.rs:37:14
    |
 LL |     let mut g = || {
-   |         ----- move occurs because `g` has type `{generator@$DIR/issue-105084.rs:14:17: 14:19}`, which does not implement the `Copy` trait
+   |         ----- move occurs because `g` has type `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}`, which does not implement the `Copy` trait
 ...
 LL |     let mut h = copy(g);
    |                      - value moved here
@@ -22,16 +22,16 @@ help: consider cloning the value if the performance cost is acceptable
 LL |     let mut h = copy(g.clone());
    |                       ++++++++
 
-error[E0277]: the trait bound `Box<(i32, ())>: Copy` is not satisfied in `{generator@$DIR/issue-105084.rs:14:17: 14:19}`
+error[E0277]: the trait bound `Box<(i32, ())>: Copy` is not satisfied in `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}`
   --> $DIR/issue-105084.rs:31:17
    |
 LL |     let mut g = || {
-   |                 -- within this `{generator@$DIR/issue-105084.rs:14:17: 14:19}`
+   |                 -- within this `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}`
 ...
 LL |     let mut h = copy(g);
-   |                 ^^^^ within `{generator@$DIR/issue-105084.rs:14:17: 14:19}`, the trait `Copy` is not implemented for `Box<(i32, ())>`
+   |                 ^^^^ within `{coroutine@$DIR/issue-105084.rs:14:17: 14:19}`, the trait `Copy` is not implemented for `Box<(i32, ())>`
    |
-note: generator does not implement `Copy` as this value is used across a yield
+note: coroutine does not implement `Copy` as this value is used across a yield
   --> $DIR/issue-105084.rs:21:22
    |
 LL |         Box::new((5, yield));
diff --git a/tests/ui/generator/issue-110929-generator-conflict-error-ice.rs b/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs
index a45479e5300..ad39b71b0eb 100644
--- a/tests/ui/generator/issue-110929-generator-conflict-error-ice.rs
+++ b/tests/ui/coroutine/issue-110929-coroutine-conflict-error-ice.rs
@@ -1,11 +1,11 @@
 // edition:2021
-#![feature(generators)]
+// check-pass
+#![feature(coroutines)]
 
 fn main() {
     let x = &mut ();
     || {
         let _c = || yield *&mut *x;
         || _ = &mut *x;
-        //~^ cannot borrow `*x` as mutable more than once at a time
     };
 }
diff --git a/tests/ui/generator/issue-113279.rs b/tests/ui/coroutine/issue-113279.rs
index f69f804b716..f251c924c13 100644
--- a/tests/ui/generator/issue-113279.rs
+++ b/tests/ui/coroutine/issue-113279.rs
@@ -1,10 +1,10 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 // `foo` attempts to dereference `""`, which results in an error being reported. Later, the
-// generator transform for `foo` then produces a union which contains a `str` type - unions should
+// coroutine transform for `foo` then produces a union which contains a `str` type - unions should
 // not contain unsized types, but this is okay because an error has been reported already.
 // When const propagation happens later in compilation, it attempts to compute the layout of the
-// generator (as part of checking whether something can be const propagated) and in turn attempts
+// coroutine (as part of checking whether something can be const propagated) and in turn attempts
 // to compute the layout of `str` in the context of a union - where this caused an ICE. This test
 // makes sure that doesn't happen again.
 
diff --git a/tests/ui/generator/issue-113279.stderr b/tests/ui/coroutine/issue-113279.stderr
index cc9b64ef9ac..cc9b64ef9ac 100644
--- a/tests/ui/generator/issue-113279.stderr
+++ b/tests/ui/coroutine/issue-113279.stderr
diff --git a/tests/ui/generator/issue-44197.rs b/tests/ui/coroutine/issue-44197.rs
index 389b9d13969..c0326bdae4e 100644
--- a/tests/ui/generator/issue-44197.rs
+++ b/tests/ui/coroutine/issue-44197.rs
@@ -1,15 +1,15 @@
 // run-pass
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 fn foo(_: &str) -> String {
     String::new()
 }
 
-fn bar(baz: String) -> impl Generator<(), Yield = String, Return = ()> {
+fn bar(baz: String) -> impl Coroutine<(), Yield = String, Return = ()> {
     move || {
         yield foo(&baz);
     }
@@ -19,7 +19,7 @@ fn foo2(_: &str) -> Result<String, ()> {
     Err(())
 }
 
-fn bar2(baz: String) -> impl Generator<(), Yield = String, Return = ()> {
+fn bar2(baz: String) -> impl Coroutine<(), Yield = String, Return = ()> {
     move || {
         if let Ok(quux) = foo2(&baz) {
             yield quux;
@@ -30,7 +30,7 @@ fn bar2(baz: String) -> impl Generator<(), Yield = String, Return = ()> {
 fn main() {
     assert_eq!(
         Pin::new(&mut bar(String::new())).resume(()),
-        GeneratorState::Yielded(String::new())
+        CoroutineState::Yielded(String::new())
     );
-    assert_eq!(Pin::new(&mut bar2(String::new())).resume(()), GeneratorState::Complete(()));
+    assert_eq!(Pin::new(&mut bar2(String::new())).resume(()), CoroutineState::Complete(()));
 }
diff --git a/tests/ui/generator/issue-45729-unsafe-in-generator.mir.stderr b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr
index 3afbea07931..a9a0d629606 100644
--- a/tests/ui/generator/issue-45729-unsafe-in-generator.mir.stderr
+++ b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.mir.stderr
@@ -1,5 +1,5 @@
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-45729-unsafe-in-generator.rs:8:9
+  --> $DIR/issue-45729-unsafe-in-coroutine.rs:8:9
    |
 LL |         *(1 as *mut u32) = 42;
    |         ^^^^^^^^^^^^^^^^^^^^^ dereference of raw pointer
diff --git a/tests/ui/generator/issue-45729-unsafe-in-generator.rs b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.rs
index 379c36d2ca3..7961b58597c 100644
--- a/tests/ui/generator/issue-45729-unsafe-in-generator.rs
+++ b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.rs
@@ -1,7 +1,7 @@
 // revisions: mir thir
 // [thir]compile-flags: -Z thir-unsafeck
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
     let _ = || {
diff --git a/tests/ui/generator/issue-45729-unsafe-in-generator.thir.stderr b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.thir.stderr
index 10d768f19fc..22c83e9a3d5 100644
--- a/tests/ui/generator/issue-45729-unsafe-in-generator.thir.stderr
+++ b/tests/ui/coroutine/issue-45729-unsafe-in-coroutine.thir.stderr
@@ -1,5 +1,5 @@
 error[E0133]: dereference of raw pointer is unsafe and requires unsafe function or block
-  --> $DIR/issue-45729-unsafe-in-generator.rs:8:9
+  --> $DIR/issue-45729-unsafe-in-coroutine.rs:8:9
    |
 LL |         *(1 as *mut u32) = 42;
    |         ^^^^^^^^^^^^^^^^ dereference of raw pointer
diff --git a/tests/ui/generator/issue-48048.rs b/tests/ui/coroutine/issue-48048.rs
index 992bbc97a9f..b61b7c77072 100644
--- a/tests/ui/generator/issue-48048.rs
+++ b/tests/ui/coroutine/issue-48048.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
     let x = (|_| {},);
@@ -6,7 +6,7 @@ fn main() {
     || {
         let x = x;
 
-        x.0({ //~ ERROR borrow may still be in use when generator yields
+        x.0({ //~ ERROR borrow may still be in use when coroutine yields
             yield;
         });
     };
diff --git a/tests/ui/generator/issue-48048.stderr b/tests/ui/coroutine/issue-48048.stderr
index 23423583916..bb9f189fa7c 100644
--- a/tests/ui/generator/issue-48048.stderr
+++ b/tests/ui/coroutine/issue-48048.stderr
@@ -1,4 +1,4 @@
-error[E0626]: borrow may still be in use when generator yields
+error[E0626]: borrow may still be in use when coroutine yields
   --> $DIR/issue-48048.rs:9:9
    |
 LL |         x.0({
diff --git a/tests/ui/coroutine/issue-52304.rs b/tests/ui/coroutine/issue-52304.rs
new file mode 100644
index 00000000000..fed3a5f19b3
--- /dev/null
+++ b/tests/ui/coroutine/issue-52304.rs
@@ -0,0 +1,11 @@
+// check-pass
+
+#![feature(coroutines, coroutine_trait)]
+
+use std::ops::Coroutine;
+
+pub fn example() -> impl Coroutine {
+    || yield &1
+}
+
+fn main() {}
diff --git a/tests/ui/generator/issue-52398.rs b/tests/ui/coroutine/issue-52398.rs
index ada380d116c..8d651d0e2ce 100644
--- a/tests/ui/generator/issue-52398.rs
+++ b/tests/ui/coroutine/issue-52398.rs
@@ -1,7 +1,7 @@
 // run-pass
 #![allow(unused_variables)]
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 use std::cell::RefCell;
 
@@ -14,14 +14,14 @@ impl A {
 fn main() {
     // Test that the MIR local with type &A created for the auto-borrow adjustment
     // is caught by typeck
-    move || { //~ WARN unused generator that must be used
+    move || { //~ WARN unused coroutine that must be used
         A.test(yield);
     };
 
     // Test that the std::cell::Ref temporary returned from the `borrow` call
     // is caught by typeck
     let y = RefCell::new(true);
-    static move || { //~ WARN unused generator that must be used
+    static move || { //~ WARN unused coroutine that must be used
         yield *y.borrow();
         return "Done";
     };
diff --git a/tests/ui/generator/issue-52398.stderr b/tests/ui/coroutine/issue-52398.stderr
index 539343275df..18d816da4c6 100644
--- a/tests/ui/generator/issue-52398.stderr
+++ b/tests/ui/coroutine/issue-52398.stderr
@@ -1,4 +1,4 @@
-warning: unused generator that must be used
+warning: unused coroutine that must be used
   --> $DIR/issue-52398.rs:17:5
    |
 LL | /     move || {
@@ -6,10 +6,10 @@ LL | |         A.test(yield);
 LL | |     };
    | |_____^
    |
-   = note: generators are lazy and do nothing unless resumed
+   = note: coroutines are lazy and do nothing unless resumed
    = note: `#[warn(unused_must_use)]` on by default
 
-warning: unused generator that must be used
+warning: unused coroutine that must be used
   --> $DIR/issue-52398.rs:24:5
    |
 LL | /     static move || {
@@ -18,7 +18,7 @@ LL | |         return "Done";
 LL | |     };
    | |_____^
    |
-   = note: generators are lazy and do nothing unless resumed
+   = note: coroutines are lazy and do nothing unless resumed
 
 warning: 2 warnings emitted
 
diff --git a/tests/ui/generator/issue-53548-1.rs b/tests/ui/coroutine/issue-53548-1.rs
index 173ae3c6fb6..4be8e95f3e7 100644
--- a/tests/ui/generator/issue-53548-1.rs
+++ b/tests/ui/coroutine/issue-53548-1.rs
@@ -1,4 +1,4 @@
-// A variant of #53548 that does not actually require generators,
+// A variant of #53548 that does not actually require coroutines,
 // but which encountered the same ICE/error. See `issue-53548.rs`
 // for details.
 //
diff --git a/tests/ui/generator/issue-53548.rs b/tests/ui/coroutine/issue-53548.rs
index 3ebabb91462..bb267f74ae2 100644
--- a/tests/ui/generator/issue-53548.rs
+++ b/tests/ui/coroutine/issue-53548.rs
@@ -1,5 +1,5 @@
 // Regression test for #53548. The `Box<dyn Trait>` type below is
-// expanded to `Box<dyn Trait + 'static>`, but the generator "witness"
+// expanded to `Box<dyn Trait + 'static>`, but the coroutine "witness"
 // that results is `for<'r> { Box<dyn Trait + 'r> }`. The WF code was
 // encountering an ICE (when debug-assertions were enabled) and an
 // unexpected compilation error (without debug-asserions) when trying
@@ -17,7 +17,7 @@
 //
 // check-pass
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 use std::cell::RefCell;
 use std::rc::Rc;
diff --git a/tests/ui/generator/issue-57017.rs b/tests/ui/coroutine/issue-57017.rs
index bb2d6679b67..4f63abbdb10 100644
--- a/tests/ui/generator/issue-57017.rs
+++ b/tests/ui/coroutine/issue-57017.rs
@@ -1,5 +1,5 @@
 // build-pass
-#![feature(generators, negative_impls)]
+#![feature(coroutines, negative_impls)]
 #![allow(dropping_references, dropping_copy_types)]
 
 macro_rules! type_combinations {
diff --git a/tests/ui/generator/issue-57084.rs b/tests/ui/coroutine/issue-57084.rs
index fbed78ff280..95bed5b151e 100644
--- a/tests/ui/generator/issue-57084.rs
+++ b/tests/ui/coroutine/issue-57084.rs
@@ -2,10 +2,10 @@
 // "cannot relate bound region: ReLateBound(DebruijnIndex(1), BrAnon(1)) <= '?1"
 // run-pass
 // edition:2018
-#![feature(generators,generator_trait)]
-use std::ops::Generator;
+#![feature(coroutines,coroutine_trait)]
+use std::ops::Coroutine;
 
-fn with<F>(f: F) -> impl Generator<Yield=(), Return=()>
+fn with<F>(f: F) -> impl Coroutine<Yield=(), Return=()>
 where F: Fn() -> ()
 {
     move || {
@@ -19,7 +19,7 @@ where F: Fn() -> ()
 
 fn main() {
     let data = &vec![1];
-    || { //~ WARN unused generator that must be used
+    || { //~ WARN unused coroutine that must be used
         let _to_pin = with(move || println!("{:p}", data));
         loop {
             yield
diff --git a/tests/ui/generator/issue-57084.stderr b/tests/ui/coroutine/issue-57084.stderr
index 8f1fc5e8031..9f5b79a6ae8 100644
--- a/tests/ui/generator/issue-57084.stderr
+++ b/tests/ui/coroutine/issue-57084.stderr
@@ -1,4 +1,4 @@
-warning: unused generator that must be used
+warning: unused coroutine that must be used
   --> $DIR/issue-57084.rs:22:5
    |
 LL | /     || {
@@ -9,7 +9,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-   = note: generators are lazy and do nothing unless resumed
+   = note: coroutines are lazy and do nothing unless resumed
    = note: `#[warn(unused_must_use)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/generator/issue-57478.rs b/tests/ui/coroutine/issue-57478.rs
index 39710febdb9..716e4c67b87 100644
--- a/tests/ui/generator/issue-57478.rs
+++ b/tests/ui/coroutine/issue-57478.rs
@@ -1,6 +1,6 @@
 // check-pass
 
-#![feature(negative_impls, generators)]
+#![feature(negative_impls, coroutines)]
 
 struct Foo;
 impl !Send for Foo {}
diff --git a/tests/ui/generator/issue-58888.rs b/tests/ui/coroutine/issue-58888.rs
index d42d09d401e..af8e60ce460 100644
--- a/tests/ui/generator/issue-58888.rs
+++ b/tests/ui/coroutine/issue-58888.rs
@@ -2,9 +2,9 @@
 // compile-flags: -g
 // ignore-asmjs wasm2js does not support source maps yet
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
 struct Database;
 
@@ -13,7 +13,7 @@ impl Database {
         Some(()).into_iter()
     }
 
-    fn check_connection(&self) -> impl Generator<Yield = (), Return = ()> + '_ {
+    fn check_connection(&self) -> impl Coroutine<Yield = (), Return = ()> + '_ {
         move || {
             let iter = self.get_connection();
             for i in iter {
diff --git a/tests/ui/generator/issue-61442-stmt-expr-with-drop.rs b/tests/ui/coroutine/issue-61442-stmt-expr-with-drop.rs
index 187c374021d..cff6c24a83f 100644
--- a/tests/ui/generator/issue-61442-stmt-expr-with-drop.rs
+++ b/tests/ui/coroutine/issue-61442-stmt-expr-with-drop.rs
@@ -4,9 +4,9 @@
 // check-pass
 // edition:2018
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
 async fn drop_and_await() {
     async {};
diff --git a/tests/ui/generator/issue-62506-two_awaits.rs b/tests/ui/coroutine/issue-62506-two_awaits.rs
index 672e16b780d..b50e2a45c58 100644
--- a/tests/ui/generator/issue-62506-two_awaits.rs
+++ b/tests/ui/coroutine/issue-62506-two_awaits.rs
@@ -1,5 +1,5 @@
 // Output = String caused an ICE whereas Output = &'static str compiled successfully.
-// Broken MIR: generator contains type std::string::String in MIR,
+// Broken MIR: coroutine contains type std::string::String in MIR,
 // but typeck only knows about {<S as T>::Future, ()}
 // check-pass
 // edition:2018
diff --git a/tests/ui/coroutine/issue-64620-yield-array-element.rs b/tests/ui/coroutine/issue-64620-yield-array-element.rs
new file mode 100644
index 00000000000..a9307d306a6
--- /dev/null
+++ b/tests/ui/coroutine/issue-64620-yield-array-element.rs
@@ -0,0 +1,9 @@
+// Regression test for #64620
+
+#![feature(coroutines)]
+
+pub fn crash(arr: [usize; 1]) {
+    yield arr[0]; //~ ERROR: yield expression outside of coroutine literal
+}
+
+fn main() {}
diff --git a/tests/ui/generator/issue-64620-yield-array-element.stderr b/tests/ui/coroutine/issue-64620-yield-array-element.stderr
index 48383c2ed08..47632d083ea 100644
--- a/tests/ui/generator/issue-64620-yield-array-element.stderr
+++ b/tests/ui/coroutine/issue-64620-yield-array-element.stderr
@@ -1,4 +1,4 @@
-error[E0627]: yield expression outside of generator literal
+error[E0627]: yield expression outside of coroutine literal
   --> $DIR/issue-64620-yield-array-element.rs:6:5
    |
 LL |     yield arr[0];
diff --git a/tests/ui/generator/issue-68112.rs b/tests/ui/coroutine/issue-68112.rs
index 9dd68726f92..e2be704dab7 100644
--- a/tests/ui/generator/issue-68112.rs
+++ b/tests/ui/coroutine/issue-68112.rs
@@ -1,18 +1,18 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::{
     cell::RefCell,
     sync::Arc,
     pin::Pin,
-    ops::{Generator, GeneratorState},
+    ops::{Coroutine, CoroutineState},
 };
 
 pub struct Ready<T>(Option<T>);
-impl<T: Unpin> Generator<()> for Ready<T> {
+impl<T: Unpin> Coroutine<()> for Ready<T> {
     type Return = T;
     type Yield = ();
-    fn resume(mut self: Pin<&mut Self>, _args: ()) -> GeneratorState<(), T> {
-        GeneratorState::Complete(self.0.take().unwrap())
+    fn resume(mut self: Pin<&mut Self>, _args: ()) -> CoroutineState<(), T> {
+        CoroutineState::Complete(self.0.take().unwrap())
     }
 }
 pub fn make_gen1<T>(t: T) -> Ready<T> {
@@ -25,40 +25,40 @@ fn require_send(_: impl Send) {}
 //~| NOTE required by this bound
 //~| NOTE required by this bound
 
-fn make_non_send_generator() -> impl Generator<Return = Arc<RefCell<i32>>> {
+fn make_non_send_coroutine() -> impl Coroutine<Return = Arc<RefCell<i32>>> {
     make_gen1(Arc::new(RefCell::new(0)))
 }
 
 fn test1() {
     let send_gen = || {
-        let _non_send_gen = make_non_send_generator();
+        let _non_send_gen = make_non_send_coroutine();
         //~^ NOTE not `Send`
         yield;
         //~^ NOTE yield occurs here
         //~| NOTE value is used across a yield
     };
     require_send(send_gen);
-    //~^ ERROR generator cannot be sent between threads
+    //~^ ERROR coroutine cannot be sent between threads
     //~| NOTE not `Send`
     //~| NOTE use `std::sync::RwLock` instead
 }
 
-pub fn make_gen2<T>(t: T) -> impl Generator<Return = T> {
+pub fn make_gen2<T>(t: T) -> impl Coroutine<Return = T> {
 //~^ NOTE appears within the type
 //~| NOTE expansion of desugaring
-    || { //~ NOTE used within this generator
+    || { //~ NOTE used within this coroutine
         yield;
         t
     }
 }
-fn make_non_send_generator2() -> impl Generator<Return = Arc<RefCell<i32>>> { //~ NOTE appears within the type
+fn make_non_send_coroutine2() -> impl Coroutine<Return = Arc<RefCell<i32>>> { //~ NOTE appears within the type
 //~^ NOTE expansion of desugaring
     make_gen2(Arc::new(RefCell::new(0)))
 }
 
 fn test2() {
-    let send_gen = || { //~ NOTE used within this generator
-        let _non_send_gen = make_non_send_generator2();
+    let send_gen = || { //~ NOTE used within this coroutine
+        let _non_send_gen = make_non_send_coroutine2();
         yield;
     };
     require_send(send_gen);
diff --git a/tests/ui/generator/issue-68112.stderr b/tests/ui/coroutine/issue-68112.stderr
index 8080048222f..5efa72ad5fe 100644
--- a/tests/ui/generator/issue-68112.stderr
+++ b/tests/ui/coroutine/issue-68112.stderr
@@ -1,16 +1,16 @@
-error: generator cannot be sent between threads safely
+error: coroutine cannot be sent between threads safely
   --> $DIR/issue-68112.rs:40:5
    |
 LL |     require_send(send_gen);
-   |     ^^^^^^^^^^^^ generator is not `Send`
+   |     ^^^^^^^^^^^^ coroutine is not `Send`
    |
    = help: the trait `Sync` is not implemented for `RefCell<i32>`
    = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
-note: generator is not `Send` as this value is used across a yield
+note: coroutine is not `Send` as this value is used across a yield
   --> $DIR/issue-68112.rs:36:9
    |
-LL |         let _non_send_gen = make_non_send_generator();
-   |             ------------- has type `impl Generator<Return = Arc<RefCell<i32>>>` which is not `Send`
+LL |         let _non_send_gen = make_non_send_coroutine();
+   |             ------------- has type `impl Coroutine<Return = Arc<RefCell<i32>>>` which is not `Send`
 LL |
 LL |         yield;
    |         ^^^^^ yield occurs here, with `_non_send_gen` maybe used later
@@ -29,23 +29,23 @@ LL |     require_send(send_gen);
    = help: the trait `Sync` is not implemented for `RefCell<i32>`
    = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
    = note: required for `Arc<RefCell<i32>>` to implement `Send`
-note: required because it's used within this generator
+note: required because it's used within this coroutine
   --> $DIR/issue-68112.rs:49:5
    |
 LL |     || {
    |     ^^
-note: required because it appears within the type `impl Generator<Return = Arc<RefCell<i32>>>`
+note: required because it appears within the type `impl Coroutine<Return = Arc<RefCell<i32>>>`
   --> $DIR/issue-68112.rs:46:30
    |
-LL | pub fn make_gen2<T>(t: T) -> impl Generator<Return = T> {
+LL | pub fn make_gen2<T>(t: T) -> impl Coroutine<Return = T> {
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: required because it appears within the type `impl Generator<Return = Arc<RefCell<i32>>>`
+note: required because it appears within the type `impl Coroutine<Return = Arc<RefCell<i32>>>`
   --> $DIR/issue-68112.rs:54:34
    |
-LL | fn make_non_send_generator2() -> impl Generator<Return = Arc<RefCell<i32>>> {
+LL | fn make_non_send_coroutine2() -> impl Coroutine<Return = Arc<RefCell<i32>>> {
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: required because it captures the following types: `impl Generator<Return = Arc<RefCell<i32>>>`
-note: required because it's used within this generator
+   = note: required because it captures the following types: `impl Coroutine<Return = Arc<RefCell<i32>>>`
+note: required because it's used within this coroutine
   --> $DIR/issue-68112.rs:60:20
    |
 LL |     let send_gen = || {
diff --git a/tests/ui/generator/issue-69017.rs b/tests/ui/coroutine/issue-69017.rs
index 511deb60e45..7aaa1ee03c4 100644
--- a/tests/ui/generator/issue-69017.rs
+++ b/tests/ui/coroutine/issue-69017.rs
@@ -4,12 +4,12 @@
 //
 // check-pass
 
-#![feature(generator_trait)]
-#![feature(generators)]
+#![feature(coroutine_trait)]
+#![feature(coroutines)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
-fn gen() -> impl Generator<usize> {
+fn gen() -> impl Coroutine<usize> {
     |_: usize| {
         println!("-> {}", yield);
     }
diff --git a/tests/ui/generator/issue-69039.rs b/tests/ui/coroutine/issue-69039.rs
index ccc141860aa..041985e15a3 100644
--- a/tests/ui/generator/issue-69039.rs
+++ b/tests/ui/coroutine/issue-69039.rs
@@ -1,14 +1,14 @@
 // run-pass
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 
 fn mkstr(my_name: String, my_mood: String) -> String {
     format!("{} is {}", my_name.trim(), my_mood.trim())
 }
 
-fn my_scenario() -> impl Generator<String, Yield = &'static str, Return = String> {
+fn my_scenario() -> impl Coroutine<String, Yield = &'static str, Return = String> {
     |_arg: String| {
         let my_name = yield "What is your name?";
         let my_mood = yield "How are you feeling?";
@@ -21,14 +21,14 @@ fn main() {
 
     assert_eq!(
         my_session.as_mut().resume("_arg".to_string()),
-        GeneratorState::Yielded("What is your name?")
+        CoroutineState::Yielded("What is your name?")
     );
     assert_eq!(
         my_session.as_mut().resume("Your Name".to_string()),
-        GeneratorState::Yielded("How are you feeling?")
+        CoroutineState::Yielded("How are you feeling?")
     );
     assert_eq!(
         my_session.as_mut().resume("Sensory Organs".to_string()),
-        GeneratorState::Complete("Your Name is Sensory Organs".to_string())
+        CoroutineState::Complete("Your Name is Sensory Organs".to_string())
     );
 }
diff --git a/tests/ui/coroutine/issue-87142.rs b/tests/ui/coroutine/issue-87142.rs
new file mode 100644
index 00000000000..b5708c4b385
--- /dev/null
+++ b/tests/ui/coroutine/issue-87142.rs
@@ -0,0 +1,32 @@
+// compile-flags: -Cdebuginfo=2
+// build-pass
+
+// Regression test for #87142
+// This test needs the above flags and the "lib" crate type.
+
+#![feature(impl_trait_in_assoc_type, coroutine_trait, coroutines)]
+#![crate_type = "lib"]
+
+use std::ops::Coroutine;
+
+pub trait CoroutineProviderAlt: Sized {
+    type Coro: Coroutine<(), Return = (), Yield = ()>;
+
+    fn start(ctx: Context<Self>) -> Self::Coro;
+}
+
+pub struct Context<G: 'static + CoroutineProviderAlt> {
+    pub link: Box<G::Coro>,
+}
+
+impl CoroutineProviderAlt for () {
+    type Coro = impl Coroutine<(), Return = (), Yield = ()>;
+    fn start(ctx: Context<Self>) -> Self::Coro {
+        move || {
+            match ctx {
+                _ => (),
+            }
+            yield ();
+        }
+    }
+}
diff --git a/tests/ui/generator/issue-88653.rs b/tests/ui/coroutine/issue-88653.rs
index 1d9377bcef4..ec4c2054758 100644
--- a/tests/ui/generator/issue-88653.rs
+++ b/tests/ui/coroutine/issue-88653.rs
@@ -1,14 +1,14 @@
 // Regression test for #88653, where a confusing warning about a
-// type mismatch in generator arguments was issued.
+// type mismatch in coroutine arguments was issued.
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
-fn foo(bar: bool) -> impl Generator<(bool,)> {
-    //~^ ERROR: type mismatch in generator arguments [E0631]
+fn foo(bar: bool) -> impl Coroutine<(bool,)> {
+    //~^ ERROR: type mismatch in coroutine arguments [E0631]
     //~| NOTE: expected due to this
-    //~| NOTE: expected generator signature `fn((bool,)) -> _`
+    //~| NOTE: expected coroutine signature `fn((bool,)) -> _`
     //~| NOTE: in this expansion of desugaring of `impl Trait`
     //~| NOTE: in this expansion of desugaring of `impl Trait`
     |bar| {
diff --git a/tests/ui/generator/issue-88653.stderr b/tests/ui/coroutine/issue-88653.stderr
index b742c6e2f1c..3ae50b5aff2 100644
--- a/tests/ui/generator/issue-88653.stderr
+++ b/tests/ui/coroutine/issue-88653.stderr
@@ -1,14 +1,14 @@
-error[E0631]: type mismatch in generator arguments
+error[E0631]: type mismatch in coroutine arguments
   --> $DIR/issue-88653.rs:8:22
    |
-LL | fn foo(bar: bool) -> impl Generator<(bool,)> {
+LL | fn foo(bar: bool) -> impl Coroutine<(bool,)> {
    |                      ^^^^^^^^^^^^^^^^^^^^^^^ expected due to this
 ...
 LL |     |bar| {
    |     ----- found signature defined here
    |
-   = note: expected generator signature `fn((bool,)) -> _`
-              found generator signature `fn(bool) -> _`
+   = note: expected coroutine signature `fn((bool,)) -> _`
+              found coroutine signature `fn(bool) -> _`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/generator/issue-91477.rs b/tests/ui/coroutine/issue-91477.rs
index 6c027feb422..c98546f7971 100644
--- a/tests/ui/generator/issue-91477.rs
+++ b/tests/ui/coroutine/issue-91477.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn foo() -> impl Sized {
     yield 1; //~ ERROR E0627
diff --git a/tests/ui/generator/issue-91477.stderr b/tests/ui/coroutine/issue-91477.stderr
index 4597dc1bcdf..0ab3c1fbabc 100644
--- a/tests/ui/generator/issue-91477.stderr
+++ b/tests/ui/coroutine/issue-91477.stderr
@@ -1,4 +1,4 @@
-error[E0627]: yield expression outside of generator literal
+error[E0627]: yield expression outside of coroutine literal
   --> $DIR/issue-91477.rs:4:5
    |
 LL |     yield 1;
diff --git a/tests/ui/generator/issue-93161.rs b/tests/ui/coroutine/issue-93161.rs
index ae8603b7c09..ae8603b7c09 100644
--- a/tests/ui/generator/issue-93161.rs
+++ b/tests/ui/coroutine/issue-93161.rs
diff --git a/tests/ui/generator/iterator-count.rs b/tests/ui/coroutine/iterator-count.rs
index 90eefe02f66..322e56f8a8b 100644
--- a/tests/ui/generator/iterator-count.rs
+++ b/tests/ui/coroutine/iterator-count.rs
@@ -1,27 +1,27 @@
 // run-pass
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::marker::Unpin;
-use std::ops::{GeneratorState, Generator};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 struct W<T>(T);
 
-// This impl isn't safe in general, but the generator used in this test is movable
+// This impl isn't safe in general, but the coroutine used in this test is movable
 // so it won't cause problems.
-impl<T: Generator<(), Return = ()> + Unpin> Iterator for W<T> {
+impl<T: Coroutine<(), Return = ()> + Unpin> Iterator for W<T> {
     type Item = T::Yield;
 
     fn next(&mut self) -> Option<Self::Item> {
         match Pin::new(&mut self.0).resume(()) {
-            GeneratorState::Complete(..) => None,
-            GeneratorState::Yielded(v) => Some(v),
+            CoroutineState::Complete(..) => None,
+            CoroutineState::Yielded(v) => Some(v),
         }
     }
 }
 
-fn test() -> impl Generator<(), Return=(), Yield=u8> + Unpin {
+fn test() -> impl Coroutine<(), Return = (), Yield = u8> + Unpin {
     || {
         for i in 1..6 {
             yield i
diff --git a/tests/ui/generator/layout-error.rs b/tests/ui/coroutine/layout-error.rs
index 7c3d187409a..87da60700a4 100644
--- a/tests/ui/generator/layout-error.rs
+++ b/tests/ui/coroutine/layout-error.rs
@@ -1,4 +1,4 @@
-// Verifies that computing a layout of a generator tainted by type errors
+// Verifies that computing a layout of a coroutine tainted by type errors
 // doesn't ICE. Regression test for #80998.
 //
 // edition:2018
diff --git a/tests/ui/generator/layout-error.stderr b/tests/ui/coroutine/layout-error.stderr
index b1a258f4f2c..b1a258f4f2c 100644
--- a/tests/ui/generator/layout-error.stderr
+++ b/tests/ui/coroutine/layout-error.stderr
diff --git a/tests/ui/generator/live-upvar-across-yield.rs b/tests/ui/coroutine/live-upvar-across-yield.rs
index 6a2e42a5573..740a446e737 100644
--- a/tests/ui/generator/live-upvar-across-yield.rs
+++ b/tests/ui/coroutine/live-upvar-across-yield.rs
@@ -1,8 +1,8 @@
 // run-pass
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 
 fn main() {
diff --git a/tests/ui/generator/match-bindings.rs b/tests/ui/coroutine/match-bindings.rs
index 865904a57d4..1a5b3cdb026 100644
--- a/tests/ui/generator/match-bindings.rs
+++ b/tests/ui/coroutine/match-bindings.rs
@@ -1,7 +1,7 @@
 // run-pass
 #![allow(dead_code)]
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 enum Enum {
     A(String),
@@ -9,7 +9,7 @@ enum Enum {
 }
 
 fn main() {
-    || { //~ WARN unused generator that must be used
+    || { //~ WARN unused coroutine that must be used
         loop {
             if let true = true {
                 match Enum::A(String::new()) {
diff --git a/tests/ui/generator/match-bindings.stderr b/tests/ui/coroutine/match-bindings.stderr
index 3dd2d595445..a7aa6eadb95 100644
--- a/tests/ui/generator/match-bindings.stderr
+++ b/tests/ui/coroutine/match-bindings.stderr
@@ -1,4 +1,4 @@
-warning: unused generator that must be used
+warning: unused coroutine that must be used
   --> $DIR/match-bindings.rs:12:5
    |
 LL | /     || {
@@ -10,7 +10,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-   = note: generators are lazy and do nothing unless resumed
+   = note: coroutines are lazy and do nothing unless resumed
    = note: `#[warn(unused_must_use)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/generator/metadata-sufficient-for-layout.rs b/tests/ui/coroutine/metadata-sufficient-for-layout.rs
index d0e648ee775..434a2801597 100644
--- a/tests/ui/generator/metadata-sufficient-for-layout.rs
+++ b/tests/ui/coroutine/metadata-sufficient-for-layout.rs
@@ -1,4 +1,4 @@
-// Check that the layout of a generator is available when auxiliary crate
+// Check that the layout of a coroutine is available when auxiliary crate
 // is compiled with --emit metadata.
 //
 // Regression test for #80998.
@@ -6,15 +6,15 @@
 // aux-build:metadata-sufficient-for-layout.rs
 
 #![feature(type_alias_impl_trait, rustc_attrs)]
-#![feature(generator_trait)]
+#![feature(coroutine_trait)]
 
 extern crate metadata_sufficient_for_layout;
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
-type F = impl Generator<(), Yield = (), Return = ()>;
+type F = impl Coroutine<(), Yield = (), Return = ()>;
 
-// Static queries the layout of the generator.
+// Static queries the layout of the coroutine.
 static A: Option<F> = None;
 
 fn f() -> F {
diff --git a/tests/ui/generator/metadata-sufficient-for-layout.stderr b/tests/ui/coroutine/metadata-sufficient-for-layout.stderr
index 3488b04f226..3488b04f226 100644
--- a/tests/ui/generator/metadata-sufficient-for-layout.stderr
+++ b/tests/ui/coroutine/metadata-sufficient-for-layout.stderr
diff --git a/tests/ui/coroutine/nested_coroutine.rs b/tests/ui/coroutine/nested_coroutine.rs
new file mode 100644
index 00000000000..04f4aa77153
--- /dev/null
+++ b/tests/ui/coroutine/nested_coroutine.rs
@@ -0,0 +1,21 @@
+// run-pass
+
+#![feature(coroutines, coroutine_trait)]
+
+use std::ops::{Coroutine, CoroutineState};
+use std::pin::Pin;
+
+fn main() {
+    let _coroutine = || {
+        let mut sub_coroutine = || {
+            yield 2;
+        };
+
+        match Pin::new(&mut sub_coroutine).resume(()) {
+            CoroutineState::Yielded(x) => {
+                yield x;
+            }
+            _ => panic!(),
+        };
+    };
+}
diff --git a/tests/ui/generator/niche-in-generator.rs b/tests/ui/coroutine/niche-in-coroutine.rs
index 42bee81f524..7ad4c6bc98a 100644
--- a/tests/ui/generator/niche-in-generator.rs
+++ b/tests/ui/coroutine/niche-in-coroutine.rs
@@ -1,8 +1,8 @@
-// Test that niche finding works with captured generator upvars.
+// Test that niche finding works with captured coroutine upvars.
 
 // run-pass
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 use std::mem::size_of_val;
 
diff --git a/tests/ui/generator/non-static-is-unpin.rs b/tests/ui/coroutine/non-static-is-unpin.rs
index a5dde3912cc..d6ded53ae5a 100644
--- a/tests/ui/generator/non-static-is-unpin.rs
+++ b/tests/ui/coroutine/non-static-is-unpin.rs
@@ -2,7 +2,7 @@
 //[next] compile-flags: -Ztrait-solver=next
 // run-pass
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 #![allow(dropping_copy_types)]
 
 use std::marker::{PhantomPinned, Unpin};
@@ -11,7 +11,7 @@ fn assert_unpin<G: Unpin>(_: G) {
 }
 
 fn main() {
-    // Even though this generator holds a `PhantomPinned` in its environment, it
+    // Even though this coroutine holds a `PhantomPinned` in its environment, it
     // remains `Unpin`.
     assert_unpin(|| {
         let pinned = PhantomPinned;
diff --git a/tests/ui/generator/not-send-sync.rs b/tests/ui/coroutine/not-send-sync.rs
index 16c8cd47629..dd6182c10de 100644
--- a/tests/ui/generator/not-send-sync.rs
+++ b/tests/ui/coroutine/not-send-sync.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 #![feature(negative_impls)]
 
 struct NotSend;
@@ -12,14 +12,14 @@ fn main() {
     fn assert_send<T: Send>(_: T) {}
 
     assert_sync(|| {
-        //~^ ERROR: generator cannot be shared between threads safely
+        //~^ ERROR: coroutine cannot be shared between threads safely
         let a = NotSync;
         yield;
         drop(a);
     });
 
     assert_send(|| {
-        //~^ ERROR: generator cannot be sent between threads safely
+        //~^ ERROR: coroutine cannot be sent between threads safely
         let a = NotSend;
         yield;
         drop(a);
diff --git a/tests/ui/generator/not-send-sync.stderr b/tests/ui/coroutine/not-send-sync.stderr
index 13ce687e0bb..b33a1e63aaf 100644
--- a/tests/ui/generator/not-send-sync.stderr
+++ b/tests/ui/coroutine/not-send-sync.stderr
@@ -1,11 +1,11 @@
-error: generator cannot be shared between threads safely
+error: coroutine cannot be shared between threads safely
   --> $DIR/not-send-sync.rs:14:5
    |
 LL |     assert_sync(|| {
-   |     ^^^^^^^^^^^ generator is not `Sync`
+   |     ^^^^^^^^^^^ coroutine is not `Sync`
    |
-   = help: within `{generator@$DIR/not-send-sync.rs:14:17: 14:19}`, the trait `Sync` is not implemented for `NotSync`
-note: generator is not `Sync` as this value is used across a yield
+   = help: within `{coroutine@$DIR/not-send-sync.rs:14:17: 14:19}`, the trait `Sync` is not implemented for `NotSync`
+note: coroutine is not `Sync` as this value is used across a yield
   --> $DIR/not-send-sync.rs:17:9
    |
 LL |         let a = NotSync;
@@ -18,14 +18,14 @@ note: required by a bound in `assert_sync`
 LL |     fn assert_sync<T: Sync>(_: T) {}
    |                       ^^^^ required by this bound in `assert_sync`
 
-error: generator cannot be sent between threads safely
+error: coroutine cannot be sent between threads safely
   --> $DIR/not-send-sync.rs:21:5
    |
 LL |     assert_send(|| {
-   |     ^^^^^^^^^^^ generator is not `Send`
+   |     ^^^^^^^^^^^ coroutine is not `Send`
    |
-   = help: within `{generator@$DIR/not-send-sync.rs:21:17: 21:19}`, the trait `Send` is not implemented for `NotSend`
-note: generator is not `Send` as this value is used across a yield
+   = help: within `{coroutine@$DIR/not-send-sync.rs:21:17: 21:19}`, the trait `Send` is not implemented for `NotSend`
+note: coroutine is not `Send` as this value is used across a yield
   --> $DIR/not-send-sync.rs:24:9
    |
 LL |         let a = NotSend;
diff --git a/tests/ui/generator/overlap-locals.rs b/tests/ui/coroutine/overlap-locals.rs
index 101c8714fa8..7c151270bb5 100644
--- a/tests/ui/generator/overlap-locals.rs
+++ b/tests/ui/coroutine/overlap-locals.rs
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
     let a = || {
diff --git a/tests/ui/generator/panic-drops-resume.rs b/tests/ui/coroutine/panic-drops-resume.rs
index 4c3caeb14d6..e866f216a24 100644
--- a/tests/ui/generator/panic-drops-resume.rs
+++ b/tests/ui/coroutine/panic-drops-resume.rs
@@ -1,11 +1,11 @@
-//! Tests that panics inside a generator will correctly drop the initial resume argument.
+//! Tests that panics inside a coroutine will correctly drop the initial resume argument.
 
 // run-pass
 // needs-unwind
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::panic::{catch_unwind, AssertUnwindSafe};
 use std::pin::Pin;
 use std::sync::atomic::{AtomicUsize, Ordering};
diff --git a/tests/ui/generator/panic-drops.rs b/tests/ui/coroutine/panic-drops.rs
index 65001fd879b..7e37279b9eb 100644
--- a/tests/ui/generator/panic-drops.rs
+++ b/tests/ui/coroutine/panic-drops.rs
@@ -2,9 +2,9 @@
 // needs-unwind
 
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::panic;
 use std::pin::Pin;
 use std::sync::atomic::{AtomicUsize, Ordering};
diff --git a/tests/ui/generator/panic-safe.rs b/tests/ui/coroutine/panic-safe.rs
index 3db80bb5821..9aa42756544 100644
--- a/tests/ui/generator/panic-safe.rs
+++ b/tests/ui/coroutine/panic-safe.rs
@@ -2,9 +2,9 @@
 // needs-unwind
 
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 use std::panic;
 
diff --git a/tests/ui/generator/parent-expression.rs b/tests/ui/coroutine/parent-expression.rs
index 198b14528aa..4d40192c07a 100644
--- a/tests/ui/generator/parent-expression.rs
+++ b/tests/ui/coroutine/parent-expression.rs
@@ -1,4 +1,4 @@
-#![feature(generators, negative_impls, rustc_attrs)]
+#![feature(coroutines, negative_impls, rustc_attrs)]
 
 macro_rules! type_combinations {
     (
diff --git a/tests/ui/generator/parent-expression.stderr b/tests/ui/coroutine/parent-expression.stderr
index 25a3b051b1f..6b611bc3f10 100644
--- a/tests/ui/generator/parent-expression.stderr
+++ b/tests/ui/coroutine/parent-expression.stderr
@@ -1,8 +1,8 @@
-error: generator cannot be sent between threads safely
+error: coroutine cannot be sent between threads safely
   --> $DIR/parent-expression.rs:23:13
    |
 LL |               assert_send(g);
-   |               ^^^^^^^^^^^ generator is not `Send`
+   |               ^^^^^^^^^^^ coroutine is not `Send`
 ...
 LL | /     type_combinations!(
 LL | |         // OK
@@ -13,8 +13,8 @@ LL | |         };
 LL | |     );
    | |_____- in this macro invocation
    |
-   = help: within `{generator@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `derived_drop::Client`
-note: generator is not `Send` as this value is used across a yield
+   = help: within `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `derived_drop::Client`
+note: coroutine is not `Send` as this value is used across a yield
   --> $DIR/parent-expression.rs:21:22
    |
 LL |               let g = move || match drop($name::Client { ..$name::Client::default() }) {
@@ -38,11 +38,11 @@ LL | fn assert_send<T: Send>(_thing: T) {}
    |                   ^^^^ required by this bound in `assert_send`
    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: generator cannot be sent between threads safely
+error: coroutine cannot be sent between threads safely
   --> $DIR/parent-expression.rs:23:13
    |
 LL |               assert_send(g);
-   |               ^^^^^^^^^^^ generator is not `Send`
+   |               ^^^^^^^^^^^ coroutine is not `Send`
 ...
 LL | /     type_combinations!(
 LL | |         // OK
@@ -53,8 +53,8 @@ LL | |         };
 LL | |     );
    | |_____- in this macro invocation
    |
-   = help: within `{generator@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `significant_drop::Client`
-note: generator is not `Send` as this value is used across a yield
+   = help: within `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `significant_drop::Client`
+note: coroutine is not `Send` as this value is used across a yield
   --> $DIR/parent-expression.rs:21:22
    |
 LL |               let g = move || match drop($name::Client { ..$name::Client::default() }) {
@@ -78,11 +78,11 @@ LL | fn assert_send<T: Send>(_thing: T) {}
    |                   ^^^^ required by this bound in `assert_send`
    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: generator cannot be sent between threads safely
+error: coroutine cannot be sent between threads safely
   --> $DIR/parent-expression.rs:23:13
    |
 LL |               assert_send(g);
-   |               ^^^^^^^^^^^ generator is not `Send`
+   |               ^^^^^^^^^^^ coroutine is not `Send`
 ...
 LL | /     type_combinations!(
 LL | |         // OK
@@ -93,8 +93,8 @@ LL | |         };
 LL | |     );
    | |_____- in this macro invocation
    |
-   = help: within `{generator@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `insignificant_dtor::Client`
-note: generator is not `Send` as this value is used across a yield
+   = help: within `{coroutine@$DIR/parent-expression.rs:17:21: 17:28}`, the trait `Send` is not implemented for `insignificant_dtor::Client`
+note: coroutine is not `Send` as this value is used across a yield
   --> $DIR/parent-expression.rs:21:22
    |
 LL |               let g = move || match drop($name::Client { ..$name::Client::default() }) {
diff --git a/tests/ui/generator/partial-drop.rs b/tests/ui/coroutine/partial-drop.rs
index 868f36adce2..a4347f52a70 100644
--- a/tests/ui/generator/partial-drop.rs
+++ b/tests/ui/coroutine/partial-drop.rs
@@ -1,5 +1,5 @@
 // check-pass
-#![feature(negative_impls, generators)]
+#![feature(negative_impls, coroutines)]
 
 struct Foo;
 impl !Send for Foo {}
diff --git a/tests/ui/generator/partial-initialization-across-yield.rs b/tests/ui/coroutine/partial-initialization-across-yield.rs
index 65d9e6d39ca..75ad5a22804 100644
--- a/tests/ui/generator/partial-initialization-across-yield.rs
+++ b/tests/ui/coroutine/partial-initialization-across-yield.rs
@@ -1,7 +1,7 @@
-// Test that we don't allow yielding from a generator while a local is partially
+// Test that we don't allow yielding from a coroutine while a local is partially
 // initialized.
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 struct S { x: i32, y: i32 }
 struct T(i32, i32);
diff --git a/tests/ui/generator/partial-initialization-across-yield.stderr b/tests/ui/coroutine/partial-initialization-across-yield.stderr
index 3f9f1c046ba..3f9f1c046ba 100644
--- a/tests/ui/generator/partial-initialization-across-yield.stderr
+++ b/tests/ui/coroutine/partial-initialization-across-yield.stderr
diff --git a/tests/ui/generator/pattern-borrow.rs b/tests/ui/coroutine/pattern-borrow.rs
index d1936370819..76084433d47 100644
--- a/tests/ui/generator/pattern-borrow.rs
+++ b/tests/ui/coroutine/pattern-borrow.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 enum Test { A(i32), B, }
 
@@ -6,7 +6,7 @@ fn main() { }
 
 fn fun(test: Test) {
     move || {
-        if let Test::A(ref _a) = test { //~ ERROR borrow may still be in use when generator yields
+        if let Test::A(ref _a) = test { //~ ERROR borrow may still be in use when coroutine yields
             yield ();
             _a.use_ref();
         }
diff --git a/tests/ui/generator/pattern-borrow.stderr b/tests/ui/coroutine/pattern-borrow.stderr
index d78da510491..ddb3bf66214 100644
--- a/tests/ui/generator/pattern-borrow.stderr
+++ b/tests/ui/coroutine/pattern-borrow.stderr
@@ -1,4 +1,4 @@
-error[E0626]: borrow may still be in use when generator yields
+error[E0626]: borrow may still be in use when coroutine yields
   --> $DIR/pattern-borrow.rs:9:24
    |
 LL |         if let Test::A(ref _a) = test {
diff --git a/tests/ui/coroutine/pin-box-coroutine.rs b/tests/ui/coroutine/pin-box-coroutine.rs
new file mode 100644
index 00000000000..e348551a642
--- /dev/null
+++ b/tests/ui/coroutine/pin-box-coroutine.rs
@@ -0,0 +1,13 @@
+// run-pass
+
+#![feature(coroutines, coroutine_trait)]
+
+use std::ops::Coroutine;
+
+fn assert_coroutine<G: Coroutine>(_: G) {
+}
+
+fn main() {
+    assert_coroutine(static || yield);
+    assert_coroutine(Box::pin(static || yield));
+}
diff --git a/tests/ui/generator/print/generator-print-verbose-1.rs b/tests/ui/coroutine/print/coroutine-print-verbose-1.rs
index e52234c08a3..c47d7572ca7 100644
--- a/tests/ui/generator/print/generator-print-verbose-1.rs
+++ b/tests/ui/coroutine/print/coroutine-print-verbose-1.rs
@@ -1,22 +1,22 @@
 // compile-flags: -Zverbose
 
-// Same as: tests/ui/generator/issue-68112.stderr
+// Same as: tests/ui/coroutine/issue-68112.stderr
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::{
     cell::RefCell,
     sync::Arc,
     pin::Pin,
-    ops::{Generator, GeneratorState},
+    ops::{Coroutine, CoroutineState},
 };
 
 pub struct Ready<T>(Option<T>);
-impl<T: Unpin> Generator<()> for Ready<T> {
+impl<T: Unpin> Coroutine<()> for Ready<T> {
     type Return = T;
     type Yield = ();
-    fn resume(mut self: Pin<&mut Self>, _args: ()) -> GeneratorState<(), T> {
-        GeneratorState::Complete(self.0.take().unwrap())
+    fn resume(mut self: Pin<&mut Self>, _args: ()) -> CoroutineState<(), T> {
+        CoroutineState::Complete(self.0.take().unwrap())
     }
 }
 pub fn make_gen1<T>(t: T) -> Ready<T> {
@@ -25,32 +25,32 @@ pub fn make_gen1<T>(t: T) -> Ready<T> {
 
 fn require_send(_: impl Send) {}
 
-fn make_non_send_generator() -> impl Generator<Return = Arc<RefCell<i32>>> {
+fn make_non_send_coroutine() -> impl Coroutine<Return = Arc<RefCell<i32>>> {
     make_gen1(Arc::new(RefCell::new(0)))
 }
 
 fn test1() {
     let send_gen = || {
-        let _non_send_gen = make_non_send_generator();
+        let _non_send_gen = make_non_send_coroutine();
         yield;
     };
     require_send(send_gen);
-    //~^ ERROR generator cannot be sent between threads
+    //~^ ERROR coroutine cannot be sent between threads
 }
 
-pub fn make_gen2<T>(t: T) -> impl Generator<Return = T> {
+pub fn make_gen2<T>(t: T) -> impl Coroutine<Return = T> {
     || {
         yield;
         t
     }
 }
-fn make_non_send_generator2() -> impl Generator<Return = Arc<RefCell<i32>>> {
+fn make_non_send_coroutine2() -> impl Coroutine<Return = Arc<RefCell<i32>>> {
     make_gen2(Arc::new(RefCell::new(0)))
 }
 
 fn test2() {
     let send_gen = || {
-        let _non_send_gen = make_non_send_generator2();
+        let _non_send_gen = make_non_send_coroutine2();
         yield;
     };
     require_send(send_gen);
diff --git a/tests/ui/generator/print/generator-print-verbose-1.stderr b/tests/ui/coroutine/print/coroutine-print-verbose-1.stderr
index d949543de41..bcdcbc154cf 100644
--- a/tests/ui/generator/print/generator-print-verbose-1.stderr
+++ b/tests/ui/coroutine/print/coroutine-print-verbose-1.stderr
@@ -1,26 +1,26 @@
-error: generator cannot be sent between threads safely
-  --> $DIR/generator-print-verbose-1.rs:37:5
+error: coroutine cannot be sent between threads safely
+  --> $DIR/coroutine-print-verbose-1.rs:37:5
    |
 LL |     require_send(send_gen);
-   |     ^^^^^^^^^^^^ generator is not `Send`
+   |     ^^^^^^^^^^^^ coroutine is not `Send`
    |
    = help: the trait `Sync` is not implemented for `RefCell<i32>`
    = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
-note: generator is not `Send` as this value is used across a yield
-  --> $DIR/generator-print-verbose-1.rs:35:9
+note: coroutine is not `Send` as this value is used across a yield
+  --> $DIR/coroutine-print-verbose-1.rs:35:9
    |
-LL |         let _non_send_gen = make_non_send_generator();
-   |             ------------- has type `Opaque(DefId(0:34 ~ generator_print_verbose_1[7d1d]::make_non_send_generator::{opaque#0}), [])` which is not `Send`
+LL |         let _non_send_gen = make_non_send_coroutine();
+   |             ------------- has type `Opaque(DefId(0:34 ~ coroutine_print_verbose_1[75fb]::make_non_send_coroutine::{opaque#0}), [])` which is not `Send`
 LL |         yield;
    |         ^^^^^ yield occurs here, with `_non_send_gen` maybe used later
 note: required by a bound in `require_send`
-  --> $DIR/generator-print-verbose-1.rs:26:25
+  --> $DIR/coroutine-print-verbose-1.rs:26:25
    |
 LL | fn require_send(_: impl Send) {}
    |                         ^^^^ required by this bound in `require_send`
 
 error[E0277]: `RefCell<i32>` cannot be shared between threads safely
-  --> $DIR/generator-print-verbose-1.rs:56:5
+  --> $DIR/coroutine-print-verbose-1.rs:56:5
    |
 LL |     require_send(send_gen);
    |     ^^^^^^^^^^^^ `RefCell<i32>` cannot be shared between threads safely
@@ -28,29 +28,29 @@ LL |     require_send(send_gen);
    = help: the trait `Sync` is not implemented for `RefCell<i32>`
    = note: if you want to do aliasing and mutation between multiple threads, use `std::sync::RwLock` instead
    = note: required for `Arc<RefCell<i32>>` to implement `Send`
-note: required because it's used within this generator
-  --> $DIR/generator-print-verbose-1.rs:42:5
+note: required because it's used within this coroutine
+  --> $DIR/coroutine-print-verbose-1.rs:42:5
    |
 LL |     || {
    |     ^^
-note: required because it appears within the type `Opaque(DefId(0:35 ~ generator_print_verbose_1[7d1d]::make_gen2::{opaque#0}), [Arc<RefCell<i32>>])`
-  --> $DIR/generator-print-verbose-1.rs:41:30
+note: required because it appears within the type `Opaque(DefId(0:35 ~ coroutine_print_verbose_1[75fb]::make_gen2::{opaque#0}), [Arc<RefCell<i32>>])`
+  --> $DIR/coroutine-print-verbose-1.rs:41:30
    |
-LL | pub fn make_gen2<T>(t: T) -> impl Generator<Return = T> {
+LL | pub fn make_gen2<T>(t: T) -> impl Coroutine<Return = T> {
    |                              ^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: required because it appears within the type `Opaque(DefId(0:36 ~ generator_print_verbose_1[7d1d]::make_non_send_generator2::{opaque#0}), [])`
-  --> $DIR/generator-print-verbose-1.rs:47:34
+note: required because it appears within the type `Opaque(DefId(0:36 ~ coroutine_print_verbose_1[75fb]::make_non_send_coroutine2::{opaque#0}), [])`
+  --> $DIR/coroutine-print-verbose-1.rs:47:34
    |
-LL | fn make_non_send_generator2() -> impl Generator<Return = Arc<RefCell<i32>>> {
+LL | fn make_non_send_coroutine2() -> impl Coroutine<Return = Arc<RefCell<i32>>> {
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: required because it captures the following types: `Opaque(DefId(0:36 ~ generator_print_verbose_1[7d1d]::make_non_send_generator2::{opaque#0}), [])`
-note: required because it's used within this generator
-  --> $DIR/generator-print-verbose-1.rs:52:20
+   = note: required because it captures the following types: `Opaque(DefId(0:36 ~ coroutine_print_verbose_1[75fb]::make_non_send_coroutine2::{opaque#0}), [])`
+note: required because it's used within this coroutine
+  --> $DIR/coroutine-print-verbose-1.rs:52:20
    |
 LL |     let send_gen = || {
    |                    ^^
 note: required by a bound in `require_send`
-  --> $DIR/generator-print-verbose-1.rs:26:25
+  --> $DIR/coroutine-print-verbose-1.rs:26:25
    |
 LL | fn require_send(_: impl Send) {}
    |                         ^^^^ required by this bound in `require_send`
diff --git a/tests/ui/generator/print/generator-print-verbose-2.rs b/tests/ui/coroutine/print/coroutine-print-verbose-2.rs
index e53a7ef8cc1..c65c33cb4ba 100644
--- a/tests/ui/generator/print/generator-print-verbose-2.rs
+++ b/tests/ui/coroutine/print/coroutine-print-verbose-2.rs
@@ -1,7 +1,7 @@
 // compile-flags: -Zverbose
 
-// Same as test/ui/generator/not-send-sync.rs
-#![feature(generators)]
+// Same as test/ui/coroutine/not-send-sync.rs
+#![feature(coroutines)]
 #![feature(negative_impls)]
 
 struct NotSend;
@@ -15,14 +15,14 @@ fn main() {
     fn assert_send<T: Send>(_: T) {}
 
     assert_sync(|| {
-        //~^ ERROR: generator cannot be shared between threads safely
+        //~^ ERROR: coroutine cannot be shared between threads safely
         let a = NotSync;
         yield;
         drop(a);
     });
 
     assert_send(|| {
-        //~^ ERROR: generator cannot be sent between threads safely
+        //~^ ERROR: coroutine cannot be sent between threads safely
         let a = NotSend;
         yield;
         drop(a);
diff --git a/tests/ui/generator/print/generator-print-verbose-2.stderr b/tests/ui/coroutine/print/coroutine-print-verbose-2.stderr
index 8ff7557619f..e9c7a8ffcaa 100644
--- a/tests/ui/generator/print/generator-print-verbose-2.stderr
+++ b/tests/ui/coroutine/print/coroutine-print-verbose-2.stderr
@@ -1,39 +1,39 @@
-error: generator cannot be shared between threads safely
-  --> $DIR/generator-print-verbose-2.rs:17:5
+error: coroutine cannot be shared between threads safely
+  --> $DIR/coroutine-print-verbose-2.rs:17:5
    |
 LL |     assert_sync(|| {
-   |     ^^^^^^^^^^^ generator is not `Sync`
+   |     ^^^^^^^^^^^ coroutine is not `Sync`
    |
    = help: within `{main::{closure#0} upvar_tys=() {main::{closure#0}}}`, the trait `Sync` is not implemented for `NotSync`
-note: generator is not `Sync` as this value is used across a yield
-  --> $DIR/generator-print-verbose-2.rs:20:9
+note: coroutine is not `Sync` as this value is used across a yield
+  --> $DIR/coroutine-print-verbose-2.rs:20:9
    |
 LL |         let a = NotSync;
    |             - has type `NotSync` which is not `Sync`
 LL |         yield;
    |         ^^^^^ yield occurs here, with `a` maybe used later
 note: required by a bound in `assert_sync`
-  --> $DIR/generator-print-verbose-2.rs:14:23
+  --> $DIR/coroutine-print-verbose-2.rs:14:23
    |
 LL |     fn assert_sync<T: Sync>(_: T) {}
    |                       ^^^^ required by this bound in `assert_sync`
 
-error: generator cannot be sent between threads safely
-  --> $DIR/generator-print-verbose-2.rs:24:5
+error: coroutine cannot be sent between threads safely
+  --> $DIR/coroutine-print-verbose-2.rs:24:5
    |
 LL |     assert_send(|| {
-   |     ^^^^^^^^^^^ generator is not `Send`
+   |     ^^^^^^^^^^^ coroutine is not `Send`
    |
    = help: within `{main::{closure#1} upvar_tys=() {main::{closure#1}}}`, the trait `Send` is not implemented for `NotSend`
-note: generator is not `Send` as this value is used across a yield
-  --> $DIR/generator-print-verbose-2.rs:27:9
+note: coroutine is not `Send` as this value is used across a yield
+  --> $DIR/coroutine-print-verbose-2.rs:27:9
    |
 LL |         let a = NotSend;
    |             - has type `NotSend` which is not `Send`
 LL |         yield;
    |         ^^^^^ yield occurs here, with `a` maybe used later
 note: required by a bound in `assert_send`
-  --> $DIR/generator-print-verbose-2.rs:15:23
+  --> $DIR/coroutine-print-verbose-2.rs:15:23
    |
 LL |     fn assert_send<T: Send>(_: T) {}
    |                       ^^^^ required by this bound in `assert_send`
diff --git a/tests/ui/generator/print/generator-print-verbose-3.rs b/tests/ui/coroutine/print/coroutine-print-verbose-3.rs
index 8689539ec8e..3e4bb628176 100644
--- a/tests/ui/generator/print/generator-print-verbose-3.rs
+++ b/tests/ui/coroutine/print/coroutine-print-verbose-3.rs
@@ -1,10 +1,10 @@
 // compile-flags: -Zverbose
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 fn main() {
     let x = "Type mismatch test";
-    let generator :() = || {
+    let coroutine :() = || {
     //~^ ERROR mismatched types
         yield 1i32;
         return x
diff --git a/tests/ui/generator/print/generator-print-verbose-3.stderr b/tests/ui/coroutine/print/coroutine-print-verbose-3.stderr
index 69358ed0a91..fb80f29d10d 100644
--- a/tests/ui/generator/print/generator-print-verbose-3.stderr
+++ b/tests/ui/coroutine/print/coroutine-print-verbose-3.stderr
@@ -1,7 +1,7 @@
 error[E0308]: mismatched types
-  --> $DIR/generator-print-verbose-3.rs:7:25
+  --> $DIR/coroutine-print-verbose-3.rs:7:25
    |
-LL |       let generator :() = || {
+LL |       let coroutine :() = || {
    |  ____________________--___^
    | |                    |
    | |                    expected due to this
@@ -9,10 +9,10 @@ LL | |
 LL | |         yield 1i32;
 LL | |         return x
 LL | |     };
-   | |_____^ expected `()`, found generator
+   | |_____^ expected `()`, found coroutine
    |
    = note: expected unit type `()`
-              found generator `{main::{closure#0} upvar_tys=(unavailable)}`
+              found coroutine `{main::{closure#0} upvar_tys=(unavailable)}`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/generator/reborrow-mut-upvar.rs b/tests/ui/coroutine/reborrow-mut-upvar.rs
index dbd9e24e205..e4f717be8b5 100644
--- a/tests/ui/generator/reborrow-mut-upvar.rs
+++ b/tests/ui/coroutine/reborrow-mut-upvar.rs
@@ -1,9 +1,9 @@
 // run-pass
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn _run(bar: &mut i32) {
-    || { //~ WARN unused generator that must be used
+    || { //~ WARN unused coroutine that must be used
         {
             let _baz = &*bar;
             yield;
diff --git a/tests/ui/generator/reborrow-mut-upvar.stderr b/tests/ui/coroutine/reborrow-mut-upvar.stderr
index 2e1fec35eaf..5b614ac4be8 100644
--- a/tests/ui/generator/reborrow-mut-upvar.stderr
+++ b/tests/ui/coroutine/reborrow-mut-upvar.stderr
@@ -1,4 +1,4 @@
-warning: unused generator that must be used
+warning: unused coroutine that must be used
   --> $DIR/reborrow-mut-upvar.rs:6:5
    |
 LL | /     || {
@@ -10,7 +10,7 @@ LL | |         *bar = 2;
 LL | |     };
    | |_____^
    |
-   = note: generators are lazy and do nothing unless resumed
+   = note: coroutines are lazy and do nothing unless resumed
    = note: `#[warn(unused_must_use)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/generator/ref-escapes-but-not-over-yield.rs b/tests/ui/coroutine/ref-escapes-but-not-over-yield.rs
index 3856d8233bc..a9c13188ff3 100644
--- a/tests/ui/generator/ref-escapes-but-not-over-yield.rs
+++ b/tests/ui/coroutine/ref-escapes-but-not-over-yield.rs
@@ -1,7 +1,7 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn foo(x: &i32) {
-    // In this case, a reference to `b` escapes the generator, but not
+    // In this case, a reference to `b` escapes the coroutine, but not
     // because of a yield. We see that there is no yield in the scope of
     // `b` and give the more generic error message.
     let mut a = &3;
@@ -9,7 +9,7 @@ fn foo(x: &i32) {
         yield();
         let b = 5;
         a = &b;
-        //~^ ERROR borrowed data escapes outside of generator
+        //~^ ERROR borrowed data escapes outside of coroutine
     };
 }
 
diff --git a/tests/ui/generator/ref-escapes-but-not-over-yield.stderr b/tests/ui/coroutine/ref-escapes-but-not-over-yield.stderr
index 5fc81004098..4c8694e6786 100644
--- a/tests/ui/generator/ref-escapes-but-not-over-yield.stderr
+++ b/tests/ui/coroutine/ref-escapes-but-not-over-yield.stderr
@@ -1,14 +1,14 @@
-error[E0521]: borrowed data escapes outside of generator
+error[E0521]: borrowed data escapes outside of coroutine
   --> $DIR/ref-escapes-but-not-over-yield.rs:11:9
    |
 LL |     let mut a = &3;
-   |         ----- `a` declared here, outside of the generator body
+   |         ----- `a` declared here, outside of the coroutine body
 ...
 LL |         a = &b;
    |         ^^^^--
    |         |   |
-   |         |   borrow is only valid in the generator body
-   |         reference to `b` escapes the generator body here
+   |         |   borrow is only valid in the coroutine body
+   |         reference to `b` escapes the coroutine body here
 
 error: aborting due to previous error
 
diff --git a/tests/ui/generator/ref-upvar-not-send.rs b/tests/ui/coroutine/ref-upvar-not-send.rs
index eb9ef63ecfc..487fdeea2da 100644
--- a/tests/ui/generator/ref-upvar-not-send.rs
+++ b/tests/ui/coroutine/ref-upvar-not-send.rs
@@ -1,7 +1,7 @@
-// For `Send` generators, suggest a `T: Sync` requirement for `&T` upvars,
+// For `Send` coroutines, suggest a `T: Sync` requirement for `&T` upvars,
 // and suggest a `T: Send` requirement for `&mut T` upvars.
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn assert_send<T: Send>(_: T) {}
 //~^ NOTE required by a bound in `assert_send`
@@ -13,16 +13,16 @@ fn main() {
     let x: &*mut () = &std::ptr::null_mut();
     let y: &mut *mut () = &mut std::ptr::null_mut();
     assert_send(move || {
-        //~^ ERROR generator cannot be sent between threads safely
-        //~| NOTE generator is not `Send`
+        //~^ ERROR coroutine cannot be sent between threads safely
+        //~| NOTE coroutine is not `Send`
         yield;
         let _x = x;
     });
     //~^^ NOTE captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
     //~| NOTE has type `&*mut ()` which is not `Send`, because `*mut ()` is not `Sync`
     assert_send(move || {
-        //~^ ERROR generator cannot be sent between threads safely
-        //~| NOTE generator is not `Send`
+        //~^ ERROR coroutine cannot be sent between threads safely
+        //~| NOTE coroutine is not `Send`
         yield;
         let _y = y;
     });
diff --git a/tests/ui/generator/ref-upvar-not-send.stderr b/tests/ui/coroutine/ref-upvar-not-send.stderr
index d6a2be977e4..7f18c6fba77 100644
--- a/tests/ui/generator/ref-upvar-not-send.stderr
+++ b/tests/ui/coroutine/ref-upvar-not-send.stderr
@@ -1,4 +1,4 @@
-error: generator cannot be sent between threads safely
+error: coroutine cannot be sent between threads safely
   --> $DIR/ref-upvar-not-send.rs:15:17
    |
 LL |       assert_send(move || {
@@ -8,7 +8,7 @@ LL | |
 LL | |         yield;
 LL | |         let _x = x;
 LL | |     });
-   | |_____^ generator is not `Send`
+   | |_____^ coroutine is not `Send`
    |
    = help: the trait `Sync` is not implemented for `*mut ()`
 note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
@@ -22,7 +22,7 @@ note: required by a bound in `assert_send`
 LL | fn assert_send<T: Send>(_: T) {}
    |                   ^^^^ required by this bound in `assert_send`
 
-error: generator cannot be sent between threads safely
+error: coroutine cannot be sent between threads safely
   --> $DIR/ref-upvar-not-send.rs:23:17
    |
 LL |       assert_send(move || {
@@ -32,9 +32,9 @@ LL | |
 LL | |         yield;
 LL | |         let _y = y;
 LL | |     });
-   | |_____^ generator is not `Send`
+   | |_____^ coroutine is not `Send`
    |
-   = help: within `{generator@$DIR/ref-upvar-not-send.rs:23:17: 23:24}`, the trait `Send` is not implemented for `*mut ()`
+   = help: within `{coroutine@$DIR/ref-upvar-not-send.rs:23:17: 23:24}`, the trait `Send` is not implemented for `*mut ()`
 note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send`
   --> $DIR/ref-upvar-not-send.rs:27:18
    |
diff --git a/tests/ui/generator/reinit-in-match-guard.rs b/tests/ui/coroutine/reinit-in-match-guard.rs
index 260b341a525..1895de1f12b 100644
--- a/tests/ui/generator/reinit-in-match-guard.rs
+++ b/tests/ui/coroutine/reinit-in-match-guard.rs
@@ -1,6 +1,6 @@
 // build-pass
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 #![allow(unused_assignments, dead_code)]
 
diff --git a/tests/ui/generator/resume-after-return.rs b/tests/ui/coroutine/resume-after-return.rs
index 01a059a161c..acbd8740a35 100644
--- a/tests/ui/generator/resume-after-return.rs
+++ b/tests/ui/coroutine/resume-after-return.rs
@@ -2,9 +2,9 @@
 // needs-unwind
 
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{GeneratorState, Generator};
+use std::ops::{CoroutineState, Coroutine};
 use std::pin::Pin;
 use std::panic;
 
@@ -17,12 +17,12 @@ fn main() {
     };
 
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Complete(()) => {}
+        CoroutineState::Complete(()) => {}
         s => panic!("bad state: {:?}", s),
     }
 
     match panic::catch_unwind(move || Pin::new(&mut foo).resume(())) {
-        Ok(_) => panic!("generator successfully resumed"),
+        Ok(_) => panic!("coroutine successfully resumed"),
         Err(_) => {}
     }
 }
diff --git a/tests/ui/generator/resume-arg-late-bound.rs b/tests/ui/coroutine/resume-arg-late-bound.rs
index 1c35ba80d2b..dd6d318afbc 100644
--- a/tests/ui/generator/resume-arg-late-bound.rs
+++ b/tests/ui/coroutine/resume-arg-late-bound.rs
@@ -1,11 +1,11 @@
-//! Tests that we cannot produce a generator that accepts a resume argument
+//! Tests that we cannot produce a coroutine that accepts a resume argument
 //! with any lifetime and then stores it across a `yield`.
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
-fn test(a: impl for<'a> Generator<&'a mut bool>) {}
+fn test(a: impl for<'a> Coroutine<&'a mut bool>) {}
 
 fn main() {
     let gen = |arg: &mut bool| {
diff --git a/tests/ui/generator/resume-arg-late-bound.stderr b/tests/ui/coroutine/resume-arg-late-bound.stderr
index 34ee4036cc5..f1a8a8ed711 100644
--- a/tests/ui/generator/resume-arg-late-bound.stderr
+++ b/tests/ui/coroutine/resume-arg-late-bound.stderr
@@ -4,12 +4,12 @@ error[E0308]: mismatched types
 LL |     test(gen);
    |     ^^^^^^^^^ one type is more general than the other
    |
-   = note: expected trait `for<'a> Generator<&'a mut bool>`
-              found trait `Generator<&mut bool>`
+   = note: expected trait `for<'a> Coroutine<&'a mut bool>`
+              found trait `Coroutine<&mut bool>`
 note: the lifetime requirement is introduced here
   --> $DIR/resume-arg-late-bound.rs:8:17
    |
-LL | fn test(a: impl for<'a> Generator<&'a mut bool>) {}
+LL | fn test(a: impl for<'a> Coroutine<&'a mut bool>) {}
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
diff --git a/tests/ui/generator/resume-arg-size.rs b/tests/ui/coroutine/resume-arg-size.rs
index 195166f975b..22bb469f941 100644
--- a/tests/ui/generator/resume-arg-size.rs
+++ b/tests/ui/coroutine/resume-arg-size.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 #![allow(dropping_copy_types)]
 
 // run-pass
@@ -6,7 +6,7 @@
 use std::mem::size_of_val;
 
 fn main() {
-    // Generator taking a `Copy`able resume arg.
+    // Coroutine taking a `Copy`able resume arg.
     let gen_copy = |mut x: usize| {
         loop {
             drop(x);
@@ -14,7 +14,7 @@ fn main() {
         }
     };
 
-    // Generator taking a non-`Copy` resume arg.
+    // Coroutine taking a non-`Copy` resume arg.
     let gen_move = |mut x: Box<usize>| {
         loop {
             drop(x);
@@ -22,7 +22,7 @@ fn main() {
         }
     };
 
-    // Neither of these generators have the resume arg live across the `yield`, so they should be
+    // Neither of these coroutines have the resume arg live across the `yield`, so they should be
     // 1 Byte in size (only storing the discriminant)
     assert_eq!(size_of_val(&gen_copy), 1);
     assert_eq!(size_of_val(&gen_move), 1);
diff --git a/tests/ui/generator/resume-live-across-yield.rs b/tests/ui/coroutine/resume-live-across-yield.rs
index 4c4cf117a55..935e7d326be 100644
--- a/tests/ui/generator/resume-live-across-yield.rs
+++ b/tests/ui/coroutine/resume-live-across-yield.rs
@@ -1,8 +1,8 @@
 // run-pass
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 use std::sync::atomic::{AtomicUsize, Ordering};
 
@@ -27,11 +27,11 @@ fn main() {
 
     assert_eq!(
         g.as_mut().resume(Dropper(String::from("Hello world!"))),
-        GeneratorState::Yielded(())
+        CoroutineState::Yielded(())
     );
     assert_eq!(DROP.load(Ordering::Acquire), 0);
     match g.as_mut().resume(Dropper(String::from("Number Two"))) {
-        GeneratorState::Complete(dropper) => {
+        CoroutineState::Complete(dropper) => {
             assert_eq!(DROP.load(Ordering::Acquire), 1);
             assert_eq!(dropper.0, "Number Two");
             drop(dropper);
diff --git a/tests/ui/generator/retain-resume-ref.rs b/tests/ui/coroutine/retain-resume-ref.rs
index 0606ea71cdf..c9f995ab0cf 100644
--- a/tests/ui/generator/retain-resume-ref.rs
+++ b/tests/ui/coroutine/retain-resume-ref.rs
@@ -1,11 +1,11 @@
 //! This test ensures that a mutable reference cannot be passed as a resume argument twice.
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::marker::Unpin;
 use std::ops::{
-    Generator,
-    GeneratorState::{self, *},
+    Coroutine,
+    CoroutineState::{self, *},
 };
 use std::pin::Pin;
 
diff --git a/tests/ui/generator/retain-resume-ref.stderr b/tests/ui/coroutine/retain-resume-ref.stderr
index bc715c7030e..e33310d12d9 100644
--- a/tests/ui/generator/retain-resume-ref.stderr
+++ b/tests/ui/coroutine/retain-resume-ref.stderr
@@ -4,10 +4,9 @@ error[E0499]: cannot borrow `thing` as mutable more than once at a time
 LL |     gen.as_mut().resume(&mut thing);
    |                         ---------- first mutable borrow occurs here
 LL |     gen.as_mut().resume(&mut thing);
-   |                         ^^^^^^^^^^ second mutable borrow occurs here
-LL |
-LL | }
-   | - first borrow might be used here, when `gen` is dropped and runs the destructor for generator
+   |                  ------ ^^^^^^^^^^ second mutable borrow occurs here
+   |                  |
+   |                  first borrow later used by call
 
 error: aborting due to previous error
 
diff --git a/tests/ui/coroutine/self_referential_gen_block.rs b/tests/ui/coroutine/self_referential_gen_block.rs
new file mode 100644
index 00000000000..14daa2e9c35
--- /dev/null
+++ b/tests/ui/coroutine/self_referential_gen_block.rs
@@ -0,0 +1,17 @@
+// compile-flags: --edition 2024 -Zunstable-options
+#![feature(gen_blocks)]
+//! This test checks that we don't allow self-referential generators
+
+fn main() {
+    let mut x = {
+        let mut x = gen {
+            let y = 42;
+            let z = &y; //~ ERROR: borrow may still be in use when `gen` block yields
+            yield 43;
+            panic!("{z}");
+        };
+        x.next();
+        Box::new(x)
+    };
+    x.next();
+}
diff --git a/tests/ui/coroutine/self_referential_gen_block.stderr b/tests/ui/coroutine/self_referential_gen_block.stderr
new file mode 100644
index 00000000000..586f53df8f2
--- /dev/null
+++ b/tests/ui/coroutine/self_referential_gen_block.stderr
@@ -0,0 +1,11 @@
+error[E0626]: borrow may still be in use when `gen` block yields
+  --> $DIR/self_referential_gen_block.rs:9:21
+   |
+LL |             let z = &y;
+   |                     ^^
+LL |             yield 43;
+   |             -------- possible yield occurs here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0626`.
diff --git a/tests/ui/generator/size-moved-locals.rs b/tests/ui/coroutine/size-moved-locals.rs
index 601a3141828..cfbbb9c1b31 100644
--- a/tests/ui/generator/size-moved-locals.rs
+++ b/tests/ui/coroutine/size-moved-locals.rs
@@ -4,7 +4,7 @@
 // `complex` below.)
 //
 // The exact sizes here can change (we'd like to know when they do). What we
-// don't want to see is the `complex` generator size being upwards of 2048 bytes
+// don't want to see is the `complex` coroutine size being upwards of 2048 bytes
 // (which would indicate it is reserving space for two copies of Foo.)
 //
 // See issue #59123 for a full explanation.
@@ -14,9 +14,9 @@
 // ignore-asmjs issue #62807
 // needs-unwind Size of Closures change on panic=abort
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
 const FOO_SIZE: usize = 1024;
 struct Foo(#[allow(unused_tuple_struct_fields)] [u8; FOO_SIZE]);
@@ -25,7 +25,7 @@ impl Drop for Foo {
     fn drop(&mut self) {}
 }
 
-fn move_before_yield() -> impl Generator<Yield = (), Return = ()> {
+fn move_before_yield() -> impl Coroutine<Yield = (), Return = ()> {
     static || {
         let first = Foo([0; FOO_SIZE]);
         let _second = first;
@@ -36,7 +36,7 @@ fn move_before_yield() -> impl Generator<Yield = (), Return = ()> {
 
 fn noop() {}
 
-fn move_before_yield_with_noop() -> impl Generator<Yield = (), Return = ()> {
+fn move_before_yield_with_noop() -> impl Coroutine<Yield = (), Return = ()> {
     static || {
         let first = Foo([0; FOO_SIZE]);
         noop();
@@ -48,7 +48,7 @@ fn move_before_yield_with_noop() -> impl Generator<Yield = (), Return = ()> {
 
 // Today we don't have NRVO (we allocate space for both `first` and `second`,)
 // but we can overlap `first` with `_third`.
-fn overlap_move_points() -> impl Generator<Yield = (), Return = ()> {
+fn overlap_move_points() -> impl Coroutine<Yield = (), Return = ()> {
     static || {
         let first = Foo([0; FOO_SIZE]);
         yield;
@@ -59,7 +59,7 @@ fn overlap_move_points() -> impl Generator<Yield = (), Return = ()> {
     }
 }
 
-fn overlap_x_and_y() -> impl Generator<Yield = (), Return = ()> {
+fn overlap_x_and_y() -> impl Coroutine<Yield = (), Return = ()> {
     static || {
         let x = Foo([0; FOO_SIZE]);
         yield;
diff --git a/tests/ui/coroutine/sized-yield.rs b/tests/ui/coroutine/sized-yield.rs
new file mode 100644
index 00000000000..1368c88b522
--- /dev/null
+++ b/tests/ui/coroutine/sized-yield.rs
@@ -0,0 +1,14 @@
+#![feature(coroutines, coroutine_trait)]
+
+use std::ops::Coroutine;
+use std::pin::Pin;
+
+fn main() {
+    let s = String::from("foo");
+    let mut gen = move || {
+        //~^ ERROR the size for values of type
+        yield s[..];
+    };
+    Pin::new(&mut gen).resume(());
+    //~^ ERROR the size for values of type
+}
diff --git a/tests/ui/coroutine/sized-yield.stderr b/tests/ui/coroutine/sized-yield.stderr
new file mode 100644
index 00000000000..40663ac12de
--- /dev/null
+++ b/tests/ui/coroutine/sized-yield.stderr
@@ -0,0 +1,26 @@
+error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/sized-yield.rs:8:27
+   |
+LL |       let mut gen = move || {
+   |  ___________________________^
+LL | |
+LL | |         yield s[..];
+LL | |     };
+   | |_____^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `str`
+   = note: the yield type of a coroutine must have a statically known size
+
+error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/sized-yield.rs:12:24
+   |
+LL |     Pin::new(&mut gen).resume(());
+   |                        ^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `str`
+note: required by a bound in `CoroutineState`
+  --> $SRC_DIR/core/src/ops/coroutine.rs:LL:COL
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generator/smoke-resume-args.rs b/tests/ui/coroutine/smoke-resume-args.rs
index fa9271c538f..a801989859e 100644
--- a/tests/ui/generator/smoke-resume-args.rs
+++ b/tests/ui/coroutine/smoke-resume-args.rs
@@ -3,20 +3,20 @@
 // revisions: default nomiropt
 //[nomiropt]compile-flags: -Z mir-opt-level=0
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::fmt::Debug;
 use std::marker::Unpin;
 use std::ops::{
-    Generator,
-    GeneratorState::{self, *},
+    Coroutine,
+    CoroutineState::{self, *},
 };
 use std::pin::Pin;
 use std::sync::atomic::{AtomicUsize, Ordering};
 
-fn drain<G: Generator<R, Yield = Y> + Unpin, R, Y>(
+fn drain<G: Coroutine<R, Yield = Y> + Unpin, R, Y>(
     gen: &mut G,
-    inout: Vec<(R, GeneratorState<Y, G::Return>)>,
+    inout: Vec<(R, CoroutineState<Y, G::Return>)>,
 ) where
     Y: Debug + PartialEq,
     G::Return: Debug + PartialEq,
diff --git a/tests/ui/generator/smoke.rs b/tests/ui/coroutine/smoke.rs
index 7a917a05dd9..b74ed26865f 100644
--- a/tests/ui/generator/smoke.rs
+++ b/tests/ui/coroutine/smoke.rs
@@ -6,9 +6,9 @@
 // ignore-emscripten no threads support
 // compile-flags: --test
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{GeneratorState, Generator};
+use std::ops::{CoroutineState, Coroutine};
 use std::pin::Pin;
 use std::thread;
 
@@ -21,7 +21,7 @@ fn simple() {
     };
 
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Complete(()) => {}
+        CoroutineState::Complete(()) => {}
         s => panic!("bad state: {:?}", s),
     }
 }
@@ -37,7 +37,7 @@ fn return_capture() {
     };
 
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Complete(ref s) if *s == "foo" => {}
+        CoroutineState::Complete(ref s) if *s == "foo" => {}
         s => panic!("bad state: {:?}", s),
     }
 }
@@ -49,11 +49,11 @@ fn simple_yield() {
     };
 
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Yielded(()) => {}
+        CoroutineState::Yielded(()) => {}
         s => panic!("bad state: {:?}", s),
     }
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Complete(()) => {}
+        CoroutineState::Complete(()) => {}
         s => panic!("bad state: {:?}", s),
     }
 }
@@ -66,11 +66,11 @@ fn yield_capture() {
     };
 
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Yielded(ref s) if *s == "foo" => {}
+        CoroutineState::Yielded(ref s) if *s == "foo" => {}
         s => panic!("bad state: {:?}", s),
     }
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Complete(()) => {}
+        CoroutineState::Complete(()) => {}
         s => panic!("bad state: {:?}", s),
     }
 }
@@ -83,11 +83,11 @@ fn simple_yield_value() {
     };
 
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Yielded(ref s) if *s == "bar" => {}
+        CoroutineState::Yielded(ref s) if *s == "bar" => {}
         s => panic!("bad state: {:?}", s),
     }
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Complete(ref s) if *s == "foo" => {}
+        CoroutineState::Complete(ref s) if *s == "foo" => {}
         s => panic!("bad state: {:?}", s),
     }
 }
@@ -101,11 +101,11 @@ fn return_after_yield() {
     };
 
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Yielded(()) => {}
+        CoroutineState::Yielded(()) => {}
         s => panic!("bad state: {:?}", s),
     }
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Complete(ref s) if *s == "foo" => {}
+        CoroutineState::Complete(ref s) if *s == "foo" => {}
         s => panic!("bad state: {:?}", s),
     }
 }
@@ -153,11 +153,11 @@ fn send_over_threads() {
     let mut foo = || { yield };
     thread::spawn(move || {
         match Pin::new(&mut foo).resume(()) {
-            GeneratorState::Yielded(()) => {}
+            CoroutineState::Yielded(()) => {}
             s => panic!("bad state: {:?}", s),
         }
         match Pin::new(&mut foo).resume(()) {
-            GeneratorState::Complete(()) => {}
+            CoroutineState::Complete(()) => {}
             s => panic!("bad state: {:?}", s),
         }
     }).join().unwrap();
@@ -166,11 +166,11 @@ fn send_over_threads() {
     let mut foo = || { yield a };
     thread::spawn(move || {
         match Pin::new(&mut foo).resume(()) {
-            GeneratorState::Yielded(ref s) if *s == "a" => {}
+            CoroutineState::Yielded(ref s) if *s == "a" => {}
             s => panic!("bad state: {:?}", s),
         }
         match Pin::new(&mut foo).resume(()) {
-            GeneratorState::Complete(()) => {}
+            CoroutineState::Complete(()) => {}
             s => panic!("bad state: {:?}", s),
         }
     }).join().unwrap();
diff --git a/tests/ui/coroutine/static-coroutine.rs b/tests/ui/coroutine/static-coroutine.rs
new file mode 100644
index 00000000000..f9fd65b9793
--- /dev/null
+++ b/tests/ui/coroutine/static-coroutine.rs
@@ -0,0 +1,20 @@
+// run-pass
+
+#![feature(coroutines, coroutine_trait)]
+
+use std::pin::Pin;
+use std::ops::{Coroutine, CoroutineState};
+
+fn main() {
+    let mut coroutine = static || {
+        let a = true;
+        let b = &a;
+        yield;
+        assert_eq!(b as *const _, &a as *const _);
+    };
+    // SAFETY: We shadow the original coroutine variable so have no safe API to
+    // move it after this point.
+    let mut coroutine = unsafe { Pin::new_unchecked(&mut coroutine) };
+    assert_eq!(coroutine.as_mut().resume(()), CoroutineState::Yielded(()));
+    assert_eq!(coroutine.as_mut().resume(()), CoroutineState::Complete(()));
+}
diff --git a/tests/ui/generator/static-mut-reference-across-yield.rs b/tests/ui/coroutine/static-mut-reference-across-yield.rs
index 0fa6d9cdc77..07f810856a7 100644
--- a/tests/ui/generator/static-mut-reference-across-yield.rs
+++ b/tests/ui/coroutine/static-mut-reference-across-yield.rs
@@ -2,7 +2,7 @@
 // revisions: mir thir
 // [thir]compile-flags: -Zthir-unsafeck
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 static mut A: [i32; 5] = [1, 2, 3, 4, 5];
 
diff --git a/tests/ui/generator/static-not-unpin.current.stderr b/tests/ui/coroutine/static-not-unpin.current.stderr
index 242489841e8..cd607904f5a 100644
--- a/tests/ui/generator/static-not-unpin.current.stderr
+++ b/tests/ui/coroutine/static-not-unpin.current.stderr
@@ -1,8 +1,8 @@
-error[E0277]: `{static generator@$DIR/static-not-unpin.rs:14:25: 14:34}` cannot be unpinned
+error[E0277]: `{static coroutine@$DIR/static-not-unpin.rs:14:25: 14:34}` cannot be unpinned
   --> $DIR/static-not-unpin.rs:17:18
    |
-LL |     assert_unpin(generator);
-   |     ------------ ^^^^^^^^^ the trait `Unpin` is not implemented for `{static generator@$DIR/static-not-unpin.rs:14:25: 14:34}`
+LL |     assert_unpin(coroutine);
+   |     ------------ ^^^^^^^^^ the trait `Unpin` is not implemented for `{static coroutine@$DIR/static-not-unpin.rs:14:25: 14:34}`
    |     |
    |     required by a bound introduced by this call
    |
diff --git a/tests/ui/generator/static-not-unpin.next.stderr b/tests/ui/coroutine/static-not-unpin.next.stderr
index 242489841e8..cd607904f5a 100644
--- a/tests/ui/generator/static-not-unpin.next.stderr
+++ b/tests/ui/coroutine/static-not-unpin.next.stderr
@@ -1,8 +1,8 @@
-error[E0277]: `{static generator@$DIR/static-not-unpin.rs:14:25: 14:34}` cannot be unpinned
+error[E0277]: `{static coroutine@$DIR/static-not-unpin.rs:14:25: 14:34}` cannot be unpinned
   --> $DIR/static-not-unpin.rs:17:18
    |
-LL |     assert_unpin(generator);
-   |     ------------ ^^^^^^^^^ the trait `Unpin` is not implemented for `{static generator@$DIR/static-not-unpin.rs:14:25: 14:34}`
+LL |     assert_unpin(coroutine);
+   |     ------------ ^^^^^^^^^ the trait `Unpin` is not implemented for `{static coroutine@$DIR/static-not-unpin.rs:14:25: 14:34}`
    |     |
    |     required by a bound introduced by this call
    |
diff --git a/tests/ui/generator/static-not-unpin.rs b/tests/ui/coroutine/static-not-unpin.rs
index 30d3f291870..6ce78046dcc 100644
--- a/tests/ui/generator/static-not-unpin.rs
+++ b/tests/ui/coroutine/static-not-unpin.rs
@@ -1,7 +1,7 @@
 // revisions: current next
 //[next] compile-flags: -Ztrait-solver=next
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 // normalize-stderr-test "std::pin::Unpin" -> "std::marker::Unpin"
 
@@ -11,8 +11,8 @@ fn assert_unpin<T: Unpin>(_: T) {
 }
 
 fn main() {
-    let mut generator = static || {
+    let mut coroutine = static || {
         yield;
     };
-    assert_unpin(generator); //~ ERROR E0277
+    assert_unpin(coroutine); //~ ERROR E0277
 }
diff --git a/tests/ui/generator/static-reference-across-yield.rs b/tests/ui/coroutine/static-reference-across-yield.rs
index 23b11593bb5..6496d8b86cc 100644
--- a/tests/ui/generator/static-reference-across-yield.rs
+++ b/tests/ui/coroutine/static-reference-across-yield.rs
@@ -1,5 +1,5 @@
 // build-pass
-#![feature(generators)]
+#![feature(coroutines)]
 
 static A: [i32; 5] = [1, 2, 3, 4, 5];
 
diff --git a/tests/ui/generator/too-live-local-in-immovable-gen.rs b/tests/ui/coroutine/too-live-local-in-immovable-gen.rs
index e0b856db7a5..7eaa1552227 100644
--- a/tests/ui/generator/too-live-local-in-immovable-gen.rs
+++ b/tests/ui/coroutine/too-live-local-in-immovable-gen.rs
@@ -1,15 +1,15 @@
 // run-pass
 #![allow(unused_unsafe)]
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
     unsafe {
-        static move || { //~ WARN unused generator that must be used
-            // Tests that the generator transformation finds out that `a` is not live
+        static move || { //~ WARN unused coroutine that must be used
+            // Tests that the coroutine transformation finds out that `a` is not live
             // during the yield expression. Type checking will also compute liveness
             // and it should also find out that `a` is not live.
-            // The compiler will panic if the generator transformation finds that
+            // The compiler will panic if the coroutine transformation finds that
             // `a` is live and type checking finds it dead.
             let a = {
                 yield ();
diff --git a/tests/ui/generator/too-live-local-in-immovable-gen.stderr b/tests/ui/coroutine/too-live-local-in-immovable-gen.stderr
index e262f213f63..4a67dbe71e1 100644
--- a/tests/ui/generator/too-live-local-in-immovable-gen.stderr
+++ b/tests/ui/coroutine/too-live-local-in-immovable-gen.stderr
@@ -1,8 +1,8 @@
-warning: unused generator that must be used
+warning: unused coroutine that must be used
   --> $DIR/too-live-local-in-immovable-gen.rs:8:9
    |
 LL | /         static move || {
-LL | |             // Tests that the generator transformation finds out that `a` is not live
+LL | |             // Tests that the coroutine transformation finds out that `a` is not live
 LL | |             // during the yield expression. Type checking will also compute liveness
 LL | |             // and it should also find out that `a` is not live.
 ...  |
@@ -10,7 +10,7 @@ LL | |             let _ = &a;
 LL | |         };
    | |_________^
    |
-   = note: generators are lazy and do nothing unless resumed
+   = note: coroutines are lazy and do nothing unless resumed
    = note: `#[warn(unused_must_use)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/coroutine/too-many-parameters.rs b/tests/ui/coroutine/too-many-parameters.rs
new file mode 100644
index 00000000000..377d80c7b22
--- /dev/null
+++ b/tests/ui/coroutine/too-many-parameters.rs
@@ -0,0 +1,8 @@
+#![feature(coroutines)]
+
+fn main() {
+    |(), ()| {
+        //~^ error: too many parameters for a coroutine
+        yield;
+    };
+}
diff --git a/tests/ui/generator/too-many-parameters.stderr b/tests/ui/coroutine/too-many-parameters.stderr
index 22d40db3f26..54cf42e78d3 100644
--- a/tests/ui/generator/too-many-parameters.stderr
+++ b/tests/ui/coroutine/too-many-parameters.stderr
@@ -1,4 +1,4 @@
-error[E0628]: too many parameters for a generator (expected 0 or 1 parameters)
+error[E0628]: too many parameters for a coroutine (expected 0 or 1 parameters)
   --> $DIR/too-many-parameters.rs:4:5
    |
 LL |     |(), ()| {
diff --git a/tests/ui/generator/type-mismatch-error.rs b/tests/ui/coroutine/type-mismatch-error.rs
index d39c788a84b..0d04c21484c 100644
--- a/tests/ui/generator/type-mismatch-error.rs
+++ b/tests/ui/coroutine/type-mismatch-error.rs
@@ -1,11 +1,11 @@
 //! Test that we get the expected type mismatch error instead of "closure is expected to take 0
 //! arguments" (which got introduced after implementing resume arguments).
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
-fn f<G: Generator>(_: G, _: G::Return) {}
+fn f<G: Coroutine>(_: G, _: G::Return) {}
 
 fn main() {
     f(
diff --git a/tests/ui/generator/type-mismatch-error.stderr b/tests/ui/coroutine/type-mismatch-error.stderr
index 8f5949533e2..8f5949533e2 100644
--- a/tests/ui/generator/type-mismatch-error.stderr
+++ b/tests/ui/coroutine/type-mismatch-error.stderr
diff --git a/tests/ui/generator/type-mismatch-signature-deduction.rs b/tests/ui/coroutine/type-mismatch-signature-deduction.rs
index 8d1ce6c7a43..d4ca622e80f 100644
--- a/tests/ui/generator/type-mismatch-signature-deduction.rs
+++ b/tests/ui/coroutine/type-mismatch-signature-deduction.rs
@@ -1,8 +1,8 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
-fn foo() -> impl Generator<Return = i32> {
+fn foo() -> impl Coroutine<Return = i32> {
     //~^ ERROR type mismatch
     || {
         if false {
diff --git a/tests/ui/generator/type-mismatch-signature-deduction.stderr b/tests/ui/coroutine/type-mismatch-signature-deduction.stderr
index fe1bade5577..f26e30a8e74 100644
--- a/tests/ui/generator/type-mismatch-signature-deduction.stderr
+++ b/tests/ui/coroutine/type-mismatch-signature-deduction.stderr
@@ -18,10 +18,10 @@ LL |         Ok(5)
 LL |         Err(5)
    |         ++++ +
 
-error[E0271]: type mismatch resolving `<{generator@$DIR/type-mismatch-signature-deduction.rs:7:5: 7:7} as Generator>::Return == i32`
+error[E0271]: type mismatch resolving `<{coroutine@$DIR/type-mismatch-signature-deduction.rs:7:5: 7:7} as Coroutine>::Return == i32`
   --> $DIR/type-mismatch-signature-deduction.rs:5:13
    |
-LL | fn foo() -> impl Generator<Return = i32> {
+LL | fn foo() -> impl Coroutine<Return = i32> {
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Result<{integer}, _>`, found `i32`
    |
    = note: expected enum `Result<{integer}, _>`
diff --git a/tests/ui/generator/unresolved-ct-var.rs b/tests/ui/coroutine/unresolved-ct-var.rs
index 0316385fba9..0316385fba9 100644
--- a/tests/ui/generator/unresolved-ct-var.rs
+++ b/tests/ui/coroutine/unresolved-ct-var.rs
diff --git a/tests/ui/generator/unresolved-ct-var.stderr b/tests/ui/coroutine/unresolved-ct-var.stderr
index 9badc1dc291..9badc1dc291 100644
--- a/tests/ui/generator/unresolved-ct-var.stderr
+++ b/tests/ui/coroutine/unresolved-ct-var.stderr
diff --git a/tests/ui/generator/unsized-capture-across-yield.rs b/tests/ui/coroutine/unsized-capture-across-yield.rs
index 7bcb0800ccf..ef9cbc1d677 100644
--- a/tests/ui/generator/unsized-capture-across-yield.rs
+++ b/tests/ui/coroutine/unsized-capture-across-yield.rs
@@ -1,11 +1,11 @@
-#![feature(generator_trait)]
-#![feature(generators)]
+#![feature(coroutine_trait)]
+#![feature(coroutines)]
 #![feature(unsized_locals)]
 //~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
-fn capture() -> impl Generator {
+fn capture() -> impl Coroutine {
     let b: [u8] = *(Box::new([]) as Box<[u8]>);
     move || {
         println!("{:?}", &b);
diff --git a/tests/ui/generator/unsized-capture-across-yield.stderr b/tests/ui/coroutine/unsized-capture-across-yield.stderr
index 8a5b968a561..8a5b968a561 100644
--- a/tests/ui/generator/unsized-capture-across-yield.stderr
+++ b/tests/ui/coroutine/unsized-capture-across-yield.stderr
diff --git a/tests/ui/generator/unsized-local-across-yield.rs b/tests/ui/coroutine/unsized-local-across-yield.rs
index f761f45c2af..7a8ed60e46a 100644
--- a/tests/ui/generator/unsized-local-across-yield.rs
+++ b/tests/ui/coroutine/unsized-local-across-yield.rs
@@ -1,11 +1,11 @@
-#![feature(generator_trait)]
-#![feature(generators)]
+#![feature(coroutine_trait)]
+#![feature(coroutines)]
 #![feature(unsized_locals)]
 //~^ WARN the feature `unsized_locals` is incomplete and may not be safe to use and/or cause compiler crashes
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
-fn across() -> impl Generator {
+fn across() -> impl Coroutine {
     move || {
         let b: [u8] = *(Box::new([]) as Box<[u8]>);
         //~^ ERROR the size for values of type `[u8]` cannot be known at compilation time
diff --git a/tests/ui/generator/unsized-local-across-yield.stderr b/tests/ui/coroutine/unsized-local-across-yield.stderr
index 1942f266e6c..1942f266e6c 100644
--- a/tests/ui/generator/unsized-local-across-yield.stderr
+++ b/tests/ui/coroutine/unsized-local-across-yield.stderr
diff --git a/tests/ui/generator/xcrate-reachable.rs b/tests/ui/coroutine/xcrate-reachable.rs
index 1b1cff3387d..c6328448868 100644
--- a/tests/ui/generator/xcrate-reachable.rs
+++ b/tests/ui/coroutine/xcrate-reachable.rs
@@ -2,11 +2,11 @@
 
 // aux-build:xcrate-reachable.rs
 
-#![feature(generator_trait)]
+#![feature(coroutine_trait)]
 
 extern crate xcrate_reachable as foo;
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 
 fn main() {
diff --git a/tests/ui/generator/xcrate.rs b/tests/ui/coroutine/xcrate.rs
index 40986bbeb65..4572d1cfd54 100644
--- a/tests/ui/generator/xcrate.rs
+++ b/tests/ui/coroutine/xcrate.rs
@@ -2,29 +2,29 @@
 
 // aux-build:xcrate.rs
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 extern crate xcrate;
 
-use std::ops::{GeneratorState, Generator};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 fn main() {
     let mut foo = xcrate::foo();
 
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Complete(()) => {}
+        CoroutineState::Complete(()) => {}
         s => panic!("bad state: {:?}", s),
     }
 
     let mut foo = xcrate::bar(3);
 
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Yielded(3) => {}
+        CoroutineState::Yielded(3) => {}
         s => panic!("bad state: {:?}", s),
     }
     match Pin::new(&mut foo).resume(()) {
-        GeneratorState::Complete(()) => {}
+        CoroutineState::Complete(()) => {}
         s => panic!("bad state: {:?}", s),
     }
 }
diff --git a/tests/ui/generator/yield-in-args-rev.rs b/tests/ui/coroutine/yield-in-args-rev.rs
index 4c99bb3ef5e..b22c32ccd92 100644
--- a/tests/ui/generator/yield-in-args-rev.rs
+++ b/tests/ui/coroutine/yield-in-args-rev.rs
@@ -5,12 +5,12 @@
 // argument list is not treated as live across the yield by
 // type-checking.
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn foo(_a: (), _b: &bool) {}
 
 fn bar() {
-    || { //~ WARN unused generator that must be used
+    || { //~ WARN unused coroutine that must be used
         let b = true;
         foo(yield, &b);
     };
diff --git a/tests/ui/generator/yield-in-args-rev.stderr b/tests/ui/coroutine/yield-in-args-rev.stderr
index a87248f6621..dbf46739e8b 100644
--- a/tests/ui/generator/yield-in-args-rev.stderr
+++ b/tests/ui/coroutine/yield-in-args-rev.stderr
@@ -1,4 +1,4 @@
-warning: unused generator that must be used
+warning: unused coroutine that must be used
   --> $DIR/yield-in-args-rev.rs:13:5
    |
 LL | /     || {
@@ -7,7 +7,7 @@ LL | |         foo(yield, &b);
 LL | |     };
    | |_____^
    |
-   = note: generators are lazy and do nothing unless resumed
+   = note: coroutines are lazy and do nothing unless resumed
    = note: `#[warn(unused_must_use)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/generator/yield-in-args.rs b/tests/ui/coroutine/yield-in-args.rs
index 80110af55ab..b2827148d77 100644
--- a/tests/ui/generator/yield-in-args.rs
+++ b/tests/ui/coroutine/yield-in-args.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn foo(_b: &bool, _a: ()) {}
 
diff --git a/tests/ui/generator/yield-in-args.stderr b/tests/ui/coroutine/yield-in-args.stderr
index ee6d22c27cd..4ff97281d7b 100644
--- a/tests/ui/generator/yield-in-args.stderr
+++ b/tests/ui/coroutine/yield-in-args.stderr
@@ -1,4 +1,4 @@
-error[E0626]: borrow may still be in use when generator yields
+error[E0626]: borrow may still be in use when coroutine yields
   --> $DIR/yield-in-args.rs:8:13
    |
 LL |         foo(&b, yield);
diff --git a/tests/ui/generator/yield-in-const.rs b/tests/ui/coroutine/yield-in-const.rs
index fe5ca822cec..22651f32cf8 100644
--- a/tests/ui/generator/yield-in-const.rs
+++ b/tests/ui/coroutine/yield-in-const.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 const A: u8 = { yield 3u8; 3u8};
 //~^ ERROR yield expression outside
diff --git a/tests/ui/generator/yield-in-const.stderr b/tests/ui/coroutine/yield-in-const.stderr
index dcf4fe63e64..7afcd83403e 100644
--- a/tests/ui/generator/yield-in-const.stderr
+++ b/tests/ui/coroutine/yield-in-const.stderr
@@ -1,4 +1,4 @@
-error[E0627]: yield expression outside of generator literal
+error[E0627]: yield expression outside of coroutine literal
   --> $DIR/yield-in-const.rs:3:17
    |
 LL | const A: u8 = { yield 3u8; 3u8};
diff --git a/tests/ui/generator/yield-in-function.rs b/tests/ui/coroutine/yield-in-function.rs
index 29b811621de..a99312043bd 100644
--- a/tests/ui/generator/yield-in-function.rs
+++ b/tests/ui/coroutine/yield-in-function.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() { yield; }
 //~^ ERROR yield expression outside
diff --git a/tests/ui/generator/yield-in-function.stderr b/tests/ui/coroutine/yield-in-function.stderr
index 51cce198ca3..b2f839a65db 100644
--- a/tests/ui/generator/yield-in-function.stderr
+++ b/tests/ui/coroutine/yield-in-function.stderr
@@ -1,4 +1,4 @@
-error[E0627]: yield expression outside of generator literal
+error[E0627]: yield expression outside of coroutine literal
   --> $DIR/yield-in-function.rs:3:13
    |
 LL | fn main() { yield; }
diff --git a/tests/ui/generator/yield-in-initializer.rs b/tests/ui/coroutine/yield-in-initializer.rs
index 0cab36e5f28..5a7b3a4feaf 100644
--- a/tests/ui/generator/yield-in-initializer.rs
+++ b/tests/ui/coroutine/yield-in-initializer.rs
@@ -1,9 +1,9 @@
 // run-pass
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
-    static || { //~ WARN unused generator that must be used
+    static || { //~ WARN unused coroutine that must be used
         loop {
             // Test that `opt` is not live across the yield, even when borrowed in a loop
             // See https://github.com/rust-lang/rust/issues/52792
diff --git a/tests/ui/generator/yield-in-initializer.stderr b/tests/ui/coroutine/yield-in-initializer.stderr
index ed14a2e3273..614df43f2f5 100644
--- a/tests/ui/generator/yield-in-initializer.stderr
+++ b/tests/ui/coroutine/yield-in-initializer.stderr
@@ -1,4 +1,4 @@
-warning: unused generator that must be used
+warning: unused coroutine that must be used
   --> $DIR/yield-in-initializer.rs:6:5
    |
 LL | /     static || {
@@ -10,7 +10,7 @@ LL | |         }
 LL | |     };
    | |_____^
    |
-   = note: generators are lazy and do nothing unless resumed
+   = note: coroutines are lazy and do nothing unless resumed
    = note: `#[warn(unused_must_use)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/generator/yield-in-static.rs b/tests/ui/coroutine/yield-in-static.rs
index d27fbb33ba1..45e0380d46d 100644
--- a/tests/ui/generator/yield-in-static.rs
+++ b/tests/ui/coroutine/yield-in-static.rs
@@ -1,4 +1,4 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 static B: u8 = { yield 3u8; 3u8};
 //~^ ERROR yield expression outside
diff --git a/tests/ui/generator/yield-in-static.stderr b/tests/ui/coroutine/yield-in-static.stderr
index d867f3ad345..17d58325e98 100644
--- a/tests/ui/generator/yield-in-static.stderr
+++ b/tests/ui/coroutine/yield-in-static.stderr
@@ -1,4 +1,4 @@
-error[E0627]: yield expression outside of generator literal
+error[E0627]: yield expression outside of coroutine literal
   --> $DIR/yield-in-static.rs:3:18
    |
 LL | static B: u8 = { yield 3u8; 3u8};
diff --git a/tests/ui/generator/yield-outside-generator-issue-78653.rs b/tests/ui/coroutine/yield-outside-coroutine-issue-78653.rs
index 4e8050c81b0..31025c33b1a 100644
--- a/tests/ui/generator/yield-outside-generator-issue-78653.rs
+++ b/tests/ui/coroutine/yield-outside-coroutine-issue-78653.rs
@@ -1,7 +1,7 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
     yield || for i in 0 { }
-    //~^ ERROR yield expression outside of generator literal
+    //~^ ERROR yield expression outside of coroutine literal
     //~| ERROR `{integer}` is not an iterator
 }
diff --git a/tests/ui/generator/yield-outside-generator-issue-78653.stderr b/tests/ui/coroutine/yield-outside-coroutine-issue-78653.stderr
index dcfb211744c..f28f8913508 100644
--- a/tests/ui/generator/yield-outside-generator-issue-78653.stderr
+++ b/tests/ui/coroutine/yield-outside-coroutine-issue-78653.stderr
@@ -1,11 +1,11 @@
-error[E0627]: yield expression outside of generator literal
-  --> $DIR/yield-outside-generator-issue-78653.rs:4:5
+error[E0627]: yield expression outside of coroutine literal
+  --> $DIR/yield-outside-coroutine-issue-78653.rs:4:5
    |
 LL |     yield || for i in 0 { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0277]: `{integer}` is not an iterator
-  --> $DIR/yield-outside-generator-issue-78653.rs:4:23
+  --> $DIR/yield-outside-coroutine-issue-78653.rs:4:23
    |
 LL |     yield || for i in 0 { }
    |                       ^ `{integer}` is not an iterator
diff --git a/tests/ui/generator/yield-subtype.rs b/tests/ui/coroutine/yield-subtype.rs
index cb3fc909145..3595d449823 100644
--- a/tests/ui/generator/yield-subtype.rs
+++ b/tests/ui/coroutine/yield-subtype.rs
@@ -2,13 +2,13 @@
 #![allow(dead_code)]
 #![allow(dead_code)]
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn bar<'a>() {
     let a: &'static str = "hi";
     let b: &'a str = a;
 
-    || { //~ WARN unused generator that must be used
+    || { //~ WARN unused coroutine that must be used
         yield a;
         yield b;
     };
diff --git a/tests/ui/generator/yield-subtype.stderr b/tests/ui/coroutine/yield-subtype.stderr
index 97862e91cd4..5e7ae9f581e 100644
--- a/tests/ui/generator/yield-subtype.stderr
+++ b/tests/ui/coroutine/yield-subtype.stderr
@@ -1,4 +1,4 @@
-warning: unused generator that must be used
+warning: unused coroutine that must be used
   --> $DIR/yield-subtype.rs:11:5
    |
 LL | /     || {
@@ -7,7 +7,7 @@ LL | |         yield b;
 LL | |     };
    | |_____^
    |
-   = note: generators are lazy and do nothing unless resumed
+   = note: coroutines are lazy and do nothing unless resumed
    = note: `#[warn(unused_must_use)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/generator/yield-while-iterating.rs b/tests/ui/coroutine/yield-while-iterating.rs
index 985e5d8bdc8..66ac6d3922a 100644
--- a/tests/ui/generator/yield-while-iterating.rs
+++ b/tests/ui/coroutine/yield-while-iterating.rs
@@ -1,11 +1,11 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{GeneratorState, Generator};
+use std::ops::{CoroutineState, Coroutine};
 use std::cell::Cell;
 use std::pin::Pin;
 
 fn yield_during_iter_owned_data(x: Vec<i32>) {
-    // The generator owns `x`, so we error out when yielding with a
+    // The coroutine owns `x`, so we error out when yielding with a
     // reference to it.  This winds up becoming a rather confusing
     // regionck error -- in particular, we would freeze with the
     // reference in scope, and it doesn't live long enough.
diff --git a/tests/ui/generator/yield-while-iterating.stderr b/tests/ui/coroutine/yield-while-iterating.stderr
index b6563475235..5330121f372 100644
--- a/tests/ui/generator/yield-while-iterating.stderr
+++ b/tests/ui/coroutine/yield-while-iterating.stderr
@@ -1,4 +1,4 @@
-error[E0626]: borrow may still be in use when generator yields
+error[E0626]: borrow may still be in use when coroutine yields
   --> $DIR/yield-while-iterating.rs:13:18
    |
 LL |         for p in &x {
@@ -12,7 +12,7 @@ error[E0502]: cannot borrow `x` as immutable because it is also borrowed as muta
 LL |     let mut b = || {
    |                 -- mutable borrow occurs here
 LL |         for p in &mut x {
-   |                       - first borrow occurs due to use of `x` in generator
+   |                       - first borrow occurs due to use of `x` in coroutine
 ...
 LL |     println!("{}", x[0]);
    |                    ^ immutable borrow occurs here
diff --git a/tests/ui/generator/yield-while-local-borrowed.rs b/tests/ui/coroutine/yield-while-local-borrowed.rs
index 061a64dbc36..7f8d1d4543d 100644
--- a/tests/ui/generator/yield-while-local-borrowed.rs
+++ b/tests/ui/coroutine/yield-while-local-borrowed.rs
@@ -1,7 +1,7 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{GeneratorState, Generator};
 use std::cell::Cell;
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 fn borrow_local_inline() {
@@ -11,8 +11,8 @@ fn borrow_local_inline() {
     // `b` and gets extended by region inference.)
     let mut b = move || {
         let a = &mut 3;
-        //~^ ERROR borrow may still be in use when generator yields
-        yield();
+        //~^ ERROR borrow may still be in use when coroutine yields
+        yield ();
         println!("{}", a);
     };
     Pin::new(&mut b).resume(());
@@ -24,7 +24,7 @@ fn borrow_local_inline_done() {
         {
             let a = &mut 3;
         }
-        yield();
+        yield ();
     };
     Pin::new(&mut b).resume(());
 }
@@ -38,12 +38,12 @@ fn borrow_local() {
         let a = 3;
         {
             let b = &a;
-            //~^ ERROR borrow may still be in use when generator yields
-            yield();
+            //~^ ERROR borrow may still be in use when coroutine yields
+            yield ();
             println!("{}", b);
         }
     };
     Pin::new(&mut b).resume(());
 }
 
-fn main() { }
+fn main() {}
diff --git a/tests/ui/generator/yield-while-local-borrowed.stderr b/tests/ui/coroutine/yield-while-local-borrowed.stderr
index c1513ef9b71..8fe981de929 100644
--- a/tests/ui/generator/yield-while-local-borrowed.stderr
+++ b/tests/ui/coroutine/yield-while-local-borrowed.stderr
@@ -1,20 +1,20 @@
-error[E0626]: borrow may still be in use when generator yields
+error[E0626]: borrow may still be in use when coroutine yields
   --> $DIR/yield-while-local-borrowed.rs:13:17
    |
 LL |         let a = &mut 3;
    |                 ^^^^^^
 LL |
-LL |         yield();
-   |         ------- possible yield occurs here
+LL |         yield ();
+   |         -------- possible yield occurs here
 
-error[E0626]: borrow may still be in use when generator yields
+error[E0626]: borrow may still be in use when coroutine yields
   --> $DIR/yield-while-local-borrowed.rs:40:21
    |
 LL |             let b = &a;
    |                     ^^
 LL |
-LL |             yield();
-   |             ------- possible yield occurs here
+LL |             yield ();
+   |             -------- possible yield occurs here
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/generator/yield-while-ref-reborrowed.rs b/tests/ui/coroutine/yield-while-ref-reborrowed.rs
index a03ef945dd2..07c59175858 100644
--- a/tests/ui/generator/yield-while-ref-reborrowed.rs
+++ b/tests/ui/coroutine/yield-while-ref-reborrowed.rs
@@ -1,12 +1,12 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{GeneratorState, Generator};
+use std::ops::{CoroutineState, Coroutine};
 use std::cell::Cell;
 use std::pin::Pin;
 
 fn reborrow_shared_ref(x: &i32) {
     // This is OK -- we have a borrow live over the yield, but it's of
-    // data that outlives the generator.
+    // data that outlives the coroutine.
     let mut b = move || {
         let a = &*x;
         yield();
@@ -17,7 +17,7 @@ fn reborrow_shared_ref(x: &i32) {
 
 fn reborrow_mutable_ref(x: &mut i32) {
     // This is OK -- we have a borrow live over the yield, but it's of
-    // data that outlives the generator.
+    // data that outlives the coroutine.
     let mut b = move || {
         let a = &mut *x;
         yield();
diff --git a/tests/ui/generator/yield-while-ref-reborrowed.stderr b/tests/ui/coroutine/yield-while-ref-reborrowed.stderr
index 47147f9c05d..e60a9531622 100644
--- a/tests/ui/generator/yield-while-ref-reborrowed.stderr
+++ b/tests/ui/coroutine/yield-while-ref-reborrowed.stderr
@@ -2,9 +2,9 @@ error[E0501]: cannot borrow `x` as immutable because previous closure requires u
   --> $DIR/yield-while-ref-reborrowed.rs:36:20
    |
 LL |     let mut b = || {
-   |                 -- generator construction occurs here
+   |                 -- coroutine construction occurs here
 LL |         let a = &mut *x;
-   |                      -- first borrow occurs due to use of `x` in generator
+   |                      -- first borrow occurs due to use of `x` in coroutine
 ...
 LL |     println!("{}", x);
    |                    ^ second borrow occurs here
diff --git a/tests/ui/generator/yielding-in-match-guards.rs b/tests/ui/coroutine/yielding-in-match-guards.rs
index 4e89fc975d0..a9575a9e77e 100644
--- a/tests/ui/generator/yielding-in-match-guards.rs
+++ b/tests/ui/coroutine/yielding-in-match-guards.rs
@@ -8,7 +8,7 @@
 // indeed a temporary borrow `y` from `x` is live
 // while `f().await` is being evaluated.
 // Thus, `&'_ u8` should be included in type signature
-// of the underlying generator.
+// of the underlying coroutine.
 
 #![feature(if_let_guard)]
 
diff --git a/tests/ui/deprecation/staged-deprecation-in-future.rs b/tests/ui/deprecation/staged-deprecation-in-future.rs
index 87b15ec303c..49ee60b9bd0 100644
--- a/tests/ui/deprecation/staged-deprecation-in-future.rs
+++ b/tests/ui/deprecation/staged-deprecation-in-future.rs
@@ -2,14 +2,14 @@
 
 #![feature(staged_api)]
 
-#![stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
+#![stable(feature = "rustc_deprecation_in_future_test", since = "1.0.0")]
 
 #[deprecated(since = "99.99.99", note = "effectively never")]
-#[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
+#[stable(feature = "rustc_deprecation_in_future_test", since = "1.0.0")]
 pub struct S1;
 
 #[deprecated(since = "TBD", note = "literally never")]
-#[stable(feature = "rustc_deprecation-in-future-test", since = "1.0.0")]
+#[stable(feature = "rustc_deprecation_in_future_test", since = "1.0.0")]
 pub struct S2;
 
 fn main() {
diff --git a/tests/ui/derives/deriving-with-repr-packed-move-errors.rs b/tests/ui/derives/deriving-with-repr-packed-move-errors.rs
new file mode 100644
index 00000000000..ffeb02d78b8
--- /dev/null
+++ b/tests/ui/derives/deriving-with-repr-packed-move-errors.rs
@@ -0,0 +1,96 @@
+// Check that deriving builtin traits for a packed struct with
+// non-Copy fields emits move errors along with an additional
+// diagnostic note explaining the reason
+// See issue #117406
+
+use std::fmt::{Debug, Formatter, Result};
+use std::cmp::Ordering;
+
+// Packed + derives: additional diagnostic should be emitted
+// for each of Debug, PartialEq and PartialOrd
+#[repr(packed)]
+#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]
+struct StructA(String);
+//~^ ERROR: cannot move out of `self` which is behind a shared reference
+//~| ERROR: cannot move out of `self` which is behind a shared reference
+//~| ERROR: cannot move out of `other` which is behind a shared reference
+//~| ERROR: cannot move out of `self` which is behind a shared reference
+//~| ERROR: cannot move out of `other` which is behind a shared reference
+//~| ERROR: cannot move out of `self` which is behind a shared reference
+//~| ERROR: cannot move out of `other` which is behind a shared reference
+//~| ERROR: cannot move out of `self` which is behind a shared reference
+//~| ERROR: cannot move out of `self` which is behind a shared reference
+
+
+// Unrelated impl: additinal diagnostic should NOT be emitted
+impl StructA {
+    fn fmt(&self) -> String {
+        self.0 //~ ERROR: cannot move out of `self` which is behind a shared reference
+    }
+}
+
+// Packed + manual impls: additional diagnostic should NOT be emitted
+#[repr(packed)]
+struct StructB(String);
+
+impl Debug for StructB {
+    fn fmt(&self, f: &mut Formatter) -> Result {
+        let x = &{ self.0 }; //~ ERROR: cannot move out of `self` which is behind a shared reference
+        write!(f, "{}", x)
+    }
+}
+
+impl PartialEq for StructB {
+    fn eq(&self, other: &StructB) -> bool {
+        ({ self.0 }) == ({ other.0 })
+        //~^ ERROR: cannot move out of `self` which is behind a shared reference
+        //~| ERROR: cannot move out of `other` which is behind a shared reference
+    }
+}
+
+impl PartialOrd for StructB {
+    fn partial_cmp(&self, other: &StructB) -> Option<Ordering> {
+        PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 })
+        //~^ ERROR: cannot move out of `self` which is behind a shared reference
+        //~| ERROR: cannot move out of `other` which is behind a shared reference
+    }
+}
+
+// NOT packed + derives: additinal diagnostic should NOT be emitted
+#[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]
+struct StructC(String);
+
+// NOT packed + manual impls: additinal dignostic should NOT be emitted
+struct StructD(String);
+
+impl Debug for StructD {
+    fn fmt(&self, f: &mut Formatter) -> Result {
+        let x = &{ self.0 }; //~ ERROR: cannot move out of `self` which is behind a shared reference
+        write!(f, "{}", x)
+    }
+}
+
+impl PartialEq for StructD {
+    fn eq(&self, other: &StructD) -> bool {
+        ({ self.0 }) == ({ other.0 })
+        //~^ ERROR: cannot move out of `self` which is behind a shared reference
+        //~| ERROR: cannot move out of `other` which is behind a shared reference
+    }
+}
+
+impl PartialOrd for StructD {
+    fn partial_cmp(&self, other: &StructD) -> Option<Ordering> {
+        PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 })
+        //~^ ERROR: cannot move out of `self` which is behind a shared reference
+        //~| ERROR: cannot move out of `other` which is behind a shared reference
+    }
+}
+
+// Packed + derives but the move is outside of a derive
+// expansion: additinal diagnostic should NOT be emitted
+fn func(arg: &StructA) -> String {
+    arg.0 //~ ERROR: cannot move out of `arg` which is behind a shared reference
+}
+
+fn main(){
+}
diff --git a/tests/ui/derives/deriving-with-repr-packed-move-errors.stderr b/tests/ui/derives/deriving-with-repr-packed-move-errors.stderr
new file mode 100644
index 00000000000..c538061b365
--- /dev/null
+++ b/tests/ui/derives/deriving-with-repr-packed-move-errors.stderr
@@ -0,0 +1,174 @@
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
+   |
+LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]
+   |          ----- in this derive macro expansion
+LL | struct StructA(String);
+   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+   |
+   = note: `#[derive(Debug)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
+   = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
+   |
+LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]
+   |                 --------- in this derive macro expansion
+LL | struct StructA(String);
+   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+   |
+   = note: `#[derive(PartialEq)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
+   = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0507]: cannot move out of `other` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
+   |
+LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]
+   |                 --------- in this derive macro expansion
+LL | struct StructA(String);
+   |                ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait
+   |
+   = note: `#[derive(PartialEq)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
+   = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
+   |
+LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]
+   |                                ---------- in this derive macro expansion
+LL | struct StructA(String);
+   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+   |
+   = note: `#[derive(PartialOrd)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
+   = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0507]: cannot move out of `other` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
+   |
+LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]
+   |                                ---------- in this derive macro expansion
+LL | struct StructA(String);
+   |                ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait
+   |
+   = note: `#[derive(PartialOrd)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
+   = note: this error originates in the derive macro `PartialOrd` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
+   |
+LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]
+   |                                            --- in this derive macro expansion
+LL | struct StructA(String);
+   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+   |
+   = note: `#[derive(Ord)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
+   = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0507]: cannot move out of `other` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
+   |
+LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]
+   |                                            --- in this derive macro expansion
+LL | struct StructA(String);
+   |                ^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait
+   |
+   = note: `#[derive(Ord)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
+   = note: this error originates in the derive macro `Ord` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
+   |
+LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]
+   |                                                 ---- in this derive macro expansion
+LL | struct StructA(String);
+   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+   |
+   = note: `#[derive(Hash)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
+   = note: this error originates in the derive macro `Hash` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:13:16
+   |
+LL | #[derive(Debug, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Default)]
+   |                                                       ----- in this derive macro expansion
+LL | struct StructA(String);
+   |                ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+   |
+   = note: `#[derive(Clone)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
+   = note: this error originates in the derive macro `Clone` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:28:9
+   |
+LL |         self.0
+   |         ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:38:20
+   |
+LL |         let x = &{ self.0 };
+   |                    ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:45:12
+   |
+LL |         ({ self.0 }) == ({ other.0 })
+   |            ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+
+error[E0507]: cannot move out of `other` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:45:28
+   |
+LL |         ({ self.0 }) == ({ other.0 })
+   |                            ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:53:36
+   |
+LL |         PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 })
+   |                                    ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+
+error[E0507]: cannot move out of `other` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:53:49
+   |
+LL |         PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 })
+   |                                                 ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:68:20
+   |
+LL |         let x = &{ self.0 };
+   |                    ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:75:12
+   |
+LL |         ({ self.0 }) == ({ other.0 })
+   |            ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+
+error[E0507]: cannot move out of `other` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:75:28
+   |
+LL |         ({ self.0 }) == ({ other.0 })
+   |                            ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait
+
+error[E0507]: cannot move out of `self` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:83:36
+   |
+LL |         PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 })
+   |                                    ^^^^^^ move occurs because `self.0` has type `String`, which does not implement the `Copy` trait
+
+error[E0507]: cannot move out of `other` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:83:49
+   |
+LL |         PartialOrd::partial_cmp(&{ self.0 }, &{ other.0 })
+   |                                                 ^^^^^^^ move occurs because `other.0` has type `String`, which does not implement the `Copy` trait
+
+error[E0507]: cannot move out of `arg` which is behind a shared reference
+  --> $DIR/deriving-with-repr-packed-move-errors.rs:92:5
+   |
+LL |     arg.0
+   |     ^^^^^ move occurs because `arg.0` has type `String`, which does not implement the `Copy` trait
+
+error: aborting due to 21 previous errors
+
+For more information about this error, try `rustc --explain E0507`.
diff --git a/tests/ui/derives/deriving-with-repr-packed.stderr b/tests/ui/derives/deriving-with-repr-packed.stderr
index 0cfe03869af..bb1fab343a3 100644
--- a/tests/ui/derives/deriving-with-repr-packed.stderr
+++ b/tests/ui/derives/deriving-with-repr-packed.stderr
@@ -36,6 +36,7 @@ LL | #[repr(packed)]
 LL | struct X(Y);
    |          ^ move occurs because `self.0` has type `Y`, which does not implement the `Copy` trait
    |
+   = note: `#[derive(Debug)]` triggers a move because taking references to the fields of a packed struct is undefined behaviour
    = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error; 2 warnings emitted
diff --git a/tests/ui/derives/issue-36617.stderr b/tests/ui/derives/issue-36617.stderr
index 9cc0a29b065..98be7963e5e 100644
--- a/tests/ui/derives/issue-36617.stderr
+++ b/tests/ui/derives/issue-36617.stderr
@@ -43,55 +43,75 @@ error: `derive` attribute cannot be used at crate level
    |
 LL | #![derive(Copy)]
    | ^^^^^^^^^^^^^^^^
+...
+LL | fn main() {}
+   |    ---- the inner attribute doesn't annotate this function
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[derive(Copy)]
-   | ~~~~~~~~~~~~~~~
+LL - #![derive(Copy)]
+LL + #[derive(Copy)]
+   |
 
 error: `test` attribute cannot be used at crate level
   --> $DIR/issue-36617.rs:4:1
    |
 LL | #![test]
    | ^^^^^^^^
+...
+LL | fn main() {}
+   |    ---- the inner attribute doesn't annotate this function
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[test]
-   | ~~~~~~~
+LL - #![test]
+LL + #[test]
+   |
 
 error: `test_case` attribute cannot be used at crate level
   --> $DIR/issue-36617.rs:7:1
    |
 LL | #![test_case]
    | ^^^^^^^^^^^^^
+...
+LL | fn main() {}
+   |    ---- the inner attribute doesn't annotate this function
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[test_case]
-   | ~~~~~~~~~~~~
+LL - #![test_case]
+LL + #[test_case]
+   |
 
 error: `bench` attribute cannot be used at crate level
   --> $DIR/issue-36617.rs:10:1
    |
 LL | #![bench]
    | ^^^^^^^^^
+...
+LL | fn main() {}
+   |    ---- the inner attribute doesn't annotate this function
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[bench]
-   | ~~~~~~~~
+LL - #![bench]
+LL + #[bench]
+   |
 
 error: `global_allocator` attribute cannot be used at crate level
   --> $DIR/issue-36617.rs:13:1
    |
 LL | #![global_allocator]
    | ^^^^^^^^^^^^^^^^^^^^
+...
+LL | fn main() {}
+   |    ---- the inner attribute doesn't annotate this function
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[global_allocator]
-   | ~~~~~~~~~~~~~~~~~~~
+LL - #![global_allocator]
+LL + #[global_allocator]
+   |
 
 error: aborting due to 10 previous errors
 
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs
index 00fb59d14d7..346d8373f73 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.rs
@@ -23,9 +23,15 @@ trait Boom {}
 //~^WARN malformed `on_unimplemented` attribute
 trait Doom {}
 
+#[diagnostic::on_unimplemented]
+//~^WARN missing options for `on_unimplemented` attribute
+//~|WARN missing options for `on_unimplemented` attribute
+trait Whatever {}
+
 fn take_foo(_: impl Foo) {}
 fn take_baz(_: impl Baz) {}
 fn take_boom(_: impl Boom) {}
+fn take_whatever(_: impl Whatever) {}
 
 fn main() {
     take_foo(1_i32);
@@ -34,4 +40,6 @@ fn main() {
     //~^ERROR Boom
     take_boom(1_i32);
     //~^ERROR Boom
+    take_whatever(1_i32);
+    //~^ERROR the trait bound `i32: Whatever` is not satisfied
 }
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr
index bd39c91ffe8..162ddd79fbb 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/do_not_fail_parsing_on_invalid_options_1.stderr
@@ -10,36 +10,53 @@ warning: malformed `on_unimplemented` attribute
   --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:3:32
    |
 LL | #[diagnostic::on_unimplemented(unsupported = "foo")]
-   |                                ^^^^^^^^^^^^^^^^^^^
+   |                                ^^^^^^^^^^^^^^^^^^^ invalid option found here
+   |
+   = help: only `message`, `note` and `label` are allowed as options
 
 warning: malformed `on_unimplemented` attribute
   --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:12:50
    |
 LL | #[diagnostic::on_unimplemented(message = "Boom", unsupported = "Bar")]
-   |                                                  ^^^^^^^^^^^^^^^^^^^
+   |                                                  ^^^^^^^^^^^^^^^^^^^ invalid option found here
+   |
+   = help: only `message`, `note` and `label` are allowed as options
 
 warning: malformed `on_unimplemented` attribute
   --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:17:50
    |
 LL | #[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = "whatever"))]
-   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
+   |
+   = help: only `message`, `note` and `label` are allowed as options
 
 warning: malformed `on_unimplemented` attribute
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:22:1
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:22:32
    |
 LL | #[diagnostic::on_unimplemented = "boom"]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                ^^^^^^^^ invalid option found here
+   |
+   = help: only `message`, `note` and `label` are allowed as options
+
+warning: missing options for `on_unimplemented` attribute
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:26:1
+   |
+LL | #[diagnostic::on_unimplemented]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: at least one of the `message`, `note` and `label` options are expected
 
 warning: malformed `on_unimplemented` attribute
   --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:3:32
    |
 LL | #[diagnostic::on_unimplemented(unsupported = "foo")]
-   |                                ^^^^^^^^^^^^^^^^^^^
+   |                                ^^^^^^^^^^^^^^^^^^^ invalid option found here
    |
+   = help: only `message`, `note` and `label` are allowed as options
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: the trait bound `i32: Foo` is not satisfied
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:31:14
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:37:14
    |
 LL |     take_foo(1_i32);
    |     -------- ^^^^^ the trait `Foo` is not implemented for `i32`
@@ -52,7 +69,7 @@ help: this trait has no implementations, consider adding one
 LL | trait Foo {}
    | ^^^^^^^^^
 note: required by a bound in `take_foo`
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:26:21
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:31:21
    |
 LL | fn take_foo(_: impl Foo) {}
    |                     ^^^ required by this bound in `take_foo`
@@ -61,12 +78,13 @@ warning: malformed `on_unimplemented` attribute
   --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:12:50
    |
 LL | #[diagnostic::on_unimplemented(message = "Boom", unsupported = "Bar")]
-   |                                                  ^^^^^^^^^^^^^^^^^^^
+   |                                                  ^^^^^^^^^^^^^^^^^^^ invalid option found here
    |
+   = help: only `message`, `note` and `label` are allowed as options
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: Boom
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:33:14
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:39:14
    |
 LL |     take_baz(1_i32);
    |     -------- ^^^^^ the trait `Baz` is not implemented for `i32`
@@ -79,7 +97,7 @@ help: this trait has no implementations, consider adding one
 LL | trait Baz {}
    | ^^^^^^^^^
 note: required by a bound in `take_baz`
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:27:21
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:32:21
    |
 LL | fn take_baz(_: impl Baz) {}
    |                     ^^^ required by this bound in `take_baz`
@@ -88,12 +106,13 @@ warning: malformed `on_unimplemented` attribute
   --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:17:50
    |
 LL | #[diagnostic::on_unimplemented(message = "Boom", on(_Self = "i32", message = "whatever"))]
-   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid option found here
    |
+   = help: only `message`, `note` and `label` are allowed as options
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0277]: Boom
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:35:15
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:41:15
    |
 LL |     take_boom(1_i32);
    |     --------- ^^^^^ the trait `Boom` is not implemented for `i32`
@@ -106,11 +125,39 @@ help: this trait has no implementations, consider adding one
 LL | trait Boom {}
    | ^^^^^^^^^^
 note: required by a bound in `take_boom`
-  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:28:22
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:33:22
    |
 LL | fn take_boom(_: impl Boom) {}
    |                      ^^^^ required by this bound in `take_boom`
 
-error: aborting due to 3 previous errors; 8 warnings emitted
+warning: missing options for `on_unimplemented` attribute
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:26:1
+   |
+LL | #[diagnostic::on_unimplemented]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: at least one of the `message`, `note` and `label` options are expected
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0277]: the trait bound `i32: Whatever` is not satisfied
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:43:19
+   |
+LL |     take_whatever(1_i32);
+   |     ------------- ^^^^^ the trait `Whatever` is not implemented for `i32`
+   |     |
+   |     required by a bound introduced by this call
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:29:1
+   |
+LL | trait Whatever {}
+   | ^^^^^^^^^^^^^^
+note: required by a bound in `take_whatever`
+  --> $DIR/do_not_fail_parsing_on_invalid_options_1.rs:34:26
+   |
+LL | fn take_whatever(_: impl Whatever) {}
+   |                          ^^^^^^^^ required by this bound in `take_whatever`
+
+error: aborting due to 4 previous errors; 10 warnings emitted
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs
index 35307586391..8410b3eb105 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.rs
@@ -1,22 +1,20 @@
 #![feature(diagnostic_namespace)]
 
 #[diagnostic::on_unimplemented(
+    if(Self = "()"),
     //~^WARN malformed `on_unimplemented` attribute
     //~|WARN malformed `on_unimplemented` attribute
-    if(Self = ()),
-    message = "not used yet",
-    label = "not used yet",
-    note = "not used yet"
+    message = "custom message",
+    note = "custom note"
 )]
 #[diagnostic::on_unimplemented(message = "fallback!!")]
 #[diagnostic::on_unimplemented(label = "fallback label")]
 #[diagnostic::on_unimplemented(note = "fallback note")]
-#[diagnostic::on_unimplemented(message = "fallback2!!")]
 trait Foo {}
 
 fn takes_foo(_: impl Foo) {}
 
 fn main() {
     takes_foo(());
-    //~^ERROR fallback!!
+    //~^ERROR custom message
 }
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr
index 6a83d8e39c6..906472beb49 100644
--- a/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/ignore_unsupported_options_and_continue_to_use_fallback.stderr
@@ -1,33 +1,23 @@
 warning: malformed `on_unimplemented` attribute
-  --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:3:1
+  --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:4:5
    |
-LL | / #[diagnostic::on_unimplemented(
-LL | |
-LL | |
-LL | |     if(Self = ()),
-...  |
-LL | |     note = "not used yet"
-LL | | )]
-   | |__^
+LL |     if(Self = "()"),
+   |     ^^^^^^^^^^^^^^^ invalid option found here
    |
+   = help: only `message`, `note` and `label` are allowed as options
    = note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default
 
 warning: malformed `on_unimplemented` attribute
-  --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:3:1
+  --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:4:5
    |
-LL | / #[diagnostic::on_unimplemented(
-LL | |
-LL | |
-LL | |     if(Self = ()),
-...  |
-LL | |     note = "not used yet"
-LL | | )]
-   | |__^
+LL |     if(Self = "()"),
+   |     ^^^^^^^^^^^^^^^ invalid option found here
    |
+   = help: only `message`, `note` and `label` are allowed as options
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0277]: fallback!!
-  --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:20:15
+error[E0277]: custom message
+  --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:18:15
    |
 LL |     takes_foo(());
    |     --------- ^^ fallback label
@@ -35,14 +25,15 @@ LL |     takes_foo(());
    |     required by a bound introduced by this call
    |
    = help: the trait `Foo` is not implemented for `()`
+   = note: custom note
    = note: fallback note
 help: this trait has no implementations, consider adding one
-  --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:15:1
+  --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:13:1
    |
 LL | trait Foo {}
    | ^^^^^^^^^
 note: required by a bound in `takes_foo`
-  --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:17:22
+  --> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:15:22
    |
 LL | fn takes_foo(_: impl Foo) {}
    |                      ^^^ required by this bound in `takes_foo`
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.rs b/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.rs
new file mode 100644
index 00000000000..34cdb99c754
--- /dev/null
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.rs
@@ -0,0 +1,18 @@
+#![feature(diagnostic_namespace)]
+
+#[diagnostic::on_unimplemented(message = "Foo", label = "Bar", note = "Baz", note = "Boom")]
+trait Foo {}
+
+#[diagnostic::on_unimplemented(message = "Bar", label = "Foo", note = "Baz")]
+#[diagnostic::on_unimplemented(note = "Baz2")]
+trait Bar {}
+
+fn takes_foo(_: impl Foo) {}
+fn takes_bar(_: impl Bar) {}
+
+fn main() {
+    takes_foo(());
+    //~^ERROR Foo
+    takes_bar(());
+    //~^ERROR Bar
+}
diff --git a/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.stderr b/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.stderr
new file mode 100644
index 00000000000..c72321d4617
--- /dev/null
+++ b/tests/ui/diagnostic_namespace/on_unimplemented/multiple_notes.stderr
@@ -0,0 +1,47 @@
+error[E0277]: Foo
+  --> $DIR/multiple_notes.rs:14:15
+   |
+LL |     takes_foo(());
+   |     --------- ^^ Bar
+   |     |
+   |     required by a bound introduced by this call
+   |
+   = help: the trait `Foo` is not implemented for `()`
+   = note: Baz
+   = note: Boom
+help: this trait has no implementations, consider adding one
+  --> $DIR/multiple_notes.rs:4:1
+   |
+LL | trait Foo {}
+   | ^^^^^^^^^
+note: required by a bound in `takes_foo`
+  --> $DIR/multiple_notes.rs:10:22
+   |
+LL | fn takes_foo(_: impl Foo) {}
+   |                      ^^^ required by this bound in `takes_foo`
+
+error[E0277]: Bar
+  --> $DIR/multiple_notes.rs:16:15
+   |
+LL |     takes_bar(());
+   |     --------- ^^ Foo
+   |     |
+   |     required by a bound introduced by this call
+   |
+   = help: the trait `Bar` is not implemented for `()`
+   = note: Baz
+   = note: Baz2
+help: this trait has no implementations, consider adding one
+  --> $DIR/multiple_notes.rs:8:1
+   |
+LL | trait Bar {}
+   | ^^^^^^^^^
+note: required by a bound in `takes_bar`
+  --> $DIR/multiple_notes.rs:11:22
+   |
+LL | fn takes_bar(_: impl Bar) {}
+   |                      ^^^ required by this bound in `takes_bar`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/did_you_mean/bad-assoc-ty.stderr b/tests/ui/did_you_mean/bad-assoc-ty.stderr
index efa6bb66824..5c0c7a0b94f 100644
--- a/tests/ui/did_you_mean/bad-assoc-ty.stderr
+++ b/tests/ui/did_you_mean/bad-assoc-ty.stderr
@@ -191,7 +191,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/bad-assoc-ty.rs:33:10
    |
 LL | type H = Fn(u8) -> (u8)::Output;
-   |          ^^^^^^^^^^^^^^^^^^^^^^ help: use the fully-qualified path: `<(dyn Fn(u8) -> u8 + 'static) as IntoFuture>::Output`
+   |          ^^^^^^^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<(dyn Fn(u8) -> u8 + 'static) as IntoFuture>::Output`
 
 error[E0223]: ambiguous associated type
   --> $DIR/bad-assoc-ty.rs:39:19
diff --git a/tests/ui/did_you_mean/issue-105225-named-args.rs b/tests/ui/did_you_mean/issue-105225-named-args.rs
new file mode 100644
index 00000000000..38e81776576
--- /dev/null
+++ b/tests/ui/did_you_mean/issue-105225-named-args.rs
@@ -0,0 +1,10 @@
+fn main() {
+    let x = "x";
+    let y = "y";
+
+    println!("{x}", x, x = y);
+    //~^ ERROR: redundant argument
+
+    println!("{x}", x = y, x = y);
+    //~^ ERROR: duplicate argument named `x`
+}
diff --git a/tests/ui/did_you_mean/issue-105225-named-args.stderr b/tests/ui/did_you_mean/issue-105225-named-args.stderr
new file mode 100644
index 00000000000..72204102ef6
--- /dev/null
+++ b/tests/ui/did_you_mean/issue-105225-named-args.stderr
@@ -0,0 +1,22 @@
+error: redundant argument
+  --> $DIR/issue-105225-named-args.rs:5:21
+   |
+LL |     println!("{x}", x, x = y);
+   |                     ^
+   |
+note: the formatting specifier is referencing the binding already
+  --> $DIR/issue-105225-named-args.rs:5:16
+   |
+LL |     println!("{x}", x, x = y);
+   |                ^
+
+error: duplicate argument named `x`
+  --> $DIR/issue-105225-named-args.rs:8:28
+   |
+LL |     println!("{x}", x = y, x = y);
+   |                     -      ^ duplicate argument
+   |                     |
+   |                     previously here
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/did_you_mean/issue-105225.fixed b/tests/ui/did_you_mean/issue-105225.fixed
new file mode 100644
index 00000000000..f756be615a1
--- /dev/null
+++ b/tests/ui/did_you_mean/issue-105225.fixed
@@ -0,0 +1,21 @@
+// run-rustfix
+
+fn main() {
+    let x = "x";
+    let y = "y";
+
+    println!("{x}", );
+    //~^ ERROR: redundant argument
+
+    println!("{x} {}", x, );
+    //~^ ERROR: redundant argument
+
+    println!("{} {x}", x, );
+    //~^ ERROR: redundant argument
+
+    println!("{x} {y}", );
+    //~^ ERROR: redundant arguments
+
+    println!("{} {} {x} {y} {}", x, x, x, );
+    //~^ ERROR: redundant arguments
+}
diff --git a/tests/ui/did_you_mean/issue-105225.rs b/tests/ui/did_you_mean/issue-105225.rs
new file mode 100644
index 00000000000..91cdf0eb28f
--- /dev/null
+++ b/tests/ui/did_you_mean/issue-105225.rs
@@ -0,0 +1,21 @@
+// run-rustfix
+
+fn main() {
+    let x = "x";
+    let y = "y";
+
+    println!("{x}", x);
+    //~^ ERROR: redundant argument
+
+    println!("{x} {}", x, x);
+    //~^ ERROR: redundant argument
+
+    println!("{} {x}", x, x);
+    //~^ ERROR: redundant argument
+
+    println!("{x} {y}", x, y);
+    //~^ ERROR: redundant arguments
+
+    println!("{} {} {x} {y} {}", x, x, x, y, y);
+    //~^ ERROR: redundant arguments
+}
diff --git a/tests/ui/did_you_mean/issue-105225.stderr b/tests/ui/did_you_mean/issue-105225.stderr
new file mode 100644
index 00000000000..5fb46222bee
--- /dev/null
+++ b/tests/ui/did_you_mean/issue-105225.stderr
@@ -0,0 +1,72 @@
+error: redundant argument
+  --> $DIR/issue-105225.rs:7:21
+   |
+LL |     println!("{x}", x);
+   |                     ^ help: this can be removed
+   |
+note: the formatting specifier is referencing the binding already
+  --> $DIR/issue-105225.rs:7:16
+   |
+LL |     println!("{x}", x);
+   |                ^
+
+error: redundant argument
+  --> $DIR/issue-105225.rs:10:27
+   |
+LL |     println!("{x} {}", x, x);
+   |                           ^ help: this can be removed
+   |
+note: the formatting specifier is referencing the binding already
+  --> $DIR/issue-105225.rs:10:16
+   |
+LL |     println!("{x} {}", x, x);
+   |                ^
+
+error: redundant argument
+  --> $DIR/issue-105225.rs:13:27
+   |
+LL |     println!("{} {x}", x, x);
+   |                           ^ help: this can be removed
+   |
+note: the formatting specifier is referencing the binding already
+  --> $DIR/issue-105225.rs:13:19
+   |
+LL |     println!("{} {x}", x, x);
+   |                   ^
+
+error: redundant arguments
+  --> $DIR/issue-105225.rs:16:25
+   |
+LL |     println!("{x} {y}", x, y);
+   |                         ^  ^
+   |
+note: the formatting specifiers are referencing the bindings already
+  --> $DIR/issue-105225.rs:16:16
+   |
+LL |     println!("{x} {y}", x, y);
+   |                ^   ^
+help: this can be removed
+   |
+LL -     println!("{x} {y}", x, y);
+LL +     println!("{x} {y}", );
+   |
+
+error: redundant arguments
+  --> $DIR/issue-105225.rs:19:43
+   |
+LL |     println!("{} {} {x} {y} {}", x, x, x, y, y);
+   |                                           ^  ^
+   |
+note: the formatting specifiers are referencing the bindings already
+  --> $DIR/issue-105225.rs:19:26
+   |
+LL |     println!("{} {} {x} {y} {}", x, x, x, y, y);
+   |                          ^
+help: this can be removed
+   |
+LL -     println!("{} {} {x} {y} {}", x, x, x, y, y);
+LL +     println!("{} {} {x} {y} {}", x, x, x, );
+   |
+
+error: aborting due to 5 previous errors
+
diff --git a/tests/ui/drop/dynamic-drop.rs b/tests/ui/drop/dynamic-drop.rs
index caef6358ea7..5bf2cc30e7f 100644
--- a/tests/ui/drop/dynamic-drop.rs
+++ b/tests/ui/drop/dynamic-drop.rs
@@ -1,7 +1,7 @@
 // run-pass
 // needs-unwind
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 #![feature(if_let_guard)]
 
 #![allow(unused_assignments)]
@@ -9,7 +9,7 @@
 
 use std::cell::{Cell, RefCell};
 use std::mem::ManuallyDrop;
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::panic;
 use std::pin::Pin;
 
@@ -173,7 +173,7 @@ fn vec_simple(a: &Allocator) {
     let _x = vec![a.alloc(), a.alloc(), a.alloc(), a.alloc()];
 }
 
-fn generator(a: &Allocator, run_count: usize) {
+fn coroutine(a: &Allocator, run_count: usize) {
     assert!(run_count < 4);
 
     let mut gen = || {
@@ -471,10 +471,10 @@ fn main() {
     run_test(|a| field_assignment(a, false));
     run_test(|a| field_assignment(a, true));
 
-    run_test(|a| generator(a, 0));
-    run_test(|a| generator(a, 1));
-    run_test(|a| generator(a, 2));
-    run_test(|a| generator(a, 3));
+    run_test(|a| coroutine(a, 0));
+    run_test(|a| coroutine(a, 1));
+    run_test(|a| coroutine(a, 2));
+    run_test(|a| coroutine(a, 3));
 
     run_test(|a| mixed_drop_and_nondrop(a));
 
diff --git a/tests/ui/dropck/coroutine-liveness-1.rs b/tests/ui/dropck/coroutine-liveness-1.rs
new file mode 100644
index 00000000000..aea4d15ad90
--- /dev/null
+++ b/tests/ui/dropck/coroutine-liveness-1.rs
@@ -0,0 +1,18 @@
+// check-pass
+// edition: 2021
+
+// regression test for #116242.
+use std::future;
+
+fn main() {
+    let mut recv = future::ready(());
+    let _combined_fut = async {
+        let _ = || read(&mut recv);
+    };
+
+    drop(recv);
+}
+
+fn read<F: future::Future>(_: &mut F) -> F::Output {
+    todo!()
+}
diff --git a/tests/ui/dropck/coroutine-liveness-2.rs b/tests/ui/dropck/coroutine-liveness-2.rs
new file mode 100644
index 00000000000..416a073c6b9
--- /dev/null
+++ b/tests/ui/dropck/coroutine-liveness-2.rs
@@ -0,0 +1,23 @@
+// check-pass
+// edition: 2021
+
+// regression test found while working on #117134.
+use std::future;
+
+fn main() {
+    let mut recv = future::ready(());
+    let _combined_fut = async {
+        let _ = || read(&mut recv);
+    };
+
+    let _uwu = (String::new(), _combined_fut);
+    // Dropping a coroutine as part of a more complex
+    // types should not add unnecessary liveness
+    // constraints.
+
+    drop(recv);
+}
+
+fn read<F: future::Future>(_: &mut F) -> F::Output {
+    todo!()
+}
diff --git a/tests/ui/error-codes/E0004.stderr b/tests/ui/error-codes/E0004.stderr
index 603bc5237ea..ced478d65ea 100644
--- a/tests/ui/error-codes/E0004.stderr
+++ b/tests/ui/error-codes/E0004.stderr
@@ -5,12 +5,12 @@ LL |     match x {
    |           ^ pattern `Terminator::HastaLaVistaBaby` not covered
    |
 note: `Terminator` defined here
-  --> $DIR/E0004.rs:2:5
+  --> $DIR/E0004.rs:1:6
    |
 LL | enum Terminator {
-   |      ----------
+   |      ^^^^^^^^^^
 LL |     HastaLaVistaBaby,
-   |     ^^^^^^^^^^^^^^^^ not covered
+   |     ---------------- not covered
    = note: the matched value is of type `Terminator`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/tests/ui/error-codes/E0034.stderr b/tests/ui/error-codes/E0034.stderr
index e2962170265..da6f221881c 100644
--- a/tests/ui/error-codes/E0034.stderr
+++ b/tests/ui/error-codes/E0034.stderr
@@ -14,12 +14,10 @@ note: candidate #2 is defined in an impl of the trait `Trait2` for the type `Tes
    |
 LL |     fn foo() {}
    |     ^^^^^^^^
-help: disambiguate the associated function for candidate #1
+help: use fully-qualified syntax to disambiguate
    |
 LL |     <Test as Trait1>::foo()
    |     ~~~~~~~~~~~~~~~~~~
-help: disambiguate the associated function for candidate #2
-   |
 LL |     <Test as Trait2>::foo()
    |     ~~~~~~~~~~~~~~~~~~
 
diff --git a/tests/ui/error-codes/E0191.stderr b/tests/ui/error-codes/E0191.stderr
index cf80c9c46ca..57eda4785a9 100644
--- a/tests/ui/error-codes/E0191.stderr
+++ b/tests/ui/error-codes/E0191.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `Bar` (from trait `Trait`) must be specified
+error[E0191]: the value of the associated type `Bar` in `Trait` must be specified
   --> $DIR/E0191.rs:5:16
    |
 LL |     type Bar;
diff --git a/tests/ui/error-codes/E0220.stderr b/tests/ui/error-codes/E0220.stderr
index e03eadacae4..0e0b5c7084c 100644
--- a/tests/ui/error-codes/E0220.stderr
+++ b/tests/ui/error-codes/E0220.stderr
@@ -4,7 +4,7 @@ error[E0220]: associated type `F` not found for `Trait`
 LL | type Foo = dyn Trait<F=i32>;
    |                      ^ help: `Trait` has the following associated type: `Bar`
 
-error[E0191]: the value of the associated type `Bar` (from trait `Trait`) must be specified
+error[E0191]: the value of the associated type `Bar` in `Trait` must be specified
   --> $DIR/E0220.rs:5:16
    |
 LL |     type Bar;
diff --git a/tests/ui/error-codes/E0221.stderr b/tests/ui/error-codes/E0221.stderr
index 5414d77ad7c..e600acf7834 100644
--- a/tests/ui/error-codes/E0221.stderr
+++ b/tests/ui/error-codes/E0221.stderr
@@ -10,11 +10,11 @@ LL |     fn do_something() {
 LL |         let _: Self::A;
    |                ^^^^^^^ ambiguous associated type `A`
    |
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL |         let _: <Self as Foo>::A;
    |                ~~~~~~~~~~~~~~~
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL |         let _: <Self as Bar>::A;
    |                ~~~~~~~~~~~~~~~
@@ -29,7 +29,7 @@ LL |         let _: Self::Err;
    |                ^^^^^^^^^ ambiguous associated type `Err`
    |
    = note: associated type `Self` could derive from `FromStr`
-help: use fully qualified syntax to disambiguate
+help: use fully-qualified syntax to disambiguate
    |
 LL |         let _: <Self as My>::Err;
    |                ~~~~~~~~~~~~~~
diff --git a/tests/ui/error-codes/E0223.stderr b/tests/ui/error-codes/E0223.stderr
index 42945e42f6e..1299ba5f50c 100644
--- a/tests/ui/error-codes/E0223.stderr
+++ b/tests/ui/error-codes/E0223.stderr
@@ -2,7 +2,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/E0223.rs:8:14
    |
 LL |     let foo: MyTrait::X;
-   |              ^^^^^^^^^^ help: use the fully-qualified path: `<MyStruct as MyTrait>::X`
+   |              ^^^^^^^^^^ help: use fully-qualified syntax: `<MyStruct as MyTrait>::X`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/error-codes/E0283.rs b/tests/ui/error-codes/E0283.rs
index 0643af4b7e8..5134660e3f4 100644
--- a/tests/ui/error-codes/E0283.rs
+++ b/tests/ui/error-codes/E0283.rs
@@ -1,10 +1,10 @@
-trait Generator {
+trait Coroutine {
     fn create() -> u32;
 }
 
 struct Impl;
 
-impl Generator for Impl {
+impl Coroutine for Impl {
     fn create() -> u32 { 1 }
 }
 
@@ -22,12 +22,12 @@ fn foo(bar: u32) {}
 
 struct AnotherImpl;
 
-impl Generator for AnotherImpl {
+impl Coroutine for AnotherImpl {
     fn create() -> u32 { 2 }
 }
 
 fn main() {
-    let cont: u32 = Generator::create(); //~ ERROR E0790
+    let cont: u32 = Coroutine::create(); //~ ERROR E0790
 }
 
 fn buzz() {
diff --git a/tests/ui/error-codes/E0283.stderr b/tests/ui/error-codes/E0283.stderr
index fa8d4b6e015..6008809f050 100644
--- a/tests/ui/error-codes/E0283.stderr
+++ b/tests/ui/error-codes/E0283.stderr
@@ -2,14 +2,14 @@ error[E0790]: cannot call associated function on trait without specifying the co
   --> $DIR/E0283.rs:30:21
    |
 LL |     fn create() -> u32;
-   |     ------------------- `Generator::create` defined here
+   |     ------------------- `Coroutine::create` defined here
 ...
-LL |     let cont: u32 = Generator::create();
+LL |     let cont: u32 = Coroutine::create();
    |                     ^^^^^^^^^^^^^^^^^ cannot call associated function of trait
    |
 help: use a fully-qualified path to a specific available implementation
    |
-LL |     let cont: u32 = </* self type */ as Generator>::create();
+LL |     let cont: u32 = </* self type */ as Coroutine>::create();
    |                     +++++++++++++++++++          +
 
 error[E0283]: type annotations needed
diff --git a/tests/ui/error-codes/E0396-fixed.stderr b/tests/ui/error-codes/E0396-fixed.stderr
index 2efbd6989ad..e77b2ce9a22 100644
--- a/tests/ui/error-codes/E0396-fixed.stderr
+++ b/tests/ui/error-codes/E0396-fixed.stderr
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
   --> $DIR/E0396-fixed.rs:5:28
    |
 LL | const VALUE: u8 = unsafe { *REG_ADDR };
-   |                            ^^^^^^^^^ dereferencing pointer failed: 0x5f3759df[noalloc] is a dangling pointer (it has no provenance)
+   |                            ^^^^^^^^^ memory access failed: 0x5f3759df[noalloc] is a dangling pointer (it has no provenance)
 
 error: aborting due to previous error
 
diff --git a/tests/ui/error-codes/E0396.rs b/tests/ui/error-codes/E0396.rs
index 4415b70e75e..383eda3d636 100644
--- a/tests/ui/error-codes/E0396.rs
+++ b/tests/ui/error-codes/E0396.rs
@@ -9,9 +9,11 @@ const unsafe fn unreachable() -> ! {
     const INFALLIBLE: *mut Infallible = &[] as *const [Infallible] as *const _ as _;
     match *INFALLIBLE {}
     //~^ ERROR dereferencing raw mutable pointers in constant functions is unstable
+    //~| ERROR dereferencing raw mutable pointers in constant functions is unstable
 
     const BAD: () = unsafe { match *INFALLIBLE {} };
     //~^ ERROR dereferencing raw mutable pointers in constants is unstable
+    //~| ERROR dereferencing raw mutable pointers in constants is unstable
 }
 
 fn main() {
diff --git a/tests/ui/error-codes/E0396.stderr b/tests/ui/error-codes/E0396.stderr
index 8c87f40674f..a84a1216e0a 100644
--- a/tests/ui/error-codes/E0396.stderr
+++ b/tests/ui/error-codes/E0396.stderr
@@ -16,15 +16,35 @@ LL |     match *INFALLIBLE {}
    = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
+error[E0658]: dereferencing raw mutable pointers in constant functions is unstable
+  --> $DIR/E0396.rs:10:11
+   |
+LL |     match *INFALLIBLE {}
+   |           ^^^^^^^^^^^
+   |
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0658]: dereferencing raw mutable pointers in constants is unstable
+  --> $DIR/E0396.rs:14:36
+   |
+LL |     const BAD: () = unsafe { match *INFALLIBLE {} };
+   |                                    ^^^^^^^^^^^
+   |
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
+
 error[E0658]: dereferencing raw mutable pointers in constants is unstable
-  --> $DIR/E0396.rs:13:36
+  --> $DIR/E0396.rs:14:36
    |
 LL |     const BAD: () = unsafe { match *INFALLIBLE {} };
    |                                    ^^^^^^^^^^^
    |
    = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error: aborting due to 3 previous errors
+error: aborting due to 5 previous errors
 
 For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/error-codes/E0463.rs b/tests/ui/error-codes/E0463.rs
deleted file mode 100644
index 683565281cf..00000000000
--- a/tests/ui/error-codes/E0463.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-#![feature(plugin)]
-#![plugin(cookie_monster)]
-//~^ ERROR E0463
-extern crate cake_is_a_lie;
-
-fn main() {
-}
diff --git a/tests/ui/error-codes/E0463.stderr b/tests/ui/error-codes/E0463.stderr
deleted file mode 100644
index 1aa66e1ec88..00000000000
--- a/tests/ui/error-codes/E0463.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0463]: can't find crate for `cookie_monster`
-  --> $DIR/E0463.rs:2:11
-   |
-LL | #![plugin(cookie_monster)]
-   |           ^^^^^^^^^^^^^^ can't find crate
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0463`.
diff --git a/tests/ui/error-codes/E0583.stderr b/tests/ui/error-codes/E0583.stderr
index c7bbbf11499..6707f2864f2 100644
--- a/tests/ui/error-codes/E0583.stderr
+++ b/tests/ui/error-codes/E0583.stderr
@@ -5,6 +5,7 @@ LL | mod module_that_doesnt_exist;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: to create the module `module_that_doesnt_exist`, create file "$DIR/module_that_doesnt_exist.rs" or "$DIR/module_that_doesnt_exist/mod.rs"
+   = note: if there is a `mod module_that_doesnt_exist` elsewhere in the crate already, import it with `use crate::...` instead
 
 error: aborting due to previous error
 
diff --git a/tests/ui/error-codes/E0719.stderr b/tests/ui/error-codes/E0719.stderr
index 685bd7175e3..00aea97139a 100644
--- a/tests/ui/error-codes/E0719.stderr
+++ b/tests/ui/error-codes/E0719.stderr
@@ -1,4 +1,4 @@
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/E0719.rs:1:33
    |
 LL | trait Foo: Iterator<Item = i32, Item = i32> {}
@@ -6,7 +6,7 @@ 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
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/E0719.rs:1:33
    |
 LL | trait Foo: Iterator<Item = i32, Item = i32> {}
@@ -16,7 +16,7 @@ LL | trait Foo: Iterator<Item = i32, Item = i32> {}
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
-error[E0719]: the value of the associated type `Item` (from trait `Iterator`) is already specified
+error[E0719]: the value of the associated type `Item` in trait `Iterator` is already specified
   --> $DIR/E0719.rs:7:42
    |
 LL | fn test() -> Box<dyn Iterator<Item = (), Item = Unit>> {
diff --git a/tests/ui/errors/remap-path-prefix-macro.normal.run.stdout b/tests/ui/errors/remap-path-prefix-macro.normal.run.stdout
new file mode 100644
index 00000000000..3bbdcbb8655
--- /dev/null
+++ b/tests/ui/errors/remap-path-prefix-macro.normal.run.stdout
@@ -0,0 +1 @@
+remapped/errors/remap-path-prefix-macro.rs
diff --git a/tests/ui/errors/remap-path-prefix-macro.rs b/tests/ui/errors/remap-path-prefix-macro.rs
new file mode 100644
index 00000000000..0ba706b0a8f
--- /dev/null
+++ b/tests/ui/errors/remap-path-prefix-macro.rs
@@ -0,0 +1,12 @@
+// run-pass
+// check-run-results
+
+// revisions: normal with-macro-scope without-macro-scope
+// compile-flags: --remap-path-prefix={{src-base}}=remapped
+// [with-macro-scope]compile-flags: -Zremap-path-scope=macro,diagnostics
+// [without-macro-scope]compile-flags: -Zremap-path-scope=diagnostics
+// no-remap-src-base: Manually remap, so the remapped path remains in .stderr file.
+
+fn main() {
+    println!("{}", file!());
+}
diff --git a/tests/ui/errors/remap-path-prefix-macro.with-macro-scope.run.stdout b/tests/ui/errors/remap-path-prefix-macro.with-macro-scope.run.stdout
new file mode 100644
index 00000000000..3bbdcbb8655
--- /dev/null
+++ b/tests/ui/errors/remap-path-prefix-macro.with-macro-scope.run.stdout
@@ -0,0 +1 @@
+remapped/errors/remap-path-prefix-macro.rs
diff --git a/tests/ui/errors/remap-path-prefix-macro.without-macro-scope.run.stdout b/tests/ui/errors/remap-path-prefix-macro.without-macro-scope.run.stdout
new file mode 100644
index 00000000000..642823fec86
--- /dev/null
+++ b/tests/ui/errors/remap-path-prefix-macro.without-macro-scope.run.stdout
@@ -0,0 +1 @@
+$DIR/remap-path-prefix-macro.rs
diff --git a/tests/ui/errors/remap-path-prefix.stderr b/tests/ui/errors/remap-path-prefix.normal.stderr
index 62dbd4b8881..004f10b4e43 100644
--- a/tests/ui/errors/remap-path-prefix.stderr
+++ b/tests/ui/errors/remap-path-prefix.normal.stderr
@@ -1,5 +1,5 @@
 error[E0425]: cannot find value `ferris` in this scope
-  --> remapped/errors/remap-path-prefix.rs:16:5
+  --> remapped/errors/remap-path-prefix.rs:19:5
    |
 LL |     ferris
    |     ^^^^^^ not found in this scope
diff --git a/tests/ui/errors/remap-path-prefix.rs b/tests/ui/errors/remap-path-prefix.rs
index 393b8e22f1c..e3338c10fd7 100644
--- a/tests/ui/errors/remap-path-prefix.rs
+++ b/tests/ui/errors/remap-path-prefix.rs
@@ -1,4 +1,7 @@
+// revisions: normal with-diagnostic-scope without-diagnostic-scope
 // compile-flags: --remap-path-prefix={{src-base}}=remapped
+// [with-diagnostic-scope]compile-flags: -Zremap-path-scope=diagnostics
+// [without-diagnostic-scope]compile-flags: -Zremap-path-scope=object
 // no-remap-src-base: Manually remap, so the remapped path remains in .stderr file.
 
 // The remapped paths are not normalized by compiletest.
diff --git a/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr b/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr
new file mode 100644
index 00000000000..004f10b4e43
--- /dev/null
+++ b/tests/ui/errors/remap-path-prefix.with-diagnostic-scope.stderr
@@ -0,0 +1,9 @@
+error[E0425]: cannot find value `ferris` in this scope
+  --> remapped/errors/remap-path-prefix.rs:19:5
+   |
+LL |     ferris
+   |     ^^^^^^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr b/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr
new file mode 100644
index 00000000000..98fe328193c
--- /dev/null
+++ b/tests/ui/errors/remap-path-prefix.without-diagnostic-scope.stderr
@@ -0,0 +1,9 @@
+error[E0425]: cannot find value `ferris` in this scope
+  --> $DIR/remap-path-prefix.rs:19:5
+   |
+LL |     ferris
+   |     ^^^^^^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.rs b/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.rs
new file mode 100644
index 00000000000..5e64fd5d2af
--- /dev/null
+++ b/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.rs
@@ -0,0 +1,10 @@
+fn main() {
+    let number = 2;
+    Some(true).filter({ //~ ERROR expected a `FnOnce(&bool)` closure, found `bool`
+        if number % 2 == 0 {
+            number == 0
+        } else {
+            number != 0
+        }
+    });
+}
diff --git a/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr b/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr
new file mode 100644
index 00000000000..f70b3211743
--- /dev/null
+++ b/tests/ui/expr/malformed_closure/block_instead_of_closure_in_arg.stderr
@@ -0,0 +1,27 @@
+error[E0277]: expected a `FnOnce(&bool)` closure, found `bool`
+  --> $DIR/block_instead_of_closure_in_arg.rs:3:23
+   |
+LL |        Some(true).filter({
+   |  _________________------_^
+   | |                 |
+   | |                 required by a bound introduced by this call
+LL | |/         if number % 2 == 0 {
+LL | ||             number == 0
+LL | ||         } else {
+LL | ||             number != 0
+LL | ||         }
+   | ||_________- this tail expression is of type `bool`
+LL | |      });
+   | |______^ expected an `FnOnce(&bool)` closure, found `bool`
+   |
+   = help: the trait `for<'a> FnOnce<(&'a bool,)>` is not implemented for `bool`
+note: required by a bound in `Option::<T>::filter`
+  --> $SRC_DIR/core/src/option.rs:LL:COL
+help: you might have meant to create the closure instead of a block
+   |
+LL |     Some(true).filter(|_| {
+   |                       +++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.rs b/tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.rs
new file mode 100644
index 00000000000..bb2e9c0a63c
--- /dev/null
+++ b/tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.rs
@@ -0,0 +1,7 @@
+const x: usize =42;
+fn main() {
+    let p = Some(45).and_then({|x| //~ ERROR expected a `FnOnce({integer})` closure, found `Option<usize>`
+        1 + 1;
+        Some(x * 2)
+    });
+}
diff --git a/tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.stderr b/tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.stderr
new file mode 100644
index 00000000000..e44ec5ca93c
--- /dev/null
+++ b/tests/ui/expr/malformed_closure/ruby_style_closure_successful_parse.stderr
@@ -0,0 +1,25 @@
+error[E0277]: expected a `FnOnce({integer})` closure, found `Option<usize>`
+  --> $DIR/ruby_style_closure_successful_parse.rs:3:31
+   |
+LL |       let p = Some(45).and_then({|x|
+   |  ______________________--------_^
+   | |                      |
+   | |                      required by a bound introduced by this call
+LL | |         1 + 1;
+LL | |         Some(x * 2)
+   | |         ----------- this tail expression is of type `Option<usize>`
+LL | |     });
+   | |_____^ expected an `FnOnce({integer})` closure, found `Option<usize>`
+   |
+   = help: the trait `FnOnce<({integer},)>` is not implemented for `Option<usize>`
+note: required by a bound in `Option::<T>::and_then`
+  --> $SRC_DIR/core/src/option.rs:LL:COL
+help: you might have meant to open the closure body instead of placing a closure within a block
+   |
+LL -     let p = Some(45).and_then({|x|
+LL +     let p = Some(45).and_then(|x| {
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/extern/extern-wrong-value-type.rs b/tests/ui/extern/extern-wrong-value-type.rs
index 337865ec18d..56c6cf1dfab 100644
--- a/tests/ui/extern/extern-wrong-value-type.rs
+++ b/tests/ui/extern/extern-wrong-value-type.rs
@@ -7,5 +7,5 @@ fn main() {
     // extern functions are extern "C" fn
     let _x: extern "C" fn() = f; // OK
     is_fn(f);
-    //~^ ERROR expected a `Fn<()>` closure, found `extern "C" fn() {f}`
+    //~^ ERROR expected a `Fn()` closure, found `extern "C" fn() {f}`
 }
diff --git a/tests/ui/extern/extern-wrong-value-type.stderr b/tests/ui/extern/extern-wrong-value-type.stderr
index ff2934a2ba8..463cee83169 100644
--- a/tests/ui/extern/extern-wrong-value-type.stderr
+++ b/tests/ui/extern/extern-wrong-value-type.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<()>` closure, found `extern "C" fn() {f}`
+error[E0277]: expected a `Fn()` closure, found `extern "C" fn() {f}`
   --> $DIR/extern-wrong-value-type.rs:9:11
    |
 LL |     is_fn(f);
-   |     ----- ^ expected an `Fn<()>` closure, found `extern "C" fn() {f}`
+   |     ----- ^ expected an `Fn()` closure, found `extern "C" fn() {f}`
    |     |
    |     required by a bound introduced by this call
    |
diff --git a/tests/ui/feature-gates/feature-gate-closure_track_caller.rs b/tests/ui/feature-gates/feature-gate-closure_track_caller.rs
index a4c91f3bc18..58a9c84be5a 100644
--- a/tests/ui/feature-gates/feature-gate-closure_track_caller.rs
+++ b/tests/ui/feature-gates/feature-gate-closure_track_caller.rs
@@ -1,9 +1,9 @@
 // edition:2021
 #![feature(stmt_expr_attributes)]
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
     let _closure = #[track_caller] || {}; //~ `#[track_caller]` on closures
-    let _generator = #[track_caller] || { yield; }; //~ `#[track_caller]` on closures
+    let _coroutine = #[track_caller] || { yield; }; //~ `#[track_caller]` on closures
     let _future = #[track_caller] async {}; //~ `#[track_caller]` on closures
 }
diff --git a/tests/ui/feature-gates/feature-gate-closure_track_caller.stderr b/tests/ui/feature-gates/feature-gate-closure_track_caller.stderr
index cf2ea5fe1ca..d5ef5d09ed4 100644
--- a/tests/ui/feature-gates/feature-gate-closure_track_caller.stderr
+++ b/tests/ui/feature-gates/feature-gate-closure_track_caller.stderr
@@ -10,7 +10,7 @@ LL |     let _closure = #[track_caller] || {};
 error[E0658]: `#[track_caller]` on closures is currently unstable
   --> $DIR/feature-gate-closure_track_caller.rs:7:22
    |
-LL |     let _generator = #[track_caller] || { yield; };
+LL |     let _coroutine = #[track_caller] || { yield; };
    |                      ^^^^^^^^^^^^^^^
    |
    = note: see issue #87417 <https://github.com/rust-lang/rust/issues/87417> for more information
diff --git a/tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr b/tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr
new file mode 100644
index 00000000000..2e529236ad8
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-coroutines.e2024.stderr
@@ -0,0 +1,28 @@
+error[E0658]: yield syntax is experimental
+  --> $DIR/feature-gate-coroutines.rs:5:5
+   |
+LL |     yield true;
+   |     ^^^^^^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+
+error[E0658]: yield syntax is experimental
+  --> $DIR/feature-gate-coroutines.rs:9:16
+   |
+LL |     let _ = || yield true;
+   |                ^^^^^^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+
+error[E0627]: yield expression outside of coroutine literal
+  --> $DIR/feature-gate-coroutines.rs:5:5
+   |
+LL |     yield true;
+   |     ^^^^^^^^^^
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0627, E0658.
+For more information about an error, try `rustc --explain E0627`.
diff --git a/tests/ui/feature-gates/feature-gate-coroutines.none.stderr b/tests/ui/feature-gates/feature-gate-coroutines.none.stderr
new file mode 100644
index 00000000000..ab24805e467
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-coroutines.none.stderr
@@ -0,0 +1,66 @@
+error[E0658]: yield syntax is experimental
+  --> $DIR/feature-gate-coroutines.rs:5:5
+   |
+LL |     yield true;
+   |     ^^^^^^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+
+error[E0658]: yield syntax is experimental
+  --> $DIR/feature-gate-coroutines.rs:9:16
+   |
+LL |     let _ = || yield true;
+   |                ^^^^^^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+
+error[E0658]: yield syntax is experimental
+  --> $DIR/feature-gate-coroutines.rs:16:5
+   |
+LL |     yield;
+   |     ^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+
+error[E0658]: yield syntax is experimental
+  --> $DIR/feature-gate-coroutines.rs:17:5
+   |
+LL |     yield 0;
+   |     ^^^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+
+error[E0658]: yield syntax is experimental
+  --> $DIR/feature-gate-coroutines.rs:5:5
+   |
+LL |     yield true;
+   |     ^^^^^^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0658]: yield syntax is experimental
+  --> $DIR/feature-gate-coroutines.rs:9:16
+   |
+LL |     let _ = || yield true;
+   |                ^^^^^^^^^^
+   |
+   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
+   = help: add `#![feature(coroutines)]` to the crate attributes to enable
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error[E0627]: yield expression outside of coroutine literal
+  --> $DIR/feature-gate-coroutines.rs:5:5
+   |
+LL |     yield true;
+   |     ^^^^^^^^^^
+
+error: aborting due to 7 previous errors
+
+Some errors have detailed explanations: E0627, E0658.
+For more information about an error, try `rustc --explain E0627`.
diff --git a/tests/ui/feature-gates/feature-gate-coroutines.rs b/tests/ui/feature-gates/feature-gate-coroutines.rs
new file mode 100644
index 00000000000..53b58d486a8
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-coroutines.rs
@@ -0,0 +1,18 @@
+// revisions: e2024 none
+//[e2024] compile-flags: --edition 2024 -Zunstable-options
+
+fn main() {
+    yield true; //~ ERROR yield syntax is experimental
+                //~^ ERROR yield expression outside of coroutine literal
+                //[none]~^^ ERROR yield syntax is experimental
+
+    let _ = || yield true; //~ ERROR yield syntax is experimental
+    //[none]~^ ERROR yield syntax is experimental
+}
+
+#[cfg(FALSE)]
+fn foo() {
+    // Ok in 2024 edition
+    yield; //[none]~ ERROR yield syntax is experimental
+    yield 0; //[none]~ ERROR yield syntax is experimental
+}
diff --git a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr
index 303700c7ab4..00b8c0eef98 100644
--- a/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr
+++ b/tests/ui/feature-gates/feature-gate-dispatch-from-dyn-missing-impl.stderr
@@ -14,6 +14,7 @@ LL | trait Trait {
    |       ----- this trait cannot be made into an object...
 LL |     fn ptr(self: Ptr<Self>);
    |                  ^^^^^^^^^ ...because method `ptr`'s `self` parameter cannot be dispatched on
+   = help: only type `i32` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/feature-gate-dispatch-from-dyn-missing-impl.rs:32:5
@@ -31,6 +32,7 @@ LL | trait Trait {
    |       ----- this trait cannot be made into an object...
 LL |     fn ptr(self: Ptr<Self>);
    |                  ^^^^^^^^^ ...because method `ptr`'s `self` parameter cannot be dispatched on
+   = help: only type `i32` implements the trait, consider using it directly instead
    = note: required for the cast from `Ptr<{integer}>` to `Ptr<dyn Trait>`
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr b/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr
new file mode 100644
index 00000000000..1462c41e957
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-gen_blocks.e2024.stderr
@@ -0,0 +1,28 @@
+error[E0658]: gen blocks are experimental
+  --> $DIR/feature-gate-gen_blocks.rs:5:5
+   |
+LL |     gen {};
+   |     ^^^^^
+   |
+   = note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
+   = help: add `#![feature(gen_blocks)]` to the crate attributes to enable
+
+error[E0658]: gen blocks are experimental
+  --> $DIR/feature-gate-gen_blocks.rs:13:5
+   |
+LL |     gen {};
+   |     ^^^^^
+   |
+   = note: see issue #117078 <https://github.com/rust-lang/rust/issues/117078> for more information
+   = help: add `#![feature(gen_blocks)]` to the crate attributes to enable
+
+error[E0282]: type annotations needed
+  --> $DIR/feature-gate-gen_blocks.rs:5:9
+   |
+LL |     gen {};
+   |         ^^ cannot infer type
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0282, E0658.
+For more information about an error, try `rustc --explain E0282`.
diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr b/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr
new file mode 100644
index 00000000000..b448c35e846
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-gen_blocks.none.stderr
@@ -0,0 +1,9 @@
+error[E0422]: cannot find struct, variant or union type `gen` in this scope
+  --> $DIR/feature-gate-gen_blocks.rs:5:5
+   |
+LL |     gen {};
+   |     ^^^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0422`.
diff --git a/tests/ui/feature-gates/feature-gate-gen_blocks.rs b/tests/ui/feature-gates/feature-gate-gen_blocks.rs
new file mode 100644
index 00000000000..e2e1574a36a
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-gen_blocks.rs
@@ -0,0 +1,15 @@
+// revisions: e2024 none
+//[e2024] compile-flags: --edition 2024 -Zunstable-options
+
+fn main() {
+    gen {};
+    //[none]~^ ERROR: cannot find struct, variant or union type `gen`
+    //[e2024]~^^ ERROR: gen blocks are experimental
+    //[e2024]~| ERROR: type annotations needed
+}
+
+#[cfg(FALSE)]
+fn foo() {
+    gen {};
+    //[e2024]~^ ERROR: gen blocks are experimental
+}
diff --git a/tests/ui/feature-gates/feature-gate-generators.rs b/tests/ui/feature-gates/feature-gate-generators.rs
deleted file mode 100644
index 931fee13471..00000000000
--- a/tests/ui/feature-gates/feature-gate-generators.rs
+++ /dev/null
@@ -1,10 +0,0 @@
-fn main() {
-    yield true; //~ ERROR yield syntax is experimental
-                //~^ ERROR yield expression outside of generator literal
-}
-
-#[cfg(FALSE)]
-fn foo() {
-    yield; //~ ERROR yield syntax is experimental
-    yield 0; //~ ERROR yield syntax is experimental
-}
diff --git a/tests/ui/feature-gates/feature-gate-generators.stderr b/tests/ui/feature-gates/feature-gate-generators.stderr
deleted file mode 100644
index dfea178a637..00000000000
--- a/tests/ui/feature-gates/feature-gate-generators.stderr
+++ /dev/null
@@ -1,37 +0,0 @@
-error[E0658]: yield syntax is experimental
-  --> $DIR/feature-gate-generators.rs:2:5
-   |
-LL |     yield true;
-   |     ^^^^^^^^^^
-   |
-   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(generators)]` to the crate attributes to enable
-
-error[E0658]: yield syntax is experimental
-  --> $DIR/feature-gate-generators.rs:8:5
-   |
-LL |     yield;
-   |     ^^^^^
-   |
-   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(generators)]` to the crate attributes to enable
-
-error[E0658]: yield syntax is experimental
-  --> $DIR/feature-gate-generators.rs:9:5
-   |
-LL |     yield 0;
-   |     ^^^^^^^
-   |
-   = note: see issue #43122 <https://github.com/rust-lang/rust/issues/43122> for more information
-   = help: add `#![feature(generators)]` to the crate attributes to enable
-
-error[E0627]: yield expression outside of generator literal
-  --> $DIR/feature-gate-generators.rs:2:5
-   |
-LL |     yield true;
-   |     ^^^^^^^^^^
-
-error: aborting due to 4 previous errors
-
-Some errors have detailed explanations: E0627, E0658.
-For more information about an error, try `rustc --explain E0627`.
diff --git a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs
index 9b646060adf..1922bfb4913 100644
--- a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs
+++ b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.rs
@@ -3,13 +3,17 @@
 #![deny(non_exhaustive_omitted_patterns)]
 //~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
 //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
+//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
 #![allow(non_exhaustive_omitted_patterns)]
 //~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
 //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
+//~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
 
 fn main() {
     enum Foo {
-        A, B, C,
+        A,
+        B,
+        C,
     }
 
     #[allow(non_exhaustive_omitted_patterns)]
@@ -17,18 +21,22 @@ fn main() {
     //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
     //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
     //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
+    //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
     match Foo::A {
+        //~^ ERROR non-exhaustive patterns: `Foo::C` not covered
         Foo::A => {}
         Foo::B => {}
     }
-    //~^^^^ ERROR non-exhaustive patterns: `Foo::C` not covered
 
+    #[warn(non_exhaustive_omitted_patterns)]
+    //~^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
+    //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
+    //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
+    //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
+    //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
     match Foo::A {
         Foo::A => {}
         Foo::B => {}
-        #[warn(non_exhaustive_omitted_patterns)]
         _ => {}
     }
-    //~^^^ WARNING unknown lint: `non_exhaustive_omitted_patterns`
-    //~| WARNING unknown lint: `non_exhaustive_omitted_patterns`
 }
diff --git a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr
index 1c14622d637..8af0eedc82b 100644
--- a/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr
+++ b/tests/ui/feature-gates/feature-gate-non_exhaustive_omitted_patterns_lint.stderr
@@ -10,7 +10,7 @@ LL | #![deny(non_exhaustive_omitted_patterns)]
    = note: `#[warn(unknown_lints)]` on by default
 
 warning: unknown lint: `non_exhaustive_omitted_patterns`
-  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:6:1
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:7:1
    |
 LL | #![allow(non_exhaustive_omitted_patterns)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -20,7 +20,7 @@ LL | #![allow(non_exhaustive_omitted_patterns)]
    = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
 
 warning: unknown lint: `non_exhaustive_omitted_patterns`
-  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:15:5
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
    |
 LL |     #[allow(non_exhaustive_omitted_patterns)]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -30,7 +30,7 @@ LL |     #[allow(non_exhaustive_omitted_patterns)]
    = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
 
 warning: unknown lint: `non_exhaustive_omitted_patterns`
-  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:15:5
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
    |
 LL |     #[allow(non_exhaustive_omitted_patterns)]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -41,16 +41,27 @@ LL |     #[allow(non_exhaustive_omitted_patterns)]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 warning: unknown lint: `non_exhaustive_omitted_patterns`
-  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:29:9
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
    |
-LL |         #[warn(non_exhaustive_omitted_patterns)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     #[warn(non_exhaustive_omitted_patterns)]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: the `non_exhaustive_omitted_patterns` lint is unstable
    = note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
    = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
 
 warning: unknown lint: `non_exhaustive_omitted_patterns`
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
+   |
+LL |     #[warn(non_exhaustive_omitted_patterns)]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: the `non_exhaustive_omitted_patterns` lint is unstable
+   = note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
+   = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: unknown lint: `non_exhaustive_omitted_patterns`
   --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:3:1
    |
 LL | #![deny(non_exhaustive_omitted_patterns)]
@@ -62,7 +73,7 @@ LL | #![deny(non_exhaustive_omitted_patterns)]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 warning: unknown lint: `non_exhaustive_omitted_patterns`
-  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:6:1
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:7:1
    |
 LL | #![allow(non_exhaustive_omitted_patterns)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -73,7 +84,7 @@ LL | #![allow(non_exhaustive_omitted_patterns)]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 warning: unknown lint: `non_exhaustive_omitted_patterns`
-  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:15:5
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
    |
 LL |     #[allow(non_exhaustive_omitted_patterns)]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -84,7 +95,7 @@ LL |     #[allow(non_exhaustive_omitted_patterns)]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 warning: unknown lint: `non_exhaustive_omitted_patterns`
-  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:15:5
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
    |
 LL |     #[allow(non_exhaustive_omitted_patterns)]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -95,10 +106,21 @@ LL |     #[allow(non_exhaustive_omitted_patterns)]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 warning: unknown lint: `non_exhaustive_omitted_patterns`
-  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:29:9
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
+   |
+LL |     #[warn(non_exhaustive_omitted_patterns)]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: the `non_exhaustive_omitted_patterns` lint is unstable
+   = note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
+   = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: unknown lint: `non_exhaustive_omitted_patterns`
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
    |
-LL |         #[warn(non_exhaustive_omitted_patterns)]
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     #[warn(non_exhaustive_omitted_patterns)]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: the `non_exhaustive_omitted_patterns` lint is unstable
    = note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
@@ -106,18 +128,19 @@ LL |         #[warn(non_exhaustive_omitted_patterns)]
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
 error[E0004]: non-exhaustive patterns: `Foo::C` not covered
-  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:20:11
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:25:11
    |
 LL |     match Foo::A {
    |           ^^^^^^ pattern `Foo::C` not covered
    |
 note: `Foo` defined here
-  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:12:15
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:13:10
    |
 LL |     enum Foo {
-   |          ---
-LL |         A, B, C,
-   |               ^ not covered
+   |          ^^^
+...
+LL |         C,
+   |         - not covered
    = note: the matched value is of type `Foo`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
@@ -125,6 +148,50 @@ LL ~         Foo::B => {},
 LL +         Foo::C => todo!()
    |
 
-error: aborting due to previous error; 10 warnings emitted
+warning: unknown lint: `non_exhaustive_omitted_patterns`
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:3:1
+   |
+LL | #![deny(non_exhaustive_omitted_patterns)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: the `non_exhaustive_omitted_patterns` lint is unstable
+   = note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
+   = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: unknown lint: `non_exhaustive_omitted_patterns`
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:7:1
+   |
+LL | #![allow(non_exhaustive_omitted_patterns)]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: the `non_exhaustive_omitted_patterns` lint is unstable
+   = note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
+   = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: unknown lint: `non_exhaustive_omitted_patterns`
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:19:5
+   |
+LL |     #[allow(non_exhaustive_omitted_patterns)]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: the `non_exhaustive_omitted_patterns` lint is unstable
+   = note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
+   = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+warning: unknown lint: `non_exhaustive_omitted_patterns`
+  --> $DIR/feature-gate-non_exhaustive_omitted_patterns_lint.rs:31:5
+   |
+LL |     #[warn(non_exhaustive_omitted_patterns)]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: the `non_exhaustive_omitted_patterns` lint is unstable
+   = note: see issue #89554 <https://github.com/rust-lang/rust/issues/89554> for more information
+   = help: add `#![feature(non_exhaustive_omitted_patterns_lint)]` to the crate attributes to enable
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to previous error; 16 warnings emitted
 
 For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/feature-gates/feature-gate-offset-of-enum.rs b/tests/ui/feature-gates/feature-gate-offset-of-enum.rs
new file mode 100644
index 00000000000..e19dcf9f6a5
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-offset-of-enum.rs
@@ -0,0 +1,15 @@
+#![feature(offset_of)]
+
+use std::mem::offset_of;
+
+enum Alpha {
+    One(u8),
+    Two(u8),
+}
+
+fn main() {
+    offset_of!(Alpha::One, 0); //~ ERROR expected type, found variant `Alpha::One`
+    offset_of!(Alpha, One); //~ ERROR `One` is an enum variant; expected field at end of `offset_of`
+                            //~| ERROR using enums in offset_of is experimental
+    offset_of!(Alpha, Two.0); //~ ERROR using enums in offset_of is experimental
+}
diff --git a/tests/ui/feature-gates/feature-gate-offset-of-enum.stderr b/tests/ui/feature-gates/feature-gate-offset-of-enum.stderr
new file mode 100644
index 00000000000..893f7870237
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-offset-of-enum.stderr
@@ -0,0 +1,37 @@
+error[E0573]: expected type, found variant `Alpha::One`
+  --> $DIR/feature-gate-offset-of-enum.rs:11:16
+   |
+LL |     offset_of!(Alpha::One, 0);
+   |                ^^^^^^^^^^
+   |                |
+   |                not a type
+   |                help: try using the variant's enum: `Alpha`
+
+error[E0658]: using enums in offset_of is experimental
+  --> $DIR/feature-gate-offset-of-enum.rs:12:23
+   |
+LL |     offset_of!(Alpha, One);
+   |                       ^^^
+   |
+   = note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information
+   = help: add `#![feature(offset_of_enum)]` to the crate attributes to enable
+
+error[E0795]: `One` is an enum variant; expected field at end of `offset_of`
+  --> $DIR/feature-gate-offset-of-enum.rs:12:23
+   |
+LL |     offset_of!(Alpha, One);
+   |                       ^^^ enum variant
+
+error[E0658]: using enums in offset_of is experimental
+  --> $DIR/feature-gate-offset-of-enum.rs:14:23
+   |
+LL |     offset_of!(Alpha, Two.0);
+   |                       ^^^
+   |
+   = note: see issue #106655 <https://github.com/rust-lang/rust/issues/106655> for more information
+   = help: add `#![feature(offset_of_enum)]` to the crate attributes to enable
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0573, E0658, E0795.
+For more information about an error, try `rustc --explain E0573`.
diff --git a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs
index 4c77180b767..b4dc1fd4556 100644
--- a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs
+++ b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs
@@ -1,17 +1,17 @@
 fn main() {
     match 0usize {
-        //~^ ERROR non-exhaustive patterns: `_` not covered
-        //~| NOTE pattern `_` not covered
+        //~^ ERROR non-exhaustive patterns: `usize::MAX..` not covered
+        //~| NOTE pattern `usize::MAX..` not covered
         //~| NOTE the matched value is of type `usize`
         //~| NOTE `usize` does not have a fixed maximum value
         0..=usize::MAX => {}
     }
 
     match 0isize {
-        //~^ ERROR non-exhaustive patterns: `_` not covered
-        //~| NOTE pattern `_` not covered
+        //~^ ERROR non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
+        //~| NOTE patterns `..isize::MIN` and `isize::MAX..` not covered
         //~| NOTE the matched value is of type `isize`
-        //~| NOTE `isize` does not have a fixed maximum value
+        //~| NOTE `isize` does not have fixed minimum and maximum values
         isize::MIN..=isize::MAX => {}
     }
 }
diff --git a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
index 853b57052ac..8694924e52f 100644
--- a/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
+++ b/tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr
@@ -1,31 +1,31 @@
-error[E0004]: non-exhaustive patterns: `_` not covered
+error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
   --> $DIR/feature-gate-precise_pointer_size_matching.rs:2:11
    |
 LL |     match 0usize {
-   |           ^^^^^^ pattern `_` not covered
+   |           ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         0..=usize::MAX => {},
-LL +         _ => todo!()
+LL +         usize::MAX.. => todo!()
    |
 
-error[E0004]: non-exhaustive patterns: `_` not covered
+error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
   --> $DIR/feature-gate-precise_pointer_size_matching.rs:10:11
    |
 LL |     match 0isize {
-   |           ^^^^^^ pattern `_` not covered
+   |           ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         isize::MIN..=isize::MAX => {},
-LL +         _ => todo!()
+LL +         ..isize::MIN | isize::MAX.. => todo!()
    |
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/feature-gates/feature-gate-staged_api.rs b/tests/ui/feature-gates/feature-gate-staged_api.rs
index 2571ab5d1b4..ce6b218dd7d 100644
--- a/tests/ui/feature-gates/feature-gate-staged_api.rs
+++ b/tests/ui/feature-gates/feature-gate-staged_api.rs
@@ -1,11 +1,11 @@
-#![stable(feature = "a", since = "b")]
+#![stable(feature = "a", since = "3.3.3")]
 //~^ ERROR stability attributes may not be used outside of the standard library
 mod inner_private_module {
     // UnnameableTypeAlias isn't marked as reachable, so no stability annotation is required here
     pub type UnnameableTypeAlias = u8;
 }
 
-#[stable(feature = "a", since = "b")]
+#[stable(feature = "a", since = "3.3.3")]
 //~^ ERROR stability attributes may not be used outside of the standard library
 pub fn f() -> inner_private_module::UnnameableTypeAlias {
     0
diff --git a/tests/ui/feature-gates/feature-gate-staged_api.stderr b/tests/ui/feature-gates/feature-gate-staged_api.stderr
index 951bb5a1740..1a9fcb02b0d 100644
--- a/tests/ui/feature-gates/feature-gate-staged_api.stderr
+++ b/tests/ui/feature-gates/feature-gate-staged_api.stderr
@@ -1,14 +1,14 @@
 error[E0734]: stability attributes may not be used outside of the standard library
   --> $DIR/feature-gate-staged_api.rs:8:1
    |
-LL | #[stable(feature = "a", since = "b")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[stable(feature = "a", since = "3.3.3")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0734]: stability attributes may not be used outside of the standard library
   --> $DIR/feature-gate-staged_api.rs:1:1
    |
-LL | #![stable(feature = "a", since = "b")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #![stable(feature = "a", since = "3.3.3")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-bench.stderr b/tests/ui/feature-gates/issue-43106-gating-of-bench.stderr
index 6b332211942..8270d46d492 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-bench.stderr
+++ b/tests/ui/feature-gates/issue-43106-gating-of-bench.stderr
@@ -11,10 +11,14 @@ error: `bench` attribute cannot be used at crate level
    |
 LL | #![bench                   = "4100"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL | fn main() {}
+   |    ---- the inner attribute doesn't annotate this function
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[bench                   = "4100"]
+LL - #![bench                   = "4100"]
+LL + #[bench                   = "4100"]
    |
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs
index 1fe133ac2bc..0f833f793bd 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs
+++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.rs
@@ -32,6 +32,12 @@
 //~^ ERROR attribute should be applied to function or closure
 mod inline {
     //~^ NOTE not a function or closure
+    //~| NOTE the inner attribute doesn't annotate this module
+    //~| NOTE the inner attribute doesn't annotate this module
+    //~| NOTE the inner attribute doesn't annotate this module
+    //~| NOTE the inner attribute doesn't annotate this module
+    //~| NOTE the inner attribute doesn't annotate this module
+    //~| NOTE the inner attribute doesn't annotate this module
 
     mod inner { #![inline] }
     //~^ ERROR attribute should be applied to function or closure
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr
index 78767040421..f01153dcb96 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr
+++ b/tests/ui/feature-gates/issue-43106-gating-of-builtin-attrs-error.stderr
@@ -7,7 +7,7 @@ LL | #![rustc_main]
    = help: add `#![feature(rustc_attrs)]` to the crate attributes to enable
 
 error: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:40:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
    |
 LL |     #[inline = "2100"] fn f() { }
    |     ^^^^^^^^^^^^^^^^^^
@@ -17,31 +17,31 @@ LL |     #[inline = "2100"] fn f() { }
    = note: `#[deny(ill_formed_attribute_input)]` on by default
 
 error: `start` attribute can only be used on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:119:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:125:1
    |
 LL | #[start]
    | ^^^^^^^^
 
 error: `start` attribute can only be used on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:122:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:128:17
    |
 LL |     mod inner { #![start] }
    |                 ^^^^^^^^^
 
 error: `start` attribute can only be used on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:127:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:133:5
    |
 LL |     #[start] struct S;
    |     ^^^^^^^^
 
 error: `start` attribute can only be used on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:130:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:136:5
    |
 LL |     #[start] type T = S;
    |     ^^^^^^^^
 
 error: `start` attribute can only be used on functions
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:133:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:139:5
    |
 LL |     #[start] impl S { }
    |     ^^^^^^^^
@@ -55,14 +55,14 @@ LL |
 LL | / mod inline {
 LL | |
 LL | |
-LL | |     mod inner { #![inline] }
+LL | |
 ...  |
 LL | |
 LL | | }
    | |_- not a function or closure
 
 error: attribute should be applied to an `extern crate` item
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:59:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:65:1
    |
 LL |   #[no_link]
    |   ^^^^^^^^^^
@@ -77,7 +77,7 @@ LL | | }
    | |_- not an `extern crate` item
 
 error: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:85:1
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:91:1
    |
 LL |   #[export_name = "2200"]
    |   ^^^^^^^^^^^^^^^^^^^^^^^
@@ -92,7 +92,7 @@ LL | | }
    | |_- not a free function, impl method or static
 
 error[E0517]: attribute should be applied to a struct, enum, or union
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:137:8
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:143:8
    |
 LL |   #[repr(C)]
    |          ^
@@ -129,10 +129,14 @@ error: `macro_export` attribute cannot be used at crate level
    |
 LL | #![macro_export]
    | ^^^^^^^^^^^^^^^^
+...
+LL | mod inline {
+   |     ------ the inner attribute doesn't annotate this module
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[macro_export]
+LL - #![macro_export]
+LL + #[macro_export]
    |
 
 error: `rustc_main` attribute cannot be used at crate level
@@ -140,21 +144,29 @@ error: `rustc_main` attribute cannot be used at crate level
    |
 LL | #![rustc_main]
    | ^^^^^^^^^^^^^^
+...
+LL | mod inline {
+   |     ------ the inner attribute doesn't annotate this module
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[rustc_main]
-   | ~~~~~~~~~~~~~
+LL - #![rustc_main]
+LL + #[rustc_main]
+   |
 
 error: `start` attribute cannot be used at crate level
   --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:16:1
    |
 LL | #![start]
    | ^^^^^^^^^
+...
+LL | mod inline {
+   |     ------ the inner attribute doesn't annotate this module
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[start]
+LL - #![start]
+LL + #[start]
    |
 
 error: `repr` attribute cannot be used at crate level
@@ -162,10 +174,14 @@ error: `repr` attribute cannot be used at crate level
    |
 LL | #![repr()]
    | ^^^^^^^^^^
+...
+LL | mod inline {
+   |     ------ the inner attribute doesn't annotate this module
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[repr()]
+LL - #![repr()]
+LL + #[repr()]
    |
 
 error: `path` attribute cannot be used at crate level
@@ -173,10 +189,14 @@ error: `path` attribute cannot be used at crate level
    |
 LL | #![path = "3800"]
    | ^^^^^^^^^^^^^^^^^
+...
+LL | mod inline {
+   |     ------ the inner attribute doesn't annotate this module
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[path = "3800"]
+LL - #![path = "3800"]
+LL + #[path = "3800"]
    |
 
 error: `automatically_derived` attribute cannot be used at crate level
@@ -184,122 +204,126 @@ error: `automatically_derived` attribute cannot be used at crate level
    |
 LL | #![automatically_derived]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL | mod inline {
+   |     ------ the inner attribute doesn't annotate this module
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[automatically_derived]
+LL - #![automatically_derived]
+LL + #[automatically_derived]
    |
 
 error[E0518]: attribute should be applied to function or closure
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:36:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:42:17
    |
 LL |     mod inner { #![inline] }
    |     ------------^^^^^^^^^^-- not a function or closure
 
 error[E0518]: attribute should be applied to function or closure
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:46:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:52:5
    |
 LL |     #[inline] struct S;
    |     ^^^^^^^^^ --------- not a function or closure
 
 error[E0518]: attribute should be applied to function or closure
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:50:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:56:5
    |
 LL |     #[inline] type T = S;
    |     ^^^^^^^^^ ----------- not a function or closure
 
 error[E0518]: attribute should be applied to function or closure
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:54:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:60:5
    |
 LL |     #[inline] impl S { }
    |     ^^^^^^^^^ ---------- not a function or closure
 
 error: attribute should be applied to an `extern crate` item
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:64:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:70:17
    |
 LL |     mod inner { #![no_link] }
    |     ------------^^^^^^^^^^^-- not an `extern crate` item
 
 error: attribute should be applied to an `extern crate` item
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:68:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:74:5
    |
 LL |     #[no_link] fn f() { }
    |     ^^^^^^^^^^ ---------- not an `extern crate` item
 
 error: attribute should be applied to an `extern crate` item
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:72:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:78:5
    |
 LL |     #[no_link] struct S;
    |     ^^^^^^^^^^ --------- not an `extern crate` item
 
 error: attribute should be applied to an `extern crate` item
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:76:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:82:5
    |
 LL |     #[no_link]type T = S;
    |     ^^^^^^^^^^----------- not an `extern crate` item
 
 error: attribute should be applied to an `extern crate` item
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:80:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:86:5
    |
 LL |     #[no_link] impl S { }
    |     ^^^^^^^^^^ ---------- not an `extern crate` item
 
 error: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:90:17
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:17
    |
 LL |     mod inner { #![export_name="2200"] }
    |     ------------^^^^^^^^^^^^^^^^^^^^^^-- not a free function, impl method or static
 
 error: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:96:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:102:5
    |
 LL |     #[export_name = "2200"] struct S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
 
 error: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:100:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:106:5
    |
 LL |     #[export_name = "2200"] type T = S;
    |     ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
 
 error: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:104:5
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:110:5
    |
 LL |     #[export_name = "2200"] impl S { }
    |     ^^^^^^^^^^^^^^^^^^^^^^^ ---------- not a free function, impl method or static
 
 error: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:109:9
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:115:9
    |
 LL |         #[export_name = "2200"] fn foo();
    |         ^^^^^^^^^^^^^^^^^^^^^^^ --------- not a free function, impl method or static
 
 error: attribute should be applied to a free function, impl method or static
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:113:9
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:119:9
    |
 LL |         #[export_name = "2200"] fn bar() {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^ ----------- not a free function, impl method or static
 
 error[E0517]: attribute should be applied to a struct, enum, or union
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:141:25
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:147:25
    |
 LL |     mod inner { #![repr(C)] }
    |     --------------------^---- not a struct, enum, or union
 
 error[E0517]: attribute should be applied to a struct, enum, or union
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:145:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:151:12
    |
 LL |     #[repr(C)] fn f() { }
    |            ^   ---------- not a struct, enum, or union
 
 error[E0517]: attribute should be applied to a struct, enum, or union
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:151:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:157:12
    |
 LL |     #[repr(C)] type T = S;
    |            ^   ----------- not a struct, enum, or union
 
 error[E0517]: attribute should be applied to a struct, enum, or union
-  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:155:12
+  --> $DIR/issue-43106-gating-of-builtin-attrs-error.rs:161:12
    |
 LL |     #[repr(C)] impl S { }
    |            ^   ---------- not a struct, enum, or union
diff --git a/tests/ui/feature-gates/issue-43106-gating-of-test.stderr b/tests/ui/feature-gates/issue-43106-gating-of-test.stderr
index 300a9966dd8..922c9861aa3 100644
--- a/tests/ui/feature-gates/issue-43106-gating-of-test.stderr
+++ b/tests/ui/feature-gates/issue-43106-gating-of-test.stderr
@@ -11,10 +11,14 @@ error: `test` attribute cannot be used at crate level
    |
 LL | #![test                    = "4200"]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL | fn main() {}
+   |    ---- the inner attribute doesn't annotate this function
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[test                    = "4200"]
+LL - #![test                    = "4200"]
+LL + #[test                    = "4200"]
    |
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/fn/fn-trait-formatting.rs b/tests/ui/fn/fn-trait-formatting.rs
index 636ac7107e6..61a8791ab1f 100644
--- a/tests/ui/fn/fn-trait-formatting.rs
+++ b/tests/ui/fn/fn-trait-formatting.rs
@@ -17,5 +17,5 @@ fn main() {
     //~| found struct `Box<dyn FnMut() -> isize>`
 
     needs_fn(1);
-    //~^ ERROR expected a `Fn<(isize,)>` closure, found `{integer}`
+    //~^ ERROR expected a `Fn(isize)` closure, found `{integer}`
 }
diff --git a/tests/ui/fn/fn-trait-formatting.stderr b/tests/ui/fn/fn-trait-formatting.stderr
index 45d543bda53..c5e2f41691f 100644
--- a/tests/ui/fn/fn-trait-formatting.stderr
+++ b/tests/ui/fn/fn-trait-formatting.stderr
@@ -39,11 +39,11 @@ LL |     let _: () = Box::new(|| -> isize { unimplemented!() }) as Box<dyn FnMut
    = note: expected unit type `()`
                  found struct `Box<dyn FnMut() -> isize>`
 
-error[E0277]: expected a `Fn<(isize,)>` closure, found `{integer}`
+error[E0277]: expected a `Fn(isize)` closure, found `{integer}`
   --> $DIR/fn-trait-formatting.rs:19:14
    |
 LL |     needs_fn(1);
-   |     -------- ^ expected an `Fn<(isize,)>` closure, found `{integer}`
+   |     -------- ^ expected an `Fn(isize)` closure, found `{integer}`
    |     |
    |     required by a bound introduced by this call
    |
diff --git a/tests/ui/generator/async-generator-issue-67158.rs b/tests/ui/generator/async-generator-issue-67158.rs
deleted file mode 100644
index 8125a7a9bb6..00000000000
--- a/tests/ui/generator/async-generator-issue-67158.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-#![feature(generators)]
-// edition:2018
-// Regression test for #67158.
-fn main() {
-    async { yield print!(":C") }; //~ ERROR `async` generators are not yet supported
-}
diff --git a/tests/ui/generator/auxiliary/metadata-sufficient-for-layout.rs b/tests/ui/generator/auxiliary/metadata-sufficient-for-layout.rs
deleted file mode 100644
index 207c2735f88..00000000000
--- a/tests/ui/generator/auxiliary/metadata-sufficient-for-layout.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// compile-flags: --emit metadata
-#![feature(generators, generator_trait)]
-
-use std::marker::Unpin;
-use std::ops::Generator;
-
-pub fn g() -> impl Generator<(), Yield = (), Return = ()> {
-    || {
-        yield;
-    }
-}
diff --git a/tests/ui/generator/auxiliary/xcrate-reachable.rs b/tests/ui/generator/auxiliary/xcrate-reachable.rs
deleted file mode 100644
index 2dd5ea67523..00000000000
--- a/tests/ui/generator/auxiliary/xcrate-reachable.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-#![feature(generators, generator_trait)]
-
-use std::ops::Generator;
-
-fn msg() -> u32 {
-    0
-}
-
-pub fn foo() -> impl Generator<(), Yield=(), Return=u32> {
-    || {
-        yield;
-        return msg();
-    }
-}
diff --git a/tests/ui/generator/auxiliary/xcrate.rs b/tests/ui/generator/auxiliary/xcrate.rs
deleted file mode 100644
index d07abd0918c..00000000000
--- a/tests/ui/generator/auxiliary/xcrate.rs
+++ /dev/null
@@ -1,18 +0,0 @@
-#![feature(generators, generator_trait)]
-
-use std::marker::Unpin;
-use std::ops::Generator;
-
-pub fn foo() -> impl Generator<(), Yield = (), Return = ()> {
-    || {
-        if false {
-            yield;
-        }
-    }
-}
-
-pub fn bar<T: 'static>(t: T) -> Box<Generator<(), Yield = T, Return = ()> + Unpin> {
-    Box::new(|| {
-        yield t;
-    })
-}
diff --git a/tests/ui/generator/borrowing.stderr b/tests/ui/generator/borrowing.stderr
deleted file mode 100644
index 03a69fe3623..00000000000
--- a/tests/ui/generator/borrowing.stderr
+++ /dev/null
@@ -1,39 +0,0 @@
-error[E0597]: `a` does not live long enough
-  --> $DIR/borrowing.rs:9:33
-   |
-LL |         Pin::new(&mut || yield &a).resume(())
-   |                       ----------^
-   |                       |         |
-   |                       |         borrowed value does not live long enough
-   |                       value captured here by generator
-   |                       a temporary with access to the borrow is created here ...
-LL |
-LL |     };
-   |     -- ... and the borrow might be used here, when that temporary is dropped and runs the destructor for generator
-   |     |
-   |     `a` dropped here while still borrowed
-   |
-   = note: the temporary is part of an expression at the end of a block;
-           consider forcing this temporary to be dropped sooner, before the block's local variables are dropped
-help: for example, you could save the expression's value in a new local variable `x` and then make `x` be the expression at the end of the block
-   |
-LL |         let x = Pin::new(&mut || yield &a).resume(()); x
-   |         +++++++                                      +++
-
-error[E0597]: `a` does not live long enough
-  --> $DIR/borrowing.rs:16: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/generator-yielding-or-returning-itself.rs b/tests/ui/generator/generator-yielding-or-returning-itself.rs
deleted file mode 100644
index 30788e3c186..00000000000
--- a/tests/ui/generator/generator-yielding-or-returning-itself.rs
+++ /dev/null
@@ -1,35 +0,0 @@
-#![feature(generator_trait)]
-#![feature(generators)]
-
-// Test that we cannot create a generator that returns a value of its
-// own type.
-
-use std::ops::Generator;
-
-pub fn want_cyclic_generator_return<T>(_: T)
-    where T: Generator<Yield = (), Return = T>
-{
-}
-
-fn supply_cyclic_generator_return() {
-    want_cyclic_generator_return(|| {
-        //~^ ERROR type mismatch
-        if false { yield None.unwrap(); }
-        None.unwrap()
-    })
-}
-
-pub fn want_cyclic_generator_yield<T>(_: T)
-    where T: Generator<Yield = T, Return = ()>
-{
-}
-
-fn supply_cyclic_generator_yield() {
-    want_cyclic_generator_yield(|| {
-        //~^ ERROR type mismatch
-        if false { yield None.unwrap(); }
-        None.unwrap()
-    })
-}
-
-fn main() { }
diff --git a/tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr b/tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr
deleted file mode 100644
index 66f0e3d94bd..00000000000
--- a/tests/ui/generator/issue-110929-generator-conflict-error-ice.stderr
+++ /dev/null
@@ -1,18 +0,0 @@
-error[E0499]: cannot borrow `*x` as mutable more than once at a time
-  --> $DIR/issue-110929-generator-conflict-error-ice.rs:8:9
-   |
-LL |         let _c = || yield *&mut *x;
-   |                  --             -- first borrow occurs due to use of `*x` in generator
-   |                  |
-   |                  first mutable borrow occurs here
-LL |         || _ = &mut *x;
-   |         ^^          -- second borrow occurs due to use of `*x` in closure
-   |         |
-   |         second mutable borrow occurs here
-LL |
-LL |     };
-   |     - first borrow might be used here, when `_c` is dropped and runs the destructor for generator
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0499`.
diff --git a/tests/ui/generator/issue-52304.rs b/tests/ui/generator/issue-52304.rs
deleted file mode 100644
index 3e9de765b12..00000000000
--- a/tests/ui/generator/issue-52304.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-// check-pass
-
-#![feature(generators, generator_trait)]
-
-use std::ops::Generator;
-
-pub fn example() -> impl Generator {
-    || yield &1
-}
-
-fn main() {}
diff --git a/tests/ui/generator/issue-64620-yield-array-element.rs b/tests/ui/generator/issue-64620-yield-array-element.rs
deleted file mode 100644
index 2cbe8f51614..00000000000
--- a/tests/ui/generator/issue-64620-yield-array-element.rs
+++ /dev/null
@@ -1,9 +0,0 @@
-// Regression test for #64620
-
-#![feature(generators)]
-
-pub fn crash(arr: [usize; 1]) {
-    yield arr[0]; //~ ERROR: yield expression outside of generator literal
-}
-
-fn main() {}
diff --git a/tests/ui/generator/issue-87142.rs b/tests/ui/generator/issue-87142.rs
deleted file mode 100644
index 7f670919ed6..00000000000
--- a/tests/ui/generator/issue-87142.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// compile-flags: -Cdebuginfo=2
-// build-pass
-
-// Regression test for #87142
-// This test needs the above flags and the "lib" crate type.
-
-#![feature(impl_trait_in_assoc_type, generator_trait, generators)]
-#![crate_type = "lib"]
-
-use std::ops::Generator;
-
-pub trait GeneratorProviderAlt: Sized {
-    type Gen: Generator<(), Return = (), Yield = ()>;
-
-    fn start(ctx: Context<Self>) -> Self::Gen;
-}
-
-pub struct Context<G: 'static + GeneratorProviderAlt> {
-    pub link: Box<G::Gen>,
-}
-
-impl GeneratorProviderAlt for () {
-    type Gen = impl Generator<(), Return = (), Yield = ()>;
-    fn start(ctx: Context<Self>) -> Self::Gen {
-        move || {
-            match ctx {
-                _ => (),
-            }
-            yield ();
-        }
-    }
-}
diff --git a/tests/ui/generator/nested_generators.rs b/tests/ui/generator/nested_generators.rs
deleted file mode 100644
index 45519150eec..00000000000
--- a/tests/ui/generator/nested_generators.rs
+++ /dev/null
@@ -1,21 +0,0 @@
-// run-pass
-
-#![feature(generators, generator_trait)]
-
-use std::ops::{Generator, GeneratorState};
-use std::pin::Pin;
-
-fn main() {
-    let _generator = || {
-        let mut sub_generator = || {
-            yield 2;
-        };
-
-        match Pin::new(&mut sub_generator).resume(()) {
-            GeneratorState::Yielded(x) => {
-                yield x;
-            }
-            _ => panic!(),
-        };
-    };
-}
diff --git a/tests/ui/generator/pin-box-generator.rs b/tests/ui/generator/pin-box-generator.rs
deleted file mode 100644
index c3136f5c0ec..00000000000
--- a/tests/ui/generator/pin-box-generator.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-// run-pass
-
-#![feature(generators, generator_trait)]
-
-use std::ops::Generator;
-
-fn assert_generator<G: Generator>(_: G) {
-}
-
-fn main() {
-    assert_generator(static || yield);
-    assert_generator(Box::pin(static || yield));
-}
diff --git a/tests/ui/generator/sized-yield.rs b/tests/ui/generator/sized-yield.rs
deleted file mode 100644
index c6dd738d6ac..00000000000
--- a/tests/ui/generator/sized-yield.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-#![feature(generators, generator_trait)]
-
-use std::ops::Generator;
-use std::pin::Pin;
-
-fn main() {
-   let s = String::from("foo");
-   let mut gen = move || {
-   //~^ ERROR the size for values of type
-       yield s[..];
-   };
-   Pin::new(&mut gen).resume(());
-   //~^ ERROR the size for values of type
-}
diff --git a/tests/ui/generator/sized-yield.stderr b/tests/ui/generator/sized-yield.stderr
deleted file mode 100644
index fb34540d969..00000000000
--- a/tests/ui/generator/sized-yield.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/sized-yield.rs:8:26
-   |
-LL |      let mut gen = move || {
-   |  __________________________^
-LL | |
-LL | |        yield s[..];
-LL | |    };
-   | |____^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `str`
-   = note: the yield type of a generator must have a statically known size
-
-error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/sized-yield.rs:12:23
-   |
-LL |    Pin::new(&mut gen).resume(());
-   |                       ^^^^^^ doesn't have a size known at compile-time
-   |
-   = help: the trait `Sized` is not implemented for `str`
-note: required by a bound in `GeneratorState`
-  --> $SRC_DIR/core/src/ops/generator.rs:LL:COL
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/generator/static-generators.rs b/tests/ui/generator/static-generators.rs
deleted file mode 100644
index d098bf1e688..00000000000
--- a/tests/ui/generator/static-generators.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// run-pass
-
-#![feature(generators, generator_trait)]
-
-use std::pin::Pin;
-use std::ops::{Generator, GeneratorState};
-
-fn main() {
-    let mut generator = static || {
-        let a = true;
-        let b = &a;
-        yield;
-        assert_eq!(b as *const _, &a as *const _);
-    };
-    // SAFETY: We shadow the original generator variable so have no safe API to
-    // move it after this point.
-    let mut generator = unsafe { Pin::new_unchecked(&mut generator) };
-    assert_eq!(generator.as_mut().resume(()), GeneratorState::Yielded(()));
-    assert_eq!(generator.as_mut().resume(()), GeneratorState::Complete(()));
-}
diff --git a/tests/ui/generator/too-many-parameters.rs b/tests/ui/generator/too-many-parameters.rs
deleted file mode 100644
index 7a353ea298b..00000000000
--- a/tests/ui/generator/too-many-parameters.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![feature(generators)]
-
-fn main() {
-    |(), ()| {
-        //~^ error: too many parameters for a generator
-        yield;
-    };
-}
diff --git a/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs b/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs
new file mode 100644
index 00000000000..7b168707239
--- /dev/null
+++ b/tests/ui/generic-associated-types/assume-gat-normalization-for-nested-goals.rs
@@ -0,0 +1,18 @@
+// check-pass
+
+#![feature(associated_type_defaults)]
+
+trait Foo {
+    type Bar<T>: Baz<Self> = i32;
+    // We should be able to prove that `i32: Baz<Self>` because of
+    // the impl below, which requires that `Self::Bar<()>: Eq<i32>`
+    // which is true, because we assume `for<T> Self::Bar<T> = i32`.
+}
+
+trait Baz<T: ?Sized> {}
+impl<T: Foo + ?Sized> Baz<T> for i32 where T::Bar<()>: Eq<i32> {}
+
+trait Eq<T> {}
+impl<T> Eq<T> for T {}
+
+fn main() {}
diff --git a/tests/ui/generic-associated-types/bugs/issue-100013.rs b/tests/ui/generic-associated-types/bugs/issue-100013.rs
index 973c548d785..b13b730d5d8 100644
--- a/tests/ui/generic-associated-types/bugs/issue-100013.rs
+++ b/tests/ui/generic-associated-types/bugs/issue-100013.rs
@@ -3,7 +3,7 @@
 // edition: 2021
 
 // We really should accept this, but we need implied bounds between the regions
-// in a generator interior.
+// in a coroutine interior.
 
 pub trait FutureIterator {
     type Future<'s, 'cx>: Send
@@ -12,21 +12,21 @@ pub trait FutureIterator {
 }
 
 fn call<I: FutureIterator>() -> impl Send {
-    async { // a generator checked for autotrait impl `Send`
+    async { // a coroutine checked for autotrait impl `Send`
         let x = None::<I::Future<'_, '_>>; // a type referencing GAT
         async {}.await; // a yield point
     }
 }
 
 fn call2<'a, 'b, I: FutureIterator>() -> impl Send {
-    async { // a generator checked for autotrait impl `Send`
+    async { // a coroutine checked for autotrait impl `Send`
         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
         async {}.await; // a yield point
     }
 }
 
 fn call3<'a: 'b, 'b, I: FutureIterator>() -> impl Send {
-    async { // a generator checked for autotrait impl `Send`
+    async { // a coroutine checked for autotrait impl `Send`
         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
         async {}.await; // a yield point
     }
diff --git a/tests/ui/generic-associated-types/bugs/issue-100013.stderr b/tests/ui/generic-associated-types/bugs/issue-100013.stderr
index 93c69422f00..ff82aebfef9 100644
--- a/tests/ui/generic-associated-types/bugs/issue-100013.stderr
+++ b/tests/ui/generic-associated-types/bugs/issue-100013.stderr
@@ -1,7 +1,7 @@
 error: lifetime bound not satisfied
   --> $DIR/issue-100013.rs:15:5
    |
-LL | /     async { // a generator checked for autotrait impl `Send`
+LL | /     async { // a coroutine checked for autotrait impl `Send`
 LL | |         let x = None::<I::Future<'_, '_>>; // a type referencing GAT
 LL | |         async {}.await; // a yield point
 LL | |     }
@@ -12,7 +12,7 @@ LL | |     }
 error: lifetime bound not satisfied
   --> $DIR/issue-100013.rs:22:5
    |
-LL | /     async { // a generator checked for autotrait impl `Send`
+LL | /     async { // a coroutine checked for autotrait impl `Send`
 LL | |         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
 LL | |         async {}.await; // a yield point
 LL | |     }
@@ -27,7 +27,7 @@ LL | fn call2<'a, 'b, I: FutureIterator>() -> impl Send {
    |          --  -- lifetime `'b` defined here
    |          |
    |          lifetime `'a` defined here
-LL |     async { // a generator checked for autotrait impl `Send`
+LL |     async { // a coroutine checked for autotrait impl `Send`
 LL |         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^ requires that `'a` must outlive `'b`
    |
@@ -36,7 +36,7 @@ LL |         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
 error: lifetime bound not satisfied
   --> $DIR/issue-100013.rs:29:5
    |
-LL | /     async { // a generator checked for autotrait impl `Send`
+LL | /     async { // a coroutine checked for autotrait impl `Send`
 LL | |         let x = None::<I::Future<'a, 'b>>; // a type referencing GAT
 LL | |         async {}.await; // a yield point
 LL | |     }
diff --git a/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr b/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr
index fd54faaf37c..9013d429530 100644
--- a/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr
+++ b/tests/ui/generic-associated-types/gat-in-trait-path.base.stderr
@@ -12,6 +12,9 @@ LL | trait Foo {
 LL |     type A<'a> where Self: 'a;
    |          ^ ...because it contains the generic associated type `A`
    = help: consider moving `A` to another trait
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `Foo` for this new enum and using it instead:
+             Fooy
+             Fooer<T>
 
 error: aborting due to previous error
 
diff --git a/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs b/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs
index f5502adee42..c444ee9e1cd 100644
--- a/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs
+++ b/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.rs
@@ -10,7 +10,7 @@ trait Fun {
 
 impl<T> Fun for T {
     type F<'a> = Self;
-    //~^ ERROR expected a `Fn<()>` closure, found `T`
+    //~^ ERROR expected a `Fn()` closure, found `T`
 }
 
 fn main() {
diff --git a/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr b/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr
index 07452137b5b..2376bda8190 100644
--- a/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr
+++ b/tests/ui/generic-associated-types/issue-68642-broken-llvm-ir.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<()>` closure, found `T`
+error[E0277]: expected a `Fn()` closure, found `T`
   --> $DIR/issue-68642-broken-llvm-ir.rs:12:18
    |
 LL |     type F<'a> = Self;
-   |                  ^^^^ expected an `Fn<()>` closure, found `T`
+   |                  ^^^^ expected an `Fn()` closure, found `T`
    |
    = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }`
 note: required by a bound in `Fun::F`
diff --git a/tests/ui/generic-associated-types/issue-68643-broken-mir.rs b/tests/ui/generic-associated-types/issue-68643-broken-mir.rs
index 6050a8bf561..39db51c0e2a 100644
--- a/tests/ui/generic-associated-types/issue-68643-broken-mir.rs
+++ b/tests/ui/generic-associated-types/issue-68643-broken-mir.rs
@@ -10,7 +10,7 @@ trait Fun {
 
 impl<T> Fun for T {
     type F<'a> = Self;
-    //~^ ERROR expected a `Fn<()>` closure, found `T`
+    //~^ ERROR expected a `Fn()` closure, found `T`
 }
 
 pub fn main() {
diff --git a/tests/ui/generic-associated-types/issue-68643-broken-mir.stderr b/tests/ui/generic-associated-types/issue-68643-broken-mir.stderr
index 31ded5dab95..2429531e4e5 100644
--- a/tests/ui/generic-associated-types/issue-68643-broken-mir.stderr
+++ b/tests/ui/generic-associated-types/issue-68643-broken-mir.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<()>` closure, found `T`
+error[E0277]: expected a `Fn()` closure, found `T`
   --> $DIR/issue-68643-broken-mir.rs:12:18
    |
 LL |     type F<'a> = Self;
-   |                  ^^^^ expected an `Fn<()>` closure, found `T`
+   |                  ^^^^ expected an `Fn()` closure, found `T`
    |
    = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }`
 note: required by a bound in `Fun::F`
diff --git a/tests/ui/generic-associated-types/issue-68644-codegen-selection.rs b/tests/ui/generic-associated-types/issue-68644-codegen-selection.rs
index 898cfa1e744..e379bce07d3 100644
--- a/tests/ui/generic-associated-types/issue-68644-codegen-selection.rs
+++ b/tests/ui/generic-associated-types/issue-68644-codegen-selection.rs
@@ -10,7 +10,7 @@ trait Fun {
 
 impl<T> Fun for T {
     type F<'a> = Self;
-    //~^ ERROR expected a `Fn<()>` closure, found `T`
+    //~^ ERROR expected a `Fn()` closure, found `T`
 }
 
 fn main() {
diff --git a/tests/ui/generic-associated-types/issue-68644-codegen-selection.stderr b/tests/ui/generic-associated-types/issue-68644-codegen-selection.stderr
index e2f9930cc67..11221353a92 100644
--- a/tests/ui/generic-associated-types/issue-68644-codegen-selection.stderr
+++ b/tests/ui/generic-associated-types/issue-68644-codegen-selection.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<()>` closure, found `T`
+error[E0277]: expected a `Fn()` closure, found `T`
   --> $DIR/issue-68644-codegen-selection.rs:12:18
    |
 LL |     type F<'a> = Self;
-   |                  ^^^^ expected an `Fn<()>` closure, found `T`
+   |                  ^^^^ expected an `Fn()` closure, found `T`
    |
    = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }`
 note: required by a bound in `Fun::F`
diff --git a/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs b/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs
index 60b065bfc31..e69a08b0a39 100644
--- a/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs
+++ b/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.rs
@@ -10,7 +10,7 @@ trait Fun {
 
 impl<T> Fun for T {
     type F<'a> = Self;
-    //~^ ERROR expected a `Fn<()>` closure, found `T`
+    //~^ ERROR expected a `Fn()` closure, found `T`
 }
 
 fn main() {
diff --git a/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr b/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr
index 0065368ad31..52300efc2d8 100644
--- a/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr
+++ b/tests/ui/generic-associated-types/issue-68645-codegen-fulfillment.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<()>` closure, found `T`
+error[E0277]: expected a `Fn()` closure, found `T`
   --> $DIR/issue-68645-codegen-fulfillment.rs:12:18
    |
 LL |     type F<'a> = Self;
-   |                  ^^^^ expected an `Fn<()>` closure, found `T`
+   |                  ^^^^ expected an `Fn()` closure, found `T`
    |
    = note: wrap the `T` in a closure with no arguments: `|| { /* code */ }`
 note: required by a bound in `Fun::F`
diff --git a/tests/ui/generic-associated-types/issue-68648-2.stderr b/tests/ui/generic-associated-types/issue-68648-2.stderr
index b2bef19eb5e..0514e7bd6f6 100644
--- a/tests/ui/generic-associated-types/issue-68648-2.stderr
+++ b/tests/ui/generic-associated-types/issue-68648-2.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-68648-2.rs:12:17
    |
 LL | fn bug<'a, T: Fun<F<'a> = T>>(t: T) -> T::F<'a> {
-   |            - this type parameter
+   |            - expected this type parameter
 LL |     T::identity(())
    |     ----------- ^^ expected type parameter `T`, found `()`
    |     |
diff --git a/tests/ui/generic-associated-types/issue-68656-unsized-values.stderr b/tests/ui/generic-associated-types/issue-68656-unsized-values.stderr
index f0212e985a9..20c07db4c04 100644
--- a/tests/ui/generic-associated-types/issue-68656-unsized-values.stderr
+++ b/tests/ui/generic-associated-types/issue-68656-unsized-values.stderr
@@ -2,7 +2,7 @@ error[E0271]: type mismatch resolving `<T as Deref>::Target == T`
   --> $DIR/issue-68656-unsized-values.rs:13:21
    |
 LL | impl<T: Copy + std::ops::Deref> UnsafeCopy<T> for T {
-   |      - this type parameter
+   |      - expected this type parameter
 LL |     type Item<'a> = T;
    |                     ^ expected type parameter `T`, found associated type
    |
diff --git a/tests/ui/generic-associated-types/issue-76535.base.stderr b/tests/ui/generic-associated-types/issue-76535.base.stderr
index 370329b9f83..bb14e297174 100644
--- a/tests/ui/generic-associated-types/issue-76535.base.stderr
+++ b/tests/ui/generic-associated-types/issue-76535.base.stderr
@@ -28,6 +28,8 @@ LL | pub trait SuperTrait {
 LL |     type SubType<'a>: SubTrait where Self: 'a;
    |          ^^^^^^^ ...because it contains the generic associated type `SubType`
    = help: consider moving `SubType` to another trait
+   = help: only type `SuperStruct` is seen to implement the trait in this crate, consider using it directly instead
+   = note: `SuperTrait` can be implemented in other crates; if you want to support your users passing their own types here, you can't refer to a specific type
 
 error[E0038]: the trait `SuperTrait` cannot be made into an object
   --> $DIR/issue-76535.rs:39:57
@@ -43,6 +45,8 @@ LL | pub trait SuperTrait {
 LL |     type SubType<'a>: SubTrait where Self: 'a;
    |          ^^^^^^^ ...because it contains the generic associated type `SubType`
    = help: consider moving `SubType` to another trait
+   = help: only type `SuperStruct` is seen to implement the trait in this crate, consider using it directly instead
+   = note: `SuperTrait` can be implemented in other crates; if you want to support your users passing their own types here, you can't refer to a specific type
    = note: required for the cast from `Box<SuperStruct>` to `Box<dyn SuperTrait<SubType = SubStruct<'_>>>`
 
 error: aborting due to 3 previous errors
diff --git a/tests/ui/generic-associated-types/issue-79422.base.stderr b/tests/ui/generic-associated-types/issue-79422.base.stderr
index ad704f5e9f0..bcc6382cf7c 100644
--- a/tests/ui/generic-associated-types/issue-79422.base.stderr
+++ b/tests/ui/generic-associated-types/issue-79422.base.stderr
@@ -28,6 +28,9 @@ LL | trait MapLike<K, V> {
 LL |     type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
    |          ^^^^^^^^ ...because it contains the generic associated type `VRefCont`
    = help: consider moving `VRefCont` to another trait
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `MapLike` for this new enum and using it instead:
+             std::collections::BTreeMap<K, V>
+             Source
 
 error[E0038]: the trait `MapLike` cannot be made into an object
   --> $DIR/issue-79422.rs:44:13
@@ -43,6 +46,9 @@ LL | trait MapLike<K, V> {
 LL |     type VRefCont<'a>: RefCont<'a, V> where Self: 'a;
    |          ^^^^^^^^ ...because it contains the generic associated type `VRefCont`
    = help: consider moving `VRefCont` to another trait
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `MapLike` for this new enum and using it instead:
+             std::collections::BTreeMap<K, V>
+             Source
    = note: required for the cast from `Box<BTreeMap<u8, u8>>` to `Box<dyn MapLike<u8, u8, VRefCont = (dyn RefCont<'_, u8> + 'static)>>`
 
 error: aborting due to 3 previous errors
diff --git a/tests/ui/generic-associated-types/issue-84931.rs b/tests/ui/generic-associated-types/issue-84931.rs
index 4123ce9d4d9..2ef990a7a90 100644
--- a/tests/ui/generic-associated-types/issue-84931.rs
+++ b/tests/ui/generic-associated-types/issue-84931.rs
@@ -12,7 +12,8 @@ struct StreamingSliceIter<'a, T> {
 
 impl<'b, T: 'b> StreamingIter for StreamingSliceIter<'b, T> {
     type Item<'a> = &'a mut T;
-    //~^ the parameter type
+    //~^ ERROR: the parameter type
+    //~| ERROR: does not fulfill the required lifetime
     fn next(&mut self) -> Option<&mut T> {
         loop {}
     }
diff --git a/tests/ui/generic-associated-types/issue-84931.stderr b/tests/ui/generic-associated-types/issue-84931.stderr
index fe9932c205a..04e14b9c746 100644
--- a/tests/ui/generic-associated-types/issue-84931.stderr
+++ b/tests/ui/generic-associated-types/issue-84931.stderr
@@ -11,6 +11,26 @@ help: consider adding an explicit lifetime bound
 LL |     type Item<'a> = &'a mut T where T: 'a;
    |                               +++++++++++
 
-error: aborting due to previous error
+error[E0477]: the type `StreamingSliceIter<'b, T>` does not fulfill the required lifetime
+  --> $DIR/issue-84931.rs:14:21
+   |
+LL |     type Item<'a> where Self: 'a;
+   |     ------------- definition of `Item` from trait
+...
+LL |     type Item<'a> = &'a mut T;
+   |                     ^^^^^^^^^
+   |
+note: type must outlive the lifetime `'a` as defined here
+  --> $DIR/issue-84931.rs:14:15
+   |
+LL |     type Item<'a> = &'a mut T;
+   |               ^^
+help: copy the `where` clause predicates from the trait
+   |
+LL |     type Item<'a> = &'a mut T where Self: 'a;
+   |                               ++++++++++++++
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0309`.
+Some errors have detailed explanations: E0309, E0477.
+For more information about an error, try `rustc --explain E0309`.
diff --git a/tests/ui/generic-associated-types/issue-86787.rs b/tests/ui/generic-associated-types/issue-86787.rs
index 96075ca503d..5edd0a9f02f 100644
--- a/tests/ui/generic-associated-types/issue-86787.rs
+++ b/tests/ui/generic-associated-types/issue-86787.rs
@@ -22,8 +22,8 @@ where
     type T = Either<Left::T, Right::T>;
     type TRef<'a> = Either<&'a Left::T, &'a Right::T>
     where
-        <Left as HasChildrenOf>::T: 'a,
-        <Right as HasChildrenOf>::T: 'a;
+        <Left as HasChildrenOf>::T: 'a, //~ ERROR impl has stricter requirements than trait
+        <Right as HasChildrenOf>::T: 'a; //~ ERROR impl has stricter requirements than trait
 
     fn ref_children<'a>(&'a self) -> Vec<Self::TRef<'a>> {
         todo!()
diff --git a/tests/ui/generic-associated-types/issue-86787.stderr b/tests/ui/generic-associated-types/issue-86787.stderr
index f34c63cf72e..00795abbd05 100644
--- a/tests/ui/generic-associated-types/issue-86787.stderr
+++ b/tests/ui/generic-associated-types/issue-86787.stderr
@@ -9,5 +9,24 @@ LL |     type TRef<'a>;
    = note: this bound is currently required to ensure that impls have maximum flexibility
    = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
 
-error: aborting due to previous error
+error[E0276]: impl has stricter requirements than trait
+  --> $DIR/issue-86787.rs:25:37
+   |
+LL |     type TRef<'a>;
+   |     ------------- definition of `TRef` from trait
+...
+LL |         <Left as HasChildrenOf>::T: 'a,
+   |                                     ^^ impl has extra requirement `<Left as HasChildrenOf>::T: 'a`
+
+error[E0276]: impl has stricter requirements than trait
+  --> $DIR/issue-86787.rs:26:38
+   |
+LL |     type TRef<'a>;
+   |     ------------- definition of `TRef` from trait
+...
+LL |         <Right as HasChildrenOf>::T: 'a;
+   |                                      ^^ impl has extra requirement `<Right as HasChildrenOf>::T: 'a`
+
+error: aborting due to 3 previous errors
 
+For more information about this error, try `rustc --explain E0276`.
diff --git a/tests/ui/generic-associated-types/issue-88360.stderr b/tests/ui/generic-associated-types/issue-88360.stderr
index 520aeff1894..ad40ee18001 100644
--- a/tests/ui/generic-associated-types/issue-88360.stderr
+++ b/tests/ui/generic-associated-types/issue-88360.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-88360.rs:15:9
    |
 LL | trait SuperTrait<T>
-   |                  - this type parameter
+   |                  - found this type parameter
 ...
 LL |     fn copy(&self) -> Self::Gat<'_> where T: Copy {
    |                       ------------- expected `&T` because of return type
diff --git a/tests/ui/generic-associated-types/missing-bounds.stderr b/tests/ui/generic-associated-types/missing-bounds.stderr
index 535edec575a..1d7d80d1b07 100644
--- a/tests/ui/generic-associated-types/missing-bounds.stderr
+++ b/tests/ui/generic-associated-types/missing-bounds.stderr
@@ -14,7 +14,7 @@ error[E0308]: mismatched types
   --> $DIR/missing-bounds.rs:11:11
    |
 LL | impl<B> Add for A<B> where B: Add {
-   |      - this type parameter
+   |      - expected this type parameter
 ...
 LL |         A(self.0 + rhs.0)
    |         - ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type
@@ -44,7 +44,7 @@ error[E0308]: mismatched types
   --> $DIR/missing-bounds.rs:21:14
    |
 LL | impl<B: Add> Add for C<B> {
-   |      - this type parameter
+   |      - expected this type parameter
 ...
 LL |         Self(self.0 + rhs.0)
    |         ---- ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type
@@ -80,7 +80,7 @@ error[E0308]: mismatched types
   --> $DIR/missing-bounds.rs:42:14
    |
 LL | impl<B: Add> Add for E<B> where <B as Add>::Output = B {
-   |      - this type parameter
+   |      - expected this type parameter
 ...
 LL |         Self(self.0 + rhs.0)
    |         ---- ^^^^^^^^^^^^^^ expected type parameter `B`, found associated type
diff --git a/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.rs b/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.rs
index 060ee8821d8..a3f3b1a6d4d 100644
--- a/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.rs
+++ b/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.rs
@@ -7,6 +7,7 @@ pub trait X {
 
 impl X for () {
     type Y<'a> = &'a ();
+    //~^ ERROR lifetime bound not satisfied
 }
 
 struct B<'a, T: for<'r> X<Y<'r> = &'r ()>> {
diff --git a/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr b/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr
index a69cd0028c1..f73ed5956da 100644
--- a/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr
+++ b/tests/ui/generic-associated-types/unsatisfied-item-lifetime-bound.stderr
@@ -12,44 +12,64 @@ LL | #![warn(unused_lifetimes)]
    |         ^^^^^^^^^^^^^^^^
 
 error[E0478]: lifetime bound not satisfied
-  --> $DIR/unsatisfied-item-lifetime-bound.rs:13:8
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:14:8
    |
 LL |     f: <T as X>::Y<'a>,
    |        ^^^^^^^^^^^^^^^
    |
 note: lifetime parameter instantiated with the lifetime `'a` as defined here
-  --> $DIR/unsatisfied-item-lifetime-bound.rs:12:10
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:13:10
    |
 LL | struct B<'a, T: for<'r> X<Y<'r> = &'r ()>> {
    |          ^^
    = note: but lifetime parameter must outlive the static lifetime
 
 error[E0478]: lifetime bound not satisfied
-  --> $DIR/unsatisfied-item-lifetime-bound.rs:18:8
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:19:8
    |
 LL |     f: <T as X>::Y<'a>,
    |        ^^^^^^^^^^^^^^^
    |
 note: lifetime parameter instantiated with the lifetime `'a` as defined here
-  --> $DIR/unsatisfied-item-lifetime-bound.rs:17:10
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:18:10
    |
 LL | struct C<'a, T: X> {
    |          ^^
    = note: but lifetime parameter must outlive the static lifetime
 
 error[E0478]: lifetime bound not satisfied
-  --> $DIR/unsatisfied-item-lifetime-bound.rs:23:8
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:24:8
    |
 LL |     f: <() as X>::Y<'a>,
    |        ^^^^^^^^^^^^^^^^
    |
 note: lifetime parameter instantiated with the lifetime `'a` as defined here
-  --> $DIR/unsatisfied-item-lifetime-bound.rs:22:10
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:23:10
    |
 LL | struct D<'a> {
    |          ^^
    = note: but lifetime parameter must outlive the static lifetime
 
-error: aborting due to 3 previous errors; 1 warning emitted
+error[E0478]: lifetime bound not satisfied
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:9:18
+   |
+LL |     type Y<'a: 'static>;
+   |     ------------------- definition of `Y` from trait
+...
+LL |     type Y<'a> = &'a ();
+   |                  ^^^^^^
+   |
+note: lifetime parameter instantiated with the lifetime `'a` as defined here
+  --> $DIR/unsatisfied-item-lifetime-bound.rs:9:12
+   |
+LL |     type Y<'a> = &'a ();
+   |            ^^
+   = note: but lifetime parameter must outlive the static lifetime
+help: copy the `where` clause predicates from the trait
+   |
+LL |     type Y<'a> = &'a () where 'a: 'static;
+   |                         +++++++++++++++++
+
+error: aborting due to 4 previous errors; 1 warning emitted
 
 For more information about this error, try `rustc --explain E0478`.
diff --git a/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr b/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr
index 9af6bc45c7a..8ab88c58075 100644
--- a/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/fn-ptr.classic.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<(&'w (),)>` closure, found `fn(&'w ())`
+error[E0277]: expected a `Fn(&'w ())` closure, found `fn(&'w ())`
   --> $DIR/fn-ptr.rs:12:5
    |
 LL |     ice();
-   |     ^^^ expected an `Fn<(&'w (),)>` closure, found `fn(&'w ())`
+   |     ^^^ expected an `Fn(&'w ())` closure, found `fn(&'w ())`
    |
    = help: the trait `for<'w> Fn<(&'w (),)>` is not implemented for `fn(&'w ())`
 note: required by a bound in `ice`
diff --git a/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs b/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs
index 853160f9612..adb19c035bc 100644
--- a/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs
+++ b/tests/ui/higher-ranked/trait-bounds/fn-ptr.rs
@@ -10,5 +10,5 @@ where
 
 fn main() {
     ice();
-    //[classic]~^ ERROR expected a `Fn<(&'w (),)>` closure, found `fn(&'w ())`
+    //[classic]~^ ERROR expected a `Fn(&'w ())` closure, found `fn(&'w ())`
 }
diff --git a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-3.stderr b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-3.stderr
index 2cc2bb2bbc3..7b0743cc7c5 100644
--- a/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-3.stderr
+++ b/tests/ui/higher-ranked/trait-bounds/normalize-under-binder/issue-62529-3.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<(<_ as ATC<'a>>::Type,)>` closure, found `F`
+error[E0277]: expected a `Fn(<_ as ATC<'a>>::Type)` closure, found `F`
   --> $DIR/issue-62529-3.rs:25:14
    |
 LL |         call(f, ());
-   |         ---- ^ expected an `Fn<(<_ as ATC<'a>>::Type,)>` closure, found `F`
+   |         ---- ^ expected an `Fn(<_ as ATC<'a>>::Type)` closure, found `F`
    |         |
    |         required by a bound introduced by this call
    |
diff --git a/tests/ui/hygiene/panic-location.run.stderr b/tests/ui/hygiene/panic-location.run.stderr
index 5ed0d9fcf1e..e0dc13c0c95 100644
--- a/tests/ui/hygiene/panic-location.run.stderr
+++ b/tests/ui/hygiene/panic-location.run.stderr
@@ -1,3 +1,3 @@
-thread 'main' panicked at library/alloc/src/raw_vec.rs:534:5:
+thread 'main' panicked at library/alloc/src/raw_vec.rs:545:5:
 capacity overflow
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr b/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr
index 40446a3d339..d5086c7bc51 100644
--- a/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr
+++ b/tests/ui/impl-trait/arg-position-impl-trait-too-long.stderr
@@ -7,7 +7,7 @@ LL | |         &mut Header,
 LL | |         &mut [EntryMetadata],
 LL | |         &mut [Entry<C::EncodedKey, C::EncodedValue>]
 LL | |     ) -> R,
-   | |__________- this type parameter
+   | |__________- expected this type parameter
 LL |   ) {
 LL |       let () = y;
    |           ^^   - this expression has type `impl FnOnce(&mut Header, &mut [EntryMetadata], &mut [Entry<C::EncodedKey, C::EncodedValue>]) -> R`
diff --git a/tests/ui/impl-trait/async_scope_creep.rs b/tests/ui/impl-trait/async_scope_creep.rs
index 9a8831a299e..60975439a33 100644
--- a/tests/ui/impl-trait/async_scope_creep.rs
+++ b/tests/ui/impl-trait/async_scope_creep.rs
@@ -1,6 +1,6 @@
 #![feature(type_alias_impl_trait)]
 // edition:2021
-//[rpit] check-pass
+// check-pass
 // revisions: tait rpit
 
 struct Pending {}
@@ -23,7 +23,7 @@ impl Pending {
 
     #[cfg(tait)]
     fn read_fut(&mut self) -> OpeningReadFuture<'_> {
-        self.read() //[tait]~ ERROR: cannot satisfy `impl AsyncRead + 'a == PendingReader<'a>`
+        self.read()
     }
 
     #[cfg(rpit)]
diff --git a/tests/ui/impl-trait/async_scope_creep.tait.stderr b/tests/ui/impl-trait/async_scope_creep.tait.stderr
deleted file mode 100644
index 165096a0574..00000000000
--- a/tests/ui/impl-trait/async_scope_creep.tait.stderr
+++ /dev/null
@@ -1,9 +0,0 @@
-error[E0284]: type annotations needed: cannot satisfy `impl AsyncRead + 'a == PendingReader<'a>`
-  --> $DIR/async_scope_creep.rs:26:9
-   |
-LL |         self.read()
-   |         ^^^^^^^^^^^ cannot satisfy `impl AsyncRead + 'a == PendingReader<'a>`
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/impl-trait/auto-trait-leak.rs b/tests/ui/impl-trait/auto-trait-leak.rs
index 1f90292f457..de4f523c23a 100644
--- a/tests/ui/impl-trait/auto-trait-leak.rs
+++ b/tests/ui/impl-trait/auto-trait-leak.rs
@@ -9,8 +9,6 @@ fn main() {}
 // independently resolved and only require the concrete
 // return type, which can't depend on the obligation.
 fn cycle1() -> impl Clone {
-    //~^ ERROR cycle detected
-    //~| ERROR cycle detected
     send(cycle2().clone());
 
     Rc::new(Cell::new(5))
diff --git a/tests/ui/impl-trait/auto-trait-leak.stderr b/tests/ui/impl-trait/auto-trait-leak.stderr
index 62341f6de0c..28643ec03e1 100644
--- a/tests/ui/impl-trait/auto-trait-leak.stderr
+++ b/tests/ui/impl-trait/auto-trait-leak.stderr
@@ -1,66 +1,5 @@
-error[E0391]: cycle detected when computing type of opaque `cycle1::{opaque#0}`
-  --> $DIR/auto-trait-leak.rs:11:16
-   |
-LL | fn cycle1() -> impl Clone {
-   |                ^^^^^^^^^^
-   |
-note: ...which requires type-checking `cycle1`...
-  --> $DIR/auto-trait-leak.rs:14:5
-   |
-LL |     send(cycle2().clone());
-   |     ^^^^
-   = note: ...which requires evaluating trait selection obligation `cycle2::{opaque#0}: core::marker::Send`...
-note: ...which requires computing type of opaque `cycle2::{opaque#0}`...
-  --> $DIR/auto-trait-leak.rs:19:16
-   |
-LL | fn cycle2() -> impl Clone {
-   |                ^^^^^^^^^^
-note: ...which requires type-checking `cycle2`...
-  --> $DIR/auto-trait-leak.rs:20:5
-   |
-LL |     send(cycle1().clone());
-   |     ^^^^
-   = note: ...which requires evaluating trait selection obligation `cycle1::{opaque#0}: core::marker::Send`...
-   = note: ...which again requires computing type of opaque `cycle1::{opaque#0}`, completing the cycle
-note: cycle used when computing type of `cycle1::{opaque#0}`
-  --> $DIR/auto-trait-leak.rs:11:16
-   |
-LL | fn cycle1() -> impl Clone {
-   |                ^^^^^^^^^^
-   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-
-error[E0391]: cycle detected when computing type of opaque `cycle1::{opaque#0}`
-  --> $DIR/auto-trait-leak.rs:11:16
-   |
-LL | fn cycle1() -> impl Clone {
-   |                ^^^^^^^^^^
-   |
-note: ...which requires type-checking `cycle1`...
-  --> $DIR/auto-trait-leak.rs:14:5
-   |
-LL |     send(cycle2().clone());
-   |     ^^^^
-   = note: ...which requires evaluating trait selection obligation `cycle2::{opaque#0}: core::marker::Send`...
-note: ...which requires computing type of opaque `cycle2::{opaque#0}`...
-  --> $DIR/auto-trait-leak.rs:19:16
-   |
-LL | fn cycle2() -> impl Clone {
-   |                ^^^^^^^^^^
-note: ...which requires type-checking `cycle2`...
-  --> $DIR/auto-trait-leak.rs:19:1
-   |
-LL | fn cycle2() -> impl Clone {
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: ...which again requires computing type of opaque `cycle1::{opaque#0}`, completing the cycle
-note: cycle used when computing type of `cycle1::{opaque#0}`
-  --> $DIR/auto-trait-leak.rs:11:16
-   |
-LL | fn cycle1() -> impl Clone {
-   |                ^^^^^^^^^^
-   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-
 error: cannot check whether the hidden type of opaque type satisfies auto traits
-  --> $DIR/auto-trait-leak.rs:20:10
+  --> $DIR/auto-trait-leak.rs:18:10
    |
 LL |     send(cycle1().clone());
    |     ---- ^^^^^^^^^^^^^^^^
@@ -73,7 +12,7 @@ note: opaque type is declared here
 LL | fn cycle1() -> impl Clone {
    |                ^^^^^^^^^^
 note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
-  --> $DIR/auto-trait-leak.rs:19:4
+  --> $DIR/auto-trait-leak.rs:17:4
    |
 LL | fn cycle2() -> impl Clone {
    |    ^^^^^^
@@ -83,6 +22,5 @@ note: required by a bound in `send`
 LL | fn send<T: Send>(_: T) {}
    |            ^^^^ required by this bound in `send`
 
-error: aborting due to 3 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/impl-trait/bivariant-lifetime-liveness.rs b/tests/ui/impl-trait/bivariant-lifetime-liveness.rs
new file mode 100644
index 00000000000..fe99fe3f340
--- /dev/null
+++ b/tests/ui/impl-trait/bivariant-lifetime-liveness.rs
@@ -0,0 +1,15 @@
+// check-pass
+// issue: 116794
+
+// Uncaptured lifetimes should not be required to be live.
+
+struct Invariant<T>(*mut T);
+
+fn opaque<'a: 'a>(_: &'a str) -> Invariant<impl Sized> {
+    Invariant(&mut ())
+}
+
+fn main() {
+    let x = opaque(&String::new());
+    drop(x);
+}
diff --git a/tests/ui/impl-trait/bounds_regression.rs b/tests/ui/impl-trait/bounds_regression.rs
index 31fc46203d3..f32d83c0c40 100644
--- a/tests/ui/impl-trait/bounds_regression.rs
+++ b/tests/ui/impl-trait/bounds_regression.rs
@@ -1,6 +1,6 @@
 // run-pass
 
-pub trait FakeGenerator {
+pub trait FakeCoroutine {
     type Yield;
     type Return;
 }
@@ -9,15 +9,15 @@ pub trait FakeFuture {
     type Output;
 }
 
-pub fn future_from_generator<
-    T: FakeGenerator<Yield = ()>
+pub fn future_from_coroutine<
+    T: FakeCoroutine<Yield = ()>
 >(x: T) -> impl FakeFuture<Output = T::Return> {
     GenFuture(x)
 }
 
-struct GenFuture<T: FakeGenerator<Yield = ()>>(#[allow(unused_tuple_struct_fields)] T);
+struct GenFuture<T: FakeCoroutine<Yield = ()>>(#[allow(unused_tuple_struct_fields)] T);
 
-impl<T: FakeGenerator<Yield = ()>> FakeFuture for GenFuture<T> {
+impl<T: FakeCoroutine<Yield = ()>> FakeFuture for GenFuture<T> {
     type Output = T::Return;
 }
 
diff --git a/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr b/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr
new file mode 100644
index 00000000000..83791f0d3af
--- /dev/null
+++ b/tests/ui/impl-trait/equality-in-canonical-query.clone.stderr
@@ -0,0 +1,29 @@
+error: internal compiler error: no errors encountered even though `delay_span_bug` issued
+
+error: internal compiler error: {OpaqueTypeKey { def_id: DefId(rpit::{opaque#0}), args: [] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: no-location (#0), ty: Alias(Opaque, AliasTy { args: [], def_id: DefId(foo::{opaque#0}) }) } }}
+   |
+   = 
+           
+
+error: internal compiler error: error performing ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: ProvePredicate { predicate: Binder { value: ProjectionPredicate(AliasTy { args: [FnDef(DefId(rpit), []), ()], def_id: DefId(ops::function::FnOnce::Output) }, Term::Ty(Alias(Opaque, AliasTy { args: [], def_id: DefId(foo::{opaque#0}) }))), bound_vars: [] } } }
+  --> $DIR/equality-in-canonical-query.rs:19:5
+   |
+LL |     same_output(foo, rpit);
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+   |
+
+  --> $DIR/equality-in-canonical-query.rs:19:5
+   |
+LL |     same_output(foo, rpit);
+   |     ^^^^^^^^^^^^^^^^^^^^^^
+
+
+
+
+
+
+
+query stack during panic:
+end of query stack
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/impl-trait/equality-in-canonical-query.rs b/tests/ui/impl-trait/equality-in-canonical-query.rs
new file mode 100644
index 00000000000..672b1eeeab6
--- /dev/null
+++ b/tests/ui/impl-trait/equality-in-canonical-query.rs
@@ -0,0 +1,23 @@
+// issue: #116877
+// revisions: sized clone
+//[sized] check-pass
+
+//[clone] known-bug: #108498
+//[clone] failure-status: 101
+//[clone] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId("
+//[clone] normalize-stderr-test: "(?m)note: .*$" -> ""
+//[clone] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> ""
+//[clone] normalize-stderr-test: "(?m)^ *at .*\n" -> ""
+
+#[cfg(sized)] fn rpit() -> impl Sized {}
+#[cfg(clone)] fn rpit() -> impl Clone {}
+
+fn same_output<Out>(_: impl Fn() -> Out, _: impl Fn() -> Out) {}
+
+pub fn foo() -> impl Sized {
+    same_output(rpit, foo);
+    same_output(foo, rpit);
+    rpit()
+}
+
+fn main () {}
diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr b/tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr
new file mode 100644
index 00000000000..84b61dc5044
--- /dev/null
+++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.current.stderr
@@ -0,0 +1,14 @@
+error: {foo<ReEarlyBound(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
+  --> $DIR/erased-regions-in-hidden-ty.rs:11:36
+   |
+LL | fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Fn() + 'static {
+   |                                    ^^^^^^^^^^^^^^^^^^^
+
+error: Opaque(DefId(..), [ReErased])
+  --> $DIR/erased-regions-in-hidden-ty.rs:17:13
+   |
+LL | fn bar() -> impl Fn() + 'static {
+   |             ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr b/tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr
new file mode 100644
index 00000000000..84b61dc5044
--- /dev/null
+++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.next.stderr
@@ -0,0 +1,14 @@
+error: {foo<ReEarlyBound(DefId(..), 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
+  --> $DIR/erased-regions-in-hidden-ty.rs:11:36
+   |
+LL | fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Fn() + 'static {
+   |                                    ^^^^^^^^^^^^^^^^^^^
+
+error: Opaque(DefId(..), [ReErased])
+  --> $DIR/erased-regions-in-hidden-ty.rs:17:13
+   |
+LL | fn bar() -> impl Fn() + 'static {
+   |             ^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs
new file mode 100644
index 00000000000..698123a932d
--- /dev/null
+++ b/tests/ui/impl-trait/erased-regions-in-hidden-ty.rs
@@ -0,0 +1,23 @@
+// revisions: current next
+// compile-flags: -Zverbose
+//[next] compile-flags: -Ztrait-solver=next
+// normalize-stderr-test "DefId\([^\)]+\)" -> "DefId(..)"
+
+#![feature(rustc_attrs)]
+#![rustc_hidden_type_of_opaques]
+
+// Make sure that the compiler can handle `ReErased` in the hidden type of an opaque.
+
+fn foo<'a: 'a>(x: &'a Vec<i32>) -> impl Fn() + 'static {
+//~^ ERROR 0, 'a)>::{closure#0} closure_kind_ty=i8 closure_sig_as_fn_ptr_ty=extern "rust-call" fn(()) upvar_tys=()}
+// Can't write whole type because of lack of path sanitization
+    || ()
+}
+
+fn bar() -> impl Fn() + 'static {
+//~^ ERROR , [ReErased])
+// Can't write whole type because of lack of path sanitization
+    foo(&vec![])
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs b/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs
new file mode 100644
index 00000000000..af6ffe83394
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/async-and-ret-ref.rs
@@ -0,0 +1,11 @@
+// edition:2021
+// https://github.com/rust-lang/rust/issues/117547
+
+trait T {}
+
+trait MyTrait {
+    async fn foo() -> &'static impl T;
+    //~^ ERROR the associated type `<Self as MyTrait>::{opaque#0}` may not live long enough
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr b/tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr
new file mode 100644
index 00000000000..7c9028a8cd5
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/async-and-ret-ref.stderr
@@ -0,0 +1,14 @@
+error[E0310]: the associated type `<Self as MyTrait>::{opaque#0}` may not live long enough
+  --> $DIR/async-and-ret-ref.rs:7:5
+   |
+LL |     async fn foo() -> &'static impl T;
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     |
+   |     the associated type `<Self as MyTrait>::{opaque#0}` must be valid for the static lifetime...
+   |     ...so that the reference type `&'static impl T` does not outlive the data it points at
+   |
+   = help: consider adding an explicit lifetime bound `<Self as MyTrait>::{opaque#0}: 'static`...
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0310`.
diff --git a/tests/ui/impl-trait/in-trait/deep-match.rs b/tests/ui/impl-trait/in-trait/deep-match.rs
index 02889347ba4..82eac7760fc 100644
--- a/tests/ui/impl-trait/in-trait/deep-match.rs
+++ b/tests/ui/impl-trait/in-trait/deep-match.rs
@@ -1,5 +1,3 @@
-#![allow(incomplete_features)]
-
 struct Wrapper<T>(T);
 
 trait Foo {
diff --git a/tests/ui/impl-trait/in-trait/deep-match.stderr b/tests/ui/impl-trait/in-trait/deep-match.stderr
index 9cfc54f5094..a658d8fa078 100644
--- a/tests/ui/impl-trait/in-trait/deep-match.stderr
+++ b/tests/ui/impl-trait/in-trait/deep-match.stderr
@@ -1,5 +1,5 @@
 error[E0053]: method `bar` has an incompatible return type for trait
-  --> $DIR/deep-match.rs:10:17
+  --> $DIR/deep-match.rs:8:17
    |
 LL |     fn bar() -> i32 {
    |                 ^^^
diff --git a/tests/ui/impl-trait/in-trait/default-body-type-err.rs b/tests/ui/impl-trait/in-trait/default-body-type-err.rs
index 977ff8111dd..ac7a50a365e 100644
--- a/tests/ui/impl-trait/in-trait/default-body-type-err.rs
+++ b/tests/ui/impl-trait/in-trait/default-body-type-err.rs
@@ -1,5 +1,3 @@
-#![allow(incomplete_features)]
-
 use std::ops::Deref;
 
 pub trait Foo {
diff --git a/tests/ui/impl-trait/in-trait/default-body-type-err.stderr b/tests/ui/impl-trait/in-trait/default-body-type-err.stderr
index 3d9ca62b0db..596ff101155 100644
--- a/tests/ui/impl-trait/in-trait/default-body-type-err.stderr
+++ b/tests/ui/impl-trait/in-trait/default-body-type-err.stderr
@@ -1,5 +1,5 @@
 error[E0271]: type mismatch resolving `<&i32 as Deref>::Target == String`
-  --> $DIR/default-body-type-err.rs:6:22
+  --> $DIR/default-body-type-err.rs:4:22
    |
 LL |     fn lol(&self) -> impl Deref<Target = String> {
    |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found `String`
diff --git a/tests/ui/impl-trait/in-trait/doesnt-satisfy.rs b/tests/ui/impl-trait/in-trait/doesnt-satisfy.rs
index 5a53c9a19b5..0ac60918b67 100644
--- a/tests/ui/impl-trait/in-trait/doesnt-satisfy.rs
+++ b/tests/ui/impl-trait/in-trait/doesnt-satisfy.rs
@@ -1,5 +1,3 @@
-#![allow(incomplete_features)]
-
 trait Foo {
     fn bar() -> impl std::fmt::Display;
 }
diff --git a/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr b/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr
index cb9ecc7fa48..cd45c6a9c6d 100644
--- a/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr
+++ b/tests/ui/impl-trait/in-trait/doesnt-satisfy.stderr
@@ -1,5 +1,5 @@
 error[E0277]: `()` doesn't implement `std::fmt::Display`
-  --> $DIR/doesnt-satisfy.rs:8:17
+  --> $DIR/doesnt-satisfy.rs:6:17
    |
 LL |     fn bar() -> () {}
    |                 ^^ `()` cannot be formatted with the default formatter
@@ -7,7 +7,7 @@ LL |     fn bar() -> () {}
    = help: the trait `std::fmt::Display` is not implemented for `()`
    = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
 note: required by a bound in `Foo::{opaque#0}`
-  --> $DIR/doesnt-satisfy.rs:4:22
+  --> $DIR/doesnt-satisfy.rs:2:22
    |
 LL |     fn bar() -> impl std::fmt::Display;
    |                      ^^^^^^^^^^^^^^^^^ required by this bound in `Foo::{opaque#0}`
diff --git a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr
index bfb2be8cbc1..f29ec95d594 100644
--- a/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr
+++ b/tests/ui/impl-trait/in-trait/foreign-dyn-error.stderr
@@ -9,6 +9,7 @@ note: for a trait to be "object safe" it needs to allow building a vtable to all
    |
 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
+   = help: only type `rpitit::Foreign` implements the trait, consider using it directly instead
 
 error: aborting due to previous error
 
diff --git a/tests/ui/impl-trait/in-trait/gat-outlives.rs b/tests/ui/impl-trait/in-trait/gat-outlives.rs
new file mode 100644
index 00000000000..83dd6cfce53
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/gat-outlives.rs
@@ -0,0 +1,17 @@
+// edition: 2021
+
+use std::future::Future;
+
+trait Trait {
+    type Gat<'a>;
+    //~^ ERROR missing required bound on `Gat`
+    async fn foo(&self) -> Self::Gat<'_>;
+}
+
+trait Trait2 {
+    type Gat<'a>;
+    //~^ ERROR missing required bound on `Gat`
+    async fn foo(&self) -> impl Future<Output = Self::Gat<'_>>;
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/in-trait/gat-outlives.stderr b/tests/ui/impl-trait/in-trait/gat-outlives.stderr
new file mode 100644
index 00000000000..8ec4b0ab2ee
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/gat-outlives.stderr
@@ -0,0 +1,24 @@
+error: missing required bound on `Gat`
+  --> $DIR/gat-outlives.rs:6:5
+   |
+LL |     type Gat<'a>;
+   |     ^^^^^^^^^^^^-
+   |                 |
+   |                 help: add the required where clause: `where Self: 'a`
+   |
+   = note: this bound is currently required to ensure that impls have maximum flexibility
+   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
+
+error: missing required bound on `Gat`
+  --> $DIR/gat-outlives.rs:12:5
+   |
+LL |     type Gat<'a>;
+   |     ^^^^^^^^^^^^-
+   |                 |
+   |                 help: add the required where clause: `where Self: 'a`
+   |
+   = note: this bound is currently required to ensure that impls have maximum flexibility
+   = note: we are soliciting feedback, see issue #87479 <https://github.com/rust-lang/rust/issues/87479> for more information
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/impl-trait/in-trait/generics-mismatch.rs b/tests/ui/impl-trait/in-trait/generics-mismatch.rs
index 2e5373dbd5d..3ea31cc9347 100644
--- a/tests/ui/impl-trait/in-trait/generics-mismatch.rs
+++ b/tests/ui/impl-trait/in-trait/generics-mismatch.rs
@@ -1,5 +1,3 @@
-#![allow(incomplete_features)]
-
 struct U;
 
 trait Foo {
diff --git a/tests/ui/impl-trait/in-trait/generics-mismatch.stderr b/tests/ui/impl-trait/in-trait/generics-mismatch.stderr
index 3dbf2235c5e..043dbc8db5d 100644
--- a/tests/ui/impl-trait/in-trait/generics-mismatch.stderr
+++ b/tests/ui/impl-trait/in-trait/generics-mismatch.stderr
@@ -1,5 +1,5 @@
 error[E0049]: method `bar` has 1 type parameter but its trait declaration has 0 type parameters
-  --> $DIR/generics-mismatch.rs:10:12
+  --> $DIR/generics-mismatch.rs:8:12
    |
 LL |     fn bar(&self) -> impl Sized;
    |           - expected 0 type parameters
diff --git a/tests/ui/impl-trait/in-trait/issue-102140.rs b/tests/ui/impl-trait/in-trait/issue-102140.rs
index 1132bd25f81..7960018482f 100644
--- a/tests/ui/impl-trait/in-trait/issue-102140.rs
+++ b/tests/ui/impl-trait/in-trait/issue-102140.rs
@@ -1,5 +1,3 @@
-#![allow(incomplete_features)]
-
 trait Marker {}
 impl Marker for u32 {}
 
diff --git a/tests/ui/impl-trait/in-trait/issue-102140.stderr b/tests/ui/impl-trait/in-trait/issue-102140.stderr
index 6d50d2f3a24..9cd2cdfd1a5 100644
--- a/tests/ui/impl-trait/in-trait/issue-102140.stderr
+++ b/tests/ui/impl-trait/in-trait/issue-102140.stderr
@@ -1,5 +1,5 @@
 error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
-  --> $DIR/issue-102140.rs:22:22
+  --> $DIR/issue-102140.rs:20:22
    |
 LL |         MyTrait::foo(&self)
    |         ------------ ^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
@@ -13,7 +13,7 @@ LL +         MyTrait::foo(self)
    |
 
 error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
-  --> $DIR/issue-102140.rs:22:9
+  --> $DIR/issue-102140.rs:20:9
    |
 LL |         MyTrait::foo(&self)
    |         ^^^^^^^^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
@@ -21,7 +21,7 @@ LL |         MyTrait::foo(&self)
    = help: the trait `MyTrait` is implemented for `Outer`
 
 error[E0277]: the trait bound `&dyn MyTrait: MyTrait` is not satisfied
-  --> $DIR/issue-102140.rs:22:9
+  --> $DIR/issue-102140.rs:20:9
    |
 LL |         MyTrait::foo(&self)
    |         ^^^^^^^^^^^^ the trait `MyTrait` is not implemented for `&dyn MyTrait`
diff --git a/tests/ui/impl-trait/in-trait/issue-102571.rs b/tests/ui/impl-trait/in-trait/issue-102571.rs
index 4534753f0d2..4fa3fdd31b5 100644
--- a/tests/ui/impl-trait/in-trait/issue-102571.rs
+++ b/tests/ui/impl-trait/in-trait/issue-102571.rs
@@ -1,5 +1,3 @@
-#![allow(incomplete_features)]
-
 use std::fmt::Display;
 use std::ops::Deref;
 
diff --git a/tests/ui/impl-trait/in-trait/issue-102571.stderr b/tests/ui/impl-trait/in-trait/issue-102571.stderr
index 4d1a0feb22b..872988faf7a 100644
--- a/tests/ui/impl-trait/in-trait/issue-102571.stderr
+++ b/tests/ui/impl-trait/in-trait/issue-102571.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/issue-102571.rs:11:9
+  --> $DIR/issue-102571.rs:9:9
    |
 LL |     let () = t.bar();
    |         ^^   ------- this expression has type `impl Deref<Target = impl std::fmt::Display + ?Sized>`
diff --git a/tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr b/tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr
index 59139e4d5ae..874a1b95a43 100644
--- a/tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr
+++ b/tests/ui/impl-trait/in-trait/method-signature-matches.lt.stderr
@@ -6,7 +6,7 @@ LL |     fn early<'late, T>(_: &'late ()) {}
    |                     |     |
    |                     |     expected type parameter `T`, found `()`
    |                     |     help: change the parameter type to match the trait: `&T`
-   |                     this type parameter
+   |                     expected this type parameter
    |
 note: type in trait
   --> $DIR/method-signature-matches.rs:52:28
diff --git a/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs b/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs
new file mode 100644
index 00000000000..b97fd7d1ffe
--- /dev/null
+++ b/tests/ui/impl-trait/in-trait/nested-rpitit-bounds.rs
@@ -0,0 +1,11 @@
+// check-pass
+
+use std::ops::Deref;
+
+trait Foo {
+    fn foo() -> impl Deref<Target = impl Deref<Target = impl Sized>> {
+        &&()
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/impl-trait/in-trait/object-safety.rs b/tests/ui/impl-trait/in-trait/object-safety.rs
index 15634537dae..5cca4ad839c 100644
--- a/tests/ui/impl-trait/in-trait/object-safety.rs
+++ b/tests/ui/impl-trait/in-trait/object-safety.rs
@@ -1,5 +1,3 @@
-#![allow(incomplete_features)]
-
 use std::fmt::Debug;
 
 trait Foo {
diff --git a/tests/ui/impl-trait/in-trait/object-safety.stderr b/tests/ui/impl-trait/in-trait/object-safety.stderr
index 8d882391251..a7be0516cd3 100644
--- a/tests/ui/impl-trait/in-trait/object-safety.stderr
+++ b/tests/ui/impl-trait/in-trait/object-safety.stderr
@@ -1,62 +1,66 @@
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:16:33
+  --> $DIR/object-safety.rs:14:33
    |
 LL |     let i = Box::new(42_u32) as Box<dyn Foo>;
    |                                 ^^^^^^^^^^^^ `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:6:22
+  --> $DIR/object-safety.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
 LL |     fn baz(&self) -> impl Debug;
    |                      ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
    = help: consider moving `baz` to another trait
+   = help: only type `u32` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:19:15
+  --> $DIR/object-safety.rs:17:15
    |
 LL |     let s = i.baz();
    |               ^^^ `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:6:22
+  --> $DIR/object-safety.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
 LL |     fn baz(&self) -> impl Debug;
    |                      ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
    = help: consider moving `baz` to another trait
+   = help: only type `u32` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:19:13
+  --> $DIR/object-safety.rs:17:13
    |
 LL |     let s = i.baz();
    |             ^^^^^^^ `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:6:22
+  --> $DIR/object-safety.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
 LL |     fn baz(&self) -> impl Debug;
    |                      ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
    = help: consider moving `baz` to another trait
+   = help: only type `u32` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
-  --> $DIR/object-safety.rs:16:13
+  --> $DIR/object-safety.rs:14:13
    |
 LL |     let i = Box::new(42_u32) as Box<dyn Foo>;
    |             ^^^^^^^^^^^^^^^^ `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:6:22
+  --> $DIR/object-safety.rs:4:22
    |
 LL | trait Foo {
    |       --- this trait cannot be made into an object...
 LL |     fn baz(&self) -> impl Debug;
    |                      ^^^^^^^^^^ ...because method `baz` references an `impl Trait` type in its return type
    = help: consider moving `baz` to another trait
+   = help: only type `u32` implements the trait, consider using it directly instead
    = note: required for the cast from `Box<u32>` to `Box<dyn Foo>`
 
 error: aborting due to 4 previous errors
diff --git a/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.rs b/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.rs
index fc708536b0f..1f18bb3b774 100644
--- a/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.rs
+++ b/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.rs
@@ -1,5 +1,3 @@
-#![allow(incomplete_features)]
-
 use std::fmt::Display;
 
 trait Foo {
diff --git a/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr b/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr
index 99b62e80acd..e260762d89f 100644
--- a/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr
+++ b/tests/ui/impl-trait/in-trait/opaque-in-impl-is-opaque.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/opaque-in-impl-is-opaque.rs:16:19
+  --> $DIR/opaque-in-impl-is-opaque.rs:14:19
    |
 LL |     fn bar(&self) -> impl Display {
    |                      ------------ the found opaque type
diff --git a/tests/ui/impl-trait/in-trait/specialization-broken.stderr b/tests/ui/impl-trait/in-trait/specialization-broken.stderr
index 1d169b5d690..25c0adeddbd 100644
--- a/tests/ui/impl-trait/in-trait/specialization-broken.stderr
+++ b/tests/ui/impl-trait/in-trait/specialization-broken.stderr
@@ -2,7 +2,7 @@ error[E0053]: method `bar` has an incompatible type for trait
   --> $DIR/specialization-broken.rs:15:22
    |
 LL | default impl<U> Foo for U
-   |              - this type parameter
+   |              - found this type parameter
 ...
 LL |     fn bar(&self) -> U {
    |                      ^
diff --git a/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.rs b/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.rs
index c905bfce852..d9fac0238e1 100644
--- a/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.rs
+++ b/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.rs
@@ -1,5 +1,3 @@
-#![allow(incomplete_features)]
-
 struct S;
 
 trait Foo {
diff --git a/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr b/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr
index e904548742d..2836e9c7821 100644
--- a/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr
+++ b/tests/ui/impl-trait/in-trait/trait-more-generics-than-impl.stderr
@@ -1,5 +1,5 @@
 error[E0049]: method `bar` has 0 type parameters but its trait declaration has 1 type parameter
-  --> $DIR/trait-more-generics-than-impl.rs:10:11
+  --> $DIR/trait-more-generics-than-impl.rs:8:11
    |
 LL |     fn bar<T>() -> impl Sized;
    |            - expected 1 type parameter
diff --git a/tests/ui/impl-trait/issues/issue-58504.rs b/tests/ui/impl-trait/issues/issue-58504.rs
index f1d7b94ef2d..03b51ae92d1 100644
--- a/tests/ui/impl-trait/issues/issue-58504.rs
+++ b/tests/ui/impl-trait/issues/issue-58504.rs
@@ -1,12 +1,12 @@
-#![feature(generators, generator_trait, never_type)]
+#![feature(coroutines, coroutine_trait, never_type)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
-fn mk_gen() -> impl Generator<Return=!, Yield=()> {
+fn mk_gen() -> impl Coroutine<Return=!, Yield=()> {
     || { loop { yield; } }
 }
 
 fn main() {
-    let gens: [impl Generator<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ];
+    let gens: [impl Coroutine<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ];
     //~^ `impl Trait` only allowed in function and inherent method argument and return types
 }
diff --git a/tests/ui/impl-trait/issues/issue-58504.stderr b/tests/ui/impl-trait/issues/issue-58504.stderr
index 1be676ee075..49376f559cf 100644
--- a/tests/ui/impl-trait/issues/issue-58504.stderr
+++ b/tests/ui/impl-trait/issues/issue-58504.stderr
@@ -1,7 +1,7 @@
 error[E0562]: `impl Trait` only allowed in function and inherent method argument and return types, not in variable bindings
   --> $DIR/issue-58504.rs:10:16
    |
-LL |     let gens: [impl Generator<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ];
+LL |     let gens: [impl Coroutine<Return=!, Yield=()>;2] = [ mk_gen(), mk_gen() ];
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error
diff --git a/tests/ui/impl-trait/lifetimes.rs b/tests/ui/impl-trait/lifetimes.rs
index 9a9843375e4..f853117a9c6 100644
--- a/tests/ui/impl-trait/lifetimes.rs
+++ b/tests/ui/impl-trait/lifetimes.rs
@@ -1,7 +1,7 @@
 // run-pass
 
 #![allow(warnings)]
-#![feature(generators)]
+#![feature(coroutines)]
 
 use std::fmt::Debug;
 
@@ -114,7 +114,7 @@ impl<'unnecessary_lifetime> MyVec {
         self.0.iter().flat_map(|inner_vec| inner_vec.iter())
     }
 
-    fn generator_doesnt_capture_unnecessary_lifetime<'s: 's>() -> impl Sized {
+    fn coroutine_doesnt_capture_unnecessary_lifetime<'s: 's>() -> impl Sized {
         || yield
     }
 }
diff --git a/tests/ui/impl-trait/negative-reasoning.stderr b/tests/ui/impl-trait/negative-reasoning.stderr
index 6b8cc9e7374..ddce5e7ece2 100644
--- a/tests/ui/impl-trait/negative-reasoning.stderr
+++ b/tests/ui/impl-trait/negative-reasoning.stderr
@@ -7,7 +7,7 @@ LL | impl<T: std::fmt::Debug> AnotherTrait for T {}
 LL | impl AnotherTrait for D<OpaqueType> {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `D<OpaqueType>`
    |
-   = note: upstream crates may add a new impl of trait `std::fmt::Debug` for type `OpaqueType` in future versions
+   = note: upstream crates may add a new impl of trait `std::marker::FnPtr` for type `OpaqueType` in future versions
 
 error: aborting due to previous error
 
diff --git a/tests/ui/impl-trait/nested-return-type2-tait2.rs b/tests/ui/impl-trait/nested-return-type2-tait2.rs
index af8e0663054..b7fee1d91d1 100644
--- a/tests/ui/impl-trait/nested-return-type2-tait2.rs
+++ b/tests/ui/impl-trait/nested-return-type2-tait2.rs
@@ -1,3 +1,5 @@
+// check-pass
+
 #![feature(type_alias_impl_trait)]
 
 trait Duh {}
@@ -17,6 +19,7 @@ impl<R: Duh, F: FnMut() -> R> Trait for F {
 
 type Sendable = impl Send;
 type Traitable = impl Trait<Assoc = Sendable>;
+//~^ WARN opaque type `Traitable` does not satisfy its associated type bounds
 
 // The `impl Send` here is then later compared against the inference var
 // created, causing the inference var to be set to `impl Send` instead of
@@ -25,7 +28,6 @@ type Traitable = impl Trait<Assoc = Sendable>;
 // type does not implement `Duh`, even if its hidden type does. So we error out.
 fn foo() -> Traitable {
     || 42
-    //~^ ERROR `Sendable: Duh` is not satisfied
 }
 
 fn main() {
diff --git a/tests/ui/impl-trait/nested-return-type2-tait2.stderr b/tests/ui/impl-trait/nested-return-type2-tait2.stderr
index 125262b96e8..790e339c8b1 100644
--- a/tests/ui/impl-trait/nested-return-type2-tait2.stderr
+++ b/tests/ui/impl-trait/nested-return-type2-tait2.stderr
@@ -1,18 +1,13 @@
-error[E0277]: the trait bound `Sendable: Duh` is not satisfied
-  --> $DIR/nested-return-type2-tait2.rs:27:5
+warning: opaque type `Traitable` does not satisfy its associated type bounds
+  --> $DIR/nested-return-type2-tait2.rs:21:29
    |
-LL |     || 42
-   |     ^^^^^ the trait `Duh` is not implemented for `Sendable`
+LL |     type Assoc: Duh;
+   |                 --- this associated type bound is unsatisfied for `Sendable`
+...
+LL | type Traitable = impl Trait<Assoc = Sendable>;
+   |                             ^^^^^^^^^^^^^^^^
    |
-   = help: the trait `Duh` is implemented for `i32`
-note: required for `{closure@$DIR/nested-return-type2-tait2.rs:27:5: 27:7}` to implement `Trait`
-  --> $DIR/nested-return-type2-tait2.rs:14:31
-   |
-LL | impl<R: Duh, F: FnMut() -> R> Trait for F {
-   |         ---                   ^^^^^     ^
-   |         |
-   |         unsatisfied trait bound introduced here
+   = note: `#[warn(opaque_hidden_inferred_bound)]` on by default
 
-error: aborting due to previous error
+warning: 1 warning emitted
 
-For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/nested-return-type2-tait3.rs b/tests/ui/impl-trait/nested-return-type2-tait3.rs
index 74fd8a9dda0..eed5c271f88 100644
--- a/tests/ui/impl-trait/nested-return-type2-tait3.rs
+++ b/tests/ui/impl-trait/nested-return-type2-tait3.rs
@@ -1,3 +1,5 @@
+// check-pass
+
 #![feature(type_alias_impl_trait)]
 
 trait Duh {}
@@ -16,6 +18,7 @@ impl<R: Duh, F: FnMut() -> R> Trait for F {
 }
 
 type Traitable = impl Trait<Assoc = impl Send>;
+//~^ WARN opaque type `Traitable` does not satisfy its associated type bounds
 
 // The `impl Send` here is then later compared against the inference var
 // created, causing the inference var to be set to `impl Send` instead of
@@ -24,7 +27,6 @@ type Traitable = impl Trait<Assoc = impl Send>;
 // type does not implement `Duh`, even if its hidden type does. So we error out.
 fn foo() -> Traitable {
     || 42
-    //~^ ERROR `impl Send: Duh` is not satisfied
 }
 
 fn main() {
diff --git a/tests/ui/impl-trait/nested-return-type2-tait3.stderr b/tests/ui/impl-trait/nested-return-type2-tait3.stderr
index c2332b6e4bd..72aa51a23f4 100644
--- a/tests/ui/impl-trait/nested-return-type2-tait3.stderr
+++ b/tests/ui/impl-trait/nested-return-type2-tait3.stderr
@@ -1,18 +1,17 @@
-error[E0277]: the trait bound `impl Send: Duh` is not satisfied
-  --> $DIR/nested-return-type2-tait3.rs:26:5
+warning: opaque type `Traitable` does not satisfy its associated type bounds
+  --> $DIR/nested-return-type2-tait3.rs:20:29
    |
-LL |     || 42
-   |     ^^^^^ the trait `Duh` is not implemented for `impl Send`
+LL |     type Assoc: Duh;
+   |                 --- this associated type bound is unsatisfied for `impl Send`
+...
+LL | type Traitable = impl Trait<Assoc = impl Send>;
+   |                             ^^^^^^^^^^^^^^^^^
    |
-   = help: the trait `Duh` is implemented for `i32`
-note: required for `{closure@$DIR/nested-return-type2-tait3.rs:26:5: 26:7}` to implement `Trait`
-  --> $DIR/nested-return-type2-tait3.rs:14:31
+   = note: `#[warn(opaque_hidden_inferred_bound)]` on by default
+help: add this bound
    |
-LL | impl<R: Duh, F: FnMut() -> R> Trait for F {
-   |         ---                   ^^^^^     ^
-   |         |
-   |         unsatisfied trait bound introduced here
+LL | type Traitable = impl Trait<Assoc = impl Send + Duh>;
+   |                                               +++++
 
-error: aborting due to previous error
+warning: 1 warning emitted
 
-For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr b/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr
index 687dbe65e6c..37c96d9bc4e 100644
--- a/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr
+++ b/tests/ui/impl-trait/object-unsafe-trait-in-return-position-dyn-trait.stderr
@@ -11,6 +11,9 @@ LL | trait NotObjectSafe {
    |       ------------- this trait cannot be made into an object...
 LL |     fn foo() -> Self;
    |        ^^^ ...because associated function `foo` has no `self` parameter
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `NotObjectSafe` for this new enum and using it instead:
+             A
+             B
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) -> Self;
@@ -33,6 +36,9 @@ LL | trait NotObjectSafe {
    |       ------------- this trait cannot be made into an object...
 LL |     fn foo() -> Self;
    |        ^^^ ...because associated function `foo` has no `self` parameter
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `NotObjectSafe` for this new enum and using it instead:
+             A
+             B
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) -> Self;
diff --git a/tests/ui/impl-trait/recursive-generator.rs b/tests/ui/impl-trait/recursive-coroutine.rs
index 000af70c454..6351cef95a6 100644
--- a/tests/ui/impl-trait/recursive-generator.rs
+++ b/tests/ui/impl-trait/recursive-coroutine.rs
@@ -1,16 +1,16 @@
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 
-fn foo() -> impl Generator<Yield = (), Return = ()> {
+fn foo() -> impl Coroutine<Yield = (), Return = ()> {
     //~^ ERROR cannot resolve opaque type
     //~| NOTE recursive opaque type
     //~| NOTE in this expansion of desugaring of
     || {
         let mut gen = Box::pin(foo());
-        //~^ NOTE generator captures itself here
+        //~^ NOTE coroutine captures itself here
         let mut r = gen.as_mut().resume(());
-        while let GeneratorState::Yielded(v) = r {
+        while let CoroutineState::Yielded(v) = r {
             yield v;
             r = gen.as_mut().resume(());
         }
diff --git a/tests/ui/impl-trait/recursive-generator.stderr b/tests/ui/impl-trait/recursive-coroutine.stderr
index 86e193d9599..d36a58a8643 100644
--- a/tests/ui/impl-trait/recursive-generator.stderr
+++ b/tests/ui/impl-trait/recursive-coroutine.stderr
@@ -1,11 +1,11 @@
 error[E0720]: cannot resolve opaque type
-  --> $DIR/recursive-generator.rs:5:13
+  --> $DIR/recursive-coroutine.rs:5:13
    |
-LL | fn foo() -> impl Generator<Yield = (), Return = ()> {
+LL | fn foo() -> impl Coroutine<Yield = (), Return = ()> {
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ recursive opaque type
 ...
 LL |         let mut gen = Box::pin(foo());
-   |             ------- generator captures itself here
+   |             ------- coroutine captures itself here
 
 error: aborting due to previous error
 
diff --git a/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs b/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs
index ffc0cd9d10c..8331eec906e 100644
--- a/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs
+++ b/tests/ui/impl-trait/recursive-impl-trait-type-indirect.rs
@@ -1,7 +1,7 @@
 // Test that impl trait does not allow creating recursive types that are
 // otherwise forbidden.
 
-#![feature(generators)]
+#![feature(coroutines)]
 #![allow(unconditional_recursion)]
 
 fn option(i: i32) -> impl Sized {
@@ -50,14 +50,14 @@ fn closure_sig() -> impl Sized {
     || closure_sig()
 }
 
-fn generator_sig() -> impl Sized {
+fn coroutine_sig() -> impl Sized {
     //~^ ERROR
-    || generator_sig()
+    || coroutine_sig()
 }
 
-fn generator_capture() -> impl Sized {
+fn coroutine_capture() -> impl Sized {
     //~^ ERROR
-    let x = generator_capture();
+    let x = coroutine_capture();
     move || {
         yield;
         x;
@@ -69,10 +69,10 @@ fn substs_change<T: 'static>() -> impl Sized {
     (substs_change::<&T>(),)
 }
 
-fn generator_hold() -> impl Sized {
+fn coroutine_hold() -> impl Sized {
     //~^ ERROR
     move || {
-        let x = generator_hold();
+        let x = coroutine_hold();
         yield;
         x;
     }
diff --git a/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr b/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr
index 1d919fb5240..8e9aa8ad0a6 100644
--- a/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr
+++ b/tests/ui/impl-trait/recursive-impl-trait-type-indirect.stderr
@@ -81,24 +81,24 @@ LL |     || closure_sig()
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:53:23
    |
-LL | fn generator_sig() -> impl Sized {
+LL | fn coroutine_sig() -> impl Sized {
    |                       ^^^^^^^^^^ recursive opaque type
 LL |
-LL |     || generator_sig()
+LL |     || coroutine_sig()
    |     ------------------ returning here with type `{closure@$DIR/recursive-impl-trait-type-indirect.rs:55:5: 55:7}`
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:58:27
    |
-LL |   fn generator_capture() -> impl Sized {
+LL |   fn coroutine_capture() -> impl Sized {
    |                             ^^^^^^^^^^ recursive opaque type
 ...
 LL | /     move || {
 LL | |         yield;
 LL | |         x;
-   | |         - generator captures itself here
+   | |         - coroutine captures itself here
 LL | |     }
-   | |_____- returning here with type `{generator@$DIR/recursive-impl-trait-type-indirect.rs:61:5: 61:12}`
+   | |_____- returning here with type `{coroutine@$DIR/recursive-impl-trait-type-indirect.rs:61:5: 61:12}`
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:67:35
@@ -112,11 +112,11 @@ LL |     (substs_change::<&T>(),)
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:72:24
    |
-LL | fn generator_hold() -> impl Sized {
+LL | fn coroutine_hold() -> impl Sized {
    |                        ^^^^^^^^^^ recursive opaque type
 ...
-LL |         let x = generator_hold();
-   |             - generator captures itself here
+LL |         let x = coroutine_hold();
+   |             - coroutine captures itself here
 
 error[E0720]: cannot resolve opaque type
   --> $DIR/recursive-impl-trait-type-indirect.rs:86:26
diff --git a/tests/ui/impl-trait/universal-mismatched-type.stderr b/tests/ui/impl-trait/universal-mismatched-type.stderr
index a56e542d834..82e0f23964f 100644
--- a/tests/ui/impl-trait/universal-mismatched-type.stderr
+++ b/tests/ui/impl-trait/universal-mismatched-type.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn foo(x: impl Debug) -> String {
    |           ----------     ------ expected `String` because of return type
    |           |
-   |           this type parameter
+   |           found this type parameter
 LL |     x
    |     ^ expected `String`, found type parameter `impl Debug`
    |
diff --git a/tests/ui/impl-unused-tps.rs b/tests/ui/impl-unused-tps.rs
index 7cc1ae613bc..3eb9daedf76 100644
--- a/tests/ui/impl-unused-tps.rs
+++ b/tests/ui/impl-unused-tps.rs
@@ -1,3 +1,5 @@
+//~ ERROR overflow evaluating the requirement `([isize; 0], _): Sized
+
 trait Foo<A> {
     fn get(&self, A: &A) { }
 }
@@ -23,8 +25,7 @@ impl<T:Bar<Out=U>,U> Foo<T> for [isize;3] {
 }
 
 impl<T,U> Foo<T> for U {
-    // OK, T, U are used everywhere. Note that the coherence check
-    // hasn't executed yet, so no errors about overlap.
+    //~^ ERROR conflicting implementations of trait `Foo<_>` for type `[isize; 0]`
 }
 
 impl<T,U> Bar for T {
diff --git a/tests/ui/impl-unused-tps.stderr b/tests/ui/impl-unused-tps.stderr
index 053ab91c893..93215326c2f 100644
--- a/tests/ui/impl-unused-tps.stderr
+++ b/tests/ui/impl-unused-tps.stderr
@@ -1,33 +1,56 @@
 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
-  --> $DIR/impl-unused-tps.rs:13:8
+  --> $DIR/impl-unused-tps.rs:15:8
    |
 LL | impl<T,U> Foo<T> for [isize;1] {
    |        ^ unconstrained type parameter
 
 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
-  --> $DIR/impl-unused-tps.rs:30:8
+  --> $DIR/impl-unused-tps.rs:31:8
    |
 LL | impl<T,U> Bar for T {
    |        ^ unconstrained type parameter
 
 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
-  --> $DIR/impl-unused-tps.rs:38:8
+  --> $DIR/impl-unused-tps.rs:39:8
    |
 LL | impl<T,U> Bar for T
    |        ^ unconstrained type parameter
 
 error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates
-  --> $DIR/impl-unused-tps.rs:46:8
+  --> $DIR/impl-unused-tps.rs:47:8
    |
 LL | impl<T,U,V> Foo<T> for T
    |        ^ unconstrained type parameter
 
 error[E0207]: the type parameter `V` is not constrained by the impl trait, self type, or predicates
-  --> $DIR/impl-unused-tps.rs:46:10
+  --> $DIR/impl-unused-tps.rs:47:10
    |
 LL | impl<T,U,V> Foo<T> for T
    |          ^ unconstrained type parameter
 
-error: aborting due to 5 previous errors
+error[E0119]: conflicting implementations of trait `Foo<_>` for type `[isize; 0]`
+  --> $DIR/impl-unused-tps.rs:27:1
+   |
+LL | impl<T> Foo<T> for [isize;0] {
+   | ---------------------------- first implementation here
+...
+LL | impl<T,U> Foo<T> for U {
+   | ^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `[isize; 0]`
+
+error[E0275]: overflow evaluating the requirement `([isize; 0], _): Sized`
+   |
+   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`impl_unused_tps`)
+note: required for `([isize; 0], _)` to implement `Bar`
+  --> $DIR/impl-unused-tps.rs:31:11
+   |
+LL | impl<T,U> Bar for T {
+   |      -    ^^^     ^
+   |      |
+   |      unsatisfied trait bound introduced here
+   = note: 126 redundant requirements hidden
+   = note: required for `([isize; 0], _)` to implement `Bar`
+
+error: aborting due to 7 previous errors
 
-For more information about this error, try `rustc --explain E0207`.
+Some errors have detailed explanations: E0119, E0207, E0275.
+For more information about an error, try `rustc --explain E0119`.
diff --git a/tests/ui/implied-bounds/issue-100690.rs b/tests/ui/implied-bounds/issue-100690.rs
index 5599cd410ba..ea33c9f423b 100644
--- a/tests/ui/implied-bounds/issue-100690.rs
+++ b/tests/ui/implied-bounds/issue-100690.rs
@@ -35,8 +35,8 @@ impl<'a, T: 'a> Handle<'a, T, UIView<'a, T>, Result<(), io::Error>> for TUIHandl
         F: FnOnce(&mut UIView<'a, T>) -> Result<(), io::Error> + Send + 'static,
     {
         real_dispatch(f)
-        //~^ ERROR expected a `FnOnce<(&mut UIView<'_, T>,)>` closure, found `F`
-        //~| NOTE expected an `FnOnce<(&mut UIView<'_, T>,)>` closure, found `F`
+        //~^ ERROR expected a `FnOnce(&mut UIView<'_, T>)` closure, found `F`
+        //~| NOTE expected an `FnOnce(&mut UIView<'_, T>)` closure, found `F`
         //~| NOTE expected a closure with arguments
         //~| NOTE required by a bound introduced by this call
     }
diff --git a/tests/ui/implied-bounds/issue-100690.stderr b/tests/ui/implied-bounds/issue-100690.stderr
index dba0353377f..ac9f7ab2529 100644
--- a/tests/ui/implied-bounds/issue-100690.stderr
+++ b/tests/ui/implied-bounds/issue-100690.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `FnOnce<(&mut UIView<'_, T>,)>` closure, found `F`
+error[E0277]: expected a `FnOnce(&mut UIView<'_, T>)` closure, found `F`
   --> $DIR/issue-100690.rs:37:23
    |
 LL |         real_dispatch(f)
-   |         ------------- ^ expected an `FnOnce<(&mut UIView<'_, T>,)>` closure, found `F`
+   |         ------------- ^ expected an `FnOnce(&mut UIView<'_, T>)` closure, found `F`
    |         |
    |         required by a bound introduced by this call
    |
diff --git a/tests/ui/imports/issue-28134.stderr b/tests/ui/imports/issue-28134.stderr
index 33cb53f202a..5315c2e9fee 100644
--- a/tests/ui/imports/issue-28134.stderr
+++ b/tests/ui/imports/issue-28134.stderr
@@ -14,8 +14,9 @@ LL | #![test]
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[test]
-   | ~~~~~~~
+LL - #![test]
+LL + #[test]
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/imports/issue-56125.stderr b/tests/ui/imports/issue-56125.stderr
index 15477fb6f10..d2a0f436c42 100644
--- a/tests/ui/imports/issue-56125.stderr
+++ b/tests/ui/imports/issue-56125.stderr
@@ -6,14 +6,14 @@ LL |     use empty::issue_56125;
    |
 help: consider importing one of these items instead
    |
+LL |     use ::issue_56125::issue_56125;
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |     use ::issue_56125::last_segment::issue_56125;
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL |     use ::issue_56125::non_last_segment::non_last_segment::issue_56125;
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 LL |     use crate::m3::last_segment::issue_56125;
    |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-LL |     use crate::m3::non_last_segment::non_last_segment::issue_56125;
-   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-LL |     use issue_56125::issue_56125;
-   |         ~~~~~~~~~~~~~~~~~~~~~~~~
-LL |     use issue_56125::last_segment::issue_56125;
-   |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      and 1 other candidate
 
 error[E0659]: `issue_56125` is ambiguous
diff --git a/tests/ui/imports/pub-reexport-empty.rs b/tests/ui/imports/pub-reexport-empty.rs
new file mode 100644
index 00000000000..2a46f4c8de8
--- /dev/null
+++ b/tests/ui/imports/pub-reexport-empty.rs
@@ -0,0 +1,25 @@
+#![deny(unused_imports)]
+
+mod a {}
+
+pub use a::*;
+//~^ ERROR: unused import: `a::*`
+
+mod b {
+    mod c {
+        #[derive(Clone)]
+        pub struct D;
+    }
+    pub use self::c::*; // don't show unused import lint
+}
+
+pub use b::*; // don't show unused import lint
+
+mod d {
+    const D: i32 = 1;
+}
+
+pub use d::*;
+//~^ ERROR: unused import: `d::*`
+
+fn main() {}
diff --git a/tests/ui/imports/pub-reexport-empty.stderr b/tests/ui/imports/pub-reexport-empty.stderr
new file mode 100644
index 00000000000..813b2ef71c5
--- /dev/null
+++ b/tests/ui/imports/pub-reexport-empty.stderr
@@ -0,0 +1,20 @@
+error: unused import: `a::*`
+  --> $DIR/pub-reexport-empty.rs:5:9
+   |
+LL | pub use a::*;
+   |         ^^^^
+   |
+note: the lint level is defined here
+  --> $DIR/pub-reexport-empty.rs:1:9
+   |
+LL | #![deny(unused_imports)]
+   |         ^^^^^^^^^^^^^^
+
+error: unused import: `d::*`
+  --> $DIR/pub-reexport-empty.rs:22:9
+   |
+LL | pub use d::*;
+   |         ^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/imports/reexports.rs b/tests/ui/imports/reexports.rs
index d76cc41be4e..cb1a3ebe180 100644
--- a/tests/ui/imports/reexports.rs
+++ b/tests/ui/imports/reexports.rs
@@ -5,9 +5,12 @@ mod a {
     mod foo {}
 
     mod a {
-        pub use super::foo; //~ ERROR cannot be re-exported
+        pub use super::foo;
+        //~^ ERROR cannot be re-exported
+        //~| WARNING unused import: `super::foo`
         pub use super::*;
         //~^ WARNING glob import doesn't reexport anything because no candidate is public enough
+        //~| WARNING unused import: `super::*`
     }
 }
 
diff --git a/tests/ui/imports/reexports.stderr b/tests/ui/imports/reexports.stderr
index 8cbff0ac73d..401e422af0f 100644
--- a/tests/ui/imports/reexports.stderr
+++ b/tests/ui/imports/reexports.stderr
@@ -11,44 +11,44 @@ LL |         pub use super::foo;
    |                 ^^^^^^^^^^
 
 error[E0603]: module import `foo` is private
-  --> $DIR/reexports.rs:33:15
+  --> $DIR/reexports.rs:36:15
    |
 LL |     use b::a::foo::S;
    |               ^^^ private module import
    |
 note: the module import `foo` is defined here...
-  --> $DIR/reexports.rs:21:17
+  --> $DIR/reexports.rs:24:17
    |
 LL |         pub use super::foo; // This is OK since the value `foo` is visible enough.
    |                 ^^^^^^^^^^
 note: ...and refers to the module `foo` which is defined here
-  --> $DIR/reexports.rs:16:5
+  --> $DIR/reexports.rs:19:5
    |
 LL |     mod foo {
    |     ^^^^^^^
 
 error[E0603]: module import `foo` is private
-  --> $DIR/reexports.rs:34:15
+  --> $DIR/reexports.rs:37:15
    |
 LL |     use b::b::foo::S as T;
    |               ^^^ private module import
    |
 note: the module import `foo` is defined here...
-  --> $DIR/reexports.rs:26:17
+  --> $DIR/reexports.rs:29:17
    |
 LL |         pub use super::*; // This is also OK since the value `foo` is visible enough.
    |                 ^^^^^^^^
 note: ...and refers to the module `foo` which is defined here
-  --> $DIR/reexports.rs:16:5
+  --> $DIR/reexports.rs:19:5
    |
 LL |     mod foo {
    |     ^^^^^^^
 
-warning: glob import doesn't reexport anything because no candidate is public enough
-  --> $DIR/reexports.rs:9:17
+warning: unused import: `super::foo`
+  --> $DIR/reexports.rs:8:17
    |
-LL |         pub use super::*;
-   |                 ^^^^^^^^
+LL |         pub use super::foo;
+   |                 ^^^^^^^^^^
    |
 note: the lint level is defined here
   --> $DIR/reexports.rs:1:9
@@ -56,7 +56,19 @@ note: the lint level is defined here
 LL | #![warn(unused_imports)]
    |         ^^^^^^^^^^^^^^
 
-error: aborting due to 3 previous errors; 1 warning emitted
+warning: glob import doesn't reexport anything because no candidate is public enough
+  --> $DIR/reexports.rs:11:17
+   |
+LL |         pub use super::*;
+   |                 ^^^^^^^^
+
+warning: unused import: `super::*`
+  --> $DIR/reexports.rs:11:17
+   |
+LL |         pub use super::*;
+   |                 ^^^^^^^^
+
+error: aborting due to 3 previous errors; 3 warnings emitted
 
 Some errors have detailed explanations: E0364, E0603.
 For more information about an error, try `rustc --explain E0364`.
diff --git a/tests/ui/inference/issue-107090.rs b/tests/ui/inference/issue-107090.rs
index a22e12c6d88..799c3641833 100644
--- a/tests/ui/inference/issue-107090.rs
+++ b/tests/ui/inference/issue-107090.rs
@@ -2,8 +2,8 @@ use std::marker::PhantomData;
 struct Foo<'a, 'b, T>(PhantomData<(&'a (), &'b (), T)>)
 where
     Foo<'short, 'out, T>: Convert<'a, 'b>;
-    //~^ ERROR use of undeclared lifetime name
-    //~| ERROR use of undeclared lifetime name `'out`
+//~^ ERROR use of undeclared lifetime name
+//~| ERROR use of undeclared lifetime name `'out`
 
 trait Convert<'a, 'b>: Sized {
     fn cast(&'a self) -> &'b Self;
@@ -19,7 +19,7 @@ impl<'long: 'short, 'short, T> Convert<'long, 'b> for Foo<'short, 'out, T> {
 
 fn badboi<'in_, 'out, T>(x: Foo<'in_, 'out, T>, sadness: &'in_ Foo<'short, 'out, T>) -> &'out T {
     //~^ ERROR use of undeclared lifetime name
-    sadness.cast() //~ ERROR mismatched types
+    sadness.cast()
 }
 
 fn main() {}
diff --git a/tests/ui/inference/issue-107090.stderr b/tests/ui/inference/issue-107090.stderr
index 6233b629ad6..e509e262fb1 100644
--- a/tests/ui/inference/issue-107090.stderr
+++ b/tests/ui/inference/issue-107090.stderr
@@ -66,19 +66,6 @@ LL | fn badboi<'in_, 'out, T>(x: Foo<'in_, 'out, T>, sadness: &'in_ Foo<'short,
    |           |
    |           help: consider introducing lifetime `'short` here: `'short,`
 
-error[E0308]: mismatched types
-  --> $DIR/issue-107090.rs:22:5
-   |
-LL | fn badboi<'in_, 'out, T>(x: Foo<'in_, 'out, T>, sadness: &'in_ Foo<'short, 'out, T>) -> &'out T {
-   |                       - this type parameter                                             ------- expected `&'out T` because of return type
-LL |
-LL |     sadness.cast()
-   |     ^^^^^^^^^^^^^^ expected `&T`, found `&Foo<'_, '_, T>`
-   |
-   = note: expected reference `&'out T`
-              found reference `&Foo<'_, '_, T>`
-
-error: aborting due to 7 previous errors
+error: aborting due to 6 previous errors
 
-Some errors have detailed explanations: E0261, E0308.
-For more information about an error, try `rustc --explain E0261`.
+For more information about this error, try `rustc --explain E0261`.
diff --git a/tests/ui/inference/issue-86094-suggest-add-return-to-coerce-ret-ty.rs b/tests/ui/inference/issue-86094-suggest-add-return-to-coerce-ret-ty.rs
new file mode 100644
index 00000000000..4544c898ab8
--- /dev/null
+++ b/tests/ui/inference/issue-86094-suggest-add-return-to-coerce-ret-ty.rs
@@ -0,0 +1,61 @@
+struct MyError;
+
+fn foo(x: bool) -> Result<(), MyError> {
+    if x {
+        Err(MyError);
+        //~^ ERROR type annotations needed
+    }
+
+    Ok(())
+}
+
+fn bar(x: bool) -> Result<(), MyError> {
+    if x {
+        Ok(());
+        //~^ ERROR type annotations needed
+    }
+
+    Ok(())
+}
+
+fn baz(x: bool) -> Result<(), MyError> {
+    //~^ ERROR mismatched types
+    if x {
+        1;
+    }
+
+    Err(MyError);
+}
+
+fn error() -> Result<(), MyError> {
+    Err(MyError)
+}
+
+fn bak(x: bool) -> Result<(), MyError> {
+    if x {
+        //~^ ERROR mismatched types
+        error();
+    } else {
+        //~^ ERROR mismatched types
+        error();
+    }
+}
+
+fn bad(x: bool) -> Result<(), MyError> {
+    Err(MyError); //~ ERROR type annotations needed
+    Ok(())
+}
+
+fn with_closure<F, A, B>(_: F) -> i32
+where
+    F: FnOnce(A, B),
+{
+    0
+}
+
+fn a() -> i32 {
+    with_closure(|x: u32, y| {}); //~ ERROR type annotations needed
+    0
+}
+
+fn main() {}
diff --git a/tests/ui/inference/issue-86094-suggest-add-return-to-coerce-ret-ty.stderr b/tests/ui/inference/issue-86094-suggest-add-return-to-coerce-ret-ty.stderr
new file mode 100644
index 00000000000..1fea73529a8
--- /dev/null
+++ b/tests/ui/inference/issue-86094-suggest-add-return-to-coerce-ret-ty.stderr
@@ -0,0 +1,98 @@
+error[E0282]: type annotations needed
+  --> $DIR/issue-86094-suggest-add-return-to-coerce-ret-ty.rs:5:9
+   |
+LL |         Err(MyError);
+   |         ^^^ cannot infer type of the type parameter `T` declared on the enum `Result`
+   |
+help: consider specifying the generic arguments
+   |
+LL |         Err::<T, MyError>(MyError);
+   |            ++++++++++++++
+help: you might have meant to return this to infer its type parameters
+   |
+LL |         return Err(MyError);
+   |         ++++++
+
+error[E0282]: type annotations needed
+  --> $DIR/issue-86094-suggest-add-return-to-coerce-ret-ty.rs:14:9
+   |
+LL |         Ok(());
+   |         ^^ cannot infer type of the type parameter `E` declared on the enum `Result`
+   |
+help: consider specifying the generic arguments
+   |
+LL |         Ok::<(), E>(());
+   |           +++++++++
+help: you might have meant to return this to infer its type parameters
+   |
+LL |         return Ok(());
+   |         ++++++
+
+error[E0308]: mismatched types
+  --> $DIR/issue-86094-suggest-add-return-to-coerce-ret-ty.rs:21:20
+   |
+LL | fn baz(x: bool) -> Result<(), MyError> {
+   |    ---             ^^^^^^^^^^^^^^^^^^^ expected `Result<(), MyError>`, found `()`
+   |    |
+   |    implicitly returns `()` as its body has no tail or `return` expression
+...
+LL |     Err(MyError);
+   |                 - help: remove this semicolon to return this value
+   |
+   = note:   expected enum `Result<(), MyError>`
+           found unit type `()`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-86094-suggest-add-return-to-coerce-ret-ty.rs:35:10
+   |
+LL |       if x {
+   |  __________^
+LL | |
+LL | |         error();
+   | |                - help: remove this semicolon to return this value
+LL | |     } else {
+   | |_____^ expected `Result<(), MyError>`, found `()`
+   |
+   = note:   expected enum `Result<(), MyError>`
+           found unit type `()`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-86094-suggest-add-return-to-coerce-ret-ty.rs:38:12
+   |
+LL |       } else {
+   |  ____________^
+LL | |
+LL | |         error();
+   | |                - help: remove this semicolon to return this value
+LL | |     }
+   | |_____^ expected `Result<(), MyError>`, found `()`
+   |
+   = note:   expected enum `Result<(), MyError>`
+           found unit type `()`
+
+error[E0282]: type annotations needed
+  --> $DIR/issue-86094-suggest-add-return-to-coerce-ret-ty.rs:45:5
+   |
+LL |     Err(MyError);
+   |     ^^^ cannot infer type of the type parameter `T` declared on the enum `Result`
+   |
+help: consider specifying the generic arguments
+   |
+LL |     Err::<T, MyError>(MyError);
+   |        ++++++++++++++
+
+error[E0282]: type annotations needed
+  --> $DIR/issue-86094-suggest-add-return-to-coerce-ret-ty.rs:57:27
+   |
+LL |     with_closure(|x: u32, y| {});
+   |                           ^
+   |
+help: consider giving this closure parameter an explicit type
+   |
+LL |     with_closure(|x: u32, y: /* Type */| {});
+   |                            ++++++++++++
+
+error: aborting due to 7 previous errors
+
+Some errors have detailed explanations: E0282, E0308.
+For more information about an error, try `rustc --explain E0282`.
diff --git a/tests/ui/infinite/infinite-struct.stderr b/tests/ui/infinite/infinite-struct.stderr
index b6c72b1de46..82d147b63cd 100644
--- a/tests/ui/infinite/infinite-struct.stderr
+++ b/tests/ui/infinite/infinite-struct.stderr
@@ -22,6 +22,10 @@ help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
 LL |     x: Bar<Box<Foo>>,
    |            ++++   +
 
-error: aborting due to 2 previous errors
+error: reached the recursion limit finding the struct tail for `Take`
+   |
+   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]`
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0072`.
diff --git a/tests/ui/inline-const/expr-unsafe.thir.stderr b/tests/ui/inline-const/expr-unsafe.thir.stderr
index 4737444fb61..1ab6e42fba0 100644
--- a/tests/ui/inline-const/expr-unsafe.thir.stderr
+++ b/tests/ui/inline-const/expr-unsafe.thir.stderr
@@ -1,9 +1,6 @@
 warning: unnecessary `unsafe` block
   --> $DIR/expr-unsafe.rs:12:13
    |
-LL |     unsafe {
-   |     ------ because it's nested under this `unsafe` block
-...
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
    |
diff --git a/tests/ui/inline-const/pat-unsafe-err.rs b/tests/ui/inline-const/pat-unsafe-err.rs
index e290b438c51..6df281c6d94 100644
--- a/tests/ui/inline-const/pat-unsafe-err.rs
+++ b/tests/ui/inline-const/pat-unsafe-err.rs
@@ -1,11 +1,13 @@
-// ignore-test This is currently broken
 // revisions: mir thir
+// [mir]ignore-test This is currently broken
 // [thir]compile-flags: -Z thir-unsafeck
 
 #![allow(incomplete_features)]
 #![feature(inline_const_pat)]
 
-const unsafe fn require_unsafe() -> usize { 1 }
+const unsafe fn require_unsafe() -> usize {
+    1
+}
 
 fn main() {
     match () {
@@ -14,4 +16,12 @@ fn main() {
             //~^ ERROR [E0133]
         } => (),
     }
+
+    match 1 {
+        const {
+            require_unsafe()
+            //~^ ERROR [E0133]
+        }..=4 => (),
+        _ => (),
+    }
 }
diff --git a/tests/ui/inline-const/pat-unsafe-err.thir.stderr b/tests/ui/inline-const/pat-unsafe-err.thir.stderr
new file mode 100644
index 00000000000..48a2cb4c704
--- /dev/null
+++ b/tests/ui/inline-const/pat-unsafe-err.thir.stderr
@@ -0,0 +1,19 @@
+error[E0133]: call to unsafe function `require_unsafe` is unsafe and requires unsafe function or block
+  --> $DIR/pat-unsafe-err.rs:15:13
+   |
+LL |             require_unsafe();
+   |             ^^^^^^^^^^^^^^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error[E0133]: call to unsafe function `require_unsafe` is unsafe and requires unsafe function or block
+  --> $DIR/pat-unsafe-err.rs:22:13
+   |
+LL |             require_unsafe()
+   |             ^^^^^^^^^^^^^^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/inline-const/pat-unsafe.rs b/tests/ui/inline-const/pat-unsafe.rs
index bcf7f6e0180..36f8632af67 100644
--- a/tests/ui/inline-const/pat-unsafe.rs
+++ b/tests/ui/inline-const/pat-unsafe.rs
@@ -1,13 +1,15 @@
-// ignore-test This is currently broken
 // check-pass
 // revisions: mir thir
+// [mir]ignore-test This is currently broken
 // [thir]compile-flags: -Z thir-unsafeck
 
 #![allow(incomplete_features)]
 #![warn(unused_unsafe)]
 #![feature(inline_const_pat)]
 
-const unsafe fn require_unsafe() -> usize { 1 }
+const unsafe fn require_unsafe() -> usize {
+    1
+}
 
 fn main() {
     unsafe {
@@ -18,5 +20,14 @@ fn main() {
                 //~^ WARNING unnecessary `unsafe` block
             } => (),
         }
+
+        match 1 {
+            const {
+                unsafe {}
+                //~^ WARNING unnecessary `unsafe` block
+                require_unsafe()
+            }..=4 => (),
+            _ => (),
+        }
     }
 }
diff --git a/tests/ui/inline-const/pat-unsafe.thir.stderr b/tests/ui/inline-const/pat-unsafe.thir.stderr
new file mode 100644
index 00000000000..0318b3ff2cc
--- /dev/null
+++ b/tests/ui/inline-const/pat-unsafe.thir.stderr
@@ -0,0 +1,20 @@
+warning: unnecessary `unsafe` block
+  --> $DIR/pat-unsafe.rs:19:17
+   |
+LL |                 unsafe {}
+   |                 ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/pat-unsafe.rs:7:9
+   |
+LL | #![warn(unused_unsafe)]
+   |         ^^^^^^^^^^^^^
+
+warning: unnecessary `unsafe` block
+  --> $DIR/pat-unsafe.rs:26:17
+   |
+LL |                 unsafe {}
+   |                 ^^^^^^ unnecessary `unsafe` block
+
+warning: 2 warnings emitted
+
diff --git a/tests/ui/instrument-coverage/bad-value.bad.stderr b/tests/ui/instrument-coverage/bad-value.bad.stderr
new file mode 100644
index 00000000000..b867d169dae
--- /dev/null
+++ b/tests/ui/instrument-coverage/bad-value.bad.stderr
@@ -0,0 +1,2 @@
+error: incorrect value `bad-value` for codegen option `instrument-coverage` - `all` (default), `branch`, `except-unused-generics`, `except-unused-functions`, or `off` was expected
+
diff --git a/tests/ui/instrument-coverage/bad-value.blank.stderr b/tests/ui/instrument-coverage/bad-value.blank.stderr
new file mode 100644
index 00000000000..e7122fb61cd
--- /dev/null
+++ b/tests/ui/instrument-coverage/bad-value.blank.stderr
@@ -0,0 +1,2 @@
+error: incorrect value `` for codegen option `instrument-coverage` - `all` (default), `branch`, `except-unused-generics`, `except-unused-functions`, or `off` was expected
+
diff --git a/tests/ui/instrument-coverage/bad-value.rs b/tests/ui/instrument-coverage/bad-value.rs
new file mode 100644
index 00000000000..1925c36aa53
--- /dev/null
+++ b/tests/ui/instrument-coverage/bad-value.rs
@@ -0,0 +1,5 @@
+// revisions: blank bad
+// [blank] compile-flags: -Cinstrument-coverage=
+// [bad] compile-flags: -Cinstrument-coverage=bad-value
+
+fn main() {}
diff --git a/tests/ui/instrument-coverage/off-values.rs b/tests/ui/instrument-coverage/off-values.rs
new file mode 100644
index 00000000000..0f9a0c47425
--- /dev/null
+++ b/tests/ui/instrument-coverage/off-values.rs
@@ -0,0 +1,9 @@
+// check-pass
+// revisions: n no off false zero
+// [n] compile-flags: -Cinstrument-coverage=n
+// [no] compile-flags: -Cinstrument-coverage=no
+// [off] compile-flags: -Cinstrument-coverage=off
+// [false] compile-flags: -Cinstrument-coverage=false
+// [zero] compile-flags: -Cinstrument-coverage=0
+
+fn main() {}
diff --git a/tests/ui/instrument-coverage/on-values.rs b/tests/ui/instrument-coverage/on-values.rs
new file mode 100644
index 00000000000..cc54c71c656
--- /dev/null
+++ b/tests/ui/instrument-coverage/on-values.rs
@@ -0,0 +1,11 @@
+// check-pass
+// needs-profiler-support
+// revisions: default y yes on true all
+// [default] compile-flags: -Cinstrument-coverage
+// [y] compile-flags: -Cinstrument-coverage=y
+// [yes] compile-flags: -Cinstrument-coverage=yes
+// [on] compile-flags: -Cinstrument-coverage=on
+// [true] compile-flags: -Cinstrument-coverage=true
+// [all] compile-flags: -Cinstrument-coverage=all
+
+fn main() {}
diff --git a/tests/ui/instrument-coverage/unstable.branch.stderr b/tests/ui/instrument-coverage/unstable.branch.stderr
new file mode 100644
index 00000000000..acc633a2a6d
--- /dev/null
+++ b/tests/ui/instrument-coverage/unstable.branch.stderr
@@ -0,0 +1,2 @@
+error: `-C instrument-coverage=branch` and `-C instrument-coverage=except-*` require `-Z unstable-options`
+
diff --git a/tests/ui/instrument-coverage/unstable.except-unused-functions.stderr b/tests/ui/instrument-coverage/unstable.except-unused-functions.stderr
new file mode 100644
index 00000000000..acc633a2a6d
--- /dev/null
+++ b/tests/ui/instrument-coverage/unstable.except-unused-functions.stderr
@@ -0,0 +1,2 @@
+error: `-C instrument-coverage=branch` and `-C instrument-coverage=except-*` require `-Z unstable-options`
+
diff --git a/tests/ui/instrument-coverage/unstable.except-unused-generics.stderr b/tests/ui/instrument-coverage/unstable.except-unused-generics.stderr
new file mode 100644
index 00000000000..acc633a2a6d
--- /dev/null
+++ b/tests/ui/instrument-coverage/unstable.except-unused-generics.stderr
@@ -0,0 +1,2 @@
+error: `-C instrument-coverage=branch` and `-C instrument-coverage=except-*` require `-Z unstable-options`
+
diff --git a/tests/ui/instrument-coverage/unstable.rs b/tests/ui/instrument-coverage/unstable.rs
new file mode 100644
index 00000000000..c16bcd0bf6d
--- /dev/null
+++ b/tests/ui/instrument-coverage/unstable.rs
@@ -0,0 +1,6 @@
+// revisions: branch except-unused-functions except-unused-generics
+// [branch] compile-flags: -Cinstrument-coverage=branch
+// [except-unused-functions] compile-flags: -Cinstrument-coverage=except-unused-functions
+// [except-unused-generics] compile-flags: -Cinstrument-coverage=except-unused-generics
+
+fn main() {}
diff --git a/tests/ui/intrinsics/const-eval-select-bad.rs b/tests/ui/intrinsics/const-eval-select-bad.rs
index 991d1450aff..7e75de88d29 100644
--- a/tests/ui/intrinsics/const-eval-select-bad.rs
+++ b/tests/ui/intrinsics/const-eval-select-bad.rs
@@ -8,8 +8,8 @@ const fn not_fn_items() {
     //~^ ERROR this argument must be a function item
     //~| ERROR this argument must be a function item
     const_eval_select((), 42, 0xDEADBEEF);
-    //~^ ERROR expected a `FnOnce<()>` closure
-    //~| ERROR expected a `FnOnce<()>` closure
+    //~^ ERROR expected a `FnOnce()` closure
+    //~| ERROR expected a `FnOnce()` closure
     //~| ERROR this argument must be a function item
     //~| ERROR this argument must be a function item
 }
diff --git a/tests/ui/intrinsics/const-eval-select-bad.stderr b/tests/ui/intrinsics/const-eval-select-bad.stderr
index ecd08e3cdfd..e6ff9d5a0df 100644
--- a/tests/ui/intrinsics/const-eval-select-bad.stderr
+++ b/tests/ui/intrinsics/const-eval-select-bad.stderr
@@ -25,11 +25,11 @@ LL |     const_eval_select((), 42, 0xDEADBEEF);
    = note: expected a function item, found {integer}
    = help: consult the documentation on `const_eval_select` for more information
 
-error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
+error[E0277]: expected a `FnOnce()` closure, found `{integer}`
   --> $DIR/const-eval-select-bad.rs:10:27
    |
 LL |     const_eval_select((), 42, 0xDEADBEEF);
-   |     -----------------     ^^ expected an `FnOnce<()>` closure, found `{integer}`
+   |     -----------------     ^^ expected an `FnOnce()` closure, found `{integer}`
    |     |
    |     required by a bound introduced by this call
    |
@@ -47,11 +47,11 @@ LL |     const_eval_select((), 42, 0xDEADBEEF);
    = note: expected a function item, found {integer}
    = help: consult the documentation on `const_eval_select` for more information
 
-error[E0277]: expected a `FnOnce<()>` closure, found `{integer}`
+error[E0277]: expected a `FnOnce()` closure, found `{integer}`
   --> $DIR/const-eval-select-bad.rs:10:31
    |
 LL |     const_eval_select((), 42, 0xDEADBEEF);
-   |     -----------------         ^^^^^^^^^^ expected an `FnOnce<()>` closure, found `{integer}`
+   |     -----------------         ^^^^^^^^^^ expected an `FnOnce()` closure, found `{integer}`
    |     |
    |     required by a bound introduced by this call
    |
diff --git a/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.stderr b/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.stderr
index 4fc304cda60..317466eb322 100644
--- a/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.stderr
+++ b/tests/ui/intrinsics/intrinsic-raw_eq-const-bad.stderr
@@ -2,7 +2,7 @@ error[E0080]: evaluation of constant value failed
   --> $DIR/intrinsic-raw_eq-const-bad.rs:5:5
    |
 LL |     std::intrinsics::raw_eq(&(1_u8, 2_u16), &(1_u8, 2_u16))
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at alloc3[0x0..0x4], but memory is uninitialized at [0x1..0x2], and this operation requires initialized memory
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reading memory at ALLOC0[0x0..0x4], but memory is uninitialized at [0x1..0x2], and this operation requires initialized memory
 
 error[E0080]: evaluation of constant value failed
   --> $DIR/intrinsic-raw_eq-const-bad.rs:11:5
diff --git a/tests/ui/invalid/invalid-llvm-passes.rs b/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs
index ee28f5eb6d6..ee28f5eb6d6 100644
--- a/tests/ui/invalid/invalid-llvm-passes.rs
+++ b/tests/ui/invalid-compile-flags/invalid-llvm-passes.rs
diff --git a/tests/ui/invalid/invalid-llvm-passes.stderr b/tests/ui/invalid-compile-flags/invalid-llvm-passes.stderr
index ae1f85e41e4..ae1f85e41e4 100644
--- a/tests/ui/invalid/invalid-llvm-passes.stderr
+++ b/tests/ui/invalid-compile-flags/invalid-llvm-passes.stderr
diff --git a/tests/ui/invalid-module-declaration/invalid-module-declaration.stderr b/tests/ui/invalid-module-declaration/invalid-module-declaration.stderr
index 7bc8efd7e4a..08aec25928c 100644
--- a/tests/ui/invalid-module-declaration/invalid-module-declaration.stderr
+++ b/tests/ui/invalid-module-declaration/invalid-module-declaration.stderr
@@ -5,6 +5,7 @@ LL | pub mod baz;
    | ^^^^^^^^^^^^
    |
    = help: to create the module `baz`, create file "$DIR/auxiliary/foo/bar/baz.rs" or "$DIR/auxiliary/foo/bar/baz/mod.rs"
+   = note: if there is a `mod baz` elsewhere in the crate already, import it with `use crate::...` instead
 
 error: aborting due to previous error
 
diff --git a/tests/ui/invalid/invalid-plugin-attr.rs b/tests/ui/invalid/invalid-plugin-attr.rs
deleted file mode 100644
index 3080af24500..00000000000
--- a/tests/ui/invalid/invalid-plugin-attr.rs
+++ /dev/null
@@ -1,7 +0,0 @@
-#![deny(unused_attributes)]
-#![feature(plugin)]
-
-#[plugin(bla)] //~ ERROR should be an inner attribute
-//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
-
-fn main() {}
diff --git a/tests/ui/invalid/invalid-plugin-attr.stderr b/tests/ui/invalid/invalid-plugin-attr.stderr
deleted file mode 100644
index d3882d33fc4..00000000000
--- a/tests/ui/invalid/invalid-plugin-attr.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/invalid-plugin-attr.rs:4:1
-   |
-LL | #[plugin(bla)]
-   | ^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]`
-  --> $DIR/invalid-plugin-attr.rs:4:1
-   |
-LL | #[plugin(bla)]
-   | ^^^^^^^^^^^^^^
-   |
-note: the lint level is defined here
-  --> $DIR/invalid-plugin-attr.rs:1:9
-   |
-LL | #![deny(unused_attributes)]
-   |         ^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error; 1 warning emitted
-
diff --git a/tests/ui/issues/issue-12567.stderr b/tests/ui/issues/issue-12567.stderr
index 7fa06825f0f..3f95f18a967 100644
--- a/tests/ui/issues/issue-12567.stderr
+++ b/tests/ui/issues/issue-12567.stderr
@@ -8,7 +8,7 @@ LL |         (&[], &[hd, ..]) | (&[hd, ..], &[])
    |                 -- data moved here
 LL |             => println!("one empty"),
 LL |         (&[hd1, ..], &[hd2, ..])
-   |            --- ...and here
+   |                        --- ...and here
    |
    = note: move occurs because these variables have types that don't implement the `Copy` trait
 help: consider borrowing the pattern binding
@@ -17,8 +17,8 @@ LL |         (&[], &[ref hd, ..]) | (&[hd, ..], &[])
    |                 +++
 help: consider borrowing the pattern binding
    |
-LL |         (&[ref hd1, ..], &[hd2, ..])
-   |            +++
+LL |         (&[hd1, ..], &[ref hd2, ..])
+   |                        +++
 
 error[E0508]: cannot move out of type `[T]`, a non-copy slice
   --> $DIR/issue-12567.rs:2:11
@@ -30,7 +30,7 @@ LL |         (&[], &[hd, ..]) | (&[hd, ..], &[])
    |                 -- data moved here
 LL |             => println!("one empty"),
 LL |         (&[hd1, ..], &[hd2, ..])
-   |                        --- ...and here
+   |            --- ...and here
    |
    = note: move occurs because these variables have types that don't implement the `Copy` trait
 help: consider borrowing the pattern binding
@@ -39,8 +39,8 @@ LL |         (&[], &[ref hd, ..]) | (&[hd, ..], &[])
    |                 +++
 help: consider borrowing the pattern binding
    |
-LL |         (&[hd1, ..], &[ref hd2, ..])
-   |                        +++
+LL |         (&[ref hd1, ..], &[hd2, ..])
+   |            +++
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/issues/issue-19380.rs b/tests/ui/issues/issue-19380.rs
index 5c10e2067e4..fce737cba18 100644
--- a/tests/ui/issues/issue-19380.rs
+++ b/tests/ui/issues/issue-19380.rs
@@ -14,5 +14,6 @@ struct Bar {
 
 const FOO : Foo = Foo;
 const BAR : Bar = Bar { foos: &[&FOO]};
+//~^ ERROR E0038
 
 fn main() { }
diff --git a/tests/ui/issues/issue-19380.stderr b/tests/ui/issues/issue-19380.stderr
index b2aeb5edf29..f6244d9d44f 100644
--- a/tests/ui/issues/issue-19380.stderr
+++ b/tests/ui/issues/issue-19380.stderr
@@ -11,6 +11,7 @@ LL | trait Qiz {
    |       --- this trait cannot be made into an object...
 LL |   fn qiz();
    |      ^^^ ...because associated function `qiz` has no `self` parameter
+   = help: only type `Foo` implements the trait, consider using it directly instead
 help: consider turning `qiz` into a method by giving it a `&self` argument
    |
 LL |   fn qiz(&self);
@@ -20,6 +21,30 @@ help: alternatively, consider constraining `qiz` so it does not apply to trait o
 LL |   fn qiz() where Self: Sized;
    |            +++++++++++++++++
 
-error: aborting due to previous error
+error[E0038]: the trait `Qiz` cannot be made into an object
+  --> $DIR/issue-19380.rs:16:33
+   |
+LL | const BAR : Bar = Bar { foos: &[&FOO]};
+   |                                 ^^^^ `Qiz` 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-19380.rs:2:6
+   |
+LL | trait Qiz {
+   |       --- this trait cannot be made into an object...
+LL |   fn qiz();
+   |      ^^^ ...because associated function `qiz` has no `self` parameter
+   = help: only type `Foo` implements the trait, consider using it directly instead
+   = note: required for the cast from `&Foo` to `&'static (dyn Qiz + 'static)`
+help: consider turning `qiz` into a method by giving it a `&self` argument
+   |
+LL |   fn qiz(&self);
+   |          +++++
+help: alternatively, consider constraining `qiz` so it does not apply to trait objects
+   |
+LL |   fn qiz() where Self: Sized;
+   |            +++++++++++++++++
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/issues/issue-19482.rs b/tests/ui/issues/issue-19482.rs
index 3f3c5de9b14..9d0c8d96d29 100644
--- a/tests/ui/issues/issue-19482.rs
+++ b/tests/ui/issues/issue-19482.rs
@@ -8,6 +8,6 @@ trait Foo {
 }
 
 fn bar(x: &dyn Foo) {}
-//~^ ERROR the associated type `A` (from trait `Foo`) must be specified
+//~^ ERROR the associated type `A` in `Foo` must be specified
 
 pub fn main() {}
diff --git a/tests/ui/issues/issue-19482.stderr b/tests/ui/issues/issue-19482.stderr
index d51cc1f081e..90e6f799560 100644
--- a/tests/ui/issues/issue-19482.stderr
+++ b/tests/ui/issues/issue-19482.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `A` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated type `A` in `Foo` must be specified
   --> $DIR/issue-19482.rs:10:16
    |
 LL |     type A;
diff --git a/tests/ui/issues/issue-20225.stderr b/tests/ui/issues/issue-20225.stderr
index b1c15672051..b34aa8e1ff5 100644
--- a/tests/ui/issues/issue-20225.stderr
+++ b/tests/ui/issues/issue-20225.stderr
@@ -2,7 +2,7 @@ error[E0053]: method `call` has an incompatible type for trait
   --> $DIR/issue-20225.rs:6:43
    |
 LL | impl<'a, T> Fn<(&'a T,)> for Foo {
-   |          - this type parameter
+   |          - found this type parameter
 LL |   extern "rust-call" fn call(&self, (_,): (T,)) {}
    |                                           ^^^^
    |                                           |
@@ -16,7 +16,7 @@ error[E0053]: method `call_mut` has an incompatible type for trait
   --> $DIR/issue-20225.rs:11:51
    |
 LL | impl<'a, T> FnMut<(&'a T,)> for Foo {
-   |          - this type parameter
+   |          - found this type parameter
 LL |   extern "rust-call" fn call_mut(&mut self, (_,): (T,)) {}
    |                                                   ^^^^
    |                                                   |
@@ -30,7 +30,7 @@ error[E0053]: method `call_once` has an incompatible type for trait
   --> $DIR/issue-20225.rs:18:47
    |
 LL | impl<'a, T> FnOnce<(&'a T,)> for Foo {
-   |          - this type parameter
+   |          - found this type parameter
 ...
 LL |   extern "rust-call" fn call_once(self, (_,): (T,)) {}
    |                                               ^^^^
diff --git a/tests/ui/issues/issue-21950.stderr b/tests/ui/issues/issue-21950.stderr
index 731615a6bd8..e498565d4e6 100644
--- a/tests/ui/issues/issue-21950.stderr
+++ b/tests/ui/issues/issue-21950.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `Output` (from trait `Add`) must be specified
+error[E0191]: the value of the associated type `Output` in `Add` must be specified
   --> $DIR/issue-21950.rs:10:25
    |
 LL |     type Output;
diff --git a/tests/ui/issues/issue-22034.rs b/tests/ui/issues/issue-22034.rs
index 405ffd089c2..ed741779f68 100644
--- a/tests/ui/issues/issue-22034.rs
+++ b/tests/ui/issues/issue-22034.rs
@@ -6,6 +6,6 @@ fn main() {
     let ptr: *mut () = core::ptr::null_mut();
     let _: &mut dyn Fn() = unsafe {
         &mut *(ptr as *mut dyn Fn())
-        //~^ ERROR expected a `Fn<()>` closure, found `()`
+        //~^ ERROR expected a `Fn()` closure, found `()`
     };
 }
diff --git a/tests/ui/issues/issue-22034.stderr b/tests/ui/issues/issue-22034.stderr
index 9833e559cbc..d64b024098c 100644
--- a/tests/ui/issues/issue-22034.stderr
+++ b/tests/ui/issues/issue-22034.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<()>` closure, found `()`
+error[E0277]: expected a `Fn()` closure, found `()`
   --> $DIR/issue-22034.rs:8:16
    |
 LL |         &mut *(ptr as *mut dyn Fn())
-   |                ^^^ expected an `Fn<()>` closure, found `()`
+   |                ^^^ expected an `Fn()` closure, found `()`
    |
    = help: the trait `Fn<()>` is not implemented for `()`
    = note: wrap the `()` in a closure with no arguments: `|| { /* code */ }`
diff --git a/tests/ui/issues/issue-22434.rs b/tests/ui/issues/issue-22434.rs
index 34057b46ecd..d9f7b987c64 100644
--- a/tests/ui/issues/issue-22434.rs
+++ b/tests/ui/issues/issue-22434.rs
@@ -3,6 +3,6 @@ pub trait Foo {
 }
 
 type I<'a> = &'a (dyn Foo + 'a);
-//~^ ERROR the value of the associated type `A` (from trait `Foo`) must be specified
+//~^ ERROR the value of the associated type `A` in `Foo` must be specified
 
 fn main() {}
diff --git a/tests/ui/issues/issue-22434.stderr b/tests/ui/issues/issue-22434.stderr
index b97fa2503b8..dab62bcbb4d 100644
--- a/tests/ui/issues/issue-22434.stderr
+++ b/tests/ui/issues/issue-22434.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `A` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated type `A` in `Foo` must be specified
   --> $DIR/issue-22434.rs:5:23
    |
 LL |     type A;
diff --git a/tests/ui/issues/issue-23024.rs b/tests/ui/issues/issue-23024.rs
index 010281ee371..25220dc3e61 100644
--- a/tests/ui/issues/issue-23024.rs
+++ b/tests/ui/issues/issue-23024.rs
@@ -8,5 +8,5 @@ fn main()
     println!("{:?}",(vfnfer[0] as dyn Fn)(3));
     //~^ ERROR the precise format of `Fn`-family traits'
     //~| ERROR missing generics for trait `Fn`
-    //~| ERROR the value of the associated type `Output` (from trait `FnOnce`)
+    //~| ERROR the value of the associated type `Output` in `FnOnce`
 }
diff --git a/tests/ui/issues/issue-23024.stderr b/tests/ui/issues/issue-23024.stderr
index 2c325ffccee..7d187de1bc4 100644
--- a/tests/ui/issues/issue-23024.stderr
+++ b/tests/ui/issues/issue-23024.stderr
@@ -18,7 +18,7 @@ help: add missing generic argument
 LL |     println!("{:?}",(vfnfer[0] as dyn Fn<Args>)(3));
    |                                         ++++++
 
-error[E0191]: the value of the associated type `Output` (from trait `FnOnce`) must be specified
+error[E0191]: the value of the associated type `Output` in `FnOnce` must be specified
   --> $DIR/issue-23024.rs:8:39
    |
 LL |     println!("{:?}",(vfnfer[0] as dyn Fn)(3));
diff --git a/tests/ui/issues/issue-23966.stderr b/tests/ui/issues/issue-23966.stderr
index 8f934481d85..542aed0eb26 100644
--- a/tests/ui/issues/issue-23966.stderr
+++ b/tests/ui/issues/issue-23966.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `FnMut<(_, char)>` closure, found `()`
+error[E0277]: expected a `FnMut(_, char)` closure, found `()`
   --> $DIR/issue-23966.rs:2:32
    |
 LL |     "".chars().fold(|_, _| (), ());
-   |                ----            ^^ expected an `FnMut<(_, char)>` closure, found `()`
+   |                ----            ^^ expected an `FnMut(_, char)` closure, found `()`
    |                |
    |                required by a bound introduced by this call
    |
diff --git a/tests/ui/issues/issue-24446.rs b/tests/ui/issues/issue-24446.rs
index 9ab952ade9c..6cf8846506d 100644
--- a/tests/ui/issues/issue-24446.rs
+++ b/tests/ui/issues/issue-24446.rs
@@ -2,6 +2,8 @@ fn main() {
     static foo: dyn Fn() -> u32 = || -> u32 {
         //~^ ERROR the size for values of type
         //~| ERROR cannot be shared between threads safely
+        //~| ERROR the size for values of type
+        //~| ERROR mismatched types
         0
     };
 }
diff --git a/tests/ui/issues/issue-24446.stderr b/tests/ui/issues/issue-24446.stderr
index 72d528f1619..9c206e5ef3c 100644
--- a/tests/ui/issues/issue-24446.stderr
+++ b/tests/ui/issues/issue-24446.stderr
@@ -15,6 +15,39 @@ LL |     static foo: dyn Fn() -> u32 = || -> u32 {
    |
    = help: the trait `Sized` is not implemented for `(dyn Fn() -> u32 + 'static)`
 
-error: aborting due to 2 previous errors
+error[E0277]: the size for values of type `(dyn Fn() -> u32 + 'static)` cannot be known at compilation time
+  --> $DIR/issue-24446.rs:2:35
+   |
+LL |       static foo: dyn Fn() -> u32 = || -> u32 {
+   |  ___________________________________^
+LL | |
+LL | |
+LL | |
+LL | |
+LL | |         0
+LL | |     };
+   | |_____^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Fn() -> u32 + 'static)`
+   = note: constant expressions must have a statically known size
+
+error[E0308]: mismatched types
+  --> $DIR/issue-24446.rs:2:35
+   |
+LL |       static foo: dyn Fn() -> u32 = || -> u32 {
+   |  ___________________________________^
+LL | |
+LL | |
+LL | |
+LL | |
+LL | |         0
+LL | |     };
+   | |_____^ expected `dyn Fn`, found closure
+   |
+   = note: expected trait object `(dyn Fn() -> u32 + 'static)`
+                   found closure `{closure@$DIR/issue-24446.rs:2:35: 2:44}`
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0277, E0308.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/issues/issue-28344.stderr b/tests/ui/issues/issue-28344.stderr
index f398a5da3e9..71d642109ac 100644
--- a/tests/ui/issues/issue-28344.stderr
+++ b/tests/ui/issues/issue-28344.stderr
@@ -12,7 +12,7 @@ help: use `dyn`
 LL |     let x: u8 = <dyn BitXor>::bitor(0 as u8, 0 as u8);
    |                 ++++       +
 
-error[E0191]: the value of the associated type `Output` (from trait `BitXor`) must be specified
+error[E0191]: the value of the associated type `Output` in `BitXor` must be specified
   --> $DIR/issue-28344.rs:4:17
    |
 LL |     let x: u8 = BitXor::bitor(0 as u8, 0 as u8);
@@ -40,7 +40,7 @@ help: use `dyn`
 LL |     let g = <dyn BitXor>::bitor;
    |             ++++       +
 
-error[E0191]: the value of the associated type `Output` (from trait `BitXor`) must be specified
+error[E0191]: the value of the associated type `Output` in `BitXor` must be specified
   --> $DIR/issue-28344.rs:10:13
    |
 LL |     let g = BitXor::bitor;
diff --git a/tests/ui/issues/issue-37534.rs b/tests/ui/issues/issue-37534.rs
index 1e67e9a8158..40f7186db09 100644
--- a/tests/ui/issues/issue-37534.rs
+++ b/tests/ui/issues/issue-37534.rs
@@ -1,6 +1,6 @@
-struct Foo<T: ?Hash> { }
+struct Foo<T: ?Hash> {}
 //~^ ERROR expected trait, found derive macro `Hash`
 //~^^ ERROR parameter `T` is never used
-//~^^^ WARN default bound relaxed for a type parameter, but this does nothing
+//~^^^ WARN relaxing a default bound only does something for `?Sized`
 
-fn main() { }
+fn main() {}
diff --git a/tests/ui/issues/issue-37534.stderr b/tests/ui/issues/issue-37534.stderr
index 7d3dd8800bd..03fea2c1648 100644
--- a/tests/ui/issues/issue-37534.stderr
+++ b/tests/ui/issues/issue-37534.stderr
@@ -1,7 +1,7 @@
 error[E0404]: expected trait, found derive macro `Hash`
   --> $DIR/issue-37534.rs:1:16
    |
-LL | struct Foo<T: ?Hash> { }
+LL | struct Foo<T: ?Hash> {}
    |                ^^^^ not a trait
    |
 help: consider importing this trait instead
@@ -9,16 +9,16 @@ help: consider importing this trait instead
 LL + use std::hash::Hash;
    |
 
-warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
-  --> $DIR/issue-37534.rs:1:12
+warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
+  --> $DIR/issue-37534.rs:1:15
    |
-LL | struct Foo<T: ?Hash> { }
-   |            ^
+LL | struct Foo<T: ?Hash> {}
+   |               ^^^^^
 
 error[E0392]: parameter `T` is never used
   --> $DIR/issue-37534.rs:1:12
    |
-LL | struct Foo<T: ?Hash> { }
+LL | struct Foo<T: ?Hash> {}
    |            ^ unused parameter
    |
    = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
diff --git a/tests/ui/issues/issue-51154.stderr b/tests/ui/issues/issue-51154.stderr
index 002d5ccdc67..5ae8e067807 100644
--- a/tests/ui/issues/issue-51154.stderr
+++ b/tests/ui/issues/issue-51154.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-51154.rs:2:30
    |
 LL | fn foo<F: FnMut()>() {
-   |        - this type parameter
+   |        - expected this type parameter
 LL |     let _: Box<F> = Box::new(|| ());
    |                     -------- ^^^^^ expected type parameter `F`, found closure
    |                     |
diff --git a/tests/ui/issues/issue-59494.rs b/tests/ui/issues/issue-59494.rs
index a53e28f7246..8dcdd88c618 100644
--- a/tests/ui/issues/issue-59494.rs
+++ b/tests/ui/issues/issue-59494.rs
@@ -19,5 +19,5 @@ fn main() {
     let g = |(a, _)| a;
     let t7 = |env| |a| |b| t7p(f, g)(((env, a), b));
     let t8 = t8n(t7, t7p(f, g));
-    //~^ ERROR: expected a `Fn<(_,)>` closure, found `impl Fn(((_, _), _))` [E0277]
+    //~^ ERROR: expected a `Fn(_)` closure, found `impl Fn(((_, _), _))` [E0277]
 }
diff --git a/tests/ui/issues/issue-59494.stderr b/tests/ui/issues/issue-59494.stderr
index a9284535e4d..e9a4bf96741 100644
--- a/tests/ui/issues/issue-59494.stderr
+++ b/tests/ui/issues/issue-59494.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<(_,)>` closure, found `impl Fn(((_, _), _))`
+error[E0277]: expected a `Fn(_)` closure, found `impl Fn(((_, _), _))`
   --> $DIR/issue-59494.rs:21:22
    |
 LL |     let t8 = t8n(t7, t7p(f, g));
-   |              ---     ^^^^^^^^^ expected an `Fn<(_,)>` closure, found `impl Fn(((_, _), _))`
+   |              ---     ^^^^^^^^^ expected an `Fn(_)` closure, found `impl Fn(((_, _), _))`
    |              |
    |              required by a bound introduced by this call
    |
diff --git a/tests/ui/issues/issue-69306.stderr b/tests/ui/issues/issue-69306.stderr
index 570677298ff..6fc5c33af6a 100644
--- a/tests/ui/issues/issue-69306.stderr
+++ b/tests/ui/issues/issue-69306.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-69306.rs:5:28
    |
 LL | impl<T> S0<T> {
-   |      - this type parameter
+   |      - expected this type parameter
 LL |     const C: S0<u8> = Self(0);
    |                       ---- ^ expected type parameter `T`, found integer
    |                       |
@@ -20,7 +20,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-69306.rs:5:23
    |
 LL | impl<T> S0<T> {
-   |      - this type parameter
+   |      - found this type parameter
 LL |     const C: S0<u8> = Self(0);
    |                       ^^^^^^^ expected `S0<u8>`, found `S0<T>`
    |
@@ -31,7 +31,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-69306.rs:10:14
    |
 LL | impl<T> S0<T> {
-   |      - this type parameter
+   |      - expected this type parameter
 ...
 LL |         Self(0);
    |         ---- ^ expected type parameter `T`, found integer
@@ -50,7 +50,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-69306.rs:27:14
    |
 LL | impl<T> Foo<T> for <S0<T> as Fun>::Out {
-   |      - this type parameter
+   |      - expected this type parameter
 LL |     fn foo() {
 LL |         Self(0);
    |         ---- ^ expected type parameter `T`, found integer
@@ -69,7 +69,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-69306.rs:33:32
    |
 LL | impl<T> S1<T, u8> {
-   |      - this type parameter
+   |      - expected this type parameter
 LL |     const C: S1<u8, u8> = Self(0, 1);
    |                           ---- ^ expected type parameter `T`, found integer
    |                           |
@@ -87,7 +87,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-69306.rs:33:27
    |
 LL | impl<T> S1<T, u8> {
-   |      - this type parameter
+   |      - found this type parameter
 LL |     const C: S1<u8, u8> = Self(0, 1);
    |                           ^^^^^^^^^^ expected `S1<u8, u8>`, found `S1<T, u8>`
    |
diff --git a/tests/ui/issues/issue-77919.rs b/tests/ui/issues/issue-77919.rs
index 966d76d148a..bf603314977 100644
--- a/tests/ui/issues/issue-77919.rs
+++ b/tests/ui/issues/issue-77919.rs
@@ -10,4 +10,4 @@ struct Multiply<N, M> {
 }
 impl<N, M> TypeVal<usize> for Multiply<N, M> where N: TypeVal<VAL> {}
 //~^ ERROR cannot find type `VAL` in this scope
-//~| ERROR not all trait items implemented, missing: `VAL`
+//~| ERROR not all trait items implemented
diff --git a/tests/ui/issues/issue-87199.rs b/tests/ui/issues/issue-87199.rs
index a80a64a2f87..d16d4067673 100644
--- a/tests/ui/issues/issue-87199.rs
+++ b/tests/ui/issues/issue-87199.rs
@@ -6,11 +6,11 @@
 
 // Check that these function definitions only emit warnings, not errors
 fn arg<T: ?Send>(_: T) {}
-//~^ warning: default bound relaxed for a type parameter, but this does nothing
+//~^ warning: relaxing a default bound only does something for `?Sized`
 fn ref_arg<T: ?Send>(_: &T) {}
-//~^ warning: default bound relaxed for a type parameter, but this does nothing
+//~^ warning: relaxing a default bound only does something for `?Sized`
 fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
-//~^ warning: default bound relaxed for a type parameter, but this does nothing
+//~^ warning: relaxing a default bound only does something for `?Sized`
 
 // Check that there's no `?Sized` relaxation!
 fn main() {
diff --git a/tests/ui/issues/issue-87199.stderr b/tests/ui/issues/issue-87199.stderr
index 67949b37d40..e02cd7fcfa9 100644
--- a/tests/ui/issues/issue-87199.stderr
+++ b/tests/ui/issues/issue-87199.stderr
@@ -1,20 +1,20 @@
-warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
-  --> $DIR/issue-87199.rs:8:8
+warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
+  --> $DIR/issue-87199.rs:8:11
    |
 LL | fn arg<T: ?Send>(_: T) {}
-   |        ^
+   |           ^^^^^
 
-warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
-  --> $DIR/issue-87199.rs:10:12
+warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
+  --> $DIR/issue-87199.rs:10:15
    |
 LL | fn ref_arg<T: ?Send>(_: &T) {}
-   |            ^
+   |               ^^^^^
 
-warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
-  --> $DIR/issue-87199.rs:12:13
+warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
+  --> $DIR/issue-87199.rs:12:40
    |
 LL | fn ret() -> impl Iterator<Item = ()> + ?Send { std::iter::empty() }
-   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |                                        ^^^^^
 
 error[E0277]: the size for values of type `[i32]` cannot be known at compilation time
   --> $DIR/issue-87199.rs:18:15
diff --git a/tests/ui/iterators/invalid-iterator-chain-fixable.fixed b/tests/ui/iterators/invalid-iterator-chain-fixable.fixed
new file mode 100644
index 00000000000..513b5bd13d8
--- /dev/null
+++ b/tests/ui/iterators/invalid-iterator-chain-fixable.fixed
@@ -0,0 +1,42 @@
+// run-rustfix
+use std::collections::hash_set::Iter;
+use std::collections::HashSet;
+
+fn iter_to_vec<'b, X>(i: Iter<'b, X>) -> Vec<X> where X: Clone {
+    let i = i.map(|x| x.clone());
+    i.collect() //~ ERROR E0277
+}
+
+fn main() {
+    let v = vec![(0, 0)];
+    let scores = v
+        .iter()
+        .map(|(a, b)| {
+            a + b
+        });
+    println!("{}", scores.sum::<i32>()); //~ ERROR E0277
+    println!(
+        "{}",
+        vec![0, 1]
+            .iter()
+            .map(|x| x * 2)
+            .map(|x| { x })
+            .map(|x| { x })
+            .sum::<i32>(), //~ ERROR E0277
+    );
+    println!("{}", vec![0, 1].iter().map(|x| { x }).sum::<i32>()); //~ ERROR E0277
+    let a = vec![0];
+    let b = a.into_iter();
+    let c = b.map(|x| x + 1);
+    let d = c.filter(|x| *x > 10 );
+    let e = d.map(|x| {
+        x + 1
+    });
+    let f = e.filter(|_| false);
+    let g: Vec<i32> = f.collect(); //~ ERROR E0277
+    println!("{g:?}");
+
+    let mut s = HashSet::new();
+    s.insert(1u8);
+    println!("{:?}", iter_to_vec(s.iter()));
+}
diff --git a/tests/ui/iterators/invalid-iterator-chain-fixable.rs b/tests/ui/iterators/invalid-iterator-chain-fixable.rs
new file mode 100644
index 00000000000..79b861702c7
--- /dev/null
+++ b/tests/ui/iterators/invalid-iterator-chain-fixable.rs
@@ -0,0 +1,42 @@
+// run-rustfix
+use std::collections::hash_set::Iter;
+use std::collections::HashSet;
+
+fn iter_to_vec<'b, X>(i: Iter<'b, X>) -> Vec<X> {
+    let i = i.map(|x| x.clone());
+    i.collect() //~ ERROR E0277
+}
+
+fn main() {
+    let v = vec![(0, 0)];
+    let scores = v
+        .iter()
+        .map(|(a, b)| {
+            a + b;
+        });
+    println!("{}", scores.sum::<i32>()); //~ ERROR E0277
+    println!(
+        "{}",
+        vec![0, 1]
+            .iter()
+            .map(|x| x * 2)
+            .map(|x| { x; })
+            .map(|x| { x })
+            .sum::<i32>(), //~ ERROR E0277
+    );
+    println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>()); //~ ERROR E0277
+    let a = vec![0];
+    let b = a.into_iter();
+    let c = b.map(|x| x + 1);
+    let d = c.filter(|x| *x > 10 );
+    let e = d.map(|x| {
+        x + 1;
+    });
+    let f = e.filter(|_| false);
+    let g: Vec<i32> = f.collect(); //~ ERROR E0277
+    println!("{g:?}");
+
+    let mut s = HashSet::new();
+    s.insert(1u8);
+    println!("{:?}", iter_to_vec(s.iter()));
+}
diff --git a/tests/ui/iterators/invalid-iterator-chain-fixable.stderr b/tests/ui/iterators/invalid-iterator-chain-fixable.stderr
new file mode 100644
index 00000000000..1bfe765e78a
--- /dev/null
+++ b/tests/ui/iterators/invalid-iterator-chain-fixable.stderr
@@ -0,0 +1,157 @@
+error[E0277]: a value of type `Vec<X>` cannot be built from an iterator over elements of type `&X`
+  --> $DIR/invalid-iterator-chain-fixable.rs:7:7
+   |
+LL |     let i = i.map(|x| x.clone());
+   |                         ------- this method call is cloning the reference `&X`, not `X` which doesn't implement `Clone`
+LL |     i.collect()
+   |       ^^^^^^^ value of type `Vec<X>` cannot be built from `std::iter::Iterator<Item=&X>`
+   |
+   = help: the trait `FromIterator<&X>` is not implemented for `Vec<X>`
+   = help: the trait `FromIterator<X>` is implemented for `Vec<X>`
+   = help: for that trait implementation, expected `X`, found `&X`
+note: the method call chain might not have had the expected associated types
+  --> $DIR/invalid-iterator-chain-fixable.rs:5:26
+   |
+LL | fn iter_to_vec<'b, X>(i: Iter<'b, X>) -> Vec<X> {
+   |                          ^^^^^^^^^^^ `Iterator::Item` is `&X` here
+LL |     let i = i.map(|x| x.clone());
+   |               ------------------ `Iterator::Item` remains `&X` here
+note: required by a bound in `collect`
+  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider further restricting type parameter `X`
+   |
+LL | fn iter_to_vec<'b, X>(i: Iter<'b, X>) -> Vec<X> where X: Clone {
+   |                                                 ++++++++++++++
+
+error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
+  --> $DIR/invalid-iterator-chain-fixable.rs:17:33
+   |
+LL |     println!("{}", scores.sum::<i32>());
+   |                           ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=()>`
+   |                           |
+   |                           required by a bound introduced by this call
+   |
+   = help: the trait `Sum<()>` is not implemented for `i32`
+   = help: the following other types implement trait `Sum<A>`:
+             <i32 as Sum>
+             <i32 as Sum<&'a i32>>
+note: the method call chain might not have had the expected associated types
+  --> $DIR/invalid-iterator-chain-fixable.rs:14:10
+   |
+LL |       let v = vec![(0, 0)];
+   |               ------------ this expression has type `Vec<({integer}, {integer})>`
+LL |       let scores = v
+LL |           .iter()
+   |            ------ `Iterator::Item` is `&({integer}, {integer})` here
+LL |           .map(|(a, b)| {
+   |  __________^
+LL | |             a + b;
+LL | |         });
+   | |__________^ `Iterator::Item` changed to `()` here
+note: required by a bound in `std::iter::Iterator::sum`
+  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider removing this semicolon
+   |
+LL -             a + b;
+LL +             a + b
+   |
+
+error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
+  --> $DIR/invalid-iterator-chain-fixable.rs:25:20
+   |
+LL |             .sum::<i32>(),
+   |              ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=()>`
+   |              |
+   |              required by a bound introduced by this call
+   |
+   = help: the trait `Sum<()>` is not implemented for `i32`
+   = help: the following other types implement trait `Sum<A>`:
+             <i32 as Sum>
+             <i32 as Sum<&'a i32>>
+note: the method call chain might not have had the expected associated types
+  --> $DIR/invalid-iterator-chain-fixable.rs:23:14
+   |
+LL |         vec![0, 1]
+   |         ---------- this expression has type `Vec<{integer}>`
+LL |             .iter()
+   |              ------ `Iterator::Item` is `&{integer}` here
+LL |             .map(|x| x * 2)
+   |              -------------- `Iterator::Item` changed to `{integer}` here
+LL |             .map(|x| { x; })
+   |              ^^^^^^^^^^^^^^^ `Iterator::Item` changed to `()` here
+LL |             .map(|x| { x })
+   |              -------------- `Iterator::Item` remains `()` here
+note: required by a bound in `std::iter::Iterator::sum`
+  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider removing this semicolon
+   |
+LL -             .map(|x| { x; })
+LL +             .map(|x| { x })
+   |
+
+error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
+  --> $DIR/invalid-iterator-chain-fixable.rs:27:60
+   |
+LL |     println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
+   |                                                      ---   ^^^ value of type `i32` cannot be made by summing a `std::iter::Iterator<Item=()>`
+   |                                                      |
+   |                                                      required by a bound introduced by this call
+   |
+   = help: the trait `Sum<()>` is not implemented for `i32`
+   = help: the following other types implement trait `Sum<A>`:
+             <i32 as Sum>
+             <i32 as Sum<&'a i32>>
+note: the method call chain might not have had the expected associated types
+  --> $DIR/invalid-iterator-chain-fixable.rs:27:38
+   |
+LL |     println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
+   |                    ---------- ------ ^^^^^^^^^^^^^^^ `Iterator::Item` changed to `()` here
+   |                    |          |
+   |                    |          `Iterator::Item` is `&{integer}` here
+   |                    this expression has type `Vec<{integer}>`
+note: required by a bound in `std::iter::Iterator::sum`
+  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider removing this semicolon
+   |
+LL -     println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
+LL +     println!("{}", vec![0, 1].iter().map(|x| { x }).sum::<i32>());
+   |
+
+error[E0277]: a value of type `Vec<i32>` cannot be built from an iterator over elements of type `()`
+  --> $DIR/invalid-iterator-chain-fixable.rs:36:25
+   |
+LL |     let g: Vec<i32> = f.collect();
+   |                         ^^^^^^^ value of type `Vec<i32>` cannot be built from `std::iter::Iterator<Item=()>`
+   |
+   = help: the trait `FromIterator<()>` is not implemented for `Vec<i32>`
+   = help: the trait `FromIterator<i32>` is implemented for `Vec<i32>`
+   = help: for that trait implementation, expected `i32`, found `()`
+note: the method call chain might not have had the expected associated types
+  --> $DIR/invalid-iterator-chain-fixable.rs:32:15
+   |
+LL |       let a = vec![0];
+   |               ------- this expression has type `Vec<{integer}>`
+LL |       let b = a.into_iter();
+   |                 ----------- `Iterator::Item` is `{integer}` here
+LL |       let c = b.map(|x| x + 1);
+   |                 -------------- `Iterator::Item` remains `{integer}` here
+LL |       let d = c.filter(|x| *x > 10 );
+   |                 -------------------- `Iterator::Item` remains `{integer}` here
+LL |       let e = d.map(|x| {
+   |  _______________^
+LL | |         x + 1;
+LL | |     });
+   | |______^ `Iterator::Item` changed to `()` here
+LL |       let f = e.filter(|_| false);
+   |                 ----------------- `Iterator::Item` remains `()` here
+note: required by a bound in `collect`
+  --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider removing this semicolon
+   |
+LL -         x + 1;
+LL +         x + 1
+   |
+
+error: aborting due to 5 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/iterators/invalid-iterator-chain.stderr b/tests/ui/iterators/invalid-iterator-chain.stderr
index 2601c9c0d69..4dc13086912 100644
--- a/tests/ui/iterators/invalid-iterator-chain.stderr
+++ b/tests/ui/iterators/invalid-iterator-chain.stderr
@@ -1,6 +1,8 @@
 error[E0277]: a value of type `Vec<X>` cannot be built from an iterator over elements of type `&X`
   --> $DIR/invalid-iterator-chain.rs:6:7
    |
+LL |     let i = i.map(|x| x.clone());
+   |                         ------- this method call is cloning the reference `&X`, not `X` which doesn't implement `Clone`
 LL |     i.collect()
    |       ^^^^^^^ value of type `Vec<X>` cannot be built from `std::iter::Iterator<Item=&X>`
    |
@@ -16,6 +18,10 @@ LL |     let i = i.map(|x| x.clone());
    |               ------------------ `Iterator::Item` remains `&X` here
 note: required by a bound in `collect`
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider further restricting type parameter `X`
+   |
+LL | fn iter_to_vec<'b, X>(i: Iter<'b, X>) -> Vec<X> where X: Clone {
+   |                                                 ++++++++++++++
 
 error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
   --> $DIR/invalid-iterator-chain.rs:15:33
@@ -43,6 +49,11 @@ LL | |         });
    | |__________^ `Iterator::Item` changed to `()` here
 note: required by a bound in `std::iter::Iterator::sum`
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider removing this semicolon
+   |
+LL -             a + b;
+LL +             a + b
+   |
 
 error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `()`
   --> $DIR/invalid-iterator-chain.rs:26:20
@@ -77,6 +88,11 @@ LL |             .map(|x| { x; })
    |              ^^^^^^^^^^^^^^^ `Iterator::Item` changed to `()` here
 note: required by a bound in `std::iter::Iterator::sum`
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider removing this semicolon
+   |
+LL -             .map(|x| { x; })
+LL +             .map(|x| { x })
+   |
 
 error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `f64`
   --> $DIR/invalid-iterator-chain.rs:36:20
@@ -130,6 +146,11 @@ LL |     println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
    |                    this expression has type `Vec<{integer}>`
 note: required by a bound in `std::iter::Iterator::sum`
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider removing this semicolon
+   |
+LL -     println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
+LL +     println!("{}", vec![0, 1].iter().map(|x| { x }).sum::<i32>());
+   |
 
 error[E0277]: a value of type `i32` cannot be made by summing an iterator over elements of type `&()`
   --> $DIR/invalid-iterator-chain.rs:39:46
@@ -182,6 +203,11 @@ LL |       let f = e.filter(|_| false);
    |                 ----------------- `Iterator::Item` remains `()` here
 note: required by a bound in `collect`
   --> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
+help: consider removing this semicolon
+   |
+LL -         x + 1;
+LL +         x + 1
+   |
 
 error: aborting due to 7 previous errors
 
diff --git a/tests/ui/lang-items/start_lang_item_args.main_ret.stderr b/tests/ui/lang-items/start_lang_item_args.main_ret.stderr
index 4582b69850c..25570f96053 100644
--- a/tests/ui/lang-items/start_lang_item_args.main_ret.stderr
+++ b/tests/ui/lang-items/start_lang_item_args.main_ret.stderr
@@ -4,7 +4,7 @@ error[E0308]: lang item `start` function has wrong type
 LL | fn start<T>(_main: fn() -> u16, _argc: isize, _argv: *const *const u8, _sigpipe: u8) -> isize {
    |          -         ^^^^^^^^^^^ expected type parameter `T`, found `u16`
    |          |
-   |          this type parameter
+   |          expected this type parameter
    |
    = note: expected signature `fn(fn() -> T, _, _, _) -> _`
               found signature `fn(fn() -> u16, _, _, _) -> _`
diff --git a/tests/ui/late-bound-lifetimes/predicate-is-global.rs b/tests/ui/late-bound-lifetimes/predicate-is-global.rs
new file mode 100644
index 00000000000..be017a3f94f
--- /dev/null
+++ b/tests/ui/late-bound-lifetimes/predicate-is-global.rs
@@ -0,0 +1,40 @@
+// check-pass
+
+trait Foo {
+    type Assoc;
+
+    fn do_it(_: &Self::Assoc)
+    where
+        for<'a> Self: Baz<'a>;
+}
+
+trait Baz<'a>: Foo {}
+
+impl Foo for () {
+    type Assoc = Inherent;
+
+    // Ensure that the `for<'a> Self: Baz<'a>` predicate, which has
+    // a supertrait `for<'a> Self: Foo`, does not cause us to fail
+    // to normalize `Self::Assoc`.
+    fn do_it(x: &Self::Assoc)
+    where
+        for<'a> Self: Baz<'a>,
+    {
+        x.inherent();
+    }
+}
+
+struct Inherent;
+impl Inherent {
+    fn inherent(&self) {}
+}
+
+// This trivial bound doesn't hold, but the unused lifetime tripped up that check after #117589, and
+// showed up in its crater results (in `soa-derive 0.13.0`).
+fn do_it()
+where
+    for<'a> Inherent: Clone,
+{
+}
+
+fn main() {}
diff --git a/tests/ui/layout/cannot-transmute-unnormalizable-type.rs b/tests/ui/layout/cannot-transmute-unnormalizable-type.rs
index d2b6e1d8eba..1a2ff8c4705 100644
--- a/tests/ui/layout/cannot-transmute-unnormalizable-type.rs
+++ b/tests/ui/layout/cannot-transmute-unnormalizable-type.rs
@@ -16,7 +16,8 @@ struct Other {
 
 fn main() {
     unsafe {
+        // FIXME(oli-obk): make this report a transmute error again.
         std::mem::transmute::<Option<()>, Option<&Other>>(None);
-        //~^ ERROR cannot transmute between types of different sizes, or dependently-sized types
+        //^ ERROR cannot transmute between types of different sizes, or dependently-sized types
     }
 }
diff --git a/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr b/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr
index dd5119318ff..ee2c5ab7e39 100644
--- a/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr
+++ b/tests/ui/layout/cannot-transmute-unnormalizable-type.stderr
@@ -4,16 +4,6 @@ error[E0412]: cannot find type `Missing` in this scope
 LL |     Missing: Trait,
    |     ^^^^^^^ not found in this scope
 
-error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
-  --> $DIR/cannot-transmute-unnormalizable-type.rs:19:9
-   |
-LL |         std::mem::transmute::<Option<()>, Option<&Other>>(None);
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   |
-   = note: source type: `Option<()>` (8 bits)
-   = note: target type: `Option<&Other>` (unable to determine layout for `Other` because `<() as Trait>::RefTarget` cannot be normalized)
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
-Some errors have detailed explanations: E0412, E0512.
-For more information about an error, try `rustc --explain E0412`.
+For more information about this error, try `rustc --explain E0412`.
diff --git a/tests/ui/layout/issue-84108.rs b/tests/ui/layout/issue-84108.rs
index dd025c9b443..af21d1d6210 100644
--- a/tests/ui/layout/issue-84108.rs
+++ b/tests/ui/layout/issue-84108.rs
@@ -9,6 +9,8 @@ static FOO: (dyn AsRef<OsStr>, u8) = ("hello", 42);
 const BAR: (&Path, [u8], usize) = ("hello", [], 42);
 //~^ ERROR cannot find type `Path` in this scope
 //~| ERROR the size for values of type `[u8]` cannot be known at compilation time
+//~| ERROR mismatched types
 
 static BAZ: ([u8], usize) = ([], 0);
 //~^ ERROR the size for values of type `[u8]` cannot be known at compilation time
+//~| ERROR mismatched types
diff --git a/tests/ui/layout/issue-84108.stderr b/tests/ui/layout/issue-84108.stderr
index 5ad450bed07..3a02e73f96b 100644
--- a/tests/ui/layout/issue-84108.stderr
+++ b/tests/ui/layout/issue-84108.stderr
@@ -30,7 +30,7 @@ LL | const BAR: (&Path, [u8], usize) = ("hello", [], 42);
    = note: only the last element of a tuple may have a dynamically sized type
 
 error[E0277]: the size for values of type `[u8]` cannot be known at compilation time
-  --> $DIR/issue-84108.rs:13:13
+  --> $DIR/issue-84108.rs:14:13
    |
 LL | static BAZ: ([u8], usize) = ([], 0);
    |             ^^^^^^^^^^^^^ doesn't have a size known at compile-time
@@ -38,7 +38,25 @@ LL | static BAZ: ([u8], usize) = ([], 0);
    = help: the trait `Sized` is not implemented for `[u8]`
    = note: only the last element of a tuple may have a dynamically sized type
 
-error: aborting due to 4 previous errors
+error[E0308]: mismatched types
+  --> $DIR/issue-84108.rs:9:45
+   |
+LL | const BAR: (&Path, [u8], usize) = ("hello", [], 42);
+   |                                             ^^ expected `[u8]`, found `[_; 0]`
+   |
+   = note: expected slice `[u8]`
+              found array `[_; 0]`
+
+error[E0308]: mismatched types
+  --> $DIR/issue-84108.rs:14:30
+   |
+LL | static BAZ: ([u8], usize) = ([], 0);
+   |                              ^^ expected `[u8]`, found `[_; 0]`
+   |
+   = note: expected slice `[u8]`
+              found array `[_; 0]`
+
+error: aborting due to 6 previous errors
 
-Some errors have detailed explanations: E0277, E0412.
+Some errors have detailed explanations: E0277, E0308, E0412.
 For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/layout/too-big-with-padding.rs b/tests/ui/layout/too-big-with-padding.rs
new file mode 100644
index 00000000000..cf41ac872c2
--- /dev/null
+++ b/tests/ui/layout/too-big-with-padding.rs
@@ -0,0 +1,18 @@
+// build-fail
+// compile-flags: --target i686-unknown-linux-gnu --crate-type lib
+// needs-llvm-components: x86
+#![feature(no_core, lang_items)]
+#![allow(internal_features)]
+#![no_std]
+#![no_core]
+
+// 0x7fffffff is fine, but after rounding up it becomes too big
+#[repr(C, align(2))]
+pub struct Example([u8; 0x7fffffff]);
+
+pub fn lib(_x: Example) {} //~ERROR: too big for the current architecture
+
+#[lang = "sized"]
+pub trait Sized {}
+#[lang = "copy"]
+pub trait Copy: Sized {}
diff --git a/tests/ui/layout/too-big-with-padding.stderr b/tests/ui/layout/too-big-with-padding.stderr
new file mode 100644
index 00000000000..5cc854adce0
--- /dev/null
+++ b/tests/ui/layout/too-big-with-padding.stderr
@@ -0,0 +1,8 @@
+error: values of the type `Example` are too big for the current architecture
+  --> $DIR/too-big-with-padding.rs:13:1
+   |
+LL | pub fn lib(_x: Example) {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs b/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs
index f02a93ed41b..80aba0ba04d 100644
--- a/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs
+++ b/tests/ui/lazy-type-alias-impl-trait/freeze_cycle.rs
@@ -1,8 +1,8 @@
 // check-pass
 
-#![feature(generator_trait, negative_impls)]
+#![feature(coroutine_trait, negative_impls)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 use std::task::{Poll, Context};
 use std::future::{Future};
 use std::ptr::NonNull;
@@ -17,27 +17,27 @@ unsafe impl Send for ResumeTy {}
 
 unsafe impl Sync for ResumeTy {}
 
-pub const fn from_generator<T>(gen: T) -> impl Future<Output = T::Return>
+pub const fn from_coroutine<T>(gen: T) -> impl Future<Output = T::Return>
 where
-    T: Generator<ResumeTy, Yield = ()>,
+    T: Coroutine<ResumeTy, Yield = ()>,
 {
-    struct GenFuture<T: Generator<ResumeTy, Yield = ()>>(T);
+    struct GenFuture<T: Coroutine<ResumeTy, Yield = ()>>(T);
 
     // We rely on the fact that async/await futures are immovable in order to create
-    // self-referential borrows in the underlying generator.
-    impl<T: Generator<ResumeTy, Yield = ()>> !Unpin for GenFuture<T> {}
+    // self-referential borrows in the underlying coroutine.
+    impl<T: Coroutine<ResumeTy, Yield = ()>> !Unpin for GenFuture<T> {}
 
-    impl<T: Generator<ResumeTy, Yield = ()>> Future for GenFuture<T> {
+    impl<T: Coroutine<ResumeTy, Yield = ()>> Future for GenFuture<T> {
         type Output = T::Return;
         fn poll(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Self::Output> {
             // SAFETY: Safe because we're !Unpin + !Drop, and this is just a field projection.
             let gen = unsafe { Pin::map_unchecked_mut(self, |s| &mut s.0) };
 
-            // Resume the generator, turning the `&mut Context` into a `NonNull` raw pointer. The
+            // Resume the coroutine, turning the `&mut Context` into a `NonNull` raw pointer. The
             // `.await` lowering will safely cast that back to a `&mut Context`.
             match gen.resume(ResumeTy(NonNull::from(cx).cast::<Context<'static>>())) {
-                GeneratorState::Yielded(()) => Poll::Pending,
-                GeneratorState::Complete(x) => Poll::Ready(x),
+                CoroutineState::Yielded(()) => Poll::Pending,
+                CoroutineState::Complete(x) => Poll::Ready(x),
             }
         }
     }
diff --git a/tests/ui/lifetimes/borrowck-let-suggestion.stderr b/tests/ui/lifetimes/borrowck-let-suggestion.stderr
index da0078698ae..62119664764 100644
--- a/tests/ui/lifetimes/borrowck-let-suggestion.stderr
+++ b/tests/ui/lifetimes/borrowck-let-suggestion.stderr
@@ -10,6 +10,10 @@ LL |     x.use_mut();
    |     - borrow later used here
    |
    = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: consider consuming the `Vec<i32>` when turning it into an `Iterator`
+   |
+LL |     let mut x = vec![1].into_iter();
+   |                         ~~~~~~~~~
 help: consider using a `let` binding to create a longer lived value
    |
 LL ~     let binding = vec![1];
diff --git a/tests/ui/lifetimes/issue-26638.stderr b/tests/ui/lifetimes/issue-26638.stderr
index 30afcecf827..e61158a5d4d 100644
--- a/tests/ui/lifetimes/issue-26638.stderr
+++ b/tests/ui/lifetimes/issue-26638.stderr
@@ -44,6 +44,10 @@ LL | fn parse_type(iter: Box<dyn Iterator<Item=&str>+'static>) -> &str { iter.ne
    |
    = note: expected reference `&str`
                    found enum `Option<&str>`
+help: consider using `Option::expect` to unwrap the `Option<&str>` value, panicking if the value is an `Option::None`
+   |
+LL | fn parse_type(iter: Box<dyn Iterator<Item=&str>+'static>) -> &str { iter.next().expect("REASON") }
+   |                                                                                +++++++++++++++++
 
 error[E0061]: this function takes 1 argument but 0 arguments were supplied
   --> $DIR/issue-26638.rs:5:47
diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs b/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs
new file mode 100644
index 00000000000..b0b6b318d8f
--- /dev/null
+++ b/tests/ui/lifetimes/issue-76168-hr-outlives-3.rs
@@ -0,0 +1,19 @@
+// edition:2018
+
+#![feature(unboxed_closures)]
+use std::future::Future;
+
+async fn wrapper<F>(f: F)
+//~^ ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+//~| ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+//~| ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+where
+    F:,
+    for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
+{
+    //~^ ERROR: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+    let mut i = 41;
+    &mut i;
+}
+
+fn main() {}
diff --git a/tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr b/tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr
new file mode 100644
index 00000000000..5b77051dc88
--- /dev/null
+++ b/tests/ui/lifetimes/issue-76168-hr-outlives-3.stderr
@@ -0,0 +1,51 @@
+error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+  --> $DIR/issue-76168-hr-outlives-3.rs:6:1
+   |
+LL | / async fn wrapper<F>(f: F)
+LL | |
+LL | |
+LL | |
+LL | | where
+LL | |     F:,
+LL | |     for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
+   | |______________________________________________________________________________^ expected an `FnOnce(&'a mut i32)` closure, found `i32`
+   |
+   = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32`
+
+error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+  --> $DIR/issue-76168-hr-outlives-3.rs:6:10
+   |
+LL | async fn wrapper<F>(f: F)
+   |          ^^^^^^^ expected an `FnOnce(&'a mut i32)` closure, found `i32`
+   |
+   = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32`
+
+error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+  --> $DIR/issue-76168-hr-outlives-3.rs:13:1
+   |
+LL | / {
+LL | |
+LL | |     let mut i = 41;
+LL | |     &mut i;
+LL | | }
+   | |_^ expected an `FnOnce(&'a mut i32)` closure, found `i32`
+   |
+   = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32`
+
+error[E0277]: expected a `FnOnce(&'a mut i32)` closure, found `i32`
+  --> $DIR/issue-76168-hr-outlives-3.rs:6:1
+   |
+LL | / async fn wrapper<F>(f: F)
+LL | |
+LL | |
+LL | |
+LL | | where
+LL | |     F:,
+LL | |     for<'a> <i32 as FnOnce<(&'a mut i32,)>>::Output: Future<Output = ()> + 'a,
+   | |______________________________________________________________________________^ expected an `FnOnce(&'a mut i32)` closure, found `i32`
+   |
+   = help: the trait `for<'a> FnOnce<(&'a mut i32,)>` is not implemented for `i32`
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/lifetimes/issue-77175.rs b/tests/ui/lifetimes/issue-77175.rs
index 2282752b6c1..8072691ae3c 100644
--- a/tests/ui/lifetimes/issue-77175.rs
+++ b/tests/ui/lifetimes/issue-77175.rs
@@ -5,7 +5,7 @@
 // Prior to the fix, the compiler complained that the 'a lifetime was only used
 // once. This was obviously wrong since the lifetime is used twice: For the s3
 // parameter and the return type. The issue was caused by the compiler
-// desugaring the async function into a generator that uses only a single
+// desugaring the async function into a coroutine that uses only a single
 // lifetime, which then the validator complained about becauase of the
 // single_use_lifetimes constraints.
 async fn bar<'a>(s1: String, s2: &'_ str, s3: &'a str) -> &'a str {
diff --git a/tests/ui/lint/bare-trait-objects-path.stderr b/tests/ui/lint/bare-trait-objects-path.stderr
index a19f4963c23..01ca08a6f19 100644
--- a/tests/ui/lint/bare-trait-objects-path.stderr
+++ b/tests/ui/lint/bare-trait-objects-path.stderr
@@ -16,7 +16,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/bare-trait-objects-path.rs:23:12
    |
 LL |     let _: Dyn::Ty;
-   |            ^^^^^^^ help: use the fully-qualified path: `<dyn Dyn as Assoc>::Ty`
+   |            ^^^^^^^ help: use fully-qualified syntax: `<dyn Dyn as Assoc>::Ty`
 
 warning: trait objects without an explicit `dyn` are deprecated
   --> $DIR/bare-trait-objects-path.rs:14:5
diff --git a/tests/ui/lint/lint-unnecessary-parens.fixed b/tests/ui/lint/lint-unnecessary-parens.fixed
index bafac05d8da..b17914da6e6 100644
--- a/tests/ui/lint/lint-unnecessary-parens.fixed
+++ b/tests/ui/lint/lint-unnecessary-parens.fixed
@@ -84,6 +84,14 @@ fn main() {
     _a = 0; //~ ERROR unnecessary parentheses around assigned value
     _a += 1; //~ ERROR unnecessary parentheses around assigned value
 
+    let mut _a = 3; //~ ERROR unnecessary parentheses around pattern
+    let mut _a = 3; //~ ERROR unnecessary parentheses around pattern
+    let mut _a = 3; //~ ERROR unnecessary parentheses around pattern
+
+    let _a = 3; //~ ERROR unnecessary parentheses around pattern
+    let _a = 3; //~ ERROR unnecessary parentheses around pattern
+    let _a = 3; //~ ERROR unnecessary parentheses around pattern
+
     let _a = baz!(3, 4);
     let _b = baz!(3);
 }
diff --git a/tests/ui/lint/lint-unnecessary-parens.rs b/tests/ui/lint/lint-unnecessary-parens.rs
index ce537a4dc1d..4cbd6562cd3 100644
--- a/tests/ui/lint/lint-unnecessary-parens.rs
+++ b/tests/ui/lint/lint-unnecessary-parens.rs
@@ -84,6 +84,14 @@ fn main() {
     _a = (0); //~ ERROR unnecessary parentheses around assigned value
     _a += (1); //~ ERROR unnecessary parentheses around assigned value
 
+    let(mut _a) = 3; //~ ERROR unnecessary parentheses around pattern
+    let (mut _a) = 3; //~ ERROR unnecessary parentheses around pattern
+    let( mut _a) = 3; //~ ERROR unnecessary parentheses around pattern
+
+    let(_a) = 3; //~ ERROR unnecessary parentheses around pattern
+    let (_a) = 3; //~ ERROR unnecessary parentheses around pattern
+    let( _a) = 3; //~ ERROR unnecessary parentheses around pattern
+
     let _a = baz!(3, 4);
     let _b = baz!(3);
 }
diff --git a/tests/ui/lint/lint-unnecessary-parens.stderr b/tests/ui/lint/lint-unnecessary-parens.stderr
index 2ad07530f8c..ba7a78b8da1 100644
--- a/tests/ui/lint/lint-unnecessary-parens.stderr
+++ b/tests/ui/lint/lint-unnecessary-parens.stderr
@@ -267,5 +267,77 @@ LL -     _a += (1);
 LL +     _a += 1;
    |
 
-error: aborting due to 22 previous errors
+error: unnecessary parentheses around pattern
+  --> $DIR/lint-unnecessary-parens.rs:87:8
+   |
+LL |     let(mut _a) = 3;
+   |        ^      ^
+   |
+help: remove these parentheses
+   |
+LL -     let(mut _a) = 3;
+LL +     let mut _a = 3;
+   |
+
+error: unnecessary parentheses around pattern
+  --> $DIR/lint-unnecessary-parens.rs:88:9
+   |
+LL |     let (mut _a) = 3;
+   |         ^      ^
+   |
+help: remove these parentheses
+   |
+LL -     let (mut _a) = 3;
+LL +     let mut _a = 3;
+   |
+
+error: unnecessary parentheses around pattern
+  --> $DIR/lint-unnecessary-parens.rs:89:8
+   |
+LL |     let( mut _a) = 3;
+   |        ^^      ^
+   |
+help: remove these parentheses
+   |
+LL -     let( mut _a) = 3;
+LL +     let mut _a = 3;
+   |
+
+error: unnecessary parentheses around pattern
+  --> $DIR/lint-unnecessary-parens.rs:91:8
+   |
+LL |     let(_a) = 3;
+   |        ^  ^
+   |
+help: remove these parentheses
+   |
+LL -     let(_a) = 3;
+LL +     let _a = 3;
+   |
+
+error: unnecessary parentheses around pattern
+  --> $DIR/lint-unnecessary-parens.rs:92:9
+   |
+LL |     let (_a) = 3;
+   |         ^  ^
+   |
+help: remove these parentheses
+   |
+LL -     let (_a) = 3;
+LL +     let _a = 3;
+   |
+
+error: unnecessary parentheses around pattern
+  --> $DIR/lint-unnecessary-parens.rs:93:8
+   |
+LL |     let( _a) = 3;
+   |        ^^  ^
+   |
+help: remove these parentheses
+   |
+LL -     let( _a) = 3;
+LL +     let _a = 3;
+   |
+
+error: aborting due to 28 previous errors
 
diff --git a/tests/ui/lint/missing-copy-implementations-non-exhaustive.rs b/tests/ui/lint/missing-copy-implementations-non-exhaustive.rs
new file mode 100644
index 00000000000..2d5e90720ef
--- /dev/null
+++ b/tests/ui/lint/missing-copy-implementations-non-exhaustive.rs
@@ -0,0 +1,25 @@
+// Test for issue #116766.
+// Ensure that we don't suggest impl'ing `Copy` for a type if it or at least one
+// of it's variants are marked as `non_exhaustive`.
+
+// check-pass
+
+#![deny(missing_copy_implementations)]
+
+#[non_exhaustive]
+pub enum MyEnum {
+    A,
+}
+
+#[non_exhaustive]
+pub struct MyStruct {
+    foo: usize,
+}
+
+pub enum MyEnum2 {
+    #[non_exhaustive]
+    A,
+    B,
+}
+
+fn main() {}
diff --git a/tests/ui/lint/must_not_suspend/tuple-mismatch.rs b/tests/ui/lint/must_not_suspend/tuple-mismatch.rs
index c7e14e42561..2f3c5d9ea29 100644
--- a/tests/ui/lint/must_not_suspend/tuple-mismatch.rs
+++ b/tests/ui/lint/must_not_suspend/tuple-mismatch.rs
@@ -1,7 +1,7 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn main() {
-    let _generator = || {
+    let _coroutine = || {
         yield ((), ((), ()));
         yield ((), ());
         //~^ ERROR mismatched types
diff --git a/tests/ui/lint/unused/issue-117284-arg-in-macro.rs b/tests/ui/lint/unused/issue-117284-arg-in-macro.rs
new file mode 100644
index 00000000000..eea0f4c594d
--- /dev/null
+++ b/tests/ui/lint/unused/issue-117284-arg-in-macro.rs
@@ -0,0 +1,17 @@
+#![deny(unused_variables)]
+macro_rules! make_var {
+    ($struct:ident, $var:ident) => {
+        let $var = $struct.$var;
+    };
+}
+
+#[allow(unused)]
+struct MyStruct {
+    var: i32,
+}
+
+fn main() {
+    let s = MyStruct { var: 42 };
+    make_var!(s, var); //~ ERROR unused variable: `var`
+    let a = 1; //~ ERROR unused variable: `a`
+}
diff --git a/tests/ui/lint/unused/issue-117284-arg-in-macro.stderr b/tests/ui/lint/unused/issue-117284-arg-in-macro.stderr
new file mode 100644
index 00000000000..84efaa4f368
--- /dev/null
+++ b/tests/ui/lint/unused/issue-117284-arg-in-macro.stderr
@@ -0,0 +1,29 @@
+error: unused variable: `var`
+  --> $DIR/issue-117284-arg-in-macro.rs:15:18
+   |
+LL |     make_var!(s, var);
+   |                  ^^^
+   |
+help: `var` is captured in macro and introduced a unused variable
+  --> $DIR/issue-117284-arg-in-macro.rs:4:13
+   |
+LL |         let $var = $struct.$var;
+   |             ^^^^
+...
+LL |     make_var!(s, var);
+   |     ----------------- in this macro invocation
+note: the lint level is defined here
+  --> $DIR/issue-117284-arg-in-macro.rs:1:9
+   |
+LL | #![deny(unused_variables)]
+   |         ^^^^^^^^^^^^^^^^
+   = note: this error originates in the macro `make_var` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: unused variable: `a`
+  --> $DIR/issue-117284-arg-in-macro.rs:16:9
+   |
+LL |     let a = 1;
+   |         ^ help: if this is intentional, prefix it with an underscore: `_a`
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/lint/unused/issue-74883-unused-paren-baren-yield.rs b/tests/ui/lint/unused/issue-74883-unused-paren-baren-yield.rs
index 8064c3a88d1..c5dd281cb4e 100644
--- a/tests/ui/lint/unused/issue-74883-unused-paren-baren-yield.rs
+++ b/tests/ui/lint/unused/issue-74883-unused-paren-baren-yield.rs
@@ -1,8 +1,8 @@
-#![feature(generator_trait)]
-#![feature(generators)]
+#![feature(coroutine_trait)]
+#![feature(coroutines)]
 #![deny(unused_braces, unused_parens)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 
 fn main() {
diff --git a/tests/ui/lint/unused/lint-unused-imports.rs b/tests/ui/lint/unused/lint-unused-imports.rs
index 953992ecf71..4fa6511c97e 100644
--- a/tests/ui/lint/unused/lint-unused-imports.rs
+++ b/tests/ui/lint/unused/lint-unused-imports.rs
@@ -42,7 +42,7 @@ mod foo {
     pub struct Square{pub p: Point, pub h: usize, pub w: usize}
 }
 
-mod bar {
+pub mod bar {
     // Don't ignore on 'pub use' because we're not sure if it's used or not
     pub use std::cmp::PartialEq;
     pub struct Square;
diff --git a/tests/ui/lint/unused/unused-closure.rs b/tests/ui/lint/unused/unused-closure.rs
index c96c907318c..12ee8b3a9bb 100644
--- a/tests/ui/lint/unused/unused-closure.rs
+++ b/tests/ui/lint/unused/unused-closure.rs
@@ -1,8 +1,8 @@
-// Test that closures and generators are "must use" types.
+// Test that closures and coroutines are "must use" types.
 // edition:2018
 
 #![feature(async_closure)]
-#![feature(generators)]
+#![feature(coroutines)]
 #![deny(unused_must_use)]
 
 fn unused() {
diff --git a/tests/ui/liveness/liveness-upvars.rs b/tests/ui/liveness/liveness-upvars.rs
index d446d57d396..17158dfbc6c 100644
--- a/tests/ui/liveness/liveness-upvars.rs
+++ b/tests/ui/liveness/liveness-upvars.rs
@@ -1,6 +1,6 @@
 // edition:2018
 // check-pass
-#![feature(generators)]
+#![feature(coroutines)]
 #![warn(unused)]
 #![allow(unreachable_code)]
 
@@ -60,7 +60,7 @@ pub fn f() {
     };
     let _ = async move {
         println!("{}", c);
-        // Never read because this is a generator.
+        // Never read because this is a coroutine.
         c += 1; //~  WARN value assigned to `c` is never read
     };
 }
@@ -110,7 +110,7 @@ async fn yield_now() {
     todo!();
 }
 
-pub fn async_generator() {
+pub fn async_coroutine() {
     let mut state: u32 = 0;
 
     let _ = async {
@@ -129,7 +129,7 @@ pub fn async_generator() {
     };
 }
 
-pub fn generator() {
+pub fn coroutine() {
     let mut s: u32 = 0;
     let _ = |_| {
         s = 0;
diff --git a/tests/ui/macros/stringify.rs b/tests/ui/macros/stringify.rs
index 8b4e6250a30..f1bbd4a6210 100644
--- a/tests/ui/macros/stringify.rs
+++ b/tests/ui/macros/stringify.rs
@@ -2,496 +2,441 @@
 // edition:2021
 // compile-flags: --test
 
+#![allow(incomplete_features)]
 #![feature(async_closure)]
 #![feature(auto_traits)]
 #![feature(box_patterns)]
 #![feature(const_trait_impl)]
+#![feature(coroutines)]
 #![feature(decl_macro)]
-#![feature(generators)]
+#![feature(explicit_tail_calls)]
 #![feature(more_qualified_paths)]
 #![feature(raw_ref_op)]
 #![feature(trait_alias)]
 #![feature(try_blocks)]
 #![feature(type_ascription)]
+#![feature(yeet_expr)]
 #![deny(unused_macros)]
 
-macro_rules! stringify_block {
-    ($block:block) => {
-        stringify!($block)
+// These macros force the use of AST pretty-printing by converting the input to
+// a particular fragment specifier.
+macro_rules! block { ($block:block) => { stringify!($block) }; }
+macro_rules! expr { ($expr:expr) => { stringify!($expr) }; }
+macro_rules! item { ($item:item) => { stringify!($item) }; }
+macro_rules! meta { ($meta:meta) => { stringify!($meta) }; }
+macro_rules! pat { ($pat:pat) => { stringify!($pat) }; }
+macro_rules! path { ($path:path) => { stringify!($path) }; }
+macro_rules! stmt { ($stmt:stmt) => { stringify!($stmt) }; }
+macro_rules! ty { ($ty:ty) => { stringify!($ty) }; }
+macro_rules! vis { ($vis:vis) => { stringify!($vis) }; }
+
+// Use this when AST pretty-printing and TokenStream pretty-printing give
+// the same result (which is preferable.)
+macro_rules! c1 {
+    ($frag:ident, [$($tt:tt)*], $s:literal) => {
+        assert_eq!($frag!($($tt)*), $s);
+        assert_eq!(stringify!($($tt)*), $s);
     };
 }
 
-macro_rules! stringify_expr {
-    ($expr:expr) => {
-        stringify!($expr)
-    };
-}
-
-macro_rules! stringify_item {
-    ($item:item) => {
-        stringify!($item)
-    };
-}
-
-macro_rules! stringify_meta {
-    ($meta:meta) => {
-        stringify!($meta)
-    };
-}
-
-macro_rules! stringify_pat {
-    ($pat:pat) => {
-        stringify!($pat)
-    };
-}
-
-macro_rules! stringify_path {
-    ($path:path) => {
-        stringify!($path)
-    };
-}
-
-macro_rules! stringify_stmt {
-    ($stmt:stmt) => {
-        stringify!($stmt)
-    };
-}
-
-macro_rules! stringify_ty {
-    ($ty:ty) => {
-        stringify!($ty)
-    };
-}
-
-macro_rules! stringify_vis {
-    ($vis:vis) => {
-        stringify!($vis)
+// Use this when AST pretty-printing and TokenStream pretty-printing give
+// different results.
+//
+// `c1` and `c2` could be in a single macro, but having them separate makes it
+// easy to find the cases where the two pretty-printing approaches give
+// different results.
+macro_rules! c2 {
+    ($frag:ident, [$($tt:tt)*], $s1:literal, $s2:literal) => {
+        assert_ne!($s1, $s2, "should use `c1!` instead");
+        assert_eq!($frag!($($tt)*), $s1);
+        assert_eq!(stringify!($($tt)*), $s2);
     };
 }
 
 #[test]
 fn test_block() {
-    assert_eq!(stringify_block!({}), "{}");
-    assert_eq!(stringify_block!({ true }), "{ true }");
-    assert_eq!(stringify_block!({ return }), "{ return }");
-    assert_eq!(
-        stringify_block!({
+    c1!(block, [ {} ], "{}");
+    c1!(block, [ { true } ], "{ true }");
+    c1!(block, [ { return } ], "{ return }");
+    c2!(block, [ {
             return;
-        }),
+        } ],
         "{ return; }",
+        "{ return ; }"
     );
-    assert_eq!(
-        stringify_block!({
+    c2!(block,
+        [ {
             let _;
             true
-        }),
+        } ],
         "{ let _; true }",
+        "{ let _ ; true }"
     );
 }
 
 #[test]
 fn test_expr() {
     // ExprKind::Array
-    assert_eq!(stringify_expr!([]), "[]");
-    assert_eq!(stringify_expr!([true]), "[true]");
-    assert_eq!(stringify_expr!([true,]), "[true]");
-    assert_eq!(stringify_expr!([true, true]), "[true, true]");
+    c1!(expr, [ [] ], "[]");
+    c1!(expr, [ [true] ], "[true]");
+    c2!(expr, [ [true,] ], "[true]", "[true,]");
+    c1!(expr, [ [true, true] ], "[true, true]");
+
+    // ExprKind::ConstBlock
+    // FIXME: todo
 
     // ExprKind::Call
-    assert_eq!(stringify_expr!(f()), "f()");
-    assert_eq!(stringify_expr!(f::<u8>()), "f::<u8>()");
-    assert_eq!(stringify_expr!(f::<1>()), "f::<1>()");
-    assert_eq!(stringify_expr!(f::<'a, u8, 1>()), "f::<'a, u8, 1>()");
-    assert_eq!(stringify_expr!(f(true)), "f(true)");
-    assert_eq!(stringify_expr!(f(true,)), "f(true)");
-    assert_eq!(stringify_expr!(()()), "()()");
+    c1!(expr, [ f() ], "f()");
+    c2!(expr, [ f::<u8>() ], "f::<u8>()", "f :: < u8 > ()");
+    c2!(expr, [ f::<1>() ], "f::<1>()", "f :: < 1 > ()");
+    c2!(expr, [ f::<'a, u8, 1>() ], "f::<'a, u8, 1>()", "f :: < 'a, u8, 1 > ()");
+    c1!(expr, [ f(true) ], "f(true)");
+    c2!(expr, [ f(true,) ], "f(true)", "f(true,)");
+    c2!(expr, [ ()() ], "()()", "() ()");
 
     // ExprKind::MethodCall
-    assert_eq!(stringify_expr!(x.f()), "x.f()");
-    assert_eq!(stringify_expr!(x.f::<u8>()), "x.f::<u8>()");
+    c1!(expr, [ x.f() ], "x.f()");
+    c2!(expr, [ x.f::<u8>() ], "x.f::<u8>()", "x.f :: < u8 > ()");
+    c2!(expr, [ x.collect::<Vec<_>>() ], "x.collect::<Vec<_>>()", "x.collect :: < Vec < _ >> ()");
 
     // ExprKind::Tup
-    assert_eq!(stringify_expr!(()), "()");
-    assert_eq!(stringify_expr!((true,)), "(true,)");
-    assert_eq!(stringify_expr!((true, false)), "(true, false)");
-    assert_eq!(stringify_expr!((true, false,)), "(true, false)");
+    c1!(expr, [ () ], "()");
+    c1!(expr, [ (true,) ], "(true,)");
+    c1!(expr, [ (true, false) ], "(true, false)");
+    c2!(expr, [ (true, false,) ], "(true, false)", "(true, false,)");
 
     // ExprKind::Binary
-    assert_eq!(stringify_expr!(true || false), "true || false");
-    assert_eq!(stringify_expr!(true || false && false), "true || false && false");
+    c1!(expr, [ true || false ], "true || false");
+    c1!(expr, [ true || false && false ], "true || false && false");
+    c1!(expr, [ a < 1 && 2 < b && c > 3 && 4 > d ], "a < 1 && 2 < b && c > 3 && 4 > d");
+    c2!(expr, [ a & b & !c ], "a & b & !c", "a & b &! c"); // FIXME
+    c2!(expr,
+        [ a + b * c - d + -1 * -2 - -3],
+        "a + b * c - d + -1 * -2 - -3",
+        "a + b * c - d + - 1 * - 2 - - 3"
+    );
 
     // ExprKind::Unary
-    assert_eq!(stringify_expr!(*expr), "*expr");
-    assert_eq!(stringify_expr!(!expr), "!expr");
-    assert_eq!(stringify_expr!(-expr), "-expr");
+    c2!(expr, [ *expr ], "*expr", "* expr");
+    c2!(expr, [ !expr ], "!expr", "! expr");
+    c2!(expr, [ -expr ], "-expr", "- expr");
 
     // ExprKind::Lit
-    assert_eq!(stringify_expr!('x'), "'x'");
-    assert_eq!(stringify_expr!(1_000_i8), "1_000_i8");
-    assert_eq!(stringify_expr!(1.00000000000000001), "1.00000000000000001");
+    c1!(expr, [ 'x' ], "'x'");
+    c1!(expr, [ 1_000_i8 ], "1_000_i8");
+    c1!(expr, [ 1.00000000000000001 ], "1.00000000000000001");
 
     // ExprKind::Cast
-    assert_eq!(stringify_expr!(expr as T), "expr as T");
-    assert_eq!(stringify_expr!(expr as T<u8>), "expr as T<u8>");
+    c1!(expr, [ expr as T ], "expr as T");
+    c2!(expr, [ expr as T<u8> ], "expr as T<u8>", "expr as T < u8 >");
+
+    // ExprKind::Type: there is no syntax for type ascription.
 
-    // ExprKind::Type
-    // There is no syntax for type ascription.
+    // ExprKind::Let
+    c1!(expr, [ if let Some(a) = b { c } else { d } ], "if let Some(a) = b { c } else { d }");
 
     // ExprKind::If
-    assert_eq!(stringify_expr!(if true {}), "if true {}");
-    assert_eq!(
-        stringify_expr!(if true {
-        } else {
-        }),
-        "if true {} else {}",
-    );
-    assert_eq!(
-        stringify_expr!(if let true = true {
-        } else {
-        }),
-        "if let true = true {} else {}",
-    );
-    assert_eq!(
-        stringify_expr!(if true {
+    c1!(expr, [ if true {} ], "if true {}");
+    c2!(expr,
+        [ if ::std::blah() { } else { } ],
+        "if ::std::blah() {} else {}",
+        "if :: std :: blah() {} else {}"
+    );
+    c1!(expr, [ if let true = true {} else {} ], "if let true = true {} else {}");
+    c1!(expr,
+        [ if true {
         } else if false {
-        }),
-        "if true {} else if false {}",
+        } ],
+        "if true {} else if false {}"
     );
-    assert_eq!(
-        stringify_expr!(if true {
+    c1!(expr,
+        [ if true {
         } else if false {
         } else {
-        }),
-        "if true {} else if false {} else {}",
+        } ],
+        "if true {} else if false {} else {}"
     );
-    assert_eq!(
-        stringify_expr!(if true {
+    c2!(expr,
+        [ if true {
             return;
         } else if false {
             0
         } else {
             0
-        }),
+        } ],
         "if true { return; } else if false { 0 } else { 0 }",
+        "if true { return ; } else if false { 0 } else { 0 }"
     );
 
     // ExprKind::While
-    assert_eq!(stringify_expr!(while true {}), "while true {}");
-    assert_eq!(stringify_expr!('a: while true {}), "'a: while true {}");
-    assert_eq!(stringify_expr!(while let true = true {}), "while let true = true {}");
+    c1!(expr, [ while true {} ], "while true {}");
+    c2!(expr, [ 'a: while true {} ], "'a: while true {}", "'a : while true {}");
+    c1!(expr, [ while let true = true {} ], "while let true = true {}");
 
     // ExprKind::ForLoop
-    assert_eq!(stringify_expr!(for _ in x {}), "for _ in x {}");
-    assert_eq!(stringify_expr!('a: for _ in x {}), "'a: for _ in x {}");
+    c1!(expr, [ for _ in x {} ], "for _ in x {}");
+    c2!(expr, [ 'a: for _ in x {} ], "'a: for _ in x {}", "'a : for _ in x {}");
 
     // ExprKind::Loop
-    assert_eq!(stringify_expr!(loop {}), "loop {}");
-    assert_eq!(stringify_expr!('a: loop {}), "'a: loop {}");
+    c1!(expr, [ loop {} ], "loop {}");
+    c2!(expr, [ 'a: loop {} ], "'a: loop {}", "'a : loop {}");
 
     // ExprKind::Match
-    assert_eq!(stringify_expr!(match self {}), "match self {}");
-    assert_eq!(
-        stringify_expr!(match self {
+    c1!(expr, [ match self {} ], "match self {}");
+    c1!(expr,
+        [ match self {
             Ok => 1,
-        }),
-        "match self { Ok => 1, }",
+        } ],
+        "match self { Ok => 1, }"
     );
-    assert_eq!(
-        stringify_expr!(match self {
+    c1!(expr,
+        [ match self {
             Ok => 1,
             Err => 0,
-        }),
-        "match self { Ok => 1, Err => 0, }",
+        } ],
+        "match self { Ok => 1, Err => 0, }"
     );
 
     // ExprKind::Closure
-    assert_eq!(stringify_expr!(|| {}), "|| {}");
-    assert_eq!(stringify_expr!(|x| {}), "|x| {}");
-    assert_eq!(stringify_expr!(|x: u8| {}), "|x: u8| {}");
-    assert_eq!(stringify_expr!(|| ()), "|| ()");
-    assert_eq!(stringify_expr!(move || self), "move || self");
-    assert_eq!(stringify_expr!(async || self), "async || self");
-    assert_eq!(stringify_expr!(async move || self), "async move || self");
-    assert_eq!(stringify_expr!(static || self), "static || self");
-    assert_eq!(stringify_expr!(static move || self), "static move || self");
-    #[rustfmt::skip] // https://github.com/rust-lang/rustfmt/issues/5149
-    assert_eq!(
-        stringify_expr!(static async || self),
-        "static async || self",
-    );
-    #[rustfmt::skip] // https://github.com/rust-lang/rustfmt/issues/5149
-    assert_eq!(
-        stringify_expr!(static async move || self),
-        "static async move || self",
-    );
-    assert_eq!(stringify_expr!(|| -> u8 { self }), "|| -> u8 { self }");
-    assert_eq!(stringify_expr!(1 + || {}), "1 + (|| {})"); // ??
+    c1!(expr, [ || {} ], "|| {}");
+    c2!(expr, [ |x| {} ], "|x| {}", "| x | {}");
+    c2!(expr, [ |x: u8| {} ], "|x: u8| {}", "| x : u8 | {}");
+    c1!(expr, [ || () ], "|| ()");
+    c1!(expr, [ move || self ], "move || self");
+    c1!(expr, [ async || self ], "async || self");
+    c1!(expr, [ async move || self ], "async move || self");
+    c1!(expr, [ static || self ], "static || self");
+    c1!(expr, [ static move || self ], "static move || self");
+    c1!(expr, [ static async || self ], "static async || self");
+    c1!(expr, [ static async move || self ], "static async move || self");
+    c1!(expr, [ || -> u8 { self } ], "|| -> u8 { self }");
+    c2!(expr, [ 1 + || {} ], "1 + (|| {})", "1 + || {}"); // AST??
 
     // ExprKind::Block
-    assert_eq!(stringify_expr!({}), "{}");
-    assert_eq!(stringify_expr!(unsafe {}), "unsafe {}");
-    assert_eq!(stringify_expr!('a: {}), "'a: {}");
-    assert_eq!(
-        stringify_expr!(
-            #[attr]
-            {}
-        ),
-        "#[attr] {}",
-    );
-    assert_eq!(
-        stringify_expr!(
+    c1!(expr, [ {} ], "{}");
+    c1!(expr, [ unsafe {} ], "unsafe {}");
+    c2!(expr, [ 'a: {} ], "'a: {}", "'a : {}");
+    c1!(expr, [ #[attr] {} ], "#[attr] {}");
+    c2!(expr,
+        [
             {
                 #![attr]
             }
-        ),
+        ],
         "{\n\
         \x20   #![attr]\n\
         }",
+        "{ #! [attr] }"
     );
 
     // ExprKind::Async
-    assert_eq!(stringify_expr!(async {}), "async {}");
-    assert_eq!(stringify_expr!(async move {}), "async move {}");
+    c1!(expr, [ async {} ], "async {}");
+    c1!(expr, [ async move {} ], "async move {}");
 
     // ExprKind::Await
-    assert_eq!(stringify_expr!(expr.await), "expr.await");
+    c1!(expr, [ expr.await ], "expr.await");
 
     // ExprKind::TryBlock
-    assert_eq!(stringify_expr!(try {}), "try {}");
+    c1!(expr, [ try {} ], "try {}");
 
     // ExprKind::Assign
-    assert_eq!(stringify_expr!(expr = true), "expr = true");
+    c1!(expr, [ expr = true ], "expr = true");
 
     // ExprKind::AssignOp
-    assert_eq!(stringify_expr!(expr += true), "expr += true");
+    c1!(expr, [ expr += true ], "expr += true");
 
     // ExprKind::Field
-    assert_eq!(stringify_expr!(expr.field), "expr.field");
-    assert_eq!(stringify_expr!(expr.0), "expr.0");
+    c1!(expr, [ expr.field ], "expr.field");
+    c1!(expr, [ expr.0 ], "expr.0");
 
     // ExprKind::Index
-    assert_eq!(stringify_expr!(expr[true]), "expr[true]");
+    c2!(expr, [ expr[true] ], "expr[true]", "expr [true]");
 
     // ExprKind::Range
-    assert_eq!(stringify_expr!(..), "..");
-    assert_eq!(stringify_expr!(..hi), "..hi");
-    assert_eq!(stringify_expr!(lo..), "lo..");
-    assert_eq!(stringify_expr!(lo..hi), "lo..hi");
-    assert_eq!(stringify_expr!(..=hi), "..=hi");
-    assert_eq!(stringify_expr!(lo..=hi), "lo..=hi");
-    assert_eq!(stringify_expr!(-2..=-1), "-2..=-1");
+    c1!(expr, [ .. ], "..");
+    c2!(expr, [ ..hi ], "..hi", ".. hi");
+    c2!(expr, [ lo.. ], "lo..", "lo ..");
+    c2!(expr, [ lo..hi ], "lo..hi", "lo .. hi");
+    c2!(expr, [ ..=hi ], "..=hi", "..= hi");
+    c2!(expr, [ lo..=hi ], "lo..=hi", "lo ..= hi");
+    c2!(expr, [ -2..=-1 ], "-2..=-1", "- 2 ..= - 1");
+
+    // ExprKind::Underscore
+    // FIXME: todo
 
     // ExprKind::Path
-    assert_eq!(stringify_expr!(thing), "thing");
-    assert_eq!(stringify_expr!(m::thing), "m::thing");
-    assert_eq!(stringify_expr!(self::thing), "self::thing");
-    assert_eq!(stringify_expr!(crate::thing), "crate::thing");
-    assert_eq!(stringify_expr!(Self::thing), "Self::thing");
-    assert_eq!(stringify_expr!(<Self as T>::thing), "<Self as T>::thing");
-    assert_eq!(stringify_expr!(Self::<'static>), "Self::<'static>");
+    c1!(expr, [ thing ], "thing");
+    c2!(expr, [ m::thing ], "m::thing", "m :: thing");
+    c2!(expr, [ self::thing ], "self::thing", "self :: thing");
+    c2!(expr, [ crate::thing ], "crate::thing", "crate :: thing");
+    c2!(expr, [ Self::thing ], "Self::thing", "Self :: thing");
+    c2!(expr, [ <Self as T>::thing ], "<Self as T>::thing", "< Self as T > :: thing");
+    c2!(expr, [ Self::<'static> ], "Self::<'static>", "Self :: < 'static >");
 
     // ExprKind::AddrOf
-    assert_eq!(stringify_expr!(&expr), "&expr");
-    assert_eq!(stringify_expr!(&mut expr), "&mut expr");
-    assert_eq!(stringify_expr!(&raw const expr), "&raw const expr");
-    assert_eq!(stringify_expr!(&raw mut expr), "&raw mut expr");
+    c2!(expr, [ &expr ], "&expr", "& expr");
+    c2!(expr, [ &mut expr ], "&mut expr", "& mut expr");
+    c2!(expr, [ &raw const expr ], "&raw const expr", "& raw const expr");
+    c2!(expr, [ &raw mut expr ], "&raw mut expr", "& raw mut expr");
 
     // ExprKind::Break
-    assert_eq!(stringify_expr!(break), "break");
-    assert_eq!(stringify_expr!(break 'a), "break 'a");
-    assert_eq!(stringify_expr!(break true), "break true");
-    assert_eq!(stringify_expr!(break 'a true), "break 'a true");
+    c1!(expr, [ break ], "break");
+    c1!(expr, [ break 'a ], "break 'a");
+    c1!(expr, [ break true ], "break true");
+    c1!(expr, [ break 'a true ], "break 'a true");
 
     // ExprKind::Continue
-    assert_eq!(stringify_expr!(continue), "continue");
-    assert_eq!(stringify_expr!(continue 'a), "continue 'a");
+    c1!(expr, [ continue ], "continue");
+    c1!(expr, [ continue 'a ], "continue 'a");
 
     // ExprKind::Ret
-    assert_eq!(stringify_expr!(return), "return");
-    assert_eq!(stringify_expr!(return true), "return true");
+    c1!(expr, [ return ], "return");
+    c1!(expr, [ return true ], "return true");
+
+    // ExprKind::InlineAsm: untestable because this test works pre-expansion.
+
+    // ExprKind::OffsetOf: untestable because this test works pre-expansion.
 
     // ExprKind::MacCall
-    assert_eq!(stringify_expr!(mac!(...)), "mac!(...)");
-    assert_eq!(stringify_expr!(mac![...]), "mac![...]");
-    assert_eq!(stringify_expr!(mac! { ... }), "mac! { ... }");
+    c2!(expr, [ mac!(...) ], "mac!(...)", "mac! (...)");
+    c2!(expr, [ mac![...] ], "mac![...]", "mac! [...]");
+    c1!(expr, [ mac! { ... } ], "mac! { ... }");
 
     // ExprKind::Struct
-    assert_eq!(stringify_expr!(Struct {}), "Struct {}");
-    #[rustfmt::skip] // https://github.com/rust-lang/rustfmt/issues/5151
-    assert_eq!(stringify_expr!(<Struct as Trait>::Type {}), "<Struct as Trait>::Type {}");
-    assert_eq!(stringify_expr!(Struct { .. }), "Struct { .. }");
-    assert_eq!(stringify_expr!(Struct { ..base }), "Struct { ..base }");
-    assert_eq!(stringify_expr!(Struct { x }), "Struct { x }");
-    assert_eq!(stringify_expr!(Struct { x, .. }), "Struct { x, .. }");
-    assert_eq!(stringify_expr!(Struct { x, ..base }), "Struct { x, ..base }");
-    assert_eq!(stringify_expr!(Struct { x: true }), "Struct { x: true }");
-    assert_eq!(stringify_expr!(Struct { x: true, .. }), "Struct { x: true, .. }");
-    assert_eq!(stringify_expr!(Struct { x: true, ..base }), "Struct { x: true, ..base }");
+    c1!(expr, [ Struct {} ], "Struct {}");
+    c2!(expr,
+        [ <Struct as Trait>::Type {} ],
+        "<Struct as Trait>::Type {}",
+        "< Struct as Trait > :: Type {}"
+    );
+    c1!(expr, [ Struct { .. } ], "Struct { .. }");
+    c2!(expr, [ Struct { ..base } ], "Struct { ..base }", "Struct { .. base }");
+    c1!(expr, [ Struct { x } ], "Struct { x }");
+    c1!(expr, [ Struct { x, .. } ], "Struct { x, .. }");
+    c2!(expr, [ Struct { x, ..base } ], "Struct { x, ..base }", "Struct { x, .. base }");
+    c2!(expr, [ Struct { x: true } ], "Struct { x: true }", "Struct { x : true }");
+    c2!(expr, [ Struct { x: true, .. } ], "Struct { x: true, .. }", "Struct { x : true, .. }");
+    c2!(expr,
+        [ Struct { x: true, ..base } ],
+        "Struct { x: true, ..base }",
+        "Struct { x : true, .. base }"
+    );
 
     // ExprKind::Repeat
-    assert_eq!(stringify_expr!([(); 0]), "[(); 0]");
+    c2!(expr, [ [(); 0] ], "[(); 0]", "[() ; 0]");
 
     // ExprKind::Paren
-    assert_eq!(stringify_expr!((expr)), "(expr)");
+    c1!(expr, [ (expr) ], "(expr)");
 
     // ExprKind::Try
-    assert_eq!(stringify_expr!(expr?), "expr?");
+    c2!(expr, [ expr? ], "expr?", "expr ?");
 
     // ExprKind::Yield
-    assert_eq!(stringify_expr!(yield), "yield");
-    assert_eq!(stringify_expr!(yield true), "yield true");
+    c1!(expr, [ yield ], "yield");
+    c1!(expr, [ yield true ], "yield true");
+
+    // ExprKind::Yeet
+    c1!(expr, [ do yeet ], "do yeet");
+    c1!(expr, [ do yeet 0 ], "do yeet 0");
+
+    // ExprKind::Become
+    // FIXME: todo
+
+    // ExprKind::IncludedBytes
+    // FIXME: todo
+
+    // ExprKind::FormatArgs: untestable because this test works pre-expansion.
+
+    // ExprKind::Err: untestable.
 }
 
 #[test]
 fn test_item() {
     // ItemKind::ExternCrate
-    assert_eq!(
-        stringify_item!(
-            extern crate std;
-        ),
-        "extern crate std;",
-    );
-    assert_eq!(
-        stringify_item!(
-            pub extern crate self as std;
-        ),
+    c2!(item, [ extern crate std; ], "extern crate std;", "extern crate std ;");
+    c2!(item,
+        [ pub extern crate self as std; ],
         "pub extern crate self as std;",
+        "pub extern crate self as std ;"
     );
 
     // ItemKind::Use
-    assert_eq!(
-        stringify_item!(
-            pub use crate::{a, b::c};
-        ),
+    c2!(item,
+        [ pub use crate::{a, b::c}; ],
         "pub use crate::{a, b::c};",
+        "pub use crate :: { a, b :: c } ;"
     );
+    c2!(item, [ pub use A::*; ], "pub use A::*;", "pub use A :: * ;");
 
     // ItemKind::Static
-    assert_eq!(
-        stringify_item!(
-            pub static S: () = {};
-        ),
-        "pub static S: () = {};",
-    );
-    assert_eq!(
-        stringify_item!(
-            static mut S: () = {};
-        ),
-        "static mut S: () = {};",
-    );
-    assert_eq!(
-        stringify_item!(
-            static S: ();
-        ),
-        "static S: ();",
-    );
-    assert_eq!(
-        stringify_item!(
-            static mut S: ();
-        ),
-        "static mut S: ();",
-    );
+    c2!(item, [ pub static S: () = {}; ], "pub static S: () = {};", "pub static S : () = {} ;");
+    c2!(item, [ static mut S: () = {}; ], "static mut S: () = {};", "static mut S : () = {} ;");
+    c2!(item, [ static S: (); ], "static S: ();", "static S : () ;");
+    c2!(item, [ static mut S: (); ], "static mut S: ();", "static mut S : () ;");
 
     // ItemKind::Const
-    assert_eq!(
-        stringify_item!(
-            pub const S: () = {};
-        ),
-        "pub const S: () = {};",
-    );
-    assert_eq!(
-        stringify_item!(
-            const S: ();
-        ),
-        "const S: ();",
-    );
+    c2!(item, [ pub const S: () = {}; ], "pub const S: () = {};", "pub const S : () = {} ;");
+    c2!(item, [ const S: (); ], "const S: ();", "const S : () ;");
 
     // ItemKind::Fn
-    assert_eq!(
-        stringify_item!(
-            pub default const async unsafe extern "C" fn f() {}
-        ),
-        "pub default const async unsafe extern \"C\" fn f() {}",
+    c1!(item,
+        [ pub default const async unsafe extern "C" fn f() {} ],
+        "pub default const async unsafe extern \"C\" fn f() {}"
+    );
+    c2!(item,
+        [ fn g<T>(t: Vec<Vec<Vec<T>>>) {} ],
+        "fn g<T>(t: Vec<Vec<Vec<T>>>) {}",
+        "fn g < T > (t : Vec < Vec < Vec < T >> >) {}"
+    );
+    c2!(item,
+        [ fn h<'a>(t: &'a Vec<Cell<dyn D>>) {} ],
+        "fn h<'a>(t: &'a Vec<Cell<dyn D>>) {}",
+        "fn h < 'a > (t : & 'a Vec < Cell < dyn D >>) {}"
     );
 
     // ItemKind::Mod
-    assert_eq!(
-        stringify_item!(
-            pub mod m;
-        ),
-        "pub mod m;",
-    );
-    assert_eq!(
-        stringify_item!(
-            mod m {}
-        ),
-        "mod m {}",
-    );
-    assert_eq!(
-        stringify_item!(
-            unsafe mod m;
-        ),
-        "unsafe mod m;",
-    );
-    assert_eq!(
-        stringify_item!(
-            unsafe mod m {}
-        ),
-        "unsafe mod m {}",
-    );
+    c2!(item, [ pub mod m; ], "pub mod m;", "pub mod m ;");
+    c1!(item, [ mod m {} ], "mod m {}");
+    c2!(item, [ unsafe mod m; ], "unsafe mod m;", "unsafe mod m ;");
+    c1!(item, [ unsafe mod m {} ], "unsafe mod m {}");
 
     // ItemKind::ForeignMod
-    assert_eq!(
-        stringify_item!(
-            extern "C" {}
-        ),
-        "extern \"C\" {}",
-    );
-    #[rustfmt::skip]
-    assert_eq!(
-        stringify_item!(
-            pub extern "C" {}
-        ),
-        "extern \"C\" {}",
-    );
-    assert_eq!(
-        stringify_item!(
-            unsafe extern "C++" {}
-        ),
-        "unsafe extern \"C++\" {}",
+    c1!(item, [ extern "C" {} ], "extern \"C\" {}");
+    c2!(item,
+        [ pub extern "C" {} ],
+        "extern \"C\" {}", // ??
+        "pub extern \"C\" {}"
     );
+    c1!(item, [ unsafe extern "C++" {} ], "unsafe extern \"C++\" {}");
+
+    // ItemKind::GlobalAsm: untestable because this test works pre-expansion.
 
     // ItemKind::TyAlias
-    #[rustfmt::skip]
-    assert_eq!(
-        stringify_item!(
+    c2!(item,
+        [
             pub default type Type<'a>: Bound
             where
                 Self: 'a,
             = T;
-        ),
+        ],
         "pub default type Type<'a>: Bound where Self: 'a = T;",
+        "pub default type Type < 'a > : Bound where Self : 'a, = T ;"
     );
 
     // ItemKind::Enum
-    assert_eq!(
-        stringify_item!(
-            pub enum Void {}
-        ),
-        "pub enum Void {}",
-    );
-    assert_eq!(
-        stringify_item!(
+    c1!(item, [ pub enum Void {} ], "pub enum Void {}");
+    c1!(item,
+        [
             enum Empty {
                 Unit,
                 Tuple(),
                 Struct {},
             }
-        ),
-        "enum Empty { Unit, Tuple(), Struct {}, }",
+        ],
+        "enum Empty { Unit, Tuple(), Struct {}, }"
     );
-    assert_eq!(
-        stringify_item!(
+    c2!(item,
+        [
             enum Enum<T>
             where
                 T: 'a,
@@ -500,7 +445,7 @@ fn test_item() {
                 Tuple(T),
                 Struct { t: T },
             }
-        ),
+        ],
         "enum Enum<T> where T: 'a {\n\
         \x20   Unit,\n\
         \x20   Tuple(T),\n\
@@ -508,378 +453,349 @@ fn test_item() {
         \x20       t: T,\n\
         \x20   },\n\
         }",
+        "enum Enum < T > where T : 'a, { Unit, Tuple(T), Struct { t : T }, }"
     );
 
     // ItemKind::Struct
-    assert_eq!(
-        stringify_item!(
-            pub struct Unit;
-        ),
-        "pub struct Unit;",
-    );
-    assert_eq!(
-        stringify_item!(
-            struct Tuple();
-        ),
-        "struct Tuple();",
-    );
-    assert_eq!(
-        stringify_item!(
-            struct Tuple(T);
-        ),
-        "struct Tuple(T);",
-    );
-    assert_eq!(
-        stringify_item!(
-            struct Struct {}
-        ),
-        "struct Struct {}",
-    );
-    assert_eq!(
-        stringify_item!(
+    c2!(item, [ pub struct Unit; ], "pub struct Unit;", "pub struct Unit ;");
+    c2!(item, [ struct Tuple(); ], "struct Tuple();", "struct Tuple() ;");
+    c2!(item, [ struct Tuple(T); ], "struct Tuple(T);", "struct Tuple(T) ;");
+    c1!(item, [ struct Struct {} ], "struct Struct {}");
+    c2!(item,
+        [
             struct Struct<T>
             where
                 T: 'a,
             {
                 t: T,
             }
-        ),
+        ],
         "struct Struct<T> where T: 'a {\n\
         \x20   t: T,\n\
         }",
+        "struct Struct < T > where T : 'a, { t : T, }"
     );
 
     // ItemKind::Union
-    assert_eq!(
-        stringify_item!(
-            pub union Union {}
-        ),
-        "pub union Union {}",
-    );
-    assert_eq!(
-        stringify_item!(
+    c1!(item, [ pub union Union {} ], "pub union Union {}");
+    c2!(item,
+        [
             union Union<T> where T: 'a {
                 t: T,
             }
-        ),
+        ],
         "union Union<T> where T: 'a {\n\
         \x20   t: T,\n\
         }",
+        "union Union < T > where T : 'a { t : T, }"
     );
 
     // ItemKind::Trait
-    assert_eq!(
-        stringify_item!(
-            pub unsafe auto trait Send {}
-        ),
-        "pub unsafe auto trait Send {}",
-    );
-    assert_eq!(
-        stringify_item!(
+    c1!(item, [ pub unsafe auto trait Send {} ], "pub unsafe auto trait Send {}");
+    c2!(item,
+        [
             trait Trait<'a>: Sized
             where
                 Self: 'a,
             {
             }
-        ),
+        ],
         "trait Trait<'a>: Sized where Self: 'a {}",
+        "trait Trait < 'a > : Sized where Self : 'a, {}"
     );
 
     // ItemKind::TraitAlias
-    assert_eq!(
-        stringify_item!(
-            pub trait Trait<T> = Sized where T: 'a;
-        ),
+    c2!(item,
+        [ pub trait Trait<T> = Sized where T: 'a; ],
         "pub trait Trait<T> = Sized where T: 'a;",
+        "pub trait Trait < T > = Sized where T : 'a ;"
     );
 
     // ItemKind::Impl
-    assert_eq!(
-        stringify_item!(
-            pub impl Struct {}
-        ),
-        "pub impl Struct {}",
-    );
-    assert_eq!(
-        stringify_item!(
-            impl<T> Struct<T> {}
-        ),
-        "impl<T> Struct<T> {}",
-    );
-    assert_eq!(
-        stringify_item!(
-            pub impl Trait for Struct {}
-        ),
-        "pub impl Trait for Struct {}",
-    );
-    assert_eq!(
-        stringify_item!(
-            impl<T> const Trait for T {}
-        ),
+    c1!(item, [ pub impl Struct {} ], "pub impl Struct {}");
+    c2!(item, [ impl<T> Struct<T> {} ], "impl<T> Struct<T> {}", "impl < T > Struct < T > {}");
+    c1!(item, [ pub impl Trait for Struct {} ], "pub impl Trait for Struct {}");
+    c2!(item,
+        [ impl<T> const Trait for T {} ],
         "impl<T> const Trait for T {}",
+        "impl < T > const Trait for T {}"
     );
-    assert_eq!(
-        stringify_item!(
-            impl ~const Struct {}
-        ),
-        "impl ~const Struct {}",
-    );
+    c2!(item, [ impl ~const Struct {} ], "impl ~const Struct {}", "impl ~ const Struct {}");
 
     // ItemKind::MacCall
-    assert_eq!(stringify_item!(mac!(...);), "mac!(...);");
-    assert_eq!(stringify_item!(mac![...];), "mac![...];");
-    assert_eq!(stringify_item!(mac! { ... }), "mac! { ... }");
+    c2!(item, [ mac!(...); ], "mac!(...);", "mac! (...) ;");
+    c2!(item, [ mac![...]; ], "mac![...];", "mac! [...] ;");
+    c1!(item, [ mac! { ... } ], "mac! { ... }");
 
     // ItemKind::MacroDef
-    assert_eq!(
-        stringify_item!(
+    c1!(item,
+        [
             macro_rules! stringify {
                 () => {};
             }
-        ),
-        "macro_rules! stringify { () => {} ; }", // FIXME
+        ],
+        "macro_rules! stringify { () => {} ; }"
     );
-    assert_eq!(
-        stringify_item!(
-            pub macro stringify() {}
-        ),
-        "pub macro stringify { () => {} }",
+    c2!(item,
+        [ pub macro stringify() {} ],
+        "pub macro stringify { () => {} }", // ??
+        "pub macro stringify() {}"
     );
 }
 
 #[test]
 fn test_meta() {
-    assert_eq!(stringify_meta!(k), "k");
-    assert_eq!(stringify_meta!(k = "v"), "k = \"v\"");
-    assert_eq!(stringify_meta!(list(k1, k2 = "v")), "list(k1, k2 = \"v\")");
-    assert_eq!(stringify_meta!(serde::k), "serde::k");
+    c1!(meta, [ k ], "k");
+    c1!(meta, [ k = "v" ], "k = \"v\"");
+    c1!(meta, [ list(k1, k2 = "v") ], "list(k1, k2 = \"v\")");
+    c2!(meta, [ serde::k ], "serde::k", "serde :: k");
 }
 
 #[test]
 fn test_pat() {
     // PatKind::Wild
-    assert_eq!(stringify_pat!(_), "_");
+    c1!(pat, [ _ ], "_");
 
     // PatKind::Ident
-    assert_eq!(stringify_pat!(_x), "_x");
-    assert_eq!(stringify_pat!(ref _x), "ref _x");
-    assert_eq!(stringify_pat!(mut _x), "mut _x");
-    assert_eq!(stringify_pat!(ref mut _x), "ref mut _x");
-    assert_eq!(stringify_pat!(ref mut _x @ _), "ref mut _x @ _");
+    c1!(pat, [ _x ], "_x");
+    c1!(pat, [ ref _x ], "ref _x");
+    c1!(pat, [ mut _x ], "mut _x");
+    c1!(pat, [ ref mut _x ], "ref mut _x");
+    c1!(pat, [ ref mut _x @ _ ], "ref mut _x @ _");
 
     // PatKind::Struct
-    assert_eq!(stringify_pat!(Struct {}), "Struct {}");
-    assert_eq!(stringify_pat!(Struct::<u8> {}), "Struct::<u8> {}");
-    assert_eq!(stringify_pat!(Struct::<'static> {}), "Struct::<'static> {}");
-    assert_eq!(stringify_pat!(Struct { x }), "Struct { x }");
-    assert_eq!(stringify_pat!(Struct { x: _x }), "Struct { x: _x }");
-    assert_eq!(stringify_pat!(Struct { .. }), "Struct { .. }");
-    assert_eq!(stringify_pat!(Struct { x, .. }), "Struct { x, .. }");
-    assert_eq!(stringify_pat!(Struct { x: _x, .. }), "Struct { x: _x, .. }");
-    #[rustfmt::skip] // https://github.com/rust-lang/rustfmt/issues/5151
-    assert_eq!(
-        stringify_pat!(<Struct as Trait>::Type {}),
+    c1!(pat, [ Struct {} ], "Struct {}");
+    c2!(pat, [ Struct::<u8> {} ], "Struct::<u8> {}", "Struct :: < u8 > {}");
+    c2!(pat, [ Struct::<'static> {} ], "Struct::<'static> {}", "Struct :: < 'static > {}");
+    c1!(pat, [ Struct { x } ], "Struct { x }");
+    c2!(pat, [ Struct { x: _x } ], "Struct { x: _x }", "Struct { x : _x }");
+    c1!(pat, [ Struct { .. } ], "Struct { .. }");
+    c1!(pat, [ Struct { x, .. } ], "Struct { x, .. }");
+    c2!(pat, [ Struct { x: _x, .. } ], "Struct { x: _x, .. }", "Struct { x : _x, .. }");
+    c2!(pat,
+        [ <Struct as Trait>::Type {} ],
         "<Struct as Trait>::Type {}",
+        "< Struct as Trait > :: Type {}"
     );
 
     // PatKind::TupleStruct
-    assert_eq!(stringify_pat!(Tuple()), "Tuple()");
-    assert_eq!(stringify_pat!(Tuple::<u8>()), "Tuple::<u8>()");
-    assert_eq!(stringify_pat!(Tuple::<'static>()), "Tuple::<'static>()");
-    assert_eq!(stringify_pat!(Tuple(x)), "Tuple(x)");
-    assert_eq!(stringify_pat!(Tuple(..)), "Tuple(..)");
-    assert_eq!(stringify_pat!(Tuple(x, ..)), "Tuple(x, ..)");
-    assert_eq!(stringify_pat!(<Struct as Trait>::Type()), "<Struct as Trait>::Type()");
+    c1!(pat, [ Tuple() ], "Tuple()");
+    c2!(pat, [ Tuple::<u8>() ], "Tuple::<u8>()", "Tuple :: < u8 > ()");
+    c2!(pat, [ Tuple::<'static>() ], "Tuple::<'static>()", "Tuple :: < 'static > ()");
+    c1!(pat, [ Tuple(x) ], "Tuple(x)");
+    c1!(pat, [ Tuple(..) ], "Tuple(..)");
+    c1!(pat, [ Tuple(x, ..) ], "Tuple(x, ..)");
+    c2!(pat,
+        [ <Struct as Trait>::Type() ],
+        "<Struct as Trait>::Type()",
+        "< Struct as Trait > :: Type()"
+    );
 
     // PatKind::Or
-    assert_eq!(stringify_pat!(true | false), "true | false");
-    assert_eq!(stringify_pat!(| true), "true");
-    assert_eq!(stringify_pat!(|true| false), "true | false");
+    c1!(pat, [ true | false ], "true | false");
+    c2!(pat, [ | true ], "true", "| true");
+    c2!(pat, [ |true| false ], "true | false", "| true | false");
 
     // PatKind::Path
-    assert_eq!(stringify_pat!(crate::Path), "crate::Path");
-    assert_eq!(stringify_pat!(Path::<u8>), "Path::<u8>");
-    assert_eq!(stringify_pat!(Path::<'static>), "Path::<'static>");
-    assert_eq!(stringify_pat!(<Struct as Trait>::Type), "<Struct as Trait>::Type");
+    c2!(pat, [ crate::Path ], "crate::Path", "crate :: Path");
+    c2!(pat, [ Path::<u8> ], "Path::<u8>", "Path :: < u8 >");
+    c2!(pat, [ Path::<'static> ], "Path::<'static>", "Path :: < 'static >");
+    c2!(pat, [ <Struct as Trait>::Type ], "<Struct as Trait>::Type", "< Struct as Trait > :: Type");
 
     // PatKind::Tuple
-    assert_eq!(stringify_pat!(()), "()");
-    assert_eq!(stringify_pat!((true,)), "(true,)");
-    assert_eq!(stringify_pat!((true, false)), "(true, false)");
+    c1!(pat, [ () ], "()");
+    c1!(pat, [ (true,) ], "(true,)");
+    c1!(pat, [ (true, false) ], "(true, false)");
 
     // PatKind::Box
-    assert_eq!(stringify_pat!(box pat), "box pat");
+    c1!(pat, [ box pat ], "box pat");
 
     // PatKind::Ref
-    assert_eq!(stringify_pat!(&pat), "&pat");
-    assert_eq!(stringify_pat!(&mut pat), "&mut pat");
+    c2!(pat, [ &pat ], "&pat", "& pat");
+    c2!(pat, [ &mut pat ], "&mut pat", "& mut pat");
 
     // PatKind::Lit
-    assert_eq!(stringify_pat!(1_000_i8), "1_000_i8");
+    c1!(pat, [ 1_000_i8 ], "1_000_i8");
 
     // PatKind::Range
-    assert_eq!(stringify_pat!(..1), "..1");
-    assert_eq!(stringify_pat!(0..), "0..");
-    assert_eq!(stringify_pat!(0..1), "0..1");
-    assert_eq!(stringify_pat!(0..=1), "0..=1");
-    assert_eq!(stringify_pat!(-2..=-1), "-2..=-1");
+    c2!(pat, [ ..1 ], "..1", ".. 1");
+    c2!(pat, [ 0.. ], "0..", "0 ..");
+    c2!(pat, [ 0..1 ], "0..1", "0 .. 1");
+    c2!(pat, [ 0..=1 ], "0..=1", "0 ..= 1");
+    c2!(pat, [ -2..=-1 ], "-2..=-1", "- 2 ..= - 1");
 
     // PatKind::Slice
-    assert_eq!(stringify_pat!([]), "[]");
-    assert_eq!(stringify_pat!([true]), "[true]");
-    assert_eq!(stringify_pat!([true,]), "[true]");
-    assert_eq!(stringify_pat!([true, false]), "[true, false]");
+    c1!(pat, [ [] ], "[]");
+    c1!(pat, [ [true] ], "[true]");
+    c2!(pat, [ [true,] ], "[true]", "[true,]");
+    c1!(pat, [ [true, false] ], "[true, false]");
 
     // PatKind::Rest
-    assert_eq!(stringify_pat!(..), "..");
+    c1!(pat, [ .. ], "..");
 
     // PatKind::Paren
-    assert_eq!(stringify_pat!((pat)), "(pat)");
+    c1!(pat, [ (pat) ], "(pat)");
 
     // PatKind::MacCall
-    assert_eq!(stringify_pat!(mac!(...)), "mac!(...)");
-    assert_eq!(stringify_pat!(mac![...]), "mac![...]");
-    assert_eq!(stringify_pat!(mac! { ... }), "mac! { ... }");
+    c2!(pat, [ mac!(...) ], "mac!(...)", "mac! (...)");
+    c2!(pat, [ mac![...] ], "mac![...]", "mac! [...]");
+    c1!(pat, [ mac! { ... } ], "mac! { ... }");
 }
 
 #[test]
 fn test_path() {
-    assert_eq!(stringify_path!(thing), "thing");
-    assert_eq!(stringify_path!(m::thing), "m::thing");
-    assert_eq!(stringify_path!(self::thing), "self::thing");
-    assert_eq!(stringify_path!(crate::thing), "crate::thing");
-    assert_eq!(stringify_path!(Self::thing), "Self::thing");
-    assert_eq!(stringify_path!(Self<'static>), "Self<'static>");
-    assert_eq!(stringify_path!(Self::<'static>), "Self<'static>");
-    assert_eq!(stringify_path!(Self()), "Self()");
-    assert_eq!(stringify_path!(Self() -> ()), "Self() -> ()");
+    c1!(path, [ thing ], "thing");
+    c2!(path, [ m::thing ], "m::thing", "m :: thing");
+    c2!(path, [ self::thing ], "self::thing", "self :: thing");
+    c2!(path, [ crate::thing ], "crate::thing", "crate :: thing");
+    c2!(path, [ Self::thing ], "Self::thing", "Self :: thing");
+    c2!(path, [ Self<'static> ], "Self<'static>", "Self < 'static >");
+    c2!(path, [ Self::<'static> ], "Self<'static>", "Self :: < 'static >");
+    c1!(path, [ Self() ], "Self()");
+    c1!(path, [ Self() -> () ], "Self() -> ()");
 }
 
 #[test]
 fn test_stmt() {
     // StmtKind::Local
-    assert_eq!(stringify_stmt!(let _), "let _;");
-    assert_eq!(stringify_stmt!(let x = true), "let x = true;");
-    assert_eq!(stringify_stmt!(let x: bool = true), "let x: bool = true;");
+    c2!(stmt, [ let _ ], "let _;", "let _");
+    c2!(stmt, [ let x = true ], "let x = true;", "let x = true");
+    c2!(stmt, [ let x: bool = true ], "let x: bool = true;", "let x : bool = true");
+    c2!(stmt, [ let (a, b) = (1, 2) ], "let (a, b) = (1, 2);", "let(a, b) = (1, 2)"); // FIXME
+    c2!(stmt,
+        [ let (a, b): (u32, u32) = (1, 2) ],
+        "let (a, b): (u32, u32) = (1, 2);",
+        "let(a, b) : (u32, u32) = (1, 2)"
+    );
 
     // StmtKind::Item
-    assert_eq!(
-        stringify_stmt!(
-            struct S;
-        ),
-        "struct S;",
-    );
+    c2!(stmt, [ struct S; ], "struct S;", "struct S ;");
+    c1!(stmt, [ struct S {} ], "struct S {}");
 
     // StmtKind::Expr
-    assert_eq!(stringify_stmt!(loop {}), "loop {}");
+    c1!(stmt, [ loop {} ], "loop {}");
 
     // StmtKind::Semi
-    assert_eq!(stringify_stmt!(1 + 1), "1 + 1;");
+    c2!(stmt, [ 1 + 1 ], "1 + 1;", "1 + 1");
 
     // StmtKind::Empty
-    assert_eq!(stringify_stmt!(;), ";");
+    c1!(stmt, [ ; ], ";");
 
     // StmtKind::MacCall
-    assert_eq!(stringify_stmt!(mac!(...)), "mac!(...)");
-    assert_eq!(stringify_stmt!(mac![...]), "mac![...]");
-    assert_eq!(stringify_stmt!(mac! { ... }), "mac! { ... }");
+    c2!(stmt, [ mac!(...) ], "mac!(...)", "mac! (...)");
+    c2!(stmt, [ mac![...] ], "mac![...]", "mac! [...]");
+    c1!(stmt, [ mac! { ... } ], "mac! { ... }");
 }
 
 #[test]
 fn test_ty() {
     // TyKind::Slice
-    assert_eq!(stringify_ty!([T]), "[T]");
+    c1!(ty, [ [T] ], "[T]");
 
     // TyKind::Array
-    assert_eq!(stringify_ty!([T; 0]), "[T; 0]");
+    c2!(ty, [ [T; 0] ], "[T; 0]", "[T ; 0]");
 
     // TyKind::Ptr
-    assert_eq!(stringify_ty!(*const T), "*const T");
-    assert_eq!(stringify_ty!(*mut T), "*mut T");
+    c2!(ty, [ *const T ], "*const T", "* const T");
+    c2!(ty, [ *mut T ], "*mut T", "* mut T");
 
     // TyKind::Ref
-    assert_eq!(stringify_ty!(&T), "&T");
-    assert_eq!(stringify_ty!(&mut T), "&mut T");
-    assert_eq!(stringify_ty!(&'a T), "&'a T");
-    assert_eq!(stringify_ty!(&'a mut T), "&'a mut T");
+    c2!(ty, [ &T ], "&T", "& T");
+    c2!(ty, [ &mut T ], "&mut T", "& mut T");
+    c2!(ty, [ &'a T ], "&'a T", "& 'a T");
+    c2!(ty, [ &'a mut [T] ], "&'a mut [T]", "& 'a mut [T]");
+    c2!(ty, [ &A<B<C<D<E>>>> ], "&A<B<C<D<E>>>>", "& A < B < C < D < E >> >>");
 
     // TyKind::BareFn
-    assert_eq!(stringify_ty!(fn()), "fn()");
-    assert_eq!(stringify_ty!(fn() -> ()), "fn() -> ()");
-    assert_eq!(stringify_ty!(fn(u8)), "fn(u8)");
-    assert_eq!(stringify_ty!(fn(x: u8)), "fn(x: u8)");
-    #[rustfmt::skip]
-    assert_eq!(stringify_ty!(for<> fn()), "fn()");
-    assert_eq!(stringify_ty!(for<'a> fn()), "for<'a> fn()");
+    c1!(ty, [ fn() ], "fn()");
+    c1!(ty, [ fn() -> () ], "fn() -> ()");
+    c1!(ty, [ fn(u8) ], "fn(u8)");
+    c2!(ty, [ fn(x: u8) ], "fn(x: u8)", "fn(x : u8)");
+    c2!(ty, [ for<> fn() ], "fn()", "for < > fn()");
+    c2!(ty, [ for<'a> fn() ], "for<'a> fn()", "for < 'a > fn()");
 
     // TyKind::Never
-    assert_eq!(stringify_ty!(!), "!");
+    c1!(ty, [ ! ], "!");
 
     // TyKind::Tup
-    assert_eq!(stringify_ty!(()), "()");
-    assert_eq!(stringify_ty!((T,)), "(T,)");
-    assert_eq!(stringify_ty!((T, U)), "(T, U)");
+    c1!(ty, [ () ], "()");
+    c1!(ty, [ (T,) ], "(T,)");
+    c1!(ty, [ (T, U) ], "(T, U)");
+
+    // TyKind::AnonStruct: untestable in isolation.
+
+    // TyKind::AnonUnion: untestable in isolation.
 
     // TyKind::Path
-    assert_eq!(stringify_ty!(T), "T");
-    assert_eq!(stringify_ty!(Ref<'a>), "Ref<'a>");
-    assert_eq!(stringify_ty!(PhantomData<T>), "PhantomData<T>");
-    assert_eq!(stringify_ty!(PhantomData::<T>), "PhantomData<T>");
-    assert_eq!(stringify_ty!(Fn() -> !), "Fn() -> !");
-    assert_eq!(stringify_ty!(Fn(u8) -> !), "Fn(u8) -> !");
-    assert_eq!(stringify_ty!(<Struct as Trait>::Type), "<Struct as Trait>::Type");
+    c1!(ty, [ T ], "T");
+    c2!(ty, [ Ref<'a> ], "Ref<'a>", "Ref < 'a >");
+    c2!(ty, [ PhantomData<T> ], "PhantomData<T>", "PhantomData < T >");
+    c2!(ty, [ PhantomData::<T> ], "PhantomData<T>", "PhantomData :: < T >");
+    c2!(ty, [ Fn() -> ! ], "Fn() -> !", "Fn() ->!");
+    c2!(ty, [ Fn(u8) -> ! ], "Fn(u8) -> !", "Fn(u8) ->!"); // FIXME
+    c2!(ty, [ <Struct as Trait>::Type ], "<Struct as Trait>::Type", "< Struct as Trait > :: Type");
 
     // TyKind::TraitObject
-    assert_eq!(stringify_ty!(dyn Send), "dyn Send");
-    assert_eq!(stringify_ty!(dyn Send + 'a), "dyn Send + 'a");
-    assert_eq!(stringify_ty!(dyn 'a + Send), "dyn 'a + Send");
-    assert_eq!(stringify_ty!(dyn ?Sized), "dyn ?Sized");
-    assert_eq!(stringify_ty!(dyn ~const Clone), "dyn ~const Clone");
-    assert_eq!(stringify_ty!(dyn for<'a> Send), "dyn for<'a> Send");
+    c1!(ty, [ dyn Send ], "dyn Send");
+    c1!(ty, [ dyn Send + 'a ], "dyn Send + 'a");
+    c1!(ty, [ dyn 'a + Send ], "dyn 'a + Send");
+    c2!(ty, [ dyn ?Sized ], "dyn ?Sized", "dyn ? Sized");
+    c2!(ty, [ dyn ~const Clone ], "dyn ~const Clone", "dyn ~ const Clone");
+    c2!(ty, [ dyn for<'a> Send ], "dyn for<'a> Send", "dyn for < 'a > Send");
 
     // TyKind::ImplTrait
-    assert_eq!(stringify_ty!(impl Send), "impl Send");
-    assert_eq!(stringify_ty!(impl Send + 'a), "impl Send + 'a");
-    assert_eq!(stringify_ty!(impl 'a + Send), "impl 'a + Send");
-    assert_eq!(stringify_ty!(impl ?Sized), "impl ?Sized");
-    assert_eq!(stringify_ty!(impl ~const Clone), "impl ~const Clone");
-    assert_eq!(stringify_ty!(impl for<'a> Send), "impl for<'a> Send");
+    c1!(ty, [ impl Send ], "impl Send");
+    c1!(ty, [ impl Send + 'a ], "impl Send + 'a");
+    c1!(ty, [ impl 'a + Send ], "impl 'a + Send");
+    c2!(ty, [ impl ?Sized ], "impl ?Sized", "impl ? Sized");
+    c2!(ty, [ impl ~const Clone ], "impl ~const Clone", "impl ~ const Clone");
+    c2!(ty, [ impl for<'a> Send ], "impl for<'a> Send", "impl for < 'a > Send");
 
     // TyKind::Paren
-    assert_eq!(stringify_ty!((T)), "(T)");
+    c1!(ty, [ (T) ], "(T)");
+
+    // TyKind::Typeof: unused for now.
 
     // TyKind::Infer
-    assert_eq!(stringify_ty!(_), "_");
+    c1!(ty, [ _ ], "_");
+
+    // TyKind::ImplicitSelf: there is no syntax for this.
 
     // TyKind::MacCall
-    assert_eq!(stringify_ty!(mac!(...)), "mac!(...)");
-    assert_eq!(stringify_ty!(mac![...]), "mac![...]");
-    assert_eq!(stringify_ty!(mac! { ... }), "mac! { ... }");
+    c2!(ty, [ mac!(...) ], "mac!(...)", "mac! (...)");
+    c2!(ty, [ mac![...] ], "mac![...]", "mac! [...]");
+    c1!(ty, [ mac! { ... } ], "mac! { ... }");
+
+    // TyKind::Err: untestable.
+
+    // TyKind::CVarArgs
+    // FIXME: todo
 }
 
 #[test]
 fn test_vis() {
     // VisibilityKind::Public
-    assert_eq!(stringify_vis!(pub), "pub ");
+    c2!(vis, [ pub ], "pub ", "pub");
 
     // VisibilityKind::Restricted
-    assert_eq!(stringify_vis!(pub(crate)), "pub(crate) ");
-    assert_eq!(stringify_vis!(pub(self)), "pub(self) ");
-    assert_eq!(stringify_vis!(pub(super)), "pub(super) ");
-    assert_eq!(stringify_vis!(pub(in crate)), "pub(in crate) ");
-    assert_eq!(stringify_vis!(pub(in self)), "pub(in self) ");
-    assert_eq!(stringify_vis!(pub(in super)), "pub(in super) ");
-    assert_eq!(stringify_vis!(pub(in path::to)), "pub(in path::to) ");
-    assert_eq!(stringify_vis!(pub(in ::path::to)), "pub(in ::path::to) ");
-    assert_eq!(stringify_vis!(pub(in self::path::to)), "pub(in self::path::to) ");
-    assert_eq!(stringify_vis!(pub(in super::path::to)), "pub(in super::path::to) ");
+    c2!(vis, [ pub(crate) ], "pub(crate) ", "pub(crate)");
+    c2!(vis, [ pub(self) ], "pub(self) ", "pub(self)");
+    c2!(vis, [ pub(super) ], "pub(super) ", "pub(super)");
+    c2!(vis, [ pub(in crate) ], "pub(in crate) ", "pub(in crate)");
+    c2!(vis, [ pub(in self) ], "pub(in self) ", "pub(in self)");
+    c2!(vis, [ pub(in super) ], "pub(in super) ", "pub(in super)");
+    c2!(vis, [ pub(in path::to) ], "pub(in path::to) ", "pub(in path :: to)");
+    c2!(vis, [ pub(in ::path::to) ], "pub(in ::path::to) ", "pub(in :: path :: to)");
+    c2!(vis, [ pub(in self::path::to) ], "pub(in self::path::to) ", "pub(in self :: path :: to)");
+    c2!(vis,
+        [ pub(in super::path::to) ],
+        "pub(in super::path::to) ",
+        "pub(in super :: path :: to)"
+    );
 
     // VisibilityKind::Inherited
-    // Directly calling `stringify_vis!()` does not work.
-    macro_rules! stringify_inherited_vis {
-        ($vis:vis struct) => {
-            stringify_vis!($vis)
-        };
-    }
-    assert_eq!(stringify_inherited_vis!(struct), "");
+    // This one is different because directly calling `vis!` does not work.
+    macro_rules! inherited_vis { ($vis:vis struct) => { vis!($vis) }; }
+    assert_eq!(inherited_vis!(struct), "");
+    assert_eq!(stringify!(), "");
 }
diff --git a/tests/ui/malformed/do-not-ice-on-note_and_explain.rs b/tests/ui/malformed/do-not-ice-on-note_and_explain.rs
new file mode 100644
index 00000000000..e65276fb738
--- /dev/null
+++ b/tests/ui/malformed/do-not-ice-on-note_and_explain.rs
@@ -0,0 +1,7 @@
+struct A<B>(B);
+impl<B>A<B>{fn d(){fn d(){Self(1)}}}
+//~^ ERROR the size for values of type `B` cannot be known at compilation time
+//~| ERROR the size for values of type `B` cannot be known at compilation time
+//~| ERROR mismatched types
+//~| ERROR mismatched types
+//~| ERROR `main` function not found in crate
diff --git a/tests/ui/malformed/do-not-ice-on-note_and_explain.stderr b/tests/ui/malformed/do-not-ice-on-note_and_explain.stderr
new file mode 100644
index 00000000000..27b86145e90
--- /dev/null
+++ b/tests/ui/malformed/do-not-ice-on-note_and_explain.stderr
@@ -0,0 +1,79 @@
+error[E0601]: `main` function not found in crate `do_not_ice_on_note_and_explain`
+  --> $DIR/do-not-ice-on-note_and_explain.rs:2:37
+   |
+LL | impl<B>A<B>{fn d(){fn d(){Self(1)}}}
+   |                                     ^ consider adding a `main` function to `$DIR/do-not-ice-on-note_and_explain.rs`
+
+error[E0277]: the size for values of type `B` cannot be known at compilation time
+  --> $DIR/do-not-ice-on-note_and_explain.rs:2:32
+   |
+LL | impl<B>A<B>{fn d(){fn d(){Self(1)}}}
+   |      -                    ---- ^ doesn't have a size known at compile-time
+   |      |                    |
+   |      |                    required by a bound introduced by this call
+   |      this type parameter needs to be `Sized`
+   |
+note: required by a bound in `A`
+  --> $DIR/do-not-ice-on-note_and_explain.rs:1:10
+   |
+LL | struct A<B>(B);
+   |          ^ required by this bound in `A`
+
+error[E0308]: mismatched types
+  --> $DIR/do-not-ice-on-note_and_explain.rs:2:32
+   |
+LL | impl<B>A<B>{fn d(){fn d(){Self(1)}}}
+   |                           ---- ^ expected type parameter `B`, found integer
+   |                           |
+   |                           arguments to this function are incorrect
+   |
+   = note: expected type parameter `B`
+                        found type `{integer}`
+note: tuple struct defined here
+  --> $DIR/do-not-ice-on-note_and_explain.rs:1:8
+   |
+LL | struct A<B>(B);
+   |        ^
+
+error[E0308]: mismatched types
+  --> $DIR/do-not-ice-on-note_and_explain.rs:2:27
+   |
+LL | impl<B>A<B>{fn d(){fn d(){Self(1)}}}
+   |                           ^^^^^^^ expected `()`, found `A<B>`
+   |
+   = note: expected unit type `()`
+                 found struct `A<B>`
+help: consider using a semicolon here
+   |
+LL | impl<B>A<B>{fn d(){fn d(){Self(1);}}}
+   |                                  +
+help: try adding a return type
+   |
+LL | impl<B>A<B>{fn d(){fn d() -> A<B>{Self(1)}}}
+   |                           +++++++
+
+error[E0277]: the size for values of type `B` cannot be known at compilation time
+  --> $DIR/do-not-ice-on-note_and_explain.rs:2:27
+   |
+LL | impl<B>A<B>{fn d(){fn d(){Self(1)}}}
+   |      -                    ^^^^^^^ doesn't have a size known at compile-time
+   |      |
+   |      this type parameter needs to be `Sized`
+   |
+note: required by a bound in `A`
+  --> $DIR/do-not-ice-on-note_and_explain.rs:1:10
+   |
+LL | struct A<B>(B);
+   |          ^ required by this bound in `A`
+help: you could relax the implicit `Sized` bound on `B` if it were used through indirection like `&B` or `Box<B>`
+  --> $DIR/do-not-ice-on-note_and_explain.rs:1:10
+   |
+LL | struct A<B>(B);
+   |          ^  - ...if indirection were used here: `Box<B>`
+   |          |
+   |          this could be changed to `B: ?Sized`...
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0277, E0308, E0601.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/malformed/malformed-plugin-1.rs b/tests/ui/malformed/malformed-plugin-1.rs
deleted file mode 100644
index d4c1a2a1679..00000000000
--- a/tests/ui/malformed/malformed-plugin-1.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![feature(plugin)]
-#![plugin] //~ ERROR malformed `plugin` attribute
-//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
-
-fn main() {}
diff --git a/tests/ui/malformed/malformed-plugin-1.stderr b/tests/ui/malformed/malformed-plugin-1.stderr
deleted file mode 100644
index 505f6b6f140..00000000000
--- a/tests/ui/malformed/malformed-plugin-1.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error: malformed `plugin` attribute input
-  --> $DIR/malformed-plugin-1.rs:2:1
-   |
-LL | #![plugin]
-   | ^^^^^^^^^^ help: must be of the form: `#![plugin(name)]`
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/malformed-plugin-1.rs:2:1
-   |
-LL | #![plugin]
-   | ^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
diff --git a/tests/ui/malformed/malformed-plugin-2.rs b/tests/ui/malformed/malformed-plugin-2.rs
deleted file mode 100644
index ba80d97a3c2..00000000000
--- a/tests/ui/malformed/malformed-plugin-2.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![feature(plugin)]
-#![plugin="bleh"] //~ ERROR malformed `plugin` attribute
-//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
-
-fn main() {}
diff --git a/tests/ui/malformed/malformed-plugin-2.stderr b/tests/ui/malformed/malformed-plugin-2.stderr
deleted file mode 100644
index 52bbd82a389..00000000000
--- a/tests/ui/malformed/malformed-plugin-2.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error: malformed `plugin` attribute input
-  --> $DIR/malformed-plugin-2.rs:2:1
-   |
-LL | #![plugin="bleh"]
-   | ^^^^^^^^^^^^^^^^^ help: must be of the form: `#![plugin(name)]`
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/malformed-plugin-2.rs:2:1
-   |
-LL | #![plugin="bleh"]
-   | ^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
diff --git a/tests/ui/malformed/malformed-plugin-3.rs b/tests/ui/malformed/malformed-plugin-3.rs
deleted file mode 100644
index d2bd8f9f8dc..00000000000
--- a/tests/ui/malformed/malformed-plugin-3.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![feature(plugin)]
-#![plugin(foo="bleh")] //~ ERROR malformed `plugin` attribute
-//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
-
-fn main() {}
diff --git a/tests/ui/malformed/malformed-plugin-3.stderr b/tests/ui/malformed/malformed-plugin-3.stderr
deleted file mode 100644
index 64cb429ea74..00000000000
--- a/tests/ui/malformed/malformed-plugin-3.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0498]: malformed `plugin` attribute
-  --> $DIR/malformed-plugin-3.rs:2:11
-   |
-LL | #![plugin(foo="bleh")]
-   |           ^^^^^^^^^^ malformed attribute
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
-  --> $DIR/malformed-plugin-3.rs:2:1
-   |
-LL | #![plugin(foo="bleh")]
-   | ^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
-   |
-   = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0498`.
diff --git a/tests/ui/match/match_non_exhaustive.stderr b/tests/ui/match/match_non_exhaustive.stderr
index 7b8bdfe0053..40be39ec077 100644
--- a/tests/ui/match/match_non_exhaustive.stderr
+++ b/tests/ui/match/match_non_exhaustive.stderr
@@ -5,10 +5,10 @@ LL |     match l { L::A => () };
    |           ^ pattern `L::B` not covered
    |
 note: `L` defined here
-  --> $DIR/match_non_exhaustive.rs:10:13
+  --> $DIR/match_non_exhaustive.rs:10:6
    |
 LL | enum L { A, B }
-   |      -      ^ not covered
+   |      ^      - not covered
    = note: the matched value is of type `L`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/tests/ui/methods/disambiguate-multiple-blanket-impl.rs b/tests/ui/methods/disambiguate-multiple-blanket-impl.rs
new file mode 100644
index 00000000000..6a17f6a2172
--- /dev/null
+++ b/tests/ui/methods/disambiguate-multiple-blanket-impl.rs
@@ -0,0 +1,38 @@
+trait A {
+    type Type;
+    const CONST: usize;
+    fn foo(&self);
+}
+
+trait B {
+    type Type;
+    const CONST: usize;
+    fn foo(&self);
+}
+
+#[derive(Debug)]
+struct S;
+
+impl<T: std::fmt::Debug> A for T {
+    type Type = ();
+    const CONST: usize = 1; //~ NOTE candidate #1
+    fn foo(&self) {} //~ NOTE candidate #1
+}
+
+impl<T: std::fmt::Debug> B for T {
+    type Type = ();
+    const CONST: usize = 2; //~ NOTE candidate #2
+    fn foo(&self) {} //~ NOTE candidate #2
+}
+
+fn main() {
+    let s = S;
+    S::foo(&s); //~ ERROR multiple applicable items in scope
+    //~^ NOTE multiple `foo` found
+    //~| HELP use fully-qualified syntax to disambiguate
+    S::CONST; //~ ERROR multiple applicable items in scope
+    //~^ NOTE multiple `CONST` found
+    //~| HELP use fully-qualified syntax to disambiguate
+    let _: S::Type; //~ ERROR ambiguous associated type
+    //~^ HELP use fully-qualified syntax
+}
diff --git a/tests/ui/methods/disambiguate-multiple-blanket-impl.stderr b/tests/ui/methods/disambiguate-multiple-blanket-impl.stderr
new file mode 100644
index 00000000000..a9e9c679fdb
--- /dev/null
+++ b/tests/ui/methods/disambiguate-multiple-blanket-impl.stderr
@@ -0,0 +1,63 @@
+error[E0223]: ambiguous associated type
+  --> $DIR/disambiguate-multiple-blanket-impl.rs:36:12
+   |
+LL |     let _: S::Type;
+   |            ^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL |     let _: <S as A>::Type;
+   |            ~~~~~~~~~~~~~~
+LL |     let _: <S as B>::Type;
+   |            ~~~~~~~~~~~~~~
+
+error[E0034]: multiple applicable items in scope
+  --> $DIR/disambiguate-multiple-blanket-impl.rs:30:8
+   |
+LL |     S::foo(&s);
+   |        ^^^ multiple `foo` found
+   |
+note: candidate #1 is defined in an impl of the trait `A` for the type `T`
+  --> $DIR/disambiguate-multiple-blanket-impl.rs:19:5
+   |
+LL |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^
+note: candidate #2 is defined in an impl of the trait `B` for the type `T`
+  --> $DIR/disambiguate-multiple-blanket-impl.rs:25:5
+   |
+LL |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^
+help: use fully-qualified syntax to disambiguate
+   |
+LL |     <T as A>::foo(&s);
+   |     ~~~~~~~~~~
+LL |     <T as B>::foo(&s);
+   |     ~~~~~~~~~~
+
+error[E0034]: multiple applicable items in scope
+  --> $DIR/disambiguate-multiple-blanket-impl.rs:33:8
+   |
+LL |     S::CONST;
+   |        ^^^^^ multiple `CONST` found
+   |
+note: candidate #1 is defined in an impl of the trait `A` for the type `T`
+  --> $DIR/disambiguate-multiple-blanket-impl.rs:18:5
+   |
+LL |     const CONST: usize = 1;
+   |     ^^^^^^^^^^^^^^^^^^
+note: candidate #2 is defined in an impl of the trait `B` for the type `T`
+  --> $DIR/disambiguate-multiple-blanket-impl.rs:24:5
+   |
+LL |     const CONST: usize = 2;
+   |     ^^^^^^^^^^^^^^^^^^
+help: use fully-qualified syntax to disambiguate
+   |
+LL |     <T as A>::CONST;
+   |     ~~~~~~~~~~
+LL |     <T as B>::CONST;
+   |     ~~~~~~~~~~
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0034, E0223.
+For more information about an error, try `rustc --explain E0034`.
diff --git a/tests/ui/methods/disambiguate-multiple-impl.rs b/tests/ui/methods/disambiguate-multiple-impl.rs
new file mode 100644
index 00000000000..9a82ff01574
--- /dev/null
+++ b/tests/ui/methods/disambiguate-multiple-impl.rs
@@ -0,0 +1,37 @@
+trait A {
+    type Type;
+    const CONST: usize;
+    fn foo(&self);
+}
+
+trait B {
+    type Type;
+    const CONST: usize;
+    fn foo(&self);
+}
+
+struct S;
+
+impl A for S {
+    type Type = ();
+    const CONST: usize = 1; //~ NOTE candidate #1
+    fn foo(&self) {} //~ NOTE candidate #1
+}
+
+impl B for S {
+    type Type = ();
+    const CONST: usize = 2; //~ NOTE candidate #2
+    fn foo(&self) {} //~ NOTE candidate #2
+}
+
+fn main() {
+    let s = S;
+    S::foo(&s); //~ ERROR multiple applicable items in scope
+    //~^ NOTE multiple `foo` found
+    //~| HELP use fully-qualified syntax
+    let _: S::Type = (); //~ ERROR ambiguous associated type
+    //~| HELP use fully-qualified syntax
+    let _ = S::CONST; //~ ERROR multiple applicable items in scope
+    //~^ NOTE multiple `CONST` found
+    //~| HELP use fully-qualified syntax
+}
diff --git a/tests/ui/methods/disambiguate-multiple-impl.stderr b/tests/ui/methods/disambiguate-multiple-impl.stderr
new file mode 100644
index 00000000000..901bfc30a3f
--- /dev/null
+++ b/tests/ui/methods/disambiguate-multiple-impl.stderr
@@ -0,0 +1,63 @@
+error[E0223]: ambiguous associated type
+  --> $DIR/disambiguate-multiple-impl.rs:32:12
+   |
+LL |     let _: S::Type = ();
+   |            ^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL |     let _: <S as A>::Type = ();
+   |            ~~~~~~~~~~~~~~
+LL |     let _: <S as B>::Type = ();
+   |            ~~~~~~~~~~~~~~
+
+error[E0034]: multiple applicable items in scope
+  --> $DIR/disambiguate-multiple-impl.rs:29:8
+   |
+LL |     S::foo(&s);
+   |        ^^^ multiple `foo` found
+   |
+note: candidate #1 is defined in an impl of the trait `A` for the type `S`
+  --> $DIR/disambiguate-multiple-impl.rs:18:5
+   |
+LL |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^
+note: candidate #2 is defined in an impl of the trait `B` for the type `S`
+  --> $DIR/disambiguate-multiple-impl.rs:24:5
+   |
+LL |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^
+help: use fully-qualified syntax to disambiguate
+   |
+LL |     <S as A>::foo(&s);
+   |     ~~~~~~~~~~
+LL |     <S as B>::foo(&s);
+   |     ~~~~~~~~~~
+
+error[E0034]: multiple applicable items in scope
+  --> $DIR/disambiguate-multiple-impl.rs:34:16
+   |
+LL |     let _ = S::CONST;
+   |                ^^^^^ multiple `CONST` found
+   |
+note: candidate #1 is defined in an impl of the trait `A` for the type `S`
+  --> $DIR/disambiguate-multiple-impl.rs:17:5
+   |
+LL |     const CONST: usize = 1;
+   |     ^^^^^^^^^^^^^^^^^^
+note: candidate #2 is defined in an impl of the trait `B` for the type `S`
+  --> $DIR/disambiguate-multiple-impl.rs:23:5
+   |
+LL |     const CONST: usize = 2;
+   |     ^^^^^^^^^^^^^^^^^^
+help: use fully-qualified syntax to disambiguate
+   |
+LL |     let _ = <S as A>::CONST;
+   |             ~~~~~~~~~~
+LL |     let _ = <S as B>::CONST;
+   |             ~~~~~~~~~~
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0034, E0223.
+For more information about an error, try `rustc --explain E0034`.
diff --git a/tests/ui/methods/disambiguate-multiple-trait-2.rs b/tests/ui/methods/disambiguate-multiple-trait-2.rs
new file mode 100644
index 00000000000..829491d824d
--- /dev/null
+++ b/tests/ui/methods/disambiguate-multiple-trait-2.rs
@@ -0,0 +1,54 @@
+trait A {
+    type Type; //~ NOTE ambiguous `Type` from `A`
+    const CONST: usize = 1; //~ NOTE candidate #1
+    fn foo(&self); //~ NOTE candidate #1
+}
+
+trait B {
+    type Type; //~ NOTE ambiguous `Type` from `B`
+    const CONST: usize; //~ NOTE candidate #2
+    fn foo(&self); //~ NOTE candidate #2
+}
+
+trait C: A + B {}
+
+fn a<T: C>(t: T) {
+    t.foo(); //~ ERROR multiple applicable items in scope
+    //~^ NOTE multiple `foo` found
+    //~| HELP disambiguate the method
+    //~| HELP disambiguate the method
+    let _ = T::CONST; //~ ERROR multiple applicable items in scope
+    //~^ NOTE multiple `CONST` found
+    //~| HELP use fully-qualified syntax
+    let _: T::Type; //~ ERROR ambiguous associated type
+    //~^ NOTE ambiguous associated type `Type`
+    //~| HELP use fully-qualified syntax
+    //~| HELP use fully-qualified syntax
+}
+
+#[derive(Debug)]
+struct S;
+
+impl<T: std::fmt::Debug> A for T {
+    type Type = ();
+    const CONST: usize = 1; //~ NOTE candidate #1
+    fn foo(&self) {} //~ NOTE candidate #1
+}
+
+impl<T: std::fmt::Debug> B for T {
+    type Type = ();
+    const CONST: usize = 1; //~ NOTE candidate #2
+    fn foo(&self) {} //~ NOTE candidate #2
+}
+
+fn main() {
+    let s = S;
+    S::foo(&s); //~ ERROR multiple applicable items in scope
+    //~^ NOTE multiple `foo` found
+    //~| HELP use fully-qualified syntax
+    let _ = S::CONST; //~ ERROR multiple applicable items in scope
+    //~^ NOTE multiple `CONST` found
+    //~| HELP use fully-qualified syntax
+    let _: S::Type; //~ ERROR ambiguous associated type
+    //~^ HELP use fully-qualified syntax
+}
diff --git a/tests/ui/methods/disambiguate-multiple-trait-2.stderr b/tests/ui/methods/disambiguate-multiple-trait-2.stderr
new file mode 100644
index 00000000000..0f9c60ce243
--- /dev/null
+++ b/tests/ui/methods/disambiguate-multiple-trait-2.stderr
@@ -0,0 +1,132 @@
+error[E0221]: ambiguous associated type `Type` in bounds of `T`
+  --> $DIR/disambiguate-multiple-trait-2.rs:23:12
+   |
+LL |     type Type;
+   |     --------- ambiguous `Type` from `A`
+...
+LL |     type Type;
+   |     --------- ambiguous `Type` from `B`
+...
+LL |     let _: T::Type;
+   |            ^^^^^^^ ambiguous associated type `Type`
+   |
+help: use fully-qualified syntax to disambiguate
+   |
+LL |     let _: <T as A>::Type;
+   |            ~~~~~~~~~~
+help: use fully-qualified syntax to disambiguate
+   |
+LL |     let _: <T as B>::Type;
+   |            ~~~~~~~~~~
+
+error[E0034]: multiple applicable items in scope
+  --> $DIR/disambiguate-multiple-trait-2.rs:16:7
+   |
+LL |     t.foo();
+   |       ^^^ multiple `foo` found
+   |
+note: candidate #1 is defined in the trait `A`
+  --> $DIR/disambiguate-multiple-trait-2.rs:4:5
+   |
+LL |     fn foo(&self);
+   |     ^^^^^^^^^^^^^^
+note: candidate #2 is defined in the trait `B`
+  --> $DIR/disambiguate-multiple-trait-2.rs:10:5
+   |
+LL |     fn foo(&self);
+   |     ^^^^^^^^^^^^^^
+help: disambiguate the method for candidate #1
+   |
+LL |     A::foo(t);
+   |     ~~~~~~~~~
+help: disambiguate the method for candidate #2
+   |
+LL |     B::foo(t);
+   |     ~~~~~~~~~
+
+error[E0034]: multiple applicable items in scope
+  --> $DIR/disambiguate-multiple-trait-2.rs:20:16
+   |
+LL |     let _ = T::CONST;
+   |                ^^^^^ multiple `CONST` found
+   |
+note: candidate #1 is defined in the trait `A`
+  --> $DIR/disambiguate-multiple-trait-2.rs:3:5
+   |
+LL |     const CONST: usize = 1;
+   |     ^^^^^^^^^^^^^^^^^^
+note: candidate #2 is defined in the trait `B`
+  --> $DIR/disambiguate-multiple-trait-2.rs:9:5
+   |
+LL |     const CONST: usize;
+   |     ^^^^^^^^^^^^^^^^^^
+help: use fully-qualified syntax to disambiguate
+   |
+LL |     let _ = A::CONST;
+   |             ~~~
+LL |     let _ = B::CONST;
+   |             ~~~
+
+error[E0223]: ambiguous associated type
+  --> $DIR/disambiguate-multiple-trait-2.rs:52:12
+   |
+LL |     let _: S::Type;
+   |            ^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL |     let _: <S as A>::Type;
+   |            ~~~~~~~~~~~~~~
+LL |     let _: <S as B>::Type;
+   |            ~~~~~~~~~~~~~~
+
+error[E0034]: multiple applicable items in scope
+  --> $DIR/disambiguate-multiple-trait-2.rs:46:8
+   |
+LL |     S::foo(&s);
+   |        ^^^ multiple `foo` found
+   |
+note: candidate #1 is defined in an impl of the trait `A` for the type `T`
+  --> $DIR/disambiguate-multiple-trait-2.rs:35:5
+   |
+LL |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^
+note: candidate #2 is defined in an impl of the trait `B` for the type `T`
+  --> $DIR/disambiguate-multiple-trait-2.rs:41:5
+   |
+LL |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^
+help: use fully-qualified syntax to disambiguate
+   |
+LL |     <T as A>::foo(&s);
+   |     ~~~~~~~~~~
+LL |     <T as B>::foo(&s);
+   |     ~~~~~~~~~~
+
+error[E0034]: multiple applicable items in scope
+  --> $DIR/disambiguate-multiple-trait-2.rs:49:16
+   |
+LL |     let _ = S::CONST;
+   |                ^^^^^ multiple `CONST` found
+   |
+note: candidate #1 is defined in an impl of the trait `A` for the type `T`
+  --> $DIR/disambiguate-multiple-trait-2.rs:34:5
+   |
+LL |     const CONST: usize = 1;
+   |     ^^^^^^^^^^^^^^^^^^
+note: candidate #2 is defined in an impl of the trait `B` for the type `T`
+  --> $DIR/disambiguate-multiple-trait-2.rs:40:5
+   |
+LL |     const CONST: usize = 1;
+   |     ^^^^^^^^^^^^^^^^^^
+help: use fully-qualified syntax to disambiguate
+   |
+LL |     let _ = <T as A>::CONST;
+   |             ~~~~~~~~~~
+LL |     let _ = <T as B>::CONST;
+   |             ~~~~~~~~~~
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0034, E0221, E0223.
+For more information about an error, try `rustc --explain E0034`.
diff --git a/tests/ui/methods/disambiguate-multiple-trait.rs b/tests/ui/methods/disambiguate-multiple-trait.rs
new file mode 100644
index 00000000000..c990d047576
--- /dev/null
+++ b/tests/ui/methods/disambiguate-multiple-trait.rs
@@ -0,0 +1,32 @@
+#![feature(associated_type_defaults)]
+
+trait A {
+    type Type = ();
+    const CONST: usize = 1; //~ NOTE candidate #1
+    fn foo(&self) {} //~ NOTE candidate #1
+}
+
+trait B {
+    type Type = ();
+    const CONST: usize = 2; //~ NOTE candidate #2
+    fn foo(&self) {} //~ NOTE candidate #2
+}
+
+#[derive(Debug)]
+struct S;
+
+impl<T: std::fmt::Debug> A for T {}
+
+impl<T: std::fmt::Debug> B for T {}
+
+fn main() {
+    let s = S;
+    S::foo(&s); //~ ERROR multiple applicable items in scope
+    //~^ NOTE multiple `foo` found
+    //~| HELP use fully-qualified syntax
+    let _ = S::CONST; //~ ERROR multiple applicable items in scope
+    //~^ NOTE multiple `CONST` found
+    //~| HELP use fully-qualified syntax
+    let _: S::Type; //~ ERROR ambiguous associated type
+    //~^ HELP use fully-qualified syntax
+}
diff --git a/tests/ui/methods/disambiguate-multiple-trait.stderr b/tests/ui/methods/disambiguate-multiple-trait.stderr
new file mode 100644
index 00000000000..9a50d51245b
--- /dev/null
+++ b/tests/ui/methods/disambiguate-multiple-trait.stderr
@@ -0,0 +1,63 @@
+error[E0223]: ambiguous associated type
+  --> $DIR/disambiguate-multiple-trait.rs:30:12
+   |
+LL |     let _: S::Type;
+   |            ^^^^^^^
+   |
+help: use fully-qualified syntax
+   |
+LL |     let _: <S as A>::Type;
+   |            ~~~~~~~~~~~~~~
+LL |     let _: <S as B>::Type;
+   |            ~~~~~~~~~~~~~~
+
+error[E0034]: multiple applicable items in scope
+  --> $DIR/disambiguate-multiple-trait.rs:24:8
+   |
+LL |     S::foo(&s);
+   |        ^^^ multiple `foo` found
+   |
+note: candidate #1 is defined in an impl of the trait `A` for the type `T`
+  --> $DIR/disambiguate-multiple-trait.rs:6:5
+   |
+LL |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^
+note: candidate #2 is defined in an impl of the trait `B` for the type `T`
+  --> $DIR/disambiguate-multiple-trait.rs:12:5
+   |
+LL |     fn foo(&self) {}
+   |     ^^^^^^^^^^^^^
+help: use fully-qualified syntax to disambiguate
+   |
+LL |     <T as A>::foo(&s);
+   |     ~~~~~~~~~~
+LL |     <T as B>::foo(&s);
+   |     ~~~~~~~~~~
+
+error[E0034]: multiple applicable items in scope
+  --> $DIR/disambiguate-multiple-trait.rs:27:16
+   |
+LL |     let _ = S::CONST;
+   |                ^^^^^ multiple `CONST` found
+   |
+note: candidate #1 is defined in an impl of the trait `A` for the type `T`
+  --> $DIR/disambiguate-multiple-trait.rs:5:5
+   |
+LL |     const CONST: usize = 1;
+   |     ^^^^^^^^^^^^^^^^^^
+note: candidate #2 is defined in an impl of the trait `B` for the type `T`
+  --> $DIR/disambiguate-multiple-trait.rs:11:5
+   |
+LL |     const CONST: usize = 2;
+   |     ^^^^^^^^^^^^^^^^^^
+help: use fully-qualified syntax to disambiguate
+   |
+LL |     let _ = <T as A>::CONST;
+   |             ~~~~~~~~~~
+LL |     let _ = <T as B>::CONST;
+   |             ~~~~~~~~~~
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0034, E0223.
+For more information about an error, try `rustc --explain E0034`.
diff --git a/tests/ui/methods/method-ambig-two-traits-from-impls2.stderr b/tests/ui/methods/method-ambig-two-traits-from-impls2.stderr
index 4ba778e0ef7..5bb887b4503 100644
--- a/tests/ui/methods/method-ambig-two-traits-from-impls2.stderr
+++ b/tests/ui/methods/method-ambig-two-traits-from-impls2.stderr
@@ -14,12 +14,10 @@ note: candidate #2 is defined in an impl of the trait `B` for the type `AB`
    |
 LL |     fn foo() {}
    |     ^^^^^^^^
-help: disambiguate the associated function for candidate #1
+help: use fully-qualified syntax to disambiguate
    |
 LL |     <AB as A>::foo();
    |     ~~~~~~~~~~~
-help: disambiguate the associated function for candidate #2
-   |
 LL |     <AB as B>::foo();
    |     ~~~~~~~~~~~
 
diff --git a/tests/ui/mir/addrof_alignment.rs b/tests/ui/mir/alignment/addrof_alignment.rs
index 892638bfb92..f3423e97a8a 100644
--- a/tests/ui/mir/addrof_alignment.rs
+++ b/tests/ui/mir/alignment/addrof_alignment.rs
@@ -1,5 +1,4 @@
 // run-pass
-// ignore-wasm32-bare: No panic messages
 // compile-flags: -C debug-assertions
 
 struct Misalignment {
@@ -9,7 +8,7 @@ struct Misalignment {
 fn main() {
     let items: [Misalignment; 2] = [Misalignment { a: 0 }, Misalignment { a: 1 }];
     unsafe {
-        let ptr: *const Misalignment = items.as_ptr().cast::<u8>().add(1).cast::<Misalignment>();
+        let ptr: *const Misalignment = items.as_ptr().byte_add(1);
         let _ptr = core::ptr::addr_of!((*ptr).a);
     }
 }
diff --git a/tests/ui/mir/mir_alignment_check_i686-pc-windows-msvc.rs b/tests/ui/mir/alignment/i686-pc-windows-msvc.rs
index 56388c1047e..74ba1fde649 100644
--- a/tests/ui/mir/mir_alignment_check_i686-pc-windows-msvc.rs
+++ b/tests/ui/mir/alignment/i686-pc-windows-msvc.rs
@@ -11,9 +11,9 @@
 
 fn main() {
     let mut x = [0u64; 2];
-    let ptr: *mut u8 = x.as_mut_ptr().cast::<u8>();
+    let ptr = x.as_mut_ptr();
     unsafe {
-        let misaligned = ptr.add(4).cast::<u64>();
+        let misaligned = ptr.byte_add(4);
         assert!(misaligned.addr() % 8 != 0);
         assert!(misaligned.addr() % 4 == 0);
         *misaligned = 42;
diff --git a/tests/ui/mir/mir_alignment_check.rs b/tests/ui/mir/alignment/misaligned_lhs.rs
index d1bf3d46a7c..97644ba8e09 100644
--- a/tests/ui/mir/mir_alignment_check.rs
+++ b/tests/ui/mir/alignment/misaligned_lhs.rs
@@ -6,8 +6,8 @@
 
 fn main() {
     let mut x = [0u32; 2];
-    let ptr: *mut u8 = x.as_mut_ptr().cast::<u8>();
+    let ptr = x.as_mut_ptr();
     unsafe {
-        *(ptr.add(1).cast::<u32>()) = 42;
+        *(ptr.byte_add(1)) = 42;
     }
 }
diff --git a/tests/ui/mir/alignment/misaligned_rhs.rs b/tests/ui/mir/alignment/misaligned_rhs.rs
new file mode 100644
index 00000000000..8534bc71a3a
--- /dev/null
+++ b/tests/ui/mir/alignment/misaligned_rhs.rs
@@ -0,0 +1,13 @@
+// run-fail
+// ignore-wasm32-bare: No panic messages
+// ignore-i686-pc-windows-msvc: #112480
+// compile-flags: -C debug-assertions
+// error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is
+
+fn main() {
+    let mut x = [0u32; 2];
+    let ptr = x.as_mut_ptr();
+    unsafe {
+        let _v = *(ptr.byte_add(1));
+    }
+}
diff --git a/tests/ui/mir/alignment/packed.rs b/tests/ui/mir/alignment/packed.rs
new file mode 100644
index 00000000000..754698591e3
--- /dev/null
+++ b/tests/ui/mir/alignment/packed.rs
@@ -0,0 +1,29 @@
+// run-pass
+// compile-flags: -C debug-assertions
+
+#![feature(strict_provenance, pointer_is_aligned)]
+
+#[repr(packed)]
+struct Misaligner {
+    _head: u8,
+    tail: u64,
+}
+
+fn main() {
+    let memory = [Misaligner { _head: 0, tail: 0}, Misaligner { _head: 0, tail: 0}];
+    // Test that we can use addr_of! to get the address of a packed member which according to its
+    // type is not aligned, but because it is a projection from a packed type is a valid place.
+    let ptr0 = std::ptr::addr_of!(memory[0].tail);
+    let ptr1 = std::ptr::addr_of!(memory[0].tail);
+    // Even if ptr0 happens to be aligned by chance, ptr1 is not.
+    assert!(!ptr0.is_aligned() || !ptr1.is_aligned());
+
+    // And also test that we can get the addr of a packed struct then do a member read from it.
+    unsafe {
+        let ptr = std::ptr::addr_of!(memory[0]);
+        let _tail = (*ptr).tail;
+
+        let ptr = std::ptr::addr_of!(memory[1]);
+        let _tail = (*ptr).tail;
+    }
+}
diff --git a/tests/ui/mir/alignment/place_computation.rs b/tests/ui/mir/alignment/place_computation.rs
new file mode 100644
index 00000000000..fdd4864250a
--- /dev/null
+++ b/tests/ui/mir/alignment/place_computation.rs
@@ -0,0 +1,16 @@
+// run-pass
+// compile-flags: -C debug-assertions
+
+#[repr(align(8))]
+struct Misalignment {
+    a: u8,
+}
+
+fn main() {
+    let mem = 0u64;
+    let ptr = &mem as *const u64 as *const Misalignment;
+    unsafe {
+        let ptr = ptr.byte_add(1);
+        let _ref: &u8 = &(*ptr).a;
+    }
+}
diff --git a/tests/ui/mir/alignment/place_without_read.rs b/tests/ui/mir/alignment/place_without_read.rs
new file mode 100644
index 00000000000..b4be7a50f61
--- /dev/null
+++ b/tests/ui/mir/alignment/place_without_read.rs
@@ -0,0 +1,9 @@
+// run-pass
+// compile-flags: -C debug-assertions
+
+fn main() {
+    let ptr = 1 as *const u16;
+    unsafe {
+        let _ = *ptr;
+    }
+}
diff --git a/tests/ui/mir/alignment/two_pointers.rs b/tests/ui/mir/alignment/two_pointers.rs
new file mode 100644
index 00000000000..29af21dffc1
--- /dev/null
+++ b/tests/ui/mir/alignment/two_pointers.rs
@@ -0,0 +1,15 @@
+// run-fail
+// ignore-wasm32-bare: No panic messages
+// ignore-i686-pc-windows-msvc: #112480
+// compile-flags: -C debug-assertions
+// error-pattern: misaligned pointer dereference: address must be a multiple of 0x4 but is
+
+fn main() {
+    let x = [0u32; 2];
+    let ptr = x.as_ptr();
+    let mut dest = 0u32;
+    let dest_ptr = &mut dest as *mut u32;
+    unsafe {
+        *dest_ptr = *(ptr.byte_add(1));
+    }
+}
diff --git a/tests/ui/mir/issue-71793-inline-args-storage.rs b/tests/ui/mir/issue-71793-inline-args-storage.rs
index 18f2e38d14c..3749d5ebf81 100644
--- a/tests/ui/mir/issue-71793-inline-args-storage.rs
+++ b/tests/ui/mir/issue-71793-inline-args-storage.rs
@@ -1,5 +1,5 @@
 // Verifies that inliner emits StorageLive & StorageDead when introducing
-// temporaries for arguments, so that they don't become part of the generator.
+// temporaries for arguments, so that they don't become part of the coroutine.
 // Regression test for #71793.
 //
 // check-pass
diff --git a/tests/ui/mir/mir_match_test.rs b/tests/ui/mir/mir_match_test.rs
index 1f96d6737e0..d41a7f4a1db 100644
--- a/tests/ui/mir/mir_match_test.rs
+++ b/tests/ui/mir/mir_match_test.rs
@@ -1,4 +1,5 @@
 #![feature(exclusive_range_pattern)]
+#![allow(overlapping_range_endpoints)]
 
 // run-pass
 
diff --git a/tests/ui/mir/remove-zsts-query-cycle.rs b/tests/ui/mir/remove-zsts-query-cycle.rs
index be4d68f2de7..bcaf8468857 100644
--- a/tests/ui/mir/remove-zsts-query-cycle.rs
+++ b/tests/ui/mir/remove-zsts-query-cycle.rs
@@ -1,5 +1,5 @@
 // Regression test for #88972. Used to cause a query cycle:
-//   optimized mir -> remove zsts -> layout of a generator -> optimized mir.
+//   optimized mir -> remove zsts -> layout of a coroutine -> optimized mir.
 //
 // edition:2018
 // compile-flags: --crate-type=lib -Zinline-mir=yes
diff --git a/tests/ui/mismatched_types/async-unwrap-suggestion.rs b/tests/ui/mismatched_types/async-unwrap-suggestion.rs
new file mode 100644
index 00000000000..9698cc29ffd
--- /dev/null
+++ b/tests/ui/mismatched_types/async-unwrap-suggestion.rs
@@ -0,0 +1,22 @@
+// edition: 2021
+
+async fn dont_suggest() -> i32 {
+    if false {
+        return Ok(6);
+        //~^ ERROR mismatched types
+    }
+
+    5
+}
+
+async fn do_suggest() -> i32 {
+    if false {
+        let s = Ok(6);
+        return s;
+        //~^ ERROR mismatched types
+    }
+
+    5
+}
+
+fn main() {}
diff --git a/tests/ui/mismatched_types/async-unwrap-suggestion.stderr b/tests/ui/mismatched_types/async-unwrap-suggestion.stderr
new file mode 100644
index 00000000000..80ca76a4b86
--- /dev/null
+++ b/tests/ui/mismatched_types/async-unwrap-suggestion.stderr
@@ -0,0 +1,25 @@
+error[E0308]: mismatched types
+  --> $DIR/async-unwrap-suggestion.rs:5:16
+   |
+LL |         return Ok(6);
+   |                ^^^^^ expected `i32`, found `Result<{integer}, _>`
+   |
+   = note: expected type `i32`
+              found enum `Result<{integer}, _>`
+
+error[E0308]: mismatched types
+  --> $DIR/async-unwrap-suggestion.rs:15:16
+   |
+LL |         return s;
+   |                ^ expected `i32`, found `Result<{integer}, _>`
+   |
+   = note: expected type `i32`
+              found enum `Result<{integer}, _>`
+help: consider using `Result::expect` to unwrap the `Result<{integer}, _>` value, panicking if the value is a `Result::Err`
+   |
+LL |         return s.expect("REASON");
+   |                 +++++++++++++++++
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/issue-35030.stderr b/tests/ui/mismatched_types/issue-35030.stderr
index de4e067fead..881ff909722 100644
--- a/tests/ui/mismatched_types/issue-35030.stderr
+++ b/tests/ui/mismatched_types/issue-35030.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-35030.rs:9:14
    |
 LL | impl<bool> Parser<bool> for bool {
-   |      ---- this type parameter
+   |      ---- expected this type parameter
 LL |     fn parse(text: &str) -> Option<bool> {
 LL |         Some(true)
    |         ---- ^^^^ expected type parameter `bool`, found `bool`
diff --git a/tests/ui/mismatched_types/mismatch-ty-dont-suggest.rs b/tests/ui/mismatched_types/mismatch-ty-dont-suggest.rs
new file mode 100644
index 00000000000..b288a9b05ef
--- /dev/null
+++ b/tests/ui/mismatched_types/mismatch-ty-dont-suggest.rs
@@ -0,0 +1,23 @@
+#![allow(unused, dead_code)]
+
+fn test_unwrap() -> Option<i32> {
+    let b: Result<i32, ()> = Ok(1);
+    let v: i32 = b; // return type is not `Result`, we don't suggest ? here
+    //~^ ERROR mismatched types
+    Some(v)
+}
+
+fn test_unwrap_option() -> Result<i32, ()> {
+    let b = Some(1);
+    let v: i32 = b; // return type is not `Option`, we don't suggest ? here
+    //~^ ERROR mismatched types
+    Ok(v)
+}
+
+fn main() {
+    let v: i32 = Some(0); //~ ERROR mismatched types
+
+    let c = Ok(false);
+    let v: i32 = c; //~ ERROR mismatched types
+
+}
diff --git a/tests/ui/mismatched_types/mismatch-ty-dont-suggest.stderr b/tests/ui/mismatched_types/mismatch-ty-dont-suggest.stderr
new file mode 100644
index 00000000000..4f8f9b1a8a5
--- /dev/null
+++ b/tests/ui/mismatched_types/mismatch-ty-dont-suggest.stderr
@@ -0,0 +1,55 @@
+error[E0308]: mismatched types
+  --> $DIR/mismatch-ty-dont-suggest.rs:5:18
+   |
+LL |     let v: i32 = b; // return type is not `Result`, we don't suggest ? here
+   |            ---   ^ expected `i32`, found `Result<i32, ()>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected type `i32`
+              found enum `Result<i32, ()>`
+help: consider using `Result::expect` to unwrap the `Result<i32, ()>` value, panicking if the value is a `Result::Err`
+   |
+LL |     let v: i32 = b.expect("REASON"); // return type is not `Result`, we don't suggest ? here
+   |                   +++++++++++++++++
+
+error[E0308]: mismatched types
+  --> $DIR/mismatch-ty-dont-suggest.rs:12:18
+   |
+LL |     let v: i32 = b; // return type is not `Option`, we don't suggest ? here
+   |            ---   ^ expected `i32`, found `Option<{integer}>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected type `i32`
+              found enum `Option<{integer}>`
+help: consider using `Option::expect` to unwrap the `Option<{integer}>` value, panicking if the value is an `Option::None`
+   |
+LL |     let v: i32 = b.expect("REASON"); // return type is not `Option`, we don't suggest ? here
+   |                   +++++++++++++++++
+
+error[E0308]: mismatched types
+  --> $DIR/mismatch-ty-dont-suggest.rs:18:18
+   |
+LL |     let v: i32 = Some(0);
+   |            ---   ^^^^^^^ expected `i32`, found `Option<{integer}>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected type `i32`
+              found enum `Option<{integer}>`
+
+error[E0308]: mismatched types
+  --> $DIR/mismatch-ty-dont-suggest.rs:21:18
+   |
+LL |     let v: i32 = c;
+   |            ---   ^ expected `i32`, found `Result<bool, _>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected type `i32`
+              found enum `Result<bool, _>`
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed
new file mode 100644
index 00000000000..f3f560fe530
--- /dev/null
+++ b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.fixed
@@ -0,0 +1,31 @@
+// run-rustfix
+#![allow(unused, dead_code)]
+
+fn func() -> Option<i32> {
+    Some(1)
+}
+
+fn test_unwrap() -> Result<i32, ()> {
+    let b: Result<i32, ()> = Ok(1);
+    let v: i32 = b?; //~ ERROR mismatched types
+    Ok(v)
+}
+
+fn test_unwrap_option() -> Option<i32> {
+    let b = Some(1);
+    let v: i32 = b?; //~ ERROR mismatched types
+    Some(v)
+}
+
+fn main() {
+    let a = Some(1);
+    let v: i32 = a.expect("REASON"); //~ ERROR mismatched types
+
+    let b: Result<i32, ()> = Ok(1);
+    let v: i32 = b.expect("REASON"); //~ ERROR mismatched types
+
+    let v: i32 = func().expect("REASON"); //~ ERROR mismatched types
+
+    let a = None;
+    let v: i32 = a.expect("REASON"); //~ ERROR mismatched types
+}
diff --git a/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs
new file mode 100644
index 00000000000..14020e872ff
--- /dev/null
+++ b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.rs
@@ -0,0 +1,31 @@
+// run-rustfix
+#![allow(unused, dead_code)]
+
+fn func() -> Option<i32> {
+    Some(1)
+}
+
+fn test_unwrap() -> Result<i32, ()> {
+    let b: Result<i32, ()> = Ok(1);
+    let v: i32 = b; //~ ERROR mismatched types
+    Ok(v)
+}
+
+fn test_unwrap_option() -> Option<i32> {
+    let b = Some(1);
+    let v: i32 = b; //~ ERROR mismatched types
+    Some(v)
+}
+
+fn main() {
+    let a = Some(1);
+    let v: i32 = a; //~ ERROR mismatched types
+
+    let b: Result<i32, ()> = Ok(1);
+    let v: i32 = b; //~ ERROR mismatched types
+
+    let v: i32 = func(); //~ ERROR mismatched types
+
+    let a = None;
+    let v: i32 = a; //~ ERROR mismatched types
+}
diff --git a/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.stderr b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.stderr
new file mode 100644
index 00000000000..9de23447fed
--- /dev/null
+++ b/tests/ui/mismatched_types/mismatch-ty-unwrap-expect.stderr
@@ -0,0 +1,93 @@
+error[E0308]: mismatched types
+  --> $DIR/mismatch-ty-unwrap-expect.rs:10:18
+   |
+LL |     let v: i32 = b;
+   |            ---   ^ expected `i32`, found `Result<i32, ()>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected type `i32`
+              found enum `Result<i32, ()>`
+help: use the `?` operator to extract the `Result<i32, ()>` value, propagating a `Result::Err` value to the caller
+   |
+LL |     let v: i32 = b?;
+   |                   +
+
+error[E0308]: mismatched types
+  --> $DIR/mismatch-ty-unwrap-expect.rs:16:18
+   |
+LL |     let v: i32 = b;
+   |            ---   ^ expected `i32`, found `Option<{integer}>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected type `i32`
+              found enum `Option<{integer}>`
+help: use the `?` operator to extract the `Option<{integer}>` value, propagating an `Option::None` value to the caller
+   |
+LL |     let v: i32 = b?;
+   |                   +
+
+error[E0308]: mismatched types
+  --> $DIR/mismatch-ty-unwrap-expect.rs:22:18
+   |
+LL |     let v: i32 = a;
+   |            ---   ^ expected `i32`, found `Option<{integer}>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected type `i32`
+              found enum `Option<{integer}>`
+help: consider using `Option::expect` to unwrap the `Option<{integer}>` value, panicking if the value is an `Option::None`
+   |
+LL |     let v: i32 = a.expect("REASON");
+   |                   +++++++++++++++++
+
+error[E0308]: mismatched types
+  --> $DIR/mismatch-ty-unwrap-expect.rs:25:18
+   |
+LL |     let v: i32 = b;
+   |            ---   ^ expected `i32`, found `Result<i32, ()>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected type `i32`
+              found enum `Result<i32, ()>`
+help: consider using `Result::expect` to unwrap the `Result<i32, ()>` value, panicking if the value is a `Result::Err`
+   |
+LL |     let v: i32 = b.expect("REASON");
+   |                   +++++++++++++++++
+
+error[E0308]: mismatched types
+  --> $DIR/mismatch-ty-unwrap-expect.rs:27:18
+   |
+LL |     let v: i32 = func();
+   |            ---   ^^^^^^ expected `i32`, found `Option<i32>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected type `i32`
+              found enum `Option<i32>`
+help: consider using `Option::expect` to unwrap the `Option<i32>` value, panicking if the value is an `Option::None`
+   |
+LL |     let v: i32 = func().expect("REASON");
+   |                        +++++++++++++++++
+
+error[E0308]: mismatched types
+  --> $DIR/mismatch-ty-unwrap-expect.rs:30:18
+   |
+LL |     let v: i32 = a;
+   |            ---   ^ expected `i32`, found `Option<_>`
+   |            |
+   |            expected due to this
+   |
+   = note: expected type `i32`
+              found enum `Option<_>`
+help: consider using `Option::expect` to unwrap the `Option<_>` value, panicking if the value is an `Option::None`
+   |
+LL |     let v: i32 = a.expect("REASON");
+   |                   +++++++++++++++++
+
+error: aborting due to 6 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/mismatched_types/recovered-block.rs b/tests/ui/mismatched_types/recovered-block.rs
index b230b47d35d..a91bbe7083b 100644
--- a/tests/ui/mismatched_types/recovered-block.rs
+++ b/tests/ui/mismatched_types/recovered-block.rs
@@ -12,10 +12,4 @@ pub fn foo() -> Foo {
 }
 //~^^ ERROR missing `struct` for struct definition
 
-pub fn bar() -> Foo {
-    fn
-    Foo { text: "".to_string() }
-}
-//~^^ ERROR expected one of `(` or `<`, found `{`
-
 fn main() {}
diff --git a/tests/ui/mismatched_types/recovered-block.stderr b/tests/ui/mismatched_types/recovered-block.stderr
index f275321abe5..88d62545656 100644
--- a/tests/ui/mismatched_types/recovered-block.stderr
+++ b/tests/ui/mismatched_types/recovered-block.stderr
@@ -9,11 +9,5 @@ help: add `struct` here to parse `Foo` as a public struct
 LL |     pub struct Foo { text }
    |         ++++++
 
-error: expected one of `(` or `<`, found `{`
-  --> $DIR/recovered-block.rs:17:9
-   |
-LL |     Foo { text: "".to_string() }
-   |         ^ expected one of `(` or `<`
-
-error: aborting due to 2 previous errors
+error: aborting due to previous error
 
diff --git a/tests/ui/mismatched_types/suggest-option-asderef-unfixable.rs b/tests/ui/mismatched_types/suggest-option-asderef-unfixable.rs
index ac0831ce655..42adff43a58 100644
--- a/tests/ui/mismatched_types/suggest-option-asderef-unfixable.rs
+++ b/tests/ui/mismatched_types/suggest-option-asderef-unfixable.rs
@@ -24,9 +24,9 @@ fn main() {
     let _ = produces_string().and_then(takes_str_but_too_many_refs);
     //~^ ERROR type mismatch in function arguments
     let _ = produces_string().and_then(takes_str_but_wrong_abi);
-    //~^ ERROR expected a `FnOnce<(String,)>` closure, found `for<'a> extern "C" fn(&'a str) -> Option<()> {takes_str_but_wrong_abi}`
+    //~^ ERROR expected a `FnOnce(String)` closure, found `for<'a> extern "C" fn(&'a str) -> Option<()> {takes_str_but_wrong_abi}`
     let _ = produces_string().and_then(takes_str_but_unsafe);
-    //~^ ERROR expected a `FnOnce<(String,)>` closure, found `for<'a> unsafe fn(&'a str) -> Option<()> {takes_str_but_unsafe}`
+    //~^ ERROR expected a `FnOnce(String)` closure, found `for<'a> unsafe fn(&'a str) -> Option<()> {takes_str_but_unsafe}`
     let _ = produces_string().and_then(no_args);
     //~^ ERROR function is expected to take 1 argument, but it takes 0 arguments
     let _ = Some(TypeWithoutDeref).and_then(takes_str_but_too_many_refs);
diff --git a/tests/ui/mismatched_types/suggest-option-asderef-unfixable.stderr b/tests/ui/mismatched_types/suggest-option-asderef-unfixable.stderr
index ecfbd27b180..3175a258906 100644
--- a/tests/ui/mismatched_types/suggest-option-asderef-unfixable.stderr
+++ b/tests/ui/mismatched_types/suggest-option-asderef-unfixable.stderr
@@ -14,11 +14,11 @@ LL |     let _ = produces_string().and_then(takes_str_but_too_many_refs);
 note: required by a bound in `Option::<T>::and_then`
   --> $SRC_DIR/core/src/option.rs:LL:COL
 
-error[E0277]: expected a `FnOnce<(String,)>` closure, found `for<'a> extern "C" fn(&'a str) -> Option<()> {takes_str_but_wrong_abi}`
+error[E0277]: expected a `FnOnce(String)` closure, found `for<'a> extern "C" fn(&'a str) -> Option<()> {takes_str_but_wrong_abi}`
   --> $DIR/suggest-option-asderef-unfixable.rs:26:40
    |
 LL |     let _ = produces_string().and_then(takes_str_but_wrong_abi);
-   |                               -------- ^^^^^^^^^^^^^^^^^^^^^^^ expected an `FnOnce<(String,)>` closure, found `for<'a> extern "C" fn(&'a str) -> Option<()> {takes_str_but_wrong_abi}`
+   |                               -------- ^^^^^^^^^^^^^^^^^^^^^^^ expected an `FnOnce(String)` closure, found `for<'a> extern "C" fn(&'a str) -> Option<()> {takes_str_but_wrong_abi}`
    |                               |
    |                               required by a bound introduced by this call
    |
@@ -26,7 +26,7 @@ LL |     let _ = produces_string().and_then(takes_str_but_wrong_abi);
 note: required by a bound in `Option::<T>::and_then`
   --> $SRC_DIR/core/src/option.rs:LL:COL
 
-error[E0277]: expected a `FnOnce<(String,)>` closure, found `for<'a> unsafe fn(&'a str) -> Option<()> {takes_str_but_unsafe}`
+error[E0277]: expected a `FnOnce(String)` closure, found `for<'a> unsafe fn(&'a str) -> Option<()> {takes_str_but_unsafe}`
   --> $DIR/suggest-option-asderef-unfixable.rs:28:40
    |
 LL |     let _ = produces_string().and_then(takes_str_but_unsafe);
diff --git a/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr b/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr
index 31e4206a546..5f4d19439ac 100644
--- a/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr
+++ b/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod.stderr
@@ -5,6 +5,7 @@ LL | mod missing;
    | ^^^^^^^^^^^^
    |
    = help: to create the module `missing`, create file "$DIR/foo/missing.rs" or "$DIR/foo/missing/mod.rs"
+   = note: if there is a `mod missing` elsewhere in the crate already, import it with `use crate::...` instead
 
 error: aborting due to previous error
 
diff --git a/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.stderr b/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.stderr
index 9d252398b7a..d5f5ea87059 100644
--- a/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.stderr
+++ b/tests/ui/missing_non_modrs_mod/missing_non_modrs_mod_inline.stderr
@@ -5,6 +5,7 @@ LL |     mod missing;
    |     ^^^^^^^^^^^^
    |
    = help: to create the module `missing`, create file "$DIR/foo_inline/inline/missing.rs" or "$DIR/foo_inline/inline/missing/mod.rs"
+   = note: if there is a `mod missing` elsewhere in the crate already, import it with `use crate::...` instead
 
 error: aborting due to previous error
 
diff --git a/tests/ui/modules/special_module_name.stderr b/tests/ui/modules/special_module_name.stderr
index bc4b4f1b318..84473bf8c0b 100644
--- a/tests/ui/modules/special_module_name.stderr
+++ b/tests/ui/modules/special_module_name.stderr
@@ -5,6 +5,7 @@ LL | mod lib;
    | ^^^^^^^^
    |
    = help: to create the module `lib`, create file "$DIR/lib.rs" or "$DIR/lib/mod.rs"
+   = note: if there is a `mod lib` elsewhere in the crate already, import it with `use crate::...` instead
 
 error[E0583]: file not found for module `main`
   --> $DIR/special_module_name.rs:4:1
@@ -13,6 +14,7 @@ LL | mod main;
    | ^^^^^^^^^
    |
    = help: to create the module `main`, create file "$DIR/main.rs" or "$DIR/main/mod.rs"
+   = note: if there is a `mod main` elsewhere in the crate already, import it with `use crate::...` instead
 
 warning: found module declaration for lib.rs
   --> $DIR/special_module_name.rs:1:1
diff --git a/tests/ui/nll/generator-distinct-lifetime.rs b/tests/ui/nll/coroutine-distinct-lifetime.rs
index 90fe6b56960..0483b8858ba 100644
--- a/tests/ui/nll/generator-distinct-lifetime.rs
+++ b/tests/ui/nll/coroutine-distinct-lifetime.rs
@@ -1,7 +1,7 @@
-#![feature(generators)]
+#![feature(coroutines)]
 
 // Test for issue #47189. Here, both `s` and `t` are live for the
-// generator's lifetime, but within the generator they have distinct
+// coroutine's lifetime, but within the coroutine they have distinct
 // lifetimes. We accept this code -- even though the borrow extends
 // over a yield -- because the data that is borrowed (`*x`) is not
 // stored on the stack.
diff --git a/tests/ui/nll/generator-upvar-mutability.rs b/tests/ui/nll/coroutine-upvar-mutability.rs
index c49ea15b824..12853b16b9b 100644
--- a/tests/ui/nll/generator-upvar-mutability.rs
+++ b/tests/ui/nll/coroutine-upvar-mutability.rs
@@ -1,6 +1,6 @@
-// Check that generators respect the muatability of their upvars.
+// Check that coroutines respect the muatability of their upvars.
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn mutate_upvar() {
     let x = 0;
diff --git a/tests/ui/nll/generator-upvar-mutability.stderr b/tests/ui/nll/coroutine-upvar-mutability.stderr
index 31b061b61d1..464bbc76931 100644
--- a/tests/ui/nll/generator-upvar-mutability.stderr
+++ b/tests/ui/nll/coroutine-upvar-mutability.stderr
@@ -1,5 +1,5 @@
 error[E0594]: cannot assign to `x`, as it is not declared as mutable
-  --> $DIR/generator-upvar-mutability.rs:8:9
+  --> $DIR/coroutine-upvar-mutability.rs:8:9
    |
 LL |     let x = 0;
    |         - help: consider changing this to be mutable: `mut x`
diff --git a/tests/ui/nll/extra-unused-mut.rs b/tests/ui/nll/extra-unused-mut.rs
index 340f2952acc..b04e3954249 100644
--- a/tests/ui/nll/extra-unused-mut.rs
+++ b/tests/ui/nll/extra-unused-mut.rs
@@ -2,7 +2,7 @@
 
 // check-pass
 
-#![feature(generators)]
+#![feature(coroutines)]
 #![deny(unused_mut)]
 
 fn ref_argument(ref _y: i32) {}
@@ -16,7 +16,7 @@ fn mutable_upvar() {
 }
 
 // #50897
-fn generator_mutable_upvar() {
+fn coroutine_mutable_upvar() {
     let mut x = 0;
     move || {
         x = 1;
diff --git a/tests/ui/nll/issue-48623-generator.rs b/tests/ui/nll/issue-48623-coroutine.rs
index 08d2584ee5e..bd11aaf1429 100644
--- a/tests/ui/nll/issue-48623-generator.rs
+++ b/tests/ui/nll/issue-48623-coroutine.rs
@@ -2,7 +2,7 @@
 #![allow(path_statements)]
 #![allow(dead_code)]
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 struct WithDrop;
 
@@ -10,9 +10,9 @@ impl Drop for WithDrop {
     fn drop(&mut self) {}
 }
 
-fn reborrow_from_generator(r: &mut ()) {
+fn reborrow_from_coroutine(r: &mut ()) {
     let d = WithDrop;
-    move || { d; yield; &mut *r }; //~ WARN unused generator that must be used
+    move || { d; yield; &mut *r }; //~ WARN unused coroutine that must be used
 }
 
 fn main() {}
diff --git a/tests/ui/nll/issue-48623-generator.stderr b/tests/ui/nll/issue-48623-coroutine.stderr
index bfdfca21004..1b7b1735aac 100644
--- a/tests/ui/nll/issue-48623-generator.stderr
+++ b/tests/ui/nll/issue-48623-coroutine.stderr
@@ -1,10 +1,10 @@
-warning: unused generator that must be used
-  --> $DIR/issue-48623-generator.rs:15:5
+warning: unused coroutine that must be used
+  --> $DIR/issue-48623-coroutine.rs:15:5
    |
 LL |     move || { d; yield; &mut *r };
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: generators are lazy and do nothing unless resumed
+   = note: coroutines are lazy and do nothing unless resumed
    = note: `#[warn(unused_must_use)]` on by default
 
 warning: 1 warning emitted
diff --git a/tests/ui/nll/issue-55850.rs b/tests/ui/nll/issue-55850.rs
index e6279bd028e..fc873af9463 100644
--- a/tests/ui/nll/issue-55850.rs
+++ b/tests/ui/nll/issue-55850.rs
@@ -1,16 +1,16 @@
 #![allow(unused_mut)]
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
 use std::marker::Unpin;
-use std::ops::Generator;
-use std::ops::GeneratorState::Yielded;
+use std::ops::Coroutine;
+use std::ops::CoroutineState::Yielded;
 use std::pin::Pin;
 
 pub struct GenIter<G>(G);
 
 impl <G> Iterator for GenIter<G>
 where
-    G: Generator + Unpin,
+    G: Coroutine + Unpin,
 {
     type Item = G::Yield;
 
@@ -26,7 +26,7 @@ fn bug<'a>() -> impl Iterator<Item = &'a str> {
     GenIter(move || {
         let mut s = String::new();
         yield &s[..] //~ ERROR cannot yield value referencing local variable `s` [E0515]
-        //~| ERROR borrow may still be in use when generator yields
+        //~| ERROR borrow may still be in use when coroutine yields
     })
 }
 
diff --git a/tests/ui/nll/issue-55850.stderr b/tests/ui/nll/issue-55850.stderr
index 86a8cdc42ff..3d43817f4d8 100644
--- a/tests/ui/nll/issue-55850.stderr
+++ b/tests/ui/nll/issue-55850.stderr
@@ -7,7 +7,7 @@ LL |         yield &s[..]
    |         |      `s` is borrowed here
    |         yields a value referencing data owned by the current function
 
-error[E0626]: borrow may still be in use when generator yields
+error[E0626]: borrow may still be in use when coroutine yields
   --> $DIR/issue-55850.rs:28:16
    |
 LL |         yield &s[..]
diff --git a/tests/ui/nll/move-errors.stderr b/tests/ui/nll/move-errors.stderr
index 58b8aa31d4c..0d994ef29ba 100644
--- a/tests/ui/nll/move-errors.stderr
+++ b/tests/ui/nll/move-errors.stderr
@@ -186,7 +186,7 @@ help: consider borrowing the pattern binding
 LL |         F(s, ref mut t) => (),
    |              +++
 
-error[E0507]: cannot move out of `x` as enum variant `Err` which is behind a shared reference
+error[E0507]: cannot move out of `x` as enum variant `Ok` which is behind a shared reference
   --> $DIR/move-errors.rs:110:11
    |
 LL |     match *x {
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr
new file mode 100644
index 00000000000..6f9b3303163
--- /dev/null
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.nll.stderr
@@ -0,0 +1,36 @@
+error[E0046]: not all trait items implemented, missing: `call`
+  --> $DIR/location-insensitive-scopes-issue-116657.rs:18:1
+   |
+LL |     fn call(x: Self) -> Self::Output;
+   |     --------------------------------- `call` from trait
+...
+LL | impl<T: PlusOne> Callable for T {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation
+
+error: unconstrained opaque type
+  --> $DIR/location-insensitive-scopes-issue-116657.rs:22:19
+   |
+LL |     type Output = impl PlusOne;
+   |                   ^^^^^^^^^^^^
+   |
+   = note: `Output` must be used in combination with a concrete type within the same impl
+
+error[E0700]: hidden type for `impl PlusOne` captures lifetime that does not appear in bounds
+  --> $DIR/location-insensitive-scopes-issue-116657.rs:28:5
+   |
+LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne {
+   |         --                     ------------ opaque type defined here
+   |         |
+   |         hidden type `<&'a mut i32 as Callable>::Output` captures the lifetime `'a` as defined here
+LL |     <&mut i32 as Callable>::call(y)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: to declare that `impl PlusOne` captures `'a`, you can add an explicit `'a` lifetime bound
+   |
+LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + 'a {
+   |                                             ++++
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0046, E0700.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.polonius.stderr b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.polonius.stderr
new file mode 100644
index 00000000000..6f9b3303163
--- /dev/null
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.polonius.stderr
@@ -0,0 +1,36 @@
+error[E0046]: not all trait items implemented, missing: `call`
+  --> $DIR/location-insensitive-scopes-issue-116657.rs:18:1
+   |
+LL |     fn call(x: Self) -> Self::Output;
+   |     --------------------------------- `call` from trait
+...
+LL | impl<T: PlusOne> Callable for T {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `call` in implementation
+
+error: unconstrained opaque type
+  --> $DIR/location-insensitive-scopes-issue-116657.rs:22:19
+   |
+LL |     type Output = impl PlusOne;
+   |                   ^^^^^^^^^^^^
+   |
+   = note: `Output` must be used in combination with a concrete type within the same impl
+
+error[E0700]: hidden type for `impl PlusOne` captures lifetime that does not appear in bounds
+  --> $DIR/location-insensitive-scopes-issue-116657.rs:28:5
+   |
+LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne {
+   |         --                     ------------ opaque type defined here
+   |         |
+   |         hidden type `<&'a mut i32 as Callable>::Output` captures the lifetime `'a` as defined here
+LL |     <&mut i32 as Callable>::call(y)
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+help: to declare that `impl PlusOne` captures `'a`, you can add an explicit `'a` lifetime bound
+   |
+LL | fn test<'a>(y: &'a mut i32) -> impl PlusOne + 'a {
+   |                                             ++++
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0046, E0700.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs
new file mode 100644
index 00000000000..ec17e0b093b
--- /dev/null
+++ b/tests/ui/nll/polonius/location-insensitive-scopes-issue-116657.rs
@@ -0,0 +1,33 @@
+// This is a non-regression test for issue #116657, where NLL and `-Zpolonius=next` computed
+// different loan scopes when a member constraint was not ultimately applied.
+
+// revisions: nll polonius
+// [polonius] compile-flags: -Zpolonius=next
+
+#![feature(impl_trait_in_assoc_type)]
+
+trait Callable {
+    type Output;
+    fn call(x: Self) -> Self::Output;
+}
+
+trait PlusOne {}
+
+impl<'a> PlusOne for &'a mut i32 {}
+
+impl<T: PlusOne> Callable for T {
+    //[nll]~^ ERROR not all trait items implemented
+    //[polonius]~^^ ERROR not all trait items implemented
+
+    type Output = impl PlusOne;
+    //[nll]~^ ERROR unconstrained opaque type
+    //[polonius]~^^ ERROR unconstrained opaque type
+}
+
+fn test<'a>(y: &'a mut i32) -> impl PlusOne {
+    <&mut i32 as Callable>::call(y)
+    //[nll]~^ ERROR hidden type for `impl PlusOne` captures lifetime
+    //[polonius]~^^ ERROR hidden type for `impl PlusOne` captures lifetime
+}
+
+fn main() {}
diff --git a/tests/ui/noexporttypeexe.stderr b/tests/ui/noexporttypeexe.stderr
index 26bafd31d01..bf88ceaa5d2 100644
--- a/tests/ui/noexporttypeexe.stderr
+++ b/tests/ui/noexporttypeexe.stderr
@@ -8,6 +8,10 @@ LL |   let x: isize = noexporttypelib::foo();
    |
    = note: expected type `isize`
               found enum `Option<isize>`
+help: consider using `Option::expect` to unwrap the `Option<isize>` value, panicking if the value is an `Option::None`
+   |
+LL |   let x: isize = noexporttypelib::foo().expect("REASON");
+   |                                        +++++++++++++++++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/object-safety/assoc_type_bounds.rs b/tests/ui/object-safety/assoc_type_bounds.rs
index 9abf7939c43..8634ba626a1 100644
--- a/tests/ui/object-safety/assoc_type_bounds.rs
+++ b/tests/ui/object-safety/assoc_type_bounds.rs
@@ -7,7 +7,7 @@ trait Foo<T> {
 trait Cake {}
 impl Cake for () {}
 
-fn foo(_: &dyn Foo<()>) {} //~ ERROR: the value of the associated type `Bar` (from trait `Foo`) must be specified
-fn bar(_: &dyn Foo<i32>) {} //~ ERROR: the value of the associated type `Bar` (from trait `Foo`) must be specified
+fn foo(_: &dyn Foo<()>) {} //~ ERROR: the value of the associated type `Bar` in `Foo` must be specified
+fn bar(_: &dyn Foo<i32>) {} //~ ERROR: the value of the associated type `Bar` in `Foo` must be specified
 
 fn main() {}
diff --git a/tests/ui/object-safety/assoc_type_bounds.stderr b/tests/ui/object-safety/assoc_type_bounds.stderr
index a1396dc3ad4..3d5482625af 100644
--- a/tests/ui/object-safety/assoc_type_bounds.stderr
+++ b/tests/ui/object-safety/assoc_type_bounds.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `Bar` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated type `Bar` in `Foo` must be specified
   --> $DIR/assoc_type_bounds.rs:10:16
    |
 LL |     type Bar
@@ -7,7 +7,7 @@ LL |     type Bar
 LL | fn foo(_: &dyn Foo<()>) {}
    |                ^^^^^^^ help: specify the associated type: `Foo<(), Bar = Type>`
 
-error[E0191]: the value of the associated type `Bar` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated type `Bar` in `Foo` must be specified
   --> $DIR/assoc_type_bounds.rs:11:16
    |
 LL |     type Bar
diff --git a/tests/ui/object-safety/assoc_type_bounds2.rs b/tests/ui/object-safety/assoc_type_bounds2.rs
index 0112123fd42..f7dc2fb8839 100644
--- a/tests/ui/object-safety/assoc_type_bounds2.rs
+++ b/tests/ui/object-safety/assoc_type_bounds2.rs
@@ -7,7 +7,7 @@ trait Foo<T> {
 trait Cake {}
 impl Cake for () {}
 
-fn foo(_: &dyn Foo<()>) {} //~ ERROR: the value of the associated type `Bar` (from trait `Foo`) must be specified
-fn bar(_: &dyn Foo<i32>) {} //~ ERROR: the value of the associated type `Bar` (from trait `Foo`) must be specified
+fn foo(_: &dyn Foo<()>) {} //~ ERROR: the value of the associated type `Bar` in `Foo` must be specified
+fn bar(_: &dyn Foo<i32>) {} //~ ERROR: the value of the associated type `Bar` in `Foo` must be specified
 
 fn main() {}
diff --git a/tests/ui/object-safety/assoc_type_bounds2.stderr b/tests/ui/object-safety/assoc_type_bounds2.stderr
index 7a3c0e02d48..815747436bf 100644
--- a/tests/ui/object-safety/assoc_type_bounds2.stderr
+++ b/tests/ui/object-safety/assoc_type_bounds2.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `Bar` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated type `Bar` in `Foo` must be specified
   --> $DIR/assoc_type_bounds2.rs:10:16
    |
 LL |     type Bar
@@ -7,7 +7,7 @@ LL |     type Bar
 LL | fn foo(_: &dyn Foo<()>) {}
    |                ^^^^^^^ help: specify the associated type: `Foo<(), Bar = Type>`
 
-error[E0191]: the value of the associated type `Bar` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated type `Bar` in `Foo` must be specified
   --> $DIR/assoc_type_bounds2.rs:11:16
    |
 LL |     type Bar
diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed
new file mode 100644
index 00000000000..45c7e07a264
--- /dev/null
+++ b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.fixed
@@ -0,0 +1,10 @@
+// run-rustfix
+trait TraitWithAType {
+    type Item: ?Sized;
+}
+trait Trait {}
+struct A {}
+impl TraitWithAType for A {
+    type Item = dyn Trait; //~ ERROR E0277
+}
+fn main() {}
diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs
new file mode 100644
index 00000000000..c3e958f4983
--- /dev/null
+++ b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.rs
@@ -0,0 +1,10 @@
+// run-rustfix
+trait TraitWithAType {
+    type Item;
+}
+trait Trait {}
+struct A {}
+impl TraitWithAType for A {
+    type Item = dyn Trait; //~ ERROR E0277
+}
+fn main() {}
diff --git a/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr
new file mode 100644
index 00000000000..110e7150733
--- /dev/null
+++ b/tests/ui/object-safety/assoc_type_bounds_implicit_sized.stderr
@@ -0,0 +1,20 @@
+error[E0277]: the size for values of type `(dyn Trait + 'static)` cannot be known at compilation time
+  --> $DIR/assoc_type_bounds_implicit_sized.rs:8:17
+   |
+LL |     type Item = dyn Trait;
+   |                 ^^^^^^^^^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `(dyn Trait + 'static)`
+note: required by a bound in `TraitWithAType::Item`
+  --> $DIR/assoc_type_bounds_implicit_sized.rs:3:5
+   |
+LL |     type Item;
+   |     ^^^^^^^^^^ required by this bound in `TraitWithAType::Item`
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL |     type Item: ?Sized;
+   |              ++++++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_others.rs b/tests/ui/object-safety/assoc_type_bounds_sized_others.rs
index 647b72a759f..5b07bc92f32 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_others.rs
+++ b/tests/ui/object-safety/assoc_type_bounds_sized_others.rs
@@ -10,7 +10,7 @@ trait Foo {
 }
 
 fn foo(_: &dyn Foo) {}
-//~^ ERROR the value of the associated type `Bop` (from trait `Foo`) must be specified
+//~^ ERROR the value of the associated type `Bop` in `Foo` must be specified
 
 trait Bar {
     type Bop;
@@ -20,6 +20,6 @@ trait Bar {
 }
 
 fn bar(_: &dyn Bar) {}
-//~^ ERROR the value of the associated type `Bop` (from trait `Bar`) must be specified
+//~^ ERROR the value of the associated type `Bop` in `Bar` must be specified
 
 fn main() {}
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_others.stderr b/tests/ui/object-safety/assoc_type_bounds_sized_others.stderr
index e4c44334b34..5438faaaf05 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_others.stderr
+++ b/tests/ui/object-safety/assoc_type_bounds_sized_others.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `Bop` (from trait `Foo`) must be specified
+error[E0191]: the value of the associated type `Bop` in `Foo` must be specified
   --> $DIR/assoc_type_bounds_sized_others.rs:12:16
    |
 LL |     type Bop;
@@ -7,7 +7,7 @@ LL |     type Bop;
 LL | fn foo(_: &dyn Foo) {}
    |                ^^^ help: specify the associated type: `Foo<Bop = Type>`
 
-error[E0191]: the value of the associated type `Bop` (from trait `Bar`) must be specified
+error[E0191]: the value of the associated type `Bop` in `Bar` must be specified
   --> $DIR/assoc_type_bounds_sized_others.rs:22:16
    |
 LL |     type Bop;
diff --git a/tests/ui/object-safety/assoc_type_bounds_sized_used.stderr b/tests/ui/object-safety/assoc_type_bounds_sized_used.stderr
index 224d33fb2da..b67a1244ece 100644
--- a/tests/ui/object-safety/assoc_type_bounds_sized_used.stderr
+++ b/tests/ui/object-safety/assoc_type_bounds_sized_used.stderr
@@ -33,6 +33,10 @@ help: consider removing the `?Sized` bound to make the type parameter `Sized`
 LL - fn bop<T: Bop + ?Sized>() {
 LL + fn bop<T: Bop>() {
    |
+help: consider relaxing the implicit `Sized` restriction
+   |
+LL |     type Bar: Default + ?Sized
+   |                       ++++++++
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/object-safety/issue-19538.stderr b/tests/ui/object-safety/issue-19538.stderr
index 183245b2322..31657501e25 100644
--- a/tests/ui/object-safety/issue-19538.stderr
+++ b/tests/ui/object-safety/issue-19538.stderr
@@ -13,6 +13,7 @@ LL |     fn foo<T>(&self, val: T);
 LL | trait Bar: Foo { }
    |       --- this trait cannot be made into an object...
    = help: consider moving `foo` to another trait
+   = help: only type `Thing` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Bar` cannot be made into an object
   --> $DIR/issue-19538.rs:17:30
@@ -29,6 +30,7 @@ LL |     fn foo<T>(&self, val: T);
 LL | trait Bar: Foo { }
    |       --- this trait cannot be made into an object...
    = help: consider moving `foo` to another trait
+   = help: only type `Thing` implements the trait, consider using it directly instead
    = note: required for the cast from `&mut Thing` to `&mut dyn Bar`
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/object-safety/object-safety-issue-22040.stderr b/tests/ui/object-safety/object-safety-issue-22040.stderr
index 0262d536246..2e59d88bdaf 100644
--- a/tests/ui/object-safety/object-safety-issue-22040.stderr
+++ b/tests/ui/object-safety/object-safety-issue-22040.stderr
@@ -11,6 +11,7 @@ LL | trait Expr: Debug + PartialEq {
    |       ----          ^^^^^^^^^ ...because it uses `Self` as a type parameter
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `SExpr<'x>` implements the trait, consider using it directly instead
 
 error: aborting due to previous error
 
diff --git a/tests/ui/object-safety/object-safety-no-static.curr.stderr b/tests/ui/object-safety/object-safety-no-static.curr.stderr
index 1b025229e54..b40470b457b 100644
--- a/tests/ui/object-safety/object-safety-no-static.curr.stderr
+++ b/tests/ui/object-safety/object-safety-no-static.curr.stderr
@@ -11,6 +11,7 @@ LL | trait Foo {
    |       --- this trait cannot be made into an object...
 LL |     fn foo() {}
    |        ^^^ ...because associated function `foo` has no `self` parameter
+   = help: only type `Bar` implements the trait, consider using it directly instead
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self) {}
diff --git a/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr b/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr
index befcef952a8..1eae9a9b9da 100644
--- a/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr
+++ b/tests/ui/object-safety/object-safety-no-static.object_safe_for_dispatch.stderr
@@ -11,6 +11,7 @@ LL | trait Foo {
    |       --- this trait cannot be made into an object...
 LL |     fn foo() {}
    |        ^^^ ...because associated function `foo` has no `self` parameter
+   = help: only type `Bar` implements the trait, consider using it directly instead
    = note: required for the cast from `Box<Bar>` to `Box<dyn Foo>`
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
diff --git a/tests/ui/offset-of/offset-of-enum.rs b/tests/ui/offset-of/offset-of-enum.rs
index d73505821ff..a2d6aace47d 100644
--- a/tests/ui/offset-of/offset-of-enum.rs
+++ b/tests/ui/offset-of/offset-of-enum.rs
@@ -1,4 +1,4 @@
-#![feature(offset_of)]
+#![feature(offset_of, offset_of_enum)]
 
 use std::mem::offset_of;
 
@@ -9,5 +9,10 @@ enum Alpha {
 
 fn main() {
     offset_of!(Alpha::One, 0); //~ ERROR expected type, found variant `Alpha::One`
-    offset_of!(Alpha, Two.0); //~ ERROR no field `Two` on type `Alpha`
+    offset_of!(Alpha, One); //~ ERROR `One` is an enum variant; expected field at end of `offset_of`
+    offset_of!(Alpha, Two.0);
+    offset_of!(Alpha, Two.1); //~ ERROR no field named `1` on enum variant `Alpha::Two`
+    offset_of!(Alpha, Two.foo); //~ ERROR no field named `foo` on enum variant `Alpha::Two`
+    offset_of!(Alpha, NonExistent); //~ ERROR no variant named `NonExistent` found for enum `Alpha`
+    offset_of!(Beta, One); //~ ERROR cannot find type `Beta` in this scope
 }
diff --git a/tests/ui/offset-of/offset-of-enum.stderr b/tests/ui/offset-of/offset-of-enum.stderr
index 6958d199fbd..7e7ad41f5b6 100644
--- a/tests/ui/offset-of/offset-of-enum.stderr
+++ b/tests/ui/offset-of/offset-of-enum.stderr
@@ -7,13 +7,41 @@ LL |     offset_of!(Alpha::One, 0);
    |                not a type
    |                help: try using the variant's enum: `Alpha`
 
-error[E0609]: no field `Two` on type `Alpha`
+error[E0412]: cannot find type `Beta` in this scope
+  --> $DIR/offset-of-enum.rs:17:16
+   |
+LL |     offset_of!(Beta, One);
+   |                ^^^^ not found in this scope
+
+error[E0795]: `One` is an enum variant; expected field at end of `offset_of`
   --> $DIR/offset-of-enum.rs:12:23
    |
-LL |     offset_of!(Alpha, Two.0);
-   |                       ^^^
+LL |     offset_of!(Alpha, One);
+   |                       ^^^ enum variant
+
+error[E0609]: no field named `1` on enum variant `Alpha::Two`
+  --> $DIR/offset-of-enum.rs:14:23
+   |
+LL |     offset_of!(Alpha, Two.1);
+   |                       ^^^ - ...does not have this field
+   |                       |
+   |                       this enum variant...
+
+error[E0609]: no field named `foo` on enum variant `Alpha::Two`
+  --> $DIR/offset-of-enum.rs:15:23
+   |
+LL |     offset_of!(Alpha, Two.foo);
+   |                       ^^^ --- ...does not have this field
+   |                       |
+   |                       this enum variant...
+
+error[E0599]: no variant named `NonExistent` found for enum `Alpha`
+  --> $DIR/offset-of-enum.rs:16:23
+   |
+LL |     offset_of!(Alpha, NonExistent);
+   |                       ^^^^^^^^^^^ variant not found
 
-error: aborting due to 2 previous errors
+error: aborting due to 6 previous errors
 
-Some errors have detailed explanations: E0573, E0609.
-For more information about an error, try `rustc --explain E0573`.
+Some errors have detailed explanations: E0412, E0573, E0599, E0609, E0795.
+For more information about an error, try `rustc --explain E0412`.
diff --git a/tests/ui/offset-of/offset-of-private.rs b/tests/ui/offset-of/offset-of-private.rs
index 6b1a16ba62b..b7affdb7943 100644
--- a/tests/ui/offset-of/offset-of-private.rs
+++ b/tests/ui/offset-of/offset-of-private.rs
@@ -1,4 +1,4 @@
-#![feature(offset_of)]
+#![feature(offset_of, offset_of_enum)]
 
 use std::mem::offset_of;
 
@@ -8,13 +8,20 @@ mod m {
         pub public: u8,
         private: u8,
     }
+
     #[repr(C)]
     pub struct FooTuple(pub u8, u8);
+
     #[repr(C)]
     struct Bar {
         pub public: u8,
         private: u8,
     }
+
+    pub enum Baz {
+        Var1(Foo),
+        Var2(u64),
+    }
 }
 
 fn main() {
@@ -25,4 +32,8 @@ fn main() {
     offset_of!(m::Bar, public); //~ ERROR struct `Bar` is private
     offset_of!(m::Bar, private); //~ ERROR struct `Bar` is private
     //~| ERROR field `private` of struct `Bar` is private
+
+    offset_of!(m::Baz, Var1.0.public);
+    offset_of!(m::Baz, Var1.0.private); //~ ERROR field `private` of struct `Foo` is private
+    offset_of!(m::Baz, Var2.0);
 }
diff --git a/tests/ui/offset-of/offset-of-private.stderr b/tests/ui/offset-of/offset-of-private.stderr
index 0674b58f860..930e30e6390 100644
--- a/tests/ui/offset-of/offset-of-private.stderr
+++ b/tests/ui/offset-of/offset-of-private.stderr
@@ -1,46 +1,52 @@
 error[E0603]: struct `Bar` is private
-  --> $DIR/offset-of-private.rs:25:19
+  --> $DIR/offset-of-private.rs:32:19
    |
 LL |     offset_of!(m::Bar, public);
    |                   ^^^ private struct
    |
 note: the struct `Bar` is defined here
-  --> $DIR/offset-of-private.rs:14:5
+  --> $DIR/offset-of-private.rs:16:5
    |
 LL |     struct Bar {
    |     ^^^^^^^^^^
 
 error[E0603]: struct `Bar` is private
-  --> $DIR/offset-of-private.rs:26:19
+  --> $DIR/offset-of-private.rs:33:19
    |
 LL |     offset_of!(m::Bar, private);
    |                   ^^^ private struct
    |
 note: the struct `Bar` is defined here
-  --> $DIR/offset-of-private.rs:14:5
+  --> $DIR/offset-of-private.rs:16:5
    |
 LL |     struct Bar {
    |     ^^^^^^^^^^
 
 error[E0616]: field `private` of struct `Foo` is private
-  --> $DIR/offset-of-private.rs:22:24
+  --> $DIR/offset-of-private.rs:29:24
    |
 LL |     offset_of!(m::Foo, private);
    |                        ^^^^^^^ private field
 
 error[E0616]: field `1` of struct `FooTuple` is private
-  --> $DIR/offset-of-private.rs:24:29
+  --> $DIR/offset-of-private.rs:31:29
    |
 LL |     offset_of!(m::FooTuple, 1);
    |                             ^ private field
 
 error[E0616]: field `private` of struct `Bar` is private
-  --> $DIR/offset-of-private.rs:26:24
+  --> $DIR/offset-of-private.rs:33:24
    |
 LL |     offset_of!(m::Bar, private);
    |                        ^^^^^^^ private field
 
-error: aborting due to 5 previous errors
+error[E0616]: field `private` of struct `Foo` is private
+  --> $DIR/offset-of-private.rs:37:31
+   |
+LL |     offset_of!(m::Baz, Var1.0.private);
+   |                               ^^^^^^^ private field
+
+error: aborting due to 6 previous errors
 
 Some errors have detailed explanations: E0603, E0616.
 For more information about an error, try `rustc --explain E0603`.
diff --git a/tests/ui/or-patterns/exhaustiveness-pass.rs b/tests/ui/or-patterns/exhaustiveness-pass.rs
index e8c8a0e7ba5..428b9a19fe6 100644
--- a/tests/ui/or-patterns/exhaustiveness-pass.rs
+++ b/tests/ui/or-patterns/exhaustiveness-pass.rs
@@ -35,4 +35,10 @@ fn main() {
         ((0, 0) | (1, 0),) => {}
         _ => {}
     }
+
+    // This one caused ICE https://github.com/rust-lang/rust/issues/117378
+    match (0u8, 0) {
+        (x @ 0 | x @ (1 | 2), _) => {}
+        (3.., _) => {}
+    }
 }
diff --git a/tests/ui/packed/packed-struct-drop-aligned.rs b/tests/ui/packed/packed-struct-drop-aligned.rs
index 9f9f41e2515..4fec72763a4 100644
--- a/tests/ui/packed/packed-struct-drop-aligned.rs
+++ b/tests/ui/packed/packed-struct-drop-aligned.rs
@@ -1,9 +1,9 @@
 // run-pass
-#![feature(generators)]
-#![feature(generator_trait)]
+#![feature(coroutines)]
+#![feature(coroutine_trait)]
 use std::cell::Cell;
 use std::mem;
-use std::ops::Generator;
+use std::ops::Coroutine;
 use std::pin::Pin;
 
 struct Aligned<'a> {
@@ -44,7 +44,7 @@ fn main() {
         let _ = &p;
         p.1 = Aligned { drop_count };
         assert_eq!(drop_count.get(), 1);
-        // Test that a generator drop function moves a value from a packed
+        // Test that a coroutine drop function moves a value from a packed
         // struct to a separate local before dropping it. We move out the
         // first field to generate and open drop for the second field.
         drop(p.0);
diff --git a/tests/ui/parser/deep-unmatched-angle-brackets.rs b/tests/ui/parser/deep-unmatched-angle-brackets.rs
new file mode 100644
index 00000000000..f8d490e1c5e
--- /dev/null
+++ b/tests/ui/parser/deep-unmatched-angle-brackets.rs
@@ -0,0 +1,17 @@
+trait Mul<T> {
+    type Output;
+}
+trait Matrix: Mul<<Self as Matrix>::Row, Output = ()> {
+    type Row;
+    type Transpose: Matrix<Row = Self::Row>;
+}
+fn is_mul<S, T: Mul<S, Output = ()>>() {}
+fn f<T: Matrix>() {
+    is_mul::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<
+        f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<
+        f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<
+        f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::
+        <f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<>();
+    //~^ ERROR expected one of `!`, `+`, `,`, `::`, or `>`, found `(`
+}
+fn main() {}
diff --git a/tests/ui/parser/deep-unmatched-angle-brackets.stderr b/tests/ui/parser/deep-unmatched-angle-brackets.stderr
new file mode 100644
index 00000000000..1f285037482
--- /dev/null
+++ b/tests/ui/parser/deep-unmatched-angle-brackets.stderr
@@ -0,0 +1,13 @@
+error: expected one of `!`, `+`, `,`, `::`, or `>`, found `(`
+  --> $DIR/deep-unmatched-angle-brackets.rs:14:63
+   |
+LL |         <f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<>();
+   |                                                               ^ expected one of `!`, `+`, `,`, `::`, or `>`
+   |
+help: you might have meant to end the type parameters here
+   |
+LL |         <f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<f::<>>();
+   |                                                               +
+
+error: aborting due to previous error
+
diff --git a/tests/ui/parser/diff-markers/unclosed-delims-in-macro.rs b/tests/ui/parser/diff-markers/unclosed-delims-in-macro.rs
new file mode 100644
index 00000000000..da1774acea5
--- /dev/null
+++ b/tests/ui/parser/diff-markers/unclosed-delims-in-macro.rs
@@ -0,0 +1,9 @@
+macro_rules! foo {
+<<<<<<< HEAD
+    //~^ ERROR encountered diff marker
+    () {
+=======
+    () { //
+>>>>>>> 7a4f13c blah blah blah
+    }
+}
diff --git a/tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr b/tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr
new file mode 100644
index 00000000000..e0b6f1b5eb8
--- /dev/null
+++ b/tests/ui/parser/diff-markers/unclosed-delims-in-macro.stderr
@@ -0,0 +1,18 @@
+error: encountered diff marker
+  --> $DIR/unclosed-delims-in-macro.rs:2:1
+   |
+LL | <<<<<<< HEAD
+   | ^^^^^^^ after this is the code before the merge
+...
+LL | =======
+   | -------
+LL |     () { //
+LL | >>>>>>> 7a4f13c blah blah blah
+   | ^^^^^^^ above this are the incoming code changes
+   |
+   = help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
+   = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
+   = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
+
+error: aborting due to previous error
+
diff --git a/tests/ui/parser/diff-markers/unclosed-delims.rs b/tests/ui/parser/diff-markers/unclosed-delims.rs
new file mode 100644
index 00000000000..653a605c28c
--- /dev/null
+++ b/tests/ui/parser/diff-markers/unclosed-delims.rs
@@ -0,0 +1,14 @@
+mod tests {
+    #[test]
+<<<<<<< HEAD
+//~^ ERROR encountered diff marker
+//~| NOTE after this is the code before the merge
+//~| NOTE for an explanation on these markers
+    fn test1() {
+=======
+//~^ NOTE
+    fn test2() {
+>>>>>>> 7a4f13c blah blah blah
+//~^ NOTE above this are the incoming code changes
+    }
+}
diff --git a/tests/ui/parser/diff-markers/unclosed-delims.stderr b/tests/ui/parser/diff-markers/unclosed-delims.stderr
new file mode 100644
index 00000000000..67199179b39
--- /dev/null
+++ b/tests/ui/parser/diff-markers/unclosed-delims.stderr
@@ -0,0 +1,18 @@
+error: encountered diff marker
+  --> $DIR/unclosed-delims.rs:3:1
+   |
+LL | <<<<<<< HEAD
+   | ^^^^^^^ after this is the code before the merge
+...
+LL | =======
+   | -------
+...
+LL | >>>>>>> 7a4f13c blah blah blah
+   | ^^^^^^^ above this are the incoming code changes
+   |
+   = help: if you're having merge conflicts after pulling new code, the top section is the code you already had and the bottom section is the remote code
+   = help: if you're in the middle of a rebase, the top section is the code being rebased onto and the bottom section is the code coming from the current commit being rebased
+   = note: for an explanation on these markers from the `git` documentation, visit <https://git-scm.com/book/en/v2/Git-Tools-Advanced-Merging#_checking_out_conflicts>
+
+error: aborting due to previous error
+
diff --git a/tests/ui/parser/doc-comment-in-stmt.fixed b/tests/ui/parser/doc-comment-in-stmt.fixed
new file mode 100644
index 00000000000..4b3ecccf66c
--- /dev/null
+++ b/tests/ui/parser/doc-comment-in-stmt.fixed
@@ -0,0 +1,27 @@
+// run-rustfix
+#![allow(unused)]
+fn foo() -> bool {
+    false
+    // !self.allow_ty_infer()
+    //~^ ERROR found doc comment
+}
+
+fn bar() -> bool {
+    false
+    /* ! bar */ //~ ERROR found doc comment
+}
+
+fn baz() -> i32 {
+    1 /* * baz */ //~ ERROR found doc comment
+}
+
+fn quux() -> i32 {
+    2 // / quux
+    //~^ ERROR found doc comment
+}
+
+fn main() {
+    let x = 0;
+    let y = x.max(1) // !foo //~ ERROR found doc comment
+        .min(2);
+}
diff --git a/tests/ui/parser/doc-comment-in-stmt.rs b/tests/ui/parser/doc-comment-in-stmt.rs
index b02df13213f..73d08f51c66 100644
--- a/tests/ui/parser/doc-comment-in-stmt.rs
+++ b/tests/ui/parser/doc-comment-in-stmt.rs
@@ -1,3 +1,5 @@
+// run-rustfix
+#![allow(unused)]
 fn foo() -> bool {
     false
     //!self.allow_ty_infer()
@@ -14,7 +16,12 @@ fn baz() -> i32 {
 }
 
 fn quux() -> i32 {
-    2 /*! quux */ //~ ERROR found doc comment
+    2 /// quux
+    //~^ ERROR found doc comment
 }
 
-fn main() {}
+fn main() {
+    let x = 0;
+    let y = x.max(1) //!foo //~ ERROR found doc comment
+        .min(2);
+}
diff --git a/tests/ui/parser/doc-comment-in-stmt.stderr b/tests/ui/parser/doc-comment-in-stmt.stderr
index febfb600cc7..7aefd5c9952 100644
--- a/tests/ui/parser/doc-comment-in-stmt.stderr
+++ b/tests/ui/parser/doc-comment-in-stmt.stderr
@@ -1,50 +1,61 @@
 error: expected one of `.`, `;`, `?`, `}`, or an operator, found doc comment `//!self.allow_ty_infer()`
-  --> $DIR/doc-comment-in-stmt.rs:3:5
+  --> $DIR/doc-comment-in-stmt.rs:5:5
    |
 LL |     false
    |          - expected one of `.`, `;`, `?`, `}`, or an operator
 LL |     //!self.allow_ty_infer()
    |     ^^^^^^^^^^^^^^^^^^^^^^^^ unexpected token
    |
-help: add a space before `!` to use a regular comment
+help: add a space before `!` to write a regular comment
    |
 LL |     // !self.allow_ty_infer()
-   |     ~~~~
+   |       +
 
 error: expected one of `.`, `;`, `?`, `}`, or an operator, found doc comment `/*! bar */`
-  --> $DIR/doc-comment-in-stmt.rs:9:5
+  --> $DIR/doc-comment-in-stmt.rs:11:5
    |
 LL |     false
    |          - expected one of `.`, `;`, `?`, `}`, or an operator
 LL |     /*! bar */
    |     ^^^^^^^^^^ unexpected token
    |
-help: add a space before `!` to use a regular comment
+help: add a space before `!` to write a regular comment
    |
 LL |     /* ! bar */
-   |     ~~~~
+   |       +
 
 error: expected one of `.`, `;`, `?`, `}`, or an operator, found doc comment `/** baz */`
-  --> $DIR/doc-comment-in-stmt.rs:13:7
+  --> $DIR/doc-comment-in-stmt.rs:15:7
    |
 LL |     1 /** baz */
    |       ^^^^^^^^^^ expected one of `.`, `;`, `?`, `}`, or an operator
    |
-help: add a space before `*` to use a regular comment
+help: add a space before the last `*` to write a regular comment
    |
 LL |     1 /* * baz */
-   |       ~~~~
+   |         +
 
-error: expected one of `.`, `;`, `?`, `}`, or an operator, found doc comment `/*! quux */`
-  --> $DIR/doc-comment-in-stmt.rs:17:7
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found doc comment `/// quux`
+  --> $DIR/doc-comment-in-stmt.rs:19:7
    |
-LL |     2 /*! quux */
-   |       ^^^^^^^^^^^ expected one of `.`, `;`, `?`, `}`, or an operator
+LL |     2 /// quux
+   |       ^^^^^^^^ expected one of `.`, `;`, `?`, `}`, or an operator
    |
-help: add a space before `!` to use a regular comment
+help: add a space before the last `/` to write a regular comment
    |
-LL |     2 /* ! quux */
-   |       ~~~~
+LL |     2 // / quux
+   |         +
 
-error: aborting due to 4 previous errors
+error: expected one of `.`, `;`, `?`, `else`, or an operator, found doc comment `//!foo
+  --> $DIR/doc-comment-in-stmt.rs:25:22
+   |
+LL |     let y = x.max(1) //!foo
+   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected one of `.`, `;`, `?`, `else`, or an operator
+   |
+help: add a space before `!` to write a regular comment
+   |
+LL |     let y = x.max(1) // !foo
+   |                        +
+
+error: aborting due to 5 previous errors
 
diff --git a/tests/ui/parser/emoji-identifiers.stderr b/tests/ui/parser/emoji-identifiers.stderr
index e645b68ba87..8250dd1ea2e 100644
--- a/tests/ui/parser/emoji-identifiers.stderr
+++ b/tests/ui/parser/emoji-identifiers.stderr
@@ -75,6 +75,12 @@ LL |     👀::full_of✨()
    |         |
    |         function or associated item not found in `👀`
    |         help: there is an associated function with a similar name: `full_of_✨`
+   |
+note: if you're trying to build a new `👀`, consider using `👀::full_of_✨` which returns `👀`
+  --> $DIR/emoji-identifiers.rs:4:5
+   |
+LL |     fn full_of_✨() -> 👀 {
+   |     ^^^^^^^^^^^^^^^^^^^^^
 
 error[E0425]: cannot find function `i_like_to_😄_a_lot` in this scope
   --> $DIR/emoji-identifiers.rs:13:13
diff --git a/tests/ui/parser/issue-116781.rs b/tests/ui/parser/issue-116781.rs
new file mode 100644
index 00000000000..0e951d2eaa4
--- /dev/null
+++ b/tests/ui/parser/issue-116781.rs
@@ -0,0 +1,8 @@
+#[derive(Debug)]
+struct Foo {
+    #[cfg(all())]
+    field: fn(($),), //~ ERROR expected pattern, found `$`
+    //~^ ERROR expected pattern, found `$`
+}
+
+fn main() {}
diff --git a/tests/ui/parser/issue-116781.stderr b/tests/ui/parser/issue-116781.stderr
new file mode 100644
index 00000000000..1a77b60a50d
--- /dev/null
+++ b/tests/ui/parser/issue-116781.stderr
@@ -0,0 +1,16 @@
+error: expected pattern, found `$`
+  --> $DIR/issue-116781.rs:4:16
+   |
+LL |     field: fn(($),),
+   |                ^ expected pattern
+
+error: expected pattern, found `$`
+  --> $DIR/issue-116781.rs:4:16
+   |
+LL |     field: fn(($),),
+   |                ^ expected pattern
+   |
+   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/parser/issue-100197-mut-let.fixed b/tests/ui/parser/issues/issue-100197-mut-let.fixed
index 5a895622200..5a895622200 100644
--- a/tests/ui/parser/issue-100197-mut-let.fixed
+++ b/tests/ui/parser/issues/issue-100197-mut-let.fixed
diff --git a/tests/ui/parser/issue-100197-mut-let.rs b/tests/ui/parser/issues/issue-100197-mut-let.rs
index 71103813a6e..71103813a6e 100644
--- a/tests/ui/parser/issue-100197-mut-let.rs
+++ b/tests/ui/parser/issues/issue-100197-mut-let.rs
diff --git a/tests/ui/parser/issue-100197-mut-let.stderr b/tests/ui/parser/issues/issue-100197-mut-let.stderr
index 86658e4f39f..86658e4f39f 100644
--- a/tests/ui/parser/issue-100197-mut-let.stderr
+++ b/tests/ui/parser/issues/issue-100197-mut-let.stderr
diff --git a/tests/ui/parser/issue-101477-enum.fixed b/tests/ui/parser/issues/issue-101477-enum.fixed
index 1dfeae22aea..1dfeae22aea 100644
--- a/tests/ui/parser/issue-101477-enum.fixed
+++ b/tests/ui/parser/issues/issue-101477-enum.fixed
diff --git a/tests/ui/parser/issue-101477-enum.rs b/tests/ui/parser/issues/issue-101477-enum.rs
index ea7051d69a4..ea7051d69a4 100644
--- a/tests/ui/parser/issue-101477-enum.rs
+++ b/tests/ui/parser/issues/issue-101477-enum.rs
diff --git a/tests/ui/parser/issue-101477-enum.stderr b/tests/ui/parser/issues/issue-101477-enum.stderr
index 94130671f1c..94130671f1c 100644
--- a/tests/ui/parser/issue-101477-enum.stderr
+++ b/tests/ui/parser/issues/issue-101477-enum.stderr
diff --git a/tests/ui/parser/issue-101477-let.fixed b/tests/ui/parser/issues/issue-101477-let.fixed
index 9989ad81524..9989ad81524 100644
--- a/tests/ui/parser/issue-101477-let.fixed
+++ b/tests/ui/parser/issues/issue-101477-let.fixed
diff --git a/tests/ui/parser/issue-101477-let.rs b/tests/ui/parser/issues/issue-101477-let.rs
index 8b0e8bee179..8b0e8bee179 100644
--- a/tests/ui/parser/issue-101477-let.rs
+++ b/tests/ui/parser/issues/issue-101477-let.rs
diff --git a/tests/ui/parser/issue-101477-let.stderr b/tests/ui/parser/issues/issue-101477-let.stderr
index 1b30d4b1786..1b30d4b1786 100644
--- a/tests/ui/parser/issue-101477-let.stderr
+++ b/tests/ui/parser/issues/issue-101477-let.stderr
diff --git a/tests/ui/parser/issue-102806.rs b/tests/ui/parser/issues/issue-102806.rs
index ba297bdc967..ba297bdc967 100644
--- a/tests/ui/parser/issue-102806.rs
+++ b/tests/ui/parser/issues/issue-102806.rs
diff --git a/tests/ui/parser/issue-102806.stderr b/tests/ui/parser/issues/issue-102806.stderr
index ba8174a823b..ba8174a823b 100644
--- a/tests/ui/parser/issue-102806.stderr
+++ b/tests/ui/parser/issues/issue-102806.stderr
diff --git a/tests/ui/parser/issue-103143.rs b/tests/ui/parser/issues/issue-103143.rs
index a584274c405..a584274c405 100644
--- a/tests/ui/parser/issue-103143.rs
+++ b/tests/ui/parser/issues/issue-103143.rs
diff --git a/tests/ui/parser/issue-103143.stderr b/tests/ui/parser/issues/issue-103143.stderr
index 4035c69afa7..4035c69afa7 100644
--- a/tests/ui/parser/issue-103143.stderr
+++ b/tests/ui/parser/issues/issue-103143.stderr
diff --git a/tests/ui/parser/issue-103381.fixed b/tests/ui/parser/issues/issue-103381.fixed
index 6a9fb991097..6a9fb991097 100644
--- a/tests/ui/parser/issue-103381.fixed
+++ b/tests/ui/parser/issues/issue-103381.fixed
diff --git a/tests/ui/parser/issue-103381.rs b/tests/ui/parser/issues/issue-103381.rs
index bf79e10103e..bf79e10103e 100644
--- a/tests/ui/parser/issue-103381.rs
+++ b/tests/ui/parser/issues/issue-103381.rs
diff --git a/tests/ui/parser/issue-103381.stderr b/tests/ui/parser/issues/issue-103381.stderr
index 85fcc18e76b..85fcc18e76b 100644
--- a/tests/ui/parser/issue-103381.stderr
+++ b/tests/ui/parser/issues/issue-103381.stderr
diff --git a/tests/ui/parser/issue-103425.rs b/tests/ui/parser/issues/issue-103425.rs
index c2f8123ca4e..c2f8123ca4e 100644
--- a/tests/ui/parser/issue-103425.rs
+++ b/tests/ui/parser/issues/issue-103425.rs
diff --git a/tests/ui/parser/issue-103425.stderr b/tests/ui/parser/issues/issue-103425.stderr
index 0efe3e3ca71..0efe3e3ca71 100644
--- a/tests/ui/parser/issue-103425.stderr
+++ b/tests/ui/parser/issues/issue-103425.stderr
diff --git a/tests/ui/parser/issue-103451.rs b/tests/ui/parser/issues/issue-103451.rs
index be33213f3cb..be33213f3cb 100644
--- a/tests/ui/parser/issue-103451.rs
+++ b/tests/ui/parser/issues/issue-103451.rs
diff --git a/tests/ui/parser/issue-103451.stderr b/tests/ui/parser/issues/issue-103451.stderr
index 6aacd5012c1..6aacd5012c1 100644
--- a/tests/ui/parser/issue-103451.stderr
+++ b/tests/ui/parser/issues/issue-103451.stderr
diff --git a/tests/ui/parser/issue-103748-ICE-wrong-braces.rs b/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.rs
index 8012cb652bd..8012cb652bd 100644
--- a/tests/ui/parser/issue-103748-ICE-wrong-braces.rs
+++ b/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.rs
diff --git a/tests/ui/parser/issue-103748-ICE-wrong-braces.stderr b/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.stderr
index b0d8b03ae08..b0d8b03ae08 100644
--- a/tests/ui/parser/issue-103748-ICE-wrong-braces.stderr
+++ b/tests/ui/parser/issues/issue-103748-ICE-wrong-braces.stderr
diff --git a/tests/ui/parser/issue-104620.rs b/tests/ui/parser/issues/issue-104620.rs
index f49476c4408..f49476c4408 100644
--- a/tests/ui/parser/issue-104620.rs
+++ b/tests/ui/parser/issues/issue-104620.rs
diff --git a/tests/ui/parser/issue-104620.stderr b/tests/ui/parser/issues/issue-104620.stderr
index d06a6b2554b..d06a6b2554b 100644
--- a/tests/ui/parser/issue-104620.stderr
+++ b/tests/ui/parser/issues/issue-104620.stderr
diff --git a/tests/ui/parser/issue-104867-inc-dec-2.rs b/tests/ui/parser/issues/issue-104867-inc-dec-2.rs
index a006421a975..a006421a975 100644
--- a/tests/ui/parser/issue-104867-inc-dec-2.rs
+++ b/tests/ui/parser/issues/issue-104867-inc-dec-2.rs
diff --git a/tests/ui/parser/issue-104867-inc-dec-2.stderr b/tests/ui/parser/issues/issue-104867-inc-dec-2.stderr
index 4e2d0546851..4e2d0546851 100644
--- a/tests/ui/parser/issue-104867-inc-dec-2.stderr
+++ b/tests/ui/parser/issues/issue-104867-inc-dec-2.stderr
diff --git a/tests/ui/parser/issue-104867-inc-dec.rs b/tests/ui/parser/issues/issue-104867-inc-dec.rs
index 760c67b4bed..760c67b4bed 100644
--- a/tests/ui/parser/issue-104867-inc-dec.rs
+++ b/tests/ui/parser/issues/issue-104867-inc-dec.rs
diff --git a/tests/ui/parser/issue-104867-inc-dec.stderr b/tests/ui/parser/issues/issue-104867-inc-dec.stderr
index 78bfd3e82f0..78bfd3e82f0 100644
--- a/tests/ui/parser/issue-104867-inc-dec.stderr
+++ b/tests/ui/parser/issues/issue-104867-inc-dec.stderr
diff --git a/tests/ui/parser/issue-105366.fixed b/tests/ui/parser/issues/issue-105366.fixed
index ad26643c327..ad26643c327 100644
--- a/tests/ui/parser/issue-105366.fixed
+++ b/tests/ui/parser/issues/issue-105366.fixed
diff --git a/tests/ui/parser/issue-105366.rs b/tests/ui/parser/issues/issue-105366.rs
index 311b6a60f1a..311b6a60f1a 100644
--- a/tests/ui/parser/issue-105366.rs
+++ b/tests/ui/parser/issues/issue-105366.rs
diff --git a/tests/ui/parser/issue-105366.stderr b/tests/ui/parser/issues/issue-105366.stderr
index 0a7408e2c17..0a7408e2c17 100644
--- a/tests/ui/parser/issue-105366.stderr
+++ b/tests/ui/parser/issues/issue-105366.stderr
diff --git a/tests/ui/parser/issue-105634.rs b/tests/ui/parser/issues/issue-105634.rs
index 579aa6e5bfb..579aa6e5bfb 100644
--- a/tests/ui/parser/issue-105634.rs
+++ b/tests/ui/parser/issues/issue-105634.rs
diff --git a/tests/ui/parser/issue-107705.rs b/tests/ui/parser/issues/issue-107705.rs
index b80984fcdb0..b80984fcdb0 100644
--- a/tests/ui/parser/issue-107705.rs
+++ b/tests/ui/parser/issues/issue-107705.rs
diff --git a/tests/ui/parser/issue-107705.stderr b/tests/ui/parser/issues/issue-107705.stderr
index d2d61346118..d2d61346118 100644
--- a/tests/ui/parser/issue-107705.stderr
+++ b/tests/ui/parser/issues/issue-107705.stderr
diff --git a/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed b/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed
new file mode 100644
index 00000000000..b819aa810cb
--- /dev/null
+++ b/tests/ui/parser/issues/issue-108109-fn-missing-params.fixed
@@ -0,0 +1,9 @@
+// run-rustfix
+
+pub fn missing() -> () {}
+//~^ ERROR missing parameters for function definition
+
+pub fn missing2() {}
+//~^ ERROR missing parameters for function definition
+
+fn main() {}
diff --git a/tests/ui/parser/issues/issue-108109-fn-missing-params.rs b/tests/ui/parser/issues/issue-108109-fn-missing-params.rs
new file mode 100644
index 00000000000..01efe728081
--- /dev/null
+++ b/tests/ui/parser/issues/issue-108109-fn-missing-params.rs
@@ -0,0 +1,9 @@
+// run-rustfix
+
+pub fn missing -> () {}
+//~^ ERROR missing parameters for function definition
+
+pub fn missing2 {}
+//~^ ERROR missing parameters for function definition
+
+fn main() {}
diff --git a/tests/ui/parser/issues/issue-108109-fn-missing-params.stderr b/tests/ui/parser/issues/issue-108109-fn-missing-params.stderr
new file mode 100644
index 00000000000..86d3449cc33
--- /dev/null
+++ b/tests/ui/parser/issues/issue-108109-fn-missing-params.stderr
@@ -0,0 +1,14 @@
+error: missing parameters for function definition
+  --> $DIR/issue-108109-fn-missing-params.rs:3:15
+   |
+LL | pub fn missing -> () {}
+   |               ^ help: add a parameter list
+
+error: missing parameters for function definition
+  --> $DIR/issue-108109-fn-missing-params.rs:6:16
+   |
+LL | pub fn missing2 {}
+   |                ^ help: add a parameter list
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed
new file mode 100644
index 00000000000..eaae288864a
--- /dev/null
+++ b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.fixed
@@ -0,0 +1,8 @@
+// run-rustfix
+
+pub fn func<F>() where F: FnOnce() -> () {}
+//~^ ERROR expected one of
+//~| NOTE expected one of
+//~| NOTE `Fn` bounds require arguments in parentheses
+
+fn main() {}
diff --git a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs
new file mode 100644
index 00000000000..ea5c71150e8
--- /dev/null
+++ b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.rs
@@ -0,0 +1,8 @@
+// run-rustfix
+
+pub fn func<F>() where F: FnOnce -> () {}
+//~^ ERROR expected one of
+//~| NOTE expected one of
+//~| NOTE `Fn` bounds require arguments in parentheses
+
+fn main() {}
diff --git a/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr
new file mode 100644
index 00000000000..7cda667570d
--- /dev/null
+++ b/tests/ui/parser/issues/issue-108109-fn-trait-missing-paren.stderr
@@ -0,0 +1,11 @@
+error: expected one of `(`, `+`, `,`, `::`, `<`, or `{`, found `->`
+  --> $DIR/issue-108109-fn-trait-missing-paren.rs:3:34
+   |
+LL | pub fn func<F>() where F: FnOnce -> () {}
+   |                           -------^^ expected one of `(`, `+`, `,`, `::`, `<`, or `{`
+   |                           |     |
+   |                           |     help: try adding parentheses
+   |                           `Fn` bounds require arguments in parentheses
+
+error: aborting due to previous error
+
diff --git a/tests/ui/parser/issue-108495-dec.rs b/tests/ui/parser/issues/issue-108495-dec.rs
index e0816f84e5c..e0816f84e5c 100644
--- a/tests/ui/parser/issue-108495-dec.rs
+++ b/tests/ui/parser/issues/issue-108495-dec.rs
diff --git a/tests/ui/parser/issue-108495-dec.stderr b/tests/ui/parser/issues/issue-108495-dec.stderr
index 85b29038f7c..85b29038f7c 100644
--- a/tests/ui/parser/issue-108495-dec.stderr
+++ b/tests/ui/parser/issues/issue-108495-dec.stderr
diff --git a/tests/ui/parser/issue-112188.fixed b/tests/ui/parser/issues/issue-112188.fixed
index 5e73d8e38de..5e73d8e38de 100644
--- a/tests/ui/parser/issue-112188.fixed
+++ b/tests/ui/parser/issues/issue-112188.fixed
diff --git a/tests/ui/parser/issue-112188.rs b/tests/ui/parser/issues/issue-112188.rs
index 27ca192e522..27ca192e522 100644
--- a/tests/ui/parser/issue-112188.rs
+++ b/tests/ui/parser/issues/issue-112188.rs
diff --git a/tests/ui/parser/issue-112188.stderr b/tests/ui/parser/issues/issue-112188.stderr
index 6d2d8e6a3b0..6d2d8e6a3b0 100644
--- a/tests/ui/parser/issue-112188.stderr
+++ b/tests/ui/parser/issues/issue-112188.stderr
diff --git a/tests/ui/parser/issue-113342.rs b/tests/ui/parser/issues/issue-113342.rs
index 18b502736f7..18b502736f7 100644
--- a/tests/ui/parser/issue-113342.rs
+++ b/tests/ui/parser/issues/issue-113342.rs
diff --git a/tests/ui/parser/issue-113342.stderr b/tests/ui/parser/issues/issue-113342.stderr
index a0c5e665ff8..a0c5e665ff8 100644
--- a/tests/ui/parser/issue-113342.stderr
+++ b/tests/ui/parser/issues/issue-113342.stderr
diff --git a/tests/ui/parser/issue-17718-parse-const.rs b/tests/ui/parser/issues/issue-17718-parse-const.rs
index d5a5f445d5b..d5a5f445d5b 100644
--- a/tests/ui/parser/issue-17718-parse-const.rs
+++ b/tests/ui/parser/issues/issue-17718-parse-const.rs
diff --git a/tests/ui/parser/issue-39616.rs b/tests/ui/parser/issues/issue-39616.rs
index 46b5aa334ca..46b5aa334ca 100644
--- a/tests/ui/parser/issue-39616.rs
+++ b/tests/ui/parser/issues/issue-39616.rs
diff --git a/tests/ui/parser/issue-39616.stderr b/tests/ui/parser/issues/issue-39616.stderr
index 393d1f2e2ce..393d1f2e2ce 100644
--- a/tests/ui/parser/issue-39616.stderr
+++ b/tests/ui/parser/issues/issue-39616.stderr
diff --git a/tests/ui/parser/issue-49257.rs b/tests/ui/parser/issues/issue-49257.rs
index a7fa19d52fd..a7fa19d52fd 100644
--- a/tests/ui/parser/issue-49257.rs
+++ b/tests/ui/parser/issues/issue-49257.rs
diff --git a/tests/ui/parser/issue-49257.stderr b/tests/ui/parser/issues/issue-49257.stderr
index 97e16f88b8d..97e16f88b8d 100644
--- a/tests/ui/parser/issue-49257.stderr
+++ b/tests/ui/parser/issues/issue-49257.stderr
diff --git a/tests/ui/parser/issue-61858.rs b/tests/ui/parser/issues/issue-61858.rs
index 6c3b56586c4..6c3b56586c4 100644
--- a/tests/ui/parser/issue-61858.rs
+++ b/tests/ui/parser/issues/issue-61858.rs
diff --git a/tests/ui/parser/issue-61858.stderr b/tests/ui/parser/issues/issue-61858.stderr
index 03f51c6e3a8..03f51c6e3a8 100644
--- a/tests/ui/parser/issue-61858.stderr
+++ b/tests/ui/parser/issues/issue-61858.stderr
diff --git a/tests/ui/parser/issue-68091-unicode-ident-after-if.rs b/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.rs
index 57d36feb37b..57d36feb37b 100644
--- a/tests/ui/parser/issue-68091-unicode-ident-after-if.rs
+++ b/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.rs
diff --git a/tests/ui/parser/issue-68091-unicode-ident-after-if.stderr b/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr
index 6674b924e9c..6674b924e9c 100644
--- a/tests/ui/parser/issue-68091-unicode-ident-after-if.stderr
+++ b/tests/ui/parser/issues/issue-68091-unicode-ident-after-if.stderr
diff --git a/tests/ui/parser/issue-68092-unicode-ident-after-incomplete-expr.rs b/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.rs
index 1a90b4724d4..1a90b4724d4 100644
--- a/tests/ui/parser/issue-68092-unicode-ident-after-incomplete-expr.rs
+++ b/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.rs
diff --git a/tests/ui/parser/issue-68092-unicode-ident-after-incomplete-expr.stderr b/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr
index 0b9c364f1f1..0b9c364f1f1 100644
--- a/tests/ui/parser/issue-68092-unicode-ident-after-incomplete-expr.stderr
+++ b/tests/ui/parser/issues/issue-68092-unicode-ident-after-incomplete-expr.stderr
diff --git a/tests/ui/parser/issue-68987-unmatch-issue-1.rs b/tests/ui/parser/issues/issue-68987-unmatch-issue-1.rs
index 30e7ef46736..30e7ef46736 100644
--- a/tests/ui/parser/issue-68987-unmatch-issue-1.rs
+++ b/tests/ui/parser/issues/issue-68987-unmatch-issue-1.rs
diff --git a/tests/ui/parser/issue-68987-unmatch-issue-1.stderr b/tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr
index 2d873b46193..2d873b46193 100644
--- a/tests/ui/parser/issue-68987-unmatch-issue-1.stderr
+++ b/tests/ui/parser/issues/issue-68987-unmatch-issue-1.stderr
diff --git a/tests/ui/parser/issue-68987-unmatch-issue-2.rs b/tests/ui/parser/issues/issue-68987-unmatch-issue-2.rs
index 89aaa68ba40..89aaa68ba40 100644
--- a/tests/ui/parser/issue-68987-unmatch-issue-2.rs
+++ b/tests/ui/parser/issues/issue-68987-unmatch-issue-2.rs
diff --git a/tests/ui/parser/issue-68987-unmatch-issue-2.stderr b/tests/ui/parser/issues/issue-68987-unmatch-issue-2.stderr
index 0ecb748a0a4..0ecb748a0a4 100644
--- a/tests/ui/parser/issue-68987-unmatch-issue-2.stderr
+++ b/tests/ui/parser/issues/issue-68987-unmatch-issue-2.stderr
diff --git a/tests/ui/parser/issue-68987-unmatch-issue-3.rs b/tests/ui/parser/issues/issue-68987-unmatch-issue-3.rs
index e98df8d7c3c..e98df8d7c3c 100644
--- a/tests/ui/parser/issue-68987-unmatch-issue-3.rs
+++ b/tests/ui/parser/issues/issue-68987-unmatch-issue-3.rs
diff --git a/tests/ui/parser/issue-68987-unmatch-issue-3.stderr b/tests/ui/parser/issues/issue-68987-unmatch-issue-3.stderr
index dfc4407ed65..dfc4407ed65 100644
--- a/tests/ui/parser/issue-68987-unmatch-issue-3.stderr
+++ b/tests/ui/parser/issues/issue-68987-unmatch-issue-3.stderr
diff --git a/tests/ui/parser/issue-68987-unmatch-issue.rs b/tests/ui/parser/issues/issue-68987-unmatch-issue.rs
index 5a3620bf24b..5a3620bf24b 100644
--- a/tests/ui/parser/issue-68987-unmatch-issue.rs
+++ b/tests/ui/parser/issues/issue-68987-unmatch-issue.rs
diff --git a/tests/ui/parser/issue-68987-unmatch-issue.stderr b/tests/ui/parser/issues/issue-68987-unmatch-issue.stderr
index cabd133242f..cabd133242f 100644
--- a/tests/ui/parser/issue-68987-unmatch-issue.stderr
+++ b/tests/ui/parser/issues/issue-68987-unmatch-issue.stderr
diff --git a/tests/ui/parser/issue-81804.rs b/tests/ui/parser/issues/issue-81804.rs
index ebc4752a142..ebc4752a142 100644
--- a/tests/ui/parser/issue-81804.rs
+++ b/tests/ui/parser/issues/issue-81804.rs
diff --git a/tests/ui/parser/issue-81804.stderr b/tests/ui/parser/issues/issue-81804.stderr
index de3b33ecd95..de3b33ecd95 100644
--- a/tests/ui/parser/issue-81804.stderr
+++ b/tests/ui/parser/issues/issue-81804.stderr
diff --git a/tests/ui/parser/issue-81827.rs b/tests/ui/parser/issues/issue-81827.rs
index 91defd12a57..91defd12a57 100644
--- a/tests/ui/parser/issue-81827.rs
+++ b/tests/ui/parser/issues/issue-81827.rs
diff --git a/tests/ui/parser/issue-81827.stderr b/tests/ui/parser/issues/issue-81827.stderr
index 63d135f73e6..63d135f73e6 100644
--- a/tests/ui/parser/issue-81827.stderr
+++ b/tests/ui/parser/issues/issue-81827.stderr
diff --git a/tests/ui/parser/issue-87694-duplicated-pub.rs b/tests/ui/parser/issues/issue-87694-duplicated-pub.rs
index e3ea61dc4ad..e3ea61dc4ad 100644
--- a/tests/ui/parser/issue-87694-duplicated-pub.rs
+++ b/tests/ui/parser/issues/issue-87694-duplicated-pub.rs
diff --git a/tests/ui/parser/issue-87694-duplicated-pub.stderr b/tests/ui/parser/issues/issue-87694-duplicated-pub.stderr
index 8d242bc9de5..8d242bc9de5 100644
--- a/tests/ui/parser/issue-87694-duplicated-pub.stderr
+++ b/tests/ui/parser/issues/issue-87694-duplicated-pub.stderr
diff --git a/tests/ui/parser/issue-87694-misplaced-pub.rs b/tests/ui/parser/issues/issue-87694-misplaced-pub.rs
index 3f824617cad..3f824617cad 100644
--- a/tests/ui/parser/issue-87694-misplaced-pub.rs
+++ b/tests/ui/parser/issues/issue-87694-misplaced-pub.rs
diff --git a/tests/ui/parser/issue-87694-misplaced-pub.stderr b/tests/ui/parser/issues/issue-87694-misplaced-pub.stderr
index 94c6a29efcb..94c6a29efcb 100644
--- a/tests/ui/parser/issue-87694-misplaced-pub.stderr
+++ b/tests/ui/parser/issues/issue-87694-misplaced-pub.stderr
diff --git a/tests/ui/parser/issue-90728.rs b/tests/ui/parser/issues/issue-90728.rs
index d6a898361cc..d6a898361cc 100644
--- a/tests/ui/parser/issue-90728.rs
+++ b/tests/ui/parser/issues/issue-90728.rs
diff --git a/tests/ui/parser/issue-90728.stderr b/tests/ui/parser/issues/issue-90728.stderr
index b55c4603066..b55c4603066 100644
--- a/tests/ui/parser/issue-90728.stderr
+++ b/tests/ui/parser/issues/issue-90728.stderr
diff --git a/tests/ui/parser/issue-91421.rs b/tests/ui/parser/issues/issue-91421.rs
index 8bba27f3724..8bba27f3724 100644
--- a/tests/ui/parser/issue-91421.rs
+++ b/tests/ui/parser/issues/issue-91421.rs
diff --git a/tests/ui/parser/issue-91421.stderr b/tests/ui/parser/issues/issue-91421.stderr
index 2d9652051dd..2d9652051dd 100644
--- a/tests/ui/parser/issue-91421.stderr
+++ b/tests/ui/parser/issues/issue-91421.stderr
diff --git a/tests/ui/parser/issue-99625-enum-struct-mutually-exclusive.fixed b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed
index 4b4a416b1ac..4b4a416b1ac 100644
--- a/tests/ui/parser/issue-99625-enum-struct-mutually-exclusive.fixed
+++ b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.fixed
diff --git a/tests/ui/parser/issue-99625-enum-struct-mutually-exclusive.rs b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs
index 9cc88664129..9cc88664129 100644
--- a/tests/ui/parser/issue-99625-enum-struct-mutually-exclusive.rs
+++ b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.rs
diff --git a/tests/ui/parser/issue-99625-enum-struct-mutually-exclusive.stderr b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr
index edc640bf5ec..edc640bf5ec 100644
--- a/tests/ui/parser/issue-99625-enum-struct-mutually-exclusive.stderr
+++ b/tests/ui/parser/issues/issue-99625-enum-struct-mutually-exclusive.stderr
diff --git a/tests/ui/parser/issue-99910-const-let-mutually-exclusive.fixed b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed
index 64ab6f62b77..64ab6f62b77 100644
--- a/tests/ui/parser/issue-99910-const-let-mutually-exclusive.fixed
+++ b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.fixed
diff --git a/tests/ui/parser/issue-99910-const-let-mutually-exclusive.rs b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs
index 50520971ffb..50520971ffb 100644
--- a/tests/ui/parser/issue-99910-const-let-mutually-exclusive.rs
+++ b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.rs
diff --git a/tests/ui/parser/issue-99910-const-let-mutually-exclusive.stderr b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.stderr
index 72377fc379c..72377fc379c 100644
--- a/tests/ui/parser/issue-99910-const-let-mutually-exclusive.stderr
+++ b/tests/ui/parser/issues/issue-99910-const-let-mutually-exclusive.stderr
diff --git a/tests/ui/parser/mod_file_not_exist.stderr b/tests/ui/parser/mod_file_not_exist.stderr
index 62456d51880..c2f9d30d9ec 100644
--- a/tests/ui/parser/mod_file_not_exist.stderr
+++ b/tests/ui/parser/mod_file_not_exist.stderr
@@ -5,6 +5,7 @@ LL | mod not_a_real_file;
    | ^^^^^^^^^^^^^^^^^^^^
    |
    = help: to create the module `not_a_real_file`, create file "$DIR/not_a_real_file.rs" or "$DIR/not_a_real_file/mod.rs"
+   = note: if there is a `mod not_a_real_file` elsewhere in the crate already, import it with `use crate::...` instead
 
 error[E0433]: failed to resolve: use of undeclared crate or module `mod_file_aux`
   --> $DIR/mod_file_not_exist.rs:7:16
diff --git a/tests/ui/parser/mod_file_not_exist_windows.stderr b/tests/ui/parser/mod_file_not_exist_windows.stderr
index d5143dbe982..53b09d8ca53 100644
--- a/tests/ui/parser/mod_file_not_exist_windows.stderr
+++ b/tests/ui/parser/mod_file_not_exist_windows.stderr
@@ -5,6 +5,7 @@ LL | mod not_a_real_file;
    | ^^^^^^^^^^^^^^^^^^^^
    |
    = help: to create the module `not_a_real_file`, create file "$DIR/not_a_real_file.rs" or "$DIR/not_a_real_file/mod.rs"
+   = note: if there is a `mod not_a_real_file` elsewhere in the crate already, import it with `use crate::...` instead
 
 error[E0433]: failed to resolve: use of undeclared crate or module `mod_file_aux`
   --> $DIR/mod_file_not_exist_windows.rs:7:16
diff --git a/tests/ui/parser/recover-missing-semi-before-item.fixed b/tests/ui/parser/recover-missing-semi-before-item.fixed
index 0be17e69e8f..acb846373cb 100644
--- a/tests/ui/parser/recover-missing-semi-before-item.fixed
+++ b/tests/ui/parser/recover-missing-semi-before-item.fixed
@@ -1,6 +1,6 @@
 // run-rustfix
 
-#![allow(unused_variables, dead_code)]
+#![allow(unused_variables, dead_code, unused_imports)]
 
 fn for_struct() {
     let foo = 3; //~ ERROR expected `;`, found keyword `struct`
diff --git a/tests/ui/parser/recover-missing-semi-before-item.rs b/tests/ui/parser/recover-missing-semi-before-item.rs
index 867b7b749bb..ef6cfe3c4ed 100644
--- a/tests/ui/parser/recover-missing-semi-before-item.rs
+++ b/tests/ui/parser/recover-missing-semi-before-item.rs
@@ -1,6 +1,6 @@
 // run-rustfix
 
-#![allow(unused_variables, dead_code)]
+#![allow(unused_variables, dead_code, unused_imports)]
 
 fn for_struct() {
     let foo = 3 //~ ERROR expected `;`, found keyword `struct`
diff --git a/tests/ui/parser/removed-syntax-fn-sigil.rs b/tests/ui/parser/removed-syntax-fn-sigil.rs
index 725843429c0..d55a032d1f2 100644
--- a/tests/ui/parser/removed-syntax-fn-sigil.rs
+++ b/tests/ui/parser/removed-syntax-fn-sigil.rs
@@ -1,3 +1,4 @@
 fn main() {
-    let x: fn~() = || (); //~ ERROR expected `(`, found `~`
+    let x: fn~() = || (); //~ ERROR missing parameters for function definition
+    //~| ERROR expected one of `->`, `;`, or `=`, found `~`
 }
diff --git a/tests/ui/parser/removed-syntax-fn-sigil.stderr b/tests/ui/parser/removed-syntax-fn-sigil.stderr
index 196a5af4729..0d377416700 100644
--- a/tests/ui/parser/removed-syntax-fn-sigil.stderr
+++ b/tests/ui/parser/removed-syntax-fn-sigil.stderr
@@ -1,10 +1,14 @@
-error: expected `(`, found `~`
+error: missing parameters for function definition
   --> $DIR/removed-syntax-fn-sigil.rs:2:14
    |
 LL |     let x: fn~() = || ();
-   |         -    ^ expected `(`
-   |         |
-   |         while parsing the type for `x`
+   |              ^ help: add a parameter list
 
-error: aborting due to previous error
+error: expected one of `->`, `;`, or `=`, found `~`
+  --> $DIR/removed-syntax-fn-sigil.rs:2:14
+   |
+LL |     let x: fn~() = || ();
+   |              ^ expected one of `->`, `;`, or `=`
+
+error: aborting due to 2 previous errors
 
diff --git a/tests/ui/parser/ternary_operator.rs b/tests/ui/parser/ternary_operator.rs
index 23d537e77f7..c8810781b3d 100644
--- a/tests/ui/parser/ternary_operator.rs
+++ b/tests/ui/parser/ternary_operator.rs
@@ -1,69 +1,30 @@
-// A good chunk of these errors aren't shown to the user, but are still
-// required in the test for it to pass.
-
-fn a() { //~ NOTE this function should return `Result` or `Option` to accept `?`
+fn a() {
     let x = 5 > 2 ? true : false;
     //~^ ERROR Rust has no ternary operator
     //~| HELP use an `if-else` expression instead
-    //~| ERROR the `?` operator can only be applied to values that implement `Try` [E0277]
-    //~| HELP the trait `Try` is not implemented for `{integer}`
-    //~| ERROR the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [E0277]
-    //~| HELP the trait `FromResidual<_>` is not implemented for `()`
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE the `?` operator cannot be applied to type `{integer}`
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE cannot use the `?` operator in a function that returns `()`
-    //~| NOTE in this expansion of desugaring of operator `?`
 }
 
-fn b() { //~ NOTE this function should return `Result` or `Option` to accept `?`
+fn b() {
     let x = 5 > 2 ? { true } : { false };
     //~^ ERROR Rust has no ternary operator
     //~| HELP use an `if-else` expression instead
-    //~| ERROR the `?` operator can only be applied to values that implement `Try` [E0277]
-    //~| HELP the trait `Try` is not implemented for `{integer}`
-    //~| ERROR the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [E0277]
-    //~| HELP the trait `FromResidual<_>` is not implemented for `()`
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE the `?` operator cannot be applied to type `{integer}`
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE cannot use the `?` operator in a function that returns `()`
-    //~| NOTE in this expansion of desugaring of operator `?`
 }
 
-fn c() { //~ NOTE this function should return `Result` or `Option` to accept `?`
+fn c() {
     let x = 5 > 2 ? f32::MAX : f32::MIN;
     //~^ ERROR Rust has no ternary operator
     //~| HELP use an `if-else` expression instead
-    //~| ERROR the `?` operator can only be applied to values that implement `Try` [E0277]
-    //~| HELP the trait `Try` is not implemented for `{integer}`
-    //~| ERROR the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [E0277]
-    //~| HELP the trait `FromResidual<_>` is not implemented for `()`
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE the `?` operator cannot be applied to type `{integer}`
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE cannot use the `?` operator in a function that returns `()`
-    //~| NOTE in this expansion of desugaring of operator `?`
 }
 
-fn main() { //~ NOTE this function should return `Result` or `Option` to accept `?`
+fn bad() {
+    // regression test for #117208
+    v ? return;
+    //~^ ERROR expected one of
+}
+
+fn main() {
     let x = 5 > 2 ? { let x = vec![]: Vec<u16>; x } : { false };
     //~^ ERROR Rust has no ternary operator
     //~| HELP use an `if-else` expression instead
     //~| ERROR expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
-    //~| NOTE expected one of `.`, `;`, `?`, `else`, or an operator
-    //~| ERROR the `?` operator can only be applied to values that implement `Try` [E0277]
-    //~| HELP the trait `Try` is not implemented for `{integer}`
-    //~| ERROR the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [E0277]
-    //~| HELP the trait `FromResidual<_>` is not implemented for `()`
-    //~| NOTE type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE the `?` operator cannot be applied to type `{integer}`
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE in this expansion of desugaring of operator `?`
-    //~| NOTE cannot use the `?` operator in a function that returns `()`
-    //~| NOTE in this expansion of desugaring of operator `?`
 }
diff --git a/tests/ui/parser/ternary_operator.stderr b/tests/ui/parser/ternary_operator.stderr
index af9565bbead..6635e1672f7 100644
--- a/tests/ui/parser/ternary_operator.stderr
+++ b/tests/ui/parser/ternary_operator.stderr
@@ -1,5 +1,5 @@
 error: Rust has no ternary operator
-  --> $DIR/ternary_operator.rs:5:19
+  --> $DIR/ternary_operator.rs:2:19
    |
 LL |     let x = 5 > 2 ? true : false;
    |                   ^^^^^^^^^^^^^^^
@@ -7,7 +7,7 @@ LL |     let x = 5 > 2 ? true : false;
    = help: use an `if-else` expression instead
 
 error: Rust has no ternary operator
-  --> $DIR/ternary_operator.rs:21:19
+  --> $DIR/ternary_operator.rs:8:19
    |
 LL |     let x = 5 > 2 ? { true } : { false };
    |                   ^^^^^^^^^^^^^^^^^^^^^^^
@@ -15,15 +15,21 @@ LL |     let x = 5 > 2 ? { true } : { false };
    = help: use an `if-else` expression instead
 
 error: Rust has no ternary operator
-  --> $DIR/ternary_operator.rs:37:19
+  --> $DIR/ternary_operator.rs:14:19
    |
 LL |     let x = 5 > 2 ? f32::MAX : f32::MIN;
    |                   ^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: use an `if-else` expression instead
 
+error: expected one of `.`, `;`, `?`, `}`, or an operator, found keyword `return`
+  --> $DIR/ternary_operator.rs:21:9
+   |
+LL |     v ? return;
+   |         ^^^^^^ expected one of `.`, `;`, `?`, `}`, or an operator
+
 error: expected one of `.`, `;`, `?`, `else`, or an operator, found `:`
-  --> $DIR/ternary_operator.rs:53:37
+  --> $DIR/ternary_operator.rs:26:37
    |
 LL |     let x = 5 > 2 ? { let x = vec![]: Vec<u16>; x } : { false };
    |                                     ^ expected one of `.`, `;`, `?`, `else`, or an operator
@@ -31,85 +37,12 @@ LL |     let x = 5 > 2 ? { let x = vec![]: Vec<u16>; x } : { false };
    = note: type ascription syntax has been removed, see issue #101728 <https://github.com/rust-lang/rust/issues/101728>
 
 error: Rust has no ternary operator
-  --> $DIR/ternary_operator.rs:53:19
+  --> $DIR/ternary_operator.rs:26:19
    |
 LL |     let x = 5 > 2 ? { let x = vec![]: Vec<u16>; x } : { false };
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: use an `if-else` expression instead
 
-error[E0277]: the `?` operator can only be applied to values that implement `Try`
-  --> $DIR/ternary_operator.rs:5:17
-   |
-LL |     let x = 5 > 2 ? true : false;
-   |                 ^^^ the `?` operator cannot be applied to type `{integer}`
-   |
-   = help: the trait `Try` is not implemented for `{integer}`
-
-error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
-  --> $DIR/ternary_operator.rs:5:19
-   |
-LL | fn a() {
-   | ------ this function should return `Result` or `Option` to accept `?`
-LL |     let x = 5 > 2 ? true : false;
-   |                   ^ cannot use the `?` operator in a function that returns `()`
-   |
-   = help: the trait `FromResidual<_>` is not implemented for `()`
-
-error[E0277]: the `?` operator can only be applied to values that implement `Try`
-  --> $DIR/ternary_operator.rs:21:17
-   |
-LL |     let x = 5 > 2 ? { true } : { false };
-   |                 ^^^ the `?` operator cannot be applied to type `{integer}`
-   |
-   = help: the trait `Try` is not implemented for `{integer}`
-
-error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
-  --> $DIR/ternary_operator.rs:21:19
-   |
-LL | fn b() {
-   | ------ this function should return `Result` or `Option` to accept `?`
-LL |     let x = 5 > 2 ? { true } : { false };
-   |                   ^ cannot use the `?` operator in a function that returns `()`
-   |
-   = help: the trait `FromResidual<_>` is not implemented for `()`
-
-error[E0277]: the `?` operator can only be applied to values that implement `Try`
-  --> $DIR/ternary_operator.rs:37:17
-   |
-LL |     let x = 5 > 2 ? f32::MAX : f32::MIN;
-   |                 ^^^ the `?` operator cannot be applied to type `{integer}`
-   |
-   = help: the trait `Try` is not implemented for `{integer}`
-
-error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
-  --> $DIR/ternary_operator.rs:37:19
-   |
-LL | fn c() {
-   | ------ this function should return `Result` or `Option` to accept `?`
-LL |     let x = 5 > 2 ? f32::MAX : f32::MIN;
-   |                   ^ cannot use the `?` operator in a function that returns `()`
-   |
-   = help: the trait `FromResidual<_>` is not implemented for `()`
-
-error[E0277]: the `?` operator can only be applied to values that implement `Try`
-  --> $DIR/ternary_operator.rs:53:17
-   |
-LL |     let x = 5 > 2 ? { let x = vec![]: Vec<u16>; x } : { false };
-   |                 ^^^ the `?` operator cannot be applied to type `{integer}`
-   |
-   = help: the trait `Try` is not implemented for `{integer}`
-
-error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
-  --> $DIR/ternary_operator.rs:53:19
-   |
-LL | fn main() {
-   | --------- this function should return `Result` or `Option` to accept `?`
-LL |     let x = 5 > 2 ? { let x = vec![]: Vec<u16>; x } : { false };
-   |                   ^ cannot use the `?` operator in a function that returns `()`
-   |
-   = help: the trait `FromResidual<_>` is not implemented for `()`
-
-error: aborting due to 13 previous errors
+error: aborting due to 6 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/parser/unsafe-mod.stderr b/tests/ui/parser/unsafe-mod.stderr
index dac6e7a3550..fbe24aa10da 100644
--- a/tests/ui/parser/unsafe-mod.stderr
+++ b/tests/ui/parser/unsafe-mod.stderr
@@ -5,6 +5,7 @@ LL | unsafe mod n;
    | ^^^^^^^^^^^^^
    |
    = help: to create the module `n`, create file "$DIR/n.rs" or "$DIR/n/mod.rs"
+   = note: if there is a `mod n` elsewhere in the crate already, import it with `use crate::...` instead
 
 error: module cannot be declared unsafe
   --> $DIR/unsafe-mod.rs:1:1
diff --git a/tests/ui/parser/variadic-ffi-nested-syntactic-fail.rs b/tests/ui/parser/variadic-ffi-nested-syntactic-fail.rs
index 9eeee195e56..f1238ec240f 100644
--- a/tests/ui/parser/variadic-ffi-nested-syntactic-fail.rs
+++ b/tests/ui/parser/variadic-ffi-nested-syntactic-fail.rs
@@ -5,5 +5,9 @@ fn f2<'a>(x: u8, y: Vec<&'a ...>) {}
 //~^ ERROR C-variadic type `...` may not be nested inside another type
 
 fn main() {
-    let _recovery_witness: () = 0; //~ ERROR mismatched types
+    // While this is an error, wf-checks happen before typeck, and if any wf-checks
+    // encountered errors, we do not continue to typeck, even if the items are
+    // unrelated.
+    // FIXME(oli-obk): make this report a type mismatch again.
+    let _recovery_witness: () = 0;
 }
diff --git a/tests/ui/parser/variadic-ffi-nested-syntactic-fail.stderr b/tests/ui/parser/variadic-ffi-nested-syntactic-fail.stderr
index 8b9d676a45d..7ca6a6d1bbf 100644
--- a/tests/ui/parser/variadic-ffi-nested-syntactic-fail.stderr
+++ b/tests/ui/parser/variadic-ffi-nested-syntactic-fail.stderr
@@ -10,15 +10,6 @@ error[E0743]: C-variadic type `...` may not be nested inside another type
 LL | fn f2<'a>(x: u8, y: Vec<&'a ...>) {}
    |                             ^^^
 
-error[E0308]: mismatched types
-  --> $DIR/variadic-ffi-nested-syntactic-fail.rs:8:33
-   |
-LL |     let _recovery_witness: () = 0;
-   |                            --   ^ expected `()`, found integer
-   |                            |
-   |                            expected due to this
-
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
-Some errors have detailed explanations: E0308, E0743.
-For more information about an error, try `rustc --explain E0308`.
+For more information about this error, try `rustc --explain E0743`.
diff --git a/tests/ui/parser/variadic-ffi-semantic-restrictions.rs b/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
index 0b61e267da8..b173e23e7a1 100644
--- a/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
+++ b/tests/ui/parser/variadic-ffi-semantic-restrictions.rs
@@ -32,6 +32,18 @@ extern "C" fn f3_3(..., x: isize) {}
 //~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
 //~| ERROR `...` must be the last argument of a C-variadic function
 
+const unsafe extern "C" fn f4_1(x: isize, ...) {}
+//~^ ERROR functions cannot be both `const` and C-variadic
+
+const extern "C" fn f4_2(x: isize, ...) {}
+//~^ ERROR functions cannot be both `const` and C-variadic
+//~| ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
+
+const extern "C" fn f4_3(..., x: isize, ...) {}
+//~^ ERROR functions cannot be both `const` and C-variadic
+//~| ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
+//~| ERROR `...` must be the last argument of a C-variadic function
+
 extern "C" {
     fn e_f1(...);
     //~^ ERROR C-variadic function must be declared with at least one named argument
@@ -49,12 +61,13 @@ impl X {
     //~| ERROR C-variadic function must be declared with at least one named argument
     fn i_f3(..., x: isize, ...) {}
     //~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
-    //~| ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
     //~| ERROR `...` must be the last argument of a C-variadic function
     fn i_f4(..., x: isize, ...) {}
     //~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
-    //~| ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
     //~| ERROR `...` must be the last argument of a C-variadic function
+    const fn i_f5(x: isize, ...) {}
+    //~^ ERROR only foreign or `unsafe extern "C"` functions may be C-variadic
+    //~| ERROR functions cannot be both `const` and C-variadic
 }
 
 trait T {
diff --git a/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr b/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
index f1cbbb279c8..18526080e4c 100644
--- a/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
+++ b/tests/ui/parser/variadic-ffi-semantic-restrictions.stderr
@@ -76,131 +76,172 @@ error: only foreign or `unsafe extern "C"` functions may be C-variadic
 LL | extern "C" fn f3_3(..., x: isize) {}
    |                    ^^^
 
+error: functions cannot be both `const` and C-variadic
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:35:1
+   |
+LL | const unsafe extern "C" fn f4_1(x: isize, ...) {}
+   | ^^^^^ `const` because of this             ^^^ C-variadic because of this
+
+error: functions cannot be both `const` and C-variadic
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:38:1
+   |
+LL | const extern "C" fn f4_2(x: isize, ...) {}
+   | ^^^^^ `const` because of this      ^^^ C-variadic because of this
+
+error: only foreign or `unsafe extern "C"` functions may be C-variadic
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:38:36
+   |
+LL | const extern "C" fn f4_2(x: isize, ...) {}
+   |                                    ^^^
+
+error: `...` must be the last argument of a C-variadic function
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:42:26
+   |
+LL | const extern "C" fn f4_3(..., x: isize, ...) {}
+   |                          ^^^
+
+error: functions cannot be both `const` and C-variadic
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:42:1
+   |
+LL | const extern "C" fn f4_3(..., x: isize, ...) {}
+   | ^^^^^                    ^^^            ^^^ C-variadic because of this
+   | |                        |
+   | |                        C-variadic because of this
+   | `const` because of this
+
+error: only foreign or `unsafe extern "C"` functions may be C-variadic
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:42:26
+   |
+LL | const extern "C" fn f4_3(..., x: isize, ...) {}
+   |                          ^^^            ^^^
+
 error: C-variadic function must be declared with at least one named argument
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:36:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:48:13
    |
 LL |     fn e_f1(...);
    |             ^^^
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:38:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:50:13
    |
 LL |     fn e_f2(..., x: isize);
    |             ^^^
 
 error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:45:23
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:57:23
    |
 LL |     fn i_f1(x: isize, ...) {}
    |                       ^^^
 
 error: C-variadic function must be declared with at least one named argument
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:47:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:59:13
    |
 LL |     fn i_f2(...) {}
    |             ^^^
 
 error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:47:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:59:13
    |
 LL |     fn i_f2(...) {}
    |             ^^^
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:50:13
-   |
-LL |     fn i_f3(..., x: isize, ...) {}
-   |             ^^^
-
-error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:50:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:62:13
    |
 LL |     fn i_f3(..., x: isize, ...) {}
    |             ^^^
 
 error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:50:28
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:62:13
    |
 LL |     fn i_f3(..., x: isize, ...) {}
-   |                            ^^^
+   |             ^^^            ^^^
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:54:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:65:13
    |
 LL |     fn i_f4(..., x: isize, ...) {}
    |             ^^^
 
 error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:54:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:65:13
    |
 LL |     fn i_f4(..., x: isize, ...) {}
-   |             ^^^
+   |             ^^^            ^^^
+
+error: functions cannot be both `const` and C-variadic
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:68:5
+   |
+LL |     const fn i_f5(x: isize, ...) {}
+   |     ^^^^^                   ^^^ C-variadic because of this
+   |     |
+   |     `const` because of this
 
 error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:54:28
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:68:29
    |
-LL |     fn i_f4(..., x: isize, ...) {}
-   |                            ^^^
+LL |     const fn i_f5(x: isize, ...) {}
+   |                             ^^^
 
 error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:61:23
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:74:23
    |
 LL |     fn t_f1(x: isize, ...) {}
    |                       ^^^
 
 error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:63:23
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:76:23
    |
 LL |     fn t_f2(x: isize, ...);
    |                       ^^^
 
 error: C-variadic function must be declared with at least one named argument
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:65:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:78:13
    |
 LL |     fn t_f3(...) {}
    |             ^^^
 
 error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:65:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:78:13
    |
 LL |     fn t_f3(...) {}
    |             ^^^
 
 error: C-variadic function must be declared with at least one named argument
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:68:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:81:13
    |
 LL |     fn t_f4(...);
    |             ^^^
 
 error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:68:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:81:13
    |
 LL |     fn t_f4(...);
    |             ^^^
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:71:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:84:13
    |
 LL |     fn t_f5(..., x: isize) {}
    |             ^^^
 
 error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:71:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:84:13
    |
 LL |     fn t_f5(..., x: isize) {}
    |             ^^^
 
 error: `...` must be the last argument of a C-variadic function
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:74:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:87:13
    |
 LL |     fn t_f6(..., x: isize);
    |             ^^^
 
 error: only foreign or `unsafe extern "C"` functions may be C-variadic
-  --> $DIR/variadic-ffi-semantic-restrictions.rs:74:13
+  --> $DIR/variadic-ffi-semantic-restrictions.rs:87:13
    |
 LL |     fn t_f6(..., x: isize);
    |             ^^^
 
-error: aborting due to 34 previous errors
+error: aborting due to 40 previous errors
 
diff --git a/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed
new file mode 100644
index 00000000000..cf6c2a24fdf
--- /dev/null
+++ b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.fixed
@@ -0,0 +1,18 @@
+// run-rustfix
+struct S {
+    field_name: (),
+}
+
+fn main() {
+    match (S {field_name: ()}) {
+        S {field_name: ref _foo} => {} //~ ERROR expected `,`
+    }
+    match (S {field_name: ()}) {
+        S {field_name: mut _foo} => {} //~ ERROR expected `,`
+    }
+    match (S {field_name: ()}) {
+        S {field_name: ref mut _foo} => {} //~ ERROR expected `,`
+    }
+    // Verify that we recover enough to run typeck.
+    let _: usize = 3usize; //~ ERROR mismatched types
+}
diff --git a/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs
new file mode 100644
index 00000000000..98772c1188e
--- /dev/null
+++ b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.rs
@@ -0,0 +1,18 @@
+// run-rustfix
+struct S {
+    field_name: (),
+}
+
+fn main() {
+    match (S {field_name: ()}) {
+        S {ref field_name: _foo} => {} //~ ERROR expected `,`
+    }
+    match (S {field_name: ()}) {
+        S {mut field_name: _foo} => {} //~ ERROR expected `,`
+    }
+    match (S {field_name: ()}) {
+        S {ref mut field_name: _foo} => {} //~ ERROR expected `,`
+    }
+    // Verify that we recover enough to run typeck.
+    let _: usize = 3u8; //~ ERROR mismatched types
+}
diff --git a/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.stderr b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.stderr
new file mode 100644
index 00000000000..e80789253c0
--- /dev/null
+++ b/tests/ui/pattern/incorrect-placement-of-pattern-modifiers.stderr
@@ -0,0 +1,58 @@
+error: expected `,`
+  --> $DIR/incorrect-placement-of-pattern-modifiers.rs:8:26
+   |
+LL |         S {ref field_name: _foo} => {}
+   |         -                ^
+   |         |
+   |         while parsing the fields for this pattern
+   |
+help: the pattern modifiers belong after the `:`
+   |
+LL -         S {ref field_name: _foo} => {}
+LL +         S {field_name: ref _foo} => {}
+   |
+
+error: expected `,`
+  --> $DIR/incorrect-placement-of-pattern-modifiers.rs:11:26
+   |
+LL |         S {mut field_name: _foo} => {}
+   |         -                ^
+   |         |
+   |         while parsing the fields for this pattern
+   |
+help: the pattern modifiers belong after the `:`
+   |
+LL -         S {mut field_name: _foo} => {}
+LL +         S {field_name: mut _foo} => {}
+   |
+
+error: expected `,`
+  --> $DIR/incorrect-placement-of-pattern-modifiers.rs:14:30
+   |
+LL |         S {ref mut field_name: _foo} => {}
+   |         -                    ^
+   |         |
+   |         while parsing the fields for this pattern
+   |
+help: the pattern modifiers belong after the `:`
+   |
+LL -         S {ref mut field_name: _foo} => {}
+LL +         S {field_name: ref mut _foo} => {}
+   |
+
+error[E0308]: mismatched types
+  --> $DIR/incorrect-placement-of-pattern-modifiers.rs:17:20
+   |
+LL |     let _: usize = 3u8;
+   |            -----   ^^^ expected `usize`, found `u8`
+   |            |
+   |            expected due to this
+   |
+help: change the type of the numeric literal from `u8` to `usize`
+   |
+LL |     let _: usize = 3usize;
+   |                     ~~~~~
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/pattern/issue-115599.rs b/tests/ui/pattern/issue-115599.rs
new file mode 100644
index 00000000000..7a222b90aec
--- /dev/null
+++ b/tests/ui/pattern/issue-115599.rs
@@ -0,0 +1,7 @@
+const CONST_STRING: String = String::new();
+
+fn main() {
+    let empty_str = String::from("");
+    if let CONST_STRING = empty_str {}
+    //~^ ERROR to use a constant of type `Vec<u8>` in a pattern, `Vec<u8>` must be annotated with `#[derive(PartialEq, Eq)]`
+}
diff --git a/tests/ui/pattern/issue-115599.stderr b/tests/ui/pattern/issue-115599.stderr
new file mode 100644
index 00000000000..e6cb6c1ddac
--- /dev/null
+++ b/tests/ui/pattern/issue-115599.stderr
@@ -0,0 +1,11 @@
+error: to use a constant of type `Vec<u8>` in a pattern, `Vec<u8>` must be annotated with `#[derive(PartialEq, Eq)]`
+  --> $DIR/issue-115599.rs:5:12
+   |
+LL |     if let CONST_STRING = empty_str {}
+   |            ^^^^^^^^^^^^
+   |
+   = note: the traits must be derived, manual `impl`s are not sufficient
+   = note: see https://doc.rust-lang.org/stable/std/marker/trait.StructuralEq.html for details
+
+error: aborting due to previous error
+
diff --git a/tests/ui/pattern/issue-94866.stderr b/tests/ui/pattern/issue-94866.stderr
index b3c17ce8974..dee4b3f557c 100644
--- a/tests/ui/pattern/issue-94866.stderr
+++ b/tests/ui/pattern/issue-94866.stderr
@@ -5,10 +5,10 @@ LL |     match Enum::A {
    |           ^^^^^^^ pattern `Enum::B` not covered
    |
 note: `Enum` defined here
-  --> $DIR/issue-94866.rs:7:16
+  --> $DIR/issue-94866.rs:7:6
    |
 LL | enum Enum { A, B }
-   |      ----      ^ not covered
+   |      ^^^^      - not covered
    = note: the matched value is of type `Enum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/tests/ui/pattern/non-structural-match-types.mir.stderr b/tests/ui/pattern/non-structural-match-types.mir.stderr
new file mode 100644
index 00000000000..7a9e5b7e02e
--- /dev/null
+++ b/tests/ui/pattern/non-structural-match-types.mir.stderr
@@ -0,0 +1,14 @@
+error: `{closure@$DIR/non-structural-match-types.rs:12:17: 12:19}` cannot be used in patterns
+  --> $DIR/non-structural-match-types.rs:12:9
+   |
+LL |         const { || {} } => {}
+   |         ^^^^^^^^^^^^^^^
+
+error: `{async block@$DIR/non-structural-match-types.rs:15:17: 15:25}` cannot be used in patterns
+  --> $DIR/non-structural-match-types.rs:15:9
+   |
+LL |         const { async {} } => {}
+   |         ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/pattern/non-structural-match-types.rs b/tests/ui/pattern/non-structural-match-types.rs
index fc52ee3d013..fb7779fa808 100644
--- a/tests/ui/pattern/non-structural-match-types.rs
+++ b/tests/ui/pattern/non-structural-match-types.rs
@@ -1,4 +1,7 @@
 // edition:2021
+// revisions: mir thir
+// [thir]compile-flags: -Z thir-unsafeck
+
 #![allow(incomplete_features)]
 #![allow(unreachable_code)]
 #![feature(const_async_blocks)]
diff --git a/tests/ui/pattern/non-structural-match-types.stderr b/tests/ui/pattern/non-structural-match-types.stderr
deleted file mode 100644
index f3e0665fef5..00000000000
--- a/tests/ui/pattern/non-structural-match-types.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: `{closure@$DIR/non-structural-match-types.rs:9:17: 9:19}` cannot be used in patterns
-  --> $DIR/non-structural-match-types.rs:9:9
-   |
-LL |         const { || {} } => {}
-   |         ^^^^^^^^^^^^^^^
-
-error: `{async block@$DIR/non-structural-match-types.rs:12:17: 12:25}` cannot be used in patterns
-  --> $DIR/non-structural-match-types.rs:12:9
-   |
-LL |         const { async {} } => {}
-   |         ^^^^^^^^^^^^^^^^^^
-
-error: aborting due to 2 previous errors
-
diff --git a/tests/ui/pattern/non-structural-match-types.thir.stderr b/tests/ui/pattern/non-structural-match-types.thir.stderr
new file mode 100644
index 00000000000..7a9e5b7e02e
--- /dev/null
+++ b/tests/ui/pattern/non-structural-match-types.thir.stderr
@@ -0,0 +1,14 @@
+error: `{closure@$DIR/non-structural-match-types.rs:12:17: 12:19}` cannot be used in patterns
+  --> $DIR/non-structural-match-types.rs:12:9
+   |
+LL |         const { || {} } => {}
+   |         ^^^^^^^^^^^^^^^
+
+error: `{async block@$DIR/non-structural-match-types.rs:15:17: 15:25}` cannot be used in patterns
+  --> $DIR/non-structural-match-types.rs:15:9
+   |
+LL |         const { async {} } => {}
+   |         ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/pattern/usefulness/conflicting_bindings.rs b/tests/ui/pattern/usefulness/conflicting_bindings.rs
new file mode 100644
index 00000000000..0b3e7ce9e9a
--- /dev/null
+++ b/tests/ui/pattern/usefulness/conflicting_bindings.rs
@@ -0,0 +1,24 @@
+#![feature(if_let_guard, let_chains)]
+
+fn main() {
+    let mut x = Some(String::new());
+    let ref mut y @ ref mut z = x;
+    //~^ ERROR: mutable more than once
+    let Some(ref mut y @ ref mut z) = x else { return };
+    //~^ ERROR: mutable more than once
+    if let Some(ref mut y @ ref mut z) = x {}
+    //~^ ERROR: mutable more than once
+    if let Some(ref mut y @ ref mut z) = x && true {}
+    //~^ ERROR: mutable more than once
+    while let Some(ref mut y @ ref mut z) = x {}
+    //~^ ERROR: mutable more than once
+    while let Some(ref mut y @ ref mut z) = x && true {}
+    //~^ ERROR: mutable more than once
+    match x {
+        ref mut y @ ref mut z => {} //~ ERROR: mutable more than once
+    }
+    match () {
+        () if let Some(ref mut y @ ref mut z) = x => {} //~ ERROR: mutable more than once
+        _ => {}
+    }
+}
diff --git a/tests/ui/pattern/usefulness/conflicting_bindings.stderr b/tests/ui/pattern/usefulness/conflicting_bindings.stderr
new file mode 100644
index 00000000000..679fc83e7f5
--- /dev/null
+++ b/tests/ui/pattern/usefulness/conflicting_bindings.stderr
@@ -0,0 +1,66 @@
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/conflicting_bindings.rs:5:9
+   |
+LL |     let ref mut y @ ref mut z = x;
+   |         ^^^^^^^^^   --------- value is mutably borrowed by `z` here
+   |         |
+   |         value is mutably borrowed by `y` here
+
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/conflicting_bindings.rs:7:14
+   |
+LL |     let Some(ref mut y @ ref mut z) = x else { return };
+   |              ^^^^^^^^^   --------- value is mutably borrowed by `z` here
+   |              |
+   |              value is mutably borrowed by `y` here
+
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/conflicting_bindings.rs:9:17
+   |
+LL |     if let Some(ref mut y @ ref mut z) = x {}
+   |                 ^^^^^^^^^   --------- value is mutably borrowed by `z` here
+   |                 |
+   |                 value is mutably borrowed by `y` here
+
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/conflicting_bindings.rs:11:17
+   |
+LL |     if let Some(ref mut y @ ref mut z) = x && true {}
+   |                 ^^^^^^^^^   --------- value is mutably borrowed by `z` here
+   |                 |
+   |                 value is mutably borrowed by `y` here
+
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/conflicting_bindings.rs:13:20
+   |
+LL |     while let Some(ref mut y @ ref mut z) = x {}
+   |                    ^^^^^^^^^   --------- value is mutably borrowed by `z` here
+   |                    |
+   |                    value is mutably borrowed by `y` here
+
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/conflicting_bindings.rs:15:20
+   |
+LL |     while let Some(ref mut y @ ref mut z) = x && true {}
+   |                    ^^^^^^^^^   --------- value is mutably borrowed by `z` here
+   |                    |
+   |                    value is mutably borrowed by `y` here
+
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/conflicting_bindings.rs:18:9
+   |
+LL |         ref mut y @ ref mut z => {}
+   |         ^^^^^^^^^   --------- value is mutably borrowed by `z` here
+   |         |
+   |         value is mutably borrowed by `y` here
+
+error: cannot borrow value as mutable more than once at a time
+  --> $DIR/conflicting_bindings.rs:21:24
+   |
+LL |         () if let Some(ref mut y @ ref mut z) = x => {}
+   |                        ^^^^^^^^^   --------- value is mutably borrowed by `z` here
+   |                        |
+   |                        value is mutably borrowed by `y` here
+
+error: aborting due to 8 previous errors
+
diff --git a/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr b/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr
index ff29de03d6b..24f3eaa5230 100644
--- a/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr
+++ b/tests/ui/pattern/usefulness/doc-hidden-non-exhaustive.stderr
@@ -23,13 +23,13 @@ LL |     match HiddenEnum::A {
    |           ^^^^^^^^^^^^^ pattern `HiddenEnum::B` not covered
    |
 note: `HiddenEnum` defined here
-  --> $DIR/auxiliary/hidden.rs:3:5
+  --> $DIR/auxiliary/hidden.rs:1:1
    |
 LL | pub enum HiddenEnum {
-   | -------------------
+   | ^^^^^^^^^^^^^^^^^^^
 LL |     A,
 LL |     B,
-   |     ^ not covered
+   |     - not covered
    = note: the matched value is of type `HiddenEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
@@ -44,13 +44,13 @@ LL |     match HiddenEnum::A {
    |           ^^^^^^^^^^^^^ patterns `HiddenEnum::B` and `_` not covered
    |
 note: `HiddenEnum` defined here
-  --> $DIR/auxiliary/hidden.rs:3:5
+  --> $DIR/auxiliary/hidden.rs:1:1
    |
 LL | pub enum HiddenEnum {
-   | -------------------
+   | ^^^^^^^^^^^^^^^^^^^
 LL |     A,
 LL |     B,
-   |     ^ not covered
+   |     - not covered
    = note: the matched value is of type `HiddenEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
@@ -83,13 +83,13 @@ LL |     match InCrate::A {
    |           ^^^^^^^^^^ pattern `InCrate::C` not covered
    |
 note: `InCrate` defined here
-  --> $DIR/doc-hidden-non-exhaustive.rs:11:5
+  --> $DIR/doc-hidden-non-exhaustive.rs:7:6
    |
 LL | enum InCrate {
-   |      -------
+   |      ^^^^^^^
 ...
 LL |     C,
-   |     ^ not covered
+   |     - not covered
    = note: the matched value is of type `InCrate`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/tests/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr b/tests/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr
index 5b81a8c3d3c..8f9bd5bde89 100644
--- a/tests/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr
+++ b/tests/ui/pattern/usefulness/empty-match.exhaustive_patterns.stderr
@@ -1,5 +1,5 @@
 error: unreachable pattern
-  --> $DIR/empty-match.rs:58:9
+  --> $DIR/empty-match.rs:68:9
    |
 LL |         _ => {},
    |         ^
@@ -11,25 +11,25 @@ LL | #![deny(unreachable_patterns)]
    |         ^^^^^^^^^^^^^^^^^^^^
 
 error: unreachable pattern
-  --> $DIR/empty-match.rs:61:9
+  --> $DIR/empty-match.rs:71:9
    |
 LL |         _ if false => {},
    |         ^
 
 error: unreachable pattern
-  --> $DIR/empty-match.rs:68:9
+  --> $DIR/empty-match.rs:78:9
    |
 LL |         _ => {},
    |         ^
 
 error: unreachable pattern
-  --> $DIR/empty-match.rs:71:9
+  --> $DIR/empty-match.rs:81:9
    |
 LL |         _ if false => {},
    |         ^
 
 error[E0005]: refutable pattern in local binding
-  --> $DIR/empty-match.rs:76:9
+  --> $DIR/empty-match.rs:86:9
    |
 LL |     let None = x;
    |         ^^^^ pattern `Some(_)` not covered
@@ -44,19 +44,19 @@ LL |     if let None = x { todo!() };
    |     ++              +++++++++++
 
 error: unreachable pattern
-  --> $DIR/empty-match.rs:88:9
+  --> $DIR/empty-match.rs:98:9
    |
 LL |         _ => {},
    |         ^
 
 error: unreachable pattern
-  --> $DIR/empty-match.rs:91:9
+  --> $DIR/empty-match.rs:101:9
    |
 LL |         _ if false => {},
    |         ^
 
 error[E0004]: non-exhaustive patterns: type `u8` is non-empty
-  --> $DIR/empty-match.rs:109:20
+  --> $DIR/empty-match.rs:119:20
    |
 LL |     match_no_arms!(0u8);
    |                    ^^^
@@ -65,7 +65,7 @@ LL |     match_no_arms!(0u8);
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
 
 error[E0004]: non-exhaustive patterns: type `NonEmptyStruct1` is non-empty
-  --> $DIR/empty-match.rs:111:20
+  --> $DIR/empty-match.rs:121:20
    |
 LL |     match_no_arms!(NonEmptyStruct1);
    |                    ^^^^^^^^^^^^^^^
@@ -79,7 +79,7 @@ LL | struct NonEmptyStruct1;
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
 
 error[E0004]: non-exhaustive patterns: type `NonEmptyStruct2` is non-empty
-  --> $DIR/empty-match.rs:113:20
+  --> $DIR/empty-match.rs:123:20
    |
 LL |     match_no_arms!(NonEmptyStruct2(true));
    |                    ^^^^^^^^^^^^^^^^^^^^^
@@ -93,7 +93,7 @@ LL | struct NonEmptyStruct2(bool);
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
 
 error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
-  --> $DIR/empty-match.rs:115:20
+  --> $DIR/empty-match.rs:125:20
    |
 LL |     match_no_arms!((NonEmptyUnion1 { foo: () }));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -107,7 +107,7 @@ LL | union NonEmptyUnion1 {
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
 
 error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
-  --> $DIR/empty-match.rs:117:20
+  --> $DIR/empty-match.rs:127:20
    |
 LL |     match_no_arms!((NonEmptyUnion2 { foo: () }));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -121,42 +121,44 @@ LL | union NonEmptyUnion2 {
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
-  --> $DIR/empty-match.rs:119:20
+  --> $DIR/empty-match.rs:129:20
    |
 LL |     match_no_arms!(NonEmptyEnum1::Foo(true));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
    |
 note: `NonEmptyEnum1` defined here
-  --> $DIR/empty-match.rs:33:5
+  --> $DIR/empty-match.rs:32:6
    |
 LL | enum NonEmptyEnum1 {
-   |      -------------
+   |      ^^^^^^^^^^^^^
+...
 LL |     Foo(bool),
-   |     ^^^ not covered
+   |     --- not covered
    = note: the matched value is of type `NonEmptyEnum1`
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
-  --> $DIR/empty-match.rs:122:20
+  --> $DIR/empty-match.rs:132:20
    |
 LL |     match_no_arms!(NonEmptyEnum2::Foo(true));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
    |
 note: `NonEmptyEnum2` defined here
-  --> $DIR/empty-match.rs:40:5
+  --> $DIR/empty-match.rs:39:6
    |
 LL | enum NonEmptyEnum2 {
-   |      -------------
+   |      ^^^^^^^^^^^^^
+...
 LL |     Foo(bool),
-   |     ^^^ not covered
+   |     --- not covered
 ...
 LL |     Bar,
-   |     ^^^ not covered
+   |     --- not covered
    = note: the matched value is of type `NonEmptyEnum2`
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
-  --> $DIR/empty-match.rs:125:20
+  --> $DIR/empty-match.rs:135:20
    |
 LL |     match_no_arms!(NonEmptyEnum5::V1);
    |                    ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
@@ -166,11 +168,19 @@ note: `NonEmptyEnum5` defined here
    |
 LL | enum NonEmptyEnum5 {
    |      ^^^^^^^^^^^^^
+...
+LL |     V1, V2, V3, V4, V5,
+   |     --  --  --  --  -- not covered
+   |     |   |   |   |
+   |     |   |   |   not covered
+   |     |   |   not covered
+   |     |   not covered
+   |     not covered
    = note: the matched value is of type `NonEmptyEnum5`
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
 
 error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/empty-match.rs:129:24
+  --> $DIR/empty-match.rs:139:24
    |
 LL |     match_guarded_arm!(0u8);
    |                        ^^^ pattern `_` not covered
@@ -184,7 +194,7 @@ LL +             _ => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
-  --> $DIR/empty-match.rs:134:24
+  --> $DIR/empty-match.rs:144:24
    |
 LL |     match_guarded_arm!(NonEmptyStruct1);
    |                        ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
@@ -203,7 +213,7 @@ LL +             NonEmptyStruct1 => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
-  --> $DIR/empty-match.rs:139:24
+  --> $DIR/empty-match.rs:149:24
    |
 LL |     match_guarded_arm!(NonEmptyStruct2(true));
    |                        ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
@@ -222,7 +232,7 @@ LL +             NonEmptyStruct2(_) => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
-  --> $DIR/empty-match.rs:144:24
+  --> $DIR/empty-match.rs:154:24
    |
 LL |     match_guarded_arm!((NonEmptyUnion1 { foo: () }));
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
@@ -241,7 +251,7 @@ LL +             NonEmptyUnion1 { .. } => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
-  --> $DIR/empty-match.rs:149:24
+  --> $DIR/empty-match.rs:159:24
    |
 LL |     match_guarded_arm!((NonEmptyUnion2 { foo: () }));
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
@@ -260,18 +270,19 @@ LL +             NonEmptyUnion2 { .. } => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
-  --> $DIR/empty-match.rs:154:24
+  --> $DIR/empty-match.rs:164:24
    |
 LL |     match_guarded_arm!(NonEmptyEnum1::Foo(true));
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
    |
 note: `NonEmptyEnum1` defined here
-  --> $DIR/empty-match.rs:33:5
+  --> $DIR/empty-match.rs:32:6
    |
 LL | enum NonEmptyEnum1 {
-   |      -------------
+   |      ^^^^^^^^^^^^^
+...
 LL |     Foo(bool),
-   |     ^^^ not covered
+   |     --- not covered
    = note: the matched value is of type `NonEmptyEnum1`
    = note: match arms with guards don't count towards exhaustivity
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
@@ -281,21 +292,22 @@ LL +             NonEmptyEnum1::Foo(_) => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
-  --> $DIR/empty-match.rs:159:24
+  --> $DIR/empty-match.rs:169:24
    |
 LL |     match_guarded_arm!(NonEmptyEnum2::Foo(true));
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
    |
 note: `NonEmptyEnum2` defined here
-  --> $DIR/empty-match.rs:40:5
+  --> $DIR/empty-match.rs:39:6
    |
 LL | enum NonEmptyEnum2 {
-   |      -------------
+   |      ^^^^^^^^^^^^^
+...
 LL |     Foo(bool),
-   |     ^^^ not covered
+   |     --- not covered
 ...
 LL |     Bar,
-   |     ^^^ not covered
+   |     --- not covered
    = note: the matched value is of type `NonEmptyEnum2`
    = note: match arms with guards don't count towards exhaustivity
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
@@ -305,7 +317,7 @@ LL +             NonEmptyEnum2::Foo(_) | NonEmptyEnum2::Bar => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
-  --> $DIR/empty-match.rs:164:24
+  --> $DIR/empty-match.rs:174:24
    |
 LL |     match_guarded_arm!(NonEmptyEnum5::V1);
    |                        ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
@@ -315,6 +327,14 @@ note: `NonEmptyEnum5` defined here
    |
 LL | enum NonEmptyEnum5 {
    |      ^^^^^^^^^^^^^
+...
+LL |     V1, V2, V3, V4, V5,
+   |     --  --  --  --  -- not covered
+   |     |   |   |   |
+   |     |   |   |   not covered
+   |     |   |   not covered
+   |     |   not covered
+   |     not covered
    = note: the matched value is of type `NonEmptyEnum5`
    = note: match arms with guards don't count towards exhaustivity
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
diff --git a/tests/ui/pattern/usefulness/empty-match.normal.stderr b/tests/ui/pattern/usefulness/empty-match.normal.stderr
index 6d17455086b..7f0389f40e2 100644
--- a/tests/ui/pattern/usefulness/empty-match.normal.stderr
+++ b/tests/ui/pattern/usefulness/empty-match.normal.stderr
@@ -1,5 +1,5 @@
 error: unreachable pattern
-  --> $DIR/empty-match.rs:58:9
+  --> $DIR/empty-match.rs:68:9
    |
 LL |         _ => {},
    |         ^
@@ -11,25 +11,25 @@ LL | #![deny(unreachable_patterns)]
    |         ^^^^^^^^^^^^^^^^^^^^
 
 error: unreachable pattern
-  --> $DIR/empty-match.rs:61:9
+  --> $DIR/empty-match.rs:71:9
    |
 LL |         _ if false => {},
    |         ^
 
 error: unreachable pattern
-  --> $DIR/empty-match.rs:68:9
+  --> $DIR/empty-match.rs:78:9
    |
 LL |         _ => {},
    |         ^
 
 error: unreachable pattern
-  --> $DIR/empty-match.rs:71:9
+  --> $DIR/empty-match.rs:81:9
    |
 LL |         _ if false => {},
    |         ^
 
 error[E0005]: refutable pattern in local binding
-  --> $DIR/empty-match.rs:76:9
+  --> $DIR/empty-match.rs:86:9
    |
 LL |     let None = x;
    |         ^^^^ pattern `Some(_)` not covered
@@ -43,19 +43,19 @@ LL |     if let None = x { todo!() };
    |     ++              +++++++++++
 
 error: unreachable pattern
-  --> $DIR/empty-match.rs:88:9
+  --> $DIR/empty-match.rs:98:9
    |
 LL |         _ => {},
    |         ^
 
 error: unreachable pattern
-  --> $DIR/empty-match.rs:91:9
+  --> $DIR/empty-match.rs:101:9
    |
 LL |         _ if false => {},
    |         ^
 
 error[E0004]: non-exhaustive patterns: type `u8` is non-empty
-  --> $DIR/empty-match.rs:109:20
+  --> $DIR/empty-match.rs:119:20
    |
 LL |     match_no_arms!(0u8);
    |                    ^^^
@@ -64,7 +64,7 @@ LL |     match_no_arms!(0u8);
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
 
 error[E0004]: non-exhaustive patterns: type `NonEmptyStruct1` is non-empty
-  --> $DIR/empty-match.rs:111:20
+  --> $DIR/empty-match.rs:121:20
    |
 LL |     match_no_arms!(NonEmptyStruct1);
    |                    ^^^^^^^^^^^^^^^
@@ -78,7 +78,7 @@ LL | struct NonEmptyStruct1;
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
 
 error[E0004]: non-exhaustive patterns: type `NonEmptyStruct2` is non-empty
-  --> $DIR/empty-match.rs:113:20
+  --> $DIR/empty-match.rs:123:20
    |
 LL |     match_no_arms!(NonEmptyStruct2(true));
    |                    ^^^^^^^^^^^^^^^^^^^^^
@@ -92,7 +92,7 @@ LL | struct NonEmptyStruct2(bool);
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
 
 error[E0004]: non-exhaustive patterns: type `NonEmptyUnion1` is non-empty
-  --> $DIR/empty-match.rs:115:20
+  --> $DIR/empty-match.rs:125:20
    |
 LL |     match_no_arms!((NonEmptyUnion1 { foo: () }));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -106,7 +106,7 @@ LL | union NonEmptyUnion1 {
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
 
 error[E0004]: non-exhaustive patterns: type `NonEmptyUnion2` is non-empty
-  --> $DIR/empty-match.rs:117:20
+  --> $DIR/empty-match.rs:127:20
    |
 LL |     match_no_arms!((NonEmptyUnion2 { foo: () }));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -120,42 +120,44 @@ LL | union NonEmptyUnion2 {
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
-  --> $DIR/empty-match.rs:119:20
+  --> $DIR/empty-match.rs:129:20
    |
 LL |     match_no_arms!(NonEmptyEnum1::Foo(true));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
    |
 note: `NonEmptyEnum1` defined here
-  --> $DIR/empty-match.rs:33:5
+  --> $DIR/empty-match.rs:32:6
    |
 LL | enum NonEmptyEnum1 {
-   |      -------------
+   |      ^^^^^^^^^^^^^
+...
 LL |     Foo(bool),
-   |     ^^^ not covered
+   |     --- not covered
    = note: the matched value is of type `NonEmptyEnum1`
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
-  --> $DIR/empty-match.rs:122:20
+  --> $DIR/empty-match.rs:132:20
    |
 LL |     match_no_arms!(NonEmptyEnum2::Foo(true));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
    |
 note: `NonEmptyEnum2` defined here
-  --> $DIR/empty-match.rs:40:5
+  --> $DIR/empty-match.rs:39:6
    |
 LL | enum NonEmptyEnum2 {
-   |      -------------
+   |      ^^^^^^^^^^^^^
+...
 LL |     Foo(bool),
-   |     ^^^ not covered
+   |     --- not covered
 ...
 LL |     Bar,
-   |     ^^^ not covered
+   |     --- not covered
    = note: the matched value is of type `NonEmptyEnum2`
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
-  --> $DIR/empty-match.rs:125:20
+  --> $DIR/empty-match.rs:135:20
    |
 LL |     match_no_arms!(NonEmptyEnum5::V1);
    |                    ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
@@ -165,11 +167,19 @@ note: `NonEmptyEnum5` defined here
    |
 LL | enum NonEmptyEnum5 {
    |      ^^^^^^^^^^^^^
+...
+LL |     V1, V2, V3, V4, V5,
+   |     --  --  --  --  -- not covered
+   |     |   |   |   |
+   |     |   |   |   not covered
+   |     |   |   not covered
+   |     |   not covered
+   |     not covered
    = note: the matched value is of type `NonEmptyEnum5`
    = help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or multiple match arms
 
 error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/empty-match.rs:129:24
+  --> $DIR/empty-match.rs:139:24
    |
 LL |     match_guarded_arm!(0u8);
    |                        ^^^ pattern `_` not covered
@@ -183,7 +193,7 @@ LL +             _ => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyStruct1` not covered
-  --> $DIR/empty-match.rs:134:24
+  --> $DIR/empty-match.rs:144:24
    |
 LL |     match_guarded_arm!(NonEmptyStruct1);
    |                        ^^^^^^^^^^^^^^^ pattern `NonEmptyStruct1` not covered
@@ -202,7 +212,7 @@ LL +             NonEmptyStruct1 => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyStruct2(_)` not covered
-  --> $DIR/empty-match.rs:139:24
+  --> $DIR/empty-match.rs:149:24
    |
 LL |     match_guarded_arm!(NonEmptyStruct2(true));
    |                        ^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyStruct2(_)` not covered
@@ -221,7 +231,7 @@ LL +             NonEmptyStruct2(_) => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyUnion1 { .. }` not covered
-  --> $DIR/empty-match.rs:144:24
+  --> $DIR/empty-match.rs:154:24
    |
 LL |     match_guarded_arm!((NonEmptyUnion1 { foo: () }));
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion1 { .. }` not covered
@@ -240,7 +250,7 @@ LL +             NonEmptyUnion1 { .. } => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyUnion2 { .. }` not covered
-  --> $DIR/empty-match.rs:149:24
+  --> $DIR/empty-match.rs:159:24
    |
 LL |     match_guarded_arm!((NonEmptyUnion2 { foo: () }));
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyUnion2 { .. }` not covered
@@ -259,18 +269,19 @@ LL +             NonEmptyUnion2 { .. } => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum1::Foo(_)` not covered
-  --> $DIR/empty-match.rs:154:24
+  --> $DIR/empty-match.rs:164:24
    |
 LL |     match_guarded_arm!(NonEmptyEnum1::Foo(true));
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^ pattern `NonEmptyEnum1::Foo(_)` not covered
    |
 note: `NonEmptyEnum1` defined here
-  --> $DIR/empty-match.rs:33:5
+  --> $DIR/empty-match.rs:32:6
    |
 LL | enum NonEmptyEnum1 {
-   |      -------------
+   |      ^^^^^^^^^^^^^
+...
 LL |     Foo(bool),
-   |     ^^^ not covered
+   |     --- not covered
    = note: the matched value is of type `NonEmptyEnum1`
    = note: match arms with guards don't count towards exhaustivity
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
@@ -280,21 +291,22 @@ LL +             NonEmptyEnum1::Foo(_) => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
-  --> $DIR/empty-match.rs:159:24
+  --> $DIR/empty-match.rs:169:24
    |
 LL |     match_guarded_arm!(NonEmptyEnum2::Foo(true));
    |                        ^^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum2::Foo(_)` and `NonEmptyEnum2::Bar` not covered
    |
 note: `NonEmptyEnum2` defined here
-  --> $DIR/empty-match.rs:40:5
+  --> $DIR/empty-match.rs:39:6
    |
 LL | enum NonEmptyEnum2 {
-   |      -------------
+   |      ^^^^^^^^^^^^^
+...
 LL |     Foo(bool),
-   |     ^^^ not covered
+   |     --- not covered
 ...
 LL |     Bar,
-   |     ^^^ not covered
+   |     --- not covered
    = note: the matched value is of type `NonEmptyEnum2`
    = note: match arms with guards don't count towards exhaustivity
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
@@ -304,7 +316,7 @@ LL +             NonEmptyEnum2::Foo(_) | NonEmptyEnum2::Bar => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
-  --> $DIR/empty-match.rs:164:24
+  --> $DIR/empty-match.rs:174:24
    |
 LL |     match_guarded_arm!(NonEmptyEnum5::V1);
    |                        ^^^^^^^^^^^^^^^^^ patterns `NonEmptyEnum5::V1`, `NonEmptyEnum5::V2`, `NonEmptyEnum5::V3` and 2 more not covered
@@ -314,6 +326,14 @@ note: `NonEmptyEnum5` defined here
    |
 LL | enum NonEmptyEnum5 {
    |      ^^^^^^^^^^^^^
+...
+LL |     V1, V2, V3, V4, V5,
+   |     --  --  --  --  -- not covered
+   |     |   |   |   |
+   |     |   |   |   not covered
+   |     |   |   not covered
+   |     |   not covered
+   |     not covered
    = note: the matched value is of type `NonEmptyEnum5`
    = note: match arms with guards don't count towards exhaustivity
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
diff --git a/tests/ui/pattern/usefulness/empty-match.rs b/tests/ui/pattern/usefulness/empty-match.rs
index d56d2e3c817..fe5d0bce14f 100644
--- a/tests/ui/pattern/usefulness/empty-match.rs
+++ b/tests/ui/pattern/usefulness/empty-match.rs
@@ -30,17 +30,17 @@ union NonEmptyUnion2 {
     bar: (),
 }
 enum NonEmptyEnum1 {
-    Foo(bool),
     //~^ NOTE `NonEmptyEnum1` defined here
     //~| NOTE `NonEmptyEnum1` defined here
-    //~| NOTE not covered
+    Foo(bool),
+    //~^ NOTE not covered
     //~| NOTE not covered
 }
 enum NonEmptyEnum2 {
-    Foo(bool),
     //~^ NOTE `NonEmptyEnum2` defined here
     //~| NOTE `NonEmptyEnum2` defined here
-    //~| NOTE not covered
+    Foo(bool),
+    //~^ NOTE not covered
     //~| NOTE not covered
     Bar,
     //~^ NOTE not covered
@@ -50,6 +50,16 @@ enum NonEmptyEnum5 {
     //~^ NOTE `NonEmptyEnum5` defined here
     //~| NOTE `NonEmptyEnum5` defined here
     V1, V2, V3, V4, V5,
+    //~^ NOTE not covered
+    //~| NOTE not covered
+    //~| NOTE not covered
+    //~| NOTE not covered
+    //~| NOTE not covered
+    //~| NOTE not covered
+    //~| NOTE not covered
+    //~| NOTE not covered
+    //~| NOTE not covered
+    //~| NOTE not covered
 }
 
 fn empty_enum(x: EmptyEnum) {
diff --git a/tests/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.rs b/tests/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.rs
index 5ea92b07081..33c1dfd39d4 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.rs
+++ b/tests/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.rs
@@ -8,7 +8,7 @@ macro_rules! m {
             $t2 => {}
             _ => {}
         }
-    }
+    };
 }
 
 fn main() {
@@ -16,9 +16,9 @@ fn main() {
     m!(0u8, 30..=40, 20..=30); //~ ERROR multiple patterns overlap on their endpoints
     m!(0u8, 20..=30, 31..=40);
     m!(0u8, 20..=30, 29..=40);
-    m!(0u8, 20.. 30, 29..=40); //~ ERROR multiple patterns overlap on their endpoints
-    m!(0u8, 20.. 30, 28..=40);
-    m!(0u8, 20.. 30, 30..=40);
+    m!(0u8, 20..30, 29..=40); //~ ERROR multiple patterns overlap on their endpoints
+    m!(0u8, 20..30, 28..=40);
+    m!(0u8, 20..30, 30..=40);
     m!(0u8, 20..=30, 30..=30);
     m!(0u8, 20..=30, 30..=31); //~ ERROR multiple patterns overlap on their endpoints
     m!(0u8, 20..=30, 29..=30);
@@ -28,7 +28,7 @@ fn main() {
     m!(0u8, 20..=30, 20);
     m!(0u8, 20..=30, 25);
     m!(0u8, 20..=30, 30);
-    m!(0u8, 20.. 30, 29);
+    m!(0u8, 20..30, 29);
     m!(0u8, 20, 20..=30);
     m!(0u8, 25, 20..=30);
     m!(0u8, 30, 20..=30);
@@ -36,19 +36,21 @@ fn main() {
     match 0u8 {
         0..=10 => {}
         20..=30 => {}
-        10..=20 => {} //~ ERROR multiple patterns overlap on their endpoints
+        10..=20 => {}
+        //~^ ERROR multiple patterns overlap on their endpoints
+        //~| ERROR multiple patterns overlap on their endpoints
         _ => {}
     }
     match (0u8, true) {
         (0..=10, true) => {}
-        (10..20, true) => {} // not detected
-        (10..20, false) => {}
+        (10..20, true) => {} //~ ERROR multiple patterns overlap on their endpoints
+        (10..20, false) => {} //~ ERROR multiple patterns overlap on their endpoints
         _ => {}
     }
     match (true, 0u8) {
         (true, 0..=10) => {}
         (true, 10..20) => {} //~ ERROR multiple patterns overlap on their endpoints
-        (false, 10..20) => {}
+        (false, 10..20) => {} //~ ERROR multiple patterns overlap on their endpoints
         _ => {}
     }
     match Some(0u8) {
diff --git a/tests/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.stderr b/tests/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.stderr
index ea0e8f6e49e..a87205d76d1 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.stderr
+++ b/tests/ui/pattern/usefulness/integer-ranges/overlapping_range_endpoints.stderr
@@ -24,10 +24,10 @@ LL |     m!(0u8, 30..=40, 20..=30);
    = note: you likely meant to write mutually exclusive ranges
 
 error: multiple patterns overlap on their endpoints
-  --> $DIR/overlapping_range_endpoints.rs:19:22
+  --> $DIR/overlapping_range_endpoints.rs:19:21
    |
-LL |     m!(0u8, 20.. 30, 29..=40);
-   |             -------  ^^^^^^^ ... with this range
+LL |     m!(0u8, 20..30, 29..=40);
+   |             ------  ^^^^^^^ ... with this range
    |             |
    |             this range overlaps on `29_u8`...
    |
@@ -59,6 +59,15 @@ error: multiple patterns overlap on their endpoints
 LL |         0..=10 => {}
    |         ------ this range overlaps on `10_u8`...
 LL |         20..=30 => {}
+LL |         10..=20 => {}
+   |         ^^^^^^^ ... with this range
+   |
+   = note: you likely meant to write mutually exclusive ranges
+
+error: multiple patterns overlap on their endpoints
+  --> $DIR/overlapping_range_endpoints.rs:39:9
+   |
+LL |         20..=30 => {}
    |         ------- this range overlaps on `20_u8`...
 LL |         10..=20 => {}
    |         ^^^^^^^ ... with this range
@@ -66,7 +75,28 @@ LL |         10..=20 => {}
    = note: you likely meant to write mutually exclusive ranges
 
 error: multiple patterns overlap on their endpoints
-  --> $DIR/overlapping_range_endpoints.rs:50:16
+  --> $DIR/overlapping_range_endpoints.rs:46:10
+   |
+LL |         (0..=10, true) => {}
+   |          ------ this range overlaps on `10_u8`...
+LL |         (10..20, true) => {}
+   |          ^^^^^^ ... with this range
+   |
+   = note: you likely meant to write mutually exclusive ranges
+
+error: multiple patterns overlap on their endpoints
+  --> $DIR/overlapping_range_endpoints.rs:47:10
+   |
+LL |         (0..=10, true) => {}
+   |          ------ this range overlaps on `10_u8`...
+LL |         (10..20, true) => {}
+LL |         (10..20, false) => {}
+   |          ^^^^^^ ... with this range
+   |
+   = note: you likely meant to write mutually exclusive ranges
+
+error: multiple patterns overlap on their endpoints
+  --> $DIR/overlapping_range_endpoints.rs:52:16
    |
 LL |         (true, 0..=10) => {}
    |                ------ this range overlaps on `10_u8`...
@@ -76,7 +106,18 @@ LL |         (true, 10..20) => {}
    = note: you likely meant to write mutually exclusive ranges
 
 error: multiple patterns overlap on their endpoints
-  --> $DIR/overlapping_range_endpoints.rs:56:14
+  --> $DIR/overlapping_range_endpoints.rs:53:17
+   |
+LL |         (true, 0..=10) => {}
+   |                ------ this range overlaps on `10_u8`...
+LL |         (true, 10..20) => {}
+LL |         (false, 10..20) => {}
+   |                 ^^^^^^ ... with this range
+   |
+   = note: you likely meant to write mutually exclusive ranges
+
+error: multiple patterns overlap on their endpoints
+  --> $DIR/overlapping_range_endpoints.rs:58:14
    |
 LL |         Some(0..=10) => {}
    |              ------ this range overlaps on `10_u8`...
@@ -85,5 +126,5 @@ LL |         Some(10..20) => {}
    |
    = note: you likely meant to write mutually exclusive ranges
 
-error: aborting due to 8 previous errors
+error: aborting due to 12 previous errors
 
diff --git a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.allow.stderr b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.allow.stderr
index 9f277fa1e18..7f26c93aa28 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.allow.stderr
+++ b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.allow.stderr
@@ -1,5 +1,5 @@
 error[E0004]: non-exhaustive patterns: type `usize` is non-empty
-  --> $DIR/pointer-sized-int.rs:48:11
+  --> $DIR/pointer-sized-int.rs:54:11
    |
 LL |     match 7usize {}
    |           ^^^^^^
diff --git a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr
index df330c60b1e..d16ec5412db 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr
+++ b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr
@@ -1,162 +1,162 @@
-error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/pointer-sized-int.rs:12:11
+error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
+  --> $DIR/pointer-sized-int.rs:14:11
    |
 LL |     match 0usize {
-   |           ^^^^^^ pattern `_` not covered
+   |           ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         0 ..= usize::MAX => {},
-LL +         _ => todo!()
+LL +         usize::MAX.. => todo!()
    |
 
-error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/pointer-sized-int.rs:17:11
+error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
+  --> $DIR/pointer-sized-int.rs:19:11
    |
 LL |     match 0isize {
-   |           ^^^^^^ pattern `_` not covered
+   |           ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         isize::MIN ..= isize::MAX => {},
-LL +         _ => todo!()
+LL +         ..isize::MIN | isize::MAX.. => todo!()
    |
 
-error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/pointer-sized-int.rs:22:8
+error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
+  --> $DIR/pointer-sized-int.rs:25:8
    |
 LL |     m!(0usize, 0..=usize::MAX);
-   |        ^^^^^^ pattern `_` not covered
+   |        ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
-LL |         match $s { $($t)+ => {}, _ => todo!() }
-   |                                ++++++++++++++
+LL |         match $s { $($t)+ => {}, usize::MAX.. => todo!() }
+   |                                +++++++++++++++++++++++++
 
-error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/pointer-sized-int.rs:24:8
+error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
+  --> $DIR/pointer-sized-int.rs:27:8
    |
 LL |     m!(0usize, 0..5 | 5..=usize::MAX);
-   |        ^^^^^^ pattern `_` not covered
+   |        ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
-LL |         match $s { $($t)+ => {}, _ => todo!() }
-   |                                ++++++++++++++
+LL |         match $s { $($t)+ => {}, usize::MAX.. => todo!() }
+   |                                +++++++++++++++++++++++++
 
-error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/pointer-sized-int.rs:26:8
+error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
+  --> $DIR/pointer-sized-int.rs:29:8
    |
 LL |     m!(0usize, 0..usize::MAX | usize::MAX);
-   |        ^^^^^^ pattern `_` not covered
+   |        ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
-LL |         match $s { $($t)+ => {}, _ => todo!() }
-   |                                ++++++++++++++
+LL |         match $s { $($t)+ => {}, usize::MAX.. => todo!() }
+   |                                +++++++++++++++++++++++++
 
-error[E0004]: non-exhaustive patterns: `(_, _)` not covered
-  --> $DIR/pointer-sized-int.rs:28:8
+error[E0004]: non-exhaustive patterns: `(usize::MAX.., _)` not covered
+  --> $DIR/pointer-sized-int.rs:31:8
    |
 LL |     m!((0usize, true), (0..5, true) | (5..=usize::MAX, true) | (0..=usize::MAX, false));
-   |        ^^^^^^^^^^^^^^ pattern `(_, _)` not covered
+   |        ^^^^^^^^^^^^^^ pattern `(usize::MAX.., _)` not covered
    |
    = note: the matched value is of type `(usize, bool)`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
-LL |         match $s { $($t)+ => {}, (_, _) => todo!() }
-   |                                +++++++++++++++++++
+LL |         match $s { $($t)+ => {}, (usize::MAX.., _) => todo!() }
+   |                                ++++++++++++++++++++++++++++++
 
-error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/pointer-sized-int.rs:31:8
+error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
+  --> $DIR/pointer-sized-int.rs:36:8
    |
 LL |     m!(0isize, isize::MIN..=isize::MAX);
-   |        ^^^^^^ pattern `_` not covered
+   |        ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
-LL |         match $s { $($t)+ => {}, _ => todo!() }
-   |                                ++++++++++++++
+LL |         match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
+   |                                ++++++++++++++++++++++++++++++++++++++++
 
-error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/pointer-sized-int.rs:33:8
+error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
+  --> $DIR/pointer-sized-int.rs:38:8
    |
 LL |     m!(0isize, isize::MIN..5 | 5..=isize::MAX);
-   |        ^^^^^^ pattern `_` not covered
+   |        ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
-LL |         match $s { $($t)+ => {}, _ => todo!() }
-   |                                ++++++++++++++
+LL |         match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
+   |                                ++++++++++++++++++++++++++++++++++++++++
 
-error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/pointer-sized-int.rs:35:8
+error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
+  --> $DIR/pointer-sized-int.rs:40:8
    |
 LL |     m!(0isize, isize::MIN..isize::MAX | isize::MAX);
-   |        ^^^^^^ pattern `_` not covered
+   |        ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
-LL |         match $s { $($t)+ => {}, _ => todo!() }
-   |                                ++++++++++++++
+LL |         match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
+   |                                ++++++++++++++++++++++++++++++++++++++++
 
-error[E0004]: non-exhaustive patterns: `(_, _)` not covered
-  --> $DIR/pointer-sized-int.rs:37:8
+error[E0004]: non-exhaustive patterns: `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
+  --> $DIR/pointer-sized-int.rs:42:8
    |
 LL |     m!((0isize, true), (isize::MIN..5, true)
-   |        ^^^^^^^^^^^^^^ pattern `(_, _)` not covered
+   |        ^^^^^^^^^^^^^^ patterns `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
    |
    = note: the matched value is of type `(isize, bool)`
-   = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
-LL |         match $s { $($t)+ => {}, (_, _) => todo!() }
-   |                                +++++++++++++++++++
+LL |         match $s { $($t)+ => {}, (..isize::MIN, _) | (isize::MAX.., _) => todo!() }
+   |                                ++++++++++++++++++++++++++++++++++++++++++++++++++
 
-error[E0004]: non-exhaustive patterns: `_` not covered
-  --> $DIR/pointer-sized-int.rs:41:11
+error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
+  --> $DIR/pointer-sized-int.rs:47:11
    |
 LL |     match 0isize {
-   |           ^^^^^^ pattern `_` not covered
+   |           ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         1 ..= isize::MAX => {},
-LL +         _ => todo!()
+LL +         ..isize::MIN | isize::MAX.. => todo!()
    |
 
 error[E0004]: non-exhaustive patterns: type `usize` is non-empty
-  --> $DIR/pointer-sized-int.rs:48:11
+  --> $DIR/pointer-sized-int.rs:54:11
    |
 LL |     match 7usize {}
    |           ^^^^^^
diff --git a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs
index 1ed18c26763..20a3cbe127f 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs
+++ b/tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.rs
@@ -1,6 +1,7 @@
 // revisions: allow deny
 #![feature(exclusive_range_pattern)]
 #![cfg_attr(allow, feature(precise_pointer_size_matching))]
+#![allow(overlapping_range_endpoints)]
 
 macro_rules! m {
     ($s:expr, $($t:tt)+) => {
@@ -8,6 +9,7 @@ macro_rules! m {
     }
 }
 
+#[rustfmt::skip]
 fn main() {
     match 0usize {
         //[deny]~^ ERROR non-exhaustive patterns
@@ -19,6 +21,7 @@ fn main() {
         isize::MIN ..= isize::MAX => {}
     }
 
+    m!(0usize, 0..);
     m!(0usize, 0..=usize::MAX);
     //[deny]~^ ERROR non-exhaustive patterns
     m!(0usize, 0..5 | 5..=usize::MAX);
@@ -27,7 +30,9 @@ fn main() {
     //[deny]~^ ERROR non-exhaustive patterns
     m!((0usize, true), (0..5, true) | (5..=usize::MAX, true) | (0..=usize::MAX, false));
     //[deny]~^ ERROR non-exhaustive patterns
+    m!(0usize, 0..=usize::MAX | usize::MAX..);
 
+    m!(0isize, ..0 | 0..);
     m!(0isize, isize::MIN..=isize::MAX);
     //[deny]~^ ERROR non-exhaustive patterns
     m!(0isize, isize::MIN..5 | 5..=isize::MAX);
@@ -37,6 +42,7 @@ fn main() {
     m!((0isize, true), (isize::MIN..5, true)
         | (5..=isize::MAX, true) | (isize::MIN..=isize::MAX, false));
     //[deny]~^^ ERROR non-exhaustive patterns
+    m!(0isize, ..=isize::MIN | isize::MIN..=isize::MAX | isize::MAX..);
 
     match 0isize {
         //[deny]~^ ERROR non-exhaustive patterns
diff --git a/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.rs b/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.rs
index a2aa655ca54..d60f479c0d1 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.rs
+++ b/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.rs
@@ -1,18 +1,18 @@
 // This tests that the lint message explains the reason for the error.
 fn main() {
     match 0usize {
-        //~^ ERROR non-exhaustive patterns: `_` not covered
-        //~| NOTE pattern `_` not covered
+        //~^ ERROR non-exhaustive patterns: `usize::MAX..` not covered
+        //~| NOTE pattern `usize::MAX..` not covered
         //~| NOTE the matched value is of type `usize`
         //~| NOTE `usize` does not have a fixed maximum value
         0..=usize::MAX => {}
     }
 
     match 0isize {
-        //~^ ERROR non-exhaustive patterns: `_` not covered
-        //~| NOTE pattern `_` not covered
+        //~^ ERROR non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
+        //~| NOTE patterns `..isize::MIN` and `isize::MAX..` not covered
         //~| NOTE the matched value is of type `isize`
-        //~| NOTE `isize` does not have a fixed maximum value
+        //~| NOTE `isize` does not have fixed minimum and maximum values
         isize::MIN..=isize::MAX => {}
     }
 }
diff --git a/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr b/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr
index b80411b26b0..a7f93648ed3 100644
--- a/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr
+++ b/tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr
@@ -1,31 +1,31 @@
-error[E0004]: non-exhaustive patterns: `_` not covered
+error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
   --> $DIR/precise_pointer_matching-message.rs:3:11
    |
 LL |     match 0usize {
-   |           ^^^^^^ pattern `_` not covered
+   |           ^^^^^^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         0..=usize::MAX => {},
-LL +         _ => todo!()
+LL +         usize::MAX.. => todo!()
    |
 
-error[E0004]: non-exhaustive patterns: `_` not covered
+error[E0004]: non-exhaustive patterns: `..isize::MIN` and `isize::MAX..` not covered
   --> $DIR/precise_pointer_matching-message.rs:11:11
    |
 LL |     match 0isize {
-   |           ^^^^^^ pattern `_` not covered
+   |           ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
    |
    = note: the matched value is of type `isize`
-   = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         isize::MIN..=isize::MAX => {},
-LL +         _ => todo!()
+LL +         ..isize::MIN | isize::MAX.. => todo!()
    |
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/pattern/usefulness/issue-35609.stderr b/tests/ui/pattern/usefulness/issue-35609.stderr
index 6d5e2f410bc..9feedfde469 100644
--- a/tests/ui/pattern/usefulness/issue-35609.stderr
+++ b/tests/ui/pattern/usefulness/issue-35609.stderr
@@ -107,6 +107,9 @@ LL |     match Some(A) {
    |
 note: `Option<Enum>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
+  ::: $SRC_DIR/core/src/option.rs:LL:COL
+   |
+   = note: not covered
    = note: the matched value is of type `Option<Enum>`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
    |
diff --git a/tests/ui/pattern/usefulness/issue-39362.stderr b/tests/ui/pattern/usefulness/issue-39362.stderr
index b8b17918aef..8dc53491606 100644
--- a/tests/ui/pattern/usefulness/issue-39362.stderr
+++ b/tests/ui/pattern/usefulness/issue-39362.stderr
@@ -5,12 +5,12 @@ LL |     match f {
    |           ^ patterns `Foo::Bar { bar: Bar::C, .. }`, `Foo::Bar { bar: Bar::D, .. }`, `Foo::Bar { bar: Bar::E, .. }` and 1 more not covered
    |
 note: `Foo` defined here
-  --> $DIR/issue-39362.rs:2:5
+  --> $DIR/issue-39362.rs:1:6
    |
 LL | enum Foo {
-   |      ---
+   |      ^^^
 LL |     Bar { bar: Bar, id: usize }
-   |     ^^^ not covered
+   |     --- not covered
    = note: the matched value is of type `Foo`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
    |
diff --git a/tests/ui/pattern/usefulness/issue-40221.stderr b/tests/ui/pattern/usefulness/issue-40221.stderr
index 4973e42b054..40b42af26b3 100644
--- a/tests/ui/pattern/usefulness/issue-40221.stderr
+++ b/tests/ui/pattern/usefulness/issue-40221.stderr
@@ -5,12 +5,12 @@ LL |     match proto {
    |           ^^^^^ pattern `P::C(PC::QA)` not covered
    |
 note: `P` defined here
-  --> $DIR/issue-40221.rs:2:5
+  --> $DIR/issue-40221.rs:1:6
    |
 LL | enum P {
-   |      -
+   |      ^
 LL |     C(PC),
-   |     ^ not covered
+   |     - not covered
    = note: the matched value is of type `P`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/tests/ui/pattern/usefulness/issue-56379.stderr b/tests/ui/pattern/usefulness/issue-56379.stderr
index b3e40b99239..50e13bdfdfe 100644
--- a/tests/ui/pattern/usefulness/issue-56379.stderr
+++ b/tests/ui/pattern/usefulness/issue-56379.stderr
@@ -5,16 +5,16 @@ LL |     match Foo::A(true) {
    |           ^^^^^^^^^^^^ patterns `Foo::A(false)`, `Foo::B(false)` and `Foo::C(false)` not covered
    |
 note: `Foo` defined here
-  --> $DIR/issue-56379.rs:2:5
+  --> $DIR/issue-56379.rs:1:6
    |
 LL | enum Foo {
-   |      ---
+   |      ^^^
 LL |     A(bool),
-   |     ^ not covered
+   |     - not covered
 LL |     B(bool),
-   |     ^ not covered
+   |     - not covered
 LL |     C(bool),
-   |     ^ not covered
+   |     - not covered
    = note: the matched value is of type `Foo`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
diff --git a/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.rs b/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.rs
index 8f58227ee2c..6cbcfed709f 100644
--- a/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.rs
+++ b/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.rs
@@ -6,19 +6,19 @@ struct B<T, U>(T, U);
 
 fn main() {
     match 0 {
-        //~^ ERROR non-exhaustive patterns: `_` not covered [E0004]
+        //~^ ERROR non-exhaustive patterns: `usize::MAX..` not covered [E0004]
         0 => (),
         1..=usize::MAX => (),
     }
 
     match (0usize, 0usize) {
-        //~^ ERROR non-exhaustive patterns: `(_, _)` not covered [E0004]
+        //~^ ERROR non-exhaustive patterns: `(usize::MAX.., _)` not covered [E0004]
         (0, 0) => (),
         (1..=usize::MAX, 1..=usize::MAX) => (),
     }
 
     match (0isize, 0usize) {
-        //~^ ERROR non-exhaustive patterns: `(_, _)` not covered [E0004]
+        //~^ ERROR non-exhaustive patterns: `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered [E0004]
         (isize::MIN..=isize::MAX, 0) => (),
         (isize::MIN..=isize::MAX, 1..=usize::MAX) => (),
     }
@@ -30,14 +30,14 @@ fn main() {
     }
 
     match Some(4) {
-        //~^ ERROR non-exhaustive patterns: `Some(_)` not covered
+        //~^ ERROR non-exhaustive patterns: `Some(usize::MAX..)` not covered
         Some(0) => (),
         Some(1..=usize::MAX) => (),
         None => (),
     }
 
     match Some(Some(Some(0))) {
-        //~^ ERROR non-exhaustive patterns: `Some(Some(Some(_)))` not covered
+        //~^ ERROR non-exhaustive patterns: `Some(Some(Some(usize::MAX..)))` not covered
         Some(Some(Some(0))) => (),
         Some(Some(Some(1..=usize::MAX))) => (),
         Some(Some(None)) => (),
@@ -46,13 +46,13 @@ fn main() {
     }
 
     match (A { a: 0usize }) {
-        //~^ ERROR non-exhaustive patterns: `A { .. }` not covered [E0004]
+        //~^ ERROR non-exhaustive patterns: `A { a: usize::MAX.. }` not covered [E0004]
         A { a: 0 } => (),
         A { a: 1..=usize::MAX } => (),
     }
 
     match B(0isize, 0usize) {
-        //~^ ERROR non-exhaustive patterns: `B(_, _)` not covered [E0004]
+        //~^ ERROR non-exhaustive patterns: `B(..isize::MIN, _)` and `B(isize::MAX.., _)` not covered [E0004]
         B(isize::MIN..=isize::MAX, 0) => (),
         B(isize::MIN..=isize::MAX, 1..=usize::MAX) => (),
     }
@@ -60,7 +60,7 @@ fn main() {
     // Should report only the note about usize not having fixed max value and not report
     // report the note about isize
     match B(0isize, 0usize) {
-        //~^ ERROR non-exhaustive patterns: `B(_, _)` not covered [E0004]
+        //~^ ERROR non-exhaustive patterns: `B(_, usize::MAX..)` not covered [E0004]
         B(_, 0) => (),
         B(_, 1..=usize::MAX) => (),
     }
diff --git a/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr b/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr
index ea1d99e20ae..556efcda516 100644
--- a/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr
+++ b/tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr
@@ -1,46 +1,46 @@
-error[E0004]: non-exhaustive patterns: `_` not covered
+error[E0004]: non-exhaustive patterns: `usize::MAX..` not covered
   --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:8:11
    |
 LL |     match 0 {
-   |           ^ pattern `_` not covered
+   |           ^ pattern `usize::MAX..` not covered
    |
    = note: the matched value is of type `usize`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         1..=usize::MAX => (),
-LL ~         _ => todo!(),
+LL ~         usize::MAX.. => todo!(),
    |
 
-error[E0004]: non-exhaustive patterns: `(_, _)` not covered
+error[E0004]: non-exhaustive patterns: `(usize::MAX.., _)` not covered
   --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:14:11
    |
 LL |     match (0usize, 0usize) {
-   |           ^^^^^^^^^^^^^^^^ pattern `(_, _)` not covered
+   |           ^^^^^^^^^^^^^^^^ pattern `(usize::MAX.., _)` not covered
    |
    = note: the matched value is of type `(usize, usize)`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         (1..=usize::MAX, 1..=usize::MAX) => (),
-LL ~         (_, _) => todo!(),
+LL ~         (usize::MAX.., _) => todo!(),
    |
 
-error[E0004]: non-exhaustive patterns: `(_, _)` not covered
+error[E0004]: non-exhaustive patterns: `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
   --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:20:11
    |
 LL |     match (0isize, 0usize) {
-   |           ^^^^^^^^^^^^^^^^ pattern `(_, _)` not covered
+   |           ^^^^^^^^^^^^^^^^ patterns `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
    |
    = note: the matched value is of type `(isize, usize)`
-   = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         (isize::MIN..=isize::MAX, 1..=usize::MAX) => (),
-LL ~         (_, _) => todo!(),
+LL ~         (..isize::MIN, _) | (isize::MAX.., _) => todo!(),
    |
 
 error[E0004]: non-exhaustive patterns: `Some(_)` not covered
@@ -61,11 +61,11 @@ LL ~         None => {},
 LL +         Some(_) => todo!()
    |
 
-error[E0004]: non-exhaustive patterns: `Some(_)` not covered
+error[E0004]: non-exhaustive patterns: `Some(usize::MAX..)` not covered
   --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:32:11
    |
 LL |     match Some(4) {
-   |           ^^^^^^^ pattern `Some(_)` not covered
+   |           ^^^^^^^ pattern `Some(usize::MAX..)` not covered
    |
 note: `Option<usize>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
@@ -73,19 +73,19 @@ note: `Option<usize>` defined here
    |
    = note: not covered
    = note: the matched value is of type `Option<usize>`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         None => (),
-LL ~         Some(_) => todo!(),
+LL ~         Some(usize::MAX..) => todo!(),
    |
 
-error[E0004]: non-exhaustive patterns: `Some(Some(Some(_)))` not covered
+error[E0004]: non-exhaustive patterns: `Some(Some(Some(usize::MAX..)))` not covered
   --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:39:11
    |
 LL |     match Some(Some(Some(0))) {
-   |           ^^^^^^^^^^^^^^^^^^^ pattern `Some(Some(Some(_)))` not covered
+   |           ^^^^^^^^^^^^^^^^^^^ pattern `Some(Some(Some(usize::MAX..)))` not covered
    |
 note: `Option<Option<Option<usize>>>` defined here
   --> $SRC_DIR/core/src/option.rs:LL:COL
@@ -97,19 +97,19 @@ note: `Option<Option<Option<usize>>>` defined here
    |
    = note: not covered
    = note: the matched value is of type `Option<Option<Option<usize>>>`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         None => (),
-LL ~         Some(Some(Some(_))) => todo!(),
+LL ~         Some(Some(Some(usize::MAX..))) => todo!(),
    |
 
-error[E0004]: non-exhaustive patterns: `A { .. }` not covered
+error[E0004]: non-exhaustive patterns: `A { a: usize::MAX.. }` not covered
   --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:48:11
    |
 LL |     match (A { a: 0usize }) {
-   |           ^^^^^^^^^^^^^^^^^ pattern `A { .. }` not covered
+   |           ^^^^^^^^^^^^^^^^^ pattern `A { a: usize::MAX.. }` not covered
    |
 note: `A<usize>` defined here
   --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:1:8
@@ -117,19 +117,19 @@ note: `A<usize>` defined here
 LL | struct A<T> {
    |        ^
    = note: the matched value is of type `A<usize>`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         A { a: 1..=usize::MAX } => (),
-LL ~         A { .. } => todo!(),
+LL ~         A { a: usize::MAX.. } => todo!(),
    |
 
-error[E0004]: non-exhaustive patterns: `B(_, _)` not covered
+error[E0004]: non-exhaustive patterns: `B(..isize::MIN, _)` and `B(isize::MAX.., _)` not covered
   --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:54:11
    |
 LL |     match B(0isize, 0usize) {
-   |           ^^^^^^^^^^^^^^^^^ pattern `B(_, _)` not covered
+   |           ^^^^^^^^^^^^^^^^^ patterns `B(..isize::MIN, _)` and `B(isize::MAX.., _)` not covered
    |
 note: `B<isize, usize>` defined here
   --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:5:8
@@ -137,19 +137,19 @@ note: `B<isize, usize>` defined here
 LL | struct B<T, U>(T, U);
    |        ^
    = note: the matched value is of type `B<isize, usize>`
-   = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `isize` does not have fixed minimum and maximum values, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         B(isize::MIN..=isize::MAX, 1..=usize::MAX) => (),
-LL ~         B(_, _) => todo!(),
+LL ~         B(..isize::MIN, _) | B(isize::MAX.., _) => todo!(),
    |
 
-error[E0004]: non-exhaustive patterns: `B(_, _)` not covered
+error[E0004]: non-exhaustive patterns: `B(_, usize::MAX..)` not covered
   --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:62:11
    |
 LL |     match B(0isize, 0usize) {
-   |           ^^^^^^^^^^^^^^^^^ pattern `B(_, _)` not covered
+   |           ^^^^^^^^^^^^^^^^^ pattern `B(_, usize::MAX..)` not covered
    |
 note: `B<isize, usize>` defined here
   --> $DIR/issue-85222-types-containing-non-exhaustive-types.rs:5:8
@@ -157,12 +157,12 @@ note: `B<isize, usize>` defined here
 LL | struct B<T, U>(T, U);
    |        ^
    = note: the matched value is of type `B<isize, usize>`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
+   = note: `usize` does not have a fixed maximum value, so half-open ranges are necessary to match exhaustively
    = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         B(_, 1..=usize::MAX) => (),
-LL ~         B(_, _) => todo!(),
+LL ~         B(_, usize::MAX..) => todo!(),
    |
 
 error: aborting due to 9 previous errors
diff --git a/tests/ui/pattern/usefulness/non-exhaustive-defined-here.rs b/tests/ui/pattern/usefulness/non-exhaustive-defined-here.rs
index 5145f769075..1d1ea8e4964 100644
--- a/tests/ui/pattern/usefulness/non-exhaustive-defined-here.rs
+++ b/tests/ui/pattern/usefulness/non-exhaustive-defined-here.rs
@@ -1,10 +1,15 @@
+#![feature(custom_inner_attributes)]
+#![rustfmt::skip]
 // Test the "defined here" and "not covered" diagnostic hints.
 // We also make sure that references are peeled off from the scrutinee type
 // so that the diagnostics work better with default binding modes.
 
 #[derive(Clone)]
 enum E {
-    //~^ NOTE
+    //~^ NOTE `E` defined here
+    //~| NOTE `E` defined here
+    //~| NOTE `E` defined here
+    //~| NOTE
     //~| NOTE
     //~| NOTE
     //~| NOTE
@@ -12,10 +17,7 @@ enum E {
     //~| NOTE
     A,
     B,
-    //~^ NOTE `E` defined here
-    //~| NOTE `E` defined here
-    //~| NOTE `E` defined here
-    //~| NOTE  not covered
+    //~^ NOTE  not covered
     //~| NOTE  not covered
     //~| NOTE  not covered
     //~| NOTE  not covered
@@ -79,12 +81,12 @@ fn by_ref_thrice(e: & &mut &E) {
 }
 
 enum Opt {
-    //~^ NOTE
+    //~^ NOTE `Opt` defined here
+    //~| NOTE
     //~| NOTE
     Some(u8),
     None,
-    //~^ NOTE `Opt` defined here
-    //~| NOTE not covered
+    //~^ NOTE not covered
     //~| NOTE not covered
 }
 
diff --git a/tests/ui/pattern/usefulness/non-exhaustive-defined-here.stderr b/tests/ui/pattern/usefulness/non-exhaustive-defined-here.stderr
index 8489e2f14b8..a9e55fa53a6 100644
--- a/tests/ui/pattern/usefulness/non-exhaustive-defined-here.stderr
+++ b/tests/ui/pattern/usefulness/non-exhaustive-defined-here.stderr
@@ -1,20 +1,20 @@
 error[E0004]: non-exhaustive patterns: `E::B` and `E::C` not covered
-  --> $DIR/non-exhaustive-defined-here.rs:35:11
+  --> $DIR/non-exhaustive-defined-here.rs:37:11
    |
 LL |     match e1 {
    |           ^^ patterns `E::B` and `E::C` not covered
    |
 note: `E` defined here
-  --> $DIR/non-exhaustive-defined-here.rs:14:5
+  --> $DIR/non-exhaustive-defined-here.rs:8:6
    |
 LL | enum E {
-   |      -
+   |      ^
 ...
 LL |     B,
-   |     ^ not covered
+   |     - not covered
 ...
 LL |     C
-   |     ^ not covered
+   |     - not covered
    = note: the matched value is of type `E`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
@@ -23,7 +23,7 @@ LL +         E::B | E::C => todo!()
    |
 
 error[E0005]: refutable pattern in local binding
-  --> $DIR/non-exhaustive-defined-here.rs:41:9
+  --> $DIR/non-exhaustive-defined-here.rs:43:9
    |
 LL |     let E::A = e;
    |         ^^^^ patterns `E::B` and `E::C` not covered
@@ -31,7 +31,7 @@ LL |     let E::A = e;
    = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
    = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
 note: `E` defined here
-  --> $DIR/non-exhaustive-defined-here.rs:6:6
+  --> $DIR/non-exhaustive-defined-here.rs:8:6
    |
 LL | enum E {
    |      ^
@@ -48,22 +48,22 @@ LL |     if let E::A = e { todo!() };
    |     ++              +++++++++++
 
 error[E0004]: non-exhaustive patterns: `&E::B` and `&E::C` not covered
-  --> $DIR/non-exhaustive-defined-here.rs:50:11
+  --> $DIR/non-exhaustive-defined-here.rs:52:11
    |
 LL |     match e {
    |           ^ patterns `&E::B` and `&E::C` not covered
    |
 note: `E` defined here
-  --> $DIR/non-exhaustive-defined-here.rs:14:5
+  --> $DIR/non-exhaustive-defined-here.rs:8:6
    |
 LL | enum E {
-   |      -
+   |      ^
 ...
 LL |     B,
-   |     ^ not covered
+   |     - not covered
 ...
 LL |     C
-   |     ^ not covered
+   |     - not covered
    = note: the matched value is of type `&E`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
@@ -72,7 +72,7 @@ LL +         &E::B | &E::C => todo!()
    |
 
 error[E0005]: refutable pattern in local binding
-  --> $DIR/non-exhaustive-defined-here.rs:57:9
+  --> $DIR/non-exhaustive-defined-here.rs:59:9
    |
 LL |     let E::A = e;
    |         ^^^^ patterns `&E::B` and `&E::C` not covered
@@ -80,7 +80,7 @@ LL |     let E::A = e;
    = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
    = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
 note: `E` defined here
-  --> $DIR/non-exhaustive-defined-here.rs:6:6
+  --> $DIR/non-exhaustive-defined-here.rs:8:6
    |
 LL | enum E {
    |      ^
@@ -97,22 +97,22 @@ LL |     if let E::A = e { todo!() };
    |     ++              +++++++++++
 
 error[E0004]: non-exhaustive patterns: `&&mut &E::B` and `&&mut &E::C` not covered
-  --> $DIR/non-exhaustive-defined-here.rs:66:11
+  --> $DIR/non-exhaustive-defined-here.rs:68:11
    |
 LL |     match e {
    |           ^ patterns `&&mut &E::B` and `&&mut &E::C` not covered
    |
 note: `E` defined here
-  --> $DIR/non-exhaustive-defined-here.rs:14:5
+  --> $DIR/non-exhaustive-defined-here.rs:8:6
    |
 LL | enum E {
-   |      -
+   |      ^
 ...
 LL |     B,
-   |     ^ not covered
+   |     - not covered
 ...
 LL |     C
-   |     ^ not covered
+   |     - not covered
    = note: the matched value is of type `&&mut &E`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
@@ -121,7 +121,7 @@ LL +         &&mut &E::B | &&mut &E::C => todo!()
    |
 
 error[E0005]: refutable pattern in local binding
-  --> $DIR/non-exhaustive-defined-here.rs:73:9
+  --> $DIR/non-exhaustive-defined-here.rs:75:9
    |
 LL |     let E::A = e;
    |         ^^^^ patterns `&&mut &E::B` and `&&mut &E::C` not covered
@@ -129,7 +129,7 @@ LL |     let E::A = e;
    = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
    = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
 note: `E` defined here
-  --> $DIR/non-exhaustive-defined-here.rs:6:6
+  --> $DIR/non-exhaustive-defined-here.rs:8:6
    |
 LL | enum E {
    |      ^
@@ -146,19 +146,19 @@ LL |     if let E::A = e { todo!() };
    |     ++              +++++++++++
 
 error[E0004]: non-exhaustive patterns: `Opt::None` not covered
-  --> $DIR/non-exhaustive-defined-here.rs:92:11
+  --> $DIR/non-exhaustive-defined-here.rs:94:11
    |
 LL |     match e {
    |           ^ pattern `Opt::None` not covered
    |
 note: `Opt` defined here
-  --> $DIR/non-exhaustive-defined-here.rs:85:5
+  --> $DIR/non-exhaustive-defined-here.rs:83:6
    |
 LL | enum Opt {
-   |      ---
+   |      ^^^
 ...
 LL |     None,
-   |     ^^^^ not covered
+   |     ---- not covered
    = note: the matched value is of type `Opt`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
@@ -167,7 +167,7 @@ LL +         Opt::None => todo!()
    |
 
 error[E0005]: refutable pattern in local binding
-  --> $DIR/non-exhaustive-defined-here.rs:99:9
+  --> $DIR/non-exhaustive-defined-here.rs:101:9
    |
 LL |     let Opt::Some(ref _x) = e;
    |         ^^^^^^^^^^^^^^^^^ pattern `Opt::None` not covered
@@ -175,7 +175,7 @@ LL |     let Opt::Some(ref _x) = e;
    = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
    = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
 note: `Opt` defined here
-  --> $DIR/non-exhaustive-defined-here.rs:81:6
+  --> $DIR/non-exhaustive-defined-here.rs:83:6
    |
 LL | enum Opt {
    |      ^^^
diff --git a/tests/ui/pattern/usefulness/non-exhaustive-match-nested.stderr b/tests/ui/pattern/usefulness/non-exhaustive-match-nested.stderr
index 98e417a17f8..310049fe13e 100644
--- a/tests/ui/pattern/usefulness/non-exhaustive-match-nested.stderr
+++ b/tests/ui/pattern/usefulness/non-exhaustive-match-nested.stderr
@@ -18,10 +18,10 @@ LL |     match x {
    |           ^ pattern `T::A(U::C)` not covered
    |
 note: `T` defined here
-  --> $DIR/non-exhaustive-match-nested.rs:1:10
+  --> $DIR/non-exhaustive-match-nested.rs:1:6
    |
 LL | enum T { A(U), B }
-   |      -   ^ not covered
+   |      ^   - not covered
    = note: the matched value is of type `T`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/tests/ui/pattern/usefulness/non-exhaustive-match.stderr b/tests/ui/pattern/usefulness/non-exhaustive-match.stderr
index e59e8885e1a..4bebd3cbbef 100644
--- a/tests/ui/pattern/usefulness/non-exhaustive-match.stderr
+++ b/tests/ui/pattern/usefulness/non-exhaustive-match.stderr
@@ -5,10 +5,10 @@ LL |     match x { T::B => { } }
    |           ^ pattern `T::A` not covered
    |
 note: `T` defined here
-  --> $DIR/non-exhaustive-match.rs:3:10
+  --> $DIR/non-exhaustive-match.rs:3:6
    |
 LL | enum T { A, B }
-   |      -   ^ not covered
+   |      ^   - not covered
    = note: the matched value is of type `T`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
@@ -79,10 +79,10 @@ LL |     match T::A {
    |           ^^^^ pattern `T::B` not covered
    |
 note: `T` defined here
-  --> $DIR/non-exhaustive-match.rs:3:13
+  --> $DIR/non-exhaustive-match.rs:3:6
    |
 LL | enum T { A, B }
-   |      -      ^ not covered
+   |      ^      - not covered
    = note: the matched value is of type `T`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/tests/ui/pattern/usefulness/non-exhaustive-pattern-witness.rs b/tests/ui/pattern/usefulness/non-exhaustive-pattern-witness.rs
index 4bd34421922..9e60d4f41a1 100644
--- a/tests/ui/pattern/usefulness/non-exhaustive-pattern-witness.rs
+++ b/tests/ui/pattern/usefulness/non-exhaustive-pattern-witness.rs
@@ -1,88 +1,101 @@
 struct Foo {
     first: bool,
-    second: Option<[usize; 4]>
+    second: Option<[usize; 4]>,
 }
 
 fn struct_with_a_nested_enum_and_vector() {
     match (Foo { first: true, second: None }) {
-//~^ ERROR non-exhaustive patterns: `Foo { first: false, second: Some([_, _, _, _]) }` not covered
+        //~^ ERROR non-exhaustive patterns: `Foo { first: false, second: Some([0_usize, _, _, _]) }` and `Foo { first: false, second: Some([2_usize.., _, _, _]) }` not covered
         Foo { first: true, second: None } => (),
         Foo { first: true, second: Some(_) } => (),
         Foo { first: false, second: None } => (),
-        Foo { first: false, second: Some([1, 2, 3, 4]) } => ()
+        Foo { first: false, second: Some([1, 2, 3, 4]) } => (),
     }
 }
 
 enum Color {
     Red,
     Green,
-    CustomRGBA { a: bool, r: u8, g: u8, b: u8 }
+    CustomRGBA { a: bool, r: u8, g: u8, b: u8 },
 }
 
 fn enum_with_single_missing_variant() {
     match Color::Red {
-    //~^ ERROR non-exhaustive patterns: `Color::Red` not covered
+        //~^ ERROR non-exhaustive patterns: `Color::Red` not covered
         Color::CustomRGBA { .. } => (),
-        Color::Green => ()
+        Color::Green => (),
     }
 }
 
 enum Direction {
-    North, East, South, West
+    North,
+    East,
+    South,
+    West,
 }
 
 fn enum_with_multiple_missing_variants() {
     match Direction::North {
-    //~^ ERROR non-exhaustive patterns: `Direction::East`, `Direction::South` and `Direction::West` not covered
-        Direction::North => ()
+        //~^ ERROR non-exhaustive patterns: `Direction::East`, `Direction::South` and `Direction::West` not covered
+        Direction::North => (),
     }
 }
 
 enum ExcessiveEnum {
-    First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth, Eleventh, Twelfth
+    First,
+    Second,
+    Third,
+    Fourth,
+    Fifth,
+    Sixth,
+    Seventh,
+    Eighth,
+    Ninth,
+    Tenth,
+    Eleventh,
+    Twelfth,
 }
 
 fn enum_with_excessive_missing_variants() {
     match ExcessiveEnum::First {
-    //~^ ERROR `ExcessiveEnum::Second`, `ExcessiveEnum::Third`, `ExcessiveEnum::Fourth` and 8 more not covered
-
-        ExcessiveEnum::First => ()
+        //~^ ERROR `ExcessiveEnum::Second`, `ExcessiveEnum::Third`, `ExcessiveEnum::Fourth` and 8 more not covered
+        ExcessiveEnum::First => (),
     }
 }
 
 fn enum_struct_variant() {
     match Color::Red {
-    //~^ ERROR non-exhaustive patterns: `Color::CustomRGBA { a: true, .. }` not covered
+        //~^ ERROR non-exhaustive patterns: `Color::CustomRGBA { a: true, .. }` not covered
         Color::Red => (),
         Color::Green => (),
         Color::CustomRGBA { a: false, r: _, g: _, b: 0 } => (),
-        Color::CustomRGBA { a: false, r: _, g: _, b: _ } => ()
+        Color::CustomRGBA { a: false, r: _, g: _, b: _ } => (),
     }
 }
 
 enum Enum {
     First,
-    Second(bool)
+    Second(bool),
 }
 
 fn vectors_with_nested_enums() {
     let x: &'static [Enum] = &[Enum::First, Enum::Second(false)];
     match *x {
-    //~^ ERROR non-exhaustive patterns: `[Enum::Second(true), Enum::Second(false)]` not covered
+        //~^ ERROR non-exhaustive patterns: `[Enum::Second(true), Enum::Second(false)]` not covered
         [] => (),
         [_] => (),
         [Enum::First, _] => (),
         [Enum::Second(true), Enum::First] => (),
         [Enum::Second(true), Enum::Second(true)] => (),
         [Enum::Second(false), _] => (),
-        [_, _, ref tail @ .., _] => ()
+        [_, _, ref tail @ .., _] => (),
     }
 }
 
 fn missing_nil() {
     match ((), false) {
-    //~^ ERROR non-exhaustive patterns: `((), false)` not covered
-        ((), true) => ()
+        //~^ ERROR non-exhaustive patterns: `((), false)` not covered
+        ((), true) => (),
     }
 }
 
diff --git a/tests/ui/pattern/usefulness/non-exhaustive-pattern-witness.stderr b/tests/ui/pattern/usefulness/non-exhaustive-pattern-witness.stderr
index d798ec722dd..cceb1d8f65d 100644
--- a/tests/ui/pattern/usefulness/non-exhaustive-pattern-witness.stderr
+++ b/tests/ui/pattern/usefulness/non-exhaustive-pattern-witness.stderr
@@ -1,8 +1,8 @@
-error[E0004]: non-exhaustive patterns: `Foo { first: false, second: Some([_, _, _, _]) }` not covered
+error[E0004]: non-exhaustive patterns: `Foo { first: false, second: Some([0_usize, _, _, _]) }` and `Foo { first: false, second: Some([2_usize.., _, _, _]) }` not covered
   --> $DIR/non-exhaustive-pattern-witness.rs:7:11
    |
 LL |     match (Foo { first: true, second: None }) {
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo { first: false, second: Some([_, _, _, _]) }` not covered
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ patterns `Foo { first: false, second: Some([0_usize, _, _, _]) }` and `Foo { first: false, second: Some([2_usize.., _, _, _]) }` not covered
    |
 note: `Foo` defined here
   --> $DIR/non-exhaustive-pattern-witness.rs:1:8
@@ -10,12 +10,10 @@ note: `Foo` defined here
 LL | struct Foo {
    |        ^^^
    = note: the matched value is of type `Foo`
-   = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
-   = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         Foo { first: false, second: Some([1, 2, 3, 4]) } => (),
-LL +         Foo { first: false, second: Some([_, _, _, _]) } => todo!()
+LL ~         Foo { first: false, second: Some([0_usize, _, _, _]) } | Foo { first: false, second: Some([2_usize.., _, _, _]) } => todo!(),
    |
 
 error[E0004]: non-exhaustive patterns: `Color::Red` not covered
@@ -25,83 +23,96 @@ LL |     match Color::Red {
    |           ^^^^^^^^^^ pattern `Color::Red` not covered
    |
 note: `Color` defined here
-  --> $DIR/non-exhaustive-pattern-witness.rs:17:5
+  --> $DIR/non-exhaustive-pattern-witness.rs:16:6
    |
 LL | enum Color {
-   |      -----
+   |      ^^^^^
 LL |     Red,
-   |     ^^^ not covered
+   |     --- not covered
    = note: the matched value is of type `Color`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         Color::Green => (),
-LL +         Color::Red => todo!()
+LL ~         Color::Red => todo!(),
    |
 
 error[E0004]: non-exhaustive patterns: `Direction::East`, `Direction::South` and `Direction::West` not covered
-  --> $DIR/non-exhaustive-pattern-witness.rs:35:11
+  --> $DIR/non-exhaustive-pattern-witness.rs:38:11
    |
 LL |     match Direction::North {
    |           ^^^^^^^^^^^^^^^^ patterns `Direction::East`, `Direction::South` and `Direction::West` not covered
    |
 note: `Direction` defined here
-  --> $DIR/non-exhaustive-pattern-witness.rs:31:12
+  --> $DIR/non-exhaustive-pattern-witness.rs:30:6
    |
 LL | enum Direction {
-   |      ---------
-LL |     North, East, South, West
-   |            ^^^^  ^^^^^  ^^^^ not covered
-   |            |     |
-   |            |     not covered
-   |            not covered
+   |      ^^^^^^^^^
+LL |     North,
+LL |     East,
+   |     ---- not covered
+LL |     South,
+   |     ----- not covered
+LL |     West,
+   |     ---- not covered
    = note: the matched value is of type `Direction`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         Direction::North => (),
-LL +         Direction::East | Direction::South | Direction::West => todo!()
+LL ~         Direction::East | Direction::South | Direction::West => todo!(),
    |
 
 error[E0004]: non-exhaustive patterns: `ExcessiveEnum::Second`, `ExcessiveEnum::Third`, `ExcessiveEnum::Fourth` and 8 more not covered
-  --> $DIR/non-exhaustive-pattern-witness.rs:46:11
+  --> $DIR/non-exhaustive-pattern-witness.rs:60:11
    |
 LL |     match ExcessiveEnum::First {
    |           ^^^^^^^^^^^^^^^^^^^^ patterns `ExcessiveEnum::Second`, `ExcessiveEnum::Third`, `ExcessiveEnum::Fourth` and 8 more not covered
    |
 note: `ExcessiveEnum` defined here
-  --> $DIR/non-exhaustive-pattern-witness.rs:41:6
+  --> $DIR/non-exhaustive-pattern-witness.rs:44:6
    |
 LL | enum ExcessiveEnum {
    |      ^^^^^^^^^^^^^
+LL |     First,
+LL |     Second,
+   |     ------ not covered
+LL |     Third,
+   |     ----- not covered
+LL |     Fourth,
+   |     ------ not covered
+LL |     Fifth,
+   |     ----- not covered
+LL |     Sixth,
+   |     ----- not covered
    = note: the matched value is of type `ExcessiveEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown, or multiple match arms
    |
 LL ~         ExcessiveEnum::First => (),
-LL +         _ => todo!()
+LL ~         _ => todo!(),
    |
 
 error[E0004]: non-exhaustive patterns: `Color::CustomRGBA { a: true, .. }` not covered
-  --> $DIR/non-exhaustive-pattern-witness.rs:54:11
+  --> $DIR/non-exhaustive-pattern-witness.rs:67:11
    |
 LL |     match Color::Red {
    |           ^^^^^^^^^^ pattern `Color::CustomRGBA { a: true, .. }` not covered
    |
 note: `Color` defined here
-  --> $DIR/non-exhaustive-pattern-witness.rs:19:5
+  --> $DIR/non-exhaustive-pattern-witness.rs:16:6
    |
 LL | enum Color {
-   |      -----
+   |      ^^^^^
 ...
-LL |     CustomRGBA { a: bool, r: u8, g: u8, b: u8 }
-   |     ^^^^^^^^^^ not covered
+LL |     CustomRGBA { a: bool, r: u8, g: u8, b: u8 },
+   |     ---------- not covered
    = note: the matched value is of type `Color`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         Color::CustomRGBA { a: false, r: _, g: _, b: _ } => (),
-LL +         Color::CustomRGBA { a: true, .. } => todo!()
+LL ~         Color::CustomRGBA { a: true, .. } => todo!(),
    |
 
 error[E0004]: non-exhaustive patterns: `[Enum::Second(true), Enum::Second(false)]` not covered
-  --> $DIR/non-exhaustive-pattern-witness.rs:70:11
+  --> $DIR/non-exhaustive-pattern-witness.rs:83:11
    |
 LL |     match *x {
    |           ^^ pattern `[Enum::Second(true), Enum::Second(false)]` not covered
@@ -110,11 +121,11 @@ LL |     match *x {
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         [_, _, ref tail @ .., _] => (),
-LL +         [Enum::Second(true), Enum::Second(false)] => todo!()
+LL ~         [Enum::Second(true), Enum::Second(false)] => todo!(),
    |
 
 error[E0004]: non-exhaustive patterns: `((), false)` not covered
-  --> $DIR/non-exhaustive-pattern-witness.rs:83:11
+  --> $DIR/non-exhaustive-pattern-witness.rs:96:11
    |
 LL |     match ((), false) {
    |           ^^^^^^^^^^^ pattern `((), false)` not covered
@@ -123,7 +134,7 @@ LL |     match ((), false) {
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
 LL ~         ((), true) => (),
-LL +         ((), false) => todo!()
+LL ~         ((), false) => todo!(),
    |
 
 error: aborting due to 7 previous errors
diff --git a/tests/ui/pattern/usefulness/refutable-pattern-errors.rs b/tests/ui/pattern/usefulness/refutable-pattern-errors.rs
index 7a3e991d593..7603da1bb2c 100644
--- a/tests/ui/pattern/usefulness/refutable-pattern-errors.rs
+++ b/tests/ui/pattern/usefulness/refutable-pattern-errors.rs
@@ -1,6 +1,6 @@
-fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) { }
+fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) {}
 //~^ ERROR refutable pattern in function argument
-//~| `(_, _)` not covered
+//~| `(..=0_isize, _)` and `(2_isize.., _)` not covered
 
 fn main() {
     let (1, (Some(1), 2..=3)) = (1, (None, 2));
diff --git a/tests/ui/pattern/usefulness/refutable-pattern-errors.stderr b/tests/ui/pattern/usefulness/refutable-pattern-errors.stderr
index beb51a4d450..e66cd113023 100644
--- a/tests/ui/pattern/usefulness/refutable-pattern-errors.stderr
+++ b/tests/ui/pattern/usefulness/refutable-pattern-errors.stderr
@@ -1,8 +1,8 @@
 error[E0005]: refutable pattern in function argument
   --> $DIR/refutable-pattern-errors.rs:1:9
    |
-LL | fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) { }
-   |         ^^^^^^^^^^^^^^^^^^^^^ pattern `(_, _)` not covered
+LL | fn func((1, (Some(1), 2..=3)): (isize, (Option<isize>, isize))) {}
+   |         ^^^^^^^^^^^^^^^^^^^^^ patterns `(..=0_isize, _)` and `(2_isize.., _)` not covered
    |
    = note: the matched value is of type `(isize, (Option<isize>, isize))`
 
diff --git a/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.rs b/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.rs
index 17dc38ab25d..4203dd94d43 100644
--- a/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.rs
+++ b/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.rs
@@ -1,6 +1,6 @@
 fn main() {
     let f = |3: isize| println!("hello");
     //~^ ERROR refutable pattern in function argument
-    //~| `_` not covered
+    //~| `..=2_isize` and `4_isize..` not covered
     f(4);
 }
diff --git a/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.stderr b/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.stderr
index ab3f6f69fb1..01f077909e8 100644
--- a/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.stderr
+++ b/tests/ui/pattern/usefulness/refutable-pattern-in-fn-arg.stderr
@@ -2,7 +2,7 @@ error[E0005]: refutable pattern in function argument
   --> $DIR/refutable-pattern-in-fn-arg.rs:2:14
    |
 LL |     let f = |3: isize| println!("hello");
-   |              ^ pattern `_` not covered
+   |              ^ patterns `..=2_isize` and `4_isize..` not covered
    |
    = note: the matched value is of type `isize`
 help: alternatively, you could prepend the pattern with an underscore to define a new named variable; identifiers cannot begin with digits
diff --git a/tests/ui/pattern/usefulness/stable-gated-patterns.stderr b/tests/ui/pattern/usefulness/stable-gated-patterns.stderr
index f944c25a905..f75517fb791 100644
--- a/tests/ui/pattern/usefulness/stable-gated-patterns.stderr
+++ b/tests/ui/pattern/usefulness/stable-gated-patterns.stderr
@@ -5,13 +5,13 @@ LL |     match UnstableEnum::Stable {
    |           ^^^^^^^^^^^^^^^^^^^^ patterns `UnstableEnum::Stable2` and `_` not covered
    |
 note: `UnstableEnum` defined here
-  --> $DIR/auxiliary/unstable.rs:9:5
+  --> $DIR/auxiliary/unstable.rs:5:1
    |
 LL | pub enum UnstableEnum {
-   | ---------------------
+   | ^^^^^^^^^^^^^^^^^^^^^
 ...
 LL |     Stable2,
-   |     ^^^^^^^ not covered
+   |     ------- not covered
    = note: the matched value is of type `UnstableEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
diff --git a/tests/ui/pattern/usefulness/struct-like-enum-nonexhaustive.stderr b/tests/ui/pattern/usefulness/struct-like-enum-nonexhaustive.stderr
index 22425aa0dd4..3d2b540a9f5 100644
--- a/tests/ui/pattern/usefulness/struct-like-enum-nonexhaustive.stderr
+++ b/tests/ui/pattern/usefulness/struct-like-enum-nonexhaustive.stderr
@@ -5,12 +5,12 @@ LL |     match x {
    |           ^ pattern `A::B { x: Some(_) }` not covered
    |
 note: `A` defined here
-  --> $DIR/struct-like-enum-nonexhaustive.rs:2:5
+  --> $DIR/struct-like-enum-nonexhaustive.rs:1:6
    |
 LL | enum A {
-   |      -
+   |      ^
 LL |     B { x: Option<isize> },
-   |     ^ not covered
+   |     - not covered
    = note: the matched value is of type `A`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/tests/ui/pattern/usefulness/tuple-struct-nonexhaustive.stderr b/tests/ui/pattern/usefulness/tuple-struct-nonexhaustive.stderr
index 50c7fc889f4..ef707ed4aa4 100644
--- a/tests/ui/pattern/usefulness/tuple-struct-nonexhaustive.stderr
+++ b/tests/ui/pattern/usefulness/tuple-struct-nonexhaustive.stderr
@@ -1,8 +1,8 @@
-error[E0004]: non-exhaustive patterns: `Foo(_, _)` not covered
+error[E0004]: non-exhaustive patterns: `Foo(..=0_isize, _)` and `Foo(3_isize.., _)` not covered
   --> $DIR/tuple-struct-nonexhaustive.rs:5:11
    |
 LL |     match x {
-   |           ^ pattern `Foo(_, _)` not covered
+   |           ^ patterns `Foo(..=0_isize, _)` and `Foo(3_isize.., _)` not covered
    |
 note: `Foo` defined here
   --> $DIR/tuple-struct-nonexhaustive.rs:1:8
@@ -10,12 +10,10 @@ note: `Foo` defined here
 LL | struct Foo(isize, isize);
    |        ^^^
    = note: the matched value is of type `Foo`
-   = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
-   = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
-help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
 LL ~         Foo(2, b) => println!("{}", b),
-LL +         Foo(_, _) => todo!()
+LL +         Foo(..=0_isize, _) | Foo(3_isize.., _) => todo!()
    |
 
 error: aborting due to previous error
diff --git a/tests/ui/pattern/usefulness/unstable-gated-patterns.stderr b/tests/ui/pattern/usefulness/unstable-gated-patterns.stderr
index d776249b231..4a4945156f7 100644
--- a/tests/ui/pattern/usefulness/unstable-gated-patterns.stderr
+++ b/tests/ui/pattern/usefulness/unstable-gated-patterns.stderr
@@ -5,13 +5,13 @@ LL |     match UnstableEnum::Stable {
    |           ^^^^^^^^^^^^^^^^^^^^ pattern `UnstableEnum::Unstable` not covered
    |
 note: `UnstableEnum` defined here
-  --> $DIR/auxiliary/unstable.rs:11:5
+  --> $DIR/auxiliary/unstable.rs:5:1
    |
 LL | pub enum UnstableEnum {
-   | ---------------------
+   | ^^^^^^^^^^^^^^^^^^^^^
 ...
 LL |     Unstable,
-   |     ^^^^^^^^ not covered
+   |     -------- not covered
    = note: the matched value is of type `UnstableEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
    |
diff --git a/tests/ui/polymorphization/generators.rs b/tests/ui/polymorphization/coroutine.rs
index 779bac0ace2..3f28e89e36c 100644
--- a/tests/ui/polymorphization/generators.rs
+++ b/tests/ui/polymorphization/coroutine.rs
@@ -1,10 +1,10 @@
 // build-fail
 // compile-flags:-Zpolymorphize=on -Zinline-mir=off
-#![feature(generic_const_exprs, generators, generator_trait, rustc_attrs)]
+#![feature(generic_const_exprs, coroutines, coroutine_trait, rustc_attrs)]
 //~^ WARN the feature `generic_const_exprs` is incomplete
 
 use std::marker::Unpin;
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 
 enum YieldOrReturn<Y, R> {
@@ -14,13 +14,13 @@ enum YieldOrReturn<Y, R> {
 
 fn finish<T, Y, R>(mut t: T) -> Vec<YieldOrReturn<Y, R>>
 where
-    T: Generator<(), Yield = Y, Return = R> + Unpin,
+    T: Coroutine<(), Yield = Y, Return = R> + Unpin,
 {
     let mut results = Vec::new();
     loop {
         match Pin::new(&mut t).resume(()) {
-            GeneratorState::Yielded(yielded) => results.push(YieldOrReturn::Yield(yielded)),
-            GeneratorState::Complete(returned) => {
+            CoroutineState::Yielded(yielded) => results.push(YieldOrReturn::Yield(yielded)),
+            CoroutineState::Complete(returned) => {
                 results.push(YieldOrReturn::Return(returned));
                 return results;
             }
@@ -28,10 +28,10 @@ where
     }
 }
 
-// This test checks that the polymorphization analysis functions on generators.
+// This test checks that the polymorphization analysis functions on coroutines.
 
 #[rustc_polymorphize_error]
-pub fn unused_type<T>() -> impl Generator<(), Yield = u32, Return = u32> + Unpin {
+pub fn unused_type<T>() -> impl Coroutine<(), Yield = u32, Return = u32> + Unpin {
     || {
         //~^ ERROR item has unused generic parameters
         yield 1;
@@ -40,7 +40,7 @@ pub fn unused_type<T>() -> impl Generator<(), Yield = u32, Return = u32> + Unpin
 }
 
 #[rustc_polymorphize_error]
-pub fn used_type_in_yield<Y: Default>() -> impl Generator<(), Yield = Y, Return = u32> + Unpin {
+pub fn used_type_in_yield<Y: Default>() -> impl Coroutine<(), Yield = Y, Return = u32> + Unpin {
     || {
         yield Y::default();
         2
@@ -48,7 +48,7 @@ pub fn used_type_in_yield<Y: Default>() -> impl Generator<(), Yield = Y, Return
 }
 
 #[rustc_polymorphize_error]
-pub fn used_type_in_return<R: Default>() -> impl Generator<(), Yield = u32, Return = R> + Unpin {
+pub fn used_type_in_return<R: Default>() -> impl Coroutine<(), Yield = u32, Return = R> + Unpin {
     || {
         yield 3;
         R::default()
@@ -56,7 +56,7 @@ pub fn used_type_in_return<R: Default>() -> impl Generator<(), Yield = u32, Retu
 }
 
 #[rustc_polymorphize_error]
-pub fn unused_const<const T: u32>() -> impl Generator<(), Yield = u32, Return = u32> + Unpin {
+pub fn unused_const<const T: u32>() -> impl Coroutine<(), Yield = u32, Return = u32> + Unpin {
     || {
         //~^ ERROR item has unused generic parameters
         yield 1;
@@ -65,7 +65,7 @@ pub fn unused_const<const T: u32>() -> impl Generator<(), Yield = u32, Return =
 }
 
 #[rustc_polymorphize_error]
-pub fn used_const_in_yield<const Y: u32>() -> impl Generator<(), Yield = u32, Return = u32> + Unpin
+pub fn used_const_in_yield<const Y: u32>() -> impl Coroutine<(), Yield = u32, Return = u32> + Unpin
 {
     || {
         yield Y;
@@ -74,7 +74,7 @@ pub fn used_const_in_yield<const Y: u32>() -> impl Generator<(), Yield = u32, Re
 }
 
 #[rustc_polymorphize_error]
-pub fn used_const_in_return<const R: u32>() -> impl Generator<(), Yield = u32, Return = u32> + Unpin
+pub fn used_const_in_return<const R: u32>() -> impl Coroutine<(), Yield = u32, Return = u32> + Unpin
 {
     || {
         yield 4;
diff --git a/tests/ui/polymorphization/generators.stderr b/tests/ui/polymorphization/coroutine.stderr
index 32d49d25f02..67b55a59883 100644
--- a/tests/ui/polymorphization/generators.stderr
+++ b/tests/ui/polymorphization/coroutine.stderr
@@ -1,24 +1,24 @@
 warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
-  --> $DIR/generators.rs:3:12
+  --> $DIR/coroutine.rs:3:12
    |
-LL | #![feature(generic_const_exprs, generators, generator_trait, rustc_attrs)]
+LL | #![feature(generic_const_exprs, coroutines, coroutine_trait, rustc_attrs)]
    |            ^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
    = note: `#[warn(incomplete_features)]` on by default
 
 error: item has unused generic parameters
-  --> $DIR/generators.rs:35:5
+  --> $DIR/coroutine.rs:35:5
    |
-LL | pub fn unused_type<T>() -> impl Generator<(), Yield = u32, Return = u32> + Unpin {
+LL | pub fn unused_type<T>() -> impl Coroutine<(), Yield = u32, Return = u32> + Unpin {
    |                    - generic parameter `T` is unused
 LL |     || {
    |     ^^
 
 error: item has unused generic parameters
-  --> $DIR/generators.rs:60:5
+  --> $DIR/coroutine.rs:60:5
    |
-LL | pub fn unused_const<const T: u32>() -> impl Generator<(), Yield = u32, Return = u32> + Unpin {
+LL | pub fn unused_const<const T: u32>() -> impl Coroutine<(), Yield = u32, Return = u32> + Unpin {
    |                     ------------ generic parameter `T` is unused
 LL |     || {
    |     ^^
diff --git a/tests/ui/print_type_sizes/generator.rs b/tests/ui/print_type_sizes/coroutine.rs
index d1cd36274ef..aae72e0f37e 100644
--- a/tests/ui/print_type_sizes/generator.rs
+++ b/tests/ui/print_type_sizes/coroutine.rs
@@ -2,11 +2,11 @@
 // build-pass
 // ignore-pass
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 
-use std::ops::Generator;
+use std::ops::Coroutine;
 
-fn generator<const C: usize>(array: [u8; C]) -> impl Generator<Yield = (), Return = ()> {
+fn coroutine<const C: usize>(array: [u8; C]) -> impl Coroutine<Yield = (), Return = ()> {
     move |()| {
         yield ();
         let _ = array;
@@ -14,5 +14,5 @@ fn generator<const C: usize>(array: [u8; C]) -> impl Generator<Yield = (), Retur
 }
 
 pub fn foo() {
-    let _ = generator([0; 8192]);
+    let _ = coroutine([0; 8192]);
 }
diff --git a/tests/ui/print_type_sizes/generator.stdout b/tests/ui/print_type_sizes/coroutine.stdout
index f8c52a595cc..5d51339558c 100644
--- a/tests/ui/print_type_sizes/generator.stdout
+++ b/tests/ui/print_type_sizes/coroutine.stdout
@@ -1,4 +1,4 @@
-print-type-size type: `{generator@$DIR/generator.rs:10:5: 10:14}`: 8193 bytes, alignment: 1 bytes
+print-type-size type: `{coroutine@$DIR/coroutine.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
diff --git a/tests/ui/print_type_sizes/generator_discr_placement.rs b/tests/ui/print_type_sizes/coroutine_discr_placement.rs
index 6adc14f9b99..78fe75cdeb9 100644
--- a/tests/ui/print_type_sizes/generator_discr_placement.rs
+++ b/tests/ui/print_type_sizes/coroutine_discr_placement.rs
@@ -2,10 +2,10 @@
 // build-pass
 // ignore-pass
 
-// Tests a generator that has its discriminant as the *final* field.
+// Tests a coroutine that has its discriminant as the *final* field.
 
 // Avoid emitting panic handlers, like the rest of these tests...
-#![feature(generators)]
+#![feature(coroutines)]
 #![allow(dropping_copy_types)]
 
 pub fn foo() {
diff --git a/tests/ui/print_type_sizes/generator_discr_placement.stdout b/tests/ui/print_type_sizes/coroutine_discr_placement.stdout
index f7bdee1112b..f34a8e9a706 100644
--- a/tests/ui/print_type_sizes/generator_discr_placement.stdout
+++ b/tests/ui/print_type_sizes/coroutine_discr_placement.stdout
@@ -1,4 +1,4 @@
-print-type-size type: `{generator@$DIR/generator_discr_placement.rs:12:13: 12:15}`: 8 bytes, alignment: 4 bytes
+print-type-size type: `{coroutine@$DIR/coroutine_discr_placement.rs:12:13: 12:15}`: 8 bytes, alignment: 4 bytes
 print-type-size     discriminant: 1 bytes
 print-type-size     variant `Unresumed`: 0 bytes
 print-type-size     variant `Suspend0`: 7 bytes
diff --git a/tests/ui/privacy/associated-item-privacy-trait.rs b/tests/ui/privacy/associated-item-privacy-trait.rs
index db77a6a7258..f038ae9e261 100644
--- a/tests/ui/privacy/associated-item-privacy-trait.rs
+++ b/tests/ui/privacy/associated-item-privacy-trait.rs
@@ -23,7 +23,7 @@ mod priv_trait {
         let _: <Pub as PrivTr>::AssocTy;
         //~^ ERROR associated type `PrivTr::AssocTy` is private
         pub type InSignatureTy = <Pub as PrivTr>::AssocTy;
-        //~^ ERROR trait `PrivTr` is private
+        //~^ ERROR associated type `PrivTr::AssocTy` is private
         pub trait InSignatureTr: PrivTr {}
         //~^ ERROR trait `PrivTr` is private
         impl PrivTr for u8 {}
diff --git a/tests/ui/privacy/associated-item-privacy-trait.stderr b/tests/ui/privacy/associated-item-privacy-trait.stderr
index eb905bf7ef8..4e9dfa4a835 100644
--- a/tests/ui/privacy/associated-item-privacy-trait.stderr
+++ b/tests/ui/privacy/associated-item-privacy-trait.stderr
@@ -53,11 +53,11 @@ LL |     priv_trait::mac!();
    |
    = note: this error originates in the macro `priv_trait::mac` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: trait `PrivTr` is private
+error: associated type `PrivTr::AssocTy` is private
   --> $DIR/associated-item-privacy-trait.rs:25:34
    |
 LL |         pub type InSignatureTy = <Pub as PrivTr>::AssocTy;
-   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ private trait
+   |                                  ^^^^^^^^^^^^^^^^^^^^^^^^ private associated type
 ...
 LL |     priv_trait::mac!();
    |     ------------------ in this macro invocation
diff --git a/tests/ui/privacy/issue-46209-private-enum-variant-reexport.rs b/tests/ui/privacy/issue-46209-private-enum-variant-reexport.rs
index 6f115e78e14..653dcab5771 100644
--- a/tests/ui/privacy/issue-46209-private-enum-variant-reexport.rs
+++ b/tests/ui/privacy/issue-46209-private-enum-variant-reexport.rs
@@ -2,13 +2,17 @@
 mod rank {
     pub use self::Professor::*;
     //~^ ERROR glob import doesn't reexport anything
+    //~| ERROR unused import: `self::Professor::*`
     pub use self::Lieutenant::{JuniorGrade, Full};
     //~^ ERROR `JuniorGrade` is private, and cannot be re-exported
     //~| ERROR `Full` is private, and cannot be re-exported
+    //~| ERROR unused imports: `Full`, `JuniorGrade`
     pub use self::PettyOfficer::*;
     //~^ ERROR glob import doesn't reexport anything
+    //~| ERROR unused import: `self::PettyOfficer::*`
     pub use self::Crewman::*;
     //~^ ERROR glob import doesn't reexport anything
+    //~| ERROR unused import: `self::Crewman::*`
 
     enum Professor {
         Adjunct,
diff --git a/tests/ui/privacy/issue-46209-private-enum-variant-reexport.stderr b/tests/ui/privacy/issue-46209-private-enum-variant-reexport.stderr
index 59b181fab40..df5968ba323 100644
--- a/tests/ui/privacy/issue-46209-private-enum-variant-reexport.stderr
+++ b/tests/ui/privacy/issue-46209-private-enum-variant-reexport.stderr
@@ -1,23 +1,23 @@
 error[E0364]: `JuniorGrade` is private, and cannot be re-exported
-  --> $DIR/issue-46209-private-enum-variant-reexport.rs:5:32
+  --> $DIR/issue-46209-private-enum-variant-reexport.rs:6:32
    |
 LL |     pub use self::Lieutenant::{JuniorGrade, Full};
    |                                ^^^^^^^^^^^
    |
 note: consider marking `JuniorGrade` as `pub` in the imported module
-  --> $DIR/issue-46209-private-enum-variant-reexport.rs:5:32
+  --> $DIR/issue-46209-private-enum-variant-reexport.rs:6:32
    |
 LL |     pub use self::Lieutenant::{JuniorGrade, Full};
    |                                ^^^^^^^^^^^
 
 error[E0364]: `Full` is private, and cannot be re-exported
-  --> $DIR/issue-46209-private-enum-variant-reexport.rs:5:45
+  --> $DIR/issue-46209-private-enum-variant-reexport.rs:6:45
    |
 LL |     pub use self::Lieutenant::{JuniorGrade, Full};
    |                                             ^^^^
    |
 note: consider marking `Full` as `pub` in the imported module
-  --> $DIR/issue-46209-private-enum-variant-reexport.rs:5:45
+  --> $DIR/issue-46209-private-enum-variant-reexport.rs:6:45
    |
 LL |     pub use self::Lieutenant::{JuniorGrade, Full};
    |                                             ^^^^
@@ -34,18 +34,42 @@ note: the lint level is defined here
 LL | #[deny(unused_imports)]
    |        ^^^^^^^^^^^^^^
 
+error: unused import: `self::Professor::*`
+  --> $DIR/issue-46209-private-enum-variant-reexport.rs:3:13
+   |
+LL |     pub use self::Professor::*;
+   |             ^^^^^^^^^^^^^^^^^^
+
+error: unused imports: `Full`, `JuniorGrade`
+  --> $DIR/issue-46209-private-enum-variant-reexport.rs:6:32
+   |
+LL |     pub use self::Lieutenant::{JuniorGrade, Full};
+   |                                ^^^^^^^^^^^  ^^^^
+
 error: glob import doesn't reexport anything because no candidate is public enough
-  --> $DIR/issue-46209-private-enum-variant-reexport.rs:8:13
+  --> $DIR/issue-46209-private-enum-variant-reexport.rs:10:13
    |
 LL |     pub use self::PettyOfficer::*;
    |             ^^^^^^^^^^^^^^^^^^^^^
 
-error: glob import doesn't reexport anything because no candidate is public enough
+error: unused import: `self::PettyOfficer::*`
   --> $DIR/issue-46209-private-enum-variant-reexport.rs:10:13
    |
+LL |     pub use self::PettyOfficer::*;
+   |             ^^^^^^^^^^^^^^^^^^^^^
+
+error: glob import doesn't reexport anything because no candidate is public enough
+  --> $DIR/issue-46209-private-enum-variant-reexport.rs:13:13
+   |
+LL |     pub use self::Crewman::*;
+   |             ^^^^^^^^^^^^^^^^
+
+error: unused import: `self::Crewman::*`
+  --> $DIR/issue-46209-private-enum-variant-reexport.rs:13:13
+   |
 LL |     pub use self::Crewman::*;
    |             ^^^^^^^^^^^^^^^^
 
-error: aborting due to 5 previous errors
+error: aborting due to 9 previous errors
 
 For more information about this error, try `rustc --explain E0364`.
diff --git a/tests/ui/privacy/private-in-public.rs b/tests/ui/privacy/private-in-public.rs
index f54f9e38faa..3fff2d51710 100644
--- a/tests/ui/privacy/private-in-public.rs
+++ b/tests/ui/privacy/private-in-public.rs
@@ -104,8 +104,8 @@ mod aliases_pub {
 
     // This should be OK, but associated type aliases are not substituted yet
     pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
-    //~^ WARNING trait `aliases_pub::PrivTr` is more private than the item `aliases_pub::f3`
-    //~| WARNING type `aliases_pub::Priv` is more private than the item `aliases_pub::f3`
+    //~^ WARNING type `aliases_pub::Priv` is more private than the item `aliases_pub::f3`
+    //~| WARNING associated type `aliases_pub::PrivTr::Assoc` is more private than the item `aliases_pub::f3`
 
     impl PrivUseAlias {
         pub fn f(arg: Priv) {}
@@ -133,8 +133,8 @@ mod aliases_priv {
     pub fn f1(arg: PrivUseAlias) {} //~ WARNING type `Priv1` is more private than the item `aliases_priv::f1`
     pub fn f2(arg: PrivAlias) {} //~ WARNING type `Priv2` is more private than the item `aliases_priv::f2`
     pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
-    //~^ WARNING trait `aliases_priv::PrivTr` is more private than the item `aliases_priv::f3`
-    //~| WARNING type `aliases_priv::Priv` is more private than the item `aliases_priv::f3`
+    //~^ WARNING type `aliases_priv::Priv` is more private than the item `aliases_priv::f3`
+    //~| WARNING associated type `aliases_priv::PrivTr::Assoc` is more private than the item `aliases_priv::f3`
 }
 
 mod aliases_params {
diff --git a/tests/ui/privacy/private-in-public.stderr b/tests/ui/privacy/private-in-public.stderr
index d3f7f0f637f..49cc2e19bf0 100644
--- a/tests/ui/privacy/private-in-public.stderr
+++ b/tests/ui/privacy/private-in-public.stderr
@@ -276,17 +276,17 @@ note: but type `impls::Priv` is only usable at visibility `pub(self)`
 LL |     struct Priv;
    |     ^^^^^^^^^^^
 
-warning: trait `aliases_pub::PrivTr` is more private than the item `aliases_pub::f3`
+warning: associated type `aliases_pub::PrivTr::Assoc` is more private than the item `aliases_pub::f3`
   --> $DIR/private-in-public.rs:106:5
    |
 LL |     pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_pub::f3` is reachable at visibility `pub(crate)`
    |
-note: but trait `aliases_pub::PrivTr` is only usable at visibility `pub(self)`
-  --> $DIR/private-in-public.rs:100:5
+note: but associated type `aliases_pub::PrivTr::Assoc` is only usable at visibility `pub(self)`
+  --> $DIR/private-in-public.rs:101:9
    |
-LL |     trait PrivTr {
-   |     ^^^^^^^^^^^^
+LL |         type Assoc = m::Pub3;
+   |         ^^^^^^^^^^
 
 warning: type `aliases_pub::Priv` is more private than the item `aliases_pub::f3`
   --> $DIR/private-in-public.rs:106:5
@@ -324,17 +324,17 @@ note: but type `Priv2` is only usable at visibility `pub(self)`
 LL |     struct Priv2;
    |     ^^^^^^^^^^^^
 
-warning: trait `aliases_priv::PrivTr` is more private than the item `aliases_priv::f3`
+warning: associated type `aliases_priv::PrivTr::Assoc` is more private than the item `aliases_priv::f3`
   --> $DIR/private-in-public.rs:135:5
    |
 LL |     pub fn f3(arg: <Priv as PrivTr>::Assoc) {}
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ function `aliases_priv::f3` is reachable at visibility `pub(crate)`
    |
-note: but trait `aliases_priv::PrivTr` is only usable at visibility `pub(self)`
-  --> $DIR/private-in-public.rs:128:5
+note: but associated type `aliases_priv::PrivTr::Assoc` is only usable at visibility `pub(self)`
+  --> $DIR/private-in-public.rs:129:9
    |
-LL |     trait PrivTr {
-   |     ^^^^^^^^^^^^
+LL |         type Assoc = Priv3;
+   |         ^^^^^^^^^^
 
 warning: type `aliases_priv::Priv` is more private than the item `aliases_priv::f3`
   --> $DIR/private-in-public.rs:135:5
diff --git a/tests/ui/privacy/private-variant-reexport.rs b/tests/ui/privacy/private-variant-reexport.rs
index 68828446022..b59243af620 100644
--- a/tests/ui/privacy/private-variant-reexport.rs
+++ b/tests/ui/privacy/private-variant-reexport.rs
@@ -12,7 +12,9 @@ mod m3 {
 
 #[deny(unused_imports)]
 mod m4 {
-    pub use ::E::*; //~ ERROR glob import doesn't reexport anything
+    pub use ::E::*;
+    //~^ ERROR glob import doesn't reexport anything
+    //~| ERROR unused import: `::E::*`
 }
 
 enum E { V }
diff --git a/tests/ui/privacy/private-variant-reexport.stderr b/tests/ui/privacy/private-variant-reexport.stderr
index 78771ee30d3..2f041934a81 100644
--- a/tests/ui/privacy/private-variant-reexport.stderr
+++ b/tests/ui/privacy/private-variant-reexport.stderr
@@ -42,7 +42,13 @@ note: the lint level is defined here
 LL | #[deny(unused_imports)]
    |        ^^^^^^^^^^^^^^
 
-error: aborting due to 4 previous errors
+error: unused import: `::E::*`
+  --> $DIR/private-variant-reexport.rs:15:13
+   |
+LL |     pub use ::E::*;
+   |             ^^^^^^
+
+error: aborting due to 5 previous errors
 
 Some errors have detailed explanations: E0364, E0365.
 For more information about an error, try `rustc --explain E0364`.
diff --git a/tests/ui/privacy/sealed-traits/sealed-trait-local.rs b/tests/ui/privacy/sealed-traits/sealed-trait-local.rs
index 778ddf0f817..9ae01259a78 100644
--- a/tests/ui/privacy/sealed-traits/sealed-trait-local.rs
+++ b/tests/ui/privacy/sealed-traits/sealed-trait-local.rs
@@ -13,7 +13,43 @@ pub mod a {
     }
 }
 
-struct S;
-impl a::Sealed for S {} //~ ERROR the trait bound `S: Hidden` is not satisfied
+pub mod c {
+    pub trait Sealed: self::d::Hidden {
+        fn foo() {}
+    }
+
+    struct X;
+    impl Sealed for X {}
+    impl self::d::Hidden for X {}
+
+    struct Y;
+    impl Sealed for Y {}
+    impl self::d::Hidden for Y {}
+
+    mod d {
+        pub trait Hidden {}
+    }
+}
 
+pub mod e {
+    pub trait Sealed: self::f::Hidden {
+        fn foo() {}
+    }
+
+    struct X;
+    impl self::f::Hidden for X {}
+
+    struct Y;
+    impl self::f::Hidden for Y {}
+    impl<T: self::f::Hidden> Sealed for T {}
+
+    mod f {
+        pub trait Hidden {}
+    }
+}
+
+struct S;
+impl a::Sealed for S {} //~ ERROR the trait bound
+impl c::Sealed for S {} //~ ERROR the trait bound
+impl e::Sealed for S {} //~ ERROR the trait bound
 fn main() {}
diff --git a/tests/ui/privacy/sealed-traits/sealed-trait-local.stderr b/tests/ui/privacy/sealed-traits/sealed-trait-local.stderr
index 5f8076fc84d..a7f77a1c0c0 100644
--- a/tests/ui/privacy/sealed-traits/sealed-trait-local.stderr
+++ b/tests/ui/privacy/sealed-traits/sealed-trait-local.stderr
@@ -1,16 +1,50 @@
-error[E0277]: the trait bound `S: Hidden` is not satisfied
-  --> $DIR/sealed-trait-local.rs:17:20
+error[E0277]: the trait bound `S: b::Hidden` is not satisfied
+  --> $DIR/sealed-trait-local.rs:52:20
    |
 LL | impl a::Sealed for S {}
-   |                    ^ the trait `Hidden` is not implemented for `S`
+   |                    ^ the trait `b::Hidden` is not implemented for `S`
    |
-note: required by a bound in `Sealed`
+note: required by a bound in `a::Sealed`
   --> $DIR/sealed-trait-local.rs:3:23
    |
 LL |     pub trait Sealed: self::b::Hidden {
    |                       ^^^^^^^^^^^^^^^ required by this bound in `Sealed`
    = note: `Sealed` is a "sealed trait", because to implement it you also need to implement `a::b::Hidden`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it
+   = help: the following type implements the trait:
+             a::X
 
-error: aborting due to previous error
+error[E0277]: the trait bound `S: d::Hidden` is not satisfied
+  --> $DIR/sealed-trait-local.rs:53:20
+   |
+LL | impl c::Sealed for S {}
+   |                    ^ the trait `d::Hidden` is not implemented for `S`
+   |
+note: required by a bound in `c::Sealed`
+  --> $DIR/sealed-trait-local.rs:17:23
+   |
+LL |     pub trait Sealed: self::d::Hidden {
+   |                       ^^^^^^^^^^^^^^^ required by this bound in `Sealed`
+   = note: `Sealed` is a "sealed trait", because to implement it you also need to implement `c::d::Hidden`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it
+   = help: the following types implement the trait:
+             c::X
+             c::Y
+
+error[E0277]: the trait bound `S: f::Hidden` is not satisfied
+  --> $DIR/sealed-trait-local.rs:54:20
+   |
+LL | impl e::Sealed for S {}
+   |                    ^ the trait `f::Hidden` is not implemented for `S`
+   |
+note: required by a bound in `e::Sealed`
+  --> $DIR/sealed-trait-local.rs:35:23
+   |
+LL |     pub trait Sealed: self::f::Hidden {
+   |                       ^^^^^^^^^^^^^^^ required by this bound in `Sealed`
+   = note: `Sealed` is a "sealed trait", because to implement it you also need to implement `e::f::Hidden`, which is not accessible; this is usually done to force you to use one of the provided types that already implement it
+   = help: the following types implement the trait:
+             e::X
+             e::Y
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/privacy/suggest-box-new.fixed b/tests/ui/privacy/suggest-box-new.fixed
new file mode 100644
index 00000000000..f5ae5c2abfd
--- /dev/null
+++ b/tests/ui/privacy/suggest-box-new.fixed
@@ -0,0 +1,15 @@
+// run-rustfix
+#![allow(dead_code)]
+struct U <T> {
+    wtf: Option<Box<U<T>>>,
+    x: T,
+}
+fn main() {
+    U {
+        wtf: Some(Box::new(U { //~ ERROR cannot initialize a tuple struct which contains private fields
+            wtf: None,
+            x: (),
+        })),
+        x: ()
+    };
+}
diff --git a/tests/ui/privacy/suggest-box-new.rs b/tests/ui/privacy/suggest-box-new.rs
new file mode 100644
index 00000000000..2e18dba8b9f
--- /dev/null
+++ b/tests/ui/privacy/suggest-box-new.rs
@@ -0,0 +1,15 @@
+// run-rustfix
+#![allow(dead_code)]
+struct U <T> {
+    wtf: Option<Box<U<T>>>,
+    x: T,
+}
+fn main() {
+    U {
+        wtf: Some(Box(U { //~ ERROR cannot initialize a tuple struct which contains private fields
+            wtf: None,
+            x: (),
+        })),
+        x: ()
+    };
+}
diff --git a/tests/ui/privacy/suggest-box-new.stderr b/tests/ui/privacy/suggest-box-new.stderr
new file mode 100644
index 00000000000..ed7fa036408
--- /dev/null
+++ b/tests/ui/privacy/suggest-box-new.stderr
@@ -0,0 +1,20 @@
+error[E0423]: cannot initialize a tuple struct which contains private fields
+  --> $DIR/suggest-box-new.rs:9:19
+   |
+LL |         wtf: Some(Box(U {
+   |                   ^^^
+   |
+note: constructor is not visible here due to private fields
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
+   |
+   = note: private field
+   |
+   = note: private field
+help: you might have meant to use the `new` associated function
+   |
+LL |         wtf: Some(Box::new(U {
+   |                      +++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0423`.
diff --git a/tests/ui/proc-macro/bad-projection.rs b/tests/ui/proc-macro/bad-projection.rs
index d214c7ac8b2..c7cffdc9b47 100644
--- a/tests/ui/proc-macro/bad-projection.rs
+++ b/tests/ui/proc-macro/bad-projection.rs
@@ -13,3 +13,5 @@ trait Project {
 #[proc_macro]
 pub fn uwu() -> <() as Project>::Assoc {}
 //~^ ERROR the trait bound `(): Project` is not satisfied
+//~| ERROR the trait bound `(): Project` is not satisfied
+//~| ERROR function is expected to take 1 argument, but it takes 0 arguments
diff --git a/tests/ui/proc-macro/bad-projection.stderr b/tests/ui/proc-macro/bad-projection.stderr
index 8716defa17a..aea5d6d7c84 100644
--- a/tests/ui/proc-macro/bad-projection.stderr
+++ b/tests/ui/proc-macro/bad-projection.stderr
@@ -10,6 +10,32 @@ help: this trait has no implementations, consider adding one
 LL | trait Project {
    | ^^^^^^^^^^^^^
 
-error: aborting due to previous error
+error[E0593]: function is expected to take 1 argument, but it takes 0 arguments
+  --> $DIR/bad-projection.rs:14:1
+   |
+LL | pub fn uwu() -> <() as Project>::Assoc {}
+   | --------------------------------------^^^
+   | |
+   | expected function that takes 1 argument
+   | takes 0 arguments
+   | required by a bound introduced by this call
+   |
+note: required by a bound in `ProcMacro::bang`
+  --> $SRC_DIR/proc_macro/src/bridge/client.rs:LL:COL
+
+error[E0277]: the trait bound `(): Project` is not satisfied
+  --> $DIR/bad-projection.rs:14:1
+   |
+LL | pub fn uwu() -> <() as Project>::Assoc {}
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Project` is not implemented for `()`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/bad-projection.rs:9:1
+   |
+LL | trait Project {
+   | ^^^^^^^^^^^^^
+
+error: aborting due to 3 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0277, E0593.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/reachable/reachable-unnameable-type-alias.rs b/tests/ui/reachable/reachable-unnameable-type-alias.rs
index 461355f87cf..ce830d2d4b4 100644
--- a/tests/ui/reachable/reachable-unnameable-type-alias.rs
+++ b/tests/ui/reachable/reachable-unnameable-type-alias.rs
@@ -1,14 +1,14 @@
 // run-pass
 
 #![feature(staged_api)]
-#![stable(feature = "a", since = "b")]
+#![stable(feature = "a", since = "3.3.3")]
 
 mod inner_private_module {
     // UnnameableTypeAlias isn't marked as reachable, so no stability annotation is required here
     pub type UnnameableTypeAlias = u8;
 }
 
-#[stable(feature = "a", since = "b")]
+#[stable(feature = "a", since = "3.3.3")]
 pub fn f() -> inner_private_module::UnnameableTypeAlias {
     0
 }
diff --git a/tests/ui/regions/closure-in-projection-issue-97405.rs b/tests/ui/regions/closure-in-projection-issue-97405.rs
index e567d5c2723..5489533972e 100644
--- a/tests/ui/regions/closure-in-projection-issue-97405.rs
+++ b/tests/ui/regions/closure-in-projection-issue-97405.rs
@@ -1,5 +1,5 @@
 // Regression test for #97405.
-// In `good_generic_fn` the param `T` ends up in the substs of closures/generators,
+// In `good_generic_fn` the param `T` ends up in the substs of closures/coroutines,
 // but we should be able to prove `<Gen<T> as Iterator>::Item: 'static` without
 // requiring `T: 'static`
 
diff --git a/tests/ui/repr/16-bit-repr-c-enum.rs b/tests/ui/repr/16-bit-repr-c-enum.rs
index d4fea2b192b..987fd455fcc 100644
--- a/tests/ui/repr/16-bit-repr-c-enum.rs
+++ b/tests/ui/repr/16-bit-repr-c-enum.rs
@@ -8,7 +8,7 @@
 #![feature(no_core, lang_items, intrinsics, staged_api, rustc_attrs)]
 #![no_core]
 #![crate_type = "lib"]
-#![stable(feature = "", since = "")]
+#![stable(feature = "intrinsics_for_test", since = "3.3.3")]
 #![allow(dead_code)]
 
 // Test that the repr(C) attribute doesn't break compilation
@@ -22,8 +22,8 @@ enum Foo {
 }
 
 extern "rust-intrinsic" {
-    #[stable(feature = "", since = "")]
-    #[rustc_const_stable(feature = "", since = "")]
+    #[stable(feature = "intrinsics_for_test", since = "3.3.3")]
+    #[rustc_const_stable(feature = "intrinsics_for_test", since = "3.3.3")]
     #[rustc_safe_intrinsic]
     fn size_of<T>() -> usize;
 }
diff --git a/tests/ui/repr/explicit-rust-repr-conflicts.rs b/tests/ui/repr/explicit-rust-repr-conflicts.rs
new file mode 100644
index 00000000000..22dd12d316a
--- /dev/null
+++ b/tests/ui/repr/explicit-rust-repr-conflicts.rs
@@ -0,0 +1,23 @@
+#[repr(C, Rust)] //~ ERROR conflicting representation hints
+struct S {
+    a: i32,
+}
+
+
+#[repr(Rust)] //~ ERROR conflicting representation hints
+#[repr(C)]
+struct T {
+    a: i32,
+}
+
+#[repr(Rust, u64)] //~ ERROR conflicting representation hints
+enum U {
+    V,
+}
+
+#[repr(Rust, simd)]
+//~^ ERROR conflicting representation hints
+//~| ERROR SIMD types are experimental and possibly buggy
+struct F32x4(f32, f32, f32, f32);
+
+fn main() {}
diff --git a/tests/ui/repr/explicit-rust-repr-conflicts.stderr b/tests/ui/repr/explicit-rust-repr-conflicts.stderr
new file mode 100644
index 00000000000..7126da574b6
--- /dev/null
+++ b/tests/ui/repr/explicit-rust-repr-conflicts.stderr
@@ -0,0 +1,39 @@
+error[E0658]: SIMD types are experimental and possibly buggy
+  --> $DIR/explicit-rust-repr-conflicts.rs:18:1
+   |
+LL | #[repr(Rust, simd)]
+   | ^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #27731 <https://github.com/rust-lang/rust/issues/27731> for more information
+   = help: add `#![feature(repr_simd)]` to the crate attributes to enable
+
+error[E0566]: conflicting representation hints
+  --> $DIR/explicit-rust-repr-conflicts.rs:1:8
+   |
+LL | #[repr(C, Rust)]
+   |        ^  ^^^^
+
+error[E0566]: conflicting representation hints
+  --> $DIR/explicit-rust-repr-conflicts.rs:7:8
+   |
+LL | #[repr(Rust)]
+   |        ^^^^
+LL | #[repr(C)]
+   |        ^
+
+error[E0566]: conflicting representation hints
+  --> $DIR/explicit-rust-repr-conflicts.rs:13:8
+   |
+LL | #[repr(Rust, u64)]
+   |        ^^^^  ^^^
+
+error[E0566]: conflicting representation hints
+  --> $DIR/explicit-rust-repr-conflicts.rs:18:8
+   |
+LL | #[repr(Rust, simd)]
+   |        ^^^^  ^^^^
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0566, E0658.
+For more information about an error, try `rustc --explain E0566`.
diff --git a/tests/ui/resolve/fn-new-doesnt-exist.rs b/tests/ui/resolve/fn-new-doesnt-exist.rs
new file mode 100644
index 00000000000..4f6290808fc
--- /dev/null
+++ b/tests/ui/resolve/fn-new-doesnt-exist.rs
@@ -0,0 +1,5 @@
+use std::net::TcpStream;
+
+fn main() {
+   let stream = TcpStream::new(); //~ ERROR no function or associated item named `new` found
+}
diff --git a/tests/ui/resolve/fn-new-doesnt-exist.stderr b/tests/ui/resolve/fn-new-doesnt-exist.stderr
new file mode 100644
index 00000000000..39adc0fde44
--- /dev/null
+++ b/tests/ui/resolve/fn-new-doesnt-exist.stderr
@@ -0,0 +1,14 @@
+error[E0599]: no function or associated item named `new` found for struct `TcpStream` in the current scope
+  --> $DIR/fn-new-doesnt-exist.rs:4:28
+   |
+LL |    let stream = TcpStream::new();
+   |                            ^^^ function or associated item not found in `TcpStream`
+   |
+note: if you're trying to build a new `TcpStream` consider using one of the following associated functions:
+      TcpStream::connect
+      TcpStream::connect_timeout
+  --> $SRC_DIR/std/src/net/tcp.rs:LL:COL
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0599`.
diff --git a/tests/ui/resolve/issue-55673.fixed b/tests/ui/resolve/issue-55673.fixed
new file mode 100644
index 00000000000..261742a26cb
--- /dev/null
+++ b/tests/ui/resolve/issue-55673.fixed
@@ -0,0 +1,21 @@
+// run-rustfix
+#![allow(dead_code)]
+trait Foo {
+    type Bar;
+}
+
+fn foo<T: Foo>()
+where
+    T::Bar: std::fmt::Debug,
+    //~^ ERROR associated type `Baa` not found for `T`
+{
+}
+
+fn bar<T>()
+where
+    T::Bar: std::fmt::Debug, T: Foo
+    //~^ ERROR associated type `Baa` not found for `T`
+{
+}
+
+fn main() {}
diff --git a/tests/ui/resolve/issue-55673.rs b/tests/ui/resolve/issue-55673.rs
index 0436bd39742..6ac49be141c 100644
--- a/tests/ui/resolve/issue-55673.rs
+++ b/tests/ui/resolve/issue-55673.rs
@@ -1,3 +1,5 @@
+// run-rustfix
+#![allow(dead_code)]
 trait Foo {
     type Bar;
 }
@@ -9,4 +11,11 @@ where
 {
 }
 
+fn bar<T>()
+where
+    T::Baa: std::fmt::Debug,
+    //~^ ERROR associated type `Baa` not found for `T`
+{
+}
+
 fn main() {}
diff --git a/tests/ui/resolve/issue-55673.stderr b/tests/ui/resolve/issue-55673.stderr
index 39318f95905..ffc3252230a 100644
--- a/tests/ui/resolve/issue-55673.stderr
+++ b/tests/ui/resolve/issue-55673.stderr
@@ -1,9 +1,29 @@
 error[E0220]: associated type `Baa` not found for `T`
-  --> $DIR/issue-55673.rs:7:8
+  --> $DIR/issue-55673.rs:9:8
    |
 LL |     T::Baa: std::fmt::Debug,
    |        ^^^ there is a similarly named associated type `Bar` in the trait `Foo`
+   |
+help: change the associated type name to use `Bar` from `Foo`
+   |
+LL |     T::Bar: std::fmt::Debug,
+   |        ~~~
+
+error[E0220]: associated type `Baa` not found for `T`
+  --> $DIR/issue-55673.rs:16:8
+   |
+LL |     T::Baa: std::fmt::Debug,
+   |        ^^^ there is a similarly named associated type `Bar` in the trait `Foo`
+   |
+help: consider further restricting type parameter `T`
+   |
+LL |     T::Baa: std::fmt::Debug, T: Foo
+   |                            ~~~~~~~~
+help: and also change the associated type name
+   |
+LL |     T::Bar: std::fmt::Debug,
+   |        ~~~
 
-error: aborting due to previous error
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0220`.
diff --git a/tests/ui/resolve/issue-82865.stderr b/tests/ui/resolve/issue-82865.stderr
index 730fd6d6026..9d0439d9d87 100644
--- a/tests/ui/resolve/issue-82865.stderr
+++ b/tests/ui/resolve/issue-82865.stderr
@@ -15,6 +15,13 @@ LL |     Box::z
 LL |     mac!();
    |     ------ in this macro invocation
    |
+note: if you're trying to build a new `Box<_, _>` consider using one of the following associated functions:
+      Box::<T>::new
+      Box::<T>::new_uninit
+      Box::<T>::new_zeroed
+      Box::<T>::try_new
+      and 18 others
+  --> $SRC_DIR/alloc/src/boxed.rs:LL:COL
    = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/return/return-impl-trait-bad.stderr b/tests/ui/return/return-impl-trait-bad.stderr
index 237b85ee66a..a015b9f53af 100644
--- a/tests/ui/return/return-impl-trait-bad.stderr
+++ b/tests/ui/return/return-impl-trait-bad.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn bad_echo<T>(_t: T) -> T {
    |             -            - expected `T` because of return type
    |             |
-   |             this type parameter
+   |             expected this type parameter
 LL |     "this should not suggest impl Trait"
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter `T`, found `&str`
    |
@@ -17,7 +17,7 @@ error[E0308]: mismatched types
 LL | fn bad_echo_2<T: Trait>(_t: T) -> T {
    |               -                   - expected `T` because of return type
    |               |
-   |               this type parameter
+   |               expected this type parameter
 LL |     "this will not suggest it, because that would probably be wrong"
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter `T`, found `&str`
    |
@@ -30,7 +30,7 @@ error[E0308]: mismatched types
 LL | fn other_bounds_bad<T>() -> T
    |                     -       - expected `T` because of return type
    |                     |
-   |                     this type parameter
+   |                     expected this type parameter
 ...
 LL |     "don't suggest this, because Option<T> places additional constraints"
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter `T`, found `&str`
@@ -46,7 +46,7 @@ LL | fn used_in_trait<T>() -> T
    |                  |       |
    |                  |       expected `T` because of return type
    |                  |       help: consider using an impl return type: `impl Send`
-   |                  this type parameter
+   |                  expected this type parameter
 ...
 LL |     "don't suggest this, because the generic param is used in the bound."
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected type parameter `T`, found `&str`
diff --git a/tests/ui/return/return-impl-trait.stderr b/tests/ui/return/return-impl-trait.stderr
index 43d40972fca..707f014a16f 100644
--- a/tests/ui/return/return-impl-trait.stderr
+++ b/tests/ui/return/return-impl-trait.stderr
@@ -5,7 +5,7 @@ LL | fn bar<T: Trait + std::marker::Sync>() -> T
    |        -                                  -
    |        |                                  |
    |        |                                  expected `T` because of return type
-   |        this type parameter                help: consider using an impl return type: `impl Trait + std::marker::Sync + Send`
+   |        expected this type parameter       help: consider using an impl return type: `impl Trait + std::marker::Sync + Send`
 ...
 LL |     ()
    |     ^^ expected type parameter `T`, found `()`
@@ -21,7 +21,7 @@ LL | fn other_bounds<T>() -> T
    |                 |       |
    |                 |       expected `T` because of return type
    |                 |       help: consider using an impl return type: `impl Trait`
-   |                 this type parameter
+   |                 expected this type parameter
 ...
 LL |     ()
    |     ^^ expected type parameter `T`, found `()`
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate_empty_match.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate_empty_match.stderr
index de1bf8be885..7386f10a6fb 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate_empty_match.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/enum_same_crate_empty_match.stderr
@@ -17,18 +17,18 @@ LL |     match NonExhaustiveEnum::Unit {}
    |           ^^^^^^^^^^^^^^^^^^^^^^^ patterns `NonExhaustiveEnum::Unit`, `NonExhaustiveEnum::Tuple(_)` and `NonExhaustiveEnum::Struct { .. }` not covered
    |
 note: `NonExhaustiveEnum` defined here
-  --> $DIR/enum_same_crate_empty_match.rs:5:5
+  --> $DIR/enum_same_crate_empty_match.rs:4:10
    |
 LL | pub enum NonExhaustiveEnum {
-   |          -----------------
+   |          ^^^^^^^^^^^^^^^^^
 LL |     Unit,
-   |     ^^^^ not covered
+   |     ---- not covered
 LL |
 LL |     Tuple(u32),
-   |     ^^^^^ not covered
+   |     ----- not covered
 LL |
 LL |     Struct { field: u32 }
-   |     ^^^^^^ not covered
+   |     ------ not covered
    = note: the matched value is of type `NonExhaustiveEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
@@ -44,18 +44,18 @@ LL |     match NormalEnum::Unit {}
    |           ^^^^^^^^^^^^^^^^ patterns `NormalEnum::Unit`, `NormalEnum::Tuple(_)` and `NormalEnum::Struct { .. }` not covered
    |
 note: `NormalEnum` defined here
-  --> $DIR/enum_same_crate_empty_match.rs:14:5
+  --> $DIR/enum_same_crate_empty_match.rs:13:10
    |
 LL | pub enum NormalEnum {
-   |          ----------
+   |          ^^^^^^^^^^
 LL |     Unit,
-   |     ^^^^ not covered
+   |     ---- not covered
 LL |
 LL |     Tuple(u32),
-   |     ^^^^^ not covered
+   |     ----- not covered
 LL |
 LL |     Struct { field: u32 }
-   |     ^^^^^^ not covered
+   |     ------ not covered
    = note: the matched value is of type `NormalEnum`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.lint.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.lint.stderr
new file mode 100644
index 00000000000..9192c66143c
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.lint.stderr
@@ -0,0 +1,75 @@
+error: some variants are not matched explicitly
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:15:11
+   |
+LL |     match val {
+   |           ^^^ pattern `NonExhaustiveEnum::Struct { .. }` not covered
+   |
+   = help: ensure that all variants are matched explicitly by adding the suggested match arms
+   = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
+note: the lint level is defined here
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:14:12
+   |
+LL |     #[deny(non_exhaustive_omitted_patterns)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: some variants are not matched explicitly
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:23:11
+   |
+LL |     match val {
+   |           ^^^ pattern `NonExhaustiveEnum::Struct { .. }` not covered
+   |
+   = help: ensure that all variants are matched explicitly by adding the suggested match arms
+   = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
+note: the lint level is defined here
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:22:27
+   |
+LL |     #[cfg_attr(lint, deny(non_exhaustive_omitted_patterns))]
+   |                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the lint level must be set on the whole match
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:34:9
+   |
+LL |         #[deny(non_exhaustive_omitted_patterns)]
+   |                ------------------------------- remove this attribute
+LL |         _ => {}
+   |         ^
+   |
+   = help: it no longer has any effect to set the lint level on an individual match arm
+help: set the lint level on the whole match
+   |
+LL +     #[deny(non_exhaustive_omitted_patterns)]
+LL |     match val {
+   |
+
+warning: the lint level must be set on the whole match
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:42:9
+   |
+LL |         #[cfg_attr(lint, deny(non_exhaustive_omitted_patterns))]
+   |                               ------------------------------- remove this attribute
+LL |         _ => {}
+   |         ^
+   |
+   = help: it no longer has any effect to set the lint level on an individual match arm
+help: set the lint level on the whole match
+   |
+LL +     #[deny(non_exhaustive_omitted_patterns)]
+LL |     match val {
+   |
+
+warning: the lint level must be set on the whole match
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:50:9
+   |
+LL |         #[cfg_attr(lint, warn(non_exhaustive_omitted_patterns))]
+   |                               ------------------------------- remove this attribute
+LL |         _ => {}
+   |         ^
+   |
+   = help: it no longer has any effect to set the lint level on an individual match arm
+help: set the lint level on the whole match
+   |
+LL +     #[warn(non_exhaustive_omitted_patterns)]
+LL |     match val {
+   |
+
+error: aborting due to 2 previous errors; 3 warnings emitted
+
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr
new file mode 100644
index 00000000000..46093eb9fb3
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.normal.stderr
@@ -0,0 +1,31 @@
+error: some variants are not matched explicitly
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:15:11
+   |
+LL |     match val {
+   |           ^^^ pattern `NonExhaustiveEnum::Struct { .. }` not covered
+   |
+   = help: ensure that all variants are matched explicitly by adding the suggested match arms
+   = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
+note: the lint level is defined here
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:14:12
+   |
+LL |     #[deny(non_exhaustive_omitted_patterns)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+warning: the lint level must be set on the whole match
+  --> $DIR/omitted-patterns-dont-lint-on-arm.rs:34:9
+   |
+LL |         #[deny(non_exhaustive_omitted_patterns)]
+   |                ------------------------------- remove this attribute
+LL |         _ => {}
+   |         ^
+   |
+   = help: it no longer has any effect to set the lint level on an individual match arm
+help: set the lint level on the whole match
+   |
+LL +     #[deny(non_exhaustive_omitted_patterns)]
+LL |     match val {
+   |
+
+error: aborting due to previous error; 1 warning emitted
+
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs
new file mode 100644
index 00000000000..33f9f56a5bb
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns-dont-lint-on-arm.rs
@@ -0,0 +1,53 @@
+// revisions: normal lint
+// Test that putting the lint level on a match arm emits a warning, as this was previously
+// meaningful and is no longer.
+#![feature(non_exhaustive_omitted_patterns_lint)]
+
+// aux-build:enums.rs
+extern crate enums;
+
+use enums::NonExhaustiveEnum;
+
+fn main() {
+    let val = NonExhaustiveEnum::Unit;
+
+    #[deny(non_exhaustive_omitted_patterns)]
+    match val {
+        //~^ ERROR some variants are not matched explicitly
+        NonExhaustiveEnum::Unit => {}
+        NonExhaustiveEnum::Tuple(_) => {}
+        _ => {}
+    }
+
+    #[cfg_attr(lint, deny(non_exhaustive_omitted_patterns))]
+    match val {
+        //[lint]~^ ERROR some variants are not matched explicitly
+        NonExhaustiveEnum::Unit => {}
+        NonExhaustiveEnum::Tuple(_) => {}
+        _ => {}
+    }
+
+    match val {
+        NonExhaustiveEnum::Unit => {}
+        NonExhaustiveEnum::Tuple(_) => {}
+        #[deny(non_exhaustive_omitted_patterns)]
+        _ => {}
+    }
+    //~^^ WARN lint level must be set on the whole match
+
+    match val {
+        NonExhaustiveEnum::Unit => {}
+        NonExhaustiveEnum::Tuple(_) => {}
+        #[cfg_attr(lint, deny(non_exhaustive_omitted_patterns))]
+        _ => {}
+    }
+    //[lint]~^^ WARN lint level must be set on the whole match
+
+    match val {
+        NonExhaustiveEnum::Unit => {}
+        NonExhaustiveEnum::Tuple(_) => {}
+        #[cfg_attr(lint, warn(non_exhaustive_omitted_patterns))]
+        _ => {}
+    }
+    //[lint]~^^ WARN lint level must be set on the whole match
+}
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs
index 3482af74752..e0a6051a81f 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.rs
@@ -13,8 +13,8 @@ use enums::{
     EmptyNonExhaustiveEnum, NestedNonExhaustive, NonExhaustiveEnum, NonExhaustiveSingleVariant,
     VariantNonExhaustive,
 };
-use unstable::{UnstableEnum, OnlyUnstableEnum, UnstableStruct, OnlyUnstableStruct};
 use structs::{FunctionalRecord, MixedVisFields, NestedStruct, NormalStruct};
+use unstable::{OnlyUnstableEnum, OnlyUnstableStruct, UnstableEnum, UnstableStruct};
 
 #[non_exhaustive]
 #[derive(Default)]
@@ -35,10 +35,10 @@ fn main() {
     let enumeration = Bar::A;
 
     // Ok: this is a crate local non_exhaustive enum
+    #[deny(non_exhaustive_omitted_patterns)]
     match enumeration {
         Bar::A => {}
         Bar::B => {}
-        #[deny(non_exhaustive_omitted_patterns)]
         _ => {}
     }
 
@@ -51,50 +51,87 @@ fn main() {
         _ => {}
     }
 
+    #[deny(non_exhaustive_omitted_patterns)]
     match non_enum {
+        //~^ some variants are not matched explicitly
         NonExhaustiveEnum::Unit => {}
         NonExhaustiveEnum::Tuple(_) => {}
-        #[deny(non_exhaustive_omitted_patterns)]
         _ => {}
     }
-    //~^^ some variants are not matched explicitly
 
+    #[deny(non_exhaustive_omitted_patterns)]
     match non_enum {
+        //~^ some variants are not matched explicitly
         NonExhaustiveEnum::Unit | NonExhaustiveEnum::Struct { .. } => {}
-        #[deny(non_exhaustive_omitted_patterns)]
         _ => {}
     }
-    //~^^ some variants are not matched explicitly
 
     let x = 5;
+    // We ignore the guard.
+    #[deny(non_exhaustive_omitted_patterns)]
     match non_enum {
         NonExhaustiveEnum::Unit if x > 10 => {}
         NonExhaustiveEnum::Tuple(_) => {}
         NonExhaustiveEnum::Struct { .. } => {}
-        #[deny(non_exhaustive_omitted_patterns)]
         _ => {}
     }
-    //~^^ some variants are not matched explicitly
+
+    #[deny(non_exhaustive_omitted_patterns)]
+    match (non_enum, true) {
+        (NonExhaustiveEnum::Unit, true) => {}
+        (NonExhaustiveEnum::Tuple(_), false) => {}
+        (NonExhaustiveEnum::Struct { .. }, false) => {}
+        _ => {}
+    }
+    #[deny(non_exhaustive_omitted_patterns)]
+    match (non_enum, true) {
+        //~^ some variants are not matched explicitly
+        (NonExhaustiveEnum::Unit, true) => {}
+        (NonExhaustiveEnum::Tuple(_), false) => {}
+        _ => {}
+    }
+
+    #[deny(non_exhaustive_omitted_patterns)]
+    match (true, non_enum) {
+        (true, NonExhaustiveEnum::Unit) => {}
+        (false, NonExhaustiveEnum::Tuple(_)) => {}
+        (false, NonExhaustiveEnum::Struct { .. }) => {}
+        _ => {}
+    }
+    #[deny(non_exhaustive_omitted_patterns)]
+    match (true, non_enum) {
+        //~^ some variants are not matched explicitly
+        (true, NonExhaustiveEnum::Unit) => {}
+        (false, NonExhaustiveEnum::Tuple(_)) => {}
+        _ => {}
+    }
+
+    #[deny(non_exhaustive_omitted_patterns)]
+    match Some(non_enum) {
+        //~^ some variants are not matched explicitly
+        Some(NonExhaustiveEnum::Unit) => {}
+        Some(NonExhaustiveEnum::Tuple(_)) => {}
+        _ => {}
+    }
 
     // Ok: all covered and not `unreachable-patterns`
     #[deny(unreachable_patterns)]
+    #[deny(non_exhaustive_omitted_patterns)]
     match non_enum {
         NonExhaustiveEnum::Unit => {}
         NonExhaustiveEnum::Tuple(_) => {}
         NonExhaustiveEnum::Struct { .. } => {}
-        #[deny(non_exhaustive_omitted_patterns)]
         _ => {}
     }
 
     #[deny(non_exhaustive_omitted_patterns)]
     match NestedNonExhaustive::B {
+        //~^ some variants are not matched explicitly
         NestedNonExhaustive::A(NonExhaustiveEnum::Unit) => {}
         NestedNonExhaustive::A(_) => {}
         NestedNonExhaustive::B => {}
         _ => {}
     }
-    //~^^ some variants are not matched explicitly
-    //~^^^^^ some variants are not matched explicitly
 
     #[warn(non_exhaustive_omitted_patterns)]
     match VariantNonExhaustive::Baz(1, 2) {
@@ -120,30 +157,36 @@ fn main() {
     #[warn(non_exhaustive_omitted_patterns)]
     let MixedVisFields { a, b, .. } = MixedVisFields::default();
 
-    // Ok: because this only has 1 variant
+    // Ok: this only has 1 variant
     #[deny(non_exhaustive_omitted_patterns)]
     match NonExhaustiveSingleVariant::A(true) {
         NonExhaustiveSingleVariant::A(true) => {}
         _ => {}
     }
 
+    // We can't catch the case below, so for consistency we don't catch this one either.
     #[deny(non_exhaustive_omitted_patterns)]
     match NonExhaustiveSingleVariant::A(true) {
         _ => {}
     }
-    //~^^ some variants are not matched explicitly
+    // We can't catch this case, because this would require digging fully through all the values of
+    // any type we encounter. We need to be able to only consider present constructors.
+    #[deny(non_exhaustive_omitted_patterns)]
+    match &NonExhaustiveSingleVariant::A(true) {
+        _ => {}
+    }
 
     // Ok: we don't lint on `if let` expressions
     #[deny(non_exhaustive_omitted_patterns)]
     if let NonExhaustiveEnum::Tuple(_) = non_enum {}
 
+    #[deny(non_exhaustive_omitted_patterns)]
     match UnstableEnum::Stable {
+        //~^ some variants are not matched explicitly
         UnstableEnum::Stable => {}
         UnstableEnum::Stable2 => {}
-        #[deny(non_exhaustive_omitted_patterns)]
         _ => {}
     }
-    //~^^ some variants are not matched explicitly
 
     // Ok: the feature is on and all variants are matched
     #[deny(non_exhaustive_omitted_patterns)]
@@ -164,10 +207,10 @@ fn main() {
 
     #[deny(non_exhaustive_omitted_patterns)]
     match OnlyUnstableEnum::Unstable {
+        //~^ some variants are not matched explicitly
         OnlyUnstableEnum::Unstable => {}
         _ => {}
     }
-    //~^^ some variants are not matched explicitly
 
     #[warn(non_exhaustive_omitted_patterns)]
     let OnlyUnstableStruct { unstable, .. } = OnlyUnstableStruct::new();
@@ -194,14 +237,13 @@ fn main() {
     let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit;
     //~^ refutable pattern in local binding
 
-    // Check that matching on a reference results in a correctly spanned diagnostic
     #[deny(non_exhaustive_omitted_patterns)]
     match &non_enum {
+        //~^ some variants are not matched explicitly
         NonExhaustiveEnum::Unit => {}
         NonExhaustiveEnum::Tuple(_) => {}
         _ => {}
     }
-    //~^^ some variants are not matched explicitly
 }
 
 #[deny(non_exhaustive_omitted_patterns)]
@@ -209,3 +251,10 @@ fn main() {
 pub fn takes_non_exhaustive(_: NonExhaustiveEnum) {
     let _closure = |_: NonExhaustiveEnum| {};
 }
+
+// ICE #117033
+enum Void {}
+#[deny(non_exhaustive_omitted_patterns)]
+pub fn void(v: Void) -> ! {
+    match v {}
+}
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.stderr
index 923394474b2..7db61f1241e 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/omitted-patterns.stderr
@@ -1,5 +1,5 @@
 warning: some fields are not explicitly listed
-  --> $DIR/omitted-patterns.rs:102:9
+  --> $DIR/omitted-patterns.rs:139:9
    |
 LL |         VariantNonExhaustive::Bar { x, .. } => {}
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `y` not listed
@@ -7,13 +7,13 @@ LL |         VariantNonExhaustive::Bar { x, .. } => {}
    = help: ensure that all fields are mentioned explicitly by adding the suggested fields
    = note: the pattern is of type `VariantNonExhaustive` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:99:12
+  --> $DIR/omitted-patterns.rs:136:12
    |
 LL |     #[warn(non_exhaustive_omitted_patterns)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: some fields are not explicitly listed
-  --> $DIR/omitted-patterns.rs:107:9
+  --> $DIR/omitted-patterns.rs:144:9
    |
 LL |     let FunctionalRecord { first_field, second_field, .. } = FunctionalRecord::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `third_field` not listed
@@ -21,13 +21,13 @@ LL |     let FunctionalRecord { first_field, second_field, .. } = FunctionalReco
    = help: ensure that all fields are mentioned explicitly by adding the suggested fields
    = note: the pattern is of type `FunctionalRecord` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:106:12
+  --> $DIR/omitted-patterns.rs:143:12
    |
 LL |     #[warn(non_exhaustive_omitted_patterns)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: some fields are not explicitly listed
-  --> $DIR/omitted-patterns.rs:115:29
+  --> $DIR/omitted-patterns.rs:152:29
    |
 LL |     let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = NestedStruct::default();
    |                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `second_field` not listed
@@ -35,13 +35,13 @@ LL |     let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = Nested
    = help: ensure that all fields are mentioned explicitly by adding the suggested fields
    = note: the pattern is of type `NormalStruct` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:114:12
+  --> $DIR/omitted-patterns.rs:151:12
    |
 LL |     #[warn(non_exhaustive_omitted_patterns)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: some fields are not explicitly listed
-  --> $DIR/omitted-patterns.rs:115:9
+  --> $DIR/omitted-patterns.rs:152:9
    |
 LL |     let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = NestedStruct::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `foo` not listed
@@ -50,7 +50,7 @@ LL |     let NestedStruct { bar: NormalStruct { first_field, .. }, .. } = Nested
    = note: the pattern is of type `NestedStruct` and the `non_exhaustive_omitted_patterns` attribute was found
 
 warning: some fields are not explicitly listed
-  --> $DIR/omitted-patterns.rs:173:9
+  --> $DIR/omitted-patterns.rs:216:9
    |
 LL |     let OnlyUnstableStruct { unstable, .. } = OnlyUnstableStruct::new();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable2` not listed
@@ -58,13 +58,13 @@ LL |     let OnlyUnstableStruct { unstable, .. } = OnlyUnstableStruct::new();
    = help: ensure that all fields are mentioned explicitly by adding the suggested fields
    = note: the pattern is of type `OnlyUnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:172:12
+  --> $DIR/omitted-patterns.rs:215:12
    |
 LL |     #[warn(non_exhaustive_omitted_patterns)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 warning: some fields are not explicitly listed
-  --> $DIR/omitted-patterns.rs:181:9
+  --> $DIR/omitted-patterns.rs:224:9
    |
 LL |     let UnstableStruct { stable, stable2, .. } = UnstableStruct::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field `unstable` not listed
@@ -72,120 +72,125 @@ LL |     let UnstableStruct { stable, stable2, .. } = UnstableStruct::default();
    = help: ensure that all fields are mentioned explicitly by adding the suggested fields
    = note: the pattern is of type `UnstableStruct` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:180:12
+  --> $DIR/omitted-patterns.rs:223:12
    |
 LL |     #[warn(non_exhaustive_omitted_patterns)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: some variants are not matched explicitly
-  --> $DIR/omitted-patterns.rs:58:9
+  --> $DIR/omitted-patterns.rs:55:11
    |
-LL |         _ => {}
-   |         ^ pattern `NonExhaustiveEnum::Struct { .. }` not covered
+LL |     match non_enum {
+   |           ^^^^^^^^ pattern `NonExhaustiveEnum::Struct { .. }` not covered
    |
    = help: ensure that all variants are matched explicitly by adding the suggested match arms
    = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:57:16
+  --> $DIR/omitted-patterns.rs:54:12
    |
-LL |         #[deny(non_exhaustive_omitted_patterns)]
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     #[deny(non_exhaustive_omitted_patterns)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: some variants are not matched explicitly
-  --> $DIR/omitted-patterns.rs:65:9
+  --> $DIR/omitted-patterns.rs:63:11
    |
-LL |         _ => {}
-   |         ^ pattern `NonExhaustiveEnum::Tuple(_)` not covered
+LL |     match non_enum {
+   |           ^^^^^^^^ pattern `NonExhaustiveEnum::Tuple(_)` not covered
    |
    = help: ensure that all variants are matched explicitly by adding the suggested match arms
    = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:64:16
+  --> $DIR/omitted-patterns.rs:62:12
    |
-LL |         #[deny(non_exhaustive_omitted_patterns)]
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     #[deny(non_exhaustive_omitted_patterns)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: some variants are not matched explicitly
-  --> $DIR/omitted-patterns.rs:75:9
+  --> $DIR/omitted-patterns.rs:87:11
    |
-LL |         _ => {}
-   |         ^ pattern `NonExhaustiveEnum::Unit` not covered
+LL |     match (non_enum, true) {
+   |           ^^^^^^^^^^^^^^^^ pattern `(NonExhaustiveEnum::Struct { .. }, _)` not covered
    |
    = help: ensure that all variants are matched explicitly by adding the suggested match arms
-   = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
+   = note: the matched value is of type `(NonExhaustiveEnum, bool)` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:74:16
+  --> $DIR/omitted-patterns.rs:86:12
    |
-LL |         #[deny(non_exhaustive_omitted_patterns)]
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     #[deny(non_exhaustive_omitted_patterns)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: some variants are not matched explicitly
-  --> $DIR/omitted-patterns.rs:92:32
+  --> $DIR/omitted-patterns.rs:102:11
    |
-LL |         NestedNonExhaustive::A(_) => {}
-   |                                ^ patterns `NonExhaustiveEnum::Tuple(_)` and `NonExhaustiveEnum::Struct { .. }` not covered
+LL |     match (true, non_enum) {
+   |           ^^^^^^^^^^^^^^^^ pattern `(_, NonExhaustiveEnum::Struct { .. })` not covered
    |
    = help: ensure that all variants are matched explicitly by adding the suggested match arms
-   = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
+   = note: the matched value is of type `(bool, NonExhaustiveEnum)` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:89:12
+  --> $DIR/omitted-patterns.rs:101:12
    |
 LL |     #[deny(non_exhaustive_omitted_patterns)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: some variants are not matched explicitly
-  --> $DIR/omitted-patterns.rs:94:9
+  --> $DIR/omitted-patterns.rs:110:11
    |
-LL |         _ => {}
-   |         ^ pattern `NestedNonExhaustive::C` not covered
+LL |     match Some(non_enum) {
+   |           ^^^^^^^^^^^^^^ pattern `Some(NonExhaustiveEnum::Struct { .. })` not covered
    |
    = help: ensure that all variants are matched explicitly by adding the suggested match arms
-   = note: the matched value is of type `NestedNonExhaustive` and the `non_exhaustive_omitted_patterns` attribute was found
+   = note: the matched value is of type `Option<NonExhaustiveEnum>` and the `non_exhaustive_omitted_patterns` attribute was found
+note: the lint level is defined here
+  --> $DIR/omitted-patterns.rs:109:12
+   |
+LL |     #[deny(non_exhaustive_omitted_patterns)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: some variants are not matched explicitly
-  --> $DIR/omitted-patterns.rs:132:9
+  --> $DIR/omitted-patterns.rs:128:11
    |
-LL |         _ => {}
-   |         ^ pattern `NonExhaustiveSingleVariant::A(_)` not covered
+LL |     match NestedNonExhaustive::B {
+   |           ^^^^^^^^^^^^^^^^^^^^^^ patterns `NestedNonExhaustive::C`, `NestedNonExhaustive::A(NonExhaustiveEnum::Tuple(_))` and `NestedNonExhaustive::A(NonExhaustiveEnum::Struct { .. })` not covered
    |
    = help: ensure that all variants are matched explicitly by adding the suggested match arms
-   = note: the matched value is of type `NonExhaustiveSingleVariant` and the `non_exhaustive_omitted_patterns` attribute was found
+   = note: the matched value is of type `NestedNonExhaustive` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:130:12
+  --> $DIR/omitted-patterns.rs:127:12
    |
 LL |     #[deny(non_exhaustive_omitted_patterns)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: some variants are not matched explicitly
-  --> $DIR/omitted-patterns.rs:144:9
+  --> $DIR/omitted-patterns.rs:184:11
    |
-LL |         _ => {}
-   |         ^ pattern `UnstableEnum::Unstable` not covered
+LL |     match UnstableEnum::Stable {
+   |           ^^^^^^^^^^^^^^^^^^^^ pattern `UnstableEnum::Unstable` not covered
    |
    = help: ensure that all variants are matched explicitly by adding the suggested match arms
    = note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:143:16
+  --> $DIR/omitted-patterns.rs:183:12
    |
-LL |         #[deny(non_exhaustive_omitted_patterns)]
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     #[deny(non_exhaustive_omitted_patterns)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: some variants are not matched explicitly
-  --> $DIR/omitted-patterns.rs:168:9
+  --> $DIR/omitted-patterns.rs:209:11
    |
-LL |         _ => {}
-   |         ^ pattern `OnlyUnstableEnum::Unstable2` not covered
+LL |     match OnlyUnstableEnum::Unstable {
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `OnlyUnstableEnum::Unstable2` not covered
    |
    = help: ensure that all variants are matched explicitly by adding the suggested match arms
    = note: the matched value is of type `OnlyUnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:165:12
+  --> $DIR/omitted-patterns.rs:208:12
    |
 LL |     #[deny(non_exhaustive_omitted_patterns)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0005]: refutable pattern in local binding
-  --> $DIR/omitted-patterns.rs:194:9
+  --> $DIR/omitted-patterns.rs:237:9
    |
 LL |     let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit;
    |         ^^^^^^^^^^^^^^^ pattern `_` not covered
@@ -199,15 +204,15 @@ LL |     let local_refutable @ NonExhaustiveEnum::Unit = NonExhaustiveEnum::Unit
    |                                                                             ++++++++++++++++
 
 error: some variants are not matched explicitly
-  --> $DIR/omitted-patterns.rs:202:9
+  --> $DIR/omitted-patterns.rs:241:11
    |
-LL |         _ => {}
-   |         ^ pattern `NonExhaustiveEnum::Struct { .. }` not covered
+LL |     match &non_enum {
+   |           ^^^^^^^^^ pattern `&NonExhaustiveEnum::Struct { .. }` not covered
    |
    = help: ensure that all variants are matched explicitly by adding the suggested match arms
-   = note: the matched value is of type `NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
+   = note: the matched value is of type `&NonExhaustiveEnum` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/omitted-patterns.rs:198:12
+  --> $DIR/omitted-patterns.rs:240:12
    |
 LL |     #[deny(non_exhaustive_omitted_patterns)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs b/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs
index 82ee68687ed..1828fdef901 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.rs
@@ -6,23 +6,23 @@
 // aux-build:unstable.rs
 extern crate unstable;
 
-use unstable::{UnstableEnum, OnlyUnstableEnum, UnstableStruct, OnlyUnstableStruct};
+use unstable::{OnlyUnstableEnum, OnlyUnstableStruct, UnstableEnum, UnstableStruct};
 
 fn main() {
     // OK: this matches all the stable variants
+    #[deny(non_exhaustive_omitted_patterns)]
     match UnstableEnum::Stable {
         UnstableEnum::Stable => {}
         UnstableEnum::Stable2 => {}
-        #[deny(non_exhaustive_omitted_patterns)]
         _ => {}
     }
 
+    #[deny(non_exhaustive_omitted_patterns)]
     match UnstableEnum::Stable {
+        //~^ some variants are not matched explicitly
         UnstableEnum::Stable => {}
-        #[deny(non_exhaustive_omitted_patterns)]
         _ => {}
     }
-    //~^^ some variants are not matched explicitly
 
     // Ok: although this is a bit odd, we don't have anything to report
     // since there is no stable variants and the feature is off
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr
index f38368590fb..27939176f75 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/stable-omitted-patterns.stderr
@@ -13,18 +13,18 @@ LL |     #[warn(non_exhaustive_omitted_patterns)]
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: some variants are not matched explicitly
-  --> $DIR/stable-omitted-patterns.rs:23:9
+  --> $DIR/stable-omitted-patterns.rs:21:11
    |
-LL |         _ => {}
-   |         ^ pattern `UnstableEnum::Stable2` not covered
+LL |     match UnstableEnum::Stable {
+   |           ^^^^^^^^^^^^^^^^^^^^ pattern `UnstableEnum::Stable2` not covered
    |
    = help: ensure that all variants are matched explicitly by adding the suggested match arms
    = note: the matched value is of type `UnstableEnum` and the `non_exhaustive_omitted_patterns` attribute was found
 note: the lint level is defined here
-  --> $DIR/stable-omitted-patterns.rs:22:16
+  --> $DIR/stable-omitted-patterns.rs:20:12
    |
-LL |         #[deny(non_exhaustive_omitted_patterns)]
-   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     #[deny(non_exhaustive_omitted_patterns)]
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: aborting due to previous error; 1 warning emitted
 
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.stderr
index a9c54af0418..c125756a646 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match.stderr
@@ -62,14 +62,14 @@ LL |     match x {}
    |           ^ patterns `UninhabitedVariants::Tuple(_)` and `UninhabitedVariants::Struct { .. }` not covered
    |
 note: `UninhabitedVariants` defined here
-  --> $DIR/auxiliary/uninhabited.rs:17:23
+  --> $DIR/auxiliary/uninhabited.rs:16:1
    |
 LL | pub enum UninhabitedVariants {
-   | ----------------------------
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 LL |     #[non_exhaustive] Tuple(!),
-   |                       ^^^^^ not covered
+   |                       ----- not covered
 LL |     #[non_exhaustive] Struct { x: ! }
-   |                       ^^^^^^ not covered
+   |                       ------ not covered
    = note: the matched value is of type `UninhabitedVariants`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr
index ec2a2f6f055..7a12aca8520 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_same_crate.stderr
@@ -43,14 +43,14 @@ LL |     match x {}
    |           ^ patterns `UninhabitedVariants::Tuple(_)` and `UninhabitedVariants::Struct { .. }` not covered
    |
 note: `UninhabitedVariants` defined here
-  --> $DIR/match_same_crate.rs:16:23
+  --> $DIR/match_same_crate.rs:15:10
    |
 LL | pub enum UninhabitedVariants {
-   |          -------------------
+   |          ^^^^^^^^^^^^^^^^^^^
 LL |     #[non_exhaustive] Tuple(!),
-   |                       ^^^^^ not covered
+   |                       ----- not covered
 LL |     #[non_exhaustive] Struct { x: ! }
-   |                       ^^^^^^ not covered
+   |                       ------ not covered
    = note: the matched value is of type `UninhabitedVariants`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
diff --git a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr
index b6b777ec56c..19e2546b0da 100644
--- a/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr
+++ b/tests/ui/rfcs/rfc-2008-non-exhaustive/uninhabited/match_with_exhaustive_patterns.stderr
@@ -62,14 +62,14 @@ LL |     match x {}
    |           ^ patterns `UninhabitedVariants::Tuple(_)` and `UninhabitedVariants::Struct { .. }` not covered
    |
 note: `UninhabitedVariants` defined here
-  --> $DIR/auxiliary/uninhabited.rs:17:23
+  --> $DIR/auxiliary/uninhabited.rs:16:1
    |
 LL | pub enum UninhabitedVariants {
-   | ----------------------------
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 LL |     #[non_exhaustive] Tuple(!),
-   |                       ^^^^^ not covered
+   |                       ----- not covered
 LL |     #[non_exhaustive] Struct { x: ! }
-   |                       ^^^^^^ not covered
+   |                       ------ not covered
    = note: the matched value is of type `UninhabitedVariants`
 help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
    |
diff --git a/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs b/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs
index 670c423a7e0..86bcf1f6f8d 100644
--- a/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs
+++ b/tests/ui/rfcs/rfc-2091-track-caller/tracked-closure.rs
@@ -2,10 +2,10 @@
 
 #![feature(stmt_expr_attributes)]
 #![feature(closure_track_caller)]
-#![feature(generator_trait)]
-#![feature(generators)]
+#![feature(coroutine_trait)]
+#![feature(coroutines)]
 
-use std::ops::{Generator, GeneratorState};
+use std::ops::{Coroutine, CoroutineState};
 use std::pin::Pin;
 use std::panic::Location;
 
@@ -93,53 +93,53 @@ fn test_closure() {
 
 
 #[track_caller]
-fn mono_generator<F: Generator<String, Yield = (&'static str, String, Loc), Return = ()>>(
+fn mono_coroutine<F: Coroutine<String, Yield = (&'static str, String, Loc), Return = ()>>(
     val: Pin<&mut F>
 ) -> (&'static str, String, Loc) {
     match val.resume("Mono".to_string()) {
-        GeneratorState::Yielded(val) => val,
+        CoroutineState::Yielded(val) => val,
         _ => unreachable!()
     }
 }
 
 #[track_caller]
-fn dyn_generator(
-    val: Pin<&mut dyn Generator<String, Yield = (&'static str, String, Loc), Return = ()>>
+fn dyn_coroutine(
+    val: Pin<&mut dyn Coroutine<String, Yield = (&'static str, String, Loc), Return = ()>>
 ) -> (&'static str, String, Loc) {
     match val.resume("Dyn".to_string()) {
-        GeneratorState::Yielded(val) => val,
+        CoroutineState::Yielded(val) => val,
         _ => unreachable!()
     }
 }
 
-fn test_generator() {
-    let generator = #[track_caller] |arg: String| {
+fn test_coroutine() {
+    let coroutine = #[track_caller] |arg: String| {
         yield ("first", arg.clone(), Location::caller());
         yield ("second", arg.clone(), Location::caller());
     };
 
-    let mut pinned = Box::pin(generator);
-    let (dyn_ret, dyn_arg, dyn_loc) = dyn_generator(pinned.as_mut());
+    let mut pinned = Box::pin(coroutine);
+    let (dyn_ret, dyn_arg, dyn_loc) = dyn_coroutine(pinned.as_mut());
     assert_eq!(dyn_ret, "first");
     assert_eq!(dyn_arg, "Dyn".to_string());
-    // The `Generator` trait does not have `#[track_caller]` on `resume`, so
+    // The `Coroutine` trait does not have `#[track_caller]` on `resume`, so
     // this will not match.
     assert_ne!(dyn_loc.file(), file!());
 
 
-    let (mono_ret, mono_arg, mono_loc) = mono_generator(pinned.as_mut());
+    let (mono_ret, mono_arg, mono_loc) = mono_coroutine(pinned.as_mut());
     let mono_line = line!() - 1;
     assert_eq!(mono_ret, "second");
-    // The generator ignores the argument to the second `resume` call
+    // The coroutine ignores the argument to the second `resume` call
     assert_eq!(mono_arg, "Dyn".to_string());
     assert_eq!(mono_loc.file(), file!());
     assert_eq!(mono_loc.line(), mono_line);
     assert_eq!(mono_loc.column(), 42);
 
-    let non_tracked_generator = || { yield Location::caller(); };
-    let non_tracked_line = line!() - 1; // This is the line of the generator, not its caller
-    let non_tracked_loc = match Box::pin(non_tracked_generator).as_mut().resume(()) {
-        GeneratorState::Yielded(val) => val,
+    let non_tracked_coroutine = || { yield Location::caller(); };
+    let non_tracked_line = line!() - 1; // This is the line of the coroutine, not its caller
+    let non_tracked_loc = match Box::pin(non_tracked_coroutine).as_mut().resume(()) {
+        CoroutineState::Yielded(val) => val,
         _ => unreachable!()
     };
     assert_eq!(non_tracked_loc.file(), file!());
@@ -150,5 +150,5 @@ fn test_generator() {
 
 fn main() {
     test_closure();
-    test_generator();
+    test_coroutine();
 }
diff --git a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr
index d27fde58244..087e54244b3 100644
--- a/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr
+++ b/tests/ui/rfcs/rfc-2294-if-let-guard/move-guard-if-let-chain.stderr
@@ -1,5 +1,5 @@
 error[E0382]: use of moved value: `x`
-  --> $DIR/move-guard-if-let-chain.rs:12:27
+  --> $DIR/move-guard-if-let-chain.rs:12:23
    |
 LL |     let x: Box<_> = Box::new(1);
    |         - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait
@@ -7,7 +7,7 @@ LL |     let x: Box<_> = Box::new(1);
 LL |         (1, 2) if let y = x && c => (),
    |                       - value moved here
 LL |         (1, 2) if let z = x => (),
-   |                           ^ value used here after move
+   |                       ^ value used here after move
    |
 help: borrow this binding in the pattern to avoid moving the value
    |
@@ -15,7 +15,7 @@ LL |         (1, 2) if let ref y = x && c => (),
    |                       +++
 
 error[E0382]: use of moved value: `x`
-  --> $DIR/move-guard-if-let-chain.rs:36:27
+  --> $DIR/move-guard-if-let-chain.rs:36:23
    |
 LL |     let x: Box<_> = Box::new(1);
    |         - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait
@@ -23,7 +23,7 @@ LL |     let x: Box<_> = Box::new(1);
 LL |         (1, _) if let y = x && c => (),
    |                       - value moved here
 LL |         (_, 2) if let z = x => (),
-   |                           ^ value used here after move
+   |                       ^ value used here after move
    |
 help: borrow this binding in the pattern to avoid moving the value
    |
@@ -31,15 +31,13 @@ LL |         (1, _) if let ref y = x && c => (),
    |                       +++
 
 error[E0382]: use of moved value: `x`
-  --> $DIR/move-guard-if-let-chain.rs:59:36
+  --> $DIR/move-guard-if-let-chain.rs:59:32
    |
 LL |     let x: Box<_> = Box::new(1);
    |         - move occurs because `x` has type `Box<i32>`, which does not implement the `Copy` trait
 ...
 LL |         (1, _) | (_, 2) if let y = x && c => (),
-   |                                -   ^ value used here after move
-   |                                |
-   |                                value moved here
+   |                                ^ value used here after move
    |
 help: borrow this binding in the pattern to avoid moving the value
    |
diff --git a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr
index e97fdcce1c1..9dc339abc06 100644
--- a/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr
+++ b/tests/ui/rfcs/rfc-2361-dbg-macro/dbg-macro-move-semantics.stderr
@@ -1,13 +1,14 @@
 error[E0382]: use of moved value: `a`
-  --> $DIR/dbg-macro-move-semantics.rs:9:18
+  --> $DIR/dbg-macro-move-semantics.rs:9:13
    |
 LL |     let a = NoCopy(0);
    |         - move occurs because `a` has type `NoCopy`, which does not implement the `Copy` trait
 LL |     let _ = dbg!(a);
    |             ------- value moved here
 LL |     let _ = dbg!(a);
-   |                  ^ value used here after move
+   |             ^^^^^^^ value used here after move
    |
+   = note: this error originates in the macro `dbg` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to previous error
 
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs
index 43bda49624e..1374ad935a3 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.rs
@@ -21,14 +21,14 @@ fn call_once(f: impl FnOnce()) {
 }
 
 fn main() {
-    call(foo); //~ ERROR expected a `Fn<()>` closure, found `fn() {foo}`
-    call_mut(foo); //~ ERROR expected a `FnMut<()>` closure, found `fn() {foo}`
-    call_once(foo); //~ ERROR expected a `FnOnce<()>` closure, found `fn() {foo}`
+    call(foo); //~ ERROR expected a `Fn()` closure, found `fn() {foo}`
+    call_mut(foo); //~ ERROR expected a `FnMut()` closure, found `fn() {foo}`
+    call_once(foo); //~ ERROR expected a `FnOnce()` closure, found `fn() {foo}`
 
     call(foo_unsafe);
-    //~^ ERROR expected a `Fn<()>` closure, found `unsafe fn() {foo_unsafe}`
+    //~^ ERROR expected a `Fn()` closure, found `unsafe fn() {foo_unsafe}`
     call_mut(foo_unsafe);
-    //~^ ERROR expected a `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}`
+    //~^ ERROR expected a `FnMut()` closure, found `unsafe fn() {foo_unsafe}`
     call_once(foo_unsafe);
-    //~^ ERROR expected a `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}`
+    //~^ ERROR expected a `FnOnce()` closure, found `unsafe fn() {foo_unsafe}`
 }
diff --git a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr
index fc7bf22775d..100f2048269 100644
--- a/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr
+++ b/tests/ui/rfcs/rfc-2396-target_feature-11/fn-traits.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<()>` closure, found `fn() {foo}`
+error[E0277]: expected a `Fn()` closure, found `fn() {foo}`
   --> $DIR/fn-traits.rs:24:10
    |
 LL |     call(foo);
-   |     ---- ^^^ expected an `Fn<()>` closure, found `fn() {foo}`
+   |     ---- ^^^ expected an `Fn()` closure, found `fn() {foo}`
    |     |
    |     required by a bound introduced by this call
    |
@@ -15,11 +15,11 @@ note: required by a bound in `call`
 LL | fn call(f: impl Fn()) {
    |                 ^^^^ required by this bound in `call`
 
-error[E0277]: expected a `FnMut<()>` closure, found `fn() {foo}`
+error[E0277]: expected a `FnMut()` closure, found `fn() {foo}`
   --> $DIR/fn-traits.rs:25:14
    |
 LL |     call_mut(foo);
-   |     -------- ^^^ expected an `FnMut<()>` closure, found `fn() {foo}`
+   |     -------- ^^^ expected an `FnMut()` closure, found `fn() {foo}`
    |     |
    |     required by a bound introduced by this call
    |
@@ -32,11 +32,11 @@ note: required by a bound in `call_mut`
 LL | fn call_mut(f: impl FnMut()) {
    |                     ^^^^^^^ required by this bound in `call_mut`
 
-error[E0277]: expected a `FnOnce<()>` closure, found `fn() {foo}`
+error[E0277]: expected a `FnOnce()` closure, found `fn() {foo}`
   --> $DIR/fn-traits.rs:26:15
    |
 LL |     call_once(foo);
-   |     --------- ^^^ expected an `FnOnce<()>` closure, found `fn() {foo}`
+   |     --------- ^^^ expected an `FnOnce()` closure, found `fn() {foo}`
    |     |
    |     required by a bound introduced by this call
    |
@@ -49,7 +49,7 @@ note: required by a bound in `call_once`
 LL | fn call_once(f: impl FnOnce()) {
    |                      ^^^^^^^^ required by this bound in `call_once`
 
-error[E0277]: expected a `Fn<()>` closure, found `unsafe fn() {foo_unsafe}`
+error[E0277]: expected a `Fn()` closure, found `unsafe fn() {foo_unsafe}`
   --> $DIR/fn-traits.rs:28:10
    |
 LL |     call(foo_unsafe);
@@ -58,6 +58,7 @@ LL |     call(foo_unsafe);
    |     required by a bound introduced by this call
    |
    = help: the trait `Fn<()>` is not implemented for fn item `unsafe fn() {foo_unsafe}`
+   = note: unsafe function cannot be called generically without an unsafe block
    = note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`
    = note: `#[target_feature]` functions do not implement the `Fn` traits
 note: required by a bound in `call`
@@ -66,7 +67,7 @@ note: required by a bound in `call`
 LL | fn call(f: impl Fn()) {
    |                 ^^^^ required by this bound in `call`
 
-error[E0277]: expected a `FnMut<()>` closure, found `unsafe fn() {foo_unsafe}`
+error[E0277]: expected a `FnMut()` closure, found `unsafe fn() {foo_unsafe}`
   --> $DIR/fn-traits.rs:30:14
    |
 LL |     call_mut(foo_unsafe);
@@ -75,6 +76,7 @@ LL |     call_mut(foo_unsafe);
    |     required by a bound introduced by this call
    |
    = help: the trait `FnMut<()>` is not implemented for fn item `unsafe fn() {foo_unsafe}`
+   = note: unsafe function cannot be called generically without an unsafe block
    = note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`
    = note: `#[target_feature]` functions do not implement the `Fn` traits
 note: required by a bound in `call_mut`
@@ -83,7 +85,7 @@ note: required by a bound in `call_mut`
 LL | fn call_mut(f: impl FnMut()) {
    |                     ^^^^^^^ required by this bound in `call_mut`
 
-error[E0277]: expected a `FnOnce<()>` closure, found `unsafe fn() {foo_unsafe}`
+error[E0277]: expected a `FnOnce()` closure, found `unsafe fn() {foo_unsafe}`
   --> $DIR/fn-traits.rs:32:15
    |
 LL |     call_once(foo_unsafe);
@@ -92,6 +94,7 @@ LL |     call_once(foo_unsafe);
    |     required by a bound introduced by this call
    |
    = help: the trait `FnOnce<()>` is not implemented for fn item `unsafe fn() {foo_unsafe}`
+   = note: unsafe function cannot be called generically without an unsafe block
    = note: wrap the `unsafe fn() {foo_unsafe}` in a closure with no arguments: `|| { /* code */ }`
    = note: `#[target_feature]` functions do not implement the `Fn` traits
 note: required by a bound in `call_once`
diff --git a/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_forbidden.stderr b/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_forbidden.stderr
index 7639ae9f6a4..8ca6a37c625 100644
--- a/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_forbidden.stderr
+++ b/tests/ui/rfcs/rfc-2457-non-ascii-idents/mod_file_nonascii_forbidden.stderr
@@ -5,6 +5,7 @@ LL | mod řųśť;
    | ^^^^^^^^^
    |
    = help: to create the module `řųśť`, create file "$DIR/řųśť.rs" or "$DIR/řųśť/mod.rs"
+   = note: if there is a `mod řųśť` elsewhere in the crate already, import it with `use crate::...` instead
 
 error[E0754]: trying to load file for module `řųśť` with non-ascii identifier name
   --> $DIR/mod_file_nonascii_forbidden.rs:1:5
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
index ad11c090f12..6d436018bf4 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/assoc-type-const-bound-usage.stderr
@@ -1,14 +1,12 @@
-error[E0277]: the trait bound `T: Foo` is not satisfied
-  --> $DIR/assoc-type-const-bound-usage.rs:12:6
+error[E0308]: mismatched types
+  --> $DIR/assoc-type-const-bound-usage.rs:12:5
    |
 LL |     <T as Foo>::Assoc::foo();
-   |      ^ the trait `Foo` is not implemented for `T`
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^ expected `host`, found `true`
    |
-help: consider further restricting this bound
-   |
-LL | const fn foo<T: ~const Foo + Foo>() {
-   |                            +++++
+   = note: expected constant `host`
+              found constant `true`
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0277`.
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs
index 1b45cd9aab9..13881e042a3 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/default-method-body-is-const-with-staged-api.rs
@@ -7,7 +7,7 @@
 
 #![feature(staged_api)]
 #![feature(const_trait_impl)]
-#![stable(since = "1", feature = "foo")]
+#![stable(feature = "foo", since = "3.3.3")]
 
 #[const_trait]
 trait Tr {
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs
new file mode 100644
index 00000000000..a74c50cc8fa
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/auxiliary/cross-crate.rs
@@ -0,0 +1,12 @@
+#![feature(const_trait_impl, effects)]
+
+pub const fn foo() {}
+
+#[const_trait]
+pub trait Bar {
+    fn bar();
+}
+
+impl Bar for () {
+    fn bar() {}
+}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs
new file mode 100644
index 00000000000..6598d1da0f8
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.rs
@@ -0,0 +1,15 @@
+#![feature(const_closures, const_trait_impl, effects)]
+#![allow(incomplete_features)]
+
+trait Foo {
+    fn foo(&self);
+}
+
+impl Foo for () {
+    fn foo(&self) {}
+}
+
+fn main() {
+    (const || { (()).foo() })();
+    //~^ ERROR: cannot call non-const fn
+}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.stderr
new file mode 100644
index 00000000000..002d586ac64
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/const_closure-const_trait_impl-ice-113381.stderr
@@ -0,0 +1,11 @@
+error[E0015]: cannot call non-const fn `<() as Foo>::foo` in constant functions
+  --> $DIR/const_closure-const_trait_impl-ice-113381.rs:13:22
+   |
+LL |     (const || { (()).foo() })();
+   |                      ^^^^^
+   |
+   = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0015`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs
new file mode 100644
index 00000000000..1954d2942e0
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/ice-113375-index-out-of-bounds-generics.rs
@@ -0,0 +1,18 @@
+// check-pass
+
+// effects ice https://github.com/rust-lang/rust/issues/113375 index out of bounds
+
+#![allow(incomplete_features, unused)]
+#![feature(effects, adt_const_params)]
+
+struct Bar<T>(T);
+
+impl<T> Bar<T> {
+    const fn value() -> usize {
+        42
+    }
+}
+
+struct Foo<const N: [u8; Bar::<u32>::value()]>;
+
+pub fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs
new file mode 100644
index 00000000000..c38b4b3f1a2
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs
@@ -0,0 +1,504 @@
+#![crate_type = "lib"]
+#![feature(no_core, lang_items, unboxed_closures, auto_traits, intrinsics, rustc_attrs)]
+#![feature(fundamental)]
+#![feature(const_trait_impl, effects, const_mut_refs)]
+#![allow(internal_features)]
+#![no_std]
+#![no_core]
+
+// known-bug: #110395
+
+#[lang = "sized"]
+trait Sized {}
+#[lang = "copy"]
+trait Copy {}
+
+#[lang = "add"]
+#[const_trait]
+trait Add<Rhs = Self> {
+    type Output;
+
+    fn add(self, rhs: Rhs) -> Self::Output;
+}
+
+// FIXME we shouldn't need to have to specify `Rhs`.
+impl const Add<i32> for i32 {
+    type Output = i32;
+    fn add(self, rhs: i32) -> i32 {
+        loop {}
+    }
+}
+
+fn foo() {
+    let x = 42_i32 + 43_i32;
+}
+
+const fn bar() {
+    let x = 42_i32 + 43_i32;
+}
+
+
+#[lang = "Try"]
+#[const_trait]
+trait Try: FromResidual {
+    type Output;
+    type Residual;
+
+    #[lang = "from_output"]
+    fn from_output(output: Self::Output) -> Self;
+
+    #[lang = "branch"]
+    fn branch(self) -> ControlFlow<Self::Residual, Self::Output>;
+}
+
+// FIXME
+// #[const_trait]
+trait FromResidual<R = <Self as Try>::Residual> {
+    #[lang = "from_residual"]
+    fn from_residual(residual: R) -> Self;
+}
+
+enum ControlFlow<B, C = ()> {
+    #[lang = "Continue"]
+    Continue(C),
+    #[lang = "Break"]
+    Break(B),
+}
+
+#[const_trait]
+#[lang = "fn"]
+#[rustc_paren_sugar]
+trait Fn<Args: Tuple>: ~const FnMut<Args> {
+    extern "rust-call" fn call(&self, args: Args) -> Self::Output;
+}
+
+#[const_trait]
+#[lang = "fn_mut"]
+#[rustc_paren_sugar]
+trait FnMut<Args: Tuple>: ~const FnOnce<Args> {
+    extern "rust-call" fn call_mut(&mut self, args: Args) -> Self::Output;
+}
+
+#[const_trait]
+#[lang = "fn_once"]
+#[rustc_paren_sugar]
+trait FnOnce<Args: Tuple> {
+    type Output;
+
+    extern "rust-call" fn call_once(self, args: Args) -> Self::Output;
+}
+
+struct ConstFnMutClosure<CapturedData, Function> {
+    data: CapturedData,
+    func: Function,
+}
+
+#[lang = "tuple_trait"]
+pub trait Tuple {}
+
+macro_rules! impl_fn_mut_tuple {
+    ($($var:ident)*) => {
+        impl<'a, $($var,)* ClosureArguments: Tuple, Function, ClosureReturnValue> const
+            FnOnce<ClosureArguments> for ConstFnMutClosure<($(&'a mut $var),*), Function>
+        where
+            Function: ~const Fn(($(&mut $var),*), ClosureArguments) -> ClosureReturnValue,
+            Function: ~const Destruct,
+        {
+            type Output = ClosureReturnValue;
+
+            extern "rust-call" fn call_once(mut self, args: ClosureArguments) -> Self::Output {
+            self.call_mut(args)
+            }
+        }
+        impl<'a, $($var,)* ClosureArguments: Tuple, Function, ClosureReturnValue> const
+            FnMut<ClosureArguments> for ConstFnMutClosure<($(&'a mut $var),*), Function>
+        where
+            Function: ~const Fn(($(&mut $var),*), ClosureArguments)-> ClosureReturnValue,
+            Function: ~const Destruct,
+        {
+            extern "rust-call" fn call_mut(&mut self, args: ClosureArguments) -> Self::Output {
+                #[allow(non_snake_case)]
+                let ($($var),*) = &mut self.data;
+                (self.func)(($($var),*), args)
+            }
+        }
+    };
+}
+//impl_fn_mut_tuple!(A);
+//impl_fn_mut_tuple!(A B);
+//impl_fn_mut_tuple!(A B C);
+//impl_fn_mut_tuple!(A B C D);
+//impl_fn_mut_tuple!(A B C D E);
+
+#[lang = "receiver"]
+trait Receiver {}
+
+impl<T: ?Sized> Receiver for &T {}
+
+impl<T: ?Sized> Receiver for &mut T {}
+
+#[lang = "destruct"]
+#[const_trait]
+trait Destruct {}
+
+#[lang = "freeze"]
+unsafe auto trait Freeze {}
+
+#[lang = "drop"]
+#[const_trait]
+trait Drop {
+    fn drop(&mut self);
+}
+
+/*
+#[const_trait]
+trait Residual<O> {
+    type TryType: ~const Try<Output = O, Residual = Self> + Try<Output = O, Residual = Self>;
+}
+*/
+
+const fn size_of<T>() -> usize {
+    42
+}
+
+impl Copy for u8 {}
+
+impl usize {
+    #[rustc_allow_incoherent_impl]
+    const fn repeat_u8(x: u8) -> usize {
+        usize::from_ne_bytes([x; size_of::<usize>()])
+    }
+    #[rustc_allow_incoherent_impl]
+    const fn from_ne_bytes(bytes: [u8; size_of::<Self>()]) -> Self {
+        loop {}
+    }
+}
+
+#[rustc_do_not_const_check] // hooked by const-eval
+const fn panic_display() {
+    panic_fmt();
+}
+
+fn panic_fmt() {}
+
+#[lang = "index"]
+#[const_trait]
+trait Index<Idx: ?Sized> {
+    type Output: ?Sized;
+
+    fn index(&self, index: Idx) -> &Self::Output;
+}
+
+
+#[const_trait]
+unsafe trait SliceIndex<T: ?Sized> {
+    type Output: ?Sized;
+    fn index(self, slice: &T) -> &Self::Output;
+}
+
+impl<T, I> const Index<I> for [T]
+where
+    I: ~const SliceIndex<[T]>,
+{
+    type Output = I::Output;
+
+    #[inline]
+    fn index(&self, index: I) -> &I::Output {
+        index.index(self)
+    }
+}
+/* FIXME
+impl<T, I, const N: usize> const Index<I> for [T; N]
+where
+    [T]: ~const Index<I>,
+{
+    type Output = <[T] as Index<I>>::Output;
+
+    #[inline]
+    // FIXME: make `Self::Output` act like `<Self as ~const Index<I>>::Output`
+    fn index(&self, index: I) -> &<[T] as Index<I>>::Output {
+        Index::index(self as &[T], index)
+    }
+}
+*/
+
+#[lang = "unsize"]
+trait Unsize<T: ?Sized> {
+}
+
+#[lang = "coerce_unsized"]
+trait CoerceUnsized<T: ?Sized> {
+}
+
+impl<'a, 'b: 'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b T {}
+
+
+#[lang = "deref"]
+// #[const_trait] FIXME
+trait Deref {
+    #[lang = "deref_target"]
+    type Target: ?Sized;
+
+    fn deref(&self) -> &Self::Target;
+}
+
+
+impl<T: ?Sized> /* const */ Deref for &T {
+    type Target = T;
+
+    fn deref(&self) -> &T {
+        *self
+    }
+}
+
+impl<T: ?Sized> /* const */ Deref for &mut T {
+    type Target = T;
+
+    fn deref(&self) -> &T {
+        *self
+    }
+}
+
+enum Option<T> {
+    #[lang = "None"]
+    None,
+    #[lang = "Some"]
+    Some(T),
+}
+
+impl<T> Option<T> {
+    const fn as_ref(&self) -> Option<&T> {
+        match *self {
+            Some(ref x) => Some(x),
+            None => None,
+        }
+    }
+
+    const fn as_mut(&mut self) -> Option<&mut T> {
+        match *self {
+            Some(ref mut x) => Some(x),
+            None => None,
+        }
+    }
+}
+
+use Option::*;
+
+/*
+const fn as_deref<T>(opt: &Option<T>) -> Option<&T::Target>
+where
+    T: ~const Deref,
+{
+    match opt {
+        Option::Some(t) => Option::Some(t.deref()),
+        Option::None => Option::None,
+    }
+}
+*/
+
+#[const_trait]
+trait Into<T>: Sized {
+    fn into(self) -> T;
+}
+
+#[const_trait]
+trait From<T>: Sized {
+    fn from(value: T) -> Self;
+}
+
+impl<T, U> const Into<U> for T
+where
+    U: ~const From<T>,
+{
+    fn into(self) -> U {
+        U::from(self)
+    }
+}
+
+impl<T> const From<T> for T {
+    fn from(t: T) -> T {
+        t
+    }
+}
+
+enum Result<T, E> {
+    Ok(T),
+    Err(E),
+}
+use Result::*;
+
+fn from_str(s: &str) -> Result<bool, ()> {
+    match s {
+        "true" => Ok(true),
+        "false" => Ok(false),
+        _ => Err(()),
+    }
+}
+
+#[lang = "eq"]
+#[const_trait]
+trait PartialEq<Rhs: ?Sized = Self> {
+    fn eq(&self, other: &Rhs) -> bool;
+    fn ne(&self, other: &Rhs) -> bool {
+        !self.eq(other)
+    }
+}
+
+// FIXME(effects): again, this should not error without Rhs specified
+impl PartialEq<str> for str {
+    fn eq(&self, other: &str) -> bool {
+        loop {}
+    }
+}
+
+
+#[lang = "not"]
+#[const_trait]
+trait Not {
+    type Output;
+    fn not(self) -> Self::Output;
+}
+
+impl const Not for bool {
+    type Output = bool;
+    fn not(self) -> bool {
+        !self
+    }
+}
+
+impl Copy for bool {}
+impl<'a> Copy for &'a str {}
+
+#[lang = "pin"]
+#[fundamental]
+#[repr(transparent)]
+struct Pin<P> {
+    pointer: P,
+}
+
+impl<P> Pin<P> {
+    #[lang = "new_unchecked"]
+    const unsafe fn new_unchecked(pointer: P) -> Pin<P> {
+        Pin { pointer }
+    }
+}
+
+impl<'a, T: ?Sized> Pin<&'a T> {
+    const fn get_ref(self) -> &'a T {
+        self.pointer
+    }
+}
+
+
+impl<P: Deref> Pin<P> {
+    /* const */ fn as_ref(&self) -> Pin<&P::Target>
+    where
+        P: /* ~const */ Deref,
+    {
+        unsafe { Pin::new_unchecked(&*self.pointer) }
+    }
+}
+
+
+impl<'a, T: ?Sized> Pin<&'a mut T> {
+    const unsafe fn get_unchecked_mut(self) -> &'a mut T {
+        self.pointer
+    }
+}
+/* FIXME lol
+impl<T> Option<T> {
+    const fn as_pin_ref(self: Pin<&Self>) -> Option<Pin<&T>> {
+        match Pin::get_ref(self).as_ref() {
+            Some(x) => unsafe { Some(Pin::new_unchecked(x)) },
+            None => None,
+        }
+    }
+
+    const fn as_pin_mut(self: Pin<&mut Self>) -> Option<Pin<&mut T>> {
+        unsafe {
+            match Pin::get_unchecked_mut(self).as_mut() {
+                Some(x) => Some(Pin::new_unchecked(x)),
+                None => None,
+            }
+        }
+    }
+}
+*/
+
+impl<P: /* ~const */ Deref> /* const */ Deref for Pin<P> {
+    type Target = P::Target;
+    fn deref(&self) -> &P::Target {
+        Pin::get_ref(Pin::as_ref(self))
+    }
+}
+
+impl<T> /* const */ Deref for Option<T> {
+    type Target = T;
+    fn deref(&self) -> &T {
+        loop {}
+    }
+}
+
+impl<P: Receiver> Receiver for Pin<P> {}
+
+impl<T: Clone> Clone for RefCell<T> {
+    fn clone(&self) -> RefCell<T> {
+        RefCell::new(self.borrow().clone())
+    }
+}
+
+struct RefCell<T: ?Sized> {
+    borrow: UnsafeCell<()>,
+    value: UnsafeCell<T>,
+}
+impl<T> RefCell<T> {
+    const fn new(value: T) -> RefCell<T> {
+        loop {}
+    }
+}
+impl<T: ?Sized> RefCell<T> {
+    fn borrow(&self) -> Ref<'_, T> {
+        loop {}
+    }
+}
+
+#[lang = "unsafe_cell"]
+#[repr(transparent)]
+struct UnsafeCell<T: ?Sized> {
+    value: T,
+}
+
+struct Ref<'b, T: ?Sized + 'b> {
+    value: *const T,
+    borrow: &'b UnsafeCell<()>,
+}
+
+impl<T: ?Sized> Deref for Ref<'_, T> {
+    type Target = T;
+
+    #[inline]
+    fn deref(&self) -> &T {
+        loop {}
+    }
+}
+
+#[lang = "clone"]
+#[rustc_trivial_field_reads]
+#[const_trait]
+trait Clone: Sized {
+    fn clone(&self) -> Self;
+    fn clone_from(&mut self, source: &Self)
+    where
+        Self: ~const Destruct,
+    {
+        *self = source.clone()
+    }
+}
+
+#[lang = "structural_peq"]
+trait StructuralPartialEq {}
+
+#[lang = "structural_teq"]
+trait StructuralEq {}
+
+const fn drop<T: ~const Destruct>(_: T) {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.stderr
new file mode 100644
index 00000000000..02429374218
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.stderr
@@ -0,0 +1,32 @@
+error[E0369]: cannot add `i32` to `i32`
+  --> $DIR/minicore.rs:33:20
+   |
+LL |     let x = 42_i32 + 43_i32;
+   |             ------ ^ ------ i32
+   |             |
+   |             i32
+
+error[E0369]: cannot add `i32` to `i32`
+  --> $DIR/minicore.rs:37:20
+   |
+LL |     let x = 42_i32 + 43_i32;
+   |             ------ ^ ------ i32
+   |             |
+   |             i32
+
+error[E0600]: cannot apply unary operator `!` to type `bool`
+  --> $DIR/minicore.rs:343:9
+   |
+LL |         !self.eq(other)
+   |         ^^^^^^^^^^^^^^^ cannot apply unary operator `!`
+
+error[E0600]: cannot apply unary operator `!` to type `bool`
+  --> $DIR/minicore.rs:365:9
+   |
+LL |         !self
+   |         ^^^^^ cannot apply unary operator `!`
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0369, E0600.
+For more information about an error, try `rustc --explain E0369`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs
new file mode 100644
index 00000000000..8e4850197de
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.rs
@@ -0,0 +1,18 @@
+// aux-build: cross-crate.rs
+extern crate cross_crate;
+
+use cross_crate::{Bar, foo};
+
+fn main() {
+    foo::<true>();
+    //~^ ERROR: function takes 0 generic arguments but 1 generic argument was supplied
+    <() as Bar<true>>::bar();
+    //~^ ERROR: trait takes 0 generic arguments but 1 generic argument was supplied
+}
+
+const FOO: () = {
+    foo::<false>();
+    //~^ ERROR: function takes 0 generic arguments but 1 generic argument was supplied
+    <() as Bar<false>>::bar();
+    //~^ ERROR: trait takes 0 generic arguments but 1 generic argument was supplied
+};
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr
new file mode 100644
index 00000000000..cc870ad336c
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params-cross-crate.stderr
@@ -0,0 +1,59 @@
+error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/no-explicit-const-params-cross-crate.rs:14:5
+   |
+LL |     foo::<false>();
+   |     ^^^--------- help: remove these generics
+   |     |
+   |     expected 0 generic arguments
+   |
+note: function defined here, with 0 generic parameters
+  --> $DIR/auxiliary/cross-crate.rs:3:14
+   |
+LL | pub const fn foo() {}
+   |              ^^^
+
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/no-explicit-const-params-cross-crate.rs:16:12
+   |
+LL |     <() as Bar<false>>::bar();
+   |            ^^^------- help: remove these generics
+   |            |
+   |            expected 0 generic arguments
+   |
+note: trait defined here, with 0 generic parameters
+  --> $DIR/auxiliary/cross-crate.rs:6:11
+   |
+LL | pub trait Bar {
+   |           ^^^
+
+error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/no-explicit-const-params-cross-crate.rs:7:5
+   |
+LL |     foo::<true>();
+   |     ^^^-------- help: remove these generics
+   |     |
+   |     expected 0 generic arguments
+   |
+note: function defined here, with 0 generic parameters
+  --> $DIR/auxiliary/cross-crate.rs:3:14
+   |
+LL | pub const fn foo() {}
+   |              ^^^
+
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/no-explicit-const-params-cross-crate.rs:9:12
+   |
+LL |     <() as Bar<true>>::bar();
+   |            ^^^------ help: remove these generics
+   |            |
+   |            expected 0 generic arguments
+   |
+note: trait defined here, with 0 generic parameters
+  --> $DIR/auxiliary/cross-crate.rs:6:11
+   |
+LL | pub trait Bar {
+   |           ^^^
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.rs
new file mode 100644
index 00000000000..929da1ca8fa
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.rs
@@ -0,0 +1,27 @@
+#![feature(const_trait_impl, effects)]
+
+const fn foo() {}
+
+#[const_trait]
+trait Bar {
+    fn bar();
+}
+
+impl Bar for () {
+    fn bar() {}
+}
+
+fn main() {
+    foo::<true>();
+    //~^ ERROR: function takes 0 generic arguments but 1 generic argument was supplied
+    <() as Bar<true>>::bar();
+    //~^ ERROR: trait takes 0 generic arguments but 1 generic argument was supplied
+}
+
+const FOO: () = {
+    foo::<false>();
+    //~^ ERROR: function takes 0 generic arguments but 1 generic argument was supplied
+    <() as Bar<false>>::bar();
+    //~^ ERROR: trait takes 0 generic arguments but 1 generic argument was supplied
+    //~| ERROR: mismatched types
+};
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr
new file mode 100644
index 00000000000..0745d0304b9
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/no-explicit-const-params.stderr
@@ -0,0 +1,69 @@
+error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/no-explicit-const-params.rs:22:5
+   |
+LL |     foo::<false>();
+   |     ^^^--------- help: remove these generics
+   |     |
+   |     expected 0 generic arguments
+   |
+note: function defined here, with 0 generic parameters
+  --> $DIR/no-explicit-const-params.rs:3:10
+   |
+LL | const fn foo() {}
+   |          ^^^
+
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/no-explicit-const-params.rs:24:12
+   |
+LL |     <() as Bar<false>>::bar();
+   |            ^^^------- help: remove these generics
+   |            |
+   |            expected 0 generic arguments
+   |
+note: trait defined here, with 0 generic parameters
+  --> $DIR/no-explicit-const-params.rs:6:7
+   |
+LL | trait Bar {
+   |       ^^^
+
+error[E0308]: mismatched types
+  --> $DIR/no-explicit-const-params.rs:24:5
+   |
+LL |     <() as Bar<false>>::bar();
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ expected `false`, found `true`
+   |
+   = note: expected constant `false`
+              found constant `true`
+
+error[E0107]: function takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/no-explicit-const-params.rs:15:5
+   |
+LL |     foo::<true>();
+   |     ^^^-------- help: remove these generics
+   |     |
+   |     expected 0 generic arguments
+   |
+note: function defined here, with 0 generic parameters
+  --> $DIR/no-explicit-const-params.rs:3:10
+   |
+LL | const fn foo() {}
+   |          ^^^
+
+error[E0107]: trait takes 0 generic arguments but 1 generic argument was supplied
+  --> $DIR/no-explicit-const-params.rs:17:12
+   |
+LL |     <() as Bar<true>>::bar();
+   |            ^^^------ help: remove these generics
+   |            |
+   |            expected 0 generic arguments
+   |
+note: trait defined here, with 0 generic parameters
+  --> $DIR/no-explicit-const-params.rs:6:7
+   |
+LL | trait Bar {
+   |       ^^^
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0107, E0308.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs
new file mode 100644
index 00000000000..b30d7743edf
--- /dev/null
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/project.rs
@@ -0,0 +1,11 @@
+// check-pass
+#![feature(const_trait_impl, effects)]
+
+pub trait Owo<X = <Self as Uwu>::T> {}
+
+#[const_trait]
+pub trait Uwu: Owo {
+    type T;
+}
+
+fn main() {}
diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr
index c94563d3591..2a9647da782 100644
--- a/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr
+++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/trait-where-clause-const.stderr
@@ -1,35 +1,21 @@
-error[E0277]: the trait bound `T: ~const Bar` is not satisfied
+error[E0308]: mismatched types
   --> $DIR/trait-where-clause-const.rs:21:5
    |
 LL |     T::b();
-   |     ^ the trait `Bar` is not implemented for `T`
+   |     ^^^^^^ expected `host`, found `true`
    |
-note: required by a bound in `Foo::b`
-  --> $DIR/trait-where-clause-const.rs:15:24
-   |
-LL |     fn b() where Self: ~const Bar;
-   |                        ^^^^^^^^^^ required by this bound in `Foo::b`
-help: consider further restricting this bound
-   |
-LL | const fn test1<T: ~const Foo + Bar + Bar>() {
-   |                                    +++++
+   = note: expected constant `host`
+              found constant `true`
 
-error[E0277]: the trait bound `T: ~const Bar` is not satisfied
-  --> $DIR/trait-where-clause-const.rs:23:12
+error[E0308]: mismatched types
+  --> $DIR/trait-where-clause-const.rs:23:5
    |
 LL |     T::c::<T>();
-   |            ^ the trait `Bar` is not implemented for `T`
-   |
-note: required by a bound in `Foo::c`
-  --> $DIR/trait-where-clause-const.rs:16:13
-   |
-LL |     fn c<T: ~const Bar>();
-   |             ^^^^^^^^^^ required by this bound in `Foo::c`
-help: consider further restricting this bound
+   |     ^^^^^^^^^^^ expected `host`, found `true`
    |
-LL | const fn test1<T: ~const Foo + Bar + Bar>() {
-   |                                    +++++
+   = note: expected constant `host`
+              found constant `true`
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr b/tests/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr
index f5ec287d291..1f4190665b9 100644
--- a/tests/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr
+++ b/tests/ui/rust-2018/edition-lint-infer-outlives-multispan.stderr
@@ -861,12 +861,7 @@ LL |                 $($name: 'a, $name: 'a, )+;
    |                   ^^^^^^^^^  ^^^^^^^^^
 ...
 LL |     m!(T0 T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 T15);
-   |     ---------------------------------------------------------
-   |     |
-   |     in this macro invocation
-   |     in this macro invocation
-   |     in this macro invocation
-   |     in this macro invocation
+   |     --------------------------------------------------------- in this macro invocation
    |
    = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: remove these bounds
diff --git a/tests/ui/sanitize/issue-111184-generator-witness.rs b/tests/ui/sanitize/issue-111184-coroutine-witness.rs
index d36d8bce561..dffb739f203 100644
--- a/tests/ui/sanitize/issue-111184-generator-witness.rs
+++ b/tests/ui/sanitize/issue-111184-coroutine-witness.rs
@@ -1,4 +1,4 @@
-// Regression test for issue 111184, where ty::GeneratorWitness were not expected to occur in
+// Regression test for issue 111184, where ty::CoroutineWitness were not expected to occur in
 // encode_ty and caused the compiler to ICE.
 //
 // needs-sanitizer-cfi
diff --git a/tests/ui/self/arbitrary-self-from-method-substs.default.stderr b/tests/ui/self/arbitrary-self-from-method-substs.default.stderr
new file mode 100644
index 00000000000..cbf5e6c541a
--- /dev/null
+++ b/tests/ui/self/arbitrary-self-from-method-substs.default.stderr
@@ -0,0 +1,13 @@
+error[E0658]: `R` cannot be used as the type of `self` without the `arbitrary_self_types` feature
+  --> $DIR/arbitrary-self-from-method-substs.rs:8:43
+   |
+LL |     fn get<R: Deref<Target = Self>>(self: R) -> u32 {
+   |                                           ^
+   |
+   = note: see issue #44874 <https://github.com/rust-lang/rust/issues/44874> for more information
+   = help: add `#![feature(arbitrary_self_types)]` to the crate attributes to enable
+   = help: consider changing to `self`, `&self`, `&mut self`, `self: Box<Self>`, `self: Rc<Self>`, `self: Arc<Self>`, or `self: Pin<P>` (where P is one of the previous types except `Self`)
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/self/arbitrary-self-from-method-substs.stderr b/tests/ui/self/arbitrary-self-from-method-substs.feature.stderr
index 6c252fadf46..7378d53c373 100644
--- a/tests/ui/self/arbitrary-self-from-method-substs.stderr
+++ b/tests/ui/self/arbitrary-self-from-method-substs.feature.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/arbitrary-self-from-method-substs.rs:14:5
+  --> $DIR/arbitrary-self-from-method-substs.rs:16:5
    |
 LL |     foo.get::<&Foo>();
    |     ^^^ expected `&Foo`, found `Foo`
diff --git a/tests/ui/self/arbitrary-self-from-method-substs.rs b/tests/ui/self/arbitrary-self-from-method-substs.rs
index 0f911a20842..004445dc327 100644
--- a/tests/ui/self/arbitrary-self-from-method-substs.rs
+++ b/tests/ui/self/arbitrary-self-from-method-substs.rs
@@ -1,10 +1,12 @@
-#![feature(arbitrary_self_types)]
+// revisions: default feature
+#![cfg_attr(feature, feature(arbitrary_self_types))]
 
 use std::ops::Deref;
 
 struct Foo(u32);
 impl Foo {
-    fn get<R: Deref<Target=Self>>(self: R) -> u32 {
+    fn get<R: Deref<Target = Self>>(self: R) -> u32 {
+        //[default]~^ ERROR: `R` cannot be used as the type of `self`
         self.0
     }
 }
@@ -12,5 +14,5 @@ impl Foo {
 fn main() {
     let mut foo = Foo(1);
     foo.get::<&Foo>();
-    //~^ ERROR mismatched types
+    //[feature]~^ ERROR mismatched types
 }
diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.curr.stderr b/tests/ui/self/arbitrary-self-types-not-object-safe.curr.stderr
index 13591f5b635..fdd18c6b37b 100644
--- a/tests/ui/self/arbitrary-self-types-not-object-safe.curr.stderr
+++ b/tests/ui/self/arbitrary-self-types-not-object-safe.curr.stderr
@@ -14,6 +14,7 @@ LL | trait Foo {
    |       --- this trait cannot be made into an object...
 LL |     fn foo(self: &Rc<Self>) -> usize;
    |                  ^^^^^^^^^ ...because method `foo`'s `self` parameter cannot be dispatched on
+   = help: only type `usize` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/arbitrary-self-types-not-object-safe.rs:33:13
@@ -31,6 +32,7 @@ LL | trait Foo {
    |       --- this trait cannot be made into an object...
 LL |     fn foo(self: &Rc<Self>) -> usize;
    |                  ^^^^^^^^^ ...because method `foo`'s `self` parameter cannot be dispatched on
+   = help: only type `usize` implements the trait, consider using it directly instead
    = note: required for the cast from `Rc<usize>` to `Rc<dyn Foo>`
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr b/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr
index 593f705353a..0a567ddcc2e 100644
--- a/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr
+++ b/tests/ui/self/arbitrary-self-types-not-object-safe.object_safe_for_dispatch.stderr
@@ -14,6 +14,7 @@ LL | trait Foo {
    |       --- this trait cannot be made into an object...
 LL |     fn foo(self: &Rc<Self>) -> usize;
    |                  ^^^^^^^^^ ...because method `foo`'s `self` parameter cannot be dispatched on
+   = help: only type `usize` implements the trait, consider using it directly instead
    = note: required for the cast from `Rc<usize>` to `Rc<dyn Foo>`
 
 error: aborting due to previous error
diff --git a/tests/ui/self/self-impl.stderr b/tests/ui/self/self-impl.stderr
index 36372b644d6..18ffd15427f 100644
--- a/tests/ui/self/self-impl.stderr
+++ b/tests/ui/self/self-impl.stderr
@@ -2,13 +2,13 @@ error[E0223]: ambiguous associated type
   --> $DIR/self-impl.rs:23:16
    |
 LL |         let _: <Self>::Baz = true;
-   |                ^^^^^^^^^^^ help: use the fully-qualified path: `<Bar as Foo>::Baz`
+   |                ^^^^^^^^^^^ help: use fully-qualified syntax: `<Bar as Foo>::Baz`
 
 error[E0223]: ambiguous associated type
   --> $DIR/self-impl.rs:25:16
    |
 LL |         let _: Self::Baz = true;
-   |                ^^^^^^^^^ help: use the fully-qualified path: `<Bar as Foo>::Baz`
+   |                ^^^^^^^^^ help: use fully-qualified syntax: `<Bar as Foo>::Baz`
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/self/self_type_keyword.rs b/tests/ui/self/self_type_keyword.rs
index b42bf8eea1a..96d24715edb 100644
--- a/tests/ui/self/self_type_keyword.rs
+++ b/tests/ui/self/self_type_keyword.rs
@@ -22,6 +22,8 @@ pub fn main() {
         //~^ ERROR cannot find macro `Self` in this scope
         Foo { Self } => (),
         //~^ ERROR expected identifier, found keyword `Self`
+        //~| ERROR mismatched types
+        //~| ERROR `Foo` does not have a field named `Self`
     }
 }
 
diff --git a/tests/ui/self/self_type_keyword.stderr b/tests/ui/self/self_type_keyword.stderr
index aca08d81163..6e65fae808d 100644
--- a/tests/ui/self/self_type_keyword.stderr
+++ b/tests/ui/self/self_type_keyword.stderr
@@ -31,19 +31,19 @@ LL |         Foo { Self } => (),
    |               ^^^^ expected identifier, found keyword
 
 error: expected identifier, found keyword `Self`
-  --> $DIR/self_type_keyword.rs:29:26
+  --> $DIR/self_type_keyword.rs:31:26
    |
 LL |     extern crate core as Self;
    |                          ^^^^ expected identifier, found keyword
 
 error: expected identifier, found keyword `Self`
-  --> $DIR/self_type_keyword.rs:34:32
+  --> $DIR/self_type_keyword.rs:36:32
    |
 LL |     use std::option::Option as Self;
    |                                ^^^^ expected identifier, found keyword
 
 error: expected identifier, found keyword `Self`
-  --> $DIR/self_type_keyword.rs:39:11
+  --> $DIR/self_type_keyword.rs:41:11
    |
 LL |     trait Self {}
    |           ^^^^ expected identifier, found keyword
@@ -80,7 +80,22 @@ LL | struct Bar<'Self>;
    |
    = help: consider removing `'Self`, referring to it in a field, or using a marker such as `PhantomData`
 
-error: aborting due to 12 previous errors
+error[E0308]: mismatched types
+  --> $DIR/self_type_keyword.rs:23:9
+   |
+LL |     match 15 {
+   |           -- this expression has type `{integer}`
+...
+LL |         Foo { Self } => (),
+   |         ^^^^^^^^^^^^ expected integer, found `Foo`
+
+error[E0026]: struct `Foo` does not have a field named `Self`
+  --> $DIR/self_type_keyword.rs:23:15
+   |
+LL |         Foo { Self } => (),
+   |               ^^^^ struct `Foo` does not have this field
+
+error: aborting due to 14 previous errors
 
-Some errors have detailed explanations: E0392, E0531.
-For more information about an error, try `rustc --explain E0392`.
+Some errors have detailed explanations: E0026, E0308, E0392, E0531.
+For more information about an error, try `rustc --explain E0026`.
diff --git a/tests/ui/simd/array-trait.rs b/tests/ui/simd/array-trait.rs
index 45c10b37816..883d718c49b 100644
--- a/tests/ui/simd/array-trait.rs
+++ b/tests/ui/simd/array-trait.rs
@@ -22,6 +22,7 @@ impl Simd for i32x4 {
 #[derive(Copy, Clone)]
 pub struct T<S: Simd>([S::Lane; S::SIZE]);
 //~^ ERROR unconstrained generic constant
+//~| ERROR SIMD vector element type should be a primitive scalar
 
 extern "platform-intrinsic" {
     fn simd_insert<T, E>(x: T, idx: u32, y: E) -> T;
diff --git a/tests/ui/simd/array-trait.stderr b/tests/ui/simd/array-trait.stderr
index 765215c3939..cf6026912aa 100644
--- a/tests/ui/simd/array-trait.stderr
+++ b/tests/ui/simd/array-trait.stderr
@@ -6,5 +6,12 @@ LL | pub struct T<S: Simd>([S::Lane; S::SIZE]);
    |
    = help: try adding a `where` bound using this expression: `where [(); S::SIZE]:`
 
-error: aborting due to previous error
+error[E0077]: SIMD vector element type should be a primitive scalar (integer/float/pointer) type
+  --> $DIR/array-trait.rs:23:1
+   |
+LL | pub struct T<S: Simd>([S::Lane; S::SIZE]);
+   | ^^^^^^^^^^^^^^^^^^^^^
+
+error: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0077`.
diff --git a/tests/ui/sized/unsized-binding.rs b/tests/ui/sized/unsized-binding.rs
new file mode 100644
index 00000000000..3b99b0f6e96
--- /dev/null
+++ b/tests/ui/sized/unsized-binding.rs
@@ -0,0 +1,5 @@
+fn main() {
+    let x = *""; //~ ERROR E0277
+    println!("{}", x);
+    println!("{}", x);
+}
diff --git a/tests/ui/sized/unsized-binding.stderr b/tests/ui/sized/unsized-binding.stderr
new file mode 100644
index 00000000000..af306685021
--- /dev/null
+++ b/tests/ui/sized/unsized-binding.stderr
@@ -0,0 +1,13 @@
+error[E0277]: the size for values of type `str` cannot be known at compilation time
+  --> $DIR/unsized-binding.rs:2:9
+   |
+LL |     let x = *"";
+   |         ^ doesn't have a size known at compile-time
+   |
+   = help: the trait `Sized` is not implemented for `str`
+   = note: all local variables must have a statically known size
+   = help: unsized locals are gated as an unstable feature
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/span/issue-43927-non-ADT-derive.stderr b/tests/ui/span/issue-43927-non-ADT-derive.stderr
index e3ae37e3689..a22a4d2b40a 100644
--- a/tests/ui/span/issue-43927-non-ADT-derive.stderr
+++ b/tests/ui/span/issue-43927-non-ADT-derive.stderr
@@ -11,11 +11,15 @@ error: `derive` attribute cannot be used at crate level
    |
 LL | #![derive(Debug, PartialEq, Eq)] // should be an outer attribute!
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+...
+LL | struct DerivedOn;
+   |        --------- the inner attribute doesn't annotate this struct
    |
 help: perhaps you meant to use an outer attribute
    |
-LL | #[derive(Debug, PartialEq, Eq)] // should be an outer attribute!
-   | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+LL - #![derive(Debug, PartialEq, Eq)] // should be an outer attribute!
+LL + #[derive(Debug, PartialEq, Eq)] // should be an outer attribute!
+   |
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/span/lint-unused-unsafe-thir.rs b/tests/ui/span/lint-unused-unsafe-thir.rs
deleted file mode 100644
index adb72c26bba..00000000000
--- a/tests/ui/span/lint-unused-unsafe-thir.rs
+++ /dev/null
@@ -1,61 +0,0 @@
-// FIXME: This file is tracking old lint behavior that's still unchanged in the
-// unstable -Zthir-unsafeck implementation. See lint-unused-unsafe.rs for more details.
-//
-// Exercise the unused_unsafe attribute in some positive and negative cases
-
-// compile-flags: -Zthir-unsafeck
-
-#![allow(dead_code)]
-#![deny(unused_unsafe)]
-
-
-mod foo {
-    extern "C" {
-        pub fn bar();
-    }
-}
-
-fn callback<T, F>(_f: F) -> T where F: FnOnce() -> T { panic!() }
-unsafe fn unsf() {}
-
-fn bad1() { unsafe {} }                  //~ ERROR: unnecessary `unsafe` block
-fn bad2() { unsafe { bad1() } }          //~ ERROR: unnecessary `unsafe` block
-unsafe fn bad3() { unsafe {} }           //~ ERROR: unnecessary `unsafe` block
-fn bad4() { unsafe { callback(||{}) } }  //~ ERROR: unnecessary `unsafe` block
-unsafe fn bad5() { unsafe { unsf() } }
-fn bad6() {
-    unsafe {                             // don't put the warning here
-        unsafe {                         //~ ERROR: unnecessary `unsafe` block
-            unsf()
-        }
-    }
-}
-unsafe fn bad7() {
-    unsafe {
-        unsafe {                         //~ ERROR: unnecessary `unsafe` block
-            unsf()
-        }
-    }
-}
-
-unsafe fn good0() { unsf() }
-fn good1() { unsafe { unsf() } }
-fn good2() {
-    /* bug uncovered when implementing warning about unused unsafe blocks. Be
-       sure that when purity is inherited that the source of the unsafe-ness
-       is tracked correctly */
-    unsafe {
-        unsafe fn what() -> Vec<String> { panic!() }
-
-        callback(|| {
-            what();
-        });
-    }
-}
-
-unsafe fn good3() { foo::bar() }
-fn good4() { unsafe { foo::bar() } }
-
-#[allow(unused_unsafe)] fn allowed() { unsafe {} }
-
-fn main() {}
diff --git a/tests/ui/span/lint-unused-unsafe-thir.stderr b/tests/ui/span/lint-unused-unsafe-thir.stderr
deleted file mode 100644
index 3bcbb759775..00000000000
--- a/tests/ui/span/lint-unused-unsafe-thir.stderr
+++ /dev/null
@@ -1,50 +0,0 @@
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe-thir.rs:21:13
-   |
-LL | fn bad1() { unsafe {} }
-   |             ^^^^^^ unnecessary `unsafe` block
-   |
-note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe-thir.rs:9:9
-   |
-LL | #![deny(unused_unsafe)]
-   |         ^^^^^^^^^^^^^
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe-thir.rs:22:13
-   |
-LL | fn bad2() { unsafe { bad1() } }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe-thir.rs:23:20
-   |
-LL | unsafe fn bad3() { unsafe {} }
-   | ----------------   ^^^^^^ unnecessary `unsafe` block
-   | |
-   | because it's nested under this `unsafe` fn
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe-thir.rs:24:13
-   |
-LL | fn bad4() { unsafe { callback(||{}) } }
-   |             ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe-thir.rs:28:9
-   |
-LL |     unsafe {                             // don't put the warning here
-   |     ------ because it's nested under this `unsafe` block
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe-thir.rs:35:9
-   |
-LL |     unsafe {
-   |     ------ because it's nested under this `unsafe` block
-LL |         unsafe {
-   |         ^^^^^^ unnecessary `unsafe` block
-
-error: aborting due to 6 previous errors
-
diff --git a/tests/ui/span/lint-unused-unsafe.mir.stderr b/tests/ui/span/lint-unused-unsafe.mir.stderr
index d8412908c73..9e8d3359242 100644
--- a/tests/ui/span/lint-unused-unsafe.mir.stderr
+++ b/tests/ui/span/lint-unused-unsafe.mir.stderr
@@ -1,77 +1,77 @@
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:26:13
+  --> $DIR/lint-unused-unsafe.rs:22:13
    |
 LL | fn bad1() { unsafe {} }
    |             ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:14:9
+  --> $DIR/lint-unused-unsafe.rs:10:9
    |
 LL | #![deny(unused_unsafe)]
    |         ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:27:13
+  --> $DIR/lint-unused-unsafe.rs:23:13
    |
 LL | fn bad2() { unsafe { bad1() } }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:28:20
+  --> $DIR/lint-unused-unsafe.rs:24:20
    |
 LL | unsafe fn bad3() { unsafe {} }
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:29:13
+  --> $DIR/lint-unused-unsafe.rs:25:13
    |
 LL | fn bad4() { unsafe { callback(||{}) } }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:32:5
+  --> $DIR/lint-unused-unsafe.rs:28:5
    |
 LL |     unsafe {
    |     ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:39:5
+  --> $DIR/lint-unused-unsafe.rs:35:5
    |
 LL |     unsafe {
    |     ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:74:9
+  --> $DIR/lint-unused-unsafe.rs:70:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:83:9
+  --> $DIR/lint-unused-unsafe.rs:79:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:84:13
+  --> $DIR/lint-unused-unsafe.rs:80:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:85:13
+  --> $DIR/lint-unused-unsafe.rs:81:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:90:9
+  --> $DIR/lint-unused-unsafe.rs:86:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:100:13
+  --> $DIR/lint-unused-unsafe.rs:96:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -80,7 +80,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:101:13
+  --> $DIR/lint-unused-unsafe.rs:97:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -89,7 +89,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:102:13
+  --> $DIR/lint-unused-unsafe.rs:98:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -98,7 +98,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:112:17
+  --> $DIR/lint-unused-unsafe.rs:108:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -107,13 +107,13 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:110:20
+  --> $DIR/lint-unused-unsafe.rs:106:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:113:17
+  --> $DIR/lint-unused-unsafe.rs:109:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -122,7 +122,7 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:114:17
+  --> $DIR/lint-unused-unsafe.rs:110:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -131,37 +131,37 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:124:9
+  --> $DIR/lint-unused-unsafe.rs:120:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:134:9
+  --> $DIR/lint-unused-unsafe.rs:130:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:135:13
+  --> $DIR/lint-unused-unsafe.rs:131:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:136:13
+  --> $DIR/lint-unused-unsafe.rs:132:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:142:9
+  --> $DIR/lint-unused-unsafe.rs:138:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:153:13
+  --> $DIR/lint-unused-unsafe.rs:149:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -170,7 +170,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:154:13
+  --> $DIR/lint-unused-unsafe.rs:150:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -179,7 +179,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:155:13
+  --> $DIR/lint-unused-unsafe.rs:151:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -188,7 +188,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:166:17
+  --> $DIR/lint-unused-unsafe.rs:162:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -197,13 +197,13 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:164:20
+  --> $DIR/lint-unused-unsafe.rs:160:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:167:17
+  --> $DIR/lint-unused-unsafe.rs:163:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -212,7 +212,7 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:168:17
+  --> $DIR/lint-unused-unsafe.rs:164:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -221,37 +221,37 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:178:9
+  --> $DIR/lint-unused-unsafe.rs:174:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:188:9
+  --> $DIR/lint-unused-unsafe.rs:184:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:189:13
+  --> $DIR/lint-unused-unsafe.rs:185:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:190:13
+  --> $DIR/lint-unused-unsafe.rs:186:13
    |
 LL |             unsafe {}
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:196:9
+  --> $DIR/lint-unused-unsafe.rs:192:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:207:13
+  --> $DIR/lint-unused-unsafe.rs:203:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -260,7 +260,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:208:13
+  --> $DIR/lint-unused-unsafe.rs:204:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -269,7 +269,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:209:13
+  --> $DIR/lint-unused-unsafe.rs:205:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -278,7 +278,7 @@ LL |             unsafe { unsf() }
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:220:17
+  --> $DIR/lint-unused-unsafe.rs:216:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -287,13 +287,13 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:218:20
+  --> $DIR/lint-unused-unsafe.rs:214:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:221:17
+  --> $DIR/lint-unused-unsafe.rs:217:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -302,7 +302,7 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:222:17
+  --> $DIR/lint-unused-unsafe.rs:218:17
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -311,13 +311,13 @@ LL |                 unsafe { unsf() }
    |                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:242:9
+  --> $DIR/lint-unused-unsafe.rs:238:9
    |
 LL |         unsafe {
    |         ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:255:13
+  --> $DIR/lint-unused-unsafe.rs:251:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -325,7 +325,7 @@ LL |             unsafe {
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:268:13
+  --> $DIR/lint-unused-unsafe.rs:264:13
    |
 LL |         unsafe {
    |         ------ because it's nested under this `unsafe` block
@@ -333,37 +333,37 @@ LL |             unsafe {
    |             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:286:20
+  --> $DIR/lint-unused-unsafe.rs:282:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:295:20
+  --> $DIR/lint-unused-unsafe.rs:291:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:296:24
+  --> $DIR/lint-unused-unsafe.rs:292:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:297:24
+  --> $DIR/lint-unused-unsafe.rs:293:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:302:20
+  --> $DIR/lint-unused-unsafe.rs:298:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:312:24
+  --> $DIR/lint-unused-unsafe.rs:308:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -372,7 +372,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:313:24
+  --> $DIR/lint-unused-unsafe.rs:309:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -381,7 +381,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:314:24
+  --> $DIR/lint-unused-unsafe.rs:310:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -390,7 +390,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:324:28
+  --> $DIR/lint-unused-unsafe.rs:320:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -399,13 +399,13 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:322:20
+  --> $DIR/lint-unused-unsafe.rs:318:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:325:28
+  --> $DIR/lint-unused-unsafe.rs:321:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -414,7 +414,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:326:28
+  --> $DIR/lint-unused-unsafe.rs:322:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -423,37 +423,37 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:336:20
+  --> $DIR/lint-unused-unsafe.rs:332:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:346:20
+  --> $DIR/lint-unused-unsafe.rs:342:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:347:24
+  --> $DIR/lint-unused-unsafe.rs:343:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:348:24
+  --> $DIR/lint-unused-unsafe.rs:344:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:354:20
+  --> $DIR/lint-unused-unsafe.rs:350:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:365:24
+  --> $DIR/lint-unused-unsafe.rs:361:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -462,7 +462,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:366:24
+  --> $DIR/lint-unused-unsafe.rs:362:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -471,7 +471,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:367:24
+  --> $DIR/lint-unused-unsafe.rs:363:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -480,7 +480,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:378:28
+  --> $DIR/lint-unused-unsafe.rs:374:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -489,13 +489,13 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:376:20
+  --> $DIR/lint-unused-unsafe.rs:372:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:379:28
+  --> $DIR/lint-unused-unsafe.rs:375:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -504,7 +504,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:380:28
+  --> $DIR/lint-unused-unsafe.rs:376:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -513,37 +513,37 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:390:20
+  --> $DIR/lint-unused-unsafe.rs:386:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:400:20
+  --> $DIR/lint-unused-unsafe.rs:396:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:401:24
+  --> $DIR/lint-unused-unsafe.rs:397:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:402:24
+  --> $DIR/lint-unused-unsafe.rs:398:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:408:20
+  --> $DIR/lint-unused-unsafe.rs:404:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:419:24
+  --> $DIR/lint-unused-unsafe.rs:415:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -552,7 +552,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:420:24
+  --> $DIR/lint-unused-unsafe.rs:416:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -561,7 +561,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:421:24
+  --> $DIR/lint-unused-unsafe.rs:417:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -570,7 +570,7 @@ LL |             let _ = || unsafe { unsf() };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:432:28
+  --> $DIR/lint-unused-unsafe.rs:428:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -579,13 +579,13 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:430:20
+  --> $DIR/lint-unused-unsafe.rs:426:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:433:28
+  --> $DIR/lint-unused-unsafe.rs:429:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -594,7 +594,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:434:28
+  --> $DIR/lint-unused-unsafe.rs:430:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -603,13 +603,13 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:454:20
+  --> $DIR/lint-unused-unsafe.rs:450:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:467:24
+  --> $DIR/lint-unused-unsafe.rs:463:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -617,7 +617,7 @@ LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:480:24
+  --> $DIR/lint-unused-unsafe.rs:476:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -625,37 +625,37 @@ LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:499:20
+  --> $DIR/lint-unused-unsafe.rs:495:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:508:20
+  --> $DIR/lint-unused-unsafe.rs:504:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:509:24
+  --> $DIR/lint-unused-unsafe.rs:505:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:510:24
+  --> $DIR/lint-unused-unsafe.rs:506:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:515:20
+  --> $DIR/lint-unused-unsafe.rs:511:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:525:24
+  --> $DIR/lint-unused-unsafe.rs:521:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -664,7 +664,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:526:24
+  --> $DIR/lint-unused-unsafe.rs:522:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -673,7 +673,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:527:24
+  --> $DIR/lint-unused-unsafe.rs:523:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -682,7 +682,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:537:28
+  --> $DIR/lint-unused-unsafe.rs:533:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -691,13 +691,13 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:535:20
+  --> $DIR/lint-unused-unsafe.rs:531:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:538:28
+  --> $DIR/lint-unused-unsafe.rs:534:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -706,7 +706,7 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:539:28
+  --> $DIR/lint-unused-unsafe.rs:535:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -715,37 +715,37 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:549:20
+  --> $DIR/lint-unused-unsafe.rs:545:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:559:20
+  --> $DIR/lint-unused-unsafe.rs:555:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:560:24
+  --> $DIR/lint-unused-unsafe.rs:556:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:561:24
+  --> $DIR/lint-unused-unsafe.rs:557:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:567:20
+  --> $DIR/lint-unused-unsafe.rs:563:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:578:24
+  --> $DIR/lint-unused-unsafe.rs:574:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -754,7 +754,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:579:24
+  --> $DIR/lint-unused-unsafe.rs:575:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -763,7 +763,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:580:24
+  --> $DIR/lint-unused-unsafe.rs:576:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -772,7 +772,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:591:28
+  --> $DIR/lint-unused-unsafe.rs:587:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -781,13 +781,13 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:589:20
+  --> $DIR/lint-unused-unsafe.rs:585:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:592:28
+  --> $DIR/lint-unused-unsafe.rs:588:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -796,7 +796,7 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:593:28
+  --> $DIR/lint-unused-unsafe.rs:589:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -805,37 +805,37 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:603:20
+  --> $DIR/lint-unused-unsafe.rs:599:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:613:20
+  --> $DIR/lint-unused-unsafe.rs:609:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:614:24
+  --> $DIR/lint-unused-unsafe.rs:610:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:615:24
+  --> $DIR/lint-unused-unsafe.rs:611:24
    |
 LL |             let _ = || unsafe {};
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:621:20
+  --> $DIR/lint-unused-unsafe.rs:617:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:632:24
+  --> $DIR/lint-unused-unsafe.rs:628:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -844,7 +844,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:633:24
+  --> $DIR/lint-unused-unsafe.rs:629:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -853,7 +853,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:634:24
+  --> $DIR/lint-unused-unsafe.rs:630:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -862,7 +862,7 @@ LL |             let _ = || unsafe { let _ = || unsf(); };
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:645:28
+  --> $DIR/lint-unused-unsafe.rs:641:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -871,13 +871,13 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:643:20
+  --> $DIR/lint-unused-unsafe.rs:639:20
    |
 LL |             #[deny(unused_unsafe)]
    |                    ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:646:28
+  --> $DIR/lint-unused-unsafe.rs:642:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -886,7 +886,7 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:647:28
+  --> $DIR/lint-unused-unsafe.rs:643:28
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -895,13 +895,13 @@ LL |                 let _ = || unsafe { let _ = || unsf(); };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:667:20
+  --> $DIR/lint-unused-unsafe.rs:663:20
    |
 LL |         let _ = || unsafe {
    |                    ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:680:24
+  --> $DIR/lint-unused-unsafe.rs:676:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -909,7 +909,7 @@ LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:693:24
+  --> $DIR/lint-unused-unsafe.rs:689:24
    |
 LL |         let _ = || unsafe {
    |                    ------ because it's nested under this `unsafe` block
@@ -917,37 +917,37 @@ LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:711:24
+  --> $DIR/lint-unused-unsafe.rs:707:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:721:24
+  --> $DIR/lint-unused-unsafe.rs:717:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:722:28
+  --> $DIR/lint-unused-unsafe.rs:718:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:723:28
+  --> $DIR/lint-unused-unsafe.rs:719:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:729:24
+  --> $DIR/lint-unused-unsafe.rs:725:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:740:28
+  --> $DIR/lint-unused-unsafe.rs:736:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -956,7 +956,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:741:28
+  --> $DIR/lint-unused-unsafe.rs:737:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -965,7 +965,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:742:28
+  --> $DIR/lint-unused-unsafe.rs:738:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -974,7 +974,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:753:32
+  --> $DIR/lint-unused-unsafe.rs:749:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -983,13 +983,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:751:24
+  --> $DIR/lint-unused-unsafe.rs:747:24
    |
 LL |                 #[deny(unused_unsafe)]
    |                        ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:754:32
+  --> $DIR/lint-unused-unsafe.rs:750:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -998,7 +998,7 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:755:32
+  --> $DIR/lint-unused-unsafe.rs:751:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1007,37 +1007,37 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:765:24
+  --> $DIR/lint-unused-unsafe.rs:761:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:775:24
+  --> $DIR/lint-unused-unsafe.rs:771:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:776:28
+  --> $DIR/lint-unused-unsafe.rs:772:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:777:28
+  --> $DIR/lint-unused-unsafe.rs:773:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:783:24
+  --> $DIR/lint-unused-unsafe.rs:779:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:794:28
+  --> $DIR/lint-unused-unsafe.rs:790:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1046,7 +1046,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:795:28
+  --> $DIR/lint-unused-unsafe.rs:791:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1055,7 +1055,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:796:28
+  --> $DIR/lint-unused-unsafe.rs:792:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1064,7 +1064,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:807:32
+  --> $DIR/lint-unused-unsafe.rs:803:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1073,13 +1073,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:805:24
+  --> $DIR/lint-unused-unsafe.rs:801:24
    |
 LL |                 #[deny(unused_unsafe)]
    |                        ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:808:32
+  --> $DIR/lint-unused-unsafe.rs:804:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1088,7 +1088,7 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:809:32
+  --> $DIR/lint-unused-unsafe.rs:805:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1097,13 +1097,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:829:24
+  --> $DIR/lint-unused-unsafe.rs:825:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:842:28
+  --> $DIR/lint-unused-unsafe.rs:838:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1111,7 +1111,7 @@ LL |                 let _ = || unsafe {
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:855:28
+  --> $DIR/lint-unused-unsafe.rs:851:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1119,37 +1119,37 @@ LL |                 let _ = || unsafe {
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:869:24
+  --> $DIR/lint-unused-unsafe.rs:865:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:879:24
+  --> $DIR/lint-unused-unsafe.rs:875:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:880:28
+  --> $DIR/lint-unused-unsafe.rs:876:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:881:28
+  --> $DIR/lint-unused-unsafe.rs:877:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:887:24
+  --> $DIR/lint-unused-unsafe.rs:883:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:898:28
+  --> $DIR/lint-unused-unsafe.rs:894:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1158,7 +1158,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:899:28
+  --> $DIR/lint-unused-unsafe.rs:895:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1167,7 +1167,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:900:28
+  --> $DIR/lint-unused-unsafe.rs:896:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1176,7 +1176,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:911:32
+  --> $DIR/lint-unused-unsafe.rs:907:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1185,13 +1185,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:909:24
+  --> $DIR/lint-unused-unsafe.rs:905:24
    |
 LL |                 #[deny(unused_unsafe)]
    |                        ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:912:32
+  --> $DIR/lint-unused-unsafe.rs:908:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1200,7 +1200,7 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:913:32
+  --> $DIR/lint-unused-unsafe.rs:909:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1209,37 +1209,37 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:923:24
+  --> $DIR/lint-unused-unsafe.rs:919:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:933:24
+  --> $DIR/lint-unused-unsafe.rs:929:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:934:28
+  --> $DIR/lint-unused-unsafe.rs:930:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:935:28
+  --> $DIR/lint-unused-unsafe.rs:931:28
    |
 LL |                 let _ = || unsafe {};
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:941:24
+  --> $DIR/lint-unused-unsafe.rs:937:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:952:28
+  --> $DIR/lint-unused-unsafe.rs:948:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1248,7 +1248,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:953:28
+  --> $DIR/lint-unused-unsafe.rs:949:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1257,7 +1257,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:954:28
+  --> $DIR/lint-unused-unsafe.rs:950:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1266,7 +1266,7 @@ LL |                 let _ = || unsafe { unsf() };
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:965:32
+  --> $DIR/lint-unused-unsafe.rs:961:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1275,13 +1275,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
    |
 note: the lint level is defined here
-  --> $DIR/lint-unused-unsafe.rs:963:24
+  --> $DIR/lint-unused-unsafe.rs:959:24
    |
 LL |                 #[deny(unused_unsafe)]
    |                        ^^^^^^^^^^^^^
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:966:32
+  --> $DIR/lint-unused-unsafe.rs:962:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1290,7 +1290,7 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:967:32
+  --> $DIR/lint-unused-unsafe.rs:963:32
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1299,13 +1299,13 @@ LL |                     let _ = || unsafe { unsf() };
    |                                ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:987:24
+  --> $DIR/lint-unused-unsafe.rs:983:24
    |
 LL |             let _ = || unsafe {
    |                        ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1000:28
+  --> $DIR/lint-unused-unsafe.rs:996:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1313,7 +1313,7 @@ LL |                 let _ = || unsafe {
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1013:28
+  --> $DIR/lint-unused-unsafe.rs:1009:28
    |
 LL |             let _ = || unsafe {
    |                        ------ because it's nested under this `unsafe` block
@@ -1321,13 +1321,13 @@ LL |                 let _ = || unsafe {
    |                            ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1059:29
+  --> $DIR/lint-unused-unsafe.rs:1055:29
    |
 LL |             let _ = async { unsafe {
    |                             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1066:33
+  --> $DIR/lint-unused-unsafe.rs:1062:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1336,7 +1336,7 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1067:33
+  --> $DIR/lint-unused-unsafe.rs:1063:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1345,7 +1345,7 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1068:33
+  --> $DIR/lint-unused-unsafe.rs:1064:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1354,13 +1354,13 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1073:29
+  --> $DIR/lint-unused-unsafe.rs:1069:29
    |
 LL |             let _ = async { unsafe {
    |                             ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1080:33
+  --> $DIR/lint-unused-unsafe.rs:1076:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1369,7 +1369,7 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1081:33
+  --> $DIR/lint-unused-unsafe.rs:1077:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1378,7 +1378,7 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1082:33
+  --> $DIR/lint-unused-unsafe.rs:1078:33
    |
 LL |             let _ = async { unsafe {
    |                             ------ because it's nested under this `unsafe` block
@@ -1387,13 +1387,13 @@ LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
    |                                 ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1092:22
+  --> $DIR/lint-unused-unsafe.rs:1088:22
    |
 LL |         let _x: [(); unsafe { 0 }] = [];
    |                      ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/lint-unused-unsafe.rs:1096:22
+  --> $DIR/lint-unused-unsafe.rs:1092:22
    |
 LL |         let _x: [(); unsafe { unsafe { size() } }] = [];
    |                      ^^^^^^ unnecessary `unsafe` block
diff --git a/tests/ui/span/lint-unused-unsafe.rs b/tests/ui/span/lint-unused-unsafe.rs
index 5d042768be0..ca615f64f22 100644
--- a/tests/ui/span/lint-unused-unsafe.rs
+++ b/tests/ui/span/lint-unused-unsafe.rs
@@ -3,12 +3,8 @@
 
 // edition:2018
 
-// revisions: mir
-
-// FIXME: Adapt -Zthir-unsafeck to behave the same as the mir version after #93678,
-// then delete lint-unused-unsafe-thir.rs, and go back to using the settings below
-// // revisions: mir thir
-// // [thir]compile-flags: -Zthir-unsafeck
+// revisions: mir thir
+// [thir]compile-flags: -Zthir-unsafeck
 
 #![allow(dead_code)]
 #![deny(unused_unsafe)]
diff --git a/tests/ui/span/lint-unused-unsafe.thir.stderr b/tests/ui/span/lint-unused-unsafe.thir.stderr
new file mode 100644
index 00000000000..9e8d3359242
--- /dev/null
+++ b/tests/ui/span/lint-unused-unsafe.thir.stderr
@@ -0,0 +1,1402 @@
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:22:13
+   |
+LL | fn bad1() { unsafe {} }
+   |             ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:10:9
+   |
+LL | #![deny(unused_unsafe)]
+   |         ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:23:13
+   |
+LL | fn bad2() { unsafe { bad1() } }
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:24:20
+   |
+LL | unsafe fn bad3() { unsafe {} }
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:25:13
+   |
+LL | fn bad4() { unsafe { callback(||{}) } }
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:28:5
+   |
+LL |     unsafe {
+   |     ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:35:5
+   |
+LL |     unsafe {
+   |     ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:70:9
+   |
+LL |         unsafe {
+   |         ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:79:9
+   |
+LL |         unsafe {
+   |         ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:80:13
+   |
+LL |             unsafe {}
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:81:13
+   |
+LL |             unsafe {}
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:86:9
+   |
+LL |         unsafe {
+   |         ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:96:13
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+LL |             unsf();
+LL |             unsafe { unsf() }
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:97:13
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |             unsafe { unsf() }
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:98:13
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |             unsafe { unsf() }
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:108:17
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |                 unsafe { unsf() }
+   |                 ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:106:20
+   |
+LL |             #[deny(unused_unsafe)]
+   |                    ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:109:17
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |                 unsafe { unsf() }
+   |                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:110:17
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |                 unsafe { unsf() }
+   |                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:120:9
+   |
+LL |         unsafe {
+   |         ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:130:9
+   |
+LL |         unsafe {
+   |         ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:131:13
+   |
+LL |             unsafe {}
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:132:13
+   |
+LL |             unsafe {}
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:138:9
+   |
+LL |         unsafe {
+   |         ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:149:13
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+LL |             unsf();
+LL |             unsafe { unsf() }
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:150:13
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |             unsafe { unsf() }
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:151:13
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |             unsafe { unsf() }
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:162:17
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |                 unsafe { unsf() }
+   |                 ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:160:20
+   |
+LL |             #[deny(unused_unsafe)]
+   |                    ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:163:17
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |                 unsafe { unsf() }
+   |                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:164:17
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |                 unsafe { unsf() }
+   |                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:174:9
+   |
+LL |         unsafe {
+   |         ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:184:9
+   |
+LL |         unsafe {
+   |         ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:185:13
+   |
+LL |             unsafe {}
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:186:13
+   |
+LL |             unsafe {}
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:192:9
+   |
+LL |         unsafe {
+   |         ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:203:13
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+LL |             unsf();
+LL |             unsafe { unsf() }
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:204:13
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |             unsafe { unsf() }
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:205:13
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |             unsafe { unsf() }
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:216:17
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |                 unsafe { unsf() }
+   |                 ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:214:20
+   |
+LL |             #[deny(unused_unsafe)]
+   |                    ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:217:17
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |                 unsafe { unsf() }
+   |                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:218:17
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+...
+LL |                 unsafe { unsf() }
+   |                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:238:9
+   |
+LL |         unsafe {
+   |         ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:251:13
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+LL |             unsafe {
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:264:13
+   |
+LL |         unsafe {
+   |         ------ because it's nested under this `unsafe` block
+LL |             unsafe {
+   |             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:282:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:291:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:292:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:293:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:298:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:308:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+LL |             unsf();
+LL |             let _ = || unsafe { unsf() };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:309:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { unsf() };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:310:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { unsf() };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:320:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:318:20
+   |
+LL |             #[deny(unused_unsafe)]
+   |                    ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:321:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:322:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:332:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:342:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:343:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:344:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:350:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:361:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+LL |             unsf();
+LL |             let _ = || unsafe { unsf() };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:362:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { unsf() };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:363:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { unsf() };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:374:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:372:20
+   |
+LL |             #[deny(unused_unsafe)]
+   |                    ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:375:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:376:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:386:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:396:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:397:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:398:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:404:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:415:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+LL |             unsf();
+LL |             let _ = || unsafe { unsf() };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:416:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { unsf() };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:417:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { unsf() };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:428:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:426:20
+   |
+LL |             #[deny(unused_unsafe)]
+   |                    ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:429:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:430:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:450:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:463:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:476:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:495:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:504:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:505:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:506:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:511:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:521:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+LL |             let _ = || unsf();
+LL |             let _ = || unsafe { let _ = || unsf(); };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:522:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { let _ = || unsf(); };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:523:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { let _ = || unsf(); };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:533:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { let _ = || unsf(); };
+   |                            ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:531:20
+   |
+LL |             #[deny(unused_unsafe)]
+   |                    ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:534:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { let _ = || unsf(); };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:535:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { let _ = || unsf(); };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:545:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:555:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:556:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:557:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:563:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:574:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+LL |             let _ = || unsf();
+LL |             let _ = || unsafe { let _ = || unsf(); };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:575:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { let _ = || unsf(); };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:576:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { let _ = || unsf(); };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:587:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { let _ = || unsf(); };
+   |                            ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:585:20
+   |
+LL |             #[deny(unused_unsafe)]
+   |                    ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:588:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { let _ = || unsf(); };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:589:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { let _ = || unsf(); };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:599:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:609:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:610:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:611:24
+   |
+LL |             let _ = || unsafe {};
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:617:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:628:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+LL |             let _ = || unsf();
+LL |             let _ = || unsafe { let _ = || unsf(); };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:629:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { let _ = || unsf(); };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:630:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |             let _ = || unsafe { let _ = || unsf(); };
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:641:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { let _ = || unsf(); };
+   |                            ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:639:20
+   |
+LL |             #[deny(unused_unsafe)]
+   |                    ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:642:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { let _ = || unsf(); };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:643:28
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { let _ = || unsf(); };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:663:20
+   |
+LL |         let _ = || unsafe {
+   |                    ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:676:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:689:24
+   |
+LL |         let _ = || unsafe {
+   |                    ------ because it's nested under this `unsafe` block
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:707:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:717:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:718:28
+   |
+LL |                 let _ = || unsafe {};
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:719:28
+   |
+LL |                 let _ = || unsafe {};
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:725:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:736:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+LL |                 unsf();
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:737:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:738:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:749:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:747:24
+   |
+LL |                 #[deny(unused_unsafe)]
+   |                        ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:750:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:751:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:761:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:771:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:772:28
+   |
+LL |                 let _ = || unsafe {};
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:773:28
+   |
+LL |                 let _ = || unsafe {};
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:779:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:790:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+LL |                 unsf();
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:791:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:792:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:803:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:801:24
+   |
+LL |                 #[deny(unused_unsafe)]
+   |                        ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:804:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:805:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:825:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:838:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+LL |                 let _ = || unsafe {
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:851:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+LL |                 let _ = || unsafe {
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:865:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:875:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:876:28
+   |
+LL |                 let _ = || unsafe {};
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:877:28
+   |
+LL |                 let _ = || unsafe {};
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:883:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:894:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+LL |                 unsf();
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:895:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:896:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:907:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:905:24
+   |
+LL |                 #[deny(unused_unsafe)]
+   |                        ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:908:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:909:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:919:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:929:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:930:28
+   |
+LL |                 let _ = || unsafe {};
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:931:28
+   |
+LL |                 let _ = || unsafe {};
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:937:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:948:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+LL |                 unsf();
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:949:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:950:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = || unsafe { unsf() };
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:961:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+   |
+note: the lint level is defined here
+  --> $DIR/lint-unused-unsafe.rs:959:24
+   |
+LL |                 #[deny(unused_unsafe)]
+   |                        ^^^^^^^^^^^^^
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:962:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:963:32
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+...
+LL |                     let _ = || unsafe { unsf() };
+   |                                ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:983:24
+   |
+LL |             let _ = || unsafe {
+   |                        ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:996:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+LL |                 let _ = || unsafe {
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:1009:28
+   |
+LL |             let _ = || unsafe {
+   |                        ------ because it's nested under this `unsafe` block
+LL |                 let _ = || unsafe {
+   |                            ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:1055:29
+   |
+LL |             let _ = async { unsafe {
+   |                             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:1062:33
+   |
+LL |             let _ = async { unsafe {
+   |                             ------ because it's nested under this `unsafe` block
+LL |                 let _ = async { unsf() };
+LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
+   |                                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:1063:33
+   |
+LL |             let _ = async { unsafe {
+   |                             ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
+   |                                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:1064:33
+   |
+LL |             let _ = async { unsafe {
+   |                             ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
+   |                                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:1069:29
+   |
+LL |             let _ = async { unsafe {
+   |                             ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:1076:33
+   |
+LL |             let _ = async { unsafe {
+   |                             ------ because it's nested under this `unsafe` block
+LL |                 let _ = async { unsf() };
+LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
+   |                                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:1077:33
+   |
+LL |             let _ = async { unsafe {
+   |                             ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
+   |                                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:1078:33
+   |
+LL |             let _ = async { unsafe {
+   |                             ------ because it's nested under this `unsafe` block
+...
+LL |                 let _ = async { unsafe { let _ = async { unsf() }; }};
+   |                                 ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:1088:22
+   |
+LL |         let _x: [(); unsafe { 0 }] = [];
+   |                      ^^^^^^ unnecessary `unsafe` block
+
+error: unnecessary `unsafe` block
+  --> $DIR/lint-unused-unsafe.rs:1092:22
+   |
+LL |         let _x: [(); unsafe { unsafe { size() } }] = [];
+   |                      ^^^^^^ unnecessary `unsafe` block
+
+error: aborting due to 174 previous errors
+
diff --git a/tests/ui/specialization/min_specialization/issue-79224.rs b/tests/ui/specialization/min_specialization/issue-79224.rs
index 104bddd076e..a118cb28b38 100644
--- a/tests/ui/specialization/min_specialization/issue-79224.rs
+++ b/tests/ui/specialization/min_specialization/issue-79224.rs
@@ -19,6 +19,7 @@ impl<B: ?Sized> Display for Cow<'_, B> {
     //~^ ERROR: the trait bound `B: Clone` is not satisfied [E0277]
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         //~^ ERROR: the trait bound `B: Clone` is not satisfied [E0277]
+        //~| ERROR: the trait bound `B: Clone` is not satisfied [E0277]
         write!(f, "foo")
     }
 }
diff --git a/tests/ui/specialization/min_specialization/issue-79224.stderr b/tests/ui/specialization/min_specialization/issue-79224.stderr
index 9a4d557a152..7541579498e 100644
--- a/tests/ui/specialization/min_specialization/issue-79224.stderr
+++ b/tests/ui/specialization/min_specialization/issue-79224.stderr
@@ -22,6 +22,18 @@ help: consider further restricting this bound
 LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
    |                +++++++++++++++++++
 
-error: aborting due to 2 previous errors
+error[E0277]: the trait bound `B: Clone` is not satisfied
+  --> $DIR/issue-79224.rs:20:5
+   |
+LL |     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Clone` is not implemented for `B`
+   |
+   = note: required for `B` to implement `ToOwned`
+help: consider further restricting this bound
+   |
+LL | impl<B: ?Sized + std::clone::Clone> Display for Cow<'_, B> {
+   |                +++++++++++++++++++
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/stability-attribute/stability-attribute-issue-43027.rs b/tests/ui/stability-attribute/stability-attribute-issue-43027.rs
index 3f4fdfd0180..810fbef7b38 100644
--- a/tests/ui/stability-attribute/stability-attribute-issue-43027.rs
+++ b/tests/ui/stability-attribute/stability-attribute-issue-43027.rs
@@ -1,12 +1,12 @@
 // check-pass
 #![feature(staged_api)]
-#![stable(feature = "test", since = "0")]
+#![stable(feature = "test", since = "3.3.3")]
 
-#[stable(feature = "test", since = "0")]
+#[stable(feature = "test", since = "3.3.3")]
 pub struct A<T>(pub T);
 
-#[stable(feature = "test", since = "0")]
-pub struct B<T>(#[stable(feature = "test", since = "0")] pub T);
+#[stable(feature = "test", since = "3.3.3")]
+pub struct B<T>(#[stable(feature = "test", since = "3.3.3")] pub T);
 
 fn main() {
     // Make sure the field is used to fill the stability cache
diff --git a/tests/ui/stability-attribute/stability-attribute-sanity-4.rs b/tests/ui/stability-attribute/stability-attribute-sanity-4.rs
index 64f99635219..01a46d15c8d 100644
--- a/tests/ui/stability-attribute/stability-attribute-sanity-4.rs
+++ b/tests/ui/stability-attribute/stability-attribute-sanity-4.rs
@@ -17,11 +17,12 @@ mod bogus_attribute_types_2 {
     #[stable = "a"] //~ ERROR malformed `stable` attribute
     fn f4() { }
 
-    #[stable(feature = "a", since = "b")]
+    #[stable(feature = "a", since = "3.3.3")]
     #[deprecated] //~ ERROR missing 'since'
+    //~^ ERROR missing 'note'
     fn f5() { }
 
-    #[stable(feature = "a", since = "b")]
+    #[stable(feature = "a", since = "3.3.3")]
     #[deprecated = "a"] //~ ERROR missing 'since'
     fn f6() { }
 }
diff --git a/tests/ui/stability-attribute/stability-attribute-sanity-4.stderr b/tests/ui/stability-attribute/stability-attribute-sanity-4.stderr
index a76f5be1e3d..8ead943ffe3 100644
--- a/tests/ui/stability-attribute/stability-attribute-sanity-4.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-sanity-4.stderr
@@ -28,12 +28,19 @@ error[E0542]: missing 'since'
 LL |     #[deprecated]
    |     ^^^^^^^^^^^^^
 
+error[E0543]: missing 'note'
+  --> $DIR/stability-attribute-sanity-4.rs:21:5
+   |
+LL |     #[deprecated]
+   |     ^^^^^^^^^^^^^
+
 error[E0542]: missing 'since'
-  --> $DIR/stability-attribute-sanity-4.rs:25:5
+  --> $DIR/stability-attribute-sanity-4.rs:26:5
    |
 LL |     #[deprecated = "a"]
    |     ^^^^^^^^^^^^^^^^^^^
 
-error: aborting due to 6 previous errors
+error: aborting due to 7 previous errors
 
-For more information about this error, try `rustc --explain E0542`.
+Some errors have detailed explanations: E0542, E0543.
+For more information about an error, try `rustc --explain E0542`.
diff --git a/tests/ui/stability-attribute/stability-attribute-sanity.rs b/tests/ui/stability-attribute/stability-attribute-sanity.rs
index cc30e6ab9a9..7857a0603bd 100644
--- a/tests/ui/stability-attribute/stability-attribute-sanity.rs
+++ b/tests/ui/stability-attribute/stability-attribute-sanity.rs
@@ -5,19 +5,19 @@
 #![stable(feature = "rust1", since = "1.0.0")]
 
 mod bogus_attribute_types_1 {
-    #[stable(feature = "a", since = "b", reason)] //~ ERROR unknown meta item 'reason' [E0541]
+    #[stable(feature = "a", since = "4.4.4", reason)] //~ ERROR unknown meta item 'reason' [E0541]
     fn f1() { }
 
     #[stable(feature = "a", since)] //~ ERROR incorrect meta item [E0539]
     fn f2() { }
 
-    #[stable(feature, since = "a")] //~ ERROR incorrect meta item [E0539]
+    #[stable(feature, since = "3.3.3")] //~ ERROR incorrect meta item [E0539]
     fn f3() { }
 
     #[stable(feature = "a", since(b))] //~ ERROR incorrect meta item [E0539]
     fn f5() { }
 
-    #[stable(feature(b), since = "a")] //~ ERROR incorrect meta item [E0539]
+    #[stable(feature(b), since = "3.3.3")] //~ ERROR incorrect meta item [E0539]
     fn f6() { }
 }
 
@@ -28,7 +28,7 @@ mod missing_feature_names {
     #[unstable(feature = "b")] //~ ERROR missing 'issue' [E0547]
     fn f2() { }
 
-    #[stable(since = "a")] //~ ERROR missing 'feature' [E0546]
+    #[stable(since = "3.3.3")] //~ ERROR missing 'feature' [E0546]
     fn f3() { }
 }
 
@@ -36,40 +36,39 @@ mod missing_version {
     #[stable(feature = "a")] //~ ERROR missing 'since' [E0542]
     fn f1() { }
 
-    #[stable(feature = "a", since = "b")]
+    #[stable(feature = "a", since = "4.4.4")]
     #[deprecated(note = "a")] //~ ERROR missing 'since' [E0542]
     fn f2() { }
 
-    #[stable(feature = "a", since = "b")]
-    #[deprecated(since = "a")] //~ ERROR missing 'note' [E0543]
+    #[stable(feature = "a", since = "4.4.4")]
+    #[deprecated(since = "5.5.5")] //~ ERROR missing 'note' [E0543]
     fn f3() { }
 }
 
 #[unstable(feature = "b", issue = "none")]
-#[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544]
+#[stable(feature = "a", since = "4.4.4")] //~ ERROR multiple stability levels [E0544]
 fn multiple1() { }
 
 #[unstable(feature = "b", issue = "none")]
 #[unstable(feature = "b", issue = "none")] //~ ERROR multiple stability levels [E0544]
 fn multiple2() { }
 
-#[stable(feature = "a", since = "b")]
-#[stable(feature = "a", since = "b")] //~ ERROR multiple stability levels [E0544]
+#[stable(feature = "a", since = "4.4.4")]
+#[stable(feature = "a", since = "4.4.4")] //~ ERROR multiple stability levels [E0544]
 fn multiple3() { }
 
-#[stable(feature = "a", since = "b")] //~ ERROR invalid stability version found
-#[deprecated(since = "b", note = "text")]
-#[deprecated(since = "b", note = "text")] //~ ERROR multiple `deprecated` attributes
+#[stable(feature = "e", since = "b")] //~ ERROR 'since' must be a Rust version number, such as "1.31.0"
+#[deprecated(since = "5.5.5", note = "text")]
+#[deprecated(since = "5.5.5", note = "text")] //~ ERROR multiple `deprecated` attributes
 #[rustc_const_unstable(feature = "c", issue = "none")]
 #[rustc_const_unstable(feature = "d", issue = "none")] //~ ERROR multiple stability levels
 pub const fn multiple4() { }
 
-#[stable(feature = "a", since = "1.0.0")] //~ ERROR invalid deprecation version found
-//~^ ERROR feature `a` is declared stable since 1.0.0
-#[deprecated(since = "invalid", note = "text")]
+#[stable(feature = "a", since = "1.0.0")] //~ ERROR feature `a` is declared stable since 1.0.0
+#[deprecated(since = "invalid", note = "text")] //~ ERROR 'since' must be a Rust version number, such as "1.31.0"
 fn invalid_deprecation_version() {}
 
-#[deprecated(since = "a", note = "text")]
+#[deprecated(since = "5.5.5", note = "text")]
 fn deprecated_without_unstable_or_stable() { }
 //~^^ ERROR deprecated attribute must be paired with either stable or unstable attribute
 
diff --git a/tests/ui/stability-attribute/stability-attribute-sanity.stderr b/tests/ui/stability-attribute/stability-attribute-sanity.stderr
index 89a8425f5e7..c614fc2b9f7 100644
--- a/tests/ui/stability-attribute/stability-attribute-sanity.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-sanity.stderr
@@ -1,20 +1,20 @@
 error: multiple `deprecated` attributes
   --> $DIR/stability-attribute-sanity.rs:62:1
    |
-LL | #[deprecated(since = "b", note = "text")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
+LL | #[deprecated(since = "5.5.5", note = "text")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute
    |
 note: attribute also specified here
   --> $DIR/stability-attribute-sanity.rs:61:1
    |
-LL | #[deprecated(since = "b", note = "text")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[deprecated(since = "5.5.5", note = "text")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0541]: unknown meta item 'reason'
-  --> $DIR/stability-attribute-sanity.rs:8:42
+  --> $DIR/stability-attribute-sanity.rs:8:46
    |
-LL |     #[stable(feature = "a", since = "b", reason)]
-   |                                          ^^^^^^ expected one of `feature`, `since`
+LL |     #[stable(feature = "a", since = "4.4.4", reason)]
+   |                                              ^^^^^^ expected one of `feature`, `since`
 
 error[E0539]: incorrect meta item
   --> $DIR/stability-attribute-sanity.rs:11:29
@@ -25,7 +25,7 @@ LL |     #[stable(feature = "a", since)]
 error[E0539]: incorrect meta item
   --> $DIR/stability-attribute-sanity.rs:14:14
    |
-LL |     #[stable(feature, since = "a")]
+LL |     #[stable(feature, since = "3.3.3")]
    |              ^^^^^^^
 
 error[E0539]: incorrect meta item
@@ -37,7 +37,7 @@ LL |     #[stable(feature = "a", since(b))]
 error[E0539]: incorrect meta item
   --> $DIR/stability-attribute-sanity.rs:20:14
    |
-LL |     #[stable(feature(b), since = "a")]
+LL |     #[stable(feature(b), since = "3.3.3")]
    |              ^^^^^^^^^^
 
 error[E0546]: missing 'feature'
@@ -55,8 +55,8 @@ LL |     #[unstable(feature = "b")]
 error[E0546]: missing 'feature'
   --> $DIR/stability-attribute-sanity.rs:31:5
    |
-LL |     #[stable(since = "a")]
-   |     ^^^^^^^^^^^^^^^^^^^^^^
+LL |     #[stable(since = "3.3.3")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0542]: missing 'since'
   --> $DIR/stability-attribute-sanity.rs:36:5
@@ -73,14 +73,14 @@ LL |     #[deprecated(note = "a")]
 error[E0543]: missing 'note'
   --> $DIR/stability-attribute-sanity.rs:44:5
    |
-LL |     #[deprecated(since = "a")]
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL |     #[deprecated(since = "5.5.5")]
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0544]: multiple stability levels
   --> $DIR/stability-attribute-sanity.rs:49:1
    |
-LL | #[stable(feature = "a", since = "b")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[stable(feature = "a", since = "4.4.4")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0544]: multiple stability levels
   --> $DIR/stability-attribute-sanity.rs:53:1
@@ -91,7 +91,13 @@ LL | #[unstable(feature = "b", issue = "none")]
 error[E0544]: multiple stability levels
   --> $DIR/stability-attribute-sanity.rs:57:1
    |
-LL | #[stable(feature = "a", since = "b")]
+LL | #[stable(feature = "a", since = "4.4.4")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: 'since' must be a Rust version number, such as "1.31.0"
+  --> $DIR/stability-attribute-sanity.rs:60:1
+   |
+LL | #[stable(feature = "e", since = "b")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0544]: multiple stability levels
@@ -100,31 +106,19 @@ error[E0544]: multiple stability levels
 LL | #[rustc_const_unstable(feature = "d", issue = "none")]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error: invalid stability version found
-  --> $DIR/stability-attribute-sanity.rs:60:1
+error: 'since' must be a Rust version number, such as "1.31.0"
+  --> $DIR/stability-attribute-sanity.rs:68:1
    |
-LL | #[stable(feature = "a", since = "b")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid stability version
-...
-LL | pub const fn multiple4() { }
-   | ---------------------------- the stability attribute annotates this item
-
-error: invalid deprecation version found
-  --> $DIR/stability-attribute-sanity.rs:67:1
-   |
-LL | #[stable(feature = "a", since = "1.0.0")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid deprecation version
-...
-LL | fn invalid_deprecation_version() {}
-   | ----------------------------------- the stability attribute annotates this item
+LL | #[deprecated(since = "invalid", note = "text")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error[E0549]: deprecated attribute must be paired with either stable or unstable attribute
-  --> $DIR/stability-attribute-sanity.rs:72:1
+  --> $DIR/stability-attribute-sanity.rs:71:1
    |
-LL | #[deprecated(since = "a", note = "text")]
-   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+LL | #[deprecated(since = "5.5.5", note = "text")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-error[E0711]: feature `a` is declared stable since 1.0.0, but was previously declared stable since b
+error[E0711]: feature `a` is declared stable since 1.0.0, but was previously declared stable since 4.4.4
   --> $DIR/stability-attribute-sanity.rs:67:1
    |
 LL | #[stable(feature = "a", since = "1.0.0")]
diff --git a/tests/ui/stability-attribute/stability-attribute-trait-impl.rs b/tests/ui/stability-attribute/stability-attribute-trait-impl.rs
index 1d138e26408..880000ee7a4 100644
--- a/tests/ui/stability-attribute/stability-attribute-trait-impl.rs
+++ b/tests/ui/stability-attribute/stability-attribute-trait-impl.rs
@@ -1,13 +1,13 @@
 #![feature(staged_api, never_type, rust_cold_cc)]
 //~^ ERROR module has missing stability attribute
 
-#[stable(feature = "a", since = "1")]
+#[stable(feature = "a", since = "3.3.3")]
 struct StableType;
 
 #[unstable(feature = "b", issue = "none")]
 struct UnstableType;
 
-#[stable(feature = "c", since = "1")]
+#[stable(feature = "c", since = "3.3.3")]
 trait StableTrait {}
 
 #[unstable(feature = "d", issue = "none")]
diff --git a/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr b/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr
index 96322c2c945..018786dd26d 100644
--- a/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr
+++ b/tests/ui/stability-attribute/stability-attribute-trait-impl.stderr
@@ -21,7 +21,7 @@ error: module has missing stability attribute
 LL | / #![feature(staged_api, never_type, rust_cold_cc)]
 LL | |
 LL | |
-LL | | #[stable(feature = "a", since = "1")]
+LL | | #[stable(feature = "a", since = "3.3.3")]
 ...  |
 LL | |
 LL | | fn main() {}
diff --git a/tests/ui/structs/struct-path-associated-type.stderr b/tests/ui/structs/struct-path-associated-type.stderr
index acfddaf3760..0c9d2aad5d8 100644
--- a/tests/ui/structs/struct-path-associated-type.stderr
+++ b/tests/ui/structs/struct-path-associated-type.stderr
@@ -48,19 +48,19 @@ error[E0223]: ambiguous associated type
   --> $DIR/struct-path-associated-type.rs:32:13
    |
 LL |     let s = S::A {};
-   |             ^^^^ help: use the fully-qualified path: `<S as Tr>::A`
+   |             ^^^^ help: use fully-qualified syntax: `<S as Tr>::A`
 
 error[E0223]: ambiguous associated type
   --> $DIR/struct-path-associated-type.rs:33:13
    |
 LL |     let z = S::A::<u8> {};
-   |             ^^^^ help: use the fully-qualified path: `<S as Tr>::A`
+   |             ^^^^ help: use fully-qualified syntax: `<S as Tr>::A`
 
 error[E0223]: ambiguous associated type
   --> $DIR/struct-path-associated-type.rs:35:9
    |
 LL |         S::A {} => {}
-   |         ^^^^ help: use the fully-qualified path: `<S as Tr>::A`
+   |         ^^^^ help: use fully-qualified syntax: `<S as Tr>::A`
 
 error: aborting due to 8 previous errors
 
diff --git a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.stderr b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.stderr
index 0716005c679..8c973995c34 100644
--- a/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.stderr
+++ b/tests/ui/suggestions/clone-on-unconstrained-borrowed-type-param.stderr
@@ -4,7 +4,7 @@ error[E0308]: mismatched types
 LL | fn wat<T>(t: &T) -> T {
    |        -            - expected `T` because of return type
    |        |
-   |        this type parameter
+   |        expected this type parameter
 LL |     t.clone()
    |     ^^^^^^^^^ expected type parameter `T`, found `&T`
    |
diff --git a/tests/ui/suggestions/deref-path-method.stderr b/tests/ui/suggestions/deref-path-method.stderr
index 1cc37d61151..0372a7e6cc0 100644
--- a/tests/ui/suggestions/deref-path-method.stderr
+++ b/tests/ui/suggestions/deref-path-method.stderr
@@ -4,6 +4,13 @@ error[E0599]: no function or associated item named `contains` found for struct `
 LL |     Vec::contains(&vec, &0);
    |          ^^^^^^^^ function or associated item not found in `Vec<_, _>`
    |
+note: if you're trying to build a new `Vec<_, _>` consider using one of the following associated functions:
+      Vec::<T>::new
+      Vec::<T>::with_capacity
+      Vec::<T>::from_raw_parts
+      Vec::<T, A>::new_in
+      and 2 others
+  --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
 help: the function `contains` is implemented on `[_]`
    |
 LL |     <[_]>::contains(&vec, &0);
diff --git a/tests/ui/suggestions/dont-suggest-ref/simple.stderr b/tests/ui/suggestions/dont-suggest-ref/simple.stderr
index 52632652423..7d902dbccc4 100644
--- a/tests/ui/suggestions/dont-suggest-ref/simple.stderr
+++ b/tests/ui/suggestions/dont-suggest-ref/simple.stderr
@@ -43,7 +43,7 @@ LL -     while let Either::One(_t) = *r { }
 LL +     while let Either::One(_t) = r { }
    |
 
-error[E0507]: cannot move out of `r` as enum variant `Two` which is behind a shared reference
+error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
   --> $DIR/simple.rs:47:11
    |
 LL |     match *r {
@@ -124,7 +124,7 @@ LL -     while let Either::One(_t) = *rm { }
 LL +     while let Either::One(_t) = rm { }
    |
 
-error[E0507]: cannot move out of `rm` as enum variant `Two` which is behind a mutable reference
+error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
   --> $DIR/simple.rs:70:11
    |
 LL |     match *rm {
@@ -392,7 +392,7 @@ LL -     while let &Either::One(_t) = r { }
 LL +     while let Either::One(_t) = r { }
    |
 
-error[E0507]: cannot move out of `r` as enum variant `Two` which is behind a shared reference
+error[E0507]: cannot move out of `r` as enum variant `One` which is behind a shared reference
   --> $DIR/simple.rs:155:11
    |
 LL |     match r {
@@ -491,7 +491,7 @@ LL -     while let &mut Either::One(_t) = rm { }
 LL +     while let Either::One(_t) = rm { }
    |
 
-error[E0507]: cannot move out of `rm` as enum variant `Two` which is behind a mutable reference
+error[E0507]: cannot move out of `rm` as enum variant `One` which is behind a mutable reference
   --> $DIR/simple.rs:187:11
    |
 LL |     match rm {
diff --git a/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr b/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr
index 5093448d2ca..7c81825e576 100644
--- a/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr
+++ b/tests/ui/suggestions/expected-boxed-future-isnt-pinned.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/expected-boxed-future-isnt-pinned.rs:11:5
    |
 LL | fn foo<F: Future<Output=i32> + Send + 'static>(x: F) -> BoxFuture<'static, i32> {
-   |        - this type parameter                            ----------------------- expected `Pin<Box<(dyn Future<Output = i32> + Send + 'static)>>` because of return type
+   |        - found this type parameter                      ----------------------- expected `Pin<Box<(dyn Future<Output = i32> + Send + 'static)>>` because of return type
 LL |     // We could instead use an `async` block, but this way we have no std spans.
 LL |     x
    |     ^ expected `Pin<Box<...>>`, found type parameter `F`
@@ -30,7 +30,7 @@ error[E0308]: mismatched types
   --> $DIR/expected-boxed-future-isnt-pinned.rs:19:14
    |
 LL | fn baz<F: Future<Output=i32> + Send + 'static>(x: F) -> BoxFuture<'static, i32> {
-   |        - this type parameter
+   |        - found this type parameter
 LL |     Pin::new(x)
    |     -------- ^ expected `Box<dyn Future<Output = ...> + Send>`, found type parameter `F`
    |     |
diff --git a/tests/ui/suggestions/issue-104961.fixed b/tests/ui/suggestions/issue-104961.fixed
index 520d638b174..36917cf3395 100644
--- a/tests/ui/suggestions/issue-104961.fixed
+++ b/tests/ui/suggestions/issue-104961.fixed
@@ -2,12 +2,12 @@
 
 fn foo(x: &str) -> bool {
     x.starts_with(&("hi".to_string() + " you"))
-    //~^ ERROR expected a `FnMut<(char,)>` closure, found `String`
+    //~^ ERROR expected a `FnMut(char)` closure, found `String`
 }
 
 fn foo2(x: &str) -> bool {
     x.starts_with(&"hi".to_string())
-    //~^ ERROR expected a `FnMut<(char,)>` closure, found `String`
+    //~^ ERROR expected a `FnMut(char)` closure, found `String`
 }
 
 fn main() {
diff --git a/tests/ui/suggestions/issue-104961.rs b/tests/ui/suggestions/issue-104961.rs
index aeb787abb6f..25a8e0c45e8 100644
--- a/tests/ui/suggestions/issue-104961.rs
+++ b/tests/ui/suggestions/issue-104961.rs
@@ -2,12 +2,12 @@
 
 fn foo(x: &str) -> bool {
     x.starts_with("hi".to_string() + " you")
-    //~^ ERROR expected a `FnMut<(char,)>` closure, found `String`
+    //~^ ERROR expected a `FnMut(char)` closure, found `String`
 }
 
 fn foo2(x: &str) -> bool {
     x.starts_with("hi".to_string())
-    //~^ ERROR expected a `FnMut<(char,)>` closure, found `String`
+    //~^ ERROR expected a `FnMut(char)` closure, found `String`
 }
 
 fn main() {
diff --git a/tests/ui/suggestions/issue-104961.stderr b/tests/ui/suggestions/issue-104961.stderr
index 8cec6a3f827..7e795a74c90 100644
--- a/tests/ui/suggestions/issue-104961.stderr
+++ b/tests/ui/suggestions/issue-104961.stderr
@@ -1,4 +1,4 @@
-error[E0277]: expected a `FnMut<(char,)>` closure, found `String`
+error[E0277]: expected a `FnMut(char)` closure, found `String`
   --> $DIR/issue-104961.rs:4:19
    |
 LL |     x.starts_with("hi".to_string() + " you")
@@ -15,7 +15,7 @@ help: consider borrowing here
 LL |     x.starts_with(&("hi".to_string() + " you"))
    |                   ++                         +
 
-error[E0277]: expected a `FnMut<(char,)>` closure, found `String`
+error[E0277]: expected a `FnMut(char)` closure, found `String`
   --> $DIR/issue-104961.rs:9:19
    |
 LL |     x.starts_with("hi".to_string())
diff --git a/tests/ui/suggestions/issue-109291.stderr b/tests/ui/suggestions/issue-109291.stderr
index 4ef5948d9bf..644841fdf7e 100644
--- a/tests/ui/suggestions/issue-109291.stderr
+++ b/tests/ui/suggestions/issue-109291.stderr
@@ -6,6 +6,13 @@ LL |     println!("Custom backtrace: {}", std::backtrace::Backtrace::forced_capt
    |                                                                 |
    |                                                                 function or associated item not found in `Backtrace`
    |                                                                 help: there is an associated function with a similar name: `force_capture`
+   |
+note: if you're trying to build a new `Backtrace` consider using one of the following associated functions:
+      Backtrace::capture
+      Backtrace::force_capture
+      Backtrace::disabled
+      Backtrace::create
+  --> $SRC_DIR/std/src/backtrace.rs:LL:COL
 
 error: aborting due to previous error
 
diff --git a/tests/ui/suggestions/issue-62843.stderr b/tests/ui/suggestions/issue-62843.stderr
index b6e271de807..ead8f18547b 100644
--- a/tests/ui/suggestions/issue-62843.stderr
+++ b/tests/ui/suggestions/issue-62843.stderr
@@ -1,4 +1,4 @@
-error[E0277]: expected a `FnMut<(char,)>` closure, found `String`
+error[E0277]: expected a `FnMut(char)` closure, found `String`
   --> $DIR/issue-62843.rs:4:32
    |
 LL |     println!("{:?}", line.find(pattern));
diff --git a/tests/ui/suggestions/issue-81839.stderr b/tests/ui/suggestions/issue-81839.stderr
index 6d0a0c7b3fa..238ee637c7d 100644
--- a/tests/ui/suggestions/issue-81839.stderr
+++ b/tests/ui/suggestions/issue-81839.stderr
@@ -4,15 +4,22 @@ error[E0308]: `match` arms have incompatible types
 LL | /     match num {
 LL | |         1 => {
 LL | |             cx.answer_str("hi");
-   | |             --------------------
-   | |             |                  |
-   | |             |                  help: consider removing this semicolon
-   | |             this is found to be of type `()`
+   | |             -------------------- this is found to be of type `()`
 LL | |         }
 LL | |         _ => cx.answer_str("hi"),
    | |              ^^^^^^^^^^^^^^^^^^^ expected `()`, found future
 LL | |     }
    | |_____- `match` arms have incompatible types
+   |
+help: consider removing this semicolon
+   |
+LL -             cx.answer_str("hi");
+LL +             cx.answer_str("hi")
+   |
+help: consider using a semicolon here, but this will discard any values in the match arms
+   |
+LL |     };
+   |      +
 
 error: aborting due to previous error
 
diff --git a/tests/ui/suggestions/issue-84973-blacklist.rs b/tests/ui/suggestions/issue-84973-blacklist.rs
index 6813b07a2ee..6a35d779c1c 100644
--- a/tests/ui/suggestions/issue-84973-blacklist.rs
+++ b/tests/ui/suggestions/issue-84973-blacklist.rs
@@ -1,7 +1,7 @@
 // Checks that certain traits for which we don't want to suggest borrowing
 // are blacklisted and don't cause the suggestion to be issued.
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn f_copy<T: Copy>(t: T) {}
 fn f_clone<T: Clone>(t: T) {}
diff --git a/tests/ui/suggestions/issue-84973-blacklist.stderr b/tests/ui/suggestions/issue-84973-blacklist.stderr
index c8ce146cebf..e0bdb6949a9 100644
--- a/tests/ui/suggestions/issue-84973-blacklist.stderr
+++ b/tests/ui/suggestions/issue-84973-blacklist.stderr
@@ -31,11 +31,11 @@ LL + #[derive(Clone)]
 LL | struct S;
    |
 
-error[E0277]: `{static generator@$DIR/issue-84973-blacklist.rs:17:13: 17:22}` cannot be unpinned
+error[E0277]: `{static coroutine@$DIR/issue-84973-blacklist.rs:17:13: 17:22}` cannot be unpinned
   --> $DIR/issue-84973-blacklist.rs:17:13
    |
 LL |     f_unpin(static || { yield; });
-   |     ------- ^^^^^^^^^^^^^^^^^^^^ the trait `Unpin` is not implemented for `{static generator@$DIR/issue-84973-blacklist.rs:17:13: 17:22}`
+   |     ------- ^^^^^^^^^^^^^^^^^^^^ the trait `Unpin` is not implemented for `{static coroutine@$DIR/issue-84973-blacklist.rs:17:13: 17:22}`
    |     |
    |     required by a bound introduced by this call
    |
diff --git a/tests/ui/suggestions/path-display.stderr b/tests/ui/suggestions/path-display.stderr
index 8359b36588e..46d0b35825b 100644
--- a/tests/ui/suggestions/path-display.stderr
+++ b/tests/ui/suggestions/path-display.stderr
@@ -5,6 +5,7 @@ LL |     println!("{}", path);
    |                    ^^^^ `Path` cannot be formatted with the default formatter; call `.display()` on it
    |
    = help: the trait `std::fmt::Display` is not implemented for `Path`
+   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: call `.display()` or `.to_string_lossy()` to safely print paths, as they may contain non-Unicode data
    = 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)
 
@@ -15,6 +16,7 @@ LL |     println!("{}", path);
    |                    ^^^^ `PathBuf` cannot be formatted with the default formatter; call `.display()` on it
    |
    = help: the trait `std::fmt::Display` is not implemented for `PathBuf`
+   = note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
    = note: call `.display()` or `.to_string_lossy()` to safely print paths, as they may contain non-Unicode data
    = 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/suggestions/restrict-existing-type-bounds.stderr b/tests/ui/suggestions/restrict-existing-type-bounds.stderr
index 14a244b790a..fe8338c18c2 100644
--- a/tests/ui/suggestions/restrict-existing-type-bounds.stderr
+++ b/tests/ui/suggestions/restrict-existing-type-bounds.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/restrict-existing-type-bounds.rs:13:12
    |
 LL | impl<T: TryAdd> TryAdd for Option<T> {
-   |      - this type parameter
+   |      - found this type parameter
 ...
 LL |         Ok(self)
    |         -- ^^^^ expected `Option<<T as TryAdd>::Output>`, found `Option<T>`
@@ -29,7 +29,7 @@ error[E0308]: mismatched types
   --> $DIR/restrict-existing-type-bounds.rs:26:12
    |
 LL | impl<T: TryAdd<Error = X>> TryAdd for Other<T> {
-   |      - this type parameter
+   |      - found this type parameter
 ...
 LL |         Ok(self)
    |         -- ^^^^ expected `Other<<T as TryAdd>::Output>`, found `Other<T>`
diff --git a/tests/ui/suggestions/silenced-binding-typo.fixed b/tests/ui/suggestions/silenced-binding-typo.fixed
new file mode 100644
index 00000000000..e0f9e31bef3
--- /dev/null
+++ b/tests/ui/suggestions/silenced-binding-typo.fixed
@@ -0,0 +1,5 @@
+// run-rustfix
+fn main() {
+    let x = 42; //~ HELP
+    let _y = x; //~ ERROR
+}
diff --git a/tests/ui/suggestions/silenced-binding-typo.rs b/tests/ui/suggestions/silenced-binding-typo.rs
new file mode 100644
index 00000000000..6cadd5a93a7
--- /dev/null
+++ b/tests/ui/suggestions/silenced-binding-typo.rs
@@ -0,0 +1,5 @@
+// run-rustfix
+fn main() {
+    let _x = 42; //~ HELP
+    let _y = x; //~ ERROR
+}
diff --git a/tests/ui/suggestions/silenced-binding-typo.stderr b/tests/ui/suggestions/silenced-binding-typo.stderr
new file mode 100644
index 00000000000..9c0e6e26569
--- /dev/null
+++ b/tests/ui/suggestions/silenced-binding-typo.stderr
@@ -0,0 +1,14 @@
+error[E0425]: cannot find value `x` in this scope
+  --> $DIR/silenced-binding-typo.rs:4:14
+   |
+LL |     let _y = x;
+   |              ^
+   |
+help: a local variable with a similar name exists, consider changing it
+   |
+LL |     let x = 42;
+   |         ~
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0425`.
diff --git a/tests/ui/suggestions/suggest-trait-in-ufcs-in-hrtb.stderr b/tests/ui/suggestions/suggest-trait-in-ufcs-in-hrtb.stderr
index 0ca5b9b9207..0d1eed67c55 100644
--- a/tests/ui/suggestions/suggest-trait-in-ufcs-in-hrtb.stderr
+++ b/tests/ui/suggestions/suggest-trait-in-ufcs-in-hrtb.stderr
@@ -2,7 +2,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/suggest-trait-in-ufcs-in-hrtb.rs:5:38
    |
 LL | impl<S> Foo for Bar<S> where for<'a> <&'a S>::Item: Foo {}
-   |                                      ^^^^^^^^^^^^^ help: use the fully-qualified path: `<&'a S as IntoIterator>::Item`
+   |                                      ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<&'a S as IntoIterator>::Item`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/suggestions/trait-hidden-method.stderr b/tests/ui/suggestions/trait-hidden-method.stderr
index a5a65d193db..5dec2071846 100644
--- a/tests/ui/suggestions/trait-hidden-method.stderr
+++ b/tests/ui/suggestions/trait-hidden-method.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `Item` (from trait `Iterator`) must be specified
+error[E0191]: the value of the associated type `Item` in `Iterator` must be specified
   --> $DIR/trait-hidden-method.rs:6:33
    |
 LL |     Box::new(1..=10) as Box<dyn Iterator>
diff --git a/tests/ui/suggestions/trait-with-missing-associated-type-restriction.stderr b/tests/ui/suggestions/trait-with-missing-associated-type-restriction.stderr
index 7deb9a4342d..980c2455c8e 100644
--- a/tests/ui/suggestions/trait-with-missing-associated-type-restriction.stderr
+++ b/tests/ui/suggestions/trait-with-missing-associated-type-restriction.stderr
@@ -124,7 +124,7 @@ error[E0308]: mismatched types
   --> $DIR/trait-with-missing-associated-type-restriction.rs:31:9
    |
 LL | fn baz<D: std::fmt::Debug, T: Trait<A = D>>(x: T) {
-   |        - this type parameter
+   |        - found this type parameter
 LL |     qux(x.func())
    |     --- ^^^^^^^^ expected `usize`, found type parameter `D`
    |     |
diff --git a/tests/ui/suggestions/unnamable-types.rs b/tests/ui/suggestions/unnamable-types.rs
index f2485041d9b..a4e32d7c806 100644
--- a/tests/ui/suggestions/unnamable-types.rs
+++ b/tests/ui/suggestions/unnamable-types.rs
@@ -1,7 +1,7 @@
 // Test that we do not suggest to add type annotations for unnamable types.
 
 #![crate_type="lib"]
-#![feature(generators)]
+#![feature(coroutines)]
 
 const A = 5;
 //~^ ERROR: missing type for `const` item
diff --git a/tests/ui/suggestions/unnamable-types.stderr b/tests/ui/suggestions/unnamable-types.stderr
index 19e9af14535..d003b91691c 100644
--- a/tests/ui/suggestions/unnamable-types.stderr
+++ b/tests/ui/suggestions/unnamable-types.stderr
@@ -55,7 +55,7 @@ error: missing type for `const` item
 LL | const G = || -> i32 { yield 0; return 1; };
    |        ^
    |
-note: however, the inferred type `{generator@$DIR/unnamable-types.rs:37:11: 37:20}` cannot be named
+note: however, the inferred type `{coroutine@$DIR/unnamable-types.rs:37:11: 37:20}` cannot be named
   --> $DIR/unnamable-types.rs:37:11
    |
 LL | const G = || -> i32 { yield 0; return 1; };
diff --git a/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr b/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
index 175a5fbba61..7c84dd4b8ff 100644
--- a/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
+++ b/tests/ui/suggestions/use-type-argument-instead-of-assoc-type.stderr
@@ -14,7 +14,7 @@ help: replace the generic bounds with the associated types
 LL |     i: Box<dyn T<usize, usize, A = usize, C = usize, B=usize>>,
    |                                +++        +++
 
-error[E0191]: the value of the associated types `A` (from trait `T`), `C` (from trait `T`) must be specified
+error[E0191]: the value of the associated types `C` and `A` in `T` must be specified
   --> $DIR/use-type-argument-instead-of-assoc-type.rs:7:16
    |
 LL |     type A;
diff --git a/tests/ui/symbol-mangling-version/bad-value.bad.stderr b/tests/ui/symbol-mangling-version/bad-value.bad.stderr
new file mode 100644
index 00000000000..c36c73c6069
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/bad-value.bad.stderr
@@ -0,0 +1,2 @@
+error: incorrect value `bad-value` for codegen option `symbol-mangling-version` - either `legacy` or `v0` (RFC 2603) was expected
+
diff --git a/tests/ui/symbol-mangling-version/bad-value.blank.stderr b/tests/ui/symbol-mangling-version/bad-value.blank.stderr
new file mode 100644
index 00000000000..0e70af5b8ff
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/bad-value.blank.stderr
@@ -0,0 +1,2 @@
+error: incorrect value `` for codegen option `symbol-mangling-version` - either `legacy` or `v0` (RFC 2603) was expected
+
diff --git a/tests/ui/symbol-mangling-version/bad-value.no-value.stderr b/tests/ui/symbol-mangling-version/bad-value.no-value.stderr
new file mode 100644
index 00000000000..77013b72b6c
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/bad-value.no-value.stderr
@@ -0,0 +1,2 @@
+error: codegen option `symbol-mangling-version` requires either `legacy` or `v0` (RFC 2603) (C symbol-mangling-version=<value>)
+
diff --git a/tests/ui/symbol-mangling-version/bad-value.rs b/tests/ui/symbol-mangling-version/bad-value.rs
new file mode 100644
index 00000000000..7623857d49e
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/bad-value.rs
@@ -0,0 +1,6 @@
+// revisions: no-value blank bad
+// [no-value] compile-flags: -Csymbol-mangling-version
+// [blank] compile-flags: -Csymbol-mangling-version=
+// [bad] compile-flags: -Csymbol-mangling-version=bad-value
+
+fn main() {}
diff --git a/tests/ui/symbol-mangling-version/stable.rs b/tests/ui/symbol-mangling-version/stable.rs
new file mode 100644
index 00000000000..dac9bb18d1c
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/stable.rs
@@ -0,0 +1,5 @@
+// check-pass
+// revisions: v0
+// [v0] compile-flags: -Csymbol-mangling-version=v0
+
+fn main() {}
diff --git a/tests/ui/symbol-mangling-version/unstable.legacy.stderr b/tests/ui/symbol-mangling-version/unstable.legacy.stderr
new file mode 100644
index 00000000000..c5b359b41bd
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/unstable.legacy.stderr
@@ -0,0 +1,2 @@
+error: `-C symbol-mangling-version=legacy` requires `-Z unstable-options`
+
diff --git a/tests/ui/symbol-mangling-version/unstable.rs b/tests/ui/symbol-mangling-version/unstable.rs
new file mode 100644
index 00000000000..df87a39cdfb
--- /dev/null
+++ b/tests/ui/symbol-mangling-version/unstable.rs
@@ -0,0 +1,6 @@
+// revisions: legacy legacy-ok
+// [legacy] compile-flags: -Csymbol-mangling-version=legacy
+// [legacy-ok] check-pass
+// [legacy-ok] compile-flags: -Zunstable-options -Csymbol-mangling-version=legacy
+
+fn main() {}
diff --git a/tests/ui/target-feature/gate.rs b/tests/ui/target-feature/gate.rs
index 782444417a8..971a4654b4c 100644
--- a/tests/ui/target-feature/gate.rs
+++ b/tests/ui/target-feature/gate.rs
@@ -18,6 +18,7 @@
 // gate-test-bpf_target_feature
 // gate-test-aarch64_ver_target_feature
 // gate-test-csky_target_feature
+// gate-test-loongarch_target_feature
 
 #[target_feature(enable = "avx512bw")]
 //~^ ERROR: currently unstable
diff --git a/tests/ui/target-feature/gate.stderr b/tests/ui/target-feature/gate.stderr
index f56efb3bb83..0ec7427c3c4 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:22:18
+  --> $DIR/gate.rs:23:18
    |
 LL | #[target_feature(enable = "avx512bw")]
    |                  ^^^^^^^^^^^^^^^^^^^
diff --git a/tests/ui/thread-local/thread-local-static.stderr b/tests/ui/thread-local/thread-local-static.mir.stderr
index 712050a25fc..607d7ee902c 100644
--- a/tests/ui/thread-local/thread-local-static.stderr
+++ b/tests/ui/thread-local/thread-local-static.mir.stderr
@@ -1,5 +1,5 @@
 error[E0658]: mutable references are not allowed in constant functions
-  --> $DIR/thread-local-static.rs:7:12
+  --> $DIR/thread-local-static.rs:10:12
    |
 LL | const fn g(x: &mut [u32; 8]) {
    |            ^
@@ -8,13 +8,13 @@ LL | const fn g(x: &mut [u32; 8]) {
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0625]: thread-local statics cannot be accessed at compile-time
-  --> $DIR/thread-local-static.rs:9:28
+  --> $DIR/thread-local-static.rs:12:28
    |
 LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    |                            ^^^^^^^^^^^^
 
 error[E0013]: constant functions cannot refer to statics
-  --> $DIR/thread-local-static.rs:9:28
+  --> $DIR/thread-local-static.rs:12:28
    |
 LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    |                            ^^^^^^^^^^^^
@@ -22,7 +22,7 @@ LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    = help: consider extracting the value of the `static` to a `const`, and referring to that
 
 error[E0658]: mutable references are not allowed in constant functions
-  --> $DIR/thread-local-static.rs:9:23
+  --> $DIR/thread-local-static.rs:12:23
    |
 LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    |                       ^^^^^^^^^^^^^^^^^
@@ -31,7 +31,7 @@ LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
 
 error[E0133]: use of mutable static is unsafe and requires unsafe function or block
-  --> $DIR/thread-local-static.rs:9:23
+  --> $DIR/thread-local-static.rs:12:23
    |
 LL |     std::mem::swap(x, &mut STATIC_VAR_2)
    |                       ^^^^^^^^^^^^^^^^^ use of mutable static
diff --git a/tests/ui/thread-local/thread-local-static.rs b/tests/ui/thread-local/thread-local-static.rs
index c7fee9e6b4c..afaffbb7e9b 100644
--- a/tests/ui/thread-local/thread-local-static.rs
+++ b/tests/ui/thread-local/thread-local-static.rs
@@ -1,7 +1,10 @@
 // edition:2018
+// revisions: mir thir
+//thir: -Zthir-unsafeck
 
 #![feature(thread_local)]
 #![feature(const_swap)]
+
 #[thread_local]
 static mut STATIC_VAR_2: [u32; 8] = [4; 8];
 const fn g(x: &mut [u32; 8]) {
diff --git a/tests/ui/thread-local/thread-local-static.thir.stderr b/tests/ui/thread-local/thread-local-static.thir.stderr
new file mode 100644
index 00000000000..607d7ee902c
--- /dev/null
+++ b/tests/ui/thread-local/thread-local-static.thir.stderr
@@ -0,0 +1,44 @@
+error[E0658]: mutable references are not allowed in constant functions
+  --> $DIR/thread-local-static.rs:10:12
+   |
+LL | const fn g(x: &mut [u32; 8]) {
+   |            ^
+   |
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
+
+error[E0625]: thread-local statics cannot be accessed at compile-time
+  --> $DIR/thread-local-static.rs:12:28
+   |
+LL |     std::mem::swap(x, &mut STATIC_VAR_2)
+   |                            ^^^^^^^^^^^^
+
+error[E0013]: constant functions cannot refer to statics
+  --> $DIR/thread-local-static.rs:12:28
+   |
+LL |     std::mem::swap(x, &mut STATIC_VAR_2)
+   |                            ^^^^^^^^^^^^
+   |
+   = help: consider extracting the value of the `static` to a `const`, and referring to that
+
+error[E0658]: mutable references are not allowed in constant functions
+  --> $DIR/thread-local-static.rs:12:23
+   |
+LL |     std::mem::swap(x, &mut STATIC_VAR_2)
+   |                       ^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #57349 <https://github.com/rust-lang/rust/issues/57349> for more information
+   = help: add `#![feature(const_mut_refs)]` to the crate attributes to enable
+
+error[E0133]: use of mutable static is unsafe and requires unsafe function or block
+  --> $DIR/thread-local-static.rs:12:23
+   |
+LL |     std::mem::swap(x, &mut STATIC_VAR_2)
+   |                       ^^^^^^^^^^^^^^^^^ use of mutable static
+   |
+   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0013, E0133, E0625, E0658.
+For more information about an error, try `rustc --explain E0013`.
diff --git a/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs b/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs
index fd53bb607f7..61f54ac4e0b 100644
--- a/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs
+++ b/tests/ui/threads-sendsync/sync-send-iterators-in-libcollections.rs
@@ -37,7 +37,7 @@ macro_rules! is_sync_send {
 }
 
 fn main() {
-    // The iterator "generator" list should exhaust what corresponding
+    // The iterator "coroutine" list should exhaust what corresponding
     // implementations have where `Sync` and `Send` semantics apply.
     all_sync_send!(BinaryHeap::<usize>::new(), iter, drain, into_iter);
 
diff --git a/tests/ui/trait-bounds/mismatch-fn-trait.stderr b/tests/ui/trait-bounds/mismatch-fn-trait.stderr
index 961e6d88fbe..519aa9ea3f3 100644
--- a/tests/ui/trait-bounds/mismatch-fn-trait.stderr
+++ b/tests/ui/trait-bounds/mismatch-fn-trait.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `FnMut<(i32,)>` closure, found `impl FnMut(u32)`
+error[E0277]: expected a `FnMut(i32)` closure, found `impl FnMut(u32)`
   --> $DIR/mismatch-fn-trait.rs:4:10
    |
 LL |     take(f)
-   |     ---- ^ expected an `FnMut<(i32,)>` closure, found `impl FnMut(u32)`
+   |     ---- ^ expected an `FnMut(i32)` closure, found `impl FnMut(u32)`
    |     |
    |     required by a bound introduced by this call
    |
@@ -14,11 +14,11 @@ note: required by a bound in `take`
 LL | fn take(_f: impl FnMut(i32)) {}
    |                  ^^^^^^^^^^ required by this bound in `take`
 
-error[E0277]: expected a `FnMut<(i32,)>` closure, found `impl FnMut(i32, i32)`
+error[E0277]: expected a `FnMut(i32)` closure, found `impl FnMut(i32, i32)`
   --> $DIR/mismatch-fn-trait.rs:9:10
    |
 LL |     take(f)
-   |     ---- ^ expected an `FnMut<(i32,)>` closure, found `impl FnMut(i32, i32)`
+   |     ---- ^ expected an `FnMut(i32)` closure, found `impl FnMut(i32, i32)`
    |     |
    |     required by a bound introduced by this call
    |
@@ -29,11 +29,11 @@ note: required by a bound in `take`
 LL | fn take(_f: impl FnMut(i32)) {}
    |                  ^^^^^^^^^^ required by this bound in `take`
 
-error[E0277]: expected a `FnMut<(i32,)>` closure, found `impl FnMut()`
+error[E0277]: expected a `FnMut(i32)` closure, found `impl FnMut()`
   --> $DIR/mismatch-fn-trait.rs:14:10
    |
 LL |     take(f)
-   |     ---- ^ expected an `FnMut<(i32,)>` closure, found `impl FnMut()`
+   |     ---- ^ expected an `FnMut(i32)` closure, found `impl FnMut()`
    |     |
    |     required by a bound introduced by this call
    |
@@ -44,11 +44,11 @@ note: required by a bound in `take`
 LL | fn take(_f: impl FnMut(i32)) {}
    |                  ^^^^^^^^^^ required by this bound in `take`
 
-error[E0277]: expected a `FnMut<(i32,)>` closure, found `impl FnOnce(i32)`
+error[E0277]: expected a `FnMut(i32)` closure, found `impl FnOnce(i32)`
   --> $DIR/mismatch-fn-trait.rs:19:10
    |
 LL |     take(f)
-   |     ---- ^ expected an `FnMut<(i32,)>` closure, found `impl FnOnce(i32)`
+   |     ---- ^ expected an `FnMut(i32)` closure, found `impl FnOnce(i32)`
    |     |
    |     required by a bound introduced by this call
    |
@@ -59,11 +59,11 @@ note: required by a bound in `take`
 LL | fn take(_f: impl FnMut(i32)) {}
    |                  ^^^^^^^^^^ required by this bound in `take`
 
-error[E0277]: expected a `FnMut<(i32,)>` closure, found `impl FnOnce(u32)`
+error[E0277]: expected a `FnMut(i32)` closure, found `impl FnOnce(u32)`
   --> $DIR/mismatch-fn-trait.rs:24:10
    |
 LL |     take(f)
-   |     ---- ^ expected an `FnMut<(i32,)>` closure, found `impl FnOnce(u32)`
+   |     ---- ^ expected an `FnMut(i32)` closure, found `impl FnOnce(u32)`
    |     |
    |     required by a bound introduced by this call
    |
diff --git a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed
new file mode 100644
index 00000000000..b3f5ad52db5
--- /dev/null
+++ b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.fixed
@@ -0,0 +1,11 @@
+// run-rustfix
+pub trait MyTrait {
+    type T;
+
+    fn bar(self) -> Self::T;
+}
+
+pub fn foo<A: MyTrait<T = B>, B>(a: A) -> B {
+    return a.bar(); //~ ERROR mismatched types
+}
+fn main() {}
diff --git a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs
new file mode 100644
index 00000000000..213abda7782
--- /dev/null
+++ b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.rs
@@ -0,0 +1,11 @@
+// run-rustfix
+pub trait MyTrait {
+    type T;
+
+    fn bar(self) -> Self::T;
+}
+
+pub fn foo<A: MyTrait, B>(a: A) -> B {
+    return a.bar(); //~ ERROR mismatched types
+}
+fn main() {}
diff --git a/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.stderr b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.stderr
new file mode 100644
index 00000000000..61132efc414
--- /dev/null
+++ b/tests/ui/trait-bounds/restrict-assoc-type-of-generic-bound.stderr
@@ -0,0 +1,20 @@
+error[E0308]: mismatched types
+  --> $DIR/restrict-assoc-type-of-generic-bound.rs:9:12
+   |
+LL | pub fn foo<A: MyTrait, B>(a: A) -> B {
+   |                        -           - expected `B` because of return type
+   |                        |
+   |                        expected this type parameter
+LL |     return a.bar();
+   |            ^^^^^^^ expected type parameter `B`, found associated type
+   |
+   = note: expected type parameter `B`
+             found associated type `<A as MyTrait>::T`
+help: consider further restricting this bound
+   |
+LL | pub fn foo<A: MyTrait<T = B>, B>(a: A) -> B {
+   |                      +++++++
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/traits/alias/object-fail.stderr b/tests/ui/traits/alias/object-fail.stderr
index 048a150df8c..a27a3ea0ec0 100644
--- a/tests/ui/traits/alias/object-fail.stderr
+++ b/tests/ui/traits/alias/object-fail.stderr
@@ -9,7 +9,7 @@ note: for a trait to be "object safe" it needs to allow building a vtable to all
    |
    = note: the trait cannot be made into an object because it uses `Self` as a type parameter
 
-error[E0191]: the value of the associated type `Item` (from trait `Iterator`) must be specified
+error[E0191]: the value of the associated type `Item` in `Iterator` must be specified
   --> $DIR/object-fail.rs:9:17
    |
 LL |     let _: &dyn IteratorAlias = &vec![123].into_iter();
diff --git a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.rs b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.rs
new file mode 100644
index 00000000000..e0edd522431
--- /dev/null
+++ b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.rs
@@ -0,0 +1,43 @@
+// Regression test for #116464
+// Checks that we do not suggest Trait<..., Assoc=arg> when the trait
+// is referred to from one of its impls but do so at all other places
+
+pub trait Trait<T> {
+    type Assoc;
+}
+
+impl<T, S> Trait<T> for i32 {
+    type Assoc = String;
+}
+
+// Should not not trigger suggestion here...
+impl<T, S> Trait<T, S> for () {}
+//~^ ERROR trait takes 1 generic argument but 2 generic arguments were supplied
+
+//... but should do so in all of the below cases except the last one
+fn func<T: Trait<u32, String>>(t: T) -> impl Trait<(), i32> {
+//~^ ERROR trait takes 1 generic argument but 2 generic arguments were supplied
+//~| ERROR trait takes 1 generic argument but 2 generic arguments were supplied
+    3
+}
+
+struct Struct<T: Trait<u32, String>> {
+//~^ ERROR trait takes 1 generic argument but 2 generic arguments were supplied
+    a: T
+}
+
+trait AnotherTrait<T: Trait<T, i32>> {}
+//~^ ERROR trait takes 1 generic argument but 2 generic arguments were supplied
+
+impl<T: Trait<u32, String>> Struct<T> {}
+//~^ ERROR trait takes 1 generic argument but 2 generic arguments were supplied
+
+// Test for self type. Should not trigger suggestion as it doesn't have an
+// associated type
+trait YetAnotherTrait {}
+impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, U> {}
+//~^ ERROR struct takes 1 generic argument but 2 generic arguments were supplied
+
+
+fn main() {
+}
diff --git a/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr
new file mode 100644
index 00000000000..711ccf1b668
--- /dev/null
+++ b/tests/ui/traits/associated_type_bound/116464-invalid-assoc-type-suggestion-in-trait-impl.stderr
@@ -0,0 +1,109 @@
+error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:14:12
+   |
+LL | impl<T, S> Trait<T, S> for () {}
+   |            ^^^^^ expected 1 generic argument
+   |
+note: trait defined here, with 1 generic parameter: `T`
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:5:11
+   |
+LL | pub trait Trait<T> {
+   |           ^^^^^ -
+
+error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:18:12
+   |
+LL | fn func<T: Trait<u32, String>>(t: T) -> impl Trait<(), i32> {
+   |            ^^^^^ expected 1 generic argument
+   |
+note: trait defined here, with 1 generic parameter: `T`
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:5:11
+   |
+LL | pub trait Trait<T> {
+   |           ^^^^^ -
+help: replace the generic bound with the associated type
+   |
+LL | fn func<T: Trait<u32, Assoc = String>>(t: T) -> impl Trait<(), i32> {
+   |                       +++++++
+
+error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:18:46
+   |
+LL | fn func<T: Trait<u32, String>>(t: T) -> impl Trait<(), i32> {
+   |                                              ^^^^^ expected 1 generic argument
+   |
+note: trait defined here, with 1 generic parameter: `T`
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:5:11
+   |
+LL | pub trait Trait<T> {
+   |           ^^^^^ -
+help: replace the generic bound with the associated type
+   |
+LL | fn func<T: Trait<u32, String>>(t: T) -> impl Trait<(), Assoc = i32> {
+   |                                                        +++++++
+
+error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:24:18
+   |
+LL | struct Struct<T: Trait<u32, String>> {
+   |                  ^^^^^ expected 1 generic argument
+   |
+note: trait defined here, with 1 generic parameter: `T`
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:5:11
+   |
+LL | pub trait Trait<T> {
+   |           ^^^^^ -
+help: replace the generic bound with the associated type
+   |
+LL | struct Struct<T: Trait<u32, Assoc = String>> {
+   |                             +++++++
+
+error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:29:23
+   |
+LL | trait AnotherTrait<T: Trait<T, i32>> {}
+   |                       ^^^^^ expected 1 generic argument
+   |
+note: trait defined here, with 1 generic parameter: `T`
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:5:11
+   |
+LL | pub trait Trait<T> {
+   |           ^^^^^ -
+help: replace the generic bound with the associated type
+   |
+LL | trait AnotherTrait<T: Trait<T, Assoc = i32>> {}
+   |                                +++++++
+
+error[E0107]: trait takes 1 generic argument but 2 generic arguments were supplied
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:32:9
+   |
+LL | impl<T: Trait<u32, String>> Struct<T> {}
+   |         ^^^^^ expected 1 generic argument
+   |
+note: trait defined here, with 1 generic parameter: `T`
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:5:11
+   |
+LL | pub trait Trait<T> {
+   |           ^^^^^ -
+help: replace the generic bound with the associated type
+   |
+LL | impl<T: Trait<u32, Assoc = String>> Struct<T> {}
+   |                    +++++++
+
+error[E0107]: struct takes 1 generic argument but 2 generic arguments were supplied
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:38:58
+   |
+LL | impl<T: Trait<u32, Assoc=String>, U> YetAnotherTrait for Struct<T, U> {}
+   |                                                          ^^^^^^    - help: remove this generic argument
+   |                                                          |
+   |                                                          expected 1 generic argument
+   |
+note: struct defined here, with 1 generic parameter: `T`
+  --> $DIR/116464-invalid-assoc-type-suggestion-in-trait-impl.rs:24:8
+   |
+LL | struct Struct<T: Trait<u32, String>> {
+   |        ^^^^^^ -
+
+error: aborting due to 7 previous errors
+
+For more information about this error, try `rustc --explain E0107`.
diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.rs b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.rs
index eb2fb6e841b..1359eb6cb87 100644
--- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.rs
+++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.rs
@@ -11,5 +11,5 @@ fn f<T: for<'r> X<'r> + ?Sized>() {
 
 fn main() {
     f::<dyn for<'x> X<'x, F = i32>>();
-    //~^ expected a `FnOnce<(&i32,)>` closure, found `i32`
+    //~^ expected a `FnOnce(&i32)` closure, found `i32`
 }
diff --git a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr
index 10e82c54e0f..68b9319d65c 100644
--- a/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr
+++ b/tests/ui/traits/associated_type_bound/check-trait-object-bounds-2.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `FnOnce<(&i32,)>` closure, found `i32`
+error[E0277]: expected a `FnOnce(&i32)` closure, found `i32`
   --> $DIR/check-trait-object-bounds-2.rs:13:9
    |
 LL |     f::<dyn for<'x> X<'x, F = i32>>();
-   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an `FnOnce<(&i32,)>` closure, found `i32`
+   |         ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an `FnOnce(&i32)` closure, found `i32`
    |
    = help: the trait `for<'a> FnOnce<(&'a i32,)>` is not implemented for `i32`
 note: required by a bound in `f`
diff --git a/tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs b/tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs
index f9a93476411..f8e3f8e968e 100644
--- a/tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs
+++ b/tests/ui/traits/bound/assoc-fn-bound-root-obligation.rs
@@ -1,7 +1,7 @@
 fn strip_lf(s: &str) -> &str {
     s.strip_suffix(b'\n').unwrap_or(s)
-    //~^ ERROR expected a `FnMut<(char,)>` closure, found `u8`
-    //~| NOTE expected an `FnMut<(char,)>` closure, found `u8`
+    //~^ ERROR expected a `FnMut(char)` closure, found `u8`
+    //~| NOTE expected an `FnMut(char)` closure, found `u8`
     //~| HELP the trait `FnMut<(char,)>` is not implemented for `u8`
     //~| HELP the following other types implement trait `Pattern<'a>`:
     //~| NOTE required for `u8` to implement `Pattern<'_>`
diff --git a/tests/ui/traits/bound/assoc-fn-bound-root-obligation.stderr b/tests/ui/traits/bound/assoc-fn-bound-root-obligation.stderr
index b1c683e4729..f30fe12b216 100644
--- a/tests/ui/traits/bound/assoc-fn-bound-root-obligation.stderr
+++ b/tests/ui/traits/bound/assoc-fn-bound-root-obligation.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `FnMut<(char,)>` closure, found `u8`
+error[E0277]: expected a `FnMut(char)` closure, found `u8`
   --> $DIR/assoc-fn-bound-root-obligation.rs:2:7
    |
 LL |     s.strip_suffix(b'\n').unwrap_or(s)
-   |       ^^^^^^^^^^^^ expected an `FnMut<(char,)>` closure, found `u8`
+   |       ^^^^^^^^^^^^ expected an `FnMut(char)` closure, found `u8`
    |
    = help: the trait `FnMut<(char,)>` is not implemented for `u8`
    = help: the following other types implement trait `Pattern<'a>`:
diff --git a/tests/ui/traits/bound/on-structs-and-enums-static.rs b/tests/ui/traits/bound/on-structs-and-enums-static.rs
index df3f8b8a599..066416cb362 100644
--- a/tests/ui/traits/bound/on-structs-and-enums-static.rs
+++ b/tests/ui/traits/bound/on-structs-and-enums-static.rs
@@ -8,7 +8,7 @@ struct Foo<T:Trait> {
 
 static X: Foo<usize> = Foo {
 //~^ ERROR E0277
-    x: 1,
+    x: 1, //~ ERROR: E0277
 };
 
 fn main() {
diff --git a/tests/ui/traits/bound/on-structs-and-enums-static.stderr b/tests/ui/traits/bound/on-structs-and-enums-static.stderr
index fa14aff684d..28bbe00c582 100644
--- a/tests/ui/traits/bound/on-structs-and-enums-static.stderr
+++ b/tests/ui/traits/bound/on-structs-and-enums-static.stderr
@@ -15,6 +15,23 @@ note: required by a bound in `Foo`
 LL | struct Foo<T:Trait> {
    |              ^^^^^ required by this bound in `Foo`
 
-error: aborting due to previous error
+error[E0277]: the trait bound `usize: Trait` is not satisfied
+  --> $DIR/on-structs-and-enums-static.rs:11:8
+   |
+LL |     x: 1,
+   |        ^ the trait `Trait` is not implemented for `usize`
+   |
+help: this trait has no implementations, consider adding one
+  --> $DIR/on-structs-and-enums-static.rs:1:1
+   |
+LL | trait Trait {
+   | ^^^^^^^^^^^
+note: required by a bound in `Foo`
+  --> $DIR/on-structs-and-enums-static.rs:5:14
+   |
+LL | struct Foo<T:Trait> {
+   |              ^^^^^ required by this bound in `Foo`
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/traits/issue-38604.stderr b/tests/ui/traits/issue-38604.stderr
index d5327602430..3ab9af21bc4 100644
--- a/tests/ui/traits/issue-38604.stderr
+++ b/tests/ui/traits/issue-38604.stderr
@@ -11,6 +11,7 @@ LL | trait Foo where u32: Q<Self> {
    |       ---            ^^^^^^^ ...because it uses `Self` as a type parameter
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `()` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/issue-38604.rs:15:9
@@ -25,6 +26,7 @@ LL | trait Foo where u32: Q<Self> {
    |       ---            ^^^^^^^ ...because it uses `Self` as a type parameter
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `()` implements the trait, consider using it directly instead
    = note: required for the cast from `Box<()>` to `Box<dyn Foo>`
 
 error: aborting due to 2 previous errors
diff --git a/tests/ui/traits/issue-52893.stderr b/tests/ui/traits/issue-52893.stderr
index db807a38830..c57921a08aa 100644
--- a/tests/ui/traits/issue-52893.stderr
+++ b/tests/ui/traits/issue-52893.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-52893.rs:53:22
    |
 LL | impl<F, Name, P> AddClass<Name, F> for Class<P>
-   |      - this type parameter
+   |      - expected this type parameter
 ...
 LL |         builder.push(output);
    |                 ---- ^^^^^^ expected type parameter `F`, found `Class<P>`
diff --git a/tests/ui/traits/issue-59029-1.stderr b/tests/ui/traits/issue-59029-1.stderr
index 51354bcc545..5c47eefcd6c 100644
--- a/tests/ui/traits/issue-59029-1.stderr
+++ b/tests/ui/traits/issue-59029-1.stderr
@@ -2,13 +2,13 @@ error[E0220]: associated type `Res` not found for `Self`
   --> $DIR/issue-59029-1.rs:5:52
    |
 LL | trait MkSvc<Target, Req> = Svc<Target> where Self::Res: Svc<Req>;
-   |                                                    ^^^ there is a similarly named associated type `Res` in the trait `Svc`
+   |                                                    ^^^ there is an associated type `Res` in the trait `Svc`
 
 error[E0220]: associated type `Res` not found for `Self`
   --> $DIR/issue-59029-1.rs:5:52
    |
 LL | trait MkSvc<Target, Req> = Svc<Target> where Self::Res: Svc<Req>;
-   |                                                    ^^^ there is a similarly named associated type `Res` in the trait `Svc`
+   |                                                    ^^^ there is an associated type `Res` in the trait `Svc`
    |
    = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
 
diff --git a/tests/ui/traits/item-privacy.stderr b/tests/ui/traits/item-privacy.stderr
index f5381318925..244cc2fc592 100644
--- a/tests/ui/traits/item-privacy.stderr
+++ b/tests/ui/traits/item-privacy.stderr
@@ -8,11 +8,10 @@ LL |     S.a();
    |       ^ method not found in `S`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
-note: `method::A` defines an item `a`, perhaps you need to implement it
-  --> $DIR/item-privacy.rs:6:5
+help: the following trait is implemented but not in scope; perhaps add a `use` for it:
+   |
+LL + use method::A;
    |
-LL |     trait A {
-   |     ^^^^^^^
 
 error[E0599]: no method named `b` found for struct `S` in the current scope
   --> $DIR/item-privacy.rs:68:7
@@ -51,11 +50,10 @@ LL |     S::a(&S);
    |        ^ function or associated item not found in `S`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
-note: `method::A` defines an item `a`, perhaps you need to implement it
-  --> $DIR/item-privacy.rs:6:5
+help: the following trait is implemented but not in scope; perhaps add a `use` for it:
+   |
+LL + use method::A;
    |
-LL |     trait A {
-   |     ^^^^^^^
 
 error[E0599]: no function or associated item named `b` found for struct `S` in the current scope
   --> $DIR/item-privacy.rs:80:8
@@ -91,11 +89,10 @@ LL |     S::A;
    |        ^ associated item not found in `S`
    |
    = help: items from traits can only be used if the trait is implemented and in scope
-note: `assoc_const::A` defines an item `A`, perhaps you need to implement it
-  --> $DIR/item-privacy.rs:24:5
+help: the following trait is implemented but not in scope; perhaps add a `use` for it:
+   |
+LL + use assoc_const::A;
    |
-LL |     trait A {
-   |     ^^^^^^^
 
 error[E0599]: no associated item named `B` found for struct `S` in the current scope
   --> $DIR/item-privacy.rs:98:8
@@ -143,6 +140,7 @@ LL |         const C: u8 = 0;
    = help: consider moving `C` to another trait
    = help: consider moving `A` to another trait
    = help: consider moving `B` to another trait
+   = help: only type `S` implements the trait, consider using it directly instead
 
 error[E0223]: ambiguous associated type
   --> $DIR/item-privacy.rs:115:12
@@ -159,13 +157,13 @@ error[E0223]: ambiguous associated type
   --> $DIR/item-privacy.rs:116:12
    |
 LL |     let _: S::B;
-   |            ^^^^ help: use the fully-qualified path: `<S as assoc_ty::B>::B`
+   |            ^^^^ help: use fully-qualified syntax: `<S as assoc_ty::B>::B`
 
 error[E0223]: ambiguous associated type
   --> $DIR/item-privacy.rs:117:12
    |
 LL |     let _: S::C;
-   |            ^^^^ help: use the fully-qualified path: `<S as assoc_ty::C>::C`
+   |            ^^^^ help: use fully-qualified syntax: `<S as assoc_ty::C>::C`
 
 error[E0624]: associated type `A` is private
   --> $DIR/item-privacy.rs:119:12
diff --git a/tests/ui/traits/new-solver/coroutine.fail.stderr b/tests/ui/traits/new-solver/coroutine.fail.stderr
new file mode 100644
index 00000000000..14e67727d0b
--- /dev/null
+++ b/tests/ui/traits/new-solver/coroutine.fail.stderr
@@ -0,0 +1,64 @@
+error[E0277]: the trait bound `{coroutine@$DIR/coroutine.rs:18:21: 18:23}: Coroutine<A>` is not satisfied
+  --> $DIR/coroutine.rs:18:21
+   |
+LL |       needs_coroutine(|| {
+   |  _____---------------_^
+   | |     |
+   | |     required by a bound introduced by this call
+LL | |
+LL | |
+LL | |
+LL | |         yield ();
+LL | |     });
+   | |_____^ the trait `Coroutine<A>` is not implemented for `{coroutine@$DIR/coroutine.rs:18:21: 18:23}`
+   |
+note: required by a bound in `needs_coroutine`
+  --> $DIR/coroutine.rs:14:28
+   |
+LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
+   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `needs_coroutine`
+
+error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:18:21: 18:23} as Coroutine<A>>::Yield == B`
+  --> $DIR/coroutine.rs:18:21
+   |
+LL |       needs_coroutine(|| {
+   |  _____---------------_^
+   | |     |
+   | |     required by a bound introduced by this call
+LL | |
+LL | |
+LL | |
+LL | |         yield ();
+LL | |     });
+   | |_____^ types differ
+   |
+note: required by a bound in `needs_coroutine`
+  --> $DIR/coroutine.rs:14:41
+   |
+LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
+   |                                         ^^^^^^^^^ required by this bound in `needs_coroutine`
+
+error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:18:21: 18:23} as Coroutine<A>>::Return == C`
+  --> $DIR/coroutine.rs:18:21
+   |
+LL |       needs_coroutine(|| {
+   |  _____---------------_^
+   | |     |
+   | |     required by a bound introduced by this call
+LL | |
+LL | |
+LL | |
+LL | |         yield ();
+LL | |     });
+   | |_____^ types differ
+   |
+note: required by a bound in `needs_coroutine`
+  --> $DIR/coroutine.rs:14:52
+   |
+LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
+   |                                                    ^^^^^^^^^^ required by this bound in `needs_coroutine`
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0271, E0277.
+For more information about an error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/new-solver/coroutine.rs b/tests/ui/traits/new-solver/coroutine.rs
new file mode 100644
index 00000000000..af16f70fb56
--- /dev/null
+++ b/tests/ui/traits/new-solver/coroutine.rs
@@ -0,0 +1,32 @@
+// compile-flags: -Ztrait-solver=next
+// edition: 2021
+// revisions: pass fail
+//[pass] check-pass
+
+#![feature(coroutine_trait, coroutines)]
+
+use std::ops::Coroutine;
+
+struct A;
+struct B;
+struct C;
+
+fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
+
+#[cfg(fail)]
+fn main() {
+    needs_coroutine(|| {
+        //[fail]~^ ERROR Coroutine<A>` is not satisfied
+        //[fail]~| ERROR as Coroutine<A>>::Yield == B`
+        //[fail]~| ERROR as Coroutine<A>>::Return == C`
+        yield ();
+    });
+}
+
+#[cfg(pass)]
+fn main() {
+    needs_coroutine(|_: A| {
+        let _: A = yield B;
+        C
+    })
+}
diff --git a/tests/ui/traits/new-solver/fn-trait.rs b/tests/ui/traits/new-solver/fn-trait.rs
index 0599e51d7ad..0a19e626553 100644
--- a/tests/ui/traits/new-solver/fn-trait.rs
+++ b/tests/ui/traits/new-solver/fn-trait.rs
@@ -18,15 +18,15 @@ fn main() {
     require_fn(f);
     require_fn(f as fn() -> i32);
     require_fn(f as unsafe fn() -> i32);
-    //~^ ERROR: expected a `Fn<()>` closure, found `unsafe fn() -> i32`
+    //~^ ERROR: expected a `Fn()` closure, found `unsafe fn() -> i32`
     //~| ERROR: type mismatch resolving `<unsafe fn() -> i32 as FnOnce<()>>::Output == i32`
     require_fn(g);
-    //~^ ERROR: expected a `Fn<()>` closure, found `extern "C" fn() -> i32 {g}`
+    //~^ ERROR: expected a `Fn()` closure, found `extern "C" fn() -> i32 {g}`
     //~| ERROR: type mismatch resolving `<extern "C" fn() -> i32 {g} as FnOnce<()>>::Output == i32`
     require_fn(g as extern "C" fn() -> i32);
-    //~^ ERROR: expected a `Fn<()>` closure, found `extern "C" fn() -> i32`
+    //~^ ERROR: expected a `Fn()` closure, found `extern "C" fn() -> i32`
     //~| ERROR: type mismatch resolving `<extern "C" fn() -> i32 as FnOnce<()>>::Output == i32`
     require_fn(h);
-    //~^ ERROR: expected a `Fn<()>` closure, found `unsafe fn() -> i32 {h}`
+    //~^ ERROR: expected a `Fn()` closure, found `unsafe fn() -> i32 {h}`
     //~| ERROR: type mismatch resolving `<unsafe fn() -> i32 {h} as FnOnce<()>>::Output == i32`
 }
diff --git a/tests/ui/traits/new-solver/fn-trait.stderr b/tests/ui/traits/new-solver/fn-trait.stderr
index d52bcaf25b8..e33487235e6 100644
--- a/tests/ui/traits/new-solver/fn-trait.stderr
+++ b/tests/ui/traits/new-solver/fn-trait.stderr
@@ -1,4 +1,4 @@
-error[E0277]: expected a `Fn<()>` closure, found `unsafe fn() -> i32`
+error[E0277]: expected a `Fn()` closure, found `unsafe fn() -> i32`
   --> $DIR/fn-trait.rs:20:16
    |
 LL |     require_fn(f as unsafe fn() -> i32);
@@ -7,6 +7,7 @@ LL |     require_fn(f as unsafe fn() -> i32);
    |     required by a bound introduced by this call
    |
    = help: the trait `Fn<()>` is not implemented for `unsafe fn() -> i32`
+   = note: unsafe function cannot be called generically without an unsafe block
    = note: wrap the `unsafe fn() -> i32` in a closure with no arguments: `|| { /* code */ }`
 note: required by a bound in `require_fn`
   --> $DIR/fn-trait.rs:3:23
@@ -28,11 +29,11 @@ note: required by a bound in `require_fn`
 LL | fn require_fn(_: impl Fn() -> i32) {}
    |                               ^^^ required by this bound in `require_fn`
 
-error[E0277]: expected a `Fn<()>` closure, found `extern "C" fn() -> i32 {g}`
+error[E0277]: expected a `Fn()` closure, found `extern "C" fn() -> i32 {g}`
   --> $DIR/fn-trait.rs:23:16
    |
 LL |     require_fn(g);
-   |     ---------- ^ expected an `Fn<()>` closure, found `extern "C" fn() -> i32 {g}`
+   |     ---------- ^ expected an `Fn()` closure, found `extern "C" fn() -> i32 {g}`
    |     |
    |     required by a bound introduced by this call
    |
@@ -58,11 +59,11 @@ note: required by a bound in `require_fn`
 LL | fn require_fn(_: impl Fn() -> i32) {}
    |                               ^^^ required by this bound in `require_fn`
 
-error[E0277]: expected a `Fn<()>` closure, found `extern "C" fn() -> i32`
+error[E0277]: expected a `Fn()` closure, found `extern "C" fn() -> i32`
   --> $DIR/fn-trait.rs:26:16
    |
 LL |     require_fn(g as extern "C" fn() -> i32);
-   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an `Fn<()>` closure, found `extern "C" fn() -> i32`
+   |     ---------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an `Fn()` closure, found `extern "C" fn() -> i32`
    |     |
    |     required by a bound introduced by this call
    |
@@ -88,7 +89,7 @@ note: required by a bound in `require_fn`
 LL | fn require_fn(_: impl Fn() -> i32) {}
    |                               ^^^ required by this bound in `require_fn`
 
-error[E0277]: expected a `Fn<()>` closure, found `unsafe fn() -> i32 {h}`
+error[E0277]: expected a `Fn()` closure, found `unsafe fn() -> i32 {h}`
   --> $DIR/fn-trait.rs:29:16
    |
 LL |     require_fn(h);
@@ -97,6 +98,7 @@ LL |     require_fn(h);
    |     required by a bound introduced by this call
    |
    = help: the trait `Fn<()>` is not implemented for fn item `unsafe fn() -> i32 {h}`
+   = note: unsafe function cannot be called generically without an unsafe block
    = note: wrap the `unsafe fn() -> i32 {h}` in a closure with no arguments: `|| { /* code */ }`
 note: required by a bound in `require_fn`
   --> $DIR/fn-trait.rs:3:23
diff --git a/tests/ui/traits/new-solver/generator.fail.stderr b/tests/ui/traits/new-solver/generator.fail.stderr
deleted file mode 100644
index e3fe4bf5a6a..00000000000
--- a/tests/ui/traits/new-solver/generator.fail.stderr
+++ /dev/null
@@ -1,64 +0,0 @@
-error[E0277]: the trait bound `{generator@$DIR/generator.rs:18:21: 18:23}: Generator<A>` is not satisfied
-  --> $DIR/generator.rs:18:21
-   |
-LL |       needs_generator(|| {
-   |  _____---------------_^
-   | |     |
-   | |     required by a bound introduced by this call
-LL | |
-LL | |
-LL | |
-LL | |         yield ();
-LL | |     });
-   | |_____^ the trait `Generator<A>` is not implemented for `{generator@$DIR/generator.rs:18:21: 18:23}`
-   |
-note: required by a bound in `needs_generator`
-  --> $DIR/generator.rs:14:28
-   |
-LL | fn needs_generator(_: impl Generator<A, Yield = B, Return = C>) {}
-   |                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `needs_generator`
-
-error[E0271]: type mismatch resolving `<{generator@$DIR/generator.rs:18:21: 18:23} as Generator<A>>::Yield == B`
-  --> $DIR/generator.rs:18:21
-   |
-LL |       needs_generator(|| {
-   |  _____---------------_^
-   | |     |
-   | |     required by a bound introduced by this call
-LL | |
-LL | |
-LL | |
-LL | |         yield ();
-LL | |     });
-   | |_____^ types differ
-   |
-note: required by a bound in `needs_generator`
-  --> $DIR/generator.rs:14:41
-   |
-LL | fn needs_generator(_: impl Generator<A, Yield = B, Return = C>) {}
-   |                                         ^^^^^^^^^ required by this bound in `needs_generator`
-
-error[E0271]: type mismatch resolving `<{generator@$DIR/generator.rs:18:21: 18:23} as Generator<A>>::Return == C`
-  --> $DIR/generator.rs:18:21
-   |
-LL |       needs_generator(|| {
-   |  _____---------------_^
-   | |     |
-   | |     required by a bound introduced by this call
-LL | |
-LL | |
-LL | |
-LL | |         yield ();
-LL | |     });
-   | |_____^ types differ
-   |
-note: required by a bound in `needs_generator`
-  --> $DIR/generator.rs:14:52
-   |
-LL | fn needs_generator(_: impl Generator<A, Yield = B, Return = C>) {}
-   |                                                    ^^^^^^^^^^ required by this bound in `needs_generator`
-
-error: aborting due to 3 previous errors
-
-Some errors have detailed explanations: E0271, E0277.
-For more information about an error, try `rustc --explain E0271`.
diff --git a/tests/ui/traits/new-solver/generator.rs b/tests/ui/traits/new-solver/generator.rs
deleted file mode 100644
index 364373ca8be..00000000000
--- a/tests/ui/traits/new-solver/generator.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// compile-flags: -Ztrait-solver=next
-// edition: 2021
-// revisions: pass fail
-//[pass] check-pass
-
-#![feature(generator_trait, generators)]
-
-use std::ops::Generator;
-
-struct A;
-struct B;
-struct C;
-
-fn needs_generator(_: impl Generator<A, Yield = B, Return = C>) {}
-
-#[cfg(fail)]
-fn main() {
-    needs_generator(|| {
-        //[fail]~^ ERROR Generator<A>` is not satisfied
-        //[fail]~| ERROR as Generator<A>>::Yield == B`
-        //[fail]~| ERROR as Generator<A>>::Return == C`
-        yield ();
-    });
-}
-
-#[cfg(pass)]
-fn main() {
-    needs_generator(|_: A| {
-        let _: A = yield B;
-        C
-    })
-}
diff --git a/tests/ui/traits/new-solver/object-unsafety.stderr b/tests/ui/traits/new-solver/object-unsafety.stderr
index bb7c68b8941..914a8f9d4c5 100644
--- a/tests/ui/traits/new-solver/object-unsafety.stderr
+++ b/tests/ui/traits/new-solver/object-unsafety.stderr
@@ -42,7 +42,7 @@ error[E0308]: mismatched types
 LL | pub fn copy_any<T>(t: &T) -> T {
    |                 -            - expected `T` because of return type
    |                 |
-   |                 this type parameter
+   |                 expected this type parameter
 LL |     copy::<dyn Setup<From=T>>(t)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
    |
diff --git a/tests/ui/traits/new-solver/specialization-unconstrained.rs b/tests/ui/traits/new-solver/specialization-unconstrained.rs
index 7fd753109be..02150689ee5 100644
--- a/tests/ui/traits/new-solver/specialization-unconstrained.rs
+++ b/tests/ui/traits/new-solver/specialization-unconstrained.rs
@@ -11,7 +11,7 @@ trait Default {
 }
 
 impl<T> Default for T {
-   default type Id = T; //~ ERROR type annotations needed
+   default type Id = T;
 }
 
 fn test<T: Default<Id = U>, U>() {}
diff --git a/tests/ui/traits/new-solver/specialization-unconstrained.stderr b/tests/ui/traits/new-solver/specialization-unconstrained.stderr
index 9915da1a27a..910925cbaeb 100644
--- a/tests/ui/traits/new-solver/specialization-unconstrained.stderr
+++ b/tests/ui/traits/new-solver/specialization-unconstrained.stderr
@@ -8,12 +8,6 @@ LL | #![feature(specialization)]
    = help: consider using `min_specialization` instead, which is more stable and complete
    = note: `#[warn(incomplete_features)]` on by default
 
-error[E0282]: type annotations needed
-  --> $DIR/specialization-unconstrained.rs:14:22
-   |
-LL |    default type Id = T;
-   |                      ^ cannot infer type for associated type `<T as Default>::Id`
-
 error[E0284]: type annotations needed: cannot satisfy `<u32 as Default>::Id == ()`
   --> $DIR/specialization-unconstrained.rs:20:5
    |
@@ -26,7 +20,6 @@ note: required by a bound in `test`
 LL | fn test<T: Default<Id = U>, U>() {}
    |                    ^^^^^^ required by this bound in `test`
 
-error: aborting due to 2 previous errors; 1 warning emitted
+error: aborting due to previous error; 1 warning emitted
 
-Some errors have detailed explanations: E0282, E0284.
-For more information about an error, try `rustc --explain E0282`.
+For more information about this error, try `rustc --explain E0284`.
diff --git a/tests/ui/traits/non-lifetime-via-dyn-builtin.current.stderr b/tests/ui/traits/non-lifetime-via-dyn-builtin.current.stderr
new file mode 100644
index 00000000000..9f373cc50f0
--- /dev/null
+++ b/tests/ui/traits/non-lifetime-via-dyn-builtin.current.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/non-lifetime-via-dyn-builtin.rs:5: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/non-lifetime-via-dyn-builtin.next.stderr b/tests/ui/traits/non-lifetime-via-dyn-builtin.next.stderr
new file mode 100644
index 00000000000..9f373cc50f0
--- /dev/null
+++ b/tests/ui/traits/non-lifetime-via-dyn-builtin.next.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/non-lifetime-via-dyn-builtin.rs:5: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/non-lifetime-via-dyn-builtin.rs b/tests/ui/traits/non-lifetime-via-dyn-builtin.rs
new file mode 100644
index 00000000000..9a8a5ced2e2
--- /dev/null
+++ b/tests/ui/traits/non-lifetime-via-dyn-builtin.rs
@@ -0,0 +1,16 @@
+// revisions: current next
+//[next] compile-flags: -Ztrait-solver=next
+// check-pass
+
+#![feature(non_lifetime_binders)]
+//~^ WARN the feature `non_lifetime_binders` is incomplete and may not be safe
+
+fn trivial<A>()
+where
+    for<B> dyn Fn(A, *const B): Fn(A, *const B),
+{
+}
+
+fn main() {
+    trivial::<u8>();
+}
diff --git a/tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs b/tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs
new file mode 100644
index 00000000000..b999f251d33
--- /dev/null
+++ b/tests/ui/traits/non_lifetime_binders/disqualifying-object-candidates.rs
@@ -0,0 +1,19 @@
+// check-pass
+
+trait Foo {
+    type Bar<T>
+    where
+        dyn Send + 'static: Send;
+}
+
+impl Foo for () {
+    type Bar<T> = i32;
+    // We take `<() as Foo>::Bar<T>: Sized` and normalize it under the where clause
+    // of `for<S> <() as Foo>::Bar<S> = i32`. This gives us back `i32: Send` with
+    // the nested obligation `(dyn Send + 'static): Send`. However, during candidate
+    // assembly for object types, we disqualify any obligations that has non-region
+    // late-bound vars in the param env(!), rather than just the predicate. This causes
+    // the where clause to not hold even though it trivially should.
+}
+
+fn main() {}
diff --git a/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.stderr b/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.stderr
index d56519223f4..b6e540c5ffc 100644
--- a/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.stderr
+++ b/tests/ui/traits/non_lifetime_binders/supertrait-object-safety.stderr
@@ -20,6 +20,7 @@ LL | trait Foo: for<T> Bar<T> {}
    |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `()` implements the trait, consider using it directly instead
    = note: required for the cast from `&()` to `&dyn Foo`
 
 error[E0038]: the trait `Foo` cannot be made into an object
@@ -35,6 +36,7 @@ LL | trait Foo: for<T> Bar<T> {}
    |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `()` implements the trait, consider using it directly instead
 
 error[E0038]: the trait `Foo` cannot be made into an object
   --> $DIR/supertrait-object-safety.rs:22:5
@@ -49,6 +51,7 @@ LL | trait Foo: for<T> Bar<T> {}
    |       ---  ^^^^^^^^^^^^^ ...because where clause cannot reference non-lifetime `for<...>` variables
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `()` implements the trait, consider using it directly instead
 
 error: aborting due to 3 previous errors; 1 warning emitted
 
diff --git a/tests/ui/traits/object/object-unsafe-missing-assoc-type.rs b/tests/ui/traits/object/object-unsafe-missing-assoc-type.rs
new file mode 100644
index 00000000000..21f7fd92e80
--- /dev/null
+++ b/tests/ui/traits/object/object-unsafe-missing-assoc-type.rs
@@ -0,0 +1,7 @@
+trait Foo {
+    type Bar<T>;
+}
+
+fn bar(x: &dyn Foo) {} //~ ERROR the trait `Foo` cannot be made into an object
+
+fn main() {}
diff --git a/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr b/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr
new file mode 100644
index 00000000000..fcaa583e2bd
--- /dev/null
+++ b/tests/ui/traits/object/object-unsafe-missing-assoc-type.stderr
@@ -0,0 +1,18 @@
+error[E0038]: the trait `Foo` cannot be made into an object
+  --> $DIR/object-unsafe-missing-assoc-type.rs:5:16
+   |
+LL | fn bar(x: &dyn Foo) {}
+   |                ^^^ `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-unsafe-missing-assoc-type.rs:2:10
+   |
+LL | trait Foo {
+   |       --- this trait cannot be made into an object...
+LL |     type Bar<T>;
+   |          ^^^ ...because it contains the generic associated type `Bar`
+   = help: consider moving `Bar` to another trait
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0038`.
diff --git a/tests/ui/traits/object/print_vtable_sizes.stdout b/tests/ui/traits/object/print_vtable_sizes.stdout
index ce90c76217b..b43e168df3f 100644
--- a/tests/ui/traits/object/print_vtable_sizes.stdout
+++ b/tests/ui/traits/object/print_vtable_sizes.stdout
@@ -1,11 +1,11 @@
-print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "E", "entries": "6", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "2", "upcasting_cost_percent": "50" }
-print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "G", "entries": "14", "entries_ignoring_upcasting": "11", "entries_for_upcasting": "3", "upcasting_cost_percent": "27.27272727272727" }
-print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "A", "entries": "6", "entries_ignoring_upcasting": "5", "entries_for_upcasting": "1", "upcasting_cost_percent": "20" }
-print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "B", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
-print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "D", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
-print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "F", "entries": "6", "entries_ignoring_upcasting": "6", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
-print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "_::S", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
-print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "_::S", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
-print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "help::MarkerWithSuper", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
-print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "help::Super", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
-print-vtable-sizes { "crate_name": "<UNKNOWN_CRATE>", "trait_name": "help::V", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
+print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "E", "entries": "6", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "2", "upcasting_cost_percent": "50" }
+print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "G", "entries": "14", "entries_ignoring_upcasting": "11", "entries_for_upcasting": "3", "upcasting_cost_percent": "27.27272727272727" }
+print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "A", "entries": "6", "entries_ignoring_upcasting": "5", "entries_for_upcasting": "1", "upcasting_cost_percent": "20" }
+print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "B", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
+print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "D", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
+print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "F", "entries": "6", "entries_ignoring_upcasting": "6", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
+print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "_::S", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
+print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "_::S", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
+print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "help::MarkerWithSuper", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
+print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "help::Super", "entries": "4", "entries_ignoring_upcasting": "4", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
+print-vtable-sizes { "crate_name": "print_vtable_sizes", "trait_name": "help::V", "entries": "3", "entries_ignoring_upcasting": "3", "entries_for_upcasting": "0", "upcasting_cost_percent": "0" }
diff --git a/tests/ui/traits/object/safety.stderr b/tests/ui/traits/object/safety.stderr
index a51b6975938..19a46a502c2 100644
--- a/tests/ui/traits/object/safety.stderr
+++ b/tests/ui/traits/object/safety.stderr
@@ -11,6 +11,7 @@ LL | trait Tr {
    |       -- this trait cannot be made into an object...
 LL |     fn foo();
    |        ^^^ ...because associated function `foo` has no `self` parameter
+   = help: only type `St` implements the trait, consider using it directly instead
    = note: required for the cast from `&St` to `&dyn Tr`
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
@@ -34,6 +35,7 @@ LL | trait Tr {
    |       -- this trait cannot be made into an object...
 LL |     fn foo();
    |        ^^^ ...because associated function `foo` has no `self` parameter
+   = help: only type `St` implements the trait, consider using it directly instead
 help: consider turning `foo` into a method by giving it a `&self` argument
    |
 LL |     fn foo(&self);
diff --git a/tests/ui/traits/object/with-self-in-projection-output-bad.rs b/tests/ui/traits/object/with-self-in-projection-output-bad.rs
index f34fa80a0ce..9515397fb8d 100644
--- a/tests/ui/traits/object/with-self-in-projection-output-bad.rs
+++ b/tests/ui/traits/object/with-self-in-projection-output-bad.rs
@@ -43,8 +43,8 @@ impl NormalizableHelper for u32
 
 fn main() {
     let _x: Box<dyn Helper<Target=i32>> = Box::new(2u32);
-    //~^ ERROR the value of the associated type `Output` (from trait `Base`) must be specified
+    //~^ ERROR the value of the associated type `Output` in `Base` must be specified
 
     let _y: Box<dyn NormalizableHelper<Target=i32>> = Box::new(2u32);
-    //~^ ERROR the value of the associated type `Output` (from trait `Base`) must be specified
+    //~^ ERROR the value of the associated type `Output` in `Base` must be specified
 }
diff --git a/tests/ui/traits/object/with-self-in-projection-output-bad.stderr b/tests/ui/traits/object/with-self-in-projection-output-bad.stderr
index 641bfe23666..c9b36e8d29d 100644
--- a/tests/ui/traits/object/with-self-in-projection-output-bad.stderr
+++ b/tests/ui/traits/object/with-self-in-projection-output-bad.stderr
@@ -1,4 +1,4 @@
-error[E0191]: the value of the associated type `Output` (from trait `Base`) must be specified
+error[E0191]: the value of the associated type `Output` in `Base` must be specified
   --> $DIR/with-self-in-projection-output-bad.rs:45:21
    |
 LL |     type Output;
@@ -7,7 +7,7 @@ LL |     type Output;
 LL |     let _x: Box<dyn Helper<Target=i32>> = Box::new(2u32);
    |                     ^^^^^^^^^^^^^^^^^^ help: specify the associated type: `Helper<Target=i32, Output = Type>`
 
-error[E0191]: the value of the associated type `Output` (from trait `Base`) must be specified
+error[E0191]: the value of the associated type `Output` in `Base` must be specified
   --> $DIR/with-self-in-projection-output-bad.rs:48:21
    |
 LL |     type Output;
diff --git a/tests/ui/traits/suggest-dereferences/root-obligation.fixed b/tests/ui/traits/suggest-dereferences/root-obligation.fixed
index 7a8433f9057..d03d733c76d 100644
--- a/tests/ui/traits/suggest-dereferences/root-obligation.fixed
+++ b/tests/ui/traits/suggest-dereferences/root-obligation.fixed
@@ -4,7 +4,7 @@ fn get_vowel_count(string: &str) -> usize {
     string
         .chars()
         .filter(|c| "aeiou".contains(*c))
-        //~^ ERROR expected a `Fn<(char,)>` closure, found `char`
+        //~^ ERROR expected a `Fn(char)` closure, found `char`
         .count()
 }
 
diff --git a/tests/ui/traits/suggest-dereferences/root-obligation.rs b/tests/ui/traits/suggest-dereferences/root-obligation.rs
index 51bac2107e3..9d9ffb3f55e 100644
--- a/tests/ui/traits/suggest-dereferences/root-obligation.rs
+++ b/tests/ui/traits/suggest-dereferences/root-obligation.rs
@@ -4,7 +4,7 @@ fn get_vowel_count(string: &str) -> usize {
     string
         .chars()
         .filter(|c| "aeiou".contains(c))
-        //~^ ERROR expected a `Fn<(char,)>` closure, found `char`
+        //~^ ERROR expected a `Fn(char)` closure, found `char`
         .count()
 }
 
diff --git a/tests/ui/traits/suggest-dereferences/root-obligation.stderr b/tests/ui/traits/suggest-dereferences/root-obligation.stderr
index 1363fb8c47a..a19708e46bb 100644
--- a/tests/ui/traits/suggest-dereferences/root-obligation.stderr
+++ b/tests/ui/traits/suggest-dereferences/root-obligation.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<(char,)>` closure, found `char`
+error[E0277]: expected a `Fn(char)` closure, found `char`
   --> $DIR/root-obligation.rs:6:38
    |
 LL |         .filter(|c| "aeiou".contains(c))
-   |                             -------- ^ expected an `Fn<(char,)>` closure, found `char`
+   |                             -------- ^ expected an `Fn(char)` closure, found `char`
    |                             |
    |                             required by a bound introduced by this call
    |
diff --git a/tests/ui/traits/test-2.stderr b/tests/ui/traits/test-2.stderr
index 74a0fc42708..3972e539776 100644
--- a/tests/ui/traits/test-2.stderr
+++ b/tests/ui/traits/test-2.stderr
@@ -42,6 +42,9 @@ LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
    |       this trait cannot be made into an object...
    = help: consider moving `dup` to another trait
    = help: consider moving `blah` to another trait
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `bar` for this new enum and using it instead:
+             i32
+             u32
 
 error[E0038]: the trait `bar` cannot be made into an object
   --> $DIR/test-2.rs:13:5
@@ -59,6 +62,9 @@ LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
    |       this trait cannot be made into an object...
    = help: consider moving `dup` to another trait
    = help: consider moving `blah` to another trait
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `bar` for this new enum and using it instead:
+             i32
+             u32
 
 error[E0038]: the trait `bar` cannot be made into an object
   --> $DIR/test-2.rs:13:6
@@ -76,6 +82,9 @@ LL | trait bar { fn dup(&self) -> Self; fn blah<X>(&self); }
    |       this trait cannot be made into an object...
    = help: consider moving `dup` to another trait
    = help: consider moving `blah` to another trait
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `bar` for this new enum and using it instead:
+             i32
+             u32
    = note: required for the cast from `Box<{integer}>` to `Box<dyn bar>`
 
 error: aborting due to 5 previous errors
diff --git a/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr b/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr
index e24cb11288e..96a5c132763 100644
--- a/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr
+++ b/tests/ui/type-alias-enum-variants/enum-variant-generic-args.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/enum-variant-generic-args.rs:13:25
    |
 LL | impl<T> Enum<T> {
-   |      - this type parameter
+   |      - expected this type parameter
 LL |     fn ts_variant() {
 LL |         Self::TSVariant(());
    |         --------------- ^^ expected type parameter `T`, found `()`
@@ -50,7 +50,7 @@ error[E0308]: mismatched types
   --> $DIR/enum-variant-generic-args.rs:17:31
    |
 LL | impl<T> Enum<T> {
-   |      - this type parameter
+   |      - expected this type parameter
 ...
 LL |         Self::<()>::TSVariant(());
    |         --------------------- ^^ expected type parameter `T`, found `()`
@@ -98,7 +98,7 @@ error[E0308]: mismatched types
   --> $DIR/enum-variant-generic-args.rs:26:29
    |
 LL | impl<T> Enum<T> {
-   |      - this type parameter
+   |      - expected this type parameter
 ...
 LL |         Self::SVariant { v: () };
    |                             ^^ expected type parameter `T`, found `()`
@@ -125,7 +125,7 @@ error[E0308]: mismatched types
   --> $DIR/enum-variant-generic-args.rs:28:35
    |
 LL | impl<T> Enum<T> {
-   |      - this type parameter
+   |      - expected this type parameter
 ...
 LL |         Self::SVariant::<()> { v: () };
    |                                   ^^ expected type parameter `T`, found `()`
@@ -158,7 +158,7 @@ error[E0308]: mismatched types
   --> $DIR/enum-variant-generic-args.rs:31:35
    |
 LL | impl<T> Enum<T> {
-   |      - this type parameter
+   |      - expected this type parameter
 ...
 LL |         Self::<()>::SVariant { v: () };
    |                                   ^^ expected type parameter `T`, found `()`
@@ -206,7 +206,7 @@ error[E0308]: mismatched types
   --> $DIR/enum-variant-generic-args.rs:34:41
    |
 LL | impl<T> Enum<T> {
-   |      - this type parameter
+   |      - expected this type parameter
 ...
 LL |         Self::<()>::SVariant::<()> { v: () };
    |                                         ^^ expected type parameter `T`, found `()`
diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs
index 660950d5906..cad75cffe05 100644
--- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs
+++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.rs
@@ -5,9 +5,6 @@
 
 mod m {
     pub type Foo = impl std::fmt::Debug;
-    //~^ ERROR: cycle detected when computing type of opaque `m::Foo::{opaque#0}` [E0391]
-    //~| ERROR: cycle detected when computing type of opaque `m::Foo::{opaque#0}` [E0391]
-
     pub fn foo() -> Foo {
         22_u32
     }
diff --git a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr
index d8698826660..d47b1fe3678 100644
--- a/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr
+++ b/tests/ui/type-alias-impl-trait/auto-trait-leakage3.stderr
@@ -1,44 +1,5 @@
-error[E0391]: cycle detected when computing type of opaque `m::Foo::{opaque#0}`
-  --> $DIR/auto-trait-leakage3.rs:7:20
-   |
-LL |     pub type Foo = impl std::fmt::Debug;
-   |                    ^^^^^^^^^^^^^^^^^^^^
-   |
-note: ...which requires type-checking `m::bar`...
-  --> $DIR/auto-trait-leakage3.rs:16:9
-   |
-LL |         is_send(foo());
-   |         ^^^^^^^
-   = note: ...which requires evaluating trait selection obligation `m::Foo: core::marker::Send`...
-   = note: ...which again requires computing type of opaque `m::Foo::{opaque#0}`, completing the cycle
-note: cycle used when computing type of `m::Foo::{opaque#0}`
-  --> $DIR/auto-trait-leakage3.rs:7:20
-   |
-LL |     pub type Foo = impl std::fmt::Debug;
-   |                    ^^^^^^^^^^^^^^^^^^^^
-   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-
-error[E0391]: cycle detected when computing type of opaque `m::Foo::{opaque#0}`
-  --> $DIR/auto-trait-leakage3.rs:7:20
-   |
-LL |     pub type Foo = impl std::fmt::Debug;
-   |                    ^^^^^^^^^^^^^^^^^^^^
-   |
-note: ...which requires type-checking `m::bar`...
-  --> $DIR/auto-trait-leakage3.rs:15:5
-   |
-LL |     pub fn bar() {
-   |     ^^^^^^^^^^^^
-   = note: ...which again requires computing type of opaque `m::Foo::{opaque#0}`, completing the cycle
-note: cycle used when computing type of `m::Foo::{opaque#0}`
-  --> $DIR/auto-trait-leakage3.rs:7:20
-   |
-LL |     pub type Foo = impl std::fmt::Debug;
-   |                    ^^^^^^^^^^^^^^^^^^^^
-   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-
 error: cannot check whether the hidden type of `auto_trait_leakage3[211d]::m::Foo::{opaque#0}` satisfies auto traits
-  --> $DIR/auto-trait-leakage3.rs:16:17
+  --> $DIR/auto-trait-leakage3.rs:13:17
    |
 LL |         is_send(foo());
    |         ------- ^^^^^
@@ -51,16 +12,15 @@ note: opaque type is declared here
 LL |     pub type Foo = impl std::fmt::Debug;
    |                    ^^^^^^^^^^^^^^^^^^^^
 note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
-  --> $DIR/auto-trait-leakage3.rs:15:12
+  --> $DIR/auto-trait-leakage3.rs:12:12
    |
 LL |     pub fn bar() {
    |            ^^^
 note: required by a bound in `is_send`
-  --> $DIR/auto-trait-leakage3.rs:20:19
+  --> $DIR/auto-trait-leakage3.rs:17:19
    |
 LL |     fn is_send<T: Send>(_: T) {}
    |                   ^^^^ required by this bound in `is_send`
 
-error: aborting due to 3 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/type-alias-impl-trait/closure_parent_substs.rs b/tests/ui/type-alias-impl-trait/closure_parent_substs.rs
index 3ff20d99ad8..7d8193b26cc 100644
--- a/tests/ui/type-alias-impl-trait/closure_parent_substs.rs
+++ b/tests/ui/type-alias-impl-trait/closure_parent_substs.rs
@@ -1,5 +1,5 @@
 // When WF checking the hidden type in the ParamEnv of the opaque type,
-// one complication arises when the hidden type is a closure/generator:
+// one complication arises when the hidden type is a closure/coroutine:
 // the "parent_substs" of the type may reference lifetime parameters
 // not present in the opaque type.
 // These region parameters are not really useful in this check.
diff --git a/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs
new file mode 100644
index 00000000000..4c56fe2d1dc
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait.rs
@@ -0,0 +1,13 @@
+// check-pass
+
+#![feature(type_alias_impl_trait)]
+
+type Opaque<'lt> = impl Sized + 'lt;
+
+fn test<'a>(
+    arg: impl Iterator<Item = &'a u8>,
+) -> impl Iterator<Item = Opaque<'a>> {
+    arg
+}
+
+fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs
new file mode 100644
index 00000000000..97f8c799fc5
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/duplicate-lifetimes-from-rpit-containing-tait2.rs
@@ -0,0 +1,15 @@
+// check-pass
+// edition: 2021
+
+#![feature(type_alias_impl_trait)]
+
+struct Foo<'a>(&'a ());
+
+impl<'a> Foo<'a> {
+    async fn new() -> () {
+        type T = impl Sized;
+        let _: T = ();
+    }
+}
+
+fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/generic_underconstrained.rs b/tests/ui/type-alias-impl-trait/generic_underconstrained.rs
index d87a25aad58..1acacc778de 100644
--- a/tests/ui/type-alias-impl-trait/generic_underconstrained.rs
+++ b/tests/ui/type-alias-impl-trait/generic_underconstrained.rs
@@ -8,5 +8,6 @@ type Underconstrained<T: Trait> = impl Send;
 // no `Trait` bound
 fn underconstrain<T>(_: T) -> Underconstrained<T> {
     //~^ ERROR the trait bound `T: Trait`
+    //~| ERROR the trait bound `T: Trait`
     unimplemented!()
 }
diff --git a/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr b/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr
index bc9280127ac..88529b370f1 100644
--- a/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_underconstrained.stderr
@@ -14,6 +14,27 @@ help: consider restricting type parameter `T`
 LL | fn underconstrain<T: Trait>(_: T) -> Underconstrained<T> {
    |                    +++++++
 
-error: aborting due to previous error
+error[E0277]: the trait bound `T: Trait` is not satisfied
+  --> $DIR/generic_underconstrained.rs:9:51
+   |
+LL |   fn underconstrain<T>(_: T) -> Underconstrained<T> {
+   |  ___________________________________________________^
+LL | |
+LL | |
+LL | |     unimplemented!()
+LL | | }
+   | |_^ the trait `Trait` is not implemented for `T`
+   |
+note: required by a bound on the type alias `Underconstrained`
+  --> $DIR/generic_underconstrained.rs:6:26
+   |
+LL | type Underconstrained<T: Trait> = impl Send;
+   |                          ^^^^^ required by this bound
+help: consider restricting type parameter `T`
+   |
+LL | fn underconstrain<T: Trait>(_: T) -> Underconstrained<T> {
+   |                    +++++++
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/generic_underconstrained2.rs b/tests/ui/type-alias-impl-trait/generic_underconstrained2.rs
index 8adc0bf32a6..1e1bece9a1c 100644
--- a/tests/ui/type-alias-impl-trait/generic_underconstrained2.rs
+++ b/tests/ui/type-alias-impl-trait/generic_underconstrained2.rs
@@ -7,6 +7,7 @@ type Underconstrained<T: std::fmt::Debug> = impl Send;
 // not a defining use, because it doesn't define *all* possible generics
 fn underconstrained<U>(_: U) -> Underconstrained<U> {
     //~^ ERROR `U` doesn't implement `Debug`
+    //~| ERROR `U` doesn't implement `Debug`
     5u32
 }
 
@@ -15,5 +16,6 @@ type Underconstrained2<T: std::fmt::Debug> = impl Send;
 // not a defining use, because it doesn't define *all* possible generics
 fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
     //~^ ERROR `V` doesn't implement `Debug`
+    //~| ERROR `V` doesn't implement `Debug`
     5u32
 }
diff --git a/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr b/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
index fdc9ec090db..b3b9cbca968 100644
--- a/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_underconstrained2.stderr
@@ -15,13 +15,13 @@ LL | fn underconstrained<U: std::fmt::Debug>(_: U) -> Underconstrained<U> {
    |                      +++++++++++++++++
 
 error[E0277]: `V` doesn't implement `Debug`
-  --> $DIR/generic_underconstrained2.rs:16:43
+  --> $DIR/generic_underconstrained2.rs:17:43
    |
 LL | fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
    |                                           ^^^^^^^^^^^^^^^^^^^^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
    |
 note: required by a bound on the type alias `Underconstrained2`
-  --> $DIR/generic_underconstrained2.rs:13:27
+  --> $DIR/generic_underconstrained2.rs:14:27
    |
 LL | type Underconstrained2<T: std::fmt::Debug> = impl Send;
    |                           ^^^^^^^^^^^^^^^ required by this bound
@@ -30,6 +30,48 @@ help: consider restricting type parameter `V`
 LL | fn underconstrained2<U, V: std::fmt::Debug>(_: U, _: V) -> Underconstrained2<V> {
    |                          +++++++++++++++++
 
-error: aborting due to 2 previous errors
+error[E0277]: `U` doesn't implement `Debug`
+  --> $DIR/generic_underconstrained2.rs:8:53
+   |
+LL |   fn underconstrained<U>(_: U) -> Underconstrained<U> {
+   |  _____________________________________________________^
+LL | |
+LL | |
+LL | |     5u32
+LL | | }
+   | |_^ `U` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+note: required by a bound on the type alias `Underconstrained`
+  --> $DIR/generic_underconstrained2.rs:5:26
+   |
+LL | type Underconstrained<T: std::fmt::Debug> = impl Send;
+   |                          ^^^^^^^^^^^^^^^ required by this bound
+help: consider restricting type parameter `U`
+   |
+LL | fn underconstrained<U: std::fmt::Debug>(_: U) -> Underconstrained<U> {
+   |                      +++++++++++++++++
+
+error[E0277]: `V` doesn't implement `Debug`
+  --> $DIR/generic_underconstrained2.rs:17:64
+   |
+LL |   fn underconstrained2<U, V>(_: U, _: V) -> Underconstrained2<V> {
+   |  ________________________________________________________________^
+LL | |
+LL | |
+LL | |     5u32
+LL | | }
+   | |_^ `V` cannot be formatted using `{:?}` because it doesn't implement `Debug`
+   |
+note: required by a bound on the type alias `Underconstrained2`
+  --> $DIR/generic_underconstrained2.rs:14:27
+   |
+LL | type Underconstrained2<T: std::fmt::Debug> = impl Send;
+   |                           ^^^^^^^^^^^^^^^ required by this bound
+help: consider restricting type parameter `V`
+   |
+LL | fn underconstrained2<U, V: std::fmt::Debug>(_: U, _: V) -> Underconstrained2<V> {
+   |                          +++++++++++++++++
+
+error: aborting due to 4 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/type-alias-impl-trait/impl_trait_for_same_tait.stderr b/tests/ui/type-alias-impl-trait/impl_trait_for_same_tait.stderr
index aaf75cc3db9..e35913be899 100644
--- a/tests/ui/type-alias-impl-trait/impl_trait_for_same_tait.stderr
+++ b/tests/ui/type-alias-impl-trait/impl_trait_for_same_tait.stderr
@@ -15,6 +15,8 @@ LL | impl Bop for Bar<()> {}
 ...
 LL | impl Bop for Barr {}
    | ^^^^^^^^^^^^^^^^^ conflicting implementation for `Bar<()>`
+   |
+   = note: upstream crates may add a new impl of trait `std::marker::FnPtr` for type `Barr` in future versions
 
 error[E0119]: conflicting implementations of trait `Bop` for type `Bar<()>`
   --> $DIR/impl_trait_for_same_tait.rs:30:1
diff --git a/tests/ui/type-alias-impl-trait/inference-cycle.rs b/tests/ui/type-alias-impl-trait/inference-cycle.rs
index 20175a4feca..6e4507ed460 100644
--- a/tests/ui/type-alias-impl-trait/inference-cycle.rs
+++ b/tests/ui/type-alias-impl-trait/inference-cycle.rs
@@ -3,17 +3,14 @@
 
 mod m {
     pub type Foo = impl std::fmt::Debug;
-    //~^ ERROR cycle detected
-    //~| ERROR cycle detected
-
-    // Cycle: error today, but it'd be nice if it eventually worked
 
     pub fn foo() -> Foo {
         is_send(bar())
     }
 
     pub fn bar() {
-        is_send(foo()); // Today: error
+        // Cycle: error today, but it'd be nice if it eventually worked
+        is_send(foo());
         //~^ ERROR: cannot check whether the hidden type of `inference_cycle[4ecc]::m::Foo::{opaque#0}` satisfies auto traits
     }
 
diff --git a/tests/ui/type-alias-impl-trait/inference-cycle.stderr b/tests/ui/type-alias-impl-trait/inference-cycle.stderr
index 4ab059d054b..ef7abe58864 100644
--- a/tests/ui/type-alias-impl-trait/inference-cycle.stderr
+++ b/tests/ui/type-alias-impl-trait/inference-cycle.stderr
@@ -1,46 +1,7 @@
-error[E0391]: cycle detected when computing type of opaque `m::Foo::{opaque#0}`
-  --> $DIR/inference-cycle.rs:5:20
-   |
-LL |     pub type Foo = impl std::fmt::Debug;
-   |                    ^^^^^^^^^^^^^^^^^^^^
-   |
-note: ...which requires type-checking `m::bar`...
-  --> $DIR/inference-cycle.rs:16:9
-   |
-LL |         is_send(foo()); // Today: error
-   |         ^^^^^^^
-   = note: ...which requires evaluating trait selection obligation `m::Foo: core::marker::Send`...
-   = note: ...which again requires computing type of opaque `m::Foo::{opaque#0}`, completing the cycle
-note: cycle used when computing type of `m::Foo::{opaque#0}`
-  --> $DIR/inference-cycle.rs:5:20
-   |
-LL |     pub type Foo = impl std::fmt::Debug;
-   |                    ^^^^^^^^^^^^^^^^^^^^
-   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-
-error[E0391]: cycle detected when computing type of opaque `m::Foo::{opaque#0}`
-  --> $DIR/inference-cycle.rs:5:20
-   |
-LL |     pub type Foo = impl std::fmt::Debug;
-   |                    ^^^^^^^^^^^^^^^^^^^^
-   |
-note: ...which requires type-checking `m::bar`...
-  --> $DIR/inference-cycle.rs:15:5
-   |
-LL |     pub fn bar() {
-   |     ^^^^^^^^^^^^
-   = note: ...which again requires computing type of opaque `m::Foo::{opaque#0}`, completing the cycle
-note: cycle used when computing type of `m::Foo::{opaque#0}`
-  --> $DIR/inference-cycle.rs:5:20
-   |
-LL |     pub type Foo = impl std::fmt::Debug;
-   |                    ^^^^^^^^^^^^^^^^^^^^
-   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-
 error: cannot check whether the hidden type of `inference_cycle[4ecc]::m::Foo::{opaque#0}` satisfies auto traits
-  --> $DIR/inference-cycle.rs:16:17
+  --> $DIR/inference-cycle.rs:13:17
    |
-LL |         is_send(foo()); // Today: error
+LL |         is_send(foo());
    |         ------- ^^^^^
    |         |
    |         required by a bound introduced by this call
@@ -51,16 +12,15 @@ note: opaque type is declared here
 LL |     pub type Foo = impl std::fmt::Debug;
    |                    ^^^^^^^^^^^^^^^^^^^^
 note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
-  --> $DIR/inference-cycle.rs:15:12
+  --> $DIR/inference-cycle.rs:11:12
    |
 LL |     pub fn bar() {
    |            ^^^
 note: required by a bound in `is_send`
-  --> $DIR/inference-cycle.rs:24:19
+  --> $DIR/inference-cycle.rs:21:19
    |
 LL |     fn is_send<T: Send>(_: T) {}
    |                   ^^^^ required by this bound in `is_send`
 
-error: aborting due to 3 previous errors
+error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.rs b/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.rs
new file mode 100644
index 00000000000..6609d4eb5a2
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.rs
@@ -0,0 +1,8 @@
+#![feature(type_alias_impl_trait)]
+
+type T = impl Copy;
+//~^ ERROR cannot resolve opaque type
+
+static STATIC: T = None::<&'static T>;
+
+fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr b/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr
new file mode 100644
index 00000000000..50ae6f38641
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/infinite-cycle-involving-weak.stderr
@@ -0,0 +1,9 @@
+error[E0720]: cannot resolve opaque type
+  --> $DIR/infinite-cycle-involving-weak.rs:3:10
+   |
+LL | type T = impl Copy;
+   |          ^^^^^^^^^ cannot resolve opaque type
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0720`.
diff --git a/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs b/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs
new file mode 100644
index 00000000000..ad1ede9c3e4
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/issue-53678-coroutine-and-const-fn.rs
@@ -0,0 +1,22 @@
+#![feature(coroutines, coroutine_trait, rustc_attrs)]
+#![feature(type_alias_impl_trait)]
+
+// check-pass
+
+mod gen {
+    use std::ops::Coroutine;
+
+    pub type CoroOnce<Y, R> = impl Coroutine<Yield = Y, Return = R>;
+
+    pub const fn const_coroutine<Y, R>(yielding: Y, returning: R) -> CoroOnce<Y, R> {
+        move || {
+            yield yielding;
+
+            return returning;
+        }
+    }
+}
+
+const FOO: gen::CoroOnce<usize, usize> = gen::const_coroutine(10, 100);
+
+fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs b/tests/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs
deleted file mode 100644
index a213dbba4ea..00000000000
--- a/tests/ui/type-alias-impl-trait/issue-53678-generator-and-const-fn.rs
+++ /dev/null
@@ -1,22 +0,0 @@
-#![feature(generators, generator_trait, rustc_attrs)]
-#![feature(type_alias_impl_trait)]
-
-// check-pass
-
-mod gen {
-    use std::ops::Generator;
-
-    pub type GenOnce<Y, R> = impl Generator<Yield = Y, Return = R>;
-
-    pub const fn const_generator<Y, R>(yielding: Y, returning: R) -> GenOnce<Y, R> {
-        move || {
-            yield yielding;
-
-            return returning;
-        }
-    }
-}
-
-const FOO: gen::GenOnce<usize, usize> = gen::const_generator(10, 100);
-
-fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs b/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs
new file mode 100644
index 00000000000..bc6a3439212
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/issue-58662-coroutine-with-lifetime.rs
@@ -0,0 +1,39 @@
+// check-pass
+
+#![feature(coroutines, coroutine_trait)]
+#![feature(type_alias_impl_trait)]
+
+use std::ops::{Coroutine, CoroutineState};
+use std::pin::Pin;
+
+type RandCoroutine<'a> = impl Coroutine<Return = (), Yield = u64> + 'a;
+fn rand_coroutine<'a>(rng: &'a ()) -> RandCoroutine<'a> {
+    move || {
+        let _rng = rng;
+        loop {
+            yield 0;
+        }
+    }
+}
+
+pub type RandCoroutineWithIndirection<'c> = impl Coroutine<Return = (), Yield = u64> + 'c;
+pub fn rand_coroutine_with_indirection<'a>(rng: &'a ()) -> RandCoroutineWithIndirection<'a> {
+    fn helper<'b>(rng: &'b ()) -> impl 'b + Coroutine<Return = (), Yield = u64> {
+        move || {
+            let _rng = rng;
+            loop {
+                yield 0;
+            }
+        }
+    }
+
+    helper(rng)
+}
+
+fn main() {
+    let mut gen = rand_coroutine(&());
+    match unsafe { Pin::new_unchecked(&mut gen) }.resume(()) {
+        CoroutineState::Yielded(_) => {}
+        CoroutineState::Complete(_) => {}
+    };
+}
diff --git a/tests/ui/type-alias-impl-trait/issue-58662-generator-with-lifetime.rs b/tests/ui/type-alias-impl-trait/issue-58662-generator-with-lifetime.rs
deleted file mode 100644
index 477b61390ed..00000000000
--- a/tests/ui/type-alias-impl-trait/issue-58662-generator-with-lifetime.rs
+++ /dev/null
@@ -1,39 +0,0 @@
-// check-pass
-
-#![feature(generators, generator_trait)]
-#![feature(type_alias_impl_trait)]
-
-use std::ops::{Generator, GeneratorState};
-use std::pin::Pin;
-
-type RandGenerator<'a> = impl Generator<Return = (), Yield = u64> + 'a;
-fn rand_generator<'a>(rng: &'a ()) -> RandGenerator<'a> {
-    move || {
-        let _rng = rng;
-        loop {
-            yield 0;
-        }
-    }
-}
-
-pub type RandGeneratorWithIndirection<'c> = impl Generator<Return = (), Yield = u64> + 'c;
-pub fn rand_generator_with_indirection<'a>(rng: &'a ()) -> RandGeneratorWithIndirection<'a> {
-    fn helper<'b>(rng: &'b ()) -> impl 'b + Generator<Return = (), Yield = u64> {
-        move || {
-            let _rng = rng;
-            loop {
-                yield 0;
-            }
-        }
-    }
-
-    helper(rng)
-}
-
-fn main() {
-    let mut gen = rand_generator(&());
-    match unsafe { Pin::new_unchecked(&mut gen) }.resume(()) {
-        GeneratorState::Yielded(_) => {}
-        GeneratorState::Complete(_) => {}
-    };
-}
diff --git a/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs b/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs
index 27ca7d0fdc9..a1cf23dab7b 100644
--- a/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs
+++ b/tests/ui/type-alias-impl-trait/issue-58662-simplified.rs
@@ -1,6 +1,6 @@
 // check-pass
 
-#![feature(generators, generator_trait)]
+#![feature(coroutines, coroutine_trait)]
 #![feature(type_alias_impl_trait)]
 
 trait Trait {}
diff --git a/tests/ui/type-alias-impl-trait/issue-63279.rs b/tests/ui/type-alias-impl-trait/issue-63279.rs
index 0e46745c65c..02f2111468a 100644
--- a/tests/ui/type-alias-impl-trait/issue-63279.rs
+++ b/tests/ui/type-alias-impl-trait/issue-63279.rs
@@ -3,11 +3,11 @@
 type Closure = impl FnOnce();
 
 fn c() -> Closure {
-    //~^ ERROR: expected a `FnOnce<()>` closure, found `()`
+    //~^ ERROR: expected a `FnOnce()` closure, found `()`
     || -> Closure { || () }
     //~^ ERROR: mismatched types
     //~| ERROR: mismatched types
-    //~| ERROR: expected a `FnOnce<()>` closure, found `()`
+    //~| ERROR: expected a `FnOnce()` closure, found `()`
 }
 
 fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/issue-63279.stderr b/tests/ui/type-alias-impl-trait/issue-63279.stderr
index a868562479e..58cafd21ca8 100644
--- a/tests/ui/type-alias-impl-trait/issue-63279.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-63279.stderr
@@ -1,17 +1,17 @@
-error[E0277]: expected a `FnOnce<()>` closure, found `()`
+error[E0277]: expected a `FnOnce()` closure, found `()`
   --> $DIR/issue-63279.rs:5:11
    |
 LL | fn c() -> Closure {
-   |           ^^^^^^^ expected an `FnOnce<()>` closure, found `()`
+   |           ^^^^^^^ expected an `FnOnce()` closure, found `()`
    |
    = help: the trait `FnOnce<()>` is not implemented for `()`
    = note: wrap the `()` in a closure with no arguments: `|| { /* code */ }`
 
-error[E0277]: expected a `FnOnce<()>` closure, found `()`
+error[E0277]: expected a `FnOnce()` closure, found `()`
   --> $DIR/issue-63279.rs:7:11
    |
 LL |     || -> Closure { || () }
-   |           ^^^^^^^ expected an `FnOnce<()>` closure, found `()`
+   |           ^^^^^^^ expected an `FnOnce()` closure, found `()`
    |
    = help: the trait `FnOnce<()>` is not implemented for `()`
    = note: wrap the `()` in a closure with no arguments: `|| { /* code */ }`
diff --git a/tests/ui/type-alias-impl-trait/issue-94429.rs b/tests/ui/type-alias-impl-trait/issue-94429.rs
index d764545f906..306e73003fa 100644
--- a/tests/ui/type-alias-impl-trait/issue-94429.rs
+++ b/tests/ui/type-alias-impl-trait/issue-94429.rs
@@ -1,18 +1,18 @@
-#![feature(impl_trait_in_assoc_type, generator_trait, generators)]
-use std::ops::Generator;
+#![feature(impl_trait_in_assoc_type, coroutine_trait, coroutines)]
+use std::ops::Coroutine;
 
 trait Runnable {
-    type Gen: Generator<Yield = (), Return = ()>;
+    type Coro: Coroutine<Yield = (), Return = ()>;
 
-    fn run(&mut self) -> Self::Gen;
+    fn run(&mut self) -> Self::Coro;
 }
 
 struct Implementor {}
 
 impl Runnable for Implementor {
-    type Gen = impl Generator<Yield = (), Return = ()>;
+    type Coro = impl Coroutine<Yield = (), Return = ()>;
 
-    fn run(&mut self) -> Self::Gen {
+    fn run(&mut self) -> Self::Coro {
         //~^ ERROR: type mismatch resolving
         move || {
             yield 1;
diff --git a/tests/ui/type-alias-impl-trait/issue-94429.stderr b/tests/ui/type-alias-impl-trait/issue-94429.stderr
index 26605cdd2c2..360ecfa61bf 100644
--- a/tests/ui/type-alias-impl-trait/issue-94429.stderr
+++ b/tests/ui/type-alias-impl-trait/issue-94429.stderr
@@ -1,8 +1,8 @@
-error[E0271]: type mismatch resolving `<{generator@$DIR/issue-94429.rs:17:9: 17:16} as Generator>::Yield == ()`
+error[E0271]: type mismatch resolving `<{coroutine@$DIR/issue-94429.rs:17:9: 17:16} as Coroutine>::Yield == ()`
   --> $DIR/issue-94429.rs:15:26
    |
-LL |     fn run(&mut self) -> Self::Gen {
-   |                          ^^^^^^^^^ expected integer, found `()`
+LL |     fn run(&mut self) -> Self::Coro {
+   |                          ^^^^^^^^^^ expected integer, found `()`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs b/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs
index fdd8fa65bd0..5bd854be8c6 100644
--- a/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs
+++ b/tests/ui/type-alias-impl-trait/issue-96572-unconstrained.rs
@@ -26,11 +26,9 @@ fn upvar() {
 fn enum_upvar() {
     type T = impl Copy;
     let foo: T = Some((1u32, 2u32));
-    let x = move || {
-        match foo {
-            None => (),
-            Some((a, b)) => (),
-        }
+    let x = move || match foo {
+        None => (),
+        Some((a, b)) => (),
     };
 }
 
@@ -63,6 +61,19 @@ mod only_pattern {
             None => {}
         }
     }
+
+    type V = impl Copy;
+
+    fn baz(baz: Option<V>) {
+        match baz {
+            _ => {}
+            Some((mut x, mut y)) => {
+                x = 42;
+                y = "foo";
+            }
+            None => {}
+        }
+    }
 }
 
 mod only_pattern_rpit {
@@ -71,11 +82,7 @@ mod only_pattern_rpit {
         let (mut x, mut y) = foo(false);
         x = 42;
         y = "foo";
-        if b {
-            panic!()
-        } else {
-            foo(true)
-        }
+        if b { panic!() } else { foo(true) }
     }
 
     fn bar(b: bool) -> Option<impl Copy> {
diff --git a/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs b/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs
new file mode 100644
index 00000000000..5f3dbaa1798
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/nested_impl_trait_in_assoc_ty.rs
@@ -0,0 +1,44 @@
+//! This test checks that we do not walk types in async blocks for
+//! determining the opaque types that appear in a signature. async blocks,
+//! all other coroutines and closures are always private and not part of
+//! a signature. They become part of a signature via `dyn Trait` or `impl Trait`,
+//! which is something that we process abstractly without looking at its hidden
+//! types.
+// edition: 2021
+// check-pass
+
+#![feature(impl_trait_in_assoc_type)]
+
+use std::future::Future;
+
+pub struct MemtableLocalStateStore {
+    mem_table: MemTable,
+}
+
+impl LocalStateStore for MemtableLocalStateStore {
+    type IterStream<'a> = impl Sized + 'a where Self: 'a;
+
+    fn iter(&self) -> impl Future<Output = Self::IterStream<'_>> + '_ {
+        async move { merge_stream(self.mem_table.iter()) }
+    }
+}
+
+trait LocalStateStore {
+    type IterStream<'a>
+    where
+        Self: 'a;
+
+    fn iter(&self) -> impl Future<Output = Self::IterStream<'_>> + '_;
+}
+
+struct MemTable;
+
+impl MemTable {
+    fn iter<'a>(&'a self) -> impl Iterator<Item = &'a ()> {
+        std::iter::empty()
+    }
+}
+
+pub(crate) async fn merge_stream<'a>(mem_table_iter: impl Iterator<Item = &'a ()>) {}
+
+fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/not_well_formed.fixed b/tests/ui/type-alias-impl-trait/not_well_formed.fixed
new file mode 100644
index 00000000000..d98e83ff6dd
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/not_well_formed.fixed
@@ -0,0 +1,19 @@
+// run-rustfix
+#![feature(type_alias_impl_trait)]
+#![allow(dead_code)]
+
+fn main() {}
+
+trait TraitWithAssoc {
+    type Assoc;
+}
+
+type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>; //~ associated type `Assoc` not found for `V`
+
+trait Trait<U> {}
+
+impl<W> Trait<W> for () {}
+
+fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T> {
+    ()
+}
diff --git a/tests/ui/type-alias-impl-trait/not_well_formed.rs b/tests/ui/type-alias-impl-trait/not_well_formed.rs
index fbb7a4d58e4..18f173a693d 100644
--- a/tests/ui/type-alias-impl-trait/not_well_formed.rs
+++ b/tests/ui/type-alias-impl-trait/not_well_formed.rs
@@ -1,4 +1,6 @@
+// run-rustfix
 #![feature(type_alias_impl_trait)]
+#![allow(dead_code)]
 
 fn main() {}
 
diff --git a/tests/ui/type-alias-impl-trait/not_well_formed.stderr b/tests/ui/type-alias-impl-trait/not_well_formed.stderr
index c36b95f47e8..b267e6a7544 100644
--- a/tests/ui/type-alias-impl-trait/not_well_formed.stderr
+++ b/tests/ui/type-alias-impl-trait/not_well_formed.stderr
@@ -1,8 +1,13 @@
 error[E0220]: associated type `Assoc` not found for `V`
-  --> $DIR/not_well_formed.rs:9:29
+  --> $DIR/not_well_formed.rs:11:29
    |
 LL | type Foo<V> = impl Trait<V::Assoc>;
-   |                             ^^^^^ there is a similarly named associated type `Assoc` in the trait `TraitWithAssoc`
+   |                             ^^^^^ there is an associated type `Assoc` in the trait `TraitWithAssoc`
+   |
+help: consider restricting type parameter `V`
+   |
+LL | type Foo<V: TraitWithAssoc> = impl Trait<V::Assoc>;
+   |           ++++++++++++++++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/type-alias-impl-trait/recursive-fn-tait.rs b/tests/ui/type-alias-impl-trait/recursive-fn-tait.rs
new file mode 100644
index 00000000000..3d1759097d6
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/recursive-fn-tait.rs
@@ -0,0 +1,17 @@
+// test for #113326
+#![feature(type_alias_impl_trait)]
+
+pub type Diff = impl Fn(usize) -> usize;
+
+pub fn lift() -> Diff {
+    |_: usize |loop {}
+}
+
+pub fn add(
+    n: Diff,
+    m: Diff,
+) -> Diff {
+    move |x: usize| m(n(x)) //~ ERROR: concrete type differs
+}
+
+fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr b/tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr
new file mode 100644
index 00000000000..b2898a21190
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/recursive-fn-tait.stderr
@@ -0,0 +1,14 @@
+error: concrete type differs from previous defining opaque type use
+  --> $DIR/recursive-fn-tait.rs:14:5
+   |
+LL |     move |x: usize| m(n(x))
+   |     ^^^^^^^^^^^^^^^^^^^^^^^ expected `{closure@$DIR/recursive-fn-tait.rs:7:5: 7:16}`, got `{closure@$DIR/recursive-fn-tait.rs:14:5: 14:20}`
+   |
+note: previous use here
+  --> $DIR/recursive-fn-tait.rs:7:5
+   |
+LL |     |_: usize |loop {}
+   |     ^^^^^^^^^^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/tests/ui/type-alias-impl-trait/reveal_local.rs b/tests/ui/type-alias-impl-trait/reveal_local.rs
index 7943bb240f1..07fd989b0fa 100644
--- a/tests/ui/type-alias-impl-trait/reveal_local.rs
+++ b/tests/ui/type-alias-impl-trait/reveal_local.rs
@@ -3,9 +3,6 @@
 use std::fmt::Debug;
 
 type Foo = impl Debug;
-//~^ ERROR cycle detected
-//~| ERROR cycle detected
-//~| ERROR cycle detected
 
 fn is_send<T: Send>() {}
 
diff --git a/tests/ui/type-alias-impl-trait/reveal_local.stderr b/tests/ui/type-alias-impl-trait/reveal_local.stderr
index c62fd88f4e2..796e2d011dc 100644
--- a/tests/ui/type-alias-impl-trait/reveal_local.stderr
+++ b/tests/ui/type-alias-impl-trait/reveal_local.stderr
@@ -1,44 +1,5 @@
-error[E0391]: cycle detected when computing type of opaque `Foo::{opaque#0}`
-  --> $DIR/reveal_local.rs:5:12
-   |
-LL | type Foo = impl Debug;
-   |            ^^^^^^^^^^
-   |
-note: ...which requires type-checking `not_good`...
-  --> $DIR/reveal_local.rs:15:5
-   |
-LL |     is_send::<Foo>();
-   |     ^^^^^^^^^^^^^^
-   = note: ...which requires evaluating trait selection obligation `Foo: core::marker::Send`...
-   = note: ...which again requires computing type of opaque `Foo::{opaque#0}`, completing the cycle
-note: cycle used when computing type of `Foo::{opaque#0}`
-  --> $DIR/reveal_local.rs:5:12
-   |
-LL | type Foo = impl Debug;
-   |            ^^^^^^^^^^
-   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-
-error[E0391]: cycle detected when computing type of opaque `Foo::{opaque#0}`
-  --> $DIR/reveal_local.rs:5:12
-   |
-LL | type Foo = impl Debug;
-   |            ^^^^^^^^^^
-   |
-note: ...which requires type-checking `not_good`...
-  --> $DIR/reveal_local.rs:12:1
-   |
-LL | fn not_good() {
-   | ^^^^^^^^^^^^^
-   = note: ...which again requires computing type of opaque `Foo::{opaque#0}`, completing the cycle
-note: cycle used when computing type of `Foo::{opaque#0}`
-  --> $DIR/reveal_local.rs:5:12
-   |
-LL | type Foo = impl Debug;
-   |            ^^^^^^^^^^
-   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-
 error: cannot check whether the hidden type of `reveal_local[9507]::Foo::{opaque#0}` satisfies auto traits
-  --> $DIR/reveal_local.rs:15:15
+  --> $DIR/reveal_local.rs:12:15
    |
 LL |     is_send::<Foo>();
    |               ^^^
@@ -49,37 +10,18 @@ note: opaque type is declared here
 LL | type Foo = impl Debug;
    |            ^^^^^^^^^^
 note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
-  --> $DIR/reveal_local.rs:12:4
+  --> $DIR/reveal_local.rs:9:4
    |
 LL | fn not_good() {
    |    ^^^^^^^^
 note: required by a bound in `is_send`
-  --> $DIR/reveal_local.rs:10:15
+  --> $DIR/reveal_local.rs:7:15
    |
 LL | fn is_send<T: Send>() {}
    |               ^^^^ required by this bound in `is_send`
 
-error[E0391]: cycle detected when computing type of opaque `Foo::{opaque#0}`
-  --> $DIR/reveal_local.rs:5:12
-   |
-LL | type Foo = impl Debug;
-   |            ^^^^^^^^^^
-   |
-note: ...which requires type-checking `not_gooder`...
-  --> $DIR/reveal_local.rs:19:1
-   |
-LL | fn not_gooder() -> Foo {
-   | ^^^^^^^^^^^^^^^^^^^^^^
-   = note: ...which again requires computing type of opaque `Foo::{opaque#0}`, completing the cycle
-note: cycle used when computing type of `Foo::{opaque#0}`
-  --> $DIR/reveal_local.rs:5:12
-   |
-LL | type Foo = impl Debug;
-   |            ^^^^^^^^^^
-   = note: see https://rustc-dev-guide.rust-lang.org/overview.html#queries and https://rustc-dev-guide.rust-lang.org/query.html for more information
-
 error: cannot check whether the hidden type of `reveal_local[9507]::Foo::{opaque#0}` satisfies auto traits
-  --> $DIR/reveal_local.rs:25:15
+  --> $DIR/reveal_local.rs:22:15
    |
 LL |     is_send::<Foo>();
    |               ^^^
@@ -90,16 +32,15 @@ note: opaque type is declared here
 LL | type Foo = impl Debug;
    |            ^^^^^^^^^^
 note: this item depends on auto traits of the hidden type, but may also be registering the hidden type. This is not supported right now. You can try moving the opaque type and the item that actually registers a hidden type into a new submodule
-  --> $DIR/reveal_local.rs:19:4
+  --> $DIR/reveal_local.rs:16:4
    |
 LL | fn not_gooder() -> Foo {
    |    ^^^^^^^^^^
 note: required by a bound in `is_send`
-  --> $DIR/reveal_local.rs:10:15
+  --> $DIR/reveal_local.rs:7:15
    |
 LL | fn is_send<T: Send>() {}
    |               ^^^^ required by this bound in `is_send`
 
-error: aborting due to 5 previous errors
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0391`.
diff --git a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr
index 4b09a9e743b..844103d77a8 100644
--- a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr
+++ b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.current.stderr
@@ -1,11 +1,17 @@
 error: internal compiler error: no errors encountered even though `delay_span_bug` issued
 
-error: internal compiler error: ambiguity performing ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: ProvePredicate { predicate: Binder { value: ProjectionPredicate(AliasTy { args: [FnDef(DefId(get_rpit), []), ()], def_id: DefId(ops::function::FnOnce::Output) }, Term::Ty(Alias(Opaque, AliasTy { args: [], def_id: DefId(Opaque::{opaque#0}) }))), bound_vars: [] } } }
+error: internal compiler error: {OpaqueTypeKey { def_id: DefId(get_rpit::{opaque#0}), args: [] }: OpaqueTypeDecl { hidden_type: OpaqueHiddenType { span: no-location (#0), ty: Alias(Opaque, AliasTy { args: [], def_id: DefId(Opaque::{opaque#0}) }) } }}
+   |
+   = 
+           
+
+error: internal compiler error: error performing ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: UserFacing }, value: ProvePredicate { predicate: Binder { value: ProjectionPredicate(AliasTy { args: [FnDef(DefId(get_rpit), []), ()], def_id: DefId(ops::function::FnOnce::Output) }, Term::Ty(Alias(Opaque, AliasTy { args: [], def_id: DefId(Opaque::{opaque#0}) }))), bound_vars: [] } } }
   --> $DIR/rpit_tait_equality_in_canonical_query.rs:28:5
    |
 LL |     query(get_rpit);
    |     ^^^^^^^^^^^^^^^
    |
+
   --> $DIR/rpit_tait_equality_in_canonical_query.rs:28:5
    |
 LL |     query(get_rpit);
@@ -14,7 +20,10 @@ LL |     query(get_rpit);
 
 
 
+
+
+
 query stack during panic:
 end of query stack
-error: aborting due to 2 previous errors
+error: aborting due to 3 previous errors
 
diff --git a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs
index 8dccd2ed46f..0f0002f7797 100644
--- a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs
+++ b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query.rs
@@ -12,7 +12,7 @@
 //[current] known-bug: #108498
 //[current] failure-status: 101
 //[current] normalize-stderr-test: "DefId\(.*?\]::" -> "DefId("
-//[current] normalize-stderr-test: "(?m)^note: .*\n" -> ""
+//[current] normalize-stderr-test: "(?m)note: .*$" -> ""
 //[current] normalize-stderr-test: "(?m)^ *\d+: .*\n" -> ""
 //[current] normalize-stderr-test: "(?m)^ *at .*\n" -> ""
 
diff --git a/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs
new file mode 100644
index 00000000000..9d7e647dd94
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/rpit_tait_equality_in_canonical_query_2.rs
@@ -0,0 +1,18 @@
+// The canonical query `Projection(<get_rpit as FnOnce>::Output = Opaque)`
+// is the *only* site that defines `Opaque` in MIR typeck.
+//
+// check-pass
+
+#![feature(type_alias_impl_trait)]
+
+type Opaque = impl Sized;
+
+fn get_rpit() -> impl Sized {}
+
+fn query(_: impl FnOnce() -> Opaque) {}
+
+fn test(_: Opaque) {
+    query(get_rpit);
+}
+
+fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.rs b/tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.rs
new file mode 100644
index 00000000000..ae3d317ab46
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.rs
@@ -0,0 +1,14 @@
+#![feature(type_alias_impl_trait)]
+
+type Tait = impl Copy;
+// Make sure that this TAIT isn't considered unconstrained...
+
+fn empty_opaque() -> Tait {
+    if false {
+        match empty_opaque() {}
+        //~^ ERROR non-empty
+    }
+    0u8
+}
+
+fn main() {}
diff --git a/tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.stderr b/tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.stderr
new file mode 100644
index 00000000000..6cc5b7a8a0a
--- /dev/null
+++ b/tests/ui/type-alias-impl-trait/unconstrained-due-to-bad-pattern.stderr
@@ -0,0 +1,17 @@
+error[E0004]: non-exhaustive patterns: type `Tait` is non-empty
+  --> $DIR/unconstrained-due-to-bad-pattern.rs:8:15
+   |
+LL |         match empty_opaque() {}
+   |               ^^^^^^^^^^^^^^
+   |
+   = note: the matched value is of type `Tait`
+help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
+   |
+LL ~         match empty_opaque() {
+LL +             _ => todo!(),
+LL +         }
+   |
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0004`.
diff --git a/tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.rs b/tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.rs
new file mode 100644
index 00000000000..adf3049b4ba
--- /dev/null
+++ b/tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.rs
@@ -0,0 +1,6 @@
+fn foo() -> Result<String, ()> {
+    let out: Result<(), ()> = Ok(());
+    out //~ ERROR mismatched types
+}
+
+fn main() {}
diff --git a/tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.stderr b/tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.stderr
new file mode 100644
index 00000000000..447b22a152d
--- /dev/null
+++ b/tests/ui/type/type-check/issue-116967-cannot-coerce-returned-result.stderr
@@ -0,0 +1,15 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-116967-cannot-coerce-returned-result.rs:3:5
+   |
+LL | fn foo() -> Result<String, ()> {
+   |             ------------------ expected `Result<String, ()>` because of return type
+LL |     let out: Result<(), ()> = Ok(());
+LL |     out
+   |     ^^^ expected `Result<String, ()>`, found `Result<(), ()>`
+   |
+   = note: expected enum `Result<String, _>`
+              found enum `Result<(), _>`
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr b/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr
index 8a296dc7ee6..4412c49eadd 100644
--- a/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr
+++ b/tests/ui/type/type-parameter-defaults-referencing-Self-ppaux.stderr
@@ -24,6 +24,7 @@ LL | trait MyAdd<Rhs=Self> { fn add(&self, other: &Rhs) -> Self; }
    |       |
    |       this trait cannot be made into an object...
    = help: consider moving `add` to another trait
+   = help: only type `i32` implements the trait, consider using it directly instead
 
 error: aborting due to 2 previous errors
 
diff --git a/tests/ui/typeck/bad-index-due-to-nested.stderr b/tests/ui/typeck/bad-index-due-to-nested.stderr
index f9cdb280e27..0b705d467ff 100644
--- a/tests/ui/typeck/bad-index-due-to-nested.stderr
+++ b/tests/ui/typeck/bad-index-due-to-nested.stderr
@@ -40,7 +40,7 @@ error[E0308]: mismatched types
   --> $DIR/bad-index-due-to-nested.rs:20:9
    |
 LL | fn index<'a, K, V>(map: &'a HashMap<K, V>, k: K) -> &'a V {
-   |              - this type parameter
+   |              - found this type parameter
 LL |     map[k]
    |         ^ expected `&K`, found type parameter `K`
    |
@@ -55,7 +55,7 @@ error[E0308]: mismatched types
   --> $DIR/bad-index-due-to-nested.rs:20:5
    |
 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
+   |                 - found this type parameter         ----- expected `&'a V` because of return type
 LL |     map[k]
    |     ^^^^^^ expected `&V`, found type parameter `V`
    |
diff --git a/tests/ui/typeck/issue-107087.stderr b/tests/ui/typeck/issue-107087.stderr
index 70f19320802..8921e3f7694 100644
--- a/tests/ui/typeck/issue-107087.stderr
+++ b/tests/ui/typeck/issue-107087.stderr
@@ -2,7 +2,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/issue-107087.rs:16:5
    |
 LL |     A::B::<>::C
-   |     ^^^^^^^^ help: use the fully-qualified path: `<A<_> as Foo>::B`
+   |     ^^^^^^^^ help: use fully-qualified syntax: `<A<_> as Foo>::B`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/typeck/issue-110052.stderr b/tests/ui/typeck/issue-110052.stderr
index 0c15c03a740..75374fa6121 100644
--- a/tests/ui/typeck/issue-110052.stderr
+++ b/tests/ui/typeck/issue-110052.stderr
@@ -2,7 +2,7 @@ error[E0223]: ambiguous associated type
   --> $DIR/issue-110052.rs:6:30
    |
 LL |     for<'iter> dyn Validator<<&'iter I>::Item>:,
-   |                              ^^^^^^^^^^^^^^^^ help: use the fully-qualified path: `<&'iter I as IntoIterator>::Item`
+   |                              ^^^^^^^^^^^^^^^^ help: use fully-qualified syntax: `<&'iter I as IntoIterator>::Item`
 
 error: aborting due to previous error
 
diff --git a/tests/ui/typeck/issue-114529-illegal-break-with-value.rs b/tests/ui/typeck/issue-114529-illegal-break-with-value.rs
new file mode 100644
index 00000000000..613d1b6343a
--- /dev/null
+++ b/tests/ui/typeck/issue-114529-illegal-break-with-value.rs
@@ -0,0 +1,20 @@
+// Regression test for issue #114529
+// Tests that we do not ICE during const eval for a
+// break-with-value in contexts where it is illegal
+
+#[allow(while_true)]
+fn main() {
+    [(); {
+        while true {
+            break 9; //~ ERROR `break` with value from a `while` loop
+        };
+        51
+    }];
+
+    [(); {
+        while let Some(v) = Some(9) {
+            break v; //~ ERROR `break` with value from a `while` loop
+        };
+        51
+    }];
+}
diff --git a/tests/ui/typeck/issue-114529-illegal-break-with-value.stderr b/tests/ui/typeck/issue-114529-illegal-break-with-value.stderr
new file mode 100644
index 00000000000..4d6c27bbbd0
--- /dev/null
+++ b/tests/ui/typeck/issue-114529-illegal-break-with-value.stderr
@@ -0,0 +1,29 @@
+error[E0571]: `break` with value from a `while` loop
+  --> $DIR/issue-114529-illegal-break-with-value.rs:9:13
+   |
+LL |         while true {
+   |         ---------- you can't `break` with a value in a `while` loop
+LL |             break 9;
+   |             ^^^^^^^ can only break with a value inside `loop` or breakable block
+   |
+help: use `break` on its own without a value inside this `while` loop
+   |
+LL |             break;
+   |             ~~~~~
+
+error[E0571]: `break` with value from a `while` loop
+  --> $DIR/issue-114529-illegal-break-with-value.rs:16:13
+   |
+LL |         while let Some(v) = Some(9) {
+   |         --------------------------- you can't `break` with a value in a `while` loop
+LL |             break v;
+   |             ^^^^^^^ can only break with a value inside `loop` or breakable block
+   |
+help: use `break` on its own without a value inside this `while` loop
+   |
+LL |             break;
+   |             ~~~~~
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0571`.
diff --git a/tests/ui/typeck/issue-114918/const-in-impl-fn-return-type.rs b/tests/ui/typeck/issue-114918/const-in-impl-fn-return-type.rs
index a1b9a7eba4d..193544ebd3f 100644
--- a/tests/ui/typeck/issue-114918/const-in-impl-fn-return-type.rs
+++ b/tests/ui/typeck/issue-114918/const-in-impl-fn-return-type.rs
@@ -5,7 +5,7 @@
 
 
 trait Trait {
-    fn func<const N: u32>() -> [ (); N ];
+    fn func<const N: u32>() -> [ (); N ]; //~ ERROR mismatched types
 }
 
 struct S {}
diff --git a/tests/ui/typeck/issue-114918/const-in-impl-fn-return-type.stderr b/tests/ui/typeck/issue-114918/const-in-impl-fn-return-type.stderr
index 9843651b1e6..16aaf0615ed 100644
--- a/tests/ui/typeck/issue-114918/const-in-impl-fn-return-type.stderr
+++ b/tests/ui/typeck/issue-114918/const-in-impl-fn-return-type.stderr
@@ -4,6 +4,12 @@ error[E0308]: mismatched types
 LL |     fn func<const N: u32>() -> [ (); { () }] {
    |                                        ^^ expected `usize`, found `()`
 
-error: aborting due to previous error
+error[E0308]: mismatched types
+  --> $DIR/const-in-impl-fn-return-type.rs:8:38
+   |
+LL |     fn func<const N: u32>() -> [ (); N ];
+   |                                      ^ expected `usize`, found `u32`
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0308`.
diff --git a/tests/ui/typeck/issue-116473-ice-wrong-span-variant-args.stderr b/tests/ui/typeck/issue-116473-ice-wrong-span-variant-args.stderr
index 437800f1181..b17936ee3d3 100644
--- a/tests/ui/typeck/issue-116473-ice-wrong-span-variant-args.stderr
+++ b/tests/ui/typeck/issue-116473-ice-wrong-span-variant-args.stderr
@@ -7,10 +7,7 @@ LL |     ($variant:tt) => (if let EnumUnit::$variant::<i32, u32> {} = 5 { true }
    |                                        not allowed on this type
 ...
 LL |     recursive_tt!();
-   |     ---------------
-   |     |
-   |     in this macro invocation
-   |     in this macro invocation
+   |     --------------- in this macro invocation
    |
    = note: enum variants can't have type parameters
    = note: this error originates in the macro `recursive_tt` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -44,10 +41,7 @@ LL |     ($variant:ident) => (if let EnumUnit::$variant::<i32, u32> {} = 5 { tru
    |                                                      ^^^  ^^^ type argument not allowed
 ...
 LL |     recursive_ident!();
-   |     ------------------
-   |     |
-   |     in this macro invocation
-   |     in this macro invocation
+   |     ------------------ in this macro invocation
    |
    = note: enum variants can't have type parameters
    = note: this error originates in the macro `recursive_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -81,10 +75,7 @@ LL |     ($variant:tt) => (if let EnumUnit::$variant::<i32, u32> {} = 5 { true }
    |                                        not allowed on this type
 ...
 LL |     nested1_tt!();
-   |     -------------
-   |     |
-   |     in this macro invocation
-   |     in this macro invocation
+   |     ------------- in this macro invocation
    |
    = note: enum variants can't have type parameters
    = note: this error originates in the macro `nested2_tt` which comes from the expansion of the macro `nested1_tt` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -119,10 +110,7 @@ LL |     ($variant:ident) => (if let EnumUnit::$variant::<i32, u32> {} = 5 { tru
    |                                                      ^^^  ^^^ type argument not allowed
 ...
 LL |     nested1_ident!();
-   |     ----------------
-   |     |
-   |     in this macro invocation
-   |     in this macro invocation
+   |     ---------------- in this macro invocation
    |
    = note: enum variants can't have type parameters
    = note: this error originates in the macro `nested2_ident` which comes from the expansion of the macro `nested1_ident` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -156,10 +144,7 @@ LL |     ($arg1:tt, $arg2:tt) => (if let EnumUnit::VariantB::<$arg1, $arg2> {}
    |                                               not allowed on this type
 ...
 LL |     nested1_tt_args_in_first_macro!();
-   |     ---------------------------------
-   |     |
-   |     in this macro invocation
-   |     in this macro invocation
+   |     --------------------------------- in this macro invocation
    |
    = note: enum variants can't have type parameters
    = note: this error originates in the macro `nested1_tt_args_in_first_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
@@ -194,10 +179,7 @@ LL |     ($arg1:ident, $arg2:ident) => (if let EnumUnit::VariantB::<$arg1, $arg2
    |                                                     not allowed on this type
 ...
 LL |     nested1_ident_args_in_first_macro!();
-   |     ------------------------------------
-   |     |
-   |     in this macro invocation
-   |     in this macro invocation
+   |     ------------------------------------ in this macro invocation
    |
    = note: enum variants can't have type parameters
    = note: this error originates in the macro `nested2_ident_args_in_first_macro` which comes from the expansion of the macro `nested1_ident_args_in_first_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
diff --git a/tests/ui/typeck/issue-13853.stderr b/tests/ui/typeck/issue-13853.stderr
index 8ecb8b68016..0683c782933 100644
--- a/tests/ui/typeck/issue-13853.stderr
+++ b/tests/ui/typeck/issue-13853.stderr
@@ -2,7 +2,7 @@ error[E0308]: mismatched types
   --> $DIR/issue-13853.rs:14:9
    |
 LL |     fn nodes<'a, I: Iterator<Item=&'a N>>(&self) -> I
-   |                  - this type parameter              - expected `I` because of return type
+   |                  - expected this type parameter     - expected `I` because of return type
 ...
 LL |         self.iter()
    |         ^^^^^^^^^^^ expected type parameter `I`, found `Iter<'_, N>`
diff --git a/tests/ui/typeck/issue-36708.stderr b/tests/ui/typeck/issue-36708.stderr
index 140f19f1ff7..f1e0f471928 100644
--- a/tests/ui/typeck/issue-36708.stderr
+++ b/tests/ui/typeck/issue-36708.stderr
@@ -2,7 +2,12 @@ error[E0049]: method `foo` has 1 type parameter but its trait declaration has 0
   --> $DIR/issue-36708.rs:8:12
    |
 LL |     fn foo<T>() {}
-   |            ^ found 1 type parameter, expected 0
+   |            ^ found 1 type parameter
+   |
+  ::: $DIR/auxiliary/issue-36708.rs:4:5
+   |
+LL |     fn foo();
+   |     --------- expected 0 type parameters
 
 error: aborting due to previous error
 
diff --git a/tests/ui/typeck/issue-91334.rs b/tests/ui/typeck/issue-91334.rs
index 29204276bb3..1ffc56e6612 100644
--- a/tests/ui/typeck/issue-91334.rs
+++ b/tests/ui/typeck/issue-91334.rs
@@ -2,6 +2,6 @@
 
 // error-pattern: this file contains an unclosed delimiter
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 fn f(){||yield(((){),
diff --git a/tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr b/tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr
index f53abe53bf1..c4f16429563 100644
--- a/tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr
+++ b/tests/ui/typeck/tag-that-dare-not-speak-its-name.stderr
@@ -8,6 +8,10 @@ LL |     let x : char = last(y);
    |
    = note: expected type `char`
               found enum `Option<_>`
+help: consider using `Option::expect` to unwrap the `Option<_>` value, panicking if the value is an `Option::None`
+   |
+LL |     let x : char = last(y).expect("REASON");
+   |                           +++++++++++++++++
 
 error: aborting due to previous error
 
diff --git a/tests/ui/ufcs/ufcs-explicit-self-bad.rs b/tests/ui/ufcs/ufcs-explicit-self-bad.rs
index cb1fac0bae6..9b0f99a189a 100644
--- a/tests/ui/ufcs/ufcs-explicit-self-bad.rs
+++ b/tests/ui/ufcs/ufcs-explicit-self-bad.rs
@@ -36,6 +36,7 @@ impl<'a, T> SomeTrait for &'a Bar<T> {
     fn dummy1(self: &&'a Bar<T>) { }
     fn dummy2(self: &Bar<T>) {} //~ ERROR mismatched `self` parameter type
     //~^ ERROR mismatched `self` parameter type
+    //~| ERROR has an incompatible type for trait
     fn dummy3(self: &&Bar<T>) {}
     //~^ ERROR mismatched `self` parameter type
     //~| expected reference `&'a Bar<T>`
diff --git a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
index f325d1d8182..0efaa41d48a 100644
--- a/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
+++ b/tests/ui/ufcs/ufcs-explicit-self-bad.stderr
@@ -64,7 +64,7 @@ LL |     fn dummy2(self: &Bar<T>) {}
    |                     ^^^^^^^
 
 error[E0308]: mismatched `self` parameter type
-  --> $DIR/ufcs-explicit-self-bad.rs:39:21
+  --> $DIR/ufcs-explicit-self-bad.rs:40:21
    |
 LL |     fn dummy3(self: &&Bar<T>) {}
    |                     ^^^^^^^^ lifetime mismatch
@@ -72,7 +72,7 @@ LL |     fn dummy3(self: &&Bar<T>) {}
    = note: expected reference `&'a Bar<T>`
               found reference `&Bar<T>`
 note: the anonymous lifetime defined here...
-  --> $DIR/ufcs-explicit-self-bad.rs:39:22
+  --> $DIR/ufcs-explicit-self-bad.rs:40:22
    |
 LL |     fn dummy3(self: &&Bar<T>) {}
    |                      ^^^^^^^
@@ -83,7 +83,7 @@ LL | impl<'a, T> SomeTrait for &'a Bar<T> {
    |      ^^
 
 error[E0308]: mismatched `self` parameter type
-  --> $DIR/ufcs-explicit-self-bad.rs:39:21
+  --> $DIR/ufcs-explicit-self-bad.rs:40:21
    |
 LL |     fn dummy3(self: &&Bar<T>) {}
    |                     ^^^^^^^^ lifetime mismatch
@@ -96,12 +96,29 @@ note: the lifetime `'a` as defined here...
 LL | impl<'a, T> SomeTrait for &'a Bar<T> {
    |      ^^
 note: ...does not necessarily outlive the anonymous lifetime defined here
-  --> $DIR/ufcs-explicit-self-bad.rs:39:22
+  --> $DIR/ufcs-explicit-self-bad.rs:40:22
    |
 LL |     fn dummy3(self: &&Bar<T>) {}
    |                      ^^^^^^^
 
-error: aborting due to 7 previous errors
+error[E0053]: method `dummy2` has an incompatible type for trait
+  --> $DIR/ufcs-explicit-self-bad.rs:37:21
+   |
+LL |     fn dummy2(self: &Bar<T>) {}
+   |               ------^^^^^^^
+   |               |     |
+   |               |     expected `&'a Bar<T>`, found `Bar<T>`
+   |               help: change the self-receiver type to match the trait: `&self`
+   |
+note: type in trait
+  --> $DIR/ufcs-explicit-self-bad.rs:31:15
+   |
+LL |     fn dummy2(&self);
+   |               ^^^^^
+   = note: expected signature `fn(&&'a Bar<T>)`
+              found signature `fn(&Bar<T>)`
+
+error: aborting due to 8 previous errors
 
-Some errors have detailed explanations: E0307, E0308.
-For more information about an error, try `rustc --explain E0307`.
+Some errors have detailed explanations: E0053, E0307, E0308.
+For more information about an error, try `rustc --explain E0053`.
diff --git a/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.rs b/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.rs
index 9d0aa413207..057bdf0f618 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.rs
+++ b/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.rs
@@ -5,5 +5,5 @@
 fn g<F>(_: F) where F: FnOnce(Option<F>) {}
 
 fn main() {
-    g(|_| {  }); //~ ERROR closure/generator type that references itself
+    g(|_| {  }); //~ ERROR closure/coroutine type that references itself
 }
diff --git a/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr b/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr
index 6d5dbca0558..9d3c1902cf3 100644
--- a/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closure-no-cyclic-sig.stderr
@@ -1,4 +1,4 @@
-error[E0644]: closure/generator type that references itself
+error[E0644]: closure/coroutine type that references itself
   --> $DIR/unboxed-closure-no-cyclic-sig.rs:8:7
    |
 LL |     g(|_| {  });
diff --git a/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr b/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr
index 0ea1c1dcd5b..ce4d0fe25f5 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-fnmut-as-fn.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<(isize,)>` closure, found `S`
+error[E0277]: expected a `Fn(isize)` closure, found `S`
   --> $DIR/unboxed-closures-fnmut-as-fn.rs:27:21
    |
 LL |     let x = call_it(&S, 22);
-   |             ------- ^^ expected an `Fn<(isize,)>` closure, found `S`
+   |             ------- ^^ expected an `Fn(isize)` closure, found `S`
    |             |
    |             required by a bound introduced by this call
    |
diff --git a/tests/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr b/tests/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr
index 802696e1b2f..d836af2b014 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-unsafe-extern-fn.stderr
@@ -1,4 +1,4 @@
-error[E0277]: expected a `Fn<(&isize,)>` closure, found `for<'a> unsafe fn(&'a isize) -> isize {square}`
+error[E0277]: expected a `Fn(&isize)` closure, found `for<'a> unsafe fn(&'a isize) -> isize {square}`
   --> $DIR/unboxed-closures-unsafe-extern-fn.rs:20:21
    |
 LL |     let x = call_it(&square, 22);
@@ -14,7 +14,7 @@ note: required by a bound in `call_it`
 LL | fn call_it<F: Fn(&isize) -> isize>(_: &F, _: isize) -> isize {
    |               ^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it`
 
-error[E0277]: expected a `FnMut<(&isize,)>` closure, found `for<'a> unsafe fn(&'a isize) -> isize {square}`
+error[E0277]: expected a `FnMut(&isize)` closure, found `for<'a> unsafe fn(&'a isize) -> isize {square}`
   --> $DIR/unboxed-closures-unsafe-extern-fn.rs:25:25
    |
 LL |     let y = call_it_mut(&mut square, 22);
@@ -30,7 +30,7 @@ note: required by a bound in `call_it_mut`
 LL | fn call_it_mut<F: FnMut(&isize) -> isize>(_: &mut F, _: isize) -> isize {
    |                   ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it_mut`
 
-error[E0277]: expected a `FnOnce<(&isize,)>` closure, found `for<'a> unsafe fn(&'a isize) -> isize {square}`
+error[E0277]: expected a `FnOnce(&isize)` closure, found `for<'a> unsafe fn(&'a isize) -> isize {square}`
   --> $DIR/unboxed-closures-unsafe-extern-fn.rs:30:26
    |
 LL |     let z = call_it_once(square, 22);
diff --git a/tests/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr b/tests/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr
index 0bbb9836c58..c0dcf83a5bb 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-wrong-abi.stderr
@@ -1,8 +1,8 @@
-error[E0277]: expected a `Fn<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
+error[E0277]: expected a `Fn(&isize)` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
   --> $DIR/unboxed-closures-wrong-abi.rs:20:21
    |
 LL |     let x = call_it(&square, 22);
-   |             ------- ^^^^^^^ expected an `Fn<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
+   |             ------- ^^^^^^^ expected an `Fn(&isize)` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
    |             |
    |             required by a bound introduced by this call
    |
@@ -13,11 +13,11 @@ note: required by a bound in `call_it`
 LL | fn call_it<F: Fn(&isize) -> isize>(_: &F, _: isize) -> isize {
    |               ^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it`
 
-error[E0277]: expected a `FnMut<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
+error[E0277]: expected a `FnMut(&isize)` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
   --> $DIR/unboxed-closures-wrong-abi.rs:25:25
    |
 LL |     let y = call_it_mut(&mut square, 22);
-   |             ----------- ^^^^^^^^^^^ expected an `FnMut<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
+   |             ----------- ^^^^^^^^^^^ expected an `FnMut(&isize)` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
    |             |
    |             required by a bound introduced by this call
    |
@@ -28,11 +28,11 @@ note: required by a bound in `call_it_mut`
 LL | fn call_it_mut<F: FnMut(&isize) -> isize>(_: &mut F, _: isize) -> isize {
    |                   ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it_mut`
 
-error[E0277]: expected a `FnOnce<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
+error[E0277]: expected a `FnOnce(&isize)` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
   --> $DIR/unboxed-closures-wrong-abi.rs:30:26
    |
 LL |     let z = call_it_once(square, 22);
-   |             ------------ ^^^^^^ expected an `FnOnce<(&isize,)>` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
+   |             ------------ ^^^^^^ expected an `FnOnce(&isize)` closure, found `for<'a> extern "C" fn(&'a isize) -> isize {square}`
    |             |
    |             required by a bound introduced by this call
    |
diff --git a/tests/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr b/tests/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr
index 31a66790ce0..d261c38f50c 100644
--- a/tests/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr
+++ b/tests/ui/unboxed-closures/unboxed-closures-wrong-arg-type-extern-fn.stderr
@@ -1,4 +1,4 @@
-error[E0277]: expected a `Fn<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}`
+error[E0277]: expected a `Fn(&isize)` closure, found `unsafe fn(isize) -> isize {square}`
   --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:21:21
    |
 LL |     let x = call_it(&square, 22);
@@ -14,7 +14,7 @@ note: required by a bound in `call_it`
 LL | fn call_it<F: Fn(&isize) -> isize>(_: &F, _: isize) -> isize {
    |               ^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it`
 
-error[E0277]: expected a `FnMut<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}`
+error[E0277]: expected a `FnMut(&isize)` closure, found `unsafe fn(isize) -> isize {square}`
   --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:26:25
    |
 LL |     let y = call_it_mut(&mut square, 22);
@@ -30,7 +30,7 @@ note: required by a bound in `call_it_mut`
 LL | fn call_it_mut<F: FnMut(&isize) -> isize>(_: &mut F, _: isize) -> isize {
    |                   ^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `call_it_mut`
 
-error[E0277]: expected a `FnOnce<(&isize,)>` closure, found `unsafe fn(isize) -> isize {square}`
+error[E0277]: expected a `FnOnce(&isize)` closure, found `unsafe fn(isize) -> isize {square}`
   --> $DIR/unboxed-closures-wrong-arg-type-extern-fn.rs:31:26
    |
 LL |     let z = call_it_once(square, 22);
diff --git a/tests/ui/uninhabited/diverging-guard.rs b/tests/ui/uninhabited/diverging-guard.rs
new file mode 100644
index 00000000000..7d57cd51c2d
--- /dev/null
+++ b/tests/ui/uninhabited/diverging-guard.rs
@@ -0,0 +1,10 @@
+// check-pass
+
+enum Void {}
+
+fn main() {
+    let x: Void;
+    match x {
+        _ if { loop {} } => (),
+    }
+}
diff --git a/tests/ui/union/issue-81199.rs b/tests/ui/union/issue-81199.rs
index 628e7c6ed5d..b8b0d9d33e7 100644
--- a/tests/ui/union/issue-81199.rs
+++ b/tests/ui/union/issue-81199.rs
@@ -4,6 +4,7 @@ union PtrRepr<T: ?Sized> {
     mut_ptr: *mut T,
     components: PtrComponents<T>,
     //~^ ERROR the trait bound
+    //~| ERROR field must implement `Copy`
 }
 
 #[repr(C)]
diff --git a/tests/ui/union/issue-81199.stderr b/tests/ui/union/issue-81199.stderr
index 5bb98675361..0dd894beb2a 100644
--- a/tests/ui/union/issue-81199.stderr
+++ b/tests/ui/union/issue-81199.stderr
@@ -5,7 +5,7 @@ LL |     components: PtrComponents<T>,
    |                 ^^^^^^^^^^^^^^^^ the trait `Pointee` is not implemented for `T`
    |
 note: required by a bound in `PtrComponents`
-  --> $DIR/issue-81199.rs:10:25
+  --> $DIR/issue-81199.rs:11:25
    |
 LL | struct PtrComponents<T: Pointee + ?Sized> {
    |                         ^^^^^^^ required by this bound in `PtrComponents`
@@ -14,6 +14,19 @@ help: consider further restricting this bound
 LL | union PtrRepr<T: ?Sized + Pointee> {
    |                         +++++++++
 
-error: aborting due to previous error
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/issue-81199.rs:5:5
+   |
+LL |     components: PtrComponents<T>,
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     components: std::mem::ManuallyDrop<PtrComponents<T>>,
+   |                 +++++++++++++++++++++++                +
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0277, E0740.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/union/union-unsafe.mir.stderr b/tests/ui/union/union-unsafe.mir.stderr
index 544213dbc55..15f059ffa48 100644
--- a/tests/ui/union/union-unsafe.mir.stderr
+++ b/tests/ui/union/union-unsafe.mir.stderr
@@ -1,5 +1,5 @@
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:33:5
+  --> $DIR/union-unsafe.rs:34:5
    |
 LL |     *(u.p) = 13;
    |     ^^^^^^^^^^^ access to union field
@@ -7,7 +7,7 @@ LL |     *(u.p) = 13;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:46:6
+  --> $DIR/union-unsafe.rs:47:6
    |
 LL |     *u3.a = T::default();
    |      ^^^^ access to union field
@@ -15,7 +15,7 @@ LL |     *u3.a = T::default();
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:52:6
+  --> $DIR/union-unsafe.rs:53:6
    |
 LL |     *u3.a = T::default();
    |      ^^^^ access to union field
@@ -23,7 +23,7 @@ LL |     *u3.a = T::default();
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:60:13
+  --> $DIR/union-unsafe.rs:61:13
    |
 LL |     let a = u1.a;
    |             ^^^^ access to union field
@@ -31,7 +31,7 @@ LL |     let a = u1.a;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:63:14
+  --> $DIR/union-unsafe.rs:64:14
    |
 LL |     let U1 { a } = u1;
    |              ^ access to union field
@@ -39,7 +39,7 @@ LL |     let U1 { a } = u1;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:64:12
+  --> $DIR/union-unsafe.rs:65:12
    |
 LL |     if let U1 { a: 12 } = u1 {}
    |            ^^^^^^^^^^^^ access to union field
@@ -47,7 +47,15 @@ LL |     if let U1 { a: 12 } = u1 {}
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:69:6
+  --> $DIR/union-unsafe.rs:66:12
+   |
+LL |     if let Some(U1 { a: 13 }) = Some(u1) {}
+   |            ^^^^^^^^^^^^^^^^^^ access to union field
+   |
+   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
+
+error[E0133]: access to union field is unsafe and requires unsafe function or block
+  --> $DIR/union-unsafe.rs:71:6
    |
 LL |     *u2.a = String::from("new");
    |      ^^^^ access to union field
@@ -55,7 +63,7 @@ LL |     *u2.a = String::from("new");
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:73:6
+  --> $DIR/union-unsafe.rs:75:6
    |
 LL |     *u3.a = 1;
    |      ^^^^ access to union field
@@ -63,13 +71,13 @@ LL |     *u3.a = 1;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:77:6
+  --> $DIR/union-unsafe.rs:79:6
    |
 LL |     *u3.a = String::from("new");
    |      ^^^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
-error: aborting due to 9 previous errors
+error: aborting due to 10 previous errors
 
 For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/union/union-unsafe.rs b/tests/ui/union/union-unsafe.rs
index 5e1837a901d..d1465486f77 100644
--- a/tests/ui/union/union-unsafe.rs
+++ b/tests/ui/union/union-unsafe.rs
@@ -1,30 +1,31 @@
 // revisions: mir thir
 // [thir]compile-flags: -Z thir-unsafeck
 
-use std::mem::ManuallyDrop;
 use std::cell::RefCell;
+use std::mem::ManuallyDrop;
 
 union U1 {
-    a: u8
+    a: u8,
 }
 
 union U2 {
-    a: ManuallyDrop<String>
+    a: ManuallyDrop<String>,
 }
 
 union U3<T> {
-    a: ManuallyDrop<T>
+    a: ManuallyDrop<T>,
 }
 
 union U4<T: Copy> {
-    a: T
+    a: T,
 }
 
 union URef {
     p: &'static mut i32,
 }
 
-union URefCell { // field that does not drop but is not `Copy`, either
+union URefCell {
+    // field that does not drop but is not `Copy`, either
     a: (ManuallyDrop<RefCell<i32>>, i32),
 }
 
@@ -62,6 +63,7 @@ fn main() {
 
     let U1 { a } = u1; //~ ERROR access to union field is unsafe
     if let U1 { a: 12 } = u1 {} //~ ERROR access to union field is unsafe
+    if let Some(U1 { a: 13 }) = Some(u1) {} //~ ERROR access to union field is unsafe
     // let U1 { .. } = u1; // OK
 
     let mut u2 = U2 { a: ManuallyDrop::new(String::from("old")) }; // OK
diff --git a/tests/ui/union/union-unsafe.thir.stderr b/tests/ui/union/union-unsafe.thir.stderr
index f959fe5bdb5..9ce835497c5 100644
--- a/tests/ui/union/union-unsafe.thir.stderr
+++ b/tests/ui/union/union-unsafe.thir.stderr
@@ -1,5 +1,5 @@
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:33:6
+  --> $DIR/union-unsafe.rs:34:6
    |
 LL |     *(u.p) = 13;
    |      ^^^^^ access to union field
@@ -7,7 +7,7 @@ LL |     *(u.p) = 13;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:46:6
+  --> $DIR/union-unsafe.rs:47:6
    |
 LL |     *u3.a = T::default();
    |      ^^^^ access to union field
@@ -15,7 +15,7 @@ LL |     *u3.a = T::default();
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:52:6
+  --> $DIR/union-unsafe.rs:53:6
    |
 LL |     *u3.a = T::default();
    |      ^^^^ access to union field
@@ -23,7 +23,7 @@ LL |     *u3.a = T::default();
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:60:13
+  --> $DIR/union-unsafe.rs:61:13
    |
 LL |     let a = u1.a;
    |             ^^^^ access to union field
@@ -31,7 +31,7 @@ LL |     let a = u1.a;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:63:14
+  --> $DIR/union-unsafe.rs:64:14
    |
 LL |     let U1 { a } = u1;
    |              ^ access to union field
@@ -39,15 +39,23 @@ LL |     let U1 { a } = u1;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:64:8
+  --> $DIR/union-unsafe.rs:65:20
    |
 LL |     if let U1 { a: 12 } = u1 {}
-   |        ^^^^^^^^^^^^^^^^^^^^^ access to union field
+   |                    ^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:69:6
+  --> $DIR/union-unsafe.rs:66:25
+   |
+LL |     if let Some(U1 { a: 13 }) = Some(u1) {}
+   |                         ^^ access to union field
+   |
+   = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
+
+error[E0133]: access to union field is unsafe and requires unsafe function or block
+  --> $DIR/union-unsafe.rs:71:6
    |
 LL |     *u2.a = String::from("new");
    |      ^^^^ access to union field
@@ -55,7 +63,7 @@ LL |     *u2.a = String::from("new");
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:73:6
+  --> $DIR/union-unsafe.rs:75:6
    |
 LL |     *u3.a = 1;
    |      ^^^^ access to union field
@@ -63,13 +71,13 @@ LL |     *u3.a = 1;
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
 error[E0133]: access to union field is unsafe and requires unsafe function or block
-  --> $DIR/union-unsafe.rs:77:6
+  --> $DIR/union-unsafe.rs:79:6
    |
 LL |     *u3.a = String::from("new");
    |      ^^^^ access to union field
    |
    = note: the field may not be properly initialized: using uninitialized data will cause undefined behavior
 
-error: aborting due to 9 previous errors
+error: aborting due to 10 previous errors
 
 For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/union/union-unsized.mirunsafeck.stderr b/tests/ui/union/union-unsized.mirunsafeck.stderr
index 59ab835fba2..f8da20413b2 100644
--- a/tests/ui/union/union-unsized.mirunsafeck.stderr
+++ b/tests/ui/union/union-unsized.mirunsafeck.stderr
@@ -17,7 +17,7 @@ LL |     a: Box<str>,
    |        ++++   +
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/union-unsized.rs:13:8
+  --> $DIR/union-unsized.rs:14:8
    |
 LL |     b: str,
    |        ^^^ doesn't have a size known at compile-time
@@ -34,6 +34,31 @@ help: the `Box` type always has a statically known size and allocates its conten
 LL |     b: Box<str>,
    |        ++++   +
 
-error: aborting due to 2 previous errors
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/union-unsized.rs:5:5
+   |
+LL |     a: str,
+   |     ^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     a: std::mem::ManuallyDrop<str>,
+   |        +++++++++++++++++++++++   +
+
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/union-unsized.rs:14:5
+   |
+LL |     b: str,
+   |     ^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     b: std::mem::ManuallyDrop<str>,
+   |        +++++++++++++++++++++++   +
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0277, E0740.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/union/union-unsized.rs b/tests/ui/union/union-unsized.rs
index 8e897d7d3c6..b95b2e414f3 100644
--- a/tests/ui/union/union-unsized.rs
+++ b/tests/ui/union/union-unsized.rs
@@ -4,6 +4,7 @@
 union U {
     a: str,
     //~^ ERROR the size for values of type
+    //~| ERROR field must implement `Copy`
 
     b: u8,
 }
@@ -12,6 +13,7 @@ union W {
     a: u8,
     b: str,
     //~^ ERROR the size for values of type
+    //~| ERROR field must implement `Copy`
 }
 
 fn main() {}
diff --git a/tests/ui/union/union-unsized.thirunsafeck.stderr b/tests/ui/union/union-unsized.thirunsafeck.stderr
index 59ab835fba2..f8da20413b2 100644
--- a/tests/ui/union/union-unsized.thirunsafeck.stderr
+++ b/tests/ui/union/union-unsized.thirunsafeck.stderr
@@ -17,7 +17,7 @@ LL |     a: Box<str>,
    |        ++++   +
 
 error[E0277]: the size for values of type `str` cannot be known at compilation time
-  --> $DIR/union-unsized.rs:13:8
+  --> $DIR/union-unsized.rs:14:8
    |
 LL |     b: str,
    |        ^^^ doesn't have a size known at compile-time
@@ -34,6 +34,31 @@ help: the `Box` type always has a statically known size and allocates its conten
 LL |     b: Box<str>,
    |        ++++   +
 
-error: aborting due to 2 previous errors
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/union-unsized.rs:5:5
+   |
+LL |     a: str,
+   |     ^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     a: std::mem::ManuallyDrop<str>,
+   |        +++++++++++++++++++++++   +
+
+error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
+  --> $DIR/union-unsized.rs:14:5
+   |
+LL |     b: str,
+   |     ^^^^^^
+   |
+   = note: union fields must not have drop side-effects, which is currently enforced via either `Copy` or `ManuallyDrop<...>`
+help: wrap the field type in `ManuallyDrop<...>`
+   |
+LL |     b: std::mem::ManuallyDrop<str>,
+   |        +++++++++++++++++++++++   +
+
+error: aborting due to 4 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0277, E0740.
+For more information about an error, try `rustc --explain E0277`.
diff --git a/tests/ui/unresolved/auxiliary/library.rs b/tests/ui/unresolved/auxiliary/library.rs
new file mode 100644
index 00000000000..1169ed96225
--- /dev/null
+++ b/tests/ui/unresolved/auxiliary/library.rs
@@ -0,0 +1 @@
+pub struct SomeUsefulType;
diff --git a/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs b/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs
new file mode 100644
index 00000000000..af8207aaadd
--- /dev/null
+++ b/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.rs
@@ -0,0 +1,31 @@
+// Test that we don't prepend `::` to paths referencing crates from the extern prelude
+// when it can be avoided[^1] since it's more idiomatic to do so.
+//
+// [^1]: Counterexample: `unresolved-import-suggest-disambiguated-crate-name.rs`
+#![feature(decl_macro)] // allows us to create items with hygienic names
+
+// aux-crate:library=library.rs
+// edition: 2021
+
+mod hygiene {
+    make!();
+    macro make() {
+        // This won't conflict with the suggested *non-global* path as the syntax context differs.
+        mod library {}
+    }
+
+    mod module {}
+    use module::SomeUsefulType; //~ ERROR unresolved import `module::SomeUsefulType`
+}
+
+mod glob {
+    use inner::*;
+    mod inner {
+        mod library {}
+    }
+
+    mod module {}
+    use module::SomeUsefulType; //~ ERROR unresolved import `module::SomeUsefulType`
+}
+
+fn main() {}
diff --git a/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.stderr b/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.stderr
new file mode 100644
index 00000000000..b0352ab6754
--- /dev/null
+++ b/tests/ui/unresolved/unresolved-import-avoid-suggesting-global-path.stderr
@@ -0,0 +1,25 @@
+error[E0432]: unresolved import `module::SomeUsefulType`
+  --> $DIR/unresolved-import-avoid-suggesting-global-path.rs:18:9
+   |
+LL |     use module::SomeUsefulType;
+   |         ^^^^^^^^^^^^^^^^^^^^^^ no `SomeUsefulType` in `hygiene::module`
+   |
+help: consider importing this struct instead
+   |
+LL |     use library::SomeUsefulType;
+   |         ~~~~~~~~~~~~~~~~~~~~~~~
+
+error[E0432]: unresolved import `module::SomeUsefulType`
+  --> $DIR/unresolved-import-avoid-suggesting-global-path.rs:28:9
+   |
+LL |     use module::SomeUsefulType;
+   |         ^^^^^^^^^^^^^^^^^^^^^^ no `SomeUsefulType` in `glob::module`
+   |
+help: consider importing this struct instead
+   |
+LL |     use library::SomeUsefulType;
+   |         ~~~~~~~~~~~~~~~~~~~~~~~
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed
new file mode 100644
index 00000000000..2b20d3f106b
--- /dev/null
+++ b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.fixed
@@ -0,0 +1,19 @@
+// Regression test for issue #116970.
+//
+// When we suggest importing an item from a crate found in the extern prelude and there
+// happens to exist a module or type in the current scope with the same name as the crate,
+// disambiguate the suggested path by making it global (i.e., by prefixing it with `::`).
+//
+// For context, when it can be avoided we don't prepend `::` to paths referencing crates
+// from the extern prelude. See also `unresolved-import-avoid-suggesting-global-path.rs`.
+
+// run-rustfix
+
+// compile-flags: --crate-type=lib
+// aux-crate:library=library.rs
+// edition: 2021
+
+mod library {} // this module shares the same name as the external crate!
+
+mod module {}
+pub use ::library::SomeUsefulType; //~ ERROR unresolved import `module::SomeUsefulType`
diff --git a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs
new file mode 100644
index 00000000000..b810a7f5296
--- /dev/null
+++ b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.rs
@@ -0,0 +1,19 @@
+// Regression test for issue #116970.
+//
+// When we suggest importing an item from a crate found in the extern prelude and there
+// happens to exist a module or type in the current scope with the same name as the crate,
+// disambiguate the suggested path by making it global (i.e., by prefixing it with `::`).
+//
+// For context, when it can be avoided we don't prepend `::` to paths referencing crates
+// from the extern prelude. See also `unresolved-import-avoid-suggesting-global-path.rs`.
+
+// run-rustfix
+
+// compile-flags: --crate-type=lib
+// aux-crate:library=library.rs
+// edition: 2021
+
+mod library {} // this module shares the same name as the external crate!
+
+mod module {}
+pub use module::SomeUsefulType; //~ ERROR unresolved import `module::SomeUsefulType`
diff --git a/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.stderr b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.stderr
new file mode 100644
index 00000000000..f139c0f3cf1
--- /dev/null
+++ b/tests/ui/unresolved/unresolved-import-suggest-disambiguated-crate-name.stderr
@@ -0,0 +1,14 @@
+error[E0432]: unresolved import `module::SomeUsefulType`
+  --> $DIR/unresolved-import-suggest-disambiguated-crate-name.rs:19:9
+   |
+LL | pub use module::SomeUsefulType;
+   |         ^^^^^^^^^^^^^^^^^^^^^^ no `SomeUsefulType` in `module`
+   |
+help: consider importing this struct instead
+   |
+LL | pub use ::library::SomeUsefulType;
+   |         ~~~~~~~~~~~~~~~~~~~~~~~~~
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0432`.
diff --git a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.mir.stderr
index fbc621f4d0e..ea53bf59d31 100644
--- a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.stderr
+++ b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.mir.stderr
@@ -1,12 +1,12 @@
 warning: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:12:5
+  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:13:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:11:1
+  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:12:1
    |
 LL | unsafe fn foo() {
    | ^^^^^^^^^^^^^^^
diff --git a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs
index a192f3445f7..1b429955cb0 100644
--- a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs
+++ b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.rs
@@ -1,17 +1,21 @@
 // edition: 2024
 // compile-flags: -Zunstable-options
 // check-pass
+// revisions: mir thir
+// [thir]compile-flags: -Zthir-unsafeck
 
 #![crate_type = "lib"]
-
 #![deny(unused_unsafe)]
 
 unsafe fn unsf() {}
 
 unsafe fn foo() {
     unsf();
-    //~^ WARN call to unsafe function is unsafe and requires unsafe block
+    //[mir]~^ WARN call to unsafe function is unsafe and requires unsafe block
+    //[thir]~^^ WARN call to unsafe function `unsf` is unsafe and requires unsafe block
 
     // no unused_unsafe
-    unsafe { unsf(); }
+    unsafe {
+        unsf();
+    }
 }
diff --git a/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.thir.stderr b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.thir.stderr
new file mode 100644
index 00000000000..d63843ed2b3
--- /dev/null
+++ b/tests/ui/unsafe/edition-2024-unsafe_op_in_unsafe_fn.thir.stderr
@@ -0,0 +1,16 @@
+warning: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
+  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:13:5
+   |
+LL |     unsf();
+   |     ^^^^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+note: an unsafe function restricts its caller, but its body is safe by default
+  --> $DIR/edition-2024-unsafe_op_in_unsafe_fn.rs:12:1
+   |
+LL | unsafe fn foo() {
+   | ^^^^^^^^^^^^^^^
+   = note: `#[warn(unsafe_op_in_unsafe_fn)]` on by default
+
+warning: 1 warning emitted
+
diff --git a/tests/ui/unsafe/initializing-ranged-via-ctor.stderr b/tests/ui/unsafe/initializing-ranged-via-ctor.stderr
index d34554c6641..13438fd31d0 100644
--- a/tests/ui/unsafe/initializing-ranged-via-ctor.stderr
+++ b/tests/ui/unsafe/initializing-ranged-via-ctor.stderr
@@ -1,4 +1,4 @@
-error[E0277]: expected a `FnOnce<({integer},)>` closure, found `unsafe fn(u8) -> NonZeroAndOneU8 {NonZeroAndOneU8}`
+error[E0277]: expected a `FnOnce({integer})` closure, found `unsafe fn(u8) -> NonZeroAndOneU8 {NonZeroAndOneU8}`
   --> $DIR/initializing-ranged-via-ctor.rs:9:34
    |
 LL |     println!("{:?}", Some(1).map(NonZeroAndOneU8).unwrap());
diff --git a/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.thir.stderr b/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.thir.stderr
index 9e9cbcf33ae..2267da31512 100644
--- a/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.thir.stderr
+++ b/tests/ui/unsafe/issue-45107-unnecessary-unsafe-in-closure.thir.stderr
@@ -16,9 +16,9 @@ LL | #[deny(unused_unsafe)]
 error: unnecessary `unsafe` block
   --> $DIR/issue-45107-unnecessary-unsafe-in-closure.rs:12:38
    |
-LL |     unsafe {
-   |     ------ because it's nested under this `unsafe` block
-...
+LL |             unsafe {
+   |             ------ because it's nested under this `unsafe` block
+LL |                 v.set_len(24);
 LL |                 |w: &mut Vec<u32>| { unsafe {
    |                                      ^^^^^^ unnecessary `unsafe` block
 
diff --git a/tests/ui/unsafe/ranged_ints2.mirunsafeck.stderr b/tests/ui/unsafe/ranged_ints2.mirunsafeck.stderr
index 427843f8d45..dc6bd72f56c 100644
--- a/tests/ui/unsafe/ranged_ints2.mirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints2.mirunsafeck.stderr
@@ -6,6 +6,14 @@ LL |     let y = &mut x.0;
    |
    = note: mutating layout constrained fields cannot statically be checked for valid values
 
-error: aborting due to previous error
+error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
+  --> $DIR/ranged_ints2.rs:12:25
+   |
+LL |     if let Some(NonZero(ref mut y)) = Some(x) {}
+   |                         ^^^^^^^^^ mutation of layout constrained field
+   |
+   = note: mutating layout constrained fields cannot statically be checked for valid values
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/ranged_ints2.rs b/tests/ui/unsafe/ranged_ints2.rs
index 9a6bb18f926..ad9d598aba2 100644
--- a/tests/ui/unsafe/ranged_ints2.rs
+++ b/tests/ui/unsafe/ranged_ints2.rs
@@ -9,4 +9,5 @@ pub(crate) struct NonZero<T>(pub(crate) T);
 fn main() {
     let mut x = unsafe { NonZero(1) };
     let y = &mut x.0; //~ ERROR mutation of layout constrained field is unsafe
+    if let Some(NonZero(ref mut y)) = Some(x) {} //~ ERROR mutation of layout constrained field is unsafe
 }
diff --git a/tests/ui/unsafe/ranged_ints2.thirunsafeck.stderr b/tests/ui/unsafe/ranged_ints2.thirunsafeck.stderr
index 427843f8d45..dc6bd72f56c 100644
--- a/tests/ui/unsafe/ranged_ints2.thirunsafeck.stderr
+++ b/tests/ui/unsafe/ranged_ints2.thirunsafeck.stderr
@@ -6,6 +6,14 @@ LL |     let y = &mut x.0;
    |
    = note: mutating layout constrained fields cannot statically be checked for valid values
 
-error: aborting due to previous error
+error[E0133]: mutation of layout constrained field is unsafe and requires unsafe function or block
+  --> $DIR/ranged_ints2.rs:12:25
+   |
+LL |     if let Some(NonZero(ref mut y)) = Some(x) {}
+   |                         ^^^^^^^^^ mutation of layout constrained field
+   |
+   = note: mutating layout constrained fields cannot statically be checked for valid values
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0133`.
diff --git a/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.thir.stderr b/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.thir.stderr
index 13c080e5b6a..ad0621a1d04 100644
--- a/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.thir.stderr
+++ b/tests/ui/unsafe/rfc-2585-unsafe_op_in_unsafe_fn.thir.stderr
@@ -5,6 +5,11 @@ LL |     unsf();
    |     ^^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
+note: an unsafe function restricts its caller, but its body is safe by default
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:11:1
+   |
+LL | unsafe fn deny_level() {
+   | ^^^^^^^^^^^^^^^^^^^^^^
 note: the lint level is defined here
   --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:4:9
    |
@@ -46,6 +51,11 @@ LL |     unsf();
    |     ^^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
+note: an unsafe function restricts its caller, but its body is safe by default
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:27:1
+   |
+LL | unsafe fn warning_level() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^
 note: the lint level is defined here
   --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:26:8
    |
@@ -76,12 +86,10 @@ LL |     unsafe {}
    |     ^^^^^^ unnecessary `unsafe` block
 
 error: unnecessary `unsafe` block
-  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:49:14
+  --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:49:5
    |
 LL |     unsafe { unsafe { unsf() } }
-   |     ------   ^^^^^^ unnecessary `unsafe` block
-   |     |
-   |     because it's nested under this `unsafe` block
+   |     ^^^^^^ unnecessary `unsafe` block
 
 error[E0133]: call to unsafe function `unsf` is unsafe and requires unsafe block
   --> $DIR/rfc-2585-unsafe_op_in_unsafe_fn.rs:76:5
diff --git a/tests/ui/unsafe/wrapping-unsafe-block-sugg.fixed b/tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.fixed
index db1c102210e..b59029df642 100644
--- a/tests/ui/unsafe/wrapping-unsafe-block-sugg.fixed
+++ b/tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.fixed
@@ -1,7 +1,10 @@
 // run-rustfix
 // aux-build:external_unsafe_macro.rs
+// revisions: mir thir
+// [thir]compile-flags: -Zthir-unsafeck
 
 #![deny(unsafe_op_in_unsafe_fn)] //~ NOTE
+#![crate_name = "wrapping_unsafe_block_sugg"]
 
 extern crate external_unsafe_macro;
 
@@ -9,11 +12,13 @@ unsafe fn unsf() {}
 
 pub unsafe fn foo() { unsafe {
     //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
-    unsf(); //~ ERROR call to unsafe function is unsafe
-    //~^ NOTE
+    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
+     //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
+    //~^^ NOTE
     //~| NOTE
-    unsf(); //~ ERROR call to unsafe function is unsafe
-    //~^ NOTE
+    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
+    //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
+    //~^^ NOTE
     //~| NOTE
 }}
 
@@ -39,10 +44,12 @@ pub unsafe fn baz() -> i32 { unsafe {
 }}
 
 macro_rules! unsafe_macro { () => (unsf()) }
-//~^ ERROR call to unsafe function is unsafe
+//[mir]~^ ERROR call to unsafe function is unsafe
+//[thir]~^^ ERROR call to unsafe function `unsf` is unsafe
 //~| NOTE
 //~| NOTE
-//~| ERROR call to unsafe function is unsafe
+//[mir]~| ERROR call to unsafe function is unsafe
+//[thir]~| ERROR call to unsafe function `unsf` is unsafe
 //~| NOTE
 //~| NOTE
 
diff --git a/tests/ui/unsafe/wrapping-unsafe-block-sugg.stderr b/tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.stderr
index 43f619c27d2..7a1b83c7367 100644
--- a/tests/ui/unsafe/wrapping-unsafe-block-sugg.stderr
+++ b/tests/ui/unsafe/wrapping-unsafe-block-sugg.mir.stderr
@@ -1,23 +1,23 @@
 error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:12:5
+  --> $DIR/wrapping-unsafe-block-sugg.rs:15:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:10:1
+  --> $DIR/wrapping-unsafe-block-sugg.rs:13:1
    |
 LL | pub unsafe fn foo() {
    | ^^^^^^^^^^^^^^^^^^^
 note: the lint level is defined here
-  --> $DIR/wrapping-unsafe-block-sugg.rs:4:9
+  --> $DIR/wrapping-unsafe-block-sugg.rs:6:9
    |
 LL | #![deny(unsafe_op_in_unsafe_fn)]
    |         ^^^^^^^^^^^^^^^^^^^^^^
 
 error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:15:5
+  --> $DIR/wrapping-unsafe-block-sugg.rs:19:5
    |
 LL |     unsf();
    |     ^^^^^^ call to unsafe function
@@ -25,20 +25,20 @@ LL |     unsf();
    = note: consult the function's documentation for information on how to avoid undefined behavior
 
 error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:22:13
+  --> $DIR/wrapping-unsafe-block-sugg.rs:27:13
    |
 LL |     let y = *x;
    |             ^^ dereference of raw pointer
    |
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:20:1
+  --> $DIR/wrapping-unsafe-block-sugg.rs:25:1
    |
 LL | pub unsafe fn bar(x: *const i32) -> i32 {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:25:9
+  --> $DIR/wrapping-unsafe-block-sugg.rs:30:9
    |
 LL |     y + *x
    |         ^^ dereference of raw pointer
@@ -46,20 +46,20 @@ LL |     y + *x
    = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
 
 error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:33:13
+  --> $DIR/wrapping-unsafe-block-sugg.rs:38:13
    |
 LL |     let y = BAZ;
    |             ^^^ use of mutable static
    |
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:31:1
+  --> $DIR/wrapping-unsafe-block-sugg.rs:36:1
    |
 LL | pub unsafe fn baz() -> i32 {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: use of mutable static is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:36:9
+  --> $DIR/wrapping-unsafe-block-sugg.rs:41:9
    |
 LL |     y + BAZ
    |         ^^^ use of mutable static
@@ -67,7 +67,7 @@ LL |     y + BAZ
    = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
 
 error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:41:36
+  --> $DIR/wrapping-unsafe-block-sugg.rs:46:36
    |
 LL | macro_rules! unsafe_macro { () => (unsf()) }
    |                                    ^^^^^^ call to unsafe function
@@ -77,14 +77,14 @@ LL |     unsafe_macro!();
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior
 note: an unsafe function restricts its caller, but its body is safe by default
-  --> $DIR/wrapping-unsafe-block-sugg.rs:49:1
+  --> $DIR/wrapping-unsafe-block-sugg.rs:56:1
    |
 LL | pub unsafe fn unsafe_in_macro() {
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: this error originates in the macro `unsafe_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: call to unsafe function is unsafe and requires unsafe block (error E0133)
-  --> $DIR/wrapping-unsafe-block-sugg.rs:41:36
+  --> $DIR/wrapping-unsafe-block-sugg.rs:46:36
    |
 LL | macro_rules! unsafe_macro { () => (unsf()) }
    |                                    ^^^^^^ call to unsafe function
diff --git a/tests/ui/unsafe/wrapping-unsafe-block-sugg.rs b/tests/ui/unsafe/wrapping-unsafe-block-sugg.rs
index 9c6be45896e..3629b8a1beb 100644
--- a/tests/ui/unsafe/wrapping-unsafe-block-sugg.rs
+++ b/tests/ui/unsafe/wrapping-unsafe-block-sugg.rs
@@ -1,7 +1,10 @@
 // run-rustfix
 // aux-build:external_unsafe_macro.rs
+// revisions: mir thir
+// [thir]compile-flags: -Zthir-unsafeck
 
 #![deny(unsafe_op_in_unsafe_fn)] //~ NOTE
+#![crate_name = "wrapping_unsafe_block_sugg"]
 
 extern crate external_unsafe_macro;
 
@@ -9,11 +12,13 @@ unsafe fn unsf() {}
 
 pub unsafe fn foo() {
     //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
-    unsf(); //~ ERROR call to unsafe function is unsafe
-    //~^ NOTE
+    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
+     //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
+    //~^^ NOTE
     //~| NOTE
-    unsf(); //~ ERROR call to unsafe function is unsafe
-    //~^ NOTE
+    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
+    //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
+    //~^^ NOTE
     //~| NOTE
 }
 
@@ -39,10 +44,12 @@ pub unsafe fn baz() -> i32 {
 }
 
 macro_rules! unsafe_macro { () => (unsf()) }
-//~^ ERROR call to unsafe function is unsafe
+//[mir]~^ ERROR call to unsafe function is unsafe
+//[thir]~^^ ERROR call to unsafe function `unsf` is unsafe
 //~| NOTE
 //~| NOTE
-//~| ERROR call to unsafe function is unsafe
+//[mir]~| ERROR call to unsafe function is unsafe
+//[thir]~| ERROR call to unsafe function `unsf` is unsafe
 //~| NOTE
 //~| NOTE
 
diff --git a/tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.fixed b/tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.fixed
new file mode 100644
index 00000000000..b59029df642
--- /dev/null
+++ b/tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.fixed
@@ -0,0 +1,73 @@
+// run-rustfix
+// aux-build:external_unsafe_macro.rs
+// revisions: mir thir
+// [thir]compile-flags: -Zthir-unsafeck
+
+#![deny(unsafe_op_in_unsafe_fn)] //~ NOTE
+#![crate_name = "wrapping_unsafe_block_sugg"]
+
+extern crate external_unsafe_macro;
+
+unsafe fn unsf() {}
+
+pub unsafe fn foo() { unsafe {
+    //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
+    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
+     //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
+    //~^^ NOTE
+    //~| NOTE
+    unsf(); //[mir]~ ERROR call to unsafe function is unsafe
+    //[thir]~^ ERROR call to unsafe function `unsf` is unsafe
+    //~^^ NOTE
+    //~| NOTE
+}}
+
+pub unsafe fn bar(x: *const i32) -> i32 { unsafe {
+    //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
+    let y = *x; //~ ERROR dereference of raw pointer is unsafe and requires unsafe block
+    //~^ NOTE
+    //~| NOTE
+    y + *x //~ ERROR dereference of raw pointer is unsafe and requires unsafe block
+    //~^ NOTE
+    //~| NOTE
+}}
+
+static mut BAZ: i32 = 0;
+pub unsafe fn baz() -> i32 { unsafe {
+    //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
+    let y = BAZ; //~ ERROR use of mutable static is unsafe and requires unsafe block
+    //~^ NOTE
+    //~| NOTE
+    y + BAZ //~ ERROR use of mutable static is unsafe and requires unsafe block
+    //~^ NOTE
+    //~| NOTE
+}}
+
+macro_rules! unsafe_macro { () => (unsf()) }
+//[mir]~^ ERROR call to unsafe function is unsafe
+//[thir]~^^ ERROR call to unsafe function `unsf` is unsafe
+//~| NOTE
+//~| NOTE
+//[mir]~| ERROR call to unsafe function is unsafe
+//[thir]~| ERROR call to unsafe function `unsf` is unsafe
+//~| NOTE
+//~| NOTE
+
+pub unsafe fn unsafe_in_macro() { unsafe {
+    //~^ NOTE an unsafe function restricts its caller, but its body is safe by default
+    unsafe_macro!();
+    //~^ NOTE
+    //~| NOTE
+    unsafe_macro!();
+    //~^ NOTE
+    //~| NOTE
+}}
+
+pub unsafe fn unsafe_in_external_macro() {
+    // FIXME: https://github.com/rust-lang/rust/issues/112504
+    // FIXME: ~^ NOTE an unsafe function restricts its caller, but its body is safe by default
+    external_unsafe_macro::unsafe_macro!();
+    external_unsafe_macro::unsafe_macro!();
+}
+
+fn main() {}
diff --git a/tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.stderr b/tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.stderr
new file mode 100644
index 00000000000..b1fb35f85a6
--- /dev/null
+++ b/tests/ui/unsafe/wrapping-unsafe-block-sugg.thir.stderr
@@ -0,0 +1,99 @@
+error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
+  --> $DIR/wrapping-unsafe-block-sugg.rs:15:5
+   |
+LL |     unsf();
+   |     ^^^^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+note: an unsafe function restricts its caller, but its body is safe by default
+  --> $DIR/wrapping-unsafe-block-sugg.rs:13:1
+   |
+LL | pub unsafe fn foo() {
+   | ^^^^^^^^^^^^^^^^^^^
+note: the lint level is defined here
+  --> $DIR/wrapping-unsafe-block-sugg.rs:6:9
+   |
+LL | #![deny(unsafe_op_in_unsafe_fn)]
+   |         ^^^^^^^^^^^^^^^^^^^^^^
+
+error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
+  --> $DIR/wrapping-unsafe-block-sugg.rs:19:5
+   |
+LL |     unsf();
+   |     ^^^^^^ call to unsafe function
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+
+error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
+  --> $DIR/wrapping-unsafe-block-sugg.rs:27:13
+   |
+LL |     let y = *x;
+   |             ^^ dereference of raw pointer
+   |
+   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
+note: an unsafe function restricts its caller, but its body is safe by default
+  --> $DIR/wrapping-unsafe-block-sugg.rs:25:1
+   |
+LL | pub unsafe fn bar(x: *const i32) -> i32 {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: dereference of raw pointer is unsafe and requires unsafe block (error E0133)
+  --> $DIR/wrapping-unsafe-block-sugg.rs:30:9
+   |
+LL |     y + *x
+   |         ^^ dereference of raw pointer
+   |
+   = note: raw pointers may be null, dangling or unaligned; they can violate aliasing rules and cause data races: all of these are undefined behavior
+
+error: use of mutable static is unsafe and requires unsafe block (error E0133)
+  --> $DIR/wrapping-unsafe-block-sugg.rs:38:13
+   |
+LL |     let y = BAZ;
+   |             ^^^ use of mutable static
+   |
+   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
+note: an unsafe function restricts its caller, but its body is safe by default
+  --> $DIR/wrapping-unsafe-block-sugg.rs:36:1
+   |
+LL | pub unsafe fn baz() -> i32 {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: use of mutable static is unsafe and requires unsafe block (error E0133)
+  --> $DIR/wrapping-unsafe-block-sugg.rs:41:9
+   |
+LL |     y + BAZ
+   |         ^^^ use of mutable static
+   |
+   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
+
+error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
+  --> $DIR/wrapping-unsafe-block-sugg.rs:46:36
+   |
+LL | macro_rules! unsafe_macro { () => (unsf()) }
+   |                                    ^^^^^^ call to unsafe function
+...
+LL |     unsafe_macro!();
+   |     --------------- in this macro invocation
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+note: an unsafe function restricts its caller, but its body is safe by default
+  --> $DIR/wrapping-unsafe-block-sugg.rs:56:1
+   |
+LL | pub unsafe fn unsafe_in_macro() {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: this error originates in the macro `unsafe_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: call to unsafe function `unsf` is unsafe and requires unsafe block (error E0133)
+  --> $DIR/wrapping-unsafe-block-sugg.rs:46:36
+   |
+LL | macro_rules! unsafe_macro { () => (unsf()) }
+   |                                    ^^^^^^ call to unsafe function
+...
+LL |     unsafe_macro!();
+   |     --------------- in this macro invocation
+   |
+   = note: consult the function's documentation for information on how to avoid undefined behavior
+   = note: this error originates in the macro `unsafe_macro` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error: aborting due to 8 previous errors
+
diff --git a/tests/ui/unsized/maybe-bounds-where.rs b/tests/ui/unsized/maybe-bounds-where.rs
index d7af0c42480..7e82a3eb449 100644
--- a/tests/ui/unsized/maybe-bounds-where.rs
+++ b/tests/ui/unsized/maybe-bounds-where.rs
@@ -11,11 +11,11 @@ trait Trait<'a> {}
 
 struct S4<T>(T) where for<'a> T: ?Trait<'a>;
 //~^ ERROR `?Trait` bounds are only permitted at the point where a type parameter is declared
-//~| WARN default bound relaxed for a type parameter
+//~| WARN relaxing a default bound only does something for `?Sized`
 
 struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
 //~^ ERROR type parameter has more than one relaxed default bound
-//~| WARN default bound relaxed for a type parameter
+//~| WARN relaxing a default bound only does something for `?Sized`
 
 impl<T> S1<T> {
     fn f() where T: ?Sized {}
diff --git a/tests/ui/unsized/maybe-bounds-where.stderr b/tests/ui/unsized/maybe-bounds-where.stderr
index 39bc1b88e56..683bd387bb2 100644
--- a/tests/ui/unsized/maybe-bounds-where.stderr
+++ b/tests/ui/unsized/maybe-bounds-where.stderr
@@ -28,23 +28,23 @@ error: `?Trait` bounds are only permitted at the point where a type parameter is
 LL |     fn f() where T: ?Sized {}
    |                     ^^^^^^
 
-warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
-  --> $DIR/maybe-bounds-where.rs:12:11
+warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
+  --> $DIR/maybe-bounds-where.rs:12:34
    |
 LL | struct S4<T>(T) where for<'a> T: ?Trait<'a>;
-   |           ^
+   |                                  ^^^^^^^^^^
 
 error[E0203]: type parameter has more than one relaxed default bound, only one is supported
-  --> $DIR/maybe-bounds-where.rs:16:11
+  --> $DIR/maybe-bounds-where.rs:16:33
    |
 LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
-   |           ^
+   |                                 ^^^^^^^^^^^^^^^   ^^^^^^
 
-warning: default bound relaxed for a type parameter, but this does nothing because the given bound is not a default; only `?Sized` is supported
-  --> $DIR/maybe-bounds-where.rs:16:11
+warning: relaxing a default bound only does something for `?Sized`; all other traits are not bound by default
+  --> $DIR/maybe-bounds-where.rs:16:33
    |
 LL | struct S5<T>(*const T) where T: ?Trait<'static> + ?Sized;
-   |           ^
+   |                                 ^^^^^^^^^^^^^^^
 
 error: aborting due to 6 previous errors; 2 warnings emitted
 
diff --git a/tests/ui/unsized/unsize-coerce-multiple-adt-params.rs b/tests/ui/unsized/unsize-coerce-multiple-adt-params.rs
new file mode 100644
index 00000000000..eba341ff284
--- /dev/null
+++ b/tests/ui/unsized/unsize-coerce-multiple-adt-params.rs
@@ -0,0 +1,29 @@
+// check-pass
+
+struct Foo<T, U>
+where
+    (T, U): Trait,
+{
+    f: <(T, U) as Trait>::Assoc,
+}
+
+trait Trait {
+    type Assoc: ?Sized;
+}
+
+struct Count<const N: usize>;
+
+impl<const N: usize> Trait for (i32, Count<N>) {
+    type Assoc = [(); N];
+}
+
+impl<'a> Trait for (u32, ()) {
+    type Assoc = [()];
+}
+
+// Test that we can unsize several trait params in creative ways.
+fn unsize<const N: usize>(x: &Foo<i32, Count<N>>) -> &Foo<u32, ()> {
+    x
+}
+
+fn main() {}
diff --git a/tests/ui/unsized/unsized-trait-impl-self-type.rs b/tests/ui/unsized/unsized-trait-impl-self-type.rs
index df571a83382..603c0a221ec 100644
--- a/tests/ui/unsized/unsized-trait-impl-self-type.rs
+++ b/tests/ui/unsized/unsized-trait-impl-self-type.rs
@@ -9,6 +9,7 @@ struct S5<Y>(Y);
 
 impl<X: ?Sized> T3<X> for S5<X> {
     //~^ ERROR the size for values of type
+    //~| ERROR not all trait items implemented
 }
 
 fn main() { }
diff --git a/tests/ui/unsized/unsized-trait-impl-self-type.stderr b/tests/ui/unsized/unsized-trait-impl-self-type.stderr
index 4955d463fc2..5bc8dc590ca 100644
--- a/tests/ui/unsized/unsized-trait-impl-self-type.stderr
+++ b/tests/ui/unsized/unsized-trait-impl-self-type.stderr
@@ -24,6 +24,16 @@ LL - impl<X: ?Sized> T3<X> for S5<X> {
 LL + impl<X> T3<X> for S5<X> {
    |
 
-error: aborting due to previous error
+error[E0046]: not all trait items implemented, missing: `foo`
+  --> $DIR/unsized-trait-impl-self-type.rs:10:1
+   |
+LL |     fn foo(&self, z: &Z);
+   |     --------------------- `foo` from trait
+...
+LL | impl<X: ?Sized> T3<X> for S5<X> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0046, E0277.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/unsized/unsized-trait-impl-trait-arg.rs b/tests/ui/unsized/unsized-trait-impl-trait-arg.rs
index 96e7e371f2a..e7602b175c8 100644
--- a/tests/ui/unsized/unsized-trait-impl-trait-arg.rs
+++ b/tests/ui/unsized/unsized-trait-impl-trait-arg.rs
@@ -7,6 +7,7 @@ trait T2<Z> {
 struct S4<Y: ?Sized>(Box<Y>);
 impl<X: ?Sized> T2<X> for S4<X> {
     //~^ ERROR the size for values of type
+    //~| ERROR not all trait items implemented
 }
 
 fn main() { }
diff --git a/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr b/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr
index 8761c293af4..e9353d2bbd9 100644
--- a/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr
+++ b/tests/ui/unsized/unsized-trait-impl-trait-arg.stderr
@@ -21,6 +21,16 @@ help: consider relaxing the implicit `Sized` restriction
 LL | trait T2<Z: ?Sized> {
    |           ++++++++
 
-error: aborting due to previous error
+error[E0046]: not all trait items implemented, missing: `foo`
+  --> $DIR/unsized-trait-impl-trait-arg.rs:8:1
+   |
+LL |     fn foo(&self, z: Z);
+   |     -------------------- `foo` from trait
+...
+LL | impl<X: ?Sized> T2<X> for S4<X> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `foo` in implementation
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0046, E0277.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/unsized/unsized7.rs b/tests/ui/unsized/unsized7.rs
index 422a784814e..63e015c28d3 100644
--- a/tests/ui/unsized/unsized7.rs
+++ b/tests/ui/unsized/unsized7.rs
@@ -11,6 +11,7 @@ trait T1<Z: T> {
 struct S3<Y: ?Sized>(Box<Y>);
 impl<X: ?Sized + T> T1<X> for S3<X> {
     //~^ ERROR the size for values of type
+    //~| ERROR not all trait items implemented
 }
 
 fn main() { }
diff --git a/tests/ui/unsized/unsized7.stderr b/tests/ui/unsized/unsized7.stderr
index c313a2724c0..2edde159653 100644
--- a/tests/ui/unsized/unsized7.stderr
+++ b/tests/ui/unsized/unsized7.stderr
@@ -21,6 +21,16 @@ help: consider relaxing the implicit `Sized` restriction
 LL | trait T1<Z: T + ?Sized> {
    |               ++++++++
 
-error: aborting due to previous error
+error[E0046]: not all trait items implemented, missing: `dummy`
+  --> $DIR/unsized7.rs:12:1
+   |
+LL |     fn dummy(&self) -> Z;
+   |     --------------------- `dummy` from trait
+...
+LL | impl<X: ?Sized + T> T1<X> for S3<X> {
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `dummy` in implementation
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0277`.
+Some errors have detailed explanations: E0046, E0277.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/weird-exprs.rs b/tests/ui/weird-exprs.rs
index 892b281357f..6d40d6377c5 100644
--- a/tests/ui/weird-exprs.rs
+++ b/tests/ui/weird-exprs.rs
@@ -1,6 +1,6 @@
 // run-pass
 
-#![feature(generators)]
+#![feature(coroutines)]
 
 #![allow(non_camel_case_types)]
 #![allow(dead_code)]
diff --git a/tests/ui/wf/hir-wf-check-erase-regions.rs b/tests/ui/wf/hir-wf-check-erase-regions.rs
index 3855f2c35c1..2820d5f6d07 100644
--- a/tests/ui/wf/hir-wf-check-erase-regions.rs
+++ b/tests/ui/wf/hir-wf-check-erase-regions.rs
@@ -5,6 +5,7 @@ pub struct Table<T, const N: usize>([Option<T>; N]);
 
 impl<'a, T, const N: usize> IntoIterator for &'a Table<T, N> {
     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>; //~ ERROR `&'a T` is not an iterator
+    //~^ ERROR `&'a T` is not an iterator
     type Item = &'a T;
 
     fn into_iter(self) -> Self::IntoIter { //~ ERROR `&'a T` is not an iterator
diff --git a/tests/ui/wf/hir-wf-check-erase-regions.stderr b/tests/ui/wf/hir-wf-check-erase-regions.stderr
index 2843983c716..eb0a8f8f69a 100644
--- a/tests/ui/wf/hir-wf-check-erase-regions.stderr
+++ b/tests/ui/wf/hir-wf-check-erase-regions.stderr
@@ -11,7 +11,7 @@ note: required by a bound in `Flatten`
   --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
 
 error[E0277]: `&'a T` is not an iterator
-  --> $DIR/hir-wf-check-erase-regions.rs:10:27
+  --> $DIR/hir-wf-check-erase-regions.rs:11:27
    |
 LL |     fn into_iter(self) -> Self::IntoIter {
    |                           ^^^^^^^^^^^^^^ `&'a T` is not an iterator
@@ -22,6 +22,18 @@ LL |     fn into_iter(self) -> Self::IntoIter {
 note: required by a bound in `Flatten`
   --> $SRC_DIR/core/src/iter/adapters/flatten.rs:LL:COL
 
-error: aborting due to 2 previous errors
+error[E0277]: `&'a T` is not an iterator
+  --> $DIR/hir-wf-check-erase-regions.rs:7:21
+   |
+LL |     type IntoIter = std::iter::Flatten<std::slice::Iter<'a, T>>;
+   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `&'a T` is not an iterator
+   |
+   = help: the trait `Iterator` is not implemented for `&'a T`
+   = help: the trait `Iterator` is implemented for `&mut I`
+   = note: required for `Flatten<std::slice::Iter<'a, T>>` to implement `Iterator`
+note: required by a bound in `std::iter::IntoIterator::IntoIter`
+  --> $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
+
+error: aborting due to 3 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/issue-110157.rs b/tests/ui/wf/issue-110157.rs
index 43a8ce72ff1..07e2c5d58c3 100644
--- a/tests/ui/wf/issue-110157.rs
+++ b/tests/ui/wf/issue-110157.rs
@@ -2,6 +2,7 @@ struct NeedsDropTypes<'tcx, F>(std::marker::PhantomData<&'tcx F>);
 
 impl<'tcx, F, I> Iterator for NeedsDropTypes<'tcx, F>
 //~^ ERROR type annotations needed
+//~| ERROR not all trait items implemented
 where
     F: Fn(&Missing) -> Result<I, ()>,
     //~^ ERROR cannot find type `Missing` in this scope
diff --git a/tests/ui/wf/issue-110157.stderr b/tests/ui/wf/issue-110157.stderr
index 91d801e9470..16bd34a6d8e 100644
--- a/tests/ui/wf/issue-110157.stderr
+++ b/tests/ui/wf/issue-110157.stderr
@@ -1,11 +1,11 @@
 error[E0412]: cannot find type `Missing` in this scope
-  --> $DIR/issue-110157.rs:6:12
+  --> $DIR/issue-110157.rs:7:12
    |
 LL |     F: Fn(&Missing) -> Result<I, ()>,
    |            ^^^^^^^ not found in this scope
 
 error[E0412]: cannot find type `Missing` in this scope
-  --> $DIR/issue-110157.rs:8:24
+  --> $DIR/issue-110157.rs:9:24
    |
 LL |     I: Iterator<Item = Missing>,
    |                        ^^^^^^^ not found in this scope
@@ -26,7 +26,22 @@ LL | impl<'tcx, F, I> Iterator for NeedsDropTypes<'tcx, F>
 LL |     I: Iterator<Item = Missing>,
    |        ------------------------ unsatisfied trait bound introduced here
 
-error: aborting due to 3 previous errors
+error[E0046]: not all trait items implemented, missing: `Item`, `next`
+  --> $DIR/issue-110157.rs:3:1
+   |
+LL | / impl<'tcx, F, I> Iterator for NeedsDropTypes<'tcx, F>
+LL | |
+LL | |
+LL | | where
+LL | |     F: Fn(&Missing) -> Result<I, ()>,
+LL | |
+LL | |     I: Iterator<Item = Missing>,
+   | |________________________________^ missing `Item`, `next` in implementation
+   |
+   = help: implement the missing item: `type Item = /* Type */;`
+   = help: implement the missing item: `fn next(&mut self) -> Option<<Self as Iterator>::Item> { todo!() }`
+
+error: aborting due to 4 previous errors
 
-Some errors have detailed explanations: E0283, E0412.
-For more information about an error, try `rustc --explain E0283`.
+Some errors have detailed explanations: E0046, E0283, E0412.
+For more information about an error, try `rustc --explain E0046`.
diff --git a/tests/ui/wf/wf-const-type.rs b/tests/ui/wf/wf-const-type.rs
index df79aa26712..64b0d9c8de7 100644
--- a/tests/ui/wf/wf-const-type.rs
+++ b/tests/ui/wf/wf-const-type.rs
@@ -9,6 +9,7 @@ struct NotCopy;
 
 const FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
 //~^ ERROR E0277
+//~| ERROR E0277
 
 
 fn main() { }
diff --git a/tests/ui/wf/wf-const-type.stderr b/tests/ui/wf/wf-const-type.stderr
index 617969720a6..039e907705e 100644
--- a/tests/ui/wf/wf-const-type.stderr
+++ b/tests/ui/wf/wf-const-type.stderr
@@ -16,6 +16,24 @@ LL + #[derive(Copy)]
 LL | struct NotCopy;
    |
 
-error: aborting due to previous error
+error[E0277]: the trait bound `NotCopy: Copy` is not satisfied
+  --> $DIR/wf-const-type.rs:10:50
+   |
+LL | const FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
+   |                                                  ^^^^ the trait `Copy` is not implemented for `NotCopy`
+   |
+   = note: required for `Option<NotCopy>` to implement `Copy`
+note: required by a bound in `IsCopy`
+  --> $DIR/wf-const-type.rs:7:17
+   |
+LL | struct IsCopy<T:Copy> { t: T }
+   |                 ^^^^ required by this bound in `IsCopy`
+help: consider annotating `NotCopy` with `#[derive(Copy)]`
+   |
+LL + #[derive(Copy)]
+LL | struct NotCopy;
+   |
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-convert-unsafe-trait-obj-box.stderr b/tests/ui/wf/wf-convert-unsafe-trait-obj-box.stderr
index 40a25c7df6b..85f5073364f 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj-box.stderr
+++ b/tests/ui/wf/wf-convert-unsafe-trait-obj-box.stderr
@@ -11,6 +11,7 @@ LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `S` implements the trait, consider using it directly instead
    = note: required for the cast from `Box<S>` to `Box<dyn Trait>`
 
 error[E0038]: the trait `Trait` cannot be made into an object
@@ -26,6 +27,7 @@ LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `S` implements the trait, consider using it directly instead
    = note: required for the cast from `Box<S>` to `Box<(dyn Trait + 'static)>`
 
 error[E0038]: the trait `Trait` cannot be made into an object
@@ -41,6 +43,7 @@ LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `S` implements the trait, consider using it directly instead
    = note: required for the cast from `Box<S>` to `Box<dyn Trait>`
 
 error: aborting due to 3 previous errors
diff --git a/tests/ui/wf/wf-convert-unsafe-trait-obj.stderr b/tests/ui/wf/wf-convert-unsafe-trait-obj.stderr
index e2c71df2feb..a2a19631649 100644
--- a/tests/ui/wf/wf-convert-unsafe-trait-obj.stderr
+++ b/tests/ui/wf/wf-convert-unsafe-trait-obj.stderr
@@ -11,6 +11,7 @@ LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `S` implements the trait, consider using it directly instead
    = note: required for the cast from `&S` to `&dyn Trait`
 
 error[E0038]: the trait `Trait` cannot be made into an object
@@ -26,6 +27,7 @@ LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `S` implements the trait, consider using it directly instead
    = note: required for the cast from `&S` to `&dyn Trait`
 
 error[E0038]: the trait `Trait` cannot be made into an object
@@ -41,6 +43,7 @@ LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait cannot be made into an object...
+   = help: only type `S` implements the trait, consider using it directly instead
    = note: required for the cast from `&S` to `&dyn Trait`
 
 error: aborting due to 3 previous errors
diff --git a/tests/ui/wf/wf-static-type.rs b/tests/ui/wf/wf-static-type.rs
index 1c35e1daf44..f454fe30e77 100644
--- a/tests/ui/wf/wf-static-type.rs
+++ b/tests/ui/wf/wf-static-type.rs
@@ -9,6 +9,7 @@ struct NotCopy;
 
 static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
 //~^ ERROR E0277
+//~| ERROR E0277
 
 
 fn main() { }
diff --git a/tests/ui/wf/wf-static-type.stderr b/tests/ui/wf/wf-static-type.stderr
index bb5a57834eb..65dae260143 100644
--- a/tests/ui/wf/wf-static-type.stderr
+++ b/tests/ui/wf/wf-static-type.stderr
@@ -16,6 +16,24 @@ LL + #[derive(Copy)]
 LL | struct NotCopy;
    |
 
-error: aborting due to previous error
+error[E0277]: the trait bound `NotCopy: Copy` is not satisfied
+  --> $DIR/wf-static-type.rs:10:51
+   |
+LL | static FOO: IsCopy<Option<NotCopy>> = IsCopy { t: None };
+   |                                                   ^^^^ the trait `Copy` is not implemented for `NotCopy`
+   |
+   = note: required for `Option<NotCopy>` to implement `Copy`
+note: required by a bound in `IsCopy`
+  --> $DIR/wf-static-type.rs:7:17
+   |
+LL | struct IsCopy<T:Copy> { t: T }
+   |                 ^^^^ required by this bound in `IsCopy`
+help: consider annotating `NotCopy` with `#[derive(Copy)]`
+   |
+LL + #[derive(Copy)]
+LL | struct NotCopy;
+   |
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0277`.
diff --git a/tests/ui/wf/wf-unsafe-trait-obj-match.stderr b/tests/ui/wf/wf-unsafe-trait-obj-match.stderr
index 66504e44060..a0279774abe 100644
--- a/tests/ui/wf/wf-unsafe-trait-obj-match.stderr
+++ b/tests/ui/wf/wf-unsafe-trait-obj-match.stderr
@@ -11,6 +11,10 @@ LL | |     }
    |
    = note: expected reference `&S`
               found reference `&R`
+help: consider using a semicolon here, but this will discard any values in the match arms
+   |
+LL |     };
+   |      +
 
 error[E0038]: the trait `Trait` cannot be made into an object
   --> $DIR/wf-unsafe-trait-obj-match.rs:26:21
@@ -25,6 +29,9 @@ LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait cannot be made into an object...
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `Trait` for this new enum and using it instead:
+             S
+             R
    = note: required for the cast from `&S` to `&dyn Trait`
 
 error[E0038]: the trait `Trait` cannot be made into an object
@@ -44,6 +51,9 @@ LL | trait Trait: Sized {}
    |       -----  ^^^^^ ...because it requires `Self: Sized`
    |       |
    |       this trait cannot be made into an object...
+   = help: the following types implement the trait, consider defining an enum where each variant holds one of these types, implementing `Trait` for this new enum and using it instead:
+             S
+             R
    = note: required for the cast from `&R` to `&dyn Trait`
 
 error: aborting due to 3 previous errors