about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-11-05 12:35:40 +0100
committerRalf Jung <post@ralfj.de>2022-11-05 15:21:50 +0100
commit83239c2c1ebed372dd34016bdd75d02e4429589d (patch)
treef76015608b2a3fcdbdc5dc7f50049e089c6666d6 /src
parent4492c029eff7b42e91e759576ab0c7ca88f873dc (diff)
parent452cf4f7109f58433ac38be7d3da527408571054 (diff)
downloadrust-83239c2c1ebed372dd34016bdd75d02e4429589d.tar.gz
rust-83239c2c1ebed372dd34016bdd75d02e4429589d.zip
Merge from rustc
Diffstat (limited to 'src')
-rw-r--r--src/bootstrap/bin/rustdoc.rs8
-rw-r--r--src/bootstrap/builder.rs2
-rw-r--r--src/bootstrap/check.rs8
-rw-r--r--src/bootstrap/compile.rs15
-rw-r--r--src/bootstrap/config.rs59
-rw-r--r--src/bootstrap/dist.rs32
-rw-r--r--src/bootstrap/doc.rs35
-rw-r--r--src/bootstrap/lib.rs4
-rw-r--r--src/bootstrap/native.rs4
-rw-r--r--src/bootstrap/test.rs15
-rw-r--r--src/bootstrap/tool.rs30
-rw-r--r--src/bootstrap/util.rs14
-rw-r--r--src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile2
-rw-r--r--src/ci/docker/host-x86_64/dist-various-2/Dockerfile2
-rw-r--r--src/ci/docker/host-x86_64/test-various/Dockerfile11
-rw-r--r--src/ci/docker/host-x86_64/test-various/uefi_qemu_test/Cargo.toml9
-rw-r--r--src/ci/docker/host-x86_64/test-various/uefi_qemu_test/run.py96
-rw-r--r--src/ci/docker/host-x86_64/test-various/uefi_qemu_test/src/main.rs45
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-llvm-13-stage1/Dockerfile1
-rw-r--r--src/ci/docker/host-x86_64/x86_64-gnu-llvm-13/Dockerfile1
-rwxr-xr-xsrc/ci/run.sh5
-rw-r--r--src/doc/rustc/src/SUMMARY.md1
-rw-r--r--src/doc/rustc/src/codegen-options/index.md6
-rw-r--r--src/doc/rustc/src/platform-support.md1
-rw-r--r--src/doc/rustc/src/platform-support/mipsel-sony-psx.md49
-rw-r--r--src/doc/rustc/src/target-tier-policy.md25
-rw-r--r--src/doc/rustdoc/book.toml4
-rw-r--r--src/doc/unstable-book/src/language-features/extended-varargs-abi-support.md10
-rw-r--r--src/librustdoc/Cargo.toml2
-rw-r--r--src/librustdoc/clean/auto_trait.rs13
-rw-r--r--src/librustdoc/clean/blanket_impl.rs4
-rw-r--r--src/librustdoc/clean/inline.rs51
-rw-r--r--src/librustdoc/clean/mod.rs236
-rw-r--r--src/librustdoc/clean/simplify.rs5
-rw-r--r--src/librustdoc/clean/types.rs118
-rw-r--r--src/librustdoc/clean/utils.rs16
-rw-r--r--src/librustdoc/core.rs5
-rw-r--r--src/librustdoc/doctest.rs3
-rw-r--r--src/librustdoc/formats/cache.rs50
-rw-r--r--src/librustdoc/html/format.rs153
-rw-r--r--src/librustdoc/html/highlight.rs2
-rw-r--r--src/librustdoc/html/highlight/fixtures/sample.html8
-rw-r--r--src/librustdoc/html/highlight/tests.rs2
-rw-r--r--src/librustdoc/html/render/mod.rs16
-rw-r--r--src/librustdoc/html/render/print_item.rs77
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css78
-rw-r--r--src/librustdoc/html/static/js/search.js10
-rw-r--r--src/librustdoc/html/templates/print_item.html6
-rw-r--r--src/librustdoc/json/conversions.rs16
-rw-r--r--src/librustdoc/passes/check_doc_test_visibility.rs4
-rw-r--r--src/librustdoc/passes/collect_intra_doc_links.rs2
-rw-r--r--src/librustdoc/passes/strip_hidden.rs1
-rw-r--r--src/librustdoc/passes/strip_priv_imports.rs4
-rw-r--r--src/librustdoc/passes/strip_private.rs4
-rw-r--r--src/librustdoc/passes/stripper.rs49
-rw-r--r--src/librustdoc/visit_ast.rs55
-rw-r--r--src/librustdoc/visit_lib.rs108
m---------src/llvm-project0
-rw-r--r--src/test/codegen/enum-bounds-check-derived-idx.rs6
-rw-r--r--src/test/codegen/enum-bounds-check-issue-13926.rs3
-rw-r--r--src/test/codegen/enum-bounds-check.rs3
-rw-r--r--src/test/codegen/ffi-const.rs3
-rw-r--r--src/test/codegen/ffi-pure.rs3
-rw-r--r--src/test/codegen/issue-103285-ptr-addr-overflow-check.rs16
-rw-r--r--src/test/codegen/match-optimized.rs60
-rw-r--r--src/test/codegen/match-unoptimized.rs23
-rw-r--r--src/test/codegen/match.rs29
-rw-r--r--src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir542
-rw-r--r--src/test/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir68
-rw-r--r--src/test/mir-opt/address_of.rs (renamed from src/test/mir-opt/address-of.rs)0
-rw-r--r--src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir82
-rw-r--r--src/test/mir-opt/array_index_is_temporary.rs (renamed from src/test/mir-opt/array-index-is-temporary.rs)0
-rw-r--r--src/test/mir-opt/building/enum_cast.bar.built.after.mir (renamed from src/test/mir-opt/enum_cast.bar.mir_map.0.mir)8
-rw-r--r--src/test/mir-opt/building/enum_cast.boo.built.after.mir (renamed from src/test/mir-opt/enum_cast.boo.mir_map.0.mir)8
-rw-r--r--src/test/mir-opt/building/enum_cast.droppy.built.after.mir (renamed from src/test/mir-opt/enum_cast.droppy.mir_map.0.mir)22
-rw-r--r--src/test/mir-opt/building/enum_cast.foo.built.after.mir (renamed from src/test/mir-opt/enum_cast.foo.mir_map.0.mir)2
-rw-r--r--src/test/mir-opt/building/enum_cast.rs (renamed from src/test/mir-opt/enum_cast.rs)8
-rw-r--r--src/test/mir-opt/building/issue_101867.main.built.after.mir (renamed from src/test/mir-opt/issue_101867.main.mir_map.0.mir)60
-rw-r--r--src/test/mir-opt/building/issue_101867.rs (renamed from src/test/mir-opt/issue-101867.rs)2
-rw-r--r--src/test/mir-opt/building/issue_49232.main.built.after.mir (renamed from src/test/mir-opt/issue_49232.main.mir_map.0.mir)78
-rw-r--r--src/test/mir-opt/building/issue_49232.rs (renamed from src/test/mir-opt/issue-49232.rs)2
-rw-r--r--src/test/mir-opt/building/match_false_edges.full_tested_match.built.after.mir (renamed from src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir)29
-rw-r--r--src/test/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir (renamed from src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir)22
-rw-r--r--src/test/mir-opt/building/match_false_edges.main.built.after.mir (renamed from src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir)73
-rw-r--r--src/test/mir-opt/building/match_false_edges.rs (renamed from src/test/mir-opt/match_false_edges.rs)6
-rw-r--r--src/test/mir-opt/building/receiver_ptr_mutability.main.built.after.mir (renamed from src/test/mir-opt/receiver_ptr_mutability.main.mir_map.0.mir)132
-rw-r--r--src/test/mir-opt/building/receiver_ptr_mutability.rs (renamed from src/test/mir-opt/receiver-ptr-mutability.rs)2
-rw-r--r--src/test/mir-opt/building/simple_match.match_bool.built.after.mir (renamed from src/test/mir-opt/simple_match.match_bool.mir_map.0.mir)22
-rw-r--r--src/test/mir-opt/building/simple_match.rs (renamed from src/test/mir-opt/simple-match.rs)2
-rw-r--r--src/test/mir-opt/building/storage_live_dead_in_statics.XXX.built.after.mir (renamed from src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir)2
-rw-r--r--src/test/mir-opt/building/storage_live_dead_in_statics.rs (renamed from src/test/mir-opt/storage_live_dead_in_statics.rs)2
-rw-r--r--src/test/mir-opt/building/uniform_array_move_out.move_out_by_subslice.built.after.mir (renamed from src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir)2
-rw-r--r--src/test/mir-opt/building/uniform_array_move_out.move_out_from_end.built.after.mir (renamed from src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir)2
-rw-r--r--src/test/mir-opt/building/uniform_array_move_out.rs (renamed from src/test/mir-opt/uniform_array_move_out.rs)4
-rw-r--r--src/test/mir-opt/const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir20
-rw-r--r--src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff60
-rw-r--r--src/test/mir-opt/const_promotion_extern_static.BOP.built.after.mir (renamed from src/test/mir-opt/const_promotion_extern_static.BOP.mir_map.0.mir)22
-rw-r--r--src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir20
-rw-r--r--src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff60
-rw-r--r--src/test/mir-opt/const_promotion_extern_static.rs (renamed from src/test/mir-opt/const-promotion-extern-static.rs)2
-rw-r--r--src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff18
-rw-r--r--src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir4
-rw-r--r--src/test/mir-opt/const_prop/control_flow_simplification.rs (renamed from src/test/mir-opt/const_prop/control-flow-simplification.rs)0
-rw-r--r--src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff38
-rw-r--r--src/test/mir-opt/const_prop/issue_66971.rs (renamed from src/test/mir-opt/const_prop/issue-66971.rs)0
-rw-r--r--src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff40
-rw-r--r--src/test/mir-opt/const_prop/issue_67019.rs (renamed from src/test/mir-opt/const_prop/issue-67019.rs)0
-rw-r--r--src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir88
-rw-r--r--src/test/mir-opt/exponential_or.rs (renamed from src/test/mir-opt/exponential-or.rs)0
-rw-r--r--src/test/mir-opt/fn_ptr_shim.rs (renamed from src/test/mir-opt/fn-ptr-shim.rs)0
-rw-r--r--src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir58
-rw-r--r--src/test/mir-opt/generator_drop_cleanup.rs (renamed from src/test/mir-opt/generator-drop-cleanup.rs)0
-rw-r--r--src/test/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir122
-rw-r--r--src/test/mir-opt/generator_storage_dead_unwind.rs (renamed from src/test/mir-opt/generator-storage-dead-unwind.rs)0
-rw-r--r--src/test/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir84
-rw-r--r--src/test/mir-opt/generator_tiny.rs (renamed from src/test/mir-opt/generator-tiny.rs)0
-rw-r--r--src/test/mir-opt/graphviz.main.built.after.dot (renamed from src/test/mir-opt/graphviz.main.mir_map.0.dot)0
-rw-r--r--src/test/mir-opt/graphviz.rs2
-rw-r--r--src/test/mir-opt/if_condition_int.dont_opt_bool.SimplifyComparisonIntegral.diff24
-rw-r--r--src/test/mir-opt/if_condition_int.dont_opt_floats.SimplifyComparisonIntegral.diff32
-rw-r--r--src/test/mir-opt/if_condition_int.dont_remove_comparison.SimplifyComparisonIntegral.diff76
-rw-r--r--src/test/mir-opt/if_condition_int.opt_char.SimplifyComparisonIntegral.diff42
-rw-r--r--src/test/mir-opt/if_condition_int.opt_i8.SimplifyComparisonIntegral.diff42
-rw-r--r--src/test/mir-opt/if_condition_int.opt_multiple_ifs.SimplifyComparisonIntegral.diff76
-rw-r--r--src/test/mir-opt/if_condition_int.opt_negative.SimplifyComparisonIntegral.diff42
-rw-r--r--src/test/mir-opt/if_condition_int.opt_u32.SimplifyComparisonIntegral.diff42
-rw-r--r--src/test/mir-opt/if_condition_int.rs (renamed from src/test/mir-opt/if-condition-int.rs)0
-rw-r--r--src/test/mir-opt/inline/asm_unwind.main.Inline.diff34
-rw-r--r--src/test/mir-opt/inline/asm_unwind.rs (renamed from src/test/mir-opt/inline/asm-unwind.rs)0
-rw-r--r--src/test/mir-opt/inline/caller_with_trivial_bound.foo.Inline.diff22
-rw-r--r--src/test/mir-opt/inline/caller_with_trivial_bound.rs (renamed from src/test/mir-opt/inline/caller-with-trivial-bound.rs)0
-rw-r--r--src/test/mir-opt/inline/dyn_trait.get_query.Inline.diff74
-rw-r--r--src/test/mir-opt/inline/dyn_trait.mk_cycle.Inline.diff18
-rw-r--r--src/test/mir-opt/inline/dyn_trait.rs (renamed from src/test/mir-opt/inline/dyn-trait.rs)0
-rw-r--r--src/test/mir-opt/inline/dyn_trait.try_execute_query.Inline.diff42
-rw-r--r--src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir64
-rw-r--r--src/test/mir-opt/inline/inline_any_operand.rs (renamed from src/test/mir-opt/inline/inline-any-operand.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_async.rs (renamed from src/test/mir-opt/inline/inline-async.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir78
-rw-r--r--src/test/mir-opt/inline/inline_closure.rs (renamed from src/test/mir-opt/inline/inline-closure.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir88
-rw-r--r--src/test/mir-opt/inline/inline_closure_borrows_arg.rs (renamed from src/test/mir-opt/inline/inline-closure-borrows-arg.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir110
-rw-r--r--src/test/mir-opt/inline/inline_closure_captures.rs (renamed from src/test/mir-opt/inline/inline-closure-captures.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff18
-rw-r--r--src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff18
-rw-r--r--src/test/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.diff18
-rw-r--r--src/test/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.diff16
-rw-r--r--src/test/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.diff16
-rw-r--r--src/test/mir-opt/inline/inline_compatibility.rs (renamed from src/test/mir-opt/inline/inline-compatibility.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_cycle.one.Inline.diff26
-rw-r--r--src/test/mir-opt/inline/inline_cycle.rs (renamed from src/test/mir-opt/inline/inline-cycle.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_cycle.two.Inline.diff66
-rw-r--r--src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff28
-rw-r--r--src/test/mir-opt/inline/inline_cycle_generic.rs (renamed from src/test/mir-opt/inline/inline-cycle-generic.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_diverging.f.Inline.diff18
-rw-r--r--src/test/mir-opt/inline/inline_diverging.g.Inline.diff46
-rw-r--r--src/test/mir-opt/inline/inline_diverging.h.Inline.diff58
-rw-r--r--src/test/mir-opt/inline/inline_diverging.rs (renamed from src/test/mir-opt/inline/inline-diverging.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_generator.main.Inline.diff164
-rw-r--r--src/test/mir-opt/inline/inline_generator.rs (renamed from src/test/mir-opt/inline/inline-generator.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff38
-rw-r--r--src/test/mir-opt/inline/inline_instruction_set.rs (renamed from src/test/mir-opt/inline/inline-instruction-set.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff40
-rw-r--r--src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff68
-rw-r--r--src/test/mir-opt/inline/inline_into_box_place.rs (renamed from src/test/mir-opt/inline/inline-into-box-place.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_options.main.Inline.after.mir54
-rw-r--r--src/test/mir-opt/inline/inline_options.rs (renamed from src/test/mir-opt/inline/inline-options.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir112
-rw-r--r--src/test/mir-opt/inline/inline_retag.rs (renamed from src/test/mir-opt/inline/inline-retag.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_shims.clone.Inline.diff20
-rw-r--r--src/test/mir-opt/inline/inline_shims.drop.Inline.diff48
-rw-r--r--src/test/mir-opt/inline/inline_shims.rs (renamed from src/test/mir-opt/inline/inline-shims.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_specialization.main.Inline.diff22
-rw-r--r--src/test/mir-opt/inline/inline_specialization.rs (renamed from src/test/mir-opt/inline/inline-specialization.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_trait_method.rs (renamed from src/test/mir-opt/inline/inline-trait-method.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir18
-rw-r--r--src/test/mir-opt/inline/inline_trait_method_2.rs (renamed from src/test/mir-opt/inline/inline-trait-method_2.rs)0
-rw-r--r--src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir38
-rw-r--r--src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir32
-rw-r--r--src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir32
-rw-r--r--src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir24
-rw-r--r--src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir24
-rw-r--r--src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs (renamed from src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut.rs)0
-rw-r--r--src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir60
-rw-r--r--src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.rs (renamed from src/test/mir-opt/inline/issue-76997-inline-scopes-parenting.rs)0
-rw-r--r--src/test/mir-opt/inline/issue_78442.bar.Inline.diff72
-rw-r--r--src/test/mir-opt/inline/issue_78442.bar.RevealAll.diff56
-rw-r--r--src/test/mir-opt/inline/issue_78442.rs (renamed from src/test/mir-opt/inline/issue-78442.rs)0
-rw-r--r--src/test/mir-opt/inline/polymorphic_recursion.rs (renamed from src/test/mir-opt/inline/polymorphic-recursion.rs)0
-rw-r--r--src/test/mir-opt/issue_101973.inner.ConstProp.diff122
-rw-r--r--src/test/mir-opt/issue_101973.rs (renamed from src/test/mir-opt/issue-101973.rs)0
-rw-r--r--src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir56
-rw-r--r--src/test/mir-opt/issue_38669.rs (renamed from src/test/mir-opt/issue-38669.rs)0
-rw-r--r--src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir66
-rw-r--r--src/test/mir-opt/issue_41110.rs (renamed from src/test/mir-opt/issue-41110.rs)0
-rw-r--r--src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir92
-rw-r--r--src/test/mir-opt/issue_41697.rs (renamed from src/test/mir-opt/issue-41697.rs)0
-rw-r--r--src/test/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir18
-rw-r--r--src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir146
-rw-r--r--src/test/mir-opt/issue_41888.rs (renamed from src/test/mir-opt/issue-41888.rs)0
-rw-r--r--src/test/mir-opt/issue_62289.rs (renamed from src/test/mir-opt/issue-62289.rs)0
-rw-r--r--src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir120
-rw-r--r--src/test/mir-opt/issue_72181.bar.built.after.mir (renamed from src/test/mir-opt/issue_72181.bar.mir_map.0.mir)18
-rw-r--r--src/test/mir-opt/issue_72181.foo.built.after.mir (renamed from src/test/mir-opt/issue_72181.foo.mir_map.0.mir)30
-rw-r--r--src/test/mir-opt/issue_72181.main.built.after.mir (renamed from src/test/mir-opt/issue_72181.main.mir_map.0.mir)74
-rw-r--r--src/test/mir-opt/issue_72181.rs (renamed from src/test/mir-opt/issue-72181.rs)6
-rw-r--r--src/test/mir-opt/issue_72181_1.f.built.after.mir (renamed from src/test/mir-opt/issue_72181_1.f.mir_map.0.mir)28
-rw-r--r--src/test/mir-opt/issue_72181_1.main.built.after.mir (renamed from src/test/mir-opt/issue_72181_1.main.mir_map.0.mir)58
-rw-r--r--src/test/mir-opt/issue_72181_1.rs (renamed from src/test/mir-opt/issue-72181-1.rs)4
-rw-r--r--src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff80
-rw-r--r--src/test/mir-opt/issue_73223.rs (renamed from src/test/mir-opt/issue-73223.rs)0
-rw-r--r--src/test/mir-opt/issue_78192.f.InstCombine.diff36
-rw-r--r--src/test/mir-opt/issue_78192.rs (renamed from src/test/mir-opt/issue-78192.rs)0
-rw-r--r--src/test/mir-opt/issue_91633.bar.built.after.mir (renamed from src/test/mir-opt/issue_91633.bar.mir_map.0.mir)34
-rw-r--r--src/test/mir-opt/issue_91633.foo.built.after.mir (renamed from src/test/mir-opt/issue_91633.foo.mir_map.0.mir)58
-rw-r--r--src/test/mir-opt/issue_91633.fun.built.after.mir (renamed from src/test/mir-opt/issue_91633.fun.mir_map.0.mir)42
-rw-r--r--src/test/mir-opt/issue_91633.hey.built.after.mir (renamed from src/test/mir-opt/issue_91633.hey.mir_map.0.mir)38
-rw-r--r--src/test/mir-opt/issue_91633.rs (renamed from src/test/mir-opt/issue-91633.rs)8
-rw-r--r--src/test/mir-opt/issue_99325.main.built.after.mir (renamed from src/test/mir-opt/issue_99325.main.mir_map.0.mir)50
-rw-r--r--src/test/mir-opt/issue_99325.rs (renamed from src/test/mir-opt/issue-99325.rs)2
-rw-r--r--src/test/mir-opt/issues/issue_59352.num_to_digit.PreCodegen.after.mir54
-rw-r--r--src/test/mir-opt/issues/issue_59352.rs (renamed from src/test/mir-opt/issues/issue-59352.rs)0
-rw-r--r--src/test/mir-opt/issues/issue_75439.foo.MatchBranchSimplification.diff82
-rw-r--r--src/test/mir-opt/issues/issue_75439.rs (renamed from src/test/mir-opt/issues/issue-75439.rs)0
-rw-r--r--src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff290
-rw-r--r--src/test/mir-opt/match_arm_scopes.rs (renamed from src/test/mir-opt/match-arm-scopes.rs)0
-rw-r--r--src/test/mir-opt/nll/named_lifetimes_basic.rs (renamed from src/test/mir-opt/nll/named-lifetimes-basic.rs)0
-rw-r--r--src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir30
-rw-r--r--src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir110
-rw-r--r--src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir110
-rw-r--r--src/test/mir-opt/nll/region_subtyping_basic.rs (renamed from src/test/mir-opt/nll/region-subtyping-basic.rs)0
-rw-r--r--src/test/mir-opt/no_drop_for_inactive_variant.rs (renamed from src/test/mir-opt/no-drop-for-inactive-variant.rs)0
-rw-r--r--src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir38
-rw-r--r--src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir48
-rw-r--r--src/test/mir-opt/no_spurious_drop_after_call.rs (renamed from src/test/mir-opt/no-spurious-drop-after-call.rs)0
-rw-r--r--src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff58
-rw-r--r--src/test/mir-opt/nrvo_simple.rs (renamed from src/test/mir-opt/nrvo-simple.rs)0
-rw-r--r--src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir78
-rw-r--r--src/test/mir-opt/packed_struct_drop_aligned.rs (renamed from src/test/mir-opt/packed-struct-drop-aligned.rs)0
-rw-r--r--src/test/mir-opt/remove_never_const.no_codegen.PreCodegen.after.mir4
-rw-r--r--src/test/mir-opt/remove_never_const.rs (renamed from src/test/mir-opt/remove-never-const.rs)0
-rw-r--r--src/test/mir-opt/rustc.try_identity.DestinationPropagation.diff72
-rw-r--r--src/test/mir-opt/simplify_arm.rs (renamed from src/test/mir-opt/simplify-arm.rs)0
-rw-r--r--src/test/mir-opt/simplify_arm_identity.rs (renamed from src/test/mir-opt/simplify-arm-identity.rs)0
-rw-r--r--src/test/mir-opt/simplify_locals.c.SimplifyLocals.diff40
-rw-r--r--src/test/mir-opt/simplify_locals.d1.SimplifyLocals.diff16
-rw-r--r--src/test/mir-opt/simplify_locals.d2.SimplifyLocals.diff40
-rw-r--r--src/test/mir-opt/simplify_locals.expose_addr.SimplifyLocals.diff24
-rw-r--r--src/test/mir-opt/simplify_locals.r.SimplifyLocals.diff32
-rw-r--r--src/test/mir-opt/simplify_locals.rs (renamed from src/test/mir-opt/simplify-locals.rs)0
-rw-r--r--src/test/mir-opt/simplify_locals.t1.SimplifyLocals.diff22
-rw-r--r--src/test/mir-opt/simplify_locals.t2.SimplifyLocals.diff22
-rw-r--r--src/test/mir-opt/simplify_locals.t3.SimplifyLocals.diff30
-rw-r--r--src/test/mir-opt/simplify_locals.t4.SimplifyLocals.diff22
-rw-r--r--src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff78
-rw-r--r--src/test/mir-opt/simplify_locals_fixedpoint.rs (renamed from src/test/mir-opt/simplify-locals-fixedpoint.rs)0
-rw-r--r--src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff176
-rw-r--r--src/test/mir-opt/simplify_locals_removes_unused_consts.rs (renamed from src/test/mir-opt/simplify-locals-removes-unused-consts.rs)0
-rw-r--r--src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff58
-rw-r--r--src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs (renamed from src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads.rs)0
-rw-r--r--src/test/mir-opt/simplify_try.try_identity.DestinationPropagation.diff106
-rw-r--r--src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff85
-rw-r--r--src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir83
-rw-r--r--src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir58
-rw-r--r--src/test/mir-opt/slice_drop_shim.rs (renamed from src/test/mir-opt/slice-drop-shim.rs)0
-rw-r--r--src/test/mir-opt/spanview_block.main.built.after.html (renamed from src/test/mir-opt/spanview_block.main.mir_map.0.html)4
-rw-r--r--src/test/mir-opt/spanview_block.rs (renamed from src/test/mir-opt/spanview-block.rs)2
-rw-r--r--src/test/mir-opt/spanview_statement.main.built.after.html (renamed from src/test/mir-opt/spanview_statement.main.mir_map.0.html)6
-rw-r--r--src/test/mir-opt/spanview_statement.rs (renamed from src/test/mir-opt/spanview-statement.rs)2
-rw-r--r--src/test/mir-opt/spanview_terminator.main.built.after.html (renamed from src/test/mir-opt/spanview_terminator.main.mir_map.0.html)4
-rw-r--r--src/test/mir-opt/spanview_terminator.rs (renamed from src/test/mir-opt/spanview-terminator.rs)2
-rw-r--r--src/test/mir-opt/tls_access.main.PreCodegen.after.mir34
-rw-r--r--src/test/mir-opt/tls_access.rs (renamed from src/test/mir-opt/tls-access.rs)0
-rw-r--r--src/test/mir-opt/uninhabited_enum.process_never.SimplifyLocals.after.mir10
-rw-r--r--src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir14
-rw-r--r--src/test/mir-opt/uninhabited_enum.rs (renamed from src/test/mir-opt/uninhabited-enum.rs)0
-rw-r--r--src/test/mir-opt/unusual_item_types.E-V-{constant#0}.built.after.mir (renamed from src/test/mir-opt/unusual_item_types.E-V-{constant#0}.mir_map.0.mir)8
-rw-r--r--src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.built.after.mir (renamed from src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.mir_map.0.mir)12
-rw-r--r--src/test/mir-opt/unusual_item_types.rs (renamed from src/test/mir-opt/unusual-item-types.rs)6
-rw-r--r--src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir10
-rw-r--r--src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir10
-rw-r--r--src/test/mir-opt/while_storage.rs (renamed from src/test/mir-opt/while-storage.rs)0
-rw-r--r--src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir54
-rw-r--r--src/test/run-make-fulldeps/issue-51671/Makefile2
-rw-r--r--src/test/run-make-fulldeps/issue-51671/app.rs4
-rw-r--r--src/test/run-make-fulldeps/libtest-json/output-default.json2
-rw-r--r--src/test/run-make-fulldeps/libtest-json/output-stdout-success.json4
-rw-r--r--src/test/run-make/test-benches/Makefile11
-rw-r--r--src/test/run-make/test-benches/smokebench.rs14
-rw-r--r--src/test/run-make/valid-print-requests/Makefile4
-rw-r--r--src/test/run-make/valid-print-requests/valid-print-requests.stderr2
-rw-r--r--src/test/rustdoc-gui/highlight-colors.goml10
-rw-r--r--src/test/rustdoc-gui/method-margins.goml17
-rw-r--r--src/test/rustdoc-gui/search-result-color.goml26
-rw-r--r--src/test/rustdoc-gui/search-result-display.goml2
-rw-r--r--src/test/rustdoc-gui/sidebar-links-color.goml386
-rw-r--r--src/test/rustdoc-gui/src/test_docs/lib.rs17
-rw-r--r--src/test/rustdoc-gui/theme-in-history.goml1
-rw-r--r--src/test/rustdoc-js/reexport.js17
-rw-r--r--src/test/rustdoc-js/reexport.rs11
-rw-r--r--src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs5
-rw-r--r--src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.stderr15
-rw-r--r--src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr12
-rw-r--r--src/test/rustdoc-ui/track-diagnostics.rs10
-rw-r--r--src/test/rustdoc-ui/track-diagnostics.stderr10
-rw-r--r--src/test/rustdoc-ui/z-help.stdout1
-rw-r--r--src/test/rustdoc/async-trait-sig.rs14
-rw-r--r--src/test/rustdoc/auxiliary/incoherent-impl-types.rs7
-rw-r--r--src/test/rustdoc/intra-doc/auxiliary/issue-103463-aux.rs4
-rw-r--r--src/test/rustdoc/intra-doc/issue-103463.rs8
-rw-r--r--src/test/rustdoc/issue-41783.codeblock.html2
-rw-r--r--src/test/rustdoc/issue-41783.rs6
-rw-r--r--src/test/rustdoc/local-reexport-doc.rs16
-rw-r--r--src/test/rustdoc/no-unit-struct-field.rs18
-rw-r--r--src/test/rustdoc/rustc-incoherent-impls.rs28
-rw-r--r--src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs37
-rw-r--r--src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr46
-rw-r--r--src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs144
-rw-r--r--src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr80
-rw-r--r--src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.rs4
-rw-r--r--src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr52
-rw-r--r--src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.rs4
-rw-r--r--src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr65
-rw-r--r--src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.rs2
-rw-r--r--src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr21
-rw-r--r--src/test/ui/array-slice-vec/array-break-length.stderr4
-rw-r--r--src/test/ui/asm/aarch64/llvm-58384.rs16
-rw-r--r--src/test/ui/assoc-inherent.rs20
-rw-r--r--src/test/ui/assoc-inherent.stderr17
-rw-r--r--src/test/ui/associated-inherent-types/assoc-inherent-no-body.rs10
-rw-r--r--src/test/ui/associated-inherent-types/assoc-inherent-no-body.stderr10
-rw-r--r--src/test/ui/associated-inherent-types/assoc-inherent-use.rs14
-rw-r--r--src/test/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs19
-rw-r--r--src/test/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr49
-rw-r--r--src/test/ui/c-variadic/variadic-ffi-1.rs4
-rw-r--r--src/test/ui/c-variadic/variadic-ffi-1.stderr28
-rw-r--r--src/test/ui/c-variadic/variadic-ffi-2.rs15
-rw-r--r--src/test/ui/c-variadic/variadic-ffi-2.stderr6
-rw-r--r--src/test/ui/closures/binder/late-bound-in-body.rs9
-rw-r--r--src/test/ui/closures/binder/nested-closures-regions.rs9
-rw-r--r--src/test/ui/closures/binder/nested-closures-regions.stderr38
-rw-r--r--src/test/ui/closures/binder/nested-closures.rs7
-rw-r--r--src/test/ui/closures/closure-array-break-length.stderr4
-rw-r--r--src/test/ui/closures/issue-23012-supertrait-signature-inference.rs29
-rw-r--r--src/test/ui/coherence/strict-coherence-needs-negative-coherence.rs7
-rw-r--r--src/test/ui/coherence/strict-coherence-needs-negative-coherence.stderr10
-rw-r--r--src/test/ui/compiletest-self-test/compile-flags-last.rs7
-rw-r--r--src/test/ui/compiletest-self-test/compile-flags-last.stderr2
-rw-r--r--src/test/ui/compiletest-self-test/ui-testing-optout.rs (renamed from src/test/ui/ui-testing-optout.rs)0
-rw-r--r--src/test/ui/compiletest-self-test/ui-testing-optout.stderr (renamed from src/test/ui/ui-testing-optout.stderr)0
-rw-r--r--src/test/ui/const-generics/generic_const_exprs/issue-99705.rs33
-rw-r--r--src/test/ui/const-generics/issues/issue-82956.stderr2
-rw-r--r--src/test/ui/consts/issue-103790.rs10
-rw-r--r--src/test/ui/consts/issue-103790.stderr65
-rw-r--r--src/test/ui/derived-errors/issue-31997-1.stderr2
-rw-r--r--src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.rs2
-rw-r--r--src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr2
-rw-r--r--src/test/ui/error-codes/E0045.stderr4
-rw-r--r--src/test/ui/error-codes/E0081.stderr6
-rw-r--r--src/test/ui/error-codes/E0268.stderr4
-rw-r--r--src/test/ui/error-codes/E0767.rs3
-rw-r--r--src/test/ui/error-codes/E0767.stderr21
-rw-r--r--src/test/ui/feature-gates/feature-gate-alloc-error-handler.rs6
-rw-r--r--src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr6
-rw-r--r--src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.rs6
-rw-r--r--src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr15
-rw-r--r--src/test/ui/for-loop-while/break-outside-loop.stderr8
-rw-r--r--src/test/ui/hygiene/no_implicit_prelude.stderr2
-rw-r--r--src/test/ui/impl-trait/impl-fn-hrtb-bounds-2.rs8
-rw-r--r--src/test/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr11
-rw-r--r--src/test/ui/impl-trait/impl-fn-hrtb-bounds.rs24
-rw-r--r--src/test/ui/impl-trait/impl-fn-hrtb-bounds.stderr51
-rw-r--r--src/test/ui/impl-trait/impl-fn-parsing-ambiguities.rs15
-rw-r--r--src/test/ui/impl-trait/impl-fn-parsing-ambiguities.stderr26
-rw-r--r--src/test/ui/impl-trait/impl-fn-predefined-lifetimes.rs15
-rw-r--r--src/test/ui/impl-trait/impl-fn-predefined-lifetimes.stderr24
-rw-r--r--src/test/ui/impl-trait/impl_fn_associativity.rs26
-rw-r--r--src/test/ui/impl-trait/nested_impl_trait.rs4
-rw-r--r--src/test/ui/impl-trait/nested_impl_trait.stderr22
-rw-r--r--src/test/ui/impl-trait/where-allowed.rs7
-rw-r--r--src/test/ui/impl-trait/where-allowed.stderr98
-rw-r--r--src/test/ui/issues/issue-28105.stderr4
-rw-r--r--src/test/ui/issues/issue-43162.stderr8
-rw-r--r--src/test/ui/issues/issue-50576.stderr8
-rw-r--r--src/test/ui/issues/issue-50581.stderr4
-rw-r--r--src/test/ui/issues/issue-83048.rs2
-rw-r--r--src/test/ui/issues/issue-83048.stderr4
-rw-r--r--src/test/ui/let-else/let-else-irrefutable.rs8
-rw-r--r--src/test/ui/let-else/let-else-irrefutable.stderr15
-rw-r--r--src/test/ui/lexical-scopes.stderr2
-rw-r--r--src/test/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.rs2
-rw-r--r--src/test/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr2
-rw-r--r--src/test/ui/lint/dead-code/tuple-struct-field.rs2
-rw-r--r--src/test/ui/lint/dead-code/tuple-struct-field.stderr2
-rw-r--r--src/test/ui/lint/issue-103317.fixed14
-rw-r--r--src/test/ui/lint/issue-103317.rs14
-rw-r--r--src/test/ui/lint/issue-103317.stderr17
-rw-r--r--src/test/ui/macros/attr-from-macro.rs (renamed from src/test/ui/attr-from-macro.rs)0
-rw-r--r--src/test/ui/macros/auxiliary/attr-from-macro.rs (renamed from src/test/ui/auxiliary/attr-from-macro.rs)0
-rw-r--r--src/test/ui/macros/issue-38715.rs12
-rw-r--r--src/test/ui/macros/issue-38715.stderr15
-rw-r--r--src/test/ui/privacy/effective_visibilities.rs4
-rw-r--r--src/test/ui/privacy/effective_visibilities.stderr4
-rw-r--r--src/test/ui/proc-macro/amputate-span.stderr4
-rw-r--r--src/test/ui/proc-macro/generate-mod.rs7
-rw-r--r--src/test/ui/proc-macro/generate-mod.stderr129
-rw-r--r--src/test/ui/repr/align-with-extern-c-fn.rs (renamed from src/test/ui/align-with-extern-c-fn.rs)0
-rw-r--r--src/test/ui/repr/aligned_enum_cast.rs (renamed from src/test/ui/aligned_enum_cast.rs)0
-rw-r--r--src/test/ui/repr/repr_c_int_align.rs (renamed from src/test/ui/repr_c_int_align.rs)0
-rw-r--r--src/test/ui/resolve/missing-in-namespace.stderr4
-rw-r--r--src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr16
-rw-r--r--src/test/ui/resolve/resolve-self-in-impl.stderr30
-rw-r--r--src/test/ui/resolve/typo-suggestion-mistyped-in-path.rs42
-rw-r--r--src/test/ui/resolve/typo-suggestion-mistyped-in-path.stderr54
-rw-r--r--src/test/ui/resolve/use_suggestion.stderr2
-rw-r--r--src/test/ui/rfcs/rfc1623-2.rs (renamed from src/test/ui/rfc1623.rs)0
-rw-r--r--src/test/ui/rfcs/rfc1623-2.stderr (renamed from src/test/ui/rfc1623.stderr)8
-rw-r--r--src/test/ui/rfcs/rfc1623-3.rs (renamed from src/test/ui/rfc1623-2.rs)0
-rw-r--r--src/test/ui/rfcs/rfc1623-3.stderr (renamed from src/test/ui/rfc1623-2.stderr)6
-rw-r--r--src/test/ui/span/issue-35987.stderr3
-rw-r--r--src/test/ui/suggestions/core-std-import-order-issue-83564.stderr2
-rw-r--r--src/test/ui/suggestions/suggest-tryinto-edition-change.rs5
-rw-r--r--src/test/ui/suggestions/suggest-tryinto-edition-change.stderr11
-rw-r--r--src/test/ui/test-attrs/test-thread-capture.run.stdout2
-rw-r--r--src/test/ui/test-attrs/test-thread-nocapture.run.stderr2
-rw-r--r--src/test/ui/track-diagnostics/track.rs11
-rw-r--r--src/test/ui/track-diagnostics/track.stderr26
-rw-r--r--src/test/ui/track-diagnostics/track2.rs10
-rw-r--r--src/test/ui/track-diagnostics/track2.stderr13
-rw-r--r--src/test/ui/track-diagnostics/track3.rs10
-rw-r--r--src/test/ui/track-diagnostics/track3.stderr18
-rw-r--r--src/test/ui/track-diagnostics/track4.rs13
-rw-r--r--src/test/ui/track-diagnostics/track4.stderr14
-rw-r--r--src/test/ui/track-diagnostics/track5.rs8
-rw-r--r--src/test/ui/track-diagnostics/track5.stderr9
-rw-r--r--src/test/ui/track-diagnostics/track6.rs14
-rw-r--r--src/test/ui/track-diagnostics/track6.stderr13
-rw-r--r--src/test/ui/traits/negative-impls/eager-mono.rs12
-rw-r--r--src/test/ui/transmutability/arrays/issue-103783-array-length.rs24
-rw-r--r--src/test/ui/transmutability/arrays/issue-103783-array-length.stderr9
-rw-r--r--src/test/ui/type-alias-enum-variants/self-in-enum-definition.stderr40
-rw-r--r--src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs3
-rw-r--r--src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr26
-rw-r--r--src/test/ui/type/issue-94187-verbose-type-name.rs13
-rw-r--r--src/test/ui/unsafe/unsafe-not-inherited.rs26
-rw-r--r--src/test/ui/unsafe/unsafe-not-inherited.stderr24
m---------src/tools/cargo0
-rw-r--r--src/tools/clippy/clippy_lints/src/doc.rs1
-rw-r--r--src/tools/clippy/clippy_lints/src/lifetimes.rs15
-rw-r--r--src/tools/clippy/clippy_lints/src/manual_retain.rs2
-rw-r--r--src/tools/clippy/clippy_lints/src/methods/bind_instead_of_map.rs8
-rw-r--r--src/tools/clippy/clippy_lints/src/methods/unnecessary_iter_cloned.rs4
-rw-r--r--src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs4
-rw-r--r--src/tools/clippy/clippy_lints/src/operators/assign_op_pattern.rs2
-rw-r--r--src/tools/clippy/clippy_lints/src/suspicious_trait_impl.rs6
-rw-r--r--src/tools/clippy/clippy_lints/src/unnecessary_owned_empty_strings.rs4
-rw-r--r--src/tools/clippy/clippy_lints/src/unused_peekable.rs5
-rw-r--r--src/tools/clippy/clippy_lints/src/useless_conversion.rs4
-rw-r--r--src/tools/clippy/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs4
-rw-r--r--src/tools/clippy/clippy_utils/src/lib.rs4
-rw-r--r--src/tools/clippy/clippy_utils/src/ty.rs6
-rw-r--r--src/tools/clippy/src/driver.rs80
-rw-r--r--src/tools/clippy/tests/ui/track-diagnostics.rs12
-rw-r--r--src/tools/clippy/tests/ui/track-diagnostics.stderr10
-rw-r--r--src/tools/compiletest/Cargo.toml1
-rw-r--r--src/tools/compiletest/src/common.rs20
-rw-r--r--src/tools/compiletest/src/runtest.rs267
-rw-r--r--src/tools/compiletest/src/util.rs23
-rw-r--r--src/tools/miri/src/bin/miri.rs70
-rw-r--r--src/tools/miri/src/lib.rs2
-rw-r--r--src/tools/miropt-test-tools/Cargo.toml7
-rw-r--r--src/tools/miropt-test-tools/src/lib.rs70
-rw-r--r--src/tools/rust-analyzer/Cargo.lock4
-rw-r--r--src/tools/rust-analyzer/crates/flycheck/src/lib.rs4
-rw-r--r--src/tools/rust-analyzer/crates/hir-def/src/item_tree/lower.rs8
-rw-r--r--src/tools/rust-analyzer/crates/hir-def/src/path.rs3
-rw-r--r--src/tools/rust-analyzer/crates/hir-def/src/path/lower.rs8
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/chalk_ext.rs17
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/display.rs36
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/infer/path.rs2
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/infer/unify.rs12
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/lib.rs22
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/lower.rs124
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/method_resolution.rs84
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/tests/display_source_code.rs31
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/tests/traits.rs121
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/tls.rs28
-rw-r--r--src/tools/rust-analyzer/crates/hir/src/source_analyzer.rs65
-rw-r--r--src/tools/rust-analyzer/crates/ide/src/goto_definition.rs82
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml2
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/bin/main.rs8
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/caps.rs14
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/cli/lsif.rs6
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs4
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs8
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/to_proto.rs16
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/from_proto.rs6
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs2
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/line_index.rs4
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/lsp_ext.rs11
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/lsp_utils.rs4
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs46
-rw-r--r--src/tools/rust-analyzer/crates/rust-analyzer/src/to_proto.rs8
-rw-r--r--src/tools/rust-analyzer/crates/syntax/rust.ungram2
-rw-r--r--src/tools/rust-analyzer/crates/syntax/src/ast/generated/nodes.rs54
-rw-r--r--src/tools/rust-analyzer/docs/dev/architecture.md2
-rw-r--r--src/tools/rust-analyzer/docs/dev/lsp-extensions.md8
-rw-r--r--src/tools/rust-analyzer/editors/code/src/commands.ts129
-rw-r--r--src/tools/rust-analyzer/editors/code/src/ctx.ts172
-rw-r--r--src/tools/rust-analyzer/editors/code/src/main.ts63
-rw-r--r--src/tools/rust-analyzer/editors/code/src/run.ts6
-rw-r--r--src/tools/rust-analyzer/lib/lsp-server/Cargo.toml2
-rw-r--r--src/tools/rustfmt/src/parse/session.rs1
-rw-r--r--src/tools/tidy/Cargo.toml2
-rw-r--r--src/tools/tidy/src/deps.rs2
-rw-r--r--src/tools/tidy/src/lib.rs1
-rw-r--r--src/tools/tidy/src/main.rs2
-rw-r--r--src/tools/tidy/src/mir_opt_tests.rs74
-rw-r--r--src/tools/tidy/src/ui_tests.rs61
520 files changed, 7737 insertions, 6018 deletions
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index e69cab956c5..23828f4758d 100644
--- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs
@@ -55,13 +55,9 @@ fn main() {
         arg.push(&linker);
         cmd.arg(arg);
     }
-    if env::var_os("RUSTDOC_FUSE_LD_LLD").is_some() {
+    if let Ok(no_threads) = env::var("RUSTDOC_LLD_NO_THREADS") {
         cmd.arg("-Clink-arg=-fuse-ld=lld");
-        if cfg!(windows) {
-            cmd.arg("-Clink-arg=-Wl,/threads:1");
-        } else {
-            cmd.arg("-Clink-arg=-Wl,--threads=1");
-        }
+        cmd.arg(format!("-Clink-arg=-Wl,{}", no_threads));
     }
     // Cargo doesn't pass RUSTDOCFLAGS to proc_macros:
     // https://github.com/rust-lang/cargo/issues/4423
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 8b144f14635..6de37463633 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -621,6 +621,8 @@ impl<'a> Builder<'a> {
                 check::CodegenBackend,
                 check::Clippy,
                 check::Miri,
+                check::CargoMiri,
+                check::MiroptTestTools,
                 check::Rls,
                 check::RustAnalyzer,
                 check::Rustfmt,
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index 229851238f1..2e1bd8d6d1f 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -451,16 +451,16 @@ macro_rules! tool_check_step {
 }
 
 tool_check_step!(Rustdoc, "src/tools/rustdoc", "src/librustdoc", SourceType::InTree);
-// Clippy and Rustfmt are hybrids. They are external tools, but use a git subtree instead
+// Clippy, miri and Rustfmt are hybrids. They are external tools, but use a git subtree instead
 // of a submodule. Since the SourceType only drives the deny-warnings
 // behavior, treat it as in-tree so that any new warnings in clippy will be
 // rejected.
 tool_check_step!(Clippy, "src/tools/clippy", SourceType::InTree);
-// Miri on the other hand is treated as out of tree, since InTree also causes it to
-// be run as part of `check`, which can fail on platforms which libffi-sys has no support for.
-tool_check_step!(Miri, "src/tools/miri", SourceType::Submodule);
+tool_check_step!(Miri, "src/tools/miri", SourceType::InTree);
+tool_check_step!(CargoMiri, "src/tools/miri/cargo-miri", SourceType::InTree);
 tool_check_step!(Rls, "src/tools/rls", SourceType::InTree);
 tool_check_step!(Rustfmt, "src/tools/rustfmt", SourceType::InTree);
+tool_check_step!(MiroptTestTools, "src/tools/miropt-test-tools", SourceType::InTree);
 
 tool_check_step!(Bootstrap, "src/bootstrap", SourceType::InTree, false);
 
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index e02a10b8164..18e780a108d 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -299,7 +299,9 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
 
     // Determine if we're going to compile in optimized C intrinsics to
     // the `compiler-builtins` crate. These intrinsics live in LLVM's
-    // `compiler-rt` repository.
+    // `compiler-rt` repository, but our `src/llvm-project` submodule isn't
+    // always checked out, so we need to conditionally look for this. (e.g. if
+    // an external LLVM is used we skip the LLVM submodule checkout).
     //
     // Note that this shouldn't affect the correctness of `compiler-builtins`,
     // but only its speed. Some intrinsics in C haven't been translated to Rust
@@ -310,15 +312,8 @@ pub fn std_cargo(builder: &Builder<'_>, target: TargetSelection, stage: u32, car
     // If `compiler-rt` is available ensure that the `c` feature of the
     // `compiler-builtins` crate is enabled and it's configured to learn where
     // `compiler-rt` is located.
-    let compiler_builtins_c_feature = if builder.config.optimized_compiler_builtins {
-        if !builder.is_rust_llvm(target) {
-            panic!(
-                "need a managed LLVM submodule for optimized intrinsics support; unset `llvm-config` or `optimized-compiler-builtins`"
-            );
-        }
-
-        builder.update_submodule(&Path::new("src").join("llvm-project"));
-        let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt");
+    let compiler_builtins_root = builder.src.join("src/llvm-project/compiler-rt");
+    let compiler_builtins_c_feature = if compiler_builtins_root.exists() {
         // Note that `libprofiler_builtins/build.rs` also computes this so if
         // you're changing something here please also change that.
         cargo.env("RUST_COMPILER_RT_ROOT", &compiler_builtins_root);
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index a8c403675d8..21dc11c4808 100644
--- a/src/bootstrap/config.rs
+++ b/src/bootstrap/config.rs
@@ -73,8 +73,6 @@ pub struct Config {
     pub color: Color,
     pub patch_binaries_for_nix: bool,
     pub stage0_metadata: Stage0Metadata,
-    /// Whether to use the `c` feature of the `compiler_builtins` crate.
-    pub optimized_compiler_builtins: bool,
 
     pub on_fail: Option<String>,
     pub stage: u32,
@@ -624,7 +622,6 @@ define_config! {
         bench_stage: Option<u32> = "bench-stage",
         patch_binaries_for_nix: Option<bool> = "patch-binaries-for-nix",
         metrics: Option<bool> = "metrics",
-        optimized_compiler_builtins: Option<bool> = "optimized-compiler-builtins",
     }
 }
 
@@ -1013,7 +1010,6 @@ impl Config {
         set(&mut config.print_step_timings, build.print_step_timings);
         set(&mut config.print_step_rusage, build.print_step_rusage);
         set(&mut config.patch_binaries_for_nix, build.patch_binaries_for_nix);
-        set(&mut config.optimized_compiler_builtins, build.optimized_compiler_builtins);
 
         config.verbose = cmp::max(config.verbose, flags.verbose);
 
@@ -1384,21 +1380,46 @@ impl Config {
         git
     }
 
-    pub(crate) fn artifact_channel(&self, builder: &Builder<'_>, commit: &str) -> String {
-        if builder.rust_info.is_managed_git_subrepository() {
+    /// Bootstrap embeds a version number into the name of shared libraries it uploads in CI.
+    /// Return the version it would have used for the given commit.
+    pub(crate) fn artifact_version_part(&self, builder: &Builder<'_>, commit: &str) -> String {
+        let (channel, version) = if builder.rust_info.is_managed_git_subrepository() {
             let mut channel = self.git();
             channel.arg("show").arg(format!("{}:src/ci/channel", commit));
             let channel = output(&mut channel);
-            channel.trim().to_owned()
-        } else if let Ok(channel) = fs::read_to_string(builder.src.join("src/ci/channel")) {
-            channel.trim().to_owned()
+            let mut version = self.git();
+            version.arg("show").arg(format!("{}:src/version", commit));
+            let version = output(&mut version);
+            (channel.trim().to_owned(), version.trim().to_owned())
         } else {
-            let src = builder.src.display();
-            eprintln!("error: failed to determine artifact channel");
-            eprintln!(
-                "help: either use git or ensure that {src}/src/ci/channel contains the name of the channel to use"
-            );
-            panic!();
+            let channel = fs::read_to_string(builder.src.join("src/ci/channel"));
+            let version = fs::read_to_string(builder.src.join("src/version"));
+            match (channel, version) {
+                (Ok(channel), Ok(version)) => {
+                    (channel.trim().to_owned(), version.trim().to_owned())
+                }
+                (channel, version) => {
+                    let src = builder.src.display();
+                    eprintln!("error: failed to determine artifact channel and/or version");
+                    eprintln!(
+                        "help: consider using a git checkout or ensure these files are readable"
+                    );
+                    if let Err(channel) = channel {
+                        eprintln!("reading {}/src/ci/channel failed: {:?}", src, channel);
+                    }
+                    if let Err(version) = version {
+                        eprintln!("reading {}/src/version failed: {:?}", src, version);
+                    }
+                    panic!();
+                }
+            }
+        };
+
+        match channel.as_str() {
+            "stable" => version,
+            "beta" => channel,
+            "nightly" => channel,
+            other => unreachable!("{:?} is not recognized as a valid channel", other),
         }
     }
 
@@ -1641,7 +1662,7 @@ fn maybe_download_rustfmt(builder: &Builder<'_>) -> Option<PathBuf> {
 
 fn download_ci_rustc(builder: &Builder<'_>, commit: &str) {
     builder.verbose(&format!("using downloaded stage2 artifacts from CI (commit {commit})"));
-    let channel = builder.config.artifact_channel(builder, commit);
+    let version = builder.config.artifact_version_part(builder, commit);
     let host = builder.config.build.triple;
     let bin_root = builder.out.join(host).join("ci-rustc");
     let rustc_stamp = bin_root.join(".rustc-stamp");
@@ -1650,13 +1671,13 @@ fn download_ci_rustc(builder: &Builder<'_>, commit: &str) {
         if bin_root.exists() {
             t!(fs::remove_dir_all(&bin_root));
         }
-        let filename = format!("rust-std-{channel}-{host}.tar.xz");
+        let filename = format!("rust-std-{version}-{host}.tar.xz");
         let pattern = format!("rust-std-{host}");
         download_ci_component(builder, filename, &pattern, commit);
-        let filename = format!("rustc-{channel}-{host}.tar.xz");
+        let filename = format!("rustc-{version}-{host}.tar.xz");
         download_ci_component(builder, filename, "rustc", commit);
         // download-rustc doesn't need its own cargo, it can just use beta's.
-        let filename = format!("rustc-dev-{channel}-{host}.tar.xz");
+        let filename = format!("rustc-dev-{version}-{host}.tar.xz");
         download_ci_component(builder, filename, "rustc-dev", commit);
 
         builder.fix_bin_or_dylib(&bin_root.join("bin").join("rustc"));
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index c636d4c2b47..805633c926c 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -1847,21 +1847,23 @@ fn add_env(builder: &Builder<'_>, cmd: &mut Command, target: TargetSelection) {
 ///
 /// Returns whether the files were actually copied.
 fn maybe_install_llvm(builder: &Builder<'_>, target: TargetSelection, dst_libdir: &Path) -> bool {
-    if !builder.is_rust_llvm(target) {
-        // If the LLVM was externally provided, then we don't currently copy
-        // artifacts into the sysroot. This is not necessarily the right
-        // choice (in particular, it will require the LLVM dylib to be in
-        // the linker's load path at runtime), but the common use case for
-        // external LLVMs is distribution provided LLVMs, and in that case
-        // they're usually in the standard search path (e.g., /usr/lib) and
-        // copying them here is going to cause problems as we may end up
-        // with the wrong files and isn't what distributions want.
-        //
-        // This behavior may be revisited in the future though.
-        //
-        // If the LLVM is coming from ourselves (just from CI) though, we
-        // still want to install it, as it otherwise won't be available.
-        return false;
+    if let Some(config) = builder.config.target_config.get(&target) {
+        if config.llvm_config.is_some() && !builder.config.llvm_from_ci {
+            // If the LLVM was externally provided, then we don't currently copy
+            // artifacts into the sysroot. This is not necessarily the right
+            // choice (in particular, it will require the LLVM dylib to be in
+            // the linker's load path at runtime), but the common use case for
+            // external LLVMs is distribution provided LLVMs, and in that case
+            // they're usually in the standard search path (e.g., /usr/lib) and
+            // copying them here is going to cause problems as we may end up
+            // with the wrong files and isn't what distributions want.
+            //
+            // This behavior may be revisited in the future though.
+            //
+            // If the LLVM is coming from ourselves (just from CI) though, we
+            // still want to install it, as it otherwise won't be available.
+            return false;
+        }
     }
 
     // On macOS, rustc (and LLVM tools) link to an unversioned libLLVM.dylib
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index ea06caf9c33..5d265b9ad0c 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -765,7 +765,7 @@ impl Step for Rustc {
 }
 
 macro_rules! tool_doc {
-    ($tool: ident, $should_run: literal, $path: literal, [$($krate: literal),+ $(,)?], in_tree = $in_tree:expr $(,)?) => {
+    ($tool: ident, $should_run: literal, $path: literal, [$($krate: literal),+ $(,)?] $(,)?) => {
         #[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
         pub struct $tool {
             target: TargetSelection,
@@ -821,12 +821,6 @@ macro_rules! tool_doc {
                 t!(fs::create_dir_all(&out_dir));
                 t!(symlink_dir_force(&builder.config, &out, &out_dir));
 
-                let source_type = if $in_tree == true {
-                    SourceType::InTree
-                } else {
-                    SourceType::Submodule
-                };
-
                 // Build cargo command.
                 let mut cargo = prepare_tool_cargo(
                     builder,
@@ -835,7 +829,7 @@ macro_rules! tool_doc {
                     target,
                     "doc",
                     $path,
-                    source_type,
+                    SourceType::InTree,
                     &[],
                 );
 
@@ -851,38 +845,21 @@ macro_rules! tool_doc {
                 cargo.rustdocflag("--show-type-layout");
                 cargo.rustdocflag("--generate-link-to-definition");
                 cargo.rustdocflag("-Zunstable-options");
-                if $in_tree == true {
-                    builder.run(&mut cargo.into());
-                } else {
-                    // Allow out-of-tree docs to fail (since the tool might be in a broken state).
-                    if !builder.try_run(&mut cargo.into()) {
-                        builder.info(&format!(
-                            "WARNING: tool {} failed to document; ignoring failure because it is an out-of-tree tool",
-                            stringify!($tool).to_lowercase(),
-                        ));
-                    }
-                }
+                builder.run(&mut cargo.into());
             }
         }
     }
 }
 
-tool_doc!(
-    Rustdoc,
-    "rustdoc-tool",
-    "src/tools/rustdoc",
-    ["rustdoc", "rustdoc-json-types"],
-    in_tree = true
-);
+tool_doc!(Rustdoc, "rustdoc-tool", "src/tools/rustdoc", ["rustdoc", "rustdoc-json-types"],);
 tool_doc!(
     Rustfmt,
     "rustfmt-nightly",
     "src/tools/rustfmt",
     ["rustfmt-nightly", "rustfmt-config_proc_macro"],
-    in_tree = true
 );
-tool_doc!(Clippy, "clippy", "src/tools/clippy", ["clippy_utils"], in_tree = true);
-tool_doc!(Miri, "miri", "src/tools/miri", ["miri"], in_tree = false);
+tool_doc!(Clippy, "clippy", "src/tools/clippy", ["clippy_utils"]);
+tool_doc!(Miri, "miri", "src/tools/miri", ["miri"]);
 
 #[derive(Ord, PartialOrd, Debug, Copy, Clone, Hash, PartialEq, Eq)]
 pub struct ErrorIndex {
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 7e70e99bb8c..f5def8ba834 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -1152,8 +1152,8 @@ impl Build {
                 options[0] = Some("-Clink-arg=-fuse-ld=lld".to_string());
             }
 
-            let threads = if target.contains("windows") { "/threads:1" } else { "--threads=1" };
-            options[1] = Some(format!("-Clink-arg=-Wl,{}", threads));
+            let no_threads = util::lld_flag_no_threads(target.contains("windows"));
+            options[1] = Some(format!("-Clink-arg=-Wl,{}", no_threads));
         }
 
         IntoIterator::into_iter(options).flatten()
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 2f856c2761c..94a61b727a3 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -269,8 +269,8 @@ fn download_ci_llvm(builder: &Builder<'_>, llvm_sha: &str) {
     } else {
         &builder.config.stage0_metadata.config.artifacts_server
     };
-    let channel = builder.config.artifact_channel(builder, llvm_sha);
-    let filename = format!("rust-dev-{}-{}.tar.xz", channel, builder.build.build.triple);
+    let version = builder.config.artifact_version_part(builder, llvm_sha);
+    let filename = format!("rust-dev-{}-{}.tar.xz", version, builder.build.build.triple);
     let tarball = rustc_cache.join(&filename);
     if !tarball.exists() {
         let help_on_error = "error: failed to download llvm from ci
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 7edd3c12041..935ce5e7f84 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -509,7 +509,7 @@ impl Step for Miri {
             host,
             "run",
             "src/tools/miri/cargo-miri",
-            SourceType::Submodule,
+            SourceType::InTree,
             &[],
         );
         cargo.add_rustc_lib_path(builder, compiler);
@@ -557,7 +557,7 @@ impl Step for Miri {
             host,
             "test",
             "src/tools/miri",
-            SourceType::Submodule,
+            SourceType::InTree,
             &[],
         );
         cargo.add_rustc_lib_path(builder, compiler);
@@ -771,7 +771,10 @@ impl Step for RustdocTheme {
             cmd.env("RUSTDOC_LINKER", linker);
         }
         if builder.is_fuse_ld_lld(self.compiler.host) {
-            cmd.env("RUSTDOC_FUSE_LD_LLD", "1");
+            cmd.env(
+                "RUSTDOC_LLD_NO_THREADS",
+                util::lld_flag_no_threads(self.compiler.host.contains("windows")),
+            );
         }
         try_run(builder, &mut cmd);
     }
@@ -983,6 +986,7 @@ impl Step for RustdocGUI {
                     .arg("doc")
                     .arg("--target-dir")
                     .arg(&out_dir)
+                    .env("RUSTC_BOOTSTRAP", "1")
                     .env("RUSTDOC", builder.rustdoc(self.compiler))
                     .env("RUSTC", builder.rustc(self.compiler))
                     .current_dir(path);
@@ -1048,6 +1052,9 @@ impl Step for Tidy {
         if builder.is_verbose() {
             cmd.arg("--verbose");
         }
+        if builder.config.cmd.bless() {
+            cmd.arg("--bless");
+        }
 
         builder.info("tidy check");
         try_run(builder, &mut cmd);
@@ -1722,6 +1729,8 @@ impl BookTest {
 
         let mut rustbook_cmd = builder.tool_cmd(Tool::Rustbook);
         let path = builder.src.join(&self.path);
+        // Books often have feature-gated example text.
+        rustbook_cmd.env("RUSTC_BOOTSTRAP", "1");
         rustbook_cmd.env("PATH", new_path).arg("test").arg(path);
         builder.add_rust_test_threads(&mut rustbook_cmd);
         builder.info(&format!("Testing rustbook {}", self.path.display()));
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index eec74b2675a..d3952206947 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -794,10 +794,9 @@ macro_rules! tool_extended {
        $($name:ident,
        $path:expr,
        $tool_name:expr,
-       stable = $stable:expr,
-       $(in_tree = $in_tree:expr,)?
-       $(tool_std = $tool_std:literal,)?
-       $extra_deps:block;)+) => {
+       stable = $stable:expr
+       $(,tool_std = $tool_std:literal)?
+       ;)+) => {
         $(
             #[derive(Debug, Clone, Hash, PartialEq, Eq)]
         pub struct $name {
@@ -839,7 +838,6 @@ macro_rules! tool_extended {
 
             #[allow(unused_mut)]
             fn run(mut $sel, $builder: &Builder<'_>) -> Option<PathBuf> {
-                $extra_deps
                 $builder.ensure(ToolBuild {
                     compiler: $sel.compiler,
                     target: $sel.target,
@@ -848,11 +846,7 @@ macro_rules! tool_extended {
                     path: $path,
                     extra_features: $sel.extra_features,
                     is_optional_tool: true,
-                    source_type: if false $(|| $in_tree)* {
-                        SourceType::InTree
-                    } else {
-                        SourceType::Submodule
-                    },
+                    source_type: SourceType::InTree,
                 })
             }
         }
@@ -865,17 +859,17 @@ macro_rules! tool_extended {
 // Note: Most submodule updates for tools are handled by bootstrap.py, since they're needed just to
 // invoke Cargo to build bootstrap. See the comment there for more details.
 tool_extended!((self, builder),
-    Cargofmt, "src/tools/rustfmt", "cargo-fmt", stable=true, in_tree=true, {};
-    CargoClippy, "src/tools/clippy", "cargo-clippy", stable=true, in_tree=true, {};
-    Clippy, "src/tools/clippy", "clippy-driver", stable=true, in_tree=true, {};
-    Miri, "src/tools/miri", "miri", stable=false, in_tree=true, {};
-    CargoMiri, "src/tools/miri/cargo-miri", "cargo-miri", stable=false, in_tree=true, {};
+    Cargofmt, "src/tools/rustfmt", "cargo-fmt", stable=true;
+    CargoClippy, "src/tools/clippy", "cargo-clippy", stable=true;
+    Clippy, "src/tools/clippy", "clippy-driver", stable=true;
+    Miri, "src/tools/miri", "miri", stable=false;
+    CargoMiri, "src/tools/miri/cargo-miri", "cargo-miri", stable=true;
     // FIXME: tool_std is not quite right, we shouldn't allow nightly features.
     // But `builder.cargo` doesn't know how to handle ToolBootstrap in stages other than 0,
     // and this is close enough for now.
-    Rls, "src/tools/rls", "rls", stable=true, in_tree=true, tool_std=true, {};
-    RustDemangler, "src/tools/rust-demangler", "rust-demangler", stable=false, in_tree=true, tool_std=true, {};
-    Rustfmt, "src/tools/rustfmt", "rustfmt", stable=true, in_tree=true, {};
+    Rls, "src/tools/rls", "rls", stable=true, tool_std=true;
+    RustDemangler, "src/tools/rust-demangler", "rust-demangler", stable=false, tool_std=true;
+    Rustfmt, "src/tools/rustfmt", "rustfmt", stable=true;
 );
 
 impl<'a> Builder<'a> {
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs
index 0ebabbd5ca5..20c3801f0a5 100644
--- a/src/bootstrap/util.rs
+++ b/src/bootstrap/util.rs
@@ -13,6 +13,7 @@ use std::time::{Instant, SystemTime, UNIX_EPOCH};
 
 use crate::builder::Builder;
 use crate::config::{Config, TargetSelection};
+use crate::OnceCell;
 
 /// A helper macro to `unwrap` a result except also print out details like:
 ///
@@ -607,3 +608,16 @@ pub fn get_clang_cl_resource_dir(clang_cl_path: &str) -> PathBuf {
     let clang_rt_dir = clang_rt_builtins.parent().expect("The clang lib folder should exist");
     clang_rt_dir.to_path_buf()
 }
+
+pub fn lld_flag_no_threads(is_windows: bool) -> &'static str {
+    static LLD_NO_THREADS: OnceCell<(&'static str, &'static str)> = OnceCell::new();
+    let (windows, other) = LLD_NO_THREADS.get_or_init(|| {
+        let out = output(Command::new("lld").arg("-flavor").arg("ld").arg("--version"));
+        let newer = match (out.find(char::is_numeric), out.find('.')) {
+            (Some(b), Some(e)) => out.as_str()[b..e].parse::<i32>().ok().unwrap_or(14) > 10,
+            _ => true,
+        };
+        if newer { ("/threads:1", "--threads=1") } else { ("/no-threads", "--no-threads") }
+    });
+    if is_windows { windows } else { other }
+}
diff --git a/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile b/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile
index 637b5fa22f9..5ddd3f18039 100644
--- a/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile
+++ b/src/ci/docker/host-x86_64/disabled/dist-x86_64-haiku/Dockerfile
@@ -47,6 +47,4 @@ ENV RUST_CONFIGURE_ARGS --disable-jemalloc \
   --set=$TARGET.cc=x86_64-unknown-haiku-gcc \
   --set=$TARGET.cxx=x86_64-unknown-haiku-g++ \
   --set=$TARGET.llvm-config=/bin/llvm-config-haiku
-ENV EXTERNAL_LLVM 1
-
 ENV SCRIPT python3 ../x.py dist --host=$HOST --target=$HOST
diff --git a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
index 8250ec0c311..126c292b38e 100644
--- a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile
@@ -129,6 +129,4 @@ ENV RUST_CONFIGURE_ARGS --enable-extended --enable-lld --disable-docs \
   --set target.wasm32-wasi.wasi-root=/wasm32-wasi \
   --musl-root-armv7=/musl-armv7
 
-ENV EXTERNAL_LLVM 1
-
 ENV SCRIPT python3 ../x.py dist --host='' --target $TARGETS
diff --git a/src/ci/docker/host-x86_64/test-various/Dockerfile b/src/ci/docker/host-x86_64/test-various/Dockerfile
index b75e2f085cd..b0f35bcb9cc 100644
--- a/src/ci/docker/host-x86_64/test-various/Dockerfile
+++ b/src/ci/docker/host-x86_64/test-various/Dockerfile
@@ -16,7 +16,9 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
   pkg-config \
   xz-utils \
   wget \
-  patch
+  patch \
+  ovmf \
+  qemu-system-x86
 
 RUN curl -sL https://nodejs.org/dist/v15.14.0/node-v15.14.0-linux-x64.tar.xz | \
   tar -xJ
@@ -64,4 +66,9 @@ ENV MUSL_TARGETS=x86_64-unknown-linux-musl \
     CXX_x86_64_unknown_linux_musl=x86_64-linux-musl-g++
 ENV MUSL_SCRIPT python3 /checkout/x.py --stage 2 test --host='' --target $MUSL_TARGETS
 
-ENV SCRIPT $WASM_SCRIPT && $NVPTX_SCRIPT && $MUSL_SCRIPT
+COPY host-x86_64/test-various/uefi_qemu_test /uefi_qemu_test
+ENV UEFI_TARGETS=x86_64-unknown-uefi
+ENV UEFI_SCRIPT python3 /checkout/x.py --stage 2 build --host='' --target $UEFI_TARGETS && \
+  python3 -u /uefi_qemu_test/run.py
+
+ENV SCRIPT $WASM_SCRIPT && $NVPTX_SCRIPT && $MUSL_SCRIPT && $UEFI_SCRIPT
diff --git a/src/ci/docker/host-x86_64/test-various/uefi_qemu_test/Cargo.toml b/src/ci/docker/host-x86_64/test-various/uefi_qemu_test/Cargo.toml
new file mode 100644
index 00000000000..fa8e5b3d080
--- /dev/null
+++ b/src/ci/docker/host-x86_64/test-various/uefi_qemu_test/Cargo.toml
@@ -0,0 +1,9 @@
+[package]
+name = "uefi_qemu_test"
+version = "0.0.0"
+edition = "2021"
+
+[workspace]
+
+[dependencies]
+r-efi = "4.1.0"
diff --git a/src/ci/docker/host-x86_64/test-various/uefi_qemu_test/run.py b/src/ci/docker/host-x86_64/test-various/uefi_qemu_test/run.py
new file mode 100644
index 00000000000..46793ce3afa
--- /dev/null
+++ b/src/ci/docker/host-x86_64/test-various/uefi_qemu_test/run.py
@@ -0,0 +1,96 @@
+#!/usr/bin/env python3
+
+import os
+import shutil
+import subprocess
+import sys
+import tempfile
+
+from pathlib import Path
+
+
+def run(*cmd, capture=False, check=True, env=None):
+    """Print and run a command, optionally capturing the output."""
+    cmd = [str(p) for p in cmd]
+    print(' '.join(cmd))
+    return subprocess.run(cmd,
+                          capture_output=capture,
+                          check=check,
+                          env=env,
+                          text=True)
+
+
+def build_and_run(tmp_dir):
+    host_artifacts = Path('/checkout/obj/build/x86_64-unknown-linux-gnu')
+    stage0 = host_artifacts / 'stage0/bin'
+    stage2 = host_artifacts / 'stage2/bin'
+
+    env = dict(os.environ)
+    env['PATH'] = '{}:{}:{}'.format(stage2, stage0, env['PATH'])
+
+    # Copy the test create into `tmp_dir`.
+    test_crate = Path(tmp_dir) / 'uefi_qemu_test'
+    shutil.copytree('/uefi_qemu_test', test_crate)
+
+    # Build the UEFI executable.
+    target = 'x86_64-unknown-uefi'
+    run('cargo',
+        'build',
+        '--manifest-path',
+        test_crate / 'Cargo.toml',
+        '--target',
+        target,
+        env=env)
+
+    # Create a mock EFI System Partition in a subdirectory.
+    esp = test_crate / 'esp'
+    boot = esp / 'efi/boot'
+    os.makedirs(boot, exist_ok=True)
+
+    # Copy the executable into the ESP.
+    src_exe_path = test_crate / 'target' / target / 'debug/uefi_qemu_test.efi'
+    shutil.copy(src_exe_path, boot / 'bootx64.efi')
+
+    # Run the executable in QEMU and capture the output.
+    qemu = 'qemu-system-x86_64'
+    ovmf_dir = Path('/usr/share/OVMF')
+    ovmf_code = ovmf_dir / 'OVMF_CODE.fd'
+    ovmf_vars = ovmf_dir / 'OVMF_VARS.fd'
+    output = run(qemu,
+                 '-display',
+                 'none',
+                 '-serial',
+                 'stdio',
+                 '-drive',
+                 f'if=pflash,format=raw,readonly=on,file={ovmf_code}',
+                 '-drive',
+                 f'if=pflash,format=raw,readonly=on,file={ovmf_vars}',
+                 '-drive',
+                 f'format=raw,file=fat:rw:{esp}',
+                 capture=True,
+                 # Ubuntu 20.04 (which is what the Dockerfile currently
+                 # uses) provides QEMU 4.2.1, which segfaults on
+                 # shutdown under some circumstances. That has been
+                 # fixed in newer versions of QEMU, but for now just
+                 # don't check the exit status.
+                 check=False).stdout
+
+    if 'Hello World!' in output:
+        print('VM produced expected output')
+    else:
+        print('unexpected VM output:')
+        print('---start---')
+        print(output)
+        print('---end---')
+        sys.exit(1)
+
+
+def main():
+    # Create a temporary directory so that we have a writeable
+    # workspace.
+    with tempfile.TemporaryDirectory() as tmp_dir:
+        build_and_run(tmp_dir)
+
+
+if __name__ == "__main__":
+    main()
diff --git a/src/ci/docker/host-x86_64/test-various/uefi_qemu_test/src/main.rs b/src/ci/docker/host-x86_64/test-various/uefi_qemu_test/src/main.rs
new file mode 100644
index 00000000000..2ec554c140b
--- /dev/null
+++ b/src/ci/docker/host-x86_64/test-various/uefi_qemu_test/src/main.rs
@@ -0,0 +1,45 @@
+// Code is adapted from this hello world example:
+// https://doc.rust-lang.org/nightly/rustc/platform-support/unknown-uefi.html
+
+#![no_main]
+#![no_std]
+
+use core::{panic, ptr};
+use r_efi::efi::{Char16, Handle, Status, SystemTable, RESET_SHUTDOWN};
+
+#[panic_handler]
+fn panic_handler(_info: &panic::PanicInfo) -> ! {
+    loop {}
+}
+
+#[export_name = "efi_main"]
+pub extern "C" fn main(_h: Handle, st: *mut SystemTable) -> Status {
+    let s = [
+        0x0048u16, 0x0065u16, 0x006cu16, 0x006cu16, 0x006fu16, // "Hello"
+        0x0020u16, //                                             " "
+        0x0057u16, 0x006fu16, 0x0072u16, 0x006cu16, 0x0064u16, // "World"
+        0x0021u16, //                                             "!"
+        0x000au16, //                                             "\n"
+        0x0000u16, //                                             NUL
+    ];
+
+    // Print "Hello World!".
+    let r = unsafe { ((*(*st).con_out).output_string)((*st).con_out, s.as_ptr() as *mut Char16) };
+    if r.is_error() {
+        return r;
+    }
+
+    // Shut down.
+    unsafe {
+        ((*((*st).runtime_services)).reset_system)(
+            RESET_SHUTDOWN,
+            Status::SUCCESS,
+            0,
+            ptr::null_mut(),
+        );
+    }
+
+    // This should never be reached because `reset_system` should never
+    // return, so fail with an error if we get here.
+    Status::UNSUPPORTED
+}
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-13-stage1/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-13-stage1/Dockerfile
index 1289f116fe9..23f2215c2d9 100644
--- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-13-stage1/Dockerfile
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-13-stage1/Dockerfile
@@ -29,7 +29,6 @@ RUN sh /scripts/sccache.sh
 # We are disabling CI LLVM since this builder is intentionally using a host
 # LLVM, rather than the typical src/llvm-project LLVM.
 ENV NO_DOWNLOAD_CI_LLVM 1
-ENV EXTERNAL_LLVM 1
 
 # Using llvm-link-shared due to libffi issues -- see #34486
 ENV RUST_CONFIGURE_ARGS \
diff --git a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-13/Dockerfile b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-13/Dockerfile
index 4b89a72baa1..8f6831bc54e 100644
--- a/src/ci/docker/host-x86_64/x86_64-gnu-llvm-13/Dockerfile
+++ b/src/ci/docker/host-x86_64/x86_64-gnu-llvm-13/Dockerfile
@@ -40,7 +40,6 @@ RUN sh /scripts/sccache.sh
 # We are disabling CI LLVM since this builder is intentionally using a host
 # LLVM, rather than the typical src/llvm-project LLVM.
 ENV NO_DOWNLOAD_CI_LLVM 1
-ENV EXTERNAL_LLVM 1
 
 # Using llvm-link-shared due to libffi issues -- see #34486
 ENV RUST_CONFIGURE_ARGS \
diff --git a/src/ci/run.sh b/src/ci/run.sh
index 9d98ce22498..9a247fb60a8 100755
--- a/src/ci/run.sh
+++ b/src/ci/run.sh
@@ -69,11 +69,6 @@ RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set rust.codegen-units-std=1"
 # space required for CI artifacts.
 RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --dist-compression-formats=xz"
 
-# Enable the `c` feature for compiler_builtins, but only when the `compiler-rt` source is available.
-if [ "$EXTERNAL_LLVM" = "" ]; then
-  RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.optimized-compiler-builtins"
-fi
-
 if [ "$DIST_SRC" = "" ]; then
   RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --disable-dist-src"
 fi
diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md
index 06883ddd58b..86bb2c0d381 100644
--- a/src/doc/rustc/src/SUMMARY.md
+++ b/src/doc/rustc/src/SUMMARY.md
@@ -29,6 +29,7 @@
     - [\*-kmc-solid_\*](platform-support/kmc-solid.md)
     - [m68k-unknown-linux-gnu](platform-support/m68k-unknown-linux-gnu.md)
     - [mips64-openwrt-linux-musl](platform-support/mips64-openwrt-linux-musl.md)
+    - [mipsel-sony-psx](platform-support/mipsel-sony-psx.md)
     - [nvptx64-nvidia-cuda](platform-support/nvptx64-nvidia-cuda.md)
     - [riscv32imac-unknown-xous-elf](platform-support/riscv32imac-unknown-xous-elf.md)
     - [*-pc-windows-gnullvm](platform-support/pc-windows-gnullvm.md)
diff --git a/src/doc/rustc/src/codegen-options/index.md b/src/doc/rustc/src/codegen-options/index.md
index b1c3b618cec..f5a49410ea5 100644
--- a/src/doc/rustc/src/codegen-options/index.md
+++ b/src/doc/rustc/src/codegen-options/index.md
@@ -531,8 +531,10 @@ platforms. Possible values are:
   debug information. On other Unix platforms this means that `*.dwo` files will
   contain debug information.
 
-Note that `packed` and `unpacked` are gated behind `-Z unstable-options` on
-non-macOS platforms at this time.
+Note that all three options are supported on Linux and Apple platforms,
+`packed` is supported on Windows-MSVC, and all other platforms support `off`.
+Attempting to use an unsupported option requires using the nightly channel
+with the `-Z unstable-options` flag.
 
 ## strip
 
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md
index a36518cc8ce..3ae9872cf62 100644
--- a/src/doc/rustc/src/platform-support.md
+++ b/src/doc/rustc/src/platform-support.md
@@ -260,6 +260,7 @@ target | std | host | notes
 `mips-unknown-linux-uclibc` | ✓ |  | MIPS Linux with uClibc
 [`mips64-openwrt-linux-musl`](platform-support/mips64-openwrt-linux-musl.md) | ? |  | MIPS64 for OpenWrt Linux MUSL
 `mipsel-sony-psp` | * |  | MIPS (LE) Sony PlayStation Portable (PSP)
+[`mipsel-sony-psx`](platform-support/mipsel-sony-psx.md) | * |  | MIPS (LE) Sony PlayStation 1 (PSX)
 `mipsel-unknown-linux-uclibc` | ✓ |  | MIPS (LE) Linux with uClibc
 `mipsel-unknown-none` | * |  | Bare MIPS (LE) softfloat
 `mipsisa32r6-unknown-linux-gnu` | ? |  |
diff --git a/src/doc/rustc/src/platform-support/mipsel-sony-psx.md b/src/doc/rustc/src/platform-support/mipsel-sony-psx.md
new file mode 100644
index 00000000000..589100e8888
--- /dev/null
+++ b/src/doc/rustc/src/platform-support/mipsel-sony-psx.md
@@ -0,0 +1,49 @@
+# mipsel-sony-psx
+
+**Tier: 3**
+
+Sony PlayStation 1 (psx)
+
+## Designated Developer
+
+* [@ayrtonm](https://github.com/ayrtonm)
+
+## Requirements
+
+This target is cross-compiled.
+It has no special requirements for the host.
+
+## Building
+
+The target can be built by enabling it for a `rustc` build:
+
+```toml
+[build]
+build-stage = 1
+target = ["mipsel-sony-psx"]
+```
+
+## Cross-compilation
+
+This target can be cross-compiled from any host.
+
+## Testing
+
+Currently there is no support to run the rustc test suite for this target.
+
+## Building Rust programs
+
+Since it is Tier 3, rust doesn't ship pre-compiled artifacts for this target.
+
+Just use the `build-std` nightly cargo feature to build the `core` and `alloc` libraries:
+```shell
+cargo build -Zbuild-std=core,alloc --target mipsel-sony-psx
+```
+
+The command above generates an ELF. To generate binaries in the PSEXE format that emulators run, you can use [cargo-psx](https://github.com/ayrtonm/psx-sdk-rs#readme):
+
+```shell
+cargo psx build
+```
+
+or use `-Clink-arg=--oformat=binary` to produce a flat binary.
diff --git a/src/doc/rustc/src/target-tier-policy.md b/src/doc/rustc/src/target-tier-policy.md
index 53d0470fa81..df9131ce84a 100644
--- a/src/doc/rustc/src/target-tier-policy.md
+++ b/src/doc/rustc/src/target-tier-policy.md
@@ -3,6 +3,7 @@
 ## Table of Contents
 
 * [General](#general)
+* [Adding a new target](#adding-a-new-target)
 * [Tier 3 target policy](#tier-3-target-policy)
 * [Tier 2 target policy](#tier-2-target-policy)
   * [Tier 2 with host tools](#tier-2-with-host-tools)
@@ -104,6 +105,30 @@ indicates something entirely optional, and does not indicate guidance or
 recommendations. This language is based on [IETF RFC
 2119](https://tools.ietf.org/html/rfc2119).
 
+## Adding a new target
+
+New targets typically start as Tier 3 and then can be promoted later.
+To propose addition of a new target, open a pull request on [`rust-lang/rust`]:
+
+- Copy the [Tier 3 target policy](#tier-3-target-policy) to the description
+  and fill it out, see [example][tier3example].
+- Add a new description for the target in `src/doc/rustc/src/platform-support`
+  using the [template][platform_template].
+- Add the target to the [SUMMARY.md][summary] (allows wildcards) and
+  [platform-support.md][platformsupport] (must name all targets verbatim).
+  Link to the created description page.
+- Ensure the pull request is assigned to a member of the [Rust compiler team][rust_compiler_team] by commenting:
+  ```text
+  r? compiler-team
+  ```
+
+[tier3example]: https://github.com/rust-lang/rust/pull/94872
+[platform_template]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/TEMPLATE.md
+[summary]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/SUMMARY.md
+[platformsupport]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support.md
+[rust_compiler_team]: https://www.rust-lang.org/governance/teams/compiler
+[`rust-lang/rust`]: https://github.com/rust-lang/rust
+
 ## Tier 3 target policy
 
 At this tier, the Rust project provides no official support for a target, so we
diff --git a/src/doc/rustdoc/book.toml b/src/doc/rustdoc/book.toml
index 45405a11765..dfa68578500 100644
--- a/src/doc/rustdoc/book.toml
+++ b/src/doc/rustdoc/book.toml
@@ -6,5 +6,9 @@ title = "The rustdoc book"
 git-repository-url = "https://github.com/rust-lang/rust/tree/master/src/doc/rustdoc"
 
 [output.html.redirect]
+"/what-to-include.html" = "write-documentation/what-to-include.html"
 "/the-doc-attribute.html" = "write-documentation/the-doc-attribute.html"
+"/linking-to-items-by-name.html" = "write-documentation/linking-to-items-by-name.html"
 "/documentation-tests.html" = "write-documentation/documentation-tests.html"
+"/website-features.html" = "advanced-features.html#custom-search-engines"
+"/passes.html" = "deprecated-features.html#passes"
diff --git a/src/doc/unstable-book/src/language-features/extended-varargs-abi-support.md b/src/doc/unstable-book/src/language-features/extended-varargs-abi-support.md
new file mode 100644
index 00000000000..b20c30ec8f1
--- /dev/null
+++ b/src/doc/unstable-book/src/language-features/extended-varargs-abi-support.md
@@ -0,0 +1,10 @@
+# `extended_varargs_abi_support`
+
+The tracking issue for this feature is: [#100189]
+
+[#100189]: https://github.com/rust-lang/rust/issues/100189
+
+------------------------
+
+This feature adds the possibility of using `sysv64`, `win64` or `efiapi` calling
+conventions on functions with varargs.
diff --git a/src/librustdoc/Cargo.toml b/src/librustdoc/Cargo.toml
index 7bc35c7d551..0da69202e67 100644
--- a/src/librustdoc/Cargo.toml
+++ b/src/librustdoc/Cargo.toml
@@ -20,7 +20,7 @@ serde_json = "1.0"
 serde = { version = "1.0", features = ["derive"] }
 smallvec = "1.8.1"
 tempfile = "3"
-thin-vec = "0.2.8"
+thin-vec = "0.2.9"
 tracing = "0.1"
 tracing-tree = "0.2.0"
 
diff --git a/src/librustdoc/clean/auto_trait.rs b/src/librustdoc/clean/auto_trait.rs
index 764a6d3aa48..84e77e69ecf 100644
--- a/src/librustdoc/clean/auto_trait.rs
+++ b/src/librustdoc/clean/auto_trait.rs
@@ -3,6 +3,7 @@ use rustc_hir as hir;
 use rustc_hir::lang_items::LangItem;
 use rustc_middle::ty::{self, Region, RegionVid, TypeFoldable, TypeSuperFoldable};
 use rustc_trait_selection::traits::auto_trait::{self, AutoTraitResult};
+use thin_vec::ThinVec;
 
 use std::fmt::Debug;
 
@@ -110,7 +111,7 @@ where
                 );
                 let params = raw_generics.params;
 
-                Generics { params, where_predicates: Vec::new() }
+                Generics { params, where_predicates: ThinVec::new() }
             }
             AutoTraitResult::ExplicitImpl => return None,
         };
@@ -118,7 +119,6 @@ where
         Some(Item {
             name: None,
             attrs: Default::default(),
-            visibility: Inherited,
             item_id: ItemId::Auto { trait_: trait_def_id, for_: item_def_id },
             kind: Box::new(ImplItem(Box::new(Impl {
                 unsafety: hir::Unsafety::Normal,
@@ -130,6 +130,7 @@ where
                 kind: ImplKind::Auto,
             }))),
             cfg: None,
+            inline_stmt_id: None,
         })
     }
 
@@ -183,7 +184,7 @@ where
     fn handle_lifetimes<'cx>(
         regions: &RegionConstraintData<'cx>,
         names_map: &FxHashMap<Symbol, Lifetime>,
-    ) -> Vec<WherePredicate> {
+    ) -> ThinVec<WherePredicate> {
         // Our goal is to 'flatten' the list of constraints by eliminating
         // all intermediate RegionVids. At the end, all constraints should
         // be between Regions (aka region variables). This gives us the information
@@ -429,7 +430,7 @@ where
         &mut self,
         item_def_id: DefId,
         param_env: ty::ParamEnv<'tcx>,
-        mut existing_predicates: Vec<WherePredicate>,
+        mut existing_predicates: ThinVec<WherePredicate>,
         vid_to_region: FxHashMap<ty::RegionVid, ty::Region<'tcx>>,
     ) -> Generics {
         debug!(
@@ -663,7 +664,7 @@ where
     /// both for visual consistency between 'rustdoc' runs, and to
     /// make writing tests much easier
     #[inline]
-    fn sort_where_predicates(&self, predicates: &mut Vec<WherePredicate>) {
+    fn sort_where_predicates(&self, predicates: &mut [WherePredicate]) {
         // We should never have identical bounds - and if we do,
         // they're visually identical as well. Therefore, using
         // an unstable sort is fine.
@@ -710,7 +711,7 @@ where
     /// approach is probably somewhat slower, but the small number of items
     /// involved (impls rarely have more than a few bounds) means that it
     /// shouldn't matter in practice.
-    fn unstable_debug_sort<T: Debug>(&self, vec: &mut Vec<T>) {
+    fn unstable_debug_sort<T: Debug>(&self, vec: &mut [T]) {
         vec.sort_by_cached_key(|x| format!("{:?}", x))
     }
 
diff --git a/src/librustdoc/clean/blanket_impl.rs b/src/librustdoc/clean/blanket_impl.rs
index 8b63c3db3c3..d8063705582 100644
--- a/src/librustdoc/clean/blanket_impl.rs
+++ b/src/librustdoc/clean/blanket_impl.rs
@@ -20,7 +20,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
         trace!("get_blanket_impls({:?})", ty);
         let mut impls = Vec::new();
         for trait_def_id in cx.tcx.all_traits() {
-            if !cx.cache.effective_visibilities.is_directly_public(trait_def_id)
+            if !cx.cache.effective_visibilities.is_directly_public(cx.tcx, trait_def_id)
                 || cx.generated_synthetics.get(&(ty.0, trait_def_id)).is_some()
             {
                 continue;
@@ -97,7 +97,6 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
                 impls.push(Item {
                     name: None,
                     attrs: Default::default(),
-                    visibility: Inherited,
                     item_id: ItemId::Blanket { impl_id: impl_def_id, for_: item_def_id },
                     kind: Box::new(ImplItem(Box::new(Impl {
                         unsafety: hir::Unsafety::Normal,
@@ -128,6 +127,7 @@ impl<'a, 'tcx> BlanketImplFinder<'a, 'tcx> {
                         ))),
                     }))),
                     cfg: None,
+                    inline_stmt_id: None,
                 });
             }
         }
diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs
index b9f787729c1..841c4f9d530 100644
--- a/src/librustdoc/clean/inline.rs
+++ b/src/librustdoc/clean/inline.rs
@@ -19,8 +19,7 @@ use rustc_span::symbol::{kw, sym, Symbol};
 use crate::clean::{
     self, clean_fn_decl_from_did_and_sig, clean_generics, clean_impl_item, clean_middle_assoc_item,
     clean_middle_field, clean_middle_ty, clean_trait_ref_with_bindings, clean_ty,
-    clean_ty_generics, clean_variant_def, clean_visibility, utils, Attributes, AttributesExt,
-    ImplKind, ItemId, Type, Visibility,
+    clean_ty_generics, clean_variant_def, utils, Attributes, AttributesExt, ImplKind, ItemId, Type,
 };
 use crate::core::DocContext;
 use crate::formats::item_type::ItemType;
@@ -152,18 +151,10 @@ pub(crate) fn try_inline(
 
     let (attrs, cfg) = merge_attrs(cx, Some(parent_module), load_attrs(cx, did), attrs);
     cx.inlined.insert(did.into());
-    let mut item = clean::Item::from_def_id_and_attrs_and_parts(
-        did,
-        Some(name),
-        kind,
-        Box::new(attrs),
-        cx,
-        cfg,
-    );
-    if let Some(import_def_id) = import_def_id {
-        // The visibility needs to reflect the one from the reexport and not from the "source" DefId.
-        item.visibility = clean_visibility(cx.tcx.visibility(import_def_id));
-    }
+    let mut item =
+        clean::Item::from_def_id_and_attrs_and_parts(did, Some(name), kind, Box::new(attrs), cfg);
+    // The visibility needs to reflect the one from the reexport and not from the "source" DefId.
+    item.inline_stmt_id = import_def_id;
     ret.push(item);
     Some(ret)
 }
@@ -239,13 +230,7 @@ pub(crate) fn build_external_trait(cx: &mut DocContext<'_>, did: DefId) -> clean
         .tcx
         .associated_items(did)
         .in_definition_order()
-        .map(|item| {
-            // When building an external trait, the cleaned trait will have all items public,
-            // which causes methods to have a `pub` prefix, which is invalid since items in traits
-            // can not have a visibility prefix. Thus we override the visibility here manually.
-            // See https://github.com/rust-lang/rust/issues/81274
-            clean::Item { visibility: Visibility::Inherited, ..clean_middle_assoc_item(item, cx) }
-        })
+        .map(|item| clean_middle_assoc_item(item, cx))
         .collect();
 
     let predicates = cx.tcx.predicates_of(did);
@@ -323,6 +308,21 @@ pub(crate) fn build_impls(
     for &did in tcx.inherent_impls(did).iter() {
         build_impl(cx, parent_module, did, attrs, ret);
     }
+
+    // This pretty much exists expressly for `dyn Error` traits that exist in the `alloc` crate.
+    // See also:
+    //
+    // * https://github.com/rust-lang/rust/issues/103170 — where it didn't used to get documented
+    // * https://github.com/rust-lang/rust/pull/99917 — where the feature got used
+    // * https://github.com/rust-lang/rust/issues/53487 — overall tracking issue for Error
+    if tcx.has_attr(did, sym::rustc_has_incoherent_inherent_impls) {
+        use rustc_middle::ty::fast_reject::SimplifiedTypeGen::*;
+        let type_ =
+            if tcx.is_trait(did) { TraitSimplifiedType(did) } else { AdtSimplifiedType(did) };
+        for &did in tcx.incoherent_impls(type_) {
+            build_impl(cx, parent_module, did, attrs, ret);
+        }
+    }
 }
 
 /// `parent_module` refers to the parent of the re-export, not the original item
@@ -374,7 +374,7 @@ pub(crate) fn build_impl(
     if !did.is_local() {
         if let Some(traitref) = associated_trait {
             let did = traitref.def_id;
-            if !cx.cache.effective_visibilities.is_directly_public(did) {
+            if !cx.cache.effective_visibilities.is_directly_public(tcx, did) {
                 return;
             }
 
@@ -403,7 +403,7 @@ pub(crate) fn build_impl(
     // reachable in rustdoc generated documentation
     if !did.is_local() {
         if let Some(did) = for_.def_id(&cx.cache) {
-            if !cx.cache.effective_visibilities.is_directly_public(did) {
+            if !cx.cache.effective_visibilities.is_directly_public(tcx, did) {
                 return;
             }
 
@@ -544,7 +544,6 @@ pub(crate) fn build_impl(
             },
         })),
         Box::new(merged_attrs),
-        cx,
         cfg,
     ));
 }
@@ -592,7 +591,6 @@ fn build_module_items(
                     name: None,
                     attrs: Box::new(clean::Attributes::default()),
                     item_id: ItemId::Primitive(prim_ty, did.krate),
-                    visibility: clean::Public,
                     kind: Box::new(clean::ImportItem(clean::Import::new_simple(
                         item.ident.name,
                         clean::ImportSource {
@@ -611,6 +609,7 @@ fn build_module_items(
                         true,
                     ))),
                     cfg: None,
+                    inline_stmt_id: None,
                 });
             } else if let Some(i) = try_inline(cx, did, None, res, item.ident.name, None, visited) {
                 items.extend(i)
@@ -654,7 +653,7 @@ fn build_macro(
     match CStore::from_tcx(cx.tcx).load_macro_untracked(def_id, cx.sess()) {
         LoadedMacro::MacroDef(item_def, _) => {
             if let ast::ItemKind::MacroDef(ref def) = item_def.kind {
-                let vis = clean_visibility(cx.tcx.visibility(import_def_id.unwrap_or(def_id)));
+                let vis = cx.tcx.visibility(import_def_id.unwrap_or(def_id));
                 clean::MacroItem(clean::Macro {
                     source: utils::display_macro_source(cx, name, def, def_id, vis),
                 })
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 64a18757b26..16e2d9a3cfc 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -74,12 +74,12 @@ pub(crate) fn clean_doc_module<'tcx>(doc: &DocModule<'tcx>, cx: &mut DocContext<
     // This covers the case where somebody does an import which should pull in an item,
     // but there's already an item with the same namespace and same name. Rust gives
     // priority to the not-imported one, so we should, too.
-    items.extend(doc.items.iter().flat_map(|(item, renamed)| {
+    items.extend(doc.items.iter().flat_map(|(item, renamed, import_id)| {
         // First, lower everything other than imports.
         if matches!(item.kind, hir::ItemKind::Use(_, hir::UseKind::Glob)) {
             return Vec::new();
         }
-        let v = clean_maybe_renamed_item(cx, item, *renamed);
+        let v = clean_maybe_renamed_item(cx, item, *renamed, *import_id);
         for item in &v {
             if let Some(name) = item.name && !item.attrs.lists(sym::doc).has_word(sym::hidden) {
                 inserted.insert((item.type_(), name));
@@ -87,7 +87,7 @@ pub(crate) fn clean_doc_module<'tcx>(doc: &DocModule<'tcx>, cx: &mut DocContext<
         }
         v
     }));
-    items.extend(doc.items.iter().flat_map(|(item, renamed)| {
+    items.extend(doc.items.iter().flat_map(|(item, renamed, _)| {
         // Now we actually lower the imports, skipping everything else.
         if let hir::ItemKind::Use(path, hir::UseKind::Glob) = item.kind {
             let name = renamed.unwrap_or_else(|| cx.tcx.hir().name(item.hir_id()));
@@ -601,7 +601,7 @@ pub(crate) fn clean_generics<'tcx>(
         })
         .collect::<Vec<_>>();
 
-    let mut params = Vec::with_capacity(gens.params.len());
+    let mut params = ThinVec::with_capacity(gens.params.len());
     for p in gens.params.iter().filter(|p| !is_impl_trait(p) && !is_elided_lifetime(p)) {
         let p = clean_generic_param(cx, Some(gens), p);
         params.push(p);
@@ -675,7 +675,7 @@ fn clean_ty_generics<'tcx>(
             }
             ty::GenericParamDefKind::Const { .. } => Some(clean_generic_param_def(param, cx)),
         })
-        .collect::<Vec<GenericParamDef>>();
+        .collect::<ThinVec<GenericParamDef>>();
 
     // param index -> [(trait DefId, associated type name & generics, type, higher-ranked params)]
     let mut impl_trait_proj =
@@ -880,7 +880,7 @@ fn clean_fn_or_proc_macro<'tcx>(
             ProcMacroItem(ProcMacro { kind, helpers })
         }
         None => {
-            let mut func = clean_function(cx, sig, generics, body_id);
+            let mut func = clean_function(cx, sig, generics, FunctionArgs::Body(body_id));
             clean_fn_decl_legacy_const_generics(&mut func, attrs);
             FunctionItem(func)
         }
@@ -917,16 +917,28 @@ fn clean_fn_decl_legacy_const_generics(func: &mut Function, attrs: &[ast::Attrib
     }
 }
 
+enum FunctionArgs<'tcx> {
+    Body(hir::BodyId),
+    Names(&'tcx [Ident]),
+}
+
 fn clean_function<'tcx>(
     cx: &mut DocContext<'tcx>,
     sig: &hir::FnSig<'tcx>,
     generics: &hir::Generics<'tcx>,
-    body_id: hir::BodyId,
+    args: FunctionArgs<'tcx>,
 ) -> Box<Function> {
     let (generics, decl) = enter_impl_trait(cx, |cx| {
         // NOTE: generics must be cleaned before args
         let generics = clean_generics(generics, cx);
-        let args = clean_args_from_types_and_body_id(cx, sig.decl.inputs, body_id);
+        let args = match args {
+            FunctionArgs::Body(body_id) => {
+                clean_args_from_types_and_body_id(cx, sig.decl.inputs, body_id)
+            }
+            FunctionArgs::Names(names) => {
+                clean_args_from_types_and_names(cx, sig.decl.inputs, names)
+            }
+        };
         let mut decl = clean_fn_decl_with_args(cx, sig.decl, args);
         if sig.header.is_async() {
             decl.output = decl.sugared_async_return_type();
@@ -1051,18 +1063,12 @@ fn clean_trait_item<'tcx>(trait_item: &hir::TraitItem<'tcx>, cx: &mut DocContext
             ),
             hir::TraitItemKind::Const(ty, None) => TyAssocConstItem(clean_ty(ty, cx)),
             hir::TraitItemKind::Fn(ref sig, hir::TraitFn::Provided(body)) => {
-                let m = clean_function(cx, sig, trait_item.generics, body);
+                let m = clean_function(cx, sig, trait_item.generics, FunctionArgs::Body(body));
                 MethodItem(m, None)
             }
             hir::TraitItemKind::Fn(ref sig, hir::TraitFn::Required(names)) => {
-                let (generics, decl) = enter_impl_trait(cx, |cx| {
-                    // NOTE: generics must be cleaned before args
-                    let generics = clean_generics(trait_item.generics, cx);
-                    let args = clean_args_from_types_and_names(cx, sig.decl.inputs, names);
-                    let decl = clean_fn_decl_with_args(cx, sig.decl, args);
-                    (generics, decl)
-                });
-                TyMethodItem(Box::new(Function { decl, generics }))
+                let m = clean_function(cx, sig, trait_item.generics, FunctionArgs::Names(names));
+                TyMethodItem(m)
             }
             hir::TraitItemKind::Type(bounds, Some(default)) => {
                 let generics = enter_impl_trait(cx, |cx| clean_generics(trait_item.generics, cx));
@@ -1080,13 +1086,10 @@ fn clean_trait_item<'tcx>(trait_item: &hir::TraitItem<'tcx>, cx: &mut DocContext
             hir::TraitItemKind::Type(bounds, None) => {
                 let generics = enter_impl_trait(cx, |cx| clean_generics(trait_item.generics, cx));
                 let bounds = bounds.iter().filter_map(|x| clean_generic_bound(x, cx)).collect();
-                TyAssocTypeItem(Box::new(generics), bounds)
+                TyAssocTypeItem(generics, bounds)
             }
         };
-        let what_rustc_thinks =
-            Item::from_def_id_and_parts(local_did, Some(trait_item.ident.name), inner, cx);
-        // Trait items always inherit the trait's visibility -- we don't want to show `pub`.
-        Item { visibility: Inherited, ..what_rustc_thinks }
+        Item::from_def_id_and_parts(local_did, Some(trait_item.ident.name), inner, cx)
     })
 }
 
@@ -1102,7 +1105,7 @@ pub(crate) fn clean_impl_item<'tcx>(
                 AssocConstItem(clean_ty(ty, cx), default)
             }
             hir::ImplItemKind::Fn(ref sig, body) => {
-                let m = clean_function(cx, sig, impl_.generics, body);
+                let m = clean_function(cx, sig, impl_.generics, FunctionArgs::Body(body));
                 let defaultness = cx.tcx.impl_defaultness(impl_.owner_id);
                 MethodItem(m, Some(defaultness))
             }
@@ -1117,18 +1120,7 @@ pub(crate) fn clean_impl_item<'tcx>(
             }
         };
 
-        let mut what_rustc_thinks =
-            Item::from_def_id_and_parts(local_did, Some(impl_.ident.name), inner, cx);
-
-        let impl_ref = cx.tcx.impl_trait_ref(cx.tcx.local_parent(impl_.owner_id.def_id));
-
-        // Trait impl items always inherit the impl's visibility --
-        // we don't want to show `pub`.
-        if impl_ref.is_some() {
-            what_rustc_thinks.visibility = Inherited;
-        }
-
-        what_rustc_thinks
+        Item::from_def_id_and_parts(local_did, Some(impl_.ident.name), inner, cx)
     })
 }
 
@@ -1225,56 +1217,47 @@ pub(crate) fn clean_middle_assoc_item<'tcx>(
                     tcx.generics_of(assoc_item.def_id),
                     ty::GenericPredicates { parent: None, predicates },
                 );
-                // Move bounds that are (likely) directly attached to the associated type
-                // from the where clause to the associated type.
-                // There is no guarantee that this is what the user actually wrote but we have
-                // no way of knowing.
-                let mut bounds = generics
-                    .where_predicates
-                    .drain_filter(|pred| match *pred {
-                        WherePredicate::BoundPredicate {
-                            ty: QPath(box QPathData { ref assoc, ref self_type, ref trait_, .. }),
-                            ..
-                        } => {
-                            if assoc.name != my_name {
-                                return false;
-                            }
-                            if trait_.def_id() != assoc_item.container_id(tcx) {
-                                return false;
-                            }
-                            match *self_type {
-                                Generic(ref s) if *s == kw::SelfUpper => {}
-                                _ => return false,
-                            }
-                            match &assoc.args {
-                                GenericArgs::AngleBracketed { args, bindings } => {
-                                    if !bindings.is_empty()
-                                        || generics
-                                            .params
-                                            .iter()
-                                            .zip(args.iter())
-                                            .any(|(param, arg)| !param_eq_arg(param, arg))
-                                    {
-                                        return false;
-                                    }
-                                }
-                                GenericArgs::Parenthesized { .. } => {
-                                    // The only time this happens is if we're inside the rustdoc for Fn(),
-                                    // which only has one associated type, which is not a GAT, so whatever.
+                // Filter out the bounds that are (likely?) directly attached to the associated type,
+                // as opposed to being located in the where clause.
+                let mut bounds: Vec<GenericBound> = Vec::new();
+                generics.where_predicates.retain_mut(|pred| match *pred {
+                    WherePredicate::BoundPredicate {
+                        ty: QPath(box QPathData { ref assoc, ref self_type, ref trait_, .. }),
+                        bounds: ref mut pred_bounds,
+                        ..
+                    } => {
+                        if assoc.name != my_name {
+                            return true;
+                        }
+                        if trait_.def_id() != assoc_item.container_id(tcx) {
+                            return true;
+                        }
+                        match *self_type {
+                            Generic(ref s) if *s == kw::SelfUpper => {}
+                            _ => return true,
+                        }
+                        match &assoc.args {
+                            GenericArgs::AngleBracketed { args, bindings } => {
+                                if !bindings.is_empty()
+                                    || generics
+                                        .params
+                                        .iter()
+                                        .zip(args.iter())
+                                        .any(|(param, arg)| !param_eq_arg(param, arg))
+                                {
+                                    return true;
                                 }
                             }
-                            true
-                        }
-                        _ => false,
-                    })
-                    .flat_map(|pred| {
-                        if let WherePredicate::BoundPredicate { bounds, .. } = pred {
-                            bounds
-                        } else {
-                            unreachable!()
+                            GenericArgs::Parenthesized { .. } => {
+                                // The only time this happens is if we're inside the rustdoc for Fn(),
+                                // which only has one associated type, which is not a GAT, so whatever.
+                            }
                         }
-                    })
-                    .collect::<Vec<_>>();
+                        bounds.extend(mem::replace(pred_bounds, Vec::new()));
+                        false
+                    }
+                    _ => true,
+                });
                 // Our Sized/?Sized bound didn't get handled when creating the generics
                 // because we didn't actually get our whole set of bounds until just now
                 // (some of them may have come from the trait). If we do have a sized
@@ -1290,7 +1273,7 @@ pub(crate) fn clean_middle_assoc_item<'tcx>(
                 // (generic) associated type from the where clause to the respective parameter.
                 // There is no guarantee that this is what the user actually wrote but we have
                 // no way of knowing.
-                let mut where_predicates = Vec::new();
+                let mut where_predicates = ThinVec::new();
                 for mut pred in generics.where_predicates {
                     if let WherePredicate::BoundPredicate { ty: Generic(arg), bounds, .. } = &mut pred
                     && let Some(GenericParamDef {
@@ -1320,7 +1303,7 @@ pub(crate) fn clean_middle_assoc_item<'tcx>(
                         bounds,
                     )
                 } else {
-                    TyAssocTypeItem(Box::new(generics), bounds)
+                    TyAssocTypeItem(generics, bounds)
                 }
             } else {
                 // FIXME: when could this happen? Associated items in inherent impls?
@@ -1331,7 +1314,10 @@ pub(crate) fn clean_middle_assoc_item<'tcx>(
                             cx,
                             Some(assoc_item.def_id),
                         ),
-                        generics: Generics { params: Vec::new(), where_predicates: Vec::new() },
+                        generics: Generics {
+                            params: ThinVec::new(),
+                            where_predicates: ThinVec::new(),
+                        },
                         item_type: None,
                     }),
                     Vec::new(),
@@ -1340,18 +1326,7 @@ pub(crate) fn clean_middle_assoc_item<'tcx>(
         }
     };
 
-    let mut what_rustc_thinks =
-        Item::from_def_id_and_parts(assoc_item.def_id, Some(assoc_item.name), kind, cx);
-
-    let impl_ref = tcx.impl_trait_ref(tcx.parent(assoc_item.def_id));
-
-    // Trait impl items always inherit the impl's visibility --
-    // we don't want to show `pub`.
-    if impl_ref.is_some() {
-        what_rustc_thinks.visibility = Visibility::Inherited;
-    }
-
-    what_rustc_thinks
+    Item::from_def_id_and_parts(assoc_item.def_id, Some(assoc_item.name), kind, cx)
 }
 
 fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type {
@@ -1406,7 +1381,8 @@ fn clean_qpath<'tcx>(hir_ty: &hir::Ty<'tcx>, cx: &mut DocContext<'tcx>) -> Type
                 ty::Projection(proj) => Res::Def(DefKind::Trait, proj.trait_ref(cx.tcx).def_id),
                 // Rustdoc handles `ty::Error`s by turning them into `Type::Infer`s.
                 ty::Error(_) => return Type::Infer,
-                _ => bug!("clean: expected associated type, found `{:?}`", ty),
+                // Otherwise, this is an inherent associated type.
+                _ => return clean_middle_ty(ty, cx, None),
             };
             let trait_ = clean_path(&hir::Path { span, res, segments: &[] }, cx);
             register_res(cx, trait_.res);
@@ -1431,7 +1407,7 @@ fn maybe_expand_private_type_alias<'tcx>(
     let Res::Def(DefKind::TyAlias, def_id) = path.res else { return None };
     // Substitute private type aliases
     let def_id = def_id.as_local()?;
-    let alias = if !cx.cache.effective_visibilities.is_exported(def_id.to_def_id()) {
+    let alias = if !cx.cache.effective_visibilities.is_exported(cx.tcx, def_id.to_def_id()) {
         &cx.tcx.hir().expect_item(def_id).kind
     } else {
         return None;
@@ -1821,30 +1797,7 @@ pub(crate) fn clean_field_with_def_id(
     ty: Type,
     cx: &mut DocContext<'_>,
 ) -> Item {
-    let what_rustc_thinks =
-        Item::from_def_id_and_parts(def_id, Some(name), StructFieldItem(ty), cx);
-    if is_field_vis_inherited(cx.tcx, def_id) {
-        // Variant fields inherit their enum's visibility.
-        Item { visibility: Visibility::Inherited, ..what_rustc_thinks }
-    } else {
-        what_rustc_thinks
-    }
-}
-
-fn is_field_vis_inherited(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
-    let parent = tcx.parent(def_id);
-    match tcx.def_kind(parent) {
-        DefKind::Struct | DefKind::Union => false,
-        DefKind::Variant => true,
-        parent_kind => panic!("unexpected parent kind: {:?}", parent_kind),
-    }
-}
-
-pub(crate) fn clean_visibility(vis: ty::Visibility<DefId>) -> Visibility {
-    match vis {
-        ty::Visibility::Public => Visibility::Public,
-        ty::Visibility::Restricted(module) => Visibility::Restricted(module),
-    }
+    Item::from_def_id_and_parts(def_id, Some(name), StructFieldItem(ty), cx)
 }
 
 pub(crate) fn clean_variant_def<'tcx>(variant: &ty::VariantDef, cx: &mut DocContext<'tcx>) -> Item {
@@ -1861,10 +1814,7 @@ pub(crate) fn clean_variant_def<'tcx>(variant: &ty::VariantDef, cx: &mut DocCont
             fields: variant.fields.iter().map(|field| clean_middle_field(field, cx)).collect(),
         }),
     };
-    let what_rustc_thinks =
-        Item::from_def_id_and_parts(variant.def_id, Some(variant.name), VariantItem(kind), cx);
-    // don't show `pub` for variants, which always inherit visibility
-    Item { visibility: Inherited, ..what_rustc_thinks }
+    Item::from_def_id_and_parts(variant.def_id, Some(variant.name), VariantItem(kind), cx)
 }
 
 fn clean_variant_data<'tcx>(
@@ -1955,6 +1905,7 @@ fn clean_maybe_renamed_item<'tcx>(
     cx: &mut DocContext<'tcx>,
     item: &hir::Item<'tcx>,
     renamed: Option<Symbol>,
+    import_id: Option<hir::HirId>,
 ) -> Vec<Item> {
     use hir::ItemKind;
 
@@ -2005,7 +1956,7 @@ fn clean_maybe_renamed_item<'tcx>(
                 clean_fn_or_proc_macro(item, sig, generics, body_id, &mut name, cx)
             }
             ItemKind::Macro(ref macro_def, _) => {
-                let ty_vis = clean_visibility(cx.tcx.visibility(def_id));
+                let ty_vis = cx.tcx.visibility(def_id);
                 MacroItem(Macro {
                     source: display_macro_source(cx, name, macro_def, def_id, ty_vis),
                 })
@@ -2031,17 +1982,29 @@ fn clean_maybe_renamed_item<'tcx>(
             }
             _ => unreachable!("not yet converted"),
         };
-
-        vec![Item::from_def_id_and_parts(def_id, Some(name), kind, cx)]
+        if let Some(import_id) = import_id {
+            let (attrs, cfg) = inline::merge_attrs(
+                cx,
+                Some(cx.tcx.parent_module(import_id).to_def_id()),
+                inline::load_attrs(cx, def_id),
+                Some(inline::load_attrs(cx, cx.tcx.hir().local_def_id(import_id).to_def_id())),
+            );
+            vec![Item::from_def_id_and_attrs_and_parts(
+                def_id,
+                Some(name),
+                kind,
+                Box::new(attrs),
+                cfg,
+            )]
+        } else {
+            vec![Item::from_def_id_and_parts(def_id, Some(name), kind, cx)]
+        }
     })
 }
 
 fn clean_variant<'tcx>(variant: &hir::Variant<'tcx>, cx: &mut DocContext<'tcx>) -> Item {
     let kind = VariantItem(clean_variant_data(&variant.data, &variant.disr_expr, cx));
-    let what_rustc_thinks =
-        Item::from_hir_id_and_parts(variant.id, Some(variant.ident.name), kind, cx);
-    // don't show `pub` for variants, which are always public
-    Item { visibility: Inherited, ..what_rustc_thinks }
+    Item::from_hir_id_and_parts(variant.id, Some(variant.ident.name), kind, cx)
 }
 
 fn clean_impl<'tcx>(
@@ -2114,6 +2077,7 @@ fn clean_extern_crate<'tcx>(
                 }
         });
 
+    let krate_owner_def_id = krate.owner_id.to_def_id();
     if please_inline {
         let mut visited = FxHashSet::default();
 
@@ -2122,7 +2086,7 @@ fn clean_extern_crate<'tcx>(
         if let Some(items) = inline::try_inline(
             cx,
             cx.tcx.parent_module(krate.hir_id()).to_def_id(),
-            Some(krate.owner_id.to_def_id()),
+            Some(krate_owner_def_id),
             res,
             name,
             Some(attrs),
@@ -2137,9 +2101,9 @@ fn clean_extern_crate<'tcx>(
         name: Some(name),
         attrs: Box::new(Attributes::from_ast(attrs)),
         item_id: crate_def_id.into(),
-        visibility: clean_visibility(ty_vis),
         kind: Box::new(ExternCrateItem { src: orig_name }),
         cfg: attrs.cfg(cx.tcx, &cx.cache.hidden_cfg),
+        inline_stmt_id: Some(krate_owner_def_id),
     }]
 }
 
diff --git a/src/librustdoc/clean/simplify.rs b/src/librustdoc/clean/simplify.rs
index 1bcb9fcd5a4..1c184f9b269 100644
--- a/src/librustdoc/clean/simplify.rs
+++ b/src/librustdoc/clean/simplify.rs
@@ -14,13 +14,14 @@
 use rustc_data_structures::fx::FxIndexMap;
 use rustc_hir::def_id::DefId;
 use rustc_middle::ty;
+use thin_vec::ThinVec;
 
 use crate::clean;
 use crate::clean::GenericArgs as PP;
 use crate::clean::WherePredicate as WP;
 use crate::core::DocContext;
 
-pub(crate) fn where_clauses(cx: &DocContext<'_>, clauses: Vec<WP>) -> Vec<WP> {
+pub(crate) fn where_clauses(cx: &DocContext<'_>, clauses: Vec<WP>) -> ThinVec<WP> {
     // First, partition the where clause into its separate components.
     //
     // We use `FxIndexMap` so that the insertion order is preserved to prevent messing up to
@@ -59,7 +60,7 @@ pub(crate) fn where_clauses(cx: &DocContext<'_>, clauses: Vec<WP>) -> Vec<WP> {
     });
 
     // And finally, let's reassemble everything
-    let mut clauses = Vec::new();
+    let mut clauses = ThinVec::with_capacity(lifetimes.len() + tybounds.len() + equalities.len());
     clauses.extend(
         lifetimes.into_iter().map(|(lt, bounds)| WP::RegionPredicate { lifetime: lt, bounds }),
     );
diff --git a/src/librustdoc/clean/types.rs b/src/librustdoc/clean/types.rs
index cd1f972dce8..fea3690e50a 100644
--- a/src/librustdoc/clean/types.rs
+++ b/src/librustdoc/clean/types.rs
@@ -24,7 +24,7 @@ use rustc_hir::{BodyId, Mutability};
 use rustc_hir_analysis::check::intrinsic::intrinsic_operation_unsafety;
 use rustc_index::vec::IndexVec;
 use rustc_middle::ty::fast_reject::SimplifiedType;
-use rustc_middle::ty::{self, TyCtxt};
+use rustc_middle::ty::{self, DefIdTree, TyCtxt, Visibility};
 use rustc_session::Session;
 use rustc_span::hygiene::MacroKind;
 use rustc_span::source_map::DUMMY_SP;
@@ -34,7 +34,6 @@ use rustc_target::abi::VariantIdx;
 use rustc_target::spec::abi::Abi;
 
 use crate::clean::cfg::Cfg;
-use crate::clean::clean_visibility;
 use crate::clean::external_path;
 use crate::clean::inline::{self, print_inlined_const};
 use crate::clean::utils::{is_literal_expr, print_const_expr, print_evaluated_const};
@@ -51,7 +50,6 @@ pub(crate) use self::Type::{
     Array, BareFunction, BorrowedRef, DynTrait, Generic, ImplTrait, Infer, Primitive, QPath,
     RawPointer, Slice, Tuple,
 };
-pub(crate) use self::Visibility::{Inherited, Public};
 
 #[cfg(test)]
 mod tests;
@@ -348,12 +346,12 @@ pub(crate) struct Item {
     /// Optional because not every item has a name, e.g. impls.
     pub(crate) name: Option<Symbol>,
     pub(crate) attrs: Box<Attributes>,
-    pub(crate) visibility: Visibility,
     /// Information about this item that is specific to what kind of item it is.
     /// E.g., struct vs enum vs function.
     pub(crate) kind: Box<ItemKind>,
     pub(crate) item_id: ItemId,
-
+    /// This is the `DefId` of the `use` statement if the item was inlined.
+    pub(crate) inline_stmt_id: Option<DefId>,
     pub(crate) cfg: Option<Arc<Cfg>>,
 }
 
@@ -364,9 +362,7 @@ impl fmt::Debug for Item {
         let alternate = f.alternate();
         // hand-picked fields that don't bloat the logs too much
         let mut fmt = f.debug_struct("Item");
-        fmt.field("name", &self.name)
-            .field("visibility", &self.visibility)
-            .field("item_id", &self.item_id);
+        fmt.field("name", &self.name).field("item_id", &self.item_id);
         // allow printing the full item if someone really wants to
         if alternate {
             fmt.field("attrs", &self.attrs).field("kind", &self.kind).field("cfg", &self.cfg);
@@ -388,6 +384,15 @@ pub(crate) fn rustc_span(def_id: DefId, tcx: TyCtxt<'_>) -> Span {
     ))
 }
 
+fn is_field_vis_inherited(tcx: TyCtxt<'_>, def_id: DefId) -> bool {
+    let parent = tcx.parent(def_id);
+    match tcx.def_kind(parent) {
+        DefKind::Struct | DefKind::Union => false,
+        DefKind::Variant => true,
+        parent_kind => panic!("unexpected parent kind: {:?}", parent_kind),
+    }
+}
+
 impl Item {
     pub(crate) fn stability<'tcx>(&self, tcx: TyCtxt<'tcx>) -> Option<Stability> {
         self.item_id.as_def_id().and_then(|did| tcx.lookup_stability(did))
@@ -462,7 +467,6 @@ impl Item {
             name,
             kind,
             Box::new(Attributes::from_ast(ast_attrs)),
-            cx,
             ast_attrs.cfg(cx.tcx, &cx.cache.hidden_cfg),
         )
     }
@@ -472,21 +476,18 @@ impl Item {
         name: Option<Symbol>,
         kind: ItemKind,
         attrs: Box<Attributes>,
-        cx: &mut DocContext<'_>,
         cfg: Option<Arc<Cfg>>,
     ) -> Item {
         trace!("name={:?}, def_id={:?} cfg={:?}", name, def_id, cfg);
 
-        // Primitives and Keywords are written in the source code as private modules.
-        // The modules need to be private so that nobody actually uses them, but the
-        // keywords and primitives that they are documenting are public.
-        let visibility = if matches!(&kind, ItemKind::KeywordItem | ItemKind::PrimitiveItem(..)) {
-            Visibility::Public
-        } else {
-            clean_visibility(cx.tcx.visibility(def_id))
-        };
-
-        Item { item_id: def_id.into(), kind: Box::new(kind), name, attrs, visibility, cfg }
+        Item {
+            item_id: def_id.into(),
+            kind: Box::new(kind),
+            name,
+            attrs,
+            cfg,
+            inline_stmt_id: None,
+        }
     }
 
     /// Finds all `doc` attributes as NameValues and returns their corresponding values, joined
@@ -691,17 +692,61 @@ impl Item {
                     asyncness: hir::IsAsync::NotAsync,
                 }
             }
-            ItemKind::FunctionItem(_) | ItemKind::MethodItem(_, _) => {
+            ItemKind::FunctionItem(_) | ItemKind::MethodItem(_, _) | ItemKind::TyMethodItem(_) => {
                 let def_id = self.item_id.as_def_id().unwrap();
                 build_fn_header(def_id, tcx, tcx.asyncness(def_id))
             }
-            ItemKind::TyMethodItem(_) => {
-                build_fn_header(self.item_id.as_def_id().unwrap(), tcx, hir::IsAsync::NotAsync)
-            }
             _ => return None,
         };
         Some(header)
     }
+
+    /// Returns the visibility of the current item. If the visibility is "inherited", then `None`
+    /// is returned.
+    pub(crate) fn visibility(&self, tcx: TyCtxt<'_>) -> Option<Visibility<DefId>> {
+        let def_id = match self.item_id {
+            // Anything but DefId *shouldn't* matter, but return a reasonable value anyway.
+            ItemId::Auto { .. } | ItemId::Blanket { .. } => return None,
+            // Primitives and Keywords are written in the source code as private modules.
+            // The modules need to be private so that nobody actually uses them, but the
+            // keywords and primitives that they are documenting are public.
+            ItemId::Primitive(..) => return Some(Visibility::Public),
+            ItemId::DefId(def_id) => def_id,
+        };
+
+        match *self.kind {
+            // Explication on `ItemId::Primitive` just above.
+            ItemKind::KeywordItem | ItemKind::PrimitiveItem(_) => return Some(Visibility::Public),
+            // Variant fields inherit their enum's visibility.
+            StructFieldItem(..) if is_field_vis_inherited(tcx, def_id) => {
+                return None;
+            }
+            // Variants always inherit visibility
+            VariantItem(..) => return None,
+            // Trait items inherit the trait's visibility
+            AssocConstItem(..) | TyAssocConstItem(..) | AssocTypeItem(..) | TyAssocTypeItem(..)
+            | TyMethodItem(..) | MethodItem(..) => {
+                let assoc_item = tcx.associated_item(def_id);
+                let is_trait_item = match assoc_item.container {
+                    ty::TraitContainer => true,
+                    ty::ImplContainer => {
+                        // Trait impl items always inherit the impl's visibility --
+                        // we don't want to show `pub`.
+                        tcx.impl_trait_ref(tcx.parent(assoc_item.def_id)).is_some()
+                    }
+                };
+                if is_trait_item {
+                    return None;
+                }
+            }
+            _ => {}
+        }
+        let def_id = match self.inline_stmt_id {
+            Some(inlined) => inlined,
+            None => def_id,
+        };
+        Some(tcx.visibility(def_id))
+    }
 }
 
 #[derive(Clone, Debug)]
@@ -747,7 +792,7 @@ pub(crate) enum ItemKind {
     /// A required associated type in a trait declaration.
     ///
     /// The bounds may be non-empty if there is a `where` clause.
-    TyAssocTypeItem(Box<Generics>, Vec<GenericBound>),
+    TyAssocTypeItem(Generics, Vec<GenericBound>),
     /// An associated type in a trait impl or a provided one in a trait declaration.
     AssocTypeItem(Box<Typedef>, Vec<GenericBound>),
     /// An item that has been stripped by a rustdoc pass
@@ -1414,8 +1459,8 @@ impl GenericParamDef {
 // maybe use a Generic enum and use Vec<Generic>?
 #[derive(Clone, Debug, Default)]
 pub(crate) struct Generics {
-    pub(crate) params: Vec<GenericParamDef>,
-    pub(crate) where_predicates: Vec<WherePredicate>,
+    pub(crate) params: ThinVec<GenericParamDef>,
+    pub(crate) where_predicates: ThinVec<WherePredicate>,
 }
 
 impl Generics {
@@ -2030,24 +2075,6 @@ impl From<hir::PrimTy> for PrimitiveType {
     }
 }
 
-#[derive(Copy, Clone, Debug)]
-pub(crate) enum Visibility {
-    /// `pub`
-    Public,
-    /// Visibility inherited from parent.
-    ///
-    /// For example, this is the visibility of private items and of enum variants.
-    Inherited,
-    /// `pub(crate)`, `pub(super)`, or `pub(in path::to::somewhere)`
-    Restricted(DefId),
-}
-
-impl Visibility {
-    pub(crate) fn is_public(&self) -> bool {
-        matches!(self, Visibility::Public)
-    }
-}
-
 #[derive(Clone, Debug)]
 pub(crate) struct Struct {
     pub(crate) struct_type: CtorKind,
@@ -2546,6 +2573,7 @@ mod size_asserts {
     static_assert_size!(GenericArg, 48);
     static_assert_size!(GenericArgs, 32);
     static_assert_size!(GenericParamDef, 56);
+    static_assert_size!(Generics, 16);
     static_assert_size!(Item, 56);
     static_assert_size!(ItemKind, 88);
     static_assert_size!(PathSegment, 40);
diff --git a/src/librustdoc/clean/utils.rs b/src/librustdoc/clean/utils.rs
index 4572a712258..df20dc3fc3f 100644
--- a/src/librustdoc/clean/utils.rs
+++ b/src/librustdoc/clean/utils.rs
@@ -4,11 +4,10 @@ use crate::clean::render_macro_matchers::render_macro_matcher;
 use crate::clean::{
     clean_doc_module, clean_middle_const, clean_middle_region, clean_middle_ty, inline, Crate,
     ExternalCrate, Generic, GenericArg, GenericArgs, ImportSource, Item, ItemKind, Lifetime, Path,
-    PathSegment, Primitive, PrimitiveType, Type, TypeBinding, Visibility,
+    PathSegment, Primitive, PrimitiveType, Type, TypeBinding,
 };
 use crate::core::DocContext;
-use crate::formats::item_type::ItemType;
-use crate::visit_lib::LibEmbargoVisitor;
+use crate::html::format::visibility_to_src_with_space;
 
 use rustc_ast as ast;
 use rustc_ast::tokenstream::TokenTree;
@@ -32,7 +31,7 @@ pub(crate) fn krate(cx: &mut DocContext<'_>) -> Crate {
 
     for &cnum in cx.tcx.crates(()) {
         // Analyze doc-reachability for extern items
-        LibEmbargoVisitor::new(cx).visit_lib(cnum);
+        crate::visit_lib::lib_embargo_visit_item(cx, cnum.as_def_id());
     }
 
     // Clean the crate, translating the entire librustc_ast AST to one that is
@@ -504,9 +503,6 @@ pub(crate) fn register_res(cx: &mut DocContext<'_>, res: Res) -> DefId {
         return did;
     }
     inline::record_extern_fqn(cx, did, kind);
-    if let ItemType::Trait = kind {
-        inline::record_extern_trait(cx, did);
-    }
     did
 }
 
@@ -588,7 +584,7 @@ pub(super) fn display_macro_source(
     name: Symbol,
     def: &ast::MacroDef,
     def_id: DefId,
-    vis: Visibility,
+    vis: ty::Visibility<DefId>,
 ) -> String {
     let tts: Vec<_> = def.body.inner_tokens().into_trees().collect();
     // Extract the spans of all matchers. They represent the "interface" of the macro.
@@ -600,14 +596,14 @@ pub(super) fn display_macro_source(
         if matchers.len() <= 1 {
             format!(
                 "{}macro {}{} {{\n    ...\n}}",
-                vis.to_src_with_space(cx.tcx, def_id),
+                visibility_to_src_with_space(Some(vis), cx.tcx, def_id),
                 name,
                 matchers.map(|matcher| render_macro_matcher(cx.tcx, matcher)).collect::<String>(),
             )
         } else {
             format!(
                 "{}macro {} {{\n{}}}",
-                vis.to_src_with_space(cx.tcx, def_id),
+                visibility_to_src_with_space(Some(vis), cx.tcx, def_id),
                 name,
                 render_macro_arms(cx.tcx, matchers, ","),
             )
diff --git a/src/librustdoc/core.rs b/src/librustdoc/core.rs
index 3e5f42b7a80..893249e88cf 100644
--- a/src/librustdoc/core.rs
+++ b/src/librustdoc/core.rs
@@ -166,6 +166,7 @@ pub(crate) fn new_handler(
                     unstable_opts.teach,
                     diagnostic_width,
                     false,
+                    unstable_opts.track_diagnostics,
                 )
                 .ui_testing(unstable_opts.ui_testing),
             )
@@ -184,6 +185,7 @@ pub(crate) fn new_handler(
                     json_rendered,
                     diagnostic_width,
                     false,
+                    unstable_opts.track_diagnostics,
                 )
                 .ui_testing(unstable_opts.ui_testing),
             )
@@ -348,7 +350,6 @@ pub(crate) fn run_global_ctxt(
 
     let auto_traits =
         tcx.all_traits().filter(|&trait_def_id| tcx.trait_is_auto(trait_def_id)).collect();
-    let effective_visibilities = tcx.effective_visibilities(()).map_id(Into::into);
 
     let mut ctxt = DocContext {
         tcx,
@@ -361,7 +362,7 @@ pub(crate) fn run_global_ctxt(
         impl_trait_bounds: Default::default(),
         generated_synthetics: Default::default(),
         auto_traits,
-        cache: Cache::new(effective_visibilities, render_options.document_private),
+        cache: Cache::new(render_options.document_private),
         inlined: FxHashSet::default(),
         output_format,
         render_options,
diff --git a/src/librustdoc/doctest.rs b/src/librustdoc/doctest.rs
index db70029f6ec..7cbe2f1e227 100644
--- a/src/librustdoc/doctest.rs
+++ b/src/librustdoc/doctest.rs
@@ -551,6 +551,7 @@ pub(crate) fn make_test(
                 false,
                 Some(80),
                 false,
+                false,
             )
             .supports_color();
 
@@ -564,6 +565,7 @@ pub(crate) fn make_test(
                 false,
                 None,
                 false,
+                false,
             );
 
             // FIXME(misdreavus): pass `-Z treat-err-as-bug` to the doctest parser
@@ -748,6 +750,7 @@ fn check_if_attr_is_complete(source: &str, edition: Edition) -> bool {
                 false,
                 None,
                 false,
+                false,
             );
 
             let handler = Handler::with_emitter(false, None, Box::new(emitter));
diff --git a/src/librustdoc/formats/cache.rs b/src/librustdoc/formats/cache.rs
index afe2264e8bf..d027fb6e876 100644
--- a/src/librustdoc/formats/cache.rs
+++ b/src/librustdoc/formats/cache.rs
@@ -2,7 +2,6 @@ use std::mem;
 
 use rustc_data_structures::fx::{FxHashMap, FxHashSet};
 use rustc_hir::def_id::{CrateNum, DefId};
-use rustc_middle::middle::privacy::EffectiveVisibilities;
 use rustc_middle::ty::{self, TyCtxt};
 use rustc_span::Symbol;
 
@@ -15,6 +14,7 @@ use crate::html::format::join_with_double_colon;
 use crate::html::markdown::short_markdown_summary;
 use crate::html::render::search_index::get_function_type_for_search;
 use crate::html::render::IndexItem;
+use crate::visit_lib::RustdocEffectiveVisibilities;
 
 /// This cache is used to store information about the [`clean::Crate`] being
 /// rendered in order to provide more useful documentation. This contains
@@ -78,7 +78,7 @@ pub(crate) struct Cache {
     // Note that external items for which `doc(hidden)` applies to are shown as
     // non-reachable while local items aren't. This is because we're reusing
     // the effective visibilities from the privacy check pass.
-    pub(crate) effective_visibilities: EffectiveVisibilities<DefId>,
+    pub(crate) effective_visibilities: RustdocEffectiveVisibilities,
 
     /// The version of the crate being documented, if given from the `--crate-version` flag.
     pub(crate) crate_version: Option<String>,
@@ -132,11 +132,8 @@ struct CacheBuilder<'a, 'tcx> {
 }
 
 impl Cache {
-    pub(crate) fn new(
-        effective_visibilities: EffectiveVisibilities<DefId>,
-        document_private: bool,
-    ) -> Self {
-        Cache { effective_visibilities, document_private, ..Cache::default() }
+    pub(crate) fn new(document_private: bool) -> Self {
+        Cache { document_private, ..Cache::default() }
     }
 
     /// Populates the `Cache` with more data. The returned `Crate` will be missing some data that was
@@ -319,21 +316,28 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
                         let desc = item.doc_value().map_or_else(String::new, |x| {
                             short_markdown_summary(x.as_str(), &item.link_names(self.cache))
                         });
-                        self.cache.search_index.push(IndexItem {
-                            ty: item.type_(),
-                            name: s.to_string(),
-                            path: join_with_double_colon(path),
-                            desc,
-                            parent,
-                            parent_idx: None,
-                            search_type: get_function_type_for_search(
-                                &item,
-                                self.tcx,
-                                clean_impl_generics(self.cache.parent_stack.last()).as_ref(),
-                                self.cache,
-                            ),
-                            aliases: item.attrs.get_doc_aliases(),
-                        });
+                        let ty = item.type_();
+                        let name = s.to_string();
+                        if ty != ItemType::StructField || u16::from_str_radix(&name, 10).is_err() {
+                            // In case this is a field from a tuple struct, we don't add it into
+                            // the search index because its name is something like "0", which is
+                            // not useful for rustdoc search.
+                            self.cache.search_index.push(IndexItem {
+                                ty,
+                                name,
+                                path: join_with_double_colon(path),
+                                desc,
+                                parent,
+                                parent_idx: None,
+                                search_type: get_function_type_for_search(
+                                    &item,
+                                    self.tcx,
+                                    clean_impl_generics(self.cache.parent_stack.last()).as_ref(),
+                                    self.cache,
+                                ),
+                                aliases: item.attrs.get_doc_aliases(),
+                            });
+                        }
                     }
                 }
                 (Some(parent), None) if is_inherent_impl_item => {
@@ -387,7 +391,7 @@ impl<'a, 'tcx> DocFolder for CacheBuilder<'a, 'tcx> {
                         || self
                             .cache
                             .effective_visibilities
-                            .is_directly_public(item.item_id.expect_def_id())
+                            .is_directly_public(self.tcx, item.item_id.expect_def_id())
                     {
                         self.cache.paths.insert(
                             item.item_id.expect_def_id(),
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index 92e7f2739af..06db3fb0ec4 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -659,7 +659,7 @@ pub(crate) fn href_with_root_path(
     }
 
     if !did.is_local()
-        && !cache.effective_visibilities.is_directly_public(did)
+        && !cache.effective_visibilities.is_directly_public(tcx, did)
         && !cache.document_private
         && !cache.primitive_locations.values().any(|&id| id == did)
     {
@@ -1420,87 +1420,84 @@ impl clean::FnDecl {
     }
 }
 
-impl clean::Visibility {
-    pub(crate) fn print_with_space<'a, 'tcx: 'a>(
-        self,
-        item_did: ItemId,
-        cx: &'a Context<'tcx>,
-    ) -> impl fmt::Display + 'a + Captures<'tcx> {
-        use std::fmt::Write as _;
-
-        let to_print: Cow<'static, str> = match self {
-            clean::Public => "pub ".into(),
-            clean::Inherited => "".into(),
-            clean::Visibility::Restricted(vis_did) => {
-                // FIXME(camelid): This may not work correctly if `item_did` is a module.
-                //                 However, rustdoc currently never displays a module's
-                //                 visibility, so it shouldn't matter.
-                let parent_module = find_nearest_parent_module(cx.tcx(), item_did.expect_def_id());
-
-                if vis_did.is_crate_root() {
-                    "pub(crate) ".into()
-                } else if parent_module == Some(vis_did) {
-                    // `pub(in foo)` where `foo` is the parent module
-                    // is the same as no visibility modifier
-                    "".into()
-                } else if parent_module
-                    .and_then(|parent| find_nearest_parent_module(cx.tcx(), parent))
-                    == Some(vis_did)
-                {
-                    "pub(super) ".into()
-                } else {
-                    let path = cx.tcx().def_path(vis_did);
-                    debug!("path={:?}", path);
-                    // modified from `resolved_path()` to work with `DefPathData`
-                    let last_name = path.data.last().unwrap().data.get_opt_name().unwrap();
-                    let anchor = anchor(vis_did, last_name, cx).to_string();
-
-                    let mut s = "pub(in ".to_owned();
-                    for seg in &path.data[..path.data.len() - 1] {
-                        let _ = write!(s, "{}::", seg.data.get_opt_name().unwrap());
-                    }
-                    let _ = write!(s, "{}) ", anchor);
-                    s.into()
+pub(crate) fn visibility_print_with_space<'a, 'tcx: 'a>(
+    visibility: Option<ty::Visibility<DefId>>,
+    item_did: ItemId,
+    cx: &'a Context<'tcx>,
+) -> impl fmt::Display + 'a + Captures<'tcx> {
+    use std::fmt::Write as _;
+
+    let to_print: Cow<'static, str> = match visibility {
+        None => "".into(),
+        Some(ty::Visibility::Public) => "pub ".into(),
+        Some(ty::Visibility::Restricted(vis_did)) => {
+            // FIXME(camelid): This may not work correctly if `item_did` is a module.
+            //                 However, rustdoc currently never displays a module's
+            //                 visibility, so it shouldn't matter.
+            let parent_module = find_nearest_parent_module(cx.tcx(), item_did.expect_def_id());
+
+            if vis_did.is_crate_root() {
+                "pub(crate) ".into()
+            } else if parent_module == Some(vis_did) {
+                // `pub(in foo)` where `foo` is the parent module
+                // is the same as no visibility modifier
+                "".into()
+            } else if parent_module.and_then(|parent| find_nearest_parent_module(cx.tcx(), parent))
+                == Some(vis_did)
+            {
+                "pub(super) ".into()
+            } else {
+                let path = cx.tcx().def_path(vis_did);
+                debug!("path={:?}", path);
+                // modified from `resolved_path()` to work with `DefPathData`
+                let last_name = path.data.last().unwrap().data.get_opt_name().unwrap();
+                let anchor = anchor(vis_did, last_name, cx).to_string();
+
+                let mut s = "pub(in ".to_owned();
+                for seg in &path.data[..path.data.len() - 1] {
+                    let _ = write!(s, "{}::", seg.data.get_opt_name().unwrap());
                 }
+                let _ = write!(s, "{}) ", anchor);
+                s.into()
             }
-        };
-        display_fn(move |f| write!(f, "{}", to_print))
-    }
+        }
+    };
+    display_fn(move |f| write!(f, "{}", to_print))
+}
 
-    /// This function is the same as print_with_space, except that it renders no links.
-    /// It's used for macros' rendered source view, which is syntax highlighted and cannot have
-    /// any HTML in it.
-    pub(crate) fn to_src_with_space<'a, 'tcx: 'a>(
-        self,
-        tcx: TyCtxt<'tcx>,
-        item_did: DefId,
-    ) -> impl fmt::Display + 'a + Captures<'tcx> {
-        let to_print = match self {
-            clean::Public => "pub ".to_owned(),
-            clean::Inherited => String::new(),
-            clean::Visibility::Restricted(vis_did) => {
-                // FIXME(camelid): This may not work correctly if `item_did` is a module.
-                //                 However, rustdoc currently never displays a module's
-                //                 visibility, so it shouldn't matter.
-                let parent_module = find_nearest_parent_module(tcx, item_did);
-
-                if vis_did.is_crate_root() {
-                    "pub(crate) ".to_owned()
-                } else if parent_module == Some(vis_did) {
-                    // `pub(in foo)` where `foo` is the parent module
-                    // is the same as no visibility modifier
-                    String::new()
-                } else if parent_module.and_then(|parent| find_nearest_parent_module(tcx, parent))
-                    == Some(vis_did)
-                {
-                    "pub(super) ".to_owned()
-                } else {
-                    format!("pub(in {}) ", tcx.def_path_str(vis_did))
-                }
+/// This function is the same as print_with_space, except that it renders no links.
+/// It's used for macros' rendered source view, which is syntax highlighted and cannot have
+/// any HTML in it.
+pub(crate) fn visibility_to_src_with_space<'a, 'tcx: 'a>(
+    visibility: Option<ty::Visibility<DefId>>,
+    tcx: TyCtxt<'tcx>,
+    item_did: DefId,
+) -> impl fmt::Display + 'a + Captures<'tcx> {
+    let to_print = match visibility {
+        None => String::new(),
+        Some(ty::Visibility::Public) => "pub ".to_owned(),
+        Some(ty::Visibility::Restricted(vis_did)) => {
+            // FIXME(camelid): This may not work correctly if `item_did` is a module.
+            //                 However, rustdoc currently never displays a module's
+            //                 visibility, so it shouldn't matter.
+            let parent_module = find_nearest_parent_module(tcx, item_did);
+
+            if vis_did.is_crate_root() {
+                "pub(crate) ".to_owned()
+            } else if parent_module == Some(vis_did) {
+                // `pub(in foo)` where `foo` is the parent module
+                // is the same as no visibility modifier
+                String::new()
+            } else if parent_module.and_then(|parent| find_nearest_parent_module(tcx, parent))
+                == Some(vis_did)
+            {
+                "pub(super) ".to_owned()
+            } else {
+                format!("pub(in {}) ", tcx.def_path_str(vis_did))
             }
-        };
-        display_fn(move |f| f.write_str(&to_print))
-    }
+        }
+    };
+    display_fn(move |f| f.write_str(&to_print))
 }
 
 pub(crate) trait PrintWithSpace {
diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs
index 28136cc48d6..cd8c8c463b1 100644
--- a/src/librustdoc/html/highlight.rs
+++ b/src/librustdoc/html/highlight.rs
@@ -362,7 +362,7 @@ impl Class {
         match self {
             Class::Comment => "comment",
             Class::DocComment => "doccomment",
-            Class::Attribute => "attribute",
+            Class::Attribute => "attr",
             Class::KeyWord => "kw",
             Class::RefKeyWord => "kw-2",
             Class::Self_(_) => "self",
diff --git a/src/librustdoc/html/highlight/fixtures/sample.html b/src/librustdoc/html/highlight/fixtures/sample.html
index 4a5a3cf609c..fced2eacd9e 100644
--- a/src/librustdoc/html/highlight/fixtures/sample.html
+++ b/src/librustdoc/html/highlight/fixtures/sample.html
@@ -3,16 +3,16 @@
 .kw { color: #8959A8; }
 .kw-2, .prelude-ty { color: #4271AE; }
 .number, .string { color: #718C00; }
-.self, .bool-val, .prelude-val, .attribute, .attribute .ident { color: #C82829; }
+.self, .bool-val, .prelude-val, .attr, .attr .ident { color: #C82829; }
 .macro, .macro-nonterminal { color: #3E999F; }
 .lifetime { color: #B76514; }
 .question-mark { color: #ff9011; }
 </style>
-<pre><code><span class="attribute">#![crate_type = <span class="string">&quot;lib&quot;</span>]
+<pre><code><span class="attr">#![crate_type = <span class="string">&quot;lib&quot;</span>]
 
 </span><span class="kw">use </span>std::path::{Path, PathBuf};
 
-<span class="attribute">#[cfg(target_os = <span class="string">&quot;linux&quot;</span>)]
+<span class="attr">#[cfg(target_os = <span class="string">&quot;linux&quot;</span>)]
 #[cfg(target_os = <span class="string">&quot;windows&quot;</span>)]
 </span><span class="kw">fn </span>main() -&gt; () {
     <span class="kw">let </span>foo = <span class="bool-val">true </span>&amp;&amp; <span class="bool-val">false </span>|| <span class="bool-val">true</span>;
@@ -23,7 +23,7 @@
     <span class="macro">mac!</span>(foo, <span class="kw-2">&amp;mut </span>bar);
     <span class="macro">assert!</span>(<span class="self">self</span>.length &lt; N &amp;&amp; index &lt;= <span class="self">self</span>.length);
     ::std::env::var(<span class="string">&quot;gateau&quot;</span>).is_ok();
-    <span class="attribute">#[rustfmt::skip]
+    <span class="attr">#[rustfmt::skip]
     </span><span class="kw">let </span>s:std::path::PathBuf = std::path::PathBuf::new();
     <span class="kw">let </span><span class="kw-2">mut </span>s = String::new();
 
diff --git a/src/librustdoc/html/highlight/tests.rs b/src/librustdoc/html/highlight/tests.rs
index a5e633df434..2c93b9a097f 100644
--- a/src/librustdoc/html/highlight/tests.rs
+++ b/src/librustdoc/html/highlight/tests.rs
@@ -9,7 +9,7 @@ const STYLE: &str = r#"
 .kw { color: #8959A8; }
 .kw-2, .prelude-ty { color: #4271AE; }
 .number, .string { color: #718C00; }
-.self, .bool-val, .prelude-val, .attribute, .attribute .ident { color: #C82829; }
+.self, .bool-val, .prelude-val, .attr, .attr .ident { color: #C82829; }
 .macro, .macro-nonterminal { color: #3E999F; }
 .lifetime { color: #B76514; }
 .question-mark { color: #ff9011; }
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs
index 27dea8ec0b3..3a041ae15d6 100644
--- a/src/librustdoc/html/render/mod.rs
+++ b/src/librustdoc/html/render/mod.rs
@@ -70,8 +70,8 @@ use crate::formats::{AssocItemRender, Impl, RenderMode};
 use crate::html::escape::Escape;
 use crate::html::format::{
     href, join_with_double_colon, print_abi_with_space, print_constness_with_space,
-    print_default_space, print_generic_bounds, print_where_clause, Buffer, Ending, HrefError,
-    PrintWithSpace,
+    print_default_space, print_generic_bounds, print_where_clause, visibility_print_with_space,
+    Buffer, Ending, HrefError, PrintWithSpace,
 };
 use crate::html::highlight;
 use crate::html::markdown::{
@@ -747,11 +747,12 @@ fn assoc_const(
     extra: &str,
     cx: &Context<'_>,
 ) {
+    let tcx = cx.tcx();
     write!(
         w,
         "{extra}{vis}const <a{href} class=\"constant\">{name}</a>: {ty}",
         extra = extra,
-        vis = it.visibility.print_with_space(it.item_id, cx),
+        vis = visibility_print_with_space(it.visibility(tcx), it.item_id, cx),
         href = assoc_href_attr(it, link, cx),
         name = it.name.as_ref().unwrap(),
         ty = ty.print(cx),
@@ -764,7 +765,7 @@ fn assoc_const(
         //        This hurts readability in this context especially when more complex expressions
         //        are involved and it doesn't add much of value.
         //        Find a way to print constants here without all that jazz.
-        write!(w, "{}", Escape(&default.value(cx.tcx()).unwrap_or_else(|| default.expr(cx.tcx()))));
+        write!(w, "{}", Escape(&default.value(tcx).unwrap_or_else(|| default.expr(tcx))));
     }
 }
 
@@ -805,14 +806,15 @@ fn assoc_method(
     cx: &Context<'_>,
     render_mode: RenderMode,
 ) {
-    let header = meth.fn_header(cx.tcx()).expect("Trying to get header from a non-function item");
+    let tcx = cx.tcx();
+    let header = meth.fn_header(tcx).expect("Trying to get header from a non-function item");
     let name = meth.name.as_ref().unwrap();
-    let vis = meth.visibility.print_with_space(meth.item_id, cx).to_string();
+    let vis = visibility_print_with_space(meth.visibility(tcx), meth.item_id, cx).to_string();
     // FIXME: Once https://github.com/rust-lang/rust/issues/67792 is implemented, we can remove
     // this condition.
     let constness = match render_mode {
         RenderMode::Normal => {
-            print_constness_with_space(&header.constness, meth.const_stability(cx.tcx()))
+            print_constness_with_space(&header.constness, meth.const_stability(tcx))
         }
         RenderMode::ForDeref { .. } => "",
     };
diff --git a/src/librustdoc/html/render/print_item.rs b/src/librustdoc/html/render/print_item.rs
index 6327817364a..3225ddabe2e 100644
--- a/src/librustdoc/html/render/print_item.rs
+++ b/src/librustdoc/html/render/print_item.rs
@@ -7,7 +7,7 @@ use rustc_hir::def_id::DefId;
 use rustc_middle::middle::stability;
 use rustc_middle::span_bug;
 use rustc_middle::ty::layout::LayoutError;
-use rustc_middle::ty::{Adt, TyCtxt};
+use rustc_middle::ty::{self, Adt, TyCtxt};
 use rustc_span::hygiene::MacroKind;
 use rustc_span::symbol::{kw, sym, Symbol};
 use rustc_target::abi::{Layout, Primitive, TagEncoding, Variants};
@@ -28,7 +28,7 @@ use crate::formats::{AssocItemRender, Impl, RenderMode};
 use crate::html::escape::Escape;
 use crate::html::format::{
     join_with_double_colon, print_abi_with_space, print_constness_with_space, print_where_clause,
-    Buffer, Ending, PrintWithSpace,
+    visibility_print_with_space, Buffer, Ending, PrintWithSpace,
 };
 use crate::html::highlight;
 use crate::html::layout::Page;
@@ -318,6 +318,7 @@ fn item_module(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Item, items:
             );
         }
 
+        let tcx = cx.tcx();
         match *myitem.kind {
             clean::ExternCrateItem { ref src } => {
                 use crate::html::format::anchor;
@@ -327,14 +328,14 @@ fn item_module(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Item, items:
                     Some(src) => write!(
                         w,
                         "<div class=\"item-left\"><code>{}extern crate {} as {};",
-                        myitem.visibility.print_with_space(myitem.item_id, cx),
+                        visibility_print_with_space(myitem.visibility(tcx), myitem.item_id, cx),
                         anchor(myitem.item_id.expect_def_id(), src, cx),
                         myitem.name.unwrap(),
                     ),
                     None => write!(
                         w,
                         "<div class=\"item-left\"><code>{}extern crate {};",
-                        myitem.visibility.print_with_space(myitem.item_id, cx),
+                        visibility_print_with_space(myitem.visibility(tcx), myitem.item_id, cx),
                         anchor(myitem.item_id.expect_def_id(), myitem.name.unwrap(), cx),
                     ),
                 }
@@ -384,7 +385,7 @@ fn item_module(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Item, items:
                      </div>\
                      {stab_tags_before}{stab_tags}{stab_tags_after}",
                     stab = stab.unwrap_or_default(),
-                    vis = myitem.visibility.print_with_space(myitem.item_id, cx),
+                    vis = visibility_print_with_space(myitem.visibility(tcx), myitem.item_id, cx),
                     imp = import.print(cx),
                 );
                 w.write_str(ITEM_TABLE_ROW_CLOSE);
@@ -408,8 +409,8 @@ fn item_module(w: &mut Buffer, cx: &mut Context<'_>, item: &clean::Item, items:
                 let stab = myitem.stability_class(cx.tcx());
                 let add = if stab.is_some() { " " } else { "" };
 
-                let visibility_emoji = match myitem.visibility {
-                    clean::Visibility::Restricted(_) => {
+                let visibility_emoji = match myitem.visibility(tcx) {
+                    Some(ty::Visibility::Restricted(_)) => {
                         "<span title=\"Restricted Visibility\">&nbsp;🔒</span> "
                     }
                     _ => "",
@@ -496,12 +497,13 @@ fn extra_info_tags(item: &clean::Item, parent: &clean::Item, tcx: TyCtxt<'_>) ->
 }
 
 fn item_function(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, f: &clean::Function) {
-    let header = it.fn_header(cx.tcx()).expect("printing a function which isn't a function");
-    let constness = print_constness_with_space(&header.constness, it.const_stability(cx.tcx()));
+    let tcx = cx.tcx();
+    let header = it.fn_header(tcx).expect("printing a function which isn't a function");
+    let constness = print_constness_with_space(&header.constness, it.const_stability(tcx));
     let unsafety = header.unsafety.print_with_space();
     let abi = print_abi_with_space(header.abi).to_string();
     let asyncness = header.asyncness.print_with_space();
-    let visibility = it.visibility.print_with_space(it.item_id, cx).to_string();
+    let visibility = visibility_print_with_space(it.visibility(tcx), it.item_id, cx).to_string();
     let name = it.name.unwrap();
 
     let generics_len = format!("{:#}", f.generics.print(cx)).len();
@@ -539,6 +541,7 @@ fn item_function(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, f: &cle
 }
 
 fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean::Trait) {
+    let tcx = cx.tcx();
     let bounds = bounds(&t.bounds, false, cx);
     let required_types = t.items.iter().filter(|m| m.is_ty_associated_type()).collect::<Vec<_>>();
     let provided_types = t.items.iter().filter(|m| m.is_associated_type()).collect::<Vec<_>>();
@@ -549,8 +552,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
     let count_types = required_types.len() + provided_types.len();
     let count_consts = required_consts.len() + provided_consts.len();
     let count_methods = required_methods.len() + provided_methods.len();
-    let must_implement_one_of_functions =
-        cx.tcx().trait_def(t.def_id).must_implement_one_of.clone();
+    let must_implement_one_of_functions = tcx.trait_def(t.def_id).must_implement_one_of.clone();
 
     // Output the trait definition
     wrap_into_item_decl(w, |w| {
@@ -559,9 +561,9 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
             write!(
                 w,
                 "{}{}{}trait {}{}{}",
-                it.visibility.print_with_space(it.item_id, cx),
-                t.unsafety(cx.tcx()).print_with_space(),
-                if t.is_auto(cx.tcx()) { "auto " } else { "" },
+                visibility_print_with_space(it.visibility(tcx), it.item_id, cx),
+                t.unsafety(tcx).print_with_space(),
+                if t.is_auto(tcx) { "auto " } else { "" },
                 it.name.unwrap(),
                 t.generics.print(cx),
                 bounds
@@ -1020,7 +1022,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
     }
     let extern_crates = extern_crates
         .into_iter()
-        .map(|cnum| cx.shared.tcx.crate_name(cnum).to_string())
+        .map(|cnum| tcx.crate_name(cnum).to_string())
         .collect::<Vec<_>>()
         .join(",");
     let (extern_before, extern_after) =
@@ -1084,7 +1086,7 @@ fn item_typedef(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clea
     fn write_content(w: &mut Buffer, cx: &Context<'_>, it: &clean::Item, t: &clean::Typedef) {
         wrap_item(w, "typedef", |w| {
             render_attributes_in_pre(w, it, "");
-            write!(w, "{}", it.visibility.print_with_space(it.item_id, cx));
+            write!(w, "{}", visibility_print_with_space(it.visibility(cx.tcx()), it.item_id, cx));
             write!(
                 w,
                 "type {}{}{where_clause} = {type_};",
@@ -1173,6 +1175,7 @@ fn print_tuple_struct_fields(w: &mut Buffer, cx: &Context<'_>, s: &[clean::Item]
 }
 
 fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::Enum) {
+    let tcx = cx.tcx();
     let count_variants = e.variants().count();
     wrap_into_item_decl(w, |w| {
         wrap_item(w, "enum", |w| {
@@ -1180,7 +1183,7 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
             write!(
                 w,
                 "{}enum {}{}",
-                it.visibility.print_with_space(it.item_id, cx),
+                visibility_print_with_space(it.visibility(tcx), it.item_id, cx),
                 it.name.unwrap(),
                 e.generics.print(cx),
             );
@@ -1268,10 +1271,10 @@ fn item_enum(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, e: &clean::
             w.write_str("</code>");
             render_stability_since_raw(
                 w,
-                variant.stable_since(cx.tcx()),
-                variant.const_stability(cx.tcx()),
-                it.stable_since(cx.tcx()),
-                it.const_stable_since(cx.tcx()),
+                variant.stable_since(tcx),
+                variant.const_stability(tcx),
+                it.stable_since(tcx),
+                it.const_stable_since(tcx),
             );
             w.write_str("</h3>");
 
@@ -1389,12 +1392,13 @@ fn item_primitive(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item) {
 fn item_constant(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, c: &clean::Constant) {
     wrap_into_item_decl(w, |w| {
         wrap_item(w, "const", |w| {
+            let tcx = cx.tcx();
             render_attributes_in_code(w, it);
 
             write!(
                 w,
                 "{vis}const {name}: {typ}",
-                vis = it.visibility.print_with_space(it.item_id, cx),
+                vis = visibility_print_with_space(it.visibility(tcx), it.item_id, cx),
                 name = it.name.unwrap(),
                 typ = c.type_.print(cx),
             );
@@ -1408,9 +1412,9 @@ fn item_constant(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, c: &cle
             //            ` = 100i32;`
             //        instead?
 
-            let value = c.value(cx.tcx());
-            let is_literal = c.is_literal(cx.tcx());
-            let expr = c.expr(cx.tcx());
+            let value = c.value(tcx);
+            let is_literal = c.is_literal(tcx);
+            let expr = c.expr(tcx);
             if value.is_some() || is_literal {
                 write!(w, " = {expr};", expr = Escape(&expr));
             } else {
@@ -1495,7 +1499,7 @@ fn item_static(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, s: &clean
             write!(
                 w,
                 "{vis}static {mutability}{name}: {typ}",
-                vis = it.visibility.print_with_space(it.item_id, cx),
+                vis = visibility_print_with_space(it.visibility(cx.tcx()), it.item_id, cx),
                 mutability = s.mutability.print_with_space(),
                 name = it.name.unwrap(),
                 typ = s.type_.print(cx)
@@ -1513,7 +1517,7 @@ fn item_foreign_type(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item) {
             write!(
                 w,
                 "    {}type {};\n}}",
-                it.visibility.print_with_space(it.item_id, cx),
+                visibility_print_with_space(it.visibility(cx.tcx()), it.item_id, cx),
                 it.name.unwrap(),
             );
         });
@@ -1666,7 +1670,13 @@ fn render_union(
     tab: &str,
     cx: &Context<'_>,
 ) {
-    write!(w, "{}union {}", it.visibility.print_with_space(it.item_id, cx), it.name.unwrap(),);
+    let tcx = cx.tcx();
+    write!(
+        w,
+        "{}union {}",
+        visibility_print_with_space(it.visibility(tcx), it.item_id, cx),
+        it.name.unwrap(),
+    );
 
     let where_displayed = g
         .map(|g| {
@@ -1693,7 +1703,7 @@ fn render_union(
             write!(
                 w,
                 "    {}{}: {},\n{}",
-                field.visibility.print_with_space(field.item_id, cx),
+                visibility_print_with_space(field.visibility(tcx), field.item_id, cx),
                 field.name.unwrap(),
                 ty.print(cx),
                 tab
@@ -1720,10 +1730,11 @@ fn render_struct(
     structhead: bool,
     cx: &Context<'_>,
 ) {
+    let tcx = cx.tcx();
     write!(
         w,
         "{}{}{}",
-        it.visibility.print_with_space(it.item_id, cx),
+        visibility_print_with_space(it.visibility(tcx), it.item_id, cx),
         if structhead { "struct " } else { "" },
         it.name.unwrap()
     );
@@ -1753,7 +1764,7 @@ fn render_struct(
                         w,
                         "\n{}    {}{}: {},",
                         tab,
-                        field.visibility.print_with_space(field.item_id, cx),
+                        visibility_print_with_space(field.visibility(tcx), field.item_id, cx),
                         field.name.unwrap(),
                         ty.print(cx),
                     );
@@ -1785,7 +1796,7 @@ fn render_struct(
                         write!(
                             w,
                             "{}{}",
-                            field.visibility.print_with_space(field.item_id, cx),
+                            visibility_print_with_space(field.visibility(tcx), field.item_id, cx),
                             ty.print(cx),
                         )
                     }
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 330bdb45465..7c0dab1c527 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -163,9 +163,6 @@ h1.fqn {
 	padding-bottom: 6px;
 	margin-bottom: 15px;
 }
-#toggle-all-docs {
-	text-decoration: none;
-}
 /* The only headings that get underlines are:
 	 Markdown-generated headings within the top-doc
 	 Rustdoc-generated h2 section headings (e.g. "Implementations", "Required Methods", etc)
@@ -209,7 +206,7 @@ ul.all-items {
 	font-family: "Fira Sans", Arial, NanumBarunGothic, sans-serif;
 }
 
-a#toggle-all-docs,
+#toggle-all-docs,
 a.anchor,
 .small-section-header a,
 #source-sidebar a,
@@ -299,6 +296,16 @@ button {
 	padding: 1px 6px;
 }
 
+button#toggle-all-docs {
+	padding: 0;
+	background: none;
+	border: none;
+	cursor: pointer;
+	/* iOS button gradient: https://stackoverflow.com/q/5438567 */
+	-webkit-appearance: none;
+	opacity: 1;
+}
+
 /* end tweaks for normalize.css 8 */
 
 .rustdoc {
@@ -670,7 +677,6 @@ pre, .rustdoc.source .example-wrap {
 }
 
 #main-content > .item-info {
-	margin-top: 0;
 	margin-left: 0;
 }
 
@@ -869,40 +875,30 @@ so that we can apply CSS-filters to change the arrow color in themes */
 
 .search-results {
 	display: none;
-	padding-bottom: 2em;
 }
 
 .search-results.active {
 	display: block;
-	/* prevent overhanging tabs from moving the first result */
-	clear: both;
-}
-
-.search-results .desc > span {
-	white-space: nowrap;
-	text-overflow: ellipsis;
-	overflow: hidden;
-	display: block;
 }
 
 .search-results > a {
-	display: block;
+	display: flex;
 	/* A little margin ensures the browser's outlining of focused links has room to display. */
 	margin-left: 2px;
 	margin-right: 2px;
-	border-bottom: 1px solid #aaa3;
+	border-bottom: 1px solid var(--border-color);
+	gap: 1em;
 }
 
 .search-results > a > div {
-	display: flex;
-	flex-flow: row wrap;
+	flex: 1;
 }
 
-.search-results .result-name, .search-results div.desc {
-	width: 50%;
-}
-.search-results .result-name {
-	padding-right: 1em;
+.search-results > a > div.desc {
+	white-space: nowrap;
+	text-overflow: ellipsis;
+	overflow: hidden;
+	display: block;
 }
 
 .search-results a:hover,
@@ -1086,7 +1082,7 @@ pre.rust .bool-val {
 pre.rust .self {
 	color: var(--code-highlight-self-color);
 }
-pre.rust .attribute {
+pre.rust .attr {
 	color: var(--code-highlight-attribute-color);
 }
 pre.rust .macro,
@@ -1673,7 +1669,6 @@ in storage.js
 	}
 
 	.rustdoc {
-		padding-top: 0px;
 		/* Sidebar should overlay main content, rather than pushing main content to the right.
 		   Turn off `display: flex` on the body element. */
 		display: block;
@@ -1793,7 +1788,6 @@ in storage.js
 
 	.sidebar-elems {
 		margin-top: 1em;
-		background-color: var(--sidebar-background-color);
 	}
 
 	.content {
@@ -1866,26 +1860,16 @@ in storage.js
 	}
 
 	/* Display an alternating layout on tablets and phones */
-	.item-table {
+	.item-table, .item-row, .item-left, .item-right,
+	.search-results > a, .search-results > a > div {
 		display: block;
 	}
-	.item-row {
-		display: flex;
-		flex-flow: column wrap;
-	}
-	.item-left, .item-right {
-		width: 100%;
-	}
 
 	/* Display an alternating layout on tablets and phones */
 	.search-results > a {
-		border-bottom: 1px solid #aaa9;
 		padding: 5px 0px;
 	}
-	.search-results .result-name, .search-results div.desc {
-		width: 100%;
-	}
-	.search-results div.desc, .item-right {
+	.search-results > a > div.desc, .item-right {
 		padding-left: 2em;
 	}
 
@@ -1962,24 +1946,26 @@ in storage.js
 	}
 }
 
-.method-toggle > summary,
 .implementors-toggle > summary,
 .impl,
 #implementors-list > .docblock,
 .impl-items > section,
-.methods > section
+.impl-items > .rustdoc-toggle > summary,
+.methods > section,
+.methods > .rustdoc-toggle > summary
 {
 	margin-bottom: 0.75em;
 }
 
-.method-toggle[open]:not(:last-child),
+.impl-items > .rustdoc-toggle[open]:not(:last-child),
+.methods > .rustdoc-toggle[open]:not(:last-child),
 .implementors-toggle[open]:not(:last-child) {
 	margin-bottom: 2em;
 }
 
-#trait-implementations-list .method-toggle:not(:last-child),
-#synthetic-implementations-list .method-toggle:not(:last-child),
-#blanket-implementations-list .method-toggle:not(:last-child) {
+#trait-implementations-list .impl-items > .rustdoc-toggle:not(:last-child),
+#synthetic-implementations-list .impl-items > .rustdoc-toggle:not(:last-child),
+#blanket-implementations-list .impl-items > .rustdoc-toggle:not(:last-child) {
 	margin-bottom: 1em;
 }
 
diff --git a/src/librustdoc/html/static/js/search.js b/src/librustdoc/html/static/js/search.js
index d04ec357c40..dd0531c5e70 100644
--- a/src/librustdoc/html/static/js/search.js
+++ b/src/librustdoc/html/static/js/search.js
@@ -1593,7 +1593,6 @@ function initSearch(rawSearchIndex) {
                 link.className = "result-" + type;
                 link.href = item.href;
 
-                const wrapper = document.createElement("div");
                 const resultName = document.createElement("div");
                 resultName.className = "result-name";
 
@@ -1614,16 +1613,13 @@ function initSearch(rawSearchIndex) {
                 resultName.insertAdjacentHTML(
                     "beforeend",
                     item.displayPath + "<span class=\"" + type + "\">" + name + extra + "</span>");
-                wrapper.appendChild(resultName);
+                link.appendChild(resultName);
 
                 const description = document.createElement("div");
                 description.className = "desc";
-                const spanDesc = document.createElement("span");
-                spanDesc.insertAdjacentHTML("beforeend", item.desc);
+                description.insertAdjacentHTML("beforeend", item.desc);
 
-                description.appendChild(spanDesc);
-                wrapper.appendChild(description);
-                link.appendChild(wrapper);
+                link.appendChild(description);
                 output.appendChild(link);
             });
         } else if (query.error === null) {
diff --git a/src/librustdoc/html/templates/print_item.html b/src/librustdoc/html/templates/print_item.html
index b6ce3ea3dee..e497b619366 100644
--- a/src/librustdoc/html/templates/print_item.html
+++ b/src/librustdoc/html/templates/print_item.html
@@ -21,8 +21,8 @@
                 <a class="srclink" href="{{href|safe}}">source</a> · {# -#}
             {%- else -%}
         {%- endmatch -%}
-        <a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs"> {#- -#}
-            [<span class="inner">&#x2212;</span>] {#- -#}
-        </a> {#- -#}
+        <button id="toggle-all-docs" title="collapse all docs"> {#- -#}
+            [<span>&#x2212;</span>] {#- -#}
+        </button> {#- -#}
     </span> {#- -#}
 </div> {#- -#}
diff --git a/src/librustdoc/json/conversions.rs b/src/librustdoc/json/conversions.rs
index cdf59cdd328..cb8b7c18029 100644
--- a/src/librustdoc/json/conversions.rs
+++ b/src/librustdoc/json/conversions.rs
@@ -48,7 +48,8 @@ impl JsonRenderer<'_> {
             .map(rustc_ast_pretty::pprust::attribute_to_string)
             .collect();
         let span = item.span(self.tcx);
-        let clean::Item { name, attrs: _, kind: _, visibility, item_id, cfg: _ } = item;
+        let visibility = item.visibility(self.tcx);
+        let clean::Item { name, attrs: _, kind: _, item_id, cfg: _, .. } = item;
         let inner = match *item.kind {
             clean::KeywordItem => return None,
             clean::StrippedItem(ref inner) => {
@@ -99,13 +100,12 @@ impl JsonRenderer<'_> {
         }
     }
 
-    fn convert_visibility(&self, v: clean::Visibility) -> Visibility {
-        use clean::Visibility::*;
+    fn convert_visibility(&self, v: Option<ty::Visibility<DefId>>) -> Visibility {
         match v {
-            Public => Visibility::Public,
-            Inherited => Visibility::Default,
-            Restricted(did) if did.is_crate_root() => Visibility::Crate,
-            Restricted(did) => Visibility::Restricted {
+            None => Visibility::Default,
+            Some(ty::Visibility::Public) => Visibility::Public,
+            Some(ty::Visibility::Restricted(did)) if did.is_crate_root() => Visibility::Crate,
+            Some(ty::Visibility::Restricted(did)) => Visibility::Restricted {
                 parent: from_item_id(did.into(), self.tcx),
                 path: self.tcx.def_path(did).to_string_no_crate_verbose(),
             },
@@ -283,7 +283,7 @@ fn from_clean_item(item: clean::Item, tcx: TyCtxt<'_>) -> ItemEnum {
             ItemEnum::AssocConst { type_: ty.into_tcx(tcx), default: Some(default.expr(tcx)) }
         }
         TyAssocTypeItem(g, b) => ItemEnum::AssocType {
-            generics: (*g).into_tcx(tcx),
+            generics: g.into_tcx(tcx),
             bounds: b.into_tcx(tcx),
             default: None,
         },
diff --git a/src/librustdoc/passes/check_doc_test_visibility.rs b/src/librustdoc/passes/check_doc_test_visibility.rs
index 7740c6d5bbb..057d2fdd9d5 100644
--- a/src/librustdoc/passes/check_doc_test_visibility.rs
+++ b/src/librustdoc/passes/check_doc_test_visibility.rs
@@ -56,7 +56,7 @@ impl crate::doctest::Tester for Tests {
 }
 
 pub(crate) fn should_have_doc_example(cx: &DocContext<'_>, item: &clean::Item) -> bool {
-    if !cx.cache.effective_visibilities.is_directly_public(item.item_id.expect_def_id())
+    if !cx.cache.effective_visibilities.is_directly_public(cx.tcx, item.item_id.expect_def_id())
         || matches!(
             *item.kind,
             clean::StructFieldItem(_)
@@ -130,7 +130,7 @@ pub(crate) fn look_for_tests<'tcx>(cx: &DocContext<'tcx>, dox: &str, item: &Item
             );
         }
     } else if tests.found_tests > 0
-        && !cx.cache.effective_visibilities.is_exported(item.item_id.expect_def_id())
+        && !cx.cache.effective_visibilities.is_exported(cx.tcx, item.item_id.expect_def_id())
     {
         cx.tcx.struct_span_lint_hir(
             crate::lint::PRIVATE_DOC_TESTS,
diff --git a/src/librustdoc/passes/collect_intra_doc_links.rs b/src/librustdoc/passes/collect_intra_doc_links.rs
index 8aa0abd369c..0bd0dbbeb70 100644
--- a/src/librustdoc/passes/collect_intra_doc_links.rs
+++ b/src/librustdoc/passes/collect_intra_doc_links.rs
@@ -1893,7 +1893,7 @@ fn disambiguator_error(
     diag_info.link_range = disambiguator_range;
     report_diagnostic(cx.tcx, BROKEN_INTRA_DOC_LINKS, msg, &diag_info, |diag, _sp| {
         let msg = format!(
-            "see {}/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators",
+            "see {}/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators",
             crate::DOC_RUST_LANG_ORG_CHANNEL
         );
         diag.note(&msg);
diff --git a/src/librustdoc/passes/strip_hidden.rs b/src/librustdoc/passes/strip_hidden.rs
index 9914edf3036..e07a788a72a 100644
--- a/src/librustdoc/passes/strip_hidden.rs
+++ b/src/librustdoc/passes/strip_hidden.rs
@@ -27,6 +27,7 @@ pub(crate) fn strip_hidden(krate: clean::Crate, cx: &mut DocContext<'_>) -> clea
 
     // strip all impls referencing stripped items
     let mut stripper = ImplStripper {
+        tcx: cx.tcx,
         retained: &retained,
         cache: &cx.cache,
         is_json_output,
diff --git a/src/librustdoc/passes/strip_priv_imports.rs b/src/librustdoc/passes/strip_priv_imports.rs
index 85be8fa109a..3bac5a8e5d7 100644
--- a/src/librustdoc/passes/strip_priv_imports.rs
+++ b/src/librustdoc/passes/strip_priv_imports.rs
@@ -11,6 +11,6 @@ pub(crate) const STRIP_PRIV_IMPORTS: Pass = Pass {
     description: "strips all private import statements (`use`, `extern crate`) from a crate",
 };
 
-pub(crate) fn strip_priv_imports(krate: clean::Crate, _: &mut DocContext<'_>) -> clean::Crate {
-    ImportStripper.fold_crate(krate)
+pub(crate) fn strip_priv_imports(krate: clean::Crate, cx: &mut DocContext<'_>) -> clean::Crate {
+    ImportStripper { tcx: cx.tcx }.fold_crate(krate)
 }
diff --git a/src/librustdoc/passes/strip_private.rs b/src/librustdoc/passes/strip_private.rs
index 450f69e15d1..8fc42462de9 100644
--- a/src/librustdoc/passes/strip_private.rs
+++ b/src/librustdoc/passes/strip_private.rs
@@ -26,12 +26,14 @@ pub(crate) fn strip_private(mut krate: clean::Crate, cx: &mut DocContext<'_>) ->
             effective_visibilities: &cx.cache.effective_visibilities,
             update_retained: true,
             is_json_output,
+            tcx: cx.tcx,
         };
-        krate = ImportStripper.fold_crate(stripper.fold_crate(krate));
+        krate = ImportStripper { tcx: cx.tcx }.fold_crate(stripper.fold_crate(krate));
     }
 
     // strip all impls referencing private items
     let mut stripper = ImplStripper {
+        tcx: cx.tcx,
         retained: &retained,
         cache: &cx.cache,
         is_json_output,
diff --git a/src/librustdoc/passes/stripper.rs b/src/librustdoc/passes/stripper.rs
index 0089ce63d07..995fb5dcc1c 100644
--- a/src/librustdoc/passes/stripper.rs
+++ b/src/librustdoc/passes/stripper.rs
@@ -1,19 +1,20 @@
 //! A collection of utility functions for the `strip_*` passes.
 use rustc_hir::def_id::DefId;
-use rustc_middle::middle::privacy::EffectiveVisibilities;
+use rustc_middle::ty::{TyCtxt, Visibility};
 use rustc_span::symbol::sym;
-
 use std::mem;
 
 use crate::clean::{self, Item, ItemId, ItemIdSet, NestedAttributesExt};
 use crate::fold::{strip_item, DocFolder};
 use crate::formats::cache::Cache;
+use crate::visit_lib::RustdocEffectiveVisibilities;
 
-pub(crate) struct Stripper<'a> {
+pub(crate) struct Stripper<'a, 'tcx> {
     pub(crate) retained: &'a mut ItemIdSet,
-    pub(crate) effective_visibilities: &'a EffectiveVisibilities<DefId>,
+    pub(crate) effective_visibilities: &'a RustdocEffectiveVisibilities,
     pub(crate) update_retained: bool,
     pub(crate) is_json_output: bool,
+    pub(crate) tcx: TyCtxt<'tcx>,
 }
 
 // We need to handle this differently for the JSON output because some non exported items could
@@ -21,18 +22,19 @@ pub(crate) struct Stripper<'a> {
 // are in the public API, which is not enough.
 #[inline]
 fn is_item_reachable(
+    tcx: TyCtxt<'_>,
     is_json_output: bool,
-    effective_visibilities: &EffectiveVisibilities<DefId>,
+    effective_visibilities: &RustdocEffectiveVisibilities,
     item_id: ItemId,
 ) -> bool {
     if is_json_output {
-        effective_visibilities.is_reachable(item_id.expect_def_id())
+        effective_visibilities.is_reachable(tcx, item_id.expect_def_id())
     } else {
-        effective_visibilities.is_exported(item_id.expect_def_id())
+        effective_visibilities.is_exported(tcx, item_id.expect_def_id())
     }
 }
 
-impl<'a> DocFolder for Stripper<'a> {
+impl<'a, 'tcx> DocFolder for Stripper<'a, 'tcx> {
     fn fold_item(&mut self, i: Item) -> Option<Item> {
         match *i.kind {
             clean::StrippedItem(..) => {
@@ -66,7 +68,12 @@ impl<'a> DocFolder for Stripper<'a> {
             | clean::ForeignTypeItem => {
                 let item_id = i.item_id;
                 if item_id.is_local()
-                    && !is_item_reachable(self.is_json_output, self.effective_visibilities, item_id)
+                    && !is_item_reachable(
+                        self.tcx,
+                        self.is_json_output,
+                        self.effective_visibilities,
+                        item_id,
+                    )
                 {
                     debug!("Stripper: stripping {:?} {:?}", i.type_(), i.name);
                     return None;
@@ -74,13 +81,13 @@ impl<'a> DocFolder for Stripper<'a> {
             }
 
             clean::StructFieldItem(..) => {
-                if !i.visibility.is_public() {
+                if i.visibility(self.tcx) != Some(Visibility::Public) {
                     return Some(strip_item(i));
                 }
             }
 
             clean::ModuleItem(..) => {
-                if i.item_id.is_local() && !i.visibility.is_public() {
+                if i.item_id.is_local() && i.visibility(self.tcx) != Some(Visibility::Public) {
                     debug!("Stripper: stripping module {:?}", i.name);
                     let old = mem::replace(&mut self.update_retained, false);
                     let ret = strip_item(self.fold_item_recur(i));
@@ -146,14 +153,15 @@ impl<'a> DocFolder for Stripper<'a> {
 }
 
 /// This stripper discards all impls which reference stripped items
-pub(crate) struct ImplStripper<'a> {
+pub(crate) struct ImplStripper<'a, 'tcx> {
+    pub(crate) tcx: TyCtxt<'tcx>,
     pub(crate) retained: &'a ItemIdSet,
     pub(crate) cache: &'a Cache,
     pub(crate) is_json_output: bool,
     pub(crate) document_private: bool,
 }
 
-impl<'a> ImplStripper<'a> {
+impl<'a> ImplStripper<'a, '_> {
     #[inline]
     fn should_keep_impl(&self, item: &Item, for_def_id: DefId) -> bool {
         if !for_def_id.is_local() || self.retained.contains(&for_def_id.into()) {
@@ -161,7 +169,7 @@ impl<'a> ImplStripper<'a> {
         } else if self.is_json_output {
             // If the "for" item is exported and the impl block isn't `#[doc(hidden)]`, then we
             // need to keep it.
-            self.cache.effective_visibilities.is_exported(for_def_id)
+            self.cache.effective_visibilities.is_exported(self.tcx, for_def_id)
                 && !item.attrs.lists(sym::doc).has_word(sym::hidden)
         } else {
             false
@@ -169,7 +177,7 @@ impl<'a> ImplStripper<'a> {
     }
 }
 
-impl<'a> DocFolder for ImplStripper<'a> {
+impl<'a> DocFolder for ImplStripper<'a, '_> {
     fn fold_item(&mut self, i: Item) -> Option<Item> {
         if let clean::ImplItem(ref imp) = *i.kind {
             // Impl blocks can be skipped if they are: empty; not a trait impl; and have no
@@ -185,6 +193,7 @@ impl<'a> DocFolder for ImplStripper<'a> {
                         let item_id = i.item_id;
                         item_id.is_local()
                             && !is_item_reachable(
+                                self.tcx,
                                 self.is_json_output,
                                 &self.cache.effective_visibilities,
                                 item_id,
@@ -229,12 +238,16 @@ impl<'a> DocFolder for ImplStripper<'a> {
 }
 
 /// This stripper discards all private import statements (`use`, `extern crate`)
-pub(crate) struct ImportStripper;
+pub(crate) struct ImportStripper<'tcx> {
+    pub(crate) tcx: TyCtxt<'tcx>,
+}
 
-impl DocFolder for ImportStripper {
+impl<'tcx> DocFolder for ImportStripper<'tcx> {
     fn fold_item(&mut self, i: Item) -> Option<Item> {
         match *i.kind {
-            clean::ExternCrateItem { .. } | clean::ImportItem(..) if !i.visibility.is_public() => {
+            clean::ExternCrateItem { .. } | clean::ImportItem(..)
+                if i.visibility(self.tcx) != Some(Visibility::Public) =>
+            {
                 None
             }
             _ => Some(self.fold_item_recur(i)),
diff --git a/src/librustdoc/visit_ast.rs b/src/librustdoc/visit_ast.rs
index 06dffce555f..c788b9f4093 100644
--- a/src/librustdoc/visit_ast.rs
+++ b/src/librustdoc/visit_ast.rs
@@ -7,15 +7,14 @@ use rustc_hir::def::{DefKind, Res};
 use rustc_hir::def_id::DefId;
 use rustc_hir::Node;
 use rustc_hir::CRATE_HIR_ID;
-use rustc_middle::middle::privacy::Level;
-use rustc_middle::ty::{TyCtxt, Visibility};
+use rustc_middle::ty::TyCtxt;
 use rustc_span::def_id::{CRATE_DEF_ID, LOCAL_CRATE};
 use rustc_span::symbol::{kw, sym, Symbol};
 use rustc_span::Span;
 
 use std::mem;
 
-use crate::clean::{self, cfg::Cfg, AttributesExt, NestedAttributesExt};
+use crate::clean::{cfg::Cfg, AttributesExt, NestedAttributesExt};
 use crate::core;
 
 /// This module is used to store stuff from Rust's AST in a more convenient
@@ -26,8 +25,8 @@ pub(crate) struct Module<'hir> {
     pub(crate) where_inner: Span,
     pub(crate) mods: Vec<Module<'hir>>,
     pub(crate) id: hir::HirId,
-    // (item, renamed)
-    pub(crate) items: Vec<(&'hir hir::Item<'hir>, Option<Symbol>)>,
+    // (item, renamed, import_id)
+    pub(crate) items: Vec<(&'hir hir::Item<'hir>, Option<Symbol>, Option<hir::HirId>)>,
     pub(crate) foreigns: Vec<(&'hir hir::ForeignItem<'hir>, Option<Symbol>)>,
 }
 
@@ -94,6 +93,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
             hir::CRATE_HIR_ID,
             self.cx.tcx.hir().root_module(),
             self.cx.tcx.crate_name(LOCAL_CRATE),
+            None,
         );
 
         // `#[macro_export] macro_rules!` items are reexported at the top level of the
@@ -114,7 +114,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
                     if self.cx.tcx.has_attr(def_id, sym::macro_export) {
                         if inserted.insert(def_id) {
                             let item = self.cx.tcx.hir().expect_item(local_def_id);
-                            top_level_module.items.push((item, None));
+                            top_level_module.items.push((item, None, None));
                         }
                     }
                 }
@@ -156,6 +156,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
         id: hir::HirId,
         m: &'tcx hir::Mod<'tcx>,
         name: Symbol,
+        parent_id: Option<hir::HirId>,
     ) -> Module<'tcx> {
         let mut om = Module::new(name, id, m.spans.inner_span);
         let def_id = self.cx.tcx.hir().local_def_id(id).to_def_id();
@@ -167,7 +168,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
             if matches!(item.kind, hir::ItemKind::Use(_, hir::UseKind::Glob)) {
                 continue;
             }
-            self.visit_item(item, None, &mut om);
+            self.visit_item(item, None, &mut om, parent_id);
         }
         for &i in m.item_ids {
             let item = self.cx.tcx.hir().item(i);
@@ -175,7 +176,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
             // Later passes in rustdoc will de-duplicate by name and kind, so if glob-
             // imported items appear last, then they'll be the ones that get discarded.
             if matches!(item.kind, hir::ItemKind::Use(_, hir::UseKind::Glob)) {
-                self.visit_item(item, None, &mut om);
+                self.visit_item(item, None, &mut om, parent_id);
             }
         }
         self.inside_public_path = orig_inside_public_path;
@@ -221,23 +222,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
         // made reachable by cross-crate inlining which we're checking here.
         // (this is done here because we need to know this upfront).
         if !res_did.is_local() && !is_no_inline {
-            let attrs = clean::inline::load_attrs(self.cx, res_did);
-            let self_is_hidden = attrs.lists(sym::doc).has_word(sym::hidden);
-            if !self_is_hidden {
-                if let Res::Def(kind, did) = res {
-                    if kind == DefKind::Mod {
-                        crate::visit_lib::LibEmbargoVisitor::new(self.cx).visit_mod(did)
-                    } else {
-                        // All items need to be handled here in case someone wishes to link
-                        // to them with intra-doc links
-                        self.cx.cache.effective_visibilities.set_public_at_level(
-                            did,
-                            || Visibility::Restricted(CRATE_DEF_ID),
-                            Level::Direct,
-                        );
-                    }
-                }
-            }
+            crate::visit_lib::lib_embargo_visit_item(self.cx, res_did);
             return false;
         }
 
@@ -246,7 +231,8 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
             None => return false,
         };
 
-        let is_private = !self.cx.cache.effective_visibilities.is_directly_public(res_did);
+        let is_private =
+            !self.cx.cache.effective_visibilities.is_directly_public(self.cx.tcx, res_did);
         let is_hidden = inherits_doc_hidden(self.cx.tcx, res_hir_id);
 
         // Only inline if requested or if the item would otherwise be stripped.
@@ -263,14 +249,14 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
                 let prev = mem::replace(&mut self.inlining, true);
                 for &i in m.item_ids {
                     let i = self.cx.tcx.hir().item(i);
-                    self.visit_item(i, None, om);
+                    self.visit_item(i, None, om, Some(id));
                 }
                 self.inlining = prev;
                 true
             }
             Node::Item(it) if !glob => {
                 let prev = mem::replace(&mut self.inlining, true);
-                self.visit_item(it, renamed, om);
+                self.visit_item(it, renamed, om, Some(id));
                 self.inlining = prev;
                 true
             }
@@ -291,6 +277,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
         item: &'tcx hir::Item<'_>,
         renamed: Option<Symbol>,
         om: &mut Module<'tcx>,
+        parent_id: Option<hir::HirId>,
     ) {
         debug!("visiting item {:?}", item);
         let name = renamed.unwrap_or(item.ident.name);
@@ -346,7 +333,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
                     }
                 }
 
-                om.items.push((item, renamed))
+                om.items.push((item, renamed, parent_id))
             }
             hir::ItemKind::Macro(ref macro_def, _) => {
                 // `#[macro_export] macro_rules!` items are handled separately in `visit()`,
@@ -365,11 +352,11 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
                 let nonexported = !self.cx.tcx.has_attr(def_id, sym::macro_export);
 
                 if is_macro_2_0 || nonexported || self.inlining {
-                    om.items.push((item, renamed));
+                    om.items.push((item, renamed, None));
                 }
             }
             hir::ItemKind::Mod(ref m) => {
-                om.mods.push(self.visit_mod_contents(item.hir_id(), m, name));
+                om.mods.push(self.visit_mod_contents(item.hir_id(), m, name, parent_id));
             }
             hir::ItemKind::Fn(..)
             | hir::ItemKind::ExternCrate(..)
@@ -380,19 +367,19 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
             | hir::ItemKind::OpaqueTy(..)
             | hir::ItemKind::Static(..)
             | hir::ItemKind::Trait(..)
-            | hir::ItemKind::TraitAlias(..) => om.items.push((item, renamed)),
+            | hir::ItemKind::TraitAlias(..) => om.items.push((item, renamed, parent_id)),
             hir::ItemKind::Const(..) => {
                 // Underscore constants do not correspond to a nameable item and
                 // so are never useful in documentation.
                 if name != kw::Underscore {
-                    om.items.push((item, renamed));
+                    om.items.push((item, renamed, parent_id));
                 }
             }
             hir::ItemKind::Impl(impl_) => {
                 // Don't duplicate impls when inlining or if it's implementing a trait, we'll pick
                 // them up regardless of where they're located.
                 if !self.inlining && impl_.of_trait.is_none() {
-                    om.items.push((item, None));
+                    om.items.push((item, None, None));
                 }
             }
         }
diff --git a/src/librustdoc/visit_lib.rs b/src/librustdoc/visit_lib.rs
index 70214e2adba..e490559b0e9 100644
--- a/src/librustdoc/visit_lib.rs
+++ b/src/librustdoc/visit_lib.rs
@@ -1,86 +1,74 @@
+use crate::core::DocContext;
 use rustc_data_structures::fx::FxHashSet;
-use rustc_hir::def::{DefKind, Res};
-use rustc_hir::def_id::{CrateNum, DefId, CRATE_DEF_ID};
-use rustc_middle::middle::privacy::{EffectiveVisibilities, Level};
-use rustc_middle::ty::{TyCtxt, Visibility};
+use rustc_hir::def::DefKind;
+use rustc_hir::def_id::DefId;
+use rustc_middle::ty::TyCtxt;
 
 // FIXME: this may not be exhaustive, but is sufficient for rustdocs current uses
 
+#[derive(Default)]
+pub(crate) struct RustdocEffectiveVisibilities {
+    extern_public: FxHashSet<DefId>,
+}
+
+macro_rules! define_method {
+    ($method:ident) => {
+        pub(crate) fn $method(&self, tcx: TyCtxt<'_>, def_id: DefId) -> bool {
+            match def_id.as_local() {
+                Some(def_id) => tcx.effective_visibilities(()).$method(def_id),
+                None => self.extern_public.contains(&def_id),
+            }
+        }
+    };
+}
+
+impl RustdocEffectiveVisibilities {
+    define_method!(is_directly_public);
+    define_method!(is_exported);
+    define_method!(is_reachable);
+}
+
+pub(crate) fn lib_embargo_visit_item(cx: &mut DocContext<'_>, def_id: DefId) {
+    assert!(!def_id.is_local());
+    LibEmbargoVisitor {
+        tcx: cx.tcx,
+        extern_public: &mut cx.cache.effective_visibilities.extern_public,
+        visited_mods: Default::default(),
+    }
+    .visit_item(def_id)
+}
+
 /// Similar to `librustc_privacy::EmbargoVisitor`, but also takes
 /// specific rustdoc annotations into account (i.e., `doc(hidden)`)
-pub(crate) struct LibEmbargoVisitor<'a, 'tcx> {
+struct LibEmbargoVisitor<'a, 'tcx> {
     tcx: TyCtxt<'tcx>,
     // Effective visibilities for reachable nodes
-    effective_visibilities: &'a mut EffectiveVisibilities<DefId>,
-    // Previous level, None means unreachable
-    prev_level: Option<Level>,
+    extern_public: &'a mut FxHashSet<DefId>,
     // Keeps track of already visited modules, in case a module re-exports its parent
     visited_mods: FxHashSet<DefId>,
 }
 
-impl<'a, 'tcx> LibEmbargoVisitor<'a, 'tcx> {
-    pub(crate) fn new(cx: &'a mut crate::core::DocContext<'tcx>) -> LibEmbargoVisitor<'a, 'tcx> {
-        LibEmbargoVisitor {
-            tcx: cx.tcx,
-            effective_visibilities: &mut cx.cache.effective_visibilities,
-            prev_level: Some(Level::Direct),
-            visited_mods: FxHashSet::default(),
-        }
-    }
-
-    pub(crate) fn visit_lib(&mut self, cnum: CrateNum) {
-        let did = cnum.as_def_id();
-        self.update(did, Some(Level::Direct));
-        self.visit_mod(did);
-    }
-
-    // Updates node level and returns the updated level
-    fn update(&mut self, did: DefId, level: Option<Level>) -> Option<Level> {
-        let is_hidden = self.tcx.is_doc_hidden(did);
-
-        let old_level = self.effective_visibilities.public_at_level(did);
-        // Visibility levels can only grow
-        if level > old_level && !is_hidden {
-            self.effective_visibilities.set_public_at_level(
-                did,
-                || Visibility::Restricted(CRATE_DEF_ID),
-                level.unwrap(),
-            );
-            level
-        } else {
-            old_level
-        }
-    }
-
-    pub(crate) fn visit_mod(&mut self, def_id: DefId) {
+impl LibEmbargoVisitor<'_, '_> {
+    fn visit_mod(&mut self, def_id: DefId) {
         if !self.visited_mods.insert(def_id) {
             return;
         }
 
         for item in self.tcx.module_children(def_id).iter() {
             if let Some(def_id) = item.res.opt_def_id() {
-                if self.tcx.def_key(def_id).parent.map_or(false, |d| d == def_id.index)
-                    || item.vis.is_public()
-                {
-                    self.visit_item(item.res);
+                if item.vis.is_public() {
+                    self.visit_item(def_id);
                 }
             }
         }
     }
 
-    fn visit_item(&mut self, res: Res<!>) {
-        let def_id = res.def_id();
-        let vis = self.tcx.visibility(def_id);
-        let inherited_item_level = if vis.is_public() { self.prev_level } else { None };
-
-        let item_level = self.update(def_id, inherited_item_level);
-
-        if let Res::Def(DefKind::Mod, _) = res {
-            let orig_level = self.prev_level;
-
-            self.prev_level = item_level;
-            self.visit_mod(def_id);
-            self.prev_level = orig_level;
+    fn visit_item(&mut self, def_id: DefId) {
+        if !self.tcx.is_doc_hidden(def_id) {
+            self.extern_public.insert(def_id);
+            if self.tcx.def_kind(def_id) == DefKind::Mod {
+                self.visit_mod(def_id);
+            }
         }
     }
 }
diff --git a/src/llvm-project b/src/llvm-project
-Subproject 4b85255772114ca4946d95fe591933dae7d6199
+Subproject 2a2ea6b49e79325e0d10d33fac2b10ea3bebcc7
diff --git a/src/test/codegen/enum-bounds-check-derived-idx.rs b/src/test/codegen/enum-bounds-check-derived-idx.rs
index fe02aeb5f62..aa66c2ed08e 100644
--- a/src/test/codegen/enum-bounds-check-derived-idx.rs
+++ b/src/test/codegen/enum-bounds-check-derived-idx.rs
@@ -12,15 +12,13 @@ pub enum Bar {
 // CHECK-LABEL: @lookup_inc
 #[no_mangle]
 pub fn lookup_inc(buf: &[u8; 5], f: Bar) -> u8 {
-    // FIXME: panic check can be removed by adding the assumes back after https://github.com/rust-lang/rust/pull/98332
-    // CHECK: panic_bounds_check
+    // CHECK-NOT: panic_bounds_check
     buf[f as usize + 1]
 }
 
 // CHECK-LABEL: @lookup_dec
 #[no_mangle]
 pub fn lookup_dec(buf: &[u8; 5], f: Bar) -> u8 {
-    // FIXME: panic check can be removed by adding the assumes back after https://github.com/rust-lang/rust/pull/98332
-    // CHECK: panic_bounds_check
+    // CHECK-NOT: panic_bounds_check
     buf[f as usize - 1]
 }
diff --git a/src/test/codegen/enum-bounds-check-issue-13926.rs b/src/test/codegen/enum-bounds-check-issue-13926.rs
index 1aec41d5441..b26945bc549 100644
--- a/src/test/codegen/enum-bounds-check-issue-13926.rs
+++ b/src/test/codegen/enum-bounds-check-issue-13926.rs
@@ -13,7 +13,6 @@ pub enum Exception {
 // CHECK-LABEL: @access
 #[no_mangle]
 pub fn access(array: &[usize; 12], exc: Exception) -> usize {
-    // FIXME: panic check can be removed by adding the assumes back after https://github.com/rust-lang/rust/pull/98332
-    // CHECK: panic_bounds_check
+    // CHECK-NOT: panic_bounds_check
     array[(exc as u8 - 4) as usize]
 }
diff --git a/src/test/codegen/enum-bounds-check.rs b/src/test/codegen/enum-bounds-check.rs
index f85c6817ded..17322d5911b 100644
--- a/src/test/codegen/enum-bounds-check.rs
+++ b/src/test/codegen/enum-bounds-check.rs
@@ -21,7 +21,6 @@ pub enum Bar {
 // CHECK-LABEL: @lookup_unmodified
 #[no_mangle]
 pub fn lookup_unmodified(buf: &[u8; 5], f: Bar) -> u8 {
-    // FIXME: panic check can be removed by adding the assumes back after https://github.com/rust-lang/rust/pull/98332
-    // CHECK: panic_bounds_check
+    // CHECK-NOT: panic_bounds_check
     buf[f as usize]
 }
diff --git a/src/test/codegen/ffi-const.rs b/src/test/codegen/ffi-const.rs
index d9cfa5429b5..93720503480 100644
--- a/src/test/codegen/ffi-const.rs
+++ b/src/test/codegen/ffi-const.rs
@@ -7,6 +7,7 @@ pub fn bar() { unsafe { foo() } }
 extern "C" {
     // CHECK-LABEL: declare{{.*}}void @foo()
     // CHECK-SAME: [[ATTRS:#[0-9]+]]
-    // CHECK-DAG: attributes [[ATTRS]] = { {{.*}}readnone{{.*}} }
+    // The attribute changed from `readnone` to `memory(none)` with LLVM 16.0.
+    // CHECK-DAG: attributes [[ATTRS]] = { {{.*}}{{readnone|memory\(none\)}}{{.*}} }
     #[ffi_const] pub fn foo();
 }
diff --git a/src/test/codegen/ffi-pure.rs b/src/test/codegen/ffi-pure.rs
index 5bdb2ee912a..2ed73581358 100644
--- a/src/test/codegen/ffi-pure.rs
+++ b/src/test/codegen/ffi-pure.rs
@@ -7,6 +7,7 @@ pub fn bar() { unsafe { foo() } }
 extern "C" {
     // CHECK-LABEL: declare{{.*}}void @foo()
     // CHECK-SAME: [[ATTRS:#[0-9]+]]
-    // CHECK-DAG: attributes [[ATTRS]] = { {{.*}}readonly{{.*}} }
+    // The attribute changed from `readonly` to `memory(read)` with LLVM 16.0.
+    // CHECK-DAG: attributes [[ATTRS]] = { {{.*}}{{readonly|memory\(read\)}}{{.*}} }
     #[ffi_pure] pub fn foo();
 }
diff --git a/src/test/codegen/issue-103285-ptr-addr-overflow-check.rs b/src/test/codegen/issue-103285-ptr-addr-overflow-check.rs
new file mode 100644
index 00000000000..a3499babea2
--- /dev/null
+++ b/src/test/codegen/issue-103285-ptr-addr-overflow-check.rs
@@ -0,0 +1,16 @@
+// compile-flags: -O -C debug-assertions=yes
+
+#![crate_type = "lib"]
+#![feature(strict_provenance)]
+
+#[no_mangle]
+pub fn test(src: *const u8, dst: *const u8) -> usize {
+    // CHECK-LABEL: @test(
+    // CHECK-NOT: panic
+    let src_usize = src.addr();
+    let dst_usize = dst.addr();
+    if src_usize > dst_usize {
+        return src_usize - dst_usize;
+    }
+    return 0;
+}
diff --git a/src/test/codegen/match-optimized.rs b/src/test/codegen/match-optimized.rs
new file mode 100644
index 00000000000..36402cc7353
--- /dev/null
+++ b/src/test/codegen/match-optimized.rs
@@ -0,0 +1,60 @@
+// compile-flags: -C no-prepopulate-passes -O
+
+#![crate_type = "lib"]
+
+pub enum E {
+    A,
+    B,
+    C,
+}
+
+// CHECK-LABEL: @exhaustive_match
+#[no_mangle]
+pub fn exhaustive_match(e: E) -> u8 {
+// CHECK: switch{{.*}}, label %[[OTHERWISE:[a-zA-Z0-9_]+]] [
+// CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[A:[a-zA-Z0-9_]+]]
+// CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[B:[a-zA-Z0-9_]+]]
+// CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[C:[a-zA-Z0-9_]+]]
+// CHECK-NEXT: ]
+// CHECK: [[OTHERWISE]]:
+// CHECK-NEXT: unreachable
+//
+// CHECK: [[A]]:
+// CHECK-NEXT: store i8 0, {{i8\*|ptr}} %1, align 1
+// CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]]
+// CHECK: [[B]]:
+// CHECK-NEXT: store i8 1, {{i8\*|ptr}} %1, align 1
+// CHECK-NEXT: br label %[[EXIT]]
+// CHECK: [[C]]:
+// CHECK-NEXT: store i8 2, {{i8\*|ptr}} %1, align 1
+// CHECK-NEXT: br label %[[EXIT]]
+    match e {
+        E::A => 0,
+        E::B => 1,
+        E::C => 2,
+    }
+}
+
+#[repr(u16)]
+pub enum E2 {
+    A = 13,
+    B = 42,
+}
+
+// For optimized code we produce a switch with an unreachable target as the `otherwise` so LLVM
+// knows the possible values. Compare with `src/test/codegen/match-unoptimized.rs`.
+
+// CHECK-LABEL: @exhaustive_match_2
+#[no_mangle]
+pub fn exhaustive_match_2(e: E2) -> u8 {
+    // CHECK: switch i16 %{{.+}}, label %[[UNREACH:.+]] [
+    // CHECK-NEXT: i16 13,
+    // CHECK-NEXT: i16 42,
+    // CHECK-NEXT: ]
+    // CHECK: [[UNREACH]]:
+    // CHECK-NEXT: unreachable
+    match e {
+        E2::A => 0,
+        E2::B => 1,
+    }
+}
diff --git a/src/test/codegen/match-unoptimized.rs b/src/test/codegen/match-unoptimized.rs
new file mode 100644
index 00000000000..be40b29e3d3
--- /dev/null
+++ b/src/test/codegen/match-unoptimized.rs
@@ -0,0 +1,23 @@
+// compile-flags: -C no-prepopulate-passes -Copt-level=0
+
+#![crate_type = "lib"]
+
+#[repr(u16)]
+pub enum E2 {
+    A = 13,
+    B = 42,
+}
+
+// For unoptimized code we produce a `br` instead of a `switch`. Compare with
+// `src/test/codegen/match-optimized.rs`
+
+// CHECK-LABEL: @exhaustive_match_2
+#[no_mangle]
+pub fn exhaustive_match_2(e: E2) -> u8 {
+    // CHECK: %[[CMP:.+]] = icmp eq i16 %{{.+}}, 13
+    // CHECK-NEXT: br i1 %[[CMP:.+]],
+    match e {
+        E2::A => 0,
+        E2::B => 1,
+    }
+}
diff --git a/src/test/codegen/match.rs b/src/test/codegen/match.rs
deleted file mode 100644
index b203641fddb..00000000000
--- a/src/test/codegen/match.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// compile-flags: -C no-prepopulate-passes
-
-#![crate_type = "lib"]
-
-pub enum E {
-    A,
-    B,
-}
-
-// CHECK-LABEL: @exhaustive_match
-#[no_mangle]
-pub fn exhaustive_match(e: E) -> u8 {
-// CHECK: switch{{.*}}, label %[[OTHERWISE:[a-zA-Z0-9_]+]] [
-// CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[A:[a-zA-Z0-9_]+]]
-// CHECK-NEXT: i[[TY:[0-9]+]] [[DISCR:[0-9]+]], label %[[B:[a-zA-Z0-9_]+]]
-// CHECK-NEXT: ]
-// CHECK: [[OTHERWISE]]:
-// CHECK-NEXT: unreachable
-// CHECK: [[A]]:
-// CHECK-NEXT: store i8 0, {{i8\*|ptr}} %1, align 1
-// CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]]
-// CHECK: [[B]]:
-// CHECK-NEXT: store i8 1, {{i8\*|ptr}} %1, align 1
-// CHECK-NEXT: br label %[[EXIT:[a-zA-Z0-9_]+]]
-    match e {
-        E::A => 0,
-        E::B => 1,
-    }
-}
diff --git a/src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir b/src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
index d41a66871cc..5f8b2f9312b 100644
--- a/src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
+++ b/src/test/mir-opt/address_of.address_of_reborrow.SimplifyCfg-initial.after.mir
@@ -1,115 +1,115 @@
 // MIR for `address_of_reborrow` after SimplifyCfg-initial
 
 | User Type Annotations
-| 0: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address-of.rs:7:5: 7:18, inferred_ty: *const [i32; 10]
-| 1: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address-of.rs:9:5: 9:25, inferred_ty: *const dyn std::marker::Send
-| 2: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address-of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
-| 3: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address-of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
-| 4: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address-of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
-| 5: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address-of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
-| 6: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address-of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
-| 7: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address-of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
-| 8: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address-of.rs:16:12: 16:24, inferred_ty: *const [i32]
-| 9: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address-of.rs:16:12: 16:24, inferred_ty: *const [i32]
-| 10: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address-of.rs:18:5: 18:18, inferred_ty: *const [i32; 10]
-| 11: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address-of.rs:20:5: 20:25, inferred_ty: *const dyn std::marker::Send
-| 12: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address-of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
-| 13: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address-of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
-| 14: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address-of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
-| 15: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address-of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
-| 16: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address-of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
-| 17: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address-of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
-| 18: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address-of.rs:26:12: 26:24, inferred_ty: *const [i32]
-| 19: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address-of.rs:26:12: 26:24, inferred_ty: *const [i32]
-| 20: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*mut ^0) }, span: $DIR/address-of.rs:28:5: 28:16, inferred_ty: *mut [i32; 10]
-| 21: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*mut dyn std::marker::Send) }, span: $DIR/address-of.rs:30:5: 30:23, inferred_ty: *mut dyn std::marker::Send
-| 22: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*mut ^0) }, span: $DIR/address-of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
-| 23: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*mut ^0) }, span: $DIR/address-of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
-| 24: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32; 10]) }, span: $DIR/address-of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
-| 25: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32; 10]) }, span: $DIR/address-of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
-| 26: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*mut dyn std::marker::Send) }, span: $DIR/address-of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
-| 27: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*mut dyn std::marker::Send) }, span: $DIR/address-of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
-| 28: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32]) }, span: $DIR/address-of.rs:36:12: 36:22, inferred_ty: *mut [i32]
-| 29: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32]) }, span: $DIR/address-of.rs:36:12: 36:22, inferred_ty: *mut [i32]
+| 0: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:7:5: 7:18, inferred_ty: *const [i32; 10]
+| 1: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:9:5: 9:25, inferred_ty: *const dyn std::marker::Send
+| 2: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
+| 3: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:13:12: 13:20, inferred_ty: *const [i32; 10]
+| 4: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
+| 5: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address_of.rs:14:12: 14:28, inferred_ty: *const [i32; 10]
+| 6: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
+| 7: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:15:12: 15:27, inferred_ty: *const dyn std::marker::Send
+| 8: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
+| 9: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address_of.rs:16:12: 16:24, inferred_ty: *const [i32]
+| 10: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:18:5: 18:18, inferred_ty: *const [i32; 10]
+| 11: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:20:5: 20:25, inferred_ty: *const dyn std::marker::Send
+| 12: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
+| 13: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*const ^0) }, span: $DIR/address_of.rs:23:12: 23:20, inferred_ty: *const [i32; 10]
+| 14: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
+| 15: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32; 10]) }, span: $DIR/address_of.rs:24:12: 24:28, inferred_ty: *const [i32; 10]
+| 16: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
+| 17: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*const dyn std::marker::Send) }, span: $DIR/address_of.rs:25:12: 25:27, inferred_ty: *const dyn std::marker::Send
+| 18: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
+| 19: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*const [i32]) }, span: $DIR/address_of.rs:26:12: 26:24, inferred_ty: *const [i32]
+| 20: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*mut ^0) }, span: $DIR/address_of.rs:28:5: 28:16, inferred_ty: *mut [i32; 10]
+| 21: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*mut dyn std::marker::Send) }, span: $DIR/address_of.rs:30:5: 30:23, inferred_ty: *mut dyn std::marker::Send
+| 22: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*mut ^0) }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
+| 23: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Ty(General(U0)) }], value: Ty(*mut ^0) }, span: $DIR/address_of.rs:33:12: 33:18, inferred_ty: *mut [i32; 10]
+| 24: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32; 10]) }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
+| 25: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32; 10]) }, span: $DIR/address_of.rs:34:12: 34:26, inferred_ty: *mut [i32; 10]
+| 26: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*mut dyn std::marker::Send) }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
+| 27: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }], value: Ty(*mut dyn std::marker::Send) }, span: $DIR/address_of.rs:35:12: 35:25, inferred_ty: *mut dyn std::marker::Send
+| 28: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32]) }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
+| 29: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut [i32]) }, span: $DIR/address_of.rs:36:12: 36:22, inferred_ty: *mut [i32]
 |
 fn address_of_reborrow() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/address-of.rs:+0:26: +0:26
-    let _1: &[i32; 10];                  // in scope 0 at $DIR/address-of.rs:+1:9: +1:10
-    let _2: [i32; 10];                   // in scope 0 at $DIR/address-of.rs:+1:14: +1:21
-    let mut _4: [i32; 10];               // in scope 0 at $DIR/address-of.rs:+2:22: +2:29
-    let _5: *const [i32; 10];            // in scope 0 at $DIR/address-of.rs:+4:5: +4:18
-    let mut _6: *const [i32; 10];        // in scope 0 at $DIR/address-of.rs:+4:5: +4:18
-    let _7: *const [i32; 10];            // in scope 0 at $DIR/address-of.rs:+5:5: +5:26
-    let _8: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+6:5: +6:25
-    let mut _9: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+6:5: +6:25
-    let mut _10: *const [i32; 10];       // in scope 0 at $DIR/address-of.rs:+6:5: +6:6
-    let _11: *const [i32];               // in scope 0 at $DIR/address-of.rs:+7:5: +7:22
-    let mut _12: *const [i32; 10];       // in scope 0 at $DIR/address-of.rs:+7:5: +7:6
-    let _13: *const i32;                 // in scope 0 at $DIR/address-of.rs:+8:5: +8:20
-    let mut _14: *const [i32; 10];       // in scope 0 at $DIR/address-of.rs:+8:5: +8:6
-    let mut _18: *const [i32; 10];       // in scope 0 at $DIR/address-of.rs:+12:30: +12:31
-    let mut _20: *const [i32; 10];       // in scope 0 at $DIR/address-of.rs:+13:27: +13:28
-    let _21: *const [i32; 10];           // in scope 0 at $DIR/address-of.rs:+15:5: +15:18
-    let mut _22: *const [i32; 10];       // in scope 0 at $DIR/address-of.rs:+15:5: +15:18
-    let _23: *const [i32; 10];           // in scope 0 at $DIR/address-of.rs:+16:5: +16:26
-    let _24: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+17:5: +17:25
-    let mut _25: *const dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+17:5: +17:25
-    let mut _26: *const [i32; 10];       // in scope 0 at $DIR/address-of.rs:+17:5: +17:6
-    let _27: *const [i32];               // in scope 0 at $DIR/address-of.rs:+18:5: +18:22
-    let mut _28: *const [i32; 10];       // in scope 0 at $DIR/address-of.rs:+18:5: +18:6
-    let mut _32: *const [i32; 10];       // in scope 0 at $DIR/address-of.rs:+22:30: +22:31
-    let mut _34: *const [i32; 10];       // in scope 0 at $DIR/address-of.rs:+23:27: +23:28
-    let _35: *mut [i32; 10];             // in scope 0 at $DIR/address-of.rs:+25:5: +25:16
-    let mut _36: *mut [i32; 10];         // in scope 0 at $DIR/address-of.rs:+25:5: +25:16
-    let _37: *mut [i32; 10];             // in scope 0 at $DIR/address-of.rs:+26:5: +26:24
-    let _38: *mut dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+27:5: +27:23
-    let mut _39: *mut dyn std::marker::Send; // in scope 0 at $DIR/address-of.rs:+27:5: +27:23
-    let mut _40: *mut [i32; 10];         // in scope 0 at $DIR/address-of.rs:+27:5: +27:6
-    let _41: *mut [i32];                 // in scope 0 at $DIR/address-of.rs:+28:5: +28:20
-    let mut _42: *mut [i32; 10];         // in scope 0 at $DIR/address-of.rs:+28:5: +28:6
-    let mut _46: *mut [i32; 10];         // in scope 0 at $DIR/address-of.rs:+32:28: +32:29
-    let mut _48: *mut [i32; 10];         // in scope 0 at $DIR/address-of.rs:+33:25: +33:26
+    let mut _0: ();                      // return place in scope 0 at $DIR/address_of.rs:+0:26: +0:26
+    let _1: &[i32; 10];                  // in scope 0 at $DIR/address_of.rs:+1:9: +1:10
+    let _2: [i32; 10];                   // in scope 0 at $DIR/address_of.rs:+1:14: +1:21
+    let mut _4: [i32; 10];               // in scope 0 at $DIR/address_of.rs:+2:22: +2:29
+    let _5: *const [i32; 10];            // in scope 0 at $DIR/address_of.rs:+4:5: +4:18
+    let mut _6: *const [i32; 10];        // in scope 0 at $DIR/address_of.rs:+4:5: +4:18
+    let _7: *const [i32; 10];            // in scope 0 at $DIR/address_of.rs:+5:5: +5:26
+    let _8: *const dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+6:5: +6:25
+    let mut _9: *const dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+6:5: +6:25
+    let mut _10: *const [i32; 10];       // in scope 0 at $DIR/address_of.rs:+6:5: +6:6
+    let _11: *const [i32];               // in scope 0 at $DIR/address_of.rs:+7:5: +7:22
+    let mut _12: *const [i32; 10];       // in scope 0 at $DIR/address_of.rs:+7:5: +7:6
+    let _13: *const i32;                 // in scope 0 at $DIR/address_of.rs:+8:5: +8:20
+    let mut _14: *const [i32; 10];       // in scope 0 at $DIR/address_of.rs:+8:5: +8:6
+    let mut _18: *const [i32; 10];       // in scope 0 at $DIR/address_of.rs:+12:30: +12:31
+    let mut _20: *const [i32; 10];       // in scope 0 at $DIR/address_of.rs:+13:27: +13:28
+    let _21: *const [i32; 10];           // in scope 0 at $DIR/address_of.rs:+15:5: +15:18
+    let mut _22: *const [i32; 10];       // in scope 0 at $DIR/address_of.rs:+15:5: +15:18
+    let _23: *const [i32; 10];           // in scope 0 at $DIR/address_of.rs:+16:5: +16:26
+    let _24: *const dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+17:5: +17:25
+    let mut _25: *const dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+17:5: +17:25
+    let mut _26: *const [i32; 10];       // in scope 0 at $DIR/address_of.rs:+17:5: +17:6
+    let _27: *const [i32];               // in scope 0 at $DIR/address_of.rs:+18:5: +18:22
+    let mut _28: *const [i32; 10];       // in scope 0 at $DIR/address_of.rs:+18:5: +18:6
+    let mut _32: *const [i32; 10];       // in scope 0 at $DIR/address_of.rs:+22:30: +22:31
+    let mut _34: *const [i32; 10];       // in scope 0 at $DIR/address_of.rs:+23:27: +23:28
+    let _35: *mut [i32; 10];             // in scope 0 at $DIR/address_of.rs:+25:5: +25:16
+    let mut _36: *mut [i32; 10];         // in scope 0 at $DIR/address_of.rs:+25:5: +25:16
+    let _37: *mut [i32; 10];             // in scope 0 at $DIR/address_of.rs:+26:5: +26:24
+    let _38: *mut dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+27:5: +27:23
+    let mut _39: *mut dyn std::marker::Send; // in scope 0 at $DIR/address_of.rs:+27:5: +27:23
+    let mut _40: *mut [i32; 10];         // in scope 0 at $DIR/address_of.rs:+27:5: +27:6
+    let _41: *mut [i32];                 // in scope 0 at $DIR/address_of.rs:+28:5: +28:20
+    let mut _42: *mut [i32; 10];         // in scope 0 at $DIR/address_of.rs:+28:5: +28:6
+    let mut _46: *mut [i32; 10];         // in scope 0 at $DIR/address_of.rs:+32:28: +32:29
+    let mut _48: *mut [i32; 10];         // in scope 0 at $DIR/address_of.rs:+33:25: +33:26
     scope 1 {
-        debug y => _1;                   // in scope 1 at $DIR/address-of.rs:+1:9: +1:10
-        let mut _3: &mut [i32; 10];      // in scope 1 at $DIR/address-of.rs:+2:9: +2:14
+        debug y => _1;                   // in scope 1 at $DIR/address_of.rs:+1:9: +1:10
+        let mut _3: &mut [i32; 10];      // in scope 1 at $DIR/address_of.rs:+2:9: +2:14
         scope 2 {
-            debug z => _3;               // in scope 2 at $DIR/address-of.rs:+2:9: +2:14
-            let _15: *const [i32; 10] as UserTypeProjection { base: UserType(2), projs: [] }; // in scope 2 at $DIR/address-of.rs:+10:9: +10:10
+            debug z => _3;               // in scope 2 at $DIR/address_of.rs:+2:9: +2:14
+            let _15: *const [i32; 10] as UserTypeProjection { base: UserType(2), projs: [] }; // in scope 2 at $DIR/address_of.rs:+10:9: +10:10
             scope 3 {
-                debug p => _15;          // in scope 3 at $DIR/address-of.rs:+10:9: +10:10
-                let _16: *const [i32; 10] as UserTypeProjection { base: UserType(4), projs: [] }; // in scope 3 at $DIR/address-of.rs:+11:9: +11:10
+                debug p => _15;          // in scope 3 at $DIR/address_of.rs:+10:9: +10:10
+                let _16: *const [i32; 10] as UserTypeProjection { base: UserType(4), projs: [] }; // in scope 3 at $DIR/address_of.rs:+11:9: +11:10
                 scope 4 {
-                    debug p => _16;      // in scope 4 at $DIR/address-of.rs:+11:9: +11:10
-                    let _17: *const dyn std::marker::Send as UserTypeProjection { base: UserType(6), projs: [] }; // in scope 4 at $DIR/address-of.rs:+12:9: +12:10
+                    debug p => _16;      // in scope 4 at $DIR/address_of.rs:+11:9: +11:10
+                    let _17: *const dyn std::marker::Send as UserTypeProjection { base: UserType(6), projs: [] }; // in scope 4 at $DIR/address_of.rs:+12:9: +12:10
                     scope 5 {
-                        debug p => _17;  // in scope 5 at $DIR/address-of.rs:+12:9: +12:10
-                        let _19: *const [i32] as UserTypeProjection { base: UserType(8), projs: [] }; // in scope 5 at $DIR/address-of.rs:+13:9: +13:10
+                        debug p => _17;  // in scope 5 at $DIR/address_of.rs:+12:9: +12:10
+                        let _19: *const [i32] as UserTypeProjection { base: UserType(8), projs: [] }; // in scope 5 at $DIR/address_of.rs:+13:9: +13:10
                         scope 6 {
-                            debug p => _19; // in scope 6 at $DIR/address-of.rs:+13:9: +13:10
-                            let _29: *const [i32; 10] as UserTypeProjection { base: UserType(12), projs: [] }; // in scope 6 at $DIR/address-of.rs:+20:9: +20:10
+                            debug p => _19; // in scope 6 at $DIR/address_of.rs:+13:9: +13:10
+                            let _29: *const [i32; 10] as UserTypeProjection { base: UserType(12), projs: [] }; // in scope 6 at $DIR/address_of.rs:+20:9: +20:10
                             scope 7 {
-                                debug p => _29; // in scope 7 at $DIR/address-of.rs:+20:9: +20:10
-                                let _30: *const [i32; 10] as UserTypeProjection { base: UserType(14), projs: [] }; // in scope 7 at $DIR/address-of.rs:+21:9: +21:10
+                                debug p => _29; // in scope 7 at $DIR/address_of.rs:+20:9: +20:10
+                                let _30: *const [i32; 10] as UserTypeProjection { base: UserType(14), projs: [] }; // in scope 7 at $DIR/address_of.rs:+21:9: +21:10
                                 scope 8 {
-                                    debug p => _30; // in scope 8 at $DIR/address-of.rs:+21:9: +21:10
-                                    let _31: *const dyn std::marker::Send as UserTypeProjection { base: UserType(16), projs: [] }; // in scope 8 at $DIR/address-of.rs:+22:9: +22:10
+                                    debug p => _30; // in scope 8 at $DIR/address_of.rs:+21:9: +21:10
+                                    let _31: *const dyn std::marker::Send as UserTypeProjection { base: UserType(16), projs: [] }; // in scope 8 at $DIR/address_of.rs:+22:9: +22:10
                                     scope 9 {
-                                        debug p => _31; // in scope 9 at $DIR/address-of.rs:+22:9: +22:10
-                                        let _33: *const [i32] as UserTypeProjection { base: UserType(18), projs: [] }; // in scope 9 at $DIR/address-of.rs:+23:9: +23:10
+                                        debug p => _31; // in scope 9 at $DIR/address_of.rs:+22:9: +22:10
+                                        let _33: *const [i32] as UserTypeProjection { base: UserType(18), projs: [] }; // in scope 9 at $DIR/address_of.rs:+23:9: +23:10
                                         scope 10 {
-                                            debug p => _33; // in scope 10 at $DIR/address-of.rs:+23:9: +23:10
-                                            let _43: *mut [i32; 10] as UserTypeProjection { base: UserType(22), projs: [] }; // in scope 10 at $DIR/address-of.rs:+30:9: +30:10
+                                            debug p => _33; // in scope 10 at $DIR/address_of.rs:+23:9: +23:10
+                                            let _43: *mut [i32; 10] as UserTypeProjection { base: UserType(22), projs: [] }; // in scope 10 at $DIR/address_of.rs:+30:9: +30:10
                                             scope 11 {
-                                                debug p => _43; // in scope 11 at $DIR/address-of.rs:+30:9: +30:10
-                                                let _44: *mut [i32; 10] as UserTypeProjection { base: UserType(24), projs: [] }; // in scope 11 at $DIR/address-of.rs:+31:9: +31:10
+                                                debug p => _43; // in scope 11 at $DIR/address_of.rs:+30:9: +30:10
+                                                let _44: *mut [i32; 10] as UserTypeProjection { base: UserType(24), projs: [] }; // in scope 11 at $DIR/address_of.rs:+31:9: +31:10
                                                 scope 12 {
-                                                    debug p => _44; // in scope 12 at $DIR/address-of.rs:+31:9: +31:10
-                                                    let _45: *mut dyn std::marker::Send as UserTypeProjection { base: UserType(26), projs: [] }; // in scope 12 at $DIR/address-of.rs:+32:9: +32:10
+                                                    debug p => _44; // in scope 12 at $DIR/address_of.rs:+31:9: +31:10
+                                                    let _45: *mut dyn std::marker::Send as UserTypeProjection { base: UserType(26), projs: [] }; // in scope 12 at $DIR/address_of.rs:+32:9: +32:10
                                                     scope 13 {
-                                                        debug p => _45; // in scope 13 at $DIR/address-of.rs:+32:9: +32:10
-                                                        let _47: *mut [i32] as UserTypeProjection { base: UserType(28), projs: [] }; // in scope 13 at $DIR/address-of.rs:+33:9: +33:10
+                                                        debug p => _45; // in scope 13 at $DIR/address_of.rs:+32:9: +32:10
+                                                        let _47: *mut [i32] as UserTypeProjection { base: UserType(28), projs: [] }; // in scope 13 at $DIR/address_of.rs:+33:9: +33:10
                                                         scope 14 {
-                                                            debug p => _47; // in scope 14 at $DIR/address-of.rs:+33:9: +33:10
+                                                            debug p => _47; // in scope 14 at $DIR/address_of.rs:+33:9: +33:10
                                                         }
                                                     }
                                                 }
@@ -126,183 +126,183 @@ fn address_of_reborrow() -> () {
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/address-of.rs:+1:9: +1:10
-        StorageLive(_2);                 // scope 0 at $DIR/address-of.rs:+1:14: +1:21
-        _2 = [const 0_i32; 10];          // scope 0 at $DIR/address-of.rs:+1:14: +1:21
-        _1 = &_2;                        // scope 0 at $DIR/address-of.rs:+1:13: +1:21
-        FakeRead(ForLet(None), _1);      // scope 0 at $DIR/address-of.rs:+1:9: +1:10
-        StorageLive(_3);                 // scope 1 at $DIR/address-of.rs:+2:9: +2:14
-        StorageLive(_4);                 // scope 1 at $DIR/address-of.rs:+2:22: +2:29
-        _4 = [const 0_i32; 10];          // scope 1 at $DIR/address-of.rs:+2:22: +2:29
-        _3 = &mut _4;                    // scope 1 at $DIR/address-of.rs:+2:17: +2:29
-        FakeRead(ForLet(None), _3);      // scope 1 at $DIR/address-of.rs:+2:9: +2:14
-        StorageLive(_5);                 // scope 2 at $DIR/address-of.rs:+4:5: +4:18
-        StorageLive(_6);                 // scope 2 at $DIR/address-of.rs:+4:5: +4:18
-        _6 = &raw const (*_1);           // scope 2 at $DIR/address-of.rs:+4:5: +4:6
-        AscribeUserType(_6, o, UserTypeProjection { base: UserType(0), projs: [] }); // scope 2 at $DIR/address-of.rs:+4:5: +4:18
-        _5 = _6;                         // scope 2 at $DIR/address-of.rs:+4:5: +4:18
-        StorageDead(_6);                 // scope 2 at $DIR/address-of.rs:+4:18: +4:19
-        StorageDead(_5);                 // scope 2 at $DIR/address-of.rs:+4:18: +4:19
-        StorageLive(_7);                 // scope 2 at $DIR/address-of.rs:+5:5: +5:26
-        _7 = &raw const (*_1);           // scope 2 at $DIR/address-of.rs:+5:5: +5:6
-        StorageDead(_7);                 // scope 2 at $DIR/address-of.rs:+5:26: +5:27
-        StorageLive(_8);                 // scope 2 at $DIR/address-of.rs:+6:5: +6:25
-        StorageLive(_9);                 // scope 2 at $DIR/address-of.rs:+6:5: +6:25
-        StorageLive(_10);                // scope 2 at $DIR/address-of.rs:+6:5: +6:6
-        _10 = &raw const (*_1);          // scope 2 at $DIR/address-of.rs:+6:5: +6:6
-        _9 = move _10 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 2 at $DIR/address-of.rs:+6:5: +6:6
-        StorageDead(_10);                // scope 2 at $DIR/address-of.rs:+6:5: +6:6
-        AscribeUserType(_9, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 2 at $DIR/address-of.rs:+6:5: +6:25
-        _8 = _9;                         // scope 2 at $DIR/address-of.rs:+6:5: +6:25
-        StorageDead(_9);                 // scope 2 at $DIR/address-of.rs:+6:25: +6:26
-        StorageDead(_8);                 // scope 2 at $DIR/address-of.rs:+6:25: +6:26
-        StorageLive(_11);                // scope 2 at $DIR/address-of.rs:+7:5: +7:22
-        StorageLive(_12);                // scope 2 at $DIR/address-of.rs:+7:5: +7:6
-        _12 = &raw const (*_1);          // scope 2 at $DIR/address-of.rs:+7:5: +7:6
-        _11 = move _12 as *const [i32] (Pointer(Unsize)); // scope 2 at $DIR/address-of.rs:+7:5: +7:6
-        StorageDead(_12);                // scope 2 at $DIR/address-of.rs:+7:5: +7:6
-        StorageDead(_11);                // scope 2 at $DIR/address-of.rs:+7:22: +7:23
-        StorageLive(_13);                // scope 2 at $DIR/address-of.rs:+8:5: +8:20
-        StorageLive(_14);                // scope 2 at $DIR/address-of.rs:+8:5: +8:6
-        _14 = &raw const (*_1);          // scope 2 at $DIR/address-of.rs:+8:5: +8:6
-        _13 = move _14 as *const i32 (Pointer(ArrayToPointer)); // scope 2 at $DIR/address-of.rs:+8:5: +8:20
-        StorageDead(_14);                // scope 2 at $DIR/address-of.rs:+8:19: +8:20
-        StorageDead(_13);                // scope 2 at $DIR/address-of.rs:+8:20: +8:21
-        StorageLive(_15);                // scope 2 at $DIR/address-of.rs:+10:9: +10:10
-        _15 = &raw const (*_1);          // scope 2 at $DIR/address-of.rs:+10:23: +10:24
-        FakeRead(ForLet(None), _15);     // scope 2 at $DIR/address-of.rs:+10:9: +10:10
-        AscribeUserType(_15, o, UserTypeProjection { base: UserType(3), projs: [] }); // scope 2 at $DIR/address-of.rs:+10:12: +10:20
-        StorageLive(_16);                // scope 3 at $DIR/address-of.rs:+11:9: +11:10
-        _16 = &raw const (*_1);          // scope 3 at $DIR/address-of.rs:+11:31: +11:32
-        FakeRead(ForLet(None), _16);     // scope 3 at $DIR/address-of.rs:+11:9: +11:10
-        AscribeUserType(_16, o, UserTypeProjection { base: UserType(5), projs: [] }); // scope 3 at $DIR/address-of.rs:+11:12: +11:28
-        StorageLive(_17);                // scope 4 at $DIR/address-of.rs:+12:9: +12:10
-        StorageLive(_18);                // scope 4 at $DIR/address-of.rs:+12:30: +12:31
-        _18 = &raw const (*_1);          // scope 4 at $DIR/address-of.rs:+12:30: +12:31
-        _17 = move _18 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 4 at $DIR/address-of.rs:+12:30: +12:31
-        StorageDead(_18);                // scope 4 at $DIR/address-of.rs:+12:30: +12:31
-        FakeRead(ForLet(None), _17);     // scope 4 at $DIR/address-of.rs:+12:9: +12:10
-        AscribeUserType(_17, o, UserTypeProjection { base: UserType(7), projs: [] }); // scope 4 at $DIR/address-of.rs:+12:12: +12:27
-        StorageLive(_19);                // scope 5 at $DIR/address-of.rs:+13:9: +13:10
-        StorageLive(_20);                // scope 5 at $DIR/address-of.rs:+13:27: +13:28
-        _20 = &raw const (*_1);          // scope 5 at $DIR/address-of.rs:+13:27: +13:28
-        _19 = move _20 as *const [i32] (Pointer(Unsize)); // scope 5 at $DIR/address-of.rs:+13:27: +13:28
-        StorageDead(_20);                // scope 5 at $DIR/address-of.rs:+13:27: +13:28
-        FakeRead(ForLet(None), _19);     // scope 5 at $DIR/address-of.rs:+13:9: +13:10
-        AscribeUserType(_19, o, UserTypeProjection { base: UserType(9), projs: [] }); // scope 5 at $DIR/address-of.rs:+13:12: +13:24
-        StorageLive(_21);                // scope 6 at $DIR/address-of.rs:+15:5: +15:18
-        StorageLive(_22);                // scope 6 at $DIR/address-of.rs:+15:5: +15:18
-        _22 = &raw const (*_3);          // scope 6 at $DIR/address-of.rs:+15:5: +15:6
-        AscribeUserType(_22, o, UserTypeProjection { base: UserType(10), projs: [] }); // scope 6 at $DIR/address-of.rs:+15:5: +15:18
-        _21 = _22;                       // scope 6 at $DIR/address-of.rs:+15:5: +15:18
-        StorageDead(_22);                // scope 6 at $DIR/address-of.rs:+15:18: +15:19
-        StorageDead(_21);                // scope 6 at $DIR/address-of.rs:+15:18: +15:19
-        StorageLive(_23);                // scope 6 at $DIR/address-of.rs:+16:5: +16:26
-        _23 = &raw const (*_3);          // scope 6 at $DIR/address-of.rs:+16:5: +16:6
-        StorageDead(_23);                // scope 6 at $DIR/address-of.rs:+16:26: +16:27
-        StorageLive(_24);                // scope 6 at $DIR/address-of.rs:+17:5: +17:25
-        StorageLive(_25);                // scope 6 at $DIR/address-of.rs:+17:5: +17:25
-        StorageLive(_26);                // scope 6 at $DIR/address-of.rs:+17:5: +17:6
-        _26 = &raw const (*_3);          // scope 6 at $DIR/address-of.rs:+17:5: +17:6
-        _25 = move _26 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 6 at $DIR/address-of.rs:+17:5: +17:6
-        StorageDead(_26);                // scope 6 at $DIR/address-of.rs:+17:5: +17:6
-        AscribeUserType(_25, o, UserTypeProjection { base: UserType(11), projs: [] }); // scope 6 at $DIR/address-of.rs:+17:5: +17:25
-        _24 = _25;                       // scope 6 at $DIR/address-of.rs:+17:5: +17:25
-        StorageDead(_25);                // scope 6 at $DIR/address-of.rs:+17:25: +17:26
-        StorageDead(_24);                // scope 6 at $DIR/address-of.rs:+17:25: +17:26
-        StorageLive(_27);                // scope 6 at $DIR/address-of.rs:+18:5: +18:22
-        StorageLive(_28);                // scope 6 at $DIR/address-of.rs:+18:5: +18:6
-        _28 = &raw const (*_3);          // scope 6 at $DIR/address-of.rs:+18:5: +18:6
-        _27 = move _28 as *const [i32] (Pointer(Unsize)); // scope 6 at $DIR/address-of.rs:+18:5: +18:6
-        StorageDead(_28);                // scope 6 at $DIR/address-of.rs:+18:5: +18:6
-        StorageDead(_27);                // scope 6 at $DIR/address-of.rs:+18:22: +18:23
-        StorageLive(_29);                // scope 6 at $DIR/address-of.rs:+20:9: +20:10
-        _29 = &raw const (*_3);          // scope 6 at $DIR/address-of.rs:+20:23: +20:24
-        FakeRead(ForLet(None), _29);     // scope 6 at $DIR/address-of.rs:+20:9: +20:10
-        AscribeUserType(_29, o, UserTypeProjection { base: UserType(13), projs: [] }); // scope 6 at $DIR/address-of.rs:+20:12: +20:20
-        StorageLive(_30);                // scope 7 at $DIR/address-of.rs:+21:9: +21:10
-        _30 = &raw const (*_3);          // scope 7 at $DIR/address-of.rs:+21:31: +21:32
-        FakeRead(ForLet(None), _30);     // scope 7 at $DIR/address-of.rs:+21:9: +21:10
-        AscribeUserType(_30, o, UserTypeProjection { base: UserType(15), projs: [] }); // scope 7 at $DIR/address-of.rs:+21:12: +21:28
-        StorageLive(_31);                // scope 8 at $DIR/address-of.rs:+22:9: +22:10
-        StorageLive(_32);                // scope 8 at $DIR/address-of.rs:+22:30: +22:31
-        _32 = &raw const (*_3);          // scope 8 at $DIR/address-of.rs:+22:30: +22:31
-        _31 = move _32 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 8 at $DIR/address-of.rs:+22:30: +22:31
-        StorageDead(_32);                // scope 8 at $DIR/address-of.rs:+22:30: +22:31
-        FakeRead(ForLet(None), _31);     // scope 8 at $DIR/address-of.rs:+22:9: +22:10
-        AscribeUserType(_31, o, UserTypeProjection { base: UserType(17), projs: [] }); // scope 8 at $DIR/address-of.rs:+22:12: +22:27
-        StorageLive(_33);                // scope 9 at $DIR/address-of.rs:+23:9: +23:10
-        StorageLive(_34);                // scope 9 at $DIR/address-of.rs:+23:27: +23:28
-        _34 = &raw const (*_3);          // scope 9 at $DIR/address-of.rs:+23:27: +23:28
-        _33 = move _34 as *const [i32] (Pointer(Unsize)); // scope 9 at $DIR/address-of.rs:+23:27: +23:28
-        StorageDead(_34);                // scope 9 at $DIR/address-of.rs:+23:27: +23:28
-        FakeRead(ForLet(None), _33);     // scope 9 at $DIR/address-of.rs:+23:9: +23:10
-        AscribeUserType(_33, o, UserTypeProjection { base: UserType(19), projs: [] }); // scope 9 at $DIR/address-of.rs:+23:12: +23:24
-        StorageLive(_35);                // scope 10 at $DIR/address-of.rs:+25:5: +25:16
-        StorageLive(_36);                // scope 10 at $DIR/address-of.rs:+25:5: +25:16
-        _36 = &raw mut (*_3);            // scope 10 at $DIR/address-of.rs:+25:5: +25:6
-        AscribeUserType(_36, o, UserTypeProjection { base: UserType(20), projs: [] }); // scope 10 at $DIR/address-of.rs:+25:5: +25:16
-        _35 = _36;                       // scope 10 at $DIR/address-of.rs:+25:5: +25:16
-        StorageDead(_36);                // scope 10 at $DIR/address-of.rs:+25:16: +25:17
-        StorageDead(_35);                // scope 10 at $DIR/address-of.rs:+25:16: +25:17
-        StorageLive(_37);                // scope 10 at $DIR/address-of.rs:+26:5: +26:24
-        _37 = &raw mut (*_3);            // scope 10 at $DIR/address-of.rs:+26:5: +26:6
-        StorageDead(_37);                // scope 10 at $DIR/address-of.rs:+26:24: +26:25
-        StorageLive(_38);                // scope 10 at $DIR/address-of.rs:+27:5: +27:23
-        StorageLive(_39);                // scope 10 at $DIR/address-of.rs:+27:5: +27:23
-        StorageLive(_40);                // scope 10 at $DIR/address-of.rs:+27:5: +27:6
-        _40 = &raw mut (*_3);            // scope 10 at $DIR/address-of.rs:+27:5: +27:6
-        _39 = move _40 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 10 at $DIR/address-of.rs:+27:5: +27:6
-        StorageDead(_40);                // scope 10 at $DIR/address-of.rs:+27:5: +27:6
-        AscribeUserType(_39, o, UserTypeProjection { base: UserType(21), projs: [] }); // scope 10 at $DIR/address-of.rs:+27:5: +27:23
-        _38 = _39;                       // scope 10 at $DIR/address-of.rs:+27:5: +27:23
-        StorageDead(_39);                // scope 10 at $DIR/address-of.rs:+27:23: +27:24
-        StorageDead(_38);                // scope 10 at $DIR/address-of.rs:+27:23: +27:24
-        StorageLive(_41);                // scope 10 at $DIR/address-of.rs:+28:5: +28:20
-        StorageLive(_42);                // scope 10 at $DIR/address-of.rs:+28:5: +28:6
-        _42 = &raw mut (*_3);            // scope 10 at $DIR/address-of.rs:+28:5: +28:6
-        _41 = move _42 as *mut [i32] (Pointer(Unsize)); // scope 10 at $DIR/address-of.rs:+28:5: +28:6
-        StorageDead(_42);                // scope 10 at $DIR/address-of.rs:+28:5: +28:6
-        StorageDead(_41);                // scope 10 at $DIR/address-of.rs:+28:20: +28:21
-        StorageLive(_43);                // scope 10 at $DIR/address-of.rs:+30:9: +30:10
-        _43 = &raw mut (*_3);            // scope 10 at $DIR/address-of.rs:+30:21: +30:22
-        FakeRead(ForLet(None), _43);     // scope 10 at $DIR/address-of.rs:+30:9: +30:10
-        AscribeUserType(_43, o, UserTypeProjection { base: UserType(23), projs: [] }); // scope 10 at $DIR/address-of.rs:+30:12: +30:18
-        StorageLive(_44);                // scope 11 at $DIR/address-of.rs:+31:9: +31:10
-        _44 = &raw mut (*_3);            // scope 11 at $DIR/address-of.rs:+31:29: +31:30
-        FakeRead(ForLet(None), _44);     // scope 11 at $DIR/address-of.rs:+31:9: +31:10
-        AscribeUserType(_44, o, UserTypeProjection { base: UserType(25), projs: [] }); // scope 11 at $DIR/address-of.rs:+31:12: +31:26
-        StorageLive(_45);                // scope 12 at $DIR/address-of.rs:+32:9: +32:10
-        StorageLive(_46);                // scope 12 at $DIR/address-of.rs:+32:28: +32:29
-        _46 = &raw mut (*_3);            // scope 12 at $DIR/address-of.rs:+32:28: +32:29
-        _45 = move _46 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 12 at $DIR/address-of.rs:+32:28: +32:29
-        StorageDead(_46);                // scope 12 at $DIR/address-of.rs:+32:28: +32:29
-        FakeRead(ForLet(None), _45);     // scope 12 at $DIR/address-of.rs:+32:9: +32:10
-        AscribeUserType(_45, o, UserTypeProjection { base: UserType(27), projs: [] }); // scope 12 at $DIR/address-of.rs:+32:12: +32:25
-        StorageLive(_47);                // scope 13 at $DIR/address-of.rs:+33:9: +33:10
-        StorageLive(_48);                // scope 13 at $DIR/address-of.rs:+33:25: +33:26
-        _48 = &raw mut (*_3);            // scope 13 at $DIR/address-of.rs:+33:25: +33:26
-        _47 = move _48 as *mut [i32] (Pointer(Unsize)); // scope 13 at $DIR/address-of.rs:+33:25: +33:26
-        StorageDead(_48);                // scope 13 at $DIR/address-of.rs:+33:25: +33:26
-        FakeRead(ForLet(None), _47);     // scope 13 at $DIR/address-of.rs:+33:9: +33:10
-        AscribeUserType(_47, o, UserTypeProjection { base: UserType(29), projs: [] }); // scope 13 at $DIR/address-of.rs:+33:12: +33:22
-        _0 = const ();                   // scope 0 at $DIR/address-of.rs:+0:26: +34:2
-        StorageDead(_47);                // scope 13 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_45);                // scope 12 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_44);                // scope 11 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_43);                // scope 10 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_33);                // scope 9 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_31);                // scope 8 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_30);                // scope 7 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_29);                // scope 6 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_19);                // scope 5 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_17);                // scope 4 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_16);                // scope 3 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_15);                // scope 2 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_4);                 // scope 1 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_3);                 // scope 1 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_2);                 // scope 0 at $DIR/address-of.rs:+34:1: +34:2
-        StorageDead(_1);                 // scope 0 at $DIR/address-of.rs:+34:1: +34:2
-        return;                          // scope 0 at $DIR/address-of.rs:+34:2: +34:2
+        StorageLive(_1);                 // scope 0 at $DIR/address_of.rs:+1:9: +1:10
+        StorageLive(_2);                 // scope 0 at $DIR/address_of.rs:+1:14: +1:21
+        _2 = [const 0_i32; 10];          // scope 0 at $DIR/address_of.rs:+1:14: +1:21
+        _1 = &_2;                        // scope 0 at $DIR/address_of.rs:+1:13: +1:21
+        FakeRead(ForLet(None), _1);      // scope 0 at $DIR/address_of.rs:+1:9: +1:10
+        StorageLive(_3);                 // scope 1 at $DIR/address_of.rs:+2:9: +2:14
+        StorageLive(_4);                 // scope 1 at $DIR/address_of.rs:+2:22: +2:29
+        _4 = [const 0_i32; 10];          // scope 1 at $DIR/address_of.rs:+2:22: +2:29
+        _3 = &mut _4;                    // scope 1 at $DIR/address_of.rs:+2:17: +2:29
+        FakeRead(ForLet(None), _3);      // scope 1 at $DIR/address_of.rs:+2:9: +2:14
+        StorageLive(_5);                 // scope 2 at $DIR/address_of.rs:+4:5: +4:18
+        StorageLive(_6);                 // scope 2 at $DIR/address_of.rs:+4:5: +4:18
+        _6 = &raw const (*_1);           // scope 2 at $DIR/address_of.rs:+4:5: +4:6
+        AscribeUserType(_6, o, UserTypeProjection { base: UserType(0), projs: [] }); // scope 2 at $DIR/address_of.rs:+4:5: +4:18
+        _5 = _6;                         // scope 2 at $DIR/address_of.rs:+4:5: +4:18
+        StorageDead(_6);                 // scope 2 at $DIR/address_of.rs:+4:18: +4:19
+        StorageDead(_5);                 // scope 2 at $DIR/address_of.rs:+4:18: +4:19
+        StorageLive(_7);                 // scope 2 at $DIR/address_of.rs:+5:5: +5:26
+        _7 = &raw const (*_1);           // scope 2 at $DIR/address_of.rs:+5:5: +5:6
+        StorageDead(_7);                 // scope 2 at $DIR/address_of.rs:+5:26: +5:27
+        StorageLive(_8);                 // scope 2 at $DIR/address_of.rs:+6:5: +6:25
+        StorageLive(_9);                 // scope 2 at $DIR/address_of.rs:+6:5: +6:25
+        StorageLive(_10);                // scope 2 at $DIR/address_of.rs:+6:5: +6:6
+        _10 = &raw const (*_1);          // scope 2 at $DIR/address_of.rs:+6:5: +6:6
+        _9 = move _10 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 2 at $DIR/address_of.rs:+6:5: +6:6
+        StorageDead(_10);                // scope 2 at $DIR/address_of.rs:+6:5: +6:6
+        AscribeUserType(_9, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 2 at $DIR/address_of.rs:+6:5: +6:25
+        _8 = _9;                         // scope 2 at $DIR/address_of.rs:+6:5: +6:25
+        StorageDead(_9);                 // scope 2 at $DIR/address_of.rs:+6:25: +6:26
+        StorageDead(_8);                 // scope 2 at $DIR/address_of.rs:+6:25: +6:26
+        StorageLive(_11);                // scope 2 at $DIR/address_of.rs:+7:5: +7:22
+        StorageLive(_12);                // scope 2 at $DIR/address_of.rs:+7:5: +7:6
+        _12 = &raw const (*_1);          // scope 2 at $DIR/address_of.rs:+7:5: +7:6
+        _11 = move _12 as *const [i32] (Pointer(Unsize)); // scope 2 at $DIR/address_of.rs:+7:5: +7:6
+        StorageDead(_12);                // scope 2 at $DIR/address_of.rs:+7:5: +7:6
+        StorageDead(_11);                // scope 2 at $DIR/address_of.rs:+7:22: +7:23
+        StorageLive(_13);                // scope 2 at $DIR/address_of.rs:+8:5: +8:20
+        StorageLive(_14);                // scope 2 at $DIR/address_of.rs:+8:5: +8:6
+        _14 = &raw const (*_1);          // scope 2 at $DIR/address_of.rs:+8:5: +8:6
+        _13 = move _14 as *const i32 (Pointer(ArrayToPointer)); // scope 2 at $DIR/address_of.rs:+8:5: +8:20
+        StorageDead(_14);                // scope 2 at $DIR/address_of.rs:+8:19: +8:20
+        StorageDead(_13);                // scope 2 at $DIR/address_of.rs:+8:20: +8:21
+        StorageLive(_15);                // scope 2 at $DIR/address_of.rs:+10:9: +10:10
+        _15 = &raw const (*_1);          // scope 2 at $DIR/address_of.rs:+10:23: +10:24
+        FakeRead(ForLet(None), _15);     // scope 2 at $DIR/address_of.rs:+10:9: +10:10
+        AscribeUserType(_15, o, UserTypeProjection { base: UserType(3), projs: [] }); // scope 2 at $DIR/address_of.rs:+10:12: +10:20
+        StorageLive(_16);                // scope 3 at $DIR/address_of.rs:+11:9: +11:10
+        _16 = &raw const (*_1);          // scope 3 at $DIR/address_of.rs:+11:31: +11:32
+        FakeRead(ForLet(None), _16);     // scope 3 at $DIR/address_of.rs:+11:9: +11:10
+        AscribeUserType(_16, o, UserTypeProjection { base: UserType(5), projs: [] }); // scope 3 at $DIR/address_of.rs:+11:12: +11:28
+        StorageLive(_17);                // scope 4 at $DIR/address_of.rs:+12:9: +12:10
+        StorageLive(_18);                // scope 4 at $DIR/address_of.rs:+12:30: +12:31
+        _18 = &raw const (*_1);          // scope 4 at $DIR/address_of.rs:+12:30: +12:31
+        _17 = move _18 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 4 at $DIR/address_of.rs:+12:30: +12:31
+        StorageDead(_18);                // scope 4 at $DIR/address_of.rs:+12:30: +12:31
+        FakeRead(ForLet(None), _17);     // scope 4 at $DIR/address_of.rs:+12:9: +12:10
+        AscribeUserType(_17, o, UserTypeProjection { base: UserType(7), projs: [] }); // scope 4 at $DIR/address_of.rs:+12:12: +12:27
+        StorageLive(_19);                // scope 5 at $DIR/address_of.rs:+13:9: +13:10
+        StorageLive(_20);                // scope 5 at $DIR/address_of.rs:+13:27: +13:28
+        _20 = &raw const (*_1);          // scope 5 at $DIR/address_of.rs:+13:27: +13:28
+        _19 = move _20 as *const [i32] (Pointer(Unsize)); // scope 5 at $DIR/address_of.rs:+13:27: +13:28
+        StorageDead(_20);                // scope 5 at $DIR/address_of.rs:+13:27: +13:28
+        FakeRead(ForLet(None), _19);     // scope 5 at $DIR/address_of.rs:+13:9: +13:10
+        AscribeUserType(_19, o, UserTypeProjection { base: UserType(9), projs: [] }); // scope 5 at $DIR/address_of.rs:+13:12: +13:24
+        StorageLive(_21);                // scope 6 at $DIR/address_of.rs:+15:5: +15:18
+        StorageLive(_22);                // scope 6 at $DIR/address_of.rs:+15:5: +15:18
+        _22 = &raw const (*_3);          // scope 6 at $DIR/address_of.rs:+15:5: +15:6
+        AscribeUserType(_22, o, UserTypeProjection { base: UserType(10), projs: [] }); // scope 6 at $DIR/address_of.rs:+15:5: +15:18
+        _21 = _22;                       // scope 6 at $DIR/address_of.rs:+15:5: +15:18
+        StorageDead(_22);                // scope 6 at $DIR/address_of.rs:+15:18: +15:19
+        StorageDead(_21);                // scope 6 at $DIR/address_of.rs:+15:18: +15:19
+        StorageLive(_23);                // scope 6 at $DIR/address_of.rs:+16:5: +16:26
+        _23 = &raw const (*_3);          // scope 6 at $DIR/address_of.rs:+16:5: +16:6
+        StorageDead(_23);                // scope 6 at $DIR/address_of.rs:+16:26: +16:27
+        StorageLive(_24);                // scope 6 at $DIR/address_of.rs:+17:5: +17:25
+        StorageLive(_25);                // scope 6 at $DIR/address_of.rs:+17:5: +17:25
+        StorageLive(_26);                // scope 6 at $DIR/address_of.rs:+17:5: +17:6
+        _26 = &raw const (*_3);          // scope 6 at $DIR/address_of.rs:+17:5: +17:6
+        _25 = move _26 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 6 at $DIR/address_of.rs:+17:5: +17:6
+        StorageDead(_26);                // scope 6 at $DIR/address_of.rs:+17:5: +17:6
+        AscribeUserType(_25, o, UserTypeProjection { base: UserType(11), projs: [] }); // scope 6 at $DIR/address_of.rs:+17:5: +17:25
+        _24 = _25;                       // scope 6 at $DIR/address_of.rs:+17:5: +17:25
+        StorageDead(_25);                // scope 6 at $DIR/address_of.rs:+17:25: +17:26
+        StorageDead(_24);                // scope 6 at $DIR/address_of.rs:+17:25: +17:26
+        StorageLive(_27);                // scope 6 at $DIR/address_of.rs:+18:5: +18:22
+        StorageLive(_28);                // scope 6 at $DIR/address_of.rs:+18:5: +18:6
+        _28 = &raw const (*_3);          // scope 6 at $DIR/address_of.rs:+18:5: +18:6
+        _27 = move _28 as *const [i32] (Pointer(Unsize)); // scope 6 at $DIR/address_of.rs:+18:5: +18:6
+        StorageDead(_28);                // scope 6 at $DIR/address_of.rs:+18:5: +18:6
+        StorageDead(_27);                // scope 6 at $DIR/address_of.rs:+18:22: +18:23
+        StorageLive(_29);                // scope 6 at $DIR/address_of.rs:+20:9: +20:10
+        _29 = &raw const (*_3);          // scope 6 at $DIR/address_of.rs:+20:23: +20:24
+        FakeRead(ForLet(None), _29);     // scope 6 at $DIR/address_of.rs:+20:9: +20:10
+        AscribeUserType(_29, o, UserTypeProjection { base: UserType(13), projs: [] }); // scope 6 at $DIR/address_of.rs:+20:12: +20:20
+        StorageLive(_30);                // scope 7 at $DIR/address_of.rs:+21:9: +21:10
+        _30 = &raw const (*_3);          // scope 7 at $DIR/address_of.rs:+21:31: +21:32
+        FakeRead(ForLet(None), _30);     // scope 7 at $DIR/address_of.rs:+21:9: +21:10
+        AscribeUserType(_30, o, UserTypeProjection { base: UserType(15), projs: [] }); // scope 7 at $DIR/address_of.rs:+21:12: +21:28
+        StorageLive(_31);                // scope 8 at $DIR/address_of.rs:+22:9: +22:10
+        StorageLive(_32);                // scope 8 at $DIR/address_of.rs:+22:30: +22:31
+        _32 = &raw const (*_3);          // scope 8 at $DIR/address_of.rs:+22:30: +22:31
+        _31 = move _32 as *const dyn std::marker::Send (Pointer(Unsize)); // scope 8 at $DIR/address_of.rs:+22:30: +22:31
+        StorageDead(_32);                // scope 8 at $DIR/address_of.rs:+22:30: +22:31
+        FakeRead(ForLet(None), _31);     // scope 8 at $DIR/address_of.rs:+22:9: +22:10
+        AscribeUserType(_31, o, UserTypeProjection { base: UserType(17), projs: [] }); // scope 8 at $DIR/address_of.rs:+22:12: +22:27
+        StorageLive(_33);                // scope 9 at $DIR/address_of.rs:+23:9: +23:10
+        StorageLive(_34);                // scope 9 at $DIR/address_of.rs:+23:27: +23:28
+        _34 = &raw const (*_3);          // scope 9 at $DIR/address_of.rs:+23:27: +23:28
+        _33 = move _34 as *const [i32] (Pointer(Unsize)); // scope 9 at $DIR/address_of.rs:+23:27: +23:28
+        StorageDead(_34);                // scope 9 at $DIR/address_of.rs:+23:27: +23:28
+        FakeRead(ForLet(None), _33);     // scope 9 at $DIR/address_of.rs:+23:9: +23:10
+        AscribeUserType(_33, o, UserTypeProjection { base: UserType(19), projs: [] }); // scope 9 at $DIR/address_of.rs:+23:12: +23:24
+        StorageLive(_35);                // scope 10 at $DIR/address_of.rs:+25:5: +25:16
+        StorageLive(_36);                // scope 10 at $DIR/address_of.rs:+25:5: +25:16
+        _36 = &raw mut (*_3);            // scope 10 at $DIR/address_of.rs:+25:5: +25:6
+        AscribeUserType(_36, o, UserTypeProjection { base: UserType(20), projs: [] }); // scope 10 at $DIR/address_of.rs:+25:5: +25:16
+        _35 = _36;                       // scope 10 at $DIR/address_of.rs:+25:5: +25:16
+        StorageDead(_36);                // scope 10 at $DIR/address_of.rs:+25:16: +25:17
+        StorageDead(_35);                // scope 10 at $DIR/address_of.rs:+25:16: +25:17
+        StorageLive(_37);                // scope 10 at $DIR/address_of.rs:+26:5: +26:24
+        _37 = &raw mut (*_3);            // scope 10 at $DIR/address_of.rs:+26:5: +26:6
+        StorageDead(_37);                // scope 10 at $DIR/address_of.rs:+26:24: +26:25
+        StorageLive(_38);                // scope 10 at $DIR/address_of.rs:+27:5: +27:23
+        StorageLive(_39);                // scope 10 at $DIR/address_of.rs:+27:5: +27:23
+        StorageLive(_40);                // scope 10 at $DIR/address_of.rs:+27:5: +27:6
+        _40 = &raw mut (*_3);            // scope 10 at $DIR/address_of.rs:+27:5: +27:6
+        _39 = move _40 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 10 at $DIR/address_of.rs:+27:5: +27:6
+        StorageDead(_40);                // scope 10 at $DIR/address_of.rs:+27:5: +27:6
+        AscribeUserType(_39, o, UserTypeProjection { base: UserType(21), projs: [] }); // scope 10 at $DIR/address_of.rs:+27:5: +27:23
+        _38 = _39;                       // scope 10 at $DIR/address_of.rs:+27:5: +27:23
+        StorageDead(_39);                // scope 10 at $DIR/address_of.rs:+27:23: +27:24
+        StorageDead(_38);                // scope 10 at $DIR/address_of.rs:+27:23: +27:24
+        StorageLive(_41);                // scope 10 at $DIR/address_of.rs:+28:5: +28:20
+        StorageLive(_42);                // scope 10 at $DIR/address_of.rs:+28:5: +28:6
+        _42 = &raw mut (*_3);            // scope 10 at $DIR/address_of.rs:+28:5: +28:6
+        _41 = move _42 as *mut [i32] (Pointer(Unsize)); // scope 10 at $DIR/address_of.rs:+28:5: +28:6
+        StorageDead(_42);                // scope 10 at $DIR/address_of.rs:+28:5: +28:6
+        StorageDead(_41);                // scope 10 at $DIR/address_of.rs:+28:20: +28:21
+        StorageLive(_43);                // scope 10 at $DIR/address_of.rs:+30:9: +30:10
+        _43 = &raw mut (*_3);            // scope 10 at $DIR/address_of.rs:+30:21: +30:22
+        FakeRead(ForLet(None), _43);     // scope 10 at $DIR/address_of.rs:+30:9: +30:10
+        AscribeUserType(_43, o, UserTypeProjection { base: UserType(23), projs: [] }); // scope 10 at $DIR/address_of.rs:+30:12: +30:18
+        StorageLive(_44);                // scope 11 at $DIR/address_of.rs:+31:9: +31:10
+        _44 = &raw mut (*_3);            // scope 11 at $DIR/address_of.rs:+31:29: +31:30
+        FakeRead(ForLet(None), _44);     // scope 11 at $DIR/address_of.rs:+31:9: +31:10
+        AscribeUserType(_44, o, UserTypeProjection { base: UserType(25), projs: [] }); // scope 11 at $DIR/address_of.rs:+31:12: +31:26
+        StorageLive(_45);                // scope 12 at $DIR/address_of.rs:+32:9: +32:10
+        StorageLive(_46);                // scope 12 at $DIR/address_of.rs:+32:28: +32:29
+        _46 = &raw mut (*_3);            // scope 12 at $DIR/address_of.rs:+32:28: +32:29
+        _45 = move _46 as *mut dyn std::marker::Send (Pointer(Unsize)); // scope 12 at $DIR/address_of.rs:+32:28: +32:29
+        StorageDead(_46);                // scope 12 at $DIR/address_of.rs:+32:28: +32:29
+        FakeRead(ForLet(None), _45);     // scope 12 at $DIR/address_of.rs:+32:9: +32:10
+        AscribeUserType(_45, o, UserTypeProjection { base: UserType(27), projs: [] }); // scope 12 at $DIR/address_of.rs:+32:12: +32:25
+        StorageLive(_47);                // scope 13 at $DIR/address_of.rs:+33:9: +33:10
+        StorageLive(_48);                // scope 13 at $DIR/address_of.rs:+33:25: +33:26
+        _48 = &raw mut (*_3);            // scope 13 at $DIR/address_of.rs:+33:25: +33:26
+        _47 = move _48 as *mut [i32] (Pointer(Unsize)); // scope 13 at $DIR/address_of.rs:+33:25: +33:26
+        StorageDead(_48);                // scope 13 at $DIR/address_of.rs:+33:25: +33:26
+        FakeRead(ForLet(None), _47);     // scope 13 at $DIR/address_of.rs:+33:9: +33:10
+        AscribeUserType(_47, o, UserTypeProjection { base: UserType(29), projs: [] }); // scope 13 at $DIR/address_of.rs:+33:12: +33:22
+        _0 = const ();                   // scope 0 at $DIR/address_of.rs:+0:26: +34:2
+        StorageDead(_47);                // scope 13 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_45);                // scope 12 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_44);                // scope 11 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_43);                // scope 10 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_33);                // scope 9 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_31);                // scope 8 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_30);                // scope 7 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_29);                // scope 6 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_19);                // scope 5 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_17);                // scope 4 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_16);                // scope 3 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_15);                // scope 2 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_4);                 // scope 1 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_3);                 // scope 1 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_2);                 // scope 0 at $DIR/address_of.rs:+34:1: +34:2
+        StorageDead(_1);                 // scope 0 at $DIR/address_of.rs:+34:1: +34:2
+        return;                          // scope 0 at $DIR/address_of.rs:+34:2: +34:2
     }
 }
diff --git a/src/test/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir b/src/test/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir
index 060077b8adb..4c67376b56a 100644
--- a/src/test/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir
+++ b/src/test/mir-opt/address_of.borrow_and_cast.SimplifyCfg-initial.after.mir
@@ -1,47 +1,47 @@
 // MIR for `borrow_and_cast` after SimplifyCfg-initial
 
 fn borrow_and_cast(_1: i32) -> () {
-    debug x => _1;                       // in scope 0 at $DIR/address-of.rs:+0:20: +0:25
-    let mut _0: ();                      // return place in scope 0 at $DIR/address-of.rs:+0:32: +0:32
-    let _2: *const i32;                  // in scope 0 at $DIR/address-of.rs:+1:9: +1:10
-    let _3: &i32;                        // in scope 0 at $DIR/address-of.rs:+1:13: +1:15
-    let _5: &mut i32;                    // in scope 0 at $DIR/address-of.rs:+2:13: +2:19
-    let mut _7: &mut i32;                // in scope 0 at $DIR/address-of.rs:+3:13: +3:19
+    debug x => _1;                       // in scope 0 at $DIR/address_of.rs:+0:20: +0:25
+    let mut _0: ();                      // return place in scope 0 at $DIR/address_of.rs:+0:32: +0:32
+    let _2: *const i32;                  // in scope 0 at $DIR/address_of.rs:+1:9: +1:10
+    let _3: &i32;                        // in scope 0 at $DIR/address_of.rs:+1:13: +1:15
+    let _5: &mut i32;                    // in scope 0 at $DIR/address_of.rs:+2:13: +2:19
+    let mut _7: &mut i32;                // in scope 0 at $DIR/address_of.rs:+3:13: +3:19
     scope 1 {
-        debug p => _2;                   // in scope 1 at $DIR/address-of.rs:+1:9: +1:10
-        let _4: *const i32;              // in scope 1 at $DIR/address-of.rs:+2:9: +2:10
+        debug p => _2;                   // in scope 1 at $DIR/address_of.rs:+1:9: +1:10
+        let _4: *const i32;              // in scope 1 at $DIR/address_of.rs:+2:9: +2:10
         scope 2 {
-            debug q => _4;               // in scope 2 at $DIR/address-of.rs:+2:9: +2:10
-            let _6: *mut i32;            // in scope 2 at $DIR/address-of.rs:+3:9: +3:10
+            debug q => _4;               // in scope 2 at $DIR/address_of.rs:+2:9: +2:10
+            let _6: *mut i32;            // in scope 2 at $DIR/address_of.rs:+3:9: +3:10
             scope 3 {
-                debug r => _6;           // in scope 3 at $DIR/address-of.rs:+3:9: +3:10
+                debug r => _6;           // in scope 3 at $DIR/address_of.rs:+3:9: +3:10
             }
         }
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/address-of.rs:+1:9: +1:10
-        StorageLive(_3);                 // scope 0 at $DIR/address-of.rs:+1:13: +1:15
-        _3 = &_1;                        // scope 0 at $DIR/address-of.rs:+1:13: +1:15
-        _2 = &raw const (*_3);           // scope 0 at $DIR/address-of.rs:+1:13: +1:15
-        FakeRead(ForLet(None), _2);      // scope 0 at $DIR/address-of.rs:+1:9: +1:10
-        StorageDead(_3);                 // scope 0 at $DIR/address-of.rs:+1:29: +1:30
-        StorageLive(_4);                 // scope 1 at $DIR/address-of.rs:+2:9: +2:10
-        StorageLive(_5);                 // scope 1 at $DIR/address-of.rs:+2:13: +2:19
-        _5 = &mut _1;                    // scope 1 at $DIR/address-of.rs:+2:13: +2:19
-        _4 = &raw const (*_5);           // scope 1 at $DIR/address-of.rs:+2:13: +2:19
-        FakeRead(ForLet(None), _4);      // scope 1 at $DIR/address-of.rs:+2:9: +2:10
-        StorageDead(_5);                 // scope 1 at $DIR/address-of.rs:+2:33: +2:34
-        StorageLive(_6);                 // scope 2 at $DIR/address-of.rs:+3:9: +3:10
-        StorageLive(_7);                 // scope 2 at $DIR/address-of.rs:+3:13: +3:19
-        _7 = &mut _1;                    // scope 2 at $DIR/address-of.rs:+3:13: +3:19
-        _6 = &raw mut (*_7);             // scope 2 at $DIR/address-of.rs:+3:13: +3:19
-        FakeRead(ForLet(None), _6);      // scope 2 at $DIR/address-of.rs:+3:9: +3:10
-        StorageDead(_7);                 // scope 2 at $DIR/address-of.rs:+3:31: +3:32
-        _0 = const ();                   // scope 0 at $DIR/address-of.rs:+0:32: +4:2
-        StorageDead(_6);                 // scope 2 at $DIR/address-of.rs:+4:1: +4:2
-        StorageDead(_4);                 // scope 1 at $DIR/address-of.rs:+4:1: +4:2
-        StorageDead(_2);                 // scope 0 at $DIR/address-of.rs:+4:1: +4:2
-        return;                          // scope 0 at $DIR/address-of.rs:+4:2: +4:2
+        StorageLive(_2);                 // scope 0 at $DIR/address_of.rs:+1:9: +1:10
+        StorageLive(_3);                 // scope 0 at $DIR/address_of.rs:+1:13: +1:15
+        _3 = &_1;                        // scope 0 at $DIR/address_of.rs:+1:13: +1:15
+        _2 = &raw const (*_3);           // scope 0 at $DIR/address_of.rs:+1:13: +1:15
+        FakeRead(ForLet(None), _2);      // scope 0 at $DIR/address_of.rs:+1:9: +1:10
+        StorageDead(_3);                 // scope 0 at $DIR/address_of.rs:+1:29: +1:30
+        StorageLive(_4);                 // scope 1 at $DIR/address_of.rs:+2:9: +2:10
+        StorageLive(_5);                 // scope 1 at $DIR/address_of.rs:+2:13: +2:19
+        _5 = &mut _1;                    // scope 1 at $DIR/address_of.rs:+2:13: +2:19
+        _4 = &raw const (*_5);           // scope 1 at $DIR/address_of.rs:+2:13: +2:19
+        FakeRead(ForLet(None), _4);      // scope 1 at $DIR/address_of.rs:+2:9: +2:10
+        StorageDead(_5);                 // scope 1 at $DIR/address_of.rs:+2:33: +2:34
+        StorageLive(_6);                 // scope 2 at $DIR/address_of.rs:+3:9: +3:10
+        StorageLive(_7);                 // scope 2 at $DIR/address_of.rs:+3:13: +3:19
+        _7 = &mut _1;                    // scope 2 at $DIR/address_of.rs:+3:13: +3:19
+        _6 = &raw mut (*_7);             // scope 2 at $DIR/address_of.rs:+3:13: +3:19
+        FakeRead(ForLet(None), _6);      // scope 2 at $DIR/address_of.rs:+3:9: +3:10
+        StorageDead(_7);                 // scope 2 at $DIR/address_of.rs:+3:31: +3:32
+        _0 = const ();                   // scope 0 at $DIR/address_of.rs:+0:32: +4:2
+        StorageDead(_6);                 // scope 2 at $DIR/address_of.rs:+4:1: +4:2
+        StorageDead(_4);                 // scope 1 at $DIR/address_of.rs:+4:1: +4:2
+        StorageDead(_2);                 // scope 0 at $DIR/address_of.rs:+4:1: +4:2
+        return;                          // scope 0 at $DIR/address_of.rs:+4:2: +4:2
     }
 }
diff --git a/src/test/mir-opt/address-of.rs b/src/test/mir-opt/address_of.rs
index c4bea5613e4..c4bea5613e4 100644
--- a/src/test/mir-opt/address-of.rs
+++ b/src/test/mir-opt/address_of.rs
diff --git a/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir
index 27f883ed321..af5178d4079 100644
--- a/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/array_index_is_temporary.main.SimplifyCfg-elaborate-drops.after.mir
@@ -1,22 +1,22 @@
 // MIR for `main` after SimplifyCfg-elaborate-drops
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/array-index-is-temporary.rs:+0:11: +0:11
-    let mut _1: [u32; 3];                // in scope 0 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
-    let mut _4: &mut usize;              // in scope 0 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
-    let mut _5: u32;                     // in scope 0 at $DIR/array-index-is-temporary.rs:+4:12: +4:29
-    let mut _6: *mut usize;              // in scope 0 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
-    let _7: usize;                       // in scope 0 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
-    let mut _8: usize;                   // in scope 0 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
-    let mut _9: bool;                    // in scope 0 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
+    let mut _0: ();                      // return place in scope 0 at $DIR/array_index_is_temporary.rs:+0:11: +0:11
+    let mut _1: [u32; 3];                // in scope 0 at $DIR/array_index_is_temporary.rs:+1:9: +1:14
+    let mut _4: &mut usize;              // in scope 0 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
+    let mut _5: u32;                     // in scope 0 at $DIR/array_index_is_temporary.rs:+4:12: +4:29
+    let mut _6: *mut usize;              // in scope 0 at $DIR/array_index_is_temporary.rs:+4:25: +4:26
+    let _7: usize;                       // in scope 0 at $DIR/array_index_is_temporary.rs:+4:7: +4:8
+    let mut _8: usize;                   // in scope 0 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
+    let mut _9: bool;                    // in scope 0 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
     scope 1 {
-        debug x => _1;                   // in scope 1 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
-        let mut _2: usize;               // in scope 1 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
+        debug x => _1;                   // in scope 1 at $DIR/array_index_is_temporary.rs:+1:9: +1:14
+        let mut _2: usize;               // in scope 1 at $DIR/array_index_is_temporary.rs:+2:9: +2:14
         scope 2 {
-            debug y => _2;               // in scope 2 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
-            let _3: *mut usize;          // in scope 2 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
+            debug y => _2;               // in scope 2 at $DIR/array_index_is_temporary.rs:+2:9: +2:14
+            let _3: *mut usize;          // in scope 2 at $DIR/array_index_is_temporary.rs:+3:9: +3:10
             scope 3 {
-                debug z => _3;           // in scope 3 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
+                debug z => _3;           // in scope 3 at $DIR/array_index_is_temporary.rs:+3:9: +3:10
                 scope 4 {
                 }
             }
@@ -24,41 +24,41 @@ fn main() -> () {
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/array-index-is-temporary.rs:+1:9: +1:14
-        _1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array-index-is-temporary.rs:+1:17: +1:29
-        StorageLive(_2);                 // scope 1 at $DIR/array-index-is-temporary.rs:+2:9: +2:14
-        _2 = const 1_usize;              // scope 1 at $DIR/array-index-is-temporary.rs:+2:17: +2:18
-        StorageLive(_3);                 // scope 2 at $DIR/array-index-is-temporary.rs:+3:9: +3:10
-        StorageLive(_4);                 // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
-        _4 = &mut _2;                    // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
-        _3 = &raw mut (*_4);             // scope 2 at $DIR/array-index-is-temporary.rs:+3:25: +3:31
-        StorageDead(_4);                 // scope 2 at $DIR/array-index-is-temporary.rs:+3:31: +3:32
-        StorageLive(_5);                 // scope 3 at $DIR/array-index-is-temporary.rs:+4:12: +4:29
-        StorageLive(_6);                 // scope 4 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
-        _6 = _3;                         // scope 4 at $DIR/array-index-is-temporary.rs:+4:25: +4:26
-        _5 = foo(move _6) -> bb1;        // scope 4 at $DIR/array-index-is-temporary.rs:+4:21: +4:27
+        StorageLive(_1);                 // scope 0 at $DIR/array_index_is_temporary.rs:+1:9: +1:14
+        _1 = [const 42_u32, const 43_u32, const 44_u32]; // scope 0 at $DIR/array_index_is_temporary.rs:+1:17: +1:29
+        StorageLive(_2);                 // scope 1 at $DIR/array_index_is_temporary.rs:+2:9: +2:14
+        _2 = const 1_usize;              // scope 1 at $DIR/array_index_is_temporary.rs:+2:17: +2:18
+        StorageLive(_3);                 // scope 2 at $DIR/array_index_is_temporary.rs:+3:9: +3:10
+        StorageLive(_4);                 // scope 2 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
+        _4 = &mut _2;                    // scope 2 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
+        _3 = &raw mut (*_4);             // scope 2 at $DIR/array_index_is_temporary.rs:+3:25: +3:31
+        StorageDead(_4);                 // scope 2 at $DIR/array_index_is_temporary.rs:+3:31: +3:32
+        StorageLive(_5);                 // scope 3 at $DIR/array_index_is_temporary.rs:+4:12: +4:29
+        StorageLive(_6);                 // scope 4 at $DIR/array_index_is_temporary.rs:+4:25: +4:26
+        _6 = _3;                         // scope 4 at $DIR/array_index_is_temporary.rs:+4:25: +4:26
+        _5 = foo(move _6) -> bb1;        // scope 4 at $DIR/array_index_is_temporary.rs:+4:21: +4:27
                                          // mir::Constant
-                                         // + span: $DIR/array-index-is-temporary.rs:16:21: 16:24
+                                         // + span: $DIR/array_index_is_temporary.rs:16:21: 16:24
                                          // + literal: Const { ty: unsafe fn(*mut usize) -> u32 {foo}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_6);                 // scope 4 at $DIR/array-index-is-temporary.rs:+4:26: +4:27
-        StorageLive(_7);                 // scope 3 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
-        _7 = _2;                         // scope 3 at $DIR/array-index-is-temporary.rs:+4:7: +4:8
-        _8 = Len(_1);                    // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
-        _9 = Lt(_7, _8);                 // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
-        assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:9
+        StorageDead(_6);                 // scope 4 at $DIR/array_index_is_temporary.rs:+4:26: +4:27
+        StorageLive(_7);                 // scope 3 at $DIR/array_index_is_temporary.rs:+4:7: +4:8
+        _7 = _2;                         // scope 3 at $DIR/array_index_is_temporary.rs:+4:7: +4:8
+        _8 = Len(_1);                    // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
+        _9 = Lt(_7, _8);                 // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
+        assert(move _9, "index out of bounds: the length is {} but the index is {}", move _8, _7) -> bb2; // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:9
     }
 
     bb2: {
-        _1[_7] = move _5;                // scope 3 at $DIR/array-index-is-temporary.rs:+4:5: +4:29
-        StorageDead(_5);                 // scope 3 at $DIR/array-index-is-temporary.rs:+4:28: +4:29
-        StorageDead(_7);                 // scope 3 at $DIR/array-index-is-temporary.rs:+4:29: +4:30
-        _0 = const ();                   // scope 0 at $DIR/array-index-is-temporary.rs:+0:11: +5:2
-        StorageDead(_3);                 // scope 2 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
-        StorageDead(_2);                 // scope 1 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
-        StorageDead(_1);                 // scope 0 at $DIR/array-index-is-temporary.rs:+5:1: +5:2
-        return;                          // scope 0 at $DIR/array-index-is-temporary.rs:+5:2: +5:2
+        _1[_7] = move _5;                // scope 3 at $DIR/array_index_is_temporary.rs:+4:5: +4:29
+        StorageDead(_5);                 // scope 3 at $DIR/array_index_is_temporary.rs:+4:28: +4:29
+        StorageDead(_7);                 // scope 3 at $DIR/array_index_is_temporary.rs:+4:29: +4:30
+        _0 = const ();                   // scope 0 at $DIR/array_index_is_temporary.rs:+0:11: +5:2
+        StorageDead(_3);                 // scope 2 at $DIR/array_index_is_temporary.rs:+5:1: +5:2
+        StorageDead(_2);                 // scope 1 at $DIR/array_index_is_temporary.rs:+5:1: +5:2
+        StorageDead(_1);                 // scope 0 at $DIR/array_index_is_temporary.rs:+5:1: +5:2
+        return;                          // scope 0 at $DIR/array_index_is_temporary.rs:+5:2: +5:2
     }
 }
diff --git a/src/test/mir-opt/array-index-is-temporary.rs b/src/test/mir-opt/array_index_is_temporary.rs
index e7bde81d4ca..e7bde81d4ca 100644
--- a/src/test/mir-opt/array-index-is-temporary.rs
+++ b/src/test/mir-opt/array_index_is_temporary.rs
diff --git a/src/test/mir-opt/enum_cast.bar.mir_map.0.mir b/src/test/mir-opt/building/enum_cast.bar.built.after.mir
index e58085f701a..0746e0b498e 100644
--- a/src/test/mir-opt/enum_cast.bar.mir_map.0.mir
+++ b/src/test/mir-opt/building/enum_cast.bar.built.after.mir
@@ -1,15 +1,21 @@
-// MIR for `bar` 0 mir_map
+// MIR for `bar` after built
 
 fn bar(_1: Bar) -> usize {
     debug bar => _1;                     // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
     let mut _0: usize;                   // return place in scope 0 at $DIR/enum_cast.rs:+0:21: +0:26
     let _2: Bar;                         // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
     let mut _3: isize;                   // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
+    let mut _4: bool;                    // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
+    let mut _5: bool;                    // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
 
     bb0: {
         StorageLive(_2);                 // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
         _2 = move _1;                    // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
         _3 = discriminant(_2);           // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
+        _4 = Ge(const 1_isize, _3);      // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
+        assume(_4);                      // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
+        _5 = Le(const 0_isize, _3);      // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
+        assume(_5);                      // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
         _0 = move _3 as usize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
         StorageDead(_2);                 // scope 0 at $DIR/enum_cast.rs:+1:16: +1:17
         return;                          // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
diff --git a/src/test/mir-opt/enum_cast.boo.mir_map.0.mir b/src/test/mir-opt/building/enum_cast.boo.built.after.mir
index 525c6234ed3..699c876b01a 100644
--- a/src/test/mir-opt/enum_cast.boo.mir_map.0.mir
+++ b/src/test/mir-opt/building/enum_cast.boo.built.after.mir
@@ -1,15 +1,21 @@
-// MIR for `boo` 0 mir_map
+// MIR for `boo` after built
 
 fn boo(_1: Boo) -> usize {
     debug boo => _1;                     // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
     let mut _0: usize;                   // return place in scope 0 at $DIR/enum_cast.rs:+0:21: +0:26
     let _2: Boo;                         // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
     let mut _3: u8;                      // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
+    let mut _4: bool;                    // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
+    let mut _5: bool;                    // in scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
 
     bb0: {
         StorageLive(_2);                 // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
         _2 = move _1;                    // scope 0 at $DIR/enum_cast.rs:+1:5: +1:8
         _3 = discriminant(_2);           // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
+        _4 = Ge(const 1_u8, _3);         // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
+        assume(_4);                      // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
+        _5 = Le(const 0_u8, _3);         // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
+        assume(_5);                      // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
         _0 = move _3 as usize (IntToInt); // scope 0 at $DIR/enum_cast.rs:+1:5: +1:17
         StorageDead(_2);                 // scope 0 at $DIR/enum_cast.rs:+1:16: +1:17
         return;                          // scope 0 at $DIR/enum_cast.rs:+2:2: +2:2
diff --git a/src/test/mir-opt/enum_cast.droppy.mir_map.0.mir b/src/test/mir-opt/building/enum_cast.droppy.built.after.mir
index bb5faa48047..5231c2eab95 100644
--- a/src/test/mir-opt/enum_cast.droppy.mir_map.0.mir
+++ b/src/test/mir-opt/building/enum_cast.droppy.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `droppy` 0 mir_map
+// MIR for `droppy` after built
 
 fn droppy() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/enum_cast.rs:+0:13: +0:13
@@ -6,7 +6,9 @@ fn droppy() -> () {
     let _2: Droppy;                      // in scope 0 at $DIR/enum_cast.rs:+2:13: +2:14
     let _4: Droppy;                      // in scope 0 at $DIR/enum_cast.rs:+5:17: +5:18
     let mut _5: isize;                   // in scope 0 at $DIR/enum_cast.rs:+5:17: +5:18
-    let _6: Droppy;                      // in scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
+    let mut _6: bool;                    // in scope 0 at $DIR/enum_cast.rs:+5:17: +5:27
+    let mut _7: bool;                    // in scope 0 at $DIR/enum_cast.rs:+5:17: +5:27
+    let _8: Droppy;                      // in scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
     scope 1 {
         debug x => _2;                   // in scope 1 at $DIR/enum_cast.rs:+2:13: +2:14
         scope 2 {
@@ -17,7 +19,7 @@ fn droppy() -> () {
         }
     }
     scope 4 {
-        debug z => _6;                   // in scope 4 at $DIR/enum_cast.rs:+7:9: +7:10
+        debug z => _8;                   // in scope 4 at $DIR/enum_cast.rs:+7:9: +7:10
     }
 
     bb0: {
@@ -29,6 +31,10 @@ fn droppy() -> () {
         StorageLive(_4);                 // scope 3 at $DIR/enum_cast.rs:+5:17: +5:18
         _4 = move _2;                    // scope 3 at $DIR/enum_cast.rs:+5:17: +5:18
         _5 = discriminant(_4);           // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
+        _6 = Ge(const 2_isize, _5);      // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
+        assume(_6);                      // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
+        _7 = Le(const 0_isize, _5);      // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
+        assume(_7);                      // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
         _3 = move _5 as usize (IntToInt); // scope 3 at $DIR/enum_cast.rs:+5:17: +5:27
         drop(_4) -> [return: bb1, unwind: bb4]; // scope 3 at $DIR/enum_cast.rs:+5:26: +5:27
     }
@@ -44,15 +50,15 @@ fn droppy() -> () {
     bb2: {
         StorageDead(_2);                 // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
         StorageDead(_1);                 // scope 0 at $DIR/enum_cast.rs:+6:5: +6:6
-        StorageLive(_6);                 // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
-        _6 = Droppy::B;                  // scope 0 at $DIR/enum_cast.rs:+7:13: +7:22
-        FakeRead(ForLet(None), _6);      // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
+        StorageLive(_8);                 // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
+        _8 = Droppy::B;                  // scope 0 at $DIR/enum_cast.rs:+7:13: +7:22
+        FakeRead(ForLet(None), _8);      // scope 0 at $DIR/enum_cast.rs:+7:9: +7:10
         _0 = const ();                   // scope 0 at $DIR/enum_cast.rs:+0:13: +8:2
-        drop(_6) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2
+        drop(_8) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2
     }
 
     bb3: {
-        StorageDead(_6);                 // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2
+        StorageDead(_8);                 // scope 0 at $DIR/enum_cast.rs:+8:1: +8:2
         return;                          // scope 0 at $DIR/enum_cast.rs:+8:2: +8:2
     }
 
diff --git a/src/test/mir-opt/enum_cast.foo.mir_map.0.mir b/src/test/mir-opt/building/enum_cast.foo.built.after.mir
index a1d29a0b903..17e0abf2e31 100644
--- a/src/test/mir-opt/enum_cast.foo.mir_map.0.mir
+++ b/src/test/mir-opt/building/enum_cast.foo.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `foo` 0 mir_map
+// MIR for `foo` after built
 
 fn foo(_1: Foo) -> usize {
     debug foo => _1;                     // in scope 0 at $DIR/enum_cast.rs:+0:8: +0:11
diff --git a/src/test/mir-opt/enum_cast.rs b/src/test/mir-opt/building/enum_cast.rs
index 090142aaf35..98fd5acfb14 100644
--- a/src/test/mir-opt/enum_cast.rs
+++ b/src/test/mir-opt/building/enum_cast.rs
@@ -1,6 +1,6 @@
-// EMIT_MIR enum_cast.foo.mir_map.0.mir
-// EMIT_MIR enum_cast.bar.mir_map.0.mir
-// EMIT_MIR enum_cast.boo.mir_map.0.mir
+// EMIT_MIR enum_cast.foo.built.after.mir
+// EMIT_MIR enum_cast.bar.built.after.mir
+// EMIT_MIR enum_cast.boo.built.after.mir
 
 enum Foo {
     A
@@ -27,7 +27,7 @@ fn boo(boo: Boo) -> usize {
     boo as usize
 }
 
-// EMIT_MIR enum_cast.droppy.mir_map.0.mir
+// EMIT_MIR enum_cast.droppy.built.after.mir
 enum Droppy {
     A, B, C
 }
diff --git a/src/test/mir-opt/issue_101867.main.mir_map.0.mir b/src/test/mir-opt/building/issue_101867.main.built.after.mir
index 42a9e558760..0ebd840cf2d 100644
--- a/src/test/mir-opt/issue_101867.main.mir_map.0.mir
+++ b/src/test/mir-opt/building/issue_101867.main.built.after.mir
@@ -1,33 +1,33 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(std::option::Option<u8>) }, span: $DIR/issue-101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
-| 1: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(std::option::Option<u8>) }, span: $DIR/issue-101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
+| 0: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(std::option::Option<u8>) }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
+| 1: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(std::option::Option<u8>) }, span: $DIR/issue_101867.rs:3:12: 3:22, inferred_ty: std::option::Option<u8>
 |
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-101867.rs:+0:11: +0:11
-    let _1: std::option::Option<u8> as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 0 at $DIR/issue-101867.rs:+1:9: +1:10
-    let mut _2: !;                       // in scope 0 at $DIR/issue-101867.rs:+2:26: +4:6
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_101867.rs:+0:11: +0:11
+    let _1: std::option::Option<u8> as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 0 at $DIR/issue_101867.rs:+1:9: +1:10
+    let mut _2: !;                       // in scope 0 at $DIR/issue_101867.rs:+2:26: +4:6
     let _3: ();                          // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
     let mut _4: !;                       // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
-    let mut _6: isize;                   // in scope 0 at $DIR/issue-101867.rs:+2:9: +2:16
+    let mut _6: isize;                   // in scope 0 at $DIR/issue_101867.rs:+2:9: +2:16
     scope 1 {
-        debug x => _1;                   // in scope 1 at $DIR/issue-101867.rs:+1:9: +1:10
-        let _5: u8;                      // in scope 1 at $DIR/issue-101867.rs:+2:14: +2:15
+        debug x => _1;                   // in scope 1 at $DIR/issue_101867.rs:+1:9: +1:10
+        let _5: u8;                      // in scope 1 at $DIR/issue_101867.rs:+2:14: +2:15
         scope 2 {
-            debug y => _5;               // in scope 2 at $DIR/issue-101867.rs:+2:14: +2:15
+            debug y => _5;               // in scope 2 at $DIR/issue_101867.rs:+2:14: +2:15
         }
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/issue-101867.rs:+1:9: +1:10
-        _1 = Option::<u8>::Some(const 1_u8); // scope 0 at $DIR/issue-101867.rs:+1:25: +1:32
-        FakeRead(ForLet(None), _1);      // scope 0 at $DIR/issue-101867.rs:+1:9: +1:10
-        AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 0 at $DIR/issue-101867.rs:+1:12: +1:22
-        StorageLive(_5);                 // scope 1 at $DIR/issue-101867.rs:+2:14: +2:15
-        FakeRead(ForMatchedPlace(None), _1); // scope 1 at $DIR/issue-101867.rs:+2:19: +2:20
-        _6 = discriminant(_1);           // scope 1 at $DIR/issue-101867.rs:+2:19: +2:20
-        switchInt(move _6) -> [1_isize: bb4, otherwise: bb3]; // scope 1 at $DIR/issue-101867.rs:+2:9: +2:16
+        StorageLive(_1);                 // scope 0 at $DIR/issue_101867.rs:+1:9: +1:10
+        _1 = Option::<u8>::Some(const 1_u8); // scope 0 at $DIR/issue_101867.rs:+1:25: +1:32
+        FakeRead(ForLet(None), _1);      // scope 0 at $DIR/issue_101867.rs:+1:9: +1:10
+        AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 0 at $DIR/issue_101867.rs:+1:12: +1:22
+        StorageLive(_5);                 // scope 1 at $DIR/issue_101867.rs:+2:14: +2:15
+        FakeRead(ForMatchedPlace(None), _1); // scope 1 at $DIR/issue_101867.rs:+2:19: +2:20
+        _6 = discriminant(_1);           // scope 1 at $DIR/issue_101867.rs:+2:19: +2:20
+        switchInt(move _6) -> [1_isize: bb4, otherwise: bb3]; // scope 1 at $DIR/issue_101867.rs:+2:9: +2:16
     }
 
     bb1: {
@@ -44,32 +44,32 @@ fn main() -> () {
 
     bb2: {
         StorageDead(_4);                 // scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL
-        StorageDead(_3);                 // scope 1 at $DIR/issue-101867.rs:+3:16: +3:17
-        unreachable;                     // scope 1 at $DIR/issue-101867.rs:+2:26: +4:6
+        StorageDead(_3);                 // scope 1 at $DIR/issue_101867.rs:+3:16: +3:17
+        unreachable;                     // scope 1 at $DIR/issue_101867.rs:+2:26: +4:6
     }
 
     bb3: {
-        goto -> bb6;                     // scope 1 at $DIR/issue-101867.rs:+2:19: +2:20
+        goto -> bb6;                     // scope 1 at $DIR/issue_101867.rs:+2:19: +2:20
     }
 
     bb4: {
-        falseEdge -> [real: bb5, imaginary: bb3]; // scope 1 at $DIR/issue-101867.rs:+2:9: +2:16
+        falseEdge -> [real: bb5, imaginary: bb3]; // scope 1 at $DIR/issue_101867.rs:+2:9: +2:16
     }
 
     bb5: {
-        _5 = ((_1 as Some).0: u8);       // scope 1 at $DIR/issue-101867.rs:+2:14: +2:15
-        _0 = const ();                   // scope 0 at $DIR/issue-101867.rs:+0:11: +5:2
-        StorageDead(_5);                 // scope 1 at $DIR/issue-101867.rs:+5:1: +5:2
-        StorageDead(_1);                 // scope 0 at $DIR/issue-101867.rs:+5:1: +5:2
-        return;                          // scope 0 at $DIR/issue-101867.rs:+5:2: +5:2
+        _5 = ((_1 as Some).0: u8);       // scope 1 at $DIR/issue_101867.rs:+2:14: +2:15
+        _0 = const ();                   // scope 0 at $DIR/issue_101867.rs:+0:11: +5:2
+        StorageDead(_5);                 // scope 1 at $DIR/issue_101867.rs:+5:1: +5:2
+        StorageDead(_1);                 // scope 0 at $DIR/issue_101867.rs:+5:1: +5:2
+        return;                          // scope 0 at $DIR/issue_101867.rs:+5:2: +5:2
     }
 
     bb6: {
-        StorageDead(_5);                 // scope 1 at $DIR/issue-101867.rs:+5:1: +5:2
-        goto -> bb1;                     // scope 0 at $DIR/issue-101867.rs:+0:11: +5:2
+        StorageDead(_5);                 // scope 1 at $DIR/issue_101867.rs:+5:1: +5:2
+        goto -> bb1;                     // scope 0 at $DIR/issue_101867.rs:+0:11: +5:2
     }
 
     bb7 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-101867.rs:+0:1: +5:2
+        resume;                          // scope 0 at $DIR/issue_101867.rs:+0:1: +5:2
     }
 }
diff --git a/src/test/mir-opt/issue-101867.rs b/src/test/mir-opt/building/issue_101867.rs
index 8a357eb7995..a32d8cb3714 100644
--- a/src/test/mir-opt/issue-101867.rs
+++ b/src/test/mir-opt/building/issue_101867.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR issue_101867.main.mir_map.0.mir
+// EMIT_MIR issue_101867.main.built.after.mir
 fn main() {
     let x: Option<u8> = Some(1);
     let Some(y) = x else {
diff --git a/src/test/mir-opt/issue_49232.main.mir_map.0.mir b/src/test/mir-opt/building/issue_49232.main.built.after.mir
index 821323b5e24..9182bcaa21f 100644
--- a/src/test/mir-opt/issue_49232.main.mir_map.0.mir
+++ b/src/test/mir-opt/building/issue_49232.main.built.after.mir
@@ -1,82 +1,82 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-49232.rs:+0:11: +0:11
-    let mut _1: ();                      // in scope 0 at $DIR/issue-49232.rs:+0:1: +10:2
-    let _2: i32;                         // in scope 0 at $DIR/issue-49232.rs:+2:13: +2:19
-    let mut _3: bool;                    // in scope 0 at $DIR/issue-49232.rs:+3:19: +3:23
-    let mut _4: !;                       // in scope 0 at $DIR/issue-49232.rs:+5:25: +5:30
-    let _5: ();                          // in scope 0 at $DIR/issue-49232.rs:+8:9: +8:22
-    let mut _6: &i32;                    // in scope 0 at $DIR/issue-49232.rs:+8:14: +8:21
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_49232.rs:+0:11: +0:11
+    let mut _1: ();                      // in scope 0 at $DIR/issue_49232.rs:+0:1: +10:2
+    let _2: i32;                         // in scope 0 at $DIR/issue_49232.rs:+2:13: +2:19
+    let mut _3: bool;                    // in scope 0 at $DIR/issue_49232.rs:+3:19: +3:23
+    let mut _4: !;                       // in scope 0 at $DIR/issue_49232.rs:+5:25: +5:30
+    let _5: ();                          // in scope 0 at $DIR/issue_49232.rs:+8:9: +8:22
+    let mut _6: &i32;                    // in scope 0 at $DIR/issue_49232.rs:+8:14: +8:21
     scope 1 {
-        debug beacon => _2;              // in scope 1 at $DIR/issue-49232.rs:+2:13: +2:19
+        debug beacon => _2;              // in scope 1 at $DIR/issue_49232.rs:+2:13: +2:19
     }
 
     bb0: {
-        goto -> bb1;                     // scope 0 at $DIR/issue-49232.rs:+1:5: +9:6
+        goto -> bb1;                     // scope 0 at $DIR/issue_49232.rs:+1:5: +9:6
     }
 
     bb1: {
-        falseUnwind -> [real: bb2, cleanup: bb11]; // scope 0 at $DIR/issue-49232.rs:+1:5: +9:6
+        falseUnwind -> [real: bb2, cleanup: bb11]; // scope 0 at $DIR/issue_49232.rs:+1:5: +9:6
     }
 
     bb2: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-49232.rs:+2:13: +2:19
-        StorageLive(_3);                 // scope 0 at $DIR/issue-49232.rs:+3:19: +3:23
-        _3 = const true;                 // scope 0 at $DIR/issue-49232.rs:+3:19: +3:23
-        FakeRead(ForMatchedPlace(None), _3); // scope 0 at $DIR/issue-49232.rs:+3:19: +3:23
-        switchInt(_3) -> [false: bb3, otherwise: bb4]; // scope 0 at $DIR/issue-49232.rs:+3:13: +3:23
+        StorageLive(_2);                 // scope 0 at $DIR/issue_49232.rs:+2:13: +2:19
+        StorageLive(_3);                 // scope 0 at $DIR/issue_49232.rs:+3:19: +3:23
+        _3 = const true;                 // scope 0 at $DIR/issue_49232.rs:+3:19: +3:23
+        FakeRead(ForMatchedPlace(None), _3); // scope 0 at $DIR/issue_49232.rs:+3:19: +3:23
+        switchInt(_3) -> [false: bb3, otherwise: bb4]; // scope 0 at $DIR/issue_49232.rs:+3:13: +3:23
     }
 
     bb3: {
-        falseEdge -> [real: bb5, imaginary: bb4]; // scope 0 at $DIR/issue-49232.rs:+4:17: +4:22
+        falseEdge -> [real: bb5, imaginary: bb4]; // scope 0 at $DIR/issue_49232.rs:+4:17: +4:22
     }
 
     bb4: {
-        _0 = const ();                   // scope 0 at $DIR/issue-49232.rs:+5:25: +5:30
-        goto -> bb10;                    // scope 0 at $DIR/issue-49232.rs:+5:25: +5:30
+        _0 = const ();                   // scope 0 at $DIR/issue_49232.rs:+5:25: +5:30
+        goto -> bb10;                    // scope 0 at $DIR/issue_49232.rs:+5:25: +5:30
     }
 
     bb5: {
-        _2 = const 4_i32;                // scope 0 at $DIR/issue-49232.rs:+4:26: +4:27
-        goto -> bb8;                     // scope 0 at $DIR/issue-49232.rs:+4:26: +4:27
+        _2 = const 4_i32;                // scope 0 at $DIR/issue_49232.rs:+4:26: +4:27
+        goto -> bb8;                     // scope 0 at $DIR/issue_49232.rs:+4:26: +4:27
     }
 
     bb6: {
-        unreachable;                     // scope 0 at $DIR/issue-49232.rs:+5:25: +5:30
+        unreachable;                     // scope 0 at $DIR/issue_49232.rs:+5:25: +5:30
     }
 
     bb7: {
-        goto -> bb8;                     // scope 0 at $DIR/issue-49232.rs:+6:13: +6:14
+        goto -> bb8;                     // scope 0 at $DIR/issue_49232.rs:+6:13: +6:14
     }
 
     bb8: {
-        FakeRead(ForLet(None), _2);      // scope 0 at $DIR/issue-49232.rs:+2:13: +2:19
-        StorageDead(_3);                 // scope 0 at $DIR/issue-49232.rs:+7:10: +7:11
-        StorageLive(_5);                 // scope 1 at $DIR/issue-49232.rs:+8:9: +8:22
-        StorageLive(_6);                 // scope 1 at $DIR/issue-49232.rs:+8:14: +8:21
-        _6 = &_2;                        // scope 1 at $DIR/issue-49232.rs:+8:14: +8:21
-        _5 = std::mem::drop::<&i32>(move _6) -> [return: bb9, unwind: bb11]; // scope 1 at $DIR/issue-49232.rs:+8:9: +8:22
+        FakeRead(ForLet(None), _2);      // scope 0 at $DIR/issue_49232.rs:+2:13: +2:19
+        StorageDead(_3);                 // scope 0 at $DIR/issue_49232.rs:+7:10: +7:11
+        StorageLive(_5);                 // scope 1 at $DIR/issue_49232.rs:+8:9: +8:22
+        StorageLive(_6);                 // scope 1 at $DIR/issue_49232.rs:+8:14: +8:21
+        _6 = &_2;                        // scope 1 at $DIR/issue_49232.rs:+8:14: +8:21
+        _5 = std::mem::drop::<&i32>(move _6) -> [return: bb9, unwind: bb11]; // scope 1 at $DIR/issue_49232.rs:+8:9: +8:22
                                          // mir::Constant
-                                         // + span: $DIR/issue-49232.rs:13:9: 13:13
+                                         // + span: $DIR/issue_49232.rs:13:9: 13:13
                                          // + literal: Const { ty: fn(&i32) {std::mem::drop::<&i32>}, val: Value(<ZST>) }
     }
 
     bb9: {
-        StorageDead(_6);                 // scope 1 at $DIR/issue-49232.rs:+8:21: +8:22
-        StorageDead(_5);                 // scope 1 at $DIR/issue-49232.rs:+8:22: +8:23
-        _1 = const ();                   // scope 0 at $DIR/issue-49232.rs:+1:10: +9:6
-        StorageDead(_2);                 // scope 0 at $DIR/issue-49232.rs:+9:5: +9:6
-        goto -> bb1;                     // scope 0 at $DIR/issue-49232.rs:+1:5: +9:6
+        StorageDead(_6);                 // scope 1 at $DIR/issue_49232.rs:+8:21: +8:22
+        StorageDead(_5);                 // scope 1 at $DIR/issue_49232.rs:+8:22: +8:23
+        _1 = const ();                   // scope 0 at $DIR/issue_49232.rs:+1:10: +9:6
+        StorageDead(_2);                 // scope 0 at $DIR/issue_49232.rs:+9:5: +9:6
+        goto -> bb1;                     // scope 0 at $DIR/issue_49232.rs:+1:5: +9:6
     }
 
     bb10: {
-        StorageDead(_3);                 // scope 0 at $DIR/issue-49232.rs:+7:10: +7:11
-        StorageDead(_2);                 // scope 0 at $DIR/issue-49232.rs:+9:5: +9:6
-        return;                          // scope 0 at $DIR/issue-49232.rs:+10:2: +10:2
+        StorageDead(_3);                 // scope 0 at $DIR/issue_49232.rs:+7:10: +7:11
+        StorageDead(_2);                 // scope 0 at $DIR/issue_49232.rs:+9:5: +9:6
+        return;                          // scope 0 at $DIR/issue_49232.rs:+10:2: +10:2
     }
 
     bb11 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-49232.rs:+0:1: +10:2
+        resume;                          // scope 0 at $DIR/issue_49232.rs:+0:1: +10:2
     }
 }
diff --git a/src/test/mir-opt/issue-49232.rs b/src/test/mir-opt/building/issue_49232.rs
index 86494c76aec..7e9f0de81f7 100644
--- a/src/test/mir-opt/issue-49232.rs
+++ b/src/test/mir-opt/building/issue_49232.rs
@@ -1,7 +1,7 @@
 // We must mark a variable whose initialization fails due to an
 // abort statement as StorageDead.
 
-// EMIT_MIR issue_49232.main.mir_map.0.mir
+// EMIT_MIR issue_49232.main.built.after.mir
 fn main() {
     loop {
         let beacon = {
diff --git a/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir b/src/test/mir-opt/building/match_false_edges.full_tested_match.built.after.mir
index b193a8d76fc..9a190c3d60e 100644
--- a/src/test/mir-opt/match_false_edges.full_tested_match.PromoteTemps.after.mir
+++ b/src/test/mir-opt/building/match_false_edges.full_tested_match.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `full_tested_match` after PromoteTemps
+// MIR for `full_tested_match` after built
 
 fn full_tested_match() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/match_false_edges.rs:+0:28: +0:28
@@ -12,7 +12,6 @@ fn full_tested_match() -> () {
     let mut _8: i32;                     // in scope 0 at $DIR/match_false_edges.rs:+2:35: +2:36
     let _9: i32;                         // in scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
     let mut _10: i32;                    // in scope 0 at $DIR/match_false_edges.rs:+3:24: +3:25
-    let mut _11: &std::option::Option<i32>; // in scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
     scope 1 {
     }
     scope 2 {
@@ -34,7 +33,7 @@ fn full_tested_match() -> () {
 
     bb1: {
         _1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+4:17: +4:23
     }
 
     bb2: {
@@ -42,7 +41,7 @@ fn full_tested_match() -> () {
     }
 
     bb3: {
-        falseEdge -> [real: bb9, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:16
+        falseEdge -> [real: bb10, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:16
     }
 
     bb4: {
@@ -51,14 +50,10 @@ fn full_tested_match() -> () {
 
     bb5: {
         StorageLive(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
-        _11 = const _;                   // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
-                                         // mir::Constant
-                                         // + span: $DIR/match_false_edges.rs:14:14: 14:15
-                                         // + literal: Const { ty: &Option<i32>, val: Unevaluated(full_tested_match, [], Some(promoted[0])) }
-        _6 = &(((*_11) as Some).0: i32); // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
+        _6 = &((_2 as Some).0: i32);     // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
         _4 = &shallow _2;                // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
         StorageLive(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
-        _7 = guard() -> [return: bb6, unwind: bb11]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
+        _7 = guard() -> [return: bb6, unwind: bb12]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
                                          // mir::Constant
                                          // + span: $DIR/match_false_edges.rs:14:20: 14:25
                                          // + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
@@ -80,16 +75,20 @@ fn full_tested_match() -> () {
         StorageDead(_8);                 // scope 2 at $DIR/match_false_edges.rs:+2:36: +2:37
         StorageDead(_5);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
     }
 
     bb8: {
+        goto -> bb9;                     // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
+    }
+
+    bb9: {
         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
         goto -> bb3;                     // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
     }
 
-    bb9: {
+    bb10: {
         StorageLive(_9);                 // scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
         _9 = ((_2 as Some).0: i32);      // scope 0 at $DIR/match_false_edges.rs:+3:14: +3:15
         StorageLive(_10);                // scope 3 at $DIR/match_false_edges.rs:+3:24: +3:25
@@ -97,17 +96,17 @@ fn full_tested_match() -> () {
         _1 = (const 2_i32, move _10);    // scope 3 at $DIR/match_false_edges.rs:+3:20: +3:26
         StorageDead(_10);                // scope 3 at $DIR/match_false_edges.rs:+3:25: +3:26
         StorageDead(_9);                 // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+3:25: +3:26
     }
 
-    bb10: {
+    bb11: {
         StorageDead(_2);                 // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
         StorageDead(_1);                 // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
         _0 = const ();                   // scope 0 at $DIR/match_false_edges.rs:+0:28: +6:2
         return;                          // scope 0 at $DIR/match_false_edges.rs:+6:2: +6:2
     }
 
-    bb11 (cleanup): {
+    bb12 (cleanup): {
         resume;                          // scope 0 at $DIR/match_false_edges.rs:+0:1: +6:2
     }
 }
diff --git a/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir b/src/test/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir
index 145ed878fc9..1c9953e7efc 100644
--- a/src/test/mir-opt/match_false_edges.full_tested_match2.PromoteTemps.before.mir
+++ b/src/test/mir-opt/building/match_false_edges.full_tested_match2.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `full_tested_match2` before PromoteTemps
+// MIR for `full_tested_match2` after built
 
 fn full_tested_match2() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/match_false_edges.rs:+0:29: +0:29
@@ -32,7 +32,7 @@ fn full_tested_match2() -> () {
     }
 
     bb1: {
-        falseEdge -> [real: bb9, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:13
+        falseEdge -> [real: bb10, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:13
     }
 
     bb2: {
@@ -47,7 +47,7 @@ fn full_tested_match2() -> () {
         _1 = (const 2_i32, move _10);    // scope 3 at $DIR/match_false_edges.rs:+4:20: +4:26
         StorageDead(_10);                // scope 3 at $DIR/match_false_edges.rs:+4:25: +4:26
         StorageDead(_9);                 // scope 0 at $DIR/match_false_edges.rs:+4:25: +4:26
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+4:25: +4:26
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+4:25: +4:26
     }
 
     bb4: {
@@ -59,7 +59,7 @@ fn full_tested_match2() -> () {
         _6 = &((_2 as Some).0: i32);     // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:15
         _4 = &shallow _2;                // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:27
         StorageLive(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
-        _7 = guard() -> [return: bb6, unwind: bb11]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
+        _7 = guard() -> [return: bb6, unwind: bb12]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
                                          // mir::Constant
                                          // + span: $DIR/match_false_edges.rs:25:20: 25:25
                                          // + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
@@ -81,28 +81,32 @@ fn full_tested_match2() -> () {
         StorageDead(_8);                 // scope 2 at $DIR/match_false_edges.rs:+2:36: +2:37
         StorageDead(_5);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
     }
 
     bb8: {
+        goto -> bb9;                     // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
+    }
+
+    bb9: {
         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:26: +2:27
         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:36: +2:37
         falseEdge -> [real: bb3, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:20: +2:27
     }
 
-    bb9: {
+    bb10: {
         _1 = (const 3_i32, const 3_i32); // scope 0 at $DIR/match_false_edges.rs:+3:17: +3:23
-        goto -> bb10;                    // scope 0 at $DIR/match_false_edges.rs:+3:17: +3:23
+        goto -> bb11;                    // scope 0 at $DIR/match_false_edges.rs:+3:17: +3:23
     }
 
-    bb10: {
+    bb11: {
         StorageDead(_2);                 // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
         StorageDead(_1);                 // scope 0 at $DIR/match_false_edges.rs:+5:6: +5:7
         _0 = const ();                   // scope 0 at $DIR/match_false_edges.rs:+0:29: +6:2
         return;                          // scope 0 at $DIR/match_false_edges.rs:+6:2: +6:2
     }
 
-    bb11 (cleanup): {
+    bb12 (cleanup): {
         resume;                          // scope 0 at $DIR/match_false_edges.rs:+0:1: +6:2
     }
 }
diff --git a/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir b/src/test/mir-opt/building/match_false_edges.main.built.after.mir
index 8f40e8a887f..08c67d39d78 100644
--- a/src/test/mir-opt/match_false_edges.main.PromoteTemps.before.mir
+++ b/src/test/mir-opt/building/match_false_edges.main.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `main` before PromoteTemps
+// MIR for `main` after built
 
 fn main() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/match_false_edges.rs:+0:11: +0:11
@@ -43,41 +43,54 @@ fn main() -> () {
     }
 
     bb1: {
-        falseEdge -> [real: bb9, imaginary: bb4]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
+        falseEdge -> [real: bb13, imaginary: bb6]; // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
     }
 
     bb2: {
-        falseEdge -> [real: bb5, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:9: +2:17
+        falseEdge -> [real: bb8, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:9: +2:17
     }
 
     bb3: {
+        goto -> bb1;                     // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
+    }
+
+    bb4: {
+        _3 = discriminant(_2);           // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
+        switchInt(move _3) -> [1_isize: bb6, otherwise: bb5]; // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
+    }
+
+    bb5: {
         StorageLive(_14);                // scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
         _14 = _2;                        // scope 0 at $DIR/match_false_edges.rs:+5:9: +5:11
         _1 = const 4_i32;                // scope 5 at $DIR/match_false_edges.rs:+5:15: +5:16
         StorageDead(_14);                // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
-        goto -> bb14;                    // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
+        goto -> bb19;                    // scope 0 at $DIR/match_false_edges.rs:+5:15: +5:16
     }
 
-    bb4: {
-        falseEdge -> [real: bb10, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+4:9: +4:16
+    bb6: {
+        falseEdge -> [real: bb14, imaginary: bb5]; // scope 0 at $DIR/match_false_edges.rs:+4:9: +4:16
     }
 
-    bb5: {
+    bb7: {
+        goto -> bb5;                     // scope 0 at $DIR/match_false_edges.rs:+1:13: +1:26
+    }
+
+    bb8: {
         StorageLive(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
         _7 = &((_2 as Some).0: i32);     // scope 0 at $DIR/match_false_edges.rs:+2:14: +2:16
         _5 = &shallow _2;                // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
         StorageLive(_8);                 // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
-        _8 = guard() -> [return: bb6, unwind: bb15]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
+        _8 = guard() -> [return: bb9, unwind: bb20]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
                                          // mir::Constant
                                          // + span: $DIR/match_false_edges.rs:34:21: 34:26
                                          // + literal: Const { ty: fn() -> bool {guard}, val: Value(<ZST>) }
     }
 
-    bb6: {
-        switchInt(move _8) -> [false: bb8, otherwise: bb7]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
+    bb9: {
+        switchInt(move _8) -> [false: bb11, otherwise: bb10]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
     }
 
-    bb7: {
+    bb10: {
         StorageDead(_8);                 // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
         FakeRead(ForMatchGuard, _5);     // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
         FakeRead(ForGuardBinding, _7);   // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
@@ -86,41 +99,45 @@ fn main() -> () {
         _1 = const 1_i32;                // scope 2 at $DIR/match_false_edges.rs:+2:32: +2:33
         StorageDead(_6);                 // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
-        goto -> bb14;                    // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
+        goto -> bb19;                    // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
     }
 
-    bb8: {
+    bb11: {
+        goto -> bb12;                    // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
+    }
+
+    bb12: {
         StorageDead(_8);                 // scope 0 at $DIR/match_false_edges.rs:+2:27: +2:28
         StorageDead(_7);                 // scope 0 at $DIR/match_false_edges.rs:+2:32: +2:33
-        falseEdge -> [real: bb1, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
+        falseEdge -> [real: bb3, imaginary: bb1]; // scope 0 at $DIR/match_false_edges.rs:+2:21: +2:28
     }
 
-    bb9: {
+    bb13: {
         StorageLive(_9);                 // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
         _9 = _2;                         // scope 0 at $DIR/match_false_edges.rs:+3:9: +3:11
         _1 = const 2_i32;                // scope 3 at $DIR/match_false_edges.rs:+3:15: +3:16
         StorageDead(_9);                 // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
-        goto -> bb14;                    // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
+        goto -> bb19;                    // scope 0 at $DIR/match_false_edges.rs:+3:15: +3:16
     }
 
-    bb10: {
+    bb14: {
         StorageLive(_11);                // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
         _11 = &((_2 as Some).0: i32);    // scope 0 at $DIR/match_false_edges.rs:+4:14: +4:15
         _5 = &shallow _2;                // scope 0 at $DIR/match_false_edges.rs:+1:19: +1:26
         StorageLive(_12);                // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
         StorageLive(_13);                // scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
         _13 = (*_11);                    // scope 0 at $DIR/match_false_edges.rs:+4:27: +4:28
-        _12 = guard2(move _13) -> [return: bb11, unwind: bb15]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
+        _12 = guard2(move _13) -> [return: bb15, unwind: bb20]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
                                          // mir::Constant
                                          // + span: $DIR/match_false_edges.rs:36:20: 36:26
                                          // + literal: Const { ty: fn(i32) -> bool {guard2}, val: Value(<ZST>) }
     }
 
-    bb11: {
-        switchInt(move _12) -> [false: bb13, otherwise: bb12]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
+    bb15: {
+        switchInt(move _12) -> [false: bb17, otherwise: bb16]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
     }
 
-    bb12: {
+    bb16: {
         StorageDead(_13);                // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
         StorageDead(_12);                // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
         FakeRead(ForMatchGuard, _5);     // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
@@ -130,24 +147,28 @@ fn main() -> () {
         _1 = const 3_i32;                // scope 4 at $DIR/match_false_edges.rs:+4:33: +4:34
         StorageDead(_10);                // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
         StorageDead(_11);                // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
-        goto -> bb14;                    // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
+        goto -> bb19;                    // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
     }
 
-    bb13: {
+    bb17: {
+        goto -> bb18;                    // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
+    }
+
+    bb18: {
         StorageDead(_13);                // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
         StorageDead(_12);                // scope 0 at $DIR/match_false_edges.rs:+4:28: +4:29
         StorageDead(_11);                // scope 0 at $DIR/match_false_edges.rs:+4:33: +4:34
-        falseEdge -> [real: bb3, imaginary: bb3]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
+        falseEdge -> [real: bb7, imaginary: bb5]; // scope 0 at $DIR/match_false_edges.rs:+4:20: +4:29
     }
 
-    bb14: {
+    bb19: {
         StorageDead(_2);                 // scope 0 at $DIR/match_false_edges.rs:+6:6: +6:7
         StorageDead(_1);                 // scope 0 at $DIR/match_false_edges.rs:+6:6: +6:7
         _0 = const ();                   // scope 0 at $DIR/match_false_edges.rs:+0:11: +7:2
         return;                          // scope 0 at $DIR/match_false_edges.rs:+7:2: +7:2
     }
 
-    bb15 (cleanup): {
+    bb20 (cleanup): {
         resume;                          // scope 0 at $DIR/match_false_edges.rs:+0:1: +7:2
     }
 }
diff --git a/src/test/mir-opt/match_false_edges.rs b/src/test/mir-opt/building/match_false_edges.rs
index 3603253dafc..ddfcc149319 100644
--- a/src/test/mir-opt/match_false_edges.rs
+++ b/src/test/mir-opt/building/match_false_edges.rs
@@ -8,7 +8,7 @@ fn guard2(_: i32) -> bool {
 
 // no_mangle to make sure this gets instantiated even in an executable.
 #[no_mangle]
-// EMIT_MIR match_false_edges.full_tested_match.PromoteTemps.after.mir
+// EMIT_MIR match_false_edges.full_tested_match.built.after.mir
 pub fn full_tested_match() {
     let _ = match Some(42) {
         Some(x) if guard() => (1, x),
@@ -19,7 +19,7 @@ pub fn full_tested_match() {
 
 // no_mangle to make sure this gets instantiated even in an executable.
 #[no_mangle]
-// EMIT_MIR match_false_edges.full_tested_match2.PromoteTemps.before.mir
+// EMIT_MIR match_false_edges.full_tested_match2.built.after.mir
 pub fn full_tested_match2() {
     let _ = match Some(42) {
         Some(x) if guard() => (1, x),
@@ -28,7 +28,7 @@ pub fn full_tested_match2() {
     };
 }
 
-// EMIT_MIR match_false_edges.main.PromoteTemps.before.mir
+// EMIT_MIR match_false_edges.main.built.after.mir
 fn main() {
     let _ = match Some(1) {
         Some(_w) if guard() => 1,
diff --git a/src/test/mir-opt/receiver_ptr_mutability.main.mir_map.0.mir b/src/test/mir-opt/building/receiver_ptr_mutability.main.built.after.mir
index 45797ec0607..41eb00363bd 100644
--- a/src/test/mir-opt/receiver_ptr_mutability.main.mir_map.0.mir
+++ b/src/test/mir-opt/building/receiver_ptr_mutability.main.built.after.mir
@@ -1,96 +1,96 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut Test) }, span: $DIR/receiver-ptr-mutability.rs:14:14: 14:23, inferred_ty: *mut Test
-| 1: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut Test) }, span: $DIR/receiver-ptr-mutability.rs:14:14: 14:23, inferred_ty: *mut Test
-| 2: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }], value: Ty(&&&&*mut Test) }, span: $DIR/receiver-ptr-mutability.rs:18:18: 18:31, inferred_ty: &&&&*mut Test
-| 3: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }], value: Ty(&&&&*mut Test) }, span: $DIR/receiver-ptr-mutability.rs:18:18: 18:31, inferred_ty: &&&&*mut Test
+| 0: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut Test) }, span: $DIR/receiver_ptr_mutability.rs:14:14: 14:23, inferred_ty: *mut Test
+| 1: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(*mut Test) }, span: $DIR/receiver_ptr_mutability.rs:14:14: 14:23, inferred_ty: *mut Test
+| 2: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }], value: Ty(&&&&*mut Test) }, span: $DIR/receiver_ptr_mutability.rs:18:18: 18:31, inferred_ty: &&&&*mut Test
+| 3: user_ty: Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Region(U0) }], value: Ty(&&&&*mut Test) }, span: $DIR/receiver_ptr_mutability.rs:18:18: 18:31, inferred_ty: &&&&*mut Test
 |
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/receiver-ptr-mutability.rs:+0:11: +0:11
-    let _1: *mut Test as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 0 at $DIR/receiver-ptr-mutability.rs:+1:9: +1:12
-    let _2: ();                          // in scope 0 at $DIR/receiver-ptr-mutability.rs:+2:5: +2:12
-    let mut _3: *const Test;             // in scope 0 at $DIR/receiver-ptr-mutability.rs:+2:5: +2:12
-    let mut _4: *mut Test;               // in scope 0 at $DIR/receiver-ptr-mutability.rs:+2:5: +2:8
-    let _6: &&&&*mut Test;               // in scope 0 at $DIR/receiver-ptr-mutability.rs:+5:34: +5:41
-    let _7: &&&*mut Test;                // in scope 0 at $DIR/receiver-ptr-mutability.rs:+5:35: +5:41
-    let _8: &&*mut Test;                 // in scope 0 at $DIR/receiver-ptr-mutability.rs:+5:36: +5:41
-    let _9: &*mut Test;                  // in scope 0 at $DIR/receiver-ptr-mutability.rs:+5:37: +5:41
-    let _10: ();                         // in scope 0 at $DIR/receiver-ptr-mutability.rs:+6:5: +6:16
-    let mut _11: *const Test;            // in scope 0 at $DIR/receiver-ptr-mutability.rs:+6:5: +6:16
-    let mut _12: *mut Test;              // in scope 0 at $DIR/receiver-ptr-mutability.rs:+6:5: +6:16
+    let mut _0: ();                      // return place in scope 0 at $DIR/receiver_ptr_mutability.rs:+0:11: +0:11
+    let _1: *mut Test as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 0 at $DIR/receiver_ptr_mutability.rs:+1:9: +1:12
+    let _2: ();                          // in scope 0 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
+    let mut _3: *const Test;             // in scope 0 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
+    let mut _4: *mut Test;               // in scope 0 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:8
+    let _6: &&&&*mut Test;               // in scope 0 at $DIR/receiver_ptr_mutability.rs:+5:34: +5:41
+    let _7: &&&*mut Test;                // in scope 0 at $DIR/receiver_ptr_mutability.rs:+5:35: +5:41
+    let _8: &&*mut Test;                 // in scope 0 at $DIR/receiver_ptr_mutability.rs:+5:36: +5:41
+    let _9: &*mut Test;                  // in scope 0 at $DIR/receiver_ptr_mutability.rs:+5:37: +5:41
+    let _10: ();                         // in scope 0 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
+    let mut _11: *const Test;            // in scope 0 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
+    let mut _12: *mut Test;              // in scope 0 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
     scope 1 {
-        debug ptr => _1;                 // in scope 1 at $DIR/receiver-ptr-mutability.rs:+1:9: +1:12
-        let _5: &&&&*mut Test as UserTypeProjection { base: UserType(2), projs: [] }; // in scope 1 at $DIR/receiver-ptr-mutability.rs:+5:9: +5:16
+        debug ptr => _1;                 // in scope 1 at $DIR/receiver_ptr_mutability.rs:+1:9: +1:12
+        let _5: &&&&*mut Test as UserTypeProjection { base: UserType(2), projs: [] }; // in scope 1 at $DIR/receiver_ptr_mutability.rs:+5:9: +5:16
         scope 2 {
-            debug ptr_ref => _5;         // in scope 2 at $DIR/receiver-ptr-mutability.rs:+5:9: +5:16
+            debug ptr_ref => _5;         // in scope 2 at $DIR/receiver_ptr_mutability.rs:+5:9: +5:16
         }
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/receiver-ptr-mutability.rs:+1:9: +1:12
-        _1 = null_mut::<Test>() -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/receiver-ptr-mutability.rs:+1:26: +1:46
+        StorageLive(_1);                 // scope 0 at $DIR/receiver_ptr_mutability.rs:+1:9: +1:12
+        _1 = null_mut::<Test>() -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/receiver_ptr_mutability.rs:+1:26: +1:46
                                          // mir::Constant
-                                         // + span: $DIR/receiver-ptr-mutability.rs:14:26: 14:44
+                                         // + span: $DIR/receiver_ptr_mutability.rs:14:26: 14:44
                                          // + literal: Const { ty: fn() -> *mut Test {null_mut::<Test>}, val: Value(<ZST>) }
     }
 
     bb1: {
-        FakeRead(ForLet(None), _1);      // scope 0 at $DIR/receiver-ptr-mutability.rs:+1:9: +1:12
-        AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 0 at $DIR/receiver-ptr-mutability.rs:+1:14: +1:23
-        StorageLive(_2);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+2:5: +2:12
-        StorageLive(_3);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+2:5: +2:12
-        StorageLive(_4);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+2:5: +2:8
-        _4 = _1;                         // scope 1 at $DIR/receiver-ptr-mutability.rs:+2:5: +2:8
-        _3 = move _4 as *const Test (Pointer(MutToConstPointer)); // scope 1 at $DIR/receiver-ptr-mutability.rs:+2:5: +2:12
-        StorageDead(_4);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+2:7: +2:8
-        _2 = Test::x(move _3) -> [return: bb2, unwind: bb4]; // scope 1 at $DIR/receiver-ptr-mutability.rs:+2:5: +2:12
+        FakeRead(ForLet(None), _1);      // scope 0 at $DIR/receiver_ptr_mutability.rs:+1:9: +1:12
+        AscribeUserType(_1, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 0 at $DIR/receiver_ptr_mutability.rs:+1:14: +1:23
+        StorageLive(_2);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
+        StorageLive(_3);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
+        StorageLive(_4);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:8
+        _4 = _1;                         // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:8
+        _3 = move _4 as *const Test (Pointer(MutToConstPointer)); // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
+        StorageDead(_4);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:7: +2:8
+        _2 = Test::x(move _3) -> [return: bb2, unwind: bb4]; // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:5: +2:12
                                          // mir::Constant
-                                         // + span: $DIR/receiver-ptr-mutability.rs:15:9: 15:10
+                                         // + span: $DIR/receiver_ptr_mutability.rs:15:9: 15:10
                                          // + literal: Const { ty: fn(*const Test) {Test::x}, val: Value(<ZST>) }
     }
 
     bb2: {
-        StorageDead(_3);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+2:11: +2:12
-        StorageDead(_2);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+2:12: +2:13
-        StorageLive(_5);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:9: +5:16
-        StorageLive(_6);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:34: +5:41
-        StorageLive(_7);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:35: +5:41
-        StorageLive(_8);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:36: +5:41
-        StorageLive(_9);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:37: +5:41
-        _9 = &_1;                        // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:37: +5:41
-        _8 = &_9;                        // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:36: +5:41
-        _7 = &_8;                        // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:35: +5:41
-        _6 = &_7;                        // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:34: +5:41
-        _5 = &(*_6);                     // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:34: +5:41
-        FakeRead(ForLet(None), _5);      // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:9: +5:16
-        AscribeUserType(_5, o, UserTypeProjection { base: UserType(3), projs: [] }); // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:18: +5:31
-        StorageDead(_6);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+5:41: +5:42
-        StorageLive(_10);                // scope 2 at $DIR/receiver-ptr-mutability.rs:+6:5: +6:16
-        StorageLive(_11);                // scope 2 at $DIR/receiver-ptr-mutability.rs:+6:5: +6:16
-        StorageLive(_12);                // scope 2 at $DIR/receiver-ptr-mutability.rs:+6:5: +6:16
-        _12 = (*(*(*(*_5))));            // scope 2 at $DIR/receiver-ptr-mutability.rs:+6:5: +6:16
-        _11 = move _12 as *const Test (Pointer(MutToConstPointer)); // scope 2 at $DIR/receiver-ptr-mutability.rs:+6:5: +6:16
-        StorageDead(_12);                // scope 2 at $DIR/receiver-ptr-mutability.rs:+6:11: +6:12
-        _10 = Test::x(move _11) -> [return: bb3, unwind: bb4]; // scope 2 at $DIR/receiver-ptr-mutability.rs:+6:5: +6:16
+        StorageDead(_3);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:11: +2:12
+        StorageDead(_2);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+2:12: +2:13
+        StorageLive(_5);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:9: +5:16
+        StorageLive(_6);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:34: +5:41
+        StorageLive(_7);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:35: +5:41
+        StorageLive(_8);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:36: +5:41
+        StorageLive(_9);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:37: +5:41
+        _9 = &_1;                        // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:37: +5:41
+        _8 = &_9;                        // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:36: +5:41
+        _7 = &_8;                        // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:35: +5:41
+        _6 = &_7;                        // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:34: +5:41
+        _5 = &(*_6);                     // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:34: +5:41
+        FakeRead(ForLet(None), _5);      // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:9: +5:16
+        AscribeUserType(_5, o, UserTypeProjection { base: UserType(3), projs: [] }); // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:18: +5:31
+        StorageDead(_6);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+5:41: +5:42
+        StorageLive(_10);                // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
+        StorageLive(_11);                // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
+        StorageLive(_12);                // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
+        _12 = (*(*(*(*_5))));            // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
+        _11 = move _12 as *const Test (Pointer(MutToConstPointer)); // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
+        StorageDead(_12);                // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:11: +6:12
+        _10 = Test::x(move _11) -> [return: bb3, unwind: bb4]; // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:5: +6:16
                                          // mir::Constant
-                                         // + span: $DIR/receiver-ptr-mutability.rs:19:13: 19:14
+                                         // + span: $DIR/receiver_ptr_mutability.rs:19:13: 19:14
                                          // + literal: Const { ty: fn(*const Test) {Test::x}, val: Value(<ZST>) }
     }
 
     bb3: {
-        StorageDead(_11);                // scope 2 at $DIR/receiver-ptr-mutability.rs:+6:15: +6:16
-        StorageDead(_10);                // scope 2 at $DIR/receiver-ptr-mutability.rs:+6:16: +6:17
-        _0 = const ();                   // scope 0 at $DIR/receiver-ptr-mutability.rs:+0:11: +7:2
-        StorageDead(_9);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+7:1: +7:2
-        StorageDead(_8);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+7:1: +7:2
-        StorageDead(_7);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+7:1: +7:2
-        StorageDead(_5);                 // scope 1 at $DIR/receiver-ptr-mutability.rs:+7:1: +7:2
-        StorageDead(_1);                 // scope 0 at $DIR/receiver-ptr-mutability.rs:+7:1: +7:2
-        return;                          // scope 0 at $DIR/receiver-ptr-mutability.rs:+7:2: +7:2
+        StorageDead(_11);                // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:15: +6:16
+        StorageDead(_10);                // scope 2 at $DIR/receiver_ptr_mutability.rs:+6:16: +6:17
+        _0 = const ();                   // scope 0 at $DIR/receiver_ptr_mutability.rs:+0:11: +7:2
+        StorageDead(_9);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+7:1: +7:2
+        StorageDead(_8);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+7:1: +7:2
+        StorageDead(_7);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+7:1: +7:2
+        StorageDead(_5);                 // scope 1 at $DIR/receiver_ptr_mutability.rs:+7:1: +7:2
+        StorageDead(_1);                 // scope 0 at $DIR/receiver_ptr_mutability.rs:+7:1: +7:2
+        return;                          // scope 0 at $DIR/receiver_ptr_mutability.rs:+7:2: +7:2
     }
 
     bb4 (cleanup): {
-        resume;                          // scope 0 at $DIR/receiver-ptr-mutability.rs:+0:1: +7:2
+        resume;                          // scope 0 at $DIR/receiver_ptr_mutability.rs:+0:1: +7:2
     }
 }
diff --git a/src/test/mir-opt/receiver-ptr-mutability.rs b/src/test/mir-opt/building/receiver_ptr_mutability.rs
index 8e2ff0451c6..668530968fe 100644
--- a/src/test/mir-opt/receiver-ptr-mutability.rs
+++ b/src/test/mir-opt/building/receiver_ptr_mutability.rs
@@ -1,4 +1,4 @@
-// EMIT_MIR receiver_ptr_mutability.main.mir_map.0.mir
+// EMIT_MIR receiver_ptr_mutability.main.built.after.mir
 
 #![feature(arbitrary_self_types)]
 
diff --git a/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir b/src/test/mir-opt/building/simple_match.match_bool.built.after.mir
index 3bef6aa0579..a4516026c3b 100644
--- a/src/test/mir-opt/simple_match.match_bool.mir_map.0.mir
+++ b/src/test/mir-opt/building/simple_match.match_bool.built.after.mir
@@ -1,29 +1,29 @@
-// MIR for `match_bool` 0 mir_map
+// MIR for `match_bool` after built
 
 fn match_bool(_1: bool) -> usize {
-    debug x => _1;                       // in scope 0 at $DIR/simple-match.rs:+0:15: +0:16
-    let mut _0: usize;                   // return place in scope 0 at $DIR/simple-match.rs:+0:27: +0:32
+    debug x => _1;                       // in scope 0 at $DIR/simple_match.rs:+0:15: +0:16
+    let mut _0: usize;                   // return place in scope 0 at $DIR/simple_match.rs:+0:27: +0:32
 
     bb0: {
-        FakeRead(ForMatchedPlace(None), _1); // scope 0 at $DIR/simple-match.rs:+1:11: +1:12
-        switchInt(_1) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/simple-match.rs:+1:5: +1:12
+        FakeRead(ForMatchedPlace(None), _1); // scope 0 at $DIR/simple_match.rs:+1:11: +1:12
+        switchInt(_1) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/simple_match.rs:+1:5: +1:12
     }
 
     bb1: {
-        falseEdge -> [real: bb3, imaginary: bb2]; // scope 0 at $DIR/simple-match.rs:+2:9: +2:13
+        falseEdge -> [real: bb3, imaginary: bb2]; // scope 0 at $DIR/simple_match.rs:+2:9: +2:13
     }
 
     bb2: {
-        _0 = const 20_usize;             // scope 0 at $DIR/simple-match.rs:+3:14: +3:16
-        goto -> bb4;                     // scope 0 at $DIR/simple-match.rs:+3:14: +3:16
+        _0 = const 20_usize;             // scope 0 at $DIR/simple_match.rs:+3:14: +3:16
+        goto -> bb4;                     // scope 0 at $DIR/simple_match.rs:+3:14: +3:16
     }
 
     bb3: {
-        _0 = const 10_usize;             // scope 0 at $DIR/simple-match.rs:+2:17: +2:19
-        goto -> bb4;                     // scope 0 at $DIR/simple-match.rs:+2:17: +2:19
+        _0 = const 10_usize;             // scope 0 at $DIR/simple_match.rs:+2:17: +2:19
+        goto -> bb4;                     // scope 0 at $DIR/simple_match.rs:+2:17: +2:19
     }
 
     bb4: {
-        return;                          // scope 0 at $DIR/simple-match.rs:+5:2: +5:2
+        return;                          // scope 0 at $DIR/simple_match.rs:+5:2: +5:2
     }
 }
diff --git a/src/test/mir-opt/simple-match.rs b/src/test/mir-opt/building/simple_match.rs
index 103033c4e2b..0ef97dde636 100644
--- a/src/test/mir-opt/simple-match.rs
+++ b/src/test/mir-opt/building/simple_match.rs
@@ -1,7 +1,7 @@
 // Test that we don't generate unnecessarily large MIR for very simple matches
 
 
-// EMIT_MIR simple_match.match_bool.mir_map.0.mir
+// EMIT_MIR simple_match.match_bool.built.after.mir
 fn match_bool(x: bool) -> usize {
     match x {
         true => 10,
diff --git a/src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir b/src/test/mir-opt/building/storage_live_dead_in_statics.XXX.built.after.mir
index e50067ea25e..1d3f77e079b 100644
--- a/src/test/mir-opt/storage_live_dead_in_statics.XXX.mir_map.0.mir
+++ b/src/test/mir-opt/building/storage_live_dead_in_statics.XXX.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `XXX` 0 mir_map
+// MIR for `XXX` after built
 
 static XXX: &Foo = {
     let mut _0: &Foo;                    // return place in scope 0 at $DIR/storage_live_dead_in_statics.rs:+0:13: +0:25
diff --git a/src/test/mir-opt/storage_live_dead_in_statics.rs b/src/test/mir-opt/building/storage_live_dead_in_statics.rs
index b03de8612fc..79f709148e3 100644
--- a/src/test/mir-opt/storage_live_dead_in_statics.rs
+++ b/src/test/mir-opt/building/storage_live_dead_in_statics.rs
@@ -1,7 +1,7 @@
 // Check that when we compile the static `XXX` into MIR, we do not
 // generate `StorageStart` or `StorageEnd` statements.
 
-// EMIT_MIR storage_live_dead_in_statics.XXX.mir_map.0.mir
+// EMIT_MIR storage_live_dead_in_statics.XXX.built.after.mir
 static XXX: &'static Foo = &Foo {
     tup: "hi",
     data: &[
diff --git a/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir b/src/test/mir-opt/building/uniform_array_move_out.move_out_by_subslice.built.after.mir
index 6a5021139cf..234cd083977 100644
--- a/src/test/mir-opt/uniform_array_move_out.move_out_by_subslice.mir_map.0.mir
+++ b/src/test/mir-opt/building/uniform_array_move_out.move_out_by_subslice.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `move_out_by_subslice` 0 mir_map
+// MIR for `move_out_by_subslice` after built
 
 fn move_out_by_subslice() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/uniform_array_move_out.rs:+0:27: +0:27
diff --git a/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir b/src/test/mir-opt/building/uniform_array_move_out.move_out_from_end.built.after.mir
index 23a50b22ad1..24a189498d3 100644
--- a/src/test/mir-opt/uniform_array_move_out.move_out_from_end.mir_map.0.mir
+++ b/src/test/mir-opt/building/uniform_array_move_out.move_out_from_end.built.after.mir
@@ -1,4 +1,4 @@
-// MIR for `move_out_from_end` 0 mir_map
+// MIR for `move_out_from_end` after built
 
 fn move_out_from_end() -> () {
     let mut _0: ();                      // return place in scope 0 at $DIR/uniform_array_move_out.rs:+0:24: +0:24
diff --git a/src/test/mir-opt/uniform_array_move_out.rs b/src/test/mir-opt/building/uniform_array_move_out.rs
index 35e42552870..e925036ecf6 100644
--- a/src/test/mir-opt/uniform_array_move_out.rs
+++ b/src/test/mir-opt/building/uniform_array_move_out.rs
@@ -1,12 +1,12 @@
 #![feature(box_syntax)]
 
-// EMIT_MIR uniform_array_move_out.move_out_from_end.mir_map.0.mir
+// EMIT_MIR uniform_array_move_out.move_out_from_end.built.after.mir
 fn move_out_from_end() {
     let a = [box 1, box 2];
     let [.., _y] = a;
 }
 
-// EMIT_MIR uniform_array_move_out.move_out_by_subslice.mir_map.0.mir
+// EMIT_MIR uniform_array_move_out.move_out_by_subslice.built.after.mir
 fn move_out_by_subslice() {
     let a = [box 1, box 2];
     let [_y @ ..] = a;
diff --git a/src/test/mir-opt/const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir
index 7650769de3b..028480bdc88 100644
--- a/src/test/mir-opt/const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/const_promotion_extern_static.BAR-promoted[0].SimplifyCfg-elaborate-drops.after.mir
@@ -1,20 +1,20 @@
 // MIR for `BAR::promoted[0]` after SimplifyCfg-elaborate-drops
 
 promoted[0] in BAR: &[&i32; 1] = {
-    let mut _0: &[&i32; 1];              // return place in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
-    let mut _1: [&i32; 1];               // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:35
-    let mut _2: &i32;                    // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:34
-    let mut _3: &i32;                    // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:33: +0:34
+    let mut _0: &[&i32; 1];              // return place in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
+    let mut _1: [&i32; 1];               // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:35
+    let mut _2: &i32;                    // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:34
+    let mut _3: &i32;                    // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:33: +0:34
 
     bb0: {
-        _3 = const {alloc1: &i32};       // scope 0 at $DIR/const-promotion-extern-static.rs:+0:33: +0:34
+        _3 = const {alloc1: &i32};       // scope 0 at $DIR/const_promotion_extern_static.rs:+0:33: +0:34
                                          // mir::Constant
-                                         // + span: $DIR/const-promotion-extern-static.rs:9:33: 9:34
+                                         // + span: $DIR/const_promotion_extern_static.rs:9:33: 9:34
                                          // + literal: Const { ty: &i32, val: Value(Scalar(alloc1)) }
-        _2 = &(*_3);                     // scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:34
-        _1 = [move _2];                  // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:35
-        _0 = &_1;                        // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
-        return;                          // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
+        _2 = &(*_3);                     // scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:34
+        _1 = [move _2];                  // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:35
+        _0 = &_1;                        // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
+        return;                          // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
     }
 }
 
diff --git a/src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff b/src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff
index f8a7c687e12..2ef4378115f 100644
--- a/src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff
+++ b/src/test/mir-opt/const_promotion_extern_static.BAR.PromoteTemps.diff
@@ -2,49 +2,49 @@
 + // MIR for `BAR` after PromoteTemps
   
   static mut BAR: *const &i32 = {
-      let mut _0: *const &i32;             // return place in scope 0 at $DIR/const-promotion-extern-static.rs:+0:17: +0:28
-      let mut _1: &[&i32];                 // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
-      let mut _2: &[&i32; 1];              // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
-      let _3: [&i32; 1];                   // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:35
-      let mut _4: &i32;                    // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:34
-      let _5: &i32;                        // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:33: +0:34
-+     let mut _6: &[&i32; 1];              // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
+      let mut _0: *const &i32;             // return place in scope 0 at $DIR/const_promotion_extern_static.rs:+0:17: +0:28
+      let mut _1: &[&i32];                 // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
+      let mut _2: &[&i32; 1];              // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
+      let _3: [&i32; 1];                   // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:35
+      let mut _4: &i32;                    // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:34
+      let _5: &i32;                        // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:33: +0:34
++     let mut _6: &[&i32; 1];              // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
-          StorageLive(_2);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
--         StorageLive(_3);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:35
--         StorageLive(_4);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:34
--         StorageLive(_5);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:33: +0:34
--         _5 = const {alloc1: &i32};       // scope 0 at $DIR/const-promotion-extern-static.rs:+0:33: +0:34
-+         _6 = const _;                    // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
+          StorageLive(_1);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
+          StorageLive(_2);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
+-         StorageLive(_3);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:35
+-         StorageLive(_4);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:34
+-         StorageLive(_5);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:33: +0:34
+-         _5 = const {alloc1: &i32};       // scope 0 at $DIR/const_promotion_extern_static.rs:+0:33: +0:34
++         _6 = const _;                    // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
                                            // mir::Constant
--                                          // + span: $DIR/const-promotion-extern-static.rs:9:33: 9:34
+-                                          // + span: $DIR/const_promotion_extern_static.rs:9:33: 9:34
 -                                          // + literal: Const { ty: &i32, val: Value(Scalar(alloc1)) }
--         _4 = &(*_5);                     // scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:34
--         _3 = [move _4];                  // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:35
--         _2 = &_3;                        // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
-+                                          // + span: $DIR/const-promotion-extern-static.rs:9:31: 9:44
+-         _4 = &(*_5);                     // scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:34
+-         _3 = [move _4];                  // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:35
+-         _2 = &_3;                        // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
++                                          // + span: $DIR/const_promotion_extern_static.rs:9:31: 9:44
 +                                          // + literal: Const { ty: &[&i32; 1], val: Unevaluated(BAR, [], Some(promoted[0])) }
-+         _2 = &(*_6);                     // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
-          _1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
--         StorageDead(_4);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:34: +0:35
-          StorageDead(_2);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:34: +0:35
-          _0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:44
++         _2 = &(*_6);                     // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
+          _1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
+-         StorageDead(_4);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:34: +0:35
+          StorageDead(_2);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:34: +0:35
+          _0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:44
                                            // mir::Constant
-                                           // + span: $DIR/const-promotion-extern-static.rs:9:36: 9:42
+                                           // + span: $DIR/const_promotion_extern_static.rs:9:36: 9:42
                                            // + literal: Const { ty: for<'a> fn(&'a [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
       }
   
       bb1: {
--         StorageDead(_5);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:43: +0:44
--         StorageDead(_3);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:43: +0:44
-          StorageDead(_1);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:43: +0:44
-          return;                          // scope 0 at $DIR/const-promotion-extern-static.rs:+0:1: +0:45
+-         StorageDead(_5);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:43: +0:44
+-         StorageDead(_3);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:43: +0:44
+          StorageDead(_1);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:43: +0:44
+          return;                          // scope 0 at $DIR/const_promotion_extern_static.rs:+0:1: +0:45
       }
   
       bb2 (cleanup): {
-          resume;                          // scope 0 at $DIR/const-promotion-extern-static.rs:+0:1: +0:45
+          resume;                          // scope 0 at $DIR/const_promotion_extern_static.rs:+0:1: +0:45
       }
 - }
 - 
diff --git a/src/test/mir-opt/const_promotion_extern_static.BOP.mir_map.0.mir b/src/test/mir-opt/const_promotion_extern_static.BOP.built.after.mir
index 90920fbe7f8..476fc49a1fe 100644
--- a/src/test/mir-opt/const_promotion_extern_static.BOP.mir_map.0.mir
+++ b/src/test/mir-opt/const_promotion_extern_static.BOP.built.after.mir
@@ -1,17 +1,17 @@
-// MIR for `BOP` 0 mir_map
+// MIR for `BOP` after built
 
 static BOP: &i32 = {
-    let mut _0: &i32;                    // return place in scope 0 at $DIR/const-promotion-extern-static.rs:+0:13: +0:17
-    let _1: &i32;                        // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:20: +0:23
-    let _2: i32;                         // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:21: +0:23
+    let mut _0: &i32;                    // return place in scope 0 at $DIR/const_promotion_extern_static.rs:+0:13: +0:17
+    let _1: &i32;                        // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:20: +0:23
+    let _2: i32;                         // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:21: +0:23
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:20: +0:23
-        StorageLive(_2);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:21: +0:23
-        _2 = const 13_i32;               // scope 0 at $DIR/const-promotion-extern-static.rs:+0:21: +0:23
-        _1 = &_2;                        // scope 0 at $DIR/const-promotion-extern-static.rs:+0:20: +0:23
-        _0 = &(*_1);                     // scope 0 at $DIR/const-promotion-extern-static.rs:+0:20: +0:23
-        StorageDead(_1);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:22: +0:23
-        return;                          // scope 0 at $DIR/const-promotion-extern-static.rs:+0:1: +0:24
+        StorageLive(_1);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:20: +0:23
+        StorageLive(_2);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:21: +0:23
+        _2 = const 13_i32;               // scope 0 at $DIR/const_promotion_extern_static.rs:+0:21: +0:23
+        _1 = &_2;                        // scope 0 at $DIR/const_promotion_extern_static.rs:+0:20: +0:23
+        _0 = &(*_1);                     // scope 0 at $DIR/const_promotion_extern_static.rs:+0:20: +0:23
+        StorageDead(_1);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:22: +0:23
+        return;                          // scope 0 at $DIR/const_promotion_extern_static.rs:+0:1: +0:24
     }
 }
diff --git a/src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir
index 71827eab1c2..41657b53fc1 100644
--- a/src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir
@@ -1,20 +1,20 @@
 // MIR for `FOO::promoted[0]` after SimplifyCfg-elaborate-drops
 
 promoted[0] in FOO: &[&i32; 1] = {
-    let mut _0: &[&i32; 1];              // return place in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
-    let mut _1: [&i32; 1];               // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:46
-    let mut _2: &i32;                    // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:45
-    let mut _3: *const i32;              // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:42: +0:43
+    let mut _0: &[&i32; 1];              // return place in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
+    let mut _1: [&i32; 1];               // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
+    let mut _2: &i32;                    // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:45
+    let mut _3: *const i32;              // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
 
     bb0: {
-        _3 = const {alloc3: *const i32}; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:42: +0:43
+        _3 = const {alloc3: *const i32}; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
                                          // mir::Constant
-                                         // + span: $DIR/const-promotion-extern-static.rs:13:42: 13:43
+                                         // + span: $DIR/const_promotion_extern_static.rs:13:42: 13:43
                                          // + literal: Const { ty: *const i32, val: Value(Scalar(alloc3)) }
-        _2 = &(*_3);                     // scope 0 at $DIR/const-promotion-extern-static.rs:+0:41: +0:43
-        _1 = [move _2];                  // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:46
-        _0 = &_1;                        // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
-        return;                          // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
+        _2 = &(*_3);                     // scope 0 at $DIR/const_promotion_extern_static.rs:+0:41: +0:43
+        _1 = [move _2];                  // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
+        _0 = &_1;                        // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
+        return;                          // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
     }
 }
 
diff --git a/src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff b/src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
index e938ca28af5..25ba0face6b 100644
--- a/src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
+++ b/src/test/mir-opt/const_promotion_extern_static.FOO.PromoteTemps.diff
@@ -2,51 +2,51 @@
 + // MIR for `FOO` after PromoteTemps
   
   static mut FOO: *const &i32 = {
-      let mut _0: *const &i32;             // return place in scope 0 at $DIR/const-promotion-extern-static.rs:+0:17: +0:28
-      let mut _1: &[&i32];                 // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
-      let mut _2: &[&i32; 1];              // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
-      let _3: [&i32; 1];                   // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:46
-      let mut _4: &i32;                    // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:45
-      let _5: *const i32;                  // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:42: +0:43
-+     let mut _6: &[&i32; 1];              // in scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
+      let mut _0: *const &i32;             // return place in scope 0 at $DIR/const_promotion_extern_static.rs:+0:17: +0:28
+      let mut _1: &[&i32];                 // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
+      let mut _2: &[&i32; 1];              // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
+      let _3: [&i32; 1];                   // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
+      let mut _4: &i32;                    // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:45
+      let _5: *const i32;                  // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
++     let mut _6: &[&i32; 1];              // in scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
       scope 1 {
       }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
-          StorageLive(_2);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
--         StorageLive(_3);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:46
--         StorageLive(_4);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:32: +0:45
--         StorageLive(_5);                 // scope 1 at $DIR/const-promotion-extern-static.rs:+0:42: +0:43
--         _5 = const {alloc3: *const i32}; // scope 1 at $DIR/const-promotion-extern-static.rs:+0:42: +0:43
-+         _6 = const _;                    // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
+          StorageLive(_1);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
+          StorageLive(_2);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
+-         StorageLive(_3);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
+-         StorageLive(_4);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:32: +0:45
+-         StorageLive(_5);                 // scope 1 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
+-         _5 = const {alloc3: *const i32}; // scope 1 at $DIR/const_promotion_extern_static.rs:+0:42: +0:43
++         _6 = const _;                    // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
                                            // mir::Constant
--                                          // + span: $DIR/const-promotion-extern-static.rs:13:42: 13:43
+-                                          // + span: $DIR/const_promotion_extern_static.rs:13:42: 13:43
 -                                          // + literal: Const { ty: *const i32, val: Value(Scalar(alloc3)) }
--         _4 = &(*_5);                     // scope 1 at $DIR/const-promotion-extern-static.rs:+0:41: +0:43
--         _3 = [move _4];                  // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:46
--         _2 = &_3;                        // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
-+                                          // + span: $DIR/const-promotion-extern-static.rs:13:31: 13:55
+-         _4 = &(*_5);                     // scope 1 at $DIR/const_promotion_extern_static.rs:+0:41: +0:43
+-         _3 = [move _4];                  // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:46
+-         _2 = &_3;                        // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
++                                          // + span: $DIR/const_promotion_extern_static.rs:13:31: 13:55
 +                                          // + literal: Const { ty: &[&i32; 1], val: Unevaluated(FOO, [], Some(promoted[0])) }
-+         _2 = &(*_6);                     // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
-          _1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
--         StorageDead(_4);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:45: +0:46
-          StorageDead(_2);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:45: +0:46
-          _0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const-promotion-extern-static.rs:+0:31: +0:55
++         _2 = &(*_6);                     // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
+          _1 = move _2 as &[&i32] (Pointer(Unsize)); // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
+-         StorageDead(_4);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:45: +0:46
+          StorageDead(_2);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:45: +0:46
+          _0 = core::slice::<impl [&i32]>::as_ptr(move _1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/const_promotion_extern_static.rs:+0:31: +0:55
                                            // mir::Constant
-                                           // + span: $DIR/const-promotion-extern-static.rs:13:47: 13:53
+                                           // + span: $DIR/const_promotion_extern_static.rs:13:47: 13:53
                                            // + literal: Const { ty: for<'a> fn(&'a [&i32]) -> *const &i32 {core::slice::<impl [&i32]>::as_ptr}, val: Value(<ZST>) }
       }
   
       bb1: {
--         StorageDead(_5);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:54: +0:55
--         StorageDead(_3);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:54: +0:55
-          StorageDead(_1);                 // scope 0 at $DIR/const-promotion-extern-static.rs:+0:54: +0:55
-          return;                          // scope 0 at $DIR/const-promotion-extern-static.rs:+0:1: +0:56
+-         StorageDead(_5);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:54: +0:55
+-         StorageDead(_3);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:54: +0:55
+          StorageDead(_1);                 // scope 0 at $DIR/const_promotion_extern_static.rs:+0:54: +0:55
+          return;                          // scope 0 at $DIR/const_promotion_extern_static.rs:+0:1: +0:56
       }
   
       bb2 (cleanup): {
-          resume;                          // scope 0 at $DIR/const-promotion-extern-static.rs:+0:1: +0:56
+          resume;                          // scope 0 at $DIR/const_promotion_extern_static.rs:+0:1: +0:56
       }
   }
 - 
diff --git a/src/test/mir-opt/const-promotion-extern-static.rs b/src/test/mir-opt/const_promotion_extern_static.rs
index a0d4e9b2c65..e4261cfe504 100644
--- a/src/test/mir-opt/const-promotion-extern-static.rs
+++ b/src/test/mir-opt/const_promotion_extern_static.rs
@@ -12,7 +12,7 @@ static mut BAR: *const &i32 = [&Y].as_ptr();
 // EMIT_MIR const_promotion_extern_static.FOO-promoted[0].SimplifyCfg-elaborate-drops.after.mir
 static mut FOO: *const &i32 = [unsafe { &X }].as_ptr();
 
-// EMIT_MIR const_promotion_extern_static.BOP.mir_map.0.mir
+// EMIT_MIR const_promotion_extern_static.BOP.built.after.mir
 static BOP: &i32 = &13;
 
 fn main() {}
diff --git a/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff b/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff
index a07bdd99825..8b3b9d0a4c1 100644
--- a/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/control_flow_simplification.hello.ConstProp.diff
@@ -2,15 +2,15 @@
 + // MIR for `hello` after ConstProp
   
   fn hello() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/control-flow-simplification.rs:+0:14: +0:14
-      let mut _1: bool;                    // in scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21
+      let mut _0: ();                      // return place in scope 0 at $DIR/control_flow_simplification.rs:+0:14: +0:14
+      let mut _1: bool;                    // in scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
       let mut _2: !;                       // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21
-          _1 = const _;                    // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21
--         switchInt(move _1) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21
-+         switchInt(const false) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control-flow-simplification.rs:+1:8: +1:21
+          StorageLive(_1);                 // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
+          _1 = const _;                    // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
+-         switchInt(move _1) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
++         switchInt(const false) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/control_flow_simplification.rs:+1:8: +1:21
       }
   
       bb1: {
@@ -25,9 +25,9 @@
       }
   
       bb2: {
-          nop;                             // scope 0 at $DIR/control-flow-simplification.rs:+3:6: +3:6
-          StorageDead(_1);                 // scope 0 at $DIR/control-flow-simplification.rs:+3:5: +3:6
-          return;                          // scope 0 at $DIR/control-flow-simplification.rs:+4:2: +4:2
+          nop;                             // scope 0 at $DIR/control_flow_simplification.rs:+3:6: +3:6
+          StorageDead(_1);                 // scope 0 at $DIR/control_flow_simplification.rs:+3:5: +3:6
+          return;                          // scope 0 at $DIR/control_flow_simplification.rs:+4:2: +4:2
       }
   }
   
diff --git a/src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir b/src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir
index 70f97977511..9f7528f0ce1 100644
--- a/src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir
+++ b/src/test/mir-opt/const_prop/control_flow_simplification.hello.PreCodegen.before.mir
@@ -1,9 +1,9 @@
 // MIR for `hello` before PreCodegen
 
 fn hello() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/control-flow-simplification.rs:+0:14: +0:14
+    let mut _0: ();                      // return place in scope 0 at $DIR/control_flow_simplification.rs:+0:14: +0:14
 
     bb0: {
-        return;                          // scope 0 at $DIR/control-flow-simplification.rs:+4:2: +4:2
+        return;                          // scope 0 at $DIR/control_flow_simplification.rs:+4:2: +4:2
     }
 }
diff --git a/src/test/mir-opt/const_prop/control-flow-simplification.rs b/src/test/mir-opt/const_prop/control_flow_simplification.rs
index 7dbe8e7344b..7dbe8e7344b 100644
--- a/src/test/mir-opt/const_prop/control-flow-simplification.rs
+++ b/src/test/mir-opt/const_prop/control_flow_simplification.rs
diff --git a/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff
index 9d541dcabbb..7d8e647cbce 100644
--- a/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/issue_66971.main.ConstProp.diff
@@ -2,32 +2,32 @@
 + // MIR for `main` after ConstProp
   
   fn main() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/issue-66971.rs:+0:11: +0:11
-      let _1: ();                          // in scope 0 at $DIR/issue-66971.rs:+1:5: +1:23
-      let mut _2: ((), u8, u8);            // in scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
-      let mut _3: ();                      // in scope 0 at $DIR/issue-66971.rs:+1:13: +1:15
+      let mut _0: ();                      // return place in scope 0 at $DIR/issue_66971.rs:+0:11: +0:11
+      let _1: ();                          // in scope 0 at $DIR/issue_66971.rs:+1:5: +1:23
+      let mut _2: ((), u8, u8);            // in scope 0 at $DIR/issue_66971.rs:+1:12: +1:22
+      let mut _3: ();                      // in scope 0 at $DIR/issue_66971.rs:+1:13: +1:15
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/issue-66971.rs:+1:5: +1:23
-          StorageLive(_2);                 // scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
-          StorageLive(_3);                 // scope 0 at $DIR/issue-66971.rs:+1:13: +1:15
-          nop;                             // scope 0 at $DIR/issue-66971.rs:+1:13: +1:15
-          Deinit(_2);                      // scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
-          nop;                             // scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
-          (_2.1: u8) = const 0_u8;         // scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
-          (_2.2: u8) = const 0_u8;         // scope 0 at $DIR/issue-66971.rs:+1:12: +1:22
-          StorageDead(_3);                 // scope 0 at $DIR/issue-66971.rs:+1:21: +1:22
-          _1 = encode(move _2) -> bb1;     // scope 0 at $DIR/issue-66971.rs:+1:5: +1:23
+          StorageLive(_1);                 // scope 0 at $DIR/issue_66971.rs:+1:5: +1:23
+          StorageLive(_2);                 // scope 0 at $DIR/issue_66971.rs:+1:12: +1:22
+          StorageLive(_3);                 // scope 0 at $DIR/issue_66971.rs:+1:13: +1:15
+          nop;                             // scope 0 at $DIR/issue_66971.rs:+1:13: +1:15
+          Deinit(_2);                      // scope 0 at $DIR/issue_66971.rs:+1:12: +1:22
+          nop;                             // scope 0 at $DIR/issue_66971.rs:+1:12: +1:22
+          (_2.1: u8) = const 0_u8;         // scope 0 at $DIR/issue_66971.rs:+1:12: +1:22
+          (_2.2: u8) = const 0_u8;         // scope 0 at $DIR/issue_66971.rs:+1:12: +1:22
+          StorageDead(_3);                 // scope 0 at $DIR/issue_66971.rs:+1:21: +1:22
+          _1 = encode(move _2) -> bb1;     // scope 0 at $DIR/issue_66971.rs:+1:5: +1:23
                                            // mir::Constant
-                                           // + span: $DIR/issue-66971.rs:17:5: 17:11
+                                           // + span: $DIR/issue_66971.rs:17:5: 17:11
                                            // + literal: Const { ty: fn(((), u8, u8)) {encode}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_2);                 // scope 0 at $DIR/issue-66971.rs:+1:22: +1:23
-          StorageDead(_1);                 // scope 0 at $DIR/issue-66971.rs:+1:23: +1:24
-          nop;                             // scope 0 at $DIR/issue-66971.rs:+0:11: +2:2
-          return;                          // scope 0 at $DIR/issue-66971.rs:+2:2: +2:2
+          StorageDead(_2);                 // scope 0 at $DIR/issue_66971.rs:+1:22: +1:23
+          StorageDead(_1);                 // scope 0 at $DIR/issue_66971.rs:+1:23: +1:24
+          nop;                             // scope 0 at $DIR/issue_66971.rs:+0:11: +2:2
+          return;                          // scope 0 at $DIR/issue_66971.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/const_prop/issue-66971.rs b/src/test/mir-opt/const_prop/issue_66971.rs
index 6ca03438ef3..6ca03438ef3 100644
--- a/src/test/mir-opt/const_prop/issue-66971.rs
+++ b/src/test/mir-opt/const_prop/issue_66971.rs
diff --git a/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff b/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff
index b79d814760d..79cd8bf4839 100644
--- a/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff
+++ b/src/test/mir-opt/const_prop/issue_67019.main.ConstProp.diff
@@ -2,33 +2,33 @@
 + // MIR for `main` after ConstProp
   
   fn main() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/issue-67019.rs:+0:11: +0:11
-      let _1: ();                          // in scope 0 at $DIR/issue-67019.rs:+1:5: +1:20
-      let mut _2: ((u8, u8),);             // in scope 0 at $DIR/issue-67019.rs:+1:10: +1:19
-      let mut _3: (u8, u8);                // in scope 0 at $DIR/issue-67019.rs:+1:11: +1:17
+      let mut _0: ();                      // return place in scope 0 at $DIR/issue_67019.rs:+0:11: +0:11
+      let _1: ();                          // in scope 0 at $DIR/issue_67019.rs:+1:5: +1:20
+      let mut _2: ((u8, u8),);             // in scope 0 at $DIR/issue_67019.rs:+1:10: +1:19
+      let mut _3: (u8, u8);                // in scope 0 at $DIR/issue_67019.rs:+1:11: +1:17
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/issue-67019.rs:+1:5: +1:20
-          StorageLive(_2);                 // scope 0 at $DIR/issue-67019.rs:+1:10: +1:19
-          StorageLive(_3);                 // scope 0 at $DIR/issue-67019.rs:+1:11: +1:17
-          Deinit(_3);                      // scope 0 at $DIR/issue-67019.rs:+1:11: +1:17
-          (_3.0: u8) = const 1_u8;         // scope 0 at $DIR/issue-67019.rs:+1:11: +1:17
-          (_3.1: u8) = const 2_u8;         // scope 0 at $DIR/issue-67019.rs:+1:11: +1:17
-          Deinit(_2);                      // scope 0 at $DIR/issue-67019.rs:+1:10: +1:19
--         (_2.0: (u8, u8)) = move _3;      // scope 0 at $DIR/issue-67019.rs:+1:10: +1:19
-+         (_2.0: (u8, u8)) = const (1_u8, 2_u8); // scope 0 at $DIR/issue-67019.rs:+1:10: +1:19
-          StorageDead(_3);                 // scope 0 at $DIR/issue-67019.rs:+1:18: +1:19
-          _1 = test(move _2) -> bb1;       // scope 0 at $DIR/issue-67019.rs:+1:5: +1:20
+          StorageLive(_1);                 // scope 0 at $DIR/issue_67019.rs:+1:5: +1:20
+          StorageLive(_2);                 // scope 0 at $DIR/issue_67019.rs:+1:10: +1:19
+          StorageLive(_3);                 // scope 0 at $DIR/issue_67019.rs:+1:11: +1:17
+          Deinit(_3);                      // scope 0 at $DIR/issue_67019.rs:+1:11: +1:17
+          (_3.0: u8) = const 1_u8;         // scope 0 at $DIR/issue_67019.rs:+1:11: +1:17
+          (_3.1: u8) = const 2_u8;         // scope 0 at $DIR/issue_67019.rs:+1:11: +1:17
+          Deinit(_2);                      // scope 0 at $DIR/issue_67019.rs:+1:10: +1:19
+-         (_2.0: (u8, u8)) = move _3;      // scope 0 at $DIR/issue_67019.rs:+1:10: +1:19
++         (_2.0: (u8, u8)) = const (1_u8, 2_u8); // scope 0 at $DIR/issue_67019.rs:+1:10: +1:19
+          StorageDead(_3);                 // scope 0 at $DIR/issue_67019.rs:+1:18: +1:19
+          _1 = test(move _2) -> bb1;       // scope 0 at $DIR/issue_67019.rs:+1:5: +1:20
                                            // mir::Constant
-                                           // + span: $DIR/issue-67019.rs:12:5: 12:9
+                                           // + span: $DIR/issue_67019.rs:12:5: 12:9
                                            // + literal: Const { ty: fn(((u8, u8),)) {test}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_2);                 // scope 0 at $DIR/issue-67019.rs:+1:19: +1:20
-          StorageDead(_1);                 // scope 0 at $DIR/issue-67019.rs:+1:20: +1:21
-          nop;                             // scope 0 at $DIR/issue-67019.rs:+0:11: +2:2
-          return;                          // scope 0 at $DIR/issue-67019.rs:+2:2: +2:2
+          StorageDead(_2);                 // scope 0 at $DIR/issue_67019.rs:+1:19: +1:20
+          StorageDead(_1);                 // scope 0 at $DIR/issue_67019.rs:+1:20: +1:21
+          nop;                             // scope 0 at $DIR/issue_67019.rs:+0:11: +2:2
+          return;                          // scope 0 at $DIR/issue_67019.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/const_prop/issue-67019.rs b/src/test/mir-opt/const_prop/issue_67019.rs
index ffc6fa1f290..ffc6fa1f290 100644
--- a/src/test/mir-opt/const_prop/issue-67019.rs
+++ b/src/test/mir-opt/const_prop/issue_67019.rs
diff --git a/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir b/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
index 96716a39a2b..08481777ed4 100644
--- a/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
+++ b/src/test/mir-opt/exponential_or.match_tuple.SimplifyCfg-initial.after.mir
@@ -1,83 +1,83 @@
 // MIR for `match_tuple` after SimplifyCfg-initial
 
 fn match_tuple(_1: (u32, bool, Option<i32>, u32)) -> u32 {
-    debug x => _1;                       // in scope 0 at $DIR/exponential-or.rs:+0:16: +0:17
-    let mut _0: u32;                     // return place in scope 0 at $DIR/exponential-or.rs:+0:53: +0:56
-    let mut _2: isize;                   // in scope 0 at $DIR/exponential-or.rs:+2:37: +2:48
-    let mut _3: bool;                    // in scope 0 at $DIR/exponential-or.rs:+2:70: +2:77
-    let mut _4: bool;                    // in scope 0 at $DIR/exponential-or.rs:+2:70: +2:77
-    let mut _5: bool;                    // in scope 0 at $DIR/exponential-or.rs:+2:62: +2:67
-    let mut _6: bool;                    // in scope 0 at $DIR/exponential-or.rs:+2:62: +2:67
-    let _7: u32;                         // in scope 0 at $DIR/exponential-or.rs:+2:10: +2:11
-    let _8: u32;                         // in scope 0 at $DIR/exponential-or.rs:+2:57: +2:58
-    let mut _9: u32;                     // in scope 0 at $DIR/exponential-or.rs:+2:83: +2:84
-    let mut _10: u32;                    // in scope 0 at $DIR/exponential-or.rs:+2:87: +2:88
+    debug x => _1;                       // in scope 0 at $DIR/exponential_or.rs:+0:16: +0:17
+    let mut _0: u32;                     // return place in scope 0 at $DIR/exponential_or.rs:+0:53: +0:56
+    let mut _2: isize;                   // in scope 0 at $DIR/exponential_or.rs:+2:37: +2:48
+    let mut _3: bool;                    // in scope 0 at $DIR/exponential_or.rs:+2:70: +2:77
+    let mut _4: bool;                    // in scope 0 at $DIR/exponential_or.rs:+2:70: +2:77
+    let mut _5: bool;                    // in scope 0 at $DIR/exponential_or.rs:+2:62: +2:67
+    let mut _6: bool;                    // in scope 0 at $DIR/exponential_or.rs:+2:62: +2:67
+    let _7: u32;                         // in scope 0 at $DIR/exponential_or.rs:+2:10: +2:11
+    let _8: u32;                         // in scope 0 at $DIR/exponential_or.rs:+2:57: +2:58
+    let mut _9: u32;                     // in scope 0 at $DIR/exponential_or.rs:+2:83: +2:84
+    let mut _10: u32;                    // in scope 0 at $DIR/exponential_or.rs:+2:87: +2:88
     scope 1 {
-        debug y => _7;                   // in scope 1 at $DIR/exponential-or.rs:+2:10: +2:11
-        debug z => _8;                   // in scope 1 at $DIR/exponential-or.rs:+2:57: +2:58
+        debug y => _7;                   // in scope 1 at $DIR/exponential_or.rs:+2:10: +2:11
+        debug z => _8;                   // in scope 1 at $DIR/exponential_or.rs:+2:57: +2:58
     }
 
     bb0: {
-        FakeRead(ForMatchedPlace(None), _1); // scope 0 at $DIR/exponential-or.rs:+1:11: +1:12
-        switchInt((_1.0: u32)) -> [1_u32: bb2, 4_u32: bb2, otherwise: bb1]; // scope 0 at $DIR/exponential-or.rs:+2:15: +2:20
+        FakeRead(ForMatchedPlace(None), _1); // scope 0 at $DIR/exponential_or.rs:+1:11: +1:12
+        switchInt((_1.0: u32)) -> [1_u32: bb2, 4_u32: bb2, otherwise: bb1]; // scope 0 at $DIR/exponential_or.rs:+2:15: +2:20
     }
 
     bb1: {
-        _0 = const 0_u32;                // scope 0 at $DIR/exponential-or.rs:+3:14: +3:15
-        goto -> bb10;                    // scope 0 at $DIR/exponential-or.rs:+3:14: +3:15
+        _0 = const 0_u32;                // scope 0 at $DIR/exponential_or.rs:+3:14: +3:15
+        goto -> bb10;                    // scope 0 at $DIR/exponential_or.rs:+3:14: +3:15
     }
 
     bb2: {
-        _2 = discriminant((_1.2: std::option::Option<i32>)); // scope 0 at $DIR/exponential-or.rs:+2:37: +2:55
-        switchInt(move _2) -> [0_isize: bb4, 1_isize: bb3, otherwise: bb1]; // scope 0 at $DIR/exponential-or.rs:+2:37: +2:55
+        _2 = discriminant((_1.2: std::option::Option<i32>)); // scope 0 at $DIR/exponential_or.rs:+2:37: +2:55
+        switchInt(move _2) -> [0_isize: bb4, 1_isize: bb3, otherwise: bb1]; // scope 0 at $DIR/exponential_or.rs:+2:37: +2:55
     }
 
     bb3: {
-        switchInt((((_1.2: std::option::Option<i32>) as Some).0: i32)) -> [1_i32: bb4, 8_i32: bb4, otherwise: bb1]; // scope 0 at $DIR/exponential-or.rs:+2:37: +2:55
+        switchInt((((_1.2: std::option::Option<i32>) as Some).0: i32)) -> [1_i32: bb4, 8_i32: bb4, otherwise: bb1]; // scope 0 at $DIR/exponential_or.rs:+2:37: +2:55
     }
 
     bb4: {
-        _5 = Le(const 6_u32, (_1.3: u32)); // scope 0 at $DIR/exponential-or.rs:+2:62: +2:67
-        switchInt(move _5) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/exponential-or.rs:+2:62: +2:67
+        _5 = Le(const 6_u32, (_1.3: u32)); // scope 0 at $DIR/exponential_or.rs:+2:62: +2:67
+        switchInt(move _5) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/exponential_or.rs:+2:62: +2:67
     }
 
     bb5: {
-        _6 = Le((_1.3: u32), const 9_u32); // scope 0 at $DIR/exponential-or.rs:+2:62: +2:67
-        switchInt(move _6) -> [false: bb6, otherwise: bb8]; // scope 0 at $DIR/exponential-or.rs:+2:62: +2:67
+        _6 = Le((_1.3: u32), const 9_u32); // scope 0 at $DIR/exponential_or.rs:+2:62: +2:67
+        switchInt(move _6) -> [false: bb6, otherwise: bb8]; // scope 0 at $DIR/exponential_or.rs:+2:62: +2:67
     }
 
     bb6: {
-        _3 = Le(const 13_u32, (_1.3: u32)); // scope 0 at $DIR/exponential-or.rs:+2:70: +2:77
-        switchInt(move _3) -> [false: bb1, otherwise: bb7]; // scope 0 at $DIR/exponential-or.rs:+2:70: +2:77
+        _3 = Le(const 13_u32, (_1.3: u32)); // scope 0 at $DIR/exponential_or.rs:+2:70: +2:77
+        switchInt(move _3) -> [false: bb1, otherwise: bb7]; // scope 0 at $DIR/exponential_or.rs:+2:70: +2:77
     }
 
     bb7: {
-        _4 = Le((_1.3: u32), const 16_u32); // scope 0 at $DIR/exponential-or.rs:+2:70: +2:77
-        switchInt(move _4) -> [false: bb1, otherwise: bb8]; // scope 0 at $DIR/exponential-or.rs:+2:70: +2:77
+        _4 = Le((_1.3: u32), const 16_u32); // scope 0 at $DIR/exponential_or.rs:+2:70: +2:77
+        switchInt(move _4) -> [false: bb1, otherwise: bb8]; // scope 0 at $DIR/exponential_or.rs:+2:70: +2:77
     }
 
     bb8: {
-        falseEdge -> [real: bb9, imaginary: bb1]; // scope 0 at $DIR/exponential-or.rs:+2:9: +2:79
+        falseEdge -> [real: bb9, imaginary: bb1]; // scope 0 at $DIR/exponential_or.rs:+2:9: +2:79
     }
 
     bb9: {
-        StorageLive(_7);                 // scope 0 at $DIR/exponential-or.rs:+2:10: +2:11
-        _7 = (_1.0: u32);                // scope 0 at $DIR/exponential-or.rs:+2:10: +2:11
-        StorageLive(_8);                 // scope 0 at $DIR/exponential-or.rs:+2:57: +2:58
-        _8 = (_1.3: u32);                // scope 0 at $DIR/exponential-or.rs:+2:57: +2:58
-        StorageLive(_9);                 // scope 1 at $DIR/exponential-or.rs:+2:83: +2:84
-        _9 = _7;                         // scope 1 at $DIR/exponential-or.rs:+2:83: +2:84
-        StorageLive(_10);                // scope 1 at $DIR/exponential-or.rs:+2:87: +2:88
-        _10 = _8;                        // scope 1 at $DIR/exponential-or.rs:+2:87: +2:88
-        _0 = BitXor(move _9, move _10);  // scope 1 at $DIR/exponential-or.rs:+2:83: +2:88
-        StorageDead(_10);                // scope 1 at $DIR/exponential-or.rs:+2:87: +2:88
-        StorageDead(_9);                 // scope 1 at $DIR/exponential-or.rs:+2:87: +2:88
-        StorageDead(_8);                 // scope 0 at $DIR/exponential-or.rs:+2:87: +2:88
-        StorageDead(_7);                 // scope 0 at $DIR/exponential-or.rs:+2:87: +2:88
-        goto -> bb10;                    // scope 0 at $DIR/exponential-or.rs:+2:87: +2:88
+        StorageLive(_7);                 // scope 0 at $DIR/exponential_or.rs:+2:10: +2:11
+        _7 = (_1.0: u32);                // scope 0 at $DIR/exponential_or.rs:+2:10: +2:11
+        StorageLive(_8);                 // scope 0 at $DIR/exponential_or.rs:+2:57: +2:58
+        _8 = (_1.3: u32);                // scope 0 at $DIR/exponential_or.rs:+2:57: +2:58
+        StorageLive(_9);                 // scope 1 at $DIR/exponential_or.rs:+2:83: +2:84
+        _9 = _7;                         // scope 1 at $DIR/exponential_or.rs:+2:83: +2:84
+        StorageLive(_10);                // scope 1 at $DIR/exponential_or.rs:+2:87: +2:88
+        _10 = _8;                        // scope 1 at $DIR/exponential_or.rs:+2:87: +2:88
+        _0 = BitXor(move _9, move _10);  // scope 1 at $DIR/exponential_or.rs:+2:83: +2:88
+        StorageDead(_10);                // scope 1 at $DIR/exponential_or.rs:+2:87: +2:88
+        StorageDead(_9);                 // scope 1 at $DIR/exponential_or.rs:+2:87: +2:88
+        StorageDead(_8);                 // scope 0 at $DIR/exponential_or.rs:+2:87: +2:88
+        StorageDead(_7);                 // scope 0 at $DIR/exponential_or.rs:+2:87: +2:88
+        goto -> bb10;                    // scope 0 at $DIR/exponential_or.rs:+2:87: +2:88
     }
 
     bb10: {
-        return;                          // scope 0 at $DIR/exponential-or.rs:+5:2: +5:2
+        return;                          // scope 0 at $DIR/exponential_or.rs:+5:2: +5:2
     }
 }
diff --git a/src/test/mir-opt/exponential-or.rs b/src/test/mir-opt/exponential_or.rs
index 0b8be8385dd..0b8be8385dd 100644
--- a/src/test/mir-opt/exponential-or.rs
+++ b/src/test/mir-opt/exponential_or.rs
diff --git a/src/test/mir-opt/fn-ptr-shim.rs b/src/test/mir-opt/fn_ptr_shim.rs
index 64fbdc9ded1..64fbdc9ded1 100644
--- a/src/test/mir-opt/fn-ptr-shim.rs
+++ b/src/test/mir-opt/fn_ptr_shim.rs
diff --git a/src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir b/src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir
index c718138b6b3..c3b08bf0648 100644
--- a/src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir
+++ b/src/test/mir-opt/generator_drop_cleanup.main-{closure#0}.generator_drop.0.mir
@@ -14,71 +14,71 @@
     },
 } */
 
-fn main::{closure#0}(_1: *mut [generator@$DIR/generator-drop-cleanup.rs:10:15: 10:17]) -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
-    let mut _2: ();                      // in scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
-    let _3: std::string::String;         // in scope 0 at $DIR/generator-drop-cleanup.rs:+1:13: +1:15
-    let _4: ();                          // in scope 0 at $DIR/generator-drop-cleanup.rs:+2:9: +2:14
-    let mut _5: ();                      // in scope 0 at $DIR/generator-drop-cleanup.rs:+2:9: +2:14
-    let mut _6: ();                      // in scope 0 at $DIR/generator-drop-cleanup.rs:+0:18: +0:18
-    let mut _7: ();                      // in scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
-    let mut _8: u32;                     // in scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
+fn main::{closure#0}(_1: *mut [generator@$DIR/generator_drop_cleanup.rs:10:15: 10:17]) -> () {
+    let mut _0: ();                      // return place in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
+    let mut _2: ();                      // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
+    let _3: std::string::String;         // in scope 0 at $DIR/generator_drop_cleanup.rs:+1:13: +1:15
+    let _4: ();                          // in scope 0 at $DIR/generator_drop_cleanup.rs:+2:9: +2:14
+    let mut _5: ();                      // in scope 0 at $DIR/generator_drop_cleanup.rs:+2:9: +2:14
+    let mut _6: ();                      // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:18: +0:18
+    let mut _7: ();                      // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
+    let mut _8: u32;                     // in scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
     scope 1 {
-        debug _s => (((*_1) as variant#3).0: std::string::String); // in scope 1 at $DIR/generator-drop-cleanup.rs:+1:13: +1:15
+        debug _s => (((*_1) as variant#3).0: std::string::String); // in scope 1 at $DIR/generator_drop_cleanup.rs:+1:13: +1:15
     }
 
     bb0: {
-        _8 = discriminant((*_1));        // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
-        switchInt(move _8) -> [0_u32: bb7, 3_u32: bb10, otherwise: bb11]; // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
+        _8 = discriminant((*_1));        // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
+        switchInt(move _8) -> [0_u32: bb7, 3_u32: bb10, otherwise: bb11]; // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
     }
 
     bb1: {
-        StorageDead(_5);                 // scope 1 at $DIR/generator-drop-cleanup.rs:+2:13: +2:14
-        StorageDead(_4);                 // scope 1 at $DIR/generator-drop-cleanup.rs:+2:14: +2:15
-        drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6
+        StorageDead(_5);                 // scope 1 at $DIR/generator_drop_cleanup.rs:+2:13: +2:14
+        StorageDead(_4);                 // scope 1 at $DIR/generator_drop_cleanup.rs:+2:14: +2:15
+        drop((((*_1) as variant#3).0: std::string::String)) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
     }
 
     bb2: {
-        nop;                             // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6
-        goto -> bb8;                     // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6
+        nop;                             // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
+        goto -> bb8;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
     }
 
     bb3: {
-        return;                          // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
+        return;                          // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
     }
 
     bb4 (cleanup): {
-        resume;                          // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
+        resume;                          // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
     }
 
     bb5 (cleanup): {
-        nop;                             // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6
-        goto -> bb4;                     // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6
+        nop;                             // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
+        goto -> bb4;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
     }
 
     bb6: {
-        return;                          // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
+        return;                          // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
     }
 
     bb7: {
-        goto -> bb9;                     // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
+        goto -> bb9;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
     }
 
     bb8: {
-        goto -> bb3;                     // scope 0 at $DIR/generator-drop-cleanup.rs:+3:5: +3:6
+        goto -> bb3;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+3:5: +3:6
     }
 
     bb9: {
-        goto -> bb6;                     // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
+        goto -> bb6;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
     }
 
     bb10: {
-        StorageLive(_4);                 // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
-        StorageLive(_5);                 // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
-        goto -> bb1;                     // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
+        StorageLive(_4);                 // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
+        StorageLive(_5);                 // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
+        goto -> bb1;                     // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
     }
 
     bb11: {
-        return;                          // scope 0 at $DIR/generator-drop-cleanup.rs:+0:15: +3:6
+        return;                          // scope 0 at $DIR/generator_drop_cleanup.rs:+0:15: +3:6
     }
 }
diff --git a/src/test/mir-opt/generator-drop-cleanup.rs b/src/test/mir-opt/generator_drop_cleanup.rs
index 82c1292cbd0..82c1292cbd0 100644
--- a/src/test/mir-opt/generator-drop-cleanup.rs
+++ b/src/test/mir-opt/generator_drop_cleanup.rs
diff --git a/src/test/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir b/src/test/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir
index 3184343f207..cfbe0aaf252 100644
--- a/src/test/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir
+++ b/src/test/mir-opt/generator_storage_dead_unwind.main-{closure#0}.StateTransform.before.mir
@@ -1,124 +1,124 @@
 // 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: [generator@$DIR/generator_storage_dead_unwind.rs:22:16: 22:18], _2: ()) -> ()
 yields ()
  {
-    let mut _0: ();                      // return place in scope 0 at $DIR/generator-storage-dead-unwind.rs:+0:19: +0:19
-    let _3: Foo;                         // in scope 0 at $DIR/generator-storage-dead-unwind.rs:+1:13: +1:14
-    let _5: ();                          // in scope 0 at $DIR/generator-storage-dead-unwind.rs:+3:9: +3:14
-    let mut _6: ();                      // in scope 0 at $DIR/generator-storage-dead-unwind.rs:+3:9: +3:14
-    let _7: ();                          // in scope 0 at $DIR/generator-storage-dead-unwind.rs:+4:9: +4:16
-    let mut _8: Foo;                     // in scope 0 at $DIR/generator-storage-dead-unwind.rs:+4:14: +4:15
-    let _9: ();                          // in scope 0 at $DIR/generator-storage-dead-unwind.rs:+5:9: +5:16
-    let mut _10: Bar;                    // in scope 0 at $DIR/generator-storage-dead-unwind.rs:+5:14: +5:15
+    let mut _0: ();                      // return place in scope 0 at $DIR/generator_storage_dead_unwind.rs:+0:19: +0:19
+    let _3: Foo;                         // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+1:13: +1:14
+    let _5: ();                          // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
+    let mut _6: ();                      // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
+    let _7: ();                          // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+4:9: +4:16
+    let mut _8: Foo;                     // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+4:14: +4:15
+    let _9: ();                          // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+5:9: +5:16
+    let mut _10: Bar;                    // in scope 0 at $DIR/generator_storage_dead_unwind.rs:+5:14: +5:15
     scope 1 {
-        debug a => _3;                   // in scope 1 at $DIR/generator-storage-dead-unwind.rs:+1:13: +1:14
-        let _4: Bar;                     // in scope 1 at $DIR/generator-storage-dead-unwind.rs:+2:13: +2:14
+        debug a => _3;                   // in scope 1 at $DIR/generator_storage_dead_unwind.rs:+1:13: +1:14
+        let _4: Bar;                     // in scope 1 at $DIR/generator_storage_dead_unwind.rs:+2:13: +2:14
         scope 2 {
-            debug b => _4;               // in scope 2 at $DIR/generator-storage-dead-unwind.rs:+2:13: +2:14
+            debug b => _4;               // in scope 2 at $DIR/generator_storage_dead_unwind.rs:+2:13: +2:14
         }
     }
 
     bb0: {
-        StorageLive(_3);                 // scope 0 at $DIR/generator-storage-dead-unwind.rs:+1:13: +1:14
-        _3 = Foo(const 5_i32);           // scope 0 at $DIR/generator-storage-dead-unwind.rs:+1:17: +1:23
-        StorageLive(_4);                 // scope 1 at $DIR/generator-storage-dead-unwind.rs:+2:13: +2:14
-        _4 = Bar(const 6_i32);           // scope 1 at $DIR/generator-storage-dead-unwind.rs:+2:17: +2:23
-        StorageLive(_5);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+3:9: +3:14
-        StorageLive(_6);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+3:9: +3:14
-        _6 = ();                         // scope 2 at $DIR/generator-storage-dead-unwind.rs:+3:9: +3:14
-        _5 = yield(move _6) -> [resume: bb1, drop: bb6]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:+3:9: +3:14
+        StorageLive(_3);                 // scope 0 at $DIR/generator_storage_dead_unwind.rs:+1:13: +1:14
+        _3 = Foo(const 5_i32);           // scope 0 at $DIR/generator_storage_dead_unwind.rs:+1:17: +1:23
+        StorageLive(_4);                 // scope 1 at $DIR/generator_storage_dead_unwind.rs:+2:13: +2:14
+        _4 = Bar(const 6_i32);           // scope 1 at $DIR/generator_storage_dead_unwind.rs:+2:17: +2:23
+        StorageLive(_5);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
+        StorageLive(_6);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
+        _6 = ();                         // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
+        _5 = yield(move _6) -> [resume: bb1, drop: bb6]; // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:9: +3:14
     }
 
     bb1: {
-        StorageDead(_6);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+3:13: +3:14
-        StorageDead(_5);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+3:14: +3:15
-        StorageLive(_7);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+4:9: +4:16
-        StorageLive(_8);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+4:14: +4:15
-        _8 = move _3;                    // scope 2 at $DIR/generator-storage-dead-unwind.rs:+4:14: +4:15
-        _7 = take::<Foo>(move _8) -> [return: bb2, unwind: bb10]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:+4:9: +4:16
+        StorageDead(_6);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:13: +3:14
+        StorageDead(_5);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:14: +3:15
+        StorageLive(_7);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:9: +4:16
+        StorageLive(_8);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:14: +4:15
+        _8 = move _3;                    // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:14: +4:15
+        _7 = take::<Foo>(move _8) -> [return: bb2, unwind: bb10]; // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:9: +4:16
                                          // mir::Constant
-                                         // + span: $DIR/generator-storage-dead-unwind.rs:26:9: 26:13
+                                         // + span: $DIR/generator_storage_dead_unwind.rs:26:9: 26:13
                                          // + literal: Const { ty: fn(Foo) {take::<Foo>}, val: Value(<ZST>) }
     }
 
     bb2: {
-        StorageDead(_8);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+4:15: +4:16
-        StorageDead(_7);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+4:16: +4:17
-        StorageLive(_9);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+5:9: +5:16
-        StorageLive(_10);                // scope 2 at $DIR/generator-storage-dead-unwind.rs:+5:14: +5:15
-        _10 = move _4;                   // scope 2 at $DIR/generator-storage-dead-unwind.rs:+5:14: +5:15
-        _9 = take::<Bar>(move _10) -> [return: bb3, unwind: bb9]; // scope 2 at $DIR/generator-storage-dead-unwind.rs:+5:9: +5:16
+        StorageDead(_8);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:15: +4:16
+        StorageDead(_7);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:16: +4:17
+        StorageLive(_9);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:9: +5:16
+        StorageLive(_10);                // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:14: +5:15
+        _10 = move _4;                   // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:14: +5:15
+        _9 = take::<Bar>(move _10) -> [return: bb3, unwind: bb9]; // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:9: +5:16
                                          // mir::Constant
-                                         // + span: $DIR/generator-storage-dead-unwind.rs:27:9: 27:13
+                                         // + span: $DIR/generator_storage_dead_unwind.rs:27:9: 27:13
                                          // + literal: Const { ty: fn(Bar) {take::<Bar>}, val: Value(<ZST>) }
     }
 
     bb3: {
-        StorageDead(_10);                // scope 2 at $DIR/generator-storage-dead-unwind.rs:+5:15: +5:16
-        StorageDead(_9);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+5:16: +5:17
-        _0 = const ();                   // scope 0 at $DIR/generator-storage-dead-unwind.rs:+0:19: +6:6
-        StorageDead(_4);                 // scope 1 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
-        goto -> bb4;                     // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
+        StorageDead(_10);                // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:15: +5:16
+        StorageDead(_9);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:16: +5:17
+        _0 = const ();                   // scope 0 at $DIR/generator_storage_dead_unwind.rs:+0:19: +6:6
+        StorageDead(_4);                 // scope 1 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
+        goto -> bb4;                     // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
     }
 
     bb4: {
-        StorageDead(_3);                 // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
-        drop(_1) -> [return: bb5, unwind: bb14]; // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
+        StorageDead(_3);                 // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
+        drop(_1) -> [return: bb5, unwind: bb14]; // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
     }
 
     bb5: {
-        return;                          // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:6: +6:6
+        return;                          // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:6: +6:6
     }
 
     bb6: {
-        StorageDead(_6);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+3:13: +3:14
-        StorageDead(_5);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+3:14: +3:15
-        StorageDead(_4);                 // scope 1 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
-        drop(_3) -> [return: bb7, unwind: bb15]; // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
+        StorageDead(_6);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:13: +3:14
+        StorageDead(_5);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+3:14: +3:15
+        StorageDead(_4);                 // scope 1 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
+        drop(_3) -> [return: bb7, unwind: bb15]; // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
     }
 
     bb7: {
-        StorageDead(_3);                 // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
-        drop(_1) -> [return: bb8, unwind: bb14]; // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
+        StorageDead(_3);                 // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
+        drop(_1) -> [return: bb8, unwind: bb14]; // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
     }
 
     bb8: {
-        generator_drop;                  // scope 0 at $DIR/generator-storage-dead-unwind.rs:+0:16: +6:6
+        generator_drop;                  // scope 0 at $DIR/generator_storage_dead_unwind.rs:+0:16: +6:6
     }
 
     bb9 (cleanup): {
-        StorageDead(_10);                // scope 2 at $DIR/generator-storage-dead-unwind.rs:+5:15: +5:16
-        StorageDead(_9);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+5:16: +5:17
+        StorageDead(_10);                // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:15: +5:16
+        StorageDead(_9);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+5:16: +5:17
         goto -> bb12;                    // scope 2 at no-location
     }
 
     bb10 (cleanup): {
-        goto -> bb11;                    // scope 2 at $DIR/generator-storage-dead-unwind.rs:+4:15: +4:16
+        goto -> bb11;                    // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:15: +4:16
     }
 
     bb11 (cleanup): {
-        StorageDead(_8);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+4:15: +4:16
-        StorageDead(_7);                 // scope 2 at $DIR/generator-storage-dead-unwind.rs:+4:16: +4:17
+        StorageDead(_8);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:15: +4:16
+        StorageDead(_7);                 // scope 2 at $DIR/generator_storage_dead_unwind.rs:+4:16: +4:17
         goto -> bb12;                    // scope 2 at no-location
     }
 
     bb12 (cleanup): {
-        StorageDead(_4);                 // scope 1 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
-        goto -> bb13;                    // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
+        StorageDead(_4);                 // scope 1 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
+        goto -> bb13;                    // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
     }
 
     bb13 (cleanup): {
-        StorageDead(_3);                 // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
-        drop(_1) -> bb14;                // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
+        StorageDead(_3);                 // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
+        drop(_1) -> bb14;                // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
     }
 
     bb14 (cleanup): {
-        resume;                          // scope 0 at $DIR/generator-storage-dead-unwind.rs:+0:16: +6:6
+        resume;                          // scope 0 at $DIR/generator_storage_dead_unwind.rs:+0:16: +6:6
     }
 
     bb15 (cleanup): {
-        StorageDead(_3);                 // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
-        drop(_1) -> bb14;                // scope 0 at $DIR/generator-storage-dead-unwind.rs:+6:5: +6:6
+        StorageDead(_3);                 // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
+        drop(_1) -> bb14;                // scope 0 at $DIR/generator_storage_dead_unwind.rs:+6:5: +6:6
     }
 }
diff --git a/src/test/mir-opt/generator-storage-dead-unwind.rs b/src/test/mir-opt/generator_storage_dead_unwind.rs
index b72170adec3..b72170adec3 100644
--- a/src/test/mir-opt/generator-storage-dead-unwind.rs
+++ b/src/test/mir-opt/generator_storage_dead_unwind.rs
diff --git a/src/test/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir b/src/test/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir
index 07aeeaae012..fee6da2c635 100644
--- a/src/test/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir
+++ b/src/test/mir-opt/generator_tiny.main-{closure#0}.generator_resume.0.mir
@@ -14,71 +14,71 @@
     },
 } */
 
-fn main::{closure#0}(_1: Pin<&mut [generator@$DIR/generator-tiny.rs:19:16: 19:24]>, _2: u8) -> GeneratorState<(), ()> {
-    debug _x => _10;                     // in scope 0 at $DIR/generator-tiny.rs:+0:17: +0:19
-    let mut _0: std::ops::GeneratorState<(), ()>; // return place in scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
-    let _3: HasDrop;                     // in scope 0 at $DIR/generator-tiny.rs:+1:13: +1:15
-    let mut _4: !;                       // in scope 0 at $DIR/generator-tiny.rs:+2:9: +5:10
-    let mut _5: ();                      // in scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
-    let _6: u8;                          // in scope 0 at $DIR/generator-tiny.rs:+3:13: +3:18
-    let mut _7: ();                      // in scope 0 at $DIR/generator-tiny.rs:+3:13: +3:18
-    let _8: ();                          // in scope 0 at $DIR/generator-tiny.rs:+4:13: +4:21
-    let mut _9: ();                      // in scope 0 at $DIR/generator-tiny.rs:+0:25: +0:25
-    let _10: u8;                         // in scope 0 at $DIR/generator-tiny.rs:+0:17: +0:19
-    let mut _11: u32;                    // in scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
+fn main::{closure#0}(_1: Pin<&mut [generator@$DIR/generator_tiny.rs:19:16: 19:24]>, _2: u8) -> GeneratorState<(), ()> {
+    debug _x => _10;                     // in scope 0 at $DIR/generator_tiny.rs:+0:17: +0:19
+    let mut _0: std::ops::GeneratorState<(), ()>; // return place in scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
+    let _3: HasDrop;                     // in scope 0 at $DIR/generator_tiny.rs:+1:13: +1:15
+    let mut _4: !;                       // in scope 0 at $DIR/generator_tiny.rs:+2:9: +5:10
+    let mut _5: ();                      // in scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
+    let _6: u8;                          // in scope 0 at $DIR/generator_tiny.rs:+3:13: +3:18
+    let mut _7: ();                      // in scope 0 at $DIR/generator_tiny.rs:+3:13: +3:18
+    let _8: ();                          // in scope 0 at $DIR/generator_tiny.rs:+4:13: +4:21
+    let mut _9: ();                      // in scope 0 at $DIR/generator_tiny.rs:+0:25: +0:25
+    let _10: u8;                         // in scope 0 at $DIR/generator_tiny.rs:+0:17: +0:19
+    let mut _11: u32;                    // in scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
     scope 1 {
-        debug _d => (((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 19:24])) as variant#3).0: HasDrop); // in scope 1 at $DIR/generator-tiny.rs:+1:13: +1:15
+        debug _d => (((*(_1.0: &mut [generator@$DIR/generator_tiny.rs:19:16: 19:24])) as variant#3).0: HasDrop); // in scope 1 at $DIR/generator_tiny.rs:+1:13: +1:15
     }
 
     bb0: {
-        _11 = discriminant((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 19:24]))); // scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
-        switchInt(move _11) -> [0_u32: bb1, 3_u32: bb5, otherwise: bb6]; // scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
+        _11 = discriminant((*(_1.0: &mut [generator@$DIR/generator_tiny.rs:19:16: 19:24]))); // scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
+        switchInt(move _11) -> [0_u32: bb1, 3_u32: bb5, otherwise: bb6]; // scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
     }
 
     bb1: {
-        _10 = move _2;                   // scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
-        nop;                             // scope 0 at $DIR/generator-tiny.rs:+1:13: +1:15
-        (((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 19:24])) as variant#3).0: HasDrop) = HasDrop; // scope 0 at $DIR/generator-tiny.rs:+1:18: +1:25
-        StorageLive(_4);                 // scope 1 at $DIR/generator-tiny.rs:+2:9: +5:10
-        goto -> bb2;                     // scope 1 at $DIR/generator-tiny.rs:+2:9: +5:10
+        _10 = move _2;                   // scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
+        nop;                             // scope 0 at $DIR/generator_tiny.rs:+1:13: +1:15
+        (((*(_1.0: &mut [generator@$DIR/generator_tiny.rs:19:16: 19:24])) as variant#3).0: HasDrop) = HasDrop; // scope 0 at $DIR/generator_tiny.rs:+1:18: +1:25
+        StorageLive(_4);                 // scope 1 at $DIR/generator_tiny.rs:+2:9: +5:10
+        goto -> bb2;                     // scope 1 at $DIR/generator_tiny.rs:+2:9: +5:10
     }
 
     bb2: {
-        StorageLive(_6);                 // scope 1 at $DIR/generator-tiny.rs:+3:13: +3:18
-        StorageLive(_7);                 // scope 1 at $DIR/generator-tiny.rs:+3:13: +3:18
-        _7 = ();                         // scope 1 at $DIR/generator-tiny.rs:+3:13: +3:18
-        Deinit(_0);                      // scope 1 at $DIR/generator-tiny.rs:+3:13: +3:18
-        ((_0 as Yielded).0: ()) = move _7; // scope 1 at $DIR/generator-tiny.rs:+3:13: +3:18
-        discriminant(_0) = 0;            // scope 1 at $DIR/generator-tiny.rs:+3:13: +3:18
-        discriminant((*(_1.0: &mut [generator@$DIR/generator-tiny.rs:19:16: 19:24]))) = 3; // scope 1 at $DIR/generator-tiny.rs:+3:13: +3:18
-        return;                          // scope 1 at $DIR/generator-tiny.rs:+3:13: +3:18
+        StorageLive(_6);                 // scope 1 at $DIR/generator_tiny.rs:+3:13: +3:18
+        StorageLive(_7);                 // scope 1 at $DIR/generator_tiny.rs:+3:13: +3:18
+        _7 = ();                         // scope 1 at $DIR/generator_tiny.rs:+3:13: +3:18
+        Deinit(_0);                      // scope 1 at $DIR/generator_tiny.rs:+3:13: +3:18
+        ((_0 as Yielded).0: ()) = move _7; // scope 1 at $DIR/generator_tiny.rs:+3:13: +3:18
+        discriminant(_0) = 0;            // scope 1 at $DIR/generator_tiny.rs:+3:13: +3:18
+        discriminant((*(_1.0: &mut [generator@$DIR/generator_tiny.rs:19:16: 19:24]))) = 3; // scope 1 at $DIR/generator_tiny.rs:+3:13: +3:18
+        return;                          // scope 1 at $DIR/generator_tiny.rs:+3:13: +3:18
     }
 
     bb3: {
-        StorageDead(_7);                 // scope 1 at $DIR/generator-tiny.rs:+3:17: +3:18
-        StorageDead(_6);                 // scope 1 at $DIR/generator-tiny.rs:+3:18: +3:19
-        StorageLive(_8);                 // scope 1 at $DIR/generator-tiny.rs:+4:13: +4:21
-        _8 = callee() -> bb4;            // scope 1 at $DIR/generator-tiny.rs:+4:13: +4:21
+        StorageDead(_7);                 // scope 1 at $DIR/generator_tiny.rs:+3:17: +3:18
+        StorageDead(_6);                 // scope 1 at $DIR/generator_tiny.rs:+3:18: +3:19
+        StorageLive(_8);                 // scope 1 at $DIR/generator_tiny.rs:+4:13: +4:21
+        _8 = callee() -> bb4;            // scope 1 at $DIR/generator_tiny.rs:+4:13: +4:21
                                          // mir::Constant
-                                         // + span: $DIR/generator-tiny.rs:23:13: 23:19
+                                         // + span: $DIR/generator_tiny.rs:23:13: 23:19
                                          // + literal: Const { ty: fn() {callee}, val: Value(<ZST>) }
     }
 
     bb4: {
-        StorageDead(_8);                 // scope 1 at $DIR/generator-tiny.rs:+4:21: +4:22
-        _5 = const ();                   // scope 1 at $DIR/generator-tiny.rs:+2:14: +5:10
-        goto -> bb2;                     // scope 1 at $DIR/generator-tiny.rs:+2:9: +5:10
+        StorageDead(_8);                 // scope 1 at $DIR/generator_tiny.rs:+4:21: +4:22
+        _5 = const ();                   // scope 1 at $DIR/generator_tiny.rs:+2:14: +5:10
+        goto -> bb2;                     // scope 1 at $DIR/generator_tiny.rs:+2:9: +5:10
     }
 
     bb5: {
-        StorageLive(_4);                 // scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
-        StorageLive(_6);                 // scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
-        StorageLive(_7);                 // scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
-        _6 = move _2;                    // scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
-        goto -> bb3;                     // scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
+        StorageLive(_4);                 // scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
+        StorageLive(_6);                 // scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
+        StorageLive(_7);                 // scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
+        _6 = move _2;                    // scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
+        goto -> bb3;                     // scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
     }
 
     bb6: {
-        unreachable;                     // scope 0 at $DIR/generator-tiny.rs:+0:16: +6:6
+        unreachable;                     // scope 0 at $DIR/generator_tiny.rs:+0:16: +6:6
     }
 }
diff --git a/src/test/mir-opt/generator-tiny.rs b/src/test/mir-opt/generator_tiny.rs
index 7dad63a61d6..7dad63a61d6 100644
--- a/src/test/mir-opt/generator-tiny.rs
+++ b/src/test/mir-opt/generator_tiny.rs
diff --git a/src/test/mir-opt/graphviz.main.mir_map.0.dot b/src/test/mir-opt/graphviz.main.built.after.dot
index 8d1da7f1b96..8d1da7f1b96 100644
--- a/src/test/mir-opt/graphviz.main.mir_map.0.dot
+++ b/src/test/mir-opt/graphviz.main.built.after.dot
diff --git a/src/test/mir-opt/graphviz.rs b/src/test/mir-opt/graphviz.rs
index 074dba2c373..6906b86c2a5 100644
--- a/src/test/mir-opt/graphviz.rs
+++ b/src/test/mir-opt/graphviz.rs
@@ -1,5 +1,5 @@
 // Test graphviz output
 // compile-flags: -Z dump-mir-graphviz
 
-// EMIT_MIR graphviz.main.mir_map.0.dot
+// EMIT_MIR graphviz.main.built.after.dot
 fn main() {}
diff --git a/src/test/mir-opt/if_condition_int.dont_opt_bool.SimplifyComparisonIntegral.diff b/src/test/mir-opt/if_condition_int.dont_opt_bool.SimplifyComparisonIntegral.diff
index 19b5ab44156..94180d20343 100644
--- a/src/test/mir-opt/if_condition_int.dont_opt_bool.SimplifyComparisonIntegral.diff
+++ b/src/test/mir-opt/if_condition_int.dont_opt_bool.SimplifyComparisonIntegral.diff
@@ -2,29 +2,29 @@
 + // MIR for `dont_opt_bool` after SimplifyComparisonIntegral
   
   fn dont_opt_bool(_1: bool) -> u32 {
-      debug x => _1;                       // in scope 0 at $DIR/if-condition-int.rs:+0:18: +0:19
-      let mut _0: u32;                     // return place in scope 0 at $DIR/if-condition-int.rs:+0:30: +0:33
-      let mut _2: bool;                    // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
+      debug x => _1;                       // in scope 0 at $DIR/if_condition_int.rs:+0:18: +0:19
+      let mut _0: u32;                     // return place in scope 0 at $DIR/if_condition_int.rs:+0:30: +0:33
+      let mut _2: bool;                    // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
-          _2 = _1;                         // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
-          switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
+          StorageLive(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+          _2 = _1;                         // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+          switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
       }
   
       bb1: {
-          _0 = const 0_u32;                // scope 0 at $DIR/if-condition-int.rs:+1:12: +1:13
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:26
+          _0 = const 0_u32;                // scope 0 at $DIR/if_condition_int.rs:+1:12: +1:13
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:26
       }
   
       bb2: {
-          _0 = const 1_u32;                // scope 0 at $DIR/if-condition-int.rs:+1:23: +1:24
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:26
+          _0 = const 1_u32;                // scope 0 at $DIR/if_condition_int.rs:+1:23: +1:24
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:26
       }
   
       bb3: {
-          StorageDead(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:25: +1:26
-          return;                          // scope 0 at $DIR/if-condition-int.rs:+2:2: +2:2
+          StorageDead(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:25: +1:26
+          return;                          // scope 0 at $DIR/if_condition_int.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/if_condition_int.dont_opt_floats.SimplifyComparisonIntegral.diff b/src/test/mir-opt/if_condition_int.dont_opt_floats.SimplifyComparisonIntegral.diff
index 256af7b94be..b22c7eac622 100644
--- a/src/test/mir-opt/if_condition_int.dont_opt_floats.SimplifyComparisonIntegral.diff
+++ b/src/test/mir-opt/if_condition_int.dont_opt_floats.SimplifyComparisonIntegral.diff
@@ -2,33 +2,33 @@
 + // MIR for `dont_opt_floats` after SimplifyComparisonIntegral
   
   fn dont_opt_floats(_1: f32) -> i32 {
-      debug a => _1;                       // in scope 0 at $DIR/if-condition-int.rs:+0:20: +0:21
-      let mut _0: i32;                     // return place in scope 0 at $DIR/if-condition-int.rs:+0:31: +0:34
-      let mut _2: bool;                    // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:18
-      let mut _3: f32;                     // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
+      debug a => _1;                       // in scope 0 at $DIR/if_condition_int.rs:+0:20: +0:21
+      let mut _0: i32;                     // return place in scope 0 at $DIR/if_condition_int.rs:+0:31: +0:34
+      let mut _2: bool;                    // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:18
+      let mut _3: f32;                     // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:18
-          StorageLive(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
-          _3 = _1;                         // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
-          _2 = Eq(move _3, const -42f32);  // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:18
-          StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:17: +1:18
-          switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:18
+          StorageLive(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:18
+          StorageLive(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+          _3 = _1;                         // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+          _2 = Eq(move _3, const -42f32);  // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:18
+          StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:17: +1:18
+          switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:18
       }
   
       bb1: {
-          _0 = const 0_i32;                // scope 0 at $DIR/if-condition-int.rs:+1:21: +1:22
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:35
+          _0 = const 0_i32;                // scope 0 at $DIR/if_condition_int.rs:+1:21: +1:22
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:35
       }
   
       bb2: {
-          _0 = const 1_i32;                // scope 0 at $DIR/if-condition-int.rs:+1:32: +1:33
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:35
+          _0 = const 1_i32;                // scope 0 at $DIR/if_condition_int.rs:+1:32: +1:33
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:35
       }
   
       bb3: {
-          StorageDead(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:34: +1:35
-          return;                          // scope 0 at $DIR/if-condition-int.rs:+2:2: +2:2
+          StorageDead(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:34: +1:35
+          return;                          // scope 0 at $DIR/if_condition_int.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/if_condition_int.dont_remove_comparison.SimplifyComparisonIntegral.diff b/src/test/mir-opt/if_condition_int.dont_remove_comparison.SimplifyComparisonIntegral.diff
index ed53c9a956c..cc0995f99cf 100644
--- a/src/test/mir-opt/if_condition_int.dont_remove_comparison.SimplifyComparisonIntegral.diff
+++ b/src/test/mir-opt/if_condition_int.dont_remove_comparison.SimplifyComparisonIntegral.diff
@@ -2,57 +2,57 @@
 + // MIR for `dont_remove_comparison` after SimplifyComparisonIntegral
   
   fn dont_remove_comparison(_1: i8) -> i32 {
-      debug a => _1;                       // in scope 0 at $DIR/if-condition-int.rs:+0:27: +0:28
-      let mut _0: i32;                     // return place in scope 0 at $DIR/if-condition-int.rs:+0:37: +0:40
-      let _2: bool;                        // in scope 0 at $DIR/if-condition-int.rs:+1:9: +1:10
-      let mut _3: i8;                      // in scope 0 at $DIR/if-condition-int.rs:+1:13: +1:14
-      let mut _4: i32;                     // in scope 0 at $DIR/if-condition-int.rs:+3:23: +3:31
-      let mut _5: bool;                    // in scope 0 at $DIR/if-condition-int.rs:+3:23: +3:24
-      let mut _6: i32;                     // in scope 0 at $DIR/if-condition-int.rs:+4:23: +4:31
-      let mut _7: bool;                    // in scope 0 at $DIR/if-condition-int.rs:+4:23: +4:24
+      debug a => _1;                       // in scope 0 at $DIR/if_condition_int.rs:+0:27: +0:28
+      let mut _0: i32;                     // return place in scope 0 at $DIR/if_condition_int.rs:+0:37: +0:40
+      let _2: bool;                        // in scope 0 at $DIR/if_condition_int.rs:+1:9: +1:10
+      let mut _3: i8;                      // in scope 0 at $DIR/if_condition_int.rs:+1:13: +1:14
+      let mut _4: i32;                     // in scope 0 at $DIR/if_condition_int.rs:+3:23: +3:31
+      let mut _5: bool;                    // in scope 0 at $DIR/if_condition_int.rs:+3:23: +3:24
+      let mut _6: i32;                     // in scope 0 at $DIR/if_condition_int.rs:+4:23: +4:31
+      let mut _7: bool;                    // in scope 0 at $DIR/if_condition_int.rs:+4:23: +4:24
       scope 1 {
-          debug b => _2;                   // in scope 1 at $DIR/if-condition-int.rs:+1:9: +1:10
+          debug b => _2;                   // in scope 1 at $DIR/if_condition_int.rs:+1:9: +1:10
       }
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:9: +1:10
-          StorageLive(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:13: +1:14
-          _3 = _1;                         // scope 0 at $DIR/if-condition-int.rs:+1:13: +1:14
--         _2 = Eq(move _3, const 17_i8);   // scope 0 at $DIR/if-condition-int.rs:+1:13: +1:20
--         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:19: +1:20
--         switchInt(_2) -> [false: bb2, otherwise: bb1]; // scope 1 at $DIR/if-condition-int.rs:+2:5: +2:12
-+         _2 = Eq(_3, const 17_i8);        // scope 0 at $DIR/if-condition-int.rs:+1:13: +1:20
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+1:19: +1:20
-+         switchInt(move _3) -> [17_i8: bb1, otherwise: bb2]; // scope 1 at $DIR/if-condition-int.rs:+2:5: +2:12
+          StorageLive(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:9: +1:10
+          StorageLive(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:13: +1:14
+          _3 = _1;                         // scope 0 at $DIR/if_condition_int.rs:+1:13: +1:14
+-         _2 = Eq(move _3, const 17_i8);   // scope 0 at $DIR/if_condition_int.rs:+1:13: +1:20
+-         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:19: +1:20
+-         switchInt(_2) -> [false: bb2, otherwise: bb1]; // scope 1 at $DIR/if_condition_int.rs:+2:5: +2:12
++         _2 = Eq(_3, const 17_i8);        // scope 0 at $DIR/if_condition_int.rs:+1:13: +1:20
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+1:19: +1:20
++         switchInt(move _3) -> [17_i8: bb1, otherwise: bb2]; // scope 1 at $DIR/if_condition_int.rs:+2:5: +2:12
       }
   
       bb1: {
-+         StorageDead(_3);                 // scope 1 at $DIR/if-condition-int.rs:+2:5: +2:12
-          StorageLive(_6);                 // scope 1 at $DIR/if-condition-int.rs:+4:23: +4:31
-          StorageLive(_7);                 // scope 1 at $DIR/if-condition-int.rs:+4:23: +4:24
-          _7 = _2;                         // scope 1 at $DIR/if-condition-int.rs:+4:23: +4:24
-          _6 = move _7 as i32 (IntToInt);  // scope 1 at $DIR/if-condition-int.rs:+4:23: +4:31
-          StorageDead(_7);                 // scope 1 at $DIR/if-condition-int.rs:+4:30: +4:31
-          _0 = Add(const 100_i32, move _6); // scope 1 at $DIR/if-condition-int.rs:+4:17: +4:31
-          StorageDead(_6);                 // scope 1 at $DIR/if-condition-int.rs:+4:30: +4:31
-          goto -> bb3;                     // scope 1 at $DIR/if-condition-int.rs:+4:30: +4:31
++         StorageDead(_3);                 // scope 1 at $DIR/if_condition_int.rs:+2:5: +2:12
+          StorageLive(_6);                 // scope 1 at $DIR/if_condition_int.rs:+4:23: +4:31
+          StorageLive(_7);                 // scope 1 at $DIR/if_condition_int.rs:+4:23: +4:24
+          _7 = _2;                         // scope 1 at $DIR/if_condition_int.rs:+4:23: +4:24
+          _6 = move _7 as i32 (IntToInt);  // scope 1 at $DIR/if_condition_int.rs:+4:23: +4:31
+          StorageDead(_7);                 // scope 1 at $DIR/if_condition_int.rs:+4:30: +4:31
+          _0 = Add(const 100_i32, move _6); // scope 1 at $DIR/if_condition_int.rs:+4:17: +4:31
+          StorageDead(_6);                 // scope 1 at $DIR/if_condition_int.rs:+4:30: +4:31
+          goto -> bb3;                     // scope 1 at $DIR/if_condition_int.rs:+4:30: +4:31
       }
   
       bb2: {
-+         StorageDead(_3);                 // scope 1 at $DIR/if-condition-int.rs:+2:5: +2:12
-          StorageLive(_4);                 // scope 1 at $DIR/if-condition-int.rs:+3:23: +3:31
-          StorageLive(_5);                 // scope 1 at $DIR/if-condition-int.rs:+3:23: +3:24
-          _5 = _2;                         // scope 1 at $DIR/if-condition-int.rs:+3:23: +3:24
-          _4 = move _5 as i32 (IntToInt);  // scope 1 at $DIR/if-condition-int.rs:+3:23: +3:31
-          StorageDead(_5);                 // scope 1 at $DIR/if-condition-int.rs:+3:30: +3:31
-          _0 = Add(const 10_i32, move _4); // scope 1 at $DIR/if-condition-int.rs:+3:18: +3:31
-          StorageDead(_4);                 // scope 1 at $DIR/if-condition-int.rs:+3:30: +3:31
-          goto -> bb3;                     // scope 1 at $DIR/if-condition-int.rs:+3:30: +3:31
++         StorageDead(_3);                 // scope 1 at $DIR/if_condition_int.rs:+2:5: +2:12
+          StorageLive(_4);                 // scope 1 at $DIR/if_condition_int.rs:+3:23: +3:31
+          StorageLive(_5);                 // scope 1 at $DIR/if_condition_int.rs:+3:23: +3:24
+          _5 = _2;                         // scope 1 at $DIR/if_condition_int.rs:+3:23: +3:24
+          _4 = move _5 as i32 (IntToInt);  // scope 1 at $DIR/if_condition_int.rs:+3:23: +3:31
+          StorageDead(_5);                 // scope 1 at $DIR/if_condition_int.rs:+3:30: +3:31
+          _0 = Add(const 10_i32, move _4); // scope 1 at $DIR/if_condition_int.rs:+3:18: +3:31
+          StorageDead(_4);                 // scope 1 at $DIR/if_condition_int.rs:+3:30: +3:31
+          goto -> bb3;                     // scope 1 at $DIR/if_condition_int.rs:+3:30: +3:31
       }
   
       bb3: {
-          StorageDead(_2);                 // scope 0 at $DIR/if-condition-int.rs:+6:1: +6:2
-          return;                          // scope 0 at $DIR/if-condition-int.rs:+6:2: +6:2
+          StorageDead(_2);                 // scope 0 at $DIR/if_condition_int.rs:+6:1: +6:2
+          return;                          // scope 0 at $DIR/if_condition_int.rs:+6:2: +6:2
       }
   }
   
diff --git a/src/test/mir-opt/if_condition_int.opt_char.SimplifyComparisonIntegral.diff b/src/test/mir-opt/if_condition_int.opt_char.SimplifyComparisonIntegral.diff
index 9b64c379fee..801ea040203 100644
--- a/src/test/mir-opt/if_condition_int.opt_char.SimplifyComparisonIntegral.diff
+++ b/src/test/mir-opt/if_condition_int.opt_char.SimplifyComparisonIntegral.diff
@@ -2,38 +2,38 @@
 + // MIR for `opt_char` after SimplifyComparisonIntegral
   
   fn opt_char(_1: char) -> u32 {
-      debug x => _1;                       // in scope 0 at $DIR/if-condition-int.rs:+0:13: +0:14
-      let mut _0: u32;                     // return place in scope 0 at $DIR/if-condition-int.rs:+0:25: +0:28
-      let mut _2: bool;                    // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-      let mut _3: char;                    // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
+      debug x => _1;                       // in scope 0 at $DIR/if_condition_int.rs:+0:13: +0:14
+      let mut _0: u32;                     // return place in scope 0 at $DIR/if_condition_int.rs:+0:25: +0:28
+      let mut _2: bool;                    // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
+      let mut _3: char;                    // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-          StorageLive(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
-          _3 = _1;                         // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
--         _2 = Eq(move _3, const 'x');     // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
--         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:15: +1:16
--         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+1:15: +1:16
-+         switchInt(move _3) -> ['x': bb1, otherwise: bb2]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
+          StorageLive(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
+          StorageLive(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+          _3 = _1;                         // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+-         _2 = Eq(move _3, const 'x');     // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
+-         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:15: +1:16
+-         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+1:15: +1:16
++         switchInt(move _3) -> ['x': bb1, otherwise: bb2]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
       }
   
       bb1: {
-+         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-          _0 = const 0_u32;                // scope 0 at $DIR/if-condition-int.rs:+1:19: +1:20
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:33
++         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
+          _0 = const 0_u32;                // scope 0 at $DIR/if_condition_int.rs:+1:19: +1:20
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:33
       }
   
       bb2: {
-+         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-          _0 = const 1_u32;                // scope 0 at $DIR/if-condition-int.rs:+1:30: +1:31
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:33
++         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
+          _0 = const 1_u32;                // scope 0 at $DIR/if_condition_int.rs:+1:30: +1:31
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:33
       }
   
       bb3: {
-          StorageDead(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:32: +1:33
-          return;                          // scope 0 at $DIR/if-condition-int.rs:+2:2: +2:2
+          StorageDead(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:32: +1:33
+          return;                          // scope 0 at $DIR/if_condition_int.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/if_condition_int.opt_i8.SimplifyComparisonIntegral.diff b/src/test/mir-opt/if_condition_int.opt_i8.SimplifyComparisonIntegral.diff
index 8042d63bb34..4297f4d6466 100644
--- a/src/test/mir-opt/if_condition_int.opt_i8.SimplifyComparisonIntegral.diff
+++ b/src/test/mir-opt/if_condition_int.opt_i8.SimplifyComparisonIntegral.diff
@@ -2,38 +2,38 @@
 + // MIR for `opt_i8` after SimplifyComparisonIntegral
   
   fn opt_i8(_1: i8) -> u32 {
-      debug x => _1;                       // in scope 0 at $DIR/if-condition-int.rs:+0:11: +0:12
-      let mut _0: u32;                     // return place in scope 0 at $DIR/if-condition-int.rs:+0:21: +0:24
-      let mut _2: bool;                    // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-      let mut _3: i8;                      // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
+      debug x => _1;                       // in scope 0 at $DIR/if_condition_int.rs:+0:11: +0:12
+      let mut _0: u32;                     // return place in scope 0 at $DIR/if_condition_int.rs:+0:21: +0:24
+      let mut _2: bool;                    // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+      let mut _3: i8;                      // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-          StorageLive(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
-          _3 = _1;                         // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
--         _2 = Eq(move _3, const 42_i8);   // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
--         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:14: +1:15
--         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+1:14: +1:15
-+         switchInt(move _3) -> [42_i8: bb1, otherwise: bb2]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
+          StorageLive(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+          StorageLive(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+          _3 = _1;                         // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+-         _2 = Eq(move _3, const 42_i8);   // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+-         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:14: +1:15
+-         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+1:14: +1:15
++         switchInt(move _3) -> [42_i8: bb1, otherwise: bb2]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
       }
   
       bb1: {
-+         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-          _0 = const 0_u32;                // scope 0 at $DIR/if-condition-int.rs:+1:18: +1:19
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:32
++         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+          _0 = const 0_u32;                // scope 0 at $DIR/if_condition_int.rs:+1:18: +1:19
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:32
       }
   
       bb2: {
-+         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-          _0 = const 1_u32;                // scope 0 at $DIR/if-condition-int.rs:+1:29: +1:30
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:32
++         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+          _0 = const 1_u32;                // scope 0 at $DIR/if_condition_int.rs:+1:29: +1:30
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:32
       }
   
       bb3: {
-          StorageDead(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:31: +1:32
-          return;                          // scope 0 at $DIR/if-condition-int.rs:+2:2: +2:2
+          StorageDead(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:31: +1:32
+          return;                          // scope 0 at $DIR/if_condition_int.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/if_condition_int.opt_multiple_ifs.SimplifyComparisonIntegral.diff b/src/test/mir-opt/if_condition_int.opt_multiple_ifs.SimplifyComparisonIntegral.diff
index a408de1ef3e..8fb794abbd4 100644
--- a/src/test/mir-opt/if_condition_int.opt_multiple_ifs.SimplifyComparisonIntegral.diff
+++ b/src/test/mir-opt/if_condition_int.opt_multiple_ifs.SimplifyComparisonIntegral.diff
@@ -2,64 +2,64 @@
 + // MIR for `opt_multiple_ifs` after SimplifyComparisonIntegral
   
   fn opt_multiple_ifs(_1: u32) -> u32 {
-      debug x => _1;                       // in scope 0 at $DIR/if-condition-int.rs:+0:21: +0:22
-      let mut _0: u32;                     // return place in scope 0 at $DIR/if-condition-int.rs:+0:32: +0:35
-      let mut _2: bool;                    // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-      let mut _3: u32;                     // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
-      let mut _4: bool;                    // in scope 0 at $DIR/if-condition-int.rs:+3:15: +3:22
-      let mut _5: u32;                     // in scope 0 at $DIR/if-condition-int.rs:+3:15: +3:16
+      debug x => _1;                       // in scope 0 at $DIR/if_condition_int.rs:+0:21: +0:22
+      let mut _0: u32;                     // return place in scope 0 at $DIR/if_condition_int.rs:+0:32: +0:35
+      let mut _2: bool;                    // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+      let mut _3: u32;                     // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+      let mut _4: bool;                    // in scope 0 at $DIR/if_condition_int.rs:+3:15: +3:22
+      let mut _5: u32;                     // in scope 0 at $DIR/if_condition_int.rs:+3:15: +3:16
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-          StorageLive(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
-          _3 = _1;                         // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
--         _2 = Eq(move _3, const 42_u32);  // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
--         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:14: +1:15
--         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+1:14: +1:15
-+         switchInt(move _3) -> [42_u32: bb1, otherwise: bb2]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
+          StorageLive(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+          StorageLive(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+          _3 = _1;                         // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+-         _2 = Eq(move _3, const 42_u32);  // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+-         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:14: +1:15
+-         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+1:14: +1:15
++         switchInt(move _3) -> [42_u32: bb1, otherwise: bb2]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
       }
   
       bb1: {
-+         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-          _0 = const 0_u32;                // scope 0 at $DIR/if-condition-int.rs:+2:9: +2:10
-          goto -> bb6;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +7:6
++         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+          _0 = const 0_u32;                // scope 0 at $DIR/if_condition_int.rs:+2:9: +2:10
+          goto -> bb6;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +7:6
       }
   
       bb2: {
-+         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-          StorageLive(_4);                 // scope 0 at $DIR/if-condition-int.rs:+3:15: +3:22
-          StorageLive(_5);                 // scope 0 at $DIR/if-condition-int.rs:+3:15: +3:16
-          _5 = _1;                         // scope 0 at $DIR/if-condition-int.rs:+3:15: +3:16
--         _4 = Ne(move _5, const 21_u32);  // scope 0 at $DIR/if-condition-int.rs:+3:15: +3:22
--         StorageDead(_5);                 // scope 0 at $DIR/if-condition-int.rs:+3:21: +3:22
--         switchInt(move _4) -> [false: bb4, otherwise: bb3]; // scope 0 at $DIR/if-condition-int.rs:+3:15: +3:22
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+3:15: +3:22
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+3:21: +3:22
-+         switchInt(move _5) -> [21_u32: bb4, otherwise: bb3]; // scope 0 at $DIR/if-condition-int.rs:+3:15: +3:22
++         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+          StorageLive(_4);                 // scope 0 at $DIR/if_condition_int.rs:+3:15: +3:22
+          StorageLive(_5);                 // scope 0 at $DIR/if_condition_int.rs:+3:15: +3:16
+          _5 = _1;                         // scope 0 at $DIR/if_condition_int.rs:+3:15: +3:16
+-         _4 = Ne(move _5, const 21_u32);  // scope 0 at $DIR/if_condition_int.rs:+3:15: +3:22
+-         StorageDead(_5);                 // scope 0 at $DIR/if_condition_int.rs:+3:21: +3:22
+-         switchInt(move _4) -> [false: bb4, otherwise: bb3]; // scope 0 at $DIR/if_condition_int.rs:+3:15: +3:22
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+3:15: +3:22
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+3:21: +3:22
++         switchInt(move _5) -> [21_u32: bb4, otherwise: bb3]; // scope 0 at $DIR/if_condition_int.rs:+3:15: +3:22
       }
   
       bb3: {
-+         StorageDead(_5);                 // scope 0 at $DIR/if-condition-int.rs:+3:15: +3:22
-          _0 = const 1_u32;                // scope 0 at $DIR/if-condition-int.rs:+4:9: +4:10
-          goto -> bb5;                     // scope 0 at $DIR/if-condition-int.rs:+3:12: +7:6
++         StorageDead(_5);                 // scope 0 at $DIR/if_condition_int.rs:+3:15: +3:22
+          _0 = const 1_u32;                // scope 0 at $DIR/if_condition_int.rs:+4:9: +4:10
+          goto -> bb5;                     // scope 0 at $DIR/if_condition_int.rs:+3:12: +7:6
       }
   
       bb4: {
-+         StorageDead(_5);                 // scope 0 at $DIR/if-condition-int.rs:+3:15: +3:22
-          _0 = const 2_u32;                // scope 0 at $DIR/if-condition-int.rs:+6:9: +6:10
-          goto -> bb5;                     // scope 0 at $DIR/if-condition-int.rs:+3:12: +7:6
++         StorageDead(_5);                 // scope 0 at $DIR/if_condition_int.rs:+3:15: +3:22
+          _0 = const 2_u32;                // scope 0 at $DIR/if_condition_int.rs:+6:9: +6:10
+          goto -> bb5;                     // scope 0 at $DIR/if_condition_int.rs:+3:12: +7:6
       }
   
       bb5: {
-          StorageDead(_4);                 // scope 0 at $DIR/if-condition-int.rs:+7:5: +7:6
-          goto -> bb6;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +7:6
+          StorageDead(_4);                 // scope 0 at $DIR/if_condition_int.rs:+7:5: +7:6
+          goto -> bb6;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +7:6
       }
   
       bb6: {
-          StorageDead(_2);                 // scope 0 at $DIR/if-condition-int.rs:+7:5: +7:6
-          return;                          // scope 0 at $DIR/if-condition-int.rs:+8:2: +8:2
+          StorageDead(_2);                 // scope 0 at $DIR/if_condition_int.rs:+7:5: +7:6
+          return;                          // scope 0 at $DIR/if_condition_int.rs:+8:2: +8:2
       }
   }
   
diff --git a/src/test/mir-opt/if_condition_int.opt_negative.SimplifyComparisonIntegral.diff b/src/test/mir-opt/if_condition_int.opt_negative.SimplifyComparisonIntegral.diff
index 6802f89d927..992253ea780 100644
--- a/src/test/mir-opt/if_condition_int.opt_negative.SimplifyComparisonIntegral.diff
+++ b/src/test/mir-opt/if_condition_int.opt_negative.SimplifyComparisonIntegral.diff
@@ -2,38 +2,38 @@
 + // MIR for `opt_negative` after SimplifyComparisonIntegral
   
   fn opt_negative(_1: i32) -> u32 {
-      debug x => _1;                       // in scope 0 at $DIR/if-condition-int.rs:+0:17: +0:18
-      let mut _0: u32;                     // return place in scope 0 at $DIR/if-condition-int.rs:+0:28: +0:31
-      let mut _2: bool;                    // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-      let mut _3: i32;                     // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
+      debug x => _1;                       // in scope 0 at $DIR/if_condition_int.rs:+0:17: +0:18
+      let mut _0: u32;                     // return place in scope 0 at $DIR/if_condition_int.rs:+0:28: +0:31
+      let mut _2: bool;                    // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
+      let mut _3: i32;                     // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-          StorageLive(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
-          _3 = _1;                         // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
--         _2 = Eq(move _3, const -42_i32); // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
--         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:15: +1:16
--         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+1:15: +1:16
-+         switchInt(move _3) -> [-42_i32: bb1, otherwise: bb2]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
+          StorageLive(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
+          StorageLive(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+          _3 = _1;                         // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+-         _2 = Eq(move _3, const -42_i32); // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
+-         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:15: +1:16
+-         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+1:15: +1:16
++         switchInt(move _3) -> [-42_i32: bb1, otherwise: bb2]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
       }
   
       bb1: {
-+         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-          _0 = const 0_u32;                // scope 0 at $DIR/if-condition-int.rs:+1:19: +1:20
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:33
++         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
+          _0 = const 0_u32;                // scope 0 at $DIR/if_condition_int.rs:+1:19: +1:20
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:33
       }
   
       bb2: {
-+         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:16
-          _0 = const 1_u32;                // scope 0 at $DIR/if-condition-int.rs:+1:30: +1:31
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:33
++         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:16
+          _0 = const 1_u32;                // scope 0 at $DIR/if_condition_int.rs:+1:30: +1:31
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:33
       }
   
       bb3: {
-          StorageDead(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:32: +1:33
-          return;                          // scope 0 at $DIR/if-condition-int.rs:+2:2: +2:2
+          StorageDead(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:32: +1:33
+          return;                          // scope 0 at $DIR/if_condition_int.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/if_condition_int.opt_u32.SimplifyComparisonIntegral.diff b/src/test/mir-opt/if_condition_int.opt_u32.SimplifyComparisonIntegral.diff
index 96387771d06..7cea9472d3a 100644
--- a/src/test/mir-opt/if_condition_int.opt_u32.SimplifyComparisonIntegral.diff
+++ b/src/test/mir-opt/if_condition_int.opt_u32.SimplifyComparisonIntegral.diff
@@ -2,38 +2,38 @@
 + // MIR for `opt_u32` after SimplifyComparisonIntegral
   
   fn opt_u32(_1: u32) -> u32 {
-      debug x => _1;                       // in scope 0 at $DIR/if-condition-int.rs:+0:12: +0:13
-      let mut _0: u32;                     // return place in scope 0 at $DIR/if-condition-int.rs:+0:23: +0:26
-      let mut _2: bool;                    // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-      let mut _3: u32;                     // in scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
+      debug x => _1;                       // in scope 0 at $DIR/if_condition_int.rs:+0:12: +0:13
+      let mut _0: u32;                     // return place in scope 0 at $DIR/if_condition_int.rs:+0:23: +0:26
+      let mut _2: bool;                    // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+      let mut _3: u32;                     // in scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-          StorageLive(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
-          _3 = _1;                         // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:9
--         _2 = Eq(move _3, const 42_u32);  // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
--         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:14: +1:15
--         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-+         nop;                             // scope 0 at $DIR/if-condition-int.rs:+1:14: +1:15
-+         switchInt(move _3) -> [42_u32: bb1, otherwise: bb2]; // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
+          StorageLive(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+          StorageLive(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+          _3 = _1;                         // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:9
+-         _2 = Eq(move _3, const 42_u32);  // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+-         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:14: +1:15
+-         switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
++         nop;                             // scope 0 at $DIR/if_condition_int.rs:+1:14: +1:15
++         switchInt(move _3) -> [42_u32: bb1, otherwise: bb2]; // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
       }
   
       bb1: {
-+         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-          _0 = const 0_u32;                // scope 0 at $DIR/if-condition-int.rs:+1:18: +1:19
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:32
++         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+          _0 = const 0_u32;                // scope 0 at $DIR/if_condition_int.rs:+1:18: +1:19
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:32
       }
   
       bb2: {
-+         StorageDead(_3);                 // scope 0 at $DIR/if-condition-int.rs:+1:8: +1:15
-          _0 = const 1_u32;                // scope 0 at $DIR/if-condition-int.rs:+1:29: +1:30
-          goto -> bb3;                     // scope 0 at $DIR/if-condition-int.rs:+1:5: +1:32
++         StorageDead(_3);                 // scope 0 at $DIR/if_condition_int.rs:+1:8: +1:15
+          _0 = const 1_u32;                // scope 0 at $DIR/if_condition_int.rs:+1:29: +1:30
+          goto -> bb3;                     // scope 0 at $DIR/if_condition_int.rs:+1:5: +1:32
       }
   
       bb3: {
-          StorageDead(_2);                 // scope 0 at $DIR/if-condition-int.rs:+1:31: +1:32
-          return;                          // scope 0 at $DIR/if-condition-int.rs:+2:2: +2:2
+          StorageDead(_2);                 // scope 0 at $DIR/if_condition_int.rs:+1:31: +1:32
+          return;                          // scope 0 at $DIR/if_condition_int.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/if-condition-int.rs b/src/test/mir-opt/if_condition_int.rs
index 398311e6bb8..398311e6bb8 100644
--- a/src/test/mir-opt/if-condition-int.rs
+++ b/src/test/mir-opt/if_condition_int.rs
diff --git a/src/test/mir-opt/inline/asm_unwind.main.Inline.diff b/src/test/mir-opt/inline/asm_unwind.main.Inline.diff
index 57072fc0ad3..f1b62ac38ba 100644
--- a/src/test/mir-opt/inline/asm_unwind.main.Inline.diff
+++ b/src/test/mir-opt/inline/asm_unwind.main.Inline.diff
@@ -2,44 +2,44 @@
 + // MIR for `main` after Inline
   
   fn main() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/asm-unwind.rs:+0:15: +0:15
-      let _1: ();                          // in scope 0 at $DIR/asm-unwind.rs:+1:5: +1:10
-+     scope 1 (inlined foo) {              // at $DIR/asm-unwind.rs:21:5: 21:10
-+         let _2: D;                       // in scope 1 at $DIR/asm-unwind.rs:15:9: 15:11
+      let mut _0: ();                      // return place in scope 0 at $DIR/asm_unwind.rs:+0:15: +0:15
+      let _1: ();                          // in scope 0 at $DIR/asm_unwind.rs:+1:5: +1:10
++     scope 1 (inlined foo) {              // at $DIR/asm_unwind.rs:21:5: 21:10
++         let _2: D;                       // in scope 1 at $DIR/asm_unwind.rs:15:9: 15:11
 +         scope 2 {
-+             debug _d => _2;              // in scope 2 at $DIR/asm-unwind.rs:15:9: 15:11
++             debug _d => _2;              // in scope 2 at $DIR/asm_unwind.rs:15:9: 15:11
 +             scope 3 {
 +             }
 +         }
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/asm-unwind.rs:+1:5: +1:10
--         _1 = foo() -> bb1;               // scope 0 at $DIR/asm-unwind.rs:+1:5: +1:10
+          StorageLive(_1);                 // scope 0 at $DIR/asm_unwind.rs:+1:5: +1:10
+-         _1 = foo() -> bb1;               // scope 0 at $DIR/asm_unwind.rs:+1:5: +1:10
 -                                          // mir::Constant
--                                          // + span: $DIR/asm-unwind.rs:21:5: 21:8
+-                                          // + span: $DIR/asm_unwind.rs:21:5: 21:8
 -                                          // + literal: Const { ty: fn() {foo}, val: Value(<ZST>) }
-+         StorageLive(_2);                 // scope 1 at $DIR/asm-unwind.rs:15:9: 15:11
-+         asm!("", options(MAY_UNWIND)) -> [return: bb1, unwind: bb3]; // scope 3 at $DIR/asm-unwind.rs:16:14: 16:54
++         StorageLive(_2);                 // scope 1 at $DIR/asm_unwind.rs:15:9: 15:11
++         asm!("", options(MAY_UNWIND)) -> [return: bb1, unwind: bb3]; // scope 3 at $DIR/asm_unwind.rs:16:14: 16:54
       }
   
       bb1: {
-+         drop(_2) -> bb2;                 // scope 1 at $DIR/asm-unwind.rs:17:1: 17:2
++         drop(_2) -> bb2;                 // scope 1 at $DIR/asm_unwind.rs:17:1: 17:2
 +     }
 + 
 +     bb2: {
-+         StorageDead(_2);                 // scope 1 at $DIR/asm-unwind.rs:17:1: 17:2
-          StorageDead(_1);                 // scope 0 at $DIR/asm-unwind.rs:+1:10: +1:11
-          _0 = const ();                   // scope 0 at $DIR/asm-unwind.rs:+0:15: +2:2
-          return;                          // scope 0 at $DIR/asm-unwind.rs:+2:2: +2:2
++         StorageDead(_2);                 // scope 1 at $DIR/asm_unwind.rs:17:1: 17:2
+          StorageDead(_1);                 // scope 0 at $DIR/asm_unwind.rs:+1:10: +1:11
+          _0 = const ();                   // scope 0 at $DIR/asm_unwind.rs:+0:15: +2:2
+          return;                          // scope 0 at $DIR/asm_unwind.rs:+2:2: +2:2
 +     }
 + 
 +     bb3 (cleanup): {
-+         drop(_2) -> bb4;                 // scope 1 at $DIR/asm-unwind.rs:17:1: 17:2
++         drop(_2) -> bb4;                 // scope 1 at $DIR/asm_unwind.rs:17:1: 17:2
 +     }
 + 
 +     bb4 (cleanup): {
-+         resume;                          // scope 1 at $DIR/asm-unwind.rs:14:1: 17:2
++         resume;                          // scope 1 at $DIR/asm_unwind.rs:14:1: 17:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/asm-unwind.rs b/src/test/mir-opt/inline/asm_unwind.rs
index c03feb43312..c03feb43312 100644
--- a/src/test/mir-opt/inline/asm-unwind.rs
+++ b/src/test/mir-opt/inline/asm_unwind.rs
diff --git a/src/test/mir-opt/inline/caller_with_trivial_bound.foo.Inline.diff b/src/test/mir-opt/inline/caller_with_trivial_bound.foo.Inline.diff
index d7deb9c66cf..8b03006782b 100644
--- a/src/test/mir-opt/inline/caller_with_trivial_bound.foo.Inline.diff
+++ b/src/test/mir-opt/inline/caller_with_trivial_bound.foo.Inline.diff
@@ -2,32 +2,32 @@
 + // MIR for `foo` after Inline
   
   fn foo() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/caller-with-trivial-bound.rs:+1:1: +1:1
-      let mut _1: <IntFactory as Factory<T>>::Item; // in scope 0 at $DIR/caller-with-trivial-bound.rs:+4:9: +4:14
+      let mut _0: ();                      // return place in scope 0 at $DIR/caller_with_trivial_bound.rs:+1:1: +1:1
+      let mut _1: <IntFactory as Factory<T>>::Item; // in scope 0 at $DIR/caller_with_trivial_bound.rs:+4:9: +4:14
       scope 1 {
-          debug x => _1;                   // in scope 1 at $DIR/caller-with-trivial-bound.rs:+4:9: +4:14
+          debug x => _1;                   // in scope 1 at $DIR/caller_with_trivial_bound.rs:+4:9: +4:14
       }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/caller-with-trivial-bound.rs:+4:9: +4:14
-          _1 = bar::<T>() -> bb1;          // scope 0 at $DIR/caller-with-trivial-bound.rs:+4:51: +4:61
+          StorageLive(_1);                 // scope 0 at $DIR/caller_with_trivial_bound.rs:+4:9: +4:14
+          _1 = bar::<T>() -> bb1;          // scope 0 at $DIR/caller_with_trivial_bound.rs:+4:51: +4:61
                                            // mir::Constant
-                                           // + span: $DIR/caller-with-trivial-bound.rs:20:51: 20:59
+                                           // + span: $DIR/caller_with_trivial_bound.rs:20:51: 20:59
                                            // + literal: Const { ty: fn() -> <IntFactory as Factory<T>>::Item {bar::<T>}, val: Value(<ZST>) }
       }
   
       bb1: {
-          _0 = const ();                   // scope 0 at $DIR/caller-with-trivial-bound.rs:+3:1: +5:2
-          drop(_1) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/caller-with-trivial-bound.rs:+5:1: +5:2
+          _0 = const ();                   // scope 0 at $DIR/caller_with_trivial_bound.rs:+3:1: +5:2
+          drop(_1) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/caller_with_trivial_bound.rs:+5:1: +5:2
       }
   
       bb2: {
-          StorageDead(_1);                 // scope 0 at $DIR/caller-with-trivial-bound.rs:+5:1: +5:2
-          return;                          // scope 0 at $DIR/caller-with-trivial-bound.rs:+5:2: +5:2
+          StorageDead(_1);                 // scope 0 at $DIR/caller_with_trivial_bound.rs:+5:1: +5:2
+          return;                          // scope 0 at $DIR/caller_with_trivial_bound.rs:+5:2: +5:2
       }
   
       bb3 (cleanup): {
-          resume;                          // scope 0 at $DIR/caller-with-trivial-bound.rs:+0:1: +5:2
+          resume;                          // scope 0 at $DIR/caller_with_trivial_bound.rs:+0:1: +5:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/caller-with-trivial-bound.rs b/src/test/mir-opt/inline/caller_with_trivial_bound.rs
index 8545db89414..8545db89414 100644
--- a/src/test/mir-opt/inline/caller-with-trivial-bound.rs
+++ b/src/test/mir-opt/inline/caller_with_trivial_bound.rs
diff --git a/src/test/mir-opt/inline/dyn_trait.get_query.Inline.diff b/src/test/mir-opt/inline/dyn_trait.get_query.Inline.diff
index 1e95b5b29ff..284306a352d 100644
--- a/src/test/mir-opt/inline/dyn_trait.get_query.Inline.diff
+++ b/src/test/mir-opt/inline/dyn_trait.get_query.Inline.diff
@@ -2,61 +2,61 @@
 + // MIR for `get_query` after Inline
   
   fn get_query(_1: &T) -> () {
-      debug t => _1;                       // in scope 0 at $DIR/dyn-trait.rs:+0:31: +0:32
-      let mut _0: ();                      // return place in scope 0 at $DIR/dyn-trait.rs:+0:38: +0:38
-      let _2: &<Q as Query>::C;            // in scope 0 at $DIR/dyn-trait.rs:+1:9: +1:10
-      let mut _3: &T;                      // in scope 0 at $DIR/dyn-trait.rs:+1:22: +1:23
-      let mut _4: &<Q as Query>::C;        // in scope 0 at $DIR/dyn-trait.rs:+2:23: +2:24
+      debug t => _1;                       // in scope 0 at $DIR/dyn_trait.rs:+0:31: +0:32
+      let mut _0: ();                      // return place in scope 0 at $DIR/dyn_trait.rs:+0:38: +0:38
+      let _2: &<Q as Query>::C;            // in scope 0 at $DIR/dyn_trait.rs:+1:9: +1:10
+      let mut _3: &T;                      // in scope 0 at $DIR/dyn_trait.rs:+1:22: +1:23
+      let mut _4: &<Q as Query>::C;        // in scope 0 at $DIR/dyn_trait.rs:+2:23: +2:24
       scope 1 {
-          debug c => _2;                   // in scope 1 at $DIR/dyn-trait.rs:+1:9: +1:10
-+         scope 2 (inlined try_execute_query::<<Q as Query>::C>) { // at $DIR/dyn-trait.rs:34:5: 34:25
-+             debug c => _4;               // in scope 2 at $DIR/dyn-trait.rs:26:36: 26:37
-+             let mut _5: &dyn Cache<V = <Q as Query>::V>; // in scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
-+             let mut _6: &<Q as Query>::C; // in scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
-+             scope 3 (inlined mk_cycle::<<Q as Query>::V>) { // at $DIR/dyn-trait.rs:27:5: 27:16
-+                 debug c => _5;           // in scope 3 at $DIR/dyn-trait.rs:20:27: 20:28
-+                 let mut _7: &dyn Cache<V = <Q as Query>::V>; // in scope 3 at $DIR/dyn-trait.rs:21:5: 21:22
+          debug c => _2;                   // in scope 1 at $DIR/dyn_trait.rs:+1:9: +1:10
++         scope 2 (inlined try_execute_query::<<Q as Query>::C>) { // at $DIR/dyn_trait.rs:34:5: 34:25
++             debug c => _4;               // in scope 2 at $DIR/dyn_trait.rs:26:36: 26:37
++             let mut _5: &dyn Cache<V = <Q as Query>::V>; // in scope 2 at $DIR/dyn_trait.rs:27:14: 27:15
++             let mut _6: &<Q as Query>::C; // in scope 2 at $DIR/dyn_trait.rs:27:14: 27:15
++             scope 3 (inlined mk_cycle::<<Q as Query>::V>) { // at $DIR/dyn_trait.rs:27:5: 27:16
++                 debug c => _5;           // in scope 3 at $DIR/dyn_trait.rs:20:27: 20:28
++                 let mut _7: &dyn Cache<V = <Q as Query>::V>; // in scope 3 at $DIR/dyn_trait.rs:21:5: 21:22
 +             }
 +         }
       }
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/dyn-trait.rs:+1:9: +1:10
-          StorageLive(_3);                 // scope 0 at $DIR/dyn-trait.rs:+1:22: +1:23
-          _3 = &(*_1);                     // scope 0 at $DIR/dyn-trait.rs:+1:22: +1:23
-          _2 = <Q as Query>::cache::<T>(move _3) -> bb1; // scope 0 at $DIR/dyn-trait.rs:+1:13: +1:24
+          StorageLive(_2);                 // scope 0 at $DIR/dyn_trait.rs:+1:9: +1:10
+          StorageLive(_3);                 // scope 0 at $DIR/dyn_trait.rs:+1:22: +1:23
+          _3 = &(*_1);                     // scope 0 at $DIR/dyn_trait.rs:+1:22: +1:23
+          _2 = <Q as Query>::cache::<T>(move _3) -> bb1; // scope 0 at $DIR/dyn_trait.rs:+1:13: +1:24
                                            // mir::Constant
-                                           // + span: $DIR/dyn-trait.rs:33:13: 33:21
+                                           // + span: $DIR/dyn_trait.rs:33:13: 33:21
                                            // + user_ty: UserType(0)
                                            // + literal: Const { ty: for<'a> fn(&'a T) -> &'a <Q as Query>::C {<Q as Query>::cache::<T>}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_3);                 // scope 0 at $DIR/dyn-trait.rs:+1:23: +1:24
-          StorageLive(_4);                 // scope 1 at $DIR/dyn-trait.rs:+2:23: +2:24
-          _4 = &(*_2);                     // scope 1 at $DIR/dyn-trait.rs:+2:23: +2:24
--         _0 = try_execute_query::<<Q as Query>::C>(move _4) -> bb2; // scope 1 at $DIR/dyn-trait.rs:+2:5: +2:25
-+         StorageLive(_5);                 // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
-+         StorageLive(_6);                 // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
-+         _6 = _4;                         // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
-+         _5 = move _6 as &dyn Cache<V = <Q as Query>::V> (Pointer(Unsize)); // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
-+         StorageDead(_6);                 // scope 2 at $DIR/dyn-trait.rs:27:14: 27:15
-+         StorageLive(_7);                 // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22
-+         _7 = _5;                         // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22
-+         _0 = <dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache(move _7) -> bb2; // scope 3 at $DIR/dyn-trait.rs:21:5: 21:22
+          StorageDead(_3);                 // scope 0 at $DIR/dyn_trait.rs:+1:23: +1:24
+          StorageLive(_4);                 // scope 1 at $DIR/dyn_trait.rs:+2:23: +2:24
+          _4 = &(*_2);                     // scope 1 at $DIR/dyn_trait.rs:+2:23: +2:24
+-         _0 = try_execute_query::<<Q as Query>::C>(move _4) -> bb2; // scope 1 at $DIR/dyn_trait.rs:+2:5: +2:25
++         StorageLive(_5);                 // scope 2 at $DIR/dyn_trait.rs:27:14: 27:15
++         StorageLive(_6);                 // scope 2 at $DIR/dyn_trait.rs:27:14: 27:15
++         _6 = _4;                         // scope 2 at $DIR/dyn_trait.rs:27:14: 27:15
++         _5 = move _6 as &dyn Cache<V = <Q as Query>::V> (Pointer(Unsize)); // scope 2 at $DIR/dyn_trait.rs:27:14: 27:15
++         StorageDead(_6);                 // scope 2 at $DIR/dyn_trait.rs:27:14: 27:15
++         StorageLive(_7);                 // scope 3 at $DIR/dyn_trait.rs:21:5: 21:22
++         _7 = _5;                         // scope 3 at $DIR/dyn_trait.rs:21:5: 21:22
++         _0 = <dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache(move _7) -> bb2; // scope 3 at $DIR/dyn_trait.rs:21:5: 21:22
                                            // mir::Constant
--                                          // + span: $DIR/dyn-trait.rs:34:5: 34:22
+-                                          // + span: $DIR/dyn_trait.rs:34:5: 34:22
 -                                          // + literal: Const { ty: for<'a> fn(&'a <Q as Query>::C) {try_execute_query::<<Q as Query>::C>}, val: Value(<ZST>) }
-+                                          // + span: $DIR/dyn-trait.rs:21:7: 21:20
++                                          // + span: $DIR/dyn_trait.rs:21:7: 21:20
 +                                          // + literal: Const { ty: for<'a> fn(&'a dyn Cache<V = <Q as Query>::V>) {<dyn Cache<V = <Q as Query>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
       }
   
       bb2: {
-+         StorageDead(_7);                 // scope 3 at $DIR/dyn-trait.rs:21:21: 21:22
-+         StorageDead(_5);                 // scope 2 at $DIR/dyn-trait.rs:27:15: 27:16
-          StorageDead(_4);                 // scope 1 at $DIR/dyn-trait.rs:+2:24: +2:25
-          StorageDead(_2);                 // scope 0 at $DIR/dyn-trait.rs:+3:1: +3:2
-          return;                          // scope 0 at $DIR/dyn-trait.rs:+3:2: +3:2
++         StorageDead(_7);                 // scope 3 at $DIR/dyn_trait.rs:21:21: 21:22
++         StorageDead(_5);                 // scope 2 at $DIR/dyn_trait.rs:27:15: 27:16
+          StorageDead(_4);                 // scope 1 at $DIR/dyn_trait.rs:+2:24: +2:25
+          StorageDead(_2);                 // scope 0 at $DIR/dyn_trait.rs:+3:1: +3:2
+          return;                          // scope 0 at $DIR/dyn_trait.rs:+3:2: +3:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/dyn_trait.mk_cycle.Inline.diff b/src/test/mir-opt/inline/dyn_trait.mk_cycle.Inline.diff
index 7421db4d063..7653a5ded44 100644
--- a/src/test/mir-opt/inline/dyn_trait.mk_cycle.Inline.diff
+++ b/src/test/mir-opt/inline/dyn_trait.mk_cycle.Inline.diff
@@ -2,22 +2,22 @@
 + // MIR for `mk_cycle` after Inline
   
   fn mk_cycle(_1: &dyn Cache<V = V>) -> () {
-      debug c => _1;                       // in scope 0 at $DIR/dyn-trait.rs:+0:27: +0:28
-      let mut _0: ();                      // return place in scope 0 at $DIR/dyn-trait.rs:+0:49: +0:49
-      let mut _2: &dyn Cache<V = V>;       // in scope 0 at $DIR/dyn-trait.rs:+1:5: +1:22
+      debug c => _1;                       // in scope 0 at $DIR/dyn_trait.rs:+0:27: +0:28
+      let mut _0: ();                      // return place in scope 0 at $DIR/dyn_trait.rs:+0:49: +0:49
+      let mut _2: &dyn Cache<V = V>;       // in scope 0 at $DIR/dyn_trait.rs:+1:5: +1:22
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/dyn-trait.rs:+1:5: +1:22
-          _2 = &(*_1);                     // scope 0 at $DIR/dyn-trait.rs:+1:5: +1:22
-          _0 = <dyn Cache<V = V> as Cache>::store_nocache(move _2) -> bb1; // scope 0 at $DIR/dyn-trait.rs:+1:5: +1:22
+          StorageLive(_2);                 // scope 0 at $DIR/dyn_trait.rs:+1:5: +1:22
+          _2 = &(*_1);                     // scope 0 at $DIR/dyn_trait.rs:+1:5: +1:22
+          _0 = <dyn Cache<V = V> as Cache>::store_nocache(move _2) -> bb1; // scope 0 at $DIR/dyn_trait.rs:+1:5: +1:22
                                            // mir::Constant
-                                           // + span: $DIR/dyn-trait.rs:21:7: 21:20
+                                           // + span: $DIR/dyn_trait.rs:21:7: 21:20
                                            // + literal: Const { ty: for<'a> fn(&'a dyn Cache<V = V>) {<dyn Cache<V = V> as Cache>::store_nocache}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_2);                 // scope 0 at $DIR/dyn-trait.rs:+1:21: +1:22
-          return;                          // scope 0 at $DIR/dyn-trait.rs:+2:2: +2:2
+          StorageDead(_2);                 // scope 0 at $DIR/dyn_trait.rs:+1:21: +1:22
+          return;                          // scope 0 at $DIR/dyn_trait.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/dyn-trait.rs b/src/test/mir-opt/inline/dyn_trait.rs
index 6a46e1e07b1..6a46e1e07b1 100644
--- a/src/test/mir-opt/inline/dyn-trait.rs
+++ b/src/test/mir-opt/inline/dyn_trait.rs
diff --git a/src/test/mir-opt/inline/dyn_trait.try_execute_query.Inline.diff b/src/test/mir-opt/inline/dyn_trait.try_execute_query.Inline.diff
index e6e78374422..0191045f3d1 100644
--- a/src/test/mir-opt/inline/dyn_trait.try_execute_query.Inline.diff
+++ b/src/test/mir-opt/inline/dyn_trait.try_execute_query.Inline.diff
@@ -2,36 +2,36 @@
 + // MIR for `try_execute_query` after Inline
   
   fn try_execute_query(_1: &C) -> () {
-      debug c => _1;                       // in scope 0 at $DIR/dyn-trait.rs:+0:36: +0:37
-      let mut _0: ();                      // return place in scope 0 at $DIR/dyn-trait.rs:+0:43: +0:43
-      let mut _2: &dyn Cache<V = <C as Cache>::V>; // in scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
-      let mut _3: &C;                      // in scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
-+     scope 1 (inlined mk_cycle::<<C as Cache>::V>) { // at $DIR/dyn-trait.rs:27:5: 27:16
-+         debug c => _2;                   // in scope 1 at $DIR/dyn-trait.rs:20:27: 20:28
-+         let mut _4: &dyn Cache<V = <C as Cache>::V>; // in scope 1 at $DIR/dyn-trait.rs:21:5: 21:22
+      debug c => _1;                       // in scope 0 at $DIR/dyn_trait.rs:+0:36: +0:37
+      let mut _0: ();                      // return place in scope 0 at $DIR/dyn_trait.rs:+0:43: +0:43
+      let mut _2: &dyn Cache<V = <C as Cache>::V>; // in scope 0 at $DIR/dyn_trait.rs:+1:14: +1:15
+      let mut _3: &C;                      // in scope 0 at $DIR/dyn_trait.rs:+1:14: +1:15
++     scope 1 (inlined mk_cycle::<<C as Cache>::V>) { // at $DIR/dyn_trait.rs:27:5: 27:16
++         debug c => _2;                   // in scope 1 at $DIR/dyn_trait.rs:20:27: 20:28
++         let mut _4: &dyn Cache<V = <C as Cache>::V>; // in scope 1 at $DIR/dyn_trait.rs:21:5: 21:22
 +     }
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
-          StorageLive(_3);                 // scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
-          _3 = &(*_1);                     // scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
-          _2 = move _3 as &dyn Cache<V = <C as Cache>::V> (Pointer(Unsize)); // scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
-          StorageDead(_3);                 // scope 0 at $DIR/dyn-trait.rs:+1:14: +1:15
--         _0 = mk_cycle::<<C as Cache>::V>(move _2) -> bb1; // scope 0 at $DIR/dyn-trait.rs:+1:5: +1:16
-+         StorageLive(_4);                 // scope 1 at $DIR/dyn-trait.rs:21:5: 21:22
-+         _4 = _2;                         // scope 1 at $DIR/dyn-trait.rs:21:5: 21:22
-+         _0 = <dyn Cache<V = <C as Cache>::V> as Cache>::store_nocache(move _4) -> bb1; // scope 1 at $DIR/dyn-trait.rs:21:5: 21:22
+          StorageLive(_2);                 // scope 0 at $DIR/dyn_trait.rs:+1:14: +1:15
+          StorageLive(_3);                 // scope 0 at $DIR/dyn_trait.rs:+1:14: +1:15
+          _3 = &(*_1);                     // scope 0 at $DIR/dyn_trait.rs:+1:14: +1:15
+          _2 = move _3 as &dyn Cache<V = <C as Cache>::V> (Pointer(Unsize)); // scope 0 at $DIR/dyn_trait.rs:+1:14: +1:15
+          StorageDead(_3);                 // scope 0 at $DIR/dyn_trait.rs:+1:14: +1:15
+-         _0 = mk_cycle::<<C as Cache>::V>(move _2) -> bb1; // scope 0 at $DIR/dyn_trait.rs:+1:5: +1:16
++         StorageLive(_4);                 // scope 1 at $DIR/dyn_trait.rs:21:5: 21:22
++         _4 = _2;                         // scope 1 at $DIR/dyn_trait.rs:21:5: 21:22
++         _0 = <dyn Cache<V = <C as Cache>::V> as Cache>::store_nocache(move _4) -> bb1; // scope 1 at $DIR/dyn_trait.rs:21:5: 21:22
                                            // mir::Constant
--                                          // + span: $DIR/dyn-trait.rs:27:5: 27:13
+-                                          // + span: $DIR/dyn_trait.rs:27:5: 27:13
 -                                          // + literal: Const { ty: for<'a> fn(&'a (dyn Cache<V = <C as Cache>::V> + 'a)) {mk_cycle::<<C as Cache>::V>}, val: Value(<ZST>) }
-+                                          // + span: $DIR/dyn-trait.rs:21:7: 21:20
++                                          // + span: $DIR/dyn_trait.rs:21:7: 21:20
 +                                          // + literal: Const { ty: for<'a> fn(&'a dyn Cache<V = <C as Cache>::V>) {<dyn Cache<V = <C as Cache>::V> as Cache>::store_nocache}, val: Value(<ZST>) }
       }
   
       bb1: {
-+         StorageDead(_4);                 // scope 1 at $DIR/dyn-trait.rs:21:21: 21:22
-          StorageDead(_2);                 // scope 0 at $DIR/dyn-trait.rs:+1:15: +1:16
-          return;                          // scope 0 at $DIR/dyn-trait.rs:+2:2: +2:2
++         StorageDead(_4);                 // scope 1 at $DIR/dyn_trait.rs:21:21: 21:22
+          StorageDead(_2);                 // scope 0 at $DIR/dyn_trait.rs:+1:15: +1:16
+          return;                          // scope 0 at $DIR/dyn_trait.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir b/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir
index b27425fb18c..8956c80dcd2 100644
--- a/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_any_operand.bar.Inline.after.mir
@@ -1,44 +1,44 @@
 // MIR for `bar` after Inline
 
 fn bar() -> bool {
-    let mut _0: bool;                    // return place in scope 0 at $DIR/inline-any-operand.rs:+0:13: +0:17
-    let _1: fn(i32, i32) -> bool {foo};  // in scope 0 at $DIR/inline-any-operand.rs:+1:9: +1:10
-    let mut _2: fn(i32, i32) -> bool {foo}; // in scope 0 at $DIR/inline-any-operand.rs:+2:5: +2:6
-    let mut _3: i32;                     // in scope 0 at $DIR/inline-any-operand.rs:+2:5: +2:13
-    let mut _4: i32;                     // in scope 0 at $DIR/inline-any-operand.rs:+2:5: +2:13
+    let mut _0: bool;                    // return place in scope 0 at $DIR/inline_any_operand.rs:+0:13: +0:17
+    let _1: fn(i32, i32) -> bool {foo};  // in scope 0 at $DIR/inline_any_operand.rs:+1:9: +1:10
+    let mut _2: fn(i32, i32) -> bool {foo}; // in scope 0 at $DIR/inline_any_operand.rs:+2:5: +2:6
+    let mut _3: i32;                     // in scope 0 at $DIR/inline_any_operand.rs:+2:5: +2:13
+    let mut _4: i32;                     // in scope 0 at $DIR/inline_any_operand.rs:+2:5: +2:13
     scope 1 {
-        debug f => _1;                   // in scope 1 at $DIR/inline-any-operand.rs:+1:9: +1:10
-        scope 2 (inlined foo) {          // at $DIR/inline-any-operand.rs:12:5: 12:13
-            debug x => _3;               // in scope 2 at $DIR/inline-any-operand.rs:16:8: 16:9
-            debug y => _4;               // in scope 2 at $DIR/inline-any-operand.rs:16:16: 16:17
-            let mut _5: i32;             // in scope 2 at $DIR/inline-any-operand.rs:17:5: 17:6
-            let mut _6: i32;             // in scope 2 at $DIR/inline-any-operand.rs:17:10: 17:11
+        debug f => _1;                   // in scope 1 at $DIR/inline_any_operand.rs:+1:9: +1:10
+        scope 2 (inlined foo) {          // at $DIR/inline_any_operand.rs:12:5: 12:13
+            debug x => _3;               // in scope 2 at $DIR/inline_any_operand.rs:16:8: 16:9
+            debug y => _4;               // in scope 2 at $DIR/inline_any_operand.rs:16:16: 16:17
+            let mut _5: i32;             // in scope 2 at $DIR/inline_any_operand.rs:17:5: 17:6
+            let mut _6: i32;             // in scope 2 at $DIR/inline_any_operand.rs:17:10: 17:11
         }
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/inline-any-operand.rs:+1:9: +1:10
-        _1 = foo;                        // scope 0 at $DIR/inline-any-operand.rs:+1:13: +1:16
+        StorageLive(_1);                 // scope 0 at $DIR/inline_any_operand.rs:+1:9: +1:10
+        _1 = foo;                        // scope 0 at $DIR/inline_any_operand.rs:+1:13: +1:16
                                          // mir::Constant
-                                         // + span: $DIR/inline-any-operand.rs:11:13: 11:16
+                                         // + span: $DIR/inline_any_operand.rs:11:13: 11:16
                                          // + literal: Const { ty: fn(i32, i32) -> bool {foo}, val: Value(<ZST>) }
-        StorageLive(_2);                 // scope 1 at $DIR/inline-any-operand.rs:+2:5: +2:6
-        _2 = _1;                         // scope 1 at $DIR/inline-any-operand.rs:+2:5: +2:6
-        StorageLive(_3);                 // scope 1 at $DIR/inline-any-operand.rs:+2:5: +2:13
-        _3 = const 1_i32;                // scope 1 at $DIR/inline-any-operand.rs:+2:5: +2:13
-        StorageLive(_4);                 // scope 1 at $DIR/inline-any-operand.rs:+2:5: +2:13
-        _4 = const -1_i32;               // scope 1 at $DIR/inline-any-operand.rs:+2:5: +2:13
-        StorageLive(_5);                 // scope 2 at $DIR/inline-any-operand.rs:17:5: 17:6
-        _5 = _3;                         // scope 2 at $DIR/inline-any-operand.rs:17:5: 17:6
-        StorageLive(_6);                 // scope 2 at $DIR/inline-any-operand.rs:17:10: 17:11
-        _6 = _4;                         // scope 2 at $DIR/inline-any-operand.rs:17:10: 17:11
-        _0 = Eq(move _5, move _6);       // scope 2 at $DIR/inline-any-operand.rs:17:5: 17:11
-        StorageDead(_6);                 // scope 2 at $DIR/inline-any-operand.rs:17:10: 17:11
-        StorageDead(_5);                 // scope 2 at $DIR/inline-any-operand.rs:17:10: 17:11
-        StorageDead(_4);                 // scope 1 at $DIR/inline-any-operand.rs:+2:5: +2:13
-        StorageDead(_3);                 // scope 1 at $DIR/inline-any-operand.rs:+2:5: +2:13
-        StorageDead(_2);                 // scope 1 at $DIR/inline-any-operand.rs:+2:12: +2:13
-        StorageDead(_1);                 // scope 0 at $DIR/inline-any-operand.rs:+3:1: +3:2
-        return;                          // scope 0 at $DIR/inline-any-operand.rs:+3:2: +3:2
+        StorageLive(_2);                 // scope 1 at $DIR/inline_any_operand.rs:+2:5: +2:6
+        _2 = _1;                         // scope 1 at $DIR/inline_any_operand.rs:+2:5: +2:6
+        StorageLive(_3);                 // scope 1 at $DIR/inline_any_operand.rs:+2:5: +2:13
+        _3 = const 1_i32;                // scope 1 at $DIR/inline_any_operand.rs:+2:5: +2:13
+        StorageLive(_4);                 // scope 1 at $DIR/inline_any_operand.rs:+2:5: +2:13
+        _4 = const -1_i32;               // scope 1 at $DIR/inline_any_operand.rs:+2:5: +2:13
+        StorageLive(_5);                 // scope 2 at $DIR/inline_any_operand.rs:17:5: 17:6
+        _5 = _3;                         // scope 2 at $DIR/inline_any_operand.rs:17:5: 17:6
+        StorageLive(_6);                 // scope 2 at $DIR/inline_any_operand.rs:17:10: 17:11
+        _6 = _4;                         // scope 2 at $DIR/inline_any_operand.rs:17:10: 17:11
+        _0 = Eq(move _5, move _6);       // scope 2 at $DIR/inline_any_operand.rs:17:5: 17:11
+        StorageDead(_6);                 // scope 2 at $DIR/inline_any_operand.rs:17:10: 17:11
+        StorageDead(_5);                 // scope 2 at $DIR/inline_any_operand.rs:17:10: 17:11
+        StorageDead(_4);                 // scope 1 at $DIR/inline_any_operand.rs:+2:5: +2:13
+        StorageDead(_3);                 // scope 1 at $DIR/inline_any_operand.rs:+2:5: +2:13
+        StorageDead(_2);                 // scope 1 at $DIR/inline_any_operand.rs:+2:12: +2:13
+        StorageDead(_1);                 // scope 0 at $DIR/inline_any_operand.rs:+3:1: +3:2
+        return;                          // scope 0 at $DIR/inline_any_operand.rs:+3:2: +3:2
     }
 }
diff --git a/src/test/mir-opt/inline/inline-any-operand.rs b/src/test/mir-opt/inline/inline_any_operand.rs
index fb0de020f73..fb0de020f73 100644
--- a/src/test/mir-opt/inline/inline-any-operand.rs
+++ b/src/test/mir-opt/inline/inline_any_operand.rs
diff --git a/src/test/mir-opt/inline/inline-async.rs b/src/test/mir-opt/inline/inline_async.rs
index 5c838159b98..5c838159b98 100644
--- a/src/test/mir-opt/inline/inline-async.rs
+++ b/src/test/mir-opt/inline/inline_async.rs
diff --git a/src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir
index 1fadd246479..9eb3a01eef9 100644
--- a/src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_closure.foo.Inline.after.mir
@@ -1,49 +1,49 @@
 // MIR for `foo` after Inline
 
 fn foo(_1: T, _2: i32) -> i32 {
-    debug _t => _1;                      // in scope 0 at $DIR/inline-closure.rs:+0:17: +0:19
-    debug q => _2;                       // in scope 0 at $DIR/inline-closure.rs:+0:24: +0:25
-    let mut _0: i32;                     // return place in scope 0 at $DIR/inline-closure.rs:+0:35: +0:38
-    let _3: [closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure.rs:+1:9: +1:10
-    let mut _4: &[closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure.rs:+2:5: +2:6
-    let mut _5: (i32, i32);              // in scope 0 at $DIR/inline-closure.rs:+2:5: +2:12
-    let mut _6: i32;                     // in scope 0 at $DIR/inline-closure.rs:+2:7: +2:8
-    let mut _7: i32;                     // in scope 0 at $DIR/inline-closure.rs:+2:10: +2:11
-    let mut _8: i32;                     // in scope 0 at $DIR/inline-closure.rs:+2:5: +2:12
-    let mut _9: i32;                     // in scope 0 at $DIR/inline-closure.rs:+2:5: +2:12
+    debug _t => _1;                      // in scope 0 at $DIR/inline_closure.rs:+0:17: +0:19
+    debug q => _2;                       // in scope 0 at $DIR/inline_closure.rs:+0:24: +0:25
+    let mut _0: i32;                     // return place in scope 0 at $DIR/inline_closure.rs:+0:35: +0:38
+    let _3: [closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline_closure.rs:+1:9: +1:10
+    let mut _4: &[closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline_closure.rs:+2:5: +2:6
+    let mut _5: (i32, i32);              // in scope 0 at $DIR/inline_closure.rs:+2:5: +2:12
+    let mut _6: i32;                     // in scope 0 at $DIR/inline_closure.rs:+2:7: +2:8
+    let mut _7: i32;                     // in scope 0 at $DIR/inline_closure.rs:+2:10: +2:11
+    let mut _8: i32;                     // in scope 0 at $DIR/inline_closure.rs:+2:5: +2:12
+    let mut _9: i32;                     // in scope 0 at $DIR/inline_closure.rs:+2:5: +2:12
     scope 1 {
-        debug x => _3;                   // in scope 1 at $DIR/inline-closure.rs:+1:9: +1:10
-        scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline-closure.rs:12:5: 12:12
-            debug _t => _8;              // in scope 2 at $DIR/inline-closure.rs:+1:14: +1:16
-            debug _q => _9;              // in scope 2 at $DIR/inline-closure.rs:+1:18: +1:20
+        debug x => _3;                   // in scope 1 at $DIR/inline_closure.rs:+1:9: +1:10
+        scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline_closure.rs:12:5: 12:12
+            debug _t => _8;              // in scope 2 at $DIR/inline_closure.rs:+1:14: +1:16
+            debug _q => _9;              // in scope 2 at $DIR/inline_closure.rs:+1:18: +1:20
         }
     }
 
     bb0: {
-        StorageLive(_3);                 // scope 0 at $DIR/inline-closure.rs:+1:9: +1:10
-        Deinit(_3);                      // scope 0 at $DIR/inline-closure.rs:+1:13: +1:24
-        StorageLive(_4);                 // scope 1 at $DIR/inline-closure.rs:+2:5: +2:6
-        _4 = &_3;                        // scope 1 at $DIR/inline-closure.rs:+2:5: +2:6
-        StorageLive(_5);                 // scope 1 at $DIR/inline-closure.rs:+2:5: +2:12
-        StorageLive(_6);                 // scope 1 at $DIR/inline-closure.rs:+2:7: +2:8
-        _6 = _2;                         // scope 1 at $DIR/inline-closure.rs:+2:7: +2:8
-        StorageLive(_7);                 // scope 1 at $DIR/inline-closure.rs:+2:10: +2:11
-        _7 = _2;                         // scope 1 at $DIR/inline-closure.rs:+2:10: +2:11
-        Deinit(_5);                      // scope 1 at $DIR/inline-closure.rs:+2:5: +2:12
-        (_5.0: i32) = move _6;           // scope 1 at $DIR/inline-closure.rs:+2:5: +2:12
-        (_5.1: i32) = move _7;           // scope 1 at $DIR/inline-closure.rs:+2:5: +2:12
-        StorageLive(_8);                 // scope 1 at $DIR/inline-closure.rs:+2:5: +2:12
-        _8 = move (_5.0: i32);           // scope 1 at $DIR/inline-closure.rs:+2:5: +2:12
-        StorageLive(_9);                 // scope 1 at $DIR/inline-closure.rs:+2:5: +2:12
-        _9 = move (_5.1: i32);           // scope 1 at $DIR/inline-closure.rs:+2:5: +2:12
-        _0 = _8;                         // scope 2 at $DIR/inline-closure.rs:+1:22: +1:24
-        StorageDead(_9);                 // scope 1 at $DIR/inline-closure.rs:+2:5: +2:12
-        StorageDead(_8);                 // scope 1 at $DIR/inline-closure.rs:+2:5: +2:12
-        StorageDead(_7);                 // scope 1 at $DIR/inline-closure.rs:+2:11: +2:12
-        StorageDead(_6);                 // scope 1 at $DIR/inline-closure.rs:+2:11: +2:12
-        StorageDead(_5);                 // scope 1 at $DIR/inline-closure.rs:+2:11: +2:12
-        StorageDead(_4);                 // scope 1 at $DIR/inline-closure.rs:+2:11: +2:12
-        StorageDead(_3);                 // scope 0 at $DIR/inline-closure.rs:+3:1: +3:2
-        return;                          // scope 0 at $DIR/inline-closure.rs:+3:2: +3:2
+        StorageLive(_3);                 // scope 0 at $DIR/inline_closure.rs:+1:9: +1:10
+        Deinit(_3);                      // scope 0 at $DIR/inline_closure.rs:+1:13: +1:24
+        StorageLive(_4);                 // scope 1 at $DIR/inline_closure.rs:+2:5: +2:6
+        _4 = &_3;                        // scope 1 at $DIR/inline_closure.rs:+2:5: +2:6
+        StorageLive(_5);                 // scope 1 at $DIR/inline_closure.rs:+2:5: +2:12
+        StorageLive(_6);                 // scope 1 at $DIR/inline_closure.rs:+2:7: +2:8
+        _6 = _2;                         // scope 1 at $DIR/inline_closure.rs:+2:7: +2:8
+        StorageLive(_7);                 // scope 1 at $DIR/inline_closure.rs:+2:10: +2:11
+        _7 = _2;                         // scope 1 at $DIR/inline_closure.rs:+2:10: +2:11
+        Deinit(_5);                      // scope 1 at $DIR/inline_closure.rs:+2:5: +2:12
+        (_5.0: i32) = move _6;           // scope 1 at $DIR/inline_closure.rs:+2:5: +2:12
+        (_5.1: i32) = move _7;           // scope 1 at $DIR/inline_closure.rs:+2:5: +2:12
+        StorageLive(_8);                 // scope 1 at $DIR/inline_closure.rs:+2:5: +2:12
+        _8 = move (_5.0: i32);           // scope 1 at $DIR/inline_closure.rs:+2:5: +2:12
+        StorageLive(_9);                 // scope 1 at $DIR/inline_closure.rs:+2:5: +2:12
+        _9 = move (_5.1: i32);           // scope 1 at $DIR/inline_closure.rs:+2:5: +2:12
+        _0 = _8;                         // scope 2 at $DIR/inline_closure.rs:+1:22: +1:24
+        StorageDead(_9);                 // scope 1 at $DIR/inline_closure.rs:+2:5: +2:12
+        StorageDead(_8);                 // scope 1 at $DIR/inline_closure.rs:+2:5: +2:12
+        StorageDead(_7);                 // scope 1 at $DIR/inline_closure.rs:+2:11: +2:12
+        StorageDead(_6);                 // scope 1 at $DIR/inline_closure.rs:+2:11: +2:12
+        StorageDead(_5);                 // scope 1 at $DIR/inline_closure.rs:+2:11: +2:12
+        StorageDead(_4);                 // scope 1 at $DIR/inline_closure.rs:+2:11: +2:12
+        StorageDead(_3);                 // scope 0 at $DIR/inline_closure.rs:+3:1: +3:2
+        return;                          // scope 0 at $DIR/inline_closure.rs:+3:2: +3:2
     }
 }
diff --git a/src/test/mir-opt/inline/inline-closure.rs b/src/test/mir-opt/inline/inline_closure.rs
index 715fd0138a7..715fd0138a7 100644
--- a/src/test/mir-opt/inline/inline-closure.rs
+++ b/src/test/mir-opt/inline/inline_closure.rs
diff --git a/src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir
index 4069e9f89c8..e6275ac7f5d 100644
--- a/src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_closure_borrows_arg.foo.Inline.after.mir
@@ -1,56 +1,56 @@
 // MIR for `foo` after Inline
 
 fn foo(_1: T, _2: &i32) -> i32 {
-    debug _t => _1;                      // in scope 0 at $DIR/inline-closure-borrows-arg.rs:+0:17: +0:19
-    debug q => _2;                       // in scope 0 at $DIR/inline-closure-borrows-arg.rs:+0:24: +0:25
-    let mut _0: i32;                     // return place in scope 0 at $DIR/inline-closure-borrows-arg.rs:+0:36: +0:39
-    let _3: [closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure-borrows-arg.rs:+1:9: +1:10
-    let mut _4: &[closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:6
-    let mut _5: (&i32, &i32);            // in scope 0 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-    let mut _6: &i32;                    // in scope 0 at $DIR/inline-closure-borrows-arg.rs:+5:7: +5:8
-    let mut _7: &i32;                    // in scope 0 at $DIR/inline-closure-borrows-arg.rs:+5:10: +5:11
-    let mut _8: &i32;                    // in scope 0 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-    let mut _9: &i32;                    // in scope 0 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
+    debug _t => _1;                      // in scope 0 at $DIR/inline_closure_borrows_arg.rs:+0:17: +0:19
+    debug q => _2;                       // in scope 0 at $DIR/inline_closure_borrows_arg.rs:+0:24: +0:25
+    let mut _0: i32;                     // return place in scope 0 at $DIR/inline_closure_borrows_arg.rs:+0:36: +0:39
+    let _3: [closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline_closure_borrows_arg.rs:+1:9: +1:10
+    let mut _4: &[closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:6
+    let mut _5: (&i32, &i32);            // in scope 0 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+    let mut _6: &i32;                    // in scope 0 at $DIR/inline_closure_borrows_arg.rs:+5:7: +5:8
+    let mut _7: &i32;                    // in scope 0 at $DIR/inline_closure_borrows_arg.rs:+5:10: +5:11
+    let mut _8: &i32;                    // in scope 0 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+    let mut _9: &i32;                    // in scope 0 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
     scope 1 {
-        debug x => _3;                   // in scope 1 at $DIR/inline-closure-borrows-arg.rs:+1:9: +1:10
-        scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline-closure-borrows-arg.rs:16:5: 16:12
-            debug r => _8;               // in scope 2 at $DIR/inline-closure-borrows-arg.rs:+1:14: +1:15
-            debug _s => _9;              // in scope 2 at $DIR/inline-closure-borrows-arg.rs:+1:23: +1:25
-            let _10: &i32;               // in scope 2 at $DIR/inline-closure-borrows-arg.rs:+2:13: +2:21
+        debug x => _3;                   // in scope 1 at $DIR/inline_closure_borrows_arg.rs:+1:9: +1:10
+        scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline_closure_borrows_arg.rs:16:5: 16:12
+            debug r => _8;               // in scope 2 at $DIR/inline_closure_borrows_arg.rs:+1:14: +1:15
+            debug _s => _9;              // in scope 2 at $DIR/inline_closure_borrows_arg.rs:+1:23: +1:25
+            let _10: &i32;               // in scope 2 at $DIR/inline_closure_borrows_arg.rs:+2:13: +2:21
             scope 3 {
-                debug variable => _10;   // in scope 3 at $DIR/inline-closure-borrows-arg.rs:+2:13: +2:21
+                debug variable => _10;   // in scope 3 at $DIR/inline_closure_borrows_arg.rs:+2:13: +2:21
             }
         }
     }
 
     bb0: {
-        StorageLive(_3);                 // scope 0 at $DIR/inline-closure-borrows-arg.rs:+1:9: +1:10
-        Deinit(_3);                      // scope 0 at $DIR/inline-closure-borrows-arg.rs:+1:13: +4:6
-        StorageLive(_4);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:6
-        _4 = &_3;                        // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:6
-        StorageLive(_5);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-        StorageLive(_6);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:7: +5:8
-        _6 = &(*_2);                     // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:7: +5:8
-        StorageLive(_7);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:10: +5:11
-        _7 = &(*_2);                     // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:10: +5:11
-        Deinit(_5);                      // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-        (_5.0: &i32) = move _6;          // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-        (_5.1: &i32) = move _7;          // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-        StorageLive(_8);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-        _8 = move (_5.0: &i32);          // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-        StorageLive(_9);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-        _9 = move (_5.1: &i32);          // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-        StorageLive(_10);                // scope 2 at $DIR/inline-closure-borrows-arg.rs:+2:13: +2:21
-        _10 = _8;                        // scope 2 at $DIR/inline-closure-borrows-arg.rs:+2:24: +2:27
-        _0 = (*_10);                     // scope 3 at $DIR/inline-closure-borrows-arg.rs:+3:9: +3:18
-        StorageDead(_10);                // scope 2 at $DIR/inline-closure-borrows-arg.rs:+4:5: +4:6
-        StorageDead(_9);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-        StorageDead(_8);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:5: +5:12
-        StorageDead(_7);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:11: +5:12
-        StorageDead(_6);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:11: +5:12
-        StorageDead(_5);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:11: +5:12
-        StorageDead(_4);                 // scope 1 at $DIR/inline-closure-borrows-arg.rs:+5:11: +5:12
-        StorageDead(_3);                 // scope 0 at $DIR/inline-closure-borrows-arg.rs:+6:1: +6:2
-        return;                          // scope 0 at $DIR/inline-closure-borrows-arg.rs:+6:2: +6:2
+        StorageLive(_3);                 // scope 0 at $DIR/inline_closure_borrows_arg.rs:+1:9: +1:10
+        Deinit(_3);                      // scope 0 at $DIR/inline_closure_borrows_arg.rs:+1:13: +4:6
+        StorageLive(_4);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:6
+        _4 = &_3;                        // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:6
+        StorageLive(_5);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+        StorageLive(_6);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:7: +5:8
+        _6 = &(*_2);                     // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:7: +5:8
+        StorageLive(_7);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:10: +5:11
+        _7 = &(*_2);                     // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:10: +5:11
+        Deinit(_5);                      // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+        (_5.0: &i32) = move _6;          // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+        (_5.1: &i32) = move _7;          // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+        StorageLive(_8);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+        _8 = move (_5.0: &i32);          // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+        StorageLive(_9);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+        _9 = move (_5.1: &i32);          // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+        StorageLive(_10);                // scope 2 at $DIR/inline_closure_borrows_arg.rs:+2:13: +2:21
+        _10 = _8;                        // scope 2 at $DIR/inline_closure_borrows_arg.rs:+2:24: +2:27
+        _0 = (*_10);                     // scope 3 at $DIR/inline_closure_borrows_arg.rs:+3:9: +3:18
+        StorageDead(_10);                // scope 2 at $DIR/inline_closure_borrows_arg.rs:+4:5: +4:6
+        StorageDead(_9);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+        StorageDead(_8);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:5: +5:12
+        StorageDead(_7);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:11: +5:12
+        StorageDead(_6);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:11: +5:12
+        StorageDead(_5);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:11: +5:12
+        StorageDead(_4);                 // scope 1 at $DIR/inline_closure_borrows_arg.rs:+5:11: +5:12
+        StorageDead(_3);                 // scope 0 at $DIR/inline_closure_borrows_arg.rs:+6:1: +6:2
+        return;                          // scope 0 at $DIR/inline_closure_borrows_arg.rs:+6:2: +6:2
     }
 }
diff --git a/src/test/mir-opt/inline/inline-closure-borrows-arg.rs b/src/test/mir-opt/inline/inline_closure_borrows_arg.rs
index d76bc33f52e..d76bc33f52e 100644
--- a/src/test/mir-opt/inline/inline-closure-borrows-arg.rs
+++ b/src/test/mir-opt/inline/inline_closure_borrows_arg.rs
diff --git a/src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir b/src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir
index a2234e7c1ef..fd19c288666 100644
--- a/src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_closure_captures.foo.Inline.after.mir
@@ -1,65 +1,65 @@
 // MIR for `foo` after Inline
 
 fn foo(_1: T, _2: i32) -> (i32, T) {
-    debug t => _1;                       // in scope 0 at $DIR/inline-closure-captures.rs:+0:17: +0:18
-    debug q => _2;                       // in scope 0 at $DIR/inline-closure-captures.rs:+0:23: +0:24
-    let mut _0: (i32, T);                // return place in scope 0 at $DIR/inline-closure-captures.rs:+0:34: +0:42
-    let _3: [closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure-captures.rs:+1:9: +1:10
-    let mut _4: &i32;                    // in scope 0 at $DIR/inline-closure-captures.rs:+1:13: +1:24
-    let mut _5: &T;                      // in scope 0 at $DIR/inline-closure-captures.rs:+1:13: +1:24
-    let mut _6: &[closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline-closure-captures.rs:+2:5: +2:6
-    let mut _7: (i32,);                  // in scope 0 at $DIR/inline-closure-captures.rs:+2:5: +2:9
-    let mut _8: i32;                     // in scope 0 at $DIR/inline-closure-captures.rs:+2:7: +2:8
-    let mut _9: i32;                     // in scope 0 at $DIR/inline-closure-captures.rs:+2:5: +2:9
+    debug t => _1;                       // in scope 0 at $DIR/inline_closure_captures.rs:+0:17: +0:18
+    debug q => _2;                       // in scope 0 at $DIR/inline_closure_captures.rs:+0:23: +0:24
+    let mut _0: (i32, T);                // return place in scope 0 at $DIR/inline_closure_captures.rs:+0:34: +0:42
+    let _3: [closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline_closure_captures.rs:+1:9: +1:10
+    let mut _4: &i32;                    // in scope 0 at $DIR/inline_closure_captures.rs:+1:13: +1:24
+    let mut _5: &T;                      // in scope 0 at $DIR/inline_closure_captures.rs:+1:13: +1:24
+    let mut _6: &[closure@foo<T>::{closure#0}]; // in scope 0 at $DIR/inline_closure_captures.rs:+2:5: +2:6
+    let mut _7: (i32,);                  // in scope 0 at $DIR/inline_closure_captures.rs:+2:5: +2:9
+    let mut _8: i32;                     // in scope 0 at $DIR/inline_closure_captures.rs:+2:7: +2:8
+    let mut _9: i32;                     // in scope 0 at $DIR/inline_closure_captures.rs:+2:5: +2:9
     scope 1 {
-        debug x => _3;                   // in scope 1 at $DIR/inline-closure-captures.rs:+1:9: +1:10
-        scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline-closure-captures.rs:12:5: 12:9
-            debug _q => _9;              // in scope 2 at $DIR/inline-closure-captures.rs:+1:14: +1:16
-            debug q => (*((*_6).0: &i32)); // in scope 2 at $DIR/inline-closure-captures.rs:+0:23: +0:24
-            debug t => (*((*_6).1: &T)); // in scope 2 at $DIR/inline-closure-captures.rs:+0:17: +0:18
-            let mut _10: i32;            // in scope 2 at $DIR/inline-closure-captures.rs:+1:19: +1:20
-            let mut _11: T;              // in scope 2 at $DIR/inline-closure-captures.rs:+1:22: +1:23
-            let mut _12: &i32;           // in scope 2 at $DIR/inline-closure-captures.rs:+1:13: +1:24
-            let mut _13: &T;             // in scope 2 at $DIR/inline-closure-captures.rs:+1:13: +1:24
+        debug x => _3;                   // in scope 1 at $DIR/inline_closure_captures.rs:+1:9: +1:10
+        scope 2 (inlined foo::<T>::{closure#0}) { // at $DIR/inline_closure_captures.rs:12:5: 12:9
+            debug _q => _9;              // in scope 2 at $DIR/inline_closure_captures.rs:+1:14: +1:16
+            debug q => (*((*_6).0: &i32)); // in scope 2 at $DIR/inline_closure_captures.rs:+0:23: +0:24
+            debug t => (*((*_6).1: &T)); // in scope 2 at $DIR/inline_closure_captures.rs:+0:17: +0:18
+            let mut _10: i32;            // in scope 2 at $DIR/inline_closure_captures.rs:+1:19: +1:20
+            let mut _11: T;              // in scope 2 at $DIR/inline_closure_captures.rs:+1:22: +1:23
+            let mut _12: &i32;           // in scope 2 at $DIR/inline_closure_captures.rs:+1:13: +1:24
+            let mut _13: &T;             // in scope 2 at $DIR/inline_closure_captures.rs:+1:13: +1:24
         }
     }
 
     bb0: {
-        StorageLive(_3);                 // scope 0 at $DIR/inline-closure-captures.rs:+1:9: +1:10
-        StorageLive(_4);                 // scope 0 at $DIR/inline-closure-captures.rs:+1:13: +1:24
-        _4 = &_2;                        // scope 0 at $DIR/inline-closure-captures.rs:+1:13: +1:24
-        StorageLive(_5);                 // scope 0 at $DIR/inline-closure-captures.rs:+1:13: +1:24
-        _5 = &_1;                        // scope 0 at $DIR/inline-closure-captures.rs:+1:13: +1:24
-        Deinit(_3);                      // scope 0 at $DIR/inline-closure-captures.rs:+1:13: +1:24
-        (_3.0: &i32) = move _4;          // scope 0 at $DIR/inline-closure-captures.rs:+1:13: +1:24
-        (_3.1: &T) = move _5;            // scope 0 at $DIR/inline-closure-captures.rs:+1:13: +1:24
-        StorageDead(_5);                 // scope 0 at $DIR/inline-closure-captures.rs:+1:16: +1:17
-        StorageDead(_4);                 // scope 0 at $DIR/inline-closure-captures.rs:+1:16: +1:17
-        StorageLive(_6);                 // scope 1 at $DIR/inline-closure-captures.rs:+2:5: +2:6
-        _6 = &_3;                        // scope 1 at $DIR/inline-closure-captures.rs:+2:5: +2:6
-        StorageLive(_7);                 // scope 1 at $DIR/inline-closure-captures.rs:+2:5: +2:9
-        StorageLive(_8);                 // scope 1 at $DIR/inline-closure-captures.rs:+2:7: +2:8
-        _8 = _2;                         // scope 1 at $DIR/inline-closure-captures.rs:+2:7: +2:8
-        Deinit(_7);                      // scope 1 at $DIR/inline-closure-captures.rs:+2:5: +2:9
-        (_7.0: i32) = move _8;           // scope 1 at $DIR/inline-closure-captures.rs:+2:5: +2:9
-        StorageLive(_9);                 // scope 1 at $DIR/inline-closure-captures.rs:+2:5: +2:9
-        _9 = move (_7.0: i32);           // scope 1 at $DIR/inline-closure-captures.rs:+2:5: +2:9
-        StorageLive(_10);                // scope 2 at $DIR/inline-closure-captures.rs:+1:19: +1:20
-        _12 = deref_copy ((*_6).0: &i32); // scope 2 at $DIR/inline-closure-captures.rs:+1:19: +1:20
-        _10 = (*_12);                    // scope 2 at $DIR/inline-closure-captures.rs:+1:19: +1:20
-        StorageLive(_11);                // scope 2 at $DIR/inline-closure-captures.rs:+1:22: +1:23
-        _13 = deref_copy ((*_6).1: &T);  // scope 2 at $DIR/inline-closure-captures.rs:+1:22: +1:23
-        _11 = (*_13);                    // scope 2 at $DIR/inline-closure-captures.rs:+1:22: +1:23
-        Deinit(_0);                      // scope 2 at $DIR/inline-closure-captures.rs:+1:18: +1:24
-        (_0.0: i32) = move _10;          // scope 2 at $DIR/inline-closure-captures.rs:+1:18: +1:24
-        (_0.1: T) = move _11;            // scope 2 at $DIR/inline-closure-captures.rs:+1:18: +1:24
-        StorageDead(_11);                // scope 2 at $DIR/inline-closure-captures.rs:+1:23: +1:24
-        StorageDead(_10);                // scope 2 at $DIR/inline-closure-captures.rs:+1:23: +1:24
-        StorageDead(_9);                 // scope 1 at $DIR/inline-closure-captures.rs:+2:5: +2:9
-        StorageDead(_8);                 // scope 1 at $DIR/inline-closure-captures.rs:+2:8: +2:9
-        StorageDead(_7);                 // scope 1 at $DIR/inline-closure-captures.rs:+2:8: +2:9
-        StorageDead(_6);                 // scope 1 at $DIR/inline-closure-captures.rs:+2:8: +2:9
-        StorageDead(_3);                 // scope 0 at $DIR/inline-closure-captures.rs:+3:1: +3:2
-        return;                          // scope 0 at $DIR/inline-closure-captures.rs:+3:2: +3:2
+        StorageLive(_3);                 // scope 0 at $DIR/inline_closure_captures.rs:+1:9: +1:10
+        StorageLive(_4);                 // scope 0 at $DIR/inline_closure_captures.rs:+1:13: +1:24
+        _4 = &_2;                        // scope 0 at $DIR/inline_closure_captures.rs:+1:13: +1:24
+        StorageLive(_5);                 // scope 0 at $DIR/inline_closure_captures.rs:+1:13: +1:24
+        _5 = &_1;                        // scope 0 at $DIR/inline_closure_captures.rs:+1:13: +1:24
+        Deinit(_3);                      // scope 0 at $DIR/inline_closure_captures.rs:+1:13: +1:24
+        (_3.0: &i32) = move _4;          // scope 0 at $DIR/inline_closure_captures.rs:+1:13: +1:24
+        (_3.1: &T) = move _5;            // scope 0 at $DIR/inline_closure_captures.rs:+1:13: +1:24
+        StorageDead(_5);                 // scope 0 at $DIR/inline_closure_captures.rs:+1:16: +1:17
+        StorageDead(_4);                 // scope 0 at $DIR/inline_closure_captures.rs:+1:16: +1:17
+        StorageLive(_6);                 // scope 1 at $DIR/inline_closure_captures.rs:+2:5: +2:6
+        _6 = &_3;                        // scope 1 at $DIR/inline_closure_captures.rs:+2:5: +2:6
+        StorageLive(_7);                 // scope 1 at $DIR/inline_closure_captures.rs:+2:5: +2:9
+        StorageLive(_8);                 // scope 1 at $DIR/inline_closure_captures.rs:+2:7: +2:8
+        _8 = _2;                         // scope 1 at $DIR/inline_closure_captures.rs:+2:7: +2:8
+        Deinit(_7);                      // scope 1 at $DIR/inline_closure_captures.rs:+2:5: +2:9
+        (_7.0: i32) = move _8;           // scope 1 at $DIR/inline_closure_captures.rs:+2:5: +2:9
+        StorageLive(_9);                 // scope 1 at $DIR/inline_closure_captures.rs:+2:5: +2:9
+        _9 = move (_7.0: i32);           // scope 1 at $DIR/inline_closure_captures.rs:+2:5: +2:9
+        StorageLive(_10);                // scope 2 at $DIR/inline_closure_captures.rs:+1:19: +1:20
+        _12 = deref_copy ((*_6).0: &i32); // scope 2 at $DIR/inline_closure_captures.rs:+1:19: +1:20
+        _10 = (*_12);                    // scope 2 at $DIR/inline_closure_captures.rs:+1:19: +1:20
+        StorageLive(_11);                // scope 2 at $DIR/inline_closure_captures.rs:+1:22: +1:23
+        _13 = deref_copy ((*_6).1: &T);  // scope 2 at $DIR/inline_closure_captures.rs:+1:22: +1:23
+        _11 = (*_13);                    // scope 2 at $DIR/inline_closure_captures.rs:+1:22: +1:23
+        Deinit(_0);                      // scope 2 at $DIR/inline_closure_captures.rs:+1:18: +1:24
+        (_0.0: i32) = move _10;          // scope 2 at $DIR/inline_closure_captures.rs:+1:18: +1:24
+        (_0.1: T) = move _11;            // scope 2 at $DIR/inline_closure_captures.rs:+1:18: +1:24
+        StorageDead(_11);                // scope 2 at $DIR/inline_closure_captures.rs:+1:23: +1:24
+        StorageDead(_10);                // scope 2 at $DIR/inline_closure_captures.rs:+1:23: +1:24
+        StorageDead(_9);                 // scope 1 at $DIR/inline_closure_captures.rs:+2:5: +2:9
+        StorageDead(_8);                 // scope 1 at $DIR/inline_closure_captures.rs:+2:8: +2:9
+        StorageDead(_7);                 // scope 1 at $DIR/inline_closure_captures.rs:+2:8: +2:9
+        StorageDead(_6);                 // scope 1 at $DIR/inline_closure_captures.rs:+2:8: +2:9
+        StorageDead(_3);                 // scope 0 at $DIR/inline_closure_captures.rs:+3:1: +3:2
+        return;                          // scope 0 at $DIR/inline_closure_captures.rs:+3:2: +3:2
     }
 }
diff --git a/src/test/mir-opt/inline/inline-closure-captures.rs b/src/test/mir-opt/inline/inline_closure_captures.rs
index 52b6817e401..52b6817e401 100644
--- a/src/test/mir-opt/inline/inline-closure-captures.rs
+++ b/src/test/mir-opt/inline/inline_closure_captures.rs
diff --git a/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff
index cf800ba1129..e30a5e116ea 100644
--- a/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff
+++ b/src/test/mir-opt/inline/inline_compatibility.inlined_no_sanitize.Inline.diff
@@ -2,23 +2,23 @@
 + // MIR for `inlined_no_sanitize` after Inline
   
   fn inlined_no_sanitize() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-compatibility.rs:+0:37: +0:37
-      let _1: ();                          // in scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:18
-+     scope 1 (inlined no_sanitize) {      // at $DIR/inline-compatibility.rs:24:5: 24:18
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_compatibility.rs:+0:37: +0:37
+      let _1: ();                          // in scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:18
++     scope 1 (inlined no_sanitize) {      // at $DIR/inline_compatibility.rs:24:5: 24:18
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:18
--         _1 = no_sanitize() -> bb1;       // scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:18
+          StorageLive(_1);                 // scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:18
+-         _1 = no_sanitize() -> bb1;       // scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:18
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-compatibility.rs:24:5: 24:16
+-                                          // + span: $DIR/inline_compatibility.rs:24:5: 24:16
 -                                          // + literal: Const { ty: unsafe fn() {no_sanitize}, val: Value(<ZST>) }
 -     }
 - 
 -     bb1: {
-          StorageDead(_1);                 // scope 0 at $DIR/inline-compatibility.rs:+1:18: +1:19
-          _0 = const ();                   // scope 0 at $DIR/inline-compatibility.rs:+0:37: +2:2
-          return;                          // scope 0 at $DIR/inline-compatibility.rs:+2:2: +2:2
+          StorageDead(_1);                 // scope 0 at $DIR/inline_compatibility.rs:+1:18: +1:19
+          _0 = const ();                   // scope 0 at $DIR/inline_compatibility.rs:+0:37: +2:2
+          return;                          // scope 0 at $DIR/inline_compatibility.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff
index a45f959026d..c2b3c46a30c 100644
--- a/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff
+++ b/src/test/mir-opt/inline/inline_compatibility.inlined_target_feature.Inline.diff
@@ -2,23 +2,23 @@
 + // MIR for `inlined_target_feature` after Inline
   
   fn inlined_target_feature() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-compatibility.rs:+0:40: +0:40
-      let _1: ();                          // in scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:21
-+     scope 1 (inlined target_feature) {   // at $DIR/inline-compatibility.rs:13:5: 13:21
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_compatibility.rs:+0:40: +0:40
+      let _1: ();                          // in scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:21
++     scope 1 (inlined target_feature) {   // at $DIR/inline_compatibility.rs:13:5: 13:21
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:21
--         _1 = target_feature() -> bb1;    // scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:21
+          StorageLive(_1);                 // scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:21
+-         _1 = target_feature() -> bb1;    // scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:21
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-compatibility.rs:13:5: 13:19
+-                                          // + span: $DIR/inline_compatibility.rs:13:5: 13:19
 -                                          // + literal: Const { ty: unsafe fn() {target_feature}, val: Value(<ZST>) }
 -     }
 - 
 -     bb1: {
-          StorageDead(_1);                 // scope 0 at $DIR/inline-compatibility.rs:+1:21: +1:22
-          _0 = const ();                   // scope 0 at $DIR/inline-compatibility.rs:+0:40: +2:2
-          return;                          // scope 0 at $DIR/inline-compatibility.rs:+2:2: +2:2
+          StorageDead(_1);                 // scope 0 at $DIR/inline_compatibility.rs:+1:21: +1:22
+          _0 = const ();                   // scope 0 at $DIR/inline_compatibility.rs:+0:40: +2:2
+          return;                          // scope 0 at $DIR/inline_compatibility.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.diff
index 49aea431e46..0ca5a5f70b7 100644
--- a/src/test/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.diff
+++ b/src/test/mir-opt/inline/inline_compatibility.not_inlined_c_variadic.Inline.diff
@@ -2,24 +2,24 @@
 + // MIR for `not_inlined_c_variadic` after Inline
   
   fn not_inlined_c_variadic() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-compatibility.rs:+0:40: +0:40
-      let _1: u32;                         // in scope 0 at $DIR/inline-compatibility.rs:+1:9: +1:10
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_compatibility.rs:+0:40: +0:40
+      let _1: u32;                         // in scope 0 at $DIR/inline_compatibility.rs:+1:9: +1:10
       scope 1 {
-          debug s => _1;                   // in scope 1 at $DIR/inline-compatibility.rs:+1:9: +1:10
+          debug s => _1;                   // in scope 1 at $DIR/inline_compatibility.rs:+1:9: +1:10
       }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-compatibility.rs:+1:9: +1:10
-          _1 = sum(const 4_u32, const 4_u32, const 30_u32, const 200_u32, const 1000_u32) -> bb1; // scope 0 at $DIR/inline-compatibility.rs:+1:13: +1:52
+          StorageLive(_1);                 // scope 0 at $DIR/inline_compatibility.rs:+1:9: +1:10
+          _1 = sum(const 4_u32, const 4_u32, const 30_u32, const 200_u32, const 1000_u32) -> bb1; // scope 0 at $DIR/inline_compatibility.rs:+1:13: +1:52
                                            // mir::Constant
-                                           // + span: $DIR/inline-compatibility.rs:42:13: 42:16
+                                           // + span: $DIR/inline_compatibility.rs:42:13: 42:16
                                            // + literal: Const { ty: unsafe extern "C" fn(u32, ...) -> u32 {sum}, val: Value(<ZST>) }
       }
   
       bb1: {
-          _0 = const ();                   // scope 0 at $DIR/inline-compatibility.rs:+0:40: +2:2
-          StorageDead(_1);                 // scope 0 at $DIR/inline-compatibility.rs:+2:1: +2:2
-          return;                          // scope 0 at $DIR/inline-compatibility.rs:+2:2: +2:2
+          _0 = const ();                   // scope 0 at $DIR/inline_compatibility.rs:+0:40: +2:2
+          StorageDead(_1);                 // scope 0 at $DIR/inline_compatibility.rs:+2:1: +2:2
+          return;                          // scope 0 at $DIR/inline_compatibility.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.diff
index 94ce574a94d..00d405c77f9 100644
--- a/src/test/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.diff
+++ b/src/test/mir-opt/inline/inline_compatibility.not_inlined_no_sanitize.Inline.diff
@@ -2,21 +2,21 @@
 + // MIR for `not_inlined_no_sanitize` after Inline
   
   fn not_inlined_no_sanitize() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-compatibility.rs:+0:41: +0:41
-      let _1: ();                          // in scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:18
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_compatibility.rs:+0:41: +0:41
+      let _1: ();                          // in scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:18
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:18
-          _1 = no_sanitize() -> bb1;       // scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:18
+          StorageLive(_1);                 // scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:18
+          _1 = no_sanitize() -> bb1;       // scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:18
                                            // mir::Constant
-                                           // + span: $DIR/inline-compatibility.rs:29:5: 29:16
+                                           // + span: $DIR/inline_compatibility.rs:29:5: 29:16
                                            // + literal: Const { ty: unsafe fn() {no_sanitize}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_1);                 // scope 0 at $DIR/inline-compatibility.rs:+1:18: +1:19
-          _0 = const ();                   // scope 0 at $DIR/inline-compatibility.rs:+0:41: +2:2
-          return;                          // scope 0 at $DIR/inline-compatibility.rs:+2:2: +2:2
+          StorageDead(_1);                 // scope 0 at $DIR/inline_compatibility.rs:+1:18: +1:19
+          _0 = const ();                   // scope 0 at $DIR/inline_compatibility.rs:+0:41: +2:2
+          return;                          // scope 0 at $DIR/inline_compatibility.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.diff b/src/test/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.diff
index 8506e257b3f..8b9c86f5515 100644
--- a/src/test/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.diff
+++ b/src/test/mir-opt/inline/inline_compatibility.not_inlined_target_feature.Inline.diff
@@ -2,21 +2,21 @@
 + // MIR for `not_inlined_target_feature` after Inline
   
   fn not_inlined_target_feature() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-compatibility.rs:+0:44: +0:44
-      let _1: ();                          // in scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:21
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_compatibility.rs:+0:44: +0:44
+      let _1: ();                          // in scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:21
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:21
-          _1 = target_feature() -> bb1;    // scope 0 at $DIR/inline-compatibility.rs:+1:5: +1:21
+          StorageLive(_1);                 // scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:21
+          _1 = target_feature() -> bb1;    // scope 0 at $DIR/inline_compatibility.rs:+1:5: +1:21
                                            // mir::Constant
-                                           // + span: $DIR/inline-compatibility.rs:18:5: 18:19
+                                           // + span: $DIR/inline_compatibility.rs:18:5: 18:19
                                            // + literal: Const { ty: unsafe fn() {target_feature}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_1);                 // scope 0 at $DIR/inline-compatibility.rs:+1:21: +1:22
-          _0 = const ();                   // scope 0 at $DIR/inline-compatibility.rs:+0:44: +2:2
-          return;                          // scope 0 at $DIR/inline-compatibility.rs:+2:2: +2:2
+          StorageDead(_1);                 // scope 0 at $DIR/inline_compatibility.rs:+1:21: +1:22
+          _0 = const ();                   // scope 0 at $DIR/inline_compatibility.rs:+0:44: +2:2
+          return;                          // scope 0 at $DIR/inline_compatibility.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline-compatibility.rs b/src/test/mir-opt/inline/inline_compatibility.rs
index 30aff0a64ef..30aff0a64ef 100644
--- a/src/test/mir-opt/inline/inline-compatibility.rs
+++ b/src/test/mir-opt/inline/inline_compatibility.rs
diff --git a/src/test/mir-opt/inline/inline_cycle.one.Inline.diff b/src/test/mir-opt/inline/inline_cycle.one.Inline.diff
index a4d706de0ba..5510cd7bc8c 100644
--- a/src/test/mir-opt/inline/inline_cycle.one.Inline.diff
+++ b/src/test/mir-opt/inline/inline_cycle.one.Inline.diff
@@ -2,29 +2,29 @@
 + // MIR for `one` after Inline
   
   fn one() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-cycle.rs:+0:10: +0:10
-      let _1: ();                          // in scope 0 at $DIR/inline-cycle.rs:+1:5: +1:24
-+     scope 1 (inlined <C as Call>::call) { // at $DIR/inline-cycle.rs:14:5: 14:24
-+         scope 2 (inlined <A<C> as Call>::call) { // at $DIR/inline-cycle.rs:43:9: 43:23
-+             scope 3 (inlined <B<C> as Call>::call) { // at $DIR/inline-cycle.rs:28:9: 28:31
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_cycle.rs:+0:10: +0:10
+      let _1: ();                          // in scope 0 at $DIR/inline_cycle.rs:+1:5: +1:24
++     scope 1 (inlined <C as Call>::call) { // at $DIR/inline_cycle.rs:14:5: 14:24
++         scope 2 (inlined <A<C> as Call>::call) { // at $DIR/inline_cycle.rs:43:9: 43:23
++             scope 3 (inlined <B<C> as Call>::call) { // at $DIR/inline_cycle.rs:28:9: 28:31
 +             }
 +         }
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-cycle.rs:+1:5: +1:24
--         _1 = <C as Call>::call() -> bb1; // scope 0 at $DIR/inline-cycle.rs:+1:5: +1:24
-+         _1 = <C as Call>::call() -> bb1; // scope 3 at $DIR/inline-cycle.rs:36:9: 36:28
+          StorageLive(_1);                 // scope 0 at $DIR/inline_cycle.rs:+1:5: +1:24
+-         _1 = <C as Call>::call() -> bb1; // scope 0 at $DIR/inline_cycle.rs:+1:5: +1:24
++         _1 = <C as Call>::call() -> bb1; // scope 3 at $DIR/inline_cycle.rs:36:9: 36:28
                                            // mir::Constant
--                                          // + span: $DIR/inline-cycle.rs:14:5: 14:22
-+                                          // + span: $DIR/inline-cycle.rs:36:9: 36:26
+-                                          // + span: $DIR/inline_cycle.rs:14:5: 14:22
++                                          // + span: $DIR/inline_cycle.rs:36:9: 36:26
                                            // + literal: Const { ty: fn() {<C as Call>::call}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_1);                 // scope 0 at $DIR/inline-cycle.rs:+1:24: +1:25
-          _0 = const ();                   // scope 0 at $DIR/inline-cycle.rs:+0:10: +2:2
-          return;                          // scope 0 at $DIR/inline-cycle.rs:+2:2: +2:2
+          StorageDead(_1);                 // scope 0 at $DIR/inline_cycle.rs:+1:24: +1:25
+          _0 = const ();                   // scope 0 at $DIR/inline_cycle.rs:+0:10: +2:2
+          return;                          // scope 0 at $DIR/inline_cycle.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline-cycle.rs b/src/test/mir-opt/inline/inline_cycle.rs
index 63ad57de1d4..63ad57de1d4 100644
--- a/src/test/mir-opt/inline/inline-cycle.rs
+++ b/src/test/mir-opt/inline/inline_cycle.rs
diff --git a/src/test/mir-opt/inline/inline_cycle.two.Inline.diff b/src/test/mir-opt/inline/inline_cycle.two.Inline.diff
index b1a5b62ef1d..eceeb96f79f 100644
--- a/src/test/mir-opt/inline/inline_cycle.two.Inline.diff
+++ b/src/test/mir-opt/inline/inline_cycle.two.Inline.diff
@@ -2,54 +2,54 @@
 + // MIR for `two` after Inline
   
   fn two() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-cycle.rs:+0:10: +0:10
-      let _1: ();                          // in scope 0 at $DIR/inline-cycle.rs:+1:5: +1:12
-+     let mut _2: fn() {f};                // in scope 0 at $DIR/inline-cycle.rs:+1:5: +1:12
-+     scope 1 (inlined call::<fn() {f}>) { // at $DIR/inline-cycle.rs:49:5: 49:12
-+         debug f => _2;                   // in scope 1 at $DIR/inline-cycle.rs:53:22: 53:23
-+         let _3: ();                      // in scope 1 at $DIR/inline-cycle.rs:54:5: 54:8
-+         let mut _4: fn() {f};            // in scope 1 at $DIR/inline-cycle.rs:54:5: 54:6
-+         let mut _5: ();                  // in scope 1 at $DIR/inline-cycle.rs:54:5: 54:8
-+         scope 2 (inlined <fn() {f} as FnOnce<()>>::call_once - shim(fn() {f})) { // at $DIR/inline-cycle.rs:54:5: 54:8
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_cycle.rs:+0:10: +0:10
+      let _1: ();                          // in scope 0 at $DIR/inline_cycle.rs:+1:5: +1:12
++     let mut _2: fn() {f};                // in scope 0 at $DIR/inline_cycle.rs:+1:5: +1:12
++     scope 1 (inlined call::<fn() {f}>) { // at $DIR/inline_cycle.rs:49:5: 49:12
++         debug f => _2;                   // in scope 1 at $DIR/inline_cycle.rs:53:22: 53:23
++         let _3: ();                      // in scope 1 at $DIR/inline_cycle.rs:54:5: 54:8
++         let mut _4: fn() {f};            // in scope 1 at $DIR/inline_cycle.rs:54:5: 54:6
++         let mut _5: ();                  // in scope 1 at $DIR/inline_cycle.rs:54:5: 54:8
++         scope 2 (inlined <fn() {f} as FnOnce<()>>::call_once - shim(fn() {f})) { // at $DIR/inline_cycle.rs:54:5: 54:8
 +             scope 3 (inlined f) {        // at $SRC_DIR/core/src/ops/function.rs:LL:COL
-+                 let _6: ();              // in scope 3 at $DIR/inline-cycle.rs:59:5: 59:12
++                 let _6: ();              // in scope 3 at $DIR/inline_cycle.rs:59:5: 59:12
 +             }
 +         }
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-cycle.rs:+1:5: +1:12
--         _1 = call::<fn() {f}>(f) -> bb1; // scope 0 at $DIR/inline-cycle.rs:+1:5: +1:12
-+         StorageLive(_2);                 // scope 0 at $DIR/inline-cycle.rs:+1:5: +1:12
-+         _2 = f;                          // scope 0 at $DIR/inline-cycle.rs:+1:5: +1:12
+          StorageLive(_1);                 // scope 0 at $DIR/inline_cycle.rs:+1:5: +1:12
+-         _1 = call::<fn() {f}>(f) -> bb1; // scope 0 at $DIR/inline_cycle.rs:+1:5: +1:12
++         StorageLive(_2);                 // scope 0 at $DIR/inline_cycle.rs:+1:5: +1:12
++         _2 = f;                          // scope 0 at $DIR/inline_cycle.rs:+1:5: +1:12
                                            // mir::Constant
--                                          // + span: $DIR/inline-cycle.rs:49:5: 49:9
-+                                          // + span: $DIR/inline-cycle.rs:49:10: 49:11
+-                                          // + span: $DIR/inline_cycle.rs:49:5: 49:9
++                                          // + span: $DIR/inline_cycle.rs:49:10: 49:11
 +                                          // + literal: Const { ty: fn() {f}, val: Value(<ZST>) }
-+         StorageLive(_3);                 // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8
-+         StorageLive(_4);                 // scope 1 at $DIR/inline-cycle.rs:54:5: 54:6
-+         _4 = move _2;                    // scope 1 at $DIR/inline-cycle.rs:54:5: 54:6
-+         StorageLive(_5);                 // scope 1 at $DIR/inline-cycle.rs:54:5: 54:8
-+         StorageLive(_6);                 // scope 3 at $DIR/inline-cycle.rs:59:5: 59:12
-+         _6 = call::<fn() {f}>(f) -> bb1; // scope 3 at $DIR/inline-cycle.rs:59:5: 59:12
++         StorageLive(_3);                 // scope 1 at $DIR/inline_cycle.rs:54:5: 54:8
++         StorageLive(_4);                 // scope 1 at $DIR/inline_cycle.rs:54:5: 54:6
++         _4 = move _2;                    // scope 1 at $DIR/inline_cycle.rs:54:5: 54:6
++         StorageLive(_5);                 // scope 1 at $DIR/inline_cycle.rs:54:5: 54:8
++         StorageLive(_6);                 // scope 3 at $DIR/inline_cycle.rs:59:5: 59:12
++         _6 = call::<fn() {f}>(f) -> bb1; // scope 3 at $DIR/inline_cycle.rs:59:5: 59:12
 +                                          // mir::Constant
-+                                          // + span: $DIR/inline-cycle.rs:59:5: 59:9
++                                          // + span: $DIR/inline_cycle.rs:59:5: 59:9
                                            // + literal: Const { ty: fn(fn() {f}) {call::<fn() {f}>}, val: Value(<ZST>) }
                                            // mir::Constant
--                                          // + span: $DIR/inline-cycle.rs:49:10: 49:11
-+                                          // + span: $DIR/inline-cycle.rs:59:10: 59:11
+-                                          // + span: $DIR/inline_cycle.rs:49:10: 49:11
++                                          // + span: $DIR/inline_cycle.rs:59:10: 59:11
                                            // + literal: Const { ty: fn() {f}, val: Value(<ZST>) }
       }
   
       bb1: {
-+         StorageDead(_6);                 // scope 3 at $DIR/inline-cycle.rs:59:12: 59:13
-+         StorageDead(_5);                 // scope 1 at $DIR/inline-cycle.rs:54:7: 54:8
-+         StorageDead(_4);                 // scope 1 at $DIR/inline-cycle.rs:54:7: 54:8
-+         StorageDead(_3);                 // scope 1 at $DIR/inline-cycle.rs:54:8: 54:9
-+         StorageDead(_2);                 // scope 0 at $DIR/inline-cycle.rs:+1:5: +1:12
-          StorageDead(_1);                 // scope 0 at $DIR/inline-cycle.rs:+1:12: +1:13
-          _0 = const ();                   // scope 0 at $DIR/inline-cycle.rs:+0:10: +2:2
-          return;                          // scope 0 at $DIR/inline-cycle.rs:+2:2: +2:2
++         StorageDead(_6);                 // scope 3 at $DIR/inline_cycle.rs:59:12: 59:13
++         StorageDead(_5);                 // scope 1 at $DIR/inline_cycle.rs:54:7: 54:8
++         StorageDead(_4);                 // scope 1 at $DIR/inline_cycle.rs:54:7: 54:8
++         StorageDead(_3);                 // scope 1 at $DIR/inline_cycle.rs:54:8: 54:9
++         StorageDead(_2);                 // scope 0 at $DIR/inline_cycle.rs:+1:5: +1:12
+          StorageDead(_1);                 // scope 0 at $DIR/inline_cycle.rs:+1:12: +1:13
+          _0 = const ();                   // scope 0 at $DIR/inline_cycle.rs:+0:10: +2:2
+          return;                          // scope 0 at $DIR/inline_cycle.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff b/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff
index fc5d57ce8bf..52debab4dd1 100644
--- a/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff
+++ b/src/test/mir-opt/inline/inline_cycle_generic.main.Inline.diff
@@ -2,31 +2,31 @@
 + // MIR for `main` after Inline
   
   fn main() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-cycle-generic.rs:+0:11: +0:11
-      let _1: ();                          // in scope 0 at $DIR/inline-cycle-generic.rs:+1:5: +1:24
-+     scope 1 (inlined <C as Call>::call) { // at $DIR/inline-cycle-generic.rs:9:5: 9:24
-+         scope 2 (inlined <B<A> as Call>::call) { // at $DIR/inline-cycle-generic.rs:38:9: 38:31
-+             scope 3 (inlined <A as Call>::call) { // at $DIR/inline-cycle-generic.rs:31:9: 31:28
-+                 scope 4 (inlined <B<C> as Call>::call) { // at $DIR/inline-cycle-generic.rs:23:9: 23:31
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_cycle_generic.rs:+0:11: +0:11
+      let _1: ();                          // in scope 0 at $DIR/inline_cycle_generic.rs:+1:5: +1:24
++     scope 1 (inlined <C as Call>::call) { // at $DIR/inline_cycle_generic.rs:9:5: 9:24
++         scope 2 (inlined <B<A> as Call>::call) { // at $DIR/inline_cycle_generic.rs:38:9: 38:31
++             scope 3 (inlined <A as Call>::call) { // at $DIR/inline_cycle_generic.rs:31:9: 31:28
++                 scope 4 (inlined <B<C> as Call>::call) { // at $DIR/inline_cycle_generic.rs:23:9: 23:31
 +                 }
 +             }
 +         }
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-cycle-generic.rs:+1:5: +1:24
--         _1 = <C as Call>::call() -> bb1; // scope 0 at $DIR/inline-cycle-generic.rs:+1:5: +1:24
-+         _1 = <C as Call>::call() -> bb1; // scope 4 at $DIR/inline-cycle-generic.rs:31:9: 31:28
+          StorageLive(_1);                 // scope 0 at $DIR/inline_cycle_generic.rs:+1:5: +1:24
+-         _1 = <C as Call>::call() -> bb1; // scope 0 at $DIR/inline_cycle_generic.rs:+1:5: +1:24
++         _1 = <C as Call>::call() -> bb1; // scope 4 at $DIR/inline_cycle_generic.rs:31:9: 31:28
                                            // mir::Constant
--                                          // + span: $DIR/inline-cycle-generic.rs:9:5: 9:22
-+                                          // + span: $DIR/inline-cycle-generic.rs:31:9: 31:26
+-                                          // + span: $DIR/inline_cycle_generic.rs:9:5: 9:22
++                                          // + span: $DIR/inline_cycle_generic.rs:31:9: 31:26
                                            // + literal: Const { ty: fn() {<C as Call>::call}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_1);                 // scope 0 at $DIR/inline-cycle-generic.rs:+1:24: +1:25
-          _0 = const ();                   // scope 0 at $DIR/inline-cycle-generic.rs:+0:11: +2:2
-          return;                          // scope 0 at $DIR/inline-cycle-generic.rs:+2:2: +2:2
+          StorageDead(_1);                 // scope 0 at $DIR/inline_cycle_generic.rs:+1:24: +1:25
+          _0 = const ();                   // scope 0 at $DIR/inline_cycle_generic.rs:+0:11: +2:2
+          return;                          // scope 0 at $DIR/inline_cycle_generic.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline-cycle-generic.rs b/src/test/mir-opt/inline/inline_cycle_generic.rs
index 24b4f37939a..24b4f37939a 100644
--- a/src/test/mir-opt/inline/inline-cycle-generic.rs
+++ b/src/test/mir-opt/inline/inline_cycle_generic.rs
diff --git a/src/test/mir-opt/inline/inline_diverging.f.Inline.diff b/src/test/mir-opt/inline/inline_diverging.f.Inline.diff
index cef4cfc67ab..b49191f495b 100644
--- a/src/test/mir-opt/inline/inline_diverging.f.Inline.diff
+++ b/src/test/mir-opt/inline/inline_diverging.f.Inline.diff
@@ -2,23 +2,23 @@
 + // MIR for `f` after Inline
   
   fn f() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-diverging.rs:+0:12: +0:12
-      let mut _1: !;                       // in scope 0 at $DIR/inline-diverging.rs:+0:12: +2:2
-      let _2: !;                           // in scope 0 at $DIR/inline-diverging.rs:+1:5: +1:12
-+     scope 1 (inlined sleep) {            // at $DIR/inline-diverging.rs:8:5: 8:12
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_diverging.rs:+0:12: +0:12
+      let mut _1: !;                       // in scope 0 at $DIR/inline_diverging.rs:+0:12: +2:2
+      let _2: !;                           // in scope 0 at $DIR/inline_diverging.rs:+1:5: +1:12
++     scope 1 (inlined sleep) {            // at $DIR/inline_diverging.rs:8:5: 8:12
 +     }
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/inline-diverging.rs:+1:5: +1:12
--         _2 = sleep();                    // scope 0 at $DIR/inline-diverging.rs:+1:5: +1:12
+          StorageLive(_2);                 // scope 0 at $DIR/inline_diverging.rs:+1:5: +1:12
+-         _2 = sleep();                    // scope 0 at $DIR/inline_diverging.rs:+1:5: +1:12
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-diverging.rs:8:5: 8:10
+-                                          // + span: $DIR/inline_diverging.rs:8:5: 8:10
 -                                          // + literal: Const { ty: fn() -> ! {sleep}, val: Value(<ZST>) }
-+         goto -> bb1;                     // scope 0 at $DIR/inline-diverging.rs:+1:5: +1:12
++         goto -> bb1;                     // scope 0 at $DIR/inline_diverging.rs:+1:5: +1:12
 +     }
 + 
 +     bb1: {
-+         goto -> bb1;                     // scope 1 at $DIR/inline-diverging.rs:39:5: 39:12
++         goto -> bb1;                     // scope 1 at $DIR/inline_diverging.rs:39:5: 39:12
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline_diverging.g.Inline.diff b/src/test/mir-opt/inline/inline_diverging.g.Inline.diff
index a71baad3e3e..1e703a8fd2b 100644
--- a/src/test/mir-opt/inline/inline_diverging.g.Inline.diff
+++ b/src/test/mir-opt/inline/inline_diverging.g.Inline.diff
@@ -2,42 +2,42 @@
 + // MIR for `g` after Inline
   
   fn g(_1: i32) -> u32 {
-      debug i => _1;                       // in scope 0 at $DIR/inline-diverging.rs:+0:10: +0:11
-      let mut _0: u32;                     // return place in scope 0 at $DIR/inline-diverging.rs:+0:21: +0:24
-      let mut _2: bool;                    // in scope 0 at $DIR/inline-diverging.rs:+1:8: +1:13
-      let mut _3: i32;                     // in scope 0 at $DIR/inline-diverging.rs:+1:8: +1:9
-      let mut _4: i32;                     // in scope 0 at $DIR/inline-diverging.rs:+2:9: +2:10
-      let mut _5: !;                       // in scope 0 at $DIR/inline-diverging.rs:+3:12: +5:6
-      let _6: !;                           // in scope 0 at $DIR/inline-diverging.rs:+4:9: +4:16
-+     scope 1 (inlined panic) {            // at $DIR/inline-diverging.rs:16:9: 16:16
+      debug i => _1;                       // in scope 0 at $DIR/inline_diverging.rs:+0:10: +0:11
+      let mut _0: u32;                     // return place in scope 0 at $DIR/inline_diverging.rs:+0:21: +0:24
+      let mut _2: bool;                    // in scope 0 at $DIR/inline_diverging.rs:+1:8: +1:13
+      let mut _3: i32;                     // in scope 0 at $DIR/inline_diverging.rs:+1:8: +1:9
+      let mut _4: i32;                     // in scope 0 at $DIR/inline_diverging.rs:+2:9: +2:10
+      let mut _5: !;                       // in scope 0 at $DIR/inline_diverging.rs:+3:12: +5:6
+      let _6: !;                           // in scope 0 at $DIR/inline_diverging.rs:+4:9: +4:16
++     scope 1 (inlined panic) {            // at $DIR/inline_diverging.rs:16:9: 16:16
 +         let mut _7: !;                   // in scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL
 +     }
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/inline-diverging.rs:+1:8: +1:13
-          StorageLive(_3);                 // scope 0 at $DIR/inline-diverging.rs:+1:8: +1:9
-          _3 = _1;                         // scope 0 at $DIR/inline-diverging.rs:+1:8: +1:9
-          _2 = Gt(move _3, const 0_i32);   // scope 0 at $DIR/inline-diverging.rs:+1:8: +1:13
-          StorageDead(_3);                 // scope 0 at $DIR/inline-diverging.rs:+1:12: +1:13
-          switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/inline-diverging.rs:+1:8: +1:13
+          StorageLive(_2);                 // scope 0 at $DIR/inline_diverging.rs:+1:8: +1:13
+          StorageLive(_3);                 // scope 0 at $DIR/inline_diverging.rs:+1:8: +1:9
+          _3 = _1;                         // scope 0 at $DIR/inline_diverging.rs:+1:8: +1:9
+          _2 = Gt(move _3, const 0_i32);   // scope 0 at $DIR/inline_diverging.rs:+1:8: +1:13
+          StorageDead(_3);                 // scope 0 at $DIR/inline_diverging.rs:+1:12: +1:13
+          switchInt(move _2) -> [false: bb2, otherwise: bb1]; // scope 0 at $DIR/inline_diverging.rs:+1:8: +1:13
       }
   
       bb1: {
-          StorageLive(_4);                 // scope 0 at $DIR/inline-diverging.rs:+2:9: +2:10
-          _4 = _1;                         // scope 0 at $DIR/inline-diverging.rs:+2:9: +2:10
-          _0 = move _4 as u32 (IntToInt);  // scope 0 at $DIR/inline-diverging.rs:+2:9: +2:17
-          StorageDead(_4);                 // scope 0 at $DIR/inline-diverging.rs:+2:16: +2:17
-          StorageDead(_2);                 // scope 0 at $DIR/inline-diverging.rs:+5:5: +5:6
-          return;                          // scope 0 at $DIR/inline-diverging.rs:+6:2: +6:2
+          StorageLive(_4);                 // scope 0 at $DIR/inline_diverging.rs:+2:9: +2:10
+          _4 = _1;                         // scope 0 at $DIR/inline_diverging.rs:+2:9: +2:10
+          _0 = move _4 as u32 (IntToInt);  // scope 0 at $DIR/inline_diverging.rs:+2:9: +2:17
+          StorageDead(_4);                 // scope 0 at $DIR/inline_diverging.rs:+2:16: +2:17
+          StorageDead(_2);                 // scope 0 at $DIR/inline_diverging.rs:+5:5: +5:6
+          return;                          // scope 0 at $DIR/inline_diverging.rs:+6:2: +6:2
       }
   
       bb2: {
-          StorageLive(_6);                 // scope 0 at $DIR/inline-diverging.rs:+4:9: +4:16
--         _6 = panic();                    // scope 0 at $DIR/inline-diverging.rs:+4:9: +4:16
+          StorageLive(_6);                 // scope 0 at $DIR/inline_diverging.rs:+4:9: +4:16
+-         _6 = panic();                    // scope 0 at $DIR/inline_diverging.rs:+4:9: +4:16
 +         StorageLive(_7);                 // scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL
 +         _7 = begin_panic::<&str>(const "explicit panic"); // scope 1 at $SRC_DIR/std/src/panic.rs:LL:COL
                                            // mir::Constant
--                                          // + span: $DIR/inline-diverging.rs:16:9: 16:14
+-                                          // + span: $DIR/inline_diverging.rs:16:9: 16:14
 -                                          // + literal: Const { ty: fn() -> ! {panic}, val: Value(<ZST>) }
 +                                          // + span: $SRC_DIR/std/src/panic.rs:LL:COL
 +                                          // + literal: Const { ty: fn(&str) -> ! {begin_panic::<&str>}, val: Value(<ZST>) }
diff --git a/src/test/mir-opt/inline/inline_diverging.h.Inline.diff b/src/test/mir-opt/inline/inline_diverging.h.Inline.diff
index 6569ab24c38..152153a813c 100644
--- a/src/test/mir-opt/inline/inline_diverging.h.Inline.diff
+++ b/src/test/mir-opt/inline/inline_diverging.h.Inline.diff
@@ -2,55 +2,55 @@
 + // MIR for `h` after Inline
   
   fn h() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-diverging.rs:+0:12: +0:12
-      let _1: (!, !);                      // in scope 0 at $DIR/inline-diverging.rs:+1:5: +1:22
-+     let mut _2: fn() -> ! {sleep};       // in scope 0 at $DIR/inline-diverging.rs:+1:5: +1:22
-+     scope 1 (inlined call_twice::<!, fn() -> ! {sleep}>) { // at $DIR/inline-diverging.rs:22:5: 22:22
-+         debug f => _2;                   // in scope 1 at $DIR/inline-diverging.rs:26:36: 26:37
-+         let _3: !;                       // in scope 1 at $DIR/inline-diverging.rs:27:9: 27:10
-+         let mut _4: &fn() -> ! {sleep};  // in scope 1 at $DIR/inline-diverging.rs:27:13: 27:14
-+         let mut _5: ();                  // in scope 1 at $DIR/inline-diverging.rs:27:13: 27:16
-+         let mut _7: &fn() -> ! {sleep};  // in scope 1 at $DIR/inline-diverging.rs:28:13: 28:14
-+         let mut _8: ();                  // in scope 1 at $DIR/inline-diverging.rs:28:13: 28:16
-+         let mut _9: !;                   // in scope 1 at $DIR/inline-diverging.rs:29:6: 29:7
-+         let mut _10: !;                  // in scope 1 at $DIR/inline-diverging.rs:29:9: 29:10
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_diverging.rs:+0:12: +0:12
+      let _1: (!, !);                      // in scope 0 at $DIR/inline_diverging.rs:+1:5: +1:22
++     let mut _2: fn() -> ! {sleep};       // in scope 0 at $DIR/inline_diverging.rs:+1:5: +1:22
++     scope 1 (inlined call_twice::<!, fn() -> ! {sleep}>) { // at $DIR/inline_diverging.rs:22:5: 22:22
++         debug f => _2;                   // in scope 1 at $DIR/inline_diverging.rs:26:36: 26:37
++         let _3: !;                       // in scope 1 at $DIR/inline_diverging.rs:27:9: 27:10
++         let mut _4: &fn() -> ! {sleep};  // in scope 1 at $DIR/inline_diverging.rs:27:13: 27:14
++         let mut _5: ();                  // in scope 1 at $DIR/inline_diverging.rs:27:13: 27:16
++         let mut _7: &fn() -> ! {sleep};  // in scope 1 at $DIR/inline_diverging.rs:28:13: 28:14
++         let mut _8: ();                  // in scope 1 at $DIR/inline_diverging.rs:28:13: 28:16
++         let mut _9: !;                   // in scope 1 at $DIR/inline_diverging.rs:29:6: 29:7
++         let mut _10: !;                  // in scope 1 at $DIR/inline_diverging.rs:29:9: 29:10
 +         scope 2 {
-+             debug a => _3;               // in scope 2 at $DIR/inline-diverging.rs:27:9: 27:10
-+             let _6: !;                   // in scope 2 at $DIR/inline-diverging.rs:28:9: 28:10
++             debug a => _3;               // in scope 2 at $DIR/inline_diverging.rs:27:9: 27:10
++             let _6: !;                   // in scope 2 at $DIR/inline_diverging.rs:28:9: 28:10
 +             scope 3 {
-+                 debug b => _6;           // in scope 3 at $DIR/inline-diverging.rs:28:9: 28:10
++                 debug b => _6;           // in scope 3 at $DIR/inline_diverging.rs:28:9: 28:10
 +             }
-+             scope 6 (inlined <fn() -> ! {sleep} as Fn<()>>::call - shim(fn() -> ! {sleep})) { // at $DIR/inline-diverging.rs:28:13: 28:16
++             scope 6 (inlined <fn() -> ! {sleep} as Fn<()>>::call - shim(fn() -> ! {sleep})) { // at $DIR/inline_diverging.rs:28:13: 28:16
 +                 scope 7 (inlined sleep) { // at $SRC_DIR/core/src/ops/function.rs:LL:COL
 +                 }
 +             }
 +         }
-+         scope 4 (inlined <fn() -> ! {sleep} as Fn<()>>::call - shim(fn() -> ! {sleep})) { // at $DIR/inline-diverging.rs:27:13: 27:16
++         scope 4 (inlined <fn() -> ! {sleep} as Fn<()>>::call - shim(fn() -> ! {sleep})) { // at $DIR/inline_diverging.rs:27:13: 27:16
 +             scope 5 (inlined sleep) {    // at $SRC_DIR/core/src/ops/function.rs:LL:COL
 +             }
 +         }
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-diverging.rs:+1:5: +1:22
--         _1 = call_twice::<!, fn() -> ! {sleep}>(sleep); // scope 0 at $DIR/inline-diverging.rs:+1:5: +1:22
-+         StorageLive(_2);                 // scope 0 at $DIR/inline-diverging.rs:+1:5: +1:22
-+         _2 = sleep;                      // scope 0 at $DIR/inline-diverging.rs:+1:5: +1:22
+          StorageLive(_1);                 // scope 0 at $DIR/inline_diverging.rs:+1:5: +1:22
+-         _1 = call_twice::<!, fn() -> ! {sleep}>(sleep); // scope 0 at $DIR/inline_diverging.rs:+1:5: +1:22
++         StorageLive(_2);                 // scope 0 at $DIR/inline_diverging.rs:+1:5: +1:22
++         _2 = sleep;                      // scope 0 at $DIR/inline_diverging.rs:+1:5: +1:22
                                            // mir::Constant
--                                          // + span: $DIR/inline-diverging.rs:22:5: 22:15
+-                                          // + span: $DIR/inline_diverging.rs:22:5: 22:15
 -                                          // + literal: Const { ty: fn(fn() -> ! {sleep}) -> (!, !) {call_twice::<!, fn() -> ! {sleep}>}, val: Value(<ZST>) }
 -                                          // mir::Constant
-                                           // + span: $DIR/inline-diverging.rs:22:16: 22:21
+                                           // + span: $DIR/inline_diverging.rs:22:16: 22:21
                                            // + literal: Const { ty: fn() -> ! {sleep}, val: Value(<ZST>) }
-+         StorageLive(_3);                 // scope 1 at $DIR/inline-diverging.rs:27:9: 27:10
-+         StorageLive(_4);                 // scope 1 at $DIR/inline-diverging.rs:27:13: 27:14
-+         _4 = &_2;                        // scope 1 at $DIR/inline-diverging.rs:27:13: 27:14
-+         StorageLive(_5);                 // scope 1 at $DIR/inline-diverging.rs:27:13: 27:16
-+         goto -> bb1;                     // scope 5 at $DIR/inline-diverging.rs:39:5: 39:12
++         StorageLive(_3);                 // scope 1 at $DIR/inline_diverging.rs:27:9: 27:10
++         StorageLive(_4);                 // scope 1 at $DIR/inline_diverging.rs:27:13: 27:14
++         _4 = &_2;                        // scope 1 at $DIR/inline_diverging.rs:27:13: 27:14
++         StorageLive(_5);                 // scope 1 at $DIR/inline_diverging.rs:27:13: 27:16
++         goto -> bb1;                     // scope 5 at $DIR/inline_diverging.rs:39:5: 39:12
 +     }
 + 
 +     bb1: {
-+         goto -> bb1;                     // scope 5 at $DIR/inline-diverging.rs:39:5: 39:12
++         goto -> bb1;                     // scope 5 at $DIR/inline_diverging.rs:39:5: 39:12
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline-diverging.rs b/src/test/mir-opt/inline/inline_diverging.rs
index ae6f814c290..ae6f814c290 100644
--- a/src/test/mir-opt/inline/inline-diverging.rs
+++ b/src/test/mir-opt/inline/inline_diverging.rs
diff --git a/src/test/mir-opt/inline/inline_generator.main.Inline.diff b/src/test/mir-opt/inline/inline_generator.main.Inline.diff
index 3fd8aad7238..26202f2f40d 100644
--- a/src/test/mir-opt/inline/inline_generator.main.Inline.diff
+++ b/src/test/mir-opt/inline/inline_generator.main.Inline.diff
@@ -2,59 +2,59 @@
 + // MIR for `main` after Inline
   
   fn main() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-generator.rs:+0:11: +0:11
-      let _1: std::ops::GeneratorState<i32, bool>; // in scope 0 at $DIR/inline-generator.rs:+1:9: +1:11
-      let mut _2: std::pin::Pin<&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>; // in scope 0 at $DIR/inline-generator.rs:+1:14: +1:32
-      let mut _3: &mut [generator@$DIR/inline-generator.rs:15:5: 15:8]; // in scope 0 at $DIR/inline-generator.rs:+1:23: +1:31
-      let mut _4: [generator@$DIR/inline-generator.rs:15:5: 15:8]; // in scope 0 at $DIR/inline-generator.rs:+1:28: +1:31
-+     let mut _7: bool;                    // in scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_generator.rs:+0:11: +0:11
+      let _1: std::ops::GeneratorState<i32, bool>; // in scope 0 at $DIR/inline_generator.rs:+1:9: +1:11
+      let mut _2: std::pin::Pin<&mut [generator@$DIR/inline_generator.rs:15:5: 15:8]>; // in scope 0 at $DIR/inline_generator.rs:+1:14: +1:32
+      let mut _3: &mut [generator@$DIR/inline_generator.rs:15:5: 15:8]; // in scope 0 at $DIR/inline_generator.rs:+1:23: +1:31
+      let mut _4: [generator@$DIR/inline_generator.rs:15:5: 15:8]; // in scope 0 at $DIR/inline_generator.rs:+1:28: +1:31
++     let mut _7: bool;                    // in scope 0 at $DIR/inline_generator.rs:+1:14: +1:46
       scope 1 {
-          debug _r => _1;                  // in scope 1 at $DIR/inline-generator.rs:+1:9: +1:11
+          debug _r => _1;                  // in scope 1 at $DIR/inline_generator.rs:+1:9: +1:11
       }
-+     scope 2 (inlined g) {                // at $DIR/inline-generator.rs:9:28: 9:31
++     scope 2 (inlined g) {                // at $DIR/inline_generator.rs:9:28: 9:31
 +     }
-+     scope 3 (inlined Pin::<&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>::new) { // at $DIR/inline-generator.rs:9:14: 9:32
++     scope 3 (inlined Pin::<&mut [generator@$DIR/inline_generator.rs:15:5: 15:8]>::new) { // at $DIR/inline_generator.rs:9:14: 9:32
 +         debug pointer => _3;             // in scope 3 at $SRC_DIR/core/src/pin.rs:LL:COL
-+         let mut _5: &mut [generator@$DIR/inline-generator.rs:15:5: 15:8]; // in scope 3 at $SRC_DIR/core/src/pin.rs:LL:COL
++         let mut _5: &mut [generator@$DIR/inline_generator.rs:15:5: 15:8]; // in scope 3 at $SRC_DIR/core/src/pin.rs:LL:COL
 +         scope 4 {
-+             scope 5 (inlined Pin::<&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>::new_unchecked) { // at $SRC_DIR/core/src/pin.rs:LL:COL
++             scope 5 (inlined Pin::<&mut [generator@$DIR/inline_generator.rs:15:5: 15:8]>::new_unchecked) { // at $SRC_DIR/core/src/pin.rs:LL:COL
 +                 debug pointer => _5;     // in scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
-+                 let mut _6: &mut [generator@$DIR/inline-generator.rs:15:5: 15:8]; // in scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
++                 let mut _6: &mut [generator@$DIR/inline_generator.rs:15:5: 15:8]; // in scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
 +             }
 +         }
 +     }
-+     scope 6 (inlined g::{closure#0}) {   // at $DIR/inline-generator.rs:9:14: 9:46
-+         debug a => _11;                  // in scope 6 at $DIR/inline-generator.rs:15:6: 15:7
-+         let mut _8: i32;                 // in scope 6 at $DIR/inline-generator.rs:15:17: 15:39
-+         let mut _9: bool;                // in scope 6 at $DIR/inline-generator.rs:15:20: 15:21
-+         let mut _10: bool;               // in scope 6 at $DIR/inline-generator.rs:15:9: 15:9
-+         let _11: bool;                   // in scope 6 at $DIR/inline-generator.rs:15:6: 15:7
-+         let mut _12: u32;                // in scope 6 at $DIR/inline-generator.rs:15:5: 15:41
-+         let mut _13: &mut [generator@$DIR/inline-generator.rs:15:5: 15:8]; // in scope 6 at $DIR/inline-generator.rs:15:5: 15:41
-+         let mut _14: &mut [generator@$DIR/inline-generator.rs:15:5: 15:8]; // in scope 6 at $DIR/inline-generator.rs:15:5: 15:41
-+         let mut _15: &mut [generator@$DIR/inline-generator.rs:15:5: 15:8]; // in scope 6 at $DIR/inline-generator.rs:15:5: 15:41
++     scope 6 (inlined g::{closure#0}) {   // at $DIR/inline_generator.rs:9:14: 9:46
++         debug a => _11;                  // in scope 6 at $DIR/inline_generator.rs:15:6: 15:7
++         let mut _8: i32;                 // in scope 6 at $DIR/inline_generator.rs:15:17: 15:39
++         let mut _9: bool;                // in scope 6 at $DIR/inline_generator.rs:15:20: 15:21
++         let mut _10: bool;               // in scope 6 at $DIR/inline_generator.rs:15:9: 15:9
++         let _11: bool;                   // in scope 6 at $DIR/inline_generator.rs:15:6: 15:7
++         let mut _12: u32;                // in scope 6 at $DIR/inline_generator.rs:15:5: 15:41
++         let mut _13: &mut [generator@$DIR/inline_generator.rs:15:5: 15:8]; // in scope 6 at $DIR/inline_generator.rs:15:5: 15:41
++         let mut _14: &mut [generator@$DIR/inline_generator.rs:15:5: 15:8]; // in scope 6 at $DIR/inline_generator.rs:15:5: 15:41
++         let mut _15: &mut [generator@$DIR/inline_generator.rs:15:5: 15:8]; // in scope 6 at $DIR/inline_generator.rs:15:5: 15:41
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-generator.rs:+1:9: +1:11
-          StorageLive(_2);                 // scope 0 at $DIR/inline-generator.rs:+1:14: +1:32
-          StorageLive(_3);                 // scope 0 at $DIR/inline-generator.rs:+1:23: +1:31
-          StorageLive(_4);                 // scope 0 at $DIR/inline-generator.rs:+1:28: +1:31
--         _4 = g() -> bb1;                 // scope 0 at $DIR/inline-generator.rs:+1:28: +1:31
+          StorageLive(_1);                 // scope 0 at $DIR/inline_generator.rs:+1:9: +1:11
+          StorageLive(_2);                 // scope 0 at $DIR/inline_generator.rs:+1:14: +1:32
+          StorageLive(_3);                 // scope 0 at $DIR/inline_generator.rs:+1:23: +1:31
+          StorageLive(_4);                 // scope 0 at $DIR/inline_generator.rs:+1:28: +1:31
+-         _4 = g() -> bb1;                 // scope 0 at $DIR/inline_generator.rs:+1:28: +1:31
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-generator.rs:9:28: 9:29
+-                                          // + span: $DIR/inline_generator.rs:9:28: 9:29
 -                                          // + literal: Const { ty: fn() -> impl Generator<bool> {g}, val: Value(<ZST>) }
 -     }
 - 
 -     bb1: {
-+         Deinit(_4);                      // scope 2 at $DIR/inline-generator.rs:15:5: 15:41
-+         discriminant(_4) = 0;            // scope 2 at $DIR/inline-generator.rs:15:5: 15:41
-          _3 = &mut _4;                    // scope 0 at $DIR/inline-generator.rs:+1:23: +1:31
--         _2 = Pin::<&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>::new(move _3) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline-generator.rs:+1:14: +1:32
++         Deinit(_4);                      // scope 2 at $DIR/inline_generator.rs:15:5: 15:41
++         discriminant(_4) = 0;            // scope 2 at $DIR/inline_generator.rs:15:5: 15:41
+          _3 = &mut _4;                    // scope 0 at $DIR/inline_generator.rs:+1:23: +1:31
+-         _2 = Pin::<&mut [generator@$DIR/inline_generator.rs:15:5: 15:8]>::new(move _3) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/inline_generator.rs:+1:14: +1:32
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-generator.rs:9:14: 9:22
+-                                          // + span: $DIR/inline_generator.rs:9:14: 9:22
 -                                          // + user_ty: UserType(0)
--                                          // + literal: Const { ty: fn(&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]) -> Pin<&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]> {Pin::<&mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>::new}, val: Value(<ZST>) }
+-                                          // + literal: Const { ty: fn(&mut [generator@$DIR/inline_generator.rs:15:5: 15:8]) -> Pin<&mut [generator@$DIR/inline_generator.rs:15:5: 15:8]> {Pin::<&mut [generator@$DIR/inline_generator.rs:15:5: 15:8]>::new}, val: Value(<ZST>) }
 -     }
 - 
 -     bb2: {
@@ -63,86 +63,86 @@
 +         StorageLive(_6);                 // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
 +         _6 = move _5;                    // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
 +         Deinit(_2);                      // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
-+         (_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:8]) = move _6; // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
++         (_2.0: &mut [generator@$DIR/inline_generator.rs:15:5: 15:8]) = move _6; // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
 +         StorageDead(_6);                 // scope 5 at $SRC_DIR/core/src/pin.rs:LL:COL
 +         StorageDead(_5);                 // scope 4 at $SRC_DIR/core/src/pin.rs:LL:COL
-          StorageDead(_3);                 // scope 0 at $DIR/inline-generator.rs:+1:31: +1:32
--         _1 = <[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
+          StorageDead(_3);                 // scope 0 at $DIR/inline_generator.rs:+1:31: +1:32
+-         _1 = <[generator@$DIR/inline_generator.rs:15:5: 15:8] as Generator<bool>>::resume(move _2, const false) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/inline_generator.rs:+1:14: +1:46
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-generator.rs:9:33: 9:39
--                                          // + literal: Const { ty: for<'a> fn(Pin<&'a mut [generator@$DIR/inline-generator.rs:15:5: 15:8]>, bool) -> GeneratorState<<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::Yield, <[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::Return> {<[generator@$DIR/inline-generator.rs:15:5: 15:8] as Generator<bool>>::resume}, val: Value(<ZST>) }
-+         StorageLive(_7);                 // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
-+         _7 = const false;                // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
-+         StorageLive(_10);                // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
-+         StorageLive(_11);                // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
-+         _13 = deref_copy (_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:8]); // scope 6 at $DIR/inline-generator.rs:15:5: 15:41
-+         _12 = discriminant((*_13));      // scope 6 at $DIR/inline-generator.rs:15:5: 15:41
-+         switchInt(move _12) -> [0_u32: bb3, 1_u32: bb8, 3_u32: bb7, otherwise: bb9]; // scope 6 at $DIR/inline-generator.rs:15:5: 15:41
+-                                          // + span: $DIR/inline_generator.rs:9:33: 9:39
+-                                          // + literal: Const { ty: for<'a> fn(Pin<&'a mut [generator@$DIR/inline_generator.rs:15:5: 15:8]>, bool) -> GeneratorState<<[generator@$DIR/inline_generator.rs:15:5: 15:8] as Generator<bool>>::Yield, <[generator@$DIR/inline_generator.rs:15:5: 15:8] as Generator<bool>>::Return> {<[generator@$DIR/inline_generator.rs:15:5: 15:8] as Generator<bool>>::resume}, val: Value(<ZST>) }
++         StorageLive(_7);                 // scope 0 at $DIR/inline_generator.rs:+1:14: +1:46
++         _7 = const false;                // scope 0 at $DIR/inline_generator.rs:+1:14: +1:46
++         StorageLive(_10);                // scope 0 at $DIR/inline_generator.rs:+1:14: +1:46
++         StorageLive(_11);                // scope 0 at $DIR/inline_generator.rs:+1:14: +1:46
++         _13 = deref_copy (_2.0: &mut [generator@$DIR/inline_generator.rs:15:5: 15:8]); // scope 6 at $DIR/inline_generator.rs:15:5: 15:41
++         _12 = discriminant((*_13));      // scope 6 at $DIR/inline_generator.rs:15:5: 15:41
++         switchInt(move _12) -> [0_u32: bb3, 1_u32: bb8, 3_u32: bb7, otherwise: bb9]; // scope 6 at $DIR/inline_generator.rs:15:5: 15:41
       }
   
 -     bb3: {
 +     bb1: {
-+         StorageDead(_11);                // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
-+         StorageDead(_10);                // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
-+         StorageDead(_7);                 // scope 0 at $DIR/inline-generator.rs:+1:14: +1:46
-          StorageDead(_2);                 // scope 0 at $DIR/inline-generator.rs:+1:45: +1:46
-          StorageDead(_4);                 // scope 0 at $DIR/inline-generator.rs:+1:46: +1:47
-          _0 = const ();                   // scope 0 at $DIR/inline-generator.rs:+0:11: +2:2
-          StorageDead(_1);                 // scope 0 at $DIR/inline-generator.rs:+2:1: +2:2
-          return;                          // scope 0 at $DIR/inline-generator.rs:+2:2: +2:2
++         StorageDead(_11);                // scope 0 at $DIR/inline_generator.rs:+1:14: +1:46
++         StorageDead(_10);                // scope 0 at $DIR/inline_generator.rs:+1:14: +1:46
++         StorageDead(_7);                 // scope 0 at $DIR/inline_generator.rs:+1:14: +1:46
+          StorageDead(_2);                 // scope 0 at $DIR/inline_generator.rs:+1:45: +1:46
+          StorageDead(_4);                 // scope 0 at $DIR/inline_generator.rs:+1:46: +1:47
+          _0 = const ();                   // scope 0 at $DIR/inline_generator.rs:+0:11: +2:2
+          StorageDead(_1);                 // scope 0 at $DIR/inline_generator.rs:+2:1: +2:2
+          return;                          // scope 0 at $DIR/inline_generator.rs:+2:2: +2:2
       }
   
 -     bb4 (cleanup): {
 +     bb2 (cleanup): {
-          resume;                          // scope 0 at $DIR/inline-generator.rs:+0:1: +2:2
+          resume;                          // scope 0 at $DIR/inline_generator.rs:+0:1: +2:2
 +     }
 + 
 +     bb3: {
-+         _11 = move _7;                   // scope 6 at $DIR/inline-generator.rs:15:5: 15:41
-+         StorageLive(_8);                 // scope 6 at $DIR/inline-generator.rs:15:17: 15:39
-+         StorageLive(_9);                 // scope 6 at $DIR/inline-generator.rs:15:20: 15:21
-+         _9 = _11;                        // scope 6 at $DIR/inline-generator.rs:15:20: 15:21
-+         switchInt(move _9) -> [false: bb5, otherwise: bb4]; // scope 6 at $DIR/inline-generator.rs:15:20: 15:21
++         _11 = move _7;                   // scope 6 at $DIR/inline_generator.rs:15:5: 15:41
++         StorageLive(_8);                 // scope 6 at $DIR/inline_generator.rs:15:17: 15:39
++         StorageLive(_9);                 // scope 6 at $DIR/inline_generator.rs:15:20: 15:21
++         _9 = _11;                        // scope 6 at $DIR/inline_generator.rs:15:20: 15:21
++         switchInt(move _9) -> [false: bb5, otherwise: bb4]; // scope 6 at $DIR/inline_generator.rs:15:20: 15:21
 +     }
 + 
 +     bb4: {
-+         _8 = const 7_i32;                // scope 6 at $DIR/inline-generator.rs:15:24: 15:25
-+         goto -> bb6;                     // scope 6 at $DIR/inline-generator.rs:15:17: 15:39
++         _8 = const 7_i32;                // scope 6 at $DIR/inline_generator.rs:15:24: 15:25
++         goto -> bb6;                     // scope 6 at $DIR/inline_generator.rs:15:17: 15:39
 +     }
 + 
 +     bb5: {
-+         _8 = const 13_i32;               // scope 6 at $DIR/inline-generator.rs:15:35: 15:37
-+         goto -> bb6;                     // scope 6 at $DIR/inline-generator.rs:15:17: 15:39
++         _8 = const 13_i32;               // scope 6 at $DIR/inline_generator.rs:15:35: 15:37
++         goto -> bb6;                     // scope 6 at $DIR/inline_generator.rs:15:17: 15:39
 +     }
 + 
 +     bb6: {
-+         StorageDead(_9);                 // scope 6 at $DIR/inline-generator.rs:15:38: 15:39
-+         Deinit(_1);                      // scope 6 at $DIR/inline-generator.rs:15:11: 15:39
-+         ((_1 as Yielded).0: i32) = move _8; // scope 6 at $DIR/inline-generator.rs:15:11: 15:39
-+         discriminant(_1) = 0;            // scope 6 at $DIR/inline-generator.rs:15:11: 15:39
-+         _14 = deref_copy (_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:8]); // scope 6 at $DIR/inline-generator.rs:15:11: 15:39
-+         discriminant((*_14)) = 3;        // scope 6 at $DIR/inline-generator.rs:15:11: 15:39
-+         goto -> bb1;                     // scope 0 at $DIR/inline-generator.rs:15:11: 15:39
++         StorageDead(_9);                 // scope 6 at $DIR/inline_generator.rs:15:38: 15:39
++         Deinit(_1);                      // scope 6 at $DIR/inline_generator.rs:15:11: 15:39
++         ((_1 as Yielded).0: i32) = move _8; // scope 6 at $DIR/inline_generator.rs:15:11: 15:39
++         discriminant(_1) = 0;            // scope 6 at $DIR/inline_generator.rs:15:11: 15:39
++         _14 = deref_copy (_2.0: &mut [generator@$DIR/inline_generator.rs:15:5: 15:8]); // scope 6 at $DIR/inline_generator.rs:15:11: 15:39
++         discriminant((*_14)) = 3;        // scope 6 at $DIR/inline_generator.rs:15:11: 15:39
++         goto -> bb1;                     // scope 0 at $DIR/inline_generator.rs:15:11: 15:39
 +     }
 + 
 +     bb7: {
-+         StorageLive(_8);                 // scope 6 at $DIR/inline-generator.rs:15:5: 15:41
-+         _10 = move _7;                   // scope 6 at $DIR/inline-generator.rs:15:5: 15:41
-+         StorageDead(_8);                 // scope 6 at $DIR/inline-generator.rs:15:38: 15:39
-+         Deinit(_1);                      // scope 6 at $DIR/inline-generator.rs:15:41: 15:41
-+         ((_1 as Complete).0: bool) = move _10; // scope 6 at $DIR/inline-generator.rs:15:41: 15:41
-+         discriminant(_1) = 1;            // scope 6 at $DIR/inline-generator.rs:15:41: 15:41
-+         _15 = deref_copy (_2.0: &mut [generator@$DIR/inline-generator.rs:15:5: 15:8]); // scope 6 at $DIR/inline-generator.rs:15:41: 15:41
-+         discriminant((*_15)) = 1;        // scope 6 at $DIR/inline-generator.rs:15:41: 15:41
-+         goto -> bb1;                     // scope 0 at $DIR/inline-generator.rs:15:41: 15:41
++         StorageLive(_8);                 // scope 6 at $DIR/inline_generator.rs:15:5: 15:41
++         _10 = move _7;                   // scope 6 at $DIR/inline_generator.rs:15:5: 15:41
++         StorageDead(_8);                 // scope 6 at $DIR/inline_generator.rs:15:38: 15:39
++         Deinit(_1);                      // scope 6 at $DIR/inline_generator.rs:15:41: 15:41
++         ((_1 as Complete).0: bool) = move _10; // scope 6 at $DIR/inline_generator.rs:15:41: 15:41
++         discriminant(_1) = 1;            // scope 6 at $DIR/inline_generator.rs:15:41: 15:41
++         _15 = deref_copy (_2.0: &mut [generator@$DIR/inline_generator.rs:15:5: 15:8]); // scope 6 at $DIR/inline_generator.rs:15:41: 15:41
++         discriminant((*_15)) = 1;        // scope 6 at $DIR/inline_generator.rs:15:41: 15:41
++         goto -> bb1;                     // scope 0 at $DIR/inline_generator.rs:15:41: 15:41
 +     }
 + 
 +     bb8: {
-+         assert(const false, "generator resumed after completion") -> [success: bb8, unwind: bb2]; // scope 6 at $DIR/inline-generator.rs:15:5: 15:41
++         assert(const false, "generator resumed after completion") -> [success: bb8, unwind: bb2]; // scope 6 at $DIR/inline_generator.rs:15:5: 15:41
 +     }
 + 
 +     bb9: {
-+         unreachable;                     // scope 6 at $DIR/inline-generator.rs:15:5: 15:41
++         unreachable;                     // scope 6 at $DIR/inline_generator.rs:15:5: 15:41
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline-generator.rs b/src/test/mir-opt/inline/inline_generator.rs
index d11b3e548f7..d11b3e548f7 100644
--- a/src/test/mir-opt/inline/inline-generator.rs
+++ b/src/test/mir-opt/inline/inline_generator.rs
diff --git a/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff b/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff
index 076509df349..e421428dcdf 100644
--- a/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff
+++ b/src/test/mir-opt/inline/inline_instruction_set.default.Inline.diff
@@ -2,43 +2,43 @@
 + // MIR for `default` after Inline
   
   fn default() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-instruction-set.rs:+0:18: +0:18
-      let _1: ();                          // in scope 0 at $DIR/inline-instruction-set.rs:+1:5: +1:26
-      let _2: ();                          // in scope 0 at $DIR/inline-instruction-set.rs:+2:5: +2:26
-      let _3: ();                          // in scope 0 at $DIR/inline-instruction-set.rs:+3:5: +3:30
-+     scope 1 (inlined instruction_set_default) { // at $DIR/inline-instruction-set.rs:53:5: 53:30
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_instruction_set.rs:+0:18: +0:18
+      let _1: ();                          // in scope 0 at $DIR/inline_instruction_set.rs:+1:5: +1:26
+      let _2: ();                          // in scope 0 at $DIR/inline_instruction_set.rs:+2:5: +2:26
+      let _3: ();                          // in scope 0 at $DIR/inline_instruction_set.rs:+3:5: +3:30
++     scope 1 (inlined instruction_set_default) { // at $DIR/inline_instruction_set.rs:53:5: 53:30
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-instruction-set.rs:+1:5: +1:26
-          _1 = instruction_set_a32() -> bb1; // scope 0 at $DIR/inline-instruction-set.rs:+1:5: +1:26
+          StorageLive(_1);                 // scope 0 at $DIR/inline_instruction_set.rs:+1:5: +1:26
+          _1 = instruction_set_a32() -> bb1; // scope 0 at $DIR/inline_instruction_set.rs:+1:5: +1:26
                                            // mir::Constant
-                                           // + span: $DIR/inline-instruction-set.rs:51:5: 51:24
+                                           // + span: $DIR/inline_instruction_set.rs:51:5: 51:24
                                            // + literal: Const { ty: fn() {instruction_set_a32}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_1);                 // scope 0 at $DIR/inline-instruction-set.rs:+1:26: +1:27
-          StorageLive(_2);                 // scope 0 at $DIR/inline-instruction-set.rs:+2:5: +2:26
-          _2 = instruction_set_t32() -> bb2; // scope 0 at $DIR/inline-instruction-set.rs:+2:5: +2:26
+          StorageDead(_1);                 // scope 0 at $DIR/inline_instruction_set.rs:+1:26: +1:27
+          StorageLive(_2);                 // scope 0 at $DIR/inline_instruction_set.rs:+2:5: +2:26
+          _2 = instruction_set_t32() -> bb2; // scope 0 at $DIR/inline_instruction_set.rs:+2:5: +2:26
                                            // mir::Constant
-                                           // + span: $DIR/inline-instruction-set.rs:52:5: 52:24
+                                           // + span: $DIR/inline_instruction_set.rs:52:5: 52:24
                                            // + literal: Const { ty: fn() {instruction_set_t32}, val: Value(<ZST>) }
       }
   
       bb2: {
-          StorageDead(_2);                 // scope 0 at $DIR/inline-instruction-set.rs:+2:26: +2:27
-          StorageLive(_3);                 // scope 0 at $DIR/inline-instruction-set.rs:+3:5: +3:30
--         _3 = instruction_set_default() -> bb3; // scope 0 at $DIR/inline-instruction-set.rs:+3:5: +3:30
+          StorageDead(_2);                 // scope 0 at $DIR/inline_instruction_set.rs:+2:26: +2:27
+          StorageLive(_3);                 // scope 0 at $DIR/inline_instruction_set.rs:+3:5: +3:30
+-         _3 = instruction_set_default() -> bb3; // scope 0 at $DIR/inline_instruction_set.rs:+3:5: +3:30
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-instruction-set.rs:53:5: 53:28
+-                                          // + span: $DIR/inline_instruction_set.rs:53:5: 53:28
 -                                          // + literal: Const { ty: fn() {instruction_set_default}, val: Value(<ZST>) }
 -     }
 - 
 -     bb3: {
-          StorageDead(_3);                 // scope 0 at $DIR/inline-instruction-set.rs:+3:30: +3:31
-          _0 = const ();                   // scope 0 at $DIR/inline-instruction-set.rs:+0:18: +4:2
-          return;                          // scope 0 at $DIR/inline-instruction-set.rs:+4:2: +4:2
+          StorageDead(_3);                 // scope 0 at $DIR/inline_instruction_set.rs:+3:30: +3:31
+          _0 = const ();                   // scope 0 at $DIR/inline_instruction_set.rs:+0:18: +4:2
+          return;                          // scope 0 at $DIR/inline_instruction_set.rs:+4:2: +4:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline-instruction-set.rs b/src/test/mir-opt/inline/inline_instruction_set.rs
index be36ff50c7e..be36ff50c7e 100644
--- a/src/test/mir-opt/inline/inline-instruction-set.rs
+++ b/src/test/mir-opt/inline/inline_instruction_set.rs
diff --git a/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff b/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff
index b275d08e05f..1ea2b87e53a 100644
--- a/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff
+++ b/src/test/mir-opt/inline/inline_instruction_set.t32.Inline.diff
@@ -2,45 +2,45 @@
 + // MIR for `t32` after Inline
   
   fn t32() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-instruction-set.rs:+0:14: +0:14
-      let _1: ();                          // in scope 0 at $DIR/inline-instruction-set.rs:+1:5: +1:26
-      let _2: ();                          // in scope 0 at $DIR/inline-instruction-set.rs:+2:5: +2:26
-      let _3: ();                          // in scope 0 at $DIR/inline-instruction-set.rs:+5:5: +5:30
-+     scope 1 (inlined instruction_set_t32) { // at $DIR/inline-instruction-set.rs:43:5: 43:26
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_instruction_set.rs:+0:14: +0:14
+      let _1: ();                          // in scope 0 at $DIR/inline_instruction_set.rs:+1:5: +1:26
+      let _2: ();                          // in scope 0 at $DIR/inline_instruction_set.rs:+2:5: +2:26
+      let _3: ();                          // in scope 0 at $DIR/inline_instruction_set.rs:+5:5: +5:30
++     scope 1 (inlined instruction_set_t32) { // at $DIR/inline_instruction_set.rs:43:5: 43:26
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-instruction-set.rs:+1:5: +1:26
-          _1 = instruction_set_a32() -> bb1; // scope 0 at $DIR/inline-instruction-set.rs:+1:5: +1:26
+          StorageLive(_1);                 // scope 0 at $DIR/inline_instruction_set.rs:+1:5: +1:26
+          _1 = instruction_set_a32() -> bb1; // scope 0 at $DIR/inline_instruction_set.rs:+1:5: +1:26
                                            // mir::Constant
-                                           // + span: $DIR/inline-instruction-set.rs:42:5: 42:24
+                                           // + span: $DIR/inline_instruction_set.rs:42:5: 42:24
                                            // + literal: Const { ty: fn() {instruction_set_a32}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_1);                 // scope 0 at $DIR/inline-instruction-set.rs:+1:26: +1:27
-          StorageLive(_2);                 // scope 0 at $DIR/inline-instruction-set.rs:+2:5: +2:26
--         _2 = instruction_set_t32() -> bb2; // scope 0 at $DIR/inline-instruction-set.rs:+2:5: +2:26
+          StorageDead(_1);                 // scope 0 at $DIR/inline_instruction_set.rs:+1:26: +1:27
+          StorageLive(_2);                 // scope 0 at $DIR/inline_instruction_set.rs:+2:5: +2:26
+-         _2 = instruction_set_t32() -> bb2; // scope 0 at $DIR/inline_instruction_set.rs:+2:5: +2:26
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-instruction-set.rs:43:5: 43:24
+-                                          // + span: $DIR/inline_instruction_set.rs:43:5: 43:24
 -                                          // + literal: Const { ty: fn() {instruction_set_t32}, val: Value(<ZST>) }
 -     }
 - 
 -     bb2: {
-          StorageDead(_2);                 // scope 0 at $DIR/inline-instruction-set.rs:+2:26: +2:27
-          StorageLive(_3);                 // scope 0 at $DIR/inline-instruction-set.rs:+5:5: +5:30
--         _3 = instruction_set_default() -> bb3; // scope 0 at $DIR/inline-instruction-set.rs:+5:5: +5:30
-+         _3 = instruction_set_default() -> bb2; // scope 0 at $DIR/inline-instruction-set.rs:+5:5: +5:30
+          StorageDead(_2);                 // scope 0 at $DIR/inline_instruction_set.rs:+2:26: +2:27
+          StorageLive(_3);                 // scope 0 at $DIR/inline_instruction_set.rs:+5:5: +5:30
+-         _3 = instruction_set_default() -> bb3; // scope 0 at $DIR/inline_instruction_set.rs:+5:5: +5:30
++         _3 = instruction_set_default() -> bb2; // scope 0 at $DIR/inline_instruction_set.rs:+5:5: +5:30
                                            // mir::Constant
-                                           // + span: $DIR/inline-instruction-set.rs:46:5: 46:28
+                                           // + span: $DIR/inline_instruction_set.rs:46:5: 46:28
                                            // + literal: Const { ty: fn() {instruction_set_default}, val: Value(<ZST>) }
       }
   
 -     bb3: {
 +     bb2: {
-          StorageDead(_3);                 // scope 0 at $DIR/inline-instruction-set.rs:+5:30: +5:31
-          _0 = const ();                   // scope 0 at $DIR/inline-instruction-set.rs:+0:14: +6:2
-          return;                          // scope 0 at $DIR/inline-instruction-set.rs:+6:2: +6:2
+          StorageDead(_3);                 // scope 0 at $DIR/inline_instruction_set.rs:+5:30: +5:31
+          _0 = const ();                   // scope 0 at $DIR/inline_instruction_set.rs:+0:14: +6:2
+          return;                          // scope 0 at $DIR/inline_instruction_set.rs:+6:2: +6:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff
index 7e017373b44..2a4dc9e3e80 100644
--- a/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff
+++ b/src/test/mir-opt/inline/inline_into_box_place.main.Inline.diff
@@ -2,45 +2,45 @@
 + // MIR for `main` after Inline
   
   fn main() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-into-box-place.rs:+0:11: +0:11
-      let _1: std::boxed::Box<std::vec::Vec<u32>>; // in scope 0 at $DIR/inline-into-box-place.rs:+1:9: +1:11
-      let mut _2: usize;                   // in scope 0 at $DIR/inline-into-box-place.rs:+1:29: +1:43
-      let mut _3: usize;                   // in scope 0 at $DIR/inline-into-box-place.rs:+1:29: +1:43
-      let mut _4: *mut u8;                 // in scope 0 at $DIR/inline-into-box-place.rs:+1:29: +1:43
-      let mut _5: std::boxed::Box<std::vec::Vec<u32>>; // in scope 0 at $DIR/inline-into-box-place.rs:+1:29: +1:43
-      let mut _6: ();                      // in scope 0 at $DIR/inline-into-box-place.rs:+1:42: +1:43
-      let mut _7: *const std::vec::Vec<u32>; // in scope 0 at $DIR/inline-into-box-place.rs:+1:29: +1:43
-+     let mut _8: &mut std::vec::Vec<u32>; // in scope 0 at $DIR/inline-into-box-place.rs:+1:33: +1:43
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_into_box_place.rs:+0:11: +0:11
+      let _1: std::boxed::Box<std::vec::Vec<u32>>; // in scope 0 at $DIR/inline_into_box_place.rs:+1:9: +1:11
+      let mut _2: usize;                   // in scope 0 at $DIR/inline_into_box_place.rs:+1:29: +1:43
+      let mut _3: usize;                   // in scope 0 at $DIR/inline_into_box_place.rs:+1:29: +1:43
+      let mut _4: *mut u8;                 // in scope 0 at $DIR/inline_into_box_place.rs:+1:29: +1:43
+      let mut _5: std::boxed::Box<std::vec::Vec<u32>>; // in scope 0 at $DIR/inline_into_box_place.rs:+1:29: +1:43
+      let mut _6: ();                      // in scope 0 at $DIR/inline_into_box_place.rs:+1:42: +1:43
+      let mut _7: *const std::vec::Vec<u32>; // in scope 0 at $DIR/inline_into_box_place.rs:+1:29: +1:43
++     let mut _8: &mut std::vec::Vec<u32>; // in scope 0 at $DIR/inline_into_box_place.rs:+1:33: +1:43
       scope 1 {
-          debug _x => _1;                  // in scope 1 at $DIR/inline-into-box-place.rs:+1:9: +1:11
+          debug _x => _1;                  // in scope 1 at $DIR/inline_into_box_place.rs:+1:9: +1:11
       }
       scope 2 {
       }
-+     scope 3 (inlined Vec::<u32>::new) {  // at $DIR/inline-into-box-place.rs:8:33: 8:43
++     scope 3 (inlined Vec::<u32>::new) {  // at $DIR/inline_into_box_place.rs:8:33: 8:43
 +         let mut _9: alloc::raw_vec::RawVec<u32>; // in scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-into-box-place.rs:+1:9: +1:11
-          _2 = SizeOf(std::vec::Vec<u32>); // scope 2 at $DIR/inline-into-box-place.rs:+1:29: +1:43
-          _3 = AlignOf(std::vec::Vec<u32>); // scope 2 at $DIR/inline-into-box-place.rs:+1:29: +1:43
-          _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 2 at $DIR/inline-into-box-place.rs:+1:29: +1:43
+          StorageLive(_1);                 // scope 0 at $DIR/inline_into_box_place.rs:+1:9: +1:11
+          _2 = SizeOf(std::vec::Vec<u32>); // scope 2 at $DIR/inline_into_box_place.rs:+1:29: +1:43
+          _3 = AlignOf(std::vec::Vec<u32>); // scope 2 at $DIR/inline_into_box_place.rs:+1:29: +1:43
+          _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 2 at $DIR/inline_into_box_place.rs:+1:29: +1:43
                                            // mir::Constant
-                                           // + span: $DIR/inline-into-box-place.rs:8:29: 8:43
+                                           // + span: $DIR/inline_into_box_place.rs:8:29: 8:43
                                            // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageLive(_5);                 // scope 0 at $DIR/inline-into-box-place.rs:+1:29: +1:43
-          _5 = ShallowInitBox(move _4, std::vec::Vec<u32>); // scope 0 at $DIR/inline-into-box-place.rs:+1:29: +1:43
-          _7 = (((_5.0: std::ptr::Unique<std::vec::Vec<u32>>).0: std::ptr::NonNull<std::vec::Vec<u32>>).0: *const std::vec::Vec<u32>); // scope 0 at $DIR/inline-into-box-place.rs:+1:33: +1:43
--         (*_7) = Vec::<u32>::new() -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/inline-into-box-place.rs:+1:33: +1:43
-+         StorageLive(_8);                 // scope 0 at $DIR/inline-into-box-place.rs:+1:33: +1:43
-+         _8 = &mut (*_7);                 // scope 0 at $DIR/inline-into-box-place.rs:+1:33: +1:43
+          StorageLive(_5);                 // scope 0 at $DIR/inline_into_box_place.rs:+1:29: +1:43
+          _5 = ShallowInitBox(move _4, std::vec::Vec<u32>); // scope 0 at $DIR/inline_into_box_place.rs:+1:29: +1:43
+          _7 = (((_5.0: std::ptr::Unique<std::vec::Vec<u32>>).0: std::ptr::NonNull<std::vec::Vec<u32>>).0: *const std::vec::Vec<u32>); // scope 0 at $DIR/inline_into_box_place.rs:+1:33: +1:43
+-         (*_7) = Vec::<u32>::new() -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/inline_into_box_place.rs:+1:33: +1:43
++         StorageLive(_8);                 // scope 0 at $DIR/inline_into_box_place.rs:+1:33: +1:43
++         _8 = &mut (*_7);                 // scope 0 at $DIR/inline_into_box_place.rs:+1:33: +1:43
 +         StorageLive(_9);                 // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
 +         _9 = const _;                    // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
                                            // mir::Constant
--                                          // + span: $DIR/inline-into-box-place.rs:8:33: 8:41
+-                                          // + span: $DIR/inline_into_box_place.rs:8:33: 8:41
 -                                          // + user_ty: UserType(1)
 -                                          // + literal: Const { ty: fn() -> Vec<u32> {Vec::<u32>::new}, val: Value(<ZST>) }
 -     }
@@ -53,29 +53,29 @@
 +         ((*_8).0: alloc::raw_vec::RawVec<u32>) = move _9; // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
 +         ((*_8).1: usize) = const 0_usize; // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
 +         StorageDead(_9);                 // scope 3 at $SRC_DIR/alloc/src/vec/mod.rs:LL:COL
-+         StorageDead(_8);                 // scope 0 at $DIR/inline-into-box-place.rs:+1:33: +1:43
-          _1 = move _5;                    // scope 0 at $DIR/inline-into-box-place.rs:+1:29: +1:43
-          StorageDead(_5);                 // scope 0 at $DIR/inline-into-box-place.rs:+1:42: +1:43
-          _0 = const ();                   // scope 0 at $DIR/inline-into-box-place.rs:+0:11: +2:2
--         drop(_1) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/inline-into-box-place.rs:+2:1: +2:2
-+         drop(_1) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/inline-into-box-place.rs:+2:1: +2:2
++         StorageDead(_8);                 // scope 0 at $DIR/inline_into_box_place.rs:+1:33: +1:43
+          _1 = move _5;                    // scope 0 at $DIR/inline_into_box_place.rs:+1:29: +1:43
+          StorageDead(_5);                 // scope 0 at $DIR/inline_into_box_place.rs:+1:42: +1:43
+          _0 = const ();                   // scope 0 at $DIR/inline_into_box_place.rs:+0:11: +2:2
+-         drop(_1) -> [return: bb3, unwind: bb4]; // scope 0 at $DIR/inline_into_box_place.rs:+2:1: +2:2
++         drop(_1) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/inline_into_box_place.rs:+2:1: +2:2
       }
   
 -     bb3: {
 +     bb2: {
-          StorageDead(_1);                 // scope 0 at $DIR/inline-into-box-place.rs:+2:1: +2:2
-          return;                          // scope 0 at $DIR/inline-into-box-place.rs:+2:2: +2:2
+          StorageDead(_1);                 // scope 0 at $DIR/inline_into_box_place.rs:+2:1: +2:2
+          return;                          // scope 0 at $DIR/inline_into_box_place.rs:+2:2: +2:2
       }
   
 -     bb4 (cleanup): {
 +     bb3 (cleanup): {
-          resume;                          // scope 0 at $DIR/inline-into-box-place.rs:+0:1: +2:2
+          resume;                          // scope 0 at $DIR/inline_into_box_place.rs:+0:1: +2:2
 -     }
 - 
 -     bb5 (cleanup): {
--         _6 = alloc::alloc::box_free::<Vec<u32>, std::alloc::Global>(move (_5.0: std::ptr::Unique<std::vec::Vec<u32>>), move (_5.1: std::alloc::Global)) -> bb4; // scope 0 at $DIR/inline-into-box-place.rs:+1:42: +1:43
+-         _6 = alloc::alloc::box_free::<Vec<u32>, std::alloc::Global>(move (_5.0: std::ptr::Unique<std::vec::Vec<u32>>), move (_5.1: std::alloc::Global)) -> bb4; // scope 0 at $DIR/inline_into_box_place.rs:+1:42: +1:43
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-into-box-place.rs:8:42: 8:43
+-                                          // + span: $DIR/inline_into_box_place.rs:8:42: 8:43
 -                                          // + literal: Const { ty: unsafe fn(Unique<Vec<u32>>, std::alloc::Global) {alloc::alloc::box_free::<Vec<u32>, std::alloc::Global>}, val: Value(<ZST>) }
       }
   }
diff --git a/src/test/mir-opt/inline/inline-into-box-place.rs b/src/test/mir-opt/inline/inline_into_box_place.rs
index 232bcc7b27d..232bcc7b27d 100644
--- a/src/test/mir-opt/inline/inline-into-box-place.rs
+++ b/src/test/mir-opt/inline/inline_into_box_place.rs
diff --git a/src/test/mir-opt/inline/inline_options.main.Inline.after.mir b/src/test/mir-opt/inline/inline_options.main.Inline.after.mir
index 361b0271526..1c590be945c 100644
--- a/src/test/mir-opt/inline/inline_options.main.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_options.main.Inline.after.mir
@@ -1,55 +1,55 @@
 // MIR for `main` after Inline
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/inline-options.rs:+0:11: +0:11
-    let _1: ();                          // in scope 0 at $DIR/inline-options.rs:+1:5: +1:18
-    let _2: ();                          // in scope 0 at $DIR/inline-options.rs:+2:5: +2:21
-    scope 1 (inlined inlined::<u32>) {   // at $DIR/inline-options.rs:10:5: 10:21
-        let _3: ();                      // in scope 1 at $DIR/inline-options.rs:16:23: 16:26
-        let _4: ();                      // in scope 1 at $DIR/inline-options.rs:16:28: 16:31
-        let _5: ();                      // in scope 1 at $DIR/inline-options.rs:16:33: 16:36
+    let mut _0: ();                      // return place in scope 0 at $DIR/inline_options.rs:+0:11: +0:11
+    let _1: ();                          // in scope 0 at $DIR/inline_options.rs:+1:5: +1:18
+    let _2: ();                          // in scope 0 at $DIR/inline_options.rs:+2:5: +2:21
+    scope 1 (inlined inlined::<u32>) {   // at $DIR/inline_options.rs:10:5: 10:21
+        let _3: ();                      // in scope 1 at $DIR/inline_options.rs:16:23: 16:26
+        let _4: ();                      // in scope 1 at $DIR/inline_options.rs:16:28: 16:31
+        let _5: ();                      // in scope 1 at $DIR/inline_options.rs:16:33: 16:36
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/inline-options.rs:+1:5: +1:18
-        _1 = not_inlined() -> bb1;       // scope 0 at $DIR/inline-options.rs:+1:5: +1:18
+        StorageLive(_1);                 // scope 0 at $DIR/inline_options.rs:+1:5: +1:18
+        _1 = not_inlined() -> bb1;       // scope 0 at $DIR/inline_options.rs:+1:5: +1:18
                                          // mir::Constant
-                                         // + span: $DIR/inline-options.rs:9:5: 9:16
+                                         // + span: $DIR/inline_options.rs:9:5: 9:16
                                          // + literal: Const { ty: fn() {not_inlined}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_1);                 // scope 0 at $DIR/inline-options.rs:+1:18: +1:19
-        StorageLive(_2);                 // scope 0 at $DIR/inline-options.rs:+2:5: +2:21
-        StorageLive(_3);                 // scope 1 at $DIR/inline-options.rs:16:23: 16:26
-        _3 = g() -> bb2;                 // scope 1 at $DIR/inline-options.rs:16:23: 16:26
+        StorageDead(_1);                 // scope 0 at $DIR/inline_options.rs:+1:18: +1:19
+        StorageLive(_2);                 // scope 0 at $DIR/inline_options.rs:+2:5: +2:21
+        StorageLive(_3);                 // scope 1 at $DIR/inline_options.rs:16:23: 16:26
+        _3 = g() -> bb2;                 // scope 1 at $DIR/inline_options.rs:16:23: 16:26
                                          // mir::Constant
-                                         // + span: $DIR/inline-options.rs:16:23: 16:24
+                                         // + span: $DIR/inline_options.rs:16:23: 16:24
                                          // + literal: Const { ty: fn() {g}, val: Value(<ZST>) }
     }
 
     bb2: {
-        StorageDead(_3);                 // scope 1 at $DIR/inline-options.rs:16:26: 16:27
-        StorageLive(_4);                 // scope 1 at $DIR/inline-options.rs:16:28: 16:31
-        _4 = g() -> bb3;                 // scope 1 at $DIR/inline-options.rs:16:28: 16:31
+        StorageDead(_3);                 // scope 1 at $DIR/inline_options.rs:16:26: 16:27
+        StorageLive(_4);                 // scope 1 at $DIR/inline_options.rs:16:28: 16:31
+        _4 = g() -> bb3;                 // scope 1 at $DIR/inline_options.rs:16:28: 16:31
                                          // mir::Constant
-                                         // + span: $DIR/inline-options.rs:16:28: 16:29
+                                         // + span: $DIR/inline_options.rs:16:28: 16:29
                                          // + literal: Const { ty: fn() {g}, val: Value(<ZST>) }
     }
 
     bb3: {
-        StorageDead(_4);                 // scope 1 at $DIR/inline-options.rs:16:31: 16:32
-        StorageLive(_5);                 // scope 1 at $DIR/inline-options.rs:16:33: 16:36
-        _5 = g() -> bb4;                 // scope 1 at $DIR/inline-options.rs:16:33: 16:36
+        StorageDead(_4);                 // scope 1 at $DIR/inline_options.rs:16:31: 16:32
+        StorageLive(_5);                 // scope 1 at $DIR/inline_options.rs:16:33: 16:36
+        _5 = g() -> bb4;                 // scope 1 at $DIR/inline_options.rs:16:33: 16:36
                                          // mir::Constant
-                                         // + span: $DIR/inline-options.rs:16:33: 16:34
+                                         // + span: $DIR/inline_options.rs:16:33: 16:34
                                          // + literal: Const { ty: fn() {g}, val: Value(<ZST>) }
     }
 
     bb4: {
-        StorageDead(_5);                 // scope 1 at $DIR/inline-options.rs:16:36: 16:37
-        StorageDead(_2);                 // scope 0 at $DIR/inline-options.rs:+2:21: +2:22
-        _0 = const ();                   // scope 0 at $DIR/inline-options.rs:+0:11: +3:2
-        return;                          // scope 0 at $DIR/inline-options.rs:+3:2: +3:2
+        StorageDead(_5);                 // scope 1 at $DIR/inline_options.rs:16:36: 16:37
+        StorageDead(_2);                 // scope 0 at $DIR/inline_options.rs:+2:21: +2:22
+        _0 = const ();                   // scope 0 at $DIR/inline_options.rs:+0:11: +3:2
+        return;                          // scope 0 at $DIR/inline_options.rs:+3:2: +3:2
     }
 }
diff --git a/src/test/mir-opt/inline/inline-options.rs b/src/test/mir-opt/inline/inline_options.rs
index 477f050b69e..477f050b69e 100644
--- a/src/test/mir-opt/inline/inline-options.rs
+++ b/src/test/mir-opt/inline/inline_options.rs
diff --git a/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir b/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir
index 169e7f5c5d9..75af20d482d 100644
--- a/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_retag.bar.Inline.after.mir
@@ -1,72 +1,72 @@
 // MIR for `bar` after Inline
 
 fn bar() -> bool {
-    let mut _0: bool;                    // return place in scope 0 at $DIR/inline-retag.rs:+0:13: +0:17
-    let _1: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo}; // in scope 0 at $DIR/inline-retag.rs:+1:9: +1:10
-    let mut _2: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo}; // in scope 0 at $DIR/inline-retag.rs:+2:5: +2:6
-    let mut _3: &i32;                    // in scope 0 at $DIR/inline-retag.rs:+2:7: +2:9
-    let _4: &i32;                        // in scope 0 at $DIR/inline-retag.rs:+2:7: +2:9
-    let _5: i32;                         // in scope 0 at $DIR/inline-retag.rs:+2:8: +2:9
-    let mut _6: &i32;                    // in scope 0 at $DIR/inline-retag.rs:+2:11: +2:14
-    let _7: &i32;                        // in scope 0 at $DIR/inline-retag.rs:+2:11: +2:14
-    let _8: i32;                         // in scope 0 at $DIR/inline-retag.rs:+2:12: +2:14
+    let mut _0: bool;                    // return place in scope 0 at $DIR/inline_retag.rs:+0:13: +0:17
+    let _1: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo}; // in scope 0 at $DIR/inline_retag.rs:+1:9: +1:10
+    let mut _2: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo}; // in scope 0 at $DIR/inline_retag.rs:+2:5: +2:6
+    let mut _3: &i32;                    // in scope 0 at $DIR/inline_retag.rs:+2:7: +2:9
+    let _4: &i32;                        // in scope 0 at $DIR/inline_retag.rs:+2:7: +2:9
+    let _5: i32;                         // in scope 0 at $DIR/inline_retag.rs:+2:8: +2:9
+    let mut _6: &i32;                    // in scope 0 at $DIR/inline_retag.rs:+2:11: +2:14
+    let _7: &i32;                        // in scope 0 at $DIR/inline_retag.rs:+2:11: +2:14
+    let _8: i32;                         // in scope 0 at $DIR/inline_retag.rs:+2:12: +2:14
     scope 1 {
-        debug f => _1;                   // in scope 1 at $DIR/inline-retag.rs:+1:9: +1:10
-        let mut _9: &i32;                // in scope 1 at $DIR/inline-retag.rs:+2:11: +2:14
-        let mut _10: &i32;               // in scope 1 at $DIR/inline-retag.rs:+2:7: +2:9
-        scope 2 (inlined foo) {          // at $DIR/inline-retag.rs:12:5: 12:15
-            debug x => _3;               // in scope 2 at $DIR/inline-retag.rs:16:8: 16:9
-            debug y => _6;               // in scope 2 at $DIR/inline-retag.rs:16:17: 16:18
-            let mut _11: i32;            // in scope 2 at $DIR/inline-retag.rs:17:5: 17:7
-            let mut _12: i32;            // in scope 2 at $DIR/inline-retag.rs:17:11: 17:13
+        debug f => _1;                   // in scope 1 at $DIR/inline_retag.rs:+1:9: +1:10
+        let mut _9: &i32;                // in scope 1 at $DIR/inline_retag.rs:+2:11: +2:14
+        let mut _10: &i32;               // in scope 1 at $DIR/inline_retag.rs:+2:7: +2:9
+        scope 2 (inlined foo) {          // at $DIR/inline_retag.rs:12:5: 12:15
+            debug x => _3;               // in scope 2 at $DIR/inline_retag.rs:16:8: 16:9
+            debug y => _6;               // in scope 2 at $DIR/inline_retag.rs:16:17: 16:18
+            let mut _11: i32;            // in scope 2 at $DIR/inline_retag.rs:17:5: 17:7
+            let mut _12: i32;            // in scope 2 at $DIR/inline_retag.rs:17:11: 17:13
         }
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/inline-retag.rs:+1:9: +1:10
-        _1 = foo;                        // scope 0 at $DIR/inline-retag.rs:+1:13: +1:16
+        StorageLive(_1);                 // scope 0 at $DIR/inline_retag.rs:+1:9: +1:10
+        _1 = foo;                        // scope 0 at $DIR/inline_retag.rs:+1:13: +1:16
                                          // mir::Constant
-                                         // + span: $DIR/inline-retag.rs:11:13: 11:16
+                                         // + span: $DIR/inline_retag.rs:11:13: 11:16
                                          // + literal: Const { ty: for<'a, 'b> fn(&'a i32, &'b i32) -> bool {foo}, val: Value(<ZST>) }
-        StorageLive(_2);                 // scope 1 at $DIR/inline-retag.rs:+2:5: +2:6
-        _2 = _1;                         // scope 1 at $DIR/inline-retag.rs:+2:5: +2:6
-        StorageLive(_3);                 // scope 1 at $DIR/inline-retag.rs:+2:7: +2:9
-        StorageLive(_4);                 // scope 1 at $DIR/inline-retag.rs:+2:7: +2:9
-        _10 = const _;                   // scope 1 at $DIR/inline-retag.rs:+2:7: +2:9
+        StorageLive(_2);                 // scope 1 at $DIR/inline_retag.rs:+2:5: +2:6
+        _2 = _1;                         // scope 1 at $DIR/inline_retag.rs:+2:5: +2:6
+        StorageLive(_3);                 // scope 1 at $DIR/inline_retag.rs:+2:7: +2:9
+        StorageLive(_4);                 // scope 1 at $DIR/inline_retag.rs:+2:7: +2:9
+        _10 = const _;                   // scope 1 at $DIR/inline_retag.rs:+2:7: +2:9
                                          // mir::Constant
-                                         // + span: $DIR/inline-retag.rs:12:7: 12:9
+                                         // + span: $DIR/inline_retag.rs:12:7: 12:9
                                          // + literal: Const { ty: &i32, val: Unevaluated(bar, [], Some(promoted[1])) }
-        Retag(_10);                      // scope 1 at $DIR/inline-retag.rs:+2:7: +2:9
-        _4 = &(*_10);                    // scope 1 at $DIR/inline-retag.rs:+2:7: +2:9
-        Retag(_4);                       // scope 1 at $DIR/inline-retag.rs:+2:7: +2:9
-        _3 = &(*_4);                     // scope 1 at $DIR/inline-retag.rs:+2:7: +2:9
-        Retag(_3);                       // scope 1 at $DIR/inline-retag.rs:+2:7: +2:9
-        StorageLive(_6);                 // scope 1 at $DIR/inline-retag.rs:+2:11: +2:14
-        StorageLive(_7);                 // scope 1 at $DIR/inline-retag.rs:+2:11: +2:14
-        _9 = const _;                    // scope 1 at $DIR/inline-retag.rs:+2:11: +2:14
+        Retag(_10);                      // scope 1 at $DIR/inline_retag.rs:+2:7: +2:9
+        _4 = &(*_10);                    // scope 1 at $DIR/inline_retag.rs:+2:7: +2:9
+        Retag(_4);                       // scope 1 at $DIR/inline_retag.rs:+2:7: +2:9
+        _3 = &(*_4);                     // scope 1 at $DIR/inline_retag.rs:+2:7: +2:9
+        Retag(_3);                       // scope 1 at $DIR/inline_retag.rs:+2:7: +2:9
+        StorageLive(_6);                 // scope 1 at $DIR/inline_retag.rs:+2:11: +2:14
+        StorageLive(_7);                 // scope 1 at $DIR/inline_retag.rs:+2:11: +2:14
+        _9 = const _;                    // scope 1 at $DIR/inline_retag.rs:+2:11: +2:14
                                          // mir::Constant
-                                         // + span: $DIR/inline-retag.rs:12:11: 12:14
+                                         // + span: $DIR/inline_retag.rs:12:11: 12:14
                                          // + literal: Const { ty: &i32, val: Unevaluated(bar, [], Some(promoted[0])) }
-        Retag(_9);                       // scope 1 at $DIR/inline-retag.rs:+2:11: +2:14
-        _7 = &(*_9);                     // scope 1 at $DIR/inline-retag.rs:+2:11: +2:14
-        Retag(_7);                       // scope 1 at $DIR/inline-retag.rs:+2:11: +2:14
-        _6 = &(*_7);                     // scope 1 at $DIR/inline-retag.rs:+2:11: +2:14
-        Retag(_6);                       // scope 1 at $DIR/inline-retag.rs:+2:11: +2:14
-        Retag(_3);                       // scope 2 at $DIR/inline-retag.rs:16:8: 16:9
-        Retag(_6);                       // scope 2 at $DIR/inline-retag.rs:16:17: 16:18
-        StorageLive(_11);                // scope 2 at $DIR/inline-retag.rs:17:5: 17:7
-        _11 = (*_3);                     // scope 2 at $DIR/inline-retag.rs:17:5: 17:7
-        StorageLive(_12);                // scope 2 at $DIR/inline-retag.rs:17:11: 17:13
-        _12 = (*_6);                     // scope 2 at $DIR/inline-retag.rs:17:11: 17:13
-        _0 = Eq(move _11, move _12);     // scope 2 at $DIR/inline-retag.rs:17:5: 17:13
-        StorageDead(_12);                // scope 2 at $DIR/inline-retag.rs:17:12: 17:13
-        StorageDead(_11);                // scope 2 at $DIR/inline-retag.rs:17:12: 17:13
-        StorageDead(_6);                 // scope 1 at $DIR/inline-retag.rs:+2:14: +2:15
-        StorageDead(_3);                 // scope 1 at $DIR/inline-retag.rs:+2:14: +2:15
-        StorageDead(_2);                 // scope 1 at $DIR/inline-retag.rs:+2:14: +2:15
-        StorageDead(_1);                 // scope 0 at $DIR/inline-retag.rs:+3:1: +3:2
-        StorageDead(_7);                 // scope 0 at $DIR/inline-retag.rs:+3:1: +3:2
-        StorageDead(_4);                 // scope 0 at $DIR/inline-retag.rs:+3:1: +3:2
-        return;                          // scope 0 at $DIR/inline-retag.rs:+3:2: +3:2
+        Retag(_9);                       // scope 1 at $DIR/inline_retag.rs:+2:11: +2:14
+        _7 = &(*_9);                     // scope 1 at $DIR/inline_retag.rs:+2:11: +2:14
+        Retag(_7);                       // scope 1 at $DIR/inline_retag.rs:+2:11: +2:14
+        _6 = &(*_7);                     // scope 1 at $DIR/inline_retag.rs:+2:11: +2:14
+        Retag(_6);                       // scope 1 at $DIR/inline_retag.rs:+2:11: +2:14
+        Retag(_3);                       // scope 2 at $DIR/inline_retag.rs:16:8: 16:9
+        Retag(_6);                       // scope 2 at $DIR/inline_retag.rs:16:17: 16:18
+        StorageLive(_11);                // scope 2 at $DIR/inline_retag.rs:17:5: 17:7
+        _11 = (*_3);                     // scope 2 at $DIR/inline_retag.rs:17:5: 17:7
+        StorageLive(_12);                // scope 2 at $DIR/inline_retag.rs:17:11: 17:13
+        _12 = (*_6);                     // scope 2 at $DIR/inline_retag.rs:17:11: 17:13
+        _0 = Eq(move _11, move _12);     // scope 2 at $DIR/inline_retag.rs:17:5: 17:13
+        StorageDead(_12);                // scope 2 at $DIR/inline_retag.rs:17:12: 17:13
+        StorageDead(_11);                // scope 2 at $DIR/inline_retag.rs:17:12: 17:13
+        StorageDead(_6);                 // scope 1 at $DIR/inline_retag.rs:+2:14: +2:15
+        StorageDead(_3);                 // scope 1 at $DIR/inline_retag.rs:+2:14: +2:15
+        StorageDead(_2);                 // scope 1 at $DIR/inline_retag.rs:+2:14: +2:15
+        StorageDead(_1);                 // scope 0 at $DIR/inline_retag.rs:+3:1: +3:2
+        StorageDead(_7);                 // scope 0 at $DIR/inline_retag.rs:+3:1: +3:2
+        StorageDead(_4);                 // scope 0 at $DIR/inline_retag.rs:+3:1: +3:2
+        return;                          // scope 0 at $DIR/inline_retag.rs:+3:2: +3:2
     }
 }
diff --git a/src/test/mir-opt/inline/inline-retag.rs b/src/test/mir-opt/inline/inline_retag.rs
index c6950f26925..c6950f26925 100644
--- a/src/test/mir-opt/inline/inline-retag.rs
+++ b/src/test/mir-opt/inline/inline_retag.rs
diff --git a/src/test/mir-opt/inline/inline_shims.clone.Inline.diff b/src/test/mir-opt/inline/inline_shims.clone.Inline.diff
index d691e90b7da..969573ba325 100644
--- a/src/test/mir-opt/inline/inline_shims.clone.Inline.diff
+++ b/src/test/mir-opt/inline/inline_shims.clone.Inline.diff
@@ -2,25 +2,25 @@
 + // MIR for `clone` after Inline
   
   fn clone(_1: fn(A, B)) -> fn(A, B) {
-      debug f => _1;                       // in scope 0 at $DIR/inline-shims.rs:+0:20: +0:21
-      let mut _0: fn(A, B);                // return place in scope 0 at $DIR/inline-shims.rs:+0:36: +0:44
-      let mut _2: &fn(A, B);               // in scope 0 at $DIR/inline-shims.rs:+1:5: +1:14
-+     scope 1 (inlined <fn(A, B) as Clone>::clone - shim(fn(A, B))) { // at $DIR/inline-shims.rs:6:5: 6:14
+      debug f => _1;                       // in scope 0 at $DIR/inline_shims.rs:+0:20: +0:21
+      let mut _0: fn(A, B);                // return place in scope 0 at $DIR/inline_shims.rs:+0:36: +0:44
+      let mut _2: &fn(A, B);               // in scope 0 at $DIR/inline_shims.rs:+1:5: +1:14
++     scope 1 (inlined <fn(A, B) as Clone>::clone - shim(fn(A, B))) { // at $DIR/inline_shims.rs:6:5: 6:14
 +     }
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/inline-shims.rs:+1:5: +1:14
-          _2 = &_1;                        // scope 0 at $DIR/inline-shims.rs:+1:5: +1:14
--         _0 = <fn(A, B) as Clone>::clone(move _2) -> bb1; // scope 0 at $DIR/inline-shims.rs:+1:5: +1:14
+          StorageLive(_2);                 // scope 0 at $DIR/inline_shims.rs:+1:5: +1:14
+          _2 = &_1;                        // scope 0 at $DIR/inline_shims.rs:+1:5: +1:14
+-         _0 = <fn(A, B) as Clone>::clone(move _2) -> bb1; // scope 0 at $DIR/inline_shims.rs:+1:5: +1:14
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-shims.rs:6:7: 6:12
+-                                          // + span: $DIR/inline_shims.rs:6:7: 6:12
 -                                          // + literal: Const { ty: for<'a> fn(&'a fn(A, B)) -> fn(A, B) {<fn(A, B) as Clone>::clone}, val: Value(<ZST>) }
 -     }
 - 
 -     bb1: {
 +         _0 = (*_2);                      // scope 1 at $SRC_DIR/core/src/clone.rs:LL:COL
-          StorageDead(_2);                 // scope 0 at $DIR/inline-shims.rs:+1:13: +1:14
-          return;                          // scope 0 at $DIR/inline-shims.rs:+2:2: +2:2
+          StorageDead(_2);                 // scope 0 at $DIR/inline_shims.rs:+1:13: +1:14
+          return;                          // scope 0 at $DIR/inline_shims.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline_shims.drop.Inline.diff b/src/test/mir-opt/inline/inline_shims.drop.Inline.diff
index f7b1cde80bd..7a54beca233 100644
--- a/src/test/mir-opt/inline/inline_shims.drop.Inline.diff
+++ b/src/test/mir-opt/inline/inline_shims.drop.Inline.diff
@@ -2,51 +2,51 @@
 + // MIR for `drop` after Inline
   
   fn drop(_1: *mut Vec<A>, _2: *mut Option<B>) -> () {
-      debug a => _1;                       // in scope 0 at $DIR/inline-shims.rs:+0:19: +0:20
-      debug b => _2;                       // in scope 0 at $DIR/inline-shims.rs:+0:35: +0:36
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-shims.rs:+0:54: +0:54
-      let _3: ();                          // in scope 0 at $DIR/inline-shims.rs:+1:14: +1:40
-      let mut _4: *mut std::vec::Vec<A>;   // in scope 0 at $DIR/inline-shims.rs:+1:38: +1:39
-      let mut _5: *mut std::option::Option<B>; // in scope 0 at $DIR/inline-shims.rs:+2:38: +2:39
+      debug a => _1;                       // in scope 0 at $DIR/inline_shims.rs:+0:19: +0:20
+      debug b => _2;                       // in scope 0 at $DIR/inline_shims.rs:+0:35: +0:36
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_shims.rs:+0:54: +0:54
+      let _3: ();                          // in scope 0 at $DIR/inline_shims.rs:+1:14: +1:40
+      let mut _4: *mut std::vec::Vec<A>;   // in scope 0 at $DIR/inline_shims.rs:+1:38: +1:39
+      let mut _5: *mut std::option::Option<B>; // in scope 0 at $DIR/inline_shims.rs:+2:38: +2:39
       scope 1 {
       }
       scope 2 {
-+         scope 3 (inlined std::ptr::drop_in_place::<Option<B>> - shim(Some(Option<B>))) { // at $DIR/inline-shims.rs:12:14: 12:40
++         scope 3 (inlined std::ptr::drop_in_place::<Option<B>> - shim(Some(Option<B>))) { // at $DIR/inline_shims.rs:12:14: 12:40
 +             let mut _6: isize;           // in scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 +             let mut _7: isize;           // in scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 +         }
       }
   
       bb0: {
-          StorageLive(_3);                 // scope 0 at $DIR/inline-shims.rs:+1:5: +1:42
-          StorageLive(_4);                 // scope 1 at $DIR/inline-shims.rs:+1:38: +1:39
-          _4 = _1;                         // scope 1 at $DIR/inline-shims.rs:+1:38: +1:39
-          _3 = std::ptr::drop_in_place::<Vec<A>>(move _4) -> bb1; // scope 1 at $DIR/inline-shims.rs:+1:14: +1:40
+          StorageLive(_3);                 // scope 0 at $DIR/inline_shims.rs:+1:5: +1:42
+          StorageLive(_4);                 // scope 1 at $DIR/inline_shims.rs:+1:38: +1:39
+          _4 = _1;                         // scope 1 at $DIR/inline_shims.rs:+1:38: +1:39
+          _3 = std::ptr::drop_in_place::<Vec<A>>(move _4) -> bb1; // scope 1 at $DIR/inline_shims.rs:+1:14: +1:40
                                            // mir::Constant
-                                           // + span: $DIR/inline-shims.rs:11:14: 11:37
+                                           // + span: $DIR/inline_shims.rs:11:14: 11:37
                                            // + literal: Const { ty: unsafe fn(*mut Vec<A>) {std::ptr::drop_in_place::<Vec<A>>}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_4);                 // scope 1 at $DIR/inline-shims.rs:+1:39: +1:40
-          StorageDead(_3);                 // scope 0 at $DIR/inline-shims.rs:+1:41: +1:42
-          StorageLive(_5);                 // scope 2 at $DIR/inline-shims.rs:+2:38: +2:39
-          _5 = _2;                         // scope 2 at $DIR/inline-shims.rs:+2:38: +2:39
--         _0 = std::ptr::drop_in_place::<Option<B>>(move _5) -> bb2; // scope 2 at $DIR/inline-shims.rs:+2:14: +2:40
+          StorageDead(_4);                 // scope 1 at $DIR/inline_shims.rs:+1:39: +1:40
+          StorageDead(_3);                 // scope 0 at $DIR/inline_shims.rs:+1:41: +1:42
+          StorageLive(_5);                 // scope 2 at $DIR/inline_shims.rs:+2:38: +2:39
+          _5 = _2;                         // scope 2 at $DIR/inline_shims.rs:+2:38: +2:39
+-         _0 = std::ptr::drop_in_place::<Option<B>>(move _5) -> bb2; // scope 2 at $DIR/inline_shims.rs:+2:14: +2:40
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-shims.rs:12:14: 12:37
+-                                          // + span: $DIR/inline_shims.rs:12:14: 12:37
 -                                          // + literal: Const { ty: unsafe fn(*mut Option<B>) {std::ptr::drop_in_place::<Option<B>>}, val: Value(<ZST>) }
-+         StorageLive(_6);                 // scope 2 at $DIR/inline-shims.rs:+2:14: +2:40
-+         StorageLive(_7);                 // scope 2 at $DIR/inline-shims.rs:+2:14: +2:40
++         StorageLive(_6);                 // scope 2 at $DIR/inline_shims.rs:+2:14: +2:40
++         StorageLive(_7);                 // scope 2 at $DIR/inline_shims.rs:+2:14: +2:40
 +         _6 = discriminant((*_5));        // scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
 +         switchInt(move _6) -> [0_isize: bb2, otherwise: bb3]; // scope 3 at $SRC_DIR/core/src/ptr/mod.rs:LL:COL
       }
   
       bb2: {
-+         StorageDead(_7);                 // scope 2 at $DIR/inline-shims.rs:+2:14: +2:40
-+         StorageDead(_6);                 // scope 2 at $DIR/inline-shims.rs:+2:14: +2:40
-          StorageDead(_5);                 // scope 2 at $DIR/inline-shims.rs:+2:39: +2:40
-          return;                          // scope 0 at $DIR/inline-shims.rs:+3:2: +3:2
++         StorageDead(_7);                 // scope 2 at $DIR/inline_shims.rs:+2:14: +2:40
++         StorageDead(_6);                 // scope 2 at $DIR/inline_shims.rs:+2:14: +2:40
+          StorageDead(_5);                 // scope 2 at $DIR/inline_shims.rs:+2:39: +2:40
+          return;                          // scope 0 at $DIR/inline_shims.rs:+3:2: +3:2
 +     }
 + 
 +     bb3: {
diff --git a/src/test/mir-opt/inline/inline-shims.rs b/src/test/mir-opt/inline/inline_shims.rs
index 7c8618f71e5..7c8618f71e5 100644
--- a/src/test/mir-opt/inline/inline-shims.rs
+++ b/src/test/mir-opt/inline/inline_shims.rs
diff --git a/src/test/mir-opt/inline/inline_specialization.main.Inline.diff b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff
index fdf2a1e1ff9..af08296edea 100644
--- a/src/test/mir-opt/inline/inline_specialization.main.Inline.diff
+++ b/src/test/mir-opt/inline/inline_specialization.main.Inline.diff
@@ -2,27 +2,27 @@
 + // MIR for `main` after Inline
   
   fn main() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/inline-specialization.rs:+0:11: +0:11
-      let _1: u32;                         // in scope 0 at $DIR/inline-specialization.rs:+1:9: +1:10
+      let mut _0: ();                      // return place in scope 0 at $DIR/inline_specialization.rs:+0:11: +0:11
+      let _1: u32;                         // in scope 0 at $DIR/inline_specialization.rs:+1:9: +1:10
       scope 1 {
-          debug x => _1;                   // in scope 1 at $DIR/inline-specialization.rs:+1:9: +1:10
+          debug x => _1;                   // in scope 1 at $DIR/inline_specialization.rs:+1:9: +1:10
       }
-+     scope 2 (inlined <Vec<()> as Foo>::bar) { // at $DIR/inline-specialization.rs:5:13: 5:38
++     scope 2 (inlined <Vec<()> as Foo>::bar) { // at $DIR/inline_specialization.rs:5:13: 5:38
 +     }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/inline-specialization.rs:+1:9: +1:10
--         _1 = <Vec<()> as Foo>::bar() -> bb1; // scope 0 at $DIR/inline-specialization.rs:+1:13: +1:38
+          StorageLive(_1);                 // scope 0 at $DIR/inline_specialization.rs:+1:9: +1:10
+-         _1 = <Vec<()> as Foo>::bar() -> bb1; // scope 0 at $DIR/inline_specialization.rs:+1:13: +1:38
 -                                          // mir::Constant
--                                          // + span: $DIR/inline-specialization.rs:5:13: 5:36
+-                                          // + span: $DIR/inline_specialization.rs:5:13: 5:36
 -                                          // + literal: Const { ty: fn() -> u32 {<Vec<()> as Foo>::bar}, val: Value(<ZST>) }
 -     }
 - 
 -     bb1: {
-+         _1 = const 123_u32;              // scope 2 at $DIR/inline-specialization.rs:14:31: 14:34
-          _0 = const ();                   // scope 0 at $DIR/inline-specialization.rs:+0:11: +2:2
-          StorageDead(_1);                 // scope 0 at $DIR/inline-specialization.rs:+2:1: +2:2
-          return;                          // scope 0 at $DIR/inline-specialization.rs:+2:2: +2:2
++         _1 = const 123_u32;              // scope 2 at $DIR/inline_specialization.rs:14:31: 14:34
+          _0 = const ();                   // scope 0 at $DIR/inline_specialization.rs:+0:11: +2:2
+          StorageDead(_1);                 // scope 0 at $DIR/inline_specialization.rs:+2:1: +2:2
+          return;                          // scope 0 at $DIR/inline_specialization.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/inline-specialization.rs b/src/test/mir-opt/inline/inline_specialization.rs
index 87275b4e514..87275b4e514 100644
--- a/src/test/mir-opt/inline/inline-specialization.rs
+++ b/src/test/mir-opt/inline/inline_specialization.rs
diff --git a/src/test/mir-opt/inline/inline-trait-method.rs b/src/test/mir-opt/inline/inline_trait_method.rs
index 74be53f5512..74be53f5512 100644
--- a/src/test/mir-opt/inline/inline-trait-method.rs
+++ b/src/test/mir-opt/inline/inline_trait_method.rs
diff --git a/src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir b/src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir
index 89eefc29269..637bf282a65 100644
--- a/src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_trait_method.test.Inline.after.mir
@@ -1,21 +1,21 @@
 // MIR for `test` after Inline
 
 fn test(_1: &dyn X) -> u32 {
-    debug x => _1;                       // in scope 0 at $DIR/inline-trait-method.rs:+0:9: +0:10
-    let mut _0: u32;                     // return place in scope 0 at $DIR/inline-trait-method.rs:+0:23: +0:26
-    let mut _2: &dyn X;                  // in scope 0 at $DIR/inline-trait-method.rs:+1:5: +1:10
+    debug x => _1;                       // in scope 0 at $DIR/inline_trait_method.rs:+0:9: +0:10
+    let mut _0: u32;                     // return place in scope 0 at $DIR/inline_trait_method.rs:+0:23: +0:26
+    let mut _2: &dyn X;                  // in scope 0 at $DIR/inline_trait_method.rs:+1:5: +1:10
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/inline-trait-method.rs:+1:5: +1:10
-        _2 = &(*_1);                     // scope 0 at $DIR/inline-trait-method.rs:+1:5: +1:10
-        _0 = <dyn X as X>::y(move _2) -> bb1; // scope 0 at $DIR/inline-trait-method.rs:+1:5: +1:10
+        StorageLive(_2);                 // scope 0 at $DIR/inline_trait_method.rs:+1:5: +1:10
+        _2 = &(*_1);                     // scope 0 at $DIR/inline_trait_method.rs:+1:5: +1:10
+        _0 = <dyn X as X>::y(move _2) -> bb1; // scope 0 at $DIR/inline_trait_method.rs:+1:5: +1:10
                                          // mir::Constant
-                                         // + span: $DIR/inline-trait-method.rs:9:7: 9:8
+                                         // + span: $DIR/inline_trait_method.rs:9:7: 9:8
                                          // + literal: Const { ty: for<'a> fn(&'a dyn X) -> u32 {<dyn X as X>::y}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_2);                 // scope 0 at $DIR/inline-trait-method.rs:+1:9: +1:10
-        return;                          // scope 0 at $DIR/inline-trait-method.rs:+2:2: +2:2
+        StorageDead(_2);                 // scope 0 at $DIR/inline_trait_method.rs:+1:9: +1:10
+        return;                          // scope 0 at $DIR/inline_trait_method.rs:+2:2: +2:2
     }
 }
diff --git a/src/test/mir-opt/inline/inline-trait-method_2.rs b/src/test/mir-opt/inline/inline_trait_method_2.rs
index 378e71a2567..378e71a2567 100644
--- a/src/test/mir-opt/inline/inline-trait-method_2.rs
+++ b/src/test/mir-opt/inline/inline_trait_method_2.rs
diff --git a/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir b/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir
index 3d05869fa51..dab8bb9a0c6 100644
--- a/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir
+++ b/src/test/mir-opt/inline/inline_trait_method_2.test2.Inline.after.mir
@@ -1,32 +1,32 @@
 // MIR for `test2` after Inline
 
 fn test2(_1: &dyn X) -> bool {
-    debug x => _1;                       // in scope 0 at $DIR/inline-trait-method_2.rs:+0:10: +0:11
-    let mut _0: bool;                    // return place in scope 0 at $DIR/inline-trait-method_2.rs:+0:24: +0:28
-    let mut _2: &dyn X;                  // in scope 0 at $DIR/inline-trait-method_2.rs:+1:10: +1:11
-    let mut _3: &dyn X;                  // in scope 0 at $DIR/inline-trait-method_2.rs:+1:10: +1:11
-    scope 1 (inlined test) {             // at $DIR/inline-trait-method_2.rs:5:5: 5:12
-        debug x => _2;                   // in scope 1 at $DIR/inline-trait-method_2.rs:9:9: 9:10
-        let mut _4: &dyn X;              // in scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10
+    debug x => _1;                       // in scope 0 at $DIR/inline_trait_method_2.rs:+0:10: +0:11
+    let mut _0: bool;                    // return place in scope 0 at $DIR/inline_trait_method_2.rs:+0:24: +0:28
+    let mut _2: &dyn X;                  // in scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11
+    let mut _3: &dyn X;                  // in scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11
+    scope 1 (inlined test) {             // at $DIR/inline_trait_method_2.rs:5:5: 5:12
+        debug x => _2;                   // in scope 1 at $DIR/inline_trait_method_2.rs:9:9: 9:10
+        let mut _4: &dyn X;              // in scope 1 at $DIR/inline_trait_method_2.rs:10:5: 10:10
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/inline-trait-method_2.rs:+1:10: +1:11
-        StorageLive(_3);                 // scope 0 at $DIR/inline-trait-method_2.rs:+1:10: +1:11
-        _3 = &(*_1);                     // scope 0 at $DIR/inline-trait-method_2.rs:+1:10: +1:11
-        _2 = move _3 as &dyn X (Pointer(Unsize)); // scope 0 at $DIR/inline-trait-method_2.rs:+1:10: +1:11
-        StorageDead(_3);                 // scope 0 at $DIR/inline-trait-method_2.rs:+1:10: +1:11
-        StorageLive(_4);                 // scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10
-        _4 = _2;                         // scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10
-        _0 = <dyn X as X>::y(move _4) -> bb1; // scope 1 at $DIR/inline-trait-method_2.rs:10:5: 10:10
+        StorageLive(_2);                 // scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11
+        StorageLive(_3);                 // scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11
+        _3 = &(*_1);                     // scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11
+        _2 = move _3 as &dyn X (Pointer(Unsize)); // scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11
+        StorageDead(_3);                 // scope 0 at $DIR/inline_trait_method_2.rs:+1:10: +1:11
+        StorageLive(_4);                 // scope 1 at $DIR/inline_trait_method_2.rs:10:5: 10:10
+        _4 = _2;                         // scope 1 at $DIR/inline_trait_method_2.rs:10:5: 10:10
+        _0 = <dyn X as X>::y(move _4) -> bb1; // scope 1 at $DIR/inline_trait_method_2.rs:10:5: 10:10
                                          // mir::Constant
-                                         // + span: $DIR/inline-trait-method_2.rs:10:7: 10:8
+                                         // + span: $DIR/inline_trait_method_2.rs:10:7: 10:8
                                          // + literal: Const { ty: for<'a> fn(&'a dyn X) -> bool {<dyn X as X>::y}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_4);                 // scope 1 at $DIR/inline-trait-method_2.rs:10:9: 10:10
-        StorageDead(_2);                 // scope 0 at $DIR/inline-trait-method_2.rs:+1:11: +1:12
-        return;                          // scope 0 at $DIR/inline-trait-method_2.rs:+2:2: +2:2
+        StorageDead(_4);                 // scope 1 at $DIR/inline_trait_method_2.rs:10:9: 10:10
+        StorageDead(_2);                 // scope 0 at $DIR/inline_trait_method_2.rs:+1:11: +1:12
+        return;                          // scope 0 at $DIR/inline_trait_method_2.rs:+2:2: +2:2
     }
 }
diff --git a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir
index 5168ae031f0..777681e1ce7 100644
--- a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir
+++ b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.a.Inline.after.mir
@@ -1,30 +1,30 @@
 // MIR for `a` after Inline
 
 fn a(_1: &mut [T]) -> &mut [T] {
-    debug x => _1;                       // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+0:13: +0:14
-    let mut _0: &mut [T];                // return place in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+0:29: +0:37
-    let mut _2: &mut [T];                // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-    let mut _3: &mut [T];                // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-    let mut _4: &mut [T];                // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-    scope 1 (inlined <[T] as AsMut<[T]>>::as_mut) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:3:5: 3:15
+    debug x => _1;                       // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+0:13: +0:14
+    let mut _0: &mut [T];                // return place in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+0:29: +0:37
+    let mut _2: &mut [T];                // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+    let mut _3: &mut [T];                // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+    let mut _4: &mut [T];                // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+    scope 1 (inlined <[T] as AsMut<[T]>>::as_mut) { // at $DIR/issue_58867_inline_as_ref_as_mut.rs:3:5: 3:15
         debug self => _4;                // in scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
         let mut _5: &mut [T];            // in scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageLive(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageLive(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        _4 = &mut (*_1);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
+        StorageLive(_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageLive(_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageLive(_4);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        _4 = &mut (*_1);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
         StorageLive(_5);                 // scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
         _5 = &mut (*_4);                 // scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
         _3 = &mut (*_5);                 // scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
         StorageDead(_5);                 // scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-        _2 = &mut (*_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageDead(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:14: +1:15
-        _0 = &mut (*_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageDead(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+2:1: +2:2
-        StorageDead(_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+2:1: +2:2
-        return;                          // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+2:2: +2:2
+        _2 = &mut (*_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageDead(_4);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:14: +1:15
+        _0 = &mut (*_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageDead(_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+2:1: +2:2
+        StorageDead(_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+2:1: +2:2
+        return;                          // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+2:2: +2:2
     }
 }
diff --git a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir
index 06d442ae88b..83545c99100 100644
--- a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir
+++ b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.b.Inline.after.mir
@@ -1,12 +1,12 @@
 // MIR for `b` after Inline
 
 fn b(_1: &mut Box<T>) -> &mut T {
-    debug x => _1;                       // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+0:13: +0:14
-    let mut _0: &mut T;                  // return place in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+0:32: +0:38
-    let mut _2: &mut T;                  // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-    let mut _3: &mut T;                  // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-    let mut _4: &mut std::boxed::Box<T>; // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-    scope 1 (inlined <Box<T> as AsMut<T>>::as_mut) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:8:5: 8:15
+    debug x => _1;                       // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+0:13: +0:14
+    let mut _0: &mut T;                  // return place in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+0:32: +0:38
+    let mut _2: &mut T;                  // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+    let mut _3: &mut T;                  // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+    let mut _4: &mut std::boxed::Box<T>; // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+    scope 1 (inlined <Box<T> as AsMut<T>>::as_mut) { // at $DIR/issue_58867_inline_as_ref_as_mut.rs:8:5: 8:15
         debug self => _4;                // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
         let mut _5: &mut T;              // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
         let mut _6: &mut T;              // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
@@ -15,10 +15,10 @@ fn b(_1: &mut Box<T>) -> &mut T {
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageLive(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageLive(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        _4 = &mut (*_1);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
+        StorageLive(_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageLive(_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageLive(_4);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        _4 = &mut (*_1);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
         StorageLive(_5);                 // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
         StorageLive(_6);                 // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
         _7 = deref_copy (*_4);           // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
@@ -28,11 +28,11 @@ fn b(_1: &mut Box<T>) -> &mut T {
         _3 = &mut (*_5);                 // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
         StorageDead(_6);                 // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
         StorageDead(_5);                 // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-        _2 = &mut (*_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageDead(_4);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:14: +1:15
-        _0 = &mut (*_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageDead(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+2:1: +2:2
-        StorageDead(_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+2:1: +2:2
-        return;                          // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+2:2: +2:2
+        _2 = &mut (*_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageDead(_4);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:14: +1:15
+        _0 = &mut (*_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageDead(_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+2:1: +2:2
+        StorageDead(_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+2:1: +2:2
+        return;                          // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+2:2: +2:2
     }
 }
diff --git a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir
index c7f20ff98ff..ed4e9927ce9 100644
--- a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir
+++ b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.c.Inline.after.mir
@@ -1,22 +1,22 @@
 // MIR for `c` after Inline
 
 fn c(_1: &[T]) -> &[T] {
-    debug x => _1;                       // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+0:13: +0:14
-    let mut _0: &[T];                    // return place in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+0:25: +0:29
-    let _2: &[T];                        // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-    let mut _3: &[T];                    // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-    scope 1 (inlined <[T] as AsRef<[T]>>::as_ref) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:13:5: 13:15
+    debug x => _1;                       // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+0:13: +0:14
+    let mut _0: &[T];                    // return place in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+0:25: +0:29
+    let _2: &[T];                        // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+    let mut _3: &[T];                    // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+    scope 1 (inlined <[T] as AsRef<[T]>>::as_ref) { // at $DIR/issue_58867_inline_as_ref_as_mut.rs:13:5: 13:15
         debug self => _3;                // in scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageLive(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        _3 = &(*_1);                     // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
+        StorageLive(_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageLive(_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        _3 = &(*_1);                     // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
         _2 = _3;                         // scope 1 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-        _0 = &(*_2);                     // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageDead(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:14: +1:15
-        StorageDead(_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+2:1: +2:2
-        return;                          // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+2:2: +2:2
+        _0 = &(*_2);                     // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageDead(_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:14: +1:15
+        StorageDead(_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+2:1: +2:2
+        return;                          // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+2:2: +2:2
     }
 }
diff --git a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir
index d5f06c54a57..18a2670be21 100644
--- a/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir
+++ b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.d.Inline.after.mir
@@ -1,26 +1,26 @@
 // MIR for `d` after Inline
 
 fn d(_1: &Box<T>) -> &T {
-    debug x => _1;                       // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+0:13: +0:14
-    let mut _0: &T;                      // return place in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+0:28: +0:30
-    let _2: &T;                          // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-    let mut _3: &std::boxed::Box<T>;     // in scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-    scope 1 (inlined <Box<T> as AsRef<T>>::as_ref) { // at $DIR/issue-58867-inline-as-ref-as-mut.rs:18:5: 18:15
+    debug x => _1;                       // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+0:13: +0:14
+    let mut _0: &T;                      // return place in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+0:28: +0:30
+    let _2: &T;                          // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+    let mut _3: &std::boxed::Box<T>;     // in scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+    scope 1 (inlined <Box<T> as AsRef<T>>::as_ref) { // at $DIR/issue_58867_inline_as_ref_as_mut.rs:18:5: 18:15
         debug self => _3;                // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
         let mut _4: std::boxed::Box<T>;  // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
         let mut _5: *const T;            // in scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageLive(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        _3 = &(*_1);                     // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
+        StorageLive(_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageLive(_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        _3 = &(*_1);                     // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
         _4 = deref_copy (*_3);           // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
         _5 = (((_4.0: std::ptr::Unique<T>).0: std::ptr::NonNull<T>).0: *const T); // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
         _2 = &(*_5);                     // scope 1 at $SRC_DIR/alloc/src/boxed.rs:LL:COL
-        _0 = &(*_2);                     // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:5: +1:15
-        StorageDead(_3);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+1:14: +1:15
-        StorageDead(_2);                 // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+2:1: +2:2
-        return;                          // scope 0 at $DIR/issue-58867-inline-as-ref-as-mut.rs:+2:2: +2:2
+        _0 = &(*_2);                     // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:5: +1:15
+        StorageDead(_3);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+1:14: +1:15
+        StorageDead(_2);                 // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+2:1: +2:2
+        return;                          // scope 0 at $DIR/issue_58867_inline_as_ref_as_mut.rs:+2:2: +2:2
     }
 }
diff --git a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut.rs b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs
index 94f926d3964..94f926d3964 100644
--- a/src/test/mir-opt/inline/issue-58867-inline-as-ref-as-mut.rs
+++ b/src/test/mir-opt/inline/issue_58867_inline_as_ref_as_mut.rs
diff --git a/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir b/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
index fca53a72f88..d99ae1a6c7c 100644
--- a/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
+++ b/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.main.Inline.after.mir
@@ -1,42 +1,42 @@
 // MIR for `main` after Inline
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:+0:11: +0:11
-    let _1: [closure@$DIR/issue-76997-inline-scopes-parenting.rs:5:13: 5:16]; // in scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:+1:9: +1:10
-    let mut _2: &[closure@$DIR/issue-76997-inline-scopes-parenting.rs:5:13: 5:16]; // in scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:5: +2:6
-    let mut _3: ((),);                   // in scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:5: +2:10
-    let mut _4: ();                      // in scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:7: +2:9
-    let mut _5: ();                      // in scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:5: +2:10
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_76997_inline_scopes_parenting.rs:+0:11: +0:11
+    let _1: [closure@$DIR/issue_76997_inline_scopes_parenting.rs:5:13: 5:16]; // in scope 0 at $DIR/issue_76997_inline_scopes_parenting.rs:+1:9: +1:10
+    let mut _2: &[closure@$DIR/issue_76997_inline_scopes_parenting.rs:5:13: 5:16]; // in scope 0 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:5: +2:6
+    let mut _3: ((),);                   // in scope 0 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:5: +2:10
+    let mut _4: ();                      // in scope 0 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:7: +2:9
+    let mut _5: ();                      // in scope 0 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:5: +2:10
     scope 1 {
-        debug f => _1;                   // in scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+1:9: +1:10
-        scope 2 (inlined main::{closure#0}) { // at $DIR/issue-76997-inline-scopes-parenting.rs:6:5: 6:10
-            debug x => _5;               // in scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:+1:14: +1:15
-            let _6: ();                  // in scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:+1:23: +1:24
+        debug f => _1;                   // in scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+1:9: +1:10
+        scope 2 (inlined main::{closure#0}) { // at $DIR/issue_76997_inline_scopes_parenting.rs:6:5: 6:10
+            debug x => _5;               // in scope 2 at $DIR/issue_76997_inline_scopes_parenting.rs:+1:14: +1:15
+            let _6: ();                  // in scope 2 at $DIR/issue_76997_inline_scopes_parenting.rs:+1:23: +1:24
             scope 3 {
-                debug y => _6;           // in scope 3 at $DIR/issue-76997-inline-scopes-parenting.rs:+1:23: +1:24
+                debug y => _6;           // in scope 3 at $DIR/issue_76997_inline_scopes_parenting.rs:+1:23: +1:24
             }
         }
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:+1:9: +1:10
-        Deinit(_1);                      // scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:+1:13: +1:33
-        StorageLive(_2);                 // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:5: +2:6
-        _2 = &_1;                        // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:5: +2:6
-        StorageLive(_3);                 // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:5: +2:10
-        StorageLive(_4);                 // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:7: +2:9
-        Deinit(_4);                      // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:7: +2:9
-        Deinit(_3);                      // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:5: +2:10
-        (_3.0: ()) = move _4;            // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:5: +2:10
-        StorageLive(_5);                 // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:5: +2:10
-        _5 = move (_3.0: ());            // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:5: +2:10
-        StorageLive(_6);                 // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:+1:23: +1:24
-        StorageDead(_6);                 // scope 2 at $DIR/issue-76997-inline-scopes-parenting.rs:+1:32: +1:33
-        StorageDead(_5);                 // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:5: +2:10
-        StorageDead(_4);                 // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:9: +2:10
-        StorageDead(_3);                 // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:9: +2:10
-        StorageDead(_2);                 // scope 1 at $DIR/issue-76997-inline-scopes-parenting.rs:+2:9: +2:10
-        StorageDead(_1);                 // scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:+3:1: +3:2
-        return;                          // scope 0 at $DIR/issue-76997-inline-scopes-parenting.rs:+3:2: +3:2
+        StorageLive(_1);                 // scope 0 at $DIR/issue_76997_inline_scopes_parenting.rs:+1:9: +1:10
+        Deinit(_1);                      // scope 0 at $DIR/issue_76997_inline_scopes_parenting.rs:+1:13: +1:33
+        StorageLive(_2);                 // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:5: +2:6
+        _2 = &_1;                        // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:5: +2:6
+        StorageLive(_3);                 // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:5: +2:10
+        StorageLive(_4);                 // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:7: +2:9
+        Deinit(_4);                      // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:7: +2:9
+        Deinit(_3);                      // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:5: +2:10
+        (_3.0: ()) = move _4;            // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:5: +2:10
+        StorageLive(_5);                 // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:5: +2:10
+        _5 = move (_3.0: ());            // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:5: +2:10
+        StorageLive(_6);                 // scope 2 at $DIR/issue_76997_inline_scopes_parenting.rs:+1:23: +1:24
+        StorageDead(_6);                 // scope 2 at $DIR/issue_76997_inline_scopes_parenting.rs:+1:32: +1:33
+        StorageDead(_5);                 // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:5: +2:10
+        StorageDead(_4);                 // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:9: +2:10
+        StorageDead(_3);                 // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:9: +2:10
+        StorageDead(_2);                 // scope 1 at $DIR/issue_76997_inline_scopes_parenting.rs:+2:9: +2:10
+        StorageDead(_1);                 // scope 0 at $DIR/issue_76997_inline_scopes_parenting.rs:+3:1: +3:2
+        return;                          // scope 0 at $DIR/issue_76997_inline_scopes_parenting.rs:+3:2: +3:2
     }
 }
diff --git a/src/test/mir-opt/inline/issue-76997-inline-scopes-parenting.rs b/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.rs
index 76d806acc63..76d806acc63 100644
--- a/src/test/mir-opt/inline/issue-76997-inline-scopes-parenting.rs
+++ b/src/test/mir-opt/inline/issue_76997_inline_scopes_parenting.rs
diff --git a/src/test/mir-opt/inline/issue_78442.bar.Inline.diff b/src/test/mir-opt/inline/issue_78442.bar.Inline.diff
index 4186650dfab..51a98465fd9 100644
--- a/src/test/mir-opt/inline/issue_78442.bar.Inline.diff
+++ b/src/test/mir-opt/inline/issue_78442.bar.Inline.diff
@@ -2,67 +2,67 @@
 + // MIR for `bar` after Inline
   
   fn bar(_1: P) -> () {
-      debug _baz => _1;                    // in scope 0 at $DIR/issue-78442.rs:+2:5: +2:9
-      let mut _0: ();                      // return place in scope 0 at $DIR/issue-78442.rs:+3:3: +3:3
-      let _2: ();                          // in scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
-      let mut _3: &fn() {foo};             // in scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
-      let _4: fn() {foo};                  // in scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
-      let mut _5: ();                      // in scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
-+     scope 1 (inlined <fn() {foo} as Fn<()>>::call - shim(fn() {foo})) { // at $DIR/issue-78442.rs:11:5: 11:17
+      debug _baz => _1;                    // in scope 0 at $DIR/issue_78442.rs:+2:5: +2:9
+      let mut _0: ();                      // return place in scope 0 at $DIR/issue_78442.rs:+3:3: +3:3
+      let _2: ();                          // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
+      let mut _3: &fn() {foo};             // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
+      let _4: fn() {foo};                  // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
+      let mut _5: ();                      // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
++     scope 1 (inlined <fn() {foo} as Fn<()>>::call - shim(fn() {foo})) { // at $DIR/issue_78442.rs:11:5: 11:17
 +     }
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
-          StorageLive(_3);                 // scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
-          StorageLive(_4);                 // scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
--         _4 = hide_foo() -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
-+         _4 = hide_foo() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
+          StorageLive(_2);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
+          StorageLive(_3);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
+          StorageLive(_4);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
+-         _4 = hide_foo() -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
++         _4 = hide_foo() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
                                            // mir::Constant
-                                           // + span: $DIR/issue-78442.rs:11:5: 11:13
+                                           // + span: $DIR/issue_78442.rs:11:5: 11:13
                                            // + literal: Const { ty: fn() -> impl Fn() {hide_foo}, val: Value(<ZST>) }
       }
   
       bb1: {
-          _3 = &_4;                        // scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
-          StorageLive(_5);                 // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
-          Deinit(_5);                      // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
--         _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
+          _3 = &_4;                        // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
+          StorageLive(_5);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
+          Deinit(_5);                      // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
+-         _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
 -                                          // mir::Constant
--                                          // + span: $DIR/issue-78442.rs:11:5: 11:15
+-                                          // + span: $DIR/issue_78442.rs:11:5: 11:15
 -                                          // + literal: Const { ty: for<'a> extern "rust-call" fn(&'a fn() {foo}, ()) -> <fn() {foo} as FnOnce<()>>::Output {<fn() {foo} as Fn<()>>::call}, val: Value(<ZST>) }
 +         _2 = move (*_3)() -> [return: bb5, unwind: bb3]; // scope 1 at $SRC_DIR/core/src/ops/function.rs:LL:COL
       }
   
       bb2: {
--         StorageDead(_5);                 // scope 0 at $DIR/issue-78442.rs:+4:16: +4:17
--         StorageDead(_3);                 // scope 0 at $DIR/issue-78442.rs:+4:16: +4:17
--         StorageDead(_4);                 // scope 0 at $DIR/issue-78442.rs:+4:17: +4:18
--         StorageDead(_2);                 // scope 0 at $DIR/issue-78442.rs:+4:17: +4:18
--         _0 = const ();                   // scope 0 at $DIR/issue-78442.rs:+3:3: +5:2
--         drop(_1) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/issue-78442.rs:+5:1: +5:2
-+         return;                          // scope 0 at $DIR/issue-78442.rs:+5:2: +5:2
+-         StorageDead(_5);                 // scope 0 at $DIR/issue_78442.rs:+4:16: +4:17
+-         StorageDead(_3);                 // scope 0 at $DIR/issue_78442.rs:+4:16: +4:17
+-         StorageDead(_4);                 // scope 0 at $DIR/issue_78442.rs:+4:17: +4:18
+-         StorageDead(_2);                 // scope 0 at $DIR/issue_78442.rs:+4:17: +4:18
+-         _0 = const ();                   // scope 0 at $DIR/issue_78442.rs:+3:3: +5:2
+-         drop(_1) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/issue_78442.rs:+5:1: +5:2
++         return;                          // scope 0 at $DIR/issue_78442.rs:+5:2: +5:2
       }
   
 -     bb3: {
--         return;                          // scope 0 at $DIR/issue-78442.rs:+5:2: +5:2
+-         return;                          // scope 0 at $DIR/issue_78442.rs:+5:2: +5:2
 +     bb3 (cleanup): {
-+         drop(_1) -> bb4;                 // scope 0 at $DIR/issue-78442.rs:+5:1: +5:2
++         drop(_1) -> bb4;                 // scope 0 at $DIR/issue_78442.rs:+5:1: +5:2
       }
   
       bb4 (cleanup): {
--         drop(_1) -> bb5;                 // scope 0 at $DIR/issue-78442.rs:+5:1: +5:2
-+         resume;                          // scope 0 at $DIR/issue-78442.rs:+0:1: +5:2
+-         drop(_1) -> bb5;                 // scope 0 at $DIR/issue_78442.rs:+5:1: +5:2
++         resume;                          // scope 0 at $DIR/issue_78442.rs:+0:1: +5:2
       }
   
 -     bb5 (cleanup): {
--         resume;                          // scope 0 at $DIR/issue-78442.rs:+0:1: +5:2
+-         resume;                          // scope 0 at $DIR/issue_78442.rs:+0:1: +5:2
 +     bb5: {
-+         StorageDead(_5);                 // scope 0 at $DIR/issue-78442.rs:+4:16: +4:17
-+         StorageDead(_3);                 // scope 0 at $DIR/issue-78442.rs:+4:16: +4:17
-+         StorageDead(_4);                 // scope 0 at $DIR/issue-78442.rs:+4:17: +4:18
-+         StorageDead(_2);                 // scope 0 at $DIR/issue-78442.rs:+4:17: +4:18
-+         _0 = const ();                   // scope 0 at $DIR/issue-78442.rs:+3:3: +5:2
-+         drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:+5:1: +5:2
++         StorageDead(_5);                 // scope 0 at $DIR/issue_78442.rs:+4:16: +4:17
++         StorageDead(_3);                 // scope 0 at $DIR/issue_78442.rs:+4:16: +4:17
++         StorageDead(_4);                 // scope 0 at $DIR/issue_78442.rs:+4:17: +4:18
++         StorageDead(_2);                 // scope 0 at $DIR/issue_78442.rs:+4:17: +4:18
++         _0 = const ();                   // scope 0 at $DIR/issue_78442.rs:+3:3: +5:2
++         drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue_78442.rs:+5:1: +5:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/issue_78442.bar.RevealAll.diff b/src/test/mir-opt/inline/issue_78442.bar.RevealAll.diff
index 24e9a3df15a..e47466c5e80 100644
--- a/src/test/mir-opt/inline/issue_78442.bar.RevealAll.diff
+++ b/src/test/mir-opt/inline/issue_78442.bar.RevealAll.diff
@@ -2,56 +2,56 @@
 + // MIR for `bar` after RevealAll
   
   fn bar(_1: P) -> () {
-      debug _baz => _1;                    // in scope 0 at $DIR/issue-78442.rs:+2:5: +2:9
-      let mut _0: ();                      // return place in scope 0 at $DIR/issue-78442.rs:+3:3: +3:3
-      let _2: ();                          // in scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
--     let mut _3: &impl Fn();              // in scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
--     let _4: impl Fn();                   // in scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
-+     let mut _3: &fn() {foo};             // in scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
-+     let _4: fn() {foo};                  // in scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
-      let mut _5: ();                      // in scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
+      debug _baz => _1;                    // in scope 0 at $DIR/issue_78442.rs:+2:5: +2:9
+      let mut _0: ();                      // return place in scope 0 at $DIR/issue_78442.rs:+3:3: +3:3
+      let _2: ();                          // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
+-     let mut _3: &impl Fn();              // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
+-     let _4: impl Fn();                   // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
++     let mut _3: &fn() {foo};             // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
++     let _4: fn() {foo};                  // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
+      let mut _5: ();                      // in scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
-          StorageLive(_3);                 // scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
-          StorageLive(_4);                 // scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
-          _4 = hide_foo() -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
+          StorageLive(_2);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
+          StorageLive(_3);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
+          StorageLive(_4);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
+          _4 = hide_foo() -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
                                            // mir::Constant
-                                           // + span: $DIR/issue-78442.rs:11:5: 11:13
+                                           // + span: $DIR/issue_78442.rs:11:5: 11:13
                                            // + literal: Const { ty: fn() -> impl Fn() {hide_foo}, val: Value(<ZST>) }
       }
   
       bb1: {
-          _3 = &_4;                        // scope 0 at $DIR/issue-78442.rs:+4:5: +4:15
-          StorageLive(_5);                 // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
-          Deinit(_5);                      // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
--         _2 = <impl Fn() as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
-+         _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-78442.rs:+4:5: +4:17
+          _3 = &_4;                        // scope 0 at $DIR/issue_78442.rs:+4:5: +4:15
+          StorageLive(_5);                 // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
+          Deinit(_5);                      // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
+-         _2 = <impl Fn() as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
++         _2 = <fn() {foo} as Fn<()>>::call(move _3, move _5) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue_78442.rs:+4:5: +4:17
                                            // mir::Constant
-                                           // + span: $DIR/issue-78442.rs:11:5: 11:15
+                                           // + span: $DIR/issue_78442.rs:11:5: 11:15
 -                                          // + literal: Const { ty: for<'a> extern "rust-call" fn(&'a impl Fn(), ()) -> <impl Fn() as FnOnce<()>>::Output {<impl Fn() as Fn<()>>::call}, val: Value(<ZST>) }
 +                                          // + literal: Const { ty: for<'a> extern "rust-call" fn(&'a fn() {foo}, ()) -> <fn() {foo} as FnOnce<()>>::Output {<fn() {foo} as Fn<()>>::call}, val: Value(<ZST>) }
       }
   
       bb2: {
-          StorageDead(_5);                 // scope 0 at $DIR/issue-78442.rs:+4:16: +4:17
-          StorageDead(_3);                 // scope 0 at $DIR/issue-78442.rs:+4:16: +4:17
-          StorageDead(_4);                 // scope 0 at $DIR/issue-78442.rs:+4:17: +4:18
-          StorageDead(_2);                 // scope 0 at $DIR/issue-78442.rs:+4:17: +4:18
-          _0 = const ();                   // scope 0 at $DIR/issue-78442.rs:+3:3: +5:2
-          drop(_1) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/issue-78442.rs:+5:1: +5:2
+          StorageDead(_5);                 // scope 0 at $DIR/issue_78442.rs:+4:16: +4:17
+          StorageDead(_3);                 // scope 0 at $DIR/issue_78442.rs:+4:16: +4:17
+          StorageDead(_4);                 // scope 0 at $DIR/issue_78442.rs:+4:17: +4:18
+          StorageDead(_2);                 // scope 0 at $DIR/issue_78442.rs:+4:17: +4:18
+          _0 = const ();                   // scope 0 at $DIR/issue_78442.rs:+3:3: +5:2
+          drop(_1) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/issue_78442.rs:+5:1: +5:2
       }
   
       bb3: {
-          return;                          // scope 0 at $DIR/issue-78442.rs:+5:2: +5:2
+          return;                          // scope 0 at $DIR/issue_78442.rs:+5:2: +5:2
       }
   
       bb4 (cleanup): {
-          drop(_1) -> bb5;                 // scope 0 at $DIR/issue-78442.rs:+5:1: +5:2
+          drop(_1) -> bb5;                 // scope 0 at $DIR/issue_78442.rs:+5:1: +5:2
       }
   
       bb5 (cleanup): {
-          resume;                          // scope 0 at $DIR/issue-78442.rs:+0:1: +5:2
+          resume;                          // scope 0 at $DIR/issue_78442.rs:+0:1: +5:2
       }
   }
   
diff --git a/src/test/mir-opt/inline/issue-78442.rs b/src/test/mir-opt/inline/issue_78442.rs
index aa8ede2df9e..aa8ede2df9e 100644
--- a/src/test/mir-opt/inline/issue-78442.rs
+++ b/src/test/mir-opt/inline/issue_78442.rs
diff --git a/src/test/mir-opt/inline/polymorphic-recursion.rs b/src/test/mir-opt/inline/polymorphic_recursion.rs
index 7388722b776..7388722b776 100644
--- a/src/test/mir-opt/inline/polymorphic-recursion.rs
+++ b/src/test/mir-opt/inline/polymorphic_recursion.rs
diff --git a/src/test/mir-opt/issue_101973.inner.ConstProp.diff b/src/test/mir-opt/issue_101973.inner.ConstProp.diff
index 281afe4be17..c24abedae92 100644
--- a/src/test/mir-opt/issue_101973.inner.ConstProp.diff
+++ b/src/test/mir-opt/issue_101973.inner.ConstProp.diff
@@ -2,29 +2,29 @@
 + // MIR for `inner` after ConstProp
   
   fn inner(_1: u32) -> i64 {
-      debug fields => _1;                  // in scope 0 at $DIR/issue-101973.rs:+0:14: +0:20
-      let mut _0: i64;                     // return place in scope 0 at $DIR/issue-101973.rs:+0:30: +0:33
-      let mut _2: i32;                     // in scope 0 at $DIR/issue-101973.rs:+1:5: +1:65
-      let mut _3: u32;                     // in scope 0 at $DIR/issue-101973.rs:+1:5: +1:58
-      let mut _4: u32;                     // in scope 0 at $DIR/issue-101973.rs:+1:5: +1:17
-      let mut _5: u32;                     // in scope 0 at $DIR/issue-101973.rs:+1:10: +1:16
-      let mut _6: u32;                     // in scope 0 at $DIR/issue-101973.rs:+1:31: +1:57
-      let mut _7: u32;                     // in scope 0 at $DIR/issue-101973.rs:+1:31: +1:52
-      let mut _8: u32;                     // in scope 0 at $DIR/issue-101973.rs:+1:32: +1:45
-      let mut _9: u32;                     // in scope 0 at $DIR/issue-101973.rs:+1:33: +1:39
-      let mut _10: (u32, bool);            // in scope 0 at $DIR/issue-101973.rs:+1:32: +1:45
-      let mut _11: (u32, bool);            // in scope 0 at $DIR/issue-101973.rs:+1:31: +1:57
-      scope 1 (inlined imm8) {             // at $DIR/issue-101973.rs:14:5: 14:17
-          debug x => _5;                   // in scope 1 at $DIR/issue-101973.rs:5:13: 5:14
-          let mut _12: u32;                // in scope 1 at $DIR/issue-101973.rs:7:12: 7:27
-          let mut _13: u32;                // in scope 1 at $DIR/issue-101973.rs:7:12: 7:20
-          let mut _14: u32;                // in scope 1 at $DIR/issue-101973.rs:7:13: 7:14
-          let mut _15: (u32, bool);        // in scope 1 at $DIR/issue-101973.rs:7:12: 7:20
+      debug fields => _1;                  // in scope 0 at $DIR/issue_101973.rs:+0:14: +0:20
+      let mut _0: i64;                     // return place in scope 0 at $DIR/issue_101973.rs:+0:30: +0:33
+      let mut _2: i32;                     // in scope 0 at $DIR/issue_101973.rs:+1:5: +1:65
+      let mut _3: u32;                     // in scope 0 at $DIR/issue_101973.rs:+1:5: +1:58
+      let mut _4: u32;                     // in scope 0 at $DIR/issue_101973.rs:+1:5: +1:17
+      let mut _5: u32;                     // in scope 0 at $DIR/issue_101973.rs:+1:10: +1:16
+      let mut _6: u32;                     // in scope 0 at $DIR/issue_101973.rs:+1:31: +1:57
+      let mut _7: u32;                     // in scope 0 at $DIR/issue_101973.rs:+1:31: +1:52
+      let mut _8: u32;                     // in scope 0 at $DIR/issue_101973.rs:+1:32: +1:45
+      let mut _9: u32;                     // in scope 0 at $DIR/issue_101973.rs:+1:33: +1:39
+      let mut _10: (u32, bool);            // in scope 0 at $DIR/issue_101973.rs:+1:32: +1:45
+      let mut _11: (u32, bool);            // in scope 0 at $DIR/issue_101973.rs:+1:31: +1:57
+      scope 1 (inlined imm8) {             // at $DIR/issue_101973.rs:14:5: 14:17
+          debug x => _5;                   // in scope 1 at $DIR/issue_101973.rs:5:13: 5:14
+          let mut _12: u32;                // in scope 1 at $DIR/issue_101973.rs:7:12: 7:27
+          let mut _13: u32;                // in scope 1 at $DIR/issue_101973.rs:7:12: 7:20
+          let mut _14: u32;                // in scope 1 at $DIR/issue_101973.rs:7:13: 7:14
+          let mut _15: (u32, bool);        // in scope 1 at $DIR/issue_101973.rs:7:12: 7:20
           scope 2 {
-              debug out => _4;             // in scope 2 at $DIR/issue-101973.rs:6:9: 6:16
+              debug out => _4;             // in scope 2 at $DIR/issue_101973.rs:6:9: 6:16
           }
       }
-      scope 3 (inlined core::num::<impl u32>::rotate_right) { // at $DIR/issue-101973.rs:14:5: 14:58
+      scope 3 (inlined core::num::<impl u32>::rotate_right) { // at $DIR/issue_101973.rs:14:5: 14:58
           debug self => _4;                // in scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
           debug n => _6;                   // in scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
           let mut _16: u32;                // in scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
@@ -32,32 +32,32 @@
       }
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/issue-101973.rs:+1:5: +1:65
-          StorageLive(_3);                 // scope 0 at $DIR/issue-101973.rs:+1:5: +1:58
-          StorageLive(_4);                 // scope 0 at $DIR/issue-101973.rs:+1:5: +1:17
-          StorageLive(_5);                 // scope 0 at $DIR/issue-101973.rs:+1:10: +1:16
-          _5 = _1;                         // scope 0 at $DIR/issue-101973.rs:+1:10: +1:16
-          _4 = const 0_u32;                // scope 1 at $DIR/issue-101973.rs:6:19: 6:23
-          StorageLive(_12);                // scope 2 at $DIR/issue-101973.rs:7:12: 7:27
-          StorageLive(_13);                // scope 2 at $DIR/issue-101973.rs:7:12: 7:20
-          StorageLive(_14);                // scope 2 at $DIR/issue-101973.rs:7:13: 7:14
-          _14 = _5;                        // scope 2 at $DIR/issue-101973.rs:7:13: 7:14
-          _15 = CheckedShr(_14, const 0_i32); // scope 2 at $DIR/issue-101973.rs:7:12: 7:20
-          assert(!move (_15.1: bool), "attempt to shift right by `{}`, which would overflow", const 0_i32) -> bb3; // scope 2 at $DIR/issue-101973.rs:7:12: 7:20
+          StorageLive(_2);                 // scope 0 at $DIR/issue_101973.rs:+1:5: +1:65
+          StorageLive(_3);                 // scope 0 at $DIR/issue_101973.rs:+1:5: +1:58
+          StorageLive(_4);                 // scope 0 at $DIR/issue_101973.rs:+1:5: +1:17
+          StorageLive(_5);                 // scope 0 at $DIR/issue_101973.rs:+1:10: +1:16
+          _5 = _1;                         // scope 0 at $DIR/issue_101973.rs:+1:10: +1:16
+          _4 = const 0_u32;                // scope 1 at $DIR/issue_101973.rs:6:19: 6:23
+          StorageLive(_12);                // scope 2 at $DIR/issue_101973.rs:7:12: 7:27
+          StorageLive(_13);                // scope 2 at $DIR/issue_101973.rs:7:12: 7:20
+          StorageLive(_14);                // scope 2 at $DIR/issue_101973.rs:7:13: 7:14
+          _14 = _5;                        // scope 2 at $DIR/issue_101973.rs:7:13: 7:14
+          _15 = CheckedShr(_14, const 0_i32); // scope 2 at $DIR/issue_101973.rs:7:12: 7:20
+          assert(!move (_15.1: bool), "attempt to shift right by `{}`, which would overflow", const 0_i32) -> bb3; // scope 2 at $DIR/issue_101973.rs:7:12: 7:20
       }
   
       bb1: {
-          _8 = move (_10.0: u32);          // scope 0 at $DIR/issue-101973.rs:+1:32: +1:45
-          StorageDead(_9);                 // scope 0 at $DIR/issue-101973.rs:+1:44: +1:45
-          _7 = BitAnd(move _8, const 15_u32); // scope 0 at $DIR/issue-101973.rs:+1:31: +1:52
-          StorageDead(_8);                 // scope 0 at $DIR/issue-101973.rs:+1:51: +1:52
-          _11 = CheckedShl(_7, const 1_i32); // scope 0 at $DIR/issue-101973.rs:+1:31: +1:57
-          assert(!move (_11.1: bool), "attempt to shift left by `{}`, which would overflow", const 1_i32) -> bb2; // scope 0 at $DIR/issue-101973.rs:+1:31: +1:57
+          _8 = move (_10.0: u32);          // scope 0 at $DIR/issue_101973.rs:+1:32: +1:45
+          StorageDead(_9);                 // scope 0 at $DIR/issue_101973.rs:+1:44: +1:45
+          _7 = BitAnd(move _8, const 15_u32); // scope 0 at $DIR/issue_101973.rs:+1:31: +1:52
+          StorageDead(_8);                 // scope 0 at $DIR/issue_101973.rs:+1:51: +1:52
+          _11 = CheckedShl(_7, const 1_i32); // scope 0 at $DIR/issue_101973.rs:+1:31: +1:57
+          assert(!move (_11.1: bool), "attempt to shift left by `{}`, which would overflow", const 1_i32) -> bb2; // scope 0 at $DIR/issue_101973.rs:+1:31: +1:57
       }
   
       bb2: {
-          _6 = move (_11.0: u32);          // scope 0 at $DIR/issue-101973.rs:+1:31: +1:57
-          StorageDead(_7);                 // scope 0 at $DIR/issue-101973.rs:+1:56: +1:57
+          _6 = move (_11.0: u32);          // scope 0 at $DIR/issue_101973.rs:+1:31: +1:57
+          StorageDead(_7);                 // scope 0 at $DIR/issue_101973.rs:+1:56: +1:57
           StorageLive(_16);                // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
           _16 = _4;                        // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
           StorageLive(_17);                // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
@@ -69,32 +69,32 @@
       }
   
       bb3: {
-          _13 = move (_15.0: u32);         // scope 2 at $DIR/issue-101973.rs:7:12: 7:20
-          StorageDead(_14);                // scope 2 at $DIR/issue-101973.rs:7:19: 7:20
-          _12 = BitAnd(move _13, const 255_u32); // scope 2 at $DIR/issue-101973.rs:7:12: 7:27
-          StorageDead(_13);                // scope 2 at $DIR/issue-101973.rs:7:26: 7:27
-          _4 = BitOr(_4, move _12);        // scope 2 at $DIR/issue-101973.rs:7:5: 7:27
-          StorageDead(_12);                // scope 2 at $DIR/issue-101973.rs:7:26: 7:27
-          StorageDead(_5);                 // scope 0 at $DIR/issue-101973.rs:+1:16: +1:17
-          StorageLive(_6);                 // scope 0 at $DIR/issue-101973.rs:+1:31: +1:57
-          StorageLive(_7);                 // scope 0 at $DIR/issue-101973.rs:+1:31: +1:52
-          StorageLive(_8);                 // scope 0 at $DIR/issue-101973.rs:+1:32: +1:45
-          StorageLive(_9);                 // scope 0 at $DIR/issue-101973.rs:+1:33: +1:39
-          _9 = _1;                         // scope 0 at $DIR/issue-101973.rs:+1:33: +1:39
-          _10 = CheckedShr(_9, const 8_i32); // scope 0 at $DIR/issue-101973.rs:+1:32: +1:45
-          assert(!move (_10.1: bool), "attempt to shift right by `{}`, which would overflow", const 8_i32) -> bb1; // scope 0 at $DIR/issue-101973.rs:+1:32: +1:45
+          _13 = move (_15.0: u32);         // scope 2 at $DIR/issue_101973.rs:7:12: 7:20
+          StorageDead(_14);                // scope 2 at $DIR/issue_101973.rs:7:19: 7:20
+          _12 = BitAnd(move _13, const 255_u32); // scope 2 at $DIR/issue_101973.rs:7:12: 7:27
+          StorageDead(_13);                // scope 2 at $DIR/issue_101973.rs:7:26: 7:27
+          _4 = BitOr(_4, move _12);        // scope 2 at $DIR/issue_101973.rs:7:5: 7:27
+          StorageDead(_12);                // scope 2 at $DIR/issue_101973.rs:7:26: 7:27
+          StorageDead(_5);                 // scope 0 at $DIR/issue_101973.rs:+1:16: +1:17
+          StorageLive(_6);                 // scope 0 at $DIR/issue_101973.rs:+1:31: +1:57
+          StorageLive(_7);                 // scope 0 at $DIR/issue_101973.rs:+1:31: +1:52
+          StorageLive(_8);                 // scope 0 at $DIR/issue_101973.rs:+1:32: +1:45
+          StorageLive(_9);                 // scope 0 at $DIR/issue_101973.rs:+1:33: +1:39
+          _9 = _1;                         // scope 0 at $DIR/issue_101973.rs:+1:33: +1:39
+          _10 = CheckedShr(_9, const 8_i32); // scope 0 at $DIR/issue_101973.rs:+1:32: +1:45
+          assert(!move (_10.1: bool), "attempt to shift right by `{}`, which would overflow", const 8_i32) -> bb1; // scope 0 at $DIR/issue_101973.rs:+1:32: +1:45
       }
   
       bb4: {
           StorageDead(_17);                // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
           StorageDead(_16);                // scope 3 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL
-          StorageDead(_6);                 // scope 0 at $DIR/issue-101973.rs:+1:57: +1:58
-          StorageDead(_4);                 // scope 0 at $DIR/issue-101973.rs:+1:57: +1:58
-          _2 = move _3 as i32 (IntToInt);  // scope 0 at $DIR/issue-101973.rs:+1:5: +1:65
-          StorageDead(_3);                 // scope 0 at $DIR/issue-101973.rs:+1:64: +1:65
-          _0 = move _2 as i64 (IntToInt);  // scope 0 at $DIR/issue-101973.rs:+1:5: +1:72
-          StorageDead(_2);                 // scope 0 at $DIR/issue-101973.rs:+1:71: +1:72
-          return;                          // scope 0 at $DIR/issue-101973.rs:+2:2: +2:2
+          StorageDead(_6);                 // scope 0 at $DIR/issue_101973.rs:+1:57: +1:58
+          StorageDead(_4);                 // scope 0 at $DIR/issue_101973.rs:+1:57: +1:58
+          _2 = move _3 as i32 (IntToInt);  // scope 0 at $DIR/issue_101973.rs:+1:5: +1:65
+          StorageDead(_3);                 // scope 0 at $DIR/issue_101973.rs:+1:64: +1:65
+          _0 = move _2 as i64 (IntToInt);  // scope 0 at $DIR/issue_101973.rs:+1:5: +1:72
+          StorageDead(_2);                 // scope 0 at $DIR/issue_101973.rs:+1:71: +1:72
+          return;                          // scope 0 at $DIR/issue_101973.rs:+2:2: +2:2
       }
   }
   
diff --git a/src/test/mir-opt/issue-101973.rs b/src/test/mir-opt/issue_101973.rs
index 216659a235e..216659a235e 100644
--- a/src/test/mir-opt/issue-101973.rs
+++ b/src/test/mir-opt/issue_101973.rs
diff --git a/src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir b/src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir
index b13987f7360..82210081832 100644
--- a/src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir
+++ b/src/test/mir-opt/issue_38669.main.SimplifyCfg-initial.after.mir
@@ -1,52 +1,52 @@
 // MIR for `main` after SimplifyCfg-initial
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-38669.rs:+0:11: +0:11
-    let mut _1: bool;                    // in scope 0 at $DIR/issue-38669.rs:+1:9: +1:25
-    let mut _2: ();                      // in scope 0 at $DIR/issue-38669.rs:+0:1: +8:2
-    let _3: ();                          // in scope 0 at $DIR/issue-38669.rs:+3:9: +5:10
-    let mut _4: bool;                    // in scope 0 at $DIR/issue-38669.rs:+3:12: +3:24
-    let mut _5: !;                       // in scope 0 at $DIR/issue-38669.rs:+3:25: +5:10
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_38669.rs:+0:11: +0:11
+    let mut _1: bool;                    // in scope 0 at $DIR/issue_38669.rs:+1:9: +1:25
+    let mut _2: ();                      // in scope 0 at $DIR/issue_38669.rs:+0:1: +8:2
+    let _3: ();                          // in scope 0 at $DIR/issue_38669.rs:+3:9: +5:10
+    let mut _4: bool;                    // in scope 0 at $DIR/issue_38669.rs:+3:12: +3:24
+    let mut _5: !;                       // in scope 0 at $DIR/issue_38669.rs:+3:25: +5:10
     scope 1 {
-        debug should_break => _1;        // in scope 1 at $DIR/issue-38669.rs:+1:9: +1:25
+        debug should_break => _1;        // in scope 1 at $DIR/issue_38669.rs:+1:9: +1:25
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/issue-38669.rs:+1:9: +1:25
-        _1 = const false;                // scope 0 at $DIR/issue-38669.rs:+1:28: +1:33
-        FakeRead(ForLet(None), _1);      // scope 0 at $DIR/issue-38669.rs:+1:9: +1:25
-        goto -> bb1;                     // scope 1 at $DIR/issue-38669.rs:+2:5: +7:6
+        StorageLive(_1);                 // scope 0 at $DIR/issue_38669.rs:+1:9: +1:25
+        _1 = const false;                // scope 0 at $DIR/issue_38669.rs:+1:28: +1:33
+        FakeRead(ForLet(None), _1);      // scope 0 at $DIR/issue_38669.rs:+1:9: +1:25
+        goto -> bb1;                     // scope 1 at $DIR/issue_38669.rs:+2:5: +7:6
     }
 
     bb1: {
-        falseUnwind -> [real: bb2, cleanup: bb5]; // scope 1 at $DIR/issue-38669.rs:+2:5: +7:6
+        falseUnwind -> [real: bb2, cleanup: bb5]; // scope 1 at $DIR/issue_38669.rs:+2:5: +7:6
     }
 
     bb2: {
-        StorageLive(_3);                 // scope 1 at $DIR/issue-38669.rs:+3:9: +5:10
-        StorageLive(_4);                 // scope 1 at $DIR/issue-38669.rs:+3:12: +3:24
-        _4 = _1;                         // scope 1 at $DIR/issue-38669.rs:+3:12: +3:24
-        switchInt(move _4) -> [false: bb4, otherwise: bb3]; // scope 1 at $DIR/issue-38669.rs:+3:12: +3:24
+        StorageLive(_3);                 // scope 1 at $DIR/issue_38669.rs:+3:9: +5:10
+        StorageLive(_4);                 // scope 1 at $DIR/issue_38669.rs:+3:12: +3:24
+        _4 = _1;                         // scope 1 at $DIR/issue_38669.rs:+3:12: +3:24
+        switchInt(move _4) -> [false: bb4, otherwise: bb3]; // scope 1 at $DIR/issue_38669.rs:+3:12: +3:24
     }
 
     bb3: {
-        _0 = const ();                   // scope 1 at $DIR/issue-38669.rs:+4:13: +4:18
-        StorageDead(_4);                 // scope 1 at $DIR/issue-38669.rs:+5:9: +5:10
-        StorageDead(_3);                 // scope 1 at $DIR/issue-38669.rs:+5:9: +5:10
-        StorageDead(_1);                 // scope 0 at $DIR/issue-38669.rs:+8:1: +8:2
-        return;                          // scope 0 at $DIR/issue-38669.rs:+8:2: +8:2
+        _0 = const ();                   // scope 1 at $DIR/issue_38669.rs:+4:13: +4:18
+        StorageDead(_4);                 // scope 1 at $DIR/issue_38669.rs:+5:9: +5:10
+        StorageDead(_3);                 // scope 1 at $DIR/issue_38669.rs:+5:9: +5:10
+        StorageDead(_1);                 // scope 0 at $DIR/issue_38669.rs:+8:1: +8:2
+        return;                          // scope 0 at $DIR/issue_38669.rs:+8:2: +8:2
     }
 
     bb4: {
-        _3 = const ();                   // scope 1 at $DIR/issue-38669.rs:+5:10: +5:10
-        StorageDead(_4);                 // scope 1 at $DIR/issue-38669.rs:+5:9: +5:10
-        StorageDead(_3);                 // scope 1 at $DIR/issue-38669.rs:+5:9: +5:10
-        _1 = const true;                 // scope 1 at $DIR/issue-38669.rs:+6:9: +6:28
-        _2 = const ();                   // scope 1 at $DIR/issue-38669.rs:+2:10: +7:6
-        goto -> bb1;                     // scope 1 at $DIR/issue-38669.rs:+2:5: +7:6
+        _3 = const ();                   // scope 1 at $DIR/issue_38669.rs:+5:10: +5:10
+        StorageDead(_4);                 // scope 1 at $DIR/issue_38669.rs:+5:9: +5:10
+        StorageDead(_3);                 // scope 1 at $DIR/issue_38669.rs:+5:9: +5:10
+        _1 = const true;                 // scope 1 at $DIR/issue_38669.rs:+6:9: +6:28
+        _2 = const ();                   // scope 1 at $DIR/issue_38669.rs:+2:10: +7:6
+        goto -> bb1;                     // scope 1 at $DIR/issue_38669.rs:+2:5: +7:6
     }
 
     bb5 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-38669.rs:+0:1: +8:2
+        resume;                          // scope 0 at $DIR/issue_38669.rs:+0:1: +8:2
     }
 }
diff --git a/src/test/mir-opt/issue-38669.rs b/src/test/mir-opt/issue_38669.rs
index db3f89472c9..db3f89472c9 100644
--- a/src/test/mir-opt/issue-38669.rs
+++ b/src/test/mir-opt/issue_38669.rs
diff --git a/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir
index 1d7cb91d6a7..c573ad5a8e4 100644
--- a/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir
+++ b/src/test/mir-opt/issue_41110.main.ElaborateDrops.after.mir
@@ -1,70 +1,70 @@
 // MIR for `main` after ElaborateDrops
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-41110.rs:+0:11: +0:11
-    let _1: ();                          // in scope 0 at $DIR/issue-41110.rs:+1:9: +1:10
-    let mut _2: S;                       // in scope 0 at $DIR/issue-41110.rs:+1:13: +1:14
-    let mut _3: S;                       // in scope 0 at $DIR/issue-41110.rs:+1:21: +1:27
-    let mut _4: S;                       // in scope 0 at $DIR/issue-41110.rs:+1:21: +1:22
-    let mut _5: bool;                    // in scope 0 at $DIR/issue-41110.rs:+1:27: +1:28
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_41110.rs:+0:11: +0:11
+    let _1: ();                          // in scope 0 at $DIR/issue_41110.rs:+1:9: +1:10
+    let mut _2: S;                       // in scope 0 at $DIR/issue_41110.rs:+1:13: +1:14
+    let mut _3: S;                       // in scope 0 at $DIR/issue_41110.rs:+1:21: +1:27
+    let mut _4: S;                       // in scope 0 at $DIR/issue_41110.rs:+1:21: +1:22
+    let mut _5: bool;                    // in scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
     scope 1 {
-        debug x => _1;                   // in scope 1 at $DIR/issue-41110.rs:+1:9: +1:10
+        debug x => _1;                   // in scope 1 at $DIR/issue_41110.rs:+1:9: +1:10
     }
 
     bb0: {
-        _5 = const false;                // scope 0 at $DIR/issue-41110.rs:+1:9: +1:10
-        StorageLive(_1);                 // scope 0 at $DIR/issue-41110.rs:+1:9: +1:10
-        StorageLive(_2);                 // scope 0 at $DIR/issue-41110.rs:+1:13: +1:14
-        _5 = const true;                 // scope 0 at $DIR/issue-41110.rs:+1:13: +1:14
-        _2 = S;                          // scope 0 at $DIR/issue-41110.rs:+1:13: +1:14
-        StorageLive(_3);                 // scope 0 at $DIR/issue-41110.rs:+1:21: +1:27
-        StorageLive(_4);                 // scope 0 at $DIR/issue-41110.rs:+1:21: +1:22
-        _4 = S;                          // scope 0 at $DIR/issue-41110.rs:+1:21: +1:22
-        _3 = S::id(move _4) -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/issue-41110.rs:+1:21: +1:27
+        _5 = const false;                // scope 0 at $DIR/issue_41110.rs:+1:9: +1:10
+        StorageLive(_1);                 // scope 0 at $DIR/issue_41110.rs:+1:9: +1:10
+        StorageLive(_2);                 // scope 0 at $DIR/issue_41110.rs:+1:13: +1:14
+        _5 = const true;                 // scope 0 at $DIR/issue_41110.rs:+1:13: +1:14
+        _2 = S;                          // scope 0 at $DIR/issue_41110.rs:+1:13: +1:14
+        StorageLive(_3);                 // scope 0 at $DIR/issue_41110.rs:+1:21: +1:27
+        StorageLive(_4);                 // scope 0 at $DIR/issue_41110.rs:+1:21: +1:22
+        _4 = S;                          // scope 0 at $DIR/issue_41110.rs:+1:21: +1:22
+        _3 = S::id(move _4) -> [return: bb1, unwind: bb4]; // scope 0 at $DIR/issue_41110.rs:+1:21: +1:27
                                          // mir::Constant
-                                         // + span: $DIR/issue-41110.rs:8:23: 8:25
+                                         // + span: $DIR/issue_41110.rs:8:23: 8:25
                                          // + literal: Const { ty: fn(S) -> S {S::id}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_4);                 // scope 0 at $DIR/issue-41110.rs:+1:26: +1:27
-        _5 = const false;                // scope 0 at $DIR/issue-41110.rs:+1:13: +1:28
-        _1 = S::other(move _2, move _3) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/issue-41110.rs:+1:13: +1:28
+        StorageDead(_4);                 // scope 0 at $DIR/issue_41110.rs:+1:26: +1:27
+        _5 = const false;                // scope 0 at $DIR/issue_41110.rs:+1:13: +1:28
+        _1 = S::other(move _2, move _3) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/issue_41110.rs:+1:13: +1:28
                                          // mir::Constant
-                                         // + span: $DIR/issue-41110.rs:8:15: 8:20
+                                         // + span: $DIR/issue_41110.rs:8:15: 8:20
                                          // + literal: Const { ty: fn(S, S) {S::other}, val: Value(<ZST>) }
     }
 
     bb2: {
-        StorageDead(_3);                 // scope 0 at $DIR/issue-41110.rs:+1:27: +1:28
-        _5 = const false;                // scope 0 at $DIR/issue-41110.rs:+1:27: +1:28
-        StorageDead(_2);                 // scope 0 at $DIR/issue-41110.rs:+1:27: +1:28
-        _0 = const ();                   // scope 0 at $DIR/issue-41110.rs:+0:11: +2:2
-        StorageDead(_1);                 // scope 0 at $DIR/issue-41110.rs:+2:1: +2:2
-        return;                          // scope 0 at $DIR/issue-41110.rs:+2:2: +2:2
+        StorageDead(_3);                 // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
+        _5 = const false;                // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
+        StorageDead(_2);                 // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
+        _0 = const ();                   // scope 0 at $DIR/issue_41110.rs:+0:11: +2:2
+        StorageDead(_1);                 // scope 0 at $DIR/issue_41110.rs:+2:1: +2:2
+        return;                          // scope 0 at $DIR/issue_41110.rs:+2:2: +2:2
     }
 
     bb3 (cleanup): {
-        goto -> bb5;                     // scope 0 at $DIR/issue-41110.rs:+1:27: +1:28
+        goto -> bb5;                     // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
     }
 
     bb4 (cleanup): {
-        goto -> bb5;                     // scope 0 at $DIR/issue-41110.rs:+1:26: +1:27
+        goto -> bb5;                     // scope 0 at $DIR/issue_41110.rs:+1:26: +1:27
     }
 
     bb5 (cleanup): {
-        goto -> bb8;                     // scope 0 at $DIR/issue-41110.rs:+1:27: +1:28
+        goto -> bb8;                     // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
     }
 
     bb6 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-41110.rs:+0:1: +2:2
+        resume;                          // scope 0 at $DIR/issue_41110.rs:+0:1: +2:2
     }
 
     bb7 (cleanup): {
-        drop(_2) -> bb6;                 // scope 0 at $DIR/issue-41110.rs:+1:27: +1:28
+        drop(_2) -> bb6;                 // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
     }
 
     bb8 (cleanup): {
-        switchInt(_5) -> [false: bb6, otherwise: bb7]; // scope 0 at $DIR/issue-41110.rs:+1:27: +1:28
+        switchInt(_5) -> [false: bb6, otherwise: bb7]; // scope 0 at $DIR/issue_41110.rs:+1:27: +1:28
     }
 }
diff --git a/src/test/mir-opt/issue-41110.rs b/src/test/mir-opt/issue_41110.rs
index 638dc601ec8..638dc601ec8 100644
--- a/src/test/mir-opt/issue-41110.rs
+++ b/src/test/mir-opt/issue_41110.rs
diff --git a/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir
index b0e3496b2c8..470b0323281 100644
--- a/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir
+++ b/src/test/mir-opt/issue_41110.test.ElaborateDrops.after.mir
@@ -1,101 +1,101 @@
 // MIR for `test` after ElaborateDrops
 
 fn test() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-41110.rs:+0:15: +0:15
-    let _1: S;                           // in scope 0 at $DIR/issue-41110.rs:+1:9: +1:10
-    let _3: ();                          // in scope 0 at $DIR/issue-41110.rs:+3:5: +3:12
-    let mut _4: S;                       // in scope 0 at $DIR/issue-41110.rs:+3:10: +3:11
-    let mut _5: S;                       // in scope 0 at $DIR/issue-41110.rs:+4:9: +4:10
-    let mut _6: bool;                    // in scope 0 at $DIR/issue-41110.rs:+5:1: +5:2
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_41110.rs:+0:15: +0:15
+    let _1: S;                           // in scope 0 at $DIR/issue_41110.rs:+1:9: +1:10
+    let _3: ();                          // in scope 0 at $DIR/issue_41110.rs:+3:5: +3:12
+    let mut _4: S;                       // in scope 0 at $DIR/issue_41110.rs:+3:10: +3:11
+    let mut _5: S;                       // in scope 0 at $DIR/issue_41110.rs:+4:9: +4:10
+    let mut _6: bool;                    // in scope 0 at $DIR/issue_41110.rs:+5:1: +5:2
     scope 1 {
-        debug u => _1;                   // in scope 1 at $DIR/issue-41110.rs:+1:9: +1:10
-        let mut _2: S;                   // in scope 1 at $DIR/issue-41110.rs:+2:9: +2:14
+        debug u => _1;                   // in scope 1 at $DIR/issue_41110.rs:+1:9: +1:10
+        let mut _2: S;                   // in scope 1 at $DIR/issue_41110.rs:+2:9: +2:14
         scope 2 {
-            debug v => _2;               // in scope 2 at $DIR/issue-41110.rs:+2:9: +2:14
+            debug v => _2;               // in scope 2 at $DIR/issue_41110.rs:+2:9: +2:14
         }
     }
 
     bb0: {
-        _6 = const false;                // scope 0 at $DIR/issue-41110.rs:+1:9: +1:10
-        StorageLive(_1);                 // scope 0 at $DIR/issue-41110.rs:+1:9: +1:10
-        _6 = const true;                 // scope 0 at $DIR/issue-41110.rs:+1:13: +1:14
-        _1 = S;                          // scope 0 at $DIR/issue-41110.rs:+1:13: +1:14
-        StorageLive(_2);                 // scope 1 at $DIR/issue-41110.rs:+2:9: +2:14
-        _2 = S;                          // scope 1 at $DIR/issue-41110.rs:+2:17: +2:18
-        StorageLive(_3);                 // scope 2 at $DIR/issue-41110.rs:+3:5: +3:12
-        StorageLive(_4);                 // scope 2 at $DIR/issue-41110.rs:+3:10: +3:11
-        _4 = move _2;                    // scope 2 at $DIR/issue-41110.rs:+3:10: +3:11
-        _3 = std::mem::drop::<S>(move _4) -> [return: bb1, unwind: bb7]; // scope 2 at $DIR/issue-41110.rs:+3:5: +3:12
+        _6 = const false;                // scope 0 at $DIR/issue_41110.rs:+1:9: +1:10
+        StorageLive(_1);                 // scope 0 at $DIR/issue_41110.rs:+1:9: +1:10
+        _6 = const true;                 // scope 0 at $DIR/issue_41110.rs:+1:13: +1:14
+        _1 = S;                          // scope 0 at $DIR/issue_41110.rs:+1:13: +1:14
+        StorageLive(_2);                 // scope 1 at $DIR/issue_41110.rs:+2:9: +2:14
+        _2 = S;                          // scope 1 at $DIR/issue_41110.rs:+2:17: +2:18
+        StorageLive(_3);                 // scope 2 at $DIR/issue_41110.rs:+3:5: +3:12
+        StorageLive(_4);                 // scope 2 at $DIR/issue_41110.rs:+3:10: +3:11
+        _4 = move _2;                    // scope 2 at $DIR/issue_41110.rs:+3:10: +3:11
+        _3 = std::mem::drop::<S>(move _4) -> [return: bb1, unwind: bb7]; // scope 2 at $DIR/issue_41110.rs:+3:5: +3:12
                                          // mir::Constant
-                                         // + span: $DIR/issue-41110.rs:17:5: 17:9
+                                         // + span: $DIR/issue_41110.rs:17:5: 17:9
                                          // + literal: Const { ty: fn(S) {std::mem::drop::<S>}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_4);                 // scope 2 at $DIR/issue-41110.rs:+3:11: +3:12
-        StorageDead(_3);                 // scope 2 at $DIR/issue-41110.rs:+3:12: +3:13
-        StorageLive(_5);                 // scope 2 at $DIR/issue-41110.rs:+4:9: +4:10
-        _6 = const false;                // scope 2 at $DIR/issue-41110.rs:+4:9: +4:10
-        _5 = move _1;                    // scope 2 at $DIR/issue-41110.rs:+4:9: +4:10
-        goto -> bb12;                    // scope 2 at $DIR/issue-41110.rs:+4:5: +4:6
+        StorageDead(_4);                 // scope 2 at $DIR/issue_41110.rs:+3:11: +3:12
+        StorageDead(_3);                 // scope 2 at $DIR/issue_41110.rs:+3:12: +3:13
+        StorageLive(_5);                 // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10
+        _6 = const false;                // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10
+        _5 = move _1;                    // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10
+        goto -> bb12;                    // scope 2 at $DIR/issue_41110.rs:+4:5: +4:6
     }
 
     bb2: {
-        goto -> bb3;                     // scope 2 at $DIR/issue-41110.rs:+4:9: +4:10
+        goto -> bb3;                     // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10
     }
 
     bb3: {
-        StorageDead(_5);                 // scope 2 at $DIR/issue-41110.rs:+4:9: +4:10
-        _0 = const ();                   // scope 0 at $DIR/issue-41110.rs:+0:15: +5:2
-        drop(_2) -> [return: bb4, unwind: bb9]; // scope 1 at $DIR/issue-41110.rs:+5:1: +5:2
+        StorageDead(_5);                 // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10
+        _0 = const ();                   // scope 0 at $DIR/issue_41110.rs:+0:15: +5:2
+        drop(_2) -> [return: bb4, unwind: bb9]; // scope 1 at $DIR/issue_41110.rs:+5:1: +5:2
     }
 
     bb4: {
-        StorageDead(_2);                 // scope 1 at $DIR/issue-41110.rs:+5:1: +5:2
-        goto -> bb5;                     // scope 0 at $DIR/issue-41110.rs:+5:1: +5:2
+        StorageDead(_2);                 // scope 1 at $DIR/issue_41110.rs:+5:1: +5:2
+        goto -> bb5;                     // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2
     }
 
     bb5: {
-        _6 = const false;                // scope 0 at $DIR/issue-41110.rs:+5:1: +5:2
-        StorageDead(_1);                 // scope 0 at $DIR/issue-41110.rs:+5:1: +5:2
-        return;                          // scope 0 at $DIR/issue-41110.rs:+5:2: +5:2
+        _6 = const false;                // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2
+        StorageDead(_1);                 // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2
+        return;                          // scope 0 at $DIR/issue_41110.rs:+5:2: +5:2
     }
 
     bb6 (cleanup): {
-        goto -> bb8;                     // scope 2 at $DIR/issue-41110.rs:+4:9: +4:10
+        goto -> bb8;                     // scope 2 at $DIR/issue_41110.rs:+4:9: +4:10
     }
 
     bb7 (cleanup): {
-        goto -> bb8;                     // scope 2 at $DIR/issue-41110.rs:+3:11: +3:12
+        goto -> bb8;                     // scope 2 at $DIR/issue_41110.rs:+3:11: +3:12
     }
 
     bb8 (cleanup): {
-        goto -> bb9;                     // scope 1 at $DIR/issue-41110.rs:+5:1: +5:2
+        goto -> bb9;                     // scope 1 at $DIR/issue_41110.rs:+5:1: +5:2
     }
 
     bb9 (cleanup): {
-        goto -> bb14;                    // scope 0 at $DIR/issue-41110.rs:+5:1: +5:2
+        goto -> bb14;                    // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2
     }
 
     bb10 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-41110.rs:+0:1: +5:2
+        resume;                          // scope 0 at $DIR/issue_41110.rs:+0:1: +5:2
     }
 
     bb11 (cleanup): {
-        _2 = move _5;                    // scope 2 at $DIR/issue-41110.rs:+4:5: +4:6
-        goto -> bb6;                     // scope 2 at $DIR/issue-41110.rs:+4:5: +4:6
+        _2 = move _5;                    // scope 2 at $DIR/issue_41110.rs:+4:5: +4:6
+        goto -> bb6;                     // scope 2 at $DIR/issue_41110.rs:+4:5: +4:6
     }
 
     bb12: {
-        _2 = move _5;                    // scope 2 at $DIR/issue-41110.rs:+4:5: +4:6
-        goto -> bb2;                     // scope 2 at $DIR/issue-41110.rs:+4:5: +4:6
+        _2 = move _5;                    // scope 2 at $DIR/issue_41110.rs:+4:5: +4:6
+        goto -> bb2;                     // scope 2 at $DIR/issue_41110.rs:+4:5: +4:6
     }
 
     bb13 (cleanup): {
-        drop(_1) -> bb10;                // scope 0 at $DIR/issue-41110.rs:+5:1: +5:2
+        drop(_1) -> bb10;                // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2
     }
 
     bb14 (cleanup): {
-        switchInt(_6) -> [false: bb10, otherwise: bb13]; // scope 0 at $DIR/issue-41110.rs:+5:1: +5:2
+        switchInt(_6) -> [false: bb10, otherwise: bb13]; // scope 0 at $DIR/issue_41110.rs:+5:1: +5:2
     }
 }
diff --git a/src/test/mir-opt/issue-41697.rs b/src/test/mir-opt/issue_41697.rs
index cbd8633a345..cbd8633a345 100644
--- a/src/test/mir-opt/issue-41697.rs
+++ b/src/test/mir-opt/issue_41697.rs
diff --git a/src/test/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir b/src/test/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir
index 047b24db466..8af087d84f1 100644
--- a/src/test/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir
+++ b/src/test/mir-opt/issue_41697.{impl#0}-{constant#0}.SimplifyCfg-promote-consts.after.mir
@@ -1,20 +1,20 @@
-// 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:18:1: 18:23>::{constant#0}` after SimplifyCfg-promote-consts
 
-<impl at $DIR/issue-41697.rs:18:1: 18:23>::{constant#0}: usize = {
-    let mut _0: usize;                   // return place in scope 0 at $DIR/issue-41697.rs:+0:19: +0:22
-    let mut _1: (usize, bool);           // in scope 0 at $DIR/issue-41697.rs:+0:19: +0:22
+<impl at $DIR/issue_41697.rs:18:1: 18:23>::{constant#0}: usize = {
+    let mut _0: usize;                   // return place in scope 0 at $DIR/issue_41697.rs:+0:19: +0:22
+    let mut _1: (usize, bool);           // in scope 0 at $DIR/issue_41697.rs:+0:19: +0:22
 
     bb0: {
-        _1 = CheckedAdd(const 1_usize, const 1_usize); // scope 0 at $DIR/issue-41697.rs:+0:19: +0:22
-        assert(!move (_1.1: bool), "attempt to compute `{} + {}`, which would overflow", const 1_usize, const 1_usize) -> [success: bb1, unwind: bb2]; // scope 0 at $DIR/issue-41697.rs:+0:19: +0:22
+        _1 = CheckedAdd(const 1_usize, const 1_usize); // scope 0 at $DIR/issue_41697.rs:+0:19: +0:22
+        assert(!move (_1.1: bool), "attempt to compute `{} + {}`, which would overflow", const 1_usize, const 1_usize) -> [success: bb1, unwind: bb2]; // scope 0 at $DIR/issue_41697.rs:+0:19: +0:22
     }
 
     bb1: {
-        _0 = move (_1.0: usize);         // scope 0 at $DIR/issue-41697.rs:+0:19: +0:22
-        return;                          // scope 0 at $DIR/issue-41697.rs:+0:19: +0:22
+        _0 = move (_1.0: usize);         // scope 0 at $DIR/issue_41697.rs:+0:19: +0:22
+        return;                          // scope 0 at $DIR/issue_41697.rs:+0:19: +0:22
     }
 
     bb2 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-41697.rs:+0:19: +0:22
+        resume;                          // scope 0 at $DIR/issue_41697.rs:+0:19: +0:22
     }
 }
diff --git a/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir b/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir
index f95a0a1c013..73372c97bea 100644
--- a/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir
+++ b/src/test/mir-opt/issue_41888.main.ElaborateDrops.after.mir
@@ -1,152 +1,152 @@
 // MIR for `main` after ElaborateDrops
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-41888.rs:+0:11: +0:11
-    let _1: E;                           // in scope 0 at $DIR/issue-41888.rs:+1:9: +1:10
-    let mut _2: bool;                    // in scope 0 at $DIR/issue-41888.rs:+2:8: +2:14
-    let mut _3: E;                       // in scope 0 at $DIR/issue-41888.rs:+3:13: +3:20
-    let mut _4: K;                       // in scope 0 at $DIR/issue-41888.rs:+3:18: +3:19
-    let mut _5: isize;                   // in scope 0 at $DIR/issue-41888.rs:+4:16: +4:24
-    let mut _7: bool;                    // in scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
-    let mut _8: bool;                    // in scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
-    let mut _9: bool;                    // in scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
-    let mut _10: isize;                  // in scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
-    let mut _11: isize;                  // in scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_41888.rs:+0:11: +0:11
+    let _1: E;                           // in scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
+    let mut _2: bool;                    // in scope 0 at $DIR/issue_41888.rs:+2:8: +2:14
+    let mut _3: E;                       // in scope 0 at $DIR/issue_41888.rs:+3:13: +3:20
+    let mut _4: K;                       // in scope 0 at $DIR/issue_41888.rs:+3:18: +3:19
+    let mut _5: isize;                   // in scope 0 at $DIR/issue_41888.rs:+4:16: +4:24
+    let mut _7: bool;                    // in scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
+    let mut _8: bool;                    // in scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
+    let mut _9: bool;                    // in scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
+    let mut _10: isize;                  // in scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
+    let mut _11: isize;                  // in scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
     scope 1 {
-        debug e => _1;                   // in scope 1 at $DIR/issue-41888.rs:+1:9: +1:10
+        debug e => _1;                   // in scope 1 at $DIR/issue_41888.rs:+1:9: +1:10
         scope 2 {
-            debug _k => _6;              // in scope 2 at $DIR/issue-41888.rs:+4:21: +4:23
-            let _6: K;                   // in scope 2 at $DIR/issue-41888.rs:+4:21: +4:23
+            debug _k => _6;              // in scope 2 at $DIR/issue_41888.rs:+4:21: +4:23
+            let _6: K;                   // in scope 2 at $DIR/issue_41888.rs:+4:21: +4:23
         }
     }
 
     bb0: {
-        _9 = const false;                // scope 0 at $DIR/issue-41888.rs:+1:9: +1:10
-        _7 = const false;                // scope 0 at $DIR/issue-41888.rs:+1:9: +1:10
-        _8 = const false;                // scope 0 at $DIR/issue-41888.rs:+1:9: +1:10
-        StorageLive(_1);                 // scope 0 at $DIR/issue-41888.rs:+1:9: +1:10
-        StorageLive(_2);                 // scope 1 at $DIR/issue-41888.rs:+2:8: +2:14
-        _2 = cond() -> [return: bb1, unwind: bb11]; // scope 1 at $DIR/issue-41888.rs:+2:8: +2:14
+        _9 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
+        _7 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
+        _8 = const false;                // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
+        StorageLive(_1);                 // scope 0 at $DIR/issue_41888.rs:+1:9: +1:10
+        StorageLive(_2);                 // scope 1 at $DIR/issue_41888.rs:+2:8: +2:14
+        _2 = cond() -> [return: bb1, unwind: bb11]; // scope 1 at $DIR/issue_41888.rs:+2:8: +2:14
                                          // mir::Constant
-                                         // + span: $DIR/issue-41888.rs:8:8: 8:12
+                                         // + span: $DIR/issue_41888.rs:8:8: 8:12
                                          // + literal: Const { ty: fn() -> bool {cond}, val: Value(<ZST>) }
     }
 
     bb1: {
-        switchInt(move _2) -> [false: bb7, otherwise: bb2]; // scope 1 at $DIR/issue-41888.rs:+2:8: +2:14
+        switchInt(move _2) -> [false: bb7, otherwise: bb2]; // scope 1 at $DIR/issue_41888.rs:+2:8: +2:14
     }
 
     bb2: {
-        StorageLive(_3);                 // scope 1 at $DIR/issue-41888.rs:+3:13: +3:20
-        StorageLive(_4);                 // scope 1 at $DIR/issue-41888.rs:+3:18: +3:19
-        _4 = K;                          // scope 1 at $DIR/issue-41888.rs:+3:18: +3:19
-        _3 = E::F(move _4);              // scope 1 at $DIR/issue-41888.rs:+3:13: +3:20
-        StorageDead(_4);                 // scope 1 at $DIR/issue-41888.rs:+3:19: +3:20
-        goto -> bb14;                    // scope 1 at $DIR/issue-41888.rs:+3:9: +3:10
+        StorageLive(_3);                 // scope 1 at $DIR/issue_41888.rs:+3:13: +3:20
+        StorageLive(_4);                 // scope 1 at $DIR/issue_41888.rs:+3:18: +3:19
+        _4 = K;                          // scope 1 at $DIR/issue_41888.rs:+3:18: +3:19
+        _3 = E::F(move _4);              // scope 1 at $DIR/issue_41888.rs:+3:13: +3:20
+        StorageDead(_4);                 // scope 1 at $DIR/issue_41888.rs:+3:19: +3:20
+        goto -> bb14;                    // scope 1 at $DIR/issue_41888.rs:+3:9: +3:10
     }
 
     bb3: {
-        goto -> bb4;                     // scope 1 at $DIR/issue-41888.rs:+3:19: +3:20
+        goto -> bb4;                     // scope 1 at $DIR/issue_41888.rs:+3:19: +3:20
     }
 
     bb4: {
-        StorageDead(_3);                 // scope 1 at $DIR/issue-41888.rs:+3:19: +3:20
-        _5 = discriminant(_1);           // scope 2 at $DIR/issue-41888.rs:+4:16: +4:24
-        switchInt(move _5) -> [0_isize: bb5, otherwise: bb6]; // scope 2 at $DIR/issue-41888.rs:+4:16: +4:24
+        StorageDead(_3);                 // scope 1 at $DIR/issue_41888.rs:+3:19: +3:20
+        _5 = discriminant(_1);           // scope 2 at $DIR/issue_41888.rs:+4:16: +4:24
+        switchInt(move _5) -> [0_isize: bb5, otherwise: bb6]; // scope 2 at $DIR/issue_41888.rs:+4:16: +4:24
     }
 
     bb5: {
-        StorageLive(_6);                 // scope 2 at $DIR/issue-41888.rs:+4:21: +4:23
-        _9 = const false;                // scope 2 at $DIR/issue-41888.rs:+4:21: +4:23
-        _6 = move ((_1 as F).0: K);      // scope 2 at $DIR/issue-41888.rs:+4:21: +4:23
-        _0 = const ();                   // scope 2 at $DIR/issue-41888.rs:+4:29: +7:10
-        StorageDead(_6);                 // scope 1 at $DIR/issue-41888.rs:+7:9: +7:10
-        goto -> bb8;                     // scope 1 at $DIR/issue-41888.rs:+4:9: +7:10
+        StorageLive(_6);                 // scope 2 at $DIR/issue_41888.rs:+4:21: +4:23
+        _9 = const false;                // scope 2 at $DIR/issue_41888.rs:+4:21: +4:23
+        _6 = move ((_1 as F).0: K);      // scope 2 at $DIR/issue_41888.rs:+4:21: +4:23
+        _0 = const ();                   // scope 2 at $DIR/issue_41888.rs:+4:29: +7:10
+        StorageDead(_6);                 // scope 1 at $DIR/issue_41888.rs:+7:9: +7:10
+        goto -> bb8;                     // scope 1 at $DIR/issue_41888.rs:+4:9: +7:10
     }
 
     bb6: {
-        _0 = const ();                   // scope 1 at $DIR/issue-41888.rs:+7:10: +7:10
-        goto -> bb8;                     // scope 1 at $DIR/issue-41888.rs:+4:9: +7:10
+        _0 = const ();                   // scope 1 at $DIR/issue_41888.rs:+7:10: +7:10
+        goto -> bb8;                     // scope 1 at $DIR/issue_41888.rs:+4:9: +7:10
     }
 
     bb7: {
-        _0 = const ();                   // scope 1 at $DIR/issue-41888.rs:+8:6: +8:6
-        goto -> bb8;                     // scope 1 at $DIR/issue-41888.rs:+2:5: +8:6
+        _0 = const ();                   // scope 1 at $DIR/issue_41888.rs:+8:6: +8:6
+        goto -> bb8;                     // scope 1 at $DIR/issue_41888.rs:+2:5: +8:6
     }
 
     bb8: {
-        StorageDead(_2);                 // scope 1 at $DIR/issue-41888.rs:+8:5: +8:6
-        goto -> bb20;                    // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
+        StorageDead(_2);                 // scope 1 at $DIR/issue_41888.rs:+8:5: +8:6
+        goto -> bb20;                    // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
     }
 
     bb9: {
-        _7 = const false;                // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
-        _8 = const false;                // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
-        _9 = const false;                // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
-        StorageDead(_1);                 // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
-        return;                          // scope 0 at $DIR/issue-41888.rs:+9:2: +9:2
+        _7 = const false;                // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
+        _8 = const false;                // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
+        _9 = const false;                // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
+        StorageDead(_1);                 // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
+        return;                          // scope 0 at $DIR/issue_41888.rs:+9:2: +9:2
     }
 
     bb10 (cleanup): {
-        goto -> bb11;                    // scope 1 at $DIR/issue-41888.rs:+3:19: +3:20
+        goto -> bb11;                    // scope 1 at $DIR/issue_41888.rs:+3:19: +3:20
     }
 
     bb11 (cleanup): {
-        goto -> bb12;                    // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
+        goto -> bb12;                    // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
     }
 
     bb12 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-41888.rs:+0:1: +9:2
+        resume;                          // scope 0 at $DIR/issue_41888.rs:+0:1: +9:2
     }
 
     bb13 (cleanup): {
-        _7 = const true;                 // scope 1 at $DIR/issue-41888.rs:+3:9: +3:10
-        _8 = const true;                 // scope 1 at $DIR/issue-41888.rs:+3:9: +3:10
-        _9 = const true;                 // scope 1 at $DIR/issue-41888.rs:+3:9: +3:10
-        _1 = move _3;                    // scope 1 at $DIR/issue-41888.rs:+3:9: +3:10
-        goto -> bb10;                    // scope 1 at $DIR/issue-41888.rs:+3:9: +3:10
+        _7 = const true;                 // scope 1 at $DIR/issue_41888.rs:+3:9: +3:10
+        _8 = const true;                 // scope 1 at $DIR/issue_41888.rs:+3:9: +3:10
+        _9 = const true;                 // scope 1 at $DIR/issue_41888.rs:+3:9: +3:10
+        _1 = move _3;                    // scope 1 at $DIR/issue_41888.rs:+3:9: +3:10
+        goto -> bb10;                    // scope 1 at $DIR/issue_41888.rs:+3:9: +3:10
     }
 
     bb14: {
-        _7 = const true;                 // scope 1 at $DIR/issue-41888.rs:+3:9: +3:10
-        _8 = const true;                 // scope 1 at $DIR/issue-41888.rs:+3:9: +3:10
-        _9 = const true;                 // scope 1 at $DIR/issue-41888.rs:+3:9: +3:10
-        _1 = move _3;                    // scope 1 at $DIR/issue-41888.rs:+3:9: +3:10
-        goto -> bb3;                     // scope 1 at $DIR/issue-41888.rs:+3:9: +3:10
+        _7 = const true;                 // scope 1 at $DIR/issue_41888.rs:+3:9: +3:10
+        _8 = const true;                 // scope 1 at $DIR/issue_41888.rs:+3:9: +3:10
+        _9 = const true;                 // scope 1 at $DIR/issue_41888.rs:+3:9: +3:10
+        _1 = move _3;                    // scope 1 at $DIR/issue_41888.rs:+3:9: +3:10
+        goto -> bb3;                     // scope 1 at $DIR/issue_41888.rs:+3:9: +3:10
     }
 
     bb15: {
-        _7 = const false;                // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
-        goto -> bb9;                     // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
+        _7 = const false;                // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
+        goto -> bb9;                     // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
     }
 
     bb16 (cleanup): {
-        goto -> bb12;                    // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
+        goto -> bb12;                    // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
     }
 
     bb17: {
-        drop(_1) -> [return: bb15, unwind: bb12]; // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
+        drop(_1) -> [return: bb15, unwind: bb12]; // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
     }
 
     bb18 (cleanup): {
-        drop(_1) -> bb12;                // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
+        drop(_1) -> bb12;                // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
     }
 
     bb19: {
-        _10 = discriminant(_1);          // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
-        switchInt(move _10) -> [0_isize: bb15, otherwise: bb17]; // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
+        _10 = discriminant(_1);          // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
+        switchInt(move _10) -> [0_isize: bb15, otherwise: bb17]; // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
     }
 
     bb20: {
-        switchInt(_7) -> [false: bb15, otherwise: bb19]; // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
+        switchInt(_7) -> [false: bb15, otherwise: bb19]; // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
     }
 
     bb21 (cleanup): {
-        _11 = discriminant(_1);          // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
-        switchInt(move _11) -> [0_isize: bb16, otherwise: bb18]; // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
+        _11 = discriminant(_1);          // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
+        switchInt(move _11) -> [0_isize: bb16, otherwise: bb18]; // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
     }
 
     bb22 (cleanup): {
-        switchInt(_7) -> [false: bb12, otherwise: bb21]; // scope 0 at $DIR/issue-41888.rs:+9:1: +9:2
+        switchInt(_7) -> [false: bb12, otherwise: bb21]; // scope 0 at $DIR/issue_41888.rs:+9:1: +9:2
     }
 }
diff --git a/src/test/mir-opt/issue-41888.rs b/src/test/mir-opt/issue_41888.rs
index c1046c14dbf..c1046c14dbf 100644
--- a/src/test/mir-opt/issue-41888.rs
+++ b/src/test/mir-opt/issue_41888.rs
diff --git a/src/test/mir-opt/issue-62289.rs b/src/test/mir-opt/issue_62289.rs
index 37e3390d5fc..37e3390d5fc 100644
--- a/src/test/mir-opt/issue-62289.rs
+++ b/src/test/mir-opt/issue_62289.rs
diff --git a/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir b/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir
index 72603dc5dbe..6969a66ac19 100644
--- a/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir
+++ b/src/test/mir-opt/issue_62289.test.ElaborateDrops.before.mir
@@ -1,122 +1,122 @@
 // MIR for `test` before ElaborateDrops
 
 fn test() -> Option<Box<u32>> {
-    let mut _0: std::option::Option<std::boxed::Box<u32>>; // return place in scope 0 at $DIR/issue-62289.rs:+0:14: +0:30
-    let mut _1: std::boxed::Box<u32>;    // in scope 0 at $DIR/issue-62289.rs:+1:10: +1:21
-    let mut _2: usize;                   // in scope 0 at $DIR/issue-62289.rs:+1:10: +1:21
-    let mut _3: usize;                   // in scope 0 at $DIR/issue-62289.rs:+1:10: +1:21
-    let mut _4: *mut u8;                 // in scope 0 at $DIR/issue-62289.rs:+1:10: +1:21
-    let mut _5: std::boxed::Box<u32>;    // in scope 0 at $DIR/issue-62289.rs:+1:10: +1:21
-    let mut _6: std::ops::ControlFlow<std::option::Option<std::convert::Infallible>, u32>; // in scope 0 at $DIR/issue-62289.rs:+1:15: +1:20
-    let mut _7: std::option::Option<u32>; // in scope 0 at $DIR/issue-62289.rs:+1:15: +1:19
-    let mut _8: isize;                   // in scope 0 at $DIR/issue-62289.rs:+1:19: +1:20
-    let _9: std::option::Option<std::convert::Infallible>; // in scope 0 at $DIR/issue-62289.rs:+1:19: +1:20
-    let mut _10: !;                      // in scope 0 at $DIR/issue-62289.rs:+1:19: +1:20
-    let mut _11: std::option::Option<std::convert::Infallible>; // in scope 0 at $DIR/issue-62289.rs:+1:19: +1:20
-    let _12: u32;                        // in scope 0 at $DIR/issue-62289.rs:+1:15: +1:20
+    let mut _0: std::option::Option<std::boxed::Box<u32>>; // return place in scope 0 at $DIR/issue_62289.rs:+0:14: +0:30
+    let mut _1: std::boxed::Box<u32>;    // in scope 0 at $DIR/issue_62289.rs:+1:10: +1:21
+    let mut _2: usize;                   // in scope 0 at $DIR/issue_62289.rs:+1:10: +1:21
+    let mut _3: usize;                   // in scope 0 at $DIR/issue_62289.rs:+1:10: +1:21
+    let mut _4: *mut u8;                 // in scope 0 at $DIR/issue_62289.rs:+1:10: +1:21
+    let mut _5: std::boxed::Box<u32>;    // in scope 0 at $DIR/issue_62289.rs:+1:10: +1:21
+    let mut _6: std::ops::ControlFlow<std::option::Option<std::convert::Infallible>, u32>; // in scope 0 at $DIR/issue_62289.rs:+1:15: +1:20
+    let mut _7: std::option::Option<u32>; // in scope 0 at $DIR/issue_62289.rs:+1:15: +1:19
+    let mut _8: isize;                   // in scope 0 at $DIR/issue_62289.rs:+1:19: +1:20
+    let _9: std::option::Option<std::convert::Infallible>; // in scope 0 at $DIR/issue_62289.rs:+1:19: +1:20
+    let mut _10: !;                      // in scope 0 at $DIR/issue_62289.rs:+1:19: +1:20
+    let mut _11: std::option::Option<std::convert::Infallible>; // in scope 0 at $DIR/issue_62289.rs:+1:19: +1:20
+    let _12: u32;                        // in scope 0 at $DIR/issue_62289.rs:+1:15: +1:20
     scope 1 {
     }
     scope 2 {
-        debug residual => _9;            // in scope 2 at $DIR/issue-62289.rs:+1:19: +1:20
+        debug residual => _9;            // in scope 2 at $DIR/issue_62289.rs:+1:19: +1:20
         scope 3 {
         }
     }
     scope 4 {
-        debug val => _12;                // in scope 4 at $DIR/issue-62289.rs:+1:15: +1:20
+        debug val => _12;                // in scope 4 at $DIR/issue_62289.rs:+1:15: +1:20
         scope 5 {
         }
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/issue-62289.rs:+1:10: +1:21
-        _2 = SizeOf(u32);                // scope 1 at $DIR/issue-62289.rs:+1:10: +1:21
-        _3 = AlignOf(u32);               // scope 1 at $DIR/issue-62289.rs:+1:10: +1:21
-        _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 1 at $DIR/issue-62289.rs:+1:10: +1:21
+        StorageLive(_1);                 // scope 0 at $DIR/issue_62289.rs:+1:10: +1:21
+        _2 = SizeOf(u32);                // scope 1 at $DIR/issue_62289.rs:+1:10: +1:21
+        _3 = AlignOf(u32);               // scope 1 at $DIR/issue_62289.rs:+1:10: +1:21
+        _4 = alloc::alloc::exchange_malloc(move _2, move _3) -> bb1; // scope 1 at $DIR/issue_62289.rs:+1:10: +1:21
                                          // mir::Constant
-                                         // + span: $DIR/issue-62289.rs:9:10: 9:21
+                                         // + span: $DIR/issue_62289.rs:9:10: 9:21
                                          // + literal: Const { ty: unsafe fn(usize, usize) -> *mut u8 {alloc::alloc::exchange_malloc}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageLive(_5);                 // scope 0 at $DIR/issue-62289.rs:+1:10: +1:21
-        _5 = ShallowInitBox(move _4, u32); // scope 0 at $DIR/issue-62289.rs:+1:10: +1:21
-        StorageLive(_6);                 // scope 0 at $DIR/issue-62289.rs:+1:15: +1:20
-        StorageLive(_7);                 // scope 0 at $DIR/issue-62289.rs:+1:15: +1:19
-        _7 = Option::<u32>::None;        // scope 0 at $DIR/issue-62289.rs:+1:15: +1:19
-        _6 = <Option<u32> as Try>::branch(move _7) -> [return: bb2, unwind: bb12]; // scope 0 at $DIR/issue-62289.rs:+1:15: +1:20
+        StorageLive(_5);                 // scope 0 at $DIR/issue_62289.rs:+1:10: +1:21
+        _5 = ShallowInitBox(move _4, u32); // scope 0 at $DIR/issue_62289.rs:+1:10: +1:21
+        StorageLive(_6);                 // scope 0 at $DIR/issue_62289.rs:+1:15: +1:20
+        StorageLive(_7);                 // scope 0 at $DIR/issue_62289.rs:+1:15: +1:19
+        _7 = Option::<u32>::None;        // scope 0 at $DIR/issue_62289.rs:+1:15: +1:19
+        _6 = <Option<u32> as Try>::branch(move _7) -> [return: bb2, unwind: bb12]; // scope 0 at $DIR/issue_62289.rs:+1:15: +1:20
                                          // mir::Constant
-                                         // + span: $DIR/issue-62289.rs:9:15: 9:20
+                                         // + span: $DIR/issue_62289.rs:9:15: 9:20
                                          // + literal: Const { ty: fn(Option<u32>) -> ControlFlow<<Option<u32> as Try>::Residual, <Option<u32> as Try>::Output> {<Option<u32> as Try>::branch}, val: Value(<ZST>) }
     }
 
     bb2: {
-        StorageDead(_7);                 // scope 0 at $DIR/issue-62289.rs:+1:19: +1:20
-        _8 = discriminant(_6);           // scope 0 at $DIR/issue-62289.rs:+1:15: +1:20
-        switchInt(move _8) -> [0_isize: bb3, 1_isize: bb5, otherwise: bb4]; // scope 0 at $DIR/issue-62289.rs:+1:15: +1:20
+        StorageDead(_7);                 // scope 0 at $DIR/issue_62289.rs:+1:19: +1:20
+        _8 = discriminant(_6);           // scope 0 at $DIR/issue_62289.rs:+1:15: +1:20
+        switchInt(move _8) -> [0_isize: bb3, 1_isize: bb5, otherwise: bb4]; // scope 0 at $DIR/issue_62289.rs:+1:15: +1:20
     }
 
     bb3: {
-        StorageLive(_12);                // scope 0 at $DIR/issue-62289.rs:+1:15: +1:20
-        _12 = ((_6 as Continue).0: u32); // scope 0 at $DIR/issue-62289.rs:+1:15: +1:20
-        (*_5) = _12;                     // scope 5 at $DIR/issue-62289.rs:+1:15: +1:20
-        StorageDead(_12);                // scope 0 at $DIR/issue-62289.rs:+1:19: +1:20
-        _1 = move _5;                    // scope 0 at $DIR/issue-62289.rs:+1:10: +1:21
-        drop(_5) -> [return: bb7, unwind: bb11]; // scope 0 at $DIR/issue-62289.rs:+1:20: +1:21
+        StorageLive(_12);                // scope 0 at $DIR/issue_62289.rs:+1:15: +1:20
+        _12 = ((_6 as Continue).0: u32); // scope 0 at $DIR/issue_62289.rs:+1:15: +1:20
+        (*_5) = _12;                     // scope 5 at $DIR/issue_62289.rs:+1:15: +1:20
+        StorageDead(_12);                // scope 0 at $DIR/issue_62289.rs:+1:19: +1:20
+        _1 = move _5;                    // scope 0 at $DIR/issue_62289.rs:+1:10: +1:21
+        drop(_5) -> [return: bb7, unwind: bb11]; // scope 0 at $DIR/issue_62289.rs:+1:20: +1:21
     }
 
     bb4: {
-        unreachable;                     // scope 0 at $DIR/issue-62289.rs:+1:15: +1:20
+        unreachable;                     // scope 0 at $DIR/issue_62289.rs:+1:15: +1:20
     }
 
     bb5: {
-        StorageLive(_9);                 // scope 0 at $DIR/issue-62289.rs:+1:19: +1:20
-        _9 = ((_6 as Break).0: std::option::Option<std::convert::Infallible>); // scope 0 at $DIR/issue-62289.rs:+1:19: +1:20
-        StorageLive(_11);                // scope 3 at $DIR/issue-62289.rs:+1:19: +1:20
-        _11 = _9;                        // scope 3 at $DIR/issue-62289.rs:+1:19: +1:20
-        _0 = <Option<Box<u32>> as FromResidual<Option<Infallible>>>::from_residual(move _11) -> [return: bb6, unwind: bb12]; // scope 3 at $DIR/issue-62289.rs:+1:15: +1:20
+        StorageLive(_9);                 // scope 0 at $DIR/issue_62289.rs:+1:19: +1:20
+        _9 = ((_6 as Break).0: std::option::Option<std::convert::Infallible>); // scope 0 at $DIR/issue_62289.rs:+1:19: +1:20
+        StorageLive(_11);                // scope 3 at $DIR/issue_62289.rs:+1:19: +1:20
+        _11 = _9;                        // scope 3 at $DIR/issue_62289.rs:+1:19: +1:20
+        _0 = <Option<Box<u32>> as FromResidual<Option<Infallible>>>::from_residual(move _11) -> [return: bb6, unwind: bb12]; // scope 3 at $DIR/issue_62289.rs:+1:15: +1:20
                                          // mir::Constant
-                                         // + span: $DIR/issue-62289.rs:9:19: 9:20
+                                         // + span: $DIR/issue_62289.rs:9:19: 9:20
                                          // + literal: Const { ty: fn(Option<Infallible>) -> Option<Box<u32>> {<Option<Box<u32>> as FromResidual<Option<Infallible>>>::from_residual}, val: Value(<ZST>) }
     }
 
     bb6: {
-        StorageDead(_11);                // scope 3 at $DIR/issue-62289.rs:+1:19: +1:20
-        StorageDead(_9);                 // scope 0 at $DIR/issue-62289.rs:+1:19: +1:20
-        drop(_5) -> bb9;                 // scope 0 at $DIR/issue-62289.rs:+1:20: +1:21
+        StorageDead(_11);                // scope 3 at $DIR/issue_62289.rs:+1:19: +1:20
+        StorageDead(_9);                 // scope 0 at $DIR/issue_62289.rs:+1:19: +1:20
+        drop(_5) -> bb9;                 // scope 0 at $DIR/issue_62289.rs:+1:20: +1:21
     }
 
     bb7: {
-        StorageDead(_5);                 // scope 0 at $DIR/issue-62289.rs:+1:20: +1:21
-        _0 = Option::<Box<u32>>::Some(move _1); // scope 0 at $DIR/issue-62289.rs:+1:5: +1:22
-        drop(_1) -> bb8;                 // scope 0 at $DIR/issue-62289.rs:+1:21: +1:22
+        StorageDead(_5);                 // scope 0 at $DIR/issue_62289.rs:+1:20: +1:21
+        _0 = Option::<Box<u32>>::Some(move _1); // scope 0 at $DIR/issue_62289.rs:+1:5: +1:22
+        drop(_1) -> bb8;                 // scope 0 at $DIR/issue_62289.rs:+1:21: +1:22
     }
 
     bb8: {
-        StorageDead(_1);                 // scope 0 at $DIR/issue-62289.rs:+1:21: +1:22
-        StorageDead(_6);                 // scope 0 at $DIR/issue-62289.rs:+2:1: +2:2
-        goto -> bb10;                    // scope 0 at $DIR/issue-62289.rs:+2:2: +2:2
+        StorageDead(_1);                 // scope 0 at $DIR/issue_62289.rs:+1:21: +1:22
+        StorageDead(_6);                 // scope 0 at $DIR/issue_62289.rs:+2:1: +2:2
+        goto -> bb10;                    // scope 0 at $DIR/issue_62289.rs:+2:2: +2:2
     }
 
     bb9: {
-        StorageDead(_5);                 // scope 0 at $DIR/issue-62289.rs:+1:20: +1:21
-        StorageDead(_1);                 // scope 0 at $DIR/issue-62289.rs:+1:21: +1:22
-        StorageDead(_6);                 // scope 0 at $DIR/issue-62289.rs:+2:1: +2:2
-        goto -> bb10;                    // scope 0 at $DIR/issue-62289.rs:+2:2: +2:2
+        StorageDead(_5);                 // scope 0 at $DIR/issue_62289.rs:+1:20: +1:21
+        StorageDead(_1);                 // scope 0 at $DIR/issue_62289.rs:+1:21: +1:22
+        StorageDead(_6);                 // scope 0 at $DIR/issue_62289.rs:+2:1: +2:2
+        goto -> bb10;                    // scope 0 at $DIR/issue_62289.rs:+2:2: +2:2
     }
 
     bb10: {
-        return;                          // scope 0 at $DIR/issue-62289.rs:+2:2: +2:2
+        return;                          // scope 0 at $DIR/issue_62289.rs:+2:2: +2:2
     }
 
     bb11 (cleanup): {
-        drop(_1) -> bb13;                // scope 0 at $DIR/issue-62289.rs:+1:21: +1:22
+        drop(_1) -> bb13;                // scope 0 at $DIR/issue_62289.rs:+1:21: +1:22
     }
 
     bb12 (cleanup): {
-        drop(_5) -> bb13;                // scope 0 at $DIR/issue-62289.rs:+1:20: +1:21
+        drop(_5) -> bb13;                // scope 0 at $DIR/issue_62289.rs:+1:20: +1:21
     }
 
     bb13 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-62289.rs:+0:1: +2:2
+        resume;                          // scope 0 at $DIR/issue_62289.rs:+0:1: +2:2
     }
 }
diff --git a/src/test/mir-opt/issue_72181.bar.mir_map.0.mir b/src/test/mir-opt/issue_72181.bar.built.after.mir
index 972ce1d5078..ebee89001b9 100644
--- a/src/test/mir-opt/issue_72181.bar.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181.bar.built.after.mir
@@ -1,17 +1,17 @@
-// MIR for `bar` 0 mir_map
+// MIR for `bar` after built
 
 fn bar(_1: [(Never, u32); 1]) -> u32 {
-    let mut _0: u32;                     // return place in scope 0 at $DIR/issue-72181.rs:+0:40: +0:43
-    let _2: u32;                         // in scope 0 at $DIR/issue-72181.rs:+0:13: +0:14
+    let mut _0: u32;                     // return place in scope 0 at $DIR/issue_72181.rs:+0:40: +0:43
+    let _2: u32;                         // in scope 0 at $DIR/issue_72181.rs:+0:13: +0:14
     scope 1 {
-        debug x => _2;                   // in scope 1 at $DIR/issue-72181.rs:+0:13: +0:14
+        debug x => _2;                   // in scope 1 at $DIR/issue_72181.rs:+0:13: +0:14
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-72181.rs:+0:13: +0:14
-        _2 = (_1[0 of 1].1: u32);        // scope 0 at $DIR/issue-72181.rs:+0:13: +0:14
-        _0 = _2;                         // scope 1 at $DIR/issue-72181.rs:+0:46: +0:47
-        StorageDead(_2);                 // scope 0 at $DIR/issue-72181.rs:+0:48: +0:49
-        return;                          // scope 0 at $DIR/issue-72181.rs:+0:49: +0:49
+        StorageLive(_2);                 // scope 0 at $DIR/issue_72181.rs:+0:13: +0:14
+        _2 = (_1[0 of 1].1: u32);        // scope 0 at $DIR/issue_72181.rs:+0:13: +0:14
+        _0 = _2;                         // scope 1 at $DIR/issue_72181.rs:+0:46: +0:47
+        StorageDead(_2);                 // scope 0 at $DIR/issue_72181.rs:+0:48: +0:49
+        return;                          // scope 0 at $DIR/issue_72181.rs:+0:49: +0:49
     }
 }
diff --git a/src/test/mir-opt/issue_72181.foo.mir_map.0.mir b/src/test/mir-opt/issue_72181.foo.built.after.mir
index 534f131ea93..90c9785202a 100644
--- a/src/test/mir-opt/issue_72181.foo.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181.foo.built.after.mir
@@ -1,27 +1,27 @@
-// MIR for `foo` 0 mir_map
+// MIR for `foo` after built
 
 fn foo(_1: [(Never, u32); 1]) -> u32 {
-    debug xs => _1;                      // in scope 0 at $DIR/issue-72181.rs:+0:8: +0:10
-    let mut _0: u32;                     // return place in scope 0 at $DIR/issue-72181.rs:+0:34: +0:37
-    let _2: usize;                       // in scope 0 at $DIR/issue-72181.rs:+0:43: +0:44
-    let mut _3: usize;                   // in scope 0 at $DIR/issue-72181.rs:+0:40: +0:45
-    let mut _4: bool;                    // in scope 0 at $DIR/issue-72181.rs:+0:40: +0:45
+    debug xs => _1;                      // in scope 0 at $DIR/issue_72181.rs:+0:8: +0:10
+    let mut _0: u32;                     // return place in scope 0 at $DIR/issue_72181.rs:+0:34: +0:37
+    let _2: usize;                       // in scope 0 at $DIR/issue_72181.rs:+0:43: +0:44
+    let mut _3: usize;                   // in scope 0 at $DIR/issue_72181.rs:+0:40: +0:45
+    let mut _4: bool;                    // in scope 0 at $DIR/issue_72181.rs:+0:40: +0:45
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-72181.rs:+0:43: +0:44
-        _2 = const 0_usize;              // scope 0 at $DIR/issue-72181.rs:+0:43: +0:44
-        _3 = Len(_1);                    // scope 0 at $DIR/issue-72181.rs:+0:40: +0:45
-        _4 = Lt(_2, _3);                 // scope 0 at $DIR/issue-72181.rs:+0:40: +0:45
-        assert(move _4, "index out of bounds: the length is {} but the index is {}", move _3, _2) -> [success: bb1, unwind: bb2]; // scope 0 at $DIR/issue-72181.rs:+0:40: +0:45
+        StorageLive(_2);                 // scope 0 at $DIR/issue_72181.rs:+0:43: +0:44
+        _2 = const 0_usize;              // scope 0 at $DIR/issue_72181.rs:+0:43: +0:44
+        _3 = Len(_1);                    // scope 0 at $DIR/issue_72181.rs:+0:40: +0:45
+        _4 = Lt(_2, _3);                 // scope 0 at $DIR/issue_72181.rs:+0:40: +0:45
+        assert(move _4, "index out of bounds: the length is {} but the index is {}", move _3, _2) -> [success: bb1, unwind: bb2]; // scope 0 at $DIR/issue_72181.rs:+0:40: +0:45
     }
 
     bb1: {
-        _0 = (_1[_2].1: u32);            // scope 0 at $DIR/issue-72181.rs:+0:40: +0:47
-        StorageDead(_2);                 // scope 0 at $DIR/issue-72181.rs:+0:48: +0:49
-        return;                          // scope 0 at $DIR/issue-72181.rs:+0:49: +0:49
+        _0 = (_1[_2].1: u32);            // scope 0 at $DIR/issue_72181.rs:+0:40: +0:47
+        StorageDead(_2);                 // scope 0 at $DIR/issue_72181.rs:+0:48: +0:49
+        return;                          // scope 0 at $DIR/issue_72181.rs:+0:49: +0:49
     }
 
     bb2 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-72181.rs:+0:1: +0:49
+        resume;                          // scope 0 at $DIR/issue_72181.rs:+0:1: +0:49
     }
 }
diff --git a/src/test/mir-opt/issue_72181.main.mir_map.0.mir b/src/test/mir-opt/issue_72181.main.built.after.mir
index 425906f84fc..e8683692770 100644
--- a/src/test/mir-opt/issue_72181.main.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181.main.built.after.mir
@@ -1,18 +1,18 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-72181.rs:+0:11: +0:11
-    let mut _1: usize;                   // in scope 0 at $DIR/issue-72181.rs:+1:13: +1:34
-    let mut _3: Foo;                     // in scope 0 at $DIR/issue-72181.rs:+3:14: +3:27
-    let mut _4: Foo;                     // in scope 0 at $DIR/issue-72181.rs:+3:29: +3:42
-    let mut _5: u64;                     // in scope 0 at $DIR/issue-72181.rs:+4:13: +4:30
-    let _6: usize;                       // in scope 0 at $DIR/issue-72181.rs:+4:24: +4:25
-    let mut _7: usize;                   // in scope 0 at $DIR/issue-72181.rs:+4:22: +4:26
-    let mut _8: bool;                    // in scope 0 at $DIR/issue-72181.rs:+4:22: +4:26
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_72181.rs:+0:11: +0:11
+    let mut _1: usize;                   // in scope 0 at $DIR/issue_72181.rs:+1:13: +1:34
+    let mut _3: Foo;                     // in scope 0 at $DIR/issue_72181.rs:+3:14: +3:27
+    let mut _4: Foo;                     // in scope 0 at $DIR/issue_72181.rs:+3:29: +3:42
+    let mut _5: u64;                     // in scope 0 at $DIR/issue_72181.rs:+4:13: +4:30
+    let _6: usize;                       // in scope 0 at $DIR/issue_72181.rs:+4:24: +4:25
+    let mut _7: usize;                   // in scope 0 at $DIR/issue_72181.rs:+4:22: +4:26
+    let mut _8: bool;                    // in scope 0 at $DIR/issue_72181.rs:+4:22: +4:26
     scope 1 {
-        let _2: [Foo; 2];                // in scope 1 at $DIR/issue-72181.rs:+3:9: +3:10
+        let _2: [Foo; 2];                // in scope 1 at $DIR/issue_72181.rs:+3:9: +3:10
         scope 2 {
-            debug f => _2;               // in scope 2 at $DIR/issue-72181.rs:+3:9: +3:10
+            debug f => _2;               // in scope 2 at $DIR/issue_72181.rs:+3:9: +3:10
             scope 3 {
             }
             scope 4 {
@@ -21,42 +21,42 @@ fn main() -> () {
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/issue-72181.rs:+1:13: +1:34
-        _1 = std::mem::size_of::<Foo>() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue-72181.rs:+1:13: +1:34
+        StorageLive(_1);                 // scope 0 at $DIR/issue_72181.rs:+1:13: +1:34
+        _1 = std::mem::size_of::<Foo>() -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue_72181.rs:+1:13: +1:34
                                          // mir::Constant
-                                         // + span: $DIR/issue-72181.rs:24:13: 24:32
+                                         // + span: $DIR/issue_72181.rs:24:13: 24:32
                                          // + literal: Const { ty: fn() -> usize {std::mem::size_of::<Foo>}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_1);                 // scope 0 at $DIR/issue-72181.rs:+1:34: +1:35
-        StorageLive(_2);                 // scope 1 at $DIR/issue-72181.rs:+3:9: +3:10
-        StorageLive(_3);                 // scope 1 at $DIR/issue-72181.rs:+3:14: +3:27
-        _3 = Foo { a: const 42_u64 };    // scope 1 at $DIR/issue-72181.rs:+3:14: +3:27
-        StorageLive(_4);                 // scope 1 at $DIR/issue-72181.rs:+3:29: +3:42
-        _4 = Foo { a: const 10_u64 };    // scope 1 at $DIR/issue-72181.rs:+3:29: +3:42
-        _2 = [move _3, move _4];         // scope 1 at $DIR/issue-72181.rs:+3:13: +3:43
-        StorageDead(_4);                 // scope 1 at $DIR/issue-72181.rs:+3:42: +3:43
-        StorageDead(_3);                 // scope 1 at $DIR/issue-72181.rs:+3:42: +3:43
-        FakeRead(ForLet(None), _2);      // scope 1 at $DIR/issue-72181.rs:+3:9: +3:10
-        StorageLive(_5);                 // scope 2 at $DIR/issue-72181.rs:+4:13: +4:30
-        StorageLive(_6);                 // scope 4 at $DIR/issue-72181.rs:+4:24: +4:25
-        _6 = const 0_usize;              // scope 4 at $DIR/issue-72181.rs:+4:24: +4:25
-        _7 = Len(_2);                    // scope 4 at $DIR/issue-72181.rs:+4:22: +4:26
-        _8 = Lt(_6, _7);                 // scope 4 at $DIR/issue-72181.rs:+4:22: +4:26
-        assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb2, unwind: bb3]; // scope 4 at $DIR/issue-72181.rs:+4:22: +4:26
+        StorageDead(_1);                 // scope 0 at $DIR/issue_72181.rs:+1:34: +1:35
+        StorageLive(_2);                 // scope 1 at $DIR/issue_72181.rs:+3:9: +3:10
+        StorageLive(_3);                 // scope 1 at $DIR/issue_72181.rs:+3:14: +3:27
+        _3 = Foo { a: const 42_u64 };    // scope 1 at $DIR/issue_72181.rs:+3:14: +3:27
+        StorageLive(_4);                 // scope 1 at $DIR/issue_72181.rs:+3:29: +3:42
+        _4 = Foo { a: const 10_u64 };    // scope 1 at $DIR/issue_72181.rs:+3:29: +3:42
+        _2 = [move _3, move _4];         // scope 1 at $DIR/issue_72181.rs:+3:13: +3:43
+        StorageDead(_4);                 // scope 1 at $DIR/issue_72181.rs:+3:42: +3:43
+        StorageDead(_3);                 // scope 1 at $DIR/issue_72181.rs:+3:42: +3:43
+        FakeRead(ForLet(None), _2);      // scope 1 at $DIR/issue_72181.rs:+3:9: +3:10
+        StorageLive(_5);                 // scope 2 at $DIR/issue_72181.rs:+4:13: +4:30
+        StorageLive(_6);                 // scope 4 at $DIR/issue_72181.rs:+4:24: +4:25
+        _6 = const 0_usize;              // scope 4 at $DIR/issue_72181.rs:+4:24: +4:25
+        _7 = Len(_2);                    // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26
+        _8 = Lt(_6, _7);                 // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26
+        assert(move _8, "index out of bounds: the length is {} but the index is {}", move _7, _6) -> [success: bb2, unwind: bb3]; // scope 4 at $DIR/issue_72181.rs:+4:22: +4:26
     }
 
     bb2: {
-        _5 = (_2[_6].0: u64);            // scope 4 at $DIR/issue-72181.rs:+4:22: +4:28
-        StorageDead(_6);                 // scope 2 at $DIR/issue-72181.rs:+4:30: +4:31
-        StorageDead(_5);                 // scope 2 at $DIR/issue-72181.rs:+4:30: +4:31
-        _0 = const ();                   // scope 0 at $DIR/issue-72181.rs:+0:11: +5:2
-        StorageDead(_2);                 // scope 1 at $DIR/issue-72181.rs:+5:1: +5:2
-        return;                          // scope 0 at $DIR/issue-72181.rs:+5:2: +5:2
+        _5 = (_2[_6].0: u64);            // scope 4 at $DIR/issue_72181.rs:+4:22: +4:28
+        StorageDead(_6);                 // scope 2 at $DIR/issue_72181.rs:+4:30: +4:31
+        StorageDead(_5);                 // scope 2 at $DIR/issue_72181.rs:+4:30: +4:31
+        _0 = const ();                   // scope 0 at $DIR/issue_72181.rs:+0:11: +5:2
+        StorageDead(_2);                 // scope 1 at $DIR/issue_72181.rs:+5:1: +5:2
+        return;                          // scope 0 at $DIR/issue_72181.rs:+5:2: +5:2
     }
 
     bb3 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-72181.rs:+0:1: +5:2
+        resume;                          // scope 0 at $DIR/issue_72181.rs:+0:1: +5:2
     }
 }
diff --git a/src/test/mir-opt/issue-72181.rs b/src/test/mir-opt/issue_72181.rs
index ebb5f5042fc..6a32d4bbee2 100644
--- a/src/test/mir-opt/issue-72181.rs
+++ b/src/test/mir-opt/issue_72181.rs
@@ -12,14 +12,14 @@ union Foo {
 }
 
 
-// EMIT_MIR issue_72181.foo.mir_map.0.mir
+// EMIT_MIR issue_72181.foo.built.after.mir
 fn foo(xs: [(Never, u32); 1]) -> u32 { xs[0].1 }
 
-// EMIT_MIR issue_72181.bar.mir_map.0.mir
+// EMIT_MIR issue_72181.bar.built.after.mir
 fn bar([(_, x)]: [(Never, u32); 1]) -> u32 { x }
 
 
-// EMIT_MIR issue_72181.main.mir_map.0.mir
+// EMIT_MIR issue_72181.main.built.after.mir
 fn main() {
     let _ = mem::size_of::<Foo>();
 
diff --git a/src/test/mir-opt/issue_72181_1.f.mir_map.0.mir b/src/test/mir-opt/issue_72181_1.f.built.after.mir
index e1a35d88bf1..4086da52011 100644
--- a/src/test/mir-opt/issue_72181_1.f.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181_1.f.built.after.mir
@@ -1,29 +1,29 @@
-// MIR for `f` 0 mir_map
+// MIR for `f` after built
 
 fn f(_1: Void) -> ! {
-    debug v => _1;                       // in scope 0 at $DIR/issue-72181-1.rs:+0:6: +0:7
-    let mut _0: !;                       // return place in scope 0 at $DIR/issue-72181-1.rs:+0:18: +0:19
-    let mut _2: !;                       // in scope 0 at $DIR/issue-72181-1.rs:+0:20: +2:2
-    let mut _3: !;                       // in scope 0 at $DIR/issue-72181-1.rs:+1:5: +1:15
+    debug v => _1;                       // in scope 0 at $DIR/issue_72181_1.rs:+0:6: +0:7
+    let mut _0: !;                       // return place in scope 0 at $DIR/issue_72181_1.rs:+0:18: +0:19
+    let mut _2: !;                       // in scope 0 at $DIR/issue_72181_1.rs:+0:20: +2:2
+    let mut _3: !;                       // in scope 0 at $DIR/issue_72181_1.rs:+1:5: +1:15
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-72181-1.rs:+0:20: +2:2
-        StorageLive(_3);                 // scope 0 at $DIR/issue-72181-1.rs:+1:5: +1:15
-        FakeRead(ForMatchedPlace(None), _1); // scope 0 at $DIR/issue-72181-1.rs:+1:11: +1:12
-        unreachable;                     // scope 0 at $DIR/issue-72181-1.rs:+1:11: +1:12
+        StorageLive(_2);                 // scope 0 at $DIR/issue_72181_1.rs:+0:20: +2:2
+        StorageLive(_3);                 // scope 0 at $DIR/issue_72181_1.rs:+1:5: +1:15
+        FakeRead(ForMatchedPlace(None), _1); // scope 0 at $DIR/issue_72181_1.rs:+1:11: +1:12
+        unreachable;                     // scope 0 at $DIR/issue_72181_1.rs:+1:11: +1:12
     }
 
     bb1: {
-        unreachable;                     // scope 0 at $DIR/issue-72181-1.rs:+1:5: +1:15
+        unreachable;                     // scope 0 at $DIR/issue_72181_1.rs:+1:5: +1:15
     }
 
     bb2: {
-        StorageDead(_3);                 // scope 0 at $DIR/issue-72181-1.rs:+1:14: +1:15
-        unreachable;                     // scope 0 at $DIR/issue-72181-1.rs:+0:20: +2:2
+        StorageDead(_3);                 // scope 0 at $DIR/issue_72181_1.rs:+1:14: +1:15
+        unreachable;                     // scope 0 at $DIR/issue_72181_1.rs:+0:20: +2:2
     }
 
     bb3: {
-        StorageDead(_2);                 // scope 0 at $DIR/issue-72181-1.rs:+2:1: +2:2
-        return;                          // scope 0 at $DIR/issue-72181-1.rs:+2:2: +2:2
+        StorageDead(_2);                 // scope 0 at $DIR/issue_72181_1.rs:+2:1: +2:2
+        return;                          // scope 0 at $DIR/issue_72181_1.rs:+2:2: +2:2
     }
 }
diff --git a/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir b/src/test/mir-opt/issue_72181_1.main.built.after.mir
index 336693337fb..2172f3aa9e2 100644
--- a/src/test/mir-opt/issue_72181_1.main.mir_map.0.mir
+++ b/src/test/mir-opt/issue_72181_1.main.built.after.mir
@@ -1,57 +1,57 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(Void) }, span: $DIR/issue-72181-1.rs:16:12: 16:16, inferred_ty: Void
-| 1: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(Void) }, span: $DIR/issue-72181-1.rs:16:12: 16:16, inferred_ty: Void
+| 0: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(Void) }, span: $DIR/issue_72181_1.rs:16:12: 16:16, inferred_ty: Void
+| 1: user_ty: Canonical { max_universe: U0, variables: [], value: Ty(Void) }, span: $DIR/issue_72181_1.rs:16:12: 16:16, inferred_ty: Void
 |
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-72181-1.rs:+0:11: +0:11
-    let mut _1: !;                       // in scope 0 at $DIR/issue-72181-1.rs:+0:11: +6:2
-    let _2: Void as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 0 at $DIR/issue-72181-1.rs:+1:9: +1:10
-    let mut _3: ();                      // in scope 0 at $DIR/issue-72181-1.rs:+2:41: +2:43
-    let _4: !;                           // in scope 0 at $DIR/issue-72181-1.rs:+5:5: +5:9
-    let mut _5: Void;                    // in scope 0 at $DIR/issue-72181-1.rs:+5:7: +5:8
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_72181_1.rs:+0:11: +0:11
+    let mut _1: !;                       // in scope 0 at $DIR/issue_72181_1.rs:+0:11: +6:2
+    let _2: Void as UserTypeProjection { base: UserType(0), projs: [] }; // in scope 0 at $DIR/issue_72181_1.rs:+1:9: +1:10
+    let mut _3: ();                      // in scope 0 at $DIR/issue_72181_1.rs:+2:41: +2:43
+    let _4: !;                           // in scope 0 at $DIR/issue_72181_1.rs:+5:5: +5:9
+    let mut _5: Void;                    // in scope 0 at $DIR/issue_72181_1.rs:+5:7: +5:8
     scope 1 {
-        debug v => _2;                   // in scope 1 at $DIR/issue-72181-1.rs:+1:9: +1:10
+        debug v => _2;                   // in scope 1 at $DIR/issue_72181_1.rs:+1:9: +1:10
     }
     scope 2 {
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-72181-1.rs:+1:9: +1:10
-        StorageLive(_3);                 // scope 2 at $DIR/issue-72181-1.rs:+2:41: +2:43
-        _3 = ();                         // scope 2 at $DIR/issue-72181-1.rs:+2:41: +2:43
-        _2 = transmute::<(), Void>(move _3) -> bb4; // scope 2 at $DIR/issue-72181-1.rs:+2:9: +2:44
+        StorageLive(_2);                 // scope 0 at $DIR/issue_72181_1.rs:+1:9: +1:10
+        StorageLive(_3);                 // scope 2 at $DIR/issue_72181_1.rs:+2:41: +2:43
+        _3 = ();                         // scope 2 at $DIR/issue_72181_1.rs:+2:41: +2:43
+        _2 = transmute::<(), Void>(move _3) -> bb4; // scope 2 at $DIR/issue_72181_1.rs:+2:9: +2:44
                                          // mir::Constant
-                                         // + span: $DIR/issue-72181-1.rs:17:9: 17:40
+                                         // + span: $DIR/issue_72181_1.rs:17:9: 17:40
                                          // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(()) -> Void {transmute::<(), Void>}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_3);                 // scope 2 at $DIR/issue-72181-1.rs:+2:43: +2:44
-        FakeRead(ForLet(None), _2);      // scope 0 at $DIR/issue-72181-1.rs:+1:9: +1:10
-        AscribeUserType(_2, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 0 at $DIR/issue-72181-1.rs:+1:12: +1:16
-        StorageLive(_4);                 // scope 1 at $DIR/issue-72181-1.rs:+5:5: +5:9
-        StorageLive(_5);                 // scope 1 at $DIR/issue-72181-1.rs:+5:7: +5:8
-        _5 = move _2;                    // scope 1 at $DIR/issue-72181-1.rs:+5:7: +5:8
-        _4 = f(move _5) -> bb4;          // scope 1 at $DIR/issue-72181-1.rs:+5:5: +5:9
+        StorageDead(_3);                 // scope 2 at $DIR/issue_72181_1.rs:+2:43: +2:44
+        FakeRead(ForLet(None), _2);      // scope 0 at $DIR/issue_72181_1.rs:+1:9: +1:10
+        AscribeUserType(_2, o, UserTypeProjection { base: UserType(1), projs: [] }); // scope 0 at $DIR/issue_72181_1.rs:+1:12: +1:16
+        StorageLive(_4);                 // scope 1 at $DIR/issue_72181_1.rs:+5:5: +5:9
+        StorageLive(_5);                 // scope 1 at $DIR/issue_72181_1.rs:+5:7: +5:8
+        _5 = move _2;                    // scope 1 at $DIR/issue_72181_1.rs:+5:7: +5:8
+        _4 = f(move _5) -> bb4;          // scope 1 at $DIR/issue_72181_1.rs:+5:5: +5:9
                                          // mir::Constant
-                                         // + span: $DIR/issue-72181-1.rs:20:5: 20:6
+                                         // + span: $DIR/issue_72181_1.rs:20:5: 20:6
                                          // + literal: Const { ty: fn(Void) -> ! {f}, val: Value(<ZST>) }
     }
 
     bb2: {
-        StorageDead(_5);                 // scope 1 at $DIR/issue-72181-1.rs:+5:8: +5:9
-        StorageDead(_4);                 // scope 1 at $DIR/issue-72181-1.rs:+5:9: +5:10
-        StorageDead(_2);                 // scope 0 at $DIR/issue-72181-1.rs:+6:1: +6:2
-        unreachable;                     // scope 0 at $DIR/issue-72181-1.rs:+0:11: +6:2
+        StorageDead(_5);                 // scope 1 at $DIR/issue_72181_1.rs:+5:8: +5:9
+        StorageDead(_4);                 // scope 1 at $DIR/issue_72181_1.rs:+5:9: +5:10
+        StorageDead(_2);                 // scope 0 at $DIR/issue_72181_1.rs:+6:1: +6:2
+        unreachable;                     // scope 0 at $DIR/issue_72181_1.rs:+0:11: +6:2
     }
 
     bb3: {
-        return;                          // scope 0 at $DIR/issue-72181-1.rs:+6:2: +6:2
+        return;                          // scope 0 at $DIR/issue_72181_1.rs:+6:2: +6:2
     }
 
     bb4 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-72181-1.rs:+0:1: +6:2
+        resume;                          // scope 0 at $DIR/issue_72181_1.rs:+0:1: +6:2
     }
 }
diff --git a/src/test/mir-opt/issue-72181-1.rs b/src/test/mir-opt/issue_72181_1.rs
index 91e98adbe80..8ae2599ec73 100644
--- a/src/test/mir-opt/issue-72181-1.rs
+++ b/src/test/mir-opt/issue_72181_1.rs
@@ -6,12 +6,12 @@
 
 enum Void {}
 
-// EMIT_MIR issue_72181_1.f.mir_map.0.mir
+// EMIT_MIR issue_72181_1.f.built.after.mir
 fn f(v: Void) -> ! {
     match v {}
 }
 
-// EMIT_MIR issue_72181_1.main.mir_map.0.mir
+// EMIT_MIR issue_72181_1.main.built.after.mir
 fn main() {
     let v: Void = unsafe {
         std::mem::transmute::<(), Void>(())
diff --git a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff
index 269e4e32617..c9a9511586d 100644
--- a/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff
+++ b/src/test/mir-opt/issue_73223.main.SimplifyArmIdentity.diff
@@ -2,18 +2,18 @@
 + // MIR for `main` after SimplifyArmIdentity
   
   fn main() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/issue-73223.rs:+0:11: +0:11
-      let _1: i32;                         // in scope 0 at $DIR/issue-73223.rs:+1:9: +1:14
-      let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/issue-73223.rs:+1:23: +1:30
-      let mut _3: isize;                   // in scope 0 at $DIR/issue-73223.rs:+2:9: +2:16
-      let _4: i32;                         // in scope 0 at $DIR/issue-73223.rs:+2:14: +2:15
-      let mut _5: !;                       // in scope 0 at $DIR/issue-73223.rs:+3:17: +3:23
-      let mut _7: i32;                     // in scope 0 at $DIR/issue-73223.rs:+6:22: +6:27
+      let mut _0: ();                      // return place in scope 0 at $DIR/issue_73223.rs:+0:11: +0:11
+      let _1: i32;                         // in scope 0 at $DIR/issue_73223.rs:+1:9: +1:14
+      let mut _2: std::option::Option<i32>; // in scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
+      let mut _3: isize;                   // in scope 0 at $DIR/issue_73223.rs:+2:9: +2:16
+      let _4: i32;                         // in scope 0 at $DIR/issue_73223.rs:+2:14: +2:15
+      let mut _5: !;                       // in scope 0 at $DIR/issue_73223.rs:+3:17: +3:23
+      let mut _7: i32;                     // in scope 0 at $DIR/issue_73223.rs:+6:22: +6:27
       let _8: ();                          // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
       let mut _9: (&i32, &i32);            // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
       let mut _10: &i32;                   // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
       let mut _11: &i32;                   // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-      let _12: i32;                        // in scope 0 at $DIR/issue-73223.rs:+7:23: +7:24
+      let _12: i32;                        // in scope 0 at $DIR/issue_73223.rs:+7:23: +7:24
       let mut _15: bool;                   // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
       let mut _16: bool;                   // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
       let mut _17: i32;                    // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@@ -27,10 +27,10 @@
       let _26: &i32;                       // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
       let mut _27: std::option::Option<std::fmt::Arguments<'_>>; // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
       scope 1 {
-          debug split => _1;               // in scope 1 at $DIR/issue-73223.rs:+1:9: +1:14
-          let _6: std::option::Option<i32>; // in scope 1 at $DIR/issue-73223.rs:+6:9: +6:14
+          debug split => _1;               // in scope 1 at $DIR/issue_73223.rs:+1:9: +1:14
+          let _6: std::option::Option<i32>; // in scope 1 at $DIR/issue_73223.rs:+6:9: +6:14
           scope 3 {
-              debug _prev => _6;           // in scope 3 at $DIR/issue-73223.rs:+6:9: +6:14
+              debug _prev => _6;           // in scope 3 at $DIR/issue_73223.rs:+6:9: +6:14
               let _13: &i32;               // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
               let _14: &i32;               // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
               let mut _28: &i32;           // in scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@@ -45,43 +45,43 @@
           }
       }
       scope 2 {
-          debug v => _4;                   // in scope 2 at $DIR/issue-73223.rs:+2:14: +2:15
+          debug v => _4;                   // in scope 2 at $DIR/issue_73223.rs:+2:14: +2:15
       }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/issue-73223.rs:+1:9: +1:14
-          StorageLive(_2);                 // scope 0 at $DIR/issue-73223.rs:+1:23: +1:30
-          Deinit(_2);                      // scope 0 at $DIR/issue-73223.rs:+1:23: +1:30
-          ((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue-73223.rs:+1:23: +1:30
-          discriminant(_2) = 1;            // scope 0 at $DIR/issue-73223.rs:+1:23: +1:30
-          _3 = const 1_isize;              // scope 0 at $DIR/issue-73223.rs:+1:23: +1:30
-          goto -> bb3;                     // scope 0 at $DIR/issue-73223.rs:+1:17: +1:30
+          StorageLive(_1);                 // scope 0 at $DIR/issue_73223.rs:+1:9: +1:14
+          StorageLive(_2);                 // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
+          Deinit(_2);                      // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
+          ((_2 as Some).0: i32) = const 1_i32; // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
+          discriminant(_2) = 1;            // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
+          _3 = const 1_isize;              // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
+          goto -> bb3;                     // scope 0 at $DIR/issue_73223.rs:+1:17: +1:30
       }
   
       bb1: {
-          nop;                             // scope 0 at $DIR/issue-73223.rs:+3:17: +3:23
-          StorageDead(_2);                 // scope 0 at $DIR/issue-73223.rs:+4:6: +4:7
-          StorageDead(_1);                 // scope 0 at $DIR/issue-73223.rs:+8:1: +8:2
-          return;                          // scope 0 at $DIR/issue-73223.rs:+8:2: +8:2
+          nop;                             // scope 0 at $DIR/issue_73223.rs:+3:17: +3:23
+          StorageDead(_2);                 // scope 0 at $DIR/issue_73223.rs:+4:6: +4:7
+          StorageDead(_1);                 // scope 0 at $DIR/issue_73223.rs:+8:1: +8:2
+          return;                          // scope 0 at $DIR/issue_73223.rs:+8:2: +8:2
       }
   
       bb2: {
-          unreachable;                     // scope 0 at $DIR/issue-73223.rs:+1:23: +1:30
+          unreachable;                     // scope 0 at $DIR/issue_73223.rs:+1:23: +1:30
       }
   
       bb3: {
-          StorageLive(_4);                 // scope 0 at $DIR/issue-73223.rs:+2:14: +2:15
-          _4 = ((_2 as Some).0: i32);      // scope 0 at $DIR/issue-73223.rs:+2:14: +2:15
-          _1 = _4;                         // scope 2 at $DIR/issue-73223.rs:+2:20: +2:21
-          StorageDead(_4);                 // scope 0 at $DIR/issue-73223.rs:+2:20: +2:21
-          StorageDead(_2);                 // scope 0 at $DIR/issue-73223.rs:+4:6: +4:7
-          StorageLive(_6);                 // scope 1 at $DIR/issue-73223.rs:+6:9: +6:14
-          StorageLive(_7);                 // scope 1 at $DIR/issue-73223.rs:+6:22: +6:27
-          _7 = _1;                         // scope 1 at $DIR/issue-73223.rs:+6:22: +6:27
-          Deinit(_6);                      // scope 1 at $DIR/issue-73223.rs:+6:17: +6:28
-          ((_6 as Some).0: i32) = move _7; // scope 1 at $DIR/issue-73223.rs:+6:17: +6:28
-          discriminant(_6) = 1;            // scope 1 at $DIR/issue-73223.rs:+6:17: +6:28
-          StorageDead(_7);                 // scope 1 at $DIR/issue-73223.rs:+6:27: +6:28
+          StorageLive(_4);                 // scope 0 at $DIR/issue_73223.rs:+2:14: +2:15
+          _4 = ((_2 as Some).0: i32);      // scope 0 at $DIR/issue_73223.rs:+2:14: +2:15
+          _1 = _4;                         // scope 2 at $DIR/issue_73223.rs:+2:20: +2:21
+          StorageDead(_4);                 // scope 0 at $DIR/issue_73223.rs:+2:20: +2:21
+          StorageDead(_2);                 // scope 0 at $DIR/issue_73223.rs:+4:6: +4:7
+          StorageLive(_6);                 // scope 1 at $DIR/issue_73223.rs:+6:9: +6:14
+          StorageLive(_7);                 // scope 1 at $DIR/issue_73223.rs:+6:22: +6:27
+          _7 = _1;                         // scope 1 at $DIR/issue_73223.rs:+6:22: +6:27
+          Deinit(_6);                      // scope 1 at $DIR/issue_73223.rs:+6:17: +6:28
+          ((_6 as Some).0: i32) = move _7; // scope 1 at $DIR/issue_73223.rs:+6:17: +6:28
+          discriminant(_6) = 1;            // scope 1 at $DIR/issue_73223.rs:+6:17: +6:28
+          StorageDead(_7);                 // scope 1 at $DIR/issue_73223.rs:+6:27: +6:28
           StorageLive(_8);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
           StorageLive(_9);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
           StorageLive(_10);                // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@@ -152,10 +152,10 @@
           StorageDead(_13);                // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
           StorageDead(_9);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
           StorageDead(_8);                 // scope 3 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-          nop;                             // scope 0 at $DIR/issue-73223.rs:+0:11: +8:2
-          StorageDead(_6);                 // scope 1 at $DIR/issue-73223.rs:+8:1: +8:2
-          StorageDead(_1);                 // scope 0 at $DIR/issue-73223.rs:+8:1: +8:2
-          return;                          // scope 0 at $DIR/issue-73223.rs:+8:2: +8:2
+          nop;                             // scope 0 at $DIR/issue_73223.rs:+0:11: +8:2
+          StorageDead(_6);                 // scope 1 at $DIR/issue_73223.rs:+8:1: +8:2
+          StorageDead(_1);                 // scope 0 at $DIR/issue_73223.rs:+8:1: +8:2
+          return;                          // scope 0 at $DIR/issue_73223.rs:+8:2: +8:2
       }
   }
   
diff --git a/src/test/mir-opt/issue-73223.rs b/src/test/mir-opt/issue_73223.rs
index be114cab719..be114cab719 100644
--- a/src/test/mir-opt/issue-73223.rs
+++ b/src/test/mir-opt/issue_73223.rs
diff --git a/src/test/mir-opt/issue_78192.f.InstCombine.diff b/src/test/mir-opt/issue_78192.f.InstCombine.diff
index 8ec94d65fda..116ca304c99 100644
--- a/src/test/mir-opt/issue_78192.f.InstCombine.diff
+++ b/src/test/mir-opt/issue_78192.f.InstCombine.diff
@@ -2,28 +2,28 @@
 + // MIR for `f` after InstCombine
   
   fn f(_1: &T) -> *const T {
-      debug a => _1;                       // in scope 0 at $DIR/issue-78192.rs:+0:13: +0:14
-      let mut _0: *const T;                // return place in scope 0 at $DIR/issue-78192.rs:+0:23: +0:31
-      let _2: &*const T;                   // in scope 0 at $DIR/issue-78192.rs:+1:9: +1:10
-      let _3: &*const T;                   // in scope 0 at $DIR/issue-78192.rs:+1:24: +1:40
-      let _4: *const T;                    // in scope 0 at $DIR/issue-78192.rs:+1:25: +1:40
+      debug a => _1;                       // in scope 0 at $DIR/issue_78192.rs:+0:13: +0:14
+      let mut _0: *const T;                // return place in scope 0 at $DIR/issue_78192.rs:+0:23: +0:31
+      let _2: &*const T;                   // in scope 0 at $DIR/issue_78192.rs:+1:9: +1:10
+      let _3: &*const T;                   // in scope 0 at $DIR/issue_78192.rs:+1:24: +1:40
+      let _4: *const T;                    // in scope 0 at $DIR/issue_78192.rs:+1:25: +1:40
       scope 1 {
-          debug b => _2;                   // in scope 1 at $DIR/issue-78192.rs:+1:9: +1:10
+          debug b => _2;                   // in scope 1 at $DIR/issue_78192.rs:+1:9: +1:10
       }
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/issue-78192.rs:+1:9: +1:10
-          StorageLive(_3);                 // scope 0 at $DIR/issue-78192.rs:+1:24: +1:40
-          StorageLive(_4);                 // scope 0 at $DIR/issue-78192.rs:+1:25: +1:40
-          _4 = &raw const (*_1);           // scope 0 at $DIR/issue-78192.rs:+1:26: +1:27
-          _3 = &_4;                        // scope 0 at $DIR/issue-78192.rs:+1:24: +1:40
--         _2 = &(*_3);                     // scope 0 at $DIR/issue-78192.rs:+1:24: +1:40
-+         _2 = _3;                         // scope 0 at $DIR/issue-78192.rs:+1:24: +1:40
-          StorageDead(_3);                 // scope 0 at $DIR/issue-78192.rs:+1:40: +1:41
-          _0 = (*_2);                      // scope 1 at $DIR/issue-78192.rs:+2:5: +2:7
-          StorageDead(_4);                 // scope 0 at $DIR/issue-78192.rs:+3:1: +3:2
-          StorageDead(_2);                 // scope 0 at $DIR/issue-78192.rs:+3:1: +3:2
-          return;                          // scope 0 at $DIR/issue-78192.rs:+3:2: +3:2
+          StorageLive(_2);                 // scope 0 at $DIR/issue_78192.rs:+1:9: +1:10
+          StorageLive(_3);                 // scope 0 at $DIR/issue_78192.rs:+1:24: +1:40
+          StorageLive(_4);                 // scope 0 at $DIR/issue_78192.rs:+1:25: +1:40
+          _4 = &raw const (*_1);           // scope 0 at $DIR/issue_78192.rs:+1:26: +1:27
+          _3 = &_4;                        // scope 0 at $DIR/issue_78192.rs:+1:24: +1:40
+-         _2 = &(*_3);                     // scope 0 at $DIR/issue_78192.rs:+1:24: +1:40
++         _2 = _3;                         // scope 0 at $DIR/issue_78192.rs:+1:24: +1:40
+          StorageDead(_3);                 // scope 0 at $DIR/issue_78192.rs:+1:40: +1:41
+          _0 = (*_2);                      // scope 1 at $DIR/issue_78192.rs:+2:5: +2:7
+          StorageDead(_4);                 // scope 0 at $DIR/issue_78192.rs:+3:1: +3:2
+          StorageDead(_2);                 // scope 0 at $DIR/issue_78192.rs:+3:1: +3:2
+          return;                          // scope 0 at $DIR/issue_78192.rs:+3:2: +3:2
       }
   }
   
diff --git a/src/test/mir-opt/issue-78192.rs b/src/test/mir-opt/issue_78192.rs
index 39f665402b0..39f665402b0 100644
--- a/src/test/mir-opt/issue-78192.rs
+++ b/src/test/mir-opt/issue_78192.rs
diff --git a/src/test/mir-opt/issue_91633.bar.mir_map.0.mir b/src/test/mir-opt/issue_91633.bar.built.after.mir
index 625f6c7361a..c3fb90e8402 100644
--- a/src/test/mir-opt/issue_91633.bar.mir_map.0.mir
+++ b/src/test/mir-opt/issue_91633.bar.built.after.mir
@@ -1,39 +1,39 @@
-// MIR for `bar` 0 mir_map
+// MIR for `bar` after built
 
 fn bar(_1: Box<[T]>) -> () {
-    debug it => _1;                      // in scope 0 at $DIR/issue-91633.rs:+0:12: +0:14
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-91633.rs:+1:2: +1:2
-    let mut _2: &<[T] as std::ops::Index<usize>>::Output; // in scope 0 at $DIR/issue-91633.rs:+4:14: +4:19
-    let mut _3: &[T];                    // in scope 0 at $DIR/issue-91633.rs:+4:14: +4:16
+    debug it => _1;                      // in scope 0 at $DIR/issue_91633.rs:+0:12: +0:14
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_91633.rs:+1:2: +1:2
+    let mut _2: &<[T] as std::ops::Index<usize>>::Output; // in scope 0 at $DIR/issue_91633.rs:+4:14: +4:19
+    let mut _3: &[T];                    // in scope 0 at $DIR/issue_91633.rs:+4:14: +4:16
     scope 1 {
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-91633.rs:+4:14: +4:19
-        StorageLive(_3);                 // scope 0 at $DIR/issue-91633.rs:+4:14: +4:16
-        _3 = &(*_1);                     // scope 0 at $DIR/issue-91633.rs:+4:14: +4:16
-        _2 = <[T] as Index<usize>>::index(move _3, const 0_usize) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue-91633.rs:+4:14: +4:19
+        StorageLive(_2);                 // scope 0 at $DIR/issue_91633.rs:+4:14: +4:19
+        StorageLive(_3);                 // scope 0 at $DIR/issue_91633.rs:+4:14: +4:16
+        _3 = &(*_1);                     // scope 0 at $DIR/issue_91633.rs:+4:14: +4:16
+        _2 = <[T] as Index<usize>>::index(move _3, const 0_usize) -> [return: bb1, unwind: bb3]; // scope 0 at $DIR/issue_91633.rs:+4:14: +4:19
                                          // mir::Constant
-                                         // + span: $DIR/issue-91633.rs:15:14: 15:19
+                                         // + span: $DIR/issue_91633.rs:15:14: 15:19
                                          // + literal: Const { ty: for<'a> fn(&'a [T], usize) -> &'a <[T] as Index<usize>>::Output {<[T] as Index<usize>>::index}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_3);                 // scope 0 at $DIR/issue-91633.rs:+4:18: +4:19
-        StorageDead(_2);                 // scope 0 at $DIR/issue-91633.rs:+4:19: +4:20
-        _0 = const ();                   // scope 0 at $DIR/issue-91633.rs:+3:2: +5:3
-        drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue-91633.rs:+5:2: +5:3
+        StorageDead(_3);                 // scope 0 at $DIR/issue_91633.rs:+4:18: +4:19
+        StorageDead(_2);                 // scope 0 at $DIR/issue_91633.rs:+4:19: +4:20
+        _0 = const ();                   // scope 0 at $DIR/issue_91633.rs:+3:2: +5:3
+        drop(_1) -> [return: bb2, unwind: bb4]; // scope 0 at $DIR/issue_91633.rs:+5:2: +5:3
     }
 
     bb2: {
-        return;                          // scope 0 at $DIR/issue-91633.rs:+5:3: +5:3
+        return;                          // scope 0 at $DIR/issue_91633.rs:+5:3: +5:3
     }
 
     bb3 (cleanup): {
-        drop(_1) -> bb4;                 // scope 0 at $DIR/issue-91633.rs:+5:2: +5:3
+        drop(_1) -> bb4;                 // scope 0 at $DIR/issue_91633.rs:+5:2: +5:3
     }
 
     bb4 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-91633.rs:+0:1: +5:3
+        resume;                          // scope 0 at $DIR/issue_91633.rs:+0:1: +5:3
     }
 }
diff --git a/src/test/mir-opt/issue_91633.foo.mir_map.0.mir b/src/test/mir-opt/issue_91633.foo.built.after.mir
index 9903e203a23..4e3dd365e92 100644
--- a/src/test/mir-opt/issue_91633.foo.mir_map.0.mir
+++ b/src/test/mir-opt/issue_91633.foo.built.after.mir
@@ -1,57 +1,57 @@
-// MIR for `foo` 0 mir_map
+// MIR for `foo` after built
 
 fn foo(_1: Box<[T]>) -> T {
-    debug it => _1;                      // in scope 0 at $DIR/issue-91633.rs:+0:19: +0:21
-    let mut _0: T;                       // return place in scope 0 at $DIR/issue-91633.rs:+0:36: +0:37
-    let _2: T;                           // in scope 0 at $DIR/issue-91633.rs:+2:10: +2:11
-    let mut _3: &T;                      // in scope 0 at $DIR/issue-91633.rs:+2:14: +2:27
-    let _4: usize;                       // in scope 0 at $DIR/issue-91633.rs:+2:17: +2:18
-    let mut _5: usize;                   // in scope 0 at $DIR/issue-91633.rs:+2:14: +2:19
-    let mut _6: bool;                    // in scope 0 at $DIR/issue-91633.rs:+2:14: +2:19
+    debug it => _1;                      // in scope 0 at $DIR/issue_91633.rs:+0:19: +0:21
+    let mut _0: T;                       // return place in scope 0 at $DIR/issue_91633.rs:+0:36: +0:37
+    let _2: T;                           // in scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
+    let mut _3: &T;                      // in scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
+    let _4: usize;                       // in scope 0 at $DIR/issue_91633.rs:+2:17: +2:18
+    let mut _5: usize;                   // in scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
+    let mut _6: bool;                    // in scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
     scope 1 {
-        debug f => _2;                   // in scope 1 at $DIR/issue-91633.rs:+2:10: +2:11
+        debug f => _2;                   // in scope 1 at $DIR/issue_91633.rs:+2:10: +2:11
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-91633.rs:+2:10: +2:11
-        StorageLive(_3);                 // scope 0 at $DIR/issue-91633.rs:+2:14: +2:27
-        StorageLive(_4);                 // scope 0 at $DIR/issue-91633.rs:+2:17: +2:18
-        _4 = const 0_usize;              // scope 0 at $DIR/issue-91633.rs:+2:17: +2:18
-        _5 = Len((*_1));                 // scope 0 at $DIR/issue-91633.rs:+2:14: +2:19
-        _6 = Lt(_4, _5);                 // scope 0 at $DIR/issue-91633.rs:+2:14: +2:19
-        assert(move _6, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> [success: bb1, unwind: bb5]; // scope 0 at $DIR/issue-91633.rs:+2:14: +2:19
+        StorageLive(_2);                 // scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
+        StorageLive(_3);                 // scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
+        StorageLive(_4);                 // scope 0 at $DIR/issue_91633.rs:+2:17: +2:18
+        _4 = const 0_usize;              // scope 0 at $DIR/issue_91633.rs:+2:17: +2:18
+        _5 = Len((*_1));                 // scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
+        _6 = Lt(_4, _5);                 // scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
+        assert(move _6, "index out of bounds: the length is {} but the index is {}", move _5, _4) -> [success: bb1, unwind: bb5]; // scope 0 at $DIR/issue_91633.rs:+2:14: +2:19
     }
 
     bb1: {
-        _3 = &(*_1)[_4];                 // scope 0 at $DIR/issue-91633.rs:+2:14: +2:27
-        _2 = <T as Clone>::clone(move _3) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/issue-91633.rs:+2:14: +2:27
+        _3 = &(*_1)[_4];                 // scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
+        _2 = <T as Clone>::clone(move _3) -> [return: bb2, unwind: bb5]; // scope 0 at $DIR/issue_91633.rs:+2:14: +2:27
                                          // mir::Constant
-                                         // + span: $DIR/issue-91633.rs:28:20: 28:25
+                                         // + span: $DIR/issue_91633.rs:28:20: 28:25
                                          // + literal: Const { ty: for<'a> fn(&'a T) -> T {<T as Clone>::clone}, val: Value(<ZST>) }
     }
 
     bb2: {
-        StorageDead(_3);                 // scope 0 at $DIR/issue-91633.rs:+2:26: +2:27
-        FakeRead(ForLet(None), _2);      // scope 0 at $DIR/issue-91633.rs:+2:10: +2:11
-        StorageDead(_4);                 // scope 0 at $DIR/issue-91633.rs:+2:27: +2:28
-        _0 = move _2;                    // scope 1 at $DIR/issue-91633.rs:+3:6: +3:7
-        drop(_2) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/issue-91633.rs:+4:2: +4:3
+        StorageDead(_3);                 // scope 0 at $DIR/issue_91633.rs:+2:26: +2:27
+        FakeRead(ForLet(None), _2);      // scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
+        StorageDead(_4);                 // scope 0 at $DIR/issue_91633.rs:+2:27: +2:28
+        _0 = move _2;                    // scope 1 at $DIR/issue_91633.rs:+3:6: +3:7
+        drop(_2) -> [return: bb3, unwind: bb5]; // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
     }
 
     bb3: {
-        StorageDead(_2);                 // scope 0 at $DIR/issue-91633.rs:+4:2: +4:3
-        drop(_1) -> [return: bb4, unwind: bb6]; // scope 0 at $DIR/issue-91633.rs:+4:2: +4:3
+        StorageDead(_2);                 // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
+        drop(_1) -> [return: bb4, unwind: bb6]; // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
     }
 
     bb4: {
-        return;                          // scope 0 at $DIR/issue-91633.rs:+4:3: +4:3
+        return;                          // scope 0 at $DIR/issue_91633.rs:+4:3: +4:3
     }
 
     bb5 (cleanup): {
-        drop(_1) -> bb6;                 // scope 0 at $DIR/issue-91633.rs:+4:2: +4:3
+        drop(_1) -> bb6;                 // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
     }
 
     bb6 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-91633.rs:+0:1: +4:3
+        resume;                          // scope 0 at $DIR/issue_91633.rs:+0:1: +4:3
     }
 }
diff --git a/src/test/mir-opt/issue_91633.fun.mir_map.0.mir b/src/test/mir-opt/issue_91633.fun.built.after.mir
index ded9a4cf7e3..42486d3a50e 100644
--- a/src/test/mir-opt/issue_91633.fun.mir_map.0.mir
+++ b/src/test/mir-opt/issue_91633.fun.built.after.mir
@@ -1,35 +1,35 @@
-// MIR for `fun` 0 mir_map
+// MIR for `fun` after built
 
 fn fun(_1: &[T]) -> &T {
-    debug it => _1;                      // in scope 0 at $DIR/issue-91633.rs:+0:12: +0:14
-    let mut _0: &T;                      // return place in scope 0 at $DIR/issue-91633.rs:+0:25: +0:27
-    let _2: &T;                          // in scope 0 at $DIR/issue-91633.rs:+2:10: +2:11
-    let _3: usize;                       // in scope 0 at $DIR/issue-91633.rs:+2:18: +2:19
-    let mut _4: usize;                   // in scope 0 at $DIR/issue-91633.rs:+2:15: +2:20
-    let mut _5: bool;                    // in scope 0 at $DIR/issue-91633.rs:+2:15: +2:20
+    debug it => _1;                      // in scope 0 at $DIR/issue_91633.rs:+0:12: +0:14
+    let mut _0: &T;                      // return place in scope 0 at $DIR/issue_91633.rs:+0:25: +0:27
+    let _2: &T;                          // in scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
+    let _3: usize;                       // in scope 0 at $DIR/issue_91633.rs:+2:18: +2:19
+    let mut _4: usize;                   // in scope 0 at $DIR/issue_91633.rs:+2:15: +2:20
+    let mut _5: bool;                    // in scope 0 at $DIR/issue_91633.rs:+2:15: +2:20
     scope 1 {
-        debug f => _2;                   // in scope 1 at $DIR/issue-91633.rs:+2:10: +2:11
+        debug f => _2;                   // in scope 1 at $DIR/issue_91633.rs:+2:10: +2:11
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-91633.rs:+2:10: +2:11
-        StorageLive(_3);                 // scope 0 at $DIR/issue-91633.rs:+2:18: +2:19
-        _3 = const 0_usize;              // scope 0 at $DIR/issue-91633.rs:+2:18: +2:19
-        _4 = Len((*_1));                 // scope 0 at $DIR/issue-91633.rs:+2:15: +2:20
-        _5 = Lt(_3, _4);                 // scope 0 at $DIR/issue-91633.rs:+2:15: +2:20
-        assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind: bb2]; // scope 0 at $DIR/issue-91633.rs:+2:15: +2:20
+        StorageLive(_2);                 // scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
+        StorageLive(_3);                 // scope 0 at $DIR/issue_91633.rs:+2:18: +2:19
+        _3 = const 0_usize;              // scope 0 at $DIR/issue_91633.rs:+2:18: +2:19
+        _4 = Len((*_1));                 // scope 0 at $DIR/issue_91633.rs:+2:15: +2:20
+        _5 = Lt(_3, _4);                 // scope 0 at $DIR/issue_91633.rs:+2:15: +2:20
+        assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind: bb2]; // scope 0 at $DIR/issue_91633.rs:+2:15: +2:20
     }
 
     bb1: {
-        _2 = &(*_1)[_3];                 // scope 0 at $DIR/issue-91633.rs:+2:14: +2:20
-        FakeRead(ForLet(None), _2);      // scope 0 at $DIR/issue-91633.rs:+2:10: +2:11
-        _0 = &(*_2);                     // scope 1 at $DIR/issue-91633.rs:+3:6: +3:7
-        StorageDead(_3);                 // scope 0 at $DIR/issue-91633.rs:+4:2: +4:3
-        StorageDead(_2);                 // scope 0 at $DIR/issue-91633.rs:+4:2: +4:3
-        return;                          // scope 0 at $DIR/issue-91633.rs:+4:3: +4:3
+        _2 = &(*_1)[_3];                 // scope 0 at $DIR/issue_91633.rs:+2:14: +2:20
+        FakeRead(ForLet(None), _2);      // scope 0 at $DIR/issue_91633.rs:+2:10: +2:11
+        _0 = &(*_2);                     // scope 1 at $DIR/issue_91633.rs:+3:6: +3:7
+        StorageDead(_3);                 // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
+        StorageDead(_2);                 // scope 0 at $DIR/issue_91633.rs:+4:2: +4:3
+        return;                          // scope 0 at $DIR/issue_91633.rs:+4:3: +4:3
     }
 
     bb2 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-91633.rs:+0:1: +4:3
+        resume;                          // scope 0 at $DIR/issue_91633.rs:+0:1: +4:3
     }
 }
diff --git a/src/test/mir-opt/issue_91633.hey.mir_map.0.mir b/src/test/mir-opt/issue_91633.hey.built.after.mir
index 37c3b3fcaca..ccb06dd5983 100644
--- a/src/test/mir-opt/issue_91633.hey.mir_map.0.mir
+++ b/src/test/mir-opt/issue_91633.hey.built.after.mir
@@ -1,35 +1,35 @@
-// MIR for `hey` 0 mir_map
+// MIR for `hey` after built
 
 fn hey(_1: &[T]) -> () {
-    debug it => _1;                      // in scope 0 at $DIR/issue-91633.rs:+0:12: +0:14
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-91633.rs:+1:2: +1:2
-    let mut _2: &<[T] as std::ops::Index<usize>>::Output; // in scope 0 at $DIR/issue-91633.rs:+4:14: +4:20
-    let _3: &<[T] as std::ops::Index<usize>>::Output; // in scope 0 at $DIR/issue-91633.rs:+4:15: +4:20
-    let mut _4: &[T];                    // in scope 0 at $DIR/issue-91633.rs:+4:15: +4:17
+    debug it => _1;                      // in scope 0 at $DIR/issue_91633.rs:+0:12: +0:14
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_91633.rs:+1:2: +1:2
+    let mut _2: &<[T] as std::ops::Index<usize>>::Output; // in scope 0 at $DIR/issue_91633.rs:+4:14: +4:20
+    let _3: &<[T] as std::ops::Index<usize>>::Output; // in scope 0 at $DIR/issue_91633.rs:+4:15: +4:20
+    let mut _4: &[T];                    // in scope 0 at $DIR/issue_91633.rs:+4:15: +4:17
     scope 1 {
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-91633.rs:+4:14: +4:20
-        StorageLive(_3);                 // scope 0 at $DIR/issue-91633.rs:+4:15: +4:20
-        StorageLive(_4);                 // scope 0 at $DIR/issue-91633.rs:+4:15: +4:17
-        _4 = &(*_1);                     // scope 0 at $DIR/issue-91633.rs:+4:15: +4:17
-        _3 = <[T] as Index<usize>>::index(move _4, const 0_usize) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/issue-91633.rs:+4:15: +4:20
+        StorageLive(_2);                 // scope 0 at $DIR/issue_91633.rs:+4:14: +4:20
+        StorageLive(_3);                 // scope 0 at $DIR/issue_91633.rs:+4:15: +4:20
+        StorageLive(_4);                 // scope 0 at $DIR/issue_91633.rs:+4:15: +4:17
+        _4 = &(*_1);                     // scope 0 at $DIR/issue_91633.rs:+4:15: +4:17
+        _3 = <[T] as Index<usize>>::index(move _4, const 0_usize) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/issue_91633.rs:+4:15: +4:20
                                          // mir::Constant
-                                         // + span: $DIR/issue-91633.rs:7:15: 7:20
+                                         // + span: $DIR/issue_91633.rs:7:15: 7:20
                                          // + literal: Const { ty: for<'a> fn(&'a [T], usize) -> &'a <[T] as Index<usize>>::Output {<[T] as Index<usize>>::index}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_4);                 // scope 0 at $DIR/issue-91633.rs:+4:19: +4:20
-        _2 = &(*_3);                     // scope 0 at $DIR/issue-91633.rs:+4:14: +4:20
-        StorageDead(_2);                 // scope 0 at $DIR/issue-91633.rs:+4:20: +4:21
-        _0 = const ();                   // scope 0 at $DIR/issue-91633.rs:+3:2: +5:3
-        StorageDead(_3);                 // scope 0 at $DIR/issue-91633.rs:+5:2: +5:3
-        return;                          // scope 0 at $DIR/issue-91633.rs:+5:3: +5:3
+        StorageDead(_4);                 // scope 0 at $DIR/issue_91633.rs:+4:19: +4:20
+        _2 = &(*_3);                     // scope 0 at $DIR/issue_91633.rs:+4:14: +4:20
+        StorageDead(_2);                 // scope 0 at $DIR/issue_91633.rs:+4:20: +4:21
+        _0 = const ();                   // scope 0 at $DIR/issue_91633.rs:+3:2: +5:3
+        StorageDead(_3);                 // scope 0 at $DIR/issue_91633.rs:+5:2: +5:3
+        return;                          // scope 0 at $DIR/issue_91633.rs:+5:3: +5:3
     }
 
     bb2 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-91633.rs:+0:1: +5:3
+        resume;                          // scope 0 at $DIR/issue_91633.rs:+0:1: +5:3
     }
 }
diff --git a/src/test/mir-opt/issue-91633.rs b/src/test/mir-opt/issue_91633.rs
index 8f66019857f..9127cacc97c 100644
--- a/src/test/mir-opt/issue-91633.rs
+++ b/src/test/mir-opt/issue_91633.rs
@@ -1,5 +1,5 @@
 // compile-flags: -Z mir-opt-level=0
-// EMIT_MIR issue_91633.hey.mir_map.0.mir
+// EMIT_MIR issue_91633.hey.built.after.mir
 fn hey<T> (it: &[T])
  where
      [T] : std::ops::Index<usize>,
@@ -7,7 +7,7 @@ fn hey<T> (it: &[T])
      let _ = &it[0];
  }
 
-// EMIT_MIR issue_91633.bar.mir_map.0.mir
+// EMIT_MIR issue_91633.bar.built.after.mir
 fn bar<T> (it: Box<[T]>)
  where
      [T] : std::ops::Index<usize>,
@@ -15,14 +15,14 @@ fn bar<T> (it: Box<[T]>)
      let _ = it[0];
  }
 
-// EMIT_MIR issue_91633.fun.mir_map.0.mir
+// EMIT_MIR issue_91633.fun.built.after.mir
 fn fun<T> (it: &[T]) -> &T
  {
      let f = &it[0];
      f
  }
 
-// EMIT_MIR issue_91633.foo.mir_map.0.mir
+// EMIT_MIR issue_91633.foo.built.after.mir
 fn foo<T: Clone> (it: Box<[T]>) -> T
  {
      let f = it[0].clone();
diff --git a/src/test/mir-opt/issue_99325.main.mir_map.0.mir b/src/test/mir-opt/issue_99325.main.built.after.mir
index 165efa9df41..3db40412b2e 100644
--- a/src/test/mir-opt/issue_99325.main.mir_map.0.mir
+++ b/src/test/mir-opt/issue_99325.main.built.after.mir
@@ -1,18 +1,18 @@
-// MIR for `main` 0 mir_map
+// MIR for `main` after built
 
 | User Type Annotations
-| 0: user_ty: Canonical { max_universe: U0, variables: [], value: TypeOf(DefId(0:3 ~ issue_99325[8f58]::function_with_bytes), UserSubsts { substs: [Const { ty: &'static [u8; 4], kind: Value(Branch([Leaf(0x41), Leaf(0x41), Leaf(0x41), Leaf(0x41)])) }], user_self_ty: None }) }, span: $DIR/issue-99325.rs:10:16: 10:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
-| 1: user_ty: Canonical { max_universe: U0, variables: [], value: TypeOf(DefId(0:3 ~ issue_99325[8f58]::function_with_bytes), UserSubsts { substs: [Const { ty: &'static [u8; 4], kind: Unevaluated(UnevaluatedConst { def: WithOptConstParam { did: DefId(0:8 ~ issue_99325[8f58]::main::{constant#1}), const_param_did: Some(DefId(0:4 ~ issue_99325[8f58]::function_with_bytes::BYTES)) }, substs: [] }) }], user_self_ty: None }) }, span: $DIR/issue-99325.rs:11:16: 11:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
+| 0: user_ty: Canonical { max_universe: U0, variables: [], value: TypeOf(DefId(0:3 ~ issue_99325[8f58]::function_with_bytes), UserSubsts { substs: [Const { ty: &'static [u8; 4], kind: Value(Branch([Leaf(0x41), Leaf(0x41), Leaf(0x41), Leaf(0x41)])) }], user_self_ty: None }) }, span: $DIR/issue_99325.rs:10:16: 10:46, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
+| 1: user_ty: Canonical { max_universe: U0, variables: [], value: TypeOf(DefId(0:3 ~ issue_99325[8f58]::function_with_bytes), UserSubsts { substs: [Const { ty: &'static [u8; 4], kind: Unevaluated(UnevaluatedConst { def: WithOptConstParam { did: DefId(0:8 ~ issue_99325[8f58]::main::{constant#1}), const_param_did: Some(DefId(0:4 ~ issue_99325[8f58]::function_with_bytes::BYTES)) }, substs: [] }) }], user_self_ty: None }) }, span: $DIR/issue_99325.rs:11:16: 11:68, inferred_ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}
 |
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/issue-99325.rs:+0:15: +0:15
+    let mut _0: ();                      // return place in scope 0 at $DIR/issue_99325.rs:+0:15: +0:15
     let _1: ();                          // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
     let mut _2: (&&[u8], &&[u8; 4]);     // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
     let mut _3: &&[u8];                  // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-    let _4: &[u8];                       // in scope 0 at $DIR/issue-99325.rs:+1:16: +1:48
+    let _4: &[u8];                       // in scope 0 at $DIR/issue_99325.rs:+1:16: +1:48
     let mut _5: &&[u8; 4];               // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-    let _6: &[u8; 4];                    // in scope 0 at $DIR/issue-99325.rs:+1:50: +1:75
-    let _7: [u8; 4];                     // in scope 0 at $DIR/issue-99325.rs:+1:51: +1:75
+    let _6: &[u8; 4];                    // in scope 0 at $DIR/issue_99325.rs:+1:50: +1:75
+    let _7: [u8; 4];                     // in scope 0 at $DIR/issue_99325.rs:+1:51: +1:75
     let _8: &&[u8];                      // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
     let _9: &&[u8; 4];                   // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
     let mut _10: bool;                   // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@@ -30,9 +30,9 @@ fn main() -> () {
     let _23: ();                         // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
     let mut _24: (&&[u8], &&[u8; 4]);    // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
     let mut _25: &&[u8];                 // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-    let _26: &[u8];                      // in scope 0 at $DIR/issue-99325.rs:+2:16: +2:70
+    let _26: &[u8];                      // in scope 0 at $DIR/issue_99325.rs:+2:16: +2:70
     let mut _27: &&[u8; 4];              // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-    let _28: &[u8; 4];                   // in scope 0 at $DIR/issue-99325.rs:+2:72: +2:79
+    let _28: &[u8; 4];                   // in scope 0 at $DIR/issue_99325.rs:+2:72: +2:79
     let _29: &&[u8];                     // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
     let _30: &&[u8; 4];                  // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
     let mut _31: bool;                   // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@@ -68,10 +68,10 @@ fn main() -> () {
         StorageLive(_1);                 // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         StorageLive(_2);                 // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         StorageLive(_3);                 // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-        StorageLive(_4);                 // scope 0 at $DIR/issue-99325.rs:+1:16: +1:48
-        _4 = function_with_bytes::<&*b"AAAA">() -> [return: bb1, unwind: bb19]; // scope 0 at $DIR/issue-99325.rs:+1:16: +1:48
+        StorageLive(_4);                 // scope 0 at $DIR/issue_99325.rs:+1:16: +1:48
+        _4 = function_with_bytes::<&*b"AAAA">() -> [return: bb1, unwind: bb19]; // scope 0 at $DIR/issue_99325.rs:+1:16: +1:48
                                          // mir::Constant
-                                         // + span: $DIR/issue-99325.rs:10:16: 10:46
+                                         // + span: $DIR/issue_99325.rs:10:16: 10:46
                                          // + user_ty: UserType(0)
                                          // + literal: Const { ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}, val: Value(<ZST>) }
     }
@@ -79,10 +79,10 @@ fn main() -> () {
     bb1: {
         _3 = &_4;                        // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         StorageLive(_5);                 // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-        StorageLive(_6);                 // scope 0 at $DIR/issue-99325.rs:+1:50: +1:75
-        StorageLive(_7);                 // scope 0 at $DIR/issue-99325.rs:+1:51: +1:75
-        _7 = [const 65_u8, const 65_u8, const 65_u8, const 65_u8]; // scope 0 at $DIR/issue-99325.rs:+1:51: +1:75
-        _6 = &_7;                        // scope 0 at $DIR/issue-99325.rs:+1:50: +1:75
+        StorageLive(_6);                 // scope 0 at $DIR/issue_99325.rs:+1:50: +1:75
+        StorageLive(_7);                 // scope 0 at $DIR/issue_99325.rs:+1:51: +1:75
+        _7 = [const 65_u8, const 65_u8, const 65_u8, const 65_u8]; // scope 0 at $DIR/issue_99325.rs:+1:51: +1:75
+        _6 = &_7;                        // scope 0 at $DIR/issue_99325.rs:+1:50: +1:75
         _5 = &_6;                        // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         _2 = (move _3, move _5);         // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         StorageDead(_5);                 // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@@ -176,10 +176,10 @@ fn main() -> () {
         StorageLive(_23);                // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         StorageLive(_24);                // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         StorageLive(_25);                // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-        StorageLive(_26);                // scope 0 at $DIR/issue-99325.rs:+2:16: +2:70
-        _26 = function_with_bytes::<&*b"AAAA">() -> [return: bb10, unwind: bb19]; // scope 0 at $DIR/issue-99325.rs:+2:16: +2:70
+        StorageLive(_26);                // scope 0 at $DIR/issue_99325.rs:+2:16: +2:70
+        _26 = function_with_bytes::<&*b"AAAA">() -> [return: bb10, unwind: bb19]; // scope 0 at $DIR/issue_99325.rs:+2:16: +2:70
                                          // mir::Constant
-                                         // + span: $DIR/issue-99325.rs:11:16: 11:68
+                                         // + span: $DIR/issue_99325.rs:11:16: 11:68
                                          // + user_ty: UserType(1)
                                          // + literal: Const { ty: fn() -> &'static [u8] {function_with_bytes::<&*b"AAAA">}, val: Value(<ZST>) }
     }
@@ -187,10 +187,10 @@ fn main() -> () {
     bb10: {
         _25 = &_26;                      // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         StorageLive(_27);                // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-        StorageLive(_28);                // scope 0 at $DIR/issue-99325.rs:+2:72: +2:79
-        _28 = const b"AAAA";             // scope 0 at $DIR/issue-99325.rs:+2:72: +2:79
+        StorageLive(_28);                // scope 0 at $DIR/issue_99325.rs:+2:72: +2:79
+        _28 = const b"AAAA";             // scope 0 at $DIR/issue_99325.rs:+2:72: +2:79
                                          // mir::Constant
-                                         // + span: $DIR/issue-99325.rs:11:72: 11:79
+                                         // + span: $DIR/issue_99325.rs:11:72: 11:79
                                          // + literal: Const { ty: &[u8; 4], val: Value(Scalar(alloc4)) }
         _27 = &_28;                      // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         _24 = (move _25, move _27);      // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
@@ -281,12 +281,12 @@ fn main() -> () {
         StorageDead(_26);                // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         StorageDead(_24);                // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         StorageDead(_23);                // scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-        _0 = const ();                   // scope 0 at $DIR/issue-99325.rs:+0:15: +3:2
-        return;                          // scope 0 at $DIR/issue-99325.rs:+3:2: +3:2
+        _0 = const ();                   // scope 0 at $DIR/issue_99325.rs:+0:15: +3:2
+        return;                          // scope 0 at $DIR/issue_99325.rs:+3:2: +3:2
     }
 
     bb19 (cleanup): {
-        resume;                          // scope 0 at $DIR/issue-99325.rs:+0:1: +3:2
+        resume;                          // scope 0 at $DIR/issue_99325.rs:+0:1: +3:2
     }
 }
 
diff --git a/src/test/mir-opt/issue-99325.rs b/src/test/mir-opt/issue_99325.rs
index b79946ea8b5..fe819cddb2c 100644
--- a/src/test/mir-opt/issue-99325.rs
+++ b/src/test/mir-opt/issue_99325.rs
@@ -5,7 +5,7 @@ pub fn function_with_bytes<const BYTES: &'static [u8; 4]>() -> &'static [u8] {
     BYTES
 }
 
-// EMIT_MIR issue_99325.main.mir_map.0.mir
+// EMIT_MIR issue_99325.main.built.after.mir
 pub fn main() {
     assert_eq!(function_with_bytes::<b"AAAA">(), &[0x41, 0x41, 0x41, 0x41]);
     assert_eq!(function_with_bytes::<{ &[0x41, 0x41, 0x41, 0x41] }>(), b"AAAA");
diff --git a/src/test/mir-opt/issues/issue_59352.num_to_digit.PreCodegen.after.mir b/src/test/mir-opt/issues/issue_59352.num_to_digit.PreCodegen.after.mir
index f46c10711f6..1cfa41b4daa 100644
--- a/src/test/mir-opt/issues/issue_59352.num_to_digit.PreCodegen.after.mir
+++ b/src/test/mir-opt/issues/issue_59352.num_to_digit.PreCodegen.after.mir
@@ -1,14 +1,14 @@
 // MIR for `num_to_digit` after PreCodegen
 
 fn num_to_digit(_1: char) -> u32 {
-    debug num => _1;                     // in scope 0 at $DIR/issue-59352.rs:+0:21: +0:24
-    let mut _0: u32;                     // return place in scope 0 at $DIR/issue-59352.rs:+0:35: +0:38
-    let mut _2: char;                    // in scope 0 at $DIR/issue-59352.rs:+2:8: +2:11
-    let mut _3: std::option::Option<u32>; // in scope 0 at $DIR/issue-59352.rs:+2:26: +2:41
-    let mut _4: char;                    // in scope 0 at $DIR/issue-59352.rs:+2:26: +2:29
-    let mut _5: u32;                     // in scope 0 at $DIR/issue-59352.rs:+2:8: +2:23
+    debug num => _1;                     // in scope 0 at $DIR/issue_59352.rs:+0:21: +0:24
+    let mut _0: u32;                     // return place in scope 0 at $DIR/issue_59352.rs:+0:35: +0:38
+    let mut _2: char;                    // in scope 0 at $DIR/issue_59352.rs:+2:8: +2:11
+    let mut _3: std::option::Option<u32>; // in scope 0 at $DIR/issue_59352.rs:+2:26: +2:41
+    let mut _4: char;                    // in scope 0 at $DIR/issue_59352.rs:+2:26: +2:29
+    let mut _5: u32;                     // in scope 0 at $DIR/issue_59352.rs:+2:8: +2:23
     let mut _12: isize;                  // in scope 0 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
-    scope 1 (inlined char::methods::<impl char>::is_digit) { // at $DIR/issue-59352.rs:14:8: 14:23
+    scope 1 (inlined char::methods::<impl char>::is_digit) { // at $DIR/issue_59352.rs:14:8: 14:23
         debug self => _2;                // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
         debug radix => _5;               // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
         let mut _6: &std::option::Option<u32>; // in scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
@@ -19,7 +19,7 @@ fn num_to_digit(_1: char) -> u32 {
             let mut _9: isize;           // in scope 2 at $SRC_DIR/core/src/option.rs:LL:COL
         }
     }
-    scope 3 (inlined #[track_caller] Option::<u32>::unwrap) { // at $DIR/issue-59352.rs:14:26: 14:50
+    scope 3 (inlined #[track_caller] Option::<u32>::unwrap) { // at $DIR/issue_59352.rs:14:26: 14:50
         debug self => _3;                // in scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
         let mut _10: isize;              // in scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
         let mut _11: !;                  // in scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
@@ -29,9 +29,9 @@ fn num_to_digit(_1: char) -> u32 {
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/issue-59352.rs:+2:8: +2:11
-        _2 = _1;                         // scope 0 at $DIR/issue-59352.rs:+2:8: +2:11
-        StorageLive(_5);                 // scope 0 at $DIR/issue-59352.rs:+2:8: +2:23
+        StorageLive(_2);                 // scope 0 at $DIR/issue_59352.rs:+2:8: +2:11
+        _2 = _1;                         // scope 0 at $DIR/issue_59352.rs:+2:8: +2:11
+        StorageLive(_5);                 // scope 0 at $DIR/issue_59352.rs:+2:8: +2:23
         StorageLive(_6);                 // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
         StorageLive(_7);                 // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
         StorageLive(_8);                 // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
@@ -43,30 +43,30 @@ fn num_to_digit(_1: char) -> u32 {
     }
 
     bb1: {
-        StorageDead(_12);                // scope 0 at $DIR/issue-59352.rs:+2:8: +2:23
-        StorageLive(_3);                 // scope 0 at $DIR/issue-59352.rs:+2:26: +2:41
-        StorageLive(_4);                 // scope 0 at $DIR/issue-59352.rs:+2:26: +2:29
-        _4 = _1;                         // scope 0 at $DIR/issue-59352.rs:+2:26: +2:29
-        _3 = char::methods::<impl char>::to_digit(move _4, const 8_u32) -> bb2; // scope 0 at $DIR/issue-59352.rs:+2:26: +2:41
+        StorageDead(_12);                // scope 0 at $DIR/issue_59352.rs:+2:8: +2:23
+        StorageLive(_3);                 // scope 0 at $DIR/issue_59352.rs:+2:26: +2:41
+        StorageLive(_4);                 // scope 0 at $DIR/issue_59352.rs:+2:26: +2:29
+        _4 = _1;                         // scope 0 at $DIR/issue_59352.rs:+2:26: +2:29
+        _3 = char::methods::<impl char>::to_digit(move _4, const 8_u32) -> bb2; // scope 0 at $DIR/issue_59352.rs:+2:26: +2:41
                                          // mir::Constant
-                                         // + span: $DIR/issue-59352.rs:14:30: 14:38
+                                         // + span: $DIR/issue_59352.rs:14:30: 14:38
                                          // + literal: Const { ty: fn(char, u32) -> Option<u32> {char::methods::<impl char>::to_digit}, val: Value(<ZST>) }
     }
 
     bb2: {
-        StorageDead(_4);                 // scope 0 at $DIR/issue-59352.rs:+2:40: +2:41
+        StorageDead(_4);                 // scope 0 at $DIR/issue_59352.rs:+2:40: +2:41
         _10 = discriminant(_3);          // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
         switchInt(move _10) -> [0_isize: bb6, 1_isize: bb8, otherwise: bb7]; // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
     }
 
     bb3: {
-        StorageDead(_12);                // scope 0 at $DIR/issue-59352.rs:+2:8: +2:23
-        _0 = const 0_u32;                // scope 0 at $DIR/issue-59352.rs:+2:60: +2:61
-        goto -> bb4;                     // scope 0 at $DIR/issue-59352.rs:+2:5: +2:63
+        StorageDead(_12);                // scope 0 at $DIR/issue_59352.rs:+2:8: +2:23
+        _0 = const 0_u32;                // scope 0 at $DIR/issue_59352.rs:+2:60: +2:61
+        goto -> bb4;                     // scope 0 at $DIR/issue_59352.rs:+2:5: +2:63
     }
 
     bb4: {
-        return;                          // scope 0 at $DIR/issue-59352.rs:+3:2: +3:2
+        return;                          // scope 0 at $DIR/issue_59352.rs:+3:2: +3:2
     }
 
     bb5: {
@@ -77,9 +77,9 @@ fn num_to_digit(_1: char) -> u32 {
         _12 = move _9;                   // scope 2 at $SRC_DIR/core/src/macros/mod.rs:LL:COL
         StorageDead(_6);                 // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
         StorageDead(_7);                 // scope 1 at $SRC_DIR/core/src/char/methods.rs:LL:COL
-        StorageDead(_5);                 // scope 0 at $DIR/issue-59352.rs:+2:8: +2:23
-        StorageDead(_2);                 // scope 0 at $DIR/issue-59352.rs:+2:22: +2:23
-        switchInt(move _12) -> [1_isize: bb1, otherwise: bb3]; // scope 0 at $DIR/issue-59352.rs:+2:8: +2:23
+        StorageDead(_5);                 // scope 0 at $DIR/issue_59352.rs:+2:8: +2:23
+        StorageDead(_2);                 // scope 0 at $DIR/issue_59352.rs:+2:22: +2:23
+        switchInt(move _12) -> [1_isize: bb1, otherwise: bb3]; // scope 0 at $DIR/issue_59352.rs:+2:8: +2:23
     }
 
     bb6: {
@@ -99,7 +99,7 @@ fn num_to_digit(_1: char) -> u32 {
 
     bb8: {
         _0 = move ((_3 as Some).0: u32); // scope 3 at $SRC_DIR/core/src/option.rs:LL:COL
-        StorageDead(_3);                 // scope 0 at $DIR/issue-59352.rs:+2:49: +2:50
-        goto -> bb4;                     // scope 0 at $DIR/issue-59352.rs:+2:5: +2:63
+        StorageDead(_3);                 // scope 0 at $DIR/issue_59352.rs:+2:49: +2:50
+        goto -> bb4;                     // scope 0 at $DIR/issue_59352.rs:+2:5: +2:63
     }
 }
diff --git a/src/test/mir-opt/issues/issue-59352.rs b/src/test/mir-opt/issues/issue_59352.rs
index 1e0045555ab..1e0045555ab 100644
--- a/src/test/mir-opt/issues/issue-59352.rs
+++ b/src/test/mir-opt/issues/issue_59352.rs
diff --git a/src/test/mir-opt/issues/issue_75439.foo.MatchBranchSimplification.diff b/src/test/mir-opt/issues/issue_75439.foo.MatchBranchSimplification.diff
index 2ee4332ad38..87066cc62c0 100644
--- a/src/test/mir-opt/issues/issue_75439.foo.MatchBranchSimplification.diff
+++ b/src/test/mir-opt/issues/issue_75439.foo.MatchBranchSimplification.diff
@@ -2,17 +2,17 @@
 + // MIR for `foo` after MatchBranchSimplification
   
   fn foo(_1: [u8; 16]) -> Option<[u8; 4]> {
-      debug bytes => _1;                   // in scope 0 at $DIR/issue-75439.rs:+0:12: +0:17
-      let mut _0: std::option::Option<[u8; 4]>; // return place in scope 0 at $DIR/issue-75439.rs:+0:32: +0:47
-      let _2: [u32; 4];                    // in scope 0 at $DIR/issue-75439.rs:+2:9: +2:15
-      let mut _3: [u8; 16];                // in scope 0 at $DIR/issue-75439.rs:+2:47: +2:52
-      let mut _5: [u8; 4];                 // in scope 0 at $DIR/issue-75439.rs:+5:14: +5:38
-      let mut _6: u32;                     // in scope 0 at $DIR/issue-75439.rs:+5:33: +5:35
+      debug bytes => _1;                   // in scope 0 at $DIR/issue_75439.rs:+0:12: +0:17
+      let mut _0: std::option::Option<[u8; 4]>; // return place in scope 0 at $DIR/issue_75439.rs:+0:32: +0:47
+      let _2: [u32; 4];                    // in scope 0 at $DIR/issue_75439.rs:+2:9: +2:15
+      let mut _3: [u8; 16];                // in scope 0 at $DIR/issue_75439.rs:+2:47: +2:52
+      let mut _5: [u8; 4];                 // in scope 0 at $DIR/issue_75439.rs:+5:14: +5:38
+      let mut _6: u32;                     // in scope 0 at $DIR/issue_75439.rs:+5:33: +5:35
       scope 1 {
-          debug dwords => _2;              // in scope 1 at $DIR/issue-75439.rs:+2:9: +2:15
+          debug dwords => _2;              // in scope 1 at $DIR/issue_75439.rs:+2:9: +2:15
           scope 3 {
-              debug ip => _4;              // in scope 3 at $DIR/issue-75439.rs:+4:27: +4:29
-              let _4: u32;                 // in scope 3 at $DIR/issue-75439.rs:+4:27: +4:29
+              debug ip => _4;              // in scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
+              let _4: u32;                 // in scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
               scope 4 {
               }
           }
@@ -21,69 +21,69 @@
       }
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/issue-75439.rs:+2:9: +2:15
-          StorageLive(_3);                 // scope 2 at $DIR/issue-75439.rs:+2:47: +2:52
-          _3 = _1;                         // scope 2 at $DIR/issue-75439.rs:+2:47: +2:52
-          _2 = transmute::<[u8; 16], [u32; 4]>(move _3) -> bb1; // scope 2 at $DIR/issue-75439.rs:+2:37: +2:53
+          StorageLive(_2);                 // scope 0 at $DIR/issue_75439.rs:+2:9: +2:15
+          StorageLive(_3);                 // scope 2 at $DIR/issue_75439.rs:+2:47: +2:52
+          _3 = _1;                         // scope 2 at $DIR/issue_75439.rs:+2:47: +2:52
+          _2 = transmute::<[u8; 16], [u32; 4]>(move _3) -> bb1; // scope 2 at $DIR/issue_75439.rs:+2:37: +2:53
                                            // mir::Constant
-                                           // + span: $DIR/issue-75439.rs:7:37: 7:46
+                                           // + span: $DIR/issue_75439.rs:7:37: 7:46
                                            // + literal: Const { ty: unsafe extern "rust-intrinsic" fn([u8; 16]) -> [u32; 4] {transmute::<[u8; 16], [u32; 4]>}, val: Value(<ZST>) }
       }
   
       bb1: {
-          StorageDead(_3);                 // scope 2 at $DIR/issue-75439.rs:+2:52: +2:53
-          switchInt(_2[0 of 4]) -> [0_u32: bb2, otherwise: bb8]; // scope 3 at $DIR/issue-75439.rs:+4:12: +4:30
+          StorageDead(_3);                 // scope 2 at $DIR/issue_75439.rs:+2:52: +2:53
+          switchInt(_2[0 of 4]) -> [0_u32: bb2, otherwise: bb8]; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
       }
   
       bb2: {
-          switchInt(_2[1 of 4]) -> [0_u32: bb3, otherwise: bb8]; // scope 3 at $DIR/issue-75439.rs:+4:12: +4:30
+          switchInt(_2[1 of 4]) -> [0_u32: bb3, otherwise: bb8]; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
       }
   
       bb3: {
-          switchInt(_2[2 of 4]) -> [0_u32: bb5, 4294901760_u32: bb6, otherwise: bb8]; // scope 3 at $DIR/issue-75439.rs:+4:12: +4:30
+          switchInt(_2[2 of 4]) -> [0_u32: bb5, 4294901760_u32: bb6, otherwise: bb8]; // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
       }
   
       bb4: {
-          StorageLive(_5);                 // scope 3 at $DIR/issue-75439.rs:+5:14: +5:38
-          StorageLive(_6);                 // scope 4 at $DIR/issue-75439.rs:+5:33: +5:35
-          _6 = _4;                         // scope 4 at $DIR/issue-75439.rs:+5:33: +5:35
-          _5 = transmute::<u32, [u8; 4]>(move _6) -> bb7; // scope 4 at $DIR/issue-75439.rs:+5:23: +5:36
+          StorageLive(_5);                 // scope 3 at $DIR/issue_75439.rs:+5:14: +5:38
+          StorageLive(_6);                 // scope 4 at $DIR/issue_75439.rs:+5:33: +5:35
+          _6 = _4;                         // scope 4 at $DIR/issue_75439.rs:+5:33: +5:35
+          _5 = transmute::<u32, [u8; 4]>(move _6) -> bb7; // scope 4 at $DIR/issue_75439.rs:+5:23: +5:36
                                            // mir::Constant
-                                           // + span: $DIR/issue-75439.rs:10:23: 10:32
+                                           // + span: $DIR/issue_75439.rs:10:23: 10:32
                                            // + literal: Const { ty: unsafe extern "rust-intrinsic" fn(u32) -> [u8; 4] {transmute::<u32, [u8; 4]>}, val: Value(<ZST>) }
       }
   
       bb5: {
-          StorageLive(_4);                 // scope 3 at $DIR/issue-75439.rs:+4:27: +4:29
-          _4 = _2[3 of 4];                 // scope 3 at $DIR/issue-75439.rs:+4:27: +4:29
-          goto -> bb4;                     // scope 3 at $DIR/issue-75439.rs:+4:12: +4:30
+          StorageLive(_4);                 // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
+          _4 = _2[3 of 4];                 // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
+          goto -> bb4;                     // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
       }
   
       bb6: {
-          StorageLive(_4);                 // scope 3 at $DIR/issue-75439.rs:+4:27: +4:29
-          _4 = _2[3 of 4];                 // scope 3 at $DIR/issue-75439.rs:+4:27: +4:29
-          goto -> bb4;                     // scope 3 at $DIR/issue-75439.rs:+4:12: +4:30
+          StorageLive(_4);                 // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
+          _4 = _2[3 of 4];                 // scope 3 at $DIR/issue_75439.rs:+4:27: +4:29
+          goto -> bb4;                     // scope 3 at $DIR/issue_75439.rs:+4:12: +4:30
       }
   
       bb7: {
-          StorageDead(_6);                 // scope 4 at $DIR/issue-75439.rs:+5:35: +5:36
-          Deinit(_0);                      // scope 3 at $DIR/issue-75439.rs:+5:9: +5:39
-          ((_0 as Some).0: [u8; 4]) = move _5; // scope 3 at $DIR/issue-75439.rs:+5:9: +5:39
-          discriminant(_0) = 1;            // scope 3 at $DIR/issue-75439.rs:+5:9: +5:39
-          StorageDead(_5);                 // scope 3 at $DIR/issue-75439.rs:+5:38: +5:39
-          StorageDead(_4);                 // scope 1 at $DIR/issue-75439.rs:+6:5: +6:6
-          goto -> bb9;                     // scope 1 at $DIR/issue-75439.rs:+4:5: +8:6
+          StorageDead(_6);                 // scope 4 at $DIR/issue_75439.rs:+5:35: +5:36
+          Deinit(_0);                      // scope 3 at $DIR/issue_75439.rs:+5:9: +5:39
+          ((_0 as Some).0: [u8; 4]) = move _5; // scope 3 at $DIR/issue_75439.rs:+5:9: +5:39
+          discriminant(_0) = 1;            // scope 3 at $DIR/issue_75439.rs:+5:9: +5:39
+          StorageDead(_5);                 // scope 3 at $DIR/issue_75439.rs:+5:38: +5:39
+          StorageDead(_4);                 // scope 1 at $DIR/issue_75439.rs:+6:5: +6:6
+          goto -> bb9;                     // scope 1 at $DIR/issue_75439.rs:+4:5: +8:6
       }
   
       bb8: {
-          Deinit(_0);                      // scope 1 at $DIR/issue-75439.rs:+7:9: +7:13
-          discriminant(_0) = 0;            // scope 1 at $DIR/issue-75439.rs:+7:9: +7:13
-          goto -> bb9;                     // scope 1 at $DIR/issue-75439.rs:+4:5: +8:6
+          Deinit(_0);                      // scope 1 at $DIR/issue_75439.rs:+7:9: +7:13
+          discriminant(_0) = 0;            // scope 1 at $DIR/issue_75439.rs:+7:9: +7:13
+          goto -> bb9;                     // scope 1 at $DIR/issue_75439.rs:+4:5: +8:6
       }
   
       bb9: {
-          StorageDead(_2);                 // scope 0 at $DIR/issue-75439.rs:+9:1: +9:2
-          return;                          // scope 0 at $DIR/issue-75439.rs:+9:2: +9:2
+          StorageDead(_2);                 // scope 0 at $DIR/issue_75439.rs:+9:1: +9:2
+          return;                          // scope 0 at $DIR/issue_75439.rs:+9:2: +9:2
       }
   }
   
diff --git a/src/test/mir-opt/issues/issue-75439.rs b/src/test/mir-opt/issues/issue_75439.rs
index ae2e036312e..ae2e036312e 100644
--- a/src/test/mir-opt/issues/issue-75439.rs
+++ b/src/test/mir-opt/issues/issue_75439.rs
diff --git a/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff b/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff
index 25ab0c9f7f4..d3db3b18271 100644
--- a/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff
+++ b/src/test/mir-opt/match_arm_scopes.complicated_match.SimplifyCfg-initial.after-ElaborateDrops.after.diff
@@ -2,271 +2,271 @@
 + // MIR for `complicated_match` after ElaborateDrops
   
   fn complicated_match(_1: bool, _2: (bool, bool, String)) -> i32 {
-      debug cond => _1;                    // in scope 0 at $DIR/match-arm-scopes.rs:+0:22: +0:26
-      debug items => _2;                   // in scope 0 at $DIR/match-arm-scopes.rs:+0:34: +0:39
-      let mut _0: i32;                     // return place in scope 0 at $DIR/match-arm-scopes.rs:+0:66: +0:69
-      let mut _3: &bool;                   // in scope 0 at $DIR/match-arm-scopes.rs:+1:11: +1:16
-      let mut _4: &bool;                   // in scope 0 at $DIR/match-arm-scopes.rs:+1:11: +1:16
-      let _5: bool;                        // in scope 0 at $DIR/match-arm-scopes.rs:+2:17: +2:18
-      let _6: &bool;                       // in scope 0 at $DIR/match-arm-scopes.rs:+2:17: +2:18
-      let _7: std::string::String;         // in scope 0 at $DIR/match-arm-scopes.rs:+2:20: +2:21
-      let _8: &std::string::String;        // in scope 0 at $DIR/match-arm-scopes.rs:+2:20: +2:21
-      let mut _9: bool;                    // in scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
-      let mut _10: bool;                   // in scope 0 at $DIR/match-arm-scopes.rs:+2:45: +2:49
-      let mut _11: !;                      // in scope 0 at $DIR/match-arm-scopes.rs:+2:52: +2:60
-      let mut _12: bool;                   // in scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
-      let mut _13: bool;                   // in scope 0 at $DIR/match-arm-scopes.rs:+2:45: +2:49
-      let mut _14: !;                      // in scope 0 at $DIR/match-arm-scopes.rs:+2:52: +2:60
-      let _15: bool;                       // in scope 0 at $DIR/match-arm-scopes.rs:+3:16: +3:17
-      let _16: std::string::String;        // in scope 0 at $DIR/match-arm-scopes.rs:+3:19: +3:20
+      debug cond => _1;                    // in scope 0 at $DIR/match_arm_scopes.rs:+0:22: +0:26
+      debug items => _2;                   // in scope 0 at $DIR/match_arm_scopes.rs:+0:34: +0:39
+      let mut _0: i32;                     // return place in scope 0 at $DIR/match_arm_scopes.rs:+0:66: +0:69
+      let mut _3: &bool;                   // in scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
+      let mut _4: &bool;                   // in scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
+      let _5: bool;                        // in scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
+      let _6: &bool;                       // in scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
+      let _7: std::string::String;         // in scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
+      let _8: &std::string::String;        // in scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
+      let mut _9: bool;                    // in scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
+      let mut _10: bool;                   // in scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
+      let mut _11: !;                      // in scope 0 at $DIR/match_arm_scopes.rs:+2:52: +2:60
+      let mut _12: bool;                   // in scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
+      let mut _13: bool;                   // in scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
+      let mut _14: !;                      // in scope 0 at $DIR/match_arm_scopes.rs:+2:52: +2:60
+      let _15: bool;                       // in scope 0 at $DIR/match_arm_scopes.rs:+3:16: +3:17
+      let _16: std::string::String;        // in scope 0 at $DIR/match_arm_scopes.rs:+3:19: +3:20
       scope 1 {
-          debug a => _5;                   // in scope 1 at $DIR/match-arm-scopes.rs:+2:17: +2:18
-          debug a => _6;                   // in scope 1 at $DIR/match-arm-scopes.rs:+2:17: +2:18
-          debug s => _7;                   // in scope 1 at $DIR/match-arm-scopes.rs:+2:20: +2:21
-          debug s => _8;                   // in scope 1 at $DIR/match-arm-scopes.rs:+2:20: +2:21
+          debug a => _5;                   // in scope 1 at $DIR/match_arm_scopes.rs:+2:17: +2:18
+          debug a => _6;                   // in scope 1 at $DIR/match_arm_scopes.rs:+2:17: +2:18
+          debug s => _7;                   // in scope 1 at $DIR/match_arm_scopes.rs:+2:20: +2:21
+          debug s => _8;                   // in scope 1 at $DIR/match_arm_scopes.rs:+2:20: +2:21
       }
       scope 2 {
-          debug b => _15;                  // in scope 2 at $DIR/match-arm-scopes.rs:+3:16: +3:17
-          debug t => _16;                  // in scope 2 at $DIR/match-arm-scopes.rs:+3:19: +3:20
+          debug b => _15;                  // in scope 2 at $DIR/match_arm_scopes.rs:+3:16: +3:17
+          debug t => _16;                  // in scope 2 at $DIR/match_arm_scopes.rs:+3:19: +3:20
       }
   
       bb0: {
--         FakeRead(ForMatchedPlace(None), _2); // scope 0 at $DIR/match-arm-scopes.rs:+1:11: +1:16
--         switchInt((_2.0: bool)) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +1:16
-+         switchInt((_2.0: bool)) -> [false: bb5, otherwise: bb1]; // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +1:16
+-         FakeRead(ForMatchedPlace(None), _2); // scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
+-         switchInt((_2.0: bool)) -> [false: bb1, otherwise: bb2]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
++         switchInt((_2.0: bool)) -> [false: bb5, otherwise: bb1]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
       }
   
       bb1: {
--         falseEdge -> [real: bb8, imaginary: bb3]; // scope 0 at $DIR/match-arm-scopes.rs:+2:9: +2:22
-+         switchInt((_2.1: bool)) -> [false: bb10, otherwise: bb2]; // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +1:16
+-         falseEdge -> [real: bb8, imaginary: bb3]; // scope 0 at $DIR/match_arm_scopes.rs:+2:9: +2:22
++         switchInt((_2.1: bool)) -> [false: bb10, otherwise: bb2]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
       }
   
       bb2: {
--         switchInt((_2.1: bool)) -> [false: bb3, otherwise: bb4]; // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +1:16
-+         switchInt((_2.0: bool)) -> [false: bb3, otherwise: bb17]; // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +1:16
+-         switchInt((_2.1: bool)) -> [false: bb3, otherwise: bb4]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
++         switchInt((_2.0: bool)) -> [false: bb3, otherwise: bb17]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
       }
   
       bb3: {
--         falseEdge -> [real: bb13, imaginary: bb5]; // scope 0 at $DIR/match-arm-scopes.rs:+2:25: +2:38
+-         falseEdge -> [real: bb13, imaginary: bb5]; // scope 0 at $DIR/match_arm_scopes.rs:+2:25: +2:38
 -     }
 - 
 -     bb4: {
--         switchInt((_2.0: bool)) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +1:16
+-         switchInt((_2.0: bool)) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +1:16
 -     }
 - 
 -     bb5: {
--         falseEdge -> [real: bb20, imaginary: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:+3:9: +3:21
+-         falseEdge -> [real: bb20, imaginary: bb6]; // scope 0 at $DIR/match_arm_scopes.rs:+3:9: +3:21
 -     }
 - 
 -     bb6: {
-          StorageLive(_15);                // scope 0 at $DIR/match-arm-scopes.rs:+3:32: +3:33
-          _15 = (_2.1: bool);              // scope 0 at $DIR/match-arm-scopes.rs:+3:32: +3:33
-          StorageLive(_16);                // scope 0 at $DIR/match-arm-scopes.rs:+3:35: +3:36
-          _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:+3:35: +3:36
--         goto -> bb19;                    // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +4:6
-+         goto -> bb16;                    // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +4:6
+          StorageLive(_15);                // scope 0 at $DIR/match_arm_scopes.rs:+3:32: +3:33
+          _15 = (_2.1: bool);              // scope 0 at $DIR/match_arm_scopes.rs:+3:32: +3:33
+          StorageLive(_16);                // scope 0 at $DIR/match_arm_scopes.rs:+3:35: +3:36
+          _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+3:35: +3:36
+-         goto -> bb19;                    // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
++         goto -> bb16;                    // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
       }
   
 -     bb7: {
 +     bb4: {
-          _0 = const 1_i32;                // scope 1 at $DIR/match-arm-scopes.rs:+2:77: +2:78
--         drop(_7) -> [return: bb18, unwind: bb25]; // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
-+         drop(_7) -> [return: bb15, unwind: bb22]; // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
+          _0 = const 1_i32;                // scope 1 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+-         drop(_7) -> [return: bb18, unwind: bb25]; // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
++         drop(_7) -> [return: bb15, unwind: bb22]; // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
       }
   
 -     bb8: {
 +     bb5: {
-          StorageLive(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:17: +2:18
-          _6 = &(_2.1: bool);              // scope 0 at $DIR/match-arm-scopes.rs:+2:17: +2:18
-          StorageLive(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:20: +2:21
-          _8 = &(_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:+2:20: +2:21
--         _3 = &shallow (_2.0: bool);      // scope 0 at $DIR/match-arm-scopes.rs:+1:11: +1:16
--         _4 = &shallow (_2.1: bool);      // scope 0 at $DIR/match-arm-scopes.rs:+1:11: +1:16
-          StorageLive(_9);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
-          StorageLive(_10);                // scope 0 at $DIR/match-arm-scopes.rs:+2:45: +2:49
-          _10 = _1;                        // scope 0 at $DIR/match-arm-scopes.rs:+2:45: +2:49
--         switchInt(move _10) -> [false: bb10, otherwise: bb9]; // scope 0 at $DIR/match-arm-scopes.rs:+2:45: +2:49
-+         switchInt(move _10) -> [false: bb7, otherwise: bb6]; // scope 0 at $DIR/match-arm-scopes.rs:+2:45: +2:49
+          StorageLive(_6);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
+          _6 = &(_2.1: bool);              // scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
+          StorageLive(_8);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
+          _8 = &(_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
+-         _3 = &shallow (_2.0: bool);      // scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
+-         _4 = &shallow (_2.1: bool);      // scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
+          StorageLive(_9);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
+          StorageLive(_10);                // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
+          _10 = _1;                        // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
+-         switchInt(move _10) -> [false: bb10, otherwise: bb9]; // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
++         switchInt(move _10) -> [false: bb7, otherwise: bb6]; // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
       }
   
 -     bb9: {
 +     bb6: {
-          _0 = const 3_i32;                // scope 0 at $DIR/match-arm-scopes.rs:+2:59: +2:60
-          StorageDead(_10);                // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
-          StorageDead(_9);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
+          _0 = const 3_i32;                // scope 0 at $DIR/match_arm_scopes.rs:+2:59: +2:60
+          StorageDead(_10);                // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+          StorageDead(_9);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
 -         goto -> bb23;                    // scope 0 at no-location
 +         goto -> bb20;                    // scope 0 at no-location
       }
   
 -     bb10: {
 +     bb7: {
-          _9 = (*_6);                      // scope 0 at $DIR/match-arm-scopes.rs:+2:70: +2:71
--         switchInt(move _9) -> [false: bb12, otherwise: bb11]; // scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
-+         switchInt(move _9) -> [false: bb9, otherwise: bb8]; // scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
+          _9 = (*_6);                      // scope 0 at $DIR/match_arm_scopes.rs:+2:70: +2:71
+-         switchInt(move _9) -> [false: bb12, otherwise: bb11]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
++         switchInt(move _9) -> [false: bb9, otherwise: bb8]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
       }
   
 -     bb11: {
 +     bb8: {
-          StorageDead(_10);                // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
-          StorageDead(_9);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
--         FakeRead(ForMatchGuard, _3);     // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
--         FakeRead(ForMatchGuard, _4);     // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
--         FakeRead(ForGuardBinding, _6);   // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
--         FakeRead(ForGuardBinding, _8);   // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
-          StorageLive(_5);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:17: +2:18
-          _5 = (_2.1: bool);               // scope 0 at $DIR/match-arm-scopes.rs:+2:17: +2:18
-          StorageLive(_7);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:20: +2:21
-          _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:+2:20: +2:21
--         goto -> bb7;                     // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +4:6
-+         goto -> bb4;                     // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +4:6
+          StorageDead(_10);                // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+          StorageDead(_9);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+-         FakeRead(ForMatchGuard, _3);     // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+-         FakeRead(ForMatchGuard, _4);     // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+-         FakeRead(ForGuardBinding, _6);   // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+-         FakeRead(ForGuardBinding, _8);   // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+          StorageLive(_5);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
+          _5 = (_2.1: bool);               // scope 0 at $DIR/match_arm_scopes.rs:+2:17: +2:18
+          StorageLive(_7);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
+          _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+2:20: +2:21
+-         goto -> bb7;                     // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
++         goto -> bb4;                     // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
       }
   
 -     bb12: {
 +     bb9: {
-          StorageDead(_10);                // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
-          StorageDead(_9);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
-          StorageDead(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
-          StorageDead(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
--         falseEdge -> [real: bb2, imaginary: bb3]; // scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
-+         goto -> bb1;                     // scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
+          StorageDead(_10);                // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+          StorageDead(_9);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+          StorageDead(_8);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+          StorageDead(_6);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+-         falseEdge -> [real: bb2, imaginary: bb3]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
++         goto -> bb1;                     // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
       }
   
 -     bb13: {
 +     bb10: {
-          StorageLive(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:26: +2:27
-          _6 = &(_2.0: bool);              // scope 0 at $DIR/match-arm-scopes.rs:+2:26: +2:27
-          StorageLive(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:36: +2:37
-          _8 = &(_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:+2:36: +2:37
--         _3 = &shallow (_2.0: bool);      // scope 0 at $DIR/match-arm-scopes.rs:+1:11: +1:16
--         _4 = &shallow (_2.1: bool);      // scope 0 at $DIR/match-arm-scopes.rs:+1:11: +1:16
-          StorageLive(_12);                // scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
-          StorageLive(_13);                // scope 0 at $DIR/match-arm-scopes.rs:+2:45: +2:49
-          _13 = _1;                        // scope 0 at $DIR/match-arm-scopes.rs:+2:45: +2:49
--         switchInt(move _13) -> [false: bb15, otherwise: bb14]; // scope 0 at $DIR/match-arm-scopes.rs:+2:45: +2:49
-+         switchInt(move _13) -> [false: bb12, otherwise: bb11]; // scope 0 at $DIR/match-arm-scopes.rs:+2:45: +2:49
+          StorageLive(_6);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:26: +2:27
+          _6 = &(_2.0: bool);              // scope 0 at $DIR/match_arm_scopes.rs:+2:26: +2:27
+          StorageLive(_8);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:36: +2:37
+          _8 = &(_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+2:36: +2:37
+-         _3 = &shallow (_2.0: bool);      // scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
+-         _4 = &shallow (_2.1: bool);      // scope 0 at $DIR/match_arm_scopes.rs:+1:11: +1:16
+          StorageLive(_12);                // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
+          StorageLive(_13);                // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
+          _13 = _1;                        // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
+-         switchInt(move _13) -> [false: bb15, otherwise: bb14]; // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
++         switchInt(move _13) -> [false: bb12, otherwise: bb11]; // scope 0 at $DIR/match_arm_scopes.rs:+2:45: +2:49
       }
   
 -     bb14: {
 +     bb11: {
-          _0 = const 3_i32;                // scope 0 at $DIR/match-arm-scopes.rs:+2:59: +2:60
-          StorageDead(_13);                // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
-          StorageDead(_12);                // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
+          _0 = const 3_i32;                // scope 0 at $DIR/match_arm_scopes.rs:+2:59: +2:60
+          StorageDead(_13);                // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+          StorageDead(_12);                // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
 -         goto -> bb23;                    // scope 0 at no-location
 +         goto -> bb20;                    // scope 0 at no-location
       }
   
 -     bb15: {
 +     bb12: {
-          _12 = (*_6);                     // scope 0 at $DIR/match-arm-scopes.rs:+2:70: +2:71
--         switchInt(move _12) -> [false: bb17, otherwise: bb16]; // scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
-+         switchInt(move _12) -> [false: bb14, otherwise: bb13]; // scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
+          _12 = (*_6);                     // scope 0 at $DIR/match_arm_scopes.rs:+2:70: +2:71
+-         switchInt(move _12) -> [false: bb17, otherwise: bb16]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
++         switchInt(move _12) -> [false: bb14, otherwise: bb13]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
       }
   
 -     bb16: {
 +     bb13: {
-          StorageDead(_13);                // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
-          StorageDead(_12);                // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
--         FakeRead(ForMatchGuard, _3);     // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
--         FakeRead(ForMatchGuard, _4);     // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
--         FakeRead(ForGuardBinding, _6);   // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
--         FakeRead(ForGuardBinding, _8);   // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
-          StorageLive(_5);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:26: +2:27
-          _5 = (_2.0: bool);               // scope 0 at $DIR/match-arm-scopes.rs:+2:26: +2:27
-          StorageLive(_7);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:36: +2:37
-          _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:+2:36: +2:37
--         goto -> bb7;                     // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +4:6
-+         goto -> bb4;                     // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +4:6
+          StorageDead(_13);                // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+          StorageDead(_12);                // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+-         FakeRead(ForMatchGuard, _3);     // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+-         FakeRead(ForMatchGuard, _4);     // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+-         FakeRead(ForGuardBinding, _6);   // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+-         FakeRead(ForGuardBinding, _8);   // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+          StorageLive(_5);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:26: +2:27
+          _5 = (_2.0: bool);               // scope 0 at $DIR/match_arm_scopes.rs:+2:26: +2:27
+          StorageLive(_7);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:36: +2:37
+          _7 = move (_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+2:36: +2:37
+-         goto -> bb7;                     // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
++         goto -> bb4;                     // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
       }
   
 -     bb17: {
 +     bb14: {
-          StorageDead(_13);                // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
-          StorageDead(_12);                // scope 0 at $DIR/match-arm-scopes.rs:+2:72: +2:73
-          StorageDead(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
-          StorageDead(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
--         falseEdge -> [real: bb4, imaginary: bb5]; // scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
-+         goto -> bb2;                     // scope 0 at $DIR/match-arm-scopes.rs:+2:42: +2:73
+          StorageDead(_13);                // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+          StorageDead(_12);                // scope 0 at $DIR/match_arm_scopes.rs:+2:72: +2:73
+          StorageDead(_8);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+          StorageDead(_6);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+-         falseEdge -> [real: bb4, imaginary: bb5]; // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
++         goto -> bb2;                     // scope 0 at $DIR/match_arm_scopes.rs:+2:42: +2:73
       }
   
 -     bb18: {
 +     bb15: {
-          StorageDead(_7);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
-          StorageDead(_5);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
-          StorageDead(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
-          StorageDead(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
--         goto -> bb22;                    // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
-+         goto -> bb19;                    // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
+          StorageDead(_7);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+          StorageDead(_5);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+          StorageDead(_8);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+          StorageDead(_6);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+-         goto -> bb22;                    // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
++         goto -> bb19;                    // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
       }
   
 -     bb19: {
 +     bb16: {
-          _0 = const 2_i32;                // scope 2 at $DIR/match-arm-scopes.rs:+3:41: +3:42
--         drop(_16) -> [return: bb21, unwind: bb25]; // scope 0 at $DIR/match-arm-scopes.rs:+3:41: +3:42
-+         drop(_16) -> [return: bb18, unwind: bb22]; // scope 0 at $DIR/match-arm-scopes.rs:+3:41: +3:42
+          _0 = const 2_i32;                // scope 2 at $DIR/match_arm_scopes.rs:+3:41: +3:42
+-         drop(_16) -> [return: bb21, unwind: bb25]; // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
++         drop(_16) -> [return: bb18, unwind: bb22]; // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
       }
   
 -     bb20: {
 +     bb17: {
-          StorageLive(_15);                // scope 0 at $DIR/match-arm-scopes.rs:+3:16: +3:17
-          _15 = (_2.1: bool);              // scope 0 at $DIR/match-arm-scopes.rs:+3:16: +3:17
-          StorageLive(_16);                // scope 0 at $DIR/match-arm-scopes.rs:+3:19: +3:20
-          _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match-arm-scopes.rs:+3:19: +3:20
--         goto -> bb19;                    // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +4:6
-+         goto -> bb16;                    // scope 0 at $DIR/match-arm-scopes.rs:+1:5: +4:6
+          StorageLive(_15);                // scope 0 at $DIR/match_arm_scopes.rs:+3:16: +3:17
+          _15 = (_2.1: bool);              // scope 0 at $DIR/match_arm_scopes.rs:+3:16: +3:17
+          StorageLive(_16);                // scope 0 at $DIR/match_arm_scopes.rs:+3:19: +3:20
+          _16 = move (_2.2: std::string::String); // scope 0 at $DIR/match_arm_scopes.rs:+3:19: +3:20
+-         goto -> bb19;                    // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
++         goto -> bb16;                    // scope 0 at $DIR/match_arm_scopes.rs:+1:5: +4:6
       }
   
 -     bb21: {
 +     bb18: {
-          StorageDead(_16);                // scope 0 at $DIR/match-arm-scopes.rs:+3:41: +3:42
-          StorageDead(_15);                // scope 0 at $DIR/match-arm-scopes.rs:+3:41: +3:42
--         goto -> bb22;                    // scope 0 at $DIR/match-arm-scopes.rs:+3:41: +3:42
-+         goto -> bb19;                    // scope 0 at $DIR/match-arm-scopes.rs:+3:41: +3:42
+          StorageDead(_16);                // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
+          StorageDead(_15);                // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
+-         goto -> bb22;                    // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
++         goto -> bb19;                    // scope 0 at $DIR/match_arm_scopes.rs:+3:41: +3:42
       }
   
 -     bb22: {
--         drop(_2) -> [return: bb24, unwind: bb26]; // scope 0 at $DIR/match-arm-scopes.rs:+5:1: +5:2
+-         drop(_2) -> [return: bb24, unwind: bb26]; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
 +     bb19: {
-+         goto -> bb26;                    // scope 0 at $DIR/match-arm-scopes.rs:+5:1: +5:2
++         goto -> bb26;                    // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
       }
   
 -     bb23: {
 +     bb20: {
-          StorageDead(_8);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
-          StorageDead(_6);                 // scope 0 at $DIR/match-arm-scopes.rs:+2:77: +2:78
--         drop(_2) -> [return: bb24, unwind: bb26]; // scope 0 at $DIR/match-arm-scopes.rs:+5:1: +5:2
-+         drop(_2) -> [return: bb21, unwind: bb23]; // scope 0 at $DIR/match-arm-scopes.rs:+5:1: +5:2
+          StorageDead(_8);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+          StorageDead(_6);                 // scope 0 at $DIR/match_arm_scopes.rs:+2:77: +2:78
+-         drop(_2) -> [return: bb24, unwind: bb26]; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
++         drop(_2) -> [return: bb21, unwind: bb23]; // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
       }
   
 -     bb24: {
 +     bb21: {
-          return;                          // scope 0 at $DIR/match-arm-scopes.rs:+5:2: +5:2
+          return;                          // scope 0 at $DIR/match_arm_scopes.rs:+5:2: +5:2
       }
   
 -     bb25 (cleanup): {
--         drop(_2) -> bb26;                // scope 0 at $DIR/match-arm-scopes.rs:+5:1: +5:2
+-         drop(_2) -> bb26;                // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
 +     bb22 (cleanup): {
-+         goto -> bb27;                    // scope 0 at $DIR/match-arm-scopes.rs:+5:1: +5:2
++         goto -> bb27;                    // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
       }
   
 -     bb26 (cleanup): {
 +     bb23 (cleanup): {
-          resume;                          // scope 0 at $DIR/match-arm-scopes.rs:+0:1: +5:2
+          resume;                          // scope 0 at $DIR/match_arm_scopes.rs:+0:1: +5:2
 +     }
 + 
 +     bb24: {
-+         goto -> bb21;                    // scope 0 at $DIR/match-arm-scopes.rs:+5:1: +5:2
++         goto -> bb21;                    // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
 +     }
 + 
 +     bb25 (cleanup): {
-+         goto -> bb23;                    // scope 0 at $DIR/match-arm-scopes.rs:+5:1: +5:2
++         goto -> bb23;                    // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
 +     }
 + 
 +     bb26: {
-+         goto -> bb24;                    // scope 0 at $DIR/match-arm-scopes.rs:+5:1: +5:2
++         goto -> bb24;                    // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
 +     }
 + 
 +     bb27 (cleanup): {
-+         goto -> bb23;                    // scope 0 at $DIR/match-arm-scopes.rs:+5:1: +5:2
++         goto -> bb23;                    // scope 0 at $DIR/match_arm_scopes.rs:+5:1: +5:2
       }
   }
   
diff --git a/src/test/mir-opt/match-arm-scopes.rs b/src/test/mir-opt/match_arm_scopes.rs
index 7b7de7788c2..7b7de7788c2 100644
--- a/src/test/mir-opt/match-arm-scopes.rs
+++ b/src/test/mir-opt/match_arm_scopes.rs
diff --git a/src/test/mir-opt/nll/named-lifetimes-basic.rs b/src/test/mir-opt/nll/named_lifetimes_basic.rs
index 843716033ca..843716033ca 100644
--- a/src/test/mir-opt/nll/named-lifetimes-basic.rs
+++ b/src/test/mir-opt/nll/named_lifetimes_basic.rs
diff --git a/src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir b/src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir
index 0ab9d712d9f..6cd6d8b7795 100644
--- a/src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir
+++ b/src/test/mir-opt/nll/named_lifetimes_basic.use_x.nll.0.mir
@@ -24,24 +24,24 @@
 | '_#2r live at {bb0[0..=1]}
 | '_#3r live at {bb0[0..=1]}
 | '_#4r live at {bb0[0..=1]}
-| '_#1r: '_#5r due to BoringNoLocation at All($DIR/named-lifetimes-basic.rs:12:26: 12:27) ($DIR/named-lifetimes-basic.rs:12:26: 12:27 (#0)
-| '_#1r: '_#7r due to BoringNoLocation at All($DIR/named-lifetimes-basic.rs:12:54: 12:55) ($DIR/named-lifetimes-basic.rs:12:54: 12:55 (#0)
-| '_#2r: '_#6r due to BoringNoLocation at All($DIR/named-lifetimes-basic.rs:12:42: 12:43) ($DIR/named-lifetimes-basic.rs:12:42: 12:43 (#0)
-| '_#3r: '_#8r due to BoringNoLocation at All($DIR/named-lifetimes-basic.rs:12:66: 12:67) ($DIR/named-lifetimes-basic.rs:12:66: 12:67 (#0)
-| '_#5r: '_#1r due to BoringNoLocation at All($DIR/named-lifetimes-basic.rs:12:26: 12:27) ($DIR/named-lifetimes-basic.rs:12:26: 12:27 (#0)
-| '_#6r: '_#2r due to BoringNoLocation at All($DIR/named-lifetimes-basic.rs:12:42: 12:43) ($DIR/named-lifetimes-basic.rs:12:42: 12:43 (#0)
-| '_#7r: '_#1r due to BoringNoLocation at All($DIR/named-lifetimes-basic.rs:12:54: 12:55) ($DIR/named-lifetimes-basic.rs:12:54: 12:55 (#0)
-| '_#8r: '_#3r due to BoringNoLocation at All($DIR/named-lifetimes-basic.rs:12:66: 12:67) ($DIR/named-lifetimes-basic.rs:12:66: 12:67 (#0)
+| '_#1r: '_#5r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:26: 12:27) ($DIR/named_lifetimes_basic.rs:12:26: 12:27 (#0)
+| '_#1r: '_#7r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:54: 12:55) ($DIR/named_lifetimes_basic.rs:12:54: 12:55 (#0)
+| '_#2r: '_#6r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:42: 12:43) ($DIR/named_lifetimes_basic.rs:12:42: 12:43 (#0)
+| '_#3r: '_#8r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:66: 12:67) ($DIR/named_lifetimes_basic.rs:12:66: 12:67 (#0)
+| '_#5r: '_#1r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:26: 12:27) ($DIR/named_lifetimes_basic.rs:12:26: 12:27 (#0)
+| '_#6r: '_#2r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:42: 12:43) ($DIR/named_lifetimes_basic.rs:12:42: 12:43 (#0)
+| '_#7r: '_#1r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:54: 12:55) ($DIR/named_lifetimes_basic.rs:12:54: 12:55 (#0)
+| '_#8r: '_#3r due to BoringNoLocation at All($DIR/named_lifetimes_basic.rs:12:66: 12:67) ($DIR/named_lifetimes_basic.rs:12:66: 12:67 (#0)
 |
 fn use_x(_1: &'_#5r mut i32, _2: &'_#6r u32, _3: &'_#7r u32, _4: &'_#8r u32) -> bool {
-    debug w => _1;                       // in scope 0 at $DIR/named-lifetimes-basic.rs:+0:26: +0:27
-    debug x => _2;                       // in scope 0 at $DIR/named-lifetimes-basic.rs:+0:42: +0:43
-    debug y => _3;                       // in scope 0 at $DIR/named-lifetimes-basic.rs:+0:54: +0:55
-    debug z => _4;                       // in scope 0 at $DIR/named-lifetimes-basic.rs:+0:66: +0:67
-    let mut _0: bool;                    // return place in scope 0 at $DIR/named-lifetimes-basic.rs:+0:81: +0:85
+    debug w => _1;                       // in scope 0 at $DIR/named_lifetimes_basic.rs:+0:26: +0:27
+    debug x => _2;                       // in scope 0 at $DIR/named_lifetimes_basic.rs:+0:42: +0:43
+    debug y => _3;                       // in scope 0 at $DIR/named_lifetimes_basic.rs:+0:54: +0:55
+    debug z => _4;                       // in scope 0 at $DIR/named_lifetimes_basic.rs:+0:66: +0:67
+    let mut _0: bool;                    // return place in scope 0 at $DIR/named_lifetimes_basic.rs:+0:81: +0:85
 
     bb0: {
-        _0 = const ConstValue(Scalar(0x01): bool); // bb0[0]: scope 0 at $DIR/named-lifetimes-basic.rs:+0:88: +0:92
-        return;                          // bb0[1]: scope 0 at $DIR/named-lifetimes-basic.rs:+0:94: +0:94
+        _0 = const ConstValue(Scalar(0x01): bool); // bb0[0]: scope 0 at $DIR/named_lifetimes_basic.rs:+0:88: +0:92
+        return;                          // bb0[1]: scope 0 at $DIR/named_lifetimes_basic.rs:+0:94: +0:94
     }
 }
diff --git a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
index 36705d18e01..3e3fda6141a 100644
--- a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
+++ b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.32bit.mir
@@ -17,95 +17,95 @@
 | '_#2r live at {bb1[0]}
 | '_#3r live at {bb1[1..=3]}
 | '_#4r live at {bb1[4..=7], bb2[0..=2]}
-| '_#2r: '_#3r due to Assignment at Single(bb1[0]) ($DIR/region-subtyping-basic.rs:18:13: 18:18 (#0)
-| '_#3r: '_#4r due to Assignment at Single(bb1[3]) ($DIR/region-subtyping-basic.rs:19:13: 19:14 (#0)
+| '_#2r: '_#3r due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:18:13: 18:18 (#0)
+| '_#3r: '_#4r due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:19:13: 19:14 (#0)
 |
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/region-subtyping-basic.rs:+0:11: +0:11
-    let mut _1: [usize; Const { ty: usize, kind: Value(Leaf(0x00000003)) }]; // in scope 0 at $DIR/region-subtyping-basic.rs:+1:9: +1:14
-    let _3: usize;                       // in scope 0 at $DIR/region-subtyping-basic.rs:+2:16: +2:17
-    let mut _4: usize;                   // in scope 0 at $DIR/region-subtyping-basic.rs:+2:14: +2:18
-    let mut _5: bool;                    // in scope 0 at $DIR/region-subtyping-basic.rs:+2:14: +2:18
-    let mut _7: bool;                    // in scope 0 at $DIR/region-subtyping-basic.rs:+4:8: +4:12
-    let _8: bool;                        // in scope 0 at $DIR/region-subtyping-basic.rs:+5:9: +5:18
-    let mut _9: usize;                   // in scope 0 at $DIR/region-subtyping-basic.rs:+5:15: +5:17
-    let _10: bool;                       // in scope 0 at $DIR/region-subtyping-basic.rs:+7:9: +7:18
+    let mut _0: ();                      // return place in scope 0 at $DIR/region_subtyping_basic.rs:+0:11: +0:11
+    let mut _1: [usize; Const { ty: usize, kind: Value(Leaf(0x00000003)) }]; // in scope 0 at $DIR/region_subtyping_basic.rs:+1:9: +1:14
+    let _3: usize;                       // in scope 0 at $DIR/region_subtyping_basic.rs:+2:16: +2:17
+    let mut _4: usize;                   // in scope 0 at $DIR/region_subtyping_basic.rs:+2:14: +2:18
+    let mut _5: bool;                    // in scope 0 at $DIR/region_subtyping_basic.rs:+2:14: +2:18
+    let mut _7: bool;                    // in scope 0 at $DIR/region_subtyping_basic.rs:+4:8: +4:12
+    let _8: bool;                        // in scope 0 at $DIR/region_subtyping_basic.rs:+5:9: +5:18
+    let mut _9: usize;                   // in scope 0 at $DIR/region_subtyping_basic.rs:+5:15: +5:17
+    let _10: bool;                       // in scope 0 at $DIR/region_subtyping_basic.rs:+7:9: +7:18
     scope 1 {
-        debug v => _1;                   // in scope 1 at $DIR/region-subtyping-basic.rs:+1:9: +1:14
-        let _2: &'_#3r usize;            // in scope 1 at $DIR/region-subtyping-basic.rs:+2:9: +2:10
+        debug v => _1;                   // in scope 1 at $DIR/region_subtyping_basic.rs:+1:9: +1:14
+        let _2: &'_#3r usize;            // in scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
         scope 2 {
-            debug p => _2;               // in scope 2 at $DIR/region-subtyping-basic.rs:+2:9: +2:10
-            let _6: &'_#4r usize;        // in scope 2 at $DIR/region-subtyping-basic.rs:+3:9: +3:10
+            debug p => _2;               // in scope 2 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
+            let _6: &'_#4r usize;        // in scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
             scope 3 {
-                debug q => _6;           // in scope 3 at $DIR/region-subtyping-basic.rs:+3:9: +3:10
+                debug q => _6;           // in scope 3 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
             }
         }
     }
 
     bb0: {
-        StorageLive(_1);                 // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:+1:9: +1:14
-        _1 = [const ConstValue(Scalar(0x00000001): usize), const ConstValue(Scalar(0x00000002): usize), const ConstValue(Scalar(0x00000003): usize)]; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:+1:17: +1:26
-        FakeRead(ForLet(None), _1);      // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:+1:9: +1:14
-        StorageLive(_2);                 // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:+2:9: +2:10
-        StorageLive(_3);                 // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:+2:16: +2:17
-        _3 = const ConstValue(Scalar(0x00000000): usize); // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:+2:16: +2:17
-        _4 = Len(_1);                    // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:+2:14: +2:18
-        _5 = Lt(_3, _4);                 // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:+2:14: +2:18
-        assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind: bb7]; // bb0[8]: scope 1 at $DIR/region-subtyping-basic.rs:+2:14: +2:18
+        StorageLive(_1);                 // bb0[0]: scope 0 at $DIR/region_subtyping_basic.rs:+1:9: +1:14
+        _1 = [const ConstValue(Scalar(0x00000001): usize), const ConstValue(Scalar(0x00000002): usize), const ConstValue(Scalar(0x00000003): usize)]; // bb0[1]: scope 0 at $DIR/region_subtyping_basic.rs:+1:17: +1:26
+        FakeRead(ForLet(None), _1);      // bb0[2]: scope 0 at $DIR/region_subtyping_basic.rs:+1:9: +1:14
+        StorageLive(_2);                 // bb0[3]: scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
+        StorageLive(_3);                 // bb0[4]: scope 1 at $DIR/region_subtyping_basic.rs:+2:16: +2:17
+        _3 = const ConstValue(Scalar(0x00000000): usize); // bb0[5]: scope 1 at $DIR/region_subtyping_basic.rs:+2:16: +2:17
+        _4 = Len(_1);                    // bb0[6]: scope 1 at $DIR/region_subtyping_basic.rs:+2:14: +2:18
+        _5 = Lt(_3, _4);                 // bb0[7]: scope 1 at $DIR/region_subtyping_basic.rs:+2:14: +2:18
+        assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind: bb7]; // bb0[8]: scope 1 at $DIR/region_subtyping_basic.rs:+2:14: +2:18
     }
 
     bb1: {
-        _2 = &'_#2r _1[_3];              // bb1[0]: scope 1 at $DIR/region-subtyping-basic.rs:+2:13: +2:18
-        FakeRead(ForLet(None), _2);      // bb1[1]: scope 1 at $DIR/region-subtyping-basic.rs:+2:9: +2:10
-        StorageLive(_6);                 // bb1[2]: scope 2 at $DIR/region-subtyping-basic.rs:+3:9: +3:10
-        _6 = _2;                         // bb1[3]: scope 2 at $DIR/region-subtyping-basic.rs:+3:13: +3:14
-        FakeRead(ForLet(None), _6);      // bb1[4]: scope 2 at $DIR/region-subtyping-basic.rs:+3:9: +3:10
-        StorageLive(_7);                 // bb1[5]: scope 3 at $DIR/region-subtyping-basic.rs:+4:8: +4:12
-        _7 = const ConstValue(Scalar(0x01): bool); // bb1[6]: scope 3 at $DIR/region-subtyping-basic.rs:+4:8: +4:12
-        switchInt(move _7) -> [ConstValue(Scalar(0x00): bool): bb4, otherwise: bb2]; // bb1[7]: scope 3 at $DIR/region-subtyping-basic.rs:+4:8: +4:12
+        _2 = &'_#2r _1[_3];              // bb1[0]: scope 1 at $DIR/region_subtyping_basic.rs:+2:13: +2:18
+        FakeRead(ForLet(None), _2);      // bb1[1]: scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
+        StorageLive(_6);                 // bb1[2]: scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
+        _6 = _2;                         // bb1[3]: scope 2 at $DIR/region_subtyping_basic.rs:+3:13: +3:14
+        FakeRead(ForLet(None), _6);      // bb1[4]: scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
+        StorageLive(_7);                 // bb1[5]: scope 3 at $DIR/region_subtyping_basic.rs:+4:8: +4:12
+        _7 = const ConstValue(Scalar(0x01): bool); // bb1[6]: scope 3 at $DIR/region_subtyping_basic.rs:+4:8: +4:12
+        switchInt(move _7) -> [ConstValue(Scalar(0x00): bool): bb4, otherwise: bb2]; // bb1[7]: scope 3 at $DIR/region_subtyping_basic.rs:+4:8: +4:12
     }
 
     bb2: {
-        StorageLive(_8);                 // bb2[0]: scope 3 at $DIR/region-subtyping-basic.rs:+5:9: +5:18
-        StorageLive(_9);                 // bb2[1]: scope 3 at $DIR/region-subtyping-basic.rs:+5:15: +5:17
-        _9 = (*_6);                      // bb2[2]: scope 3 at $DIR/region-subtyping-basic.rs:+5:15: +5:17
-        _8 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(move _9) -> [return: bb3, unwind: bb7]; // bb2[3]: scope 3 at $DIR/region-subtyping-basic.rs:+5:9: +5:18
+        StorageLive(_8);                 // bb2[0]: scope 3 at $DIR/region_subtyping_basic.rs:+5:9: +5:18
+        StorageLive(_9);                 // bb2[1]: scope 3 at $DIR/region_subtyping_basic.rs:+5:15: +5:17
+        _9 = (*_6);                      // bb2[2]: scope 3 at $DIR/region_subtyping_basic.rs:+5:15: +5:17
+        _8 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(move _9) -> [return: bb3, unwind: bb7]; // bb2[3]: scope 3 at $DIR/region_subtyping_basic.rs:+5:9: +5:18
                                          // mir::Constant
-                                         // + span: $DIR/region-subtyping-basic.rs:21:9: 21:14
+                                         // + span: $DIR/region_subtyping_basic.rs:21:9: 21:14
                                          // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(<ZST>) }
     }
 
     bb3: {
-        StorageDead(_9);                 // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:+5:17: +5:18
-        StorageDead(_8);                 // bb3[1]: scope 3 at $DIR/region-subtyping-basic.rs:+5:18: +5:19
-        _0 = const ConstValue(ZeroSized: ()); // bb3[2]: scope 3 at $DIR/region-subtyping-basic.rs:+4:13: +6:6
-        goto -> bb6;                     // bb3[3]: scope 3 at $DIR/region-subtyping-basic.rs:+4:5: +8:6
+        StorageDead(_9);                 // bb3[0]: scope 3 at $DIR/region_subtyping_basic.rs:+5:17: +5:18
+        StorageDead(_8);                 // bb3[1]: scope 3 at $DIR/region_subtyping_basic.rs:+5:18: +5:19
+        _0 = const ConstValue(ZeroSized: ()); // bb3[2]: scope 3 at $DIR/region_subtyping_basic.rs:+4:13: +6:6
+        goto -> bb6;                     // bb3[3]: scope 3 at $DIR/region_subtyping_basic.rs:+4:5: +8:6
     }
 
     bb4: {
-        StorageLive(_10);                // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:+7:9: +7:18
-        _10 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(const ConstValue(Scalar(0x00000016): usize)) -> [return: bb5, unwind: bb7]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:+7:9: +7:18
+        StorageLive(_10);                // bb4[0]: scope 3 at $DIR/region_subtyping_basic.rs:+7:9: +7:18
+        _10 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(const ConstValue(Scalar(0x00000016): usize)) -> [return: bb5, unwind: bb7]; // bb4[1]: scope 3 at $DIR/region_subtyping_basic.rs:+7:9: +7:18
                                          // mir::Constant
-                                         // + span: $DIR/region-subtyping-basic.rs:23:9: 23:14
+                                         // + span: $DIR/region_subtyping_basic.rs:23:9: 23:14
                                          // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(<ZST>) }
     }
 
     bb5: {
-        StorageDead(_10);                // bb5[0]: scope 3 at $DIR/region-subtyping-basic.rs:+7:18: +7:19
-        _0 = const ConstValue(ZeroSized: ()); // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:+6:12: +8:6
-        goto -> bb6;                     // bb5[2]: scope 3 at $DIR/region-subtyping-basic.rs:+4:5: +8:6
+        StorageDead(_10);                // bb5[0]: scope 3 at $DIR/region_subtyping_basic.rs:+7:18: +7:19
+        _0 = const ConstValue(ZeroSized: ()); // bb5[1]: scope 3 at $DIR/region_subtyping_basic.rs:+6:12: +8:6
+        goto -> bb6;                     // bb5[2]: scope 3 at $DIR/region_subtyping_basic.rs:+4:5: +8:6
     }
 
     bb6: {
-        StorageDead(_7);                 // bb6[0]: scope 3 at $DIR/region-subtyping-basic.rs:+8:5: +8:6
-        StorageDead(_6);                 // bb6[1]: scope 2 at $DIR/region-subtyping-basic.rs:+9:1: +9:2
-        StorageDead(_3);                 // bb6[2]: scope 1 at $DIR/region-subtyping-basic.rs:+9:1: +9:2
-        StorageDead(_2);                 // bb6[3]: scope 1 at $DIR/region-subtyping-basic.rs:+9:1: +9:2
-        StorageDead(_1);                 // bb6[4]: scope 0 at $DIR/region-subtyping-basic.rs:+9:1: +9:2
-        return;                          // bb6[5]: scope 0 at $DIR/region-subtyping-basic.rs:+9:2: +9:2
+        StorageDead(_7);                 // bb6[0]: scope 3 at $DIR/region_subtyping_basic.rs:+8:5: +8:6
+        StorageDead(_6);                 // bb6[1]: scope 2 at $DIR/region_subtyping_basic.rs:+9:1: +9:2
+        StorageDead(_3);                 // bb6[2]: scope 1 at $DIR/region_subtyping_basic.rs:+9:1: +9:2
+        StorageDead(_2);                 // bb6[3]: scope 1 at $DIR/region_subtyping_basic.rs:+9:1: +9:2
+        StorageDead(_1);                 // bb6[4]: scope 0 at $DIR/region_subtyping_basic.rs:+9:1: +9:2
+        return;                          // bb6[5]: scope 0 at $DIR/region_subtyping_basic.rs:+9:2: +9:2
     }
 
     bb7 (cleanup): {
-        resume;                          // bb7[0]: scope 0 at $DIR/region-subtyping-basic.rs:+0:1: +9:2
+        resume;                          // bb7[0]: scope 0 at $DIR/region_subtyping_basic.rs:+0:1: +9:2
     }
 }
diff --git a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir
index 4f6256a67f4..39a53702a4c 100644
--- a/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir
+++ b/src/test/mir-opt/nll/region_subtyping_basic.main.nll.0.64bit.mir
@@ -17,95 +17,95 @@
 | '_#2r live at {bb1[0]}
 | '_#3r live at {bb1[1..=3]}
 | '_#4r live at {bb1[4..=7], bb2[0..=2]}
-| '_#2r: '_#3r due to Assignment at Single(bb1[0]) ($DIR/region-subtyping-basic.rs:18:13: 18:18 (#0)
-| '_#3r: '_#4r due to Assignment at Single(bb1[3]) ($DIR/region-subtyping-basic.rs:19:13: 19:14 (#0)
+| '_#2r: '_#3r due to Assignment at Single(bb1[0]) ($DIR/region_subtyping_basic.rs:18:13: 18:18 (#0)
+| '_#3r: '_#4r due to Assignment at Single(bb1[3]) ($DIR/region_subtyping_basic.rs:19:13: 19:14 (#0)
 |
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/region-subtyping-basic.rs:+0:11: +0:11
-    let mut _1: [usize; Const { ty: usize, kind: Value(Leaf(0x0000000000000003)) }]; // in scope 0 at $DIR/region-subtyping-basic.rs:+1:9: +1:14
-    let _3: usize;                       // in scope 0 at $DIR/region-subtyping-basic.rs:+2:16: +2:17
-    let mut _4: usize;                   // in scope 0 at $DIR/region-subtyping-basic.rs:+2:14: +2:18
-    let mut _5: bool;                    // in scope 0 at $DIR/region-subtyping-basic.rs:+2:14: +2:18
-    let mut _7: bool;                    // in scope 0 at $DIR/region-subtyping-basic.rs:+4:8: +4:12
-    let _8: bool;                        // in scope 0 at $DIR/region-subtyping-basic.rs:+5:9: +5:18
-    let mut _9: usize;                   // in scope 0 at $DIR/region-subtyping-basic.rs:+5:15: +5:17
-    let _10: bool;                       // in scope 0 at $DIR/region-subtyping-basic.rs:+7:9: +7:18
+    let mut _0: ();                      // return place in scope 0 at $DIR/region_subtyping_basic.rs:+0:11: +0:11
+    let mut _1: [usize; Const { ty: usize, kind: Value(Leaf(0x0000000000000003)) }]; // in scope 0 at $DIR/region_subtyping_basic.rs:+1:9: +1:14
+    let _3: usize;                       // in scope 0 at $DIR/region_subtyping_basic.rs:+2:16: +2:17
+    let mut _4: usize;                   // in scope 0 at $DIR/region_subtyping_basic.rs:+2:14: +2:18
+    let mut _5: bool;                    // in scope 0 at $DIR/region_subtyping_basic.rs:+2:14: +2:18
+    let mut _7: bool;                    // in scope 0 at $DIR/region_subtyping_basic.rs:+4:8: +4:12
+    let _8: bool;                        // in scope 0 at $DIR/region_subtyping_basic.rs:+5:9: +5:18
+    let mut _9: usize;                   // in scope 0 at $DIR/region_subtyping_basic.rs:+5:15: +5:17
+    let _10: bool;                       // in scope 0 at $DIR/region_subtyping_basic.rs:+7:9: +7:18
     scope 1 {
-        debug v => _1;                   // in scope 1 at $DIR/region-subtyping-basic.rs:+1:9: +1:14
-        let _2: &'_#3r usize;            // in scope 1 at $DIR/region-subtyping-basic.rs:+2:9: +2:10
+        debug v => _1;                   // in scope 1 at $DIR/region_subtyping_basic.rs:+1:9: +1:14
+        let _2: &'_#3r usize;            // in scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
         scope 2 {
-            debug p => _2;               // in scope 2 at $DIR/region-subtyping-basic.rs:+2:9: +2:10
-            let _6: &'_#4r usize;        // in scope 2 at $DIR/region-subtyping-basic.rs:+3:9: +3:10
+            debug p => _2;               // in scope 2 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
+            let _6: &'_#4r usize;        // in scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
             scope 3 {
-                debug q => _6;           // in scope 3 at $DIR/region-subtyping-basic.rs:+3:9: +3:10
+                debug q => _6;           // in scope 3 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
             }
         }
     }
 
     bb0: {
-        StorageLive(_1);                 // bb0[0]: scope 0 at $DIR/region-subtyping-basic.rs:+1:9: +1:14
-        _1 = [const ConstValue(Scalar(0x0000000000000001): usize), const ConstValue(Scalar(0x0000000000000002): usize), const ConstValue(Scalar(0x0000000000000003): usize)]; // bb0[1]: scope 0 at $DIR/region-subtyping-basic.rs:+1:17: +1:26
-        FakeRead(ForLet(None), _1);      // bb0[2]: scope 0 at $DIR/region-subtyping-basic.rs:+1:9: +1:14
-        StorageLive(_2);                 // bb0[3]: scope 1 at $DIR/region-subtyping-basic.rs:+2:9: +2:10
-        StorageLive(_3);                 // bb0[4]: scope 1 at $DIR/region-subtyping-basic.rs:+2:16: +2:17
-        _3 = const ConstValue(Scalar(0x0000000000000000): usize); // bb0[5]: scope 1 at $DIR/region-subtyping-basic.rs:+2:16: +2:17
-        _4 = Len(_1);                    // bb0[6]: scope 1 at $DIR/region-subtyping-basic.rs:+2:14: +2:18
-        _5 = Lt(_3, _4);                 // bb0[7]: scope 1 at $DIR/region-subtyping-basic.rs:+2:14: +2:18
-        assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind: bb7]; // bb0[8]: scope 1 at $DIR/region-subtyping-basic.rs:+2:14: +2:18
+        StorageLive(_1);                 // bb0[0]: scope 0 at $DIR/region_subtyping_basic.rs:+1:9: +1:14
+        _1 = [const ConstValue(Scalar(0x0000000000000001): usize), const ConstValue(Scalar(0x0000000000000002): usize), const ConstValue(Scalar(0x0000000000000003): usize)]; // bb0[1]: scope 0 at $DIR/region_subtyping_basic.rs:+1:17: +1:26
+        FakeRead(ForLet(None), _1);      // bb0[2]: scope 0 at $DIR/region_subtyping_basic.rs:+1:9: +1:14
+        StorageLive(_2);                 // bb0[3]: scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
+        StorageLive(_3);                 // bb0[4]: scope 1 at $DIR/region_subtyping_basic.rs:+2:16: +2:17
+        _3 = const ConstValue(Scalar(0x0000000000000000): usize); // bb0[5]: scope 1 at $DIR/region_subtyping_basic.rs:+2:16: +2:17
+        _4 = Len(_1);                    // bb0[6]: scope 1 at $DIR/region_subtyping_basic.rs:+2:14: +2:18
+        _5 = Lt(_3, _4);                 // bb0[7]: scope 1 at $DIR/region_subtyping_basic.rs:+2:14: +2:18
+        assert(move _5, "index out of bounds: the length is {} but the index is {}", move _4, _3) -> [success: bb1, unwind: bb7]; // bb0[8]: scope 1 at $DIR/region_subtyping_basic.rs:+2:14: +2:18
     }
 
     bb1: {
-        _2 = &'_#2r _1[_3];              // bb1[0]: scope 1 at $DIR/region-subtyping-basic.rs:+2:13: +2:18
-        FakeRead(ForLet(None), _2);      // bb1[1]: scope 1 at $DIR/region-subtyping-basic.rs:+2:9: +2:10
-        StorageLive(_6);                 // bb1[2]: scope 2 at $DIR/region-subtyping-basic.rs:+3:9: +3:10
-        _6 = _2;                         // bb1[3]: scope 2 at $DIR/region-subtyping-basic.rs:+3:13: +3:14
-        FakeRead(ForLet(None), _6);      // bb1[4]: scope 2 at $DIR/region-subtyping-basic.rs:+3:9: +3:10
-        StorageLive(_7);                 // bb1[5]: scope 3 at $DIR/region-subtyping-basic.rs:+4:8: +4:12
-        _7 = const ConstValue(Scalar(0x01): bool); // bb1[6]: scope 3 at $DIR/region-subtyping-basic.rs:+4:8: +4:12
-        switchInt(move _7) -> [ConstValue(Scalar(0x00): bool): bb4, otherwise: bb2]; // bb1[7]: scope 3 at $DIR/region-subtyping-basic.rs:+4:8: +4:12
+        _2 = &'_#2r _1[_3];              // bb1[0]: scope 1 at $DIR/region_subtyping_basic.rs:+2:13: +2:18
+        FakeRead(ForLet(None), _2);      // bb1[1]: scope 1 at $DIR/region_subtyping_basic.rs:+2:9: +2:10
+        StorageLive(_6);                 // bb1[2]: scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
+        _6 = _2;                         // bb1[3]: scope 2 at $DIR/region_subtyping_basic.rs:+3:13: +3:14
+        FakeRead(ForLet(None), _6);      // bb1[4]: scope 2 at $DIR/region_subtyping_basic.rs:+3:9: +3:10
+        StorageLive(_7);                 // bb1[5]: scope 3 at $DIR/region_subtyping_basic.rs:+4:8: +4:12
+        _7 = const ConstValue(Scalar(0x01): bool); // bb1[6]: scope 3 at $DIR/region_subtyping_basic.rs:+4:8: +4:12
+        switchInt(move _7) -> [ConstValue(Scalar(0x00): bool): bb4, otherwise: bb2]; // bb1[7]: scope 3 at $DIR/region_subtyping_basic.rs:+4:8: +4:12
     }
 
     bb2: {
-        StorageLive(_8);                 // bb2[0]: scope 3 at $DIR/region-subtyping-basic.rs:+5:9: +5:18
-        StorageLive(_9);                 // bb2[1]: scope 3 at $DIR/region-subtyping-basic.rs:+5:15: +5:17
-        _9 = (*_6);                      // bb2[2]: scope 3 at $DIR/region-subtyping-basic.rs:+5:15: +5:17
-        _8 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(move _9) -> [return: bb3, unwind: bb7]; // bb2[3]: scope 3 at $DIR/region-subtyping-basic.rs:+5:9: +5:18
+        StorageLive(_8);                 // bb2[0]: scope 3 at $DIR/region_subtyping_basic.rs:+5:9: +5:18
+        StorageLive(_9);                 // bb2[1]: scope 3 at $DIR/region_subtyping_basic.rs:+5:15: +5:17
+        _9 = (*_6);                      // bb2[2]: scope 3 at $DIR/region_subtyping_basic.rs:+5:15: +5:17
+        _8 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(move _9) -> [return: bb3, unwind: bb7]; // bb2[3]: scope 3 at $DIR/region_subtyping_basic.rs:+5:9: +5:18
                                          // mir::Constant
-                                         // + span: $DIR/region-subtyping-basic.rs:21:9: 21:14
+                                         // + span: $DIR/region_subtyping_basic.rs:21:9: 21:14
                                          // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(<ZST>) }
     }
 
     bb3: {
-        StorageDead(_9);                 // bb3[0]: scope 3 at $DIR/region-subtyping-basic.rs:+5:17: +5:18
-        StorageDead(_8);                 // bb3[1]: scope 3 at $DIR/region-subtyping-basic.rs:+5:18: +5:19
-        _0 = const ConstValue(ZeroSized: ()); // bb3[2]: scope 3 at $DIR/region-subtyping-basic.rs:+4:13: +6:6
-        goto -> bb6;                     // bb3[3]: scope 3 at $DIR/region-subtyping-basic.rs:+4:5: +8:6
+        StorageDead(_9);                 // bb3[0]: scope 3 at $DIR/region_subtyping_basic.rs:+5:17: +5:18
+        StorageDead(_8);                 // bb3[1]: scope 3 at $DIR/region_subtyping_basic.rs:+5:18: +5:19
+        _0 = const ConstValue(ZeroSized: ()); // bb3[2]: scope 3 at $DIR/region_subtyping_basic.rs:+4:13: +6:6
+        goto -> bb6;                     // bb3[3]: scope 3 at $DIR/region_subtyping_basic.rs:+4:5: +8:6
     }
 
     bb4: {
-        StorageLive(_10);                // bb4[0]: scope 3 at $DIR/region-subtyping-basic.rs:+7:9: +7:18
-        _10 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(const ConstValue(Scalar(0x0000000000000016): usize)) -> [return: bb5, unwind: bb7]; // bb4[1]: scope 3 at $DIR/region-subtyping-basic.rs:+7:9: +7:18
+        StorageLive(_10);                // bb4[0]: scope 3 at $DIR/region_subtyping_basic.rs:+7:9: +7:18
+        _10 = ConstValue(ZeroSized: fn(usize) -> bool {use_x})(const ConstValue(Scalar(0x0000000000000016): usize)) -> [return: bb5, unwind: bb7]; // bb4[1]: scope 3 at $DIR/region_subtyping_basic.rs:+7:9: +7:18
                                          // mir::Constant
-                                         // + span: $DIR/region-subtyping-basic.rs:23:9: 23:14
+                                         // + span: $DIR/region_subtyping_basic.rs:23:9: 23:14
                                          // + literal: Const { ty: fn(usize) -> bool {use_x}, val: Value(<ZST>) }
     }
 
     bb5: {
-        StorageDead(_10);                // bb5[0]: scope 3 at $DIR/region-subtyping-basic.rs:+7:18: +7:19
-        _0 = const ConstValue(ZeroSized: ()); // bb5[1]: scope 3 at $DIR/region-subtyping-basic.rs:+6:12: +8:6
-        goto -> bb6;                     // bb5[2]: scope 3 at $DIR/region-subtyping-basic.rs:+4:5: +8:6
+        StorageDead(_10);                // bb5[0]: scope 3 at $DIR/region_subtyping_basic.rs:+7:18: +7:19
+        _0 = const ConstValue(ZeroSized: ()); // bb5[1]: scope 3 at $DIR/region_subtyping_basic.rs:+6:12: +8:6
+        goto -> bb6;                     // bb5[2]: scope 3 at $DIR/region_subtyping_basic.rs:+4:5: +8:6
     }
 
     bb6: {
-        StorageDead(_7);                 // bb6[0]: scope 3 at $DIR/region-subtyping-basic.rs:+8:5: +8:6
-        StorageDead(_6);                 // bb6[1]: scope 2 at $DIR/region-subtyping-basic.rs:+9:1: +9:2
-        StorageDead(_3);                 // bb6[2]: scope 1 at $DIR/region-subtyping-basic.rs:+9:1: +9:2
-        StorageDead(_2);                 // bb6[3]: scope 1 at $DIR/region-subtyping-basic.rs:+9:1: +9:2
-        StorageDead(_1);                 // bb6[4]: scope 0 at $DIR/region-subtyping-basic.rs:+9:1: +9:2
-        return;                          // bb6[5]: scope 0 at $DIR/region-subtyping-basic.rs:+9:2: +9:2
+        StorageDead(_7);                 // bb6[0]: scope 3 at $DIR/region_subtyping_basic.rs:+8:5: +8:6
+        StorageDead(_6);                 // bb6[1]: scope 2 at $DIR/region_subtyping_basic.rs:+9:1: +9:2
+        StorageDead(_3);                 // bb6[2]: scope 1 at $DIR/region_subtyping_basic.rs:+9:1: +9:2
+        StorageDead(_2);                 // bb6[3]: scope 1 at $DIR/region_subtyping_basic.rs:+9:1: +9:2
+        StorageDead(_1);                 // bb6[4]: scope 0 at $DIR/region_subtyping_basic.rs:+9:1: +9:2
+        return;                          // bb6[5]: scope 0 at $DIR/region_subtyping_basic.rs:+9:2: +9:2
     }
 
     bb7 (cleanup): {
-        resume;                          // bb7[0]: scope 0 at $DIR/region-subtyping-basic.rs:+0:1: +9:2
+        resume;                          // bb7[0]: scope 0 at $DIR/region_subtyping_basic.rs:+0:1: +9:2
     }
 }
diff --git a/src/test/mir-opt/nll/region-subtyping-basic.rs b/src/test/mir-opt/nll/region_subtyping_basic.rs
index 64332f302e8..64332f302e8 100644
--- a/src/test/mir-opt/nll/region-subtyping-basic.rs
+++ b/src/test/mir-opt/nll/region_subtyping_basic.rs
diff --git a/src/test/mir-opt/no-drop-for-inactive-variant.rs b/src/test/mir-opt/no_drop_for_inactive_variant.rs
index 34e2b1a134f..34e2b1a134f 100644
--- a/src/test/mir-opt/no-drop-for-inactive-variant.rs
+++ b/src/test/mir-opt/no_drop_for_inactive_variant.rs
diff --git a/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir
index 50fd98ff13a..e708255cea4 100644
--- a/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/no_drop_for_inactive_variant.unwrap.SimplifyCfg-elaborate-drops.after.mir
@@ -1,21 +1,21 @@
 // MIR for `unwrap` after SimplifyCfg-elaborate-drops
 
 fn unwrap(_1: Option<T>) -> T {
-    debug opt => _1;                     // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:+0:14: +0:17
-    let mut _0: T;                       // return place in scope 0 at $DIR/no-drop-for-inactive-variant.rs:+0:33: +0:34
-    let mut _2: isize;                   // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:+2:9: +2:16
-    let _3: T;                           // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:+2:14: +2:15
+    debug opt => _1;                     // in scope 0 at $DIR/no_drop_for_inactive_variant.rs:+0:14: +0:17
+    let mut _0: T;                       // return place in scope 0 at $DIR/no_drop_for_inactive_variant.rs:+0:33: +0:34
+    let mut _2: isize;                   // in scope 0 at $DIR/no_drop_for_inactive_variant.rs:+2:9: +2:16
+    let _3: T;                           // in scope 0 at $DIR/no_drop_for_inactive_variant.rs:+2:14: +2:15
     let mut _4: !;                       // in scope 0 at $SRC_DIR/std/src/panic.rs:LL:COL
-    let mut _5: isize;                   // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:+5:1: +5:2
-    let mut _6: isize;                   // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:+5:1: +5:2
-    let mut _7: isize;                   // in scope 0 at $DIR/no-drop-for-inactive-variant.rs:+5:1: +5:2
+    let mut _5: isize;                   // in scope 0 at $DIR/no_drop_for_inactive_variant.rs:+5:1: +5:2
+    let mut _6: isize;                   // in scope 0 at $DIR/no_drop_for_inactive_variant.rs:+5:1: +5:2
+    let mut _7: isize;                   // in scope 0 at $DIR/no_drop_for_inactive_variant.rs:+5:1: +5:2
     scope 1 {
-        debug x => _3;                   // in scope 1 at $DIR/no-drop-for-inactive-variant.rs:+2:14: +2:15
+        debug x => _3;                   // in scope 1 at $DIR/no_drop_for_inactive_variant.rs:+2:14: +2:15
     }
 
     bb0: {
-        _2 = discriminant(_1);           // scope 0 at $DIR/no-drop-for-inactive-variant.rs:+1:11: +1:14
-        switchInt(move _2) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/no-drop-for-inactive-variant.rs:+1:5: +1:14
+        _2 = discriminant(_1);           // scope 0 at $DIR/no_drop_for_inactive_variant.rs:+1:11: +1:14
+        switchInt(move _2) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/no_drop_for_inactive_variant.rs:+1:5: +1:14
     }
 
     bb1: {
@@ -30,20 +30,20 @@ fn unwrap(_1: Option<T>) -> T {
     }
 
     bb2: {
-        unreachable;                     // scope 0 at $DIR/no-drop-for-inactive-variant.rs:+1:11: +1:14
+        unreachable;                     // scope 0 at $DIR/no_drop_for_inactive_variant.rs:+1:11: +1:14
     }
 
     bb3: {
-        StorageLive(_3);                 // scope 0 at $DIR/no-drop-for-inactive-variant.rs:+2:14: +2:15
-        _3 = move ((_1 as Some).0: T);   // scope 0 at $DIR/no-drop-for-inactive-variant.rs:+2:14: +2:15
-        _0 = move _3;                    // scope 1 at $DIR/no-drop-for-inactive-variant.rs:+2:20: +2:21
-        StorageDead(_3);                 // scope 0 at $DIR/no-drop-for-inactive-variant.rs:+2:20: +2:21
-        _5 = discriminant(_1);           // scope 0 at $DIR/no-drop-for-inactive-variant.rs:+5:1: +5:2
-        return;                          // scope 0 at $DIR/no-drop-for-inactive-variant.rs:+5:2: +5:2
+        StorageLive(_3);                 // scope 0 at $DIR/no_drop_for_inactive_variant.rs:+2:14: +2:15
+        _3 = move ((_1 as Some).0: T);   // scope 0 at $DIR/no_drop_for_inactive_variant.rs:+2:14: +2:15
+        _0 = move _3;                    // scope 1 at $DIR/no_drop_for_inactive_variant.rs:+2:20: +2:21
+        StorageDead(_3);                 // scope 0 at $DIR/no_drop_for_inactive_variant.rs:+2:20: +2:21
+        _5 = discriminant(_1);           // scope 0 at $DIR/no_drop_for_inactive_variant.rs:+5:1: +5:2
+        return;                          // scope 0 at $DIR/no_drop_for_inactive_variant.rs:+5:2: +5:2
     }
 
     bb4 (cleanup): {
-        _7 = discriminant(_1);           // scope 0 at $DIR/no-drop-for-inactive-variant.rs:+5:1: +5:2
-        resume;                          // scope 0 at $DIR/no-drop-for-inactive-variant.rs:+0:1: +5:2
+        _7 = discriminant(_1);           // scope 0 at $DIR/no_drop_for_inactive_variant.rs:+5:1: +5:2
+        resume;                          // scope 0 at $DIR/no_drop_for_inactive_variant.rs:+0:1: +5:2
     }
 }
diff --git a/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir b/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir
index 963e7cde656..0cb34a2f274 100644
--- a/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir
+++ b/src/test/mir-opt/no_spurious_drop_after_call.main.ElaborateDrops.before.mir
@@ -1,49 +1,49 @@
 // MIR for `main` before ElaborateDrops
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/no-spurious-drop-after-call.rs:+0:11: +0:11
-    let _1: ();                          // in scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:5: +1:35
-    let mut _2: std::string::String;     // in scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:20: +1:34
-    let mut _3: &str;                    // in scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:20: +1:34
-    let _4: &str;                        // in scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:20: +1:22
+    let mut _0: ();                      // return place in scope 0 at $DIR/no_spurious_drop_after_call.rs:+0:11: +0:11
+    let _1: ();                          // in scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:5: +1:35
+    let mut _2: std::string::String;     // in scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
+    let mut _3: &str;                    // in scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
+    let _4: &str;                        // in scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:22
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:5: +1:35
-        StorageLive(_2);                 // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:20: +1:34
-        StorageLive(_3);                 // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:20: +1:34
-        StorageLive(_4);                 // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:20: +1:22
-        _4 = const "";                   // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:20: +1:22
+        StorageLive(_1);                 // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:5: +1:35
+        StorageLive(_2);                 // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
+        StorageLive(_3);                 // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
+        StorageLive(_4);                 // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:22
+        _4 = const "";                   // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:22
                                          // mir::Constant
-                                         // + span: $DIR/no-spurious-drop-after-call.rs:9:20: 9:22
+                                         // + span: $DIR/no_spurious_drop_after_call.rs:9:20: 9:22
                                          // + literal: Const { ty: &str, val: Value(Slice(..)) }
-        _3 = &(*_4);                     // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:20: +1:34
-        _2 = <str as ToString>::to_string(move _3) -> bb1; // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:20: +1:34
+        _3 = &(*_4);                     // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
+        _2 = <str as ToString>::to_string(move _3) -> bb1; // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:20: +1:34
                                          // mir::Constant
-                                         // + span: $DIR/no-spurious-drop-after-call.rs:9:23: 9:32
+                                         // + span: $DIR/no_spurious_drop_after_call.rs:9:23: 9:32
                                          // + literal: Const { ty: for<'a> fn(&'a str) -> String {<str as ToString>::to_string}, val: Value(<ZST>) }
     }
 
     bb1: {
-        StorageDead(_3);                 // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:33: +1:34
-        _1 = std::mem::drop::<String>(move _2) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:5: +1:35
+        StorageDead(_3);                 // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:33: +1:34
+        _1 = std::mem::drop::<String>(move _2) -> [return: bb2, unwind: bb3]; // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:5: +1:35
                                          // mir::Constant
-                                         // + span: $DIR/no-spurious-drop-after-call.rs:9:5: 9:19
+                                         // + span: $DIR/no_spurious_drop_after_call.rs:9:5: 9:19
                                          // + literal: Const { ty: fn(String) {std::mem::drop::<String>}, val: Value(<ZST>) }
     }
 
     bb2: {
-        StorageDead(_2);                 // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:34: +1:35
-        StorageDead(_4);                 // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:35: +1:36
-        StorageDead(_1);                 // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:35: +1:36
-        _0 = const ();                   // scope 0 at $DIR/no-spurious-drop-after-call.rs:+0:11: +2:2
-        return;                          // scope 0 at $DIR/no-spurious-drop-after-call.rs:+2:2: +2:2
+        StorageDead(_2);                 // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:34: +1:35
+        StorageDead(_4);                 // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:35: +1:36
+        StorageDead(_1);                 // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:35: +1:36
+        _0 = const ();                   // scope 0 at $DIR/no_spurious_drop_after_call.rs:+0:11: +2:2
+        return;                          // scope 0 at $DIR/no_spurious_drop_after_call.rs:+2:2: +2:2
     }
 
     bb3 (cleanup): {
-        drop(_2) -> bb4;                 // scope 0 at $DIR/no-spurious-drop-after-call.rs:+1:34: +1:35
+        drop(_2) -> bb4;                 // scope 0 at $DIR/no_spurious_drop_after_call.rs:+1:34: +1:35
     }
 
     bb4 (cleanup): {
-        resume;                          // scope 0 at $DIR/no-spurious-drop-after-call.rs:+0:1: +2:2
+        resume;                          // scope 0 at $DIR/no_spurious_drop_after_call.rs:+0:1: +2:2
     }
 }
diff --git a/src/test/mir-opt/no-spurious-drop-after-call.rs b/src/test/mir-opt/no_spurious_drop_after_call.rs
index bb5bb9aa4e5..bb5bb9aa4e5 100644
--- a/src/test/mir-opt/no-spurious-drop-after-call.rs
+++ b/src/test/mir-opt/no_spurious_drop_after_call.rs
diff --git a/src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff b/src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff
index ce35f920bf6..61a16065bfb 100644
--- a/src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff
+++ b/src/test/mir-opt/nrvo_simple.nrvo.RenameReturnPlace.diff
@@ -2,42 +2,42 @@
 + // MIR for `nrvo` after RenameReturnPlace
   
   fn nrvo(_1: for<'a> fn(&'a mut [u8; 1024])) -> [u8; 1024] {
-      debug init => _1;                    // in scope 0 at $DIR/nrvo-simple.rs:+0:9: +0:13
--     let mut _0: [u8; 1024];              // return place in scope 0 at $DIR/nrvo-simple.rs:+0:39: +0:49
-+     let mut _0: [u8; 1024];              // return place in scope 0 at $DIR/nrvo-simple.rs:+1:9: +1:16
-      let mut _2: [u8; 1024];              // in scope 0 at $DIR/nrvo-simple.rs:+1:9: +1:16
-      let _3: ();                          // in scope 0 at $DIR/nrvo-simple.rs:+2:5: +2:19
-      let mut _4: for<'a> fn(&'a mut [u8; 1024]); // in scope 0 at $DIR/nrvo-simple.rs:+2:5: +2:9
-      let mut _5: &mut [u8; 1024];         // in scope 0 at $DIR/nrvo-simple.rs:+2:10: +2:18
-      let mut _6: &mut [u8; 1024];         // in scope 0 at $DIR/nrvo-simple.rs:+2:10: +2:18
+      debug init => _1;                    // in scope 0 at $DIR/nrvo_simple.rs:+0:9: +0:13
+-     let mut _0: [u8; 1024];              // return place in scope 0 at $DIR/nrvo_simple.rs:+0:39: +0:49
++     let mut _0: [u8; 1024];              // return place in scope 0 at $DIR/nrvo_simple.rs:+1:9: +1:16
+      let mut _2: [u8; 1024];              // in scope 0 at $DIR/nrvo_simple.rs:+1:9: +1:16
+      let _3: ();                          // in scope 0 at $DIR/nrvo_simple.rs:+2:5: +2:19
+      let mut _4: for<'a> fn(&'a mut [u8; 1024]); // in scope 0 at $DIR/nrvo_simple.rs:+2:5: +2:9
+      let mut _5: &mut [u8; 1024];         // in scope 0 at $DIR/nrvo_simple.rs:+2:10: +2:18
+      let mut _6: &mut [u8; 1024];         // in scope 0 at $DIR/nrvo_simple.rs:+2:10: +2:18
       scope 1 {
--         debug buf => _2;                 // in scope 1 at $DIR/nrvo-simple.rs:+1:9: +1:16
-+         debug buf => _0;                 // in scope 1 at $DIR/nrvo-simple.rs:+1:9: +1:16
+-         debug buf => _2;                 // in scope 1 at $DIR/nrvo_simple.rs:+1:9: +1:16
++         debug buf => _0;                 // in scope 1 at $DIR/nrvo_simple.rs:+1:9: +1:16
       }
   
       bb0: {
--         StorageLive(_2);                 // scope 0 at $DIR/nrvo-simple.rs:+1:9: +1:16
--         _2 = [const 0_u8; 1024];         // scope 0 at $DIR/nrvo-simple.rs:+1:19: +1:28
-+         _0 = [const 0_u8; 1024];         // scope 0 at $DIR/nrvo-simple.rs:+1:19: +1:28
-          StorageLive(_3);                 // scope 1 at $DIR/nrvo-simple.rs:+2:5: +2:19
-          StorageLive(_4);                 // scope 1 at $DIR/nrvo-simple.rs:+2:5: +2:9
-          _4 = _1;                         // scope 1 at $DIR/nrvo-simple.rs:+2:5: +2:9
-          StorageLive(_5);                 // scope 1 at $DIR/nrvo-simple.rs:+2:10: +2:18
-          StorageLive(_6);                 // scope 1 at $DIR/nrvo-simple.rs:+2:10: +2:18
--         _6 = &mut _2;                    // scope 1 at $DIR/nrvo-simple.rs:+2:10: +2:18
-+         _6 = &mut _0;                    // scope 1 at $DIR/nrvo-simple.rs:+2:10: +2:18
-          _5 = &mut (*_6);                 // scope 1 at $DIR/nrvo-simple.rs:+2:10: +2:18
-          _3 = move _4(move _5) -> bb1;    // scope 1 at $DIR/nrvo-simple.rs:+2:5: +2:19
+-         StorageLive(_2);                 // scope 0 at $DIR/nrvo_simple.rs:+1:9: +1:16
+-         _2 = [const 0_u8; 1024];         // scope 0 at $DIR/nrvo_simple.rs:+1:19: +1:28
++         _0 = [const 0_u8; 1024];         // scope 0 at $DIR/nrvo_simple.rs:+1:19: +1:28
+          StorageLive(_3);                 // scope 1 at $DIR/nrvo_simple.rs:+2:5: +2:19
+          StorageLive(_4);                 // scope 1 at $DIR/nrvo_simple.rs:+2:5: +2:9
+          _4 = _1;                         // scope 1 at $DIR/nrvo_simple.rs:+2:5: +2:9
+          StorageLive(_5);                 // scope 1 at $DIR/nrvo_simple.rs:+2:10: +2:18
+          StorageLive(_6);                 // scope 1 at $DIR/nrvo_simple.rs:+2:10: +2:18
+-         _6 = &mut _2;                    // scope 1 at $DIR/nrvo_simple.rs:+2:10: +2:18
++         _6 = &mut _0;                    // scope 1 at $DIR/nrvo_simple.rs:+2:10: +2:18
+          _5 = &mut (*_6);                 // scope 1 at $DIR/nrvo_simple.rs:+2:10: +2:18
+          _3 = move _4(move _5) -> bb1;    // scope 1 at $DIR/nrvo_simple.rs:+2:5: +2:19
       }
   
       bb1: {
-          StorageDead(_5);                 // scope 1 at $DIR/nrvo-simple.rs:+2:18: +2:19
-          StorageDead(_4);                 // scope 1 at $DIR/nrvo-simple.rs:+2:18: +2:19
-          StorageDead(_6);                 // scope 1 at $DIR/nrvo-simple.rs:+2:19: +2:20
-          StorageDead(_3);                 // scope 1 at $DIR/nrvo-simple.rs:+2:19: +2:20
--         _0 = _2;                         // scope 1 at $DIR/nrvo-simple.rs:+3:5: +3:8
--         StorageDead(_2);                 // scope 0 at $DIR/nrvo-simple.rs:+4:1: +4:2
-          return;                          // scope 0 at $DIR/nrvo-simple.rs:+4:2: +4:2
+          StorageDead(_5);                 // scope 1 at $DIR/nrvo_simple.rs:+2:18: +2:19
+          StorageDead(_4);                 // scope 1 at $DIR/nrvo_simple.rs:+2:18: +2:19
+          StorageDead(_6);                 // scope 1 at $DIR/nrvo_simple.rs:+2:19: +2:20
+          StorageDead(_3);                 // scope 1 at $DIR/nrvo_simple.rs:+2:19: +2:20
+-         _0 = _2;                         // scope 1 at $DIR/nrvo_simple.rs:+3:5: +3:8
+-         StorageDead(_2);                 // scope 0 at $DIR/nrvo_simple.rs:+4:1: +4:2
+          return;                          // scope 0 at $DIR/nrvo_simple.rs:+4:2: +4:2
       }
   }
   
diff --git a/src/test/mir-opt/nrvo-simple.rs b/src/test/mir-opt/nrvo_simple.rs
index 5786ae62127..5786ae62127 100644
--- a/src/test/mir-opt/nrvo-simple.rs
+++ b/src/test/mir-opt/nrvo_simple.rs
diff --git a/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir b/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir
index f9ed1036f00..e522534867d 100644
--- a/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir
+++ b/src/test/mir-opt/packed_struct_drop_aligned.main.SimplifyCfg-elaborate-drops.after.mir
@@ -1,60 +1,60 @@
 // MIR for `main` after SimplifyCfg-elaborate-drops
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/packed-struct-drop-aligned.rs:+0:11: +0:11
-    let mut _1: Packed;                  // in scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:9: +1:14
-    let mut _2: Aligned;                 // in scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:24: +1:42
-    let mut _3: Droppy;                  // in scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:32: +1:41
-    let mut _4: Aligned;                 // in scope 0 at $DIR/packed-struct-drop-aligned.rs:+2:11: +2:29
-    let mut _5: Droppy;                  // in scope 0 at $DIR/packed-struct-drop-aligned.rs:+2:19: +2:28
-    let mut _6: Aligned;                 // in scope 0 at $DIR/packed-struct-drop-aligned.rs:+2:5: +2:8
+    let mut _0: ();                      // return place in scope 0 at $DIR/packed_struct_drop_aligned.rs:+0:11: +0:11
+    let mut _1: Packed;                  // in scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:9: +1:14
+    let mut _2: Aligned;                 // in scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:24: +1:42
+    let mut _3: Droppy;                  // in scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:32: +1:41
+    let mut _4: Aligned;                 // in scope 0 at $DIR/packed_struct_drop_aligned.rs:+2:11: +2:29
+    let mut _5: Droppy;                  // in scope 0 at $DIR/packed_struct_drop_aligned.rs:+2:19: +2:28
+    let mut _6: Aligned;                 // in scope 0 at $DIR/packed_struct_drop_aligned.rs:+2:5: +2:8
     scope 1 {
-        debug x => _1;                   // in scope 1 at $DIR/packed-struct-drop-aligned.rs:+1:9: +1:14
+        debug x => _1;                   // in scope 1 at $DIR/packed_struct_drop_aligned.rs:+1:9: +1:14
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:9: +1:14
-        StorageLive(_2);                 // scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:24: +1:42
-        StorageLive(_3);                 // scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:32: +1:41
-        Deinit(_3);                      // scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:32: +1:41
-        (_3.0: usize) = const 0_usize;   // scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:32: +1:41
-        Deinit(_2);                      // scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:24: +1:42
-        (_2.0: Droppy) = move _3;        // scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:24: +1:42
-        StorageDead(_3);                 // scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:41: +1:42
-        Deinit(_1);                      // scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:17: +1:43
-        (_1.0: Aligned) = move _2;       // scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:17: +1:43
-        StorageDead(_2);                 // scope 0 at $DIR/packed-struct-drop-aligned.rs:+1:42: +1:43
-        StorageLive(_4);                 // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:11: +2:29
-        StorageLive(_5);                 // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:19: +2:28
-        Deinit(_5);                      // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:19: +2:28
-        (_5.0: usize) = const 0_usize;   // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:19: +2:28
-        Deinit(_4);                      // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:11: +2:29
-        (_4.0: Droppy) = move _5;        // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:11: +2:29
-        StorageDead(_5);                 // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:28: +2:29
-        StorageLive(_6);                 // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:5: +2:8
-        _6 = move (_1.0: Aligned);       // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:5: +2:8
-        drop(_6) -> [return: bb4, unwind: bb3]; // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:5: +2:8
+        StorageLive(_1);                 // scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:9: +1:14
+        StorageLive(_2);                 // scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:24: +1:42
+        StorageLive(_3);                 // scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:32: +1:41
+        Deinit(_3);                      // scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:32: +1:41
+        (_3.0: usize) = const 0_usize;   // scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:32: +1:41
+        Deinit(_2);                      // scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:24: +1:42
+        (_2.0: Droppy) = move _3;        // scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:24: +1:42
+        StorageDead(_3);                 // scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:41: +1:42
+        Deinit(_1);                      // scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:17: +1:43
+        (_1.0: Aligned) = move _2;       // scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:17: +1:43
+        StorageDead(_2);                 // scope 0 at $DIR/packed_struct_drop_aligned.rs:+1:42: +1:43
+        StorageLive(_4);                 // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:11: +2:29
+        StorageLive(_5);                 // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:19: +2:28
+        Deinit(_5);                      // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:19: +2:28
+        (_5.0: usize) = const 0_usize;   // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:19: +2:28
+        Deinit(_4);                      // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:11: +2:29
+        (_4.0: Droppy) = move _5;        // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:11: +2:29
+        StorageDead(_5);                 // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:28: +2:29
+        StorageLive(_6);                 // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:5: +2:8
+        _6 = move (_1.0: Aligned);       // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:5: +2:8
+        drop(_6) -> [return: bb4, unwind: bb3]; // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:5: +2:8
     }
 
     bb1: {
-        StorageDead(_1);                 // scope 0 at $DIR/packed-struct-drop-aligned.rs:+3:1: +3:2
-        return;                          // scope 0 at $DIR/packed-struct-drop-aligned.rs:+3:2: +3:2
+        StorageDead(_1);                 // scope 0 at $DIR/packed_struct_drop_aligned.rs:+3:1: +3:2
+        return;                          // scope 0 at $DIR/packed_struct_drop_aligned.rs:+3:2: +3:2
     }
 
     bb2 (cleanup): {
-        resume;                          // scope 0 at $DIR/packed-struct-drop-aligned.rs:+0:1: +3:2
+        resume;                          // scope 0 at $DIR/packed_struct_drop_aligned.rs:+0:1: +3:2
     }
 
     bb3 (cleanup): {
-        (_1.0: Aligned) = move _4;       // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:5: +2:8
-        drop(_1) -> bb2;                 // scope 0 at $DIR/packed-struct-drop-aligned.rs:+3:1: +3:2
+        (_1.0: Aligned) = move _4;       // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:5: +2:8
+        drop(_1) -> bb2;                 // scope 0 at $DIR/packed_struct_drop_aligned.rs:+3:1: +3:2
     }
 
     bb4: {
-        StorageDead(_6);                 // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:5: +2:8
-        (_1.0: Aligned) = move _4;       // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:5: +2:8
-        StorageDead(_4);                 // scope 1 at $DIR/packed-struct-drop-aligned.rs:+2:28: +2:29
-        _0 = const ();                   // scope 0 at $DIR/packed-struct-drop-aligned.rs:+0:11: +3:2
-        drop(_1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/packed-struct-drop-aligned.rs:+3:1: +3:2
+        StorageDead(_6);                 // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:5: +2:8
+        (_1.0: Aligned) = move _4;       // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:5: +2:8
+        StorageDead(_4);                 // scope 1 at $DIR/packed_struct_drop_aligned.rs:+2:28: +2:29
+        _0 = const ();                   // scope 0 at $DIR/packed_struct_drop_aligned.rs:+0:11: +3:2
+        drop(_1) -> [return: bb1, unwind: bb2]; // scope 0 at $DIR/packed_struct_drop_aligned.rs:+3:1: +3:2
     }
 }
diff --git a/src/test/mir-opt/packed-struct-drop-aligned.rs b/src/test/mir-opt/packed_struct_drop_aligned.rs
index cb652426090..cb652426090 100644
--- a/src/test/mir-opt/packed-struct-drop-aligned.rs
+++ b/src/test/mir-opt/packed_struct_drop_aligned.rs
diff --git a/src/test/mir-opt/remove_never_const.no_codegen.PreCodegen.after.mir b/src/test/mir-opt/remove_never_const.no_codegen.PreCodegen.after.mir
index 76bdd23be16..8eb0e9c8f48 100644
--- a/src/test/mir-opt/remove_never_const.no_codegen.PreCodegen.after.mir
+++ b/src/test/mir-opt/remove_never_const.no_codegen.PreCodegen.after.mir
@@ -1,11 +1,11 @@
 // MIR for `no_codegen` after PreCodegen
 
 fn no_codegen() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/remove-never-const.rs:+0:20: +0:20
+    let mut _0: ();                      // return place in scope 0 at $DIR/remove_never_const.rs:+0:20: +0:20
     scope 1 {
     }
 
     bb0: {
-        unreachable;                     // scope 0 at $DIR/remove-never-const.rs:+1:13: +1:33
+        unreachable;                     // scope 0 at $DIR/remove_never_const.rs:+1:13: +1:33
     }
 }
diff --git a/src/test/mir-opt/remove-never-const.rs b/src/test/mir-opt/remove_never_const.rs
index 16095cfdd7d..16095cfdd7d 100644
--- a/src/test/mir-opt/remove-never-const.rs
+++ b/src/test/mir-opt/remove_never_const.rs
diff --git a/src/test/mir-opt/rustc.try_identity.DestinationPropagation.diff b/src/test/mir-opt/rustc.try_identity.DestinationPropagation.diff
deleted file mode 100644
index c3e503bf2c6..00000000000
--- a/src/test/mir-opt/rustc.try_identity.DestinationPropagation.diff
+++ /dev/null
@@ -1,72 +0,0 @@
-- // MIR for `try_identity` before DestinationPropagation
-+ // MIR for `try_identity` after DestinationPropagation
-  
-  fn try_identity(_1: std::result::Result<u32, i32>) -> std::result::Result<u32, i32> {
-      debug x => _1;                       // in scope 0 at $DIR/simplify_try.rs:6:17: 6:18
-      let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:6:41: 6:57
-      let _2: u32;                         // in scope 0 at $DIR/simplify_try.rs:7:9: 7:10
-      let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:15
-      let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:7:13: 7:14
-      let mut _5: isize;                   // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
-      let _6: i32;                         // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
-      let mut _7: !;                       // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
-      let mut _8: i32;                     // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
-      let mut _9: i32;                     // in scope 0 at $DIR/simplify_try.rs:7:14: 7:15
-      let _10: u32;                        // in scope 0 at $DIR/simplify_try.rs:7:13: 7:15
-      let mut _11: u32;                    // in scope 0 at $DIR/simplify_try.rs:8:8: 8:9
-      scope 1 {
-          debug y => _2;                   // in scope 1 at $DIR/simplify_try.rs:7:9: 7:10
-      }
-      scope 2 {
-          debug err => _6;                 // in scope 2 at $DIR/simplify_try.rs:7:14: 7:15
-          scope 3 {
-              scope 7 {
-                  debug t => _9;           // in scope 7 at $SRC_DIR/libcore/convert/mod.rs:LL:COL
-              }
-              scope 8 {
-                  debug v => _8;           // in scope 8 at $SRC_DIR/libcore/result.rs:LL:COL
-                  let mut _12: i32;        // in scope 8 at $DIR/simplify_try.rs:7:14: 7:15
-              }
-          }
-      }
-      scope 4 {
-          debug val => _10;                // in scope 4 at $DIR/simplify_try.rs:7:13: 7:15
-          scope 5 {
-          }
-      }
-      scope 6 {
--         debug self => _4;                // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
-+         debug self => _0;                // in scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
-      }
-  
-      bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/simplify_try.rs:7:9: 7:10
--         StorageLive(_3);                 // scope 0 at $DIR/simplify_try.rs:7:13: 7:15
--         StorageLive(_4);                 // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
--         _4 = _1;                         // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
--         _3 = move _4;                    // scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
--         StorageDead(_4);                 // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
--         _5 = discriminant(_3);           // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:7:13: 7:15
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
-+         _0 = _1;                         // scope 0 at $DIR/simplify_try.rs:7:13: 7:14
-+         nop;                             // scope 6 at $SRC_DIR/libcore/result.rs:LL:COL
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
-+         _5 = discriminant(_0);           // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
-          goto -> bb1;                     // scope 0 at $DIR/simplify_try.rs:7:14: 7:15
-      }
-  
-      bb1: {
--         _0 = move _3;                    // scope 1 at $DIR/simplify_try.rs:8:5: 8:10
--         StorageDead(_3);                 // scope 0 at $DIR/simplify_try.rs:7:15: 7:16
-+         nop;                             // scope 1 at $DIR/simplify_try.rs:8:5: 8:10
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:7:15: 7:16
-          StorageDead(_2);                 // scope 0 at $DIR/simplify_try.rs:9:1: 9:2
-          goto -> bb2;                     // scope 0 at $DIR/simplify_try.rs:9:2: 9:2
-      }
-  
-      bb2: {
-          return;                          // scope 0 at $DIR/simplify_try.rs:9:2: 9:2
-      }
-  }
-  
diff --git a/src/test/mir-opt/simplify-arm.rs b/src/test/mir-opt/simplify_arm.rs
index c247872e2af..c247872e2af 100644
--- a/src/test/mir-opt/simplify-arm.rs
+++ b/src/test/mir-opt/simplify_arm.rs
diff --git a/src/test/mir-opt/simplify-arm-identity.rs b/src/test/mir-opt/simplify_arm_identity.rs
index cf6ff57aa96..cf6ff57aa96 100644
--- a/src/test/mir-opt/simplify-arm-identity.rs
+++ b/src/test/mir-opt/simplify_arm_identity.rs
diff --git a/src/test/mir-opt/simplify_locals.c.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.c.SimplifyLocals.diff
index 5d7517e4eb4..1a5143aa0fa 100644
--- a/src/test/mir-opt/simplify_locals.c.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.c.SimplifyLocals.diff
@@ -2,32 +2,32 @@
 + // MIR for `c` after SimplifyLocals
   
   fn c() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals.rs:+0:8: +0:8
-      let _1: [u8; 10];                    // in scope 0 at $DIR/simplify-locals.rs:+1:9: +1:14
--     let mut _2: &[u8];                   // in scope 0 at $DIR/simplify-locals.rs:+3:20: +3:26
--     let mut _3: &[u8; 10];               // in scope 0 at $DIR/simplify-locals.rs:+3:20: +3:26
--     let _4: &[u8; 10];                   // in scope 0 at $DIR/simplify-locals.rs:+3:20: +3:26
+      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals.rs:+0:8: +0:8
+      let _1: [u8; 10];                    // in scope 0 at $DIR/simplify_locals.rs:+1:9: +1:14
+-     let mut _2: &[u8];                   // in scope 0 at $DIR/simplify_locals.rs:+3:20: +3:26
+-     let mut _3: &[u8; 10];               // in scope 0 at $DIR/simplify_locals.rs:+3:20: +3:26
+-     let _4: &[u8; 10];                   // in scope 0 at $DIR/simplify_locals.rs:+3:20: +3:26
       scope 1 {
-          debug bytes => _1;               // in scope 1 at $DIR/simplify-locals.rs:+1:9: +1:14
+          debug bytes => _1;               // in scope 1 at $DIR/simplify_locals.rs:+1:9: +1:14
           scope 2 {
           }
       }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/simplify-locals.rs:+1:9: +1:14
-          _1 = [const 0_u8; 10];           // scope 0 at $DIR/simplify-locals.rs:+1:17: +1:26
--         StorageLive(_2);                 // scope 1 at $DIR/simplify-locals.rs:+3:20: +3:26
--         StorageLive(_3);                 // scope 1 at $DIR/simplify-locals.rs:+3:20: +3:26
--         StorageLive(_4);                 // scope 1 at $DIR/simplify-locals.rs:+3:20: +3:26
--         _4 = &_1;                        // scope 1 at $DIR/simplify-locals.rs:+3:20: +3:26
--         _3 = &(*_4);                     // scope 1 at $DIR/simplify-locals.rs:+3:20: +3:26
--         _2 = move _3 as &[u8] (Pointer(Unsize)); // scope 1 at $DIR/simplify-locals.rs:+3:20: +3:26
--         StorageDead(_3);                 // scope 1 at $DIR/simplify-locals.rs:+3:25: +3:26
--         StorageDead(_4);                 // scope 1 at $DIR/simplify-locals.rs:+3:26: +3:27
--         StorageDead(_2);                 // scope 1 at $DIR/simplify-locals.rs:+3:26: +3:27
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:+0:8: +4:2
-          StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:+4:1: +4:2
-          return;                          // scope 0 at $DIR/simplify-locals.rs:+4:2: +4:2
+          StorageLive(_1);                 // scope 0 at $DIR/simplify_locals.rs:+1:9: +1:14
+          _1 = [const 0_u8; 10];           // scope 0 at $DIR/simplify_locals.rs:+1:17: +1:26
+-         StorageLive(_2);                 // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         StorageLive(_3);                 // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         StorageLive(_4);                 // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         _4 = &_1;                        // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         _3 = &(*_4);                     // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         _2 = move _3 as &[u8] (Pointer(Unsize)); // scope 1 at $DIR/simplify_locals.rs:+3:20: +3:26
+-         StorageDead(_3);                 // scope 1 at $DIR/simplify_locals.rs:+3:25: +3:26
+-         StorageDead(_4);                 // scope 1 at $DIR/simplify_locals.rs:+3:26: +3:27
+-         StorageDead(_2);                 // scope 1 at $DIR/simplify_locals.rs:+3:26: +3:27
+          _0 = const ();                   // scope 0 at $DIR/simplify_locals.rs:+0:8: +4:2
+          StorageDead(_1);                 // scope 0 at $DIR/simplify_locals.rs:+4:1: +4:2
+          return;                          // scope 0 at $DIR/simplify_locals.rs:+4:2: +4:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify_locals.d1.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.d1.SimplifyLocals.diff
index a9ea8869a96..6426bf926a4 100644
--- a/src/test/mir-opt/simplify_locals.d1.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.d1.SimplifyLocals.diff
@@ -2,18 +2,18 @@
 + // MIR for `d1` after SimplifyLocals
   
   fn d1() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals.rs:+0:9: +0:9
--     let mut _1: E;                       // in scope 0 at $DIR/simplify-locals.rs:+2:13: +2:17
+      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals.rs:+0:9: +0:9
+-     let mut _1: E;                       // in scope 0 at $DIR/simplify_locals.rs:+2:13: +2:17
       scope 1 {
       }
   
       bb0: {
--         StorageLive(_1);                 // scope 0 at $DIR/simplify-locals.rs:+2:13: +2:17
--         Deinit(_1);                      // scope 0 at $DIR/simplify-locals.rs:+2:13: +2:17
--         discriminant(_1) = 0;            // scope 0 at $DIR/simplify-locals.rs:+2:13: +2:17
--         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:+2:17: +2:18
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:+0:9: +3:2
-          return;                          // scope 0 at $DIR/simplify-locals.rs:+3:2: +3:2
+-         StorageLive(_1);                 // scope 0 at $DIR/simplify_locals.rs:+2:13: +2:17
+-         Deinit(_1);                      // scope 0 at $DIR/simplify_locals.rs:+2:13: +2:17
+-         discriminant(_1) = 0;            // scope 0 at $DIR/simplify_locals.rs:+2:13: +2:17
+-         StorageDead(_1);                 // scope 0 at $DIR/simplify_locals.rs:+2:17: +2:18
+          _0 = const ();                   // scope 0 at $DIR/simplify_locals.rs:+0:9: +3:2
+          return;                          // scope 0 at $DIR/simplify_locals.rs:+3:2: +3:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify_locals.d2.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.d2.SimplifyLocals.diff
index 6a89e45843b..db5ab182d6f 100644
--- a/src/test/mir-opt/simplify_locals.d2.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.d2.SimplifyLocals.diff
@@ -2,28 +2,28 @@
 + // MIR for `d2` after SimplifyLocals
   
   fn d2() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals.rs:+0:9: +0:9
--     let mut _1: E;                       // in scope 0 at $DIR/simplify-locals.rs:+2:22: +2:26
--     let mut _2: (i32, E);                // in scope 0 at $DIR/simplify-locals.rs:+2:5: +2:17
--     let mut _3: E;                       // in scope 0 at $DIR/simplify-locals.rs:+2:11: +2:15
+      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals.rs:+0:9: +0:9
+-     let mut _1: E;                       // in scope 0 at $DIR/simplify_locals.rs:+2:22: +2:26
+-     let mut _2: (i32, E);                // in scope 0 at $DIR/simplify_locals.rs:+2:5: +2:17
+-     let mut _3: E;                       // in scope 0 at $DIR/simplify_locals.rs:+2:11: +2:15
   
       bb0: {
--         StorageLive(_1);                 // scope 0 at $DIR/simplify-locals.rs:+2:22: +2:26
--         Deinit(_1);                      // scope 0 at $DIR/simplify-locals.rs:+2:22: +2:26
--         discriminant(_1) = 1;            // scope 0 at $DIR/simplify-locals.rs:+2:22: +2:26
--         StorageLive(_2);                 // scope 0 at $DIR/simplify-locals.rs:+2:5: +2:17
--         StorageLive(_3);                 // scope 0 at $DIR/simplify-locals.rs:+2:11: +2:15
--         Deinit(_3);                      // scope 0 at $DIR/simplify-locals.rs:+2:11: +2:15
--         discriminant(_3) = 0;            // scope 0 at $DIR/simplify-locals.rs:+2:11: +2:15
--         Deinit(_2);                      // scope 0 at $DIR/simplify-locals.rs:+2:6: +2:16
--         (_2.0: i32) = const 10_i32;      // scope 0 at $DIR/simplify-locals.rs:+2:6: +2:16
--         (_2.1: E) = move _3;             // scope 0 at $DIR/simplify-locals.rs:+2:6: +2:16
--         StorageDead(_3);                 // scope 0 at $DIR/simplify-locals.rs:+2:15: +2:16
--         (_2.1: E) = move _1;             // scope 0 at $DIR/simplify-locals.rs:+2:5: +2:26
--         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:+2:25: +2:26
--         StorageDead(_2);                 // scope 0 at $DIR/simplify-locals.rs:+2:26: +2:27
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:+0:9: +3:2
-          return;                          // scope 0 at $DIR/simplify-locals.rs:+3:2: +3:2
+-         StorageLive(_1);                 // scope 0 at $DIR/simplify_locals.rs:+2:22: +2:26
+-         Deinit(_1);                      // scope 0 at $DIR/simplify_locals.rs:+2:22: +2:26
+-         discriminant(_1) = 1;            // scope 0 at $DIR/simplify_locals.rs:+2:22: +2:26
+-         StorageLive(_2);                 // scope 0 at $DIR/simplify_locals.rs:+2:5: +2:17
+-         StorageLive(_3);                 // scope 0 at $DIR/simplify_locals.rs:+2:11: +2:15
+-         Deinit(_3);                      // scope 0 at $DIR/simplify_locals.rs:+2:11: +2:15
+-         discriminant(_3) = 0;            // scope 0 at $DIR/simplify_locals.rs:+2:11: +2:15
+-         Deinit(_2);                      // scope 0 at $DIR/simplify_locals.rs:+2:6: +2:16
+-         (_2.0: i32) = const 10_i32;      // scope 0 at $DIR/simplify_locals.rs:+2:6: +2:16
+-         (_2.1: E) = move _3;             // scope 0 at $DIR/simplify_locals.rs:+2:6: +2:16
+-         StorageDead(_3);                 // scope 0 at $DIR/simplify_locals.rs:+2:15: +2:16
+-         (_2.1: E) = move _1;             // scope 0 at $DIR/simplify_locals.rs:+2:5: +2:26
+-         StorageDead(_1);                 // scope 0 at $DIR/simplify_locals.rs:+2:25: +2:26
+-         StorageDead(_2);                 // scope 0 at $DIR/simplify_locals.rs:+2:26: +2:27
+          _0 = const ();                   // scope 0 at $DIR/simplify_locals.rs:+0:9: +3:2
+          return;                          // scope 0 at $DIR/simplify_locals.rs:+3:2: +3:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify_locals.expose_addr.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.expose_addr.SimplifyLocals.diff
index 204a1bffc81..c707b0da07e 100644
--- a/src/test/mir-opt/simplify_locals.expose_addr.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.expose_addr.SimplifyLocals.diff
@@ -2,20 +2,20 @@
 + // MIR for `expose_addr` after SimplifyLocals
   
   fn expose_addr(_1: *const usize) -> () {
-      debug p => _1;                       // in scope 0 at $DIR/simplify-locals.rs:+0:16: +0:17
-      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals.rs:+0:33: +0:33
-      let _2: usize;                       // in scope 0 at $DIR/simplify-locals.rs:+2:5: +2:15
-      let mut _3: *const usize;            // in scope 0 at $DIR/simplify-locals.rs:+2:5: +2:6
+      debug p => _1;                       // in scope 0 at $DIR/simplify_locals.rs:+0:16: +0:17
+      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals.rs:+0:33: +0:33
+      let _2: usize;                       // in scope 0 at $DIR/simplify_locals.rs:+2:5: +2:15
+      let mut _3: *const usize;            // in scope 0 at $DIR/simplify_locals.rs:+2:5: +2:6
   
       bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/simplify-locals.rs:+2:5: +2:15
-          StorageLive(_3);                 // scope 0 at $DIR/simplify-locals.rs:+2:5: +2:6
-          _3 = _1;                         // scope 0 at $DIR/simplify-locals.rs:+2:5: +2:6
-          _2 = move _3 as usize (PointerExposeAddress); // scope 0 at $DIR/simplify-locals.rs:+2:5: +2:15
-          StorageDead(_3);                 // scope 0 at $DIR/simplify-locals.rs:+2:14: +2:15
-          StorageDead(_2);                 // scope 0 at $DIR/simplify-locals.rs:+2:15: +2:16
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:+0:33: +3:2
-          return;                          // scope 0 at $DIR/simplify-locals.rs:+3:2: +3:2
+          StorageLive(_2);                 // scope 0 at $DIR/simplify_locals.rs:+2:5: +2:15
+          StorageLive(_3);                 // scope 0 at $DIR/simplify_locals.rs:+2:5: +2:6
+          _3 = _1;                         // scope 0 at $DIR/simplify_locals.rs:+2:5: +2:6
+          _2 = move _3 as usize (PointerExposeAddress); // scope 0 at $DIR/simplify_locals.rs:+2:5: +2:15
+          StorageDead(_3);                 // scope 0 at $DIR/simplify_locals.rs:+2:14: +2:15
+          StorageDead(_2);                 // scope 0 at $DIR/simplify_locals.rs:+2:15: +2:16
+          _0 = const ();                   // scope 0 at $DIR/simplify_locals.rs:+0:33: +3:2
+          return;                          // scope 0 at $DIR/simplify_locals.rs:+3:2: +3:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify_locals.r.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.r.SimplifyLocals.diff
index 329e2a65a0d..ff6eb2cff5e 100644
--- a/src/test/mir-opt/simplify_locals.r.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.r.SimplifyLocals.diff
@@ -2,12 +2,12 @@
 + // MIR for `r` after SimplifyLocals
   
   fn r() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals.rs:+0:8: +0:8
-      let mut _1: i32;                     // in scope 0 at $DIR/simplify-locals.rs:+1:9: +1:14
--     let mut _2: &i32;                    // in scope 0 at $DIR/simplify-locals.rs:+3:13: +3:15
--     let mut _3: &mut i32;                // in scope 0 at $DIR/simplify-locals.rs:+4:13: +4:19
+      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals.rs:+0:8: +0:8
+      let mut _1: i32;                     // in scope 0 at $DIR/simplify_locals.rs:+1:9: +1:14
+-     let mut _2: &i32;                    // in scope 0 at $DIR/simplify_locals.rs:+3:13: +3:15
+-     let mut _3: &mut i32;                // in scope 0 at $DIR/simplify_locals.rs:+4:13: +4:19
       scope 1 {
-          debug a => _1;                   // in scope 1 at $DIR/simplify-locals.rs:+1:9: +1:14
+          debug a => _1;                   // in scope 1 at $DIR/simplify_locals.rs:+1:9: +1:14
           scope 2 {
               scope 3 {
               }
@@ -15,17 +15,17 @@
       }
   
       bb0: {
-          StorageLive(_1);                 // scope 0 at $DIR/simplify-locals.rs:+1:9: +1:14
-          _1 = const 1_i32;                // scope 0 at $DIR/simplify-locals.rs:+1:17: +1:18
--         StorageLive(_2);                 // scope 1 at $DIR/simplify-locals.rs:+3:13: +3:15
--         _2 = &_1;                        // scope 1 at $DIR/simplify-locals.rs:+3:13: +3:15
--         StorageDead(_2);                 // scope 1 at $DIR/simplify-locals.rs:+3:15: +3:16
--         StorageLive(_3);                 // scope 2 at $DIR/simplify-locals.rs:+4:13: +4:19
--         _3 = &mut _1;                    // scope 2 at $DIR/simplify-locals.rs:+4:13: +4:19
--         StorageDead(_3);                 // scope 2 at $DIR/simplify-locals.rs:+4:19: +4:20
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:+0:8: +5:2
-          StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:+5:1: +5:2
-          return;                          // scope 0 at $DIR/simplify-locals.rs:+5:2: +5:2
+          StorageLive(_1);                 // scope 0 at $DIR/simplify_locals.rs:+1:9: +1:14
+          _1 = const 1_i32;                // scope 0 at $DIR/simplify_locals.rs:+1:17: +1:18
+-         StorageLive(_2);                 // scope 1 at $DIR/simplify_locals.rs:+3:13: +3:15
+-         _2 = &_1;                        // scope 1 at $DIR/simplify_locals.rs:+3:13: +3:15
+-         StorageDead(_2);                 // scope 1 at $DIR/simplify_locals.rs:+3:15: +3:16
+-         StorageLive(_3);                 // scope 2 at $DIR/simplify_locals.rs:+4:13: +4:19
+-         _3 = &mut _1;                    // scope 2 at $DIR/simplify_locals.rs:+4:13: +4:19
+-         StorageDead(_3);                 // scope 2 at $DIR/simplify_locals.rs:+4:19: +4:20
+          _0 = const ();                   // scope 0 at $DIR/simplify_locals.rs:+0:8: +5:2
+          StorageDead(_1);                 // scope 0 at $DIR/simplify_locals.rs:+5:1: +5:2
+          return;                          // scope 0 at $DIR/simplify_locals.rs:+5:2: +5:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify-locals.rs b/src/test/mir-opt/simplify_locals.rs
index 89d9391f832..89d9391f832 100644
--- a/src/test/mir-opt/simplify-locals.rs
+++ b/src/test/mir-opt/simplify_locals.rs
diff --git a/src/test/mir-opt/simplify_locals.t1.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.t1.SimplifyLocals.diff
index b31156ad697..49db7747963 100644
--- a/src/test/mir-opt/simplify_locals.t1.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.t1.SimplifyLocals.diff
@@ -2,21 +2,21 @@
 + // MIR for `t1` after SimplifyLocals
   
   fn t1() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals.rs:+0:9: +0:9
--     let _1: u32;                         // in scope 0 at $DIR/simplify-locals.rs:+2:14: +2:15
--     let mut _2: *mut u32;                // in scope 0 at $DIR/simplify-locals.rs:+2:14: +2:15
+      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals.rs:+0:9: +0:9
+-     let _1: u32;                         // in scope 0 at $DIR/simplify_locals.rs:+2:14: +2:15
+-     let mut _2: *mut u32;                // in scope 0 at $DIR/simplify_locals.rs:+2:14: +2:15
       scope 1 {
       }
   
       bb0: {
--         StorageLive(_1);                 // scope 0 at $DIR/simplify-locals.rs:+2:5: +2:17
--         StorageLive(_2);                 // scope 1 at $DIR/simplify-locals.rs:+2:14: +2:15
--         _2 = &/*tls*/ mut X;             // scope 1 at $DIR/simplify-locals.rs:+2:14: +2:15
--         _1 = (*_2);                      // scope 1 at $DIR/simplify-locals.rs:+2:14: +2:15
--         StorageDead(_2);                 // scope 0 at $DIR/simplify-locals.rs:+2:17: +2:18
--         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:+2:17: +2:18
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:+0:9: +3:2
-          return;                          // scope 0 at $DIR/simplify-locals.rs:+3:2: +3:2
+-         StorageLive(_1);                 // scope 0 at $DIR/simplify_locals.rs:+2:5: +2:17
+-         StorageLive(_2);                 // scope 1 at $DIR/simplify_locals.rs:+2:14: +2:15
+-         _2 = &/*tls*/ mut X;             // scope 1 at $DIR/simplify_locals.rs:+2:14: +2:15
+-         _1 = (*_2);                      // scope 1 at $DIR/simplify_locals.rs:+2:14: +2:15
+-         StorageDead(_2);                 // scope 0 at $DIR/simplify_locals.rs:+2:17: +2:18
+-         StorageDead(_1);                 // scope 0 at $DIR/simplify_locals.rs:+2:17: +2:18
+          _0 = const ();                   // scope 0 at $DIR/simplify_locals.rs:+0:9: +3:2
+          return;                          // scope 0 at $DIR/simplify_locals.rs:+3:2: +3:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify_locals.t2.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.t2.SimplifyLocals.diff
index 66b6d8d6486..e3f4ae3701b 100644
--- a/src/test/mir-opt/simplify_locals.t2.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.t2.SimplifyLocals.diff
@@ -2,21 +2,21 @@
 + // MIR for `t2` after SimplifyLocals
   
   fn t2() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals.rs:+0:9: +0:9
--     let _1: &mut u32;                    // in scope 0 at $DIR/simplify-locals.rs:+2:14: +2:20
--     let mut _2: *mut u32;                // in scope 0 at $DIR/simplify-locals.rs:+2:19: +2:20
+      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals.rs:+0:9: +0:9
+-     let _1: &mut u32;                    // in scope 0 at $DIR/simplify_locals.rs:+2:14: +2:20
+-     let mut _2: *mut u32;                // in scope 0 at $DIR/simplify_locals.rs:+2:19: +2:20
       scope 1 {
       }
   
       bb0: {
--         StorageLive(_1);                 // scope 0 at $DIR/simplify-locals.rs:+2:5: +2:22
--         StorageLive(_2);                 // scope 1 at $DIR/simplify-locals.rs:+2:19: +2:20
--         _2 = &/*tls*/ mut X;             // scope 1 at $DIR/simplify-locals.rs:+2:19: +2:20
--         _1 = &mut (*_2);                 // scope 1 at $DIR/simplify-locals.rs:+2:14: +2:20
--         StorageDead(_2);                 // scope 0 at $DIR/simplify-locals.rs:+2:22: +2:23
--         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:+2:22: +2:23
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:+0:9: +3:2
-          return;                          // scope 0 at $DIR/simplify-locals.rs:+3:2: +3:2
+-         StorageLive(_1);                 // scope 0 at $DIR/simplify_locals.rs:+2:5: +2:22
+-         StorageLive(_2);                 // scope 1 at $DIR/simplify_locals.rs:+2:19: +2:20
+-         _2 = &/*tls*/ mut X;             // scope 1 at $DIR/simplify_locals.rs:+2:19: +2:20
+-         _1 = &mut (*_2);                 // scope 1 at $DIR/simplify_locals.rs:+2:14: +2:20
+-         StorageDead(_2);                 // scope 0 at $DIR/simplify_locals.rs:+2:22: +2:23
+-         StorageDead(_1);                 // scope 0 at $DIR/simplify_locals.rs:+2:22: +2:23
+          _0 = const ();                   // scope 0 at $DIR/simplify_locals.rs:+0:9: +3:2
+          return;                          // scope 0 at $DIR/simplify_locals.rs:+3:2: +3:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify_locals.t3.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.t3.SimplifyLocals.diff
index f6b6b78cdfb..f1ce7778e19 100644
--- a/src/test/mir-opt/simplify_locals.t3.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.t3.SimplifyLocals.diff
@@ -2,25 +2,25 @@
 + // MIR for `t3` after SimplifyLocals
   
   fn t3() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals.rs:+0:9: +0:9
--     let _1: u32;                         // in scope 0 at $DIR/simplify-locals.rs:+2:14: +2:21
--     let mut _2: &mut u32;                // in scope 0 at $DIR/simplify-locals.rs:+2:15: +2:21
--     let mut _3: *mut u32;                // in scope 0 at $DIR/simplify-locals.rs:+2:20: +2:21
+      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals.rs:+0:9: +0:9
+-     let _1: u32;                         // in scope 0 at $DIR/simplify_locals.rs:+2:14: +2:21
+-     let mut _2: &mut u32;                // in scope 0 at $DIR/simplify_locals.rs:+2:15: +2:21
+-     let mut _3: *mut u32;                // in scope 0 at $DIR/simplify_locals.rs:+2:20: +2:21
       scope 1 {
       }
   
       bb0: {
--         StorageLive(_1);                 // scope 0 at $DIR/simplify-locals.rs:+2:5: +2:23
--         StorageLive(_2);                 // scope 1 at $DIR/simplify-locals.rs:+2:15: +2:21
--         StorageLive(_3);                 // scope 1 at $DIR/simplify-locals.rs:+2:20: +2:21
--         _3 = &/*tls*/ mut X;             // scope 1 at $DIR/simplify-locals.rs:+2:20: +2:21
--         _2 = &mut (*_3);                 // scope 1 at $DIR/simplify-locals.rs:+2:15: +2:21
--         _1 = (*_2);                      // scope 1 at $DIR/simplify-locals.rs:+2:14: +2:21
--         StorageDead(_3);                 // scope 0 at $DIR/simplify-locals.rs:+2:23: +2:24
--         StorageDead(_2);                 // scope 0 at $DIR/simplify-locals.rs:+2:23: +2:24
--         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals.rs:+2:23: +2:24
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals.rs:+0:9: +3:2
-          return;                          // scope 0 at $DIR/simplify-locals.rs:+3:2: +3:2
+-         StorageLive(_1);                 // scope 0 at $DIR/simplify_locals.rs:+2:5: +2:23
+-         StorageLive(_2);                 // scope 1 at $DIR/simplify_locals.rs:+2:15: +2:21
+-         StorageLive(_3);                 // scope 1 at $DIR/simplify_locals.rs:+2:20: +2:21
+-         _3 = &/*tls*/ mut X;             // scope 1 at $DIR/simplify_locals.rs:+2:20: +2:21
+-         _2 = &mut (*_3);                 // scope 1 at $DIR/simplify_locals.rs:+2:15: +2:21
+-         _1 = (*_2);                      // scope 1 at $DIR/simplify_locals.rs:+2:14: +2:21
+-         StorageDead(_3);                 // scope 0 at $DIR/simplify_locals.rs:+2:23: +2:24
+-         StorageDead(_2);                 // scope 0 at $DIR/simplify_locals.rs:+2:23: +2:24
+-         StorageDead(_1);                 // scope 0 at $DIR/simplify_locals.rs:+2:23: +2:24
+          _0 = const ();                   // scope 0 at $DIR/simplify_locals.rs:+0:9: +3:2
+          return;                          // scope 0 at $DIR/simplify_locals.rs:+3:2: +3:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify_locals.t4.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals.t4.SimplifyLocals.diff
index 1c1da29aa67..71cf9594b9e 100644
--- a/src/test/mir-opt/simplify_locals.t4.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals.t4.SimplifyLocals.diff
@@ -2,21 +2,21 @@
 + // MIR for `t4` after SimplifyLocals
   
   fn t4() -> u32 {
-      let mut _0: u32;                     // return place in scope 0 at $DIR/simplify-locals.rs:+0:12: +0:15
-      let mut _1: u32;                     // in scope 0 at $DIR/simplify-locals.rs:+2:14: +2:15
-      let mut _2: *mut u32;                // in scope 0 at $DIR/simplify-locals.rs:+2:14: +2:15
+      let mut _0: u32;                     // return place in scope 0 at $DIR/simplify_locals.rs:+0:12: +0:15
+      let mut _1: u32;                     // in scope 0 at $DIR/simplify_locals.rs:+2:14: +2:15
+      let mut _2: *mut u32;                // in scope 0 at $DIR/simplify_locals.rs:+2:14: +2:15
       scope 1 {
       }
   
       bb0: {
-          StorageLive(_1);                 // scope 1 at $DIR/simplify-locals.rs:+2:14: +2:15
-          StorageLive(_2);                 // scope 1 at $DIR/simplify-locals.rs:+2:14: +2:15
-          _2 = &/*tls*/ mut X;             // scope 1 at $DIR/simplify-locals.rs:+2:14: +2:15
-          _1 = (*_2);                      // scope 1 at $DIR/simplify-locals.rs:+2:14: +2:15
-          _0 = Add(move _1, const 1_u32);  // scope 1 at $DIR/simplify-locals.rs:+2:14: +2:19
-          StorageDead(_1);                 // scope 1 at $DIR/simplify-locals.rs:+2:18: +2:19
-          StorageDead(_2);                 // scope 0 at $DIR/simplify-locals.rs:+3:1: +3:2
-          return;                          // scope 0 at $DIR/simplify-locals.rs:+3:2: +3:2
+          StorageLive(_1);                 // scope 1 at $DIR/simplify_locals.rs:+2:14: +2:15
+          StorageLive(_2);                 // scope 1 at $DIR/simplify_locals.rs:+2:14: +2:15
+          _2 = &/*tls*/ mut X;             // scope 1 at $DIR/simplify_locals.rs:+2:14: +2:15
+          _1 = (*_2);                      // scope 1 at $DIR/simplify_locals.rs:+2:14: +2:15
+          _0 = Add(move _1, const 1_u32);  // scope 1 at $DIR/simplify_locals.rs:+2:14: +2:19
+          StorageDead(_1);                 // scope 1 at $DIR/simplify_locals.rs:+2:18: +2:19
+          StorageDead(_2);                 // scope 0 at $DIR/simplify_locals.rs:+3:1: +3:2
+          return;                          // scope 0 at $DIR/simplify_locals.rs:+3:2: +3:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff
index ac7a47ba58f..8feddcef2ce 100644
--- a/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals_fixedpoint.foo.SimplifyLocals.diff
@@ -2,61 +2,61 @@
 + // MIR for `foo` after SimplifyLocals
   
   fn foo() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals-fixedpoint.rs:+0:13: +0:13
-      let mut _1: (std::option::Option<u8>, std::option::Option<T>); // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:+1:30: +1:69
-      let mut _2: std::option::Option<u8>; // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:+1:31: +1:49
-      let mut _3: std::option::Option<T>;  // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:+1:51: +1:68
-      let mut _4: isize;                   // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:+1:22: +1:26
-      let mut _5: isize;                   // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:+1:13: +1:20
--     let mut _7: bool;                    // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:+2:12: +2:20
--     let mut _8: u8;                      // in scope 0 at $DIR/simplify-locals-fixedpoint.rs:+2:12: +2:13
+      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals_fixedpoint.rs:+0:13: +0:13
+      let mut _1: (std::option::Option<u8>, std::option::Option<T>); // in scope 0 at $DIR/simplify_locals_fixedpoint.rs:+1:30: +1:69
+      let mut _2: std::option::Option<u8>; // in scope 0 at $DIR/simplify_locals_fixedpoint.rs:+1:31: +1:49
+      let mut _3: std::option::Option<T>;  // in scope 0 at $DIR/simplify_locals_fixedpoint.rs:+1:51: +1:68
+      let mut _4: isize;                   // in scope 0 at $DIR/simplify_locals_fixedpoint.rs:+1:22: +1:26
+      let mut _5: isize;                   // in scope 0 at $DIR/simplify_locals_fixedpoint.rs:+1:13: +1:20
+-     let mut _7: bool;                    // in scope 0 at $DIR/simplify_locals_fixedpoint.rs:+2:12: +2:20
+-     let mut _8: u8;                      // in scope 0 at $DIR/simplify_locals_fixedpoint.rs:+2:12: +2:13
       scope 1 {
-          debug a => _6;                   // in scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:18: +1:19
-          let _6: u8;                      // in scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:18: +1:19
+          debug a => _6;                   // in scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:18: +1:19
+          let _6: u8;                      // in scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:18: +1:19
       }
   
       bb0: {
-          StorageLive(_1);                 // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:30: +1:69
-          StorageLive(_2);                 // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:31: +1:49
-          Deinit(_2);                      // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:31: +1:49
-          discriminant(_2) = 0;            // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:31: +1:49
-          StorageLive(_3);                 // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:51: +1:68
-          Deinit(_3);                      // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:51: +1:68
-          discriminant(_3) = 0;            // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:51: +1:68
-          Deinit(_1);                      // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:30: +1:69
-          (_1.0: std::option::Option<u8>) = move _2; // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:30: +1:69
-          (_1.1: std::option::Option<T>) = move _3; // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:30: +1:69
-          StorageDead(_3);                 // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:68: +1:69
-          StorageDead(_2);                 // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:68: +1:69
-          _5 = discriminant((_1.0: std::option::Option<u8>)); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:12: +1:27
-          switchInt(move _5) -> [1_isize: bb1, otherwise: bb3]; // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:12: +1:27
+          StorageLive(_1);                 // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:30: +1:69
+          StorageLive(_2);                 // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:31: +1:49
+          Deinit(_2);                      // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:31: +1:49
+          discriminant(_2) = 0;            // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:31: +1:49
+          StorageLive(_3);                 // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:51: +1:68
+          Deinit(_3);                      // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:51: +1:68
+          discriminant(_3) = 0;            // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:51: +1:68
+          Deinit(_1);                      // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:30: +1:69
+          (_1.0: std::option::Option<u8>) = move _2; // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:30: +1:69
+          (_1.1: std::option::Option<T>) = move _3; // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:30: +1:69
+          StorageDead(_3);                 // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:68: +1:69
+          StorageDead(_2);                 // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:68: +1:69
+          _5 = discriminant((_1.0: std::option::Option<u8>)); // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:12: +1:27
+          switchInt(move _5) -> [1_isize: bb1, otherwise: bb3]; // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:12: +1:27
       }
   
       bb1: {
-          _4 = discriminant((_1.1: std::option::Option<T>)); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:12: +1:27
-          switchInt(move _4) -> [0_isize: bb2, otherwise: bb3]; // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:12: +1:27
+          _4 = discriminant((_1.1: std::option::Option<T>)); // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:12: +1:27
+          switchInt(move _4) -> [0_isize: bb2, otherwise: bb3]; // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:12: +1:27
       }
   
       bb2: {
-          StorageLive(_6);                 // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:18: +1:19
-          _6 = (((_1.0: std::option::Option<u8>) as Some).0: u8); // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+1:18: +1:19
--         StorageLive(_7);                 // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+2:12: +2:20
--         StorageLive(_8);                 // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+2:12: +2:13
--         _8 = _6;                         // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+2:12: +2:13
--         _7 = Gt(move _8, const 42_u8);   // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+2:12: +2:20
--         StorageDead(_8);                 // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+2:19: +2:20
--         StorageDead(_7);                 // scope 1 at $DIR/simplify-locals-fixedpoint.rs:+4:9: +4:10
-          StorageDead(_6);                 // scope 0 at $DIR/simplify-locals-fixedpoint.rs:+5:5: +5:6
-          goto -> bb3;                     // scope 0 at $DIR/simplify-locals-fixedpoint.rs:+1:5: +5:6
+          StorageLive(_6);                 // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:18: +1:19
+          _6 = (((_1.0: std::option::Option<u8>) as Some).0: u8); // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+1:18: +1:19
+-         StorageLive(_7);                 // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+2:12: +2:20
+-         StorageLive(_8);                 // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+2:12: +2:13
+-         _8 = _6;                         // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+2:12: +2:13
+-         _7 = Gt(move _8, const 42_u8);   // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+2:12: +2:20
+-         StorageDead(_8);                 // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+2:19: +2:20
+-         StorageDead(_7);                 // scope 1 at $DIR/simplify_locals_fixedpoint.rs:+4:9: +4:10
+          StorageDead(_6);                 // scope 0 at $DIR/simplify_locals_fixedpoint.rs:+5:5: +5:6
+          goto -> bb3;                     // scope 0 at $DIR/simplify_locals_fixedpoint.rs:+1:5: +5:6
       }
   
       bb3: {
-          drop(_1) -> bb4;                 // scope 0 at $DIR/simplify-locals-fixedpoint.rs:+6:1: +6:2
+          drop(_1) -> bb4;                 // scope 0 at $DIR/simplify_locals_fixedpoint.rs:+6:1: +6:2
       }
   
       bb4: {
-          StorageDead(_1);                 // scope 0 at $DIR/simplify-locals-fixedpoint.rs:+6:1: +6:2
-          return;                          // scope 0 at $DIR/simplify-locals-fixedpoint.rs:+6:2: +6:2
+          StorageDead(_1);                 // scope 0 at $DIR/simplify_locals_fixedpoint.rs:+6:1: +6:2
+          return;                          // scope 0 at $DIR/simplify_locals_fixedpoint.rs:+6:2: +6:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify-locals-fixedpoint.rs b/src/test/mir-opt/simplify_locals_fixedpoint.rs
index 78b1f9f55e5..78b1f9f55e5 100644
--- a/src/test/mir-opt/simplify-locals-fixedpoint.rs
+++ b/src/test/mir-opt/simplify_locals_fixedpoint.rs
diff --git a/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff
index b41527ba02d..78272272b07 100644
--- a/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals_removes_unused_consts.main.SimplifyLocals.diff
@@ -2,108 +2,108 @@
 + // MIR for `main` after SimplifyLocals
   
   fn main() -> () {
-      let mut _0: ();                      // return place in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+0:11: +0:11
--     let mut _1: ((), ());                // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:20: +1:28
--     let mut _2: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:21: +1:23
--     let mut _3: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:25: +1:27
--     let _4: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+2:5: +2:22
--     let mut _5: ((), ());                // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+2:13: +2:21
--     let mut _6: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+2:14: +2:16
--     let mut _7: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+2:18: +2:20
--     let _8: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+4:5: +4:35
--     let mut _9: u8;                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:34
--     let mut _10: u8;                     // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:30
--     let mut _11: Temp;                   // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:28
-+     let _1: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+2:5: +2:22
-+     let mut _2: ((), ());                // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+2:13: +2:21
-+     let mut _3: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+2:14: +2:16
-+     let mut _4: ();                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+2:18: +2:20
-+     let _5: ();                          // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+4:5: +4:35
-+     let mut _6: u8;                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:34
-+     let mut _7: u8;                      // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:30
-+     let mut _8: Temp;                    // in scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:28
+      let mut _0: ();                      // return place in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+0:11: +0:11
+-     let mut _1: ((), ());                // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:20: +1:28
+-     let mut _2: ();                      // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:21: +1:23
+-     let mut _3: ();                      // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:25: +1:27
+-     let _4: ();                          // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+2:5: +2:22
+-     let mut _5: ((), ());                // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+2:13: +2:21
+-     let mut _6: ();                      // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+2:14: +2:16
+-     let mut _7: ();                      // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+2:18: +2:20
+-     let _8: ();                          // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+4:5: +4:35
+-     let mut _9: u8;                      // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:34
+-     let mut _10: u8;                     // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:30
+-     let mut _11: Temp;                   // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:28
++     let _1: ();                          // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+2:5: +2:22
++     let mut _2: ((), ());                // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+2:13: +2:21
++     let mut _3: ();                      // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+2:14: +2:16
++     let mut _4: ();                      // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+2:18: +2:20
++     let _5: ();                          // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+4:5: +4:35
++     let mut _6: u8;                      // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:34
++     let mut _7: u8;                      // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:30
++     let mut _8: Temp;                    // in scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:28
       scope 1 {
       }
   
       bb0: {
--         StorageLive(_1);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:20: +1:28
--         StorageLive(_2);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:21: +1:23
--         Deinit(_2);                      // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:21: +1:23
--         StorageLive(_3);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:25: +1:27
--         Deinit(_3);                      // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:25: +1:27
--         Deinit(_1);                      // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:20: +1:28
--         (_1.0: ()) = move _2;            // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:20: +1:28
--         (_1.1: ()) = move _3;            // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:20: +1:28
--         StorageDead(_3);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:27: +1:28
--         StorageDead(_2);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:27: +1:28
--         StorageDead(_1);                 // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+1:28: +1:29
--         StorageLive(_4);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:5: +2:22
--         StorageLive(_5);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:13: +2:21
--         StorageLive(_6);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:14: +2:16
--         Deinit(_6);                      // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:14: +2:16
--         StorageLive(_7);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:18: +2:20
--         Deinit(_7);                      // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:18: +2:20
--         Deinit(_5);                      // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:13: +2:21
--         (_5.0: ()) = move _6;            // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:13: +2:21
--         (_5.1: ()) = move _7;            // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:13: +2:21
--         StorageDead(_7);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:20: +2:21
--         StorageDead(_6);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:20: +2:21
--         _4 = use_zst(move _5) -> bb1;    // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:5: +2:22
-+         StorageLive(_1);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:5: +2:22
-+         StorageLive(_2);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:13: +2:21
-+         StorageLive(_3);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:14: +2:16
-+         Deinit(_3);                      // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:14: +2:16
-+         StorageLive(_4);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:18: +2:20
-+         Deinit(_4);                      // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:18: +2:20
-+         Deinit(_2);                      // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:13: +2:21
-+         (_2.0: ()) = move _3;            // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:13: +2:21
-+         (_2.1: ()) = move _4;            // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:13: +2:21
-+         StorageDead(_4);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:20: +2:21
-+         StorageDead(_3);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:20: +2:21
-+         _1 = use_zst(move _2) -> bb1;    // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:5: +2:22
+-         StorageLive(_1);                 // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:20: +1:28
+-         StorageLive(_2);                 // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:21: +1:23
+-         Deinit(_2);                      // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:21: +1:23
+-         StorageLive(_3);                 // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:25: +1:27
+-         Deinit(_3);                      // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:25: +1:27
+-         Deinit(_1);                      // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:20: +1:28
+-         (_1.0: ()) = move _2;            // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:20: +1:28
+-         (_1.1: ()) = move _3;            // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:20: +1:28
+-         StorageDead(_3);                 // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:27: +1:28
+-         StorageDead(_2);                 // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:27: +1:28
+-         StorageDead(_1);                 // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+1:28: +1:29
+-         StorageLive(_4);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:5: +2:22
+-         StorageLive(_5);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:13: +2:21
+-         StorageLive(_6);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:14: +2:16
+-         Deinit(_6);                      // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:14: +2:16
+-         StorageLive(_7);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:18: +2:20
+-         Deinit(_7);                      // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:18: +2:20
+-         Deinit(_5);                      // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:13: +2:21
+-         (_5.0: ()) = move _6;            // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:13: +2:21
+-         (_5.1: ()) = move _7;            // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:13: +2:21
+-         StorageDead(_7);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:20: +2:21
+-         StorageDead(_6);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:20: +2:21
+-         _4 = use_zst(move _5) -> bb1;    // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:5: +2:22
++         StorageLive(_1);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:5: +2:22
++         StorageLive(_2);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:13: +2:21
++         StorageLive(_3);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:14: +2:16
++         Deinit(_3);                      // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:14: +2:16
++         StorageLive(_4);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:18: +2:20
++         Deinit(_4);                      // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:18: +2:20
++         Deinit(_2);                      // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:13: +2:21
++         (_2.0: ()) = move _3;            // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:13: +2:21
++         (_2.1: ()) = move _4;            // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:13: +2:21
++         StorageDead(_4);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:20: +2:21
++         StorageDead(_3);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:20: +2:21
++         _1 = use_zst(move _2) -> bb1;    // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:5: +2:22
                                            // mir::Constant
-                                           // + span: $DIR/simplify-locals-removes-unused-consts.rs:15:5: 15:12
+                                           // + span: $DIR/simplify_locals_removes_unused_consts.rs:15:5: 15:12
                                            // + literal: Const { ty: fn(((), ())) {use_zst}, val: Value(<ZST>) }
       }
   
       bb1: {
--         StorageDead(_5);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:21: +2:22
--         StorageDead(_4);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:22: +2:23
--         StorageLive(_8);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:5: +4:35
--         StorageLive(_9);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:34
--         StorageLive(_10);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:30
--         StorageLive(_11);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:28
--         Deinit(_11);                     // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:28
--         (_11.0: u8) = const 40_u8;       // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:28
--         _10 = (_11.0: u8);               // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:30
--         _9 = Add(move _10, const 2_u8);  // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:34
--         StorageDead(_10);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:33: +4:34
--         _8 = use_u8(move _9) -> bb2;     // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:5: +4:35
-+         StorageDead(_2);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:21: +2:22
-+         StorageDead(_1);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+2:22: +2:23
-+         StorageLive(_5);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:5: +4:35
-+         StorageLive(_6);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:34
-+         StorageLive(_7);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:30
-+         StorageLive(_8);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:28
-+         Deinit(_8);                      // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:28
-+         (_8.0: u8) = const 40_u8;        // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:28
-+         _7 = (_8.0: u8);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:30
-+         _6 = Add(move _7, const 2_u8);   // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:12: +4:34
-+         StorageDead(_7);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:33: +4:34
-+         _5 = use_u8(move _6) -> bb2;     // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:5: +4:35
+-         StorageDead(_5);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:21: +2:22
+-         StorageDead(_4);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:22: +2:23
+-         StorageLive(_8);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:5: +4:35
+-         StorageLive(_9);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:34
+-         StorageLive(_10);                // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:30
+-         StorageLive(_11);                // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:28
+-         Deinit(_11);                     // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:28
+-         (_11.0: u8) = const 40_u8;       // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:28
+-         _10 = (_11.0: u8);               // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:30
+-         _9 = Add(move _10, const 2_u8);  // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:34
+-         StorageDead(_10);                // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:33: +4:34
+-         _8 = use_u8(move _9) -> bb2;     // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:5: +4:35
++         StorageDead(_2);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:21: +2:22
++         StorageDead(_1);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+2:22: +2:23
++         StorageLive(_5);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:5: +4:35
++         StorageLive(_6);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:34
++         StorageLive(_7);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:30
++         StorageLive(_8);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:28
++         Deinit(_8);                      // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:28
++         (_8.0: u8) = const 40_u8;        // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:28
++         _7 = (_8.0: u8);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:30
++         _6 = Add(move _7, const 2_u8);   // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:12: +4:34
++         StorageDead(_7);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:33: +4:34
++         _5 = use_u8(move _6) -> bb2;     // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:5: +4:35
                                            // mir::Constant
-                                           // + span: $DIR/simplify-locals-removes-unused-consts.rs:17:5: 17:11
+                                           // + span: $DIR/simplify_locals_removes_unused_consts.rs:17:5: 17:11
                                            // + literal: Const { ty: fn(u8) {use_u8}, val: Value(<ZST>) }
       }
   
       bb2: {
--         StorageDead(_9);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:34: +4:35
--         StorageDead(_11);                // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:35: +4:36
-+         StorageDead(_6);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:34: +4:35
-          StorageDead(_8);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:35: +4:36
-+         StorageDead(_5);                 // scope 1 at $DIR/simplify-locals-removes-unused-consts.rs:+4:35: +4:36
-          _0 = const ();                   // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+0:11: +5:2
-          return;                          // scope 0 at $DIR/simplify-locals-removes-unused-consts.rs:+5:2: +5:2
+-         StorageDead(_9);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:34: +4:35
+-         StorageDead(_11);                // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:35: +4:36
++         StorageDead(_6);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:34: +4:35
+          StorageDead(_8);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:35: +4:36
++         StorageDead(_5);                 // scope 1 at $DIR/simplify_locals_removes_unused_consts.rs:+4:35: +4:36
+          _0 = const ();                   // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+0:11: +5:2
+          return;                          // scope 0 at $DIR/simplify_locals_removes_unused_consts.rs:+5:2: +5:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify-locals-removes-unused-consts.rs b/src/test/mir-opt/simplify_locals_removes_unused_consts.rs
index 39b7911d4ae..39b7911d4ae 100644
--- a/src/test/mir-opt/simplify-locals-removes-unused-consts.rs
+++ b/src/test/mir-opt/simplify_locals_removes_unused_consts.rs
diff --git a/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff
index 51d26b08b2a..6e7294003af 100644
--- a/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff
+++ b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.map.SimplifyLocals.diff
@@ -2,51 +2,51 @@
 + // MIR for `map` after SimplifyLocals
   
   fn map(_1: Option<Box<()>>) -> Option<Box<()>> {
-      debug x => _1;                       // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+0:8: +0:9
-      let mut _0: std::option::Option<std::boxed::Box<()>>; // return place in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+0:31: +0:46
-      let mut _2: isize;                   // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+2:9: +2:13
-      let _3: std::boxed::Box<()>;         // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:14: +3:15
-      let mut _4: std::boxed::Box<()>;     // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:25: +3:26
--     let mut _5: bool;                    // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+5:1: +5:2
--     let mut _6: isize;                   // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+5:1: +5:2
--     let mut _7: isize;                   // in scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+5:1: +5:2
+      debug x => _1;                       // in scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+0:8: +0:9
+      let mut _0: std::option::Option<std::boxed::Box<()>>; // return place in scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+0:31: +0:46
+      let mut _2: isize;                   // in scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+2:9: +2:13
+      let _3: std::boxed::Box<()>;         // in scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:14: +3:15
+      let mut _4: std::boxed::Box<()>;     // in scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:25: +3:26
+-     let mut _5: bool;                    // in scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+5:1: +5:2
+-     let mut _6: isize;                   // in scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+5:1: +5:2
+-     let mut _7: isize;                   // in scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+5:1: +5:2
       scope 1 {
-          debug x => _3;                   // in scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:14: +3:15
+          debug x => _3;                   // in scope 1 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:14: +3:15
       }
   
       bb0: {
--         _5 = const false;                // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+1:11: +1:12
--         _5 = const true;                 // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+1:11: +1:12
-          _2 = discriminant(_1);           // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+1:11: +1:12
-          switchInt(move _2) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+1:5: +1:12
+-         _5 = const false;                // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+1:11: +1:12
+-         _5 = const true;                 // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+1:11: +1:12
+          _2 = discriminant(_1);           // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+1:11: +1:12
+          switchInt(move _2) -> [0_isize: bb3, 1_isize: bb1, otherwise: bb2]; // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+1:5: +1:12
       }
   
       bb1: {
-          StorageLive(_3);                 // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:14: +3:15
-          _3 = move ((_1 as Some).0: std::boxed::Box<()>); // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:14: +3:15
-          StorageLive(_4);                 // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:25: +3:26
-          _4 = move _3;                    // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:25: +3:26
-          Deinit(_0);                      // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:20: +3:27
-          ((_0 as Some).0: std::boxed::Box<()>) = move _4; // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:20: +3:27
-          discriminant(_0) = 1;            // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:20: +3:27
-          StorageDead(_4);                 // scope 1 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:26: +3:27
-          StorageDead(_3);                 // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:26: +3:27
-          goto -> bb4;                     // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+3:26: +3:27
+          StorageLive(_3);                 // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:14: +3:15
+          _3 = move ((_1 as Some).0: std::boxed::Box<()>); // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:14: +3:15
+          StorageLive(_4);                 // scope 1 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:25: +3:26
+          _4 = move _3;                    // scope 1 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:25: +3:26
+          Deinit(_0);                      // scope 1 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:20: +3:27
+          ((_0 as Some).0: std::boxed::Box<()>) = move _4; // scope 1 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:20: +3:27
+          discriminant(_0) = 1;            // scope 1 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:20: +3:27
+          StorageDead(_4);                 // scope 1 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:26: +3:27
+          StorageDead(_3);                 // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:26: +3:27
+          goto -> bb4;                     // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+3:26: +3:27
       }
   
       bb2: {
-          unreachable;                     // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+1:11: +1:12
+          unreachable;                     // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+1:11: +1:12
       }
   
       bb3: {
-          Deinit(_0);                      // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+2:17: +2:21
-          discriminant(_0) = 0;            // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+2:17: +2:21
-          goto -> bb4;                     // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+2:17: +2:21
+          Deinit(_0);                      // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+2:17: +2:21
+          discriminant(_0) = 0;            // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+2:17: +2:21
+          goto -> bb4;                     // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+2:17: +2:21
       }
   
       bb4: {
--         _6 = discriminant(_1);           // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+5:1: +5:2
-          return;                          // scope 0 at $DIR/simplify-locals-removes-unused-discriminant-reads.rs:+5:2: +5:2
+-         _6 = discriminant(_1);           // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+5:1: +5:2
+          return;                          // scope 0 at $DIR/simplify_locals_removes_unused_discriminant_reads.rs:+5:2: +5:2
       }
   }
   
diff --git a/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads.rs b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
index d09bd92c4e8..d09bd92c4e8 100644
--- a/src/test/mir-opt/simplify-locals-removes-unused-discriminant-reads.rs
+++ b/src/test/mir-opt/simplify_locals_removes_unused_discriminant_reads.rs
diff --git a/src/test/mir-opt/simplify_try.try_identity.DestinationPropagation.diff b/src/test/mir-opt/simplify_try.try_identity.DestinationPropagation.diff
deleted file mode 100644
index 83b91309be3..00000000000
--- a/src/test/mir-opt/simplify_try.try_identity.DestinationPropagation.diff
+++ /dev/null
@@ -1,106 +0,0 @@
-- // MIR for `try_identity` before DestinationPropagation
-+ // MIR for `try_identity` after DestinationPropagation
-  
-  fn try_identity(_1: Result<u32, i32>) -> Result<u32, i32> {
-      debug x => _1;                       // in scope 0 at $DIR/simplify_try.rs:+0:17: +0:18
-      let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:+0:41: +0:57
-      let _2: u32;                         // in scope 0 at $DIR/simplify_try.rs:+1:9: +1:10
-      let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-      let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
-      let mut _5: isize;                   // in scope 0 at $DIR/simplify_try.rs:+2:9: +2:15
-      let _6: i32;                         // in scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
-      let mut _7: !;                       // in scope 0 at $DIR/simplify_try.rs:+2:19: +2:51
-      let mut _8: i32;                     // in scope 0 at $DIR/simplify_try.rs:+2:37: +2:50
-      let mut _9: i32;                     // in scope 0 at $DIR/simplify_try.rs:+2:48: +2:49
-      let _10: u32;                        // in scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
-      let mut _11: u32;                    // in scope 0 at $DIR/simplify_try.rs:+5:8: +5:9
-      scope 1 {
--         debug y => _2;                   // in scope 1 at $DIR/simplify_try.rs:+1:9: +1:10
-+         debug y => ((_0 as Ok).0: u32);  // in scope 1 at $DIR/simplify_try.rs:+1:9: +1:10
-      }
-      scope 2 {
-          debug e => _6;                   // in scope 2 at $DIR/simplify_try.rs:+2:13: +2:14
-          scope 5 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:22:37: 22:50
-              debug t => _9;               // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-          }
-          scope 6 (inlined from_error::<u32, i32>) { // at $DIR/simplify_try.rs:22:26: 22:51
-              debug e => _8;               // in scope 6 at $DIR/simplify_try.rs:12:21: 12:22
-          }
-      }
-      scope 3 {
--         debug v => _10;                  // in scope 3 at $DIR/simplify_try.rs:+3:12: +3:13
-+         debug v => ((_0 as Ok).0: u32);  // in scope 3 at $DIR/simplify_try.rs:+3:12: +3:13
-      }
-      scope 4 (inlined into_result::<u32, i32>) { // at $DIR/simplify_try.rs:21:19: 21:33
--         debug r => _4;                   // in scope 4 at $DIR/simplify_try.rs:8:22: 8:23
-+         debug r => _3;                   // in scope 4 at $DIR/simplify_try.rs:8:22: 8:23
-      }
-  
-      bb0: {
--         StorageLive(_2);                 // scope 0 at $DIR/simplify_try.rs:+1:9: +1:10
--         StorageLive(_3);                 // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
--         StorageLive(_4);                 // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
--         _4 = _1;                         // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
--         _3 = move _4;                    // scope 4 at $DIR/simplify_try.rs:9:5: 9:6
--         StorageDead(_4);                 // scope 0 at $DIR/simplify_try.rs:+1:32: +1:33
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:+1:9: +1:10
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
-+         _3 = _1;                         // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
-+         nop;                             // scope 4 at $DIR/simplify_try.rs:9:5: 9:6
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:+1:32: +1:33
-          _5 = discriminant(_3);           // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-          switchInt(move _5) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify_try.rs:+1:13: +1:33
-      }
-  
-      bb1: {
--         StorageLive(_10);                // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
--         _10 = ((_3 as Ok).0: u32);       // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
--         _2 = _10;                        // scope 3 at $DIR/simplify_try.rs:+3:18: +3:19
--         StorageDead(_10);                // scope 0 at $DIR/simplify_try.rs:+3:18: +3:19
--         StorageDead(_3);                 // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
--         StorageLive(_11);                // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
--         _11 = _2;                        // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
-+         ((_0 as Ok).0: u32) = ((_3 as Ok).0: u32); // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
-+         nop;                             // scope 3 at $DIR/simplify_try.rs:+3:18: +3:19
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:+3:18: +3:19
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
-+         nop;                             // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
-+         nop;                             // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
-          Deinit(_0);                      // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
--         ((_0 as Ok).0: u32) = move _11;  // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
-+         nop;                             // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
-          discriminant(_0) = 0;            // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
--         StorageDead(_11);                // scope 1 at $DIR/simplify_try.rs:+5:9: +5:10
--         StorageDead(_2);                 // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
-+         nop;                             // scope 1 at $DIR/simplify_try.rs:+5:9: +5:10
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
-          return;                          // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
-      }
-  
-      bb2: {
-          unreachable;                     // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-      }
-  
-      bb3: {
-          StorageLive(_6);                 // scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
-          nop;                             // scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
-          StorageLive(_8);                 // scope 2 at $DIR/simplify_try.rs:+2:37: +2:50
-          StorageLive(_9);                 // scope 2 at $DIR/simplify_try.rs:+2:48: +2:49
-          nop;                             // scope 2 at $DIR/simplify_try.rs:+2:48: +2:49
-          nop;                             // scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-          StorageDead(_9);                 // scope 2 at $DIR/simplify_try.rs:+2:49: +2:50
-          nop;                             // scope 6 at $DIR/simplify_try.rs:13:9: 13:10
-          Deinit(_0);                      // scope 6 at $DIR/simplify_try.rs:13:5: 13:11
-          discriminant(_0) = 1;            // scope 6 at $DIR/simplify_try.rs:13:5: 13:11
-          StorageDead(_8);                 // scope 2 at $DIR/simplify_try.rs:+2:50: +2:51
-          StorageDead(_6);                 // scope 0 at $DIR/simplify_try.rs:+2:50: +2:51
--         StorageDead(_3);                 // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
--         StorageDead(_2);                 // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
-+         nop;                             // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
-          return;                          // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
-      }
-  }
-  
diff --git a/src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff b/src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff
deleted file mode 100644
index e025ae7c551..00000000000
--- a/src/test/mir-opt/simplify_try.try_identity.SimplifyArmIdentity.diff
+++ /dev/null
@@ -1,85 +0,0 @@
-- // MIR for `try_identity` before SimplifyArmIdentity
-+ // MIR for `try_identity` after SimplifyArmIdentity
-  
-  fn try_identity(_1: Result<u32, i32>) -> Result<u32, i32> {
-      debug x => _1;                       // in scope 0 at $DIR/simplify_try.rs:+0:17: +0:18
-      let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:+0:41: +0:57
-      let _2: u32;                         // in scope 0 at $DIR/simplify_try.rs:+1:9: +1:10
-      let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-      let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
-      let mut _5: isize;                   // in scope 0 at $DIR/simplify_try.rs:+2:9: +2:15
-      let _6: i32;                         // in scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
-      let mut _7: !;                       // in scope 0 at $DIR/simplify_try.rs:+2:19: +2:51
-      let mut _8: i32;                     // in scope 0 at $DIR/simplify_try.rs:+2:37: +2:50
-      let mut _9: i32;                     // in scope 0 at $DIR/simplify_try.rs:+2:48: +2:49
-      let _10: u32;                        // in scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
-      let mut _11: u32;                    // in scope 0 at $DIR/simplify_try.rs:+5:8: +5:9
-      scope 1 {
-          debug y => _2;                   // in scope 1 at $DIR/simplify_try.rs:+1:9: +1:10
-      }
-      scope 2 {
-          debug e => _6;                   // in scope 2 at $DIR/simplify_try.rs:+2:13: +2:14
-          scope 5 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:22:37: 22:50
-              debug t => _9;               // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-          }
-          scope 6 (inlined from_error::<u32, i32>) { // at $DIR/simplify_try.rs:22:26: 22:51
-              debug e => _8;               // in scope 6 at $DIR/simplify_try.rs:12:21: 12:22
-          }
-      }
-      scope 3 {
-          debug v => _10;                  // in scope 3 at $DIR/simplify_try.rs:+3:12: +3:13
-      }
-      scope 4 (inlined into_result::<u32, i32>) { // at $DIR/simplify_try.rs:21:19: 21:33
-          debug r => _4;                   // in scope 4 at $DIR/simplify_try.rs:8:22: 8:23
-      }
-  
-      bb0: {
-          StorageLive(_2);                 // scope 0 at $DIR/simplify_try.rs:+1:9: +1:10
-          StorageLive(_3);                 // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-          StorageLive(_4);                 // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
-          _4 = _1;                         // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
-          _3 = move _4;                    // scope 4 at $DIR/simplify_try.rs:9:5: 9:6
-          StorageDead(_4);                 // scope 0 at $DIR/simplify_try.rs:+1:32: +1:33
-          _5 = discriminant(_3);           // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-          switchInt(move _5) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify_try.rs:+1:13: +1:33
-      }
-  
-      bb1: {
-          StorageLive(_10);                // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
-          _10 = ((_3 as Ok).0: u32);       // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
-          _2 = _10;                        // scope 3 at $DIR/simplify_try.rs:+3:18: +3:19
-          StorageDead(_10);                // scope 0 at $DIR/simplify_try.rs:+3:18: +3:19
-          StorageDead(_3);                 // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
-          StorageLive(_11);                // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
-          _11 = _2;                        // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
-          Deinit(_0);                      // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
-          ((_0 as Ok).0: u32) = move _11;  // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
-          discriminant(_0) = 0;            // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
-          StorageDead(_11);                // scope 1 at $DIR/simplify_try.rs:+5:9: +5:10
-          StorageDead(_2);                 // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
-          return;                          // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
-      }
-  
-      bb2: {
-          unreachable;                     // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-      }
-  
-      bb3: {
-          StorageLive(_6);                 // scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
-          _6 = ((_3 as Err).0: i32);       // scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
-          StorageLive(_8);                 // scope 2 at $DIR/simplify_try.rs:+2:37: +2:50
-          StorageLive(_9);                 // scope 2 at $DIR/simplify_try.rs:+2:48: +2:49
-          _9 = _6;                         // scope 2 at $DIR/simplify_try.rs:+2:48: +2:49
-          _8 = move _9;                    // scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-          StorageDead(_9);                 // scope 2 at $DIR/simplify_try.rs:+2:49: +2:50
-          ((_0 as Err).0: i32) = move _8;  // scope 6 at $DIR/simplify_try.rs:13:9: 13:10
-          Deinit(_0);                      // scope 6 at $DIR/simplify_try.rs:13:5: 13:11
-          discriminant(_0) = 1;            // scope 6 at $DIR/simplify_try.rs:13:5: 13:11
-          StorageDead(_8);                 // scope 2 at $DIR/simplify_try.rs:+2:50: +2:51
-          StorageDead(_6);                 // scope 0 at $DIR/simplify_try.rs:+2:50: +2:51
-          StorageDead(_3);                 // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
-          StorageDead(_2);                 // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
-          return;                          // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
-      }
-  }
-  
diff --git a/src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir b/src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir
deleted file mode 100644
index eb5af2227ec..00000000000
--- a/src/test/mir-opt/simplify_try.try_identity.SimplifyBranchSame.after.mir
+++ /dev/null
@@ -1,83 +0,0 @@
-// MIR for `try_identity` after SimplifyBranchSame
-
-fn try_identity(_1: Result<u32, i32>) -> Result<u32, i32> {
-    debug x => _1;                       // in scope 0 at $DIR/simplify_try.rs:+0:17: +0:18
-    let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:+0:41: +0:57
-    let _2: u32;                         // in scope 0 at $DIR/simplify_try.rs:+1:9: +1:10
-    let mut _3: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-    let mut _4: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
-    let mut _5: isize;                   // in scope 0 at $DIR/simplify_try.rs:+2:9: +2:15
-    let _6: i32;                         // in scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
-    let mut _7: !;                       // in scope 0 at $DIR/simplify_try.rs:+2:19: +2:51
-    let mut _8: i32;                     // in scope 0 at $DIR/simplify_try.rs:+2:37: +2:50
-    let mut _9: i32;                     // in scope 0 at $DIR/simplify_try.rs:+2:48: +2:49
-    let _10: u32;                        // in scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
-    let mut _11: u32;                    // in scope 0 at $DIR/simplify_try.rs:+5:8: +5:9
-    scope 1 {
-        debug y => _2;                   // in scope 1 at $DIR/simplify_try.rs:+1:9: +1:10
-    }
-    scope 2 {
-        debug e => _6;                   // in scope 2 at $DIR/simplify_try.rs:+2:13: +2:14
-        scope 5 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:22:37: 22:50
-            debug t => _9;               // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-        }
-        scope 6 (inlined from_error::<u32, i32>) { // at $DIR/simplify_try.rs:22:26: 22:51
-            debug e => _8;               // in scope 6 at $DIR/simplify_try.rs:12:21: 12:22
-        }
-    }
-    scope 3 {
-        debug v => _10;                  // in scope 3 at $DIR/simplify_try.rs:+3:12: +3:13
-    }
-    scope 4 (inlined into_result::<u32, i32>) { // at $DIR/simplify_try.rs:21:19: 21:33
-        debug r => _4;                   // in scope 4 at $DIR/simplify_try.rs:8:22: 8:23
-    }
-
-    bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/simplify_try.rs:+1:9: +1:10
-        StorageLive(_3);                 // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-        StorageLive(_4);                 // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
-        _4 = _1;                         // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
-        _3 = move _4;                    // scope 4 at $DIR/simplify_try.rs:9:5: 9:6
-        StorageDead(_4);                 // scope 0 at $DIR/simplify_try.rs:+1:32: +1:33
-        _5 = discriminant(_3);           // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-        switchInt(move _5) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify_try.rs:+1:13: +1:33
-    }
-
-    bb1: {
-        StorageLive(_10);                // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
-        _10 = ((_3 as Ok).0: u32);       // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
-        _2 = _10;                        // scope 3 at $DIR/simplify_try.rs:+3:18: +3:19
-        StorageDead(_10);                // scope 0 at $DIR/simplify_try.rs:+3:18: +3:19
-        StorageDead(_3);                 // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
-        StorageLive(_11);                // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
-        _11 = _2;                        // scope 1 at $DIR/simplify_try.rs:+5:8: +5:9
-        Deinit(_0);                      // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
-        ((_0 as Ok).0: u32) = move _11;  // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
-        discriminant(_0) = 0;            // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
-        StorageDead(_11);                // scope 1 at $DIR/simplify_try.rs:+5:9: +5:10
-        StorageDead(_2);                 // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
-        return;                          // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
-    }
-
-    bb2: {
-        unreachable;                     // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-    }
-
-    bb3: {
-        StorageLive(_6);                 // scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
-        _6 = ((_3 as Err).0: i32);       // scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
-        StorageLive(_8);                 // scope 2 at $DIR/simplify_try.rs:+2:37: +2:50
-        StorageLive(_9);                 // scope 2 at $DIR/simplify_try.rs:+2:48: +2:49
-        _9 = _6;                         // scope 2 at $DIR/simplify_try.rs:+2:48: +2:49
-        _8 = move _9;                    // scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-        StorageDead(_9);                 // scope 2 at $DIR/simplify_try.rs:+2:49: +2:50
-        ((_0 as Err).0: i32) = move _8;  // scope 6 at $DIR/simplify_try.rs:13:9: 13:10
-        Deinit(_0);                      // scope 6 at $DIR/simplify_try.rs:13:5: 13:11
-        discriminant(_0) = 1;            // scope 6 at $DIR/simplify_try.rs:13:5: 13:11
-        StorageDead(_8);                 // scope 2 at $DIR/simplify_try.rs:+2:50: +2:51
-        StorageDead(_6);                 // scope 0 at $DIR/simplify_try.rs:+2:50: +2:51
-        StorageDead(_3);                 // scope 0 at $DIR/simplify_try.rs:+4:6: +4:7
-        StorageDead(_2);                 // scope 0 at $DIR/simplify_try.rs:+6:1: +6:2
-        return;                          // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
-    }
-}
diff --git a/src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir b/src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir
deleted file mode 100644
index 1efa8a67e5c..00000000000
--- a/src/test/mir-opt/simplify_try.try_identity.SimplifyLocals.after.mir
+++ /dev/null
@@ -1,58 +0,0 @@
-// MIR for `try_identity` after SimplifyLocals
-
-fn try_identity(_1: Result<u32, i32>) -> Result<u32, i32> {
-    debug x => _1;                       // in scope 0 at $DIR/simplify_try.rs:+0:17: +0:18
-    let mut _0: std::result::Result<u32, i32>; // return place in scope 0 at $DIR/simplify_try.rs:+0:41: +0:57
-    let mut _2: std::result::Result<u32, i32>; // in scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-    let mut _3: isize;                   // in scope 0 at $DIR/simplify_try.rs:+2:9: +2:15
-    let _4: i32;                         // in scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
-    let mut _5: i32;                     // in scope 0 at $DIR/simplify_try.rs:+2:37: +2:50
-    let mut _6: i32;                     // in scope 0 at $DIR/simplify_try.rs:+2:48: +2:49
-    scope 1 {
-        debug y => ((_0 as Ok).0: u32);  // in scope 1 at $DIR/simplify_try.rs:+1:9: +1:10
-    }
-    scope 2 {
-        debug e => _4;                   // in scope 2 at $DIR/simplify_try.rs:+2:13: +2:14
-        scope 5 (inlined <i32 as From<i32>>::from) { // at $DIR/simplify_try.rs:22:37: 22:50
-            debug t => _6;               // in scope 5 at $SRC_DIR/core/src/convert/mod.rs:LL:COL
-        }
-        scope 6 (inlined from_error::<u32, i32>) { // at $DIR/simplify_try.rs:22:26: 22:51
-            debug e => _5;               // in scope 6 at $DIR/simplify_try.rs:12:21: 12:22
-        }
-    }
-    scope 3 {
-        debug v => ((_0 as Ok).0: u32);  // in scope 3 at $DIR/simplify_try.rs:+3:12: +3:13
-    }
-    scope 4 (inlined into_result::<u32, i32>) { // at $DIR/simplify_try.rs:21:19: 21:33
-        debug r => _2;                   // in scope 4 at $DIR/simplify_try.rs:8:22: 8:23
-    }
-
-    bb0: {
-        _2 = _1;                         // scope 0 at $DIR/simplify_try.rs:+1:31: +1:32
-        _3 = discriminant(_2);           // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-        switchInt(move _3) -> [0_isize: bb1, 1_isize: bb3, otherwise: bb2]; // scope 0 at $DIR/simplify_try.rs:+1:13: +1:33
-    }
-
-    bb1: {
-        ((_0 as Ok).0: u32) = ((_2 as Ok).0: u32); // scope 0 at $DIR/simplify_try.rs:+3:12: +3:13
-        Deinit(_0);                      // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
-        discriminant(_0) = 0;            // scope 1 at $DIR/simplify_try.rs:+5:5: +5:10
-        return;                          // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
-    }
-
-    bb2: {
-        unreachable;                     // scope 0 at $DIR/simplify_try.rs:+1:19: +1:33
-    }
-
-    bb3: {
-        StorageLive(_4);                 // scope 0 at $DIR/simplify_try.rs:+2:13: +2:14
-        StorageLive(_5);                 // scope 2 at $DIR/simplify_try.rs:+2:37: +2:50
-        StorageLive(_6);                 // scope 2 at $DIR/simplify_try.rs:+2:48: +2:49
-        StorageDead(_6);                 // scope 2 at $DIR/simplify_try.rs:+2:49: +2:50
-        Deinit(_0);                      // scope 6 at $DIR/simplify_try.rs:13:5: 13:11
-        discriminant(_0) = 1;            // scope 6 at $DIR/simplify_try.rs:13:5: 13:11
-        StorageDead(_5);                 // scope 2 at $DIR/simplify_try.rs:+2:50: +2:51
-        StorageDead(_4);                 // scope 0 at $DIR/simplify_try.rs:+2:50: +2:51
-        return;                          // scope 0 at $DIR/simplify_try.rs:+6:2: +6:2
-    }
-}
diff --git a/src/test/mir-opt/slice-drop-shim.rs b/src/test/mir-opt/slice_drop_shim.rs
index 344c1af2c91..344c1af2c91 100644
--- a/src/test/mir-opt/slice-drop-shim.rs
+++ b/src/test/mir-opt/slice_drop_shim.rs
diff --git a/src/test/mir-opt/spanview_block.main.mir_map.0.html b/src/test/mir-opt/spanview_block.main.built.after.html
index 8e5268043e7..b962d80c59e 100644
--- a/src/test/mir-opt/spanview_block.main.mir_map.0.html
+++ b/src/test/mir-opt/spanview_block.main.built.after.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>spanview_block.main.mir_map.0</title>
+<title>spanview_block.main.built.after</title>
 <style>
     .line {
         counter-increment: line;
@@ -59,7 +59,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: $DIR/spanview-block.rs:5:11: 5:13:
+<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>
 </body>
diff --git a/src/test/mir-opt/spanview-block.rs b/src/test/mir-opt/spanview_block.rs
index fc1d6e0ede6..0ecf35ad6a2 100644
--- a/src/test/mir-opt/spanview-block.rs
+++ b/src/test/mir-opt/spanview_block.rs
@@ -1,5 +1,5 @@
 // Test spanview block output
 // compile-flags: -Z dump-mir-spanview=block
 
-// EMIT_MIR spanview_block.main.mir_map.0.html
+// EMIT_MIR spanview_block.main.built.after.html
 fn main() {}
diff --git a/src/test/mir-opt/spanview_statement.main.mir_map.0.html b/src/test/mir-opt/spanview_statement.main.built.after.html
index abbff2270b7..43bff7d096e 100644
--- a/src/test/mir-opt/spanview_statement.main.mir_map.0.html
+++ b/src/test/mir-opt/spanview_statement.main.built.after.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>spanview_statement.main.mir_map.0</title>
+<title>spanview_statement.main.built.after</title>
 <style>
     .line {
         counter-increment: line;
@@ -59,8 +59,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:
+<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>
 </body>
 </html>
diff --git a/src/test/mir-opt/spanview-statement.rs b/src/test/mir-opt/spanview_statement.rs
index a43ad5e71a3..457052617b7 100644
--- a/src/test/mir-opt/spanview-statement.rs
+++ b/src/test/mir-opt/spanview_statement.rs
@@ -1,5 +1,5 @@
 // Test spanview output (the default value for `-Z dump-mir-spanview` is "statement")
 // compile-flags: -Z dump-mir-spanview
 
-// EMIT_MIR spanview_statement.main.mir_map.0.html
+// EMIT_MIR spanview_statement.main.built.after.html
 fn main() {}
diff --git a/src/test/mir-opt/spanview_terminator.main.mir_map.0.html b/src/test/mir-opt/spanview_terminator.main.built.after.html
index 55fafd90b0a..aa7e44c1571 100644
--- a/src/test/mir-opt/spanview_terminator.main.mir_map.0.html
+++ b/src/test/mir-opt/spanview_terminator.main.built.after.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-<title>spanview_terminator.main.mir_map.0</title>
+<title>spanview_terminator.main.built.after</title>
 <style>
     .line {
         counter-increment: line;
@@ -59,7 +59,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:
+<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>
 </body>
 </html>
diff --git a/src/test/mir-opt/spanview-terminator.rs b/src/test/mir-opt/spanview_terminator.rs
index 92e1411eadb..76fced188f1 100644
--- a/src/test/mir-opt/spanview-terminator.rs
+++ b/src/test/mir-opt/spanview_terminator.rs
@@ -1,5 +1,5 @@
 // Test spanview terminator output
 // compile-flags: -Z dump-mir-spanview=terminator
 
-// EMIT_MIR spanview_terminator.main.mir_map.0.html
+// EMIT_MIR spanview_terminator.main.built.after.html
 fn main() {}
diff --git a/src/test/mir-opt/tls_access.main.PreCodegen.after.mir b/src/test/mir-opt/tls_access.main.PreCodegen.after.mir
index b6c36be2bbe..09453b8ba9c 100644
--- a/src/test/mir-opt/tls_access.main.PreCodegen.after.mir
+++ b/src/test/mir-opt/tls_access.main.PreCodegen.after.mir
@@ -1,28 +1,28 @@
 // MIR for `main` after PreCodegen
 
 fn main() -> () {
-    let mut _0: ();                      // return place in scope 0 at $DIR/tls-access.rs:+0:11: +0:11
-    let _2: *mut u8;                     // in scope 0 at $DIR/tls-access.rs:+2:18: +2:21
-    let mut _3: *mut u8;                 // in scope 0 at $DIR/tls-access.rs:+3:9: +3:12
+    let mut _0: ();                      // return place in scope 0 at $DIR/tls_access.rs:+0:11: +0:11
+    let _2: *mut u8;                     // in scope 0 at $DIR/tls_access.rs:+2:18: +2:21
+    let mut _3: *mut u8;                 // in scope 0 at $DIR/tls_access.rs:+3:9: +3:12
     scope 1 {
-        let _1: &u8;                     // in scope 1 at $DIR/tls-access.rs:+2:13: +2:14
+        let _1: &u8;                     // in scope 1 at $DIR/tls_access.rs:+2:13: +2:14
         scope 2 {
-            debug a => _1;               // in scope 2 at $DIR/tls-access.rs:+2:13: +2:14
+            debug a => _1;               // in scope 2 at $DIR/tls_access.rs:+2:13: +2:14
         }
     }
 
     bb0: {
-        StorageLive(_1);                 // scope 1 at $DIR/tls-access.rs:+2:13: +2:14
-        StorageLive(_2);                 // scope 1 at $DIR/tls-access.rs:+2:18: +2:21
-        _2 = &/*tls*/ mut FOO;           // scope 1 at $DIR/tls-access.rs:+2:18: +2:21
-        _1 = &(*_2);                     // scope 1 at $DIR/tls-access.rs:+2:17: +2:21
-        StorageLive(_3);                 // scope 2 at $DIR/tls-access.rs:+3:9: +3:12
-        _3 = &/*tls*/ mut FOO;           // scope 2 at $DIR/tls-access.rs:+3:9: +3:12
-        (*_3) = const 42_u8;             // scope 2 at $DIR/tls-access.rs:+3:9: +3:17
-        StorageDead(_3);                 // scope 2 at $DIR/tls-access.rs:+3:17: +3:18
-        _0 = const ();                   // scope 1 at $DIR/tls-access.rs:+1:5: +4:6
-        StorageDead(_2);                 // scope 1 at $DIR/tls-access.rs:+4:5: +4:6
-        StorageDead(_1);                 // scope 1 at $DIR/tls-access.rs:+4:5: +4:6
-        return;                          // scope 0 at $DIR/tls-access.rs:+5:2: +5:2
+        StorageLive(_1);                 // scope 1 at $DIR/tls_access.rs:+2:13: +2:14
+        StorageLive(_2);                 // scope 1 at $DIR/tls_access.rs:+2:18: +2:21
+        _2 = &/*tls*/ mut FOO;           // scope 1 at $DIR/tls_access.rs:+2:18: +2:21
+        _1 = &(*_2);                     // scope 1 at $DIR/tls_access.rs:+2:17: +2:21
+        StorageLive(_3);                 // scope 2 at $DIR/tls_access.rs:+3:9: +3:12
+        _3 = &/*tls*/ mut FOO;           // scope 2 at $DIR/tls_access.rs:+3:9: +3:12
+        (*_3) = const 42_u8;             // scope 2 at $DIR/tls_access.rs:+3:9: +3:17
+        StorageDead(_3);                 // scope 2 at $DIR/tls_access.rs:+3:17: +3:18
+        _0 = const ();                   // scope 1 at $DIR/tls_access.rs:+1:5: +4:6
+        StorageDead(_2);                 // scope 1 at $DIR/tls_access.rs:+4:5: +4:6
+        StorageDead(_1);                 // scope 1 at $DIR/tls_access.rs:+4:5: +4:6
+        return;                          // scope 0 at $DIR/tls_access.rs:+5:2: +5:2
     }
 }
diff --git a/src/test/mir-opt/tls-access.rs b/src/test/mir-opt/tls_access.rs
index 19344c86862..19344c86862 100644
--- a/src/test/mir-opt/tls-access.rs
+++ b/src/test/mir-opt/tls_access.rs
diff --git a/src/test/mir-opt/uninhabited_enum.process_never.SimplifyLocals.after.mir b/src/test/mir-opt/uninhabited_enum.process_never.SimplifyLocals.after.mir
index 6ed53643f4b..2c0fcc6621a 100644
--- a/src/test/mir-opt/uninhabited_enum.process_never.SimplifyLocals.after.mir
+++ b/src/test/mir-opt/uninhabited_enum.process_never.SimplifyLocals.after.mir
@@ -1,16 +1,16 @@
 // MIR for `process_never` after SimplifyLocals
 
 fn process_never(_1: *const !) -> () {
-    debug input => _1;                   // in scope 0 at $DIR/uninhabited-enum.rs:+0:22: +0:27
-    let mut _0: ();                      // return place in scope 0 at $DIR/uninhabited-enum.rs:+0:39: +0:39
-    let _2: &!;                          // in scope 0 at $DIR/uninhabited-enum.rs:+1:8: +1:14
+    debug input => _1;                   // in scope 0 at $DIR/uninhabited_enum.rs:+0:22: +0:27
+    let mut _0: ();                      // return place in scope 0 at $DIR/uninhabited_enum.rs:+0:39: +0:39
+    let _2: &!;                          // in scope 0 at $DIR/uninhabited_enum.rs:+1:8: +1:14
     scope 1 {
-        debug _input => _2;              // in scope 1 at $DIR/uninhabited-enum.rs:+1:8: +1:14
+        debug _input => _2;              // in scope 1 at $DIR/uninhabited_enum.rs:+1:8: +1:14
     }
     scope 2 {
     }
 
     bb0: {
-        unreachable;                     // scope 0 at $DIR/uninhabited-enum.rs:+0:39: +2:2
+        unreachable;                     // scope 0 at $DIR/uninhabited_enum.rs:+0:39: +2:2
     }
 }
diff --git a/src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir b/src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir
index bbb81724ccf..ae341a7b97b 100644
--- a/src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir
+++ b/src/test/mir-opt/uninhabited_enum.process_void.SimplifyLocals.after.mir
@@ -1,18 +1,18 @@
 // MIR for `process_void` after SimplifyLocals
 
 fn process_void(_1: *const Void) -> () {
-    debug input => _1;                   // in scope 0 at $DIR/uninhabited-enum.rs:+0:21: +0:26
-    let mut _0: ();                      // return place in scope 0 at $DIR/uninhabited-enum.rs:+0:41: +0:41
-    let _2: &Void;                       // in scope 0 at $DIR/uninhabited-enum.rs:+1:8: +1:14
+    debug input => _1;                   // in scope 0 at $DIR/uninhabited_enum.rs:+0:21: +0:26
+    let mut _0: ();                      // return place in scope 0 at $DIR/uninhabited_enum.rs:+0:41: +0:41
+    let _2: &Void;                       // in scope 0 at $DIR/uninhabited_enum.rs:+1:8: +1:14
     scope 1 {
-        debug _input => _2;              // in scope 1 at $DIR/uninhabited-enum.rs:+1:8: +1:14
+        debug _input => _2;              // in scope 1 at $DIR/uninhabited_enum.rs:+1:8: +1:14
     }
     scope 2 {
     }
 
     bb0: {
-        StorageLive(_2);                 // scope 0 at $DIR/uninhabited-enum.rs:+1:8: +1:14
-        StorageDead(_2);                 // scope 0 at $DIR/uninhabited-enum.rs:+4:1: +4:2
-        return;                          // scope 0 at $DIR/uninhabited-enum.rs:+4:2: +4:2
+        StorageLive(_2);                 // scope 0 at $DIR/uninhabited_enum.rs:+1:8: +1:14
+        StorageDead(_2);                 // scope 0 at $DIR/uninhabited_enum.rs:+4:1: +4:2
+        return;                          // scope 0 at $DIR/uninhabited_enum.rs:+4:2: +4:2
     }
 }
diff --git a/src/test/mir-opt/uninhabited-enum.rs b/src/test/mir-opt/uninhabited_enum.rs
index 97c6e8cd531..97c6e8cd531 100644
--- a/src/test/mir-opt/uninhabited-enum.rs
+++ b/src/test/mir-opt/uninhabited_enum.rs
diff --git a/src/test/mir-opt/unusual_item_types.E-V-{constant#0}.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.E-V-{constant#0}.built.after.mir
index a72e00ecde7..5257491f0d4 100644
--- a/src/test/mir-opt/unusual_item_types.E-V-{constant#0}.mir_map.0.mir
+++ b/src/test/mir-opt/unusual_item_types.E-V-{constant#0}.built.after.mir
@@ -1,10 +1,10 @@
-// MIR for `E::V::{constant#0}` 0 mir_map
+// MIR for `E::V::{constant#0}` after built
 
 E::V::{constant#0}: isize = {
-    let mut _0: isize;                   // return place in scope 0 at $DIR/unusual-item-types.rs:+0:9: +0:10
+    let mut _0: isize;                   // return place in scope 0 at $DIR/unusual_item_types.rs:+0:9: +0:10
 
     bb0: {
-        _0 = const 5_isize;              // scope 0 at $DIR/unusual-item-types.rs:+0:9: +0:10
-        return;                          // scope 0 at $DIR/unusual-item-types.rs:+0:9: +0:10
+        _0 = const 5_isize;              // scope 0 at $DIR/unusual_item_types.rs:+0:9: +0:10
+        return;                          // scope 0 at $DIR/unusual_item_types.rs:+0:9: +0:10
     }
 }
diff --git a/src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.built.after.mir
index 0686af46ed5..ee029676311 100644
--- a/src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.mir_map.0.mir
+++ b/src/test/mir-opt/unusual_item_types.Test-X-{constructor#0}.built.after.mir
@@ -1,12 +1,12 @@
-// MIR for `Test::X` 0 mir_map
+// MIR for `Test::X` after built
 
 fn Test::X(_1: usize) -> Test {
-    let mut _0: Test;                    // return place in scope 0 at $DIR/unusual-item-types.rs:+0:5: +0:6
+    let mut _0: Test;                    // return place in scope 0 at $DIR/unusual_item_types.rs:+0:5: +0:6
 
     bb0: {
-        Deinit(_0);                      // scope 0 at $DIR/unusual-item-types.rs:+0:5: +0:6
-        ((_0 as X).0: usize) = move _1;  // scope 0 at $DIR/unusual-item-types.rs:+0:5: +0:6
-        discriminant(_0) = 0;            // scope 0 at $DIR/unusual-item-types.rs:+0:5: +0:6
-        return;                          // scope 0 at $DIR/unusual-item-types.rs:+0:5: +0:6
+        Deinit(_0);                      // scope 0 at $DIR/unusual_item_types.rs:+0:5: +0:6
+        ((_0 as X).0: usize) = move _1;  // scope 0 at $DIR/unusual_item_types.rs:+0:5: +0:6
+        discriminant(_0) = 0;            // scope 0 at $DIR/unusual_item_types.rs:+0:5: +0:6
+        return;                          // scope 0 at $DIR/unusual_item_types.rs:+0:5: +0:6
     }
 }
diff --git a/src/test/mir-opt/unusual-item-types.rs b/src/test/mir-opt/unusual_item_types.rs
index 9ef3d86472d..6dad636416f 100644
--- a/src/test/mir-opt/unusual-item-types.rs
+++ b/src/test/mir-opt/unusual_item_types.rs
@@ -5,19 +5,19 @@
 
 struct A;
 
-// EMIT_MIR unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir
+// EMIT_MIR unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
 impl A {
     const ASSOCIATED_CONSTANT: i32 = 2;
 }
 
 // See #59021
-// EMIT_MIR unusual_item_types.Test-X-{constructor#0}.mir_map.0.mir
+// EMIT_MIR unusual_item_types.Test-X-{constructor#0}.built.after.mir
 enum Test {
     X(usize),
     Y { a: usize },
 }
 
-// EMIT_MIR unusual_item_types.E-V-{constant#0}.mir_map.0.mir
+// EMIT_MIR unusual_item_types.E-V-{constant#0}.built.after.mir
 enum E {
     V = 5,
 }
diff --git a/src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir b/src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
new file mode 100644
index 00000000000..90444b48122
--- /dev/null
+++ b/src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.built.after.mir
@@ -0,0 +1,10 @@
+// MIR for `<impl at $DIR/unusual_item_types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT` after built
+
+const <impl at $DIR/unusual_item_types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT: i32 = {
+    let mut _0: i32;                     // return place in scope 0 at $DIR/unusual_item_types.rs:+0:32: +0:35
+
+    bb0: {
+        _0 = const 2_i32;                // scope 0 at $DIR/unusual_item_types.rs:+0:38: +0:39
+        return;                          // scope 0 at $DIR/unusual_item_types.rs:+0:5: +0:40
+    }
+}
diff --git a/src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir b/src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir
deleted file mode 100644
index 5579d25a14f..00000000000
--- a/src/test/mir-opt/unusual_item_types.{impl#0}-ASSOCIATED_CONSTANT.mir_map.0.mir
+++ /dev/null
@@ -1,10 +0,0 @@
-// MIR for `<impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT` 0 mir_map
-
-const <impl at $DIR/unusual-item-types.rs:9:1: 9:7>::ASSOCIATED_CONSTANT: i32 = {
-    let mut _0: i32;                     // return place in scope 0 at $DIR/unusual-item-types.rs:+0:32: +0:35
-
-    bb0: {
-        _0 = const 2_i32;                // scope 0 at $DIR/unusual-item-types.rs:+0:38: +0:39
-        return;                          // scope 0 at $DIR/unusual-item-types.rs:+0:5: +0:40
-    }
-}
diff --git a/src/test/mir-opt/while-storage.rs b/src/test/mir-opt/while_storage.rs
index afd083acb34..afd083acb34 100644
--- a/src/test/mir-opt/while-storage.rs
+++ b/src/test/mir-opt/while_storage.rs
diff --git a/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir b/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir
index a5e7d6afdf3..68aa3e5db32 100644
--- a/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir
+++ b/src/test/mir-opt/while_storage.while_loop.PreCodegen.after.mir
@@ -1,56 +1,56 @@
 // MIR for `while_loop` after PreCodegen
 
 fn while_loop(_1: bool) -> () {
-    debug c => _1;                       // in scope 0 at $DIR/while-storage.rs:+0:15: +0:16
-    let mut _0: ();                      // return place in scope 0 at $DIR/while-storage.rs:+0:24: +0:24
-    let mut _2: bool;                    // in scope 0 at $DIR/while-storage.rs:+1:11: +1:22
-    let mut _3: bool;                    // in scope 0 at $DIR/while-storage.rs:+1:20: +1:21
-    let mut _4: bool;                    // in scope 0 at $DIR/while-storage.rs:+2:12: +2:23
-    let mut _5: bool;                    // in scope 0 at $DIR/while-storage.rs:+2:21: +2:22
+    debug c => _1;                       // in scope 0 at $DIR/while_storage.rs:+0:15: +0:16
+    let mut _0: ();                      // return place in scope 0 at $DIR/while_storage.rs:+0:24: +0:24
+    let mut _2: bool;                    // in scope 0 at $DIR/while_storage.rs:+1:11: +1:22
+    let mut _3: bool;                    // in scope 0 at $DIR/while_storage.rs:+1:20: +1:21
+    let mut _4: bool;                    // in scope 0 at $DIR/while_storage.rs:+2:12: +2:23
+    let mut _5: bool;                    // in scope 0 at $DIR/while_storage.rs:+2:21: +2:22
 
     bb0: {
-        goto -> bb1;                     // scope 0 at $DIR/while-storage.rs:+1:5: +5:6
+        goto -> bb1;                     // scope 0 at $DIR/while_storage.rs:+1:5: +5:6
     }
 
     bb1: {
-        StorageLive(_2);                 // scope 0 at $DIR/while-storage.rs:+1:11: +1:22
-        StorageLive(_3);                 // scope 0 at $DIR/while-storage.rs:+1:20: +1:21
-        _3 = _1;                         // scope 0 at $DIR/while-storage.rs:+1:20: +1:21
-        _2 = get_bool(move _3) -> bb2;   // scope 0 at $DIR/while-storage.rs:+1:11: +1:22
+        StorageLive(_2);                 // scope 0 at $DIR/while_storage.rs:+1:11: +1:22
+        StorageLive(_3);                 // scope 0 at $DIR/while_storage.rs:+1:20: +1:21
+        _3 = _1;                         // scope 0 at $DIR/while_storage.rs:+1:20: +1:21
+        _2 = get_bool(move _3) -> bb2;   // scope 0 at $DIR/while_storage.rs:+1:11: +1:22
                                          // mir::Constant
-                                         // + span: $DIR/while-storage.rs:10:11: 10:19
+                                         // + span: $DIR/while_storage.rs:10:11: 10:19
                                          // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(<ZST>) }
     }
 
     bb2: {
-        StorageDead(_3);                 // scope 0 at $DIR/while-storage.rs:+1:21: +1:22
-        switchInt(move _2) -> [false: bb7, otherwise: bb3]; // scope 0 at $DIR/while-storage.rs:+1:11: +1:22
+        StorageDead(_3);                 // scope 0 at $DIR/while_storage.rs:+1:21: +1:22
+        switchInt(move _2) -> [false: bb7, otherwise: bb3]; // scope 0 at $DIR/while_storage.rs:+1:11: +1:22
     }
 
     bb3: {
-        StorageLive(_4);                 // scope 0 at $DIR/while-storage.rs:+2:12: +2:23
-        StorageLive(_5);                 // scope 0 at $DIR/while-storage.rs:+2:21: +2:22
-        _5 = _1;                         // scope 0 at $DIR/while-storage.rs:+2:21: +2:22
-        _4 = get_bool(move _5) -> bb4;   // scope 0 at $DIR/while-storage.rs:+2:12: +2:23
+        StorageLive(_4);                 // scope 0 at $DIR/while_storage.rs:+2:12: +2:23
+        StorageLive(_5);                 // scope 0 at $DIR/while_storage.rs:+2:21: +2:22
+        _5 = _1;                         // scope 0 at $DIR/while_storage.rs:+2:21: +2:22
+        _4 = get_bool(move _5) -> bb4;   // scope 0 at $DIR/while_storage.rs:+2:12: +2:23
                                          // mir::Constant
-                                         // + span: $DIR/while-storage.rs:11:12: 11:20
+                                         // + span: $DIR/while_storage.rs:11:12: 11:20
                                          // + literal: Const { ty: fn(bool) -> bool {get_bool}, val: Value(<ZST>) }
     }
 
     bb4: {
-        StorageDead(_5);                 // scope 0 at $DIR/while-storage.rs:+2:22: +2:23
-        switchInt(move _4) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/while-storage.rs:+2:12: +2:23
+        StorageDead(_5);                 // scope 0 at $DIR/while_storage.rs:+2:22: +2:23
+        switchInt(move _4) -> [false: bb6, otherwise: bb5]; // scope 0 at $DIR/while_storage.rs:+2:12: +2:23
     }
 
     bb5: {
-        StorageDead(_4);                 // scope 0 at $DIR/while-storage.rs:+4:9: +4:10
+        StorageDead(_4);                 // scope 0 at $DIR/while_storage.rs:+4:9: +4:10
         goto -> bb8;                     // scope 0 at no-location
     }
 
     bb6: {
-        StorageDead(_4);                 // scope 0 at $DIR/while-storage.rs:+4:9: +4:10
-        StorageDead(_2);                 // scope 0 at $DIR/while-storage.rs:+5:5: +5:6
-        goto -> bb1;                     // scope 0 at $DIR/while-storage.rs:+1:5: +5:6
+        StorageDead(_4);                 // scope 0 at $DIR/while_storage.rs:+4:9: +4:10
+        StorageDead(_2);                 // scope 0 at $DIR/while_storage.rs:+5:5: +5:6
+        goto -> bb1;                     // scope 0 at $DIR/while_storage.rs:+1:5: +5:6
     }
 
     bb7: {
@@ -58,7 +58,7 @@ fn while_loop(_1: bool) -> () {
     }
 
     bb8: {
-        StorageDead(_2);                 // scope 0 at $DIR/while-storage.rs:+5:5: +5:6
-        return;                          // scope 0 at $DIR/while-storage.rs:+6:2: +6:2
+        StorageDead(_2);                 // scope 0 at $DIR/while_storage.rs:+5:5: +5:6
+        return;                          // scope 0 at $DIR/while_storage.rs:+6:2: +6:2
     }
 }
diff --git a/src/test/run-make-fulldeps/issue-51671/Makefile b/src/test/run-make-fulldeps/issue-51671/Makefile
index 1d1d370d382..c9364536992 100644
--- a/src/test/run-make-fulldeps/issue-51671/Makefile
+++ b/src/test/run-make-fulldeps/issue-51671/Makefile
@@ -6,4 +6,4 @@ all:
 	$(RUSTC) --emit=obj app.rs
 	nm $(TMPDIR)/app.o | $(CGREP) rust_begin_unwind
 	nm $(TMPDIR)/app.o | $(CGREP) rust_eh_personality
-	nm $(TMPDIR)/app.o | $(CGREP) rust_oom
+	nm $(TMPDIR)/app.o | $(CGREP) __rg_oom
diff --git a/src/test/run-make-fulldeps/issue-51671/app.rs b/src/test/run-make-fulldeps/issue-51671/app.rs
index c13937dcfbe..e9dc1e9744f 100644
--- a/src/test/run-make-fulldeps/issue-51671/app.rs
+++ b/src/test/run-make-fulldeps/issue-51671/app.rs
@@ -1,5 +1,5 @@
 #![crate_type = "bin"]
-#![feature(lang_items)]
+#![feature(lang_items, alloc_error_handler)]
 #![no_main]
 #![no_std]
 
@@ -14,7 +14,7 @@ fn panic(_: &PanicInfo) -> ! {
 #[lang = "eh_personality"]
 fn eh() {}
 
-#[lang = "oom"]
+#[alloc_error_handler]
 fn oom(_: Layout) -> ! {
     loop {}
 }
diff --git a/src/test/run-make-fulldeps/libtest-json/output-default.json b/src/test/run-make-fulldeps/libtest-json/output-default.json
index 63342abc6ef..ad22b66eda6 100644
--- a/src/test/run-make-fulldeps/libtest-json/output-default.json
+++ b/src/test/run-make-fulldeps/libtest-json/output-default.json
@@ -2,7 +2,7 @@
 { "type": "test", "event": "started", "name": "a" }
 { "type": "test", "name": "a", "event": "ok" }
 { "type": "test", "event": "started", "name": "b" }
-{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:9:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
+{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'b' panicked at 'assertion failed: false', f.rs:9:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
 { "type": "test", "event": "started", "name": "c" }
 { "type": "test", "name": "c", "event": "ok" }
 { "type": "test", "event": "started", "name": "d" }
diff --git a/src/test/run-make-fulldeps/libtest-json/output-stdout-success.json b/src/test/run-make-fulldeps/libtest-json/output-stdout-success.json
index 8f19114460e..ec98172eb1c 100644
--- a/src/test/run-make-fulldeps/libtest-json/output-stdout-success.json
+++ b/src/test/run-make-fulldeps/libtest-json/output-stdout-success.json
@@ -2,9 +2,9 @@
 { "type": "test", "event": "started", "name": "a" }
 { "type": "test", "name": "a", "event": "ok", "stdout": "print from successful test\n" }
 { "type": "test", "event": "started", "name": "b" }
-{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:9:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
+{ "type": "test", "name": "b", "event": "failed", "stdout": "thread 'b' panicked at 'assertion failed: false', f.rs:9:5\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n" }
 { "type": "test", "event": "started", "name": "c" }
-{ "type": "test", "name": "c", "event": "ok", "stdout": "thread 'main' panicked at 'assertion failed: false', f.rs:15:5\n" }
+{ "type": "test", "name": "c", "event": "ok", "stdout": "thread 'c' panicked at 'assertion failed: false', f.rs:15:5\n" }
 { "type": "test", "event": "started", "name": "d" }
 { "type": "test", "name": "d", "event": "ignored", "message": "msg" }
 { "type": "suite", "event": "failed", "passed": 2, "failed": 1, "ignored": 1, "measured": 0, "filtered_out": 0, "exec_time": $TIME }
diff --git a/src/test/run-make/test-benches/Makefile b/src/test/run-make/test-benches/Makefile
new file mode 100644
index 00000000000..8fc122515d0
--- /dev/null
+++ b/src/test/run-make/test-benches/Makefile
@@ -0,0 +1,11 @@
+include ../../run-make-fulldeps/tools.mk
+
+# ignore-cross-compile
+
+all:
+	# Smoke-test that `#[bench]` isn't entirely broken.
+	$(RUSTC) --test smokebench.rs -O
+	$(call RUN,smokebench --bench)
+	$(call RUN,smokebench --bench noiter)
+	$(call RUN,smokebench --bench yesiter)
+	$(call RUN,smokebench)
diff --git a/src/test/run-make/test-benches/smokebench.rs b/src/test/run-make/test-benches/smokebench.rs
new file mode 100644
index 00000000000..ef5e5a62068
--- /dev/null
+++ b/src/test/run-make/test-benches/smokebench.rs
@@ -0,0 +1,14 @@
+#![feature(test)]
+extern crate test;
+
+#[bench]
+fn smoke_yesiter(b: &mut test::Bencher) {
+    let mut i = 0usize;
+    b.iter(|| {
+        i = i.wrapping_add(1);
+        i
+    })
+}
+
+#[bench]
+fn smoke_noiter(_: &mut test::Bencher) {}
diff --git a/src/test/run-make/valid-print-requests/Makefile b/src/test/run-make/valid-print-requests/Makefile
new file mode 100644
index 00000000000..c325e536e7c
--- /dev/null
+++ b/src/test/run-make/valid-print-requests/Makefile
@@ -0,0 +1,4 @@
+include ../../run-make-fulldeps/tools.mk
+
+all:
+	$(RUSTC) --print uwu 2>&1 | diff - valid-print-requests.stderr
diff --git a/src/test/run-make/valid-print-requests/valid-print-requests.stderr b/src/test/run-make/valid-print-requests/valid-print-requests.stderr
new file mode 100644
index 00000000000..85782866d12
--- /dev/null
+++ b/src/test/run-make/valid-print-requests/valid-print-requests.stderr
@@ -0,0 +1,2 @@
+error: unknown print request `uwu`. Valid print requests are: `crate-name`, `file-names`, `sysroot`, `target-libdir`, `cfg`, `calling-conventions`, `target-list`, `target-cpus`, `target-features`, `relocation-models`, `code-models`, `tls-models`, `native-static-libs`, `stack-protector-strategies`, `target-spec-json`, `link-args`
+
diff --git a/src/test/rustdoc-gui/highlight-colors.goml b/src/test/rustdoc-gui/highlight-colors.goml
index 51693314e85..ff1be389dcb 100644
--- a/src/test/rustdoc-gui/highlight-colors.goml
+++ b/src/test/rustdoc-gui/highlight-colors.goml
@@ -15,7 +15,7 @@ define-function: (
         string,
         bool_val,
         self,
-        attribute,
+        attr,
         macro,
         question_mark,
         comment,
@@ -33,7 +33,7 @@ define-function: (
         ("assert-css", ("pre.rust .string", {"color": |string|}, ALL)),
         ("assert-css", ("pre.rust .bool-val", {"color": |bool_val|}, ALL)),
         ("assert-css", ("pre.rust .self", {"color": |self|}, ALL)),
-        ("assert-css", ("pre.rust .attribute", {"color": |attribute|}, ALL)),
+        ("assert-css", ("pre.rust .attr", {"color": |attr|}, ALL)),
         ("assert-css", ("pre.rust .macro", {"color": |macro|}, ALL)),
         ("assert-css", ("pre.rust .question-mark", {"color": |question_mark|}, ALL)),
         ("assert-css", ("pre.rust .comment", {"color": |comment|}, ALL)),
@@ -52,7 +52,7 @@ call-function: ("check-colors", {
     "string": "rgb(184, 204, 82)",
     "bool_val": "rgb(255, 119, 51)",
     "self": "rgb(54, 163, 217)",
-    "attribute": "rgb(230, 225, 207)",
+    "attr": "rgb(230, 225, 207)",
     "macro": "rgb(163, 122, 204)",
     "question_mark": "rgb(255, 144, 17)",
     "comment": "rgb(120, 135, 151)",
@@ -69,7 +69,7 @@ call-function: ("check-colors", {
     "string": "rgb(131, 163, 0)",
     "bool_val": "rgb(238, 104, 104)",
     "self": "rgb(238, 104, 104)",
-    "attribute": "rgb(238, 104, 104)",
+    "attr": "rgb(238, 104, 104)",
     "macro": "rgb(62, 153, 159)",
     "question_mark": "rgb(255, 144, 17)",
     "comment": "rgb(141, 141, 139)",
@@ -86,7 +86,7 @@ call-function: ("check-colors", {
     "string": "rgb(113, 140, 0)",
     "bool_val": "rgb(200, 40, 41)",
     "self": "rgb(200, 40, 41)",
-    "attribute": "rgb(200, 40, 41)",
+    "attr": "rgb(200, 40, 41)",
     "macro": "rgb(62, 153, 159)",
     "question_mark": "rgb(255, 144, 17)",
     "comment": "rgb(142, 144, 140)",
diff --git a/src/test/rustdoc-gui/method-margins.goml b/src/test/rustdoc-gui/method-margins.goml
new file mode 100644
index 00000000000..397bcd40b36
--- /dev/null
+++ b/src/test/rustdoc-gui/method-margins.goml
@@ -0,0 +1,17 @@
+goto: "file://" + |DOC_PATH| + "/test_docs/trait_members/struct.HasTrait.html#impl-TraitMembers-for-HasTrait"
+
+assert-count: ("#trait-implementations-list > .rustdoc-toggle", 1)
+
+compare-elements-css: (
+    // compare margin on type with margin on method
+    "#trait-implementations-list .impl-items > .rustdoc-toggle:nth-child(1) > summary",
+    "#trait-implementations-list .impl-items > .rustdoc-toggle:nth-child(2) > summary",
+    ["margin"]
+)
+
+compare-elements-css: (
+    // compare margin on type with margin on method
+    "#trait-implementations-list .impl-items > .rustdoc-toggle:nth-child(1)",
+    "#trait-implementations-list .impl-items > .rustdoc-toggle:nth-child(2)",
+    ["margin"]
+)
diff --git a/src/test/rustdoc-gui/search-result-color.goml b/src/test/rustdoc-gui/search-result-color.goml
index 69bb30df954..0c3b1119074 100644
--- a/src/test/rustdoc-gui/search-result-color.goml
+++ b/src/test/rustdoc-gui/search-result-color.goml
@@ -67,7 +67,7 @@ reload:
 // Waiting for the search results to appear...
 wait-for: "#titles"
 assert-css: (
-    "//*[@class='desc']//*[text()='Just a normal struct.']",
+    "//*[@class='desc'][text()='Just a normal struct.']",
     {"color": "rgb(197, 197, 197)"},
 )
 assert-css: (
@@ -75,6 +75,12 @@ assert-css: (
     {"color": "rgb(0, 150, 207)"},
 )
 
+// Checking the color of the bottom border.
+assert-css: (
+    ".search-results > a",
+    {"border-bottom-color": "rgb(92, 103, 115)"}
+)
+
 // Checking the color of "keyword" text.
 assert-css: (
     "//*[@class='result-name']//*[text()='(keyword)']",
@@ -153,7 +159,7 @@ assert-css: (
 )
 
 // Checking color and background on hover.
-move-cursor-to: "//*[@class='desc']//*[text()='Just a normal struct.']"
+move-cursor-to: "//*[@class='desc'][text()='Just a normal struct.']"
 assert-css: (
     "//*[@class='result-name']/*[text()='test_docs::']",
     {"color": "rgb(255, 255, 255)"},
@@ -173,7 +179,7 @@ reload:
 // Waiting for the search results to appear...
 wait-for: "#titles"
 assert-css: (
-    "//*[@class='desc']//*[text()='Just a normal struct.']",
+    "//*[@class='desc'][text()='Just a normal struct.']",
     {"color": "rgb(221, 221, 221)"},
 )
 assert-css: (
@@ -181,6 +187,12 @@ assert-css: (
     {"color": "rgb(221, 221, 221)"},
 )
 
+// Checking the color of the bottom border.
+assert-css: (
+    ".search-results > a",
+    {"border-bottom-color": "rgb(224, 224, 224)"}
+)
+
 // Checking the color for "keyword" text.
 assert-css: (
     "//*[@class='result-name']//*[text()='(keyword)']",
@@ -264,7 +276,7 @@ reload:
 // Waiting for the search results to appear...
 wait-for: "#titles"
 assert-css: (
-    "//*[@class='desc']//*[text()='Just a normal struct.']",
+    "//*[@class='desc'][text()='Just a normal struct.']",
     {"color": "rgb(0, 0, 0)"},
 )
 assert-css: (
@@ -272,6 +284,12 @@ assert-css: (
     {"color": "rgb(0, 0, 0)"},
 )
 
+// Checking the color of the bottom border.
+assert-css: (
+    ".search-results > a",
+    {"border-bottom-color": "rgb(224, 224, 224)"}
+)
+
 // Checking the color for "keyword" text.
 assert-css: (
     "//*[@class='result-name']//*[text()='(keyword)']",
diff --git a/src/test/rustdoc-gui/search-result-display.goml b/src/test/rustdoc-gui/search-result-display.goml
index 053bfd8c905..b8abd9f9062 100644
--- a/src/test/rustdoc-gui/search-result-display.goml
+++ b/src/test/rustdoc-gui/search-result-display.goml
@@ -7,7 +7,7 @@ press-key: 'Enter'
 wait-for: "#crate-search"
 // The width is returned by "getComputedStyle" which returns the exact number instead of the
 // CSS rule which is "50%"...
-assert-css: (".search-results div.desc", {"width": "318px"})
+assert-css: (".search-results div.desc", {"width": "310px"})
 size: (600, 100)
 // As counter-intuitive as it may seem, in this width, the width is "100%", which is why
 // when computed it's larger.
diff --git a/src/test/rustdoc-gui/sidebar-links-color.goml b/src/test/rustdoc-gui/sidebar-links-color.goml
index 18a1a3fadea..7ef7ec90cd2 100644
--- a/src/test/rustdoc-gui/sidebar-links-color.goml
+++ b/src/test/rustdoc-gui/sidebar-links-color.goml
@@ -4,230 +4,168 @@ goto: "file://" + |DOC_PATH| + "/test_docs/struct.Foo.html"
 // This is needed so that the text color is computed.
 show-text: true
 
-// Ayu theme
-local-storage: {
-    "rustdoc-theme": "ayu",
-    "rustdoc-use-system-theme": "false",
-}
-reload:
-
-// Struct
-assert-css: (
-    ".sidebar .block.struct a:not(.current)",
-    {"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.struct a:not(.current)"
-assert-css: (
-    ".sidebar .block.struct a:hover",
-    {"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-// Enum
-assert-css: (
-    ".sidebar .block.enum a",
-    {"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.enum a"
-assert-css: (
-    ".sidebar .block.enum a:hover",
-    {"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-// Union
-assert-css: (
-    ".sidebar .block.union a",
-    {"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.union a"
-assert-css: (
-    ".sidebar .block.union a:hover",
-    {"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-// Trait
-assert-css: (
-    ".sidebar .block.trait a",
-    {"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.trait a"
-assert-css: (
-    ".sidebar .block.trait a:hover",
-    {"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-// Function
-assert-css: (
-    ".sidebar .block.fn a",
-    {"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.fn a"
-assert-css: (
-    ".sidebar .block.fn a:hover",
-    {"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-// Type definition
-assert-css: (
-    ".sidebar .block.type a",
-    {"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.type a"
-assert-css: (
-    ".sidebar .block.type a:hover",
-    {"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-// Keyword
-assert-css: (
-    ".sidebar .block.keyword a",
-    {"color": "rgb(83, 177, 219)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.keyword a"
-assert-css: (
-    ".sidebar .block.keyword a:hover",
-    {"color": "rgb(255, 180, 76)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-
-// Dark theme
-local-storage: {"rustdoc-theme": "dark"}
-reload:
-
-// Struct
-assert-css: (
-    ".sidebar .block.struct a:not(.current)",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.struct a:not(.current)"
-assert-css: (
-    ".sidebar .block.struct a:hover",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
-)
-// Enum
-assert-css: (
-    ".sidebar .block.enum a",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.enum a"
-assert-css: (
-    ".sidebar .block.enum a:hover",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
-)
-// Union
-assert-css: (
-    ".sidebar .block.union a",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.union a"
-assert-css: (
-    ".sidebar .block.union a:hover",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
+define-function: (
+    "check-colors",
+    (
+        theme, struct, struct_hover, struct_hover_background, enum, enum_hover,
+        enum_hover_background, union, union_hover, union_hover_background, trait, trait_hover,
+        trait_hover_background, fn, fn_hover, fn_hover_background, type, type_hover,
+        type_hover_background, keyword, keyword_hover, keyword_hover_background,
+    ),
+    [
+        ("local-storage", { "rustdoc-theme": |theme|, "rustdoc-use-system-theme": "false" }),
+        ("reload"),
+        // Struct
+        ("assert-css", (
+            ".sidebar .block.struct a:not(.current)",
+            {"color": |struct|, "background-color": "rgba(0, 0, 0, 0)"},
+        )),
+        ("move-cursor-to", ".sidebar .block.struct a:not(.current)"),
+        ("assert-css", (
+            ".sidebar .block.struct a:hover",
+            {"color": |struct_hover|, "background-color": |struct_hover_background|},
+        )),
+        // Enum
+        ("assert-css", (
+            ".sidebar .block.enum a",
+            {"color": |enum|, "background-color": "rgba(0, 0, 0, 0)"},
+        )),
+        ("move-cursor-to", ".sidebar .block.enum a"),
+        ("assert-css", (
+            ".sidebar .block.enum a:hover",
+            {"color": |enum_hover|, "background-color": |enum_hover_background|},
+        )),
+        // Union
+        ("assert-css", (
+            ".sidebar .block.union a",
+            {"color": |union|, "background-color": "rgba(0, 0, 0, 0)"},
+        )),
+        ("move-cursor-to", ".sidebar .block.union a"),
+        ("assert-css", (
+            ".sidebar .block.union a:hover",
+            {"color": |union_hover|, "background-color": |union_hover_background|},
+        )),
+        // Trait
+        ("assert-css", (
+            ".sidebar .block.trait a",
+            {"color": |trait|, "background-color": "rgba(0, 0, 0, 0)"},
+        )),
+        ("move-cursor-to", ".sidebar .block.trait a"),
+        ("assert-css", (
+            ".sidebar .block.trait a:hover",
+            {"color": |trait_hover|, "background-color": |trait_hover_background|},
+        )),
+        // Function
+        ("assert-css", (
+            ".sidebar .block.fn a",
+            {"color": |fn|, "background-color": "rgba(0, 0, 0, 0)"},
+        )),
+        ("move-cursor-to", ".sidebar .block.fn a"),
+        ("assert-css", (
+            ".sidebar .block.fn a:hover",
+            {"color": |fn_hover|, "background-color": |fn_hover_background|},
+        )),
+        // Type definition
+        ("assert-css", (
+            ".sidebar .block.type a",
+            {"color": |type|, "background-color": "rgba(0, 0, 0, 0)"},
+        )),
+        ("move-cursor-to", ".sidebar .block.type a"),
+        ("assert-css", (
+            ".sidebar .block.type a:hover",
+            {"color": |type_hover|, "background-color": |type_hover_background|},
+        )),
+        // Keyword
+        ("assert-css", (
+            ".sidebar .block.keyword a",
+            {"color": |keyword|, "background-color": "rgba(0, 0, 0, 0)"},
+        )),
+        ("move-cursor-to", ".sidebar .block.keyword a"),
+        ("assert-css", (
+            ".sidebar .block.keyword a:hover",
+            {"color": |keyword_hover|, "background-color": |keyword_hover_background|},
+        )),
+    ]
 )
-// Trait
-assert-css: (
-    ".sidebar .block.trait a",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.trait a"
-assert-css: (
-    ".sidebar .block.trait a:hover",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
-)
-// Function
-assert-css: (
-    ".sidebar .block.fn a",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.fn a"
-assert-css: (
-    ".sidebar .block.fn a:hover",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
-)
-// Type definition
-assert-css: (
-    ".sidebar .block.type a",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.type a"
-assert-css: (
-    ".sidebar .block.type a:hover",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
-)
-// Keyword
-assert-css: (
-    ".sidebar .block.keyword a",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.keyword a"
-assert-css: (
-    ".sidebar .block.keyword a:hover",
-    {"color": "rgb(253, 191, 53)", "background-color": "rgb(68, 68, 68)"},
-)
-
-// Light theme
-local-storage: {"rustdoc-theme": "light"}
-reload:
 
-// Struct
-assert-css: (
-    ".sidebar .block.struct a:not(.current)",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.struct a:not(.current)"
-assert-css: (
-    ".sidebar .block.struct a:hover",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
-)
-// Enum
-assert-css: (
-    ".sidebar .block.enum a",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.enum a"
-assert-css: (
-    ".sidebar .block.enum a:hover",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
-)
-// Union
-assert-css: (
-    ".sidebar .block.union a",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.union a"
-assert-css: (
-    ".sidebar .block.union a:hover",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
-)
-// Trait
-assert-css: (
-    ".sidebar .block.trait a",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.trait a"
-assert-css: (
-    ".sidebar .block.trait a:hover",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
-)
-// Function
-assert-css: (
-    ".sidebar .block.fn a",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.fn a"
-assert-css: (
-    ".sidebar .block.fn a:hover",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
-)
-// Type definition
-assert-css: (
-    ".sidebar .block.type a",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.type a"
-assert-css: (
-    ".sidebar .block.type a:hover",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
-)
-// Keyword
-assert-css: (
-    ".sidebar .block.keyword a",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgba(0, 0, 0, 0)"},
-)
-move-cursor-to: ".sidebar .block.keyword a"
-assert-css: (
-    ".sidebar .block.keyword a:hover",
-    {"color": "rgb(53, 109, 164)", "background-color": "rgb(255, 255, 255)"},
+call-function: (
+    "check-colors",
+    {
+        "theme": "ayu",
+        "struct": "rgb(83, 177, 219)",
+        "struct_hover": "rgb(255, 180, 76)",
+        "struct_hover_background": "rgba(0, 0, 0, 0)",
+        "enum": "rgb(83, 177, 219)",
+        "enum_hover": "rgb(255, 180, 76)",
+        "enum_hover_background": "rgba(0, 0, 0, 0)",
+        "union": "rgb(83, 177, 219)",
+        "union_hover": "rgb(255, 180, 76)",
+        "union_hover_background": "rgba(0, 0, 0, 0)",
+        "trait": "rgb(83, 177, 219)",
+        "trait_hover": "rgb(255, 180, 76)",
+        "trait_hover_background": "rgba(0, 0, 0, 0)",
+        "fn": "rgb(83, 177, 219)",
+        "fn_hover": "rgb(255, 180, 76)",
+        "fn_hover_background": "rgba(0, 0, 0, 0)",
+        "type": "rgb(83, 177, 219)",
+        "type_hover": "rgb(255, 180, 76)",
+        "type_hover_background": "rgba(0, 0, 0, 0)",
+        "keyword": "rgb(83, 177, 219)",
+        "keyword_hover": "rgb(255, 180, 76)",
+        "keyword_hover_background": "rgba(0, 0, 0, 0)",
+    }
+)
+call-function: (
+    "check-colors",
+    {
+        "theme": "dark",
+        "struct": "rgb(253, 191, 53)",
+        "struct_hover": "rgb(253, 191, 53)",
+        "struct_hover_background": "rgb(68, 68, 68)",
+        "enum": "rgb(253, 191, 53)",
+        "enum_hover": "rgb(253, 191, 53)",
+        "enum_hover_background": "rgb(68, 68, 68)",
+        "union": "rgb(253, 191, 53)",
+        "union_hover": "rgb(253, 191, 53)",
+        "union_hover_background": "rgb(68, 68, 68)",
+        "trait": "rgb(253, 191, 53)",
+        "trait_hover": "rgb(253, 191, 53)",
+        "trait_hover_background": "rgb(68, 68, 68)",
+        "fn": "rgb(253, 191, 53)",
+        "fn_hover": "rgb(253, 191, 53)",
+        "fn_hover_background": "rgb(68, 68, 68)",
+        "type": "rgb(253, 191, 53)",
+        "type_hover": "rgb(253, 191, 53)",
+        "type_hover_background": "rgb(68, 68, 68)",
+        "keyword": "rgb(253, 191, 53)",
+        "keyword_hover": "rgb(253, 191, 53)",
+        "keyword_hover_background": "rgb(68, 68, 68)",
+    }
+)
+call-function: (
+    "check-colors",
+    {
+        "theme": "light",
+        "struct": "rgb(53, 109, 164)",
+        "struct_hover": "rgb(53, 109, 164)",
+        "struct_hover_background": "rgb(255, 255, 255)",
+        "enum": "rgb(53, 109, 164)",
+        "enum_hover": "rgb(53, 109, 164)",
+        "enum_hover_background": "rgb(255, 255, 255)",
+        "union": "rgb(53, 109, 164)",
+        "union_hover": "rgb(53, 109, 164)",
+        "union_hover_background": "rgb(255, 255, 255)",
+        "trait": "rgb(53, 109, 164)",
+        "trait_hover": "rgb(53, 109, 164)",
+        "trait_hover_background": "rgb(255, 255, 255)",
+        "fn": "rgb(53, 109, 164)",
+        "fn_hover": "rgb(53, 109, 164)",
+        "fn_hover_background": "rgb(255, 255, 255)",
+        "type": "rgb(53, 109, 164)",
+        "type_hover": "rgb(53, 109, 164)",
+        "type_hover_background": "rgb(255, 255, 255)",
+        "keyword": "rgb(53, 109, 164)",
+        "keyword_hover": "rgb(53, 109, 164)",
+        "keyword_hover_background": "rgb(255, 255, 255)",
+    }
 )
diff --git a/src/test/rustdoc-gui/src/test_docs/lib.rs b/src/test/rustdoc-gui/src/test_docs/lib.rs
index fdf97e492aa..8eea5ad01c0 100644
--- a/src/test/rustdoc-gui/src/test_docs/lib.rs
+++ b/src/test/rustdoc-gui/src/test_docs/lib.rs
@@ -416,3 +416,20 @@ pub trait TraitWithoutGenerics {
 
     fn foo();
 }
+
+pub mod trait_members {
+    pub trait TraitMembers {
+        /// Some type
+        type Type;
+        /// Some function
+        fn function();
+        /// Some other function
+        fn function2();
+    }
+    pub struct HasTrait;
+    impl TraitMembers for HasTrait {
+        type Type = u8;
+        fn function() {}
+        fn function2() {}
+    }
+}
diff --git a/src/test/rustdoc-gui/theme-in-history.goml b/src/test/rustdoc-gui/theme-in-history.goml
index c29571728a1..10508e86a36 100644
--- a/src/test/rustdoc-gui/theme-in-history.goml
+++ b/src/test/rustdoc-gui/theme-in-history.goml
@@ -3,7 +3,6 @@ goto: "file://" + |DOC_PATH| + "/test_docs/index.html"
 // Set the theme to dark.
 local-storage: {
     "rustdoc-theme": "dark",
-    "rustdoc-preferred-dark-theme": "dark",
     "rustdoc-use-system-theme": "false",
 }
 // We reload the page so the local storage settings are being used.
diff --git a/src/test/rustdoc-js/reexport.js b/src/test/rustdoc-js/reexport.js
new file mode 100644
index 00000000000..871e75d9b2b
--- /dev/null
+++ b/src/test/rustdoc-js/reexport.js
@@ -0,0 +1,17 @@
+// exact-check
+
+const QUERY = ['Subscriber', 'AnotherOne'];
+
+const EXPECTED = [
+    {
+        'others': [
+            { 'path': 'reexport::fmt', 'name': 'Subscriber' },
+            { 'path': 'reexport', 'name': 'FmtSubscriber' },
+        ],
+    },
+    {
+        'others': [
+            { 'path': 'reexport', 'name': 'AnotherOne' },
+        ],
+    },
+];
diff --git a/src/test/rustdoc-js/reexport.rs b/src/test/rustdoc-js/reexport.rs
new file mode 100644
index 00000000000..d69b2901edd
--- /dev/null
+++ b/src/test/rustdoc-js/reexport.rs
@@ -0,0 +1,11 @@
+// This test enforces that the (renamed) reexports are present in the search results.
+
+pub mod fmt {
+    pub struct Subscriber;
+}
+mod foo {
+    pub struct AnotherOne;
+}
+
+pub use foo::AnotherOne;
+pub use fmt::Subscriber as FmtSubscriber;
diff --git a/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs b/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs
index e58bba64058..94ea0e93bf6 100644
--- a/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs
+++ b/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.rs
@@ -1,3 +1,4 @@
+// check-pass
 // This test ensures that rustdoc does not panic on inherented associated types
 // that are referred to without fully-qualified syntax.
 
@@ -9,8 +10,4 @@ pub struct Struct;
 impl Struct {
     pub type AssocTy = usize;
     pub const AssocConst: Self::AssocTy = 42;
-    //~^ ERROR ambiguous associated type
-    //~| HELP use fully-qualified syntax
-    //~| ERROR ambiguous associated type
-    //~| HELP use fully-qualified syntax
 }
diff --git a/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.stderr b/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.stderr
deleted file mode 100644
index b963b722f66..00000000000
--- a/src/test/rustdoc-ui/ambiguous-inherent-assoc-ty.stderr
+++ /dev/null
@@ -1,15 +0,0 @@
-error[E0223]: ambiguous associated type
-  --> $DIR/ambiguous-inherent-assoc-ty.rs:11:27
-   |
-LL |     pub const AssocConst: Self::AssocTy = 42;
-   |                           ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<Struct as Trait>::AssocTy`
-
-error[E0223]: ambiguous associated type
-  --> $DIR/ambiguous-inherent-assoc-ty.rs:11:27
-   |
-LL |     pub const AssocConst: Self::AssocTy = 42;
-   |                           ^^^^^^^^^^^^^ help: use fully-qualified syntax: `<Struct as Trait>::AssocTy`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0223`.
diff --git a/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr b/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr
index e7b4c43e790..19e541736bd 100644
--- a/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr
+++ b/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr
@@ -4,7 +4,7 @@ error: unknown disambiguator `foo`
 LL | //! Linking to [foo@banana] and [`bar@banana!()`].
    |                 ^^^
    |
-   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 note: the lint level is defined here
   --> $DIR/unknown-disambiguator.rs:2:9
    |
@@ -18,7 +18,7 @@ error: unknown disambiguator `bar`
 LL | //! Linking to [foo@banana] and [`bar@banana!()`].
    |                                   ^^^
    |
-   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
 error: unknown disambiguator `foo`
   --> $DIR/unknown-disambiguator.rs:10:34
@@ -26,7 +26,7 @@ error: unknown disambiguator `foo`
 LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
    |                                  ^^^
    |
-   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
 error: unknown disambiguator `foo`
   --> $DIR/unknown-disambiguator.rs:10:48
@@ -34,7 +34,7 @@ error: unknown disambiguator `foo`
 LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
    |                                                ^^^
    |
-   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
 error: unknown disambiguator ``
   --> $DIR/unknown-disambiguator.rs:7:31
@@ -42,7 +42,7 @@ error: unknown disambiguator ``
 LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
    |                               ^
    |
-   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
 error: unknown disambiguator ``
   --> $DIR/unknown-disambiguator.rs:7:57
@@ -50,7 +50,7 @@ error: unknown disambiguator ``
 LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
    |                                                         ^
    |
-   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+   = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
 
 error: aborting due to 6 previous errors
 
diff --git a/src/test/rustdoc-ui/track-diagnostics.rs b/src/test/rustdoc-ui/track-diagnostics.rs
new file mode 100644
index 00000000000..fcc50a7aba0
--- /dev/null
+++ b/src/test/rustdoc-ui/track-diagnostics.rs
@@ -0,0 +1,10 @@
+// compile-flags: -Z track-diagnostics
+// error-pattern: created at
+
+// Normalize the emitted location so this doesn't need
+// updating everytime someone adds or removes a line.
+// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC"
+
+struct A;
+struct B;
+const S: A = B;
diff --git a/src/test/rustdoc-ui/track-diagnostics.stderr b/src/test/rustdoc-ui/track-diagnostics.stderr
new file mode 100644
index 00000000000..ec303186253
--- /dev/null
+++ b/src/test/rustdoc-ui/track-diagnostics.stderr
@@ -0,0 +1,10 @@
+error[E0308]: mismatched types
+  --> $DIR/track-diagnostics.rs:LL:CC
+   |
+LL | const S: A = B;
+   |              ^ expected struct `A`, found struct `B`
+-Ztrack-diagnostics: created at compiler/rustc_infer/src/infer/error_reporting/mod.rs:LL:CC
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/rustdoc-ui/z-help.stdout b/src/test/rustdoc-ui/z-help.stdout
index 46f11d2e5d1..22e37821322 100644
--- a/src/test/rustdoc-ui/z-help.stdout
+++ b/src/test/rustdoc-ui/z-help.stdout
@@ -171,6 +171,7 @@
     -Z                             time-passes=val -- measure time of each rustc pass (default: no)
     -Z                               tls-model=val -- choose the TLS model to use (`rustc --print tls-models` for details)
     -Z                            trace-macros=val -- for every macro invocation, print its name and arguments (default: no)
+    -Z                       track-diagnostics=val -- tracks where in rustc a diagnostic was emitted
     -Z                translate-additional-ftl=val -- additional fluent translation to preferentially use (for testing translation)
     -Z        translate-directionality-markers=val -- emit directionality isolation markers in translated diagnostics
     -Z                          translate-lang=val -- language identifier for diagnostic output
diff --git a/src/test/rustdoc/async-trait-sig.rs b/src/test/rustdoc/async-trait-sig.rs
new file mode 100644
index 00000000000..2578bc8f7a1
--- /dev/null
+++ b/src/test/rustdoc/async-trait-sig.rs
@@ -0,0 +1,14 @@
+// edition:2021
+
+#![feature(async_fn_in_trait)]
+#![allow(incomplete_features)]
+
+pub trait Foo {
+    // @has async_trait_sig/trait.Foo.html '//h4[@class="code-header"]' "async fn bar() -> i32"
+    async fn bar() -> i32;
+
+    // @has async_trait_sig/trait.Foo.html '//h4[@class="code-header"]' "async fn baz() -> i32"
+    async fn baz() -> i32 {
+        1
+    }
+}
diff --git a/src/test/rustdoc/auxiliary/incoherent-impl-types.rs b/src/test/rustdoc/auxiliary/incoherent-impl-types.rs
new file mode 100644
index 00000000000..fc51e42e500
--- /dev/null
+++ b/src/test/rustdoc/auxiliary/incoherent-impl-types.rs
@@ -0,0 +1,7 @@
+#![feature(rustc_attrs)]
+
+#[rustc_has_incoherent_inherent_impls]
+pub trait FooTrait {}
+
+#[rustc_has_incoherent_inherent_impls]
+pub struct FooStruct;
diff --git a/src/test/rustdoc/intra-doc/auxiliary/issue-103463-aux.rs b/src/test/rustdoc/intra-doc/auxiliary/issue-103463-aux.rs
new file mode 100644
index 00000000000..2b8fdec1f12
--- /dev/null
+++ b/src/test/rustdoc/intra-doc/auxiliary/issue-103463-aux.rs
@@ -0,0 +1,4 @@
+pub trait Trait {
+    /// [`u8::clone`]
+    fn method();
+}
diff --git a/src/test/rustdoc/intra-doc/issue-103463.rs b/src/test/rustdoc/intra-doc/issue-103463.rs
new file mode 100644
index 00000000000..4adf8a9a8a4
--- /dev/null
+++ b/src/test/rustdoc/intra-doc/issue-103463.rs
@@ -0,0 +1,8 @@
+// The `Trait` is not pulled into the crate resulting in doc links in its methods being resolved.
+
+// aux-build:issue-103463-aux.rs
+
+extern crate issue_103463_aux;
+use issue_103463_aux::Trait;
+
+fn main() {}
diff --git a/src/test/rustdoc/issue-41783.codeblock.html b/src/test/rustdoc/issue-41783.codeblock.html
index 89987491d1b..3bca4536cd5 100644
--- a/src/test/rustdoc/issue-41783.codeblock.html
+++ b/src/test/rustdoc/issue-41783.codeblock.html
@@ -1,5 +1,5 @@
 <code># single
 ## double
 ### triple
-<span class="attribute">#[outer]
+<span class="attr">#[outer]
 #![inner]</span></code>
diff --git a/src/test/rustdoc/issue-41783.rs b/src/test/rustdoc/issue-41783.rs
index 87267a750c6..769f984a274 100644
--- a/src/test/rustdoc/issue-41783.rs
+++ b/src/test/rustdoc/issue-41783.rs
@@ -1,10 +1,10 @@
 // @has issue_41783/struct.Foo.html
 // @!hasraw - 'space'
 // @!hasraw - 'comment'
-// @hasraw - '<span class="attribute">#[outer]'
-// @!hasraw - '<span class="attribute">#[outer]</span>'
+// @hasraw - '<span class="attr">#[outer]'
+// @!hasraw - '<span class="attr">#[outer]</span>'
 // @hasraw - '#![inner]</span>'
-// @!hasraw - '<span class="attribute">#![inner]</span>'
+// @!hasraw - '<span class="attr">#![inner]</span>'
 // @snapshot 'codeblock' - '//*[@class="rustdoc-toggle top-doc"]/*[@class="docblock"]//pre/code'
 
 /// ```no_run
diff --git a/src/test/rustdoc/local-reexport-doc.rs b/src/test/rustdoc/local-reexport-doc.rs
new file mode 100644
index 00000000000..1c8468008dd
--- /dev/null
+++ b/src/test/rustdoc/local-reexport-doc.rs
@@ -0,0 +1,16 @@
+// This test ensures that the reexports of local items also get the doc from
+// the reexport.
+
+#![crate_name = "foo"]
+
+// @has 'foo/fn.g.html'
+// @has - '//*[@class="rustdoc-toggle top-doc"]/*[@class="docblock"]' \
+// 'outer module inner module'
+
+mod inner_mod {
+    /// inner module
+    pub fn g() {}
+}
+
+/// outer module
+pub use inner_mod::g;
diff --git a/src/test/rustdoc/no-unit-struct-field.rs b/src/test/rustdoc/no-unit-struct-field.rs
new file mode 100644
index 00000000000..d301954b6b5
--- /dev/null
+++ b/src/test/rustdoc/no-unit-struct-field.rs
@@ -0,0 +1,18 @@
+// This test ensures that the tuple struct fields are not generated in the
+// search index.
+
+// @!hasraw search-index.js '"0"'
+// @!hasraw search-index.js '"1"'
+// @hasraw search-index.js '"foo_a"'
+// @hasraw search-index.js '"bar_a"'
+
+pub struct Bar(pub u32, pub u8);
+pub struct Foo {
+    pub foo_a: u8,
+}
+pub enum Enum {
+    Foo(u8),
+    Bar {
+        bar_a: u8,
+    },
+}
diff --git a/src/test/rustdoc/rustc-incoherent-impls.rs b/src/test/rustdoc/rustc-incoherent-impls.rs
new file mode 100644
index 00000000000..3fdefbecc54
--- /dev/null
+++ b/src/test/rustdoc/rustc-incoherent-impls.rs
@@ -0,0 +1,28 @@
+// aux-build:incoherent-impl-types.rs
+// build-aux-docs
+
+#![crate_name = "foo"]
+#![feature(rustc_attrs)]
+
+extern crate incoherent_impl_types;
+
+// The only way this actually shows up is if the type gets inlined.
+#[doc(inline)]
+pub use incoherent_impl_types::FooTrait;
+
+// @has foo/trait.FooTrait.html
+// @count - '//section[@id="method.do_something"]' 1
+impl dyn FooTrait {
+    #[rustc_allow_incoherent_impl]
+    pub fn do_something() {}
+}
+
+#[doc(inline)]
+pub use incoherent_impl_types::FooStruct;
+
+// @has foo/struct.FooStruct.html
+// @count - '//section[@id="method.do_something"]' 1
+impl FooStruct {
+    #[rustc_allow_incoherent_impl]
+    pub fn do_something() {}
+}
diff --git a/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs b/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
index ca77e483d6f..411eb3fba48 100644
--- a/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
+++ b/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.rs
@@ -40,9 +40,9 @@ struct HelloWarn {}
 //~^ ERROR unsupported type attribute for diagnostic derive enum
 enum DiagnosticOnEnum {
     Foo,
-//~^ ERROR diagnostic slug not specified
+    //~^ ERROR diagnostic slug not specified
     Bar,
-//~^ ERROR diagnostic slug not specified
+    //~^ ERROR diagnostic slug not specified
 }
 
 #[derive(Diagnostic)]
@@ -211,9 +211,10 @@ struct LabelOnNonSpan {
 #[diag(compiletest_example, code = "E0123")]
 struct Suggest {
     #[suggestion(suggestion, code = "This is the suggested code")]
-    #[suggestion_short(suggestion, code = "This is the suggested code")]
-    #[suggestion_hidden(suggestion, code = "This is the suggested code")]
-    #[suggestion_verbose(suggestion, code = "This is the suggested code")]
+    #[suggestion(suggestion, code = "This is the suggested code", style = "normal")]
+    #[suggestion(suggestion, code = "This is the suggested code", style = "short")]
+    #[suggestion(suggestion, code = "This is the suggested code", style = "hidden")]
+    #[suggestion(suggestion, code = "This is the suggested code", style = "verbose")]
     suggestion: (Span, Applicability),
 }
 
@@ -536,8 +537,7 @@ struct LabelWithTrailingList {
 
 #[derive(LintDiagnostic)]
 #[diag(compiletest_example)]
-struct LintsGood {
-}
+struct LintsGood {}
 
 #[derive(LintDiagnostic)]
 #[diag(compiletest_example)]
@@ -683,7 +683,7 @@ struct RawIdentDiagnosticArg {
 #[diag(compiletest_example)]
 struct SubdiagnosticBad {
     #[subdiagnostic(bad)]
-//~^ ERROR `#[subdiagnostic(bad)]` is not a valid attribute
+    //~^ ERROR `#[subdiagnostic(bad)]` is not a valid attribute
     note: Note,
 }
 
@@ -691,7 +691,7 @@ struct SubdiagnosticBad {
 #[diag(compiletest_example)]
 struct SubdiagnosticBadStr {
     #[subdiagnostic = "bad"]
-//~^ ERROR `#[subdiagnostic = ...]` is not a valid attribute
+    //~^ ERROR `#[subdiagnostic = ...]` is not a valid attribute
     note: Note,
 }
 
@@ -699,7 +699,7 @@ struct SubdiagnosticBadStr {
 #[diag(compiletest_example)]
 struct SubdiagnosticBadTwice {
     #[subdiagnostic(bad, bad)]
-//~^ ERROR `#[subdiagnostic(...)]` is not a valid attribute
+    //~^ ERROR `#[subdiagnostic(...)]` is not a valid attribute
     note: Note,
 }
 
@@ -707,7 +707,7 @@ struct SubdiagnosticBadTwice {
 #[diag(compiletest_example)]
 struct SubdiagnosticBadLitStr {
     #[subdiagnostic("bad")]
-//~^ ERROR `#[subdiagnostic("...")]` is not a valid attribute
+    //~^ ERROR `#[subdiagnostic("...")]` is not a valid attribute
     note: Note,
 }
 
@@ -715,7 +715,7 @@ struct SubdiagnosticBadLitStr {
 #[diag(compiletest_example)]
 struct SubdiagnosticEagerLint {
     #[subdiagnostic(eager)]
-//~^ ERROR `#[subdiagnostic(...)]` is not a valid attribute
+    //~^ ERROR `#[subdiagnostic(...)]` is not a valid attribute
     note: Note,
 }
 
@@ -731,11 +731,7 @@ struct SubdiagnosticEagerCorrect {
 // after the `span_suggestion` call - which breaks eager translation.
 
 #[derive(Subdiagnostic)]
-#[suggestion_short(
-    use_instead,
-    applicability = "machine-applicable",
-    code = "{correct}"
-)]
+#[suggestion(use_instead, applicability = "machine-applicable", code = "{correct}")]
 pub(crate) struct SubdiagnosticWithSuggestion {
     #[primary_span]
     span: Span,
@@ -796,3 +792,10 @@ struct SuggestionsInvalidLiteral {
     //~^ ERROR `code = "..."`/`code(...)` must contain only string literals
     sub: Span,
 }
+
+#[derive(Diagnostic)]
+#[diag(compiletest_example)]
+struct SuggestionStyleGood {
+    #[suggestion(code = "", style = "hidden")]
+    sub: Span,
+}
diff --git a/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr b/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
index 859c272b6ba..b4c211db47c 100644
--- a/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
+++ b/src/test/ui-fulldeps/session-diagnostic/diagnostic-derive.stderr
@@ -261,41 +261,41 @@ LL |     #[label(label)]
    |     ^^^^^^^^^^^^^^^
 
 error: suggestion without `code = "..."`
-  --> $DIR/diagnostic-derive.rs:223:5
+  --> $DIR/diagnostic-derive.rs:224:5
    |
 LL |     #[suggestion(suggestion)]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `#[suggestion(nonsense = ...)]` is not a valid attribute
-  --> $DIR/diagnostic-derive.rs:231:18
+  --> $DIR/diagnostic-derive.rs:232:18
    |
 LL |     #[suggestion(nonsense = "bar")]
    |                  ^^^^^^^^^^^^^^^^
    |
-   = help: only `code` and `applicability` are valid nested attributes
+   = help: only `style`, `code` and `applicability` are valid nested attributes
 
 error: suggestion without `code = "..."`
-  --> $DIR/diagnostic-derive.rs:231:5
+  --> $DIR/diagnostic-derive.rs:232:5
    |
 LL |     #[suggestion(nonsense = "bar")]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `#[suggestion(msg = ...)]` is not a valid attribute
-  --> $DIR/diagnostic-derive.rs:240:18
+  --> $DIR/diagnostic-derive.rs:241:18
    |
 LL |     #[suggestion(msg = "bar")]
    |                  ^^^^^^^^^^^
    |
-   = help: only `code` and `applicability` are valid nested attributes
+   = help: only `style`, `code` and `applicability` are valid nested attributes
 
 error: suggestion without `code = "..."`
-  --> $DIR/diagnostic-derive.rs:240:5
+  --> $DIR/diagnostic-derive.rs:241:5
    |
 LL |     #[suggestion(msg = "bar")]
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: wrong field type for suggestion
-  --> $DIR/diagnostic-derive.rs:263:5
+  --> $DIR/diagnostic-derive.rs:264:5
    |
 LL | /     #[suggestion(suggestion, code = "This is suggested code")]
 LL | |
@@ -305,55 +305,55 @@ LL | |     suggestion: Applicability,
    = help: `#[suggestion(...)]` should be applied to fields of type `Span` or `(Span, Applicability)`
 
 error: specified multiple times
-  --> $DIR/diagnostic-derive.rs:279:24
+  --> $DIR/diagnostic-derive.rs:280:24
    |
 LL |     suggestion: (Span, Span, Applicability),
    |                        ^^^^
    |
 note: previously specified here
-  --> $DIR/diagnostic-derive.rs:279:18
+  --> $DIR/diagnostic-derive.rs:280:18
    |
 LL |     suggestion: (Span, Span, Applicability),
    |                  ^^^^
 
 error: specified multiple times
-  --> $DIR/diagnostic-derive.rs:287:33
+  --> $DIR/diagnostic-derive.rs:288:33
    |
 LL |     suggestion: (Applicability, Applicability, Span),
    |                                 ^^^^^^^^^^^^^
    |
 note: previously specified here
-  --> $DIR/diagnostic-derive.rs:287:18
+  --> $DIR/diagnostic-derive.rs:288:18
    |
 LL |     suggestion: (Applicability, Applicability, Span),
    |                  ^^^^^^^^^^^^^
 
 error: `#[label = ...]` is not a valid attribute
-  --> $DIR/diagnostic-derive.rs:294:5
+  --> $DIR/diagnostic-derive.rs:295:5
    |
 LL |     #[label = "bar"]
    |     ^^^^^^^^^^^^^^^^
 
 error: specified multiple times
-  --> $DIR/diagnostic-derive.rs:445:44
+  --> $DIR/diagnostic-derive.rs:446:44
    |
 LL |     #[suggestion(suggestion, code = "...", applicability = "maybe-incorrect")]
    |                                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
 note: previously specified here
-  --> $DIR/diagnostic-derive.rs:447:24
+  --> $DIR/diagnostic-derive.rs:448:24
    |
 LL |     suggestion: (Span, Applicability),
    |                        ^^^^^^^^^^^^^
 
 error: invalid applicability
-  --> $DIR/diagnostic-derive.rs:453:44
+  --> $DIR/diagnostic-derive.rs:454:44
    |
 LL |     #[suggestion(suggestion, code = "...", applicability = "batman")]
    |                                            ^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: `#[label(foo)]` is not a valid attribute
-  --> $DIR/diagnostic-derive.rs:516:20
+  --> $DIR/diagnostic-derive.rs:517:20
    |
 LL |     #[label(label, foo)]
    |                    ^^^
@@ -361,13 +361,13 @@ LL |     #[label(label, foo)]
    = help: a diagnostic slug must be the first argument to the attribute
 
 error: `#[label(foo = ...)]` is not a valid attribute
-  --> $DIR/diagnostic-derive.rs:524:20
+  --> $DIR/diagnostic-derive.rs:525:20
    |
 LL |     #[label(label, foo = "...")]
    |                    ^^^^^^^^^^^
 
 error: `#[label(foo(...))]` is not a valid attribute
-  --> $DIR/diagnostic-derive.rs:532:20
+  --> $DIR/diagnostic-derive.rs:533:20
    |
 LL |     #[label(label, foo("..."))]
    |                    ^^^^^^^^^^
@@ -574,19 +574,19 @@ LL |     #[subdiagnostic(eager)]
    = help: eager subdiagnostics are not supported on lints
 
 error: expected at least one string literal for `code(...)`
-  --> $DIR/diagnostic-derive.rs:779:18
+  --> $DIR/diagnostic-derive.rs:775:18
    |
 LL |     #[suggestion(code())]
    |                  ^^^^^^
 
 error: `code(...)` must contain only string literals
-  --> $DIR/diagnostic-derive.rs:787:23
+  --> $DIR/diagnostic-derive.rs:783:23
    |
 LL |     #[suggestion(code(foo))]
    |                       ^^^
 
 error: `code = "..."`/`code(...)` must contain only string literals
-  --> $DIR/diagnostic-derive.rs:795:18
+  --> $DIR/diagnostic-derive.rs:791:18
    |
 LL |     #[suggestion(code = 3)]
    |                  ^^^^^^^^
@@ -652,7 +652,7 @@ LL | #[diag(nonsense, code = "E0123")]
    |        ^^^^^^^^ not found in `rustc_errors::fluent`
 
 error[E0277]: the trait bound `Hello: IntoDiagnosticArg` is not satisfied
-  --> $DIR/diagnostic-derive.rs:338:10
+  --> $DIR/diagnostic-derive.rs:339:10
    |
 LL | #[derive(Diagnostic)]
    |          ^^^^^^^^^^ the trait `IntoDiagnosticArg` is not implemented for `Hello`
diff --git a/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs b/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs
index efec85eb52c..078ec3baac9 100644
--- a/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs
+++ b/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.rs
@@ -11,13 +11,13 @@
 #![crate_type = "lib"]
 
 extern crate rustc_errors;
+extern crate rustc_macros;
 extern crate rustc_session;
 extern crate rustc_span;
-extern crate rustc_macros;
 
 use rustc_errors::Applicability;
-use rustc_span::Span;
 use rustc_macros::Subdiagnostic;
+use rustc_span::Span;
 
 #[derive(Subdiagnostic)]
 #[label(parser_add_paren)]
@@ -40,7 +40,7 @@ enum B {
         #[primary_span]
         span: Span,
         var: String,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
@@ -165,7 +165,7 @@ enum P {
         #[primary_span]
         span: Span,
         var: String,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
@@ -177,7 +177,7 @@ enum Q {
         #[primary_span]
         span: Span,
         var: String,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
@@ -189,7 +189,7 @@ enum R {
         #[primary_span]
         span: Span,
         var: String,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
@@ -201,7 +201,7 @@ enum S {
         #[primary_span]
         span: Span,
         var: String,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
@@ -213,7 +213,7 @@ enum T {
         #[primary_span]
         span: Span,
         var: String,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
@@ -225,7 +225,7 @@ enum U {
         #[primary_span]
         span: Span,
         var: String,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
@@ -240,7 +240,7 @@ enum V {
         #[primary_span]
         span: Span,
         var: String,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
@@ -301,14 +301,14 @@ struct AB {
     #[primary_span]
     span: Span,
     #[skip_arg]
-    z: Z
+    z: Z,
 }
 
 #[derive(Subdiagnostic)]
 union AC {
-//~^ ERROR unexpected unsupported untagged union
+    //~^ ERROR unexpected unsupported untagged union
     span: u32,
-    b: u64
+    b: u64,
 }
 
 #[derive(Subdiagnostic)]
@@ -372,7 +372,7 @@ enum AI {
         #[applicability]
         applicability: Applicability,
         var: String,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
@@ -427,7 +427,7 @@ struct AN {
 }
 
 #[derive(Subdiagnostic)]
-#[suggestion(parser_add_paren, code ="...", applicability = "foo")]
+#[suggestion(parser_add_paren, code = "...", applicability = "foo")]
 //~^ ERROR invalid applicability
 struct AO {
     #[primary_span]
@@ -437,7 +437,7 @@ struct AO {
 #[derive(Subdiagnostic)]
 #[help(parser_add_paren)]
 struct AP {
-    var: String
+    var: String,
 }
 
 #[derive(Subdiagnostic)]
@@ -452,7 +452,7 @@ struct AR {
 }
 
 #[derive(Subdiagnostic)]
-#[suggestion(parser_add_paren, code ="...", applicability = "machine-applicable")]
+#[suggestion(parser_add_paren, code = "...", applicability = "machine-applicable")]
 struct AS {
     #[primary_span]
     span: Span,
@@ -467,11 +467,11 @@ enum AT {
         #[primary_span]
         span: Span,
         var: String,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
-#[suggestion(parser_add_paren, code ="{var}", applicability = "machine-applicable")]
+#[suggestion(parser_add_paren, code = "{var}", applicability = "machine-applicable")]
 struct AU {
     #[primary_span]
     span: Span,
@@ -479,7 +479,7 @@ struct AU {
 }
 
 #[derive(Subdiagnostic)]
-#[suggestion(parser_add_paren, code ="{var}", applicability = "machine-applicable")]
+#[suggestion(parser_add_paren, code = "{var}", applicability = "machine-applicable")]
 //~^ ERROR `var` doesn't refer to a field on this type
 struct AV {
     #[primary_span]
@@ -488,22 +488,22 @@ struct AV {
 
 #[derive(Subdiagnostic)]
 enum AW {
-    #[suggestion(parser_add_paren, code ="{var}", applicability = "machine-applicable")]
+    #[suggestion(parser_add_paren, code = "{var}", applicability = "machine-applicable")]
     A {
         #[primary_span]
         span: Span,
         var: String,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
 enum AX {
-    #[suggestion(parser_add_paren, code ="{var}", applicability = "machine-applicable")]
-//~^ ERROR `var` doesn't refer to a field on this type
+    #[suggestion(parser_add_paren, code = "{var}", applicability = "machine-applicable")]
+    //~^ ERROR `var` doesn't refer to a field on this type
     A {
         #[primary_span]
         span: Span,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
@@ -659,7 +659,7 @@ enum BL {
         /// ..and the field
         #[primary_span]
         span: Span,
-    }
+    },
 }
 
 #[derive(Subdiagnostic)]
@@ -706,3 +706,95 @@ struct BQ {
     span: Span,
     r#type: String,
 }
+
+#[derive(Subdiagnostic)]
+#[suggestion(parser_add_paren, code = "")]
+struct SuggestionStyleDefault {
+    #[primary_span]
+    sub: Span,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion(parser_add_paren, code = "", style = "short")]
+struct SuggestionStyleShort {
+    #[primary_span]
+    sub: Span,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion(parser_add_paren, code = "", style = "hidden")]
+struct SuggestionStyleHidden {
+    #[primary_span]
+    sub: Span,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion(parser_add_paren, code = "", style = "verbose")]
+struct SuggestionStyleVerbose {
+    #[primary_span]
+    sub: Span,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion(parser_add_paren, code = "", style = "tool-only")]
+struct SuggestionStyleToolOnly {
+    #[primary_span]
+    sub: Span,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion(parser_add_paren, code = "", style = "hidden", style = "normal")]
+//~^ ERROR specified multiple times
+//~| NOTE previously specified here
+struct SuggestionStyleTwice {
+    #[primary_span]
+    sub: Span,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion_hidden(parser_add_paren, code = "")]
+//~^ ERROR #[suggestion_hidden(...)]` is not a valid attribute
+struct SuggestionStyleOldSyntax {
+    #[primary_span]
+    sub: Span,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion_hidden(parser_add_paren, code = "", style = "normal")]
+//~^ ERROR #[suggestion_hidden(...)]` is not a valid attribute
+struct SuggestionStyleOldAndNewSyntax {
+    #[primary_span]
+    sub: Span,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion(parser_add_paren, code = "", style = "foo")]
+//~^ ERROR invalid suggestion style
+struct SuggestionStyleInvalid1 {
+    #[primary_span]
+    sub: Span,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion(parser_add_paren, code = "", style = 42)]
+//~^ ERROR `#[suggestion(style = ...)]` is not a valid attribute
+struct SuggestionStyleInvalid2 {
+    #[primary_span]
+    sub: Span,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion(parser_add_paren, code = "", style)]
+//~^ ERROR `#[suggestion(style)]` is not a valid attribute
+struct SuggestionStyleInvalid3 {
+    #[primary_span]
+    sub: Span,
+}
+
+#[derive(Subdiagnostic)]
+#[suggestion(parser_add_paren, code = "", style("foo"))]
+//~^ ERROR `#[suggestion(style(...))]` is not a valid attribute
+struct SuggestionStyleInvalid4 {
+    #[primary_span]
+    sub: Span,
+}
diff --git a/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr b/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
index a85a8711eac..8e06c43e6d0 100644
--- a/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
+++ b/src/test/ui-fulldeps/session-diagnostic/subdiagnostic-derive.stderr
@@ -186,7 +186,7 @@ error: unexpected unsupported untagged union
 LL | / union AC {
 LL | |
 LL | |     span: u32,
-LL | |     b: u64
+LL | |     b: u64,
 LL | | }
    | |_^
 
@@ -253,10 +253,10 @@ LL | #[suggestion(parser_add_paren)]
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 error: invalid applicability
-  --> $DIR/subdiagnostic-derive.rs:430:45
+  --> $DIR/subdiagnostic-derive.rs:430:46
    |
-LL | #[suggestion(parser_add_paren, code ="...", applicability = "foo")]
-   |                                             ^^^^^^^^^^^^^^^^^^^^^
+LL | #[suggestion(parser_add_paren, code = "...", applicability = "foo")]
+   |                                              ^^^^^^^^^^^^^^^^^^^^^
 
 error: suggestion without `#[primary_span]` field
   --> $DIR/subdiagnostic-derive.rs:448:1
@@ -275,16 +275,16 @@ LL | #[label]
    | ^^^^^^^^
 
 error: `var` doesn't refer to a field on this type
-  --> $DIR/subdiagnostic-derive.rs:482:38
+  --> $DIR/subdiagnostic-derive.rs:482:39
    |
-LL | #[suggestion(parser_add_paren, code ="{var}", applicability = "machine-applicable")]
-   |                                      ^^^^^^^
+LL | #[suggestion(parser_add_paren, code = "{var}", applicability = "machine-applicable")]
+   |                                       ^^^^^^^
 
 error: `var` doesn't refer to a field on this type
-  --> $DIR/subdiagnostic-derive.rs:501:42
+  --> $DIR/subdiagnostic-derive.rs:501:43
    |
-LL |     #[suggestion(parser_add_paren, code ="{var}", applicability = "machine-applicable")]
-   |                                          ^^^^^^^
+LL |     #[suggestion(parser_add_paren, code = "{var}", applicability = "machine-applicable")]
+   |                                           ^^^^^^^
 
 error: `#[suggestion_part]` is not a valid attribute
   --> $DIR/subdiagnostic-derive.rs:524:5
@@ -320,7 +320,7 @@ error: `#[multipart_suggestion(code = ...)]` is not a valid attribute
 LL | #[multipart_suggestion(parser_add_paren, code = "...", applicability = "machine-applicable")]
    |                                          ^^^^^^^^^^^^
    |
-   = help: only `applicability` is a valid nested attributes
+   = help: only `style` and `applicability` are valid nested attributes
 
 error: multipart suggestion without any `#[suggestion_part(...)]` fields
   --> $DIR/subdiagnostic-derive.rs:536:1
@@ -445,6 +445,62 @@ error: `code = "..."`/`code(...)` must contain only string literals
 LL |     #[suggestion_part(code = 3)]
    |                       ^^^^^^^^
 
+error: specified multiple times
+  --> $DIR/subdiagnostic-derive.rs:746:61
+   |
+LL | #[suggestion(parser_add_paren, code = "", style = "hidden", style = "normal")]
+   |                                                             ^^^^^^^^^^^^^^^^
+   |
+note: previously specified here
+  --> $DIR/subdiagnostic-derive.rs:746:43
+   |
+LL | #[suggestion(parser_add_paren, code = "", style = "hidden", style = "normal")]
+   |                                           ^^^^^^^^^^^^^^^^
+
+error: `#[suggestion_hidden(...)]` is not a valid attribute
+  --> $DIR/subdiagnostic-derive.rs:755:1
+   |
+LL | #[suggestion_hidden(parser_add_paren, code = "")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: Use `#[suggestion(..., style = "hidden")]` instead
+
+error: `#[suggestion_hidden(...)]` is not a valid attribute
+  --> $DIR/subdiagnostic-derive.rs:763:1
+   |
+LL | #[suggestion_hidden(parser_add_paren, code = "", style = "normal")]
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = help: Use `#[suggestion(..., style = "hidden")]` instead
+
+error: invalid suggestion style
+  --> $DIR/subdiagnostic-derive.rs:771:51
+   |
+LL | #[suggestion(parser_add_paren, code = "", style = "foo")]
+   |                                                   ^^^^^
+   |
+   = help: valid styles are `normal`, `short`, `hidden`, `verbose` and `tool-only`
+
+error: `#[suggestion(style = ...)]` is not a valid attribute
+  --> $DIR/subdiagnostic-derive.rs:779:43
+   |
+LL | #[suggestion(parser_add_paren, code = "", style = 42)]
+   |                                           ^^^^^^^^^^
+
+error: `#[suggestion(style)]` is not a valid attribute
+  --> $DIR/subdiagnostic-derive.rs:787:43
+   |
+LL | #[suggestion(parser_add_paren, code = "", style)]
+   |                                           ^^^^^
+   |
+   = help: a diagnostic slug must be the first argument to the attribute
+
+error: `#[suggestion(style(...))]` is not a valid attribute
+  --> $DIR/subdiagnostic-derive.rs:795:43
+   |
+LL | #[suggestion(parser_add_paren, code = "", style("foo"))]
+   |                                           ^^^^^^^^^^^^
+
 error: cannot find attribute `foo` in this scope
   --> $DIR/subdiagnostic-derive.rs:63:3
    |
@@ -505,6 +561,6 @@ error[E0425]: cannot find value `slug` in module `rustc_errors::fluent`
 LL | #[label(slug)]
    |         ^^^^ not found in `rustc_errors::fluent`
 
-error: aborting due to 72 previous errors
+error: aborting due to 79 previous errors
 
 For more information about this error, try `rustc --explain E0425`.
diff --git a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.rs b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.rs
index 41c9a265cd7..cd06423e3a5 100644
--- a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.rs
+++ b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.rs
@@ -8,8 +8,8 @@ use core::alloc::Layout;
 
 #[alloc_error_handler]
 fn oom(
-    info: &Layout, //~ ERROR argument should be `Layout`
-) -> () //~ ERROR return type should be `!`
+    info: &Layout, //~^ ERROR mismatched types
+) -> () //~^^ ERROR mismatched types
 {
     loop {}
 }
diff --git a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr
index 34e09da45ad..d0911fa3985 100644
--- a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr
+++ b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-1.stderr
@@ -1,14 +1,50 @@
-error: return type should be `!`
-  --> $DIR/alloc-error-handler-bad-signature-1.rs:12:6
+error[E0308]: mismatched types
+  --> $DIR/alloc-error-handler-bad-signature-1.rs:10:1
    |
-LL | ) -> ()
-   |      ^^
-
-error: argument should be `Layout`
-  --> $DIR/alloc-error-handler-bad-signature-1.rs:11:11
+LL |    #[alloc_error_handler]
+   |    ---------------------- in this procedural macro expansion
+LL |    fn oom(
+   |   _^
+   |  |_|
+   | ||
+LL | ||     info: &Layout,
+LL | || ) -> ()
+   | ||_______- arguments to this function are incorrect
+LL | |  {
+LL | |      loop {}
+LL | |  }
+   | |__^ expected `&Layout`, found struct `Layout`
+   |
+note: function defined here
+  --> $DIR/alloc-error-handler-bad-signature-1.rs:10:4
    |
+LL | fn oom(
+   |    ^^^
 LL |     info: &Layout,
-   |           ^^^^^^^
+   |     -------------
+   = note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0308]: mismatched types
+  --> $DIR/alloc-error-handler-bad-signature-1.rs:10:1
+   |
+LL |    #[alloc_error_handler]
+   |    ---------------------- in this procedural macro expansion
+LL |    fn oom(
+   |   _^
+   |  |_|
+   | ||
+LL | ||     info: &Layout,
+LL | || ) -> ()
+   | ||_______^ expected `!`, found `()`
+LL | |  {
+LL | |      loop {}
+LL | |  }
+   | |__- expected `!` because of return type
+   |
+   = note:   expected type `!`
+           found unit type `()`
+   = note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.rs b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.rs
index 49ea3105fbd..4f76257fc72 100644
--- a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.rs
+++ b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.rs
@@ -8,8 +8,8 @@ struct Layout;
 
 #[alloc_error_handler]
 fn oom(
-    info: Layout, //~ ERROR argument should be `Layout`
-) { //~ ERROR return type should be `!`
+    info: Layout, //~^ ERROR mismatched types
+) { //~^^ ERROR mismatched types
     loop {}
 }
 
diff --git a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr
index 85544b0c384..5777279855d 100644
--- a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr
+++ b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-2.stderr
@@ -1,14 +1,63 @@
-error: return type should be `!`
-  --> $DIR/alloc-error-handler-bad-signature-2.rs:12:3
+error[E0308]: mismatched types
+  --> $DIR/alloc-error-handler-bad-signature-2.rs:10:1
    |
-LL | ) {
-   |   ^
-
-error: argument should be `Layout`
-  --> $DIR/alloc-error-handler-bad-signature-2.rs:11:11
+LL |    #[alloc_error_handler]
+   |    ---------------------- in this procedural macro expansion
+LL |    fn oom(
+   |   _^
+   |  |_|
+   | ||
+LL | ||     info: Layout,
+LL | || ) {
+   | || -
+   | ||_|
+   | |  arguments to this function are incorrect
+LL | |      loop {}
+LL | |  }
+   | |__^ expected struct `Layout`, found struct `core::alloc::Layout`
+   |
+   = note: struct `core::alloc::Layout` and struct `Layout` have similar names, but are actually distinct types
+note: struct `core::alloc::Layout` is defined in crate `core`
+  --> $SRC_DIR/core/src/alloc/layout.rs:LL:COL
+   |
+LL | pub struct Layout {
+   | ^^^^^^^^^^^^^^^^^
+note: struct `Layout` is defined in the current crate
+  --> $DIR/alloc-error-handler-bad-signature-2.rs:7:1
+   |
+LL | struct Layout;
+   | ^^^^^^^^^^^^^
+note: function defined here
+  --> $DIR/alloc-error-handler-bad-signature-2.rs:10:4
    |
+LL | fn oom(
+   |    ^^^
 LL |     info: Layout,
-   |           ^^^^^^
+   |     ------------
+   = note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
+
+error[E0308]: mismatched types
+  --> $DIR/alloc-error-handler-bad-signature-2.rs:10:1
+   |
+LL |    #[alloc_error_handler]
+   |    ---------------------- in this procedural macro expansion
+LL |    fn oom(
+   |   _^
+   |  |_|
+   | ||
+LL | ||     info: Layout,
+LL | || ) {
+   | || ^
+   | ||_|
+   | |  expected `!`, found `()`
+LL | |      loop {}
+LL | |  }
+   | |__- expected `!` because of return type
+   |
+   = note:   expected type `!`
+           found unit type `()`
+   = note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
 
 error: aborting due to 2 previous errors
 
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.rs b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.rs
index 321fd954db6..8430fabe84d 100644
--- a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.rs
+++ b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.rs
@@ -7,7 +7,7 @@
 struct Layout;
 
 #[alloc_error_handler]
-fn oom() -> ! { //~ ERROR function should have one argument
+fn oom() -> ! { //~ ERROR this function takes 0 arguments but 1 argument was supplied
     loop {}
 }
 
diff --git a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
index 8575e7508f1..77ea8ef0520 100644
--- a/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
+++ b/src/test/ui/alloc-error/alloc-error-handler-bad-signature-3.stderr
@@ -1,8 +1,25 @@
-error: function should have one argument
+error[E0061]: this function takes 0 arguments but 1 argument was supplied
   --> $DIR/alloc-error-handler-bad-signature-3.rs:10:1
    |
+LL |   #[alloc_error_handler]
+   |   ---------------------- in this procedural macro expansion
+LL |   fn oom() -> ! {
+   |  _-^^^^^^^^^^^^
+LL | |     loop {}
+LL | | }
+   | |_- argument of type `core::alloc::Layout` unexpected
+   |
+note: function defined here
+  --> $DIR/alloc-error-handler-bad-signature-3.rs:10:4
+   |
 LL | fn oom() -> ! {
-   | ^^^^^^^^^^^^^
+   |    ^^^
+   = note: this error originates in the attribute macro `alloc_error_handler` (in Nightly builds, run with -Z macro-backtrace for more info)
+help: remove the extra argument
+   |
+LL | fn oom() -> !() {
+   |              ++
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0061`.
diff --git a/src/test/ui/array-slice-vec/array-break-length.stderr b/src/test/ui/array-slice-vec/array-break-length.stderr
index 93f1c238bcc..2df7b6d7f63 100644
--- a/src/test/ui/array-slice-vec/array-break-length.stderr
+++ b/src/test/ui/array-slice-vec/array-break-length.stderr
@@ -1,8 +1,8 @@
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/array-break-length.rs:3:17
    |
 LL |         |_: [_; break]| {}
-   |                 ^^^^^ cannot `break` outside of a loop
+   |                 ^^^^^ cannot `break` outside of a loop or labeled block
 
 error[E0268]: `continue` outside of a loop
   --> $DIR/array-break-length.rs:7:17
diff --git a/src/test/ui/asm/aarch64/llvm-58384.rs b/src/test/ui/asm/aarch64/llvm-58384.rs
new file mode 100644
index 00000000000..308f7890829
--- /dev/null
+++ b/src/test/ui/asm/aarch64/llvm-58384.rs
@@ -0,0 +1,16 @@
+// only-aarch64
+// run-pass
+// needs-asm-support
+
+// Test that we properly work around this LLVM issue:
+// https://github.com/llvm/llvm-project/issues/58384
+
+use std::arch::asm;
+
+fn main() {
+    let a: i32;
+    unsafe {
+        asm!("", inout("x0") 435 => a);
+    }
+    assert_eq!(a, 435);
+}
diff --git a/src/test/ui/assoc-inherent.rs b/src/test/ui/assoc-inherent.rs
deleted file mode 100644
index c579c962ffc..00000000000
--- a/src/test/ui/assoc-inherent.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Test that inherent associated types work with
-// inherent_associated_types feature gate.
-
-#![feature(inherent_associated_types)]
-#![allow(incomplete_features)]
-
-struct Foo;
-
-impl Foo {
-    type Bar = isize;
-}
-
-impl Foo {
-    type Baz; //~ ERROR associated type in `impl` without body
-}
-
-fn main() {
-    let x : Foo::Bar; //~ERROR ambiguous associated type
-    x = 0isize;
-}
diff --git a/src/test/ui/assoc-inherent.stderr b/src/test/ui/assoc-inherent.stderr
deleted file mode 100644
index b703453fa03..00000000000
--- a/src/test/ui/assoc-inherent.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error: associated type in `impl` without body
-  --> $DIR/assoc-inherent.rs:14:5
-   |
-LL |     type Baz;
-   |     ^^^^^^^^-
-   |             |
-   |             help: provide a definition for the type: `= <type>;`
-
-error[E0223]: ambiguous associated type
-  --> $DIR/assoc-inherent.rs:18:13
-   |
-LL |     let x : Foo::Bar;
-   |             ^^^^^^^^ help: use fully-qualified syntax: `<Foo as Trait>::Bar`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0223`.
diff --git a/src/test/ui/associated-inherent-types/assoc-inherent-no-body.rs b/src/test/ui/associated-inherent-types/assoc-inherent-no-body.rs
new file mode 100644
index 00000000000..71f65b92eae
--- /dev/null
+++ b/src/test/ui/associated-inherent-types/assoc-inherent-no-body.rs
@@ -0,0 +1,10 @@
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct Foo;
+
+impl Foo {
+    type Baz; //~ ERROR associated type in `impl` without body
+}
+
+fn main() {}
diff --git a/src/test/ui/associated-inherent-types/assoc-inherent-no-body.stderr b/src/test/ui/associated-inherent-types/assoc-inherent-no-body.stderr
new file mode 100644
index 00000000000..387a5658da3
--- /dev/null
+++ b/src/test/ui/associated-inherent-types/assoc-inherent-no-body.stderr
@@ -0,0 +1,10 @@
+error: associated type in `impl` without body
+  --> $DIR/assoc-inherent-no-body.rs:7:5
+   |
+LL |     type Baz;
+   |     ^^^^^^^^-
+   |             |
+   |             help: provide a definition for the type: `= <type>;`
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/associated-inherent-types/assoc-inherent-use.rs b/src/test/ui/associated-inherent-types/assoc-inherent-use.rs
new file mode 100644
index 00000000000..7ae425e2aaa
--- /dev/null
+++ b/src/test/ui/associated-inherent-types/assoc-inherent-use.rs
@@ -0,0 +1,14 @@
+// check-pass
+#![feature(inherent_associated_types)]
+#![allow(incomplete_features)]
+
+struct Foo;
+
+impl Foo {
+    type Bar = isize;
+}
+
+fn main() {
+    let x: Foo::Bar;
+    x = 0isize;
+}
diff --git a/src/test/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs b/src/test/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs
new file mode 100644
index 00000000000..087743e505d
--- /dev/null
+++ b/src/test/ui/c-variadic/feature-gate-extended_varargs_abi_support.rs
@@ -0,0 +1,19 @@
+#![feature(abi_efiapi)]
+
+fn efiapi(f: extern "efiapi" fn(usize, ...)) {
+    //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
+    //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
+    f(22, 44);
+}
+fn sysv(f: extern "sysv64" fn(usize, ...)) {
+    //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
+    //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
+    f(22, 44);
+}
+fn win(f: extern "win64" fn(usize, ...)) {
+    //~^ ERROR: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
+    //~^^ ERROR: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
+    f(22, 44);
+}
+
+fn main() {}
diff --git a/src/test/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr b/src/test/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr
new file mode 100644
index 00000000000..007d7d7953c
--- /dev/null
+++ b/src/test/ui/c-variadic/feature-gate-extended_varargs_abi_support.stderr
@@ -0,0 +1,49 @@
+error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
+   |
+LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information
+   = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
+
+error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:3:14
+   |
+LL | fn efiapi(f: extern "efiapi" fn(usize, ...)) {
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
+
+error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
+   |
+LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information
+   = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
+
+error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:8:12
+   |
+LL | fn sysv(f: extern "sysv64" fn(usize, ...)) {
+   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
+
+error[E0658]: using calling conventions other than `C` or `cdecl` for varargs functions is unstable
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
+   |
+LL | fn win(f: extern "win64" fn(usize, ...)) {
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: see issue #100189 <https://github.com/rust-lang/rust/issues/100189> for more information
+   = help: add `#![feature(extended_varargs_abi_support)]` to the crate attributes to enable
+
+error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
+  --> $DIR/feature-gate-extended_varargs_abi_support.rs:13:11
+   |
+LL | fn win(f: extern "win64" fn(usize, ...)) {
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
+
+error: aborting due to 6 previous errors
+
+Some errors have detailed explanations: E0045, E0658.
+For more information about an error, try `rustc --explain E0045`.
diff --git a/src/test/ui/c-variadic/variadic-ffi-1.rs b/src/test/ui/c-variadic/variadic-ffi-1.rs
index a76efd9a205..24407a71ce6 100644
--- a/src/test/ui/c-variadic/variadic-ffi-1.rs
+++ b/src/test/ui/c-variadic/variadic-ffi-1.rs
@@ -6,7 +6,9 @@
 trait Sized { }
 
 extern "stdcall" {
-    fn printf(_: *const u8, ...); //~ ERROR: variadic function must have C or cdecl calling
+    fn printf(_: *const u8, ...);
+    //~^ ERROR: C-variadic function must have a compatible calling convention,
+    // like C, cdecl, win64, sysv64 or efiapi
 }
 
 extern "C" {
diff --git a/src/test/ui/c-variadic/variadic-ffi-1.stderr b/src/test/ui/c-variadic/variadic-ffi-1.stderr
index 2ffb80f7ef6..4beea83d8a5 100644
--- a/src/test/ui/c-variadic/variadic-ffi-1.stderr
+++ b/src/test/ui/c-variadic/variadic-ffi-1.stderr
@@ -1,17 +1,17 @@
-error[E0045]: C-variadic function must have C or cdecl calling convention
+error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
   --> $DIR/variadic-ffi-1.rs:9:5
    |
 LL |     fn printf(_: *const u8, ...);
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadics require C or cdecl calling convention
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
 
 error[E0060]: this function takes at least 2 arguments but 0 arguments were supplied
-  --> $DIR/variadic-ffi-1.rs:20:9
+  --> $DIR/variadic-ffi-1.rs:22:9
    |
 LL |         foo();
    |         ^^^-- two arguments of type `isize` and `u8` are missing
    |
 note: function defined here
-  --> $DIR/variadic-ffi-1.rs:13:8
+  --> $DIR/variadic-ffi-1.rs:15:8
    |
 LL |     fn foo(f: isize, x: u8, ...);
    |        ^^^
@@ -21,13 +21,13 @@ LL |         foo(/* isize */, /* u8 */);
    |            ~~~~~~~~~~~~~~~~~~~~~~~
 
 error[E0060]: this function takes at least 2 arguments but 1 argument was supplied
-  --> $DIR/variadic-ffi-1.rs:21:9
+  --> $DIR/variadic-ffi-1.rs:23:9
    |
 LL |         foo(1);
    |         ^^^--- an argument of type `u8` is missing
    |
 note: function defined here
-  --> $DIR/variadic-ffi-1.rs:13:8
+  --> $DIR/variadic-ffi-1.rs:15:8
    |
 LL |     fn foo(f: isize, x: u8, ...);
    |        ^^^
@@ -37,7 +37,7 @@ LL |         foo(1, /* u8 */);
    |            ~~~~~~~~~~~~~
 
 error[E0308]: mismatched types
-  --> $DIR/variadic-ffi-1.rs:23:56
+  --> $DIR/variadic-ffi-1.rs:25:56
    |
 LL |         let x: unsafe extern "C" fn(f: isize, x: u8) = foo;
    |                -------------------------------------   ^^^ expected non-variadic fn, found variadic function
@@ -48,7 +48,7 @@ LL |         let x: unsafe extern "C" fn(f: isize, x: u8) = foo;
                  found fn item `unsafe extern "C" fn(_, _, ...) {foo}`
 
 error[E0308]: mismatched types
-  --> $DIR/variadic-ffi-1.rs:24:54
+  --> $DIR/variadic-ffi-1.rs:26:54
    |
 LL |         let y: extern "C" fn(f: isize, x: u8, ...) = bar;
    |                -----------------------------------   ^^^ expected variadic fn, found non-variadic function
@@ -59,37 +59,37 @@ LL |         let y: extern "C" fn(f: isize, x: u8, ...) = bar;
                  found fn item `extern "C" fn(_, _) {bar}`
 
 error[E0617]: can't pass `f32` to variadic function
-  --> $DIR/variadic-ffi-1.rs:26:19
+  --> $DIR/variadic-ffi-1.rs:28:19
    |
 LL |         foo(1, 2, 3f32);
    |                   ^^^^ help: cast the value to `c_double`: `3f32 as c_double`
 
 error[E0617]: can't pass `bool` to variadic function
-  --> $DIR/variadic-ffi-1.rs:27:19
+  --> $DIR/variadic-ffi-1.rs:29:19
    |
 LL |         foo(1, 2, true);
    |                   ^^^^ help: cast the value to `c_int`: `true as c_int`
 
 error[E0617]: can't pass `i8` to variadic function
-  --> $DIR/variadic-ffi-1.rs:28:19
+  --> $DIR/variadic-ffi-1.rs:30:19
    |
 LL |         foo(1, 2, 1i8);
    |                   ^^^ help: cast the value to `c_int`: `1i8 as c_int`
 
 error[E0617]: can't pass `u8` to variadic function
-  --> $DIR/variadic-ffi-1.rs:29:19
+  --> $DIR/variadic-ffi-1.rs:31:19
    |
 LL |         foo(1, 2, 1u8);
    |                   ^^^ help: cast the value to `c_uint`: `1u8 as c_uint`
 
 error[E0617]: can't pass `i16` to variadic function
-  --> $DIR/variadic-ffi-1.rs:30:19
+  --> $DIR/variadic-ffi-1.rs:32:19
    |
 LL |         foo(1, 2, 1i16);
    |                   ^^^^ help: cast the value to `c_int`: `1i16 as c_int`
 
 error[E0617]: can't pass `u16` to variadic function
-  --> $DIR/variadic-ffi-1.rs:31:19
+  --> $DIR/variadic-ffi-1.rs:33:19
    |
 LL |         foo(1, 2, 1u16);
    |                   ^^^^ help: cast the value to `c_uint`: `1u16 as c_uint`
diff --git a/src/test/ui/c-variadic/variadic-ffi-2.rs b/src/test/ui/c-variadic/variadic-ffi-2.rs
index 224ac16f458..96cea87546e 100644
--- a/src/test/ui/c-variadic/variadic-ffi-2.rs
+++ b/src/test/ui/c-variadic/variadic-ffi-2.rs
@@ -1,7 +1,20 @@
 // ignore-arm stdcall isn't supported
+#![feature(extended_varargs_abi_support)]
+#![feature(abi_efiapi)]
 
 fn baz(f: extern "stdcall" fn(usize, ...)) {
-    //~^ ERROR: variadic function must have C or cdecl calling convention
+    //~^ ERROR: C-variadic function must have a compatible calling convention,
+    // like C, cdecl, win64, sysv64 or efiapi
+    f(22, 44);
+}
+
+fn sysv(f: extern "sysv64" fn(usize, ...)) {
+    f(22, 44);
+}
+fn win(f: extern "win64" fn(usize, ...)) {
+    f(22, 44);
+}
+fn efiapi(f: extern "efiapi" fn(usize, ...)) {
     f(22, 44);
 }
 
diff --git a/src/test/ui/c-variadic/variadic-ffi-2.stderr b/src/test/ui/c-variadic/variadic-ffi-2.stderr
index 4c8b8d2b2e1..4e74c9d9227 100644
--- a/src/test/ui/c-variadic/variadic-ffi-2.stderr
+++ b/src/test/ui/c-variadic/variadic-ffi-2.stderr
@@ -1,8 +1,8 @@
-error[E0045]: C-variadic function must have C or cdecl calling convention
-  --> $DIR/variadic-ffi-2.rs:3:11
+error[E0045]: C-variadic function must have a compatible calling convention, like `C`, `cdecl`, `win64`, `sysv64` or `efiapi`
+  --> $DIR/variadic-ffi-2.rs:5:11
    |
 LL | fn baz(f: extern "stdcall" fn(usize, ...)) {
-   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadics require C or cdecl calling convention
+   |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/closures/binder/late-bound-in-body.rs b/src/test/ui/closures/binder/late-bound-in-body.rs
new file mode 100644
index 00000000000..bb5c7552fda
--- /dev/null
+++ b/src/test/ui/closures/binder/late-bound-in-body.rs
@@ -0,0 +1,9 @@
+// check-pass
+
+#![feature(closure_lifetime_binder)]
+
+fn main() {
+    let _ = for<'a> || -> () {
+        let _: &'a bool = &true;
+    };
+}
diff --git a/src/test/ui/closures/binder/nested-closures-regions.rs b/src/test/ui/closures/binder/nested-closures-regions.rs
new file mode 100644
index 00000000000..6bfc6c80b78
--- /dev/null
+++ b/src/test/ui/closures/binder/nested-closures-regions.rs
@@ -0,0 +1,9 @@
+// check-pass
+
+#![feature(closure_lifetime_binder)]
+#![feature(rustc_attrs)]
+
+#[rustc_regions]
+fn main() {
+    for<'a> || -> () { for<'c> |_: &'a ()| -> () {}; };
+}
diff --git a/src/test/ui/closures/binder/nested-closures-regions.stderr b/src/test/ui/closures/binder/nested-closures-regions.stderr
new file mode 100644
index 00000000000..b385e0ed6e0
--- /dev/null
+++ b/src/test/ui/closures/binder/nested-closures-regions.stderr
@@ -0,0 +1,38 @@
+note: external requirements
+  --> $DIR/nested-closures-regions.rs:8:24
+   |
+LL |     for<'a> || -> () { for<'c> |_: &'a ()| -> () {}; };
+   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+   = note: defining type: main::{closure#0}::{closure#0} with closure substs [
+               i8,
+               extern "rust-call" fn((&(),)),
+               (),
+           ]
+   = note: late-bound region is '_#4r
+   = note: late-bound region is '_#2r
+   = note: number of external vids: 3
+   = note: where '_#1r: '_#2r
+   = note: where '_#2r: '_#1r
+
+note: no external requirements
+  --> $DIR/nested-closures-regions.rs:8:5
+   |
+LL |     for<'a> || -> () { for<'c> |_: &'a ()| -> () {}; };
+   |     ^^^^^^^^^^^^^^^^
+   |
+   = note: defining type: main::{closure#0} with closure substs [
+               i8,
+               extern "rust-call" fn(()),
+               (),
+           ]
+   = note: late-bound region is '_#2r
+
+note: no external requirements
+  --> $DIR/nested-closures-regions.rs:7:1
+   |
+LL | fn main() {
+   | ^^^^^^^^^
+   |
+   = note: defining type: main
+
diff --git a/src/test/ui/closures/binder/nested-closures.rs b/src/test/ui/closures/binder/nested-closures.rs
new file mode 100644
index 00000000000..b3c36e7eebb
--- /dev/null
+++ b/src/test/ui/closures/binder/nested-closures.rs
@@ -0,0 +1,7 @@
+// check-pass
+
+#![feature(closure_lifetime_binder)]
+
+fn main() {
+    for<'a> || -> () { for<'c> |_: &'a ()| -> () {}; };
+}
diff --git a/src/test/ui/closures/closure-array-break-length.stderr b/src/test/ui/closures/closure-array-break-length.stderr
index 2b8ab9bfc44..7e0b0027a6f 100644
--- a/src/test/ui/closures/closure-array-break-length.stderr
+++ b/src/test/ui/closures/closure-array-break-length.stderr
@@ -10,11 +10,11 @@ error[E0268]: `continue` outside of a loop
 LL |     while |_: [_; continue]| {} {}
    |                   ^^^^^^^^ cannot `continue` outside of a loop
 
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/closure-array-break-length.rs:6:19
    |
 LL |     while |_: [_; break]| {} {}
-   |                   ^^^^^ cannot `break` outside of a loop
+   |                   ^^^^^ cannot `break` outside of a loop or labeled block
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/closures/issue-23012-supertrait-signature-inference.rs b/src/test/ui/closures/issue-23012-supertrait-signature-inference.rs
new file mode 100644
index 00000000000..5899b703e7c
--- /dev/null
+++ b/src/test/ui/closures/issue-23012-supertrait-signature-inference.rs
@@ -0,0 +1,29 @@
+// check-pass
+// Checks that we can infer a closure signature even if the `FnOnce` bound is
+// a supertrait of the obligations we have currently registered for the Ty var.
+
+pub trait Receive<T, E>: FnOnce(Result<T, E>) {
+    fn receive(self, res: Result<T, E>);
+}
+
+impl<T, E, F: FnOnce(Result<T, E>)> Receive<T, E> for F {
+    fn receive(self, res: Result<T, E>) {
+        self(res)
+    }
+}
+
+pub trait Async<T, E> {
+    fn receive<F: Receive<T, E>>(self, f: F);
+}
+
+impl<T, E> Async<T, E> for Result<T, E> {
+    fn receive<F: Receive<T, E>>(self, f: F) {
+        f(self)
+    }
+}
+
+pub fn main() {
+    Ok::<u32, ()>(123).receive(|res| {
+        res.unwrap();
+    });
+}
diff --git a/src/test/ui/coherence/strict-coherence-needs-negative-coherence.rs b/src/test/ui/coherence/strict-coherence-needs-negative-coherence.rs
new file mode 100644
index 00000000000..221683dd56f
--- /dev/null
+++ b/src/test/ui/coherence/strict-coherence-needs-negative-coherence.rs
@@ -0,0 +1,7 @@
+#![feature(rustc_attrs)]
+
+#[rustc_strict_coherence]
+trait Foo {}
+//~^ ERROR to use `strict_coherence` on this trait, the `with_negative_coherence` feature must be enabled
+
+fn main() {}
diff --git a/src/test/ui/coherence/strict-coherence-needs-negative-coherence.stderr b/src/test/ui/coherence/strict-coherence-needs-negative-coherence.stderr
new file mode 100644
index 00000000000..b5472928778
--- /dev/null
+++ b/src/test/ui/coherence/strict-coherence-needs-negative-coherence.stderr
@@ -0,0 +1,10 @@
+error: to use `strict_coherence` on this trait, the `with_negative_coherence` feature must be enabled
+  --> $DIR/strict-coherence-needs-negative-coherence.rs:4:1
+   |
+LL | #[rustc_strict_coherence]
+   | ------------------------- due to this attribute
+LL | trait Foo {}
+   | ^^^^^^^^^
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/compiletest-self-test/compile-flags-last.rs b/src/test/ui/compiletest-self-test/compile-flags-last.rs
new file mode 100644
index 00000000000..232df10f1a8
--- /dev/null
+++ b/src/test/ui/compiletest-self-test/compile-flags-last.rs
@@ -0,0 +1,7 @@
+// Check that the arguments provided through `// compile-flags` are added last to the command line
+// in UI tests. To ensure that we invoke rustc with a flag that expects an argument withut actually
+// providing it. If the compile-flags are not last, the test will fail as rustc will interpret the
+// next flag as the argument of this flag.
+//
+// compile-flags: --cap-lints
+// error-pattern: Argument to option 'cap-lints' missing
diff --git a/src/test/ui/compiletest-self-test/compile-flags-last.stderr b/src/test/ui/compiletest-self-test/compile-flags-last.stderr
new file mode 100644
index 00000000000..d8d40a7d9f1
--- /dev/null
+++ b/src/test/ui/compiletest-self-test/compile-flags-last.stderr
@@ -0,0 +1,2 @@
+error: Argument to option 'cap-lints' missing
+
diff --git a/src/test/ui/ui-testing-optout.rs b/src/test/ui/compiletest-self-test/ui-testing-optout.rs
index 88e81158316..88e81158316 100644
--- a/src/test/ui/ui-testing-optout.rs
+++ b/src/test/ui/compiletest-self-test/ui-testing-optout.rs
diff --git a/src/test/ui/ui-testing-optout.stderr b/src/test/ui/compiletest-self-test/ui-testing-optout.stderr
index 652c472c0bc..652c472c0bc 100644
--- a/src/test/ui/ui-testing-optout.stderr
+++ b/src/test/ui/compiletest-self-test/ui-testing-optout.stderr
diff --git a/src/test/ui/const-generics/generic_const_exprs/issue-99705.rs b/src/test/ui/const-generics/generic_const_exprs/issue-99705.rs
new file mode 100644
index 00000000000..75b57b621bb
--- /dev/null
+++ b/src/test/ui/const-generics/generic_const_exprs/issue-99705.rs
@@ -0,0 +1,33 @@
+// check-pass
+#![crate_type = "lib"]
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+pub trait MyIterator {
+    type Output;
+}
+
+pub trait Foo {
+    const ABC: usize;
+}
+
+pub struct IteratorStruct<const N: usize>{
+
+}
+
+pub struct Bar<const N: usize> {
+    pub data: [usize; N]
+}
+
+impl<const N: usize> MyIterator for IteratorStruct<N> {
+    type Output = Bar<N>;
+}
+
+pub fn test1<T: Foo>() -> impl MyIterator<Output = Bar<{T::ABC}>> where [(); T::ABC]: Sized {
+    IteratorStruct::<{T::ABC}>{}
+}
+
+pub trait Baz<const N: usize>{}
+impl<const N: usize> Baz<N> for Bar<N> {}
+pub fn test2<T: Foo>() -> impl MyIterator<Output = impl Baz<{ T::ABC }>> where [(); T::ABC]: Sized {
+    IteratorStruct::<{T::ABC}>{}
+}
diff --git a/src/test/ui/const-generics/issues/issue-82956.stderr b/src/test/ui/const-generics/issues/issue-82956.stderr
index c8b999da981..d2320293e85 100644
--- a/src/test/ui/const-generics/issues/issue-82956.stderr
+++ b/src/test/ui/const-generics/issues/issue-82956.stderr
@@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `IntoIter`
   --> $DIR/issue-82956.rs:25:24
    |
 LL |         let mut iter = IntoIter::new(self);
-   |                        ^^^^^^^^ not found in this scope
+   |                        ^^^^^^^^ use of undeclared type `IntoIter`
    |
 help: consider importing one of these items
    |
diff --git a/src/test/ui/consts/issue-103790.rs b/src/test/ui/consts/issue-103790.rs
new file mode 100644
index 00000000000..ea3cac605b1
--- /dev/null
+++ b/src/test/ui/consts/issue-103790.rs
@@ -0,0 +1,10 @@
+#![feature(generic_const_exprs)]
+#![allow(incomplete_features)]
+
+struct S<const S: (), const S: S = { S }>;
+//~^ ERROR the name `S` is already used for a generic parameter in this item's generic parameters
+//~| ERROR missing generics for struct `S`
+//~| ERROR cycle detected when computing type of `S::S`
+//~| ERROR cycle detected when computing type of `S`
+
+fn main() {}
diff --git a/src/test/ui/consts/issue-103790.stderr b/src/test/ui/consts/issue-103790.stderr
new file mode 100644
index 00000000000..41b0816dc32
--- /dev/null
+++ b/src/test/ui/consts/issue-103790.stderr
@@ -0,0 +1,65 @@
+error[E0403]: the name `S` is already used for a generic parameter in this item's generic parameters
+  --> $DIR/issue-103790.rs:4:29
+   |
+LL | struct S<const S: (), const S: S = { S }>;
+   |                -            ^ already used
+   |                |
+   |                first use of `S`
+
+error[E0107]: missing generics for struct `S`
+  --> $DIR/issue-103790.rs:4:32
+   |
+LL | struct S<const S: (), const S: S = { S }>;
+   |                                ^ expected at least 1 generic argument
+   |
+note: struct defined here, with at least 1 generic parameter: `S`
+  --> $DIR/issue-103790.rs:4:8
+   |
+LL | struct S<const S: (), const S: S = { S }>;
+   |        ^ -----------
+help: add missing generic argument
+   |
+LL | struct S<const S: (), const S: S<S> = { S }>;
+   |                                ~~~~
+
+error[E0391]: cycle detected when computing type of `S::S`
+  --> $DIR/issue-103790.rs:4:32
+   |
+LL | struct S<const S: (), const S: S = { S }>;
+   |                                ^
+   |
+   = note: ...which immediately requires computing type of `S::S` again
+note: cycle used when computing type of `S`
+  --> $DIR/issue-103790.rs:4:1
+   |
+LL | struct S<const S: (), const S: S = { S }>;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error[E0391]: cycle detected when computing type of `S`
+  --> $DIR/issue-103790.rs:4:1
+   |
+LL | struct S<const S: (), const S: S = { S }>;
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |
+note: ...which requires computing type of `S::S`...
+  --> $DIR/issue-103790.rs:4:32
+   |
+LL | struct S<const S: (), const S: S = { S }>;
+   |                                ^
+   = note: ...which again requires computing type of `S`, completing the cycle
+note: cycle used when collecting item types in top-level module
+  --> $DIR/issue-103790.rs:1:1
+   |
+LL | / #![feature(generic_const_exprs)]
+LL | | #![allow(incomplete_features)]
+LL | |
+LL | | struct S<const S: (), const S: S = { S }>;
+...  |
+LL | |
+LL | | fn main() {}
+   | |____________^
+
+error: aborting due to 4 previous errors
+
+Some errors have detailed explanations: E0107, E0391, E0403.
+For more information about an error, try `rustc --explain E0107`.
diff --git a/src/test/ui/derived-errors/issue-31997-1.stderr b/src/test/ui/derived-errors/issue-31997-1.stderr
index 6d177666ed0..2f4aabf8453 100644
--- a/src/test/ui/derived-errors/issue-31997-1.stderr
+++ b/src/test/ui/derived-errors/issue-31997-1.stderr
@@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `HashMap`
   --> $DIR/issue-31997-1.rs:20:19
    |
 LL |     let mut map = HashMap::new();
-   |                   ^^^^^^^ not found in this scope
+   |                   ^^^^^^^ use of undeclared type `HashMap`
    |
 help: consider importing this struct
    |
diff --git a/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.rs b/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.rs
index 15d06817577..6ab1fb7b039 100644
--- a/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.rs
+++ b/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.rs
@@ -3,7 +3,7 @@
 #[derive(Debug)]
 pub struct Whatever {
     pub field0: (),
-    field1: (), //~ ERROR fields `field1`, `field2`, `field3` and `field4` are never read
+    field1: (), //~ ERROR fields `field1`, `field2`, `field3`, and `field4` are never read
     field2: (),
     field3: (),
     field4: (),
diff --git a/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr b/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr
index 512b870fa4b..7f4f78cebc9 100644
--- a/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr
+++ b/src/test/ui/derives/clone-debug-dead-code-in-the-same-struct.stderr
@@ -1,4 +1,4 @@
-error: fields `field1`, `field2`, `field3` and `field4` are never read
+error: fields `field1`, `field2`, `field3`, and `field4` are never read
   --> $DIR/clone-debug-dead-code-in-the-same-struct.rs:6:5
    |
 LL | pub struct Whatever {
diff --git a/src/test/ui/error-codes/E0045.stderr b/src/test/ui/error-codes/E0045.stderr
index d163128bc8b..fcc613b11b8 100644
--- a/src/test/ui/error-codes/E0045.stderr
+++ b/src/test/ui/error-codes/E0045.stderr
@@ -1,8 +1,8 @@
-error[E0045]: C-variadic function must have C or cdecl calling convention
+error[E0045]: C-variadic function must have a compatible calling convention, like `C` or `cdecl`
   --> $DIR/E0045.rs:1:17
    |
 LL | extern "Rust" { fn foo(x: u8, ...); }
-   |                 ^^^^^^^^^^^^^^^^^^^ C-variadics require C or cdecl calling convention
+   |                 ^^^^^^^^^^^^^^^^^^^ C-variadic function must have a compatible calling convention
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0081.stderr b/src/test/ui/error-codes/E0081.stderr
index 64562fefc86..d4b21f6893b 100644
--- a/src/test/ui/error-codes/E0081.stderr
+++ b/src/test/ui/error-codes/E0081.stderr
@@ -32,7 +32,7 @@ LL |     First = -1,
    |             -- `-1` assigned here
 LL |
 LL |     Second = -2,
-   |     ----------- discriminant for `Last` incremented from this startpoint (`Second` + 1 variant later => `Last` = -1)
+   |     ------ discriminant for `Last` incremented from this startpoint (`Second` + 1 variant later => `Last` = -1)
 LL |
 LL |     Last,
    |     ---- `-1` assigned here
@@ -53,7 +53,7 @@ LL |     V4 = 0,
    |          - `0` assigned here
 LL |
 LL |     V5 = -2,
-   |     ------- discriminant for `V7` incremented from this startpoint (`V5` + 2 variants later => `V7` = 0)
+   |     -- discriminant for `V7` incremented from this startpoint (`V5` + 2 variants later => `V7` = 0)
 ...
 LL |     V7,
    |     -- `0` assigned here
@@ -68,7 +68,7 @@ LL |     V5 = -2,
    |          -- `-2` assigned here
 ...
 LL |     V8 = -3,
-   |     ------- discriminant for `V9` incremented from this startpoint (`V8` + 1 variant later => `V9` = -2)
+   |     -- discriminant for `V9` incremented from this startpoint (`V8` + 1 variant later => `V9` = -2)
 LL |
 LL |     V9,
    |     -- `-2` assigned here
diff --git a/src/test/ui/error-codes/E0268.stderr b/src/test/ui/error-codes/E0268.stderr
index c926f9e4874..6422e8a9490 100644
--- a/src/test/ui/error-codes/E0268.stderr
+++ b/src/test/ui/error-codes/E0268.stderr
@@ -1,8 +1,8 @@
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/E0268.rs:2:5
    |
 LL |     break;
-   |     ^^^^^ cannot `break` outside of a loop
+   |     ^^^^^ cannot `break` outside of a loop or labeled block
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/error-codes/E0767.rs b/src/test/ui/error-codes/E0767.rs
index 6c6cb746e6c..14215d36a38 100644
--- a/src/test/ui/error-codes/E0767.rs
+++ b/src/test/ui/error-codes/E0767.rs
@@ -1,6 +1,7 @@
-fn main () {
+fn main() {
     'a: loop {
         || {
+            //~^ ERROR mismatched types
             loop { break 'a; } //~ ERROR E0767
         }
     }
diff --git a/src/test/ui/error-codes/E0767.stderr b/src/test/ui/error-codes/E0767.stderr
index 2429823306b..ee85247301c 100644
--- a/src/test/ui/error-codes/E0767.stderr
+++ b/src/test/ui/error-codes/E0767.stderr
@@ -1,14 +1,27 @@
 error[E0767]: use of unreachable label `'a`
-  --> $DIR/E0767.rs:4:26
+  --> $DIR/E0767.rs:5:26
    |
 LL |     'a: loop {
    |     -- unreachable label defined here
-LL |         || {
+...
 LL |             loop { break 'a; }
    |                          ^^ unreachable label `'a`
    |
    = note: labels are unreachable through functions, closures, async blocks and modules
 
-error: aborting due to previous error
+error[E0308]: mismatched types
+  --> $DIR/E0767.rs:3:9
+   |
+LL | /         || {
+LL | |
+LL | |             loop { break 'a; }
+LL | |         }
+   | |_________^ expected `()`, found closure
+   |
+   = note: expected unit type `()`
+                found closure `[closure@$DIR/E0767.rs:3:9: 3:11]`
+
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0767`.
+Some errors have detailed explanations: E0308, E0767.
+For more information about an error, try `rustc --explain E0308`.
diff --git a/src/test/ui/feature-gates/feature-gate-alloc-error-handler.rs b/src/test/ui/feature-gates/feature-gate-alloc-error-handler.rs
index ad890961830..78d189d20b6 100644
--- a/src/test/ui/feature-gates/feature-gate-alloc-error-handler.rs
+++ b/src/test/ui/feature-gates/feature-gate-alloc-error-handler.rs
@@ -5,10 +5,12 @@
 
 use core::alloc::Layout;
 
-#[alloc_error_handler] //~ ERROR the `#[alloc_error_handler]` attribute is an experimental feature
+#[alloc_error_handler] //~ ERROR use of unstable library feature 'alloc_error_handler'
 fn oom(info: Layout) -> ! {
     loop {}
 }
 
 #[panic_handler]
-fn panic(_: &core::panic::PanicInfo) -> ! { loop {} }
+fn panic(_: &core::panic::PanicInfo) -> ! {
+    loop {}
+}
diff --git a/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr b/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr
index 03f31e53f4f..f414eb463df 100644
--- a/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr
+++ b/src/test/ui/feature-gates/feature-gate-alloc-error-handler.stderr
@@ -1,8 +1,8 @@
-error[E0658]: the `#[alloc_error_handler]` attribute is an experimental feature
-  --> $DIR/feature-gate-alloc-error-handler.rs:8:1
+error[E0658]: use of unstable library feature 'alloc_error_handler'
+  --> $DIR/feature-gate-alloc-error-handler.rs:8:3
    |
 LL | #[alloc_error_handler]
-   | ^^^^^^^^^^^^^^^^^^^^^^
+   |   ^^^^^^^^^^^^^^^^^^^
    |
    = note: see issue #51540 <https://github.com/rust-lang/rust/issues/51540> for more information
    = help: add `#![feature(alloc_error_handler)]` to the crate attributes to enable
diff --git a/src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.rs b/src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.rs
new file mode 100644
index 00000000000..0db8088f7ee
--- /dev/null
+++ b/src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.rs
@@ -0,0 +1,6 @@
+fn f() -> impl Fn() -> impl Sized { || () }
+//~^ ERROR `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
+fn g() -> &'static dyn Fn() -> impl Sized { &|| () }
+//~^ ERROR `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
+
+fn main() {}
diff --git a/src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr b/src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr
new file mode 100644
index 00000000000..c485bc5c3ab
--- /dev/null
+++ b/src/test/ui/feature-gates/feature-gate-impl_trait_in_fn_trait_return.stderr
@@ -0,0 +1,15 @@
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
+  --> $DIR/feature-gate-impl_trait_in_fn_trait_return.rs:1:24
+   |
+LL | fn f() -> impl Fn() -> impl Sized { || () }
+   |                        ^^^^^^^^^^
+
+error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
+  --> $DIR/feature-gate-impl_trait_in_fn_trait_return.rs:3:32
+   |
+LL | fn g() -> &'static dyn Fn() -> impl Sized { &|| () }
+   |                                ^^^^^^^^^^
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0562`.
diff --git a/src/test/ui/for-loop-while/break-outside-loop.stderr b/src/test/ui/for-loop-while/break-outside-loop.stderr
index 287bf9af62e..9092f34df35 100644
--- a/src/test/ui/for-loop-while/break-outside-loop.stderr
+++ b/src/test/ui/for-loop-while/break-outside-loop.stderr
@@ -9,11 +9,11 @@ LL |             break 'lab;
    |
    = note: labels are unreachable through functions, closures, async blocks and modules
 
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/break-outside-loop.rs:10:15
    |
 LL |     let pth = break;
-   |               ^^^^^ cannot `break` outside of a loop
+   |               ^^^^^ cannot `break` outside of a loop or labeled block
 
 error[E0268]: `continue` outside of a loop
   --> $DIR/break-outside-loop.rs:11:17
@@ -38,11 +38,11 @@ LL |             if cond() { break }
 LL |             if cond() { continue }
    |                         ^^^^^^^^ cannot `continue` inside of a closure
 
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/break-outside-loop.rs:24:25
    |
 LL |     let unconstrained = break;
-   |                         ^^^^^ cannot `break` outside of a loop
+   |                         ^^^^^ cannot `break` outside of a loop or labeled block
 
 error[E0267]: `break` inside of a closure
   --> $DIR/break-outside-loop.rs:30:13
diff --git a/src/test/ui/hygiene/no_implicit_prelude.stderr b/src/test/ui/hygiene/no_implicit_prelude.stderr
index 0f2ff96b5ed..c48c840352f 100644
--- a/src/test/ui/hygiene/no_implicit_prelude.stderr
+++ b/src/test/ui/hygiene/no_implicit_prelude.stderr
@@ -5,7 +5,7 @@ LL |     fn f() { ::bar::m!(); }
    |              ----------- in this macro invocation
 ...
 LL |         Vec::new();
-   |         ^^^ not found in this scope
+   |         ^^^ use of undeclared type `Vec`
    |
    = note: this error originates in the macro `::bar::m` (in Nightly builds, run with -Z macro-backtrace for more info)
 help: consider importing this struct
diff --git a/src/test/ui/impl-trait/impl-fn-hrtb-bounds-2.rs b/src/test/ui/impl-trait/impl-fn-hrtb-bounds-2.rs
new file mode 100644
index 00000000000..b0aeded0ef7
--- /dev/null
+++ b/src/test/ui/impl-trait/impl-fn-hrtb-bounds-2.rs
@@ -0,0 +1,8 @@
+#![feature(impl_trait_in_fn_trait_return)]
+use std::fmt::Debug;
+
+fn a() -> impl Fn(&u8) -> impl Debug {
+    |x| x //~ ERROR hidden type for `impl Debug` captures lifetime that does not appear in bounds
+}
+
+fn main() {}
diff --git a/src/test/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr b/src/test/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr
new file mode 100644
index 00000000000..433b76b7afa
--- /dev/null
+++ b/src/test/ui/impl-trait/impl-fn-hrtb-bounds-2.stderr
@@ -0,0 +1,11 @@
+error[E0700]: hidden type for `impl Debug` captures lifetime that does not appear in bounds
+  --> $DIR/impl-fn-hrtb-bounds-2.rs:5:9
+   |
+LL |     |x| x
+   |     --- ^
+   |     |
+   |     hidden type `&u8` captures the anonymous lifetime #1 defined here
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0700`.
diff --git a/src/test/ui/impl-trait/impl-fn-hrtb-bounds.rs b/src/test/ui/impl-trait/impl-fn-hrtb-bounds.rs
new file mode 100644
index 00000000000..527a4586fd7
--- /dev/null
+++ b/src/test/ui/impl-trait/impl-fn-hrtb-bounds.rs
@@ -0,0 +1,24 @@
+#![feature(impl_trait_in_fn_trait_return)]
+use std::fmt::Debug;
+
+fn a() -> impl Fn(&u8) -> (impl Debug + '_) {
+    //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
+    |x| x
+}
+
+fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) {
+    //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
+    |x| x
+}
+
+fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) {
+    //~^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
+    |x| x
+}
+
+fn d() -> impl Fn() -> (impl Debug + '_) {
+    //~^ ERROR missing lifetime specifier
+    || ()
+}
+
+fn main() {}
diff --git a/src/test/ui/impl-trait/impl-fn-hrtb-bounds.stderr b/src/test/ui/impl-trait/impl-fn-hrtb-bounds.stderr
new file mode 100644
index 00000000000..443ffeb55cd
--- /dev/null
+++ b/src/test/ui/impl-trait/impl-fn-hrtb-bounds.stderr
@@ -0,0 +1,51 @@
+error[E0106]: missing lifetime specifier
+  --> $DIR/impl-fn-hrtb-bounds.rs:19:38
+   |
+LL | fn d() -> impl Fn() -> (impl Debug + '_) {
+   |                                      ^^ expected named lifetime parameter
+   |
+   = help: this function's return type contains a borrowed value, but there is no value for it to be borrowed from
+help: consider using the `'static` lifetime
+   |
+LL | fn d() -> impl Fn() -> (impl Debug + 'static) {
+   |                                      ~~~~~~~
+
+error: higher kinded lifetime bounds on nested opaque types are not supported yet
+  --> $DIR/impl-fn-hrtb-bounds.rs:4:41
+   |
+LL | fn a() -> impl Fn(&u8) -> (impl Debug + '_) {
+   |                                         ^^
+   |
+note: lifetime declared here
+  --> $DIR/impl-fn-hrtb-bounds.rs:4:19
+   |
+LL | fn a() -> impl Fn(&u8) -> (impl Debug + '_) {
+   |                   ^
+
+error: higher kinded lifetime bounds on nested opaque types are not supported yet
+  --> $DIR/impl-fn-hrtb-bounds.rs:9:52
+   |
+LL | fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) {
+   |                                                    ^^
+   |
+note: lifetime declared here
+  --> $DIR/impl-fn-hrtb-bounds.rs:9:20
+   |
+LL | fn b() -> impl for<'a> Fn(&'a u8) -> (impl Debug + 'a) {
+   |                    ^^
+
+error: higher kinded lifetime bounds on nested opaque types are not supported yet
+  --> $DIR/impl-fn-hrtb-bounds.rs:14:52
+   |
+LL | fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) {
+   |                                                    ^^
+   |
+note: lifetime declared here
+  --> $DIR/impl-fn-hrtb-bounds.rs:14:20
+   |
+LL | fn c() -> impl for<'a> Fn(&'a u8) -> (impl Debug + '_) {
+   |                    ^^
+
+error: aborting due to 4 previous errors
+
+For more information about this error, try `rustc --explain E0106`.
diff --git a/src/test/ui/impl-trait/impl-fn-parsing-ambiguities.rs b/src/test/ui/impl-trait/impl-fn-parsing-ambiguities.rs
new file mode 100644
index 00000000000..3e760710797
--- /dev/null
+++ b/src/test/ui/impl-trait/impl-fn-parsing-ambiguities.rs
@@ -0,0 +1,15 @@
+#![feature(impl_trait_in_fn_trait_return)]
+use std::fmt::Debug;
+
+fn a() -> impl Fn(&u8) -> impl Debug + '_ {
+    //~^ ERROR ambiguous `+` in a type
+    //~^^ ERROR higher kinded lifetime bounds on nested opaque types are not supported yet
+    |x| x
+}
+
+fn b() -> impl Fn() -> impl Debug + Send {
+    //~^ ERROR ambiguous `+` in a type
+    || ()
+}
+
+fn main() {}
diff --git a/src/test/ui/impl-trait/impl-fn-parsing-ambiguities.stderr b/src/test/ui/impl-trait/impl-fn-parsing-ambiguities.stderr
new file mode 100644
index 00000000000..cf6e5ef7bac
--- /dev/null
+++ b/src/test/ui/impl-trait/impl-fn-parsing-ambiguities.stderr
@@ -0,0 +1,26 @@
+error: ambiguous `+` in a type
+  --> $DIR/impl-fn-parsing-ambiguities.rs:4:27
+   |
+LL | fn a() -> impl Fn(&u8) -> impl Debug + '_ {
+   |                           ^^^^^^^^^^^^^^^ help: use parentheses to disambiguate: `(impl Debug + '_)`
+
+error: ambiguous `+` in a type
+  --> $DIR/impl-fn-parsing-ambiguities.rs:10:24
+   |
+LL | fn b() -> impl Fn() -> impl Debug + Send {
+   |                        ^^^^^^^^^^^^^^^^^ help: use parentheses to disambiguate: `(impl Debug + Send)`
+
+error: higher kinded lifetime bounds on nested opaque types are not supported yet
+  --> $DIR/impl-fn-parsing-ambiguities.rs:4:40
+   |
+LL | fn a() -> impl Fn(&u8) -> impl Debug + '_ {
+   |                                        ^^
+   |
+note: lifetime declared here
+  --> $DIR/impl-fn-parsing-ambiguities.rs:4:19
+   |
+LL | fn a() -> impl Fn(&u8) -> impl Debug + '_ {
+   |                   ^
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/ui/impl-trait/impl-fn-predefined-lifetimes.rs b/src/test/ui/impl-trait/impl-fn-predefined-lifetimes.rs
new file mode 100644
index 00000000000..15778662375
--- /dev/null
+++ b/src/test/ui/impl-trait/impl-fn-predefined-lifetimes.rs
@@ -0,0 +1,15 @@
+#![feature(impl_trait_in_fn_trait_return)]
+use std::fmt::Debug;
+
+fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
+    //~^ ERROR cannot resolve opaque type
+
+    |x| x
+    //~^ ERROR concrete type differs from previous defining opaque type use
+}
+
+fn _b<'a>() -> impl Fn(&'a u8) -> (impl Debug + 'a) {
+    a()
+}
+
+fn main() {}
diff --git a/src/test/ui/impl-trait/impl-fn-predefined-lifetimes.stderr b/src/test/ui/impl-trait/impl-fn-predefined-lifetimes.stderr
new file mode 100644
index 00000000000..7747319c153
--- /dev/null
+++ b/src/test/ui/impl-trait/impl-fn-predefined-lifetimes.stderr
@@ -0,0 +1,24 @@
+error: concrete type differs from previous defining opaque type use
+  --> $DIR/impl-fn-predefined-lifetimes.rs:7:9
+   |
+LL |     |x| x
+   |         ^ expected `impl Debug + '_`, got `&u8`
+   |
+note: previous use here
+  --> $DIR/impl-fn-predefined-lifetimes.rs:7:5
+   |
+LL |     |x| x
+   |     ^^^^^
+
+error[E0720]: cannot resolve opaque type
+  --> $DIR/impl-fn-predefined-lifetimes.rs:4:35
+   |
+LL | fn a<'a>() -> impl Fn(&'a u8) -> (impl Debug + '_) {
+   |                                   ^^^^^^^^^^^^^^^ recursive opaque type
+...
+LL |     |x| x
+   |     ----- returning here with type `[closure@$DIR/impl-fn-predefined-lifetimes.rs:7:5: 7:8]`
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0720`.
diff --git a/src/test/ui/impl-trait/impl_fn_associativity.rs b/src/test/ui/impl-trait/impl_fn_associativity.rs
new file mode 100644
index 00000000000..71a8f9c7796
--- /dev/null
+++ b/src/test/ui/impl-trait/impl_fn_associativity.rs
@@ -0,0 +1,26 @@
+// run-pass
+#![feature(impl_trait_in_fn_trait_return)]
+use std::fmt::Debug;
+
+fn f_debug() -> impl Fn() -> impl Debug {
+    || ()
+}
+
+fn ff_debug() -> impl Fn() -> impl Fn() -> impl Debug {
+    || f_debug()
+}
+
+fn multi() -> impl Fn() -> (impl Debug + Send) {
+    || ()
+}
+
+fn main() {
+    // Check that `ff_debug` is `() -> (() -> Debug)` and not `(() -> ()) -> Debug`
+    let debug = ff_debug()()();
+    assert_eq!(format!("{:?}", debug), "()");
+
+    let x = multi()();
+    assert_eq!(format!("{:?}", x), "()");
+    fn assert_send(_: &impl Send) {}
+    assert_send(&x);
+}
diff --git a/src/test/ui/impl-trait/nested_impl_trait.rs b/src/test/ui/impl-trait/nested_impl_trait.rs
index 85c6f8c462c..e95fab3b650 100644
--- a/src/test/ui/impl-trait/nested_impl_trait.rs
+++ b/src/test/ui/impl-trait/nested_impl_trait.rs
@@ -1,3 +1,4 @@
+#![feature(impl_trait_in_fn_trait_return)]
 use std::fmt::Debug;
 
 fn fine(x: impl Into<u32>) -> impl Into<u32> { x }
@@ -25,8 +26,7 @@ fn allowed_in_assoc_type() -> impl Iterator<Item=impl Fn()> {
 }
 
 fn allowed_in_ret_type() -> impl Fn() -> impl Into<u32> {
-//~^ `impl Trait` only allowed in function and inherent method return types
-    || 5
+    || 5u8
 }
 
 fn main() {}
diff --git a/src/test/ui/impl-trait/nested_impl_trait.stderr b/src/test/ui/impl-trait/nested_impl_trait.stderr
index 3291cad6882..9a8f5a34068 100644
--- a/src/test/ui/impl-trait/nested_impl_trait.stderr
+++ b/src/test/ui/impl-trait/nested_impl_trait.stderr
@@ -1,5 +1,5 @@
 error[E0666]: nested `impl Trait` is not allowed
-  --> $DIR/nested_impl_trait.rs:5:56
+  --> $DIR/nested_impl_trait.rs:6:56
    |
 LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
    |                                              ----------^^^^^^^^^^-
@@ -8,7 +8,7 @@ LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
    |                                              outer `impl Trait`
 
 error[E0666]: nested `impl Trait` is not allowed
-  --> $DIR/nested_impl_trait.rs:9:42
+  --> $DIR/nested_impl_trait.rs:10:42
    |
 LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
    |                                ----------^^^^^^^^^^-
@@ -17,7 +17,7 @@ LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
    |                                outer `impl Trait`
 
 error[E0666]: nested `impl Trait` is not allowed
-  --> $DIR/nested_impl_trait.rs:13:37
+  --> $DIR/nested_impl_trait.rs:14:37
    |
 LL | fn bad_in_arg_position(_: impl Into<impl Debug>) { }
    |                           ----------^^^^^^^^^^-
@@ -26,7 +26,7 @@ LL | fn bad_in_arg_position(_: impl Into<impl Debug>) { }
    |                           outer `impl Trait`
 
 error[E0666]: nested `impl Trait` is not allowed
-  --> $DIR/nested_impl_trait.rs:18:44
+  --> $DIR/nested_impl_trait.rs:19:44
    |
 LL |     fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
    |                                  ----------^^^^^^^^^^-
@@ -35,19 +35,13 @@ LL |     fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
    |                                  outer `impl Trait`
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
-  --> $DIR/nested_impl_trait.rs:9:32
+  --> $DIR/nested_impl_trait.rs:10:32
    |
 LL | fn bad_in_fn_syntax(x: fn() -> impl Into<impl Debug>) {}
    |                                ^^^^^^^^^^^^^^^^^^^^^
 
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
-  --> $DIR/nested_impl_trait.rs:27:42
-   |
-LL | fn allowed_in_ret_type() -> impl Fn() -> impl Into<u32> {
-   |                                          ^^^^^^^^^^^^^^
-
 error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
-  --> $DIR/nested_impl_trait.rs:5:46
+  --> $DIR/nested_impl_trait.rs:6:46
    |
 LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
    |                                              ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
@@ -56,7 +50,7 @@ LL | fn bad_in_ret_position(x: impl Into<u32>) -> impl Into<impl Debug> { x }
    = note: required for `impl Into<u32>` to implement `Into<impl Debug>`
 
 error[E0277]: the trait bound `impl Debug: From<impl Into<u32>>` is not satisfied
-  --> $DIR/nested_impl_trait.rs:18:34
+  --> $DIR/nested_impl_trait.rs:19:34
    |
 LL |     fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
    |                                  ^^^^^^^^^^^^^^^^^^^^^ the trait `From<impl Into<u32>>` is not implemented for `impl Debug`
@@ -64,7 +58,7 @@ LL |     fn bad(x: impl Into<u32>) -> impl Into<impl Debug> { x }
    = help: the trait `Into<U>` is implemented for `T`
    = note: required for `impl Into<u32>` to implement `Into<impl Debug>`
 
-error: aborting due to 8 previous errors
+error: aborting due to 7 previous errors
 
 Some errors have detailed explanations: E0277, E0562, E0666.
 For more information about an error, try `rustc --explain E0277`.
diff --git a/src/test/ui/impl-trait/where-allowed.rs b/src/test/ui/impl-trait/where-allowed.rs
index c1dd46c7ff7..ff63b04c268 100644
--- a/src/test/ui/impl-trait/where-allowed.rs
+++ b/src/test/ui/impl-trait/where-allowed.rs
@@ -1,5 +1,6 @@
 //! A simple test for testing many permutations of allowedness of
 //! impl Trait
+#![feature(impl_trait_in_fn_trait_return)]
 use std::fmt::Debug;
 
 // Allowed
@@ -39,9 +40,8 @@ fn in_dyn_Fn_return_in_parameters(_: &dyn Fn() -> impl Debug) { panic!() }
 fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
 //~^ ERROR `impl Trait` only allowed in function and inherent method return types
 
-// Disallowed
+// Allowed
 fn in_dyn_Fn_return_in_return() -> &'static dyn Fn() -> impl Debug { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method return types
 
 // Disallowed
 fn in_impl_Fn_parameter_in_parameters(_: &impl Fn(impl Debug)) { panic!() }
@@ -57,9 +57,8 @@ fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
 //~^ ERROR `impl Trait` only allowed in function and inherent method return types
 //~| ERROR nested `impl Trait` is not allowed
 
-// Disallowed
+// Allowed
 fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { panic!() }
-//~^ ERROR `impl Trait` only allowed in function and inherent method return types
 
 // Disallowed
 fn in_Fn_parameter_in_generics<F: Fn(impl Debug)> (_: F) { panic!() }
diff --git a/src/test/ui/impl-trait/where-allowed.stderr b/src/test/ui/impl-trait/where-allowed.stderr
index 2e7c7ca40dd..3ad0a9f9d5c 100644
--- a/src/test/ui/impl-trait/where-allowed.stderr
+++ b/src/test/ui/impl-trait/where-allowed.stderr
@@ -17,7 +17,7 @@ LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic
    |                                                 outer `impl Trait`
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/where-allowed.rs:119:16
+  --> $DIR/where-allowed.rs:118:16
    |
 LL |     type Out = impl Debug;
    |                ^^^^^^^^^^
@@ -26,7 +26,7 @@ LL |     type Out = impl Debug;
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/where-allowed.rs:154:23
+  --> $DIR/where-allowed.rs:153:23
    |
 LL | type InTypeAlias<R> = impl Debug;
    |                       ^^^^^^^^^^
@@ -35,7 +35,7 @@ LL | type InTypeAlias<R> = impl Debug;
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0658]: `impl Trait` in type aliases is unstable
-  --> $DIR/where-allowed.rs:157:39
+  --> $DIR/where-allowed.rs:156:39
    |
 LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
    |                                       ^^^^^^^^^^
@@ -44,53 +44,47 @@ LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
    = help: add `#![feature(type_alias_impl_trait)]` to the crate attributes to enable
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer param
-  --> $DIR/where-allowed.rs:15:40
+  --> $DIR/where-allowed.rs:16:40
    |
 LL | fn in_fn_parameter_in_parameters(_: fn(impl Debug)) { panic!() }
    |                                        ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
-  --> $DIR/where-allowed.rs:19:42
+  --> $DIR/where-allowed.rs:20:42
    |
 LL | fn in_fn_return_in_parameters(_: fn() -> impl Debug) { panic!() }
    |                                          ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer param
-  --> $DIR/where-allowed.rs:23:38
+  --> $DIR/where-allowed.rs:24:38
    |
 LL | fn in_fn_parameter_in_return() -> fn(impl Debug) { panic!() }
    |                                      ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
-  --> $DIR/where-allowed.rs:27:40
+  --> $DIR/where-allowed.rs:28:40
    |
 LL | fn in_fn_return_in_return() -> fn() -> impl Debug { panic!() }
    |                                        ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
-  --> $DIR/where-allowed.rs:31:49
+  --> $DIR/where-allowed.rs:32:49
    |
 LL | fn in_dyn_Fn_parameter_in_parameters(_: &dyn Fn(impl Debug)) { panic!() }
    |                                                 ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
-  --> $DIR/where-allowed.rs:35:51
+  --> $DIR/where-allowed.rs:36:51
    |
 LL | fn in_dyn_Fn_return_in_parameters(_: &dyn Fn() -> impl Debug) { panic!() }
    |                                                   ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
-  --> $DIR/where-allowed.rs:39:55
+  --> $DIR/where-allowed.rs:40:55
    |
 LL | fn in_dyn_Fn_parameter_in_return() -> &'static dyn Fn(impl Debug) { panic!() }
    |                                                       ^^^^^^^^^^
 
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
-  --> $DIR/where-allowed.rs:43:57
-   |
-LL | fn in_dyn_Fn_return_in_return() -> &'static dyn Fn() -> impl Debug { panic!() }
-   |                                                         ^^^^^^^^^^
-
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
   --> $DIR/where-allowed.rs:47:51
    |
@@ -109,56 +103,50 @@ error[E0562]: `impl Trait` only allowed in function and inherent method return t
 LL | fn in_impl_Fn_parameter_in_return() -> &'static impl Fn(impl Debug) { panic!() }
    |                                                         ^^^^^^^^^^
 
-error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
-  --> $DIR/where-allowed.rs:61:59
-   |
-LL | fn in_impl_Fn_return_in_return() -> &'static impl Fn() -> impl Debug { panic!() }
-   |                                                           ^^^^^^^^^^
-
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
-  --> $DIR/where-allowed.rs:65:38
+  --> $DIR/where-allowed.rs:64:38
    |
 LL | fn in_Fn_parameter_in_generics<F: Fn(impl Debug)> (_: F) { panic!() }
    |                                      ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
-  --> $DIR/where-allowed.rs:69:40
+  --> $DIR/where-allowed.rs:68:40
    |
 LL | fn in_Fn_return_in_generics<F: Fn() -> impl Debug> (_: F) { panic!() }
    |                                        ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:82:32
+  --> $DIR/where-allowed.rs:81:32
    |
 LL | struct InBraceStructField { x: impl Debug }
    |                                ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in path
-  --> $DIR/where-allowed.rs:86:41
+  --> $DIR/where-allowed.rs:85:41
    |
 LL | struct InAdtInBraceStructField { x: Vec<impl Debug> }
    |                                         ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:90:27
+  --> $DIR/where-allowed.rs:89:27
    |
 LL | struct InTupleStructField(impl Debug);
    |                           ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:95:25
+  --> $DIR/where-allowed.rs:94:25
    |
 LL |     InBraceVariant { x: impl Debug },
    |                         ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:97:20
+  --> $DIR/where-allowed.rs:96:20
    |
 LL |     InTupleVariant(impl Debug),
    |                    ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait method return
-  --> $DIR/where-allowed.rs:108:23
+  --> $DIR/where-allowed.rs:107:23
    |
 LL |     fn in_return() -> impl Debug;
    |                       ^^^^^^^^^^
@@ -167,7 +155,7 @@ LL |     fn in_return() -> impl Debug;
    = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `impl` method return
-  --> $DIR/where-allowed.rs:125:34
+  --> $DIR/where-allowed.rs:124:34
    |
 LL |     fn in_trait_impl_return() -> impl Debug { () }
    |                                  ^^^^^^^^^^
@@ -176,127 +164,127 @@ LL |     fn in_trait_impl_return() -> impl Debug { () }
    = help: add `#![feature(return_position_impl_trait_in_trait)]` to the crate attributes to enable
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `extern fn` param
-  --> $DIR/where-allowed.rs:138:33
+  --> $DIR/where-allowed.rs:137:33
    |
 LL |     fn in_foreign_parameters(_: impl Debug);
    |                                 ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `extern fn` return
-  --> $DIR/where-allowed.rs:141:31
+  --> $DIR/where-allowed.rs:140:31
    |
 LL |     fn in_foreign_return() -> impl Debug;
    |                               ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `fn` pointer return
-  --> $DIR/where-allowed.rs:157:39
+  --> $DIR/where-allowed.rs:156:39
    |
 LL | type InReturnInTypeAlias<R> = fn() -> impl Debug;
    |                                       ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in trait
-  --> $DIR/where-allowed.rs:162:16
+  --> $DIR/where-allowed.rs:161:16
    |
 LL | impl PartialEq<impl Debug> for () {
    |                ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:167:24
+  --> $DIR/where-allowed.rs:166:24
    |
 LL | impl PartialEq<()> for impl Debug {
    |                        ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:172:6
+  --> $DIR/where-allowed.rs:171:6
    |
 LL | impl impl Debug {
    |      ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:178:24
+  --> $DIR/where-allowed.rs:177:24
    |
 LL | impl InInherentImplAdt<impl Debug> {
    |                        ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:184:11
+  --> $DIR/where-allowed.rs:183:11
    |
 LL |     where impl Debug: Debug
    |           ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:191:15
+  --> $DIR/where-allowed.rs:190:15
    |
 LL |     where Vec<impl Debug>: Debug
    |               ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in bound
-  --> $DIR/where-allowed.rs:198:24
+  --> $DIR/where-allowed.rs:197:24
    |
 LL |     where T: PartialEq<impl Debug>
    |                        ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait param
-  --> $DIR/where-allowed.rs:205:17
+  --> $DIR/where-allowed.rs:204:17
    |
 LL |     where T: Fn(impl Debug)
    |                 ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in `Fn` trait return
-  --> $DIR/where-allowed.rs:212:22
+  --> $DIR/where-allowed.rs:211:22
    |
 LL |     where T: Fn() -> impl Debug
    |                      ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:218:40
+  --> $DIR/where-allowed.rs:217:40
    |
 LL | struct InStructGenericParamDefault<T = impl Debug>(T);
    |                                        ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:222:36
+  --> $DIR/where-allowed.rs:221:36
    |
 LL | enum InEnumGenericParamDefault<T = impl Debug> { Variant(T) }
    |                                    ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:226:38
+  --> $DIR/where-allowed.rs:225:38
    |
 LL | trait InTraitGenericParamDefault<T = impl Debug> {}
    |                                      ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:230:41
+  --> $DIR/where-allowed.rs:229:41
    |
 LL | type InTypeAliasGenericParamDefault<T = impl Debug> = T;
    |                                         ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:234:11
+  --> $DIR/where-allowed.rs:233:11
    |
 LL | impl <T = impl Debug> T {}
    |           ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in type
-  --> $DIR/where-allowed.rs:241:40
+  --> $DIR/where-allowed.rs:240:40
    |
 LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
    |                                        ^^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in variable binding
-  --> $DIR/where-allowed.rs:247:29
+  --> $DIR/where-allowed.rs:246:29
    |
 LL |     let _in_local_variable: impl Fn() = || {};
    |                             ^^^^^^^^^
 
 error[E0562]: `impl Trait` only allowed in function and inherent method return types, not in closure return
-  --> $DIR/where-allowed.rs:249:46
+  --> $DIR/where-allowed.rs:248:46
    |
 LL |     let _in_return_in_local_variable = || -> impl Fn() { || {} };
    |                                              ^^^^^^^^^
 
 error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/where-allowed.rs:234:7
+  --> $DIR/where-allowed.rs:233:7
    |
 LL | impl <T = impl Debug> T {}
    |       ^^^^^^^^^^^^^^
@@ -306,7 +294,7 @@ LL | impl <T = impl Debug> T {}
    = note: `#[deny(invalid_type_param_default)]` on by default
 
 error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions
-  --> $DIR/where-allowed.rs:241:36
+  --> $DIR/where-allowed.rs:240:36
    |
 LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
    |                                    ^^^^^^^^^^^^^^
@@ -315,14 +303,14 @@ LL | fn in_method_generic_param_default<T = impl Debug>(_: T) {}
    = note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>
 
 error[E0118]: no nominal type found for inherent implementation
-  --> $DIR/where-allowed.rs:234:23
+  --> $DIR/where-allowed.rs:233:23
    |
 LL | impl <T = impl Debug> T {}
    |                       ^ impl requires a nominal type
    |
    = note: either implement a trait on it or create a newtype to wrap it instead
 
-error: aborting due to 49 previous errors
+error: aborting due to 47 previous errors
 
 Some errors have detailed explanations: E0118, E0562, E0658, E0666.
 For more information about an error, try `rustc --explain E0118`.
diff --git a/src/test/ui/issues/issue-28105.stderr b/src/test/ui/issues/issue-28105.stderr
index 42ed838d7c0..f450256f3ec 100644
--- a/src/test/ui/issues/issue-28105.stderr
+++ b/src/test/ui/issues/issue-28105.stderr
@@ -4,11 +4,11 @@ error[E0268]: `continue` outside of a loop
 LL |     continue
    |     ^^^^^^^^ cannot `continue` outside of a loop
 
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/issue-28105.rs:6:5
    |
 LL |     break
-   |     ^^^^^ cannot `break` outside of a loop
+   |     ^^^^^ cannot `break` outside of a loop or labeled block
 
 error: aborting due to 2 previous errors
 
diff --git a/src/test/ui/issues/issue-43162.stderr b/src/test/ui/issues/issue-43162.stderr
index a443db40732..40d9200058e 100644
--- a/src/test/ui/issues/issue-43162.stderr
+++ b/src/test/ui/issues/issue-43162.stderr
@@ -1,14 +1,14 @@
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/issue-43162.rs:3:5
    |
 LL |     break true;
-   |     ^^^^^^^^^^ cannot `break` outside of a loop
+   |     ^^^^^^^^^^ cannot `break` outside of a loop or labeled block
 
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/issue-43162.rs:7:5
    |
 LL |     break {};
-   |     ^^^^^^^^ cannot `break` outside of a loop
+   |     ^^^^^^^^ cannot `break` outside of a loop or labeled block
 
 error[E0308]: mismatched types
   --> $DIR/issue-43162.rs:1:13
diff --git a/src/test/ui/issues/issue-50576.stderr b/src/test/ui/issues/issue-50576.stderr
index 9fea1411080..4ec22fde910 100644
--- a/src/test/ui/issues/issue-50576.stderr
+++ b/src/test/ui/issues/issue-50576.stderr
@@ -4,17 +4,17 @@ error[E0426]: use of undeclared label `'L`
 LL |     |bool: [u8; break 'L]| 0;
    |                       ^^ undeclared label `'L`
 
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/issue-50576.rs:2:17
    |
 LL |     |bool: [u8; break 'L]| 0;
-   |                 ^^^^^^^^ cannot `break` outside of a loop
+   |                 ^^^^^^^^ cannot `break` outside of a loop or labeled block
 
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/issue-50576.rs:5:16
    |
 LL |     Vec::<[u8; break]>::new();
-   |                ^^^^^ cannot `break` outside of a loop
+   |                ^^^^^ cannot `break` outside of a loop or labeled block
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/issues/issue-50581.stderr b/src/test/ui/issues/issue-50581.stderr
index 35d6fc49ced..07b6df072cb 100644
--- a/src/test/ui/issues/issue-50581.stderr
+++ b/src/test/ui/issues/issue-50581.stderr
@@ -1,8 +1,8 @@
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/issue-50581.rs:2:14
    |
 LL |     |_: [u8; break]| ();
-   |              ^^^^^ cannot `break` outside of a loop
+   |              ^^^^^ cannot `break` outside of a loop or labeled block
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/issues/issue-83048.rs b/src/test/ui/issues/issue-83048.rs
index 520ae974398..8e4fb6eae9d 100644
--- a/src/test/ui/issues/issue-83048.rs
+++ b/src/test/ui/issues/issue-83048.rs
@@ -1,5 +1,5 @@
 // compile-flags: -Z unpretty=thir-tree
 
 pub fn main() {
-    break; //~ ERROR: `break` outside of a loop [E0268]
+    break; //~ ERROR: `break` outside of a loop or labeled block [E0268]
 }
diff --git a/src/test/ui/issues/issue-83048.stderr b/src/test/ui/issues/issue-83048.stderr
index 62d67d75844..dade9e46950 100644
--- a/src/test/ui/issues/issue-83048.stderr
+++ b/src/test/ui/issues/issue-83048.stderr
@@ -1,8 +1,8 @@
-error[E0268]: `break` outside of a loop
+error[E0268]: `break` outside of a loop or labeled block
   --> $DIR/issue-83048.rs:4:5
    |
 LL |     break;
-   |     ^^^^^ cannot `break` outside of a loop
+   |     ^^^^^ cannot `break` outside of a loop or labeled block
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/let-else/let-else-irrefutable.rs b/src/test/ui/let-else/let-else-irrefutable.rs
index 1cb68ecb8a6..f4b338eb0af 100644
--- a/src/test/ui/let-else/let-else-irrefutable.rs
+++ b/src/test/ui/let-else/let-else-irrefutable.rs
@@ -1,7 +1,11 @@
 // check-pass
 
-
-
 fn main() {
     let x = 1 else { return }; //~ WARN irrefutable `let...else` pattern
+
+    // Multiline else blocks should not get printed
+    let x = 1 else { //~ WARN irrefutable `let...else` pattern
+        eprintln!("problem case encountered");
+        return
+    };
 }
diff --git a/src/test/ui/let-else/let-else-irrefutable.stderr b/src/test/ui/let-else/let-else-irrefutable.stderr
index e0581f4d9ab..73d4e5f3483 100644
--- a/src/test/ui/let-else/let-else-irrefutable.stderr
+++ b/src/test/ui/let-else/let-else-irrefutable.stderr
@@ -1,12 +1,21 @@
 warning: irrefutable `let...else` pattern
-  --> $DIR/let-else-irrefutable.rs:6:5
+  --> $DIR/let-else-irrefutable.rs:4:5
    |
 LL |     let x = 1 else { return };
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
+   |     ^^^^^^^^^
    |
    = note: this pattern will always match, so the `else` clause is useless
    = help: consider removing the `else` clause
    = note: `#[warn(irrefutable_let_patterns)]` on by default
 
-warning: 1 warning emitted
+warning: irrefutable `let...else` pattern
+  --> $DIR/let-else-irrefutable.rs:7:5
+   |
+LL |     let x = 1 else {
+   |     ^^^^^^^^^
+   |
+   = note: this pattern will always match, so the `else` clause is useless
+   = help: consider removing the `else` clause
+
+warning: 2 warnings emitted
 
diff --git a/src/test/ui/lexical-scopes.stderr b/src/test/ui/lexical-scopes.stderr
index 53598545223..f0eaa1a5c64 100644
--- a/src/test/ui/lexical-scopes.stderr
+++ b/src/test/ui/lexical-scopes.stderr
@@ -2,7 +2,7 @@ error[E0574]: expected struct, variant or union type, found type parameter `T`
   --> $DIR/lexical-scopes.rs:3:13
    |
 LL | struct T { i: i32 }
-   | ------------------- you might have meant to refer to this struct
+   |        - you might have meant to refer to this struct
 LL | fn f<T>() {
    |      - found this type parameter
 LL |     let t = T { i: 0 };
diff --git a/src/test/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.rs b/src/test/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.rs
index e3935cf9149..2003e1e293a 100644
--- a/src/test/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.rs
+++ b/src/test/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.rs
@@ -7,7 +7,7 @@ struct Bar {
     b: usize, //~ ERROR field `b` is never read
     #[deny(dead_code)]
     c: usize, //~ ERROR fields `c` and `e` are never read
-    d: usize, //~ WARN fields `d`, `f` and `g` are never read
+    d: usize, //~ WARN fields `d`, `f`, and `g` are never read
     #[deny(dead_code)]
     e: usize,
     f: usize,
diff --git a/src/test/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr b/src/test/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
index c0f1ed38f6d..0e5c78a7167 100644
--- a/src/test/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
+++ b/src/test/ui/lint/dead-code/multiple-dead-codes-in-the-same-struct.stderr
@@ -1,4 +1,4 @@
-warning: fields `d`, `f` and `g` are never read
+warning: fields `d`, `f`, and `g` are never read
   --> $DIR/multiple-dead-codes-in-the-same-struct.rs:10:5
    |
 LL | struct Bar {
diff --git a/src/test/ui/lint/dead-code/tuple-struct-field.rs b/src/test/ui/lint/dead-code/tuple-struct-field.rs
index b15d7063686..14fb30be949 100644
--- a/src/test/ui/lint/dead-code/tuple-struct-field.rs
+++ b/src/test/ui/lint/dead-code/tuple-struct-field.rs
@@ -11,7 +11,7 @@ struct SingleUnused(i32, [u8; LEN], String);
 //~| HELP: consider changing the field to be of unit type
 
 struct MultipleUnused(i32, f32, String, u8);
-//~^ ERROR: fields `0`, `1`, `2` and `3` are never read
+//~^ ERROR: fields `0`, `1`, `2`, and `3` are never read
 //~| NOTE: fields in this struct
 //~| HELP: consider changing the fields to be of unit type
 
diff --git a/src/test/ui/lint/dead-code/tuple-struct-field.stderr b/src/test/ui/lint/dead-code/tuple-struct-field.stderr
index ca0989f5b98..b8ad5cbe4e9 100644
--- a/src/test/ui/lint/dead-code/tuple-struct-field.stderr
+++ b/src/test/ui/lint/dead-code/tuple-struct-field.stderr
@@ -16,7 +16,7 @@ help: consider changing the field to be of unit type to suppress this warning wh
 LL | struct SingleUnused(i32, (), String);
    |                          ~~
 
-error: fields `0`, `1`, `2` and `3` are never read
+error: fields `0`, `1`, `2`, and `3` are never read
   --> $DIR/tuple-struct-field.rs:13:23
    |
 LL | struct MultipleUnused(i32, f32, String, u8);
diff --git a/src/test/ui/lint/issue-103317.fixed b/src/test/ui/lint/issue-103317.fixed
new file mode 100644
index 00000000000..5a987423e5b
--- /dev/null
+++ b/src/test/ui/lint/issue-103317.fixed
@@ -0,0 +1,14 @@
+// check-pass
+// run-rustfix
+
+#[warn(unreachable_pub)]
+mod inner {
+    #[allow(unused)]
+    pub(crate) enum T {
+        //~^ WARN unreachable `pub` item
+        A(u8),
+        X { a: f32, b: () },
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/lint/issue-103317.rs b/src/test/ui/lint/issue-103317.rs
new file mode 100644
index 00000000000..c2ba939e13c
--- /dev/null
+++ b/src/test/ui/lint/issue-103317.rs
@@ -0,0 +1,14 @@
+// check-pass
+// run-rustfix
+
+#[warn(unreachable_pub)]
+mod inner {
+    #[allow(unused)]
+    pub enum T {
+        //~^ WARN unreachable `pub` item
+        A(u8),
+        X { a: f32, b: () },
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/lint/issue-103317.stderr b/src/test/ui/lint/issue-103317.stderr
new file mode 100644
index 00000000000..9c982ddc346
--- /dev/null
+++ b/src/test/ui/lint/issue-103317.stderr
@@ -0,0 +1,17 @@
+warning: unreachable `pub` item
+  --> $DIR/issue-103317.rs:7:5
+   |
+LL |     pub enum T {
+   |     ---^^^^^^^
+   |     |
+   |     help: consider restricting its visibility: `pub(crate)`
+   |
+   = help: or consider exporting it for use by other crates
+note: the lint level is defined here
+  --> $DIR/issue-103317.rs:4:8
+   |
+LL | #[warn(unreachable_pub)]
+   |        ^^^^^^^^^^^^^^^
+
+warning: 1 warning emitted
+
diff --git a/src/test/ui/attr-from-macro.rs b/src/test/ui/macros/attr-from-macro.rs
index bb3a5c94d41..bb3a5c94d41 100644
--- a/src/test/ui/attr-from-macro.rs
+++ b/src/test/ui/macros/attr-from-macro.rs
diff --git a/src/test/ui/auxiliary/attr-from-macro.rs b/src/test/ui/macros/auxiliary/attr-from-macro.rs
index 9b388675c80..9b388675c80 100644
--- a/src/test/ui/auxiliary/attr-from-macro.rs
+++ b/src/test/ui/macros/auxiliary/attr-from-macro.rs
diff --git a/src/test/ui/macros/issue-38715.rs b/src/test/ui/macros/issue-38715.rs
index 9a9a501cae1..85ed97663e8 100644
--- a/src/test/ui/macros/issue-38715.rs
+++ b/src/test/ui/macros/issue-38715.rs
@@ -1,7 +1,17 @@
 #[macro_export]
-macro_rules! foo { ($i:ident) => {} }
+macro_rules! foo { () => {} }
 
 #[macro_export]
 macro_rules! foo { () => {} } //~ ERROR the name `foo` is defined multiple times
 
+mod inner1 {
+    #[macro_export]
+    macro_rules! bar { () => {} }
+}
+
+mod inner2 {
+    #[macro_export]
+    macro_rules! bar { () => {} } //~ ERROR the name `bar` is defined multiple times
+}
+
 fn main() {}
diff --git a/src/test/ui/macros/issue-38715.stderr b/src/test/ui/macros/issue-38715.stderr
index c87d9f7360b..828a7f45930 100644
--- a/src/test/ui/macros/issue-38715.stderr
+++ b/src/test/ui/macros/issue-38715.stderr
@@ -1,7 +1,7 @@
 error[E0428]: the name `foo` is defined multiple times
   --> $DIR/issue-38715.rs:5:1
    |
-LL | macro_rules! foo { ($i:ident) => {} }
+LL | macro_rules! foo { () => {} }
    | ---------------- previous definition of the macro `foo` here
 ...
 LL | macro_rules! foo { () => {} }
@@ -9,6 +9,17 @@ LL | macro_rules! foo { () => {} }
    |
    = note: `foo` must be defined only once in the macro namespace of this module
 
-error: aborting due to previous error
+error[E0428]: the name `bar` is defined multiple times
+  --> $DIR/issue-38715.rs:14:5
+   |
+LL |     macro_rules! bar { () => {} }
+   |     ---------------- previous definition of the macro `bar` here
+...
+LL |     macro_rules! bar { () => {} }
+   |     ^^^^^^^^^^^^^^^^ `bar` redefined here
+   |
+   = note: `bar` must be defined only once in the macro namespace of this module
+
+error: aborting due to 2 previous errors
 
 For more information about this error, try `rustc --explain E0428`.
diff --git a/src/test/ui/privacy/effective_visibilities.rs b/src/test/ui/privacy/effective_visibilities.rs
index 1d806a1d1d1..c1f9ee8dfdf 100644
--- a/src/test/ui/privacy/effective_visibilities.rs
+++ b/src/test/ui/privacy/effective_visibilities.rs
@@ -38,13 +38,13 @@ mod outer { //~ ERROR Direct: pub(crate), Reexported: pub(crate), Reachable: pub
     }
 
     #[rustc_effective_visibility]
-    macro_rules! none_macro { //~ Direct: pub(crate), Reexported: pub(crate), Reachable: pub(crate), ReachableThroughImplTrait: pub(crate)
+    macro_rules! none_macro { //~ ERROR not in the table
         () => {};
     }
 
     #[macro_export]
     #[rustc_effective_visibility]
-    macro_rules! public_macro { //~ Direct: pub, Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
+    macro_rules! public_macro { //~ ERROR Direct: pub(self), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
         () => {};
     }
 
diff --git a/src/test/ui/privacy/effective_visibilities.stderr b/src/test/ui/privacy/effective_visibilities.stderr
index 1c6201600b6..5a8f7db38fc 100644
--- a/src/test/ui/privacy/effective_visibilities.stderr
+++ b/src/test/ui/privacy/effective_visibilities.stderr
@@ -64,13 +64,13 @@ error: Direct: pub(crate), Reexported: pub, Reachable: pub, ReachableThroughImpl
 LL |                 PubUnion,
    |                 ^^^^^^^^
 
-error: Direct: pub(crate), Reexported: pub(crate), Reachable: pub(crate), ReachableThroughImplTrait: pub(crate)
+error: not in the table
   --> $DIR/effective_visibilities.rs:41:5
    |
 LL |     macro_rules! none_macro {
    |     ^^^^^^^^^^^^^^^^^^^^^^^
 
-error: Direct: pub, Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
+error: Direct: pub(self), Reexported: pub, Reachable: pub, ReachableThroughImplTrait: pub
   --> $DIR/effective_visibilities.rs:47:5
    |
 LL |     macro_rules! public_macro {
diff --git a/src/test/ui/proc-macro/amputate-span.stderr b/src/test/ui/proc-macro/amputate-span.stderr
index 9553ba3da54..ab467041144 100644
--- a/src/test/ui/proc-macro/amputate-span.stderr
+++ b/src/test/ui/proc-macro/amputate-span.stderr
@@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `Command`
   --> $DIR/amputate-span.rs:49:5
    |
 LL |     Command::new("git");
-   |     ^^^^^^^ not found in this scope
+   |     ^^^^^^^ use of undeclared type `Command`
    |
 help: consider importing this struct
    |
@@ -13,7 +13,7 @@ error[E0433]: failed to resolve: use of undeclared type `Command`
   --> $DIR/amputate-span.rs:63:9
    |
 LL |         Command::new("git");
-   |         ^^^^^^^ not found in this scope
+   |         ^^^^^^^ use of undeclared type `Command`
    |
 help: consider importing this struct
    |
diff --git a/src/test/ui/proc-macro/generate-mod.rs b/src/test/ui/proc-macro/generate-mod.rs
index 471f317edf9..9eea630c310 100644
--- a/src/test/ui/proc-macro/generate-mod.rs
+++ b/src/test/ui/proc-macro/generate-mod.rs
@@ -15,19 +15,16 @@ struct S;
 
 #[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope
                                      //~| ERROR cannot find type `OuterDerive` in this scope
-                                     //~| WARN this was previously accepted
-                                     //~| WARN this was previously accepted
 struct Z;
 
 fn inner_block() {
     #[derive(generate_mod::CheckDerive)] //~ ERROR cannot find type `FromOutside` in this scope
                                         //~| ERROR cannot find type `OuterDerive` in this scope
-                                        //~| WARN this was previously accepted
-                                        //~| WARN this was previously accepted
     struct InnerZ;
 }
 
-#[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
+#[derive(generate_mod::CheckDeriveLint)] //~  ERROR cannot find type `OuterDeriveLint` in this scope
+                                         //~| ERROR cannot find type `FromOutside` in this scope
 struct W;
 
 fn main() {}
diff --git a/src/test/ui/proc-macro/generate-mod.stderr b/src/test/ui/proc-macro/generate-mod.stderr
index 39bf28dba96..64042ca0ecd 100644
--- a/src/test/ui/proc-macro/generate-mod.stderr
+++ b/src/test/ui/proc-macro/generate-mod.stderr
@@ -38,127 +38,66 @@ LL | #[generate_mod::check_attr]
            OuterAttr
    = note: this error originates in the attribute macro `generate_mod::check_attr` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: cannot find type `FromOutside` in this scope
+error[E0412]: cannot find type `FromOutside` in this scope
   --> $DIR/generate-mod.rs:16:10
    |
 LL | #[derive(generate_mod::CheckDerive)]
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
    |
-   = 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 #83583 <https://github.com/rust-lang/rust/issues/83583>
-   = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default
+   = note: consider importing this struct:
+           FromOutside
    = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: cannot find type `OuterDerive` in this scope
+error[E0412]: cannot find type `OuterDerive` in this scope
   --> $DIR/generate-mod.rs:16:10
    |
 LL | #[derive(generate_mod::CheckDerive)]
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
-   |
-   = 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 #83583 <https://github.com/rust-lang/rust/issues/83583>
-   = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:23:14
-   |
-LL |     #[derive(generate_mod::CheckDerive)]
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
    |
-   = 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 #83583 <https://github.com/rust-lang/rust/issues/83583>
+   = note: consider importing this struct:
+           OuterDerive
    = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-error: cannot find type `OuterDerive` in this scope
-  --> $DIR/generate-mod.rs:23:14
+error[E0412]: cannot find type `FromOutside` in this scope
+  --> $DIR/generate-mod.rs:21:14
    |
 LL |     #[derive(generate_mod::CheckDerive)]
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
-   |
-   = 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 #83583 <https://github.com/rust-lang/rust/issues/83583>
-   = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-error: aborting due to 8 previous errors
-
-For more information about this error, try `rustc --explain E0412`.
-Future incompatibility report: Future breakage diagnostic:
-error: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:16:10
-   |
-LL | #[derive(generate_mod::CheckDerive)]
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
-   |
-   = 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 #83583 <https://github.com/rust-lang/rust/issues/83583>
-   = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default
-   = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
-
-Future breakage diagnostic:
-error: cannot find type `OuterDerive` in this scope
-  --> $DIR/generate-mod.rs:16:10
-   |
-LL | #[derive(generate_mod::CheckDerive)]
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
    |
-   = 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 #83583 <https://github.com/rust-lang/rust/issues/83583>
-   = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default
+   = note: consider importing this struct:
+           FromOutside
    = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-Future breakage diagnostic:
-error: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:23:14
+error[E0412]: cannot find type `OuterDerive` in this scope
+  --> $DIR/generate-mod.rs:21:14
    |
 LL |     #[derive(generate_mod::CheckDerive)]
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
+   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
    |
-   = 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 #83583 <https://github.com/rust-lang/rust/issues/83583>
-   = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default
+   = note: consider importing this struct:
+           OuterDerive
    = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-Future breakage diagnostic:
-error: cannot find type `OuterDerive` in this scope
-  --> $DIR/generate-mod.rs:23:14
+error[E0412]: cannot find type `FromOutside` in this scope
+  --> $DIR/generate-mod.rs:26:10
    |
-LL |     #[derive(generate_mod::CheckDerive)]
-   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
+LL | #[derive(generate_mod::CheckDeriveLint)]
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
    |
-   = 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 #83583 <https://github.com/rust-lang/rust/issues/83583>
-   = note: `#[deny(proc_macro_derive_resolution_fallback)]` on by default
-   = note: this error originates in the derive macro `generate_mod::CheckDerive` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: consider importing this struct:
+           FromOutside
+   = note: this error originates in the derive macro `generate_mod::CheckDeriveLint` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-Future breakage diagnostic:
-warning: cannot find type `FromOutside` in this scope
-  --> $DIR/generate-mod.rs:30:10
+error[E0412]: cannot find type `OuterDeriveLint` in this scope
+  --> $DIR/generate-mod.rs:26:10
    |
-LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
+LL | #[derive(generate_mod::CheckDeriveLint)]
+   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope
    |
-   = 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 #83583 <https://github.com/rust-lang/rust/issues/83583>
-note: the lint level is defined here
-  --> $DIR/generate-mod.rs:30:10
-   |
-LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: this warning originates in the derive macro `generate_mod::CheckDeriveLint` (in Nightly builds, run with -Z macro-backtrace for more info)
+   = note: consider importing this struct:
+           OuterDeriveLint
+   = note: this error originates in the derive macro `generate_mod::CheckDeriveLint` (in Nightly builds, run with -Z macro-backtrace for more info)
 
-Future breakage diagnostic:
-warning: cannot find type `OuterDeriveLint` in this scope
-  --> $DIR/generate-mod.rs:30:10
-   |
-LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ names from parent modules are not accessible without an explicit import
-   |
-   = 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 #83583 <https://github.com/rust-lang/rust/issues/83583>
-note: the lint level is defined here
-  --> $DIR/generate-mod.rs:30:10
-   |
-LL | #[derive(generate_mod::CheckDeriveLint)] // OK, lint is suppressed
-   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-   = note: this warning originates in the derive macro `generate_mod::CheckDeriveLint` (in Nightly builds, run with -Z macro-backtrace for more info)
+error: aborting due to 10 previous errors
 
+For more information about this error, try `rustc --explain E0412`.
diff --git a/src/test/ui/align-with-extern-c-fn.rs b/src/test/ui/repr/align-with-extern-c-fn.rs
index 9e490e27ad1..9e490e27ad1 100644
--- a/src/test/ui/align-with-extern-c-fn.rs
+++ b/src/test/ui/repr/align-with-extern-c-fn.rs
diff --git a/src/test/ui/aligned_enum_cast.rs b/src/test/ui/repr/aligned_enum_cast.rs
index 1ddf127172e..1ddf127172e 100644
--- a/src/test/ui/aligned_enum_cast.rs
+++ b/src/test/ui/repr/aligned_enum_cast.rs
diff --git a/src/test/ui/repr_c_int_align.rs b/src/test/ui/repr/repr_c_int_align.rs
index fdd14fc2dbe..fdd14fc2dbe 100644
--- a/src/test/ui/repr_c_int_align.rs
+++ b/src/test/ui/repr/repr_c_int_align.rs
diff --git a/src/test/ui/resolve/missing-in-namespace.stderr b/src/test/ui/resolve/missing-in-namespace.stderr
index 3d49b2e5dfc..fc925ba3b6a 100644
--- a/src/test/ui/resolve/missing-in-namespace.stderr
+++ b/src/test/ui/resolve/missing-in-namespace.stderr
@@ -1,8 +1,8 @@
 error[E0433]: failed to resolve: could not find `hahmap` in `std`
-  --> $DIR/missing-in-namespace.rs:2:29
+  --> $DIR/missing-in-namespace.rs:2:21
    |
 LL |     let _map = std::hahmap::HashMap::new();
-   |                             ^^^^^^^ not found in `std::hahmap`
+   |                     ^^^^^^ could not find `hahmap` in `std`
    |
 help: consider importing this struct
    |
diff --git a/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr b/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr
index eb26cd9cabb..5790e425c0a 100644
--- a/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr
+++ b/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr
@@ -1,16 +1,14 @@
 error[E0574]: expected struct, variant or union type, found type parameter `Baz`
   --> $DIR/point-at-type-parameter-shadowing-another-type.rs:16:13
    |
-LL | / struct Baz {
-LL | |     num: usize,
-LL | | }
-   | |_- you might have meant to refer to this struct
-LL |
-LL |   impl<Baz> Foo<Baz> for Bar {
-   |        --- found this type parameter
+LL | struct Baz {
+   |        --- you might have meant to refer to this struct
 ...
-LL |               Baz { num } => num,
-   |               ^^^ not a struct, variant or union type
+LL | impl<Baz> Foo<Baz> for Bar {
+   |      --- found this type parameter
+...
+LL |             Baz { num } => num,
+   |             ^^^ not a struct, variant or union type
 
 error: aborting due to previous error
 
diff --git a/src/test/ui/resolve/resolve-self-in-impl.stderr b/src/test/ui/resolve/resolve-self-in-impl.stderr
index 9f9ed68898f..b3042d41346 100644
--- a/src/test/ui/resolve/resolve-self-in-impl.stderr
+++ b/src/test/ui/resolve/resolve-self-in-impl.stderr
@@ -1,40 +1,40 @@
 error: `Self` is not valid in the self type of an impl block
-  --> $DIR/resolve-self-in-impl.rs:14:13
+  --> $DIR/resolve-self-in-impl.rs:16:6
    |
-LL | impl Tr for Self {}
-   |             ^^^^
+LL | impl Self {}
+   |      ^^^^
    |
    = note: replace `Self` with a different type
 
 error: `Self` is not valid in the self type of an impl block
-  --> $DIR/resolve-self-in-impl.rs:15:15
+  --> $DIR/resolve-self-in-impl.rs:17:8
    |
-LL | impl Tr for S<Self> {}
-   |               ^^^^
+LL | impl S<Self> {}
+   |        ^^^^
    |
    = note: replace `Self` with a different type
 
 error: `Self` is not valid in the self type of an impl block
-  --> $DIR/resolve-self-in-impl.rs:16:6
+  --> $DIR/resolve-self-in-impl.rs:18:7
    |
-LL | impl Self {}
-   |      ^^^^
+LL | impl (Self, Self) {}
+   |       ^^^^  ^^^^
    |
    = note: replace `Self` with a different type
 
 error: `Self` is not valid in the self type of an impl block
-  --> $DIR/resolve-self-in-impl.rs:17:8
+  --> $DIR/resolve-self-in-impl.rs:14:13
    |
-LL | impl S<Self> {}
-   |        ^^^^
+LL | impl Tr for Self {}
+   |             ^^^^
    |
    = note: replace `Self` with a different type
 
 error: `Self` is not valid in the self type of an impl block
-  --> $DIR/resolve-self-in-impl.rs:18:7
+  --> $DIR/resolve-self-in-impl.rs:15:15
    |
-LL | impl (Self, Self) {}
-   |       ^^^^  ^^^^
+LL | impl Tr for S<Self> {}
+   |               ^^^^
    |
    = note: replace `Self` with a different type
 
diff --git a/src/test/ui/resolve/typo-suggestion-mistyped-in-path.rs b/src/test/ui/resolve/typo-suggestion-mistyped-in-path.rs
new file mode 100644
index 00000000000..3ce17a14f14
--- /dev/null
+++ b/src/test/ui/resolve/typo-suggestion-mistyped-in-path.rs
@@ -0,0 +1,42 @@
+struct Struct;
+//~^ NOTE function or associated item `fob` not found for this struct
+
+impl Struct {
+    fn foo() { }
+}
+
+mod module {
+    fn foo() { }
+
+    struct Struct;
+
+    impl Struct {
+        fn foo() { }
+    }
+}
+
+trait Trait {
+    fn foo();
+}
+
+fn main() {
+    Struct::fob();
+    //~^ ERROR no function or associated item named `fob` found for struct `Struct` in the current scope
+    //~| NOTE function or associated item not found in `Struct`
+
+    Struc::foo();
+    //~^ ERROR failed to resolve: use of undeclared type `Struc`
+    //~| NOTE use of undeclared type `Struc`
+
+    modul::foo();
+    //~^ ERROR failed to resolve: use of undeclared crate or module `modul`
+    //~| NOTE use of undeclared crate or module `modul`
+
+    module::Struc::foo();
+    //~^ ERROR failed to resolve: could not find `Struc` in `module`
+    //~| NOTE could not find `Struc` in `module`
+
+    Trai::foo();
+    //~^ ERROR failed to resolve: use of undeclared type `Trai`
+    //~| NOTE use of undeclared type `Trai`
+}
diff --git a/src/test/ui/resolve/typo-suggestion-mistyped-in-path.stderr b/src/test/ui/resolve/typo-suggestion-mistyped-in-path.stderr
new file mode 100644
index 00000000000..ff7cf531c06
--- /dev/null
+++ b/src/test/ui/resolve/typo-suggestion-mistyped-in-path.stderr
@@ -0,0 +1,54 @@
+error[E0433]: failed to resolve: use of undeclared type `Struc`
+  --> $DIR/typo-suggestion-mistyped-in-path.rs:27:5
+   |
+LL |     Struc::foo();
+   |     ^^^^^
+   |     |
+   |     use of undeclared type `Struc`
+   |     help: a struct with a similar name exists: `Struct`
+
+error[E0433]: failed to resolve: use of undeclared crate or module `modul`
+  --> $DIR/typo-suggestion-mistyped-in-path.rs:31:5
+   |
+LL |     modul::foo();
+   |     ^^^^^ use of undeclared crate or module `modul`
+   |
+help: there is a crate or module with a similar name
+   |
+LL |     module::foo();
+   |     ~~~~~~
+
+error[E0433]: failed to resolve: could not find `Struc` in `module`
+  --> $DIR/typo-suggestion-mistyped-in-path.rs:35:13
+   |
+LL |     module::Struc::foo();
+   |             ^^^^^
+   |             |
+   |             could not find `Struc` in `module`
+   |             help: a struct with a similar name exists: `Struct`
+
+error[E0433]: failed to resolve: use of undeclared type `Trai`
+  --> $DIR/typo-suggestion-mistyped-in-path.rs:39:5
+   |
+LL |     Trai::foo();
+   |     ^^^^
+   |     |
+   |     use of undeclared type `Trai`
+   |     help: a trait with a similar name exists: `Trait`
+
+error[E0599]: no function or associated item named `fob` found for struct `Struct` in the current scope
+  --> $DIR/typo-suggestion-mistyped-in-path.rs:23:13
+   |
+LL | struct Struct;
+   | ------------- function or associated item `fob` not found for this struct
+...
+LL |     Struct::fob();
+   |             ^^^
+   |             |
+   |             function or associated item not found in `Struct`
+   |             help: there is an associated function with a similar name: `foo`
+
+error: aborting due to 5 previous errors
+
+Some errors have detailed explanations: E0433, E0599.
+For more information about an error, try `rustc --explain E0433`.
diff --git a/src/test/ui/resolve/use_suggestion.stderr b/src/test/ui/resolve/use_suggestion.stderr
index 4fff179b1fe..58cb659e822 100644
--- a/src/test/ui/resolve/use_suggestion.stderr
+++ b/src/test/ui/resolve/use_suggestion.stderr
@@ -8,7 +8,7 @@ error[E0433]: failed to resolve: use of undeclared type `HashMap`
   --> $DIR/use_suggestion.rs:2:14
    |
 LL |     let x1 = HashMap::new();
-   |              ^^^^^^^ not found in this scope
+   |              ^^^^^^^ use of undeclared type `HashMap`
    |
 help: consider importing this struct
    |
diff --git a/src/test/ui/rfc1623.rs b/src/test/ui/rfcs/rfc1623-2.rs
index c0e13a5f5f0..c0e13a5f5f0 100644
--- a/src/test/ui/rfc1623.rs
+++ b/src/test/ui/rfcs/rfc1623-2.rs
diff --git a/src/test/ui/rfc1623.stderr b/src/test/ui/rfcs/rfc1623-2.stderr
index b15a4cb110b..d183eaaa623 100644
--- a/src/test/ui/rfc1623.stderr
+++ b/src/test/ui/rfcs/rfc1623-2.stderr
@@ -1,5 +1,5 @@
 error[E0308]: mismatched types
-  --> $DIR/rfc1623.rs:28:8
+  --> $DIR/rfc1623-2.rs:28:8
    |
 LL |     f: &id,
    |        ^^^ one type is more general than the other
@@ -8,7 +8,7 @@ LL |     f: &id,
               found trait `Fn<(&Foo<'_>,)>`
 
 error[E0308]: mismatched types
-  --> $DIR/rfc1623.rs:28:8
+  --> $DIR/rfc1623-2.rs:28:8
    |
 LL |     f: &id,
    |        ^^^ one type is more general than the other
@@ -17,7 +17,7 @@ LL |     f: &id,
               found trait `Fn<(&Foo<'_>,)>`
 
 error: implementation of `FnOnce` is not general enough
-  --> $DIR/rfc1623.rs:28:8
+  --> $DIR/rfc1623-2.rs:28:8
    |
 LL |     f: &id,
    |        ^^^ implementation of `FnOnce` is not general enough
@@ -26,7 +26,7 @@ LL |     f: &id,
    = note: ...but it actually implements `FnOnce<(&'2 Foo<'_>,)>`, for some specific lifetime `'2`
 
 error: implementation of `FnOnce` is not general enough
-  --> $DIR/rfc1623.rs:28:8
+  --> $DIR/rfc1623-2.rs:28:8
    |
 LL |     f: &id,
    |        ^^^ implementation of `FnOnce` is not general enough
diff --git a/src/test/ui/rfc1623-2.rs b/src/test/ui/rfcs/rfc1623-3.rs
index 26fa6fdb57f..26fa6fdb57f 100644
--- a/src/test/ui/rfc1623-2.rs
+++ b/src/test/ui/rfcs/rfc1623-3.rs
diff --git a/src/test/ui/rfc1623-2.stderr b/src/test/ui/rfcs/rfc1623-3.stderr
index 945c6533c79..77fc3f0412e 100644
--- a/src/test/ui/rfc1623-2.stderr
+++ b/src/test/ui/rfcs/rfc1623-3.stderr
@@ -1,5 +1,5 @@
 error[E0106]: missing lifetime specifier
-  --> $DIR/rfc1623-2.rs:8:42
+  --> $DIR/rfc1623-3.rs:8:42
    |
 LL | static NON_ELIDABLE_FN: &fn(&u8, &u8) -> &u8 =
    |                             ---  ---     ^ expected named lifetime parameter
@@ -12,7 +12,7 @@ LL | static NON_ELIDABLE_FN: &for<'a> fn(&'a u8, &'a u8) -> &'a u8 =
    |                          +++++++     ++      ++         ++
 
 error[E0106]: missing lifetime specifier
-  --> $DIR/rfc1623-2.rs:10:39
+  --> $DIR/rfc1623-3.rs:10:39
    |
 LL |     &(non_elidable as fn(&u8, &u8) -> &u8);
    |                          ---  ---     ^ expected named lifetime parameter
@@ -24,7 +24,7 @@ LL |     &(non_elidable as for<'a> fn(&'a u8, &'a u8) -> &'a u8);
    |                       +++++++     ++      ++         ++
 
 error[E0605]: non-primitive cast: `for<'a, 'b> fn(&'a u8, &'b u8) -> &'a u8 {non_elidable}` as `for<'a, 'b> fn(&'a u8, &'b u8) -> &u8`
-  --> $DIR/rfc1623-2.rs:10:6
+  --> $DIR/rfc1623-3.rs:10:6
    |
 LL |     &(non_elidable as fn(&u8, &u8) -> &u8);
    |      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ invalid cast
diff --git a/src/test/ui/span/issue-35987.stderr b/src/test/ui/span/issue-35987.stderr
index d8fddc8007f..057d40ac0cb 100644
--- a/src/test/ui/span/issue-35987.stderr
+++ b/src/test/ui/span/issue-35987.stderr
@@ -1,6 +1,9 @@
 error[E0404]: expected trait, found type parameter `Add`
   --> $DIR/issue-35987.rs:5:21
    |
+LL | use std::ops::Add;
+   |               --- you might have meant to refer to this trait
+LL |
 LL | impl<T: Clone, Add> Add for Foo<T> {
    |                ---  ^^^ not a trait
    |                |
diff --git a/src/test/ui/suggestions/core-std-import-order-issue-83564.stderr b/src/test/ui/suggestions/core-std-import-order-issue-83564.stderr
index ce85d93b96c..e4e1fc591c4 100644
--- a/src/test/ui/suggestions/core-std-import-order-issue-83564.stderr
+++ b/src/test/ui/suggestions/core-std-import-order-issue-83564.stderr
@@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `NonZeroU32`
   --> $DIR/core-std-import-order-issue-83564.rs:8:14
    |
 LL |     let _x = NonZeroU32::new(5).unwrap();
-   |              ^^^^^^^^^^ not found in this scope
+   |              ^^^^^^^^^^ use of undeclared type `NonZeroU32`
    |
 help: consider importing one of these items
    |
diff --git a/src/test/ui/suggestions/suggest-tryinto-edition-change.rs b/src/test/ui/suggestions/suggest-tryinto-edition-change.rs
index f03b42bbe47..70c4b210d3a 100644
--- a/src/test/ui/suggestions/suggest-tryinto-edition-change.rs
+++ b/src/test/ui/suggestions/suggest-tryinto-edition-change.rs
@@ -10,18 +10,19 @@ fn test() {
 
     let _i: i16 = TryFrom::try_from(0_i32).unwrap();
     //~^ ERROR failed to resolve: use of undeclared type
-    //~| NOTE not found in this scope
+    //~| NOTE use of undeclared type
     //~| NOTE 'std::convert::TryFrom' is included in the prelude starting in Edition 2021
     //~| NOTE 'core::convert::TryFrom' is included in the prelude starting in Edition 2021
 
     let _i: i16 = TryInto::try_into(0_i32).unwrap();
     //~^ ERROR failed to resolve: use of undeclared type
-    //~| NOTE not found in this scope
+    //~| NOTE use of undeclared type
     //~| NOTE 'std::convert::TryInto' is included in the prelude starting in Edition 2021
     //~| NOTE 'core::convert::TryInto' is included in the prelude starting in Edition 2021
 
     let _v: Vec<_> = FromIterator::from_iter(&[1]);
     //~^ ERROR failed to resolve: use of undeclared type
+    //~| NOTE use of undeclared type
     //~| NOTE 'std::iter::FromIterator' is included in the prelude starting in Edition 2021
     //~| NOTE 'core::iter::FromIterator' is included in the prelude starting in Edition 2021
 }
diff --git a/src/test/ui/suggestions/suggest-tryinto-edition-change.stderr b/src/test/ui/suggestions/suggest-tryinto-edition-change.stderr
index 86f48716b16..3d1f2492360 100644
--- a/src/test/ui/suggestions/suggest-tryinto-edition-change.stderr
+++ b/src/test/ui/suggestions/suggest-tryinto-edition-change.stderr
@@ -2,7 +2,7 @@ error[E0433]: failed to resolve: use of undeclared type `TryFrom`
   --> $DIR/suggest-tryinto-edition-change.rs:11:19
    |
 LL |     let _i: i16 = TryFrom::try_from(0_i32).unwrap();
-   |                   ^^^^^^^ not found in this scope
+   |                   ^^^^^^^ use of undeclared type `TryFrom`
    |
    = note: 'std::convert::TryFrom' is included in the prelude starting in Edition 2021
    = note: 'core::convert::TryFrom' is included in the prelude starting in Edition 2021
@@ -17,7 +17,7 @@ error[E0433]: failed to resolve: use of undeclared type `TryInto`
   --> $DIR/suggest-tryinto-edition-change.rs:17:19
    |
 LL |     let _i: i16 = TryInto::try_into(0_i32).unwrap();
-   |                   ^^^^^^^ not found in this scope
+   |                   ^^^^^^^ use of undeclared type `TryInto`
    |
    = note: 'std::convert::TryInto' is included in the prelude starting in Edition 2021
    = note: 'core::convert::TryInto' is included in the prelude starting in Edition 2021
@@ -32,12 +32,7 @@ error[E0433]: failed to resolve: use of undeclared type `FromIterator`
   --> $DIR/suggest-tryinto-edition-change.rs:23:22
    |
 LL |     let _v: Vec<_> = FromIterator::from_iter(&[1]);
-   |                      ^^^^^^^^^^^^
-   |
-  ::: $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL
-   |
-LL | pub trait IntoIterator {
-   | ---------------------- similarly named trait `IntoIterator` defined here
+   |                      ^^^^^^^^^^^^ use of undeclared type `FromIterator`
    |
    = note: 'std::iter::FromIterator' is included in the prelude starting in Edition 2021
    = note: 'core::iter::FromIterator' is included in the prelude starting in Edition 2021
diff --git a/src/test/ui/test-attrs/test-thread-capture.run.stdout b/src/test/ui/test-attrs/test-thread-capture.run.stdout
index c712a78afb0..513c8cf2add 100644
--- a/src/test/ui/test-attrs/test-thread-capture.run.stdout
+++ b/src/test/ui/test-attrs/test-thread-capture.run.stdout
@@ -10,7 +10,7 @@ fee
 fie
 foe
 fum
-thread 'main' panicked at 'explicit panic', $DIR/test-thread-capture.rs:32:5
+thread 'thready_fail' panicked at 'explicit panic', $DIR/test-thread-capture.rs:32:5
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 
 
diff --git a/src/test/ui/test-attrs/test-thread-nocapture.run.stderr b/src/test/ui/test-attrs/test-thread-nocapture.run.stderr
index 0a12a052819..8c905d1af85 100644
--- a/src/test/ui/test-attrs/test-thread-nocapture.run.stderr
+++ b/src/test/ui/test-attrs/test-thread-nocapture.run.stderr
@@ -1,2 +1,2 @@
-thread 'main' panicked at 'explicit panic', $DIR/test-thread-nocapture.rs:32:5
+thread 'thready_fail' panicked at 'explicit panic', $DIR/test-thread-nocapture.rs:32:5
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
diff --git a/src/test/ui/track-diagnostics/track.rs b/src/test/ui/track-diagnostics/track.rs
new file mode 100644
index 00000000000..61b9137eadd
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track.rs
@@ -0,0 +1,11 @@
+// compile-flags: -Z track-diagnostics
+// error-pattern: created at
+
+// Normalize the emitted location so this doesn't need
+// updating everytime someone adds or removes a line.
+// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC"
+// normalize-stderr-test "note: rustc .+ running on .+" -> "note: rustc $$VERSION running on $$TARGET"
+
+fn main() {
+    break rust
+}
diff --git a/src/test/ui/track-diagnostics/track.stderr b/src/test/ui/track-diagnostics/track.stderr
new file mode 100644
index 00000000000..8256c1f5f0f
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track.stderr
@@ -0,0 +1,26 @@
+error[E0425]: cannot find value `rust` in this scope
+  --> $DIR/track.rs:LL:CC
+   |
+LL |     break rust
+   |           ^^^^ not found in this scope
+-Ztrack-diagnostics: created at compiler/rustc_resolve/src/late/diagnostics.rs:LL:CC
+
+error[E0268]: `break` outside of a loop or labeled block
+  --> $DIR/track.rs:LL:CC
+   |
+LL |     break rust
+   |     ^^^^^^^^^^ cannot `break` outside of a loop or labeled block
+-Ztrack-diagnostics: created at compiler/rustc_passes/src/loops.rs:LL:CC
+
+error: internal compiler error: It looks like you're trying to break rust; would you like some ICE?
+
+note: the compiler expectedly panicked. this is a feature.
+
+note: we would appreciate a joke overview: https://github.com/rust-lang/rust/issues/43162#issuecomment-320764675
+
+note: rustc $VERSION running on $TARGET
+
+error: aborting due to 3 previous errors
+
+Some errors have detailed explanations: E0268, E0425.
+For more information about an error, try `rustc --explain E0268`.
diff --git a/src/test/ui/track-diagnostics/track2.rs b/src/test/ui/track-diagnostics/track2.rs
new file mode 100644
index 00000000000..dc105c61d72
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track2.rs
@@ -0,0 +1,10 @@
+// compile-flags: -Z track-diagnostics
+// error-pattern: created at
+
+// Normalize the emitted location so this doesn't need
+// updating everytime someone adds or removes a line.
+// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC"
+
+fn main() {
+    let _moved @ _from = String::from("foo");
+}
diff --git a/src/test/ui/track-diagnostics/track2.stderr b/src/test/ui/track-diagnostics/track2.stderr
new file mode 100644
index 00000000000..38a621da816
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track2.stderr
@@ -0,0 +1,13 @@
+error[E0382]: use of moved value
+  --> $DIR/track2.rs:LL:CC
+   |
+LL |     let _moved @ _from = String::from("foo");
+   |         ^^^^^^   -----   ------------------- move occurs because value has type `String`, which does not implement the `Copy` trait
+   |         |        |
+   |         |        value moved here
+   |         value used here after move
+-Ztrack-diagnostics: created at compiler/rustc_borrowck/src/borrowck_errors.rs:LL:CC
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0382`.
diff --git a/src/test/ui/track-diagnostics/track3.rs b/src/test/ui/track-diagnostics/track3.rs
new file mode 100644
index 00000000000..0699239503a
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track3.rs
@@ -0,0 +1,10 @@
+// compile-flags: -Z track-diagnostics
+// error-pattern: created at
+
+// Normalize the emitted location so this doesn't need
+// updating everytime someone adds or removes a line.
+// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC"
+
+fn main() {
+    let _unimported = Blah { field: u8 };
+}
diff --git a/src/test/ui/track-diagnostics/track3.stderr b/src/test/ui/track-diagnostics/track3.stderr
new file mode 100644
index 00000000000..dc468d7e8ee
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track3.stderr
@@ -0,0 +1,18 @@
+error[E0422]: cannot find struct, variant or union type `Blah` in this scope
+  --> $DIR/track3.rs:LL:CC
+   |
+LL |     let _unimported = Blah { field: u8 };
+   |                       ^^^^ not found in this scope
+-Ztrack-diagnostics: created at compiler/rustc_resolve/src/late/diagnostics.rs:LL:CC
+
+error[E0423]: expected value, found builtin type `u8`
+  --> $DIR/track3.rs:LL:CC
+   |
+LL |     let _unimported = Blah { field: u8 };
+   |                                     ^^ not a value
+-Ztrack-diagnostics: created at compiler/rustc_resolve/src/late/diagnostics.rs:LL:CC
+
+error: aborting due to 2 previous errors
+
+Some errors have detailed explanations: E0422, E0423.
+For more information about an error, try `rustc --explain E0422`.
diff --git a/src/test/ui/track-diagnostics/track4.rs b/src/test/ui/track-diagnostics/track4.rs
new file mode 100644
index 00000000000..35eec799bba
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track4.rs
@@ -0,0 +1,13 @@
+// compile-flags: -Z track-diagnostics
+// error-pattern: created at
+
+// Normalize the emitted location so this doesn't need
+// updating everytime someone adds or removes a line.
+// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC"
+
+pub onion {
+    Owo(u8),
+    Uwu(i8),
+}
+
+fn main() {}
diff --git a/src/test/ui/track-diagnostics/track4.stderr b/src/test/ui/track-diagnostics/track4.stderr
new file mode 100644
index 00000000000..c4668444c4b
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track4.stderr
@@ -0,0 +1,14 @@
+error: missing `struct` for struct definition
+  --> $DIR/track4.rs:LL:CC
+   |
+LL | pub onion {
+   |    ^
+-Ztrack-diagnostics: created at compiler/rustc_parse/src/parser/diagnostics.rs:LL:CC
+   |
+help: add `struct` here to parse `onion` as a public struct
+   |
+LL | pub struct onion {
+   |     ++++++
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/track-diagnostics/track5.rs b/src/test/ui/track-diagnostics/track5.rs
new file mode 100644
index 00000000000..c41d9424e85
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track5.rs
@@ -0,0 +1,8 @@
+// compile-flags: -Z track-diagnostics
+// error-pattern: created at
+
+// Normalize the emitted location so this doesn't need
+// updating everytime someone adds or removes a line.
+// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC"
+
+}
diff --git a/src/test/ui/track-diagnostics/track5.stderr b/src/test/ui/track-diagnostics/track5.stderr
new file mode 100644
index 00000000000..aa54f92b6c0
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track5.stderr
@@ -0,0 +1,9 @@
+error: unexpected closing delimiter: `}`
+  --> $DIR/track5.rs:LL:CC
+   |
+LL | }
+   | ^ unexpected closing delimiter
+-Ztrack-diagnostics: created at compiler/rustc_parse/src/lexer/tokentrees.rs:LL:CC
+
+error: aborting due to previous error
+
diff --git a/src/test/ui/track-diagnostics/track6.rs b/src/test/ui/track-diagnostics/track6.rs
new file mode 100644
index 00000000000..307e3101849
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track6.rs
@@ -0,0 +1,14 @@
+// compile-flags: -Z track-diagnostics
+// error-pattern: created at
+
+
+
+pub trait Foo {
+    fn bar();
+}
+
+impl <T> Foo for T {
+    default fn bar() {}
+}
+
+fn main() {}
diff --git a/src/test/ui/track-diagnostics/track6.stderr b/src/test/ui/track-diagnostics/track6.stderr
new file mode 100644
index 00000000000..1c7537633ff
--- /dev/null
+++ b/src/test/ui/track-diagnostics/track6.stderr
@@ -0,0 +1,13 @@
+error[E0658]: specialization is unstable
+  --> $DIR/track6.rs:11:5
+   |
+LL |     default fn bar() {}
+   |     ^^^^^^^^^^^^^^^^^^^
+-Ztrack-diagnostics: created at $COMPILER_DIR/rustc_session/src/parse.rs:93:5
+   |
+   = note: see issue #31844 <https://github.com/rust-lang/rust/issues/31844> for more information
+   = help: add `#![feature(specialization)]` to the crate attributes to enable
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/src/test/ui/traits/negative-impls/eager-mono.rs b/src/test/ui/traits/negative-impls/eager-mono.rs
new file mode 100644
index 00000000000..ce770376c0b
--- /dev/null
+++ b/src/test/ui/traits/negative-impls/eager-mono.rs
@@ -0,0 +1,12 @@
+// build-pass
+// compile-flags:-C link-dead-code=y
+
+#![feature(negative_impls)]
+
+trait Foo {
+    fn foo() {}
+}
+
+impl !Foo for () {}
+
+fn main() {}
diff --git a/src/test/ui/transmutability/arrays/issue-103783-array-length.rs b/src/test/ui/transmutability/arrays/issue-103783-array-length.rs
new file mode 100644
index 00000000000..cb36e539ed1
--- /dev/null
+++ b/src/test/ui/transmutability/arrays/issue-103783-array-length.rs
@@ -0,0 +1,24 @@
+#![crate_type = "lib"]
+#![feature(transmutability)]
+#![allow(dead_code)]
+
+mod assert {
+    use std::mem::{Assume, BikeshedIntrinsicFrom};
+    pub struct Context;
+
+    pub fn is_maybe_transmutable<Src, Dst>()
+    where
+        Dst: BikeshedIntrinsicFrom<
+            Src,
+            Context,
+            { Assume { alignment: true, lifetimes: true, safety: true, validity: true } },
+        >,
+    {
+    }
+}
+
+fn test() {
+    type NaughtyLenArray = [u32; 3.14159]; //~ ERROR mismatched types
+    type JustUnit = ();
+    assert::is_maybe_transmutable::<JustUnit, NaughtyLenArray>();
+}
diff --git a/src/test/ui/transmutability/arrays/issue-103783-array-length.stderr b/src/test/ui/transmutability/arrays/issue-103783-array-length.stderr
new file mode 100644
index 00000000000..37774c59e6c
--- /dev/null
+++ b/src/test/ui/transmutability/arrays/issue-103783-array-length.stderr
@@ -0,0 +1,9 @@
+error[E0308]: mismatched types
+  --> $DIR/issue-103783-array-length.rs:21:34
+   |
+LL |     type NaughtyLenArray = [u32; 3.14159];
+   |                                  ^^^^^^^ expected `usize`, found floating-point number
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/type-alias-enum-variants/self-in-enum-definition.stderr b/src/test/ui/type-alias-enum-variants/self-in-enum-definition.stderr
index 4775e68820b..576fc6a4f8d 100644
--- a/src/test/ui/type-alias-enum-variants/self-in-enum-definition.stderr
+++ b/src/test/ui/type-alias-enum-variants/self-in-enum-definition.stderr
@@ -14,6 +14,46 @@ note: ...which requires const-evaluating + checking `Alpha::V3::{constant#0}`...
    |
 LL |     V3 = Self::V1 {} as u8 + 2,
    |          ^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires caching mir of `Alpha::V3::{constant#0}` for CTFE...
+  --> $DIR/self-in-enum-definition.rs:5:10
+   |
+LL |     V3 = Self::V1 {} as u8 + 2,
+   |          ^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires elaborating drops for `Alpha::V3::{constant#0}`...
+  --> $DIR/self-in-enum-definition.rs:5:10
+   |
+LL |     V3 = Self::V1 {} as u8 + 2,
+   |          ^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires borrow-checking `Alpha::V3::{constant#0}`...
+  --> $DIR/self-in-enum-definition.rs:5:10
+   |
+LL |     V3 = Self::V1 {} as u8 + 2,
+   |          ^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires processing MIR for `Alpha::V3::{constant#0}`...
+  --> $DIR/self-in-enum-definition.rs:5:10
+   |
+LL |     V3 = Self::V1 {} as u8 + 2,
+   |          ^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires const checking `Alpha::V3::{constant#0}`...
+  --> $DIR/self-in-enum-definition.rs:5:10
+   |
+LL |     V3 = Self::V1 {} as u8 + 2,
+   |          ^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires preparing `Alpha::V3::{constant#0}` for borrow checking...
+  --> $DIR/self-in-enum-definition.rs:5:10
+   |
+LL |     V3 = Self::V1 {} as u8 + 2,
+   |          ^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires unsafety-checking `Alpha::V3::{constant#0}`...
+  --> $DIR/self-in-enum-definition.rs:5:10
+   |
+LL |     V3 = Self::V1 {} as u8 + 2,
+   |          ^^^^^^^^^^^^^^^^^^^^^
+note: ...which requires building MIR for `Alpha::V3::{constant#0}`...
+  --> $DIR/self-in-enum-definition.rs:5:10
+   |
+LL |     V3 = Self::V1 {} as u8 + 2,
+   |          ^^^^^^^^^^^^^^^^^^^^^
    = note: ...which requires computing layout of `Alpha`...
    = note: ...which again requires simplifying constant for the type system `Alpha::V3::{constant#0}`, completing the cycle
 note: cycle used when collecting item types in top-level module
diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs
index 067ed7ea1e5..cad3e0f6677 100644
--- a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs
+++ b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.rs
@@ -1,7 +1,6 @@
+// check-pass
 // Regression test for issue #57611
 // Ensures that we don't ICE
-// FIXME: This should compile, but it currently doesn't
-// known-bug: unknown
 
 #![feature(trait_alias)]
 #![feature(type_alias_impl_trait)]
diff --git a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr b/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr
deleted file mode 100644
index 6344f114a91..00000000000
--- a/src/test/ui/type-alias-impl-trait/issue-57611-trait-alias.stderr
+++ /dev/null
@@ -1,26 +0,0 @@
-error[E0308]: mismatched types
-  --> $DIR/issue-57611-trait-alias.rs:21:9
-   |
-LL |         |x| x
-   |         ^^^^^ one type is more general than the other
-   |
-   = note: expected trait `for<'a> Fn<(&'a X,)>`
-              found trait `Fn<(&X,)>`
-note: this closure does not fulfill the lifetime requirements
-  --> $DIR/issue-57611-trait-alias.rs:21:9
-   |
-LL |         |x| x
-   |         ^^^
-
-error: implementation of `FnOnce` is not general enough
-  --> $DIR/issue-57611-trait-alias.rs:21:9
-   |
-LL |         |x| x
-   |         ^^^^^ implementation of `FnOnce` is not general enough
-   |
-   = note: closure with signature `fn(&'2 X) -> &X` must implement `FnOnce<(&'1 X,)>`, for any lifetime `'1`...
-   = note: ...but it actually implements `FnOnce<(&'2 X,)>`, for some specific lifetime `'2`
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/type/issue-94187-verbose-type-name.rs b/src/test/ui/type/issue-94187-verbose-type-name.rs
index 902ef5ade2b..3713a32eb11 100644
--- a/src/test/ui/type/issue-94187-verbose-type-name.rs
+++ b/src/test/ui/type/issue-94187-verbose-type-name.rs
@@ -1,13 +1,16 @@
-// Check to insure that the output of `std::any::type_name` does not change based on -Zverbose
-// when printing constants
+// Check to insure that the output of `std::any::type_name` does not change based on `-Zverbose`
 // run-pass
 // edition: 2018
 // revisions: normal verbose
 // [verbose]compile-flags:-Zverbose
 
-struct Wrapper<const VALUE: usize>;
+use std::any::type_name;
 
 fn main() {
-    assert_eq!(std::any::type_name::<[u32; 0]>(), "[u32; 0]");
-    assert_eq!(std::any::type_name::<Wrapper<0>>(), "issue_94187_verbose_type_name::Wrapper<0>");
+    assert_eq!(type_name::<[u32; 0]>(), "[u32; 0]");
+
+    struct Wrapper<const VALUE: usize>;
+    assert_eq!(type_name::<Wrapper<0>>(), "issue_94187_verbose_type_name::main::Wrapper<0>");
+
+    assert_eq!(type_name::<dyn Fn(u32) -> u32>(), "dyn core::ops::function::Fn(u32) -> u32");
 }
diff --git a/src/test/ui/unsafe/unsafe-not-inherited.rs b/src/test/ui/unsafe/unsafe-not-inherited.rs
new file mode 100644
index 00000000000..6d797caa0f9
--- /dev/null
+++ b/src/test/ui/unsafe/unsafe-not-inherited.rs
@@ -0,0 +1,26 @@
+#![allow(unused, dead_code)]
+
+static mut FOO: u64 = 0;
+
+fn static_mod() {
+    unsafe {static BAR: u64 = FOO;}
+    //~^ ERROR: use of mutable static is unsafe
+    //~| NOTE: use of mutable static
+    //~| NOTE: mutable statics can be mutated by multiple threads
+    //~| NOTE: items do not inherit unsafety
+}
+
+unsafe fn unsafe_call() {}
+fn foo() {
+    unsafe {
+    //~^ NOTE: items do not inherit unsafety
+        fn bar() {
+            unsafe_call();
+            //~^ ERROR: call to unsafe function
+            //~| NOTE: call to unsafe function
+            //~| NOTE: consult the function's documentation
+        }
+    }
+}
+
+fn main() {}
diff --git a/src/test/ui/unsafe/unsafe-not-inherited.stderr b/src/test/ui/unsafe/unsafe-not-inherited.stderr
new file mode 100644
index 00000000000..3bc5ca5c9d1
--- /dev/null
+++ b/src/test/ui/unsafe/unsafe-not-inherited.stderr
@@ -0,0 +1,24 @@
+error[E0133]: use of mutable static is unsafe and requires unsafe function or block
+  --> $DIR/unsafe-not-inherited.rs:6:31
+   |
+LL |     unsafe {static BAR: u64 = FOO;}
+   |     ------                    ^^^ use of mutable static
+   |     |
+   |     items do not inherit unsafety from separate enclosing items
+   |
+   = note: mutable statics can be mutated by multiple threads: aliasing violations or data races will cause undefined behavior
+
+error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
+  --> $DIR/unsafe-not-inherited.rs:18:13
+   |
+LL |     unsafe {
+   |     ------ items do not inherit unsafety from separate enclosing items
+...
+LL |             unsafe_call();
+   |             ^^^^^^^^^^^^^ 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/src/tools/cargo b/src/tools/cargo
-Subproject 7e484fc1a766f56dbc95380f45719698e0c8274
+Subproject 9286a1beba5b28b115bad67de2ae91fb1c61eb0
diff --git a/src/tools/clippy/clippy_lints/src/doc.rs b/src/tools/clippy/clippy_lints/src/doc.rs
index 24d6a6951af..daaab79fef9 100644
--- a/src/tools/clippy/clippy_lints/src/doc.rs
+++ b/src/tools/clippy/clippy_lints/src/doc.rs
@@ -691,6 +691,7 @@ fn check_code(cx: &LateContext<'_>, text: &str, edition: Edition, span: Span) {
                     false,
                     None,
                     false,
+                    false,
                 );
                 let handler = Handler::with_emitter(false, None, Box::new(emitter));
                 let sess = ParseSess::with_span_handler(handler, sm);
diff --git a/src/tools/clippy/clippy_lints/src/lifetimes.rs b/src/tools/clippy/clippy_lints/src/lifetimes.rs
index 3bf2d7e4ea4..54c316358a1 100644
--- a/src/tools/clippy/clippy_lints/src/lifetimes.rs
+++ b/src/tools/clippy/clippy_lints/src/lifetimes.rs
@@ -6,11 +6,12 @@ use rustc_hir::intravisit::{
     walk_fn_decl, walk_generic_param, walk_generics, walk_impl_item_ref, walk_item, walk_param_bound,
     walk_poly_trait_ref, walk_trait_ref, walk_ty, Visitor,
 };
+use rustc_hir::lang_items;
 use rustc_hir::FnRetTy::Return;
 use rustc_hir::{
     BareFnTy, BodyId, FnDecl, GenericArg, GenericBound, GenericParam, GenericParamKind, Generics, Impl, ImplItem,
-    ImplItemKind, Item, ItemKind, LangItem, Lifetime, LifetimeName, ParamName, PolyTraitRef, PredicateOrigin, TraitFn,
-    TraitItem, TraitItemKind, Ty, TyKind, WherePredicate,
+    ImplItemKind, Item, ItemKind, Lifetime, LifetimeName, ParamName, PolyTraitRef, PredicateOrigin, TraitFn, TraitItem,
+    TraitItemKind, Ty, TyKind, WherePredicate,
 };
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::hir::nested_filter as middle_nested_filter;
@@ -364,8 +365,6 @@ fn unique_lifetimes(lts: &[RefLt]) -> usize {
     lts.iter().collect::<FxHashSet<_>>().len()
 }
 
-const CLOSURE_TRAIT_BOUNDS: [LangItem; 3] = [LangItem::Fn, LangItem::FnMut, LangItem::FnOnce];
-
 /// A visitor usable for `rustc_front::visit::walk_ty()`.
 struct RefVisitor<'a, 'tcx> {
     cx: &'a LateContext<'tcx>,
@@ -424,12 +423,8 @@ impl<'a, 'tcx> Visitor<'tcx> for RefVisitor<'a, 'tcx> {
 
     fn visit_poly_trait_ref(&mut self, poly_tref: &'tcx PolyTraitRef<'tcx>) {
         let trait_ref = &poly_tref.trait_ref;
-        if CLOSURE_TRAIT_BOUNDS.iter().any(|&item| {
-            self.cx
-                .tcx
-                .lang_items()
-                .require(item)
-                .map_or(false, |id| Some(id) == trait_ref.trait_def_id())
+        if let Some(id) = trait_ref.trait_def_id() && lang_items::FN_TRAITS.iter().any(|&item| {
+            self.cx.tcx.lang_items().get(item) == Some(id)
         }) {
             let mut sub_visitor = RefVisitor::new(self.cx);
             sub_visitor.visit_trait_ref(trait_ref);
diff --git a/src/tools/clippy/clippy_lints/src/manual_retain.rs b/src/tools/clippy/clippy_lints/src/manual_retain.rs
index 3181bc86d17..6abbab278fe 100644
--- a/src/tools/clippy/clippy_lints/src/manual_retain.rs
+++ b/src/tools/clippy/clippy_lints/src/manual_retain.rs
@@ -92,7 +92,7 @@ fn check_into_iter(
         && match_def_path(cx, filter_def_id, &paths::CORE_ITER_FILTER)
         && let hir::ExprKind::MethodCall(_, struct_expr, [], _) = &into_iter_expr.kind
         && let Some(into_iter_def_id) = cx.typeck_results().type_dependent_def_id(into_iter_expr.hir_id)
-        && cx.tcx.lang_items().require(hir::LangItem::IntoIterIntoIter).ok() == Some(into_iter_def_id)
+        && Some(into_iter_def_id) == cx.tcx.lang_items().into_iter_fn()
         && match_acceptable_type(cx, left_expr, msrv)
         && SpanlessEq::new(cx).eq_expr(left_expr, struct_expr) {
         suggest(cx, parent_expr, left_expr, target_expr);
diff --git a/src/tools/clippy/clippy_lints/src/methods/bind_instead_of_map.rs b/src/tools/clippy/clippy_lints/src/methods/bind_instead_of_map.rs
index cc26b0f7fa8..4720a6e6888 100644
--- a/src/tools/clippy/clippy_lints/src/methods/bind_instead_of_map.rs
+++ b/src/tools/clippy/clippy_lints/src/methods/bind_instead_of_map.rs
@@ -41,7 +41,7 @@ pub(crate) trait BindInsteadOfMap {
     const GOOD_METHOD_NAME: &'static str;
 
     fn no_op_msg(cx: &LateContext<'_>) -> Option<String> {
-        let variant_id = cx.tcx.lang_items().require(Self::VARIANT_LANG_ITEM).ok()?;
+        let variant_id = cx.tcx.lang_items().get(Self::VARIANT_LANG_ITEM)?;
         let item_id = cx.tcx.parent(variant_id);
         Some(format!(
             "using `{}.{}({})`, which is a no-op",
@@ -52,7 +52,7 @@ pub(crate) trait BindInsteadOfMap {
     }
 
     fn lint_msg(cx: &LateContext<'_>) -> Option<String> {
-        let variant_id = cx.tcx.lang_items().require(Self::VARIANT_LANG_ITEM).ok()?;
+        let variant_id = cx.tcx.lang_items().get(Self::VARIANT_LANG_ITEM)?;
         let item_id = cx.tcx.parent(variant_id);
         Some(format!(
             "using `{}.{}(|x| {}(y))`, which is more succinctly expressed as `{}(|x| y)`",
@@ -144,7 +144,7 @@ pub(crate) trait BindInsteadOfMap {
     fn check(cx: &LateContext<'_>, expr: &hir::Expr<'_>, recv: &hir::Expr<'_>, arg: &hir::Expr<'_>) -> bool {
         if_chain! {
             if let Some(adt) = cx.typeck_results().expr_ty(recv).ty_adt_def();
-            if let Ok(vid) = cx.tcx.lang_items().require(Self::VARIANT_LANG_ITEM);
+            if let Some(vid) = cx.tcx.lang_items().get(Self::VARIANT_LANG_ITEM);
             if adt.did() == cx.tcx.parent(vid);
             then {} else { return false; }
         }
@@ -181,7 +181,7 @@ pub(crate) trait BindInsteadOfMap {
 
     fn is_variant(cx: &LateContext<'_>, res: Res) -> bool {
         if let Res::Def(DefKind::Ctor(CtorOf::Variant, CtorKind::Fn), id) = res {
-            if let Ok(variant_id) = cx.tcx.lang_items().require(Self::VARIANT_LANG_ITEM) {
+            if let Some(variant_id) = cx.tcx.lang_items().get(Self::VARIANT_LANG_ITEM) {
                 return cx.tcx.parent(id) == variant_id;
             }
         }
diff --git a/src/tools/clippy/clippy_lints/src/methods/unnecessary_iter_cloned.rs b/src/tools/clippy/clippy_lints/src/methods/unnecessary_iter_cloned.rs
index 1966a85f7a7..4eb579af7a1 100644
--- a/src/tools/clippy/clippy_lints/src/methods/unnecessary_iter_cloned.rs
+++ b/src/tools/clippy/clippy_lints/src/methods/unnecessary_iter_cloned.rs
@@ -5,7 +5,7 @@ use clippy_utils::source::snippet_opt;
 use clippy_utils::ty::{get_associated_type, get_iterator_item_ty, implements_trait};
 use clippy_utils::{fn_def_id, get_parent_expr};
 use rustc_errors::Applicability;
-use rustc_hir::{def_id::DefId, Expr, ExprKind, LangItem};
+use rustc_hir::{def_id::DefId, Expr, ExprKind};
 use rustc_lint::LateContext;
 use rustc_span::{sym, Symbol};
 
@@ -100,5 +100,5 @@ pub fn check_for_loop_iter(
 
 /// Returns true if the named method is `IntoIterator::into_iter`.
 pub fn is_into_iter(cx: &LateContext<'_>, callee_def_id: DefId) -> bool {
-    cx.tcx.lang_items().require(LangItem::IntoIterIntoIter) == Ok(callee_def_id)
+    Some(callee_def_id) == cx.tcx.lang_items().into_iter_fn()
 }
diff --git a/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs b/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs
index 3566fe9a0bb..642a64ae77b 100644
--- a/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs
+++ b/src/tools/clippy/clippy_lints/src/methods/unnecessary_to_owned.rs
@@ -7,7 +7,7 @@ use clippy_utils::visitors::find_all_ret_expressions;
 use clippy_utils::{fn_def_id, get_parent_expr, is_diag_item_method, is_diag_trait_item, return_ty};
 use clippy_utils::{meets_msrv, msrvs};
 use rustc_errors::Applicability;
-use rustc_hir::{def_id::DefId, BorrowKind, Expr, ExprKind, ItemKind, LangItem, Node};
+use rustc_hir::{def_id::DefId, BorrowKind, Expr, ExprKind, ItemKind, Node};
 use rustc_hir_typeck::{FnCtxt, Inherited};
 use rustc_infer::infer::TyCtxtInferExt;
 use rustc_lint::LateContext;
@@ -378,7 +378,7 @@ fn can_change_type<'a>(cx: &LateContext<'a>, mut expr: &'a Expr<'a>, mut ty: Ty<
             Node::Expr(parent_expr) => {
                 if let Some((callee_def_id, call_substs, recv, call_args)) = get_callee_substs_and_args(cx, parent_expr)
                 {
-                    if cx.tcx.lang_items().require(LangItem::IntoFutureIntoFuture) == Ok(callee_def_id) {
+                    if Some(callee_def_id) == cx.tcx.lang_items().into_future_fn() {
                         return false;
                     }
 
diff --git a/src/tools/clippy/clippy_lints/src/operators/assign_op_pattern.rs b/src/tools/clippy/clippy_lints/src/operators/assign_op_pattern.rs
index ee9fd94064c..9bbf385fb59 100644
--- a/src/tools/clippy/clippy_lints/src/operators/assign_op_pattern.rs
+++ b/src/tools/clippy/clippy_lints/src/operators/assign_op_pattern.rs
@@ -28,7 +28,7 @@ pub(super) fn check<'tcx>(
             let rty = cx.typeck_results().expr_ty(rhs);
             if_chain! {
                 if let Some((_, lang_item)) = binop_traits(op.node);
-                if let Ok(trait_id) = cx.tcx.lang_items().require(lang_item);
+                if let Some(trait_id) = cx.tcx.lang_items().get(lang_item);
                 let parent_fn = cx.tcx.hir().get_parent_item(e.hir_id).def_id;
                 if trait_ref_of_method(cx, parent_fn)
                     .map_or(true, |t| t.path.res.def_id() != trait_id);
diff --git a/src/tools/clippy/clippy_lints/src/suspicious_trait_impl.rs b/src/tools/clippy/clippy_lints/src/suspicious_trait_impl.rs
index b57b484bdc8..6271ea02731 100644
--- a/src/tools/clippy/clippy_lints/src/suspicious_trait_impl.rs
+++ b/src/tools/clippy/clippy_lints/src/suspicious_trait_impl.rs
@@ -60,8 +60,8 @@ impl<'tcx> LateLintPass<'tcx> for SuspiciousImpl {
         if_chain! {
             if let hir::ExprKind::Binary(binop, _, _) | hir::ExprKind::AssignOp(binop, ..) = expr.kind;
             if let Some((binop_trait_lang, op_assign_trait_lang)) = binop_traits(binop.node);
-            if let Ok(binop_trait_id) = cx.tcx.lang_items().require(binop_trait_lang);
-            if let Ok(op_assign_trait_id) = cx.tcx.lang_items().require(op_assign_trait_lang);
+            if let Some(binop_trait_id) = cx.tcx.lang_items().get(binop_trait_lang);
+            if let Some(op_assign_trait_id) = cx.tcx.lang_items().get(op_assign_trait_lang);
 
             // Check for more than one binary operation in the implemented function
             // Linting when multiple operations are involved can result in false positives
@@ -78,7 +78,7 @@ impl<'tcx> LateLintPass<'tcx> for SuspiciousImpl {
                 (&OP_ASSIGN_TRAITS, SUSPICIOUS_OP_ASSIGN_IMPL),
             ]
                 .iter()
-                .find(|&(ts, _)| ts.iter().any(|&t| Ok(trait_id) == cx.tcx.lang_items().require(t)));
+                .find(|&(ts, _)| ts.iter().any(|&t| Some(trait_id) == cx.tcx.lang_items().get(t)));
             if count_binops(body.value) == 1;
             then {
                 span_lint(
diff --git a/src/tools/clippy/clippy_lints/src/unnecessary_owned_empty_strings.rs b/src/tools/clippy/clippy_lints/src/unnecessary_owned_empty_strings.rs
index 016aacbf9da..ab73f0fc44f 100644
--- a/src/tools/clippy/clippy_lints/src/unnecessary_owned_empty_strings.rs
+++ b/src/tools/clippy/clippy_lints/src/unnecessary_owned_empty_strings.rs
@@ -3,7 +3,7 @@ use clippy_utils::{match_def_path, paths};
 use if_chain::if_chain;
 use rustc_ast::ast::LitKind;
 use rustc_errors::Applicability;
-use rustc_hir::{BorrowKind, Expr, ExprKind, LangItem, Mutability};
+use rustc_hir::{BorrowKind, Expr, ExprKind, Mutability};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::ty;
 use rustc_session::{declare_lint_pass, declare_tool_lint};
@@ -55,7 +55,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnecessaryOwnedEmptyStrings {
                         );
                 } else {
                     if_chain! {
-                        if cx.tcx.lang_items().require(LangItem::FromFrom).ok() == Some(fun_def_id);
+                        if Some(fun_def_id) == cx.tcx.lang_items().from_fn();
                         if let [.., last_arg] = args;
                         if let ExprKind::Lit(spanned) = &last_arg.kind;
                         if let LitKind::Str(symbol, _) = spanned.node;
diff --git a/src/tools/clippy/clippy_lints/src/unused_peekable.rs b/src/tools/clippy/clippy_lints/src/unused_peekable.rs
index f1cebf0f992..b452be08409 100644
--- a/src/tools/clippy/clippy_lints/src/unused_peekable.rs
+++ b/src/tools/clippy/clippy_lints/src/unused_peekable.rs
@@ -3,7 +3,6 @@ use clippy_utils::ty::{match_type, peel_mid_ty_refs_is_mutable};
 use clippy_utils::{fn_def_id, is_trait_method, path_to_local_id, paths, peel_ref_operators};
 use rustc_ast::Mutability;
 use rustc_hir::intravisit::{walk_expr, Visitor};
-use rustc_hir::lang_items::LangItem;
 use rustc_hir::{Block, Expr, ExprKind, HirId, Local, Node, PatKind, PathSegment, StmtKind};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::hir::nested_filter::OnlyBodies;
@@ -132,11 +131,11 @@ impl<'tcx> Visitor<'tcx> for PeekableVisitor<'_, 'tcx> {
                             // If the Peekable is passed to a function, stop
                             ExprKind::Call(_, args) => {
                                 if let Some(func_did) = fn_def_id(self.cx, expr)
-                                    && let Ok(into_iter_did) = self
+                                    && let Some(into_iter_did) = self
                                         .cx
                                         .tcx
                                         .lang_items()
-                                        .require(LangItem::IntoIterIntoIter)
+                                        .into_iter_fn()
                                     && func_did == into_iter_did
                                 {
                                     // Probably a for loop desugar, stop searching
diff --git a/src/tools/clippy/clippy_lints/src/useless_conversion.rs b/src/tools/clippy/clippy_lints/src/useless_conversion.rs
index 1f69db1cbca..3743d5d97a7 100644
--- a/src/tools/clippy/clippy_lints/src/useless_conversion.rs
+++ b/src/tools/clippy/clippy_lints/src/useless_conversion.rs
@@ -5,7 +5,7 @@ use clippy_utils::ty::{is_type_diagnostic_item, same_type_and_consts};
 use clippy_utils::{get_parent_expr, is_trait_method, match_def_path, paths};
 use if_chain::if_chain;
 use rustc_errors::Applicability;
-use rustc_hir::{Expr, ExprKind, HirId, LangItem, MatchSource};
+use rustc_hir::{Expr, ExprKind, HirId, MatchSource};
 use rustc_lint::{LateContext, LateLintPass};
 use rustc_middle::ty;
 use rustc_session::{declare_tool_lint, impl_lint_pass};
@@ -153,7 +153,7 @@ impl<'tcx> LateLintPass<'tcx> for UselessConversion {
                         }
 
                         if_chain! {
-                            if cx.tcx.lang_items().require(LangItem::FromFrom).ok() == Some(def_id);
+                            if Some(def_id) == cx.tcx.lang_items().from_fn();
                             if same_type_and_consts(a, b);
 
                             then {
diff --git a/src/tools/clippy/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs b/src/tools/clippy/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs
index 4cf76f53625..2a028c8141f 100644
--- a/src/tools/clippy/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs
+++ b/src/tools/clippy/clippy_lints/src/utils/internal_lints/unnecessary_def_path.rs
@@ -152,7 +152,7 @@ impl UnnecessaryDefPath {
                         has_ctor,
                     ),
                     (0, Item::LangItem(item)) => (
-                        format!("{cx_snip}.tcx.lang_items().require(LangItem::{item}).ok() == Some({def_snip})"),
+                        format!("{cx_snip}.tcx.lang_items().get(LangItem::{item}) == Some({def_snip})"),
                         has_ctor,
                     ),
                     // match_trait_method
@@ -184,7 +184,7 @@ impl UnnecessaryDefPath {
                     (3, Item::LangItem(item)) => (
                         format!(
                             "path_res({cx_snip}, {def_snip}).opt_def_id()\
-                                .map_or(false, |id| {cx_snip}.tcx.lang_items().require(LangItem::{item}).ok() == Some(id))",
+                                .map_or(false, |id| {cx_snip}.tcx.lang_items().get(LangItem::{item}) == Some(id))",
                         ),
                         false,
                     ),
diff --git a/src/tools/clippy/clippy_utils/src/lib.rs b/src/tools/clippy/clippy_utils/src/lib.rs
index 3ebfc5e00e1..d32cf1a7936 100644
--- a/src/tools/clippy/clippy_utils/src/lib.rs
+++ b/src/tools/clippy/clippy_utils/src/lib.rs
@@ -247,7 +247,7 @@ pub fn in_constant(cx: &LateContext<'_>, id: HirId) -> bool {
 /// For example, use this to check whether a function call or a pattern is `Some(..)`.
 pub fn is_res_lang_ctor(cx: &LateContext<'_>, res: Res, lang_item: LangItem) -> bool {
     if let Res::Def(DefKind::Ctor(..), id) = res
-        && let Ok(lang_id) = cx.tcx.lang_items().require(lang_item)
+        && let Some(lang_id) = cx.tcx.lang_items().get(lang_item)
         && let Some(id) = cx.tcx.opt_parent(id)
     {
         id == lang_id
@@ -303,7 +303,7 @@ pub fn is_lang_item_or_ctor(cx: &LateContext<'_>, did: DefId, item: LangItem) ->
         _ => did,
     };
 
-    cx.tcx.lang_items().require(item).map_or(false, |id| id == did)
+    cx.tcx.lang_items().get(item) == Some(did)
 }
 
 pub fn is_unit_expr(expr: &Expr<'_>) -> bool {
diff --git a/src/tools/clippy/clippy_utils/src/ty.rs b/src/tools/clippy/clippy_utils/src/ty.rs
index 4e024ce4017..3a144c2bb22 100644
--- a/src/tools/clippy/clippy_utils/src/ty.rs
+++ b/src/tools/clippy/clippy_utils/src/ty.rs
@@ -318,11 +318,7 @@ pub fn is_type_diagnostic_item(cx: &LateContext<'_>, ty: Ty<'_>, diag_item: Symb
 /// Returns `false` if the `LangItem` is not defined.
 pub fn is_type_lang_item(cx: &LateContext<'_>, ty: Ty<'_>, lang_item: hir::LangItem) -> bool {
     match ty.kind() {
-        ty::Adt(adt, _) => cx
-            .tcx
-            .lang_items()
-            .require(lang_item)
-            .map_or(false, |li| li == adt.did()),
+        ty::Adt(adt, _) => cx.tcx.lang_items().get(lang_item) == Some(adt.did()),
         _ => false,
     }
 }
diff --git a/src/tools/clippy/src/driver.rs b/src/tools/clippy/src/driver.rs
index b12208ac62a..f24d3507823 100644
--- a/src/tools/clippy/src/driver.rs
+++ b/src/tools/clippy/src/driver.rs
@@ -23,8 +23,8 @@ use std::borrow::Cow;
 use std::env;
 use std::ops::Deref;
 use std::panic;
-use std::path::{Path, PathBuf};
-use std::process::{exit, Command};
+use std::path::Path;
+use std::process::exit;
 use std::sync::LazyLock;
 
 /// If a command-line option matches `find_arg`, then apply the predicate `pred` on its value. If
@@ -179,6 +179,7 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
         false,
         None,
         false,
+        false,
     ));
     let handler = rustc_errors::Handler::with_emitter(true, None, emitter);
 
@@ -209,17 +210,6 @@ fn report_clippy_ice(info: &panic::PanicInfo<'_>, bug_report_url: &str) {
     interface::try_print_query_stack(&handler, num_frames);
 }
 
-fn toolchain_path(home: Option<String>, toolchain: Option<String>) -> Option<PathBuf> {
-    home.and_then(|home| {
-        toolchain.map(|toolchain| {
-            let mut path = PathBuf::from(home);
-            path.push("toolchains");
-            path.push(toolchain);
-            path
-        })
-    })
-}
-
 #[allow(clippy::too_many_lines)]
 pub fn main() {
     rustc_driver::init_rustc_env_logger();
@@ -227,51 +217,6 @@ pub fn main() {
     exit(rustc_driver::catch_with_exit_code(move || {
         let mut orig_args: Vec<String> = env::args().collect();
 
-        // Get the sysroot, looking from most specific to this invocation to the least:
-        // - command line
-        // - runtime environment
-        //    - SYSROOT
-        //    - RUSTUP_HOME, MULTIRUST_HOME, RUSTUP_TOOLCHAIN, MULTIRUST_TOOLCHAIN
-        // - sysroot from rustc in the path
-        // - compile-time environment
-        //    - SYSROOT
-        //    - RUSTUP_HOME, MULTIRUST_HOME, RUSTUP_TOOLCHAIN, MULTIRUST_TOOLCHAIN
-        let sys_root_arg = arg_value(&orig_args, "--sysroot", |_| true);
-        let have_sys_root_arg = sys_root_arg.is_some();
-        let sys_root = sys_root_arg
-            .map(PathBuf::from)
-            .or_else(|| std::env::var("SYSROOT").ok().map(PathBuf::from))
-            .or_else(|| {
-                let home = std::env::var("RUSTUP_HOME")
-                    .or_else(|_| std::env::var("MULTIRUST_HOME"))
-                    .ok();
-                let toolchain = std::env::var("RUSTUP_TOOLCHAIN")
-                    .or_else(|_| std::env::var("MULTIRUST_TOOLCHAIN"))
-                    .ok();
-                toolchain_path(home, toolchain)
-            })
-            .or_else(|| {
-                Command::new("rustc")
-                    .arg("--print")
-                    .arg("sysroot")
-                    .output()
-                    .ok()
-                    .and_then(|out| String::from_utf8(out.stdout).ok())
-                    .map(|s| PathBuf::from(s.trim()))
-            })
-            .or_else(|| option_env!("SYSROOT").map(PathBuf::from))
-            .or_else(|| {
-                let home = option_env!("RUSTUP_HOME")
-                    .or(option_env!("MULTIRUST_HOME"))
-                    .map(ToString::to_string);
-                let toolchain = option_env!("RUSTUP_TOOLCHAIN")
-                    .or(option_env!("MULTIRUST_TOOLCHAIN"))
-                    .map(ToString::to_string);
-                toolchain_path(home, toolchain)
-            })
-            .map(|pb| pb.to_string_lossy().to_string())
-            .expect("need to specify SYSROOT env var during clippy compilation, or use rustup or multirust");
-
         // make "clippy-driver --rustc" work like a subcommand that passes further args to "rustc"
         // for example `clippy-driver --rustc --version` will print the rustc version that clippy-driver
         // uses
@@ -279,13 +224,7 @@ pub fn main() {
             orig_args.remove(pos);
             orig_args[0] = "rustc".to_string();
 
-            // if we call "rustc", we need to pass --sysroot here as well
-            let mut args: Vec<String> = orig_args.clone();
-            if !have_sys_root_arg {
-                args.extend(vec!["--sysroot".into(), sys_root]);
-            };
-
-            return rustc_driver::RunCompiler::new(&args, &mut DefaultCallbacks).run();
+            return rustc_driver::RunCompiler::new(&orig_args, &mut DefaultCallbacks).run();
         }
 
         if orig_args.iter().any(|a| a == "--version" || a == "-V") {
@@ -308,14 +247,6 @@ pub fn main() {
             exit(0);
         }
 
-        // this conditional check for the --sysroot flag is there so users can call
-        // `clippy_driver` directly
-        // without having to pass --sysroot or anything
-        let mut args: Vec<String> = orig_args.clone();
-        if !have_sys_root_arg {
-            args.extend(vec!["--sysroot".into(), sys_root]);
-        };
-
         let mut no_deps = false;
         let clippy_args_var = env::var("CLIPPY_ARGS").ok();
         let clippy_args = clippy_args_var
@@ -344,10 +275,11 @@ pub fn main() {
 
         let clippy_enabled = !cap_lints_allow && (!no_deps || in_primary_package);
         if clippy_enabled {
+            let mut args: Vec<String> = orig_args.clone();
             args.extend(clippy_args);
             rustc_driver::RunCompiler::new(&args, &mut ClippyCallbacks { clippy_args_var }).run()
         } else {
-            rustc_driver::RunCompiler::new(&args, &mut RustcCallbacks { clippy_args_var }).run()
+            rustc_driver::RunCompiler::new(&orig_args, &mut RustcCallbacks { clippy_args_var }).run()
         }
     }))
 }
diff --git a/src/tools/clippy/tests/ui/track-diagnostics.rs b/src/tools/clippy/tests/ui/track-diagnostics.rs
new file mode 100644
index 00000000000..fa9221ed02d
--- /dev/null
+++ b/src/tools/clippy/tests/ui/track-diagnostics.rs
@@ -0,0 +1,12 @@
+// compile-flags: -Z track-diagnostics
+// error-pattern: created at
+
+// Normalize the emitted location so this doesn't need
+// updating everytime someone adds or removes a line.
+// normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC"
+
+struct A;
+struct B;
+const S: A = B;
+
+fn main() {}
diff --git a/src/tools/clippy/tests/ui/track-diagnostics.stderr b/src/tools/clippy/tests/ui/track-diagnostics.stderr
new file mode 100644
index 00000000000..ec303186253
--- /dev/null
+++ b/src/tools/clippy/tests/ui/track-diagnostics.stderr
@@ -0,0 +1,10 @@
+error[E0308]: mismatched types
+  --> $DIR/track-diagnostics.rs:LL:CC
+   |
+LL | const S: A = B;
+   |              ^ expected struct `A`, found struct `B`
+-Ztrack-diagnostics: created at compiler/rustc_infer/src/infer/error_reporting/mod.rs:LL:CC
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0308`.
diff --git a/src/tools/compiletest/Cargo.toml b/src/tools/compiletest/Cargo.toml
index 41f97e4326a..1911f0f9c94 100644
--- a/src/tools/compiletest/Cargo.toml
+++ b/src/tools/compiletest/Cargo.toml
@@ -8,6 +8,7 @@ colored = "2"
 diff = "0.1.10"
 unified-diff = "0.2.1"
 getopts = "0.2"
+miropt-test-tools = { path = "../miropt-test-tools" }
 tracing = "0.1"
 tracing-subscriber = { version = "0.3.3", default-features = false, features = ["fmt", "env-filter", "smallvec", "parking_lot", "ansi"] }
 regex = "1.0"
diff --git a/src/tools/compiletest/src/common.rs b/src/tools/compiletest/src/common.rs
index 0260f684838..9a432f11f82 100644
--- a/src/tools/compiletest/src/common.rs
+++ b/src/tools/compiletest/src/common.rs
@@ -2,11 +2,12 @@ pub use self::Mode::*;
 
 use std::ffi::OsString;
 use std::fmt;
+use std::iter;
 use std::path::{Path, PathBuf};
 use std::process::Command;
 use std::str::FromStr;
 
-use crate::util::PathBufExt;
+use crate::util::{add_dylib_path, PathBufExt};
 use lazycell::LazyCell;
 use test::ColorConfig;
 
@@ -385,8 +386,7 @@ impl Config {
     }
 
     fn target_cfg(&self) -> &TargetCfg {
-        self.target_cfg
-            .borrow_with(|| TargetCfg::new(&self.rustc_path, &self.target, &self.target_rustcflags))
+        self.target_cfg.borrow_with(|| TargetCfg::new(self))
     }
 
     pub fn matches_arch(&self, arch: &str) -> bool {
@@ -457,21 +457,23 @@ pub enum Endian {
 }
 
 impl TargetCfg {
-    fn new(rustc_path: &Path, target: &str, target_rustcflags: &Vec<String>) -> TargetCfg {
-        let output = match Command::new(rustc_path)
+    fn new(config: &Config) -> TargetCfg {
+        let mut command = Command::new(&config.rustc_path);
+        add_dylib_path(&mut command, iter::once(&config.compile_lib_path));
+        let output = match command
             .arg("--print=cfg")
             .arg("--target")
-            .arg(target)
-            .args(target_rustcflags)
+            .arg(&config.target)
+            .args(&config.target_rustcflags)
             .output()
         {
             Ok(output) => output,
-            Err(e) => panic!("error: failed to get cfg info from {:?}: {e}", rustc_path),
+            Err(e) => panic!("error: failed to get cfg info from {:?}: {e}", config.rustc_path),
         };
         if !output.status.success() {
             panic!(
                 "error: failed to get cfg info from {:?}\n--- stdout\n{}\n--- stderr\n{}",
-                rustc_path,
+                config.rustc_path,
                 String::from_utf8(output.stdout).unwrap(),
                 String::from_utf8(output.stderr).unwrap(),
             );
diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs
index 8af5f1da694..8d8ca101cd0 100644
--- a/src/tools/compiletest/src/runtest.rs
+++ b/src/tools/compiletest/src/runtest.rs
@@ -13,7 +13,7 @@ use crate::errors::{self, Error, ErrorKind};
 use crate::header::TestProps;
 use crate::json;
 use crate::read2::read2_abbreviated;
-use crate::util::{logv, PathBufExt};
+use crate::util::{add_dylib_path, dylib_env_var, logv, PathBufExt};
 use crate::ColorConfig;
 use regex::{Captures, Regex};
 use rustfix::{apply_suggestions, get_suggestions_from_json, Filter};
@@ -26,6 +26,7 @@ use std::fs::{self, create_dir_all, File, OpenOptions};
 use std::hash::{Hash, Hasher};
 use std::io::prelude::*;
 use std::io::{self, BufReader};
+use std::iter;
 use std::path::{Path, PathBuf};
 use std::process::{Child, Command, ExitStatus, Output, Stdio};
 use std::str;
@@ -72,19 +73,6 @@ fn disable_error_reporting<F: FnOnce() -> R, R>(f: F) -> R {
     f()
 }
 
-/// The name of the environment variable that holds dynamic library locations.
-pub fn dylib_env_var() -> &'static str {
-    if cfg!(windows) {
-        "PATH"
-    } else if cfg!(target_os = "macos") {
-        "DYLD_LIBRARY_PATH"
-    } else if cfg!(target_os = "haiku") {
-        "LIBRARY_PATH"
-    } else {
-        "LD_LIBRARY_PATH"
-    }
-}
-
 /// The platform-specific library name
 pub fn get_lib_name(lib: &str, dylib: bool) -> String {
     // In some casess (e.g. MUSL), we build a static
@@ -220,11 +208,13 @@ enum WillExecute {
     Disabled,
 }
 
-/// Should `--emit metadata` be used?
+/// What value should be passed to `--emit`?
 #[derive(Copy, Clone)]
-enum EmitMetadata {
-    Yes,
-    No,
+enum Emit {
+    None,
+    Metadata,
+    LlvmIr,
+    Asm,
 }
 
 impl<'test> TestCx<'test> {
@@ -424,7 +414,7 @@ impl<'test> TestCx<'test> {
         }
 
         let should_run = self.run_if_enabled();
-        let mut proc_res = self.compile_test(should_run, EmitMetadata::No);
+        let mut proc_res = self.compile_test(should_run, Emit::None);
 
         if !proc_res.status.success() {
             self.fatal_proc_rec("compilation failed!", &proc_res);
@@ -670,7 +660,7 @@ impl<'test> TestCx<'test> {
 
         // compile test file (it should have 'compile-flags:-g' in the header)
         let should_run = self.run_if_enabled();
-        let compile_result = self.compile_test(should_run, EmitMetadata::No);
+        let compile_result = self.compile_test(should_run, Emit::None);
         if !compile_result.status.success() {
             self.fatal_proc_rec("compilation failed!", &compile_result);
         }
@@ -790,7 +780,7 @@ impl<'test> TestCx<'test> {
 
         // compile test file (it should have 'compile-flags:-g' in the header)
         let should_run = self.run_if_enabled();
-        let compiler_run_result = self.compile_test(should_run, EmitMetadata::No);
+        let compiler_run_result = self.compile_test(should_run, Emit::None);
         if !compiler_run_result.status.success() {
             self.fatal_proc_rec("compilation failed!", &compiler_run_result);
         }
@@ -1022,7 +1012,7 @@ impl<'test> TestCx<'test> {
     fn run_debuginfo_lldb_test_no_opt(&self) {
         // compile test file (it should have 'compile-flags:-g' in the header)
         let should_run = self.run_if_enabled();
-        let compile_result = self.compile_test(should_run, EmitMetadata::No);
+        let compile_result = self.compile_test(should_run, Emit::None);
         if !compile_result.status.success() {
             self.fatal_proc_rec("compilation failed!", &compile_result);
         }
@@ -1438,21 +1428,21 @@ impl<'test> TestCx<'test> {
         }
     }
 
-    fn should_emit_metadata(&self, pm: Option<PassMode>) -> EmitMetadata {
+    fn should_emit_metadata(&self, pm: Option<PassMode>) -> Emit {
         match (pm, self.props.fail_mode, self.config.mode) {
-            (Some(PassMode::Check), ..) | (_, Some(FailMode::Check), Ui) => EmitMetadata::Yes,
-            _ => EmitMetadata::No,
+            (Some(PassMode::Check), ..) | (_, Some(FailMode::Check), Ui) => Emit::Metadata,
+            _ => Emit::None,
         }
     }
 
-    fn compile_test(&self, will_execute: WillExecute, emit_metadata: EmitMetadata) -> ProcRes {
-        self.compile_test_general(will_execute, emit_metadata, self.props.local_pass_mode())
+    fn compile_test(&self, will_execute: WillExecute, emit: Emit) -> ProcRes {
+        self.compile_test_general(will_execute, emit, self.props.local_pass_mode())
     }
 
     fn compile_test_general(
         &self,
         will_execute: WillExecute,
-        emit_metadata: EmitMetadata,
+        emit: Emit,
         local_pm: Option<PassMode>,
     ) -> ProcRes {
         // Only use `make_exe_name` when the test ends up being executed.
@@ -1484,10 +1474,13 @@ impl<'test> TestCx<'test> {
             _ => AllowUnused::No,
         };
 
-        let mut rustc =
-            self.make_compile_args(&self.testpaths.file, output_file, emit_metadata, allow_unused);
-
-        rustc.arg("-L").arg(&self.aux_output_dir_name());
+        let rustc = self.make_compile_args(
+            &self.testpaths.file,
+            output_file,
+            emit,
+            allow_unused,
+            LinkToAux::Yes,
+        );
 
         self.compose_and_run_compiler(rustc, None)
     }
@@ -1714,8 +1707,13 @@ impl<'test> TestCx<'test> {
         // Create the directory for the stdout/stderr files.
         create_dir_all(aux_cx.output_base_dir()).unwrap();
         let input_file = &aux_testpaths.file;
-        let mut aux_rustc =
-            aux_cx.make_compile_args(input_file, aux_output, EmitMetadata::No, AllowUnused::No);
+        let mut aux_rustc = aux_cx.make_compile_args(
+            input_file,
+            aux_output,
+            Emit::None,
+            AllowUnused::No,
+            LinkToAux::No,
+        );
 
         for key in &aux_props.unset_rustc_env {
             aux_rustc.env_remove(key);
@@ -1811,16 +1809,7 @@ impl<'test> TestCx<'test> {
 
         // Need to be sure to put both the lib_path and the aux path in the dylib
         // search path for the child.
-        let mut path =
-            env::split_paths(&env::var_os(dylib_env_var()).unwrap_or_default()).collect::<Vec<_>>();
-        if let Some(p) = aux_path {
-            path.insert(0, PathBuf::from(p))
-        }
-        path.insert(0, PathBuf::from(lib_path));
-
-        // Add the new dylib search path var
-        let newpath = env::join_paths(&path).unwrap();
-        command.env(dylib_env_var(), newpath);
+        add_dylib_path(&mut command, iter::once(lib_path).chain(aux_path));
 
         let mut child = disable_error_reporting(|| command.spawn())
             .unwrap_or_else(|_| panic!("failed to exec `{:?}`", &command));
@@ -1852,8 +1841,9 @@ impl<'test> TestCx<'test> {
         &self,
         input_file: &Path,
         output_file: TargetLocation,
-        emit_metadata: EmitMetadata,
+        emit: Emit,
         allow_unused: AllowUnused,
+        link_to_aux: LinkToAux,
     ) -> Command {
         let is_aux = input_file.components().map(|c| c.as_os_str()).any(|c| c == "auxiliary");
         let is_rustdoc = self.is_rustdoc() && !is_aux;
@@ -1968,8 +1958,18 @@ impl<'test> TestCx<'test> {
             }
         }
 
-        if let (false, EmitMetadata::Yes) = (is_rustdoc, emit_metadata) {
-            rustc.args(&["--emit", "metadata"]);
+        match emit {
+            Emit::None => {}
+            Emit::Metadata if is_rustdoc => {}
+            Emit::Metadata => {
+                rustc.args(&["--emit", "metadata"]);
+            }
+            Emit::LlvmIr => {
+                rustc.args(&["--emit", "llvm-ir"]);
+            }
+            Emit::Asm => {
+                rustc.args(&["--emit", "asm"]);
+            }
         }
 
         if !is_rustdoc {
@@ -2035,6 +2035,10 @@ impl<'test> TestCx<'test> {
             rustc.arg("-Ctarget-feature=-crt-static");
         }
 
+        if let LinkToAux::Yes = link_to_aux {
+            rustc.arg("-L").arg(self.aux_output_dir_name());
+        }
+
         rustc.args(&self.props.compile_flags);
 
         rustc
@@ -2226,13 +2230,15 @@ impl<'test> TestCx<'test> {
     // codegen tests (using FileCheck)
 
     fn compile_test_and_save_ir(&self) -> ProcRes {
-        let aux_dir = self.aux_output_dir_name();
-
         let output_file = TargetLocation::ThisDirectory(self.output_base_dir());
         let input_file = &self.testpaths.file;
-        let mut rustc =
-            self.make_compile_args(input_file, output_file, EmitMetadata::No, AllowUnused::No);
-        rustc.arg("-L").arg(aux_dir).arg("--emit=llvm-ir");
+        let rustc = self.make_compile_args(
+            input_file,
+            output_file,
+            Emit::LlvmIr,
+            AllowUnused::No,
+            LinkToAux::Yes,
+        );
 
         self.compose_and_run_compiler(rustc, None)
     }
@@ -2244,14 +2250,11 @@ impl<'test> TestCx<'test> {
 
         let output_file = TargetLocation::ThisFile(output_path.clone());
         let input_file = &self.testpaths.file;
-        let mut rustc =
-            self.make_compile_args(input_file, output_file, EmitMetadata::No, AllowUnused::No);
-
-        rustc.arg("-L").arg(self.aux_output_dir_name());
 
+        let mut emit = Emit::None;
         match self.props.assembly_output.as_ref().map(AsRef::as_ref) {
             Some("emit-asm") => {
-                rustc.arg("--emit=asm");
+                emit = Emit::Asm;
             }
 
             Some("ptx-linker") => {
@@ -2262,6 +2265,9 @@ impl<'test> TestCx<'test> {
             None => self.fatal("missing 'assembly-output' header"),
         }
 
+        let rustc =
+            self.make_compile_args(input_file, output_file, emit, AllowUnused::No, LinkToAux::Yes);
+
         (self.compose_and_run_compiler(rustc, None), output_path)
     }
 
@@ -2386,10 +2392,10 @@ impl<'test> TestCx<'test> {
         let mut rustc = new_rustdoc.make_compile_args(
             &new_rustdoc.testpaths.file,
             output_file,
-            EmitMetadata::No,
+            Emit::None,
             AllowUnused::Yes,
+            LinkToAux::Yes,
         );
-        rustc.arg("-L").arg(&new_rustdoc.aux_output_dir_name());
         new_rustdoc.build_all_auxiliary(&mut rustc);
 
         let proc_res = new_rustdoc.document(&compare_dir);
@@ -2662,7 +2668,7 @@ impl<'test> TestCx<'test> {
     fn run_codegen_units_test(&self) {
         assert!(self.revision.is_none(), "revisions not relevant here");
 
-        let proc_res = self.compile_test(WillExecute::No, EmitMetadata::No);
+        let proc_res = self.compile_test(WillExecute::No, Emit::None);
 
         if !proc_res.status.success() {
             self.fatal_proc_rec("compilation failed!", &proc_res);
@@ -3175,7 +3181,7 @@ impl<'test> TestCx<'test> {
         if let Some(FailMode::Build) = self.props.fail_mode {
             // Make sure a build-fail test cannot fail due to failing analysis (e.g. typeck).
             let pm = Some(PassMode::Check);
-            let proc_res = self.compile_test_general(WillExecute::No, EmitMetadata::Yes, pm);
+            let proc_res = self.compile_test_general(WillExecute::No, Emit::Metadata, pm);
             self.check_if_test_should_compile(&proc_res, pm);
         }
 
@@ -3333,13 +3339,13 @@ impl<'test> TestCx<'test> {
         if self.props.run_rustfix && self.config.compare_mode.is_none() {
             // And finally, compile the fixed code and make sure it both
             // succeeds and has no diagnostics.
-            let mut rustc = self.make_compile_args(
+            let rustc = self.make_compile_args(
                 &self.testpaths.file.with_extension(UI_FIXED),
                 TargetLocation::ThisFile(self.make_exe_name()),
                 emit_metadata,
                 AllowUnused::No,
+                LinkToAux::Yes,
             );
-            rustc.arg("-L").arg(&self.aux_output_dir_name());
             let res = self.compose_and_run_compiler(rustc, None);
             if !res.status.success() {
                 self.fatal_proc_rec("failed to compile fixed code", &res);
@@ -3399,103 +3405,49 @@ impl<'test> TestCx<'test> {
             }
         }
 
-        for l in test_file_contents.lines() {
-            if l.starts_with("// EMIT_MIR ") {
-                let test_name = l.trim_start_matches("// EMIT_MIR ").trim();
-                let mut test_names = test_name.split(' ');
-                // sometimes we specify two files so that we get a diff between the two files
-                let test_name = test_names.next().unwrap();
-                let mut expected_file;
-                let from_file;
-                let to_file;
-
-                if test_name.ends_with(".diff") {
-                    let trimmed = test_name.trim_end_matches(".diff");
-                    let test_against = format!("{}.after.mir", trimmed);
-                    from_file = format!("{}.before.mir", trimmed);
-                    expected_file = format!("{}{}.diff", trimmed, bit_width);
-                    assert!(
-                        test_names.next().is_none(),
-                        "two mir pass names specified for MIR diff"
-                    );
-                    to_file = Some(test_against);
-                } else if let Some(first_pass) = test_names.next() {
-                    let second_pass = test_names.next().unwrap();
-                    assert!(
-                        test_names.next().is_none(),
-                        "three mir pass names specified for MIR diff"
-                    );
-                    expected_file =
-                        format!("{}{}.{}-{}.diff", test_name, bit_width, first_pass, second_pass);
-                    let second_file = format!("{}.{}.mir", test_name, second_pass);
-                    from_file = format!("{}.{}.mir", test_name, first_pass);
-                    to_file = Some(second_file);
-                } else {
-                    let ext_re = Regex::new(r#"(\.(mir|dot|html))$"#).unwrap();
-                    let cap = ext_re
-                        .captures_iter(test_name)
-                        .next()
-                        .expect("test_name has an invalid extension");
-                    let extension = cap.get(1).unwrap().as_str();
-                    expected_file = format!(
-                        "{}{}{}",
-                        test_name.trim_end_matches(extension),
-                        bit_width,
-                        extension,
-                    );
-                    from_file = test_name.to_string();
-                    assert!(
-                        test_names.next().is_none(),
-                        "two mir pass names specified for MIR dump"
+        let files = miropt_test_tools::files_for_miropt_test(
+            &self.testpaths.file,
+            self.config.get_pointer_width(),
+        );
+
+        for miropt_test_tools::MiroptTestFiles { from_file, to_file, expected_file } in files {
+            let dumped_string = if let Some(after) = to_file {
+                self.diff_mir_files(from_file.into(), after.into())
+            } else {
+                let mut output_file = PathBuf::new();
+                output_file.push(self.get_mir_dump_dir());
+                output_file.push(&from_file);
+                debug!(
+                    "comparing the contents of: {} with {}",
+                    output_file.display(),
+                    expected_file.display()
+                );
+                if !output_file.exists() {
+                    panic!(
+                        "Output file `{}` from test does not exist, available files are in `{}`",
+                        output_file.display(),
+                        output_file.parent().unwrap().display()
                     );
-                    to_file = None;
-                };
-                if !expected_file.starts_with(&test_crate) {
-                    expected_file = format!("{}.{}", test_crate, expected_file);
                 }
-                let expected_file = test_dir.join(expected_file);
+                self.check_mir_test_timestamp(&from_file, &output_file);
+                let dumped_string = fs::read_to_string(&output_file).unwrap();
+                self.normalize_output(&dumped_string, &[])
+            };
 
-                let dumped_string = if let Some(after) = to_file {
-                    self.diff_mir_files(from_file.into(), after.into())
-                } else {
-                    let mut output_file = PathBuf::new();
-                    output_file.push(self.get_mir_dump_dir());
-                    output_file.push(&from_file);
-                    debug!(
-                        "comparing the contents of: {} with {}",
-                        output_file.display(),
+            if self.config.bless {
+                let _ = std::fs::remove_file(&expected_file);
+                std::fs::write(expected_file, dumped_string.as_bytes()).unwrap();
+            } else {
+                if !expected_file.exists() {
+                    panic!("Output file `{}` from test does not exist", expected_file.display());
+                }
+                let expected_string = fs::read_to_string(&expected_file).unwrap();
+                if dumped_string != expected_string {
+                    print!("{}", write_diff(&expected_string, &dumped_string, 3));
+                    panic!(
+                        "Actual MIR output differs from expected MIR output {}",
                         expected_file.display()
                     );
-                    if !output_file.exists() {
-                        panic!(
-                            "Output file `{}` from test does not exist, available files are in `{}`",
-                            output_file.display(),
-                            output_file.parent().unwrap().display()
-                        );
-                    }
-                    self.check_mir_test_timestamp(&from_file, &output_file);
-                    let dumped_string = fs::read_to_string(&output_file).unwrap();
-                    self.normalize_output(&dumped_string, &[])
-                };
-
-                if self.config.bless {
-                    let _ = std::fs::remove_file(&expected_file);
-                    std::fs::write(expected_file, dumped_string.as_bytes()).unwrap();
-                } else {
-                    if !expected_file.exists() {
-                        panic!(
-                            "Output file `{}` from test does not exist",
-                            expected_file.display()
-                        );
-                    }
-                    let expected_string = fs::read_to_string(&expected_file).unwrap();
-                    if dumped_string != expected_string {
-                        print!("{}", write_diff(&expected_string, &dumped_string, 3));
-                        panic!(
-                            "Actual MIR output differs from expected MIR output {}",
-                            expected_file.display()
-                        );
-                    }
                 }
             }
         }
@@ -3927,3 +3879,8 @@ enum AllowUnused {
     Yes,
     No,
 }
+
+enum LinkToAux {
+    Yes,
+    No,
+}
diff --git a/src/tools/compiletest/src/util.rs b/src/tools/compiletest/src/util.rs
index e5ff0906be8..ec36f1e4fb7 100644
--- a/src/tools/compiletest/src/util.rs
+++ b/src/tools/compiletest/src/util.rs
@@ -2,6 +2,7 @@ use crate::common::Config;
 use std::env;
 use std::ffi::OsStr;
 use std::path::PathBuf;
+use std::process::Command;
 
 use tracing::*;
 
@@ -111,3 +112,25 @@ impl PathBufExt for PathBuf {
         }
     }
 }
+
+/// The name of the environment variable that holds dynamic library locations.
+pub fn dylib_env_var() -> &'static str {
+    if cfg!(windows) {
+        "PATH"
+    } else if cfg!(target_os = "macos") {
+        "DYLD_LIBRARY_PATH"
+    } else if cfg!(target_os = "haiku") {
+        "LIBRARY_PATH"
+    } else {
+        "LD_LIBRARY_PATH"
+    }
+}
+
+/// Adds a list of lookup paths to `cmd`'s dynamic library lookup path.
+/// If the dylib_path_var is already set for this cmd, the old value will be overwritten!
+pub fn add_dylib_path(cmd: &mut Command, paths: impl Iterator<Item = impl Into<PathBuf>>) {
+    let path_env = env::var_os(dylib_env_var());
+    let old_paths = path_env.as_ref().map(env::split_paths);
+    let new_paths = paths.map(Into::into).chain(old_paths.into_iter().flatten());
+    cmd.env(dylib_env_var(), env::join_paths(new_paths).unwrap());
+}
diff --git a/src/tools/miri/src/bin/miri.rs b/src/tools/miri/src/bin/miri.rs
index bd01ea655dd..e673ea67dbc 100644
--- a/src/tools/miri/src/bin/miri.rs
+++ b/src/tools/miri/src/bin/miri.rs
@@ -216,76 +216,28 @@ fn init_late_loggers(tcx: TyCtxt<'_>) {
     }
 }
 
-/// Returns the "default sysroot" that Miri will use for host things if no `--sysroot` flag is set.
-/// Should be a compile-time constant.
-fn host_sysroot() -> Option<String> {
-    if option_env!("RUSTC_STAGE").is_some() {
-        // This is being built as part of rustc, and gets shipped with rustup.
-        // We can rely on the sysroot computation in librustc_session.
-        return None;
-    }
-    // For builds outside rustc, we need to ensure that we got a sysroot
-    // that gets used as a default.  The sysroot computation in librustc_session would
-    // end up somewhere in the build dir (see `get_or_default_sysroot`).
-    // Taken from PR <https://github.com/Manishearth/rust-clippy/pull/911>.
-    let home = option_env!("RUSTUP_HOME").or(option_env!("MULTIRUST_HOME"));
-    let toolchain = option_env!("RUSTUP_TOOLCHAIN").or(option_env!("MULTIRUST_TOOLCHAIN"));
-    Some(match (home, toolchain) {
-        (Some(home), Some(toolchain)) => {
-            // Check that at runtime, we are still in this toolchain (if there is any toolchain).
-            if let Some(toolchain_runtime) =
-                env::var_os("RUSTUP_TOOLCHAIN").or_else(|| env::var_os("MULTIRUST_TOOLCHAIN"))
-            {
-                if toolchain_runtime != toolchain {
-                    show_error!(
-                        "This Miri got built with local toolchain `{toolchain}`, but now is being run under a different toolchain. \n\
-                        Make sure to run Miri in the toolchain it got built with, e.g. via `cargo +{toolchain} miri`."
-                    )
-                }
-            }
-            format!("{home}/toolchains/{toolchain}")
-        }
-        _ => option_env!("RUST_SYSROOT")
-            .unwrap_or_else(|| {
-                show_error!(
-                    "To build Miri without rustup, set the `RUST_SYSROOT` env var at build time",
-                )
-            })
-            .to_owned(),
-    })
-}
-
 /// Execute a compiler with the given CLI arguments and callbacks.
 fn run_compiler(
     mut args: Vec<String>,
     target_crate: bool,
     callbacks: &mut (dyn rustc_driver::Callbacks + Send),
 ) -> ! {
-    // Make sure we use the right default sysroot. The default sysroot is wrong,
-    // because `get_or_default_sysroot` in `librustc_session` bases that on `current_exe`.
-    //
-    // Make sure we always call `host_sysroot` as that also does some sanity-checks
-    // of the environment we were built in and whether it matches what we are running in.
-    let host_default_sysroot = host_sysroot();
-    // Now see if we even need to set something.
-    let sysroot_flag = "--sysroot";
-    if !args.iter().any(|e| e == sysroot_flag) {
-        // No sysroot was set, let's see if we have a custom default we want to configure.
-        let default_sysroot = if target_crate {
+    if target_crate {
+        // Miri needs a custom sysroot for target crates.
+        // If no `--sysroot` is given, the `MIRI_SYSROOT` env var is consulted to find where
+        // that sysroot lives, and that is passed to rustc.
+        let sysroot_flag = "--sysroot";
+        if !args.iter().any(|e| e == sysroot_flag) {
             // Using the built-in default here would be plain wrong, so we *require*
             // the env var to make sure things make sense.
-            Some(env::var("MIRI_SYSROOT").unwrap_or_else(|_| {
+            let miri_sysroot = env::var("MIRI_SYSROOT").unwrap_or_else(|_| {
                 show_error!(
                     "Miri was invoked in 'target' mode without `MIRI_SYSROOT` or `--sysroot` being set"
-                )
-            }))
-        } else {
-            host_default_sysroot
-        };
-        if let Some(sysroot) = default_sysroot {
-            // We need to overwrite the default that librustc_session would compute.
+                    )
+            });
+
             args.push(sysroot_flag.to_owned());
-            args.push(sysroot);
+            args.push(miri_sysroot);
         }
     }
 
diff --git a/src/tools/miri/src/lib.rs b/src/tools/miri/src/lib.rs
index f55c0b43e39..3b73d05907b 100644
--- a/src/tools/miri/src/lib.rs
+++ b/src/tools/miri/src/lib.rs
@@ -38,6 +38,8 @@
     clippy::cast_lossless,
     clippy::cast_possible_truncation,
 )]
+// Needed for rustdoc from bootstrap (with `-Znormalize-docs`).
+#![recursion_limit = "256"]
 
 extern crate rustc_apfloat;
 extern crate rustc_ast;
diff --git a/src/tools/miropt-test-tools/Cargo.toml b/src/tools/miropt-test-tools/Cargo.toml
new file mode 100644
index 00000000000..8589a44cf1b
--- /dev/null
+++ b/src/tools/miropt-test-tools/Cargo.toml
@@ -0,0 +1,7 @@
+[package]
+name = "miropt-test-tools"
+version = "0.1.0"
+edition = "2021"
+
+[dependencies]
+regex = "1.0"
diff --git a/src/tools/miropt-test-tools/src/lib.rs b/src/tools/miropt-test-tools/src/lib.rs
new file mode 100644
index 00000000000..96819d3547b
--- /dev/null
+++ b/src/tools/miropt-test-tools/src/lib.rs
@@ -0,0 +1,70 @@
+use std::fs;
+
+pub struct MiroptTestFiles {
+    pub expected_file: std::path::PathBuf,
+    pub from_file: String,
+    pub to_file: Option<String>,
+}
+
+pub fn files_for_miropt_test(testfile: &std::path::Path, bit_width: u32) -> Vec<MiroptTestFiles> {
+    let mut out = Vec::new();
+    let test_file_contents = fs::read_to_string(&testfile).unwrap();
+
+    let test_dir = testfile.parent().unwrap();
+    let test_crate = testfile.file_stem().unwrap().to_str().unwrap().replace("-", "_");
+
+    let bit_width = if test_file_contents.lines().any(|l| l == "// EMIT_MIR_FOR_EACH_BIT_WIDTH") {
+        format!(".{}bit", bit_width)
+    } else {
+        String::new()
+    };
+
+    for l in test_file_contents.lines() {
+        if l.starts_with("// EMIT_MIR ") {
+            let test_name = l.trim_start_matches("// EMIT_MIR ").trim();
+            let mut test_names = test_name.split(' ');
+            // sometimes we specify two files so that we get a diff between the two files
+            let test_name = test_names.next().unwrap();
+            let mut expected_file;
+            let from_file;
+            let to_file;
+
+            if test_name.ends_with(".diff") {
+                let trimmed = test_name.trim_end_matches(".diff");
+                let test_against = format!("{}.after.mir", trimmed);
+                from_file = format!("{}.before.mir", trimmed);
+                expected_file = format!("{}{}.diff", trimmed, bit_width);
+                assert!(test_names.next().is_none(), "two mir pass names specified for MIR diff");
+                to_file = Some(test_against);
+            } else if let Some(first_pass) = test_names.next() {
+                let second_pass = test_names.next().unwrap();
+                assert!(test_names.next().is_none(), "three mir pass names specified for MIR diff");
+                expected_file =
+                    format!("{}{}.{}-{}.diff", test_name, bit_width, first_pass, second_pass);
+                let second_file = format!("{}.{}.mir", test_name, second_pass);
+                from_file = format!("{}.{}.mir", test_name, first_pass);
+                to_file = Some(second_file);
+            } else {
+                let ext_re = regex::Regex::new(r#"(\.(mir|dot|html))$"#).unwrap();
+                let cap = ext_re
+                    .captures_iter(test_name)
+                    .next()
+                    .expect("test_name has an invalid extension");
+                let extension = cap.get(1).unwrap().as_str();
+                expected_file =
+                    format!("{}{}{}", test_name.trim_end_matches(extension), bit_width, extension,);
+                from_file = test_name.to_string();
+                assert!(test_names.next().is_none(), "two mir pass names specified for MIR dump");
+                to_file = None;
+            };
+            if !expected_file.starts_with(&test_crate) {
+                expected_file = format!("{}.{}", test_crate, expected_file);
+            }
+            let expected_file = test_dir.join(expected_file);
+
+            out.push(MiroptTestFiles { expected_file, from_file, to_file });
+        }
+    }
+
+    out
+}
diff --git a/src/tools/rust-analyzer/Cargo.lock b/src/tools/rust-analyzer/Cargo.lock
index 0ddea2f728d..8931c17bbdc 100644
--- a/src/tools/rust-analyzer/Cargo.lock
+++ b/src/tools/rust-analyzer/Cargo.lock
@@ -872,9 +872,9 @@ dependencies = [
 
 [[package]]
 name = "lsp-types"
-version = "0.93.1"
+version = "0.93.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3bcfee315dde785ba887edb540b08765fd7df75a7d948844be6bf5712246734"
+checksum = "9be6e9c7e2d18f651974370d7aff703f9513e0df6e464fd795660edc77e6ca51"
 dependencies = [
  "bitflags",
  "serde",
diff --git a/src/tools/rust-analyzer/crates/flycheck/src/lib.rs b/src/tools/rust-analyzer/crates/flycheck/src/lib.rs
index 73c3a48b4c5..8a91d606661 100644
--- a/src/tools/rust-analyzer/crates/flycheck/src/lib.rs
+++ b/src/tools/rust-analyzer/crates/flycheck/src/lib.rs
@@ -295,7 +295,9 @@ impl FlycheckActor {
             } => {
                 let mut cmd = Command::new(toolchain::cargo());
                 cmd.arg(command);
-                cmd.args(&["--workspace", "--message-format=json"]);
+                cmd.current_dir(&self.root);
+                cmd.args(&["--workspace", "--message-format=json", "--manifest-path"])
+                    .arg(self.root.join("Cargo.toml").as_os_str());
 
                 if let Some(target) = target_triple {
                     cmd.args(&["--target", target.as_str()]);
diff --git a/src/tools/rust-analyzer/crates/hir-def/src/item_tree/lower.rs b/src/tools/rust-analyzer/crates/hir-def/src/item_tree/lower.rs
index 077a1b619dd..79249757d9e 100644
--- a/src/tools/rust-analyzer/crates/hir-def/src/item_tree/lower.rs
+++ b/src/tools/rust-analyzer/crates/hir-def/src/item_tree/lower.rs
@@ -662,8 +662,12 @@ fn desugar_future_path(orig: TypeRef) -> Path {
     let mut generic_args: Vec<_> =
         std::iter::repeat(None).take(path.segments().len() - 1).collect();
     let mut last = GenericArgs::empty();
-    let binding =
-        AssociatedTypeBinding { name: name![Output], type_ref: Some(orig), bounds: Vec::new() };
+    let binding = AssociatedTypeBinding {
+        name: name![Output],
+        args: None,
+        type_ref: Some(orig),
+        bounds: Vec::new(),
+    };
     last.bindings.push(binding);
     generic_args.push(Some(Interned::new(last)));
 
diff --git a/src/tools/rust-analyzer/crates/hir-def/src/path.rs b/src/tools/rust-analyzer/crates/hir-def/src/path.rs
index 2f13a9fbf0e..592223f7d85 100644
--- a/src/tools/rust-analyzer/crates/hir-def/src/path.rs
+++ b/src/tools/rust-analyzer/crates/hir-def/src/path.rs
@@ -68,6 +68,9 @@ pub struct GenericArgs {
 pub struct AssociatedTypeBinding {
     /// The name of the associated type.
     pub name: Name,
+    /// The generic arguments to the associated type. e.g. For `Trait<Assoc<'a, T> = &'a T>`, this
+    /// would be `['a, T]`.
+    pub args: Option<Interned<GenericArgs>>,
     /// The type bound to this associated type (in `Item = T`, this would be the
     /// `T`). This can be `None` if there are bounds instead.
     pub type_ref: Option<TypeRef>,
diff --git a/src/tools/rust-analyzer/crates/hir-def/src/path/lower.rs b/src/tools/rust-analyzer/crates/hir-def/src/path/lower.rs
index 0428f1a398b..cfa3a6baaf8 100644
--- a/src/tools/rust-analyzer/crates/hir-def/src/path/lower.rs
+++ b/src/tools/rust-analyzer/crates/hir-def/src/path/lower.rs
@@ -163,6 +163,10 @@ pub(super) fn lower_generic_args(
             ast::GenericArg::AssocTypeArg(assoc_type_arg) => {
                 if let Some(name_ref) = assoc_type_arg.name_ref() {
                     let name = name_ref.as_name();
+                    let args = assoc_type_arg
+                        .generic_arg_list()
+                        .and_then(|args| lower_generic_args(lower_ctx, args))
+                        .map(Interned::new);
                     let type_ref = assoc_type_arg.ty().map(|it| TypeRef::from_ast(lower_ctx, it));
                     let bounds = if let Some(l) = assoc_type_arg.type_bound_list() {
                         l.bounds()
@@ -171,7 +175,7 @@ pub(super) fn lower_generic_args(
                     } else {
                         Vec::new()
                     };
-                    bindings.push(AssociatedTypeBinding { name, type_ref, bounds });
+                    bindings.push(AssociatedTypeBinding { name, args, type_ref, bounds });
                 }
             }
             ast::GenericArg::LifetimeArg(lifetime_arg) => {
@@ -214,6 +218,7 @@ fn lower_generic_args_from_fn_path(
         let type_ref = TypeRef::from_ast_opt(ctx, ret_type.ty());
         bindings.push(AssociatedTypeBinding {
             name: name![Output],
+            args: None,
             type_ref: Some(type_ref),
             bounds: Vec::new(),
         });
@@ -222,6 +227,7 @@ fn lower_generic_args_from_fn_path(
         let type_ref = TypeRef::Tuple(Vec::new());
         bindings.push(AssociatedTypeBinding {
             name: name![Output],
+            args: None,
             type_ref: Some(type_ref),
             bounds: Vec::new(),
         });
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/chalk_ext.rs b/src/tools/rust-analyzer/crates/hir-ty/src/chalk_ext.rs
index e2099d7e509..996b42f5bd8 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/chalk_ext.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/chalk_ext.rs
@@ -11,9 +11,9 @@ use syntax::SmolStr;
 
 use crate::{
     db::HirDatabase, from_assoc_type_id, from_chalk_trait_id, from_foreign_def_id,
-    from_placeholder_idx, to_chalk_trait_id, AdtId, AliasEq, AliasTy, Binders, CallableDefId,
-    CallableSig, FnPointer, ImplTraitId, Interner, Lifetime, ProjectionTy, QuantifiedWhereClause,
-    Substitution, TraitRef, Ty, TyBuilder, TyKind, WhereClause,
+    from_placeholder_idx, to_chalk_trait_id, utils::generics, AdtId, AliasEq, AliasTy, Binders,
+    CallableDefId, CallableSig, FnPointer, ImplTraitId, Interner, Lifetime, ProjectionTy,
+    QuantifiedWhereClause, Substitution, TraitRef, Ty, TyBuilder, TyKind, WhereClause,
 };
 
 pub trait TyExt {
@@ -338,10 +338,13 @@ pub trait ProjectionTyExt {
 
 impl ProjectionTyExt for ProjectionTy {
     fn trait_ref(&self, db: &dyn HirDatabase) -> TraitRef {
-        TraitRef {
-            trait_id: to_chalk_trait_id(self.trait_(db)),
-            substitution: self.substitution.clone(),
-        }
+        // FIXME: something like `Split` trait from chalk-solve might be nice.
+        let generics = generics(db.upcast(), from_assoc_type_id(self.associated_ty_id).into());
+        let substitution = Substitution::from_iter(
+            Interner,
+            self.substitution.iter(Interner).skip(generics.len_self()),
+        );
+        TraitRef { trait_id: to_chalk_trait_id(self.trait_(db)), substitution }
     }
 
     fn trait_(&self, db: &dyn HirDatabase) -> TraitId {
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/display.rs b/src/tools/rust-analyzer/crates/hir-ty/src/display.rs
index 0221f922feb..5ad66132635 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/display.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/display.rs
@@ -289,16 +289,18 @@ impl HirDisplay for ProjectionTy {
             return write!(f, "{}", TYPE_HINT_TRUNCATION);
         }
 
-        let trait_ = f.db.trait_data(self.trait_(f.db));
+        let trait_ref = self.trait_ref(f.db);
         write!(f, "<")?;
-        self.self_type_parameter(f.db).hir_fmt(f)?;
-        write!(f, " as {}", trait_.name)?;
-        if self.substitution.len(Interner) > 1 {
+        fmt_trait_ref(&trait_ref, f, true)?;
+        write!(f, ">::{}", f.db.type_alias_data(from_assoc_type_id(self.associated_ty_id)).name)?;
+        let proj_params_count =
+            self.substitution.len(Interner) - trait_ref.substitution.len(Interner);
+        let proj_params = &self.substitution.as_slice(Interner)[..proj_params_count];
+        if !proj_params.is_empty() {
             write!(f, "<")?;
-            f.write_joined(&self.substitution.as_slice(Interner)[1..], ", ")?;
+            f.write_joined(proj_params, ", ")?;
             write!(f, ">")?;
         }
-        write!(f, ">::{}", f.db.type_alias_data(from_assoc_type_id(self.associated_ty_id)).name)?;
         Ok(())
     }
 }
@@ -641,9 +643,12 @@ impl HirDisplay for Ty {
                 // Use placeholder associated types when the target is test (https://rust-lang.github.io/chalk/book/clauses/type_equality.html#placeholder-associated-types)
                 if f.display_target.is_test() {
                     write!(f, "{}::{}", trait_.name, type_alias_data.name)?;
+                    // Note that the generic args for the associated type come before those for the
+                    // trait (including the self type).
+                    // FIXME: reconsider the generic args order upon formatting?
                     if parameters.len(Interner) > 0 {
                         write!(f, "<")?;
-                        f.write_joined(&*parameters.as_slice(Interner), ", ")?;
+                        f.write_joined(parameters.as_slice(Interner), ", ")?;
                         write!(f, ">")?;
                     }
                 } else {
@@ -972,9 +977,20 @@ fn write_bounds_like_dyn_trait(
                     angle_open = true;
                 }
                 if let AliasTy::Projection(proj) = alias {
-                    let type_alias =
-                        f.db.type_alias_data(from_assoc_type_id(proj.associated_ty_id));
-                    write!(f, "{} = ", type_alias.name)?;
+                    let assoc_ty_id = from_assoc_type_id(proj.associated_ty_id);
+                    let type_alias = f.db.type_alias_data(assoc_ty_id);
+                    write!(f, "{}", type_alias.name)?;
+
+                    let proj_arg_count = generics(f.db.upcast(), assoc_ty_id.into()).len_self();
+                    if proj_arg_count > 0 {
+                        write!(f, "<")?;
+                        f.write_joined(
+                            &proj.substitution.as_slice(Interner)[..proj_arg_count],
+                            ", ",
+                        )?;
+                        write!(f, ">")?;
+                    }
+                    write!(f, " = ")?;
                 }
                 ty.hir_fmt(f)?;
             }
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/infer/path.rs b/src/tools/rust-analyzer/crates/hir-ty/src/infer/path.rs
index 7a4754cdc7b..ebe9d6fb5e0 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/infer/path.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/infer/path.rs
@@ -157,7 +157,7 @@ impl<'a> InferenceContext<'a> {
                     remaining_segments_for_ty,
                     true,
                 );
-                if let TyKind::Error = ty.kind(Interner) {
+                if ty.is_unknown() {
                     return None;
                 }
 
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/infer/unify.rs b/src/tools/rust-analyzer/crates/hir-ty/src/infer/unify.rs
index b00e3216b2d..12f45f00f9c 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/infer/unify.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/infer/unify.rs
@@ -340,8 +340,8 @@ impl<'a> InferenceTable<'a> {
         self.resolve_with_fallback(t, &|_, _, d, _| d)
     }
 
-    /// Unify two types and register new trait goals that arise from that.
-    pub(crate) fn unify(&mut self, ty1: &Ty, ty2: &Ty) -> bool {
+    /// Unify two relatable values (e.g. `Ty`) and register new trait goals that arise from that.
+    pub(crate) fn unify<T: ?Sized + Zip<Interner>>(&mut self, ty1: &T, ty2: &T) -> bool {
         let result = match self.try_unify(ty1, ty2) {
             Ok(r) => r,
             Err(_) => return false,
@@ -350,9 +350,13 @@ impl<'a> InferenceTable<'a> {
         true
     }
 
-    /// Unify two types and return new trait goals arising from it, so the
+    /// Unify two relatable values (e.g. `Ty`) and return new trait goals arising from it, so the
     /// caller needs to deal with them.
-    pub(crate) fn try_unify<T: Zip<Interner>>(&mut self, t1: &T, t2: &T) -> InferResult<()> {
+    pub(crate) fn try_unify<T: ?Sized + Zip<Interner>>(
+        &mut self,
+        t1: &T,
+        t2: &T,
+    ) -> InferResult<()> {
         match self.var_unification_table.relate(
             Interner,
             &self.db,
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/lib.rs b/src/tools/rust-analyzer/crates/hir-ty/src/lib.rs
index c4b700cbce6..42c3b58d5ad 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/lib.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/lib.rs
@@ -81,7 +81,20 @@ pub type PlaceholderIndex = chalk_ir::PlaceholderIndex;
 pub type VariableKind = chalk_ir::VariableKind<Interner>;
 pub type VariableKinds = chalk_ir::VariableKinds<Interner>;
 pub type CanonicalVarKinds = chalk_ir::CanonicalVarKinds<Interner>;
+/// Represents generic parameters and an item bound by them. When the item has parent, the binders
+/// also contain the generic parameters for its parent. See chalk's documentation for details.
+///
+/// One thing to keep in mind when working with `Binders` (and `Substitution`s, which represent
+/// generic arguments) in rust-analyzer is that the ordering within *is* significant - the generic
+/// parameters/arguments for an item MUST come before those for its parent. This is to facilitate
+/// the integration with chalk-solve, which mildly puts constraints as such. See #13335 for its
+/// motivation in detail.
 pub type Binders<T> = chalk_ir::Binders<T>;
+/// Interned list of generic arguments for an item. When an item has parent, the `Substitution` for
+/// it contains generic arguments for both its parent and itself. See chalk's documentation for
+/// details.
+///
+/// See `Binders` for the constraint on the ordering.
 pub type Substitution = chalk_ir::Substitution<Interner>;
 pub type GenericArg = chalk_ir::GenericArg<Interner>;
 pub type GenericArgData = chalk_ir::GenericArgData<Interner>;
@@ -124,14 +137,6 @@ pub type ConstrainedSubst = chalk_ir::ConstrainedSubst<Interner>;
 pub type Guidance = chalk_solve::Guidance<Interner>;
 pub type WhereClause = chalk_ir::WhereClause<Interner>;
 
-// FIXME: get rid of this
-pub fn subst_prefix(s: &Substitution, n: usize) -> Substitution {
-    Substitution::from_iter(
-        Interner,
-        s.as_slice(Interner)[..std::cmp::min(s.len(Interner), n)].iter().cloned(),
-    )
-}
-
 /// Return an index of a parameter in the generic type parameter list by it's id.
 pub fn param_idx(db: &dyn HirDatabase, id: TypeOrConstParamId) -> Option<usize> {
     generics(db.upcast(), id.parent).param_idx(id)
@@ -382,7 +387,6 @@ pub(crate) fn fold_tys_and_consts<T: HasInterner<Interner = Interner> + TypeFold
 pub fn replace_errors_with_variables<T>(t: &T) -> Canonical<T>
 where
     T: HasInterner<Interner = Interner> + TypeFoldable<Interner> + Clone,
-    T: HasInterner<Interner = Interner>,
 {
     use chalk_ir::{
         fold::{FallibleTypeFolder, TypeSuperFoldable},
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/lower.rs b/src/tools/rust-analyzer/crates/hir-ty/src/lower.rs
index 223d705b157..22a85cf1545 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/lower.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/lower.rs
@@ -447,12 +447,31 @@ impl<'a> TyLoweringContext<'a> {
                             .db
                             .trait_data(trait_ref.hir_trait_id())
                             .associated_type_by_name(segment.name);
+
                         match found {
                             Some(associated_ty) => {
-                                // FIXME handle type parameters on the segment
+                                // FIXME: `substs_from_path_segment()` pushes `TyKind::Error` for every parent
+                                // generic params. It's inefficient to splice the `Substitution`s, so we may want
+                                // that method to optionally take parent `Substitution` as we already know them at
+                                // this point (`trait_ref.substitution`).
+                                let substitution = self.substs_from_path_segment(
+                                    segment,
+                                    Some(associated_ty.into()),
+                                    false,
+                                    None,
+                                );
+                                let len_self =
+                                    generics(self.db.upcast(), associated_ty.into()).len_self();
+                                let substitution = Substitution::from_iter(
+                                    Interner,
+                                    substitution
+                                        .iter(Interner)
+                                        .take(len_self)
+                                        .chain(trait_ref.substitution.iter(Interner)),
+                                );
                                 TyKind::Alias(AliasTy::Projection(ProjectionTy {
                                     associated_ty_id: to_assoc_type_id(associated_ty),
-                                    substitution: trait_ref.substitution,
+                                    substitution,
                                 }))
                                 .intern(Interner)
                             }
@@ -590,36 +609,48 @@ impl<'a> TyLoweringContext<'a> {
             res,
             Some(segment.name.clone()),
             move |name, t, associated_ty| {
-                if name == segment.name {
-                    let substs = match self.type_param_mode {
-                        ParamLoweringMode::Placeholder => {
-                            // if we're lowering to placeholders, we have to put
-                            // them in now
-                            let generics = generics(
-                                self.db.upcast(),
-                                self.resolver
-                                    .generic_def()
-                                    .expect("there should be generics if there's a generic param"),
-                            );
-                            let s = generics.placeholder_subst(self.db);
-                            s.apply(t.substitution.clone(), Interner)
-                        }
-                        ParamLoweringMode::Variable => t.substitution.clone(),
-                    };
-                    // We need to shift in the bound vars, since
-                    // associated_type_shorthand_candidates does not do that
-                    let substs = substs.shifted_in_from(Interner, self.in_binders);
-                    // FIXME handle type parameters on the segment
-                    Some(
-                        TyKind::Alias(AliasTy::Projection(ProjectionTy {
-                            associated_ty_id: to_assoc_type_id(associated_ty),
-                            substitution: substs,
-                        }))
-                        .intern(Interner),
-                    )
-                } else {
-                    None
+                if name != segment.name {
+                    return None;
                 }
+
+                // FIXME: `substs_from_path_segment()` pushes `TyKind::Error` for every parent
+                // generic params. It's inefficient to splice the `Substitution`s, so we may want
+                // that method to optionally take parent `Substitution` as we already know them at
+                // this point (`t.substitution`).
+                let substs = self.substs_from_path_segment(
+                    segment.clone(),
+                    Some(associated_ty.into()),
+                    false,
+                    None,
+                );
+
+                let len_self = generics(self.db.upcast(), associated_ty.into()).len_self();
+
+                let substs = Substitution::from_iter(
+                    Interner,
+                    substs.iter(Interner).take(len_self).chain(t.substitution.iter(Interner)),
+                );
+
+                let substs = match self.type_param_mode {
+                    ParamLoweringMode::Placeholder => {
+                        // if we're lowering to placeholders, we have to put
+                        // them in now
+                        let generics = generics(self.db.upcast(), def);
+                        let s = generics.placeholder_subst(self.db);
+                        s.apply(substs, Interner)
+                    }
+                    ParamLoweringMode::Variable => substs,
+                };
+                // We need to shift in the bound vars, since
+                // associated_type_shorthand_candidates does not do that
+                let substs = substs.shifted_in_from(Interner, self.in_binders);
+                Some(
+                    TyKind::Alias(AliasTy::Projection(ProjectionTy {
+                        associated_ty_id: to_assoc_type_id(associated_ty),
+                        substitution: substs,
+                    }))
+                    .intern(Interner),
+                )
             },
         );
 
@@ -777,7 +808,15 @@ impl<'a> TyLoweringContext<'a> {
         // handle defaults. In expression or pattern path segments without
         // explicitly specified type arguments, missing type arguments are inferred
         // (i.e. defaults aren't used).
-        if !infer_args || had_explicit_args {
+        // Generic parameters for associated types are not supposed to have defaults, so we just
+        // ignore them.
+        let is_assoc_ty = if let GenericDefId::TypeAliasId(id) = def {
+            let container = id.lookup(self.db.upcast()).container;
+            matches!(container, ItemContainerId::TraitId(_))
+        } else {
+            false
+        };
+        if !is_assoc_ty && (!infer_args || had_explicit_args) {
             let defaults = self.db.generic_defaults(def);
             assert_eq!(total_len, defaults.len());
             let parent_from = item_len - substs.len();
@@ -966,9 +1005,28 @@ impl<'a> TyLoweringContext<'a> {
                     None => return SmallVec::new(),
                     Some(t) => t,
                 };
+                // FIXME: `substs_from_path_segment()` pushes `TyKind::Error` for every parent
+                // generic params. It's inefficient to splice the `Substitution`s, so we may want
+                // that method to optionally take parent `Substitution` as we already know them at
+                // this point (`super_trait_ref.substitution`).
+                let substitution = self.substs_from_path_segment(
+                    // FIXME: This is hack. We shouldn't really build `PathSegment` directly.
+                    PathSegment { name: &binding.name, args_and_bindings: binding.args.as_deref() },
+                    Some(associated_ty.into()),
+                    false, // this is not relevant
+                    Some(super_trait_ref.self_type_parameter(Interner)),
+                );
+                let self_params = generics(self.db.upcast(), associated_ty.into()).len_self();
+                let substitution = Substitution::from_iter(
+                    Interner,
+                    substitution
+                        .iter(Interner)
+                        .take(self_params)
+                        .chain(super_trait_ref.substitution.iter(Interner)),
+                );
                 let projection_ty = ProjectionTy {
                     associated_ty_id: to_assoc_type_id(associated_ty),
-                    substitution: super_trait_ref.substitution,
+                    substitution,
                 };
                 let mut preds: SmallVec<[_; 1]> = SmallVec::with_capacity(
                     binding.type_ref.as_ref().map_or(0, |_| 1) + binding.bounds.len(),
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/method_resolution.rs b/src/tools/rust-analyzer/crates/hir-ty/src/method_resolution.rs
index 3a1a3f4fdeb..50859475e1d 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/method_resolution.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/method_resolution.rs
@@ -22,10 +22,10 @@ use crate::{
     from_foreign_def_id,
     infer::{unify::InferenceTable, Adjust, Adjustment, AutoBorrow, OverloadedDeref, PointerCast},
     primitive::{FloatTy, IntTy, UintTy},
-    static_lifetime,
+    static_lifetime, to_chalk_trait_id,
     utils::all_super_traits,
     AdtId, Canonical, CanonicalVarKinds, DebruijnIndex, ForeignDefId, InEnvironment, Interner,
-    Scalar, TraitEnvironment, TraitRefExt, Ty, TyBuilder, TyExt, TyKind,
+    Scalar, Substitution, TraitEnvironment, TraitRef, TraitRefExt, Ty, TyBuilder, TyExt, TyKind,
 };
 
 /// This is used as a key for indexing impls.
@@ -624,52 +624,76 @@ pub(crate) fn iterate_method_candidates<T>(
     slot
 }
 
+/// Looks up the impl method that actually runs for the trait method `func`.
+///
+/// Returns `func` if it's not a method defined in a trait or the lookup failed.
 pub fn lookup_impl_method(
-    self_ty: &Ty,
     db: &dyn HirDatabase,
     env: Arc<TraitEnvironment>,
-    trait_: TraitId,
+    func: FunctionId,
+    fn_subst: Substitution,
+) -> FunctionId {
+    let trait_id = match func.lookup(db.upcast()).container {
+        ItemContainerId::TraitId(id) => id,
+        _ => return func,
+    };
+    let trait_params = db.generic_params(trait_id.into()).type_or_consts.len();
+    let fn_params = fn_subst.len(Interner) - trait_params;
+    let trait_ref = TraitRef {
+        trait_id: to_chalk_trait_id(trait_id),
+        substitution: Substitution::from_iter(Interner, fn_subst.iter(Interner).skip(fn_params)),
+    };
+
+    let name = &db.function_data(func).name;
+    lookup_impl_method_for_trait_ref(trait_ref, db, env, name).unwrap_or(func)
+}
+
+fn lookup_impl_method_for_trait_ref(
+    trait_ref: TraitRef,
+    db: &dyn HirDatabase,
+    env: Arc<TraitEnvironment>,
     name: &Name,
 ) -> Option<FunctionId> {
-    let self_ty_fp = TyFingerprint::for_trait_impl(self_ty)?;
-    let trait_impls = db.trait_impls_in_deps(env.krate);
-    let impls = trait_impls.for_trait_and_self_ty(trait_, self_ty_fp);
-    let mut table = InferenceTable::new(db, env.clone());
-    find_matching_impl(impls, &mut table, &self_ty).and_then(|data| {
-        data.items.iter().find_map(|it| match it {
-            AssocItemId::FunctionId(f) => (db.function_data(*f).name == *name).then(|| *f),
-            _ => None,
-        })
+    let self_ty = trait_ref.self_type_parameter(Interner);
+    let self_ty_fp = TyFingerprint::for_trait_impl(&self_ty)?;
+    let impls = db.trait_impls_in_deps(env.krate);
+    let impls = impls.for_trait_and_self_ty(trait_ref.hir_trait_id(), self_ty_fp);
+
+    let table = InferenceTable::new(db, env);
+
+    let impl_data = find_matching_impl(impls, table, trait_ref)?;
+    impl_data.items.iter().find_map(|it| match it {
+        AssocItemId::FunctionId(f) => (db.function_data(*f).name == *name).then(|| *f),
+        _ => None,
     })
 }
 
 fn find_matching_impl(
     mut impls: impl Iterator<Item = ImplId>,
-    table: &mut InferenceTable<'_>,
-    self_ty: &Ty,
+    mut table: InferenceTable<'_>,
+    actual_trait_ref: TraitRef,
 ) -> Option<Arc<ImplData>> {
     let db = table.db;
     loop {
         let impl_ = impls.next()?;
         let r = table.run_in_snapshot(|table| {
             let impl_data = db.impl_data(impl_);
-            let substs =
+            let impl_substs =
                 TyBuilder::subst_for_def(db, impl_, None).fill_with_inference_vars(table).build();
-            let impl_ty = db.impl_self_ty(impl_).substitute(Interner, &substs);
-
-            table
-                .unify(self_ty, &impl_ty)
-                .then(|| {
-                    let wh_goals =
-                        crate::chalk_db::convert_where_clauses(db, impl_.into(), &substs)
-                            .into_iter()
-                            .map(|b| b.cast(Interner));
+            let trait_ref = db
+                .impl_trait(impl_)
+                .expect("non-trait method in find_matching_impl")
+                .substitute(Interner, &impl_substs);
 
-                    let goal = crate::Goal::all(Interner, wh_goals);
+            if !table.unify(&trait_ref, &actual_trait_ref) {
+                return None;
+            }
 
-                    table.try_obligation(goal).map(|_| impl_data)
-                })
-                .flatten()
+            let wcs = crate::chalk_db::convert_where_clauses(db, impl_.into(), &impl_substs)
+                .into_iter()
+                .map(|b| b.cast(Interner));
+            let goal = crate::Goal::all(Interner, wcs);
+            table.try_obligation(goal).map(|_| impl_data)
         });
         if r.is_some() {
             break r;
@@ -1214,7 +1238,7 @@ fn is_valid_fn_candidate(
             let expected_receiver =
                 sig.map(|s| s.params()[0].clone()).substitute(Interner, &fn_subst);
 
-            check_that!(table.unify(&receiver_ty, &expected_receiver));
+            check_that!(table.unify(receiver_ty, &expected_receiver));
         }
 
         if let ItemContainerId::ImplId(impl_id) = container {
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/tests/display_source_code.rs b/src/tools/rust-analyzer/crates/hir-ty/src/tests/display_source_code.rs
index 8a8ff08cfe8..425432479e8 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/tests/display_source_code.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/tests/display_source_code.rs
@@ -196,3 +196,34 @@ fn test(
 "#,
     );
 }
+
+#[test]
+fn projection_type_correct_arguments_order() {
+    check_types_source_code(
+        r#"
+trait Foo<T> {
+    type Assoc<U>;
+}
+fn f<T: Foo<i32>>(a: T::Assoc<usize>) {
+    a;
+  //^ <T as Foo<i32>>::Assoc<usize>
+}
+"#,
+    );
+}
+
+#[test]
+fn generic_associated_type_binding_in_impl_trait() {
+    check_types_source_code(
+        r#"
+//- minicore: sized
+trait Foo<T> {
+    type Assoc<U>;
+}
+fn f(a: impl Foo<i8, Assoc<i16> = i32>) {
+    a;
+  //^ impl Foo<i8, Assoc<i16> = i32>
+}
+        "#,
+    );
+}
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/tests/traits.rs b/src/tools/rust-analyzer/crates/hir-ty/src/tests/traits.rs
index 555b6972fb7..7d42b8b9bc8 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/tests/traits.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/tests/traits.rs
@@ -3963,3 +3963,124 @@ fn g(t: &(dyn T + Send)) {
         "#,
     );
 }
+
+#[test]
+fn gats_in_path() {
+    check_types(
+        r#"
+//- minicore: deref
+use core::ops::Deref;
+trait PointerFamily {
+    type Pointer<T>: Deref<Target = T>;
+}
+
+fn f<P: PointerFamily>(p: P::Pointer<i32>) {
+    let a = *p;
+      //^ i32
+}
+fn g<P: PointerFamily>(p: <P as PointerFamily>::Pointer<i32>) {
+    let a = *p;
+      //^ i32
+}
+        "#,
+    );
+}
+
+#[test]
+fn gats_with_impl_trait() {
+    // FIXME: the last function (`fn i()`) is not valid Rust as of this writing because you cannot
+    // specify the same associated type multiple times even if their arguments are different (c.f.
+    // `fn h()`, which is valid). Reconsider how to treat these invalid types.
+    check_types(
+        r#"
+//- minicore: deref
+use core::ops::Deref;
+
+trait Trait {
+    type Assoc<T>: Deref<Target = T>;
+    fn get<U>(&self) -> Self::Assoc<U>;
+}
+
+fn f<T>(v: impl Trait) {
+    let a = v.get::<i32>().deref();
+      //^ &i32
+    let a = v.get::<T>().deref();
+      //^ &T
+}
+fn g<'a, T: 'a>(v: impl Trait<Assoc<T> = &'a T>) {
+    let a = v.get::<T>();
+      //^ &T
+    let a = v.get::<()>();
+      //^ Trait::Assoc<(), impl Trait<Assoc<T> = &T>>
+}
+fn h<'a>(v: impl Trait<Assoc<i32> = &'a i32> + Trait<Assoc<i64> = &'a i64>) {
+    let a = v.get::<i32>();
+      //^ &i32
+    let a = v.get::<i64>();
+      //^ &i64
+}
+fn i<'a>(v: impl Trait<Assoc<i32> = &'a i32, Assoc<i64> = &'a i64>) {
+    let a = v.get::<i32>();
+      //^ &i32
+    let a = v.get::<i64>();
+      //^ &i64
+}
+    "#,
+    );
+}
+
+#[test]
+fn gats_with_dyn() {
+    // This test is here to keep track of how we infer things despite traits with GATs being not
+    // object-safe currently.
+    // FIXME: reconsider how to treat these invalid types.
+    check_infer_with_mismatches(
+        r#"
+//- minicore: deref
+use core::ops::Deref;
+
+trait Trait {
+    type Assoc<T>: Deref<Target = T>;
+    fn get<U>(&self) -> Self::Assoc<U>;
+}
+
+fn f<'a>(v: &dyn Trait<Assoc<i32> = &'a i32>) {
+    v.get::<i32>().deref();
+}
+    "#,
+        expect![[r#"
+            90..94 'self': &Self
+            127..128 'v': &(dyn Trait<Assoc<i32> = &i32>)
+            164..195 '{     ...f(); }': ()
+            170..171 'v': &(dyn Trait<Assoc<i32> = &i32>)
+            170..184 'v.get::<i32>()': &i32
+            170..192 'v.get:...eref()': &i32
+        "#]],
+    );
+}
+
+#[test]
+fn gats_in_associated_type_binding() {
+    check_types(
+        r#"
+trait Trait {
+    type Assoc<T>;
+    fn get<U>(&self) -> Self::Assoc<U>;
+}
+
+fn f<T>(t: T)
+where
+    T: Trait<Assoc<i32> = u32>,
+    T: Trait<Assoc<isize> = usize>,
+{
+    let a = t.get::<i32>();
+      //^ u32
+    let a = t.get::<isize>();
+      //^ usize
+    let a = t.get::<()>();
+      //^ Trait::Assoc<(), T>
+}
+
+    "#,
+    );
+}
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/tls.rs b/src/tools/rust-analyzer/crates/hir-ty/src/tls.rs
index 547850b021c..92711a24fe3 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/tls.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/tls.rs
@@ -5,7 +5,7 @@ use itertools::Itertools;
 
 use crate::{
     chalk_db, db::HirDatabase, from_assoc_type_id, from_chalk_trait_id, mapping::from_chalk,
-    CallableDefId, Interner,
+    CallableDefId, Interner, ProjectionTyExt,
 };
 use hir_def::{AdtId, ItemContainerId, Lookup, TypeAliasId};
 
@@ -63,17 +63,31 @@ impl DebugContext<'_> {
             ItemContainerId::TraitId(t) => t,
             _ => panic!("associated type not in trait"),
         };
-        let trait_data = self.0.trait_data(trait_);
-        let params = projection_ty.substitution.as_slice(Interner);
-        write!(fmt, "<{:?} as {}", &params[0], trait_data.name,)?;
-        if params.len() > 1 {
+        let trait_name = &self.0.trait_data(trait_).name;
+        let trait_ref = projection_ty.trait_ref(self.0);
+        let trait_params = trait_ref.substitution.as_slice(Interner);
+        let self_ty = trait_ref.self_type_parameter(Interner);
+        write!(fmt, "<{:?} as {}", self_ty, trait_name)?;
+        if trait_params.len() > 1 {
+            write!(
+                fmt,
+                "<{}>",
+                trait_params[1..].iter().format_with(", ", |x, f| f(&format_args!("{:?}", x))),
+            )?;
+        }
+        write!(fmt, ">::{}", type_alias_data.name)?;
+
+        let proj_params_count = projection_ty.substitution.len(Interner) - trait_params.len();
+        let proj_params = &projection_ty.substitution.as_slice(Interner)[..proj_params_count];
+        if !proj_params.is_empty() {
             write!(
                 fmt,
                 "<{}>",
-                &params[1..].iter().format_with(", ", |x, f| f(&format_args!("{:?}", x))),
+                proj_params.iter().format_with(", ", |x, f| f(&format_args!("{:?}", x))),
             )?;
         }
-        write!(fmt, ">::{}", type_alias_data.name)
+
+        Ok(())
     }
 
     pub(crate) fn debug_fn_def_id(
diff --git a/src/tools/rust-analyzer/crates/hir/src/source_analyzer.rs b/src/tools/rust-analyzer/crates/hir/src/source_analyzer.rs
index 07bae2b38c7..f86c5710053 100644
--- a/src/tools/rust-analyzer/crates/hir/src/source_analyzer.rs
+++ b/src/tools/rust-analyzer/crates/hir/src/source_analyzer.rs
@@ -270,7 +270,7 @@ impl SourceAnalyzer {
         let expr_id = self.expr_id(db, &call.clone().into())?;
         let (f_in_trait, substs) = self.infer.as_ref()?.method_resolution(expr_id)?;
 
-        Some(self.resolve_impl_method_or_trait_def(db, f_in_trait, &substs))
+        Some(self.resolve_impl_method_or_trait_def(db, f_in_trait, substs))
     }
 
     pub(crate) fn resolve_await_to_poll(
@@ -311,7 +311,7 @@ impl SourceAnalyzer {
         // HACK: subst for `poll()` coincides with that for `Future` because `poll()` itself
         // doesn't have any generic parameters, so we skip building another subst for `poll()`.
         let substs = hir_ty::TyBuilder::subst_for_def(db, future_trait, None).push(ty).build();
-        Some(self.resolve_impl_method_or_trait_def(db, poll_fn, &substs))
+        Some(self.resolve_impl_method_or_trait_def(db, poll_fn, substs))
     }
 
     pub(crate) fn resolve_prefix_expr(
@@ -331,7 +331,7 @@ impl SourceAnalyzer {
         // don't have any generic parameters, so we skip building another subst for the methods.
         let substs = hir_ty::TyBuilder::subst_for_def(db, op_trait, None).push(ty.clone()).build();
 
-        Some(self.resolve_impl_method_or_trait_def(db, op_fn, &substs))
+        Some(self.resolve_impl_method_or_trait_def(db, op_fn, substs))
     }
 
     pub(crate) fn resolve_index_expr(
@@ -351,7 +351,7 @@ impl SourceAnalyzer {
             .push(base_ty.clone())
             .push(index_ty.clone())
             .build();
-        Some(self.resolve_impl_method_or_trait_def(db, op_fn, &substs))
+        Some(self.resolve_impl_method_or_trait_def(db, op_fn, substs))
     }
 
     pub(crate) fn resolve_bin_expr(
@@ -372,7 +372,7 @@ impl SourceAnalyzer {
             .push(rhs.clone())
             .build();
 
-        Some(self.resolve_impl_method_or_trait_def(db, op_fn, &substs))
+        Some(self.resolve_impl_method_or_trait_def(db, op_fn, substs))
     }
 
     pub(crate) fn resolve_try_expr(
@@ -392,7 +392,7 @@ impl SourceAnalyzer {
         // doesn't have any generic parameters, so we skip building another subst for `branch()`.
         let substs = hir_ty::TyBuilder::subst_for_def(db, op_trait, None).push(ty.clone()).build();
 
-        Some(self.resolve_impl_method_or_trait_def(db, op_fn, &substs))
+        Some(self.resolve_impl_method_or_trait_def(db, op_fn, substs))
     }
 
     pub(crate) fn resolve_field(
@@ -487,9 +487,9 @@ impl SourceAnalyzer {
 
         let mut prefer_value_ns = false;
         let resolved = (|| {
+            let infer = self.infer.as_deref()?;
             if let Some(path_expr) = parent().and_then(ast::PathExpr::cast) {
                 let expr_id = self.expr_id(db, &path_expr.into())?;
-                let infer = self.infer.as_ref()?;
                 if let Some(assoc) = infer.assoc_resolutions_for_expr(expr_id) {
                     let assoc = match assoc {
                         AssocItemId::FunctionId(f_in_trait) => {
@@ -497,9 +497,12 @@ impl SourceAnalyzer {
                                 None => assoc,
                                 Some(func_ty) => {
                                     if let TyKind::FnDef(_fn_def, subs) = func_ty.kind(Interner) {
-                                        self.resolve_impl_method(db, f_in_trait, subs)
-                                            .map(AssocItemId::FunctionId)
-                                            .unwrap_or(assoc)
+                                        self.resolve_impl_method_or_trait_def(
+                                            db,
+                                            f_in_trait,
+                                            subs.clone(),
+                                        )
+                                        .into()
                                     } else {
                                         assoc
                                     }
@@ -520,18 +523,18 @@ impl SourceAnalyzer {
                 prefer_value_ns = true;
             } else if let Some(path_pat) = parent().and_then(ast::PathPat::cast) {
                 let pat_id = self.pat_id(&path_pat.into())?;
-                if let Some(assoc) = self.infer.as_ref()?.assoc_resolutions_for_pat(pat_id) {
+                if let Some(assoc) = infer.assoc_resolutions_for_pat(pat_id) {
                     return Some(PathResolution::Def(AssocItem::from(assoc).into()));
                 }
                 if let Some(VariantId::EnumVariantId(variant)) =
-                    self.infer.as_ref()?.variant_resolution_for_pat(pat_id)
+                    infer.variant_resolution_for_pat(pat_id)
                 {
                     return Some(PathResolution::Def(ModuleDef::Variant(variant.into())));
                 }
             } else if let Some(rec_lit) = parent().and_then(ast::RecordExpr::cast) {
                 let expr_id = self.expr_id(db, &rec_lit.into())?;
                 if let Some(VariantId::EnumVariantId(variant)) =
-                    self.infer.as_ref()?.variant_resolution_for_expr(expr_id)
+                    infer.variant_resolution_for_expr(expr_id)
                 {
                     return Some(PathResolution::Def(ModuleDef::Variant(variant.into())));
                 }
@@ -541,8 +544,7 @@ impl SourceAnalyzer {
                     || parent().and_then(ast::TupleStructPat::cast).map(ast::Pat::from);
                 if let Some(pat) = record_pat.or_else(tuple_struct_pat) {
                     let pat_id = self.pat_id(&pat)?;
-                    let variant_res_for_pat =
-                        self.infer.as_ref()?.variant_resolution_for_pat(pat_id);
+                    let variant_res_for_pat = infer.variant_resolution_for_pat(pat_id);
                     if let Some(VariantId::EnumVariantId(variant)) = variant_res_for_pat {
                         return Some(PathResolution::Def(ModuleDef::Variant(variant.into())));
                     }
@@ -780,37 +782,22 @@ impl SourceAnalyzer {
         false
     }
 
-    fn resolve_impl_method(
+    fn resolve_impl_method_or_trait_def(
         &self,
         db: &dyn HirDatabase,
         func: FunctionId,
-        substs: &Substitution,
-    ) -> Option<FunctionId> {
-        let impled_trait = match func.lookup(db.upcast()).container {
-            ItemContainerId::TraitId(trait_id) => trait_id,
-            _ => return None,
-        };
-        if substs.is_empty(Interner) {
-            return None;
-        }
-        let self_ty = substs.at(Interner, 0).ty(Interner)?;
+        substs: Substitution,
+    ) -> FunctionId {
         let krate = self.resolver.krate();
-        let trait_env = self.resolver.body_owner()?.as_generic_def_id().map_or_else(
+        let owner = match self.resolver.body_owner() {
+            Some(it) => it,
+            None => return func,
+        };
+        let env = owner.as_generic_def_id().map_or_else(
             || Arc::new(hir_ty::TraitEnvironment::empty(krate)),
             |d| db.trait_environment(d),
         );
-
-        let fun_data = db.function_data(func);
-        method_resolution::lookup_impl_method(self_ty, db, trait_env, impled_trait, &fun_data.name)
-    }
-
-    fn resolve_impl_method_or_trait_def(
-        &self,
-        db: &dyn HirDatabase,
-        func: FunctionId,
-        substs: &Substitution,
-    ) -> FunctionId {
-        self.resolve_impl_method(db, func, substs).unwrap_or(func)
+        method_resolution::lookup_impl_method(db, env, func, substs)
     }
 
     fn lang_trait_fn(
diff --git a/src/tools/rust-analyzer/crates/ide/src/goto_definition.rs b/src/tools/rust-analyzer/crates/ide/src/goto_definition.rs
index d0be1b3f404..f97c67b144a 100644
--- a/src/tools/rust-analyzer/crates/ide/src/goto_definition.rs
+++ b/src/tools/rust-analyzer/crates/ide/src/goto_definition.rs
@@ -1834,4 +1834,86 @@ fn f() {
 "#,
         );
     }
+
+    #[test]
+    fn goto_bin_op_multiple_impl() {
+        check(
+            r#"
+//- minicore: add
+struct S;
+impl core::ops::Add for S {
+    fn add(
+     //^^^
+    ) {}
+}
+impl core::ops::Add<usize> for S {
+    fn add(
+    ) {}
+}
+
+fn f() {
+    S +$0 S
+}
+"#,
+        );
+
+        check(
+            r#"
+//- minicore: add
+struct S;
+impl core::ops::Add for S {
+    fn add(
+    ) {}
+}
+impl core::ops::Add<usize> for S {
+    fn add(
+     //^^^
+    ) {}
+}
+
+fn f() {
+    S +$0 0usize
+}
+"#,
+        );
+    }
+
+    #[test]
+    fn path_call_multiple_trait_impl() {
+        check(
+            r#"
+trait Trait<T> {
+    fn f(_: T);
+}
+impl Trait<i32> for usize {
+    fn f(_: i32) {}
+     //^
+}
+impl Trait<i64> for usize {
+    fn f(_: i64) {}
+}
+fn main() {
+    usize::f$0(0i32);
+}
+"#,
+        );
+
+        check(
+            r#"
+trait Trait<T> {
+    fn f(_: T);
+}
+impl Trait<i32> for usize {
+    fn f(_: i32) {}
+}
+impl Trait<i64> for usize {
+    fn f(_: i64) {}
+     //^
+}
+fn main() {
+    usize::f$0(0i64);
+}
+"#,
+        )
+    }
 }
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
index 5445028536c..7ae5324ab05 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/Cargo.toml
@@ -23,7 +23,7 @@ crossbeam-channel = "0.5.5"
 dissimilar = "1.0.4"
 itertools = "0.10.5"
 scip = "0.1.1"
-lsp-types = { version = "0.93.1", features = ["proposed"] }
+lsp-types = { version = "=0.93.2", features = ["proposed"] }
 parking_lot = "0.12.1"
 xflags = "0.3.0"
 oorandom = "11.1.3"
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/bin/main.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/bin/main.rs
index eabfcf1944d..7bf595d2a45 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/bin/main.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/bin/main.rs
@@ -11,7 +11,7 @@ use std::{env, fs, path::Path, process};
 
 use lsp_server::Connection;
 use project_model::ProjectManifest;
-use rust_analyzer::{cli::flags, config::Config, from_json, lsp_ext::supports_utf8, Result};
+use rust_analyzer::{cli::flags, config::Config, from_json, Result};
 use vfs::AbsPathBuf;
 
 #[cfg(all(feature = "mimalloc"))]
@@ -191,11 +191,7 @@ fn run_server() -> Result<()> {
             name: String::from("rust-analyzer"),
             version: Some(rust_analyzer::version().to_string()),
         }),
-        offset_encoding: if supports_utf8(config.caps()) {
-            Some("utf-8".to_string())
-        } else {
-            None
-        },
+        offset_encoding: None,
     };
 
     let initialize_result = serde_json::to_value(initialize_result).unwrap();
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/caps.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/caps.rs
index cda95cd8626..723b888d9ab 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/caps.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/caps.rs
@@ -6,19 +6,25 @@ use lsp_types::{
     FileOperationFilter, FileOperationPattern, FileOperationPatternKind,
     FileOperationRegistrationOptions, FoldingRangeProviderCapability, HoverProviderCapability,
     ImplementationProviderCapability, InlayHintOptions, InlayHintServerCapabilities, OneOf,
-    RenameOptions, SaveOptions, SelectionRangeProviderCapability, SemanticTokensFullOptions,
-    SemanticTokensLegend, SemanticTokensOptions, ServerCapabilities, SignatureHelpOptions,
-    TextDocumentSyncCapability, TextDocumentSyncKind, TextDocumentSyncOptions,
-    TypeDefinitionProviderCapability, WorkDoneProgressOptions,
+    PositionEncodingKind, RenameOptions, SaveOptions, SelectionRangeProviderCapability,
+    SemanticTokensFullOptions, SemanticTokensLegend, SemanticTokensOptions, ServerCapabilities,
+    SignatureHelpOptions, TextDocumentSyncCapability, TextDocumentSyncKind,
+    TextDocumentSyncOptions, TypeDefinitionProviderCapability, WorkDoneProgressOptions,
     WorkspaceFileOperationsServerCapabilities, WorkspaceServerCapabilities,
 };
 use serde_json::json;
 
 use crate::config::{Config, RustfmtConfig};
+use crate::lsp_ext::supports_utf8;
 use crate::semantic_tokens;
 
 pub fn server_capabilities(config: &Config) -> ServerCapabilities {
     ServerCapabilities {
+        position_encoding: if supports_utf8(config.caps()) {
+            Some(PositionEncodingKind::UTF8)
+        } else {
+            None
+        },
         text_document_sync: Some(TextDocumentSyncCapability::Options(TextDocumentSyncOptions {
             open_close: Some(true),
             change: Some(TextDocumentSyncKind::INCREMENTAL),
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/lsif.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/lsif.rs
index 748306ea57d..5ff347b9bd7 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/lsif.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/lsif.rs
@@ -20,7 +20,7 @@ use crate::cli::{
     load_cargo::{load_workspace, LoadCargoConfig},
     Result,
 };
-use crate::line_index::{LineEndings, LineIndex, OffsetEncoding};
+use crate::line_index::{LineEndings, LineIndex, PositionEncoding};
 use crate::to_proto;
 use crate::version::version;
 
@@ -126,7 +126,7 @@ impl LsifManager<'_> {
         let line_index = self.db.line_index(file_id);
         let line_index = LineIndex {
             index: line_index,
-            encoding: OffsetEncoding::Utf16,
+            encoding: PositionEncoding::Utf16,
             endings: LineEndings::Unix,
         };
         let range_id = self.add_vertex(lsif::Vertex::Range {
@@ -248,7 +248,7 @@ impl LsifManager<'_> {
         let line_index = self.db.line_index(file_id);
         let line_index = LineIndex {
             index: line_index,
-            encoding: OffsetEncoding::Utf16,
+            encoding: PositionEncoding::Utf16,
             endings: LineEndings::Unix,
         };
         let result = folds
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs
index 8b77ccde0ee..16298862b50 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/cli/scip.rs
@@ -5,7 +5,7 @@ use std::{
     time::Instant,
 };
 
-use crate::line_index::{LineEndings, LineIndex, OffsetEncoding};
+use crate::line_index::{LineEndings, LineIndex, PositionEncoding};
 use hir::Name;
 use ide::{
     LineCol, MonikerDescriptorKind, StaticIndex, StaticIndexedFile, TextRange, TokenId,
@@ -91,7 +91,7 @@ impl flags::Scip {
 
             let line_index = LineIndex {
                 index: db.line_index(file_id),
-                encoding: OffsetEncoding::Utf8,
+                encoding: PositionEncoding::Utf8,
                 endings: LineEndings::Unix,
             };
 
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs
index 85322f12a83..1ed8f2bb5f3 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/config.rs
@@ -32,7 +32,7 @@ use vfs::AbsPathBuf;
 use crate::{
     caps::completion_item_edit_resolve,
     diagnostics::DiagnosticsMapConfig,
-    line_index::OffsetEncoding,
+    line_index::PositionEncoding,
     lsp_ext::{self, supports_utf8, WorkspaceSymbolSearchKind, WorkspaceSymbolSearchScope},
 };
 
@@ -948,11 +948,11 @@ impl Config {
         .is_some()
     }
 
-    pub fn offset_encoding(&self) -> OffsetEncoding {
+    pub fn position_encoding(&self) -> PositionEncoding {
         if supports_utf8(&self.caps) {
-            OffsetEncoding::Utf8
+            PositionEncoding::Utf8
         } else {
-            OffsetEncoding::Utf16
+            PositionEncoding::Utf16
         }
     }
 
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/to_proto.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/to_proto.rs
index 74689fd8757..189ac2fbf53 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/to_proto.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/diagnostics/to_proto.rs
@@ -8,7 +8,7 @@ use stdx::format_to;
 use vfs::{AbsPath, AbsPathBuf};
 
 use crate::{
-    global_state::GlobalStateSnapshot, line_index::OffsetEncoding, lsp_ext,
+    global_state::GlobalStateSnapshot, line_index::PositionEncoding, lsp_ext,
     to_proto::url_from_abs_path,
 };
 
@@ -66,17 +66,17 @@ fn location(
     let uri = url_from_abs_path(&file_name);
 
     let range = {
-        let offset_encoding = snap.config.offset_encoding();
+        let position_encoding = snap.config.position_encoding();
         lsp_types::Range::new(
-            position(&offset_encoding, span, span.line_start, span.column_start),
-            position(&offset_encoding, span, span.line_end, span.column_end),
+            position(&position_encoding, span, span.line_start, span.column_start),
+            position(&position_encoding, span, span.line_end, span.column_end),
         )
     };
     lsp_types::Location::new(uri, range)
 }
 
 fn position(
-    offset_encoding: &OffsetEncoding,
+    position_encoding: &PositionEncoding,
     span: &DiagnosticSpan,
     line_offset: usize,
     column_offset: usize,
@@ -93,9 +93,9 @@ fn position(
             };
         }
         let mut char_offset = 0;
-        let len_func = match offset_encoding {
-            OffsetEncoding::Utf8 => char::len_utf8,
-            OffsetEncoding::Utf16 => char::len_utf16,
+        let len_func = match position_encoding {
+            PositionEncoding::Utf8 => char::len_utf8,
+            PositionEncoding::Utf16 => char::len_utf16,
         };
         for c in line.text.chars() {
             char_offset += 1;
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/from_proto.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/from_proto.rs
index f2db9a27334..936957bab48 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/from_proto.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/from_proto.rs
@@ -8,7 +8,7 @@ use vfs::AbsPathBuf;
 use crate::{
     from_json,
     global_state::GlobalStateSnapshot,
-    line_index::{LineIndex, OffsetEncoding},
+    line_index::{LineIndex, PositionEncoding},
     lsp_ext,
     lsp_utils::invalid_params_error,
     Result,
@@ -25,10 +25,10 @@ pub(crate) fn vfs_path(url: &lsp_types::Url) -> Result<vfs::VfsPath> {
 
 pub(crate) fn offset(line_index: &LineIndex, position: lsp_types::Position) -> Result<TextSize> {
     let line_col = match line_index.encoding {
-        OffsetEncoding::Utf8 => {
+        PositionEncoding::Utf8 => {
             LineCol { line: position.line as u32, col: position.character as u32 }
         }
-        OffsetEncoding::Utf16 => {
+        PositionEncoding::Utf16 => {
             let line_col =
                 LineColUtf16 { line: position.line as u32, col: position.character as u32 };
             line_index.index.to_utf8(line_col)
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs
index 3fb06c31f7c..74277ff2e57 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/global_state.rs
@@ -383,7 +383,7 @@ impl GlobalStateSnapshot {
     pub(crate) fn file_line_index(&self, file_id: FileId) -> Cancellable<LineIndex> {
         let endings = self.vfs.read().1[&file_id];
         let index = self.analysis.file_line_index(file_id)?;
-        let res = LineIndex { index, endings, encoding: self.config.offset_encoding() };
+        let res = LineIndex { index, endings, encoding: self.config.position_encoding() };
         Ok(res)
     }
 
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/line_index.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/line_index.rs
index c116414da01..0d424b91570 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/line_index.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/line_index.rs
@@ -7,7 +7,7 @@
 
 use std::sync::Arc;
 
-pub enum OffsetEncoding {
+pub enum PositionEncoding {
     Utf8,
     Utf16,
 }
@@ -15,7 +15,7 @@ pub enum OffsetEncoding {
 pub(crate) struct LineIndex {
     pub(crate) index: Arc<ide::LineIndex>,
     pub(crate) endings: LineEndings,
-    pub(crate) encoding: OffsetEncoding,
+    pub(crate) encoding: PositionEncoding,
 }
 
 #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp_ext.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp_ext.rs
index e61c8b643d2..8cc5648f3ce 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp_ext.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp_ext.rs
@@ -3,6 +3,7 @@
 use std::{collections::HashMap, path::PathBuf};
 
 use lsp_types::request::Request;
+use lsp_types::PositionEncodingKind;
 use lsp_types::{
     notification::Notification, CodeActionKind, DocumentOnTypeFormattingParams,
     PartialResultParams, Position, Range, TextDocumentIdentifier, WorkDoneProgressParams,
@@ -455,7 +456,15 @@ pub(crate) enum CodeLensResolveData {
 }
 
 pub fn supports_utf8(caps: &lsp_types::ClientCapabilities) -> bool {
-    caps.offset_encoding.as_deref().unwrap_or_default().iter().any(|it| it == "utf-8")
+    match &caps.general {
+        Some(general) => general
+            .position_encodings
+            .as_deref()
+            .unwrap_or_default()
+            .iter()
+            .any(|it| it == &PositionEncodingKind::UTF8),
+        _ => false,
+    }
 }
 
 pub enum MoveItem {}
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp_utils.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp_utils.rs
index b3cea64d417..c6a4db9a453 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp_utils.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/lsp_utils.rs
@@ -6,7 +6,7 @@ use lsp_server::Notification;
 use crate::{
     from_proto,
     global_state::GlobalState,
-    line_index::{LineEndings, LineIndex, OffsetEncoding},
+    line_index::{LineEndings, LineIndex, PositionEncoding},
     LspError,
 };
 
@@ -140,7 +140,7 @@ pub(crate) fn apply_document_changes(
         index: Arc::new(ide::LineIndex::new(old_text)),
         // We don't care about line endings or offset encoding here.
         endings: LineEndings::Unix,
-        encoding: OffsetEncoding::Utf16,
+        encoding: PositionEncoding::Utf16,
     };
 
     // The changes we got must be applied sequentially, but can cross lines so we
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs
index 2c928a58040..7d10dc5d15b 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/main_loop.rs
@@ -607,30 +607,34 @@ impl GlobalState {
 
     /// Handles a request.
     fn on_request(&mut self, req: Request) {
-        if self.shutdown_requested {
-            self.respond(lsp_server::Response::new_err(
-                req.id,
-                lsp_server::ErrorCode::InvalidRequest as i32,
-                "Shutdown already requested.".to_owned(),
-            ));
-            return;
-        }
+        let mut dispatcher = RequestDispatcher { req: Some(req), global_state: self };
+        dispatcher.on_sync_mut::<lsp_types::request::Shutdown>(|s, ()| {
+            s.shutdown_requested = true;
+            Ok(())
+        });
+
+        if let RequestDispatcher { req: Some(req), global_state: this } = &mut dispatcher {
+            if this.shutdown_requested {
+                this.respond(lsp_server::Response::new_err(
+                    req.id.clone(),
+                    lsp_server::ErrorCode::InvalidRequest as i32,
+                    "Shutdown already requested.".to_owned(),
+                ));
+                return;
+            }
 
-        // Avoid flashing a bunch of unresolved references during initial load.
-        if self.workspaces.is_empty() && !self.is_quiescent() {
-            self.respond(lsp_server::Response::new_err(
-                req.id,
-                lsp_server::ErrorCode::ContentModified as i32,
-                "waiting for cargo metadata or cargo check".to_owned(),
-            ));
-            return;
+            // Avoid flashing a bunch of unresolved references during initial load.
+            if this.workspaces.is_empty() && !this.is_quiescent() {
+                this.respond(lsp_server::Response::new_err(
+                    req.id.clone(),
+                    lsp_server::ErrorCode::ContentModified as i32,
+                    "waiting for cargo metadata or cargo check".to_owned(),
+                ));
+                return;
+            }
         }
 
-        RequestDispatcher { req: Some(req), global_state: self }
-            .on_sync_mut::<lsp_types::request::Shutdown>(|s, ()| {
-                s.shutdown_requested = true;
-                Ok(())
-            })
+        dispatcher
             .on_sync_mut::<lsp_ext::ReloadWorkspace>(handlers::handle_workspace_reload)
             .on_sync_mut::<lsp_ext::MemoryUsage>(handlers::handle_memory_usage)
             .on_sync_mut::<lsp_ext::ShuffleCrateGraph>(handlers::handle_shuffle_crate_graph)
diff --git a/src/tools/rust-analyzer/crates/rust-analyzer/src/to_proto.rs b/src/tools/rust-analyzer/crates/rust-analyzer/src/to_proto.rs
index 5936454a7c5..6c84a2069cd 100644
--- a/src/tools/rust-analyzer/crates/rust-analyzer/src/to_proto.rs
+++ b/src/tools/rust-analyzer/crates/rust-analyzer/src/to_proto.rs
@@ -21,7 +21,7 @@ use crate::{
     cargo_target_spec::CargoTargetSpec,
     config::{CallInfoConfig, Config},
     global_state::GlobalStateSnapshot,
-    line_index::{LineEndings, LineIndex, OffsetEncoding},
+    line_index::{LineEndings, LineIndex, PositionEncoding},
     lsp_ext,
     lsp_utils::invalid_params_error,
     semantic_tokens, Result,
@@ -30,8 +30,8 @@ use crate::{
 pub(crate) fn position(line_index: &LineIndex, offset: TextSize) -> lsp_types::Position {
     let line_col = line_index.index.line_col(offset);
     match line_index.encoding {
-        OffsetEncoding::Utf8 => lsp_types::Position::new(line_col.line, line_col.col),
-        OffsetEncoding::Utf16 => {
+        PositionEncoding::Utf8 => lsp_types::Position::new(line_col.line, line_col.col),
+        PositionEncoding::Utf16 => {
             let line_col = line_index.index.to_utf16(line_col);
             lsp_types::Position::new(line_col.line, line_col.col)
         }
@@ -1394,7 +1394,7 @@ fn main() {
         let line_index = LineIndex {
             index: Arc::new(ide::LineIndex::new(text)),
             endings: LineEndings::Unix,
-            encoding: OffsetEncoding::Utf16,
+            encoding: PositionEncoding::Utf16,
         };
         let converted: Vec<lsp_types::FoldingRange> =
             folds.into_iter().map(|it| folding_range(text, &line_index, true, it)).collect();
diff --git a/src/tools/rust-analyzer/crates/syntax/rust.ungram b/src/tools/rust-analyzer/crates/syntax/rust.ungram
index 89479543545..5379732ac6c 100644
--- a/src/tools/rust-analyzer/crates/syntax/rust.ungram
+++ b/src/tools/rust-analyzer/crates/syntax/rust.ungram
@@ -51,7 +51,7 @@ TypeArg =
   Type
 
 AssocTypeArg =
-  NameRef GenericParamList? (':' TypeBoundList | ('=' Type | ConstArg))
+  NameRef GenericArgList? (':' TypeBoundList | ('=' Type | ConstArg))
 
 LifetimeArg =
   Lifetime
diff --git a/src/tools/rust-analyzer/crates/syntax/src/ast/generated/nodes.rs b/src/tools/rust-analyzer/crates/syntax/src/ast/generated/nodes.rs
index 449402e5f5b..6cfb98d92fc 100644
--- a/src/tools/rust-analyzer/crates/syntax/src/ast/generated/nodes.rs
+++ b/src/tools/rust-analyzer/crates/syntax/src/ast/generated/nodes.rs
@@ -120,7 +120,7 @@ pub struct AssocTypeArg {
 impl ast::HasTypeBounds for AssocTypeArg {}
 impl AssocTypeArg {
     pub fn name_ref(&self) -> Option<NameRef> { support::child(&self.syntax) }
-    pub fn generic_param_list(&self) -> Option<GenericParamList> { support::child(&self.syntax) }
+    pub fn generic_arg_list(&self) -> Option<GenericArgList> { support::child(&self.syntax) }
     pub fn eq_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![=]) }
     pub fn ty(&self) -> Option<Type> { support::child(&self.syntax) }
     pub fn const_arg(&self) -> Option<ConstArg> { support::child(&self.syntax) }
@@ -143,16 +143,6 @@ impl ConstArg {
 }
 
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
-pub struct GenericParamList {
-    pub(crate) syntax: SyntaxNode,
-}
-impl GenericParamList {
-    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
-    pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) }
-    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
-}
-
-#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct TypeBoundList {
     pub(crate) syntax: SyntaxNode,
 }
@@ -528,6 +518,16 @@ impl Abi {
 }
 
 #[derive(Debug, Clone, PartialEq, Eq, Hash)]
+pub struct GenericParamList {
+    pub(crate) syntax: SyntaxNode,
+}
+impl GenericParamList {
+    pub fn l_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![<]) }
+    pub fn generic_params(&self) -> AstChildren<GenericParam> { support::children(&self.syntax) }
+    pub fn r_angle_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![>]) }
+}
+
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
 pub struct WhereClause {
     pub(crate) syntax: SyntaxNode,
 }
@@ -1834,17 +1834,6 @@ impl AstNode for ConstArg {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
-impl AstNode for GenericParamList {
-    fn can_cast(kind: SyntaxKind) -> bool { kind == GENERIC_PARAM_LIST }
-    fn cast(syntax: SyntaxNode) -> Option<Self> {
-        if Self::can_cast(syntax.kind()) {
-            Some(Self { syntax })
-        } else {
-            None
-        }
-    }
-    fn syntax(&self) -> &SyntaxNode { &self.syntax }
-}
 impl AstNode for TypeBoundList {
     fn can_cast(kind: SyntaxKind) -> bool { kind == TYPE_BOUND_LIST }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -2153,6 +2142,17 @@ impl AstNode for Abi {
     }
     fn syntax(&self) -> &SyntaxNode { &self.syntax }
 }
+impl AstNode for GenericParamList {
+    fn can_cast(kind: SyntaxKind) -> bool { kind == GENERIC_PARAM_LIST }
+    fn cast(syntax: SyntaxNode) -> Option<Self> {
+        if Self::can_cast(syntax.kind()) {
+            Some(Self { syntax })
+        } else {
+            None
+        }
+    }
+    fn syntax(&self) -> &SyntaxNode { &self.syntax }
+}
 impl AstNode for WhereClause {
     fn can_cast(kind: SyntaxKind) -> bool { kind == WHERE_CLAUSE }
     fn cast(syntax: SyntaxNode) -> Option<Self> {
@@ -4263,11 +4263,6 @@ impl std::fmt::Display for ConstArg {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
-impl std::fmt::Display for GenericParamList {
-    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
-        std::fmt::Display::fmt(self.syntax(), f)
-    }
-}
 impl std::fmt::Display for TypeBoundList {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
@@ -4408,6 +4403,11 @@ impl std::fmt::Display for Abi {
         std::fmt::Display::fmt(self.syntax(), f)
     }
 }
+impl std::fmt::Display for GenericParamList {
+    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+        std::fmt::Display::fmt(self.syntax(), f)
+    }
+}
 impl std::fmt::Display for WhereClause {
     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
         std::fmt::Display::fmt(self.syntax(), f)
diff --git a/src/tools/rust-analyzer/docs/dev/architecture.md b/src/tools/rust-analyzer/docs/dev/architecture.md
index c173a239fea..e3a4fdfda90 100644
--- a/src/tools/rust-analyzer/docs/dev/architecture.md
+++ b/src/tools/rust-analyzer/docs/dev/architecture.md
@@ -479,7 +479,9 @@ It is not cheap enough to enable in prod, and this is a bug which should be fixe
 ### Configurability
 
 rust-analyzer strives to be as configurable as possible while offering reasonable defaults where no configuration exists yet.
+The rule of thumb is to enable most features by default unless they are buggy or degrade performance too much.
 There will always be features that some people find more annoying than helpful, so giving the users the ability to tweak or disable these is a big part of offering a good user experience.
+Enabling them by default is a matter of discoverability, as many users end up don't know about some features even though they are presented in the manual.
 Mind the code--architecture gap: at the moment, we are using fewer feature flags than we really should.
 
 ### Serialization
diff --git a/src/tools/rust-analyzer/docs/dev/lsp-extensions.md b/src/tools/rust-analyzer/docs/dev/lsp-extensions.md
index 6d2c7d7b063..fe316fcae9b 100644
--- a/src/tools/rust-analyzer/docs/dev/lsp-extensions.md
+++ b/src/tools/rust-analyzer/docs/dev/lsp-extensions.md
@@ -1,5 +1,5 @@
 <!---
-lsp_ext.rs hash: 7b710095d773b978
+lsp_ext.rs hash: 62068e53ac202dc8
 
 If you need to change the above hash to make the test pass, please check if you
 need to adjust this doc as well and ping this issue:
@@ -19,12 +19,6 @@ Requests, which are likely to always remain specific to `rust-analyzer` are unde
 
 If you want to be notified about the changes to this document, subscribe to [#4604](https://github.com/rust-lang/rust-analyzer/issues/4604).
 
-## UTF-8 offsets
-
-rust-analyzer supports clangd's extension for opting into UTF-8 as the coordinate space for offsets (by default, LSP uses UTF-16 offsets).
-
-https://clangd.llvm.org/extensions.html#utf-8-offsets
-
 ## Configuration in `initializationOptions`
 
 **Upstream Issue:** https://github.com/microsoft/language-server-protocol/issues/567
diff --git a/src/tools/rust-analyzer/editors/code/src/commands.ts b/src/tools/rust-analyzer/editors/code/src/commands.ts
index 12ceb4f2df8..312087e4cff 100644
--- a/src/tools/rust-analyzer/editors/code/src/commands.ts
+++ b/src/tools/rust-analyzer/editors/code/src/commands.ts
@@ -3,7 +3,7 @@ import * as lc from "vscode-languageclient";
 import * as ra from "./lsp_ext";
 import * as path from "path";
 
-import { Ctx, Cmd } from "./ctx";
+import { Ctx, Cmd, CtxInit } from "./ctx";
 import { applySnippetWorkspaceEdit, applySnippetTextEdits } from "./snippets";
 import { spawnSync } from "child_process";
 import { RunnableQuickPick, selectRunnable, createTask, createArgs } from "./run";
@@ -16,14 +16,14 @@ import { LINKED_COMMANDS } from "./client";
 export * from "./ast_inspector";
 export * from "./run";
 
-export function analyzerStatus(ctx: Ctx): Cmd {
+export function analyzerStatus(ctx: CtxInit): Cmd {
     const tdcp = new (class implements vscode.TextDocumentContentProvider {
         readonly uri = vscode.Uri.parse("rust-analyzer-status://status");
         readonly eventEmitter = new vscode.EventEmitter<vscode.Uri>();
 
         async provideTextDocumentContent(_uri: vscode.Uri): Promise<string> {
             if (!vscode.window.activeTextEditor) return "";
-            const client = await ctx.getClient();
+            const client = ctx.client;
 
             const params: ra.AnalyzerStatusParams = {};
             const doc = ctx.activeRustEditor?.document;
@@ -52,7 +52,7 @@ export function analyzerStatus(ctx: Ctx): Cmd {
     };
 }
 
-export function memoryUsage(ctx: Ctx): Cmd {
+export function memoryUsage(ctx: CtxInit): Cmd {
     const tdcp = new (class implements vscode.TextDocumentContentProvider {
         readonly uri = vscode.Uri.parse("rust-analyzer-memory://memory");
         readonly eventEmitter = new vscode.EventEmitter<vscode.Uri>();
@@ -60,14 +60,9 @@ export function memoryUsage(ctx: Ctx): Cmd {
         provideTextDocumentContent(_uri: vscode.Uri): vscode.ProviderResult<string> {
             if (!vscode.window.activeTextEditor) return "";
 
-            return ctx
-                .getClient()
-                .then((it) => it.sendRequest(ra.memoryUsage))
-                .then((mem: any) => {
-                    return (
-                        "Per-query memory usage:\n" + mem + "\n(note: database has been cleared)"
-                    );
-                });
+            return ctx.client.sendRequest(ra.memoryUsage).then((mem: any) => {
+                return "Per-query memory usage:\n" + mem + "\n(note: database has been cleared)";
+            });
         }
 
         get onDidChange(): vscode.Event<vscode.Uri> {
@@ -86,18 +81,18 @@ export function memoryUsage(ctx: Ctx): Cmd {
     };
 }
 
-export function shuffleCrateGraph(ctx: Ctx): Cmd {
+export function shuffleCrateGraph(ctx: CtxInit): Cmd {
     return async () => {
-        return ctx.getClient().then((it) => it.sendRequest(ra.shuffleCrateGraph));
+        return ctx.client.sendRequest(ra.shuffleCrateGraph);
     };
 }
 
-export function matchingBrace(ctx: Ctx): Cmd {
+export function matchingBrace(ctx: CtxInit): Cmd {
     return async () => {
         const editor = ctx.activeRustEditor;
         if (!editor) return;
 
-        const client = await ctx.getClient();
+        const client = ctx.client;
 
         const response = await client.sendRequest(ra.matchingBrace, {
             textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(editor.document),
@@ -114,12 +109,12 @@ export function matchingBrace(ctx: Ctx): Cmd {
     };
 }
 
-export function joinLines(ctx: Ctx): Cmd {
+export function joinLines(ctx: CtxInit): Cmd {
     return async () => {
         const editor = ctx.activeRustEditor;
         if (!editor) return;
 
-        const client = await ctx.getClient();
+        const client = ctx.client;
 
         const items: lc.TextEdit[] = await client.sendRequest(ra.joinLines, {
             ranges: editor.selections.map((it) => client.code2ProtocolConverter.asRange(it)),
@@ -134,19 +129,19 @@ export function joinLines(ctx: Ctx): Cmd {
     };
 }
 
-export function moveItemUp(ctx: Ctx): Cmd {
+export function moveItemUp(ctx: CtxInit): Cmd {
     return moveItem(ctx, ra.Direction.Up);
 }
 
-export function moveItemDown(ctx: Ctx): Cmd {
+export function moveItemDown(ctx: CtxInit): Cmd {
     return moveItem(ctx, ra.Direction.Down);
 }
 
-export function moveItem(ctx: Ctx, direction: ra.Direction): Cmd {
+export function moveItem(ctx: CtxInit, direction: ra.Direction): Cmd {
     return async () => {
         const editor = ctx.activeRustEditor;
         if (!editor) return;
-        const client = await ctx.getClient();
+        const client = ctx.client;
 
         const lcEdits = await client.sendRequest(ra.moveItem, {
             range: client.code2ProtocolConverter.asRange(editor.selection),
@@ -161,13 +156,13 @@ export function moveItem(ctx: Ctx, direction: ra.Direction): Cmd {
     };
 }
 
-export function onEnter(ctx: Ctx): Cmd {
+export function onEnter(ctx: CtxInit): Cmd {
     async function handleKeypress() {
         const editor = ctx.activeRustEditor;
 
         if (!editor) return false;
 
-        const client = await ctx.getClient();
+        const client = ctx.client;
         const lcEdits = await client
             .sendRequest(ra.onEnter, {
                 textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(
@@ -193,13 +188,13 @@ export function onEnter(ctx: Ctx): Cmd {
     };
 }
 
-export function parentModule(ctx: Ctx): Cmd {
+export function parentModule(ctx: CtxInit): Cmd {
     return async () => {
         const editor = vscode.window.activeTextEditor;
         if (!editor) return;
         if (!(isRustDocument(editor.document) || isCargoTomlDocument(editor.document))) return;
 
-        const client = await ctx.getClient();
+        const client = ctx.client;
 
         const locations = await client.sendRequest(ra.parentModule, {
             textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(editor.document),
@@ -230,12 +225,12 @@ export function parentModule(ctx: Ctx): Cmd {
     };
 }
 
-export function openCargoToml(ctx: Ctx): Cmd {
+export function openCargoToml(ctx: CtxInit): Cmd {
     return async () => {
         const editor = ctx.activeRustEditor;
         if (!editor) return;
 
-        const client = await ctx.getClient();
+        const client = ctx.client;
         const response = await client.sendRequest(ra.openCargoToml, {
             textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(editor.document),
         });
@@ -251,12 +246,12 @@ export function openCargoToml(ctx: Ctx): Cmd {
     };
 }
 
-export function ssr(ctx: Ctx): Cmd {
+export function ssr(ctx: CtxInit): Cmd {
     return async () => {
         const editor = vscode.window.activeTextEditor;
         if (!editor) return;
 
-        const client = await ctx.getClient();
+        const client = ctx.client;
 
         const position = editor.selection.active;
         const selections = editor.selections;
@@ -308,7 +303,7 @@ export function ssr(ctx: Ctx): Cmd {
     };
 }
 
-export function serverVersion(ctx: Ctx): Cmd {
+export function serverVersion(ctx: CtxInit): Cmd {
     return async () => {
         if (!ctx.serverPath) {
             void vscode.window.showWarningMessage(`rust-analyzer server is not running`);
@@ -324,7 +319,7 @@ export function serverVersion(ctx: Ctx): Cmd {
 // Opens the virtual file that will show the syntax tree
 //
 // The contents of the file come from the `TextDocumentContentProvider`
-export function syntaxTree(ctx: Ctx): Cmd {
+export function syntaxTree(ctx: CtxInit): Cmd {
     const tdcp = new (class implements vscode.TextDocumentContentProvider {
         readonly uri = vscode.Uri.parse("rust-analyzer-syntax-tree://syntaxtree/tree.rast");
         readonly eventEmitter = new vscode.EventEmitter<vscode.Uri>();
@@ -360,7 +355,7 @@ export function syntaxTree(ctx: Ctx): Cmd {
         ): Promise<string> {
             const rustEditor = ctx.activeRustEditor;
             if (!rustEditor) return "";
-            const client = await ctx.getClient();
+            const client = ctx.client;
 
             // When the range based query is enabled we take the range of the selection
             const range =
@@ -407,7 +402,7 @@ export function syntaxTree(ctx: Ctx): Cmd {
 // Opens the virtual file that will show the HIR of the function containing the cursor position
 //
 // The contents of the file come from the `TextDocumentContentProvider`
-export function viewHir(ctx: Ctx): Cmd {
+export function viewHir(ctx: CtxInit): Cmd {
     const tdcp = new (class implements vscode.TextDocumentContentProvider {
         readonly uri = vscode.Uri.parse("rust-analyzer-hir://viewHir/hir.rs");
         readonly eventEmitter = new vscode.EventEmitter<vscode.Uri>();
@@ -444,7 +439,7 @@ export function viewHir(ctx: Ctx): Cmd {
             const rustEditor = ctx.activeRustEditor;
             if (!rustEditor) return "";
 
-            const client = await ctx.getClient();
+            const client = ctx.client;
             const params = {
                 textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(
                     rustEditor.document
@@ -473,7 +468,7 @@ export function viewHir(ctx: Ctx): Cmd {
     };
 }
 
-export function viewFileText(ctx: Ctx): Cmd {
+export function viewFileText(ctx: CtxInit): Cmd {
     const tdcp = new (class implements vscode.TextDocumentContentProvider {
         readonly uri = vscode.Uri.parse("rust-analyzer-file-text://viewFileText/file.rs");
         readonly eventEmitter = new vscode.EventEmitter<vscode.Uri>();
@@ -509,7 +504,7 @@ export function viewFileText(ctx: Ctx): Cmd {
         ): Promise<string> {
             const rustEditor = ctx.activeRustEditor;
             if (!rustEditor) return "";
-            const client = await ctx.getClient();
+            const client = ctx.client;
 
             const params = client.code2ProtocolConverter.asTextDocumentIdentifier(
                 rustEditor.document
@@ -536,7 +531,7 @@ export function viewFileText(ctx: Ctx): Cmd {
     };
 }
 
-export function viewItemTree(ctx: Ctx): Cmd {
+export function viewItemTree(ctx: CtxInit): Cmd {
     const tdcp = new (class implements vscode.TextDocumentContentProvider {
         readonly uri = vscode.Uri.parse("rust-analyzer-item-tree://viewItemTree/itemtree.rs");
         readonly eventEmitter = new vscode.EventEmitter<vscode.Uri>();
@@ -572,7 +567,7 @@ export function viewItemTree(ctx: Ctx): Cmd {
         ): Promise<string> {
             const rustEditor = ctx.activeRustEditor;
             if (!rustEditor) return "";
-            const client = await ctx.getClient();
+            const client = ctx.client;
 
             const params = {
                 textDocument: client.code2ProtocolConverter.asTextDocumentIdentifier(
@@ -601,7 +596,7 @@ export function viewItemTree(ctx: Ctx): Cmd {
     };
 }
 
-function crateGraph(ctx: Ctx, full: boolean): Cmd {
+function crateGraph(ctx: CtxInit, full: boolean): Cmd {
     return async () => {
         const nodeModulesPath = vscode.Uri.file(path.join(ctx.extensionPath, "node_modules"));
 
@@ -618,7 +613,7 @@ function crateGraph(ctx: Ctx, full: boolean): Cmd {
         const params = {
             full: full,
         };
-        const client = await ctx.getClient();
+        const client = ctx.client;
         const dot = await client.sendRequest(ra.viewCrateGraph, params);
         const uri = panel.webview.asWebviewUri(nodeModulesPath);
 
@@ -664,18 +659,18 @@ function crateGraph(ctx: Ctx, full: boolean): Cmd {
     };
 }
 
-export function viewCrateGraph(ctx: Ctx): Cmd {
+export function viewCrateGraph(ctx: CtxInit): Cmd {
     return crateGraph(ctx, false);
 }
 
-export function viewFullCrateGraph(ctx: Ctx): Cmd {
+export function viewFullCrateGraph(ctx: CtxInit): Cmd {
     return crateGraph(ctx, true);
 }
 
 // Opens the virtual file that will show the syntax tree
 //
 // The contents of the file come from the `TextDocumentContentProvider`
-export function expandMacro(ctx: Ctx): Cmd {
+export function expandMacro(ctx: CtxInit): Cmd {
     function codeFormat(expanded: ra.ExpandedMacro): string {
         let result = `// Recursive expansion of ${expanded.name}! macro\n`;
         result += "// " + "=".repeat(result.length - 3);
@@ -691,7 +686,7 @@ export function expandMacro(ctx: Ctx): Cmd {
         async provideTextDocumentContent(_uri: vscode.Uri): Promise<string> {
             const editor = vscode.window.activeTextEditor;
             if (!editor) return "";
-            const client = await ctx.getClient();
+            const client = ctx.client;
 
             const position = editor.selection.active;
 
@@ -723,8 +718,8 @@ export function expandMacro(ctx: Ctx): Cmd {
     };
 }
 
-export function reloadWorkspace(ctx: Ctx): Cmd {
-    return async () => (await ctx.getClient()).sendRequest(ra.reloadWorkspace);
+export function reloadWorkspace(ctx: CtxInit): Cmd {
+    return async () => ctx.client.sendRequest(ra.reloadWorkspace);
 }
 
 async function showReferencesImpl(
@@ -743,13 +738,13 @@ async function showReferencesImpl(
     }
 }
 
-export function showReferences(ctx: Ctx): Cmd {
+export function showReferences(ctx: CtxInit): Cmd {
     return async (uri: string, position: lc.Position, locations: lc.Location[]) => {
-        await showReferencesImpl(await ctx.getClient(), uri, position, locations);
+        await showReferencesImpl(ctx.client, uri, position, locations);
     };
 }
 
-export function applyActionGroup(_ctx: Ctx): Cmd {
+export function applyActionGroup(_ctx: CtxInit): Cmd {
     return async (actions: { label: string; arguments: lc.CodeAction }[]) => {
         const selectedAction = await vscode.window.showQuickPick(actions);
         if (!selectedAction) return;
@@ -760,9 +755,9 @@ export function applyActionGroup(_ctx: Ctx): Cmd {
     };
 }
 
-export function gotoLocation(ctx: Ctx): Cmd {
+export function gotoLocation(ctx: CtxInit): Cmd {
     return async (locationLink: lc.LocationLink) => {
-        const client = await ctx.getClient();
+        const client = ctx.client;
         const uri = client.protocol2CodeConverter.asUri(locationLink.targetUri);
         let range = client.protocol2CodeConverter.asRange(locationLink.targetSelectionRange);
         // collapse the range to a cursor position
@@ -772,13 +767,13 @@ export function gotoLocation(ctx: Ctx): Cmd {
     };
 }
 
-export function openDocs(ctx: Ctx): Cmd {
+export function openDocs(ctx: CtxInit): Cmd {
     return async () => {
         const editor = vscode.window.activeTextEditor;
         if (!editor) {
             return;
         }
-        const client = await ctx.getClient();
+        const client = ctx.client;
 
         const position = editor.selection.active;
         const textDocument = { uri: editor.document.uri.toString() };
@@ -791,16 +786,16 @@ export function openDocs(ctx: Ctx): Cmd {
     };
 }
 
-export function cancelFlycheck(ctx: Ctx): Cmd {
+export function cancelFlycheck(ctx: CtxInit): Cmd {
     return async () => {
-        const client = await ctx.getClient();
+        const client = ctx.client;
         await client.sendRequest(ra.cancelFlycheck);
     };
 }
 
-export function resolveCodeAction(ctx: Ctx): Cmd {
+export function resolveCodeAction(ctx: CtxInit): Cmd {
     return async (params: lc.CodeAction) => {
-        const client = await ctx.getClient();
+        const client = ctx.client;
         params.command = undefined;
         const item = await client?.sendRequest(lc.CodeActionResolveRequest.type, params);
         if (!item?.edit) {
@@ -825,13 +820,13 @@ export function resolveCodeAction(ctx: Ctx): Cmd {
     };
 }
 
-export function applySnippetWorkspaceEditCommand(_ctx: Ctx): Cmd {
+export function applySnippetWorkspaceEditCommand(_ctx: CtxInit): Cmd {
     return async (edit: vscode.WorkspaceEdit) => {
         await applySnippetWorkspaceEdit(edit);
     };
 }
 
-export function run(ctx: Ctx): Cmd {
+export function run(ctx: CtxInit): Cmd {
     let prevRunnable: RunnableQuickPick | undefined;
 
     return async () => {
@@ -845,11 +840,11 @@ export function run(ctx: Ctx): Cmd {
     };
 }
 
-export function peekTests(ctx: Ctx): Cmd {
+export function peekTests(ctx: CtxInit): Cmd {
     return async () => {
         const editor = ctx.activeRustEditor;
         if (!editor) return;
-        const client = await ctx.getClient();
+        const client = ctx.client;
 
         await vscode.window.withProgress(
             {
@@ -878,7 +873,7 @@ export function peekTests(ctx: Ctx): Cmd {
     };
 }
 
-export function runSingle(ctx: Ctx): Cmd {
+export function runSingle(ctx: CtxInit): Cmd {
     return async (runnable: ra.Runnable) => {
         const editor = ctx.activeRustEditor;
         if (!editor) return;
@@ -895,7 +890,7 @@ export function runSingle(ctx: Ctx): Cmd {
     };
 }
 
-export function copyRunCommandLine(ctx: Ctx) {
+export function copyRunCommandLine(ctx: CtxInit) {
     let prevRunnable: RunnableQuickPick | undefined;
     return async () => {
         const item = await selectRunnable(ctx, prevRunnable);
@@ -907,7 +902,7 @@ export function copyRunCommandLine(ctx: Ctx) {
     };
 }
 
-export function debug(ctx: Ctx): Cmd {
+export function debug(ctx: CtxInit): Cmd {
     let prevDebuggee: RunnableQuickPick | undefined;
 
     return async () => {
@@ -920,13 +915,13 @@ export function debug(ctx: Ctx): Cmd {
     };
 }
 
-export function debugSingle(ctx: Ctx): Cmd {
+export function debugSingle(ctx: CtxInit): Cmd {
     return async (config: ra.Runnable) => {
         await startDebugSession(ctx, config);
     };
 }
 
-export function newDebugConfig(ctx: Ctx): Cmd {
+export function newDebugConfig(ctx: CtxInit): Cmd {
     return async () => {
         const item = await selectRunnable(ctx, undefined, true, false);
         if (!item) return;
diff --git a/src/tools/rust-analyzer/editors/code/src/ctx.ts b/src/tools/rust-analyzer/editors/code/src/ctx.ts
index 044a9470aa9..3e366525ee2 100644
--- a/src/tools/rust-analyzer/editors/code/src/ctx.ts
+++ b/src/tools/rust-analyzer/editors/code/src/ctx.ts
@@ -4,12 +4,17 @@ import * as ra from "./lsp_ext";
 
 import { Config, substituteVariablesInEnv, substituteVSCodeVariables } from "./config";
 import { createClient } from "./client";
-import { isRustEditor, log, RustEditor } from "./util";
+import { isRustDocument, isRustEditor, log, RustEditor } from "./util";
 import { ServerStatusParams } from "./lsp_ext";
 import { PersistentState } from "./persistent_state";
 import { bootstrap } from "./bootstrap";
 
+// We only support local folders, not eg. Live Share (`vlsl:` scheme), so don't activate if
+// only those are in use. We use "Empty" to represent these scenarios
+// (r-a still somewhat works with Live Share, because commands are tunneled to the host)
+
 export type Workspace =
+    | { kind: "Empty" }
     | {
           kind: "Workspace Folder";
       }
@@ -18,16 +23,39 @@ export type Workspace =
           files: vscode.TextDocument[];
       };
 
+export function fetchWorkspace(): Workspace {
+    const folders = (vscode.workspace.workspaceFolders || []).filter(
+        (folder) => folder.uri.scheme === "file"
+    );
+    const rustDocuments = vscode.workspace.textDocuments.filter((document) =>
+        isRustDocument(document)
+    );
+
+    return folders.length === 0
+        ? rustDocuments.length === 0
+            ? { kind: "Empty" }
+            : {
+                  kind: "Detached Files",
+                  files: rustDocuments,
+              }
+        : { kind: "Workspace Folder" };
+}
+
 export type CommandFactory = {
-    enabled: (ctx: Ctx) => Cmd;
+    enabled: (ctx: CtxInit) => Cmd;
     disabled?: (ctx: Ctx) => Cmd;
 };
 
+export type CtxInit = Ctx & {
+    readonly client: lc.LanguageClient;
+};
+
 export class Ctx {
     readonly statusBar: vscode.StatusBarItem;
     readonly config: Config;
+    readonly workspace: Workspace;
 
-    private client: lc.LanguageClient | undefined;
+    private _client: lc.LanguageClient | undefined;
     private _serverPath: string | undefined;
     private traceOutputChannel: vscode.OutputChannel | undefined;
     private outputChannel: vscode.OutputChannel | undefined;
@@ -36,18 +64,17 @@ export class Ctx {
     private commandFactories: Record<string, CommandFactory>;
     private commandDisposables: Disposable[];
 
-    workspace: Workspace;
+    get client() {
+        return this._client;
+    }
 
     constructor(
         readonly extCtx: vscode.ExtensionContext,
-        workspace: Workspace,
-        commandFactories: Record<string, CommandFactory>
+        commandFactories: Record<string, CommandFactory>,
+        workspace: Workspace
     ) {
         extCtx.subscriptions.push(this);
         this.statusBar = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Left);
-        this.statusBar.text = "rust-analyzer";
-        this.statusBar.tooltip = "ready";
-        this.statusBar.command = "rust-analyzer.analyzerStatus";
         this.statusBar.show();
         this.workspace = workspace;
         this.clientSubscriptions = [];
@@ -57,7 +84,10 @@ export class Ctx {
         this.state = new PersistentState(extCtx.globalState);
         this.config = new Config(extCtx);
 
-        this.updateCommands();
+        this.updateCommands("disable");
+        this.setServerStatus({
+            health: "stopped",
+        });
     }
 
     dispose() {
@@ -67,16 +97,36 @@ export class Ctx {
         this.commandDisposables.forEach((disposable) => disposable.dispose());
     }
 
-    clientFetcher() {
-        const self = this;
-        return {
-            get client(): lc.LanguageClient | undefined {
-                return self.client;
-            },
-        };
+    async onWorkspaceFolderChanges() {
+        const workspace = fetchWorkspace();
+        if (workspace.kind === "Detached Files" && this.workspace.kind === "Detached Files") {
+            if (workspace.files !== this.workspace.files) {
+                if (this.client?.isRunning()) {
+                    // Ideally we wouldn't need to tear down the server here, but currently detached files
+                    // are only specified at server start
+                    await this.stopAndDispose();
+                    await this.start();
+                }
+                return;
+            }
+        }
+        if (workspace.kind === "Workspace Folder" && this.workspace.kind === "Workspace Folder") {
+            return;
+        }
+        if (workspace.kind === "Empty") {
+            await this.stopAndDispose();
+            return;
+        }
+        if (this.client?.isRunning()) {
+            await this.restart();
+        }
     }
 
-    async getClient() {
+    private async getOrCreateClient() {
+        if (this.workspace.kind === "Empty") {
+            return;
+        }
+
         if (!this.traceOutputChannel) {
             this.traceOutputChannel = vscode.window.createOutputChannel(
                 "Rust Analyzer Language Server Trace"
@@ -88,7 +138,7 @@ export class Ctx {
             this.pushExtCleanup(this.outputChannel);
         }
 
-        if (!this.client) {
+        if (!this._client) {
             this._serverPath = await bootstrap(this.extCtx, this.config, this.state).catch(
                 (err) => {
                     let message = "bootstrap error. ";
@@ -125,47 +175,61 @@ export class Ctx {
 
             const initializationOptions = substituteVSCodeVariables(rawInitializationOptions);
 
-            this.client = await createClient(
+            this._client = await createClient(
                 this.traceOutputChannel,
                 this.outputChannel,
                 initializationOptions,
                 serverOptions
             );
             this.pushClientCleanup(
-                this.client.onNotification(ra.serverStatus, (params) =>
+                this._client.onNotification(ra.serverStatus, (params) =>
                     this.setServerStatus(params)
                 )
             );
         }
-        return this.client;
+        return this._client;
     }
 
-    async activate() {
-        log.info("Activating language client");
-        const client = await this.getClient();
+    async start() {
+        log.info("Starting language client");
+        const client = await this.getOrCreateClient();
+        if (!client) {
+            return;
+        }
         await client.start();
         this.updateCommands();
-        return client;
     }
 
-    async deactivate() {
-        log.info("Deactivating language client");
-        await this.client?.stop();
-        this.updateCommands();
+    async restart() {
+        // FIXME: We should re-use the client, that is ctx.deactivate() if none of the configs have changed
+        await this.stopAndDispose();
+        await this.start();
     }
 
     async stop() {
+        if (!this._client) {
+            return;
+        }
         log.info("Stopping language client");
+        this.updateCommands("disable");
+        await this._client.stop();
+    }
+
+    async stopAndDispose() {
+        if (!this._client) {
+            return;
+        }
+        log.info("Disposing language client");
+        this.updateCommands("disable");
         await this.disposeClient();
-        this.updateCommands();
     }
 
     private async disposeClient() {
         this.clientSubscriptions?.forEach((disposable) => disposable.dispose());
         this.clientSubscriptions = [];
-        await this.client?.dispose();
+        await this._client?.dispose();
         this._serverPath = undefined;
-        this.client = undefined;
+        this._client = undefined;
     }
 
     get activeRustEditor(): RustEditor | undefined {
@@ -185,32 +249,41 @@ export class Ctx {
         return this._serverPath;
     }
 
-    private updateCommands() {
+    private updateCommands(forceDisable?: "disable") {
         this.commandDisposables.forEach((disposable) => disposable.dispose());
         this.commandDisposables = [];
-        const fetchFactory = (factory: CommandFactory, fullName: string) => {
-            return this.client && this.client.isRunning()
-                ? factory.enabled
-                : factory.disabled ||
-                      ((_) => () =>
-                          vscode.window.showErrorMessage(
-                              `command ${fullName} failed: rust-analyzer server is not running`
-                          ));
+
+        const clientRunning = (!forceDisable && this._client?.isRunning()) ?? false;
+        const isClientRunning = function (_ctx: Ctx): _ctx is CtxInit {
+            return clientRunning;
         };
+
         for (const [name, factory] of Object.entries(this.commandFactories)) {
             const fullName = `rust-analyzer.${name}`;
-            const callback = fetchFactory(factory, fullName)(this);
+            let callback;
+            if (isClientRunning(this)) {
+                // we asserted that `client` is defined
+                callback = factory.enabled(this);
+            } else if (factory.disabled) {
+                callback = factory.disabled(this);
+            } else {
+                callback = () =>
+                    vscode.window.showErrorMessage(
+                        `command ${fullName} failed: rust-analyzer server is not running`
+                    );
+            }
+
             this.commandDisposables.push(vscode.commands.registerCommand(fullName, callback));
         }
     }
 
-    setServerStatus(status: ServerStatusParams) {
+    setServerStatus(status: ServerStatusParams | { health: "stopped" }) {
         let icon = "";
         const statusBar = this.statusBar;
         switch (status.health) {
             case "ok":
-                statusBar.tooltip = status.message ?? "Ready";
-                statusBar.command = undefined;
+                statusBar.tooltip = (status.message ?? "Ready") + "\nClick to stop server.";
+                statusBar.command = "rust-analyzer.stopServer";
                 statusBar.color = undefined;
                 statusBar.backgroundColor = undefined;
                 break;
@@ -234,6 +307,13 @@ export class Ctx {
                 statusBar.backgroundColor = new vscode.ThemeColor("statusBarItem.errorBackground");
                 icon = "$(error) ";
                 break;
+            case "stopped":
+                statusBar.tooltip = "Server is stopped.\nClick to start.";
+                statusBar.command = "rust-analyzer.startServer";
+                statusBar.color = undefined;
+                statusBar.backgroundColor = undefined;
+                statusBar.text = `$(stop-circle) rust-analyzer`;
+                return;
         }
         if (!status.quiescent) icon = "$(sync~spin) ";
         statusBar.text = `${icon}rust-analyzer`;
diff --git a/src/tools/rust-analyzer/editors/code/src/main.ts b/src/tools/rust-analyzer/editors/code/src/main.ts
index 8c3a676ffb0..e76b657c1bf 100644
--- a/src/tools/rust-analyzer/editors/code/src/main.ts
+++ b/src/tools/rust-analyzer/editors/code/src/main.ts
@@ -2,15 +2,13 @@ import * as vscode from "vscode";
 import * as lc from "vscode-languageclient/node";
 
 import * as commands from "./commands";
-import { CommandFactory, Ctx, Workspace } from "./ctx";
-import { isRustDocument } from "./util";
+import { CommandFactory, Ctx, fetchWorkspace } from "./ctx";
 import { activateTaskProvider } from "./tasks";
 import { setContextValue } from "./util";
 
 const RUST_PROJECT_CONTEXT_NAME = "inRustProject";
 
 export interface RustAnalyzerExtensionApi {
-    // FIXME: this should be non-optional
     readonly client?: lc.LanguageClient;
 }
 
@@ -32,32 +30,7 @@ export async function activate(
             .then(() => {}, console.error);
     }
 
-    // We only support local folders, not eg. Live Share (`vlsl:` scheme), so don't activate if
-    // only those are in use.
-    // (r-a still somewhat works with Live Share, because commands are tunneled to the host)
-    const folders = (vscode.workspace.workspaceFolders || []).filter(
-        (folder) => folder.uri.scheme === "file"
-    );
-    const rustDocuments = vscode.workspace.textDocuments.filter((document) =>
-        isRustDocument(document)
-    );
-
-    if (folders.length === 0 && rustDocuments.length === 0) {
-        // FIXME: Ideally we would choose not to activate at all (and avoid registering
-        // non-functional editor commands), but VS Code doesn't seem to have a good way of doing
-        // that
-        return {};
-    }
-
-    const workspace: Workspace =
-        folders.length === 0
-            ? {
-                  kind: "Detached Files",
-                  files: rustDocuments,
-              }
-            : { kind: "Workspace Folder" };
-
-    const ctx = new Ctx(context, workspace, createCommands());
+    const ctx = new Ctx(context, createCommands(), fetchWorkspace());
     // VS Code doesn't show a notification when an extension fails to activate
     // so we do it ourselves.
     const api = await activateServer(ctx).catch((err) => {
@@ -75,18 +48,23 @@ async function activateServer(ctx: Ctx): Promise<RustAnalyzerExtensionApi> {
         ctx.pushExtCleanup(activateTaskProvider(ctx.config));
     }
 
+    vscode.workspace.onDidChangeWorkspaceFolders(
+        async (_) => ctx.onWorkspaceFolderChanges(),
+        null,
+        ctx.subscriptions
+    );
     vscode.workspace.onDidChangeConfiguration(
         async (_) => {
-            await ctx
-                .clientFetcher()
-                .client?.sendNotification("workspace/didChangeConfiguration", { settings: "" });
+            await ctx.client?.sendNotification("workspace/didChangeConfiguration", {
+                settings: "",
+            });
         },
         null,
         ctx.subscriptions
     );
 
-    await ctx.activate();
-    return ctx.clientFetcher();
+    await ctx.start();
+    return ctx;
 }
 
 function createCommands(): Record<string, CommandFactory> {
@@ -98,33 +76,30 @@ function createCommands(): Record<string, CommandFactory> {
         reload: {
             enabled: (ctx) => async () => {
                 void vscode.window.showInformationMessage("Reloading rust-analyzer...");
-                // FIXME: We should re-use the client, that is ctx.deactivate() if none of the configs have changed
-                await ctx.stop();
-                await ctx.activate();
+                await ctx.restart();
             },
             disabled: (ctx) => async () => {
                 void vscode.window.showInformationMessage("Reloading rust-analyzer...");
-                await ctx.activate();
+                await ctx.start();
             },
         },
         startServer: {
             enabled: (ctx) => async () => {
-                await ctx.activate();
+                await ctx.start();
             },
             disabled: (ctx) => async () => {
-                await ctx.activate();
+                await ctx.start();
             },
         },
         stopServer: {
             enabled: (ctx) => async () => {
                 // FIXME: We should re-use the client, that is ctx.deactivate() if none of the configs have changed
-                await ctx.stop();
+                await ctx.stopAndDispose();
                 ctx.setServerStatus({
-                    health: "ok",
-                    quiescent: true,
-                    message: "server is not running",
+                    health: "stopped",
                 });
             },
+            disabled: (_) => async () => {},
         },
 
         analyzerStatus: { enabled: commands.analyzerStatus },
diff --git a/src/tools/rust-analyzer/editors/code/src/run.ts b/src/tools/rust-analyzer/editors/code/src/run.ts
index dadaa41b1d1..35627e2fc6b 100644
--- a/src/tools/rust-analyzer/editors/code/src/run.ts
+++ b/src/tools/rust-analyzer/editors/code/src/run.ts
@@ -3,7 +3,7 @@ import * as lc from "vscode-languageclient";
 import * as ra from "./lsp_ext";
 import * as tasks from "./tasks";
 
-import { Ctx } from "./ctx";
+import { CtxInit } from "./ctx";
 import { makeDebugConfig } from "./debug";
 import { Config, RunnableEnvCfg } from "./config";
 
@@ -12,7 +12,7 @@ const quickPickButtons = [
 ];
 
 export async function selectRunnable(
-    ctx: Ctx,
+    ctx: CtxInit,
     prevRunnable?: RunnableQuickPick,
     debuggeeOnly = false,
     showButtons: boolean = true
@@ -20,7 +20,7 @@ export async function selectRunnable(
     const editor = ctx.activeRustEditor;
     if (!editor) return;
 
-    const client = await ctx.getClient();
+    const client = ctx.client;
     const textDocument: lc.TextDocumentIdentifier = {
         uri: editor.document.uri.toString(),
     };
diff --git a/src/tools/rust-analyzer/lib/lsp-server/Cargo.toml b/src/tools/rust-analyzer/lib/lsp-server/Cargo.toml
index 5922bbfdb48..9bba9e87ecb 100644
--- a/src/tools/rust-analyzer/lib/lsp-server/Cargo.toml
+++ b/src/tools/rust-analyzer/lib/lsp-server/Cargo.toml
@@ -13,4 +13,4 @@ serde = { version = "1.0.144", features = ["derive"] }
 crossbeam-channel = "0.5.6"
 
 [dev-dependencies]
-lsp-types = "0.93.1"
+lsp-types = "=0.93.2"
diff --git a/src/tools/rustfmt/src/parse/session.rs b/src/tools/rustfmt/src/parse/session.rs
index 6efeee98fea..6bfec79cd70 100644
--- a/src/tools/rustfmt/src/parse/session.rs
+++ b/src/tools/rustfmt/src/parse/session.rs
@@ -134,6 +134,7 @@ fn default_handler(
             false,
             None,
             false,
+            false,
         ))
     };
     Handler::with_emitter(
diff --git a/src/tools/tidy/Cargo.toml b/src/tools/tidy/Cargo.toml
index 471d78a2922..97d038da702 100644
--- a/src/tools/tidy/Cargo.toml
+++ b/src/tools/tidy/Cargo.toml
@@ -7,8 +7,10 @@ autobins = false
 [dependencies]
 cargo_metadata = "0.14"
 regex = "1"
+miropt-test-tools = { path = "../miropt-test-tools" }
 lazy_static = "1"
 walkdir = "2"
+ignore = "0.4.18"
 
 [[bin]]
 name = "rust-tidy"
diff --git a/src/tools/tidy/src/deps.rs b/src/tools/tidy/src/deps.rs
index 8a0239eceff..35fa968f977 100644
--- a/src/tools/tidy/src/deps.rs
+++ b/src/tools/tidy/src/deps.rs
@@ -23,6 +23,7 @@ const LICENSES: &[&str] = &[
     "MIT OR Apache-2.0 OR Zlib",                // tinyvec_macros
     "MIT OR Zlib OR Apache-2.0",                // miniz_oxide
     "(MIT OR Apache-2.0) AND Unicode-DFS-2016", // unicode_ident
+    "Unicode-DFS-2016",                         // tinystr and icu4x
 ];
 
 /// These are exceptions to Rust's permissive licensing policy, and
@@ -109,6 +110,7 @@ const PERMITTED_RUSTC_DEPENDENCIES: &[&str] = &[
     "datafrog",
     "difference",
     "digest",
+    "displaydoc",
     "dlmalloc",
     "either",
     "ena",
diff --git a/src/tools/tidy/src/lib.rs b/src/tools/tidy/src/lib.rs
index fc0bce58572..698e4850bea 100644
--- a/src/tools/tidy/src/lib.rs
+++ b/src/tools/tidy/src/lib.rs
@@ -47,6 +47,7 @@ pub mod error_codes_check;
 pub mod errors;
 pub mod extdeps;
 pub mod features;
+pub mod mir_opt_tests;
 pub mod pal;
 pub mod primitive_docs;
 pub mod style;
diff --git a/src/tools/tidy/src/main.rs b/src/tools/tidy/src/main.rs
index ca785042aaa..b0b11cafca5 100644
--- a/src/tools/tidy/src/main.rs
+++ b/src/tools/tidy/src/main.rs
@@ -31,6 +31,7 @@ fn main() {
     let args: Vec<String> = env::args().skip(1).collect();
 
     let verbose = args.iter().any(|s| *s == "--verbose");
+    let bless = args.iter().any(|s| *s == "--bless");
 
     let bad = std::sync::Arc::new(AtomicBool::new(false));
 
@@ -64,6 +65,7 @@ fn main() {
         // Checks over tests.
         check!(debug_artifacts, &src_path);
         check!(ui_tests, &src_path);
+        check!(mir_opt_tests, &src_path, bless);
 
         // Checks that only make sense for the compiler.
         check!(errors, &compiler_path);
diff --git a/src/tools/tidy/src/mir_opt_tests.rs b/src/tools/tidy/src/mir_opt_tests.rs
new file mode 100644
index 00000000000..018573284ea
--- /dev/null
+++ b/src/tools/tidy/src/mir_opt_tests.rs
@@ -0,0 +1,74 @@
+//! Tidy check to ensure that mir opt directories do not have stale files or dashes in file names
+
+use std::collections::HashSet;
+use std::path::{Path, PathBuf};
+
+fn check_unused_files(path: &Path, bless: bool, bad: &mut bool) {
+    let mut rs_files = Vec::<PathBuf>::new();
+    let mut output_files = HashSet::<PathBuf>::new();
+    let files = walkdir::WalkDir::new(&path.join("test/mir-opt")).into_iter();
+
+    for file in files.filter_map(Result::ok).filter(|e| e.file_type().is_file()) {
+        let filepath = file.path();
+        if filepath.extension() == Some("rs".as_ref()) {
+            rs_files.push(filepath.to_owned());
+        } else {
+            output_files.insert(filepath.to_owned());
+        }
+    }
+
+    for file in rs_files {
+        for bw in [32, 64] {
+            for output_file in miropt_test_tools::files_for_miropt_test(&file, bw) {
+                output_files.remove(&output_file.expected_file);
+            }
+        }
+    }
+
+    for extra in output_files {
+        if extra.file_name() != Some("README.md".as_ref()) {
+            if !bless {
+                tidy_error!(
+                    bad,
+                    "the following output file is not associated with any mir-opt test, you can remove it: {}",
+                    extra.display()
+                );
+            } else {
+                let _ = std::fs::remove_file(extra);
+            }
+        }
+    }
+}
+
+fn check_dash_files(path: &Path, bless: bool, bad: &mut bool) {
+    for file in walkdir::WalkDir::new(&path.join("test/mir-opt"))
+        .into_iter()
+        .filter_map(Result::ok)
+        .filter(|e| e.file_type().is_file())
+    {
+        let path = file.path();
+        if path.extension() == Some("rs".as_ref()) {
+            if let Some(name) = path.file_name().and_then(|s| s.to_str()) {
+                if name.contains('-') {
+                    if !bless {
+                        tidy_error!(
+                            bad,
+                            "mir-opt test files should not have dashes in them: {}",
+                            path.display()
+                        );
+                    } else {
+                        let new_name = name.replace('-', "_");
+                        let mut new_path = path.to_owned();
+                        new_path.set_file_name(new_name);
+                        let _ = std::fs::rename(path, new_path);
+                    }
+                }
+            }
+        }
+    }
+}
+
+pub fn check(path: &Path, bless: bool, bad: &mut bool) {
+    check_unused_files(path, bless, bad);
+    check_dash_files(path, bless, bad);
+}
diff --git a/src/tools/tidy/src/ui_tests.rs b/src/tools/tidy/src/ui_tests.rs
index c600f99c2c4..aee36f061c5 100644
--- a/src/tools/tidy/src/ui_tests.rs
+++ b/src/tools/tidy/src/ui_tests.rs
@@ -2,43 +2,50 @@
 //! - the number of entries in each directory must be less than `ENTRY_LIMIT`
 //! - there are no stray `.stderr` files
 
+use ignore::Walk;
+use ignore::WalkBuilder;
 use std::fs;
 use std::path::Path;
 
 const ENTRY_LIMIT: usize = 1000;
 // FIXME: The following limits should be reduced eventually.
-const ROOT_ENTRY_LIMIT: usize = 948;
+const ROOT_ENTRY_LIMIT: usize = 941;
 const ISSUES_ENTRY_LIMIT: usize = 2117;
 
 fn check_entries(path: &Path, bad: &mut bool) {
-    let dirs = walkdir::WalkDir::new(&path.join("test/ui"))
-        .into_iter()
-        .filter_entry(|e| e.file_type().is_dir());
-    for dir in dirs {
-        if let Ok(dir) = dir {
-            let dir_path = dir.path();
+    for dir in Walk::new(&path.join("test/ui")) {
+        if let Ok(entry) = dir {
+            if entry.file_type().map(|ft| ft.is_dir()).unwrap_or(false) {
+                let dir_path = entry.path();
+                // Use special values for these dirs.
+                let is_root = path.join("test/ui") == dir_path;
+                let is_issues_dir = path.join("test/ui/issues") == dir_path;
+                let limit = if is_root {
+                    ROOT_ENTRY_LIMIT
+                } else if is_issues_dir {
+                    ISSUES_ENTRY_LIMIT
+                } else {
+                    ENTRY_LIMIT
+                };
 
-            // Use special values for these dirs.
-            let is_root = path.join("test/ui") == dir_path;
-            let is_issues_dir = path.join("test/ui/issues") == dir_path;
-            let limit = if is_root {
-                ROOT_ENTRY_LIMIT
-            } else if is_issues_dir {
-                ISSUES_ENTRY_LIMIT
-            } else {
-                ENTRY_LIMIT
-            };
+                let count = WalkBuilder::new(&dir_path)
+                    .max_depth(Some(1))
+                    .build()
+                    .into_iter()
+                    .collect::<Vec<_>>()
+                    .len()
+                    - 1; // remove the dir itself
 
-            let count = std::fs::read_dir(dir_path).unwrap().count();
-            if count > limit {
-                tidy_error!(
-                    bad,
-                    "following path contains more than {} entries, \
-                    you should move the test to some relevant subdirectory (current: {}): {}",
-                    limit,
-                    count,
-                    dir_path.display()
-                );
+                if count > limit {
+                    tidy_error!(
+                        bad,
+                        "following path contains more than {} entries, \
+                            you should move the test to some relevant subdirectory (current: {}): {}",
+                        limit,
+                        count,
+                        dir_path.display()
+                    );
+                }
             }
         }
     }