about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock3
-rw-r--r--compiler/rustc_ast_passes/src/feature_gate.rs1
-rw-r--r--compiler/rustc_codegen_ssa/src/back/metadata.rs66
-rw-r--r--compiler/rustc_driver_impl/Cargo.toml2
-rw-r--r--compiler/rustc_driver_impl/src/pretty.rs2
-rw-r--r--compiler/rustc_feature/src/unstable.rs2
-rw-r--r--compiler/rustc_hir_typeck/src/expr_use_visitor.rs49
-rw-r--r--compiler/rustc_lexer/src/cursor.rs14
-rw-r--r--compiler/rustc_lexer/src/lib.rs155
-rw-r--r--compiler/rustc_lexer/src/tests.rs2
-rw-r--r--compiler/rustc_metadata/src/rmeta/encoder.rs2
-rw-r--r--compiler/rustc_parse/messages.ftl13
-rw-r--r--compiler/rustc_parse/src/errors.rs55
-rw-r--r--compiler/rustc_parse/src/lexer/mod.rs106
-rw-r--r--compiler/rustc_session/src/config.rs8
-rw-r--r--compiler/rustc_span/src/lib.rs34
-rw-r--r--compiler/rustc_span/src/source_map.rs80
-rw-r--r--compiler/rustc_span/src/source_map/tests.rs73
-rw-r--r--compiler/rustc_span/src/symbol.rs1
-rw-r--r--compiler/rustc_target/src/spec/mod.rs14
-rw-r--r--compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs1
-rw-r--r--compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs1
-rw-r--r--compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs1
-rw-r--r--compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs1
-rw-r--r--compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs7
-rw-r--r--compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs1
-rw-r--r--compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs1
-rw-r--r--compiler/stable_mir/Cargo.toml6
-rw-r--r--compiler/stable_mir/src/lib.rs4
-rw-r--r--library/alloc/src/collections/btree/map.rs11
-rw-r--r--library/alloc/src/collections/btree/set.rs13
-rw-r--r--library/alloc/src/collections/linked_list.rs9
-rw-r--r--library/alloc/src/vec/extract_if.rs15
-rw-r--r--library/alloc/src/vec/into_iter.rs5
-rw-r--r--library/core/src/iter/traits/iterator.rs1
-rw-r--r--library/core/src/str/lossy.rs2
-rw-r--r--library/std/src/collections/hash/map.rs20
-rw-r--r--library/std/src/collections/hash/set.rs19
-rw-r--r--library/std/src/process.rs48
-rw-r--r--library/std/src/sys/args/common.rs4
-rw-r--r--library/std/src/sys/process/env.rs (renamed from library/std/src/sys_common/process.rs)48
-rw-r--r--library/std/src/sys/process/mod.rs59
-rw-r--r--library/std/src/sys/process/uefi.rs116
-rw-r--r--library/std/src/sys/process/unix/common.rs2
-rw-r--r--library/std/src/sys/process/unix/fuchsia.rs5
-rw-r--r--library/std/src/sys/process/unix/unix.rs5
-rw-r--r--library/std/src/sys/process/unix/unsupported.rs8
-rw-r--r--library/std/src/sys/process/unix/vxworks.rs5
-rw-r--r--library/std/src/sys/process/unsupported.rs8
-rw-r--r--library/std/src/sys/process/windows.rs7
-rw-r--r--library/std/src/sys_common/mod.rs1
-rw-r--r--src/bootstrap/src/core/build_steps/check.rs67
-rw-r--r--src/bootstrap/src/core/build_steps/run.rs28
-rw-r--r--src/bootstrap/src/core/build_steps/test.rs1
-rw-r--r--src/bootstrap/src/core/builder/mod.rs2
-rw-r--r--src/doc/unstable-book/src/language-features/arbitrary-self-types.md2
-rw-r--r--src/doc/unstable-book/src/language-features/f128.md2
-rw-r--r--src/doc/unstable-book/src/language-features/f16.md2
-rw-r--r--src/doc/unstable-book/src/language-features/frontmatter.md25
-rw-r--r--src/librustdoc/html/highlight.rs6
-rw-r--r--src/tools/clippy/tests/ui/double_ended_iterator_last.fixed15
-rw-r--r--src/tools/clippy/tests/ui/double_ended_iterator_last.rs15
-rw-r--r--src/tools/clippy/tests/ui/double_ended_iterator_last.stderr4
-rw-r--r--src/tools/clippy/tests/ui/double_ended_iterator_last_unfixable.rs15
-rw-r--r--src/tools/clippy/tests/ui/double_ended_iterator_last_unfixable.stderr4
-rw-r--r--src/tools/coverage-dump/Cargo.toml1
-rw-r--r--src/tools/coverage-dump/src/covfun.rs86
-rw-r--r--src/tools/coverage-dump/src/covfun/tests.rs53
-rw-r--r--src/tools/coverage-dump/src/covmap.rs75
-rw-r--r--src/tools/coverage-dump/src/llvm_utils.rs85
-rw-r--r--src/tools/coverage-dump/src/llvm_utils/tests.rs (renamed from src/tools/coverage-dump/src/parser/tests.rs)4
-rw-r--r--src/tools/coverage-dump/src/main.rs5
-rw-r--r--src/tools/coverage-dump/src/parser.rs34
-rw-r--r--src/tools/coverage-dump/src/prf_names.rs40
-rw-r--r--src/tools/rust-analyzer/crates/parser/src/lexed_str.rs9
-rw-r--r--src/tools/rust-analyzer/crates/parser/src/syntax_kind/generated.rs4
-rw-r--r--src/tools/rust-analyzer/crates/syntax/rust.ungram1
-rw-r--r--src/tools/rust-analyzer/crates/syntax/src/ast/generated/nodes.rs4
-rw-r--r--src/tools/rust-analyzer/xtask/src/codegen/grammar.rs1
-rw-r--r--src/tools/rustbook/Cargo.lock4
-rw-r--r--src/tools/rustbook/Cargo.toml2
-rw-r--r--tests/coverage/abort.cov-map4
-rw-r--r--tests/coverage/assert-ne.cov-map2
-rw-r--r--tests/coverage/assert.cov-map4
-rw-r--r--tests/coverage/assert_not.cov-map2
-rw-r--r--tests/coverage/async.cov-map50
-rw-r--r--tests/coverage/async2.cov-map12
-rw-r--r--tests/coverage/async_block.cov-map4
-rw-r--r--tests/coverage/async_closure.cov-map12
-rw-r--r--tests/coverage/attr/impl.cov-map6
-rw-r--r--tests/coverage/attr/module.cov-map6
-rw-r--r--tests/coverage/attr/nested.cov-map4
-rw-r--r--tests/coverage/attr/off-on-sandwich.cov-map6
-rw-r--r--tests/coverage/attr/trait-impl-inherit.cov-map2
-rw-r--r--tests/coverage/await_ready.cov-map4
-rw-r--r--tests/coverage/bad_counter_ids.cov-map16
-rw-r--r--tests/coverage/bench.cov-map2
-rw-r--r--tests/coverage/branch/generics.cov-map6
-rw-r--r--tests/coverage/branch/guard.cov-map2
-rw-r--r--tests/coverage/branch/if-let.cov-map4
-rw-r--r--tests/coverage/branch/if.cov-map8
-rw-r--r--tests/coverage/branch/lazy-boolean.cov-map8
-rw-r--r--tests/coverage/branch/let-else.cov-map2
-rw-r--r--tests/coverage/branch/match-arms.cov-map6
-rw-r--r--tests/coverage/branch/match-trivial.cov-map4
-rw-r--r--tests/coverage/branch/no-mir-spans.cov-map8
-rw-r--r--tests/coverage/branch/while.cov-map8
-rw-r--r--tests/coverage/closure.cov-map42
-rw-r--r--tests/coverage/closure_bug.cov-map10
-rw-r--r--tests/coverage/closure_macro.cov-map6
-rw-r--r--tests/coverage/closure_macro_async.cov-map8
-rw-r--r--tests/coverage/closure_unit_return.cov-map8
-rw-r--r--tests/coverage/condition/conditions.cov-map14
-rw-r--r--tests/coverage/conditions.cov-map2
-rw-r--r--tests/coverage/continue.cov-map2
-rw-r--r--tests/coverage/coroutine.cov-map6
-rw-r--r--tests/coverage/coverage_attr_closure.cov-map8
-rw-r--r--tests/coverage/dead_code.cov-map6
-rw-r--r--tests/coverage/drop_trait.cov-map4
-rw-r--r--tests/coverage/fn_sig_into_try.cov-map8
-rw-r--r--tests/coverage/generic-unused-impl.cov-map4
-rw-r--r--tests/coverage/generics.cov-map10
-rw-r--r--tests/coverage/holes.cov-map10
-rw-r--r--tests/coverage/if.cov-map2
-rw-r--r--tests/coverage/if_else.cov-map2
-rw-r--r--tests/coverage/if_not.cov-map2
-rw-r--r--tests/coverage/ignore_run.cov-map2
-rw-r--r--tests/coverage/inline-dead.cov-map8
-rw-r--r--tests/coverage/inline.cov-map14
-rw-r--r--tests/coverage/inner_items.cov-map8
-rw-r--r--tests/coverage/issue-83601.cov-map2
-rw-r--r--tests/coverage/issue-84561.cov-map12
-rw-r--r--tests/coverage/issue-85461.cov-map2
-rw-r--r--tests/coverage/issue-93054.cov-map6
-rw-r--r--tests/coverage/lazy_boolean.cov-map2
-rw-r--r--tests/coverage/let_else_loop.cov-map6
-rw-r--r--tests/coverage/long_and_wide.cov-map8
-rw-r--r--tests/coverage/loop-break.cov-map2
-rw-r--r--tests/coverage/loop_break_value.cov-map2
-rw-r--r--tests/coverage/loops_branches.cov-map6
-rw-r--r--tests/coverage/macro_in_closure.cov-map4
-rw-r--r--tests/coverage/macro_name_span.cov-map4
-rw-r--r--tests/coverage/match_or_pattern.cov-map2
-rw-r--r--tests/coverage/mcdc/condition-limit.cov-map2
-rw-r--r--tests/coverage/mcdc/if.cov-map14
-rw-r--r--tests/coverage/mcdc/inlined_expressions.cov-map2
-rw-r--r--tests/coverage/mcdc/nested_if.cov-map8
-rw-r--r--tests/coverage/mcdc/non_control_flow.cov-map14
-rw-r--r--tests/coverage/nested_loops.cov-map2
-rw-r--r--tests/coverage/no-core.cov-map2
-rw-r--r--tests/coverage/no_cov_crate.cov-map14
-rw-r--r--tests/coverage/no_spans.cov-map4
-rw-r--r--tests/coverage/no_spans_if_not.cov-map4
-rw-r--r--tests/coverage/overflow.cov-map4
-rw-r--r--tests/coverage/panic_unwind.cov-map4
-rw-r--r--tests/coverage/partial_eq.cov-map4
-rw-r--r--tests/coverage/simple_loop.cov-map2
-rw-r--r--tests/coverage/simple_match.cov-map2
-rw-r--r--tests/coverage/sort_groups.cov-map12
-rw-r--r--tests/coverage/test_harness.cov-map4
-rw-r--r--tests/coverage/tight_inf_loop.cov-map2
-rw-r--r--tests/coverage/trivial.cov-map2
-rw-r--r--tests/coverage/try_error_result.cov-map12
-rw-r--r--tests/coverage/unicode.cov-map6
-rw-r--r--tests/coverage/unreachable.cov-map6
-rw-r--r--tests/coverage/unused.cov-map14
-rw-r--r--tests/coverage/unused_mod.cov-map4
-rw-r--r--tests/coverage/uses_crate.cov-map10
-rw-r--r--tests/coverage/uses_inline_crate.cov-map12
-rw-r--r--tests/coverage/while.cov-map2
-rw-r--r--tests/coverage/while_early_ret.cov-map2
-rw-r--r--tests/coverage/yield.cov-map6
-rw-r--r--tests/crashes/131758.rs11
-rw-r--r--tests/run-make/remap-path-prefix-dwarf/rmake.rs53
-rw-r--r--tests/run-make/remap-path-prefix-dwarf/src/print_value.rs7
-rw-r--r--tests/run-make/remap-path-prefix-dwarf/src/some_value.rs6
-rw-r--r--tests/run-make/remap-path-prefix/rmake.rs6
-rw-r--r--tests/rustdoc-js-std/path-maxeditdistance.js2
-rw-r--r--tests/rustdoc/anchors/anchor-id-duplicate-method-name-25001.rs (renamed from tests/rustdoc/anchor-id-duplicate-method-name-25001.rs)0
-rw-r--r--tests/rustdoc/anchors/anchor-id-trait-method-15169.rs (renamed from tests/rustdoc/anchor-id-trait-method-15169.rs)0
-rw-r--r--tests/rustdoc/anchors/anchor-id-trait-tymethod-28478.rs (renamed from tests/rustdoc/anchor-id-trait-tymethod-28478.rs)0
-rw-r--r--tests/rustdoc/anchors/anchors.no_const_anchor.html (renamed from tests/rustdoc/anchors.no_const_anchor.html)0
-rw-r--r--tests/rustdoc/anchors/anchors.no_const_anchor2.html (renamed from tests/rustdoc/anchors.no_const_anchor2.html)0
-rw-r--r--tests/rustdoc/anchors/anchors.no_method_anchor.html (renamed from tests/rustdoc/anchors.no_method_anchor.html)0
-rw-r--r--tests/rustdoc/anchors/anchors.no_trait_method_anchor.html (renamed from tests/rustdoc/anchors.no_trait_method_anchor.html)0
-rw-r--r--tests/rustdoc/anchors/anchors.no_tymethod_anchor.html (renamed from tests/rustdoc/anchors.no_tymethod_anchor.html)0
-rw-r--r--tests/rustdoc/anchors/anchors.no_type_anchor.html (renamed from tests/rustdoc/anchors.no_type_anchor.html)0
-rw-r--r--tests/rustdoc/anchors/anchors.no_type_anchor2.html (renamed from tests/rustdoc/anchors.no_type_anchor2.html)0
-rw-r--r--tests/rustdoc/anchors/anchors.rs (renamed from tests/rustdoc/anchors.rs)0
-rw-r--r--tests/rustdoc/anchors/auxiliary/issue-86620-1.rs (renamed from tests/rustdoc/auxiliary/issue-86620-1.rs)0
-rw-r--r--tests/rustdoc/anchors/disambiguate-anchors-32890.rs (renamed from tests/rustdoc/disambiguate-anchors-32890.rs)0
-rw-r--r--tests/rustdoc/anchors/disambiguate-anchors-header-29449.rs (renamed from tests/rustdoc/disambiguate-anchors-header-29449.rs)0
-rw-r--r--tests/rustdoc/anchors/method-anchor-in-blanket-impl-86620.rs (renamed from tests/rustdoc/method-anchor-in-blanket-impl-86620.rs)0
-rw-r--r--tests/rustdoc/anchors/trait-impl-items-links-and-anchors.rs (renamed from tests/rustdoc/trait-impl-items-links-and-anchors.rs)0
-rw-r--r--tests/rustdoc/assoc/assoc-fns.rs (renamed from tests/rustdoc/assoc-fns.rs)0
-rw-r--r--tests/rustdoc/assoc/assoc-item-cast.rs (renamed from tests/rustdoc/assoc-item-cast.rs)0
-rw-r--r--tests/rustdoc/assoc/assoc-type-bindings-20646.rs (renamed from tests/rustdoc/assoc-type-bindings-20646.rs)0
-rw-r--r--tests/rustdoc/assoc/assoc-types.rs (renamed from tests/rustdoc/assoc-types.rs)0
-rw-r--r--tests/rustdoc/assoc/auxiliary/cross-crate-hidden-assoc-trait-items.rs (renamed from tests/rustdoc/auxiliary/cross-crate-hidden-assoc-trait-items.rs)0
-rw-r--r--tests/rustdoc/assoc/auxiliary/issue-20646.rs (renamed from tests/rustdoc/auxiliary/issue-20646.rs)0
-rw-r--r--tests/rustdoc/assoc/auxiliary/issue-20727.rs (renamed from tests/rustdoc/auxiliary/issue-20727.rs)0
-rw-r--r--tests/rustdoc/assoc/auxiliary/normalize-assoc-item.rs (renamed from tests/rustdoc/auxiliary/normalize-assoc-item.rs)0
-rw-r--r--tests/rustdoc/assoc/cross-crate-hidden-assoc-trait-items.rs (renamed from tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs)0
-rw-r--r--tests/rustdoc/assoc/doc-assoc-item.rs (renamed from tests/rustdoc/doc-assoc-item.rs)0
-rw-r--r--tests/rustdoc/assoc/inline-assoc-type-20727-bindings.rs (renamed from tests/rustdoc/inline-assoc-type-20727-bindings.rs)0
-rw-r--r--tests/rustdoc/assoc/inline-assoc-type-20727-bounds-deref.rs (renamed from tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs)0
-rw-r--r--tests/rustdoc/assoc/inline-assoc-type-20727-bounds-index.rs (renamed from tests/rustdoc/inline-assoc-type-20727-bounds-index.rs)0
-rw-r--r--tests/rustdoc/assoc/inline-assoc-type-20727-bounds.rs (renamed from tests/rustdoc/inline-assoc-type-20727-bounds.rs)0
-rw-r--r--tests/rustdoc/assoc/normalize-assoc-item.rs (renamed from tests/rustdoc/normalize-assoc-item.rs)0
-rw-r--r--tests/rustdoc/async/async-fn-opaque-item.rs (renamed from tests/rustdoc/async-fn-opaque-item.rs)0
-rw-r--r--tests/rustdoc/async/async-fn.rs (renamed from tests/rustdoc/async-fn.rs)0
-rw-r--r--tests/rustdoc/async/async-move-doctest.rs (renamed from tests/rustdoc/async-move-doctest.rs)0
-rw-r--r--tests/rustdoc/async/async-trait-sig.rs (renamed from tests/rustdoc/async-trait-sig.rs)0
-rw-r--r--tests/rustdoc/async/async-trait.rs (renamed from tests/rustdoc/async-trait.rs)0
-rw-r--r--tests/rustdoc/async/auxiliary/async-trait-dep.rs (renamed from tests/rustdoc/auxiliary/async-trait-dep.rs)0
-rw-r--r--tests/rustdoc/auto/auto-impl-for-trait.rs (renamed from tests/rustdoc/auto-impl-for-trait.rs)0
-rw-r--r--tests/rustdoc/auto/auto-impl-primitive.rs (renamed from tests/rustdoc/auto-impl-primitive.rs)0
-rw-r--r--tests/rustdoc/auto/auto-trait-bounds-by-associated-type-50159.rs (renamed from tests/rustdoc/auto-trait-bounds-by-associated-type-50159.rs)0
-rw-r--r--tests/rustdoc/auto/auto-trait-bounds-inference-variables-54705.rs (renamed from tests/rustdoc/auto-trait-bounds-inference-variables-54705.rs)0
-rw-r--r--tests/rustdoc/auto/auto-trait-bounds-where-51236.rs (renamed from tests/rustdoc/auto-trait-bounds-where-51236.rs)0
-rw-r--r--tests/rustdoc/auto/auto-trait-negative-impl-55321.rs (renamed from tests/rustdoc/auto-trait-negative-impl-55321.rs)0
-rw-r--r--tests/rustdoc/auto/auto-trait-not-send.rs (renamed from tests/rustdoc/auto-trait-not-send.rs)0
-rw-r--r--tests/rustdoc/auto/auto-traits.rs (renamed from tests/rustdoc/auto-traits.rs)0
-rw-r--r--tests/rustdoc/auto/auto_aliases.rs (renamed from tests/rustdoc/auto_aliases.rs)0
-rw-r--r--tests/rustdoc/auto/auxiliary/auto-traits.rs (renamed from tests/rustdoc/auxiliary/auto-traits.rs)0
-rw-r--r--tests/rustdoc/constant/assoc-consts-underscore.rs (renamed from tests/rustdoc/assoc-consts-underscore.rs)0
-rw-r--r--tests/rustdoc/constant/assoc-consts-version.rs (renamed from tests/rustdoc/assoc-consts-version.rs)0
-rw-r--r--tests/rustdoc/constant/assoc-consts.rs (renamed from tests/rustdoc/assoc-consts.rs)0
-rw-r--r--tests/rustdoc/constant/associated-consts.rs (renamed from tests/rustdoc/associated-consts.rs)0
-rw-r--r--tests/rustdoc/constant/const-display.rs (renamed from tests/rustdoc/const-display.rs)0
-rw-r--r--tests/rustdoc/constant/const-doc.rs (renamed from tests/rustdoc/const-doc.rs)0
-rw-r--r--tests/rustdoc/constant/const-effect-param.rs (renamed from tests/rustdoc/const-effect-param.rs)0
-rw-r--r--tests/rustdoc/constant/const-underscore.rs (renamed from tests/rustdoc/const-underscore.rs)0
-rw-r--r--tests/rustdoc/constant/const-value-display.rs (renamed from tests/rustdoc/const-value-display.rs)0
-rw-r--r--tests/rustdoc/constant/const.rs (renamed from tests/rustdoc/const.rs)0
-rw-r--r--tests/rustdoc/constant/document-item-with-associated-const-in-where-clause.rs (renamed from tests/rustdoc/document-item-with-associated-const-in-where-clause.rs)0
-rw-r--r--tests/rustdoc/constant/generic-const-items.rs (renamed from tests/rustdoc/generic-const-items.rs)0
-rw-r--r--tests/rustdoc/constant/generic_const_exprs.rs (renamed from tests/rustdoc/generic_const_exprs.rs)0
-rw-r--r--tests/rustdoc/constant/glob-shadowing-const.rs (renamed from tests/rustdoc/glob-shadowing-const.rs)0
-rw-r--r--tests/rustdoc/constant/hide-complex-unevaluated-const-arguments.rs (renamed from tests/rustdoc/hide-complex-unevaluated-const-arguments.rs)0
-rw-r--r--tests/rustdoc/constant/hide-complex-unevaluated-consts.rs (renamed from tests/rustdoc/hide-complex-unevaluated-consts.rs)0
-rw-r--r--tests/rustdoc/constant/ice-associated-const-equality-105952.rs (renamed from tests/rustdoc/ice-associated-const-equality-105952.rs)0
-rw-r--r--tests/rustdoc/constant/legacy-const-generic.rs (renamed from tests/rustdoc/legacy-const-generic.rs)0
-rw-r--r--tests/rustdoc/constant/link-assoc-const.rs (renamed from tests/rustdoc/link-assoc-const.rs)0
-rw-r--r--tests/rustdoc/constant/redirect-const.rs (renamed from tests/rustdoc/redirect-const.rs)0
-rw-r--r--tests/rustdoc/constant/rfc-2632-const-trait-impl.rs (renamed from tests/rustdoc/rfc-2632-const-trait-impl.rs)0
-rw-r--r--tests/rustdoc/constant/show-const-contents.rs (renamed from tests/rustdoc/show-const-contents.rs)0
-rw-r--r--tests/rustdoc/doc-cfg/doc-cfg-hide.rs (renamed from tests/rustdoc/doc-cfg-hide.rs)0
-rw-r--r--tests/rustdoc/doc-cfg/doc-cfg-implicit-gate.rs (renamed from tests/rustdoc/doc-cfg-implicit-gate.rs)0
-rw-r--r--tests/rustdoc/doc-cfg/doc-cfg-implicit.rs (renamed from tests/rustdoc/doc-cfg-implicit.rs)0
-rw-r--r--tests/rustdoc/doc-cfg/doc-cfg-inherit-from-module-79201.rs (renamed from tests/rustdoc/doc-cfg-inherit-from-module-79201.rs)0
-rw-r--r--tests/rustdoc/doc-cfg/doc-cfg-simplification.rs (renamed from tests/rustdoc/doc-cfg-simplification.rs)0
-rw-r--r--tests/rustdoc/doc-cfg/doc-cfg-target-feature.rs (renamed from tests/rustdoc/doc-cfg-target-feature.rs)0
-rw-r--r--tests/rustdoc/doc-cfg/doc-cfg-traits.rs (renamed from tests/rustdoc/doc-cfg-traits.rs)0
-rw-r--r--tests/rustdoc/doc-cfg/doc-cfg.rs (renamed from tests/rustdoc/doc-cfg.rs)0
-rw-r--r--tests/rustdoc/enum/auxiliary/enum-variant.rs (renamed from tests/rustdoc/auxiliary/enum-variant.rs)0
-rw-r--r--tests/rustdoc/enum/auxiliary/variant-struct.rs (renamed from tests/rustdoc/auxiliary/variant-struct.rs)0
-rw-r--r--tests/rustdoc/enum/enum-headings.rs (renamed from tests/rustdoc/enum-headings.rs)0
-rw-r--r--tests/rustdoc/enum/enum-non-exhaustive-108925.rs (renamed from tests/rustdoc/enum-non-exhaustive-108925.rs)0
-rw-r--r--tests/rustdoc/enum/enum-variant-doc-hidden-field-88600.rs (renamed from tests/rustdoc/enum-variant-doc-hidden-field-88600.rs)0
-rw-r--r--tests/rustdoc/enum/enum-variant-fields-heading.rs (renamed from tests/rustdoc/enum-variant-fields-heading.rs)0
-rw-r--r--tests/rustdoc/enum/enum-variant-fields-heading.variants.html (renamed from tests/rustdoc/enum-variant-fields-heading.variants.html)0
-rw-r--r--tests/rustdoc/enum/enum-variant-value.rs (renamed from tests/rustdoc/enum-variant-value.rs)0
-rw-r--r--tests/rustdoc/enum/render-enum-variant-structlike-32395.rs (renamed from tests/rustdoc/render-enum-variant-structlike-32395.rs)0
-rw-r--r--tests/rustdoc/enum/strip-enum-variant.no-not-shown.html (renamed from tests/rustdoc/strip-enum-variant.no-not-shown.html)0
-rw-r--r--tests/rustdoc/enum/strip-enum-variant.rs (renamed from tests/rustdoc/strip-enum-variant.rs)0
-rw-r--r--tests/rustdoc/extern/auxiliary/empty.rs1
-rw-r--r--tests/rustdoc/extern/auxiliary/extern-links.rs (renamed from tests/rustdoc/auxiliary/extern-links.rs)0
-rw-r--r--tests/rustdoc/extern/auxiliary/external-cross-doc.md (renamed from tests/rustdoc/auxiliary/external-cross-doc.md)0
-rw-r--r--tests/rustdoc/extern/auxiliary/external-cross.rs (renamed from tests/rustdoc/auxiliary/external-cross.rs)0
-rw-r--r--tests/rustdoc/extern/auxiliary/external-doc.md (renamed from tests/rustdoc/auxiliary/external-doc.md)0
-rw-r--r--tests/rustdoc/extern/auxiliary/html_root.rs (renamed from tests/rustdoc/auxiliary/html_root.rs)0
-rw-r--r--tests/rustdoc/extern/auxiliary/issue-30109-1.rs (renamed from tests/rustdoc/auxiliary/issue-30109-1.rs)0
-rw-r--r--tests/rustdoc/extern/auxiliary/no_html_root.rs (renamed from tests/rustdoc/auxiliary/no_html_root.rs)0
-rw-r--r--tests/rustdoc/extern/auxiliary/panic-item.rs (renamed from tests/rustdoc/auxiliary/panic-item.rs)0
-rw-r--r--tests/rustdoc/extern/auxiliary/pub-extern-crate.rs (renamed from tests/rustdoc/auxiliary/pub-extern-crate.rs)0
-rw-r--r--tests/rustdoc/extern/auxiliary/rustdoc-extern-default-method.rs (renamed from tests/rustdoc/auxiliary/rustdoc-extern-default-method.rs)0
-rw-r--r--tests/rustdoc/extern/auxiliary/rustdoc-extern-method.rs (renamed from tests/rustdoc/auxiliary/rustdoc-extern-method.rs)0
-rw-r--r--tests/rustdoc/extern/auxiliary/variant-struct.rs5
-rw-r--r--tests/rustdoc/extern/extern-default-method.no_href_on_anchor.html (renamed from tests/rustdoc/extern-default-method.no_href_on_anchor.html)0
-rw-r--r--tests/rustdoc/extern/extern-default-method.rs (renamed from tests/rustdoc/extern-default-method.rs)0
-rw-r--r--tests/rustdoc/extern/extern-fn-22038.rs (renamed from tests/rustdoc/extern-fn-22038.rs)0
-rw-r--r--tests/rustdoc/extern/extern-html-root-url-precedence.rs (renamed from tests/rustdoc/extern-html-root-url-precedence.rs)0
-rw-r--r--tests/rustdoc/extern/extern-html-root-url.rs (renamed from tests/rustdoc/extern-html-root-url.rs)0
-rw-r--r--tests/rustdoc/extern/extern-links.rs (renamed from tests/rustdoc/extern-links.rs)0
-rw-r--r--tests/rustdoc/extern/extern-method.rs (renamed from tests/rustdoc/extern-method.rs)0
-rw-r--r--tests/rustdoc/extern/external-cross.rs (renamed from tests/rustdoc/external-cross.rs)0
-rw-r--r--tests/rustdoc/extern/external-doc.rs (renamed from tests/rustdoc/external-doc.rs)0
-rw-r--r--tests/rustdoc/extern/hidden-extern-34025.rs (renamed from tests/rustdoc/hidden-extern-34025.rs)0
-rw-r--r--tests/rustdoc/extern/link-extern-crate-33178.rs (renamed from tests/rustdoc/link-extern-crate-33178.rs)0
-rw-r--r--tests/rustdoc/extern/link-extern-crate-item-30109.rs (renamed from tests/rustdoc/link-extern-crate-item-30109.rs)0
-rw-r--r--tests/rustdoc/extern/link-extern-crate-title-33178.rs (renamed from tests/rustdoc/link-extern-crate-title-33178.rs)0
-rw-r--r--tests/rustdoc/extern/pub-extern-crate.rs (renamed from tests/rustdoc/pub-extern-crate.rs)0
-rw-r--r--tests/rustdoc/extern/unsafe-extern-blocks.rs (renamed from tests/rustdoc/unsafe-extern-blocks.rs)0
-rw-r--r--tests/rustdoc/extern/unused-extern-crate.rs (renamed from tests/rustdoc/unused-extern-crate.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/cross-crate-hidden-impl-parameter.rs (renamed from tests/rustdoc/auxiliary/cross-crate-hidden-impl-parameter.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/extern-impl-trait.rs (renamed from tests/rustdoc/auxiliary/extern-impl-trait.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/incoherent-impl-types.rs (renamed from tests/rustdoc/auxiliary/incoherent-impl-types.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/issue-100204-aux.rs (renamed from tests/rustdoc/auxiliary/issue-100204-aux.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/issue-17476.rs (renamed from tests/rustdoc/auxiliary/issue-17476.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/issue-21092.rs (renamed from tests/rustdoc/auxiliary/issue-21092.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/issue-22025.rs (renamed from tests/rustdoc/auxiliary/issue-22025.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/issue-53689.rs (renamed from tests/rustdoc/auxiliary/issue-53689.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/precise-capturing.rs (renamed from tests/rustdoc/auxiliary/precise-capturing.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/real_gimli.rs (renamed from tests/rustdoc/auxiliary/real_gimli.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/realcore.rs (renamed from tests/rustdoc/auxiliary/realcore.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/rustdoc-default-impl.rs (renamed from tests/rustdoc/auxiliary/rustdoc-default-impl.rs)0
-rw-r--r--tests/rustdoc/impl/auxiliary/rustdoc-impl-parts-crosscrate.rs (renamed from tests/rustdoc/auxiliary/rustdoc-impl-parts-crosscrate.rs)0
-rw-r--r--tests/rustdoc/impl/blanket-impl-29503.rs (renamed from tests/rustdoc/blanket-impl-29503.rs)0
-rw-r--r--tests/rustdoc/impl/blanket-impl-78673.rs (renamed from tests/rustdoc/blanket-impl-78673.rs)0
-rw-r--r--tests/rustdoc/impl/cross-crate-hidden-impl-parameter.rs (renamed from tests/rustdoc/cross-crate-hidden-impl-parameter.rs)0
-rw-r--r--tests/rustdoc/impl/deduplicate-glob-import-impl-21474.rs (renamed from tests/rustdoc/deduplicate-glob-import-impl-21474.rs)0
-rw-r--r--tests/rustdoc/impl/deduplicate-trait-impl-22025.rs (renamed from tests/rustdoc/deduplicate-trait-impl-22025.rs)0
-rw-r--r--tests/rustdoc/impl/default-impl.rs (renamed from tests/rustdoc/default-impl.rs)0
-rw-r--r--tests/rustdoc/impl/deprecated-impls.rs (renamed from tests/rustdoc/deprecated-impls.rs)0
-rw-r--r--tests/rustdoc/impl/doc-hidden-trait-implementors-33069.rs (renamed from tests/rustdoc/doc-hidden-trait-implementors-33069.rs)0
-rw-r--r--tests/rustdoc/impl/doc_auto_cfg_nested_impl.rs (renamed from tests/rustdoc/doc_auto_cfg_nested_impl.rs)0
-rw-r--r--tests/rustdoc/impl/duplicated_impl.rs (renamed from tests/rustdoc/duplicated_impl.rs)0
-rw-r--r--tests/rustdoc/impl/empty-impl-block.rs (renamed from tests/rustdoc/empty-impl-block.rs)0
-rw-r--r--tests/rustdoc/impl/empty-impls.rs (renamed from tests/rustdoc/empty-impls.rs)0
-rw-r--r--tests/rustdoc/impl/extern-impl-trait.rs (renamed from tests/rustdoc/extern-impl-trait.rs)0
-rw-r--r--tests/rustdoc/impl/extern-impl.rs (renamed from tests/rustdoc/extern-impl.rs)0
-rw-r--r--tests/rustdoc/impl/foreign-implementors-js-43701.rs (renamed from tests/rustdoc/foreign-implementors-js-43701.rs)0
-rw-r--r--tests/rustdoc/impl/generic-impl.rs (renamed from tests/rustdoc/generic-impl.rs)0
-rw-r--r--tests/rustdoc/impl/hidden-implementors-90781.rs (renamed from tests/rustdoc/hidden-implementors-90781.rs)0
-rw-r--r--tests/rustdoc/impl/hidden-impls.rs (renamed from tests/rustdoc/hidden-impls.rs)0
-rw-r--r--tests/rustdoc/impl/hidden-trait-struct-impls.rs (renamed from tests/rustdoc/hidden-trait-struct-impls.rs)0
-rw-r--r--tests/rustdoc/impl/hide-mut-methods-if-no-derefmut-impl-74083.rs (renamed from tests/rustdoc/hide-mut-methods-if-no-derefmut-impl-74083.rs)0
-rw-r--r--tests/rustdoc/impl/impl-alias-substituted.rs (renamed from tests/rustdoc/impl-alias-substituted.rs)0
-rw-r--r--tests/rustdoc/impl/impl-assoc-type-21092.rs (renamed from tests/rustdoc/impl-assoc-type-21092.rs)0
-rw-r--r--tests/rustdoc/impl/impl-associated-items-order.rs (renamed from tests/rustdoc/impl-associated-items-order.rs)0
-rw-r--r--tests/rustdoc/impl/impl-associated-items-sidebar.rs (renamed from tests/rustdoc/impl-associated-items-sidebar.rs)0
-rw-r--r--tests/rustdoc/impl/impl-blanket-53689.rs (renamed from tests/rustdoc/impl-blanket-53689.rs)0
-rw-r--r--tests/rustdoc/impl/impl-box.rs (renamed from tests/rustdoc/impl-box.rs)0
-rw-r--r--tests/rustdoc/impl/impl-disambiguation.rs (renamed from tests/rustdoc/impl-disambiguation.rs)0
-rw-r--r--tests/rustdoc/impl/impl-everywhere.rs (renamed from tests/rustdoc/impl-everywhere.rs)0
-rw-r--r--tests/rustdoc/impl/impl-in-const-block.rs (renamed from tests/rustdoc/impl-in-const-block.rs)0
-rw-r--r--tests/rustdoc/impl/impl-on-ty-alias-issue-119015.rs (renamed from tests/rustdoc/impl-on-ty-alias-issue-119015.rs)0
-rw-r--r--tests/rustdoc/impl/impl-parts-crosscrate.rs (renamed from tests/rustdoc/impl-parts-crosscrate.rs)0
-rw-r--r--tests/rustdoc/impl/impl-parts.rs (renamed from tests/rustdoc/impl-parts.rs)0
-rw-r--r--tests/rustdoc/impl/impl-ref-20175.rs (renamed from tests/rustdoc/impl-ref-20175.rs)0
-rw-r--r--tests/rustdoc/impl/impl-trait-43869.rs (renamed from tests/rustdoc/impl-trait-43869.rs)0
-rw-r--r--tests/rustdoc/impl/impl-trait-alias.rs (renamed from tests/rustdoc/impl-trait-alias.rs)0
-rw-r--r--tests/rustdoc/impl/impl-trait-precise-capturing.rs (renamed from tests/rustdoc/impl-trait-precise-capturing.rs)0
-rw-r--r--tests/rustdoc/impl/impl-type-parameter-33592.rs (renamed from tests/rustdoc/impl-type-parameter-33592.rs)0
-rw-r--r--tests/rustdoc/impl/implementor-stable-version.rs (renamed from tests/rustdoc/implementor-stable-version.rs)0
-rw-r--r--tests/rustdoc/impl/implementors-unstable-75588.rs (renamed from tests/rustdoc/implementors-unstable-75588.rs)0
-rw-r--r--tests/rustdoc/impl/inline-impl-through-glob-import-100204.rs (renamed from tests/rustdoc/inline-impl-through-glob-import-100204.rs)0
-rw-r--r--tests/rustdoc/impl/manual_impl.rs (renamed from tests/rustdoc/manual_impl.rs)0
-rw-r--r--tests/rustdoc/impl/method-link-foreign-trait-impl-17476.rs (renamed from tests/rustdoc/method-link-foreign-trait-impl-17476.rs)0
-rw-r--r--tests/rustdoc/impl/module-impls.rs (renamed from tests/rustdoc/module-impls.rs)0
-rw-r--r--tests/rustdoc/impl/must_implement_one_of.rs (renamed from tests/rustdoc/must_implement_one_of.rs)0
-rw-r--r--tests/rustdoc/impl/negative-impl-no-items.rs (renamed from tests/rustdoc/negative-impl-no-items.rs)0
-rw-r--r--tests/rustdoc/impl/negative-impl-sidebar.rs (renamed from tests/rustdoc/negative-impl-sidebar.rs)0
-rw-r--r--tests/rustdoc/impl/negative-impl.rs (renamed from tests/rustdoc/negative-impl.rs)0
-rw-r--r--tests/rustdoc/impl/return-impl-trait.rs (renamed from tests/rustdoc/return-impl-trait.rs)0
-rw-r--r--tests/rustdoc/impl/rustc-incoherent-impls.rs (renamed from tests/rustdoc/rustc-incoherent-impls.rs)0
-rw-r--r--tests/rustdoc/impl/same-crate-hidden-impl-parameter.rs (renamed from tests/rustdoc/same-crate-hidden-impl-parameter.rs)0
-rw-r--r--tests/rustdoc/impl/sidebar-trait-impl-disambiguate-78701.rs (renamed from tests/rustdoc/sidebar-trait-impl-disambiguate-78701.rs)0
-rw-r--r--tests/rustdoc/impl/struct-implementations-title.rs (renamed from tests/rustdoc/struct-implementations-title.rs)0
-rw-r--r--tests/rustdoc/impl/trait-impl.rs (renamed from tests/rustdoc/trait-impl.rs)0
-rw-r--r--tests/rustdoc/impl/trait-implementations-duplicate-self-45584.rs (renamed from tests/rustdoc/trait-implementations-duplicate-self-45584.rs)0
-rw-r--r--tests/rustdoc/impl/underscore-type-in-trait-impl-96381.rs (renamed from tests/rustdoc/underscore-type-in-trait-impl-96381.rs)0
-rw-r--r--tests/rustdoc/impl/universal-impl-trait.rs (renamed from tests/rustdoc/universal-impl-trait.rs)0
-rw-r--r--tests/rustdoc/impl/unneeded-trait-implementations-title.rs (renamed from tests/rustdoc/unneeded-trait-implementations-title.rs)0
-rw-r--r--tests/rustdoc/intra-doc/ice-intra-doc-links-107995.rs (renamed from tests/rustdoc/ice-intra-doc-links-107995.rs)0
-rw-r--r--tests/rustdoc/intra-doc/intra-doc-link-method-trait-impl-72340.rs (renamed from tests/rustdoc/intra-doc-link-method-trait-impl-72340.rs)0
-rw-r--r--tests/rustdoc/jump-to-def/auxiliary/jump-to-def-macro.rs (renamed from tests/rustdoc/auxiliary/jump-to-def-macro.rs)0
-rw-r--r--tests/rustdoc/jump-to-def/jump-to-def-doc-links-calls.rs (renamed from tests/rustdoc/jump-to-def-doc-links-calls.rs)0
-rw-r--r--tests/rustdoc/jump-to-def/jump-to-def-doc-links.rs (renamed from tests/rustdoc/jump-to-def-doc-links.rs)0
-rw-r--r--tests/rustdoc/jump-to-def/jump-to-def-macro.rs (renamed from tests/rustdoc/jump-to-def-macro.rs)0
-rw-r--r--tests/rustdoc/jump-to-def/jump-to-def-pats.rs (renamed from tests/rustdoc/jump-to-def-pats.rs)0
-rw-r--r--tests/rustdoc/jump-to-def/jump-to-def-prelude-types.rs (renamed from tests/rustdoc/jump-to-def-prelude-types.rs)0
-rw-r--r--tests/rustdoc/jump-to-def/jump-to-non-local-method.rs (renamed from tests/rustdoc/jump-to-non-local-method.rs)0
-rw-r--r--tests/rustdoc/macro/auxiliary/external-macro-src.rs (renamed from tests/rustdoc/auxiliary/external-macro-src.rs)0
-rw-r--r--tests/rustdoc/macro/auxiliary/issue-99221-aux.rs20
-rw-r--r--tests/rustdoc/macro/auxiliary/macro_pub_in_module.rs (renamed from tests/rustdoc/auxiliary/macro_pub_in_module.rs)0
-rw-r--r--tests/rustdoc/macro/auxiliary/pub-use-extern-macros.rs (renamed from tests/rustdoc/auxiliary/pub-use-extern-macros.rs)0
-rw-r--r--tests/rustdoc/macro/compiler-derive-proc-macro.rs (renamed from tests/rustdoc/compiler-derive-proc-macro.rs)0
-rw-r--r--tests/rustdoc/macro/const-rendering-macros-33302.rs (renamed from tests/rustdoc/const-rendering-macros-33302.rs)0
-rw-r--r--tests/rustdoc/macro/decl_macro.rs (renamed from tests/rustdoc/decl_macro.rs)0
-rw-r--r--tests/rustdoc/macro/decl_macro_priv.rs (renamed from tests/rustdoc/decl_macro_priv.rs)0
-rw-r--r--tests/rustdoc/macro/doc-proc-macro.rs (renamed from tests/rustdoc/doc-proc-macro.rs)0
-rw-r--r--tests/rustdoc/macro/external-macro-src.rs (renamed from tests/rustdoc/external-macro-src.rs)0
-rw-r--r--tests/rustdoc/macro/macro-const-display-115295.rs (renamed from tests/rustdoc/macro-const-display-115295.rs)0
-rw-r--r--tests/rustdoc/macro/macro-doc-comment-23812.rs (renamed from tests/rustdoc/macro-doc-comment-23812.rs)0
-rw-r--r--tests/rustdoc/macro/macro-export-crate-root-108231.rs (renamed from tests/rustdoc/macro-export-crate-root-108231.rs)0
-rw-r--r--tests/rustdoc/macro/macro-generated-macro.macro_linebreak_pre.html (renamed from tests/rustdoc/macro-generated-macro.macro_linebreak_pre.html)0
-rw-r--r--tests/rustdoc/macro/macro-generated-macro.macro_morestuff_pre.html (renamed from tests/rustdoc/macro-generated-macro.macro_morestuff_pre.html)0
-rw-r--r--tests/rustdoc/macro/macro-generated-macro.rs (renamed from tests/rustdoc/macro-generated-macro.rs)0
-rw-r--r--tests/rustdoc/macro/macro-higher-kinded-function.rs (renamed from tests/rustdoc/macro-higher-kinded-function.rs)0
-rw-r--r--tests/rustdoc/macro/macro-ice-16019.rs (renamed from tests/rustdoc/macro-ice-16019.rs)0
-rw-r--r--tests/rustdoc/macro/macro-in-async-block.rs (renamed from tests/rustdoc/macro-in-async-block.rs)0
-rw-r--r--tests/rustdoc/macro/macro-in-closure.rs (renamed from tests/rustdoc/macro-in-closure.rs)0
-rw-r--r--tests/rustdoc/macro/macro-indirect-use.rs (renamed from tests/rustdoc/macro-indirect-use.rs)0
-rw-r--r--tests/rustdoc/macro/macro_pub_in_module.rs (renamed from tests/rustdoc/macro_pub_in_module.rs)0
-rw-r--r--tests/rustdoc/macro/macro_rules-matchers.rs (renamed from tests/rustdoc/macro_rules-matchers.rs)0
-rw-r--r--tests/rustdoc/macro/macros.rs (renamed from tests/rustdoc/macros.rs)0
-rw-r--r--tests/rustdoc/macro/multiple-macro-rules-w-same-name-99221.rs (renamed from tests/rustdoc/multiple-macro-rules-w-same-name-99221.rs)0
-rw-r--r--tests/rustdoc/macro/multiple-macro-rules-w-same-name-submodule-99221.rs (renamed from tests/rustdoc/multiple-macro-rules-w-same-name-submodule-99221.rs)0
-rw-r--r--tests/rustdoc/macro/proc-macro.rs (renamed from tests/rustdoc/proc-macro.rs)0
-rw-r--r--tests/rustdoc/macro/pub-use-extern-macros.rs (renamed from tests/rustdoc/pub-use-extern-macros.rs)0
-rw-r--r--tests/rustdoc/macro/rustc-macro-crate.rs (renamed from tests/rustdoc/rustc-macro-crate.rs)0
-rw-r--r--tests/rustdoc/primitive/auxiliary/issue-15318.rs (renamed from tests/rustdoc/auxiliary/issue-15318.rs)0
-rw-r--r--tests/rustdoc/primitive/auxiliary/primitive-doc.rs (renamed from tests/rustdoc/auxiliary/primitive-doc.rs)0
-rw-r--r--tests/rustdoc/primitive/cross-crate-primitive-doc.rs (renamed from tests/rustdoc/cross-crate-primitive-doc.rs)0
-rw-r--r--tests/rustdoc/primitive/no_std-primitive.rs (renamed from tests/rustdoc/no_std-primitive.rs)0
-rw-r--r--tests/rustdoc/primitive/primitive-link.rs (renamed from tests/rustdoc/primitive-link.rs)0
-rw-r--r--tests/rustdoc/primitive/primitive-raw-pointer-dox-15318-3.rs (renamed from tests/rustdoc/primitive-raw-pointer-dox-15318-3.rs)0
-rw-r--r--tests/rustdoc/primitive/primitive-raw-pointer-link-15318.rs (renamed from tests/rustdoc/primitive-raw-pointer-link-15318.rs)0
-rw-r--r--tests/rustdoc/primitive/primitive-raw-pointer-link-no-inlined-15318-2.rs (renamed from tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs)0
-rw-r--r--tests/rustdoc/primitive/primitive-reference.rs (renamed from tests/rustdoc/primitive-reference.rs)0
-rw-r--r--tests/rustdoc/primitive/primitive-slice-auto-trait.rs (renamed from tests/rustdoc/primitive-slice-auto-trait.rs)0
-rw-r--r--tests/rustdoc/primitive/primitive-tuple-auto-trait.rs (renamed from tests/rustdoc/primitive-tuple-auto-trait.rs)0
-rw-r--r--tests/rustdoc/primitive/primitive-tuple-variadic.rs (renamed from tests/rustdoc/primitive-tuple-variadic.rs)0
-rw-r--r--tests/rustdoc/primitive/primitive-unit-auto-trait.rs (renamed from tests/rustdoc/primitive-unit-auto-trait.rs)0
-rw-r--r--tests/rustdoc/primitive/search-index-primitive-inherent-method-23511.rs (renamed from tests/rustdoc/search-index-primitive-inherent-method-23511.rs)0
-rw-r--r--tests/rustdoc/private/doc-hidden-private-67851-both.rs (renamed from tests/rustdoc/doc-hidden-private-67851-both.rs)0
-rw-r--r--tests/rustdoc/private/doc-hidden-private-67851-hidden.rs (renamed from tests/rustdoc/doc-hidden-private-67851-hidden.rs)0
-rw-r--r--tests/rustdoc/private/doc-hidden-private-67851-neither.rs (renamed from tests/rustdoc/doc-hidden-private-67851-neither.rs)0
-rw-r--r--tests/rustdoc/private/doc-hidden-private-67851-private.rs (renamed from tests/rustdoc/doc-hidden-private-67851-private.rs)0
-rw-r--r--tests/rustdoc/private/empty-impl-block-private-with-doc.rs (renamed from tests/rustdoc/empty-impl-block-private-with-doc.rs)0
-rw-r--r--tests/rustdoc/private/empty-impl-block-private.rs (renamed from tests/rustdoc/empty-impl-block-private.rs)0
-rw-r--r--tests/rustdoc/private/empty-mod-private.rs (renamed from tests/rustdoc/empty-mod-private.rs)0
-rw-r--r--tests/rustdoc/private/enum-variant-private-46767.rs (renamed from tests/rustdoc/enum-variant-private-46767.rs)0
-rw-r--r--tests/rustdoc/private/files-creation-private.rs (renamed from tests/rustdoc/files-creation-private.rs)0
-rw-r--r--tests/rustdoc/private/hidden-private.rs (renamed from tests/rustdoc/hidden-private.rs)0
-rw-r--r--tests/rustdoc/private/inline-private-with-intermediate-doc-hidden.rs (renamed from tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs)0
-rw-r--r--tests/rustdoc/private/inner-private-110422.rs (renamed from tests/rustdoc/inner-private-110422.rs)0
-rw-r--r--tests/rustdoc/private/macro-document-private-duplicate.rs (renamed from tests/rustdoc/macro-document-private-duplicate.rs)0
-rw-r--r--tests/rustdoc/private/macro-document-private.rs (renamed from tests/rustdoc/macro-document-private.rs)0
-rw-r--r--tests/rustdoc/private/macro-private-not-documented.rs (renamed from tests/rustdoc/macro-private-not-documented.rs)0
-rw-r--r--tests/rustdoc/private/missing-private-inlining-109258.rs (renamed from tests/rustdoc/missing-private-inlining-109258.rs)0
-rw-r--r--tests/rustdoc/private/private-fields-tuple-struct.rs (renamed from tests/rustdoc/private-fields-tuple-struct.rs)0
-rw-r--r--tests/rustdoc/private/private-non-local-fields-2.rs (renamed from tests/rustdoc/private-non-local-fields-2.rs)0
-rw-r--r--tests/rustdoc/private/private-non-local-fields.rs (renamed from tests/rustdoc/private-non-local-fields.rs)0
-rw-r--r--tests/rustdoc/private/private-type-alias.rs (renamed from tests/rustdoc/private-type-alias.rs)0
-rw-r--r--tests/rustdoc/private/private-type-cycle-110629.rs (renamed from tests/rustdoc/private-type-cycle-110629.rs)0
-rw-r--r--tests/rustdoc/private/private-use-decl-macro-47038.rs (renamed from tests/rustdoc/private-use-decl-macro-47038.rs)0
-rw-r--r--tests/rustdoc/private/private-use.rs (renamed from tests/rustdoc/private-use.rs)0
-rw-r--r--tests/rustdoc/private/public-impl-mention-private-generic-46380-2.rs (renamed from tests/rustdoc/public-impl-mention-private-generic-46380-2.rs)0
-rw-r--r--tests/rustdoc/private/traits-in-bodies-private.rs (renamed from tests/rustdoc/traits-in-bodies-private.rs)0
-rw-r--r--tests/rustdoc/reexport/alias-reexport.rs (renamed from tests/rustdoc/alias-reexport.rs)0
-rw-r--r--tests/rustdoc/reexport/alias-reexport2.rs (renamed from tests/rustdoc/alias-reexport2.rs)0
-rw-r--r--tests/rustdoc/reexport/anonymous-reexport-108931.rs (renamed from tests/rustdoc/anonymous-reexport-108931.rs)0
-rw-r--r--tests/rustdoc/reexport/anonymous-reexport.rs (renamed from tests/rustdoc/anonymous-reexport.rs)0
-rw-r--r--tests/rustdoc/reexport/auxiliary/alias-reexport.rs (renamed from tests/rustdoc/auxiliary/alias-reexport.rs)0
-rw-r--r--tests/rustdoc/reexport/auxiliary/alias-reexport2.rs (renamed from tests/rustdoc/auxiliary/alias-reexport2.rs)0
-rw-r--r--tests/rustdoc/reexport/auxiliary/all-item-types.rs22
-rw-r--r--tests/rustdoc/reexport/auxiliary/issue-113982-doc_auto_cfg-reexport-foreign.rs (renamed from tests/rustdoc/auxiliary/issue-113982-doc_auto_cfg-reexport-foreign.rs)0
-rw-r--r--tests/rustdoc/reexport/auxiliary/issue-28927-1.rs (renamed from tests/rustdoc/auxiliary/issue-28927-1.rs)0
-rw-r--r--tests/rustdoc/reexport/auxiliary/issue-28927-2.rs (renamed from tests/rustdoc/auxiliary/issue-28927-2.rs)0
-rw-r--r--tests/rustdoc/reexport/auxiliary/primitive-reexport.rs (renamed from tests/rustdoc/auxiliary/primitive-reexport.rs)0
-rw-r--r--tests/rustdoc/reexport/auxiliary/reexport-check.rs (renamed from tests/rustdoc/auxiliary/reexport-check.rs)0
-rw-r--r--tests/rustdoc/reexport/auxiliary/reexport-doc-aux.rs (renamed from tests/rustdoc/auxiliary/reexport-doc-aux.rs)0
-rw-r--r--tests/rustdoc/reexport/auxiliary/reexports.rs (renamed from tests/rustdoc/auxiliary/reexports.rs)0
-rw-r--r--tests/rustdoc/reexport/blanket-reexport-item.rs (renamed from tests/rustdoc/blanket-reexport-item.rs)0
-rw-r--r--tests/rustdoc/reexport/cfg_doc_reexport.rs (renamed from tests/rustdoc/cfg_doc_reexport.rs)0
-rw-r--r--tests/rustdoc/reexport/doc-hidden-reexports-109449.rs (renamed from tests/rustdoc/doc-hidden-reexports-109449.rs)0
-rw-r--r--tests/rustdoc/reexport/doc_auto_cfg-reexport-foreign-113982.rs (renamed from tests/rustdoc/doc_auto_cfg-reexport-foreign-113982.rs)0
-rw-r--r--tests/rustdoc/reexport/duplicated-glob-reexport-60522.rs (renamed from tests/rustdoc/duplicated-glob-reexport-60522.rs)0
-rw-r--r--tests/rustdoc/reexport/enum-variant-reexport-35488.rs (renamed from tests/rustdoc/enum-variant-reexport-35488.rs)0
-rw-r--r--tests/rustdoc/reexport/foreigntype-reexport.rs (renamed from tests/rustdoc/foreigntype-reexport.rs)0
-rw-r--r--tests/rustdoc/reexport/glob-reexport-attribute-merge-120487.rs (renamed from tests/rustdoc/glob-reexport-attribute-merge-120487.rs)0
-rw-r--r--tests/rustdoc/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs (renamed from tests/rustdoc/glob-reexport-attribute-merge-doc-auto-cfg.rs)0
-rw-r--r--tests/rustdoc/reexport/ice-reexport-crate-root-28927.rs (renamed from tests/rustdoc/ice-reexport-crate-root-28927.rs)0
-rw-r--r--tests/rustdoc/reexport/local-reexport-doc.rs (renamed from tests/rustdoc/local-reexport-doc.rs)0
-rw-r--r--tests/rustdoc/reexport/no-compiler-reexport.rs (renamed from tests/rustdoc/no-compiler-reexport.rs)0
-rw-r--r--tests/rustdoc/reexport/overlapping-reexport-105735-2.rs (renamed from tests/rustdoc/overlapping-reexport-105735-2.rs)0
-rw-r--r--tests/rustdoc/reexport/overlapping-reexport-105735.rs (renamed from tests/rustdoc/overlapping-reexport-105735.rs)0
-rw-r--r--tests/rustdoc/reexport/primitive-reexport.rs (renamed from tests/rustdoc/primitive-reexport.rs)0
-rw-r--r--tests/rustdoc/reexport/pub-reexport-of-pub-reexport-46506.rs (renamed from tests/rustdoc/pub-reexport-of-pub-reexport-46506.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-attr-merge.rs (renamed from tests/rustdoc/reexport-attr-merge.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-cfg.rs (renamed from tests/rustdoc/reexport-cfg.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-check.rs (renamed from tests/rustdoc/reexport-check.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-dep-foreign-fn.rs (renamed from tests/rustdoc/reexport-dep-foreign-fn.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-doc-hidden-inside-private.rs (renamed from tests/rustdoc/reexport-doc-hidden-inside-private.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-doc-hidden.rs (renamed from tests/rustdoc/reexport-doc-hidden.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-doc.rs (renamed from tests/rustdoc/reexport-doc.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-hidden-macro.rs (renamed from tests/rustdoc/reexport-hidden-macro.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-macro.rs (renamed from tests/rustdoc/reexport-macro.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-of-doc-hidden.rs (renamed from tests/rustdoc/reexport-of-doc-hidden.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-of-reexport-108679.rs (renamed from tests/rustdoc/reexport-of-reexport-108679.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-stability-tags-deprecated-and-portability.rs (renamed from tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-stability-tags-unstable-and-portability.rs (renamed from tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-trait-from-hidden-111064-2.rs (renamed from tests/rustdoc/reexport-trait-from-hidden-111064-2.rs)0
-rw-r--r--tests/rustdoc/reexport/reexport-trait-from-hidden-111064.rs (renamed from tests/rustdoc/reexport-trait-from-hidden-111064.rs)0
-rw-r--r--tests/rustdoc/reexport/reexports-of-same-name.rs (renamed from tests/rustdoc/reexports-of-same-name.rs)0
-rw-r--r--tests/rustdoc/reexport/reexports-priv.rs (renamed from tests/rustdoc/reexports-priv.rs)0
-rw-r--r--tests/rustdoc/reexport/reexports.rs (renamed from tests/rustdoc/reexports.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/assoc-type-source-link.rs (renamed from tests/rustdoc/assoc-type-source-link.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/auxiliary/issue-26606-macro.rs (renamed from tests/rustdoc/auxiliary/issue-26606-macro.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/auxiliary/issue-34274.rs (renamed from tests/rustdoc/auxiliary/issue-34274.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/auxiliary/source-code-bar.rs (renamed from tests/rustdoc/auxiliary/source-code-bar.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/auxiliary/source_code.rs (renamed from tests/rustdoc/auxiliary/source_code.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/auxiliary/src-links-external.rs (renamed from tests/rustdoc/auxiliary/src-links-external.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/check-source-code-urls-to-def-std.rs (renamed from tests/rustdoc/check-source-code-urls-to-def-std.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/check-source-code-urls-to-def.rs (renamed from tests/rustdoc/check-source-code-urls-to-def.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/doc-hidden-source.rs (renamed from tests/rustdoc/doc-hidden-source.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/html-no-source.rs (renamed from tests/rustdoc/html-no-source.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/source-code-highlight.rs (renamed from tests/rustdoc/source-code-highlight.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/source-file.rs (renamed from tests/rustdoc/source-file.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/source-line-numbers.rs (renamed from tests/rustdoc/source-line-numbers.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/source-version-separator.rs (renamed from tests/rustdoc/source-version-separator.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/src-link-external-macro-26606.rs (renamed from tests/rustdoc/src-link-external-macro-26606.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/src-links-auto-impls.rs (renamed from tests/rustdoc/src-links-auto-impls.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/src-links-external.rs (renamed from tests/rustdoc/src-links-external.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/src-links-implementor-43893.rs (renamed from tests/rustdoc/src-links-implementor-43893.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/src-links-inlined-34274.rs (renamed from tests/rustdoc/src-links-inlined-34274.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/src-links.rs (renamed from tests/rustdoc/src-links.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/src-links/compiletest-ignore-dir (renamed from tests/rustdoc/src-links/compiletest-ignore-dir)0
-rw-r--r--tests/rustdoc/source-code-pages/src-links/fizz.rs (renamed from tests/rustdoc/src-links/fizz.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/src-links/mod.rs (renamed from tests/rustdoc/src-links/mod.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/src-mod-path-absolute-26995.rs (renamed from tests/rustdoc/src-mod-path-absolute-26995.rs)0
-rw-r--r--tests/rustdoc/source-code-pages/version-separator-without-source.rs (renamed from tests/rustdoc/version-separator-without-source.rs)0
-rw-r--r--tests/ui/closures/opaque-upvar.rs19
-rw-r--r--tests/ui/feature-gates/feature-gate-frontmatter.rs5
-rw-r--r--tests/ui/feature-gates/feature-gate-frontmatter.stderr15
-rw-r--r--tests/ui/frontmatter/auxiliary/lib.rs6
-rw-r--r--tests/ui/frontmatter/auxiliary/makro.rs8
-rw-r--r--tests/ui/frontmatter/dot-in-infostring-leading.rs9
-rw-r--r--tests/ui/frontmatter/dot-in-infostring-leading.stderr10
-rw-r--r--tests/ui/frontmatter/dot-in-infostring-non-leading.rs9
-rw-r--r--tests/ui/frontmatter/escape.rs14
-rw-r--r--tests/ui/frontmatter/extra-after-end.rs7
-rw-r--r--tests/ui/frontmatter/extra-after-end.stderr8
-rw-r--r--tests/ui/frontmatter/frontmatter-after-tokens.rs10
-rw-r--r--tests/ui/frontmatter/frontmatter-after-tokens.stderr10
-rw-r--r--tests/ui/frontmatter/frontmatter-non-lexible-tokens.rs12
-rw-r--r--tests/ui/frontmatter/frontmatter-whitespace-1.rs10
-rw-r--r--tests/ui/frontmatter/frontmatter-whitespace-1.stderr26
-rw-r--r--tests/ui/frontmatter/frontmatter-whitespace-2.rs15
-rw-r--r--tests/ui/frontmatter/frontmatter-whitespace-2.stderr26
-rw-r--r--tests/ui/frontmatter/frontmatter-whitespace-3.rs16
-rw-r--r--tests/ui/frontmatter/frontmatter-whitespace-4.rs9
-rw-r--r--tests/ui/frontmatter/included-frontmatter.rs12
-rw-r--r--tests/ui/frontmatter/infostring-fail.rs9
-rw-r--r--tests/ui/frontmatter/infostring-fail.stderr10
-rw-r--r--tests/ui/frontmatter/mismatch-1.rs10
-rw-r--r--tests/ui/frontmatter/mismatch-1.stderr16
-rw-r--r--tests/ui/frontmatter/mismatch-2.rs8
-rw-r--r--tests/ui/frontmatter/mismatch-2.stderr22
-rw-r--r--tests/ui/frontmatter/multifrontmatter-2.rs12
-rw-r--r--tests/ui/frontmatter/multifrontmatter-2.stderr22
-rw-r--r--tests/ui/frontmatter/multifrontmatter.rs13
-rw-r--r--tests/ui/frontmatter/multifrontmatter.stderr10
-rw-r--r--tests/ui/frontmatter/proc-macro-observer.rs12
-rw-r--r--tests/ui/frontmatter/shebang.rs13
-rw-r--r--tests/ui/frontmatter/unclosed-1.rs10
-rw-r--r--tests/ui/frontmatter/unclosed-1.stderr16
-rw-r--r--tests/ui/frontmatter/unclosed-2.rs15
-rw-r--r--tests/ui/frontmatter/unclosed-2.stderr31
-rw-r--r--tests/ui/frontmatter/unclosed-3.rs16
-rw-r--r--tests/ui/frontmatter/unclosed-3.stderr41
-rw-r--r--tests/ui/frontmatter/unclosed-4.rs9
-rw-r--r--tests/ui/frontmatter/unclosed-4.stderr16
-rw-r--r--tests/ui/frontmatter/unclosed-5.rs10
-rw-r--r--tests/ui/frontmatter/unclosed-5.stderr29
-rw-r--r--tests/ui/unboxed-closures/arg-constrained-after-closure-inference.rs16
559 files changed, 2324 insertions, 755 deletions
diff --git a/Cargo.lock b/Cargo.lock
index bbd3f33d7bd..98b90a47e39 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -777,6 +777,7 @@ name = "coverage-dump"
 version = "0.1.0"
 dependencies = [
  "anyhow",
+ "itertools",
  "leb128",
  "md-5",
  "miniz_oxide 0.7.4",
@@ -3604,13 +3605,13 @@ dependencies = [
  "rustc_query_system",
  "rustc_resolve",
  "rustc_session",
- "rustc_smir",
  "rustc_span",
  "rustc_target",
  "rustc_trait_selection",
  "rustc_ty_utils",
  "serde_json",
  "shlex",
+ "stable_mir",
  "tracing",
  "windows 0.59.0",
 ]
diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs
index e312f15f05b..915613a3913 100644
--- a/compiler/rustc_ast_passes/src/feature_gate.rs
+++ b/compiler/rustc_ast_passes/src/feature_gate.rs
@@ -514,6 +514,7 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session, features: &Features) {
     gate_all!(contracts_internals, "contract internal machinery is for internal use only");
     gate_all!(where_clause_attrs, "attributes in `where` clause are unstable");
     gate_all!(super_let, "`super let` is experimental");
+    gate_all!(frontmatter, "frontmatters are experimental");
 
     if !visitor.features.never_patterns() {
         if let Some(spans) = spans.get(&sym::never_patterns) {
diff --git a/compiler/rustc_codegen_ssa/src/back/metadata.rs b/compiler/rustc_codegen_ssa/src/back/metadata.rs
index ebcccf1b97d..ec46c71b0e4 100644
--- a/compiler/rustc_codegen_ssa/src/back/metadata.rs
+++ b/compiler/rustc_codegen_ssa/src/back/metadata.rs
@@ -270,45 +270,61 @@ pub(super) fn elf_os_abi(sess: &Session) -> u8 {
 
 pub(super) fn elf_e_flags(architecture: Architecture, sess: &Session) -> u32 {
     match architecture {
-        Architecture::Mips => {
-            let arch = match sess.target.options.cpu.as_ref() {
-                "mips1" => elf::EF_MIPS_ARCH_1,
-                "mips2" => elf::EF_MIPS_ARCH_2,
+        Architecture::Mips | Architecture::Mips64 | Architecture::Mips64_N32 => {
+            // "N32" indicates an "ILP32" data model on a 64-bit MIPS CPU
+            // like SPARC's "v8+", x86_64's "x32", or the watchOS "arm64_32".
+            let is_32bit = architecture == Architecture::Mips;
+            let mut e_flags = match sess.target.options.cpu.as_ref() {
+                "mips1" if is_32bit => elf::EF_MIPS_ARCH_1,
+                "mips2" if is_32bit => elf::EF_MIPS_ARCH_2,
                 "mips3" => elf::EF_MIPS_ARCH_3,
                 "mips4" => elf::EF_MIPS_ARCH_4,
                 "mips5" => elf::EF_MIPS_ARCH_5,
-                s if s.contains("r6") => elf::EF_MIPS_ARCH_32R6,
-                _ => elf::EF_MIPS_ARCH_32R2,
+                "mips32r2" if is_32bit => elf::EF_MIPS_ARCH_32R2,
+                "mips32r6" if is_32bit => elf::EF_MIPS_ARCH_32R6,
+                "mips64r2" if !is_32bit => elf::EF_MIPS_ARCH_64R2,
+                "mips64r6" if !is_32bit => elf::EF_MIPS_ARCH_64R6,
+                s if s.starts_with("mips32") && !is_32bit => {
+                    sess.dcx().fatal(format!("invalid CPU `{}` for 64-bit MIPS target", s))
+                }
+                s if s.starts_with("mips64") && is_32bit => {
+                    sess.dcx().fatal(format!("invalid CPU `{}` for 32-bit MIPS target", s))
+                }
+                _ if is_32bit => elf::EF_MIPS_ARCH_32R2,
+                _ => elf::EF_MIPS_ARCH_64R2,
             };
 
-            let mut e_flags = elf::EF_MIPS_CPIC | arch;
-
-            // If the ABI is explicitly given, use it or default to O32.
-            match sess.target.options.llvm_abiname.to_lowercase().as_str() {
-                "n32" => e_flags |= elf::EF_MIPS_ABI2,
-                "o32" => e_flags |= elf::EF_MIPS_ABI_O32,
-                _ => e_flags |= elf::EF_MIPS_ABI_O32,
+            // If the ABI is explicitly given, use it, or default to O32 on 32-bit MIPS,
+            // which is the only "true" 32-bit option that LLVM supports.
+            match sess.target.options.llvm_abiname.as_ref() {
+                "o32" if is_32bit => e_flags |= elf::EF_MIPS_ABI_O32,
+                "n32" if !is_32bit => e_flags |= elf::EF_MIPS_ABI2,
+                "n64" if !is_32bit => {}
+                "" if is_32bit => e_flags |= elf::EF_MIPS_ABI_O32,
+                "" => sess.dcx().fatal("LLVM ABI must be specifed for 64-bit MIPS targets"),
+                s if is_32bit => {
+                    sess.dcx().fatal(format!("invalid LLVM ABI `{}` for 32-bit MIPS target", s))
+                }
+                s => sess.dcx().fatal(format!("invalid LLVM ABI `{}` for 64-bit MIPS target", s)),
             };
 
             if sess.target.options.relocation_model != RelocModel::Static {
-                e_flags |= elf::EF_MIPS_PIC;
+                // PIC means position-independent code. CPIC means "calls PIC".
+                // CPIC was mutually exclusive with PIC according to
+                // the SVR4 MIPS ABI https://refspecs.linuxfoundation.org/elf/mipsabi.pdf
+                // and should have only appeared on static objects with dynamically calls.
+                // At some point someone (GCC?) decided to set CPIC even for PIC.
+                // Nowadays various things expect both set on the same object file
+                // and may even error if you mix CPIC and non-CPIC object files,
+                // despite that being the entire point of the CPIC ABI extension!
+                // As we are in Rome, we do as the Romans do.
+                e_flags |= elf::EF_MIPS_PIC | elf::EF_MIPS_CPIC;
             }
             if sess.target.options.cpu.contains("r6") {
                 e_flags |= elf::EF_MIPS_NAN2008;
             }
             e_flags
         }
-        Architecture::Mips64 => {
-            // copied from `mips64el-linux-gnuabi64-gcc foo.c -c`
-            let e_flags = elf::EF_MIPS_CPIC
-                | elf::EF_MIPS_PIC
-                | if sess.target.options.cpu.contains("r6") {
-                    elf::EF_MIPS_ARCH_64R6 | elf::EF_MIPS_NAN2008
-                } else {
-                    elf::EF_MIPS_ARCH_64R2
-                };
-            e_flags
-        }
         Architecture::Riscv32 | Architecture::Riscv64 => {
             // Source: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/079772828bd10933d34121117a222b4cc0ee2200/riscv-elf.adoc
             let mut e_flags: u32 = 0x0;
diff --git a/compiler/rustc_driver_impl/Cargo.toml b/compiler/rustc_driver_impl/Cargo.toml
index c823d11126e..9da4f2dbc27 100644
--- a/compiler/rustc_driver_impl/Cargo.toml
+++ b/compiler/rustc_driver_impl/Cargo.toml
@@ -44,13 +44,13 @@ rustc_privacy = { path = "../rustc_privacy" }
 rustc_query_system = { path = "../rustc_query_system" }
 rustc_resolve = { path = "../rustc_resolve" }
 rustc_session = { path = "../rustc_session" }
-rustc_smir = { path = "../rustc_smir" }
 rustc_span = { path = "../rustc_span" }
 rustc_target = { path = "../rustc_target" }
 rustc_trait_selection = { path = "../rustc_trait_selection" }
 rustc_ty_utils = { path = "../rustc_ty_utils" }
 serde_json = "1.0.59"
 shlex = "1.0"
+stable_mir = { path = "../stable_mir", features = ["rustc_internal"] }
 tracing = { version = "0.1.35" }
 # tidy-alphabetical-end
 
diff --git a/compiler/rustc_driver_impl/src/pretty.rs b/compiler/rustc_driver_impl/src/pretty.rs
index 16d70af7e05..ec77043cd12 100644
--- a/compiler/rustc_driver_impl/src/pretty.rs
+++ b/compiler/rustc_driver_impl/src/pretty.rs
@@ -10,8 +10,8 @@ use rustc_middle::ty::{self, TyCtxt};
 use rustc_mir_build::thir::print::{thir_flat, thir_tree};
 use rustc_session::Session;
 use rustc_session::config::{OutFileName, PpHirMode, PpMode, PpSourceMode};
-use rustc_smir::rustc_internal::pretty::write_smir_pretty;
 use rustc_span::{FileName, Ident};
+use stable_mir::rustc_internal::pretty::write_smir_pretty;
 use tracing::debug;
 use {rustc_ast as ast, rustc_hir_pretty as pprust_hir};
 
diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs
index f1bc2c5ea88..f3412159a8a 100644
--- a/compiler/rustc_feature/src/unstable.rs
+++ b/compiler/rustc_feature/src/unstable.rs
@@ -510,6 +510,8 @@ declare_features! (
     (incomplete, fn_delegation, "1.76.0", Some(118212)),
     /// Allows impls for the Freeze trait.
     (internal, freeze_impls, "1.78.0", Some(121675)),
+    /// Frontmatter `---` blocks for use by external tools.
+    (unstable, frontmatter, "CURRENT_RUSTC_VERSION", Some(136889)),
     /// Allows defining gen blocks and `gen fn`.
     (unstable, gen_blocks, "1.75.0", Some(117078)),
     /// Infer generic args for both consts and types.
diff --git a/compiler/rustc_hir_typeck/src/expr_use_visitor.rs b/compiler/rustc_hir_typeck/src/expr_use_visitor.rs
index 17e13ec0a37..3493d359028 100644
--- a/compiler/rustc_hir_typeck/src/expr_use_visitor.rs
+++ b/compiler/rustc_hir_typeck/src/expr_use_visitor.rs
@@ -158,7 +158,7 @@ pub trait TypeInformationCtxt<'tcx> {
 
     fn resolve_vars_if_possible<T: TypeFoldable<TyCtxt<'tcx>>>(&self, t: T) -> T;
 
-    fn try_structurally_resolve_type(&self, span: Span, ty: Ty<'tcx>) -> Ty<'tcx>;
+    fn structurally_resolve_type(&self, span: Span, ty: Ty<'tcx>) -> Ty<'tcx>;
 
     fn report_bug(&self, span: Span, msg: impl ToString) -> Self::Error;
 
@@ -191,8 +191,8 @@ impl<'tcx> TypeInformationCtxt<'tcx> for &FnCtxt<'_, 'tcx> {
         self.infcx.resolve_vars_if_possible(t)
     }
 
-    fn try_structurally_resolve_type(&self, sp: Span, ty: Ty<'tcx>) -> Ty<'tcx> {
-        (**self).try_structurally_resolve_type(sp, ty)
+    fn structurally_resolve_type(&self, sp: Span, ty: Ty<'tcx>) -> Ty<'tcx> {
+        (**self).structurally_resolve_type(sp, ty)
     }
 
     fn report_bug(&self, span: Span, msg: impl ToString) -> Self::Error {
@@ -236,7 +236,7 @@ impl<'tcx> TypeInformationCtxt<'tcx> for (&LateContext<'tcx>, LocalDefId) {
         self.0.maybe_typeck_results().expect("expected typeck results")
     }
 
-    fn try_structurally_resolve_type(&self, _span: Span, ty: Ty<'tcx>) -> Ty<'tcx> {
+    fn structurally_resolve_type(&self, _span: Span, ty: Ty<'tcx>) -> Ty<'tcx> {
         // FIXME: Maybe need to normalize here.
         ty
     }
@@ -776,7 +776,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
 
         // Select just those fields of the `with`
         // expression that will actually be used
-        match self.cx.try_structurally_resolve_type(with_expr.span, with_place.place.ty()).kind() {
+        match self.cx.structurally_resolve_type(with_expr.span, with_place.place.ty()).kind() {
             ty::Adt(adt, args) if adt.is_struct() => {
                 // Consume those fields of the with expression that are needed.
                 for (f_index, with_field) in adt.non_enum_variant().fields.iter_enumerated() {
@@ -1176,7 +1176,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
 /// two operations: a dereference to reach the array data and then an index to
 /// jump forward to the relevant item.
 impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx, Cx, D> {
-    fn resolve_type_vars_or_bug(
+    fn expect_and_resolve_type(
         &self,
         id: HirId,
         ty: Option<Ty<'tcx>>,
@@ -1185,12 +1185,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
             Some(ty) => {
                 let ty = self.cx.resolve_vars_if_possible(ty);
                 self.cx.error_reported_in_ty(ty)?;
-                if ty.is_ty_var() {
-                    debug!("resolve_type_vars_or_bug: infer var from {:?}", ty);
-                    Err(self.cx.report_bug(self.cx.tcx().hir_span(id), "encountered type variable"))
-                } else {
-                    Ok(ty)
-                }
+                Ok(ty)
             }
             None => {
                 // FIXME: We shouldn't be relying on the infcx being tainted.
@@ -1201,15 +1196,15 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
     }
 
     fn node_ty(&self, hir_id: HirId) -> Result<Ty<'tcx>, Cx::Error> {
-        self.resolve_type_vars_or_bug(hir_id, self.cx.typeck_results().node_type_opt(hir_id))
+        self.expect_and_resolve_type(hir_id, self.cx.typeck_results().node_type_opt(hir_id))
     }
 
     fn expr_ty(&self, expr: &hir::Expr<'_>) -> Result<Ty<'tcx>, Cx::Error> {
-        self.resolve_type_vars_or_bug(expr.hir_id, self.cx.typeck_results().expr_ty_opt(expr))
+        self.expect_and_resolve_type(expr.hir_id, self.cx.typeck_results().expr_ty_opt(expr))
     }
 
     fn expr_ty_adjusted(&self, expr: &hir::Expr<'_>) -> Result<Ty<'tcx>, Cx::Error> {
-        self.resolve_type_vars_or_bug(
+        self.expect_and_resolve_type(
             expr.hir_id,
             self.cx.typeck_results().expr_ty_adjusted_opt(expr),
         )
@@ -1264,10 +1259,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
                     // a bind-by-ref means that the base_ty will be the type of the ident itself,
                     // but what we want here is the type of the underlying value being borrowed.
                     // So peel off one-level, turning the &T into T.
-                    match self
-                        .cx
-                        .try_structurally_resolve_type(pat.span, base_ty)
-                        .builtin_deref(false)
+                    match self.cx.structurally_resolve_type(pat.span, base_ty).builtin_deref(false)
                     {
                         Some(ty) => Ok(ty),
                         None => {
@@ -1513,10 +1505,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
             if node_ty != place_ty
                 && self
                     .cx
-                    .try_structurally_resolve_type(
-                        self.cx.tcx().hir_span(base_place.hir_id),
-                        place_ty,
-                    )
+                    .structurally_resolve_type(self.cx.tcx().hir_span(base_place.hir_id), place_ty)
                     .is_impl_trait()
             {
                 projections.push(Projection { kind: ProjectionKind::OpaqueCast, ty: node_ty });
@@ -1538,7 +1527,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
         let base_ty = self.expr_ty_adjusted(base)?;
 
         let ty::Ref(region, _, mutbl) =
-            *self.cx.try_structurally_resolve_type(base.span, base_ty).kind()
+            *self.cx.structurally_resolve_type(base.span, base_ty).kind()
         else {
             span_bug!(expr.span, "cat_overloaded_place: base is not a reference");
         };
@@ -1556,7 +1545,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
         let base_curr_ty = base_place.place.ty();
         let deref_ty = match self
             .cx
-            .try_structurally_resolve_type(self.cx.tcx().hir_span(base_place.hir_id), base_curr_ty)
+            .structurally_resolve_type(self.cx.tcx().hir_span(base_place.hir_id), base_curr_ty)
             .builtin_deref(true)
         {
             Some(ty) => ty,
@@ -1584,7 +1573,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
     ) -> Result<VariantIdx, Cx::Error> {
         let res = self.cx.typeck_results().qpath_res(qpath, pat_hir_id);
         let ty = self.cx.typeck_results().node_type(pat_hir_id);
-        let ty::Adt(adt_def, _) = self.cx.try_structurally_resolve_type(span, ty).kind() else {
+        let ty::Adt(adt_def, _) = self.cx.structurally_resolve_type(span, ty).kind() else {
             return Err(self
                 .cx
                 .report_bug(span, "struct or tuple struct pattern not applied to an ADT"));
@@ -1616,7 +1605,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
         span: Span,
     ) -> Result<usize, Cx::Error> {
         let ty = self.cx.typeck_results().node_type(pat_hir_id);
-        match self.cx.try_structurally_resolve_type(span, ty).kind() {
+        match self.cx.structurally_resolve_type(span, ty).kind() {
             ty::Adt(adt_def, _) => Ok(adt_def.variant(variant_index).fields.len()),
             _ => {
                 self.cx
@@ -1631,7 +1620,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
     /// Here `pat_hir_id` is the HirId of the pattern itself.
     fn total_fields_in_tuple(&self, pat_hir_id: HirId, span: Span) -> Result<usize, Cx::Error> {
         let ty = self.cx.typeck_results().node_type(pat_hir_id);
-        match self.cx.try_structurally_resolve_type(span, ty).kind() {
+        match self.cx.structurally_resolve_type(span, ty).kind() {
             ty::Tuple(args) => Ok(args.len()),
             _ => Err(self.cx.report_bug(span, "tuple pattern not applied to a tuple")),
         }
@@ -1820,7 +1809,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
             PatKind::Slice(before, ref slice, after) => {
                 let Some(element_ty) = self
                     .cx
-                    .try_structurally_resolve_type(pat.span, place_with_id.place.ty())
+                    .structurally_resolve_type(pat.span, place_with_id.place.ty())
                     .builtin_index()
                 else {
                     debug!("explicit index of non-indexable type {:?}", place_with_id);
@@ -1890,7 +1879,7 @@ impl<'tcx, Cx: TypeInformationCtxt<'tcx>, D: Delegate<'tcx>> ExprUseVisitor<'tcx
     }
 
     fn is_multivariant_adt(&self, ty: Ty<'tcx>, span: Span) -> bool {
-        if let ty::Adt(def, _) = self.cx.try_structurally_resolve_type(span, ty).kind() {
+        if let ty::Adt(def, _) = self.cx.structurally_resolve_type(span, ty).kind() {
             // Note that if a non-exhaustive SingleVariant is defined in another crate, we need
             // to assume that more cases will be added to the variant in the future. This mean
             // that we should handle non-exhaustive SingleVariant the same way we would handle
diff --git a/compiler/rustc_lexer/src/cursor.rs b/compiler/rustc_lexer/src/cursor.rs
index e0e3bd0e30b..526693d3de1 100644
--- a/compiler/rustc_lexer/src/cursor.rs
+++ b/compiler/rustc_lexer/src/cursor.rs
@@ -1,5 +1,10 @@
 use std::str::Chars;
 
+pub enum FrontmatterAllowed {
+    Yes,
+    No,
+}
+
 /// Peekable iterator over a char sequence.
 ///
 /// Next characters can be peeked via `first` method,
@@ -8,6 +13,7 @@ pub struct Cursor<'a> {
     len_remaining: usize,
     /// Iterator over chars. Slightly faster than a &str.
     chars: Chars<'a>,
+    pub(crate) frontmatter_allowed: FrontmatterAllowed,
     #[cfg(debug_assertions)]
     prev: char,
 }
@@ -15,10 +21,11 @@ pub struct Cursor<'a> {
 pub(crate) const EOF_CHAR: char = '\0';
 
 impl<'a> Cursor<'a> {
-    pub fn new(input: &'a str) -> Cursor<'a> {
+    pub fn new(input: &'a str, frontmatter_allowed: FrontmatterAllowed) -> Cursor<'a> {
         Cursor {
             len_remaining: input.len(),
             chars: input.chars(),
+            frontmatter_allowed,
             #[cfg(debug_assertions)]
             prev: EOF_CHAR,
         }
@@ -95,6 +102,11 @@ impl<'a> Cursor<'a> {
         Some(c)
     }
 
+    /// Moves to a substring by a number of bytes.
+    pub(crate) fn bump_bytes(&mut self, n: usize) {
+        self.chars = self.as_str()[n..].chars();
+    }
+
     /// Eats symbols while predicate returns true or until the end of file is reached.
     pub(crate) fn eat_while(&mut self, mut predicate: impl FnMut(char) -> bool) {
         // It was tried making optimized version of this for eg. line comments, but
diff --git a/compiler/rustc_lexer/src/lib.rs b/compiler/rustc_lexer/src/lib.rs
index f9c71b2fa65..2374f388250 100644
--- a/compiler/rustc_lexer/src/lib.rs
+++ b/compiler/rustc_lexer/src/lib.rs
@@ -35,8 +35,8 @@ pub use unicode_xid::UNICODE_VERSION as UNICODE_XID_VERSION;
 
 use self::LiteralKind::*;
 use self::TokenKind::*;
-pub use crate::cursor::Cursor;
 use crate::cursor::EOF_CHAR;
+pub use crate::cursor::{Cursor, FrontmatterAllowed};
 
 /// Parsed token.
 /// It doesn't contain information about data that has been parsed,
@@ -57,17 +57,27 @@ impl Token {
 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
 pub enum TokenKind {
     /// A line comment, e.g. `// comment`.
-    LineComment { doc_style: Option<DocStyle> },
+    LineComment {
+        doc_style: Option<DocStyle>,
+    },
 
     /// A block comment, e.g. `/* block comment */`.
     ///
     /// Block comments can be recursive, so a sequence like `/* /* */`
     /// will not be considered terminated and will result in a parsing error.
-    BlockComment { doc_style: Option<DocStyle>, terminated: bool },
+    BlockComment {
+        doc_style: Option<DocStyle>,
+        terminated: bool,
+    },
 
     /// Any whitespace character sequence.
     Whitespace,
 
+    Frontmatter {
+        has_invalid_preceding_whitespace: bool,
+        invalid_infostring: bool,
+    },
+
     /// An identifier or keyword, e.g. `ident` or `continue`.
     Ident,
 
@@ -109,10 +119,15 @@ pub enum TokenKind {
     /// this type will need to check for and reject that case.
     ///
     /// See [LiteralKind] for more details.
-    Literal { kind: LiteralKind, suffix_start: u32 },
+    Literal {
+        kind: LiteralKind,
+        suffix_start: u32,
+    },
 
     /// A lifetime, e.g. `'a`.
-    Lifetime { starts_with_number: bool },
+    Lifetime {
+        starts_with_number: bool,
+    },
 
     /// `;`
     Semi,
@@ -280,7 +295,7 @@ pub fn strip_shebang(input: &str) -> Option<usize> {
 #[inline]
 pub fn validate_raw_str(input: &str, prefix_len: u32) -> Result<(), RawStrError> {
     debug_assert!(!input.is_empty());
-    let mut cursor = Cursor::new(input);
+    let mut cursor = Cursor::new(input, FrontmatterAllowed::No);
     // Move past the leading `r` or `br`.
     for _ in 0..prefix_len {
         cursor.bump().unwrap();
@@ -290,7 +305,7 @@ pub fn validate_raw_str(input: &str, prefix_len: u32) -> Result<(), RawStrError>
 
 /// Creates an iterator that produces tokens from the input string.
 pub fn tokenize(input: &str) -> impl Iterator<Item = Token> {
-    let mut cursor = Cursor::new(input);
+    let mut cursor = Cursor::new(input, FrontmatterAllowed::No);
     std::iter::from_fn(move || {
         let token = cursor.advance_token();
         if token.kind != TokenKind::Eof { Some(token) } else { None }
@@ -361,7 +376,34 @@ impl Cursor<'_> {
             Some(c) => c,
             None => return Token::new(TokenKind::Eof, 0),
         };
+
         let token_kind = match first_char {
+            c if matches!(self.frontmatter_allowed, FrontmatterAllowed::Yes)
+                && is_whitespace(c) =>
+            {
+                let mut last = first_char;
+                while is_whitespace(self.first()) {
+                    let Some(c) = self.bump() else {
+                        break;
+                    };
+                    last = c;
+                }
+                // invalid frontmatter opening as whitespace preceding it isn't newline.
+                // combine the whitespace and the frontmatter to a single token as we shall
+                // error later.
+                if last != '\n' && self.as_str().starts_with("---") {
+                    self.bump();
+                    self.frontmatter(true)
+                } else {
+                    Whitespace
+                }
+            }
+            '-' if matches!(self.frontmatter_allowed, FrontmatterAllowed::Yes)
+                && self.as_str().starts_with("--") =>
+            {
+                // happy path
+                self.frontmatter(false)
+            }
             // Slash, comment or block comment.
             '/' => match self.first() {
                 '/' => self.line_comment(),
@@ -464,11 +506,110 @@ impl Cursor<'_> {
             c if !c.is_ascii() && c.is_emoji_char() => self.invalid_ident(),
             _ => Unknown,
         };
+        if matches!(self.frontmatter_allowed, FrontmatterAllowed::Yes)
+            && !matches!(token_kind, Whitespace)
+        {
+            // stop allowing frontmatters after first non-whitespace token
+            self.frontmatter_allowed = FrontmatterAllowed::No;
+        }
         let res = Token::new(token_kind, self.pos_within_token());
         self.reset_pos_within_token();
         res
     }
 
+    /// Given that one `-` was eaten, eat the rest of the frontmatter.
+    fn frontmatter(&mut self, has_invalid_preceding_whitespace: bool) -> TokenKind {
+        debug_assert_eq!('-', self.prev());
+
+        let pos = self.pos_within_token();
+        self.eat_while(|c| c == '-');
+
+        // one `-` is eaten by the caller.
+        let length_opening = self.pos_within_token() - pos + 1;
+
+        // must be ensured by the caller
+        debug_assert!(length_opening >= 3);
+
+        // whitespace between the opening and the infostring.
+        self.eat_while(|ch| ch != '\n' && is_whitespace(ch));
+
+        // copied from `eat_identifier`, but allows `.` in infostring to allow something like
+        // `---Cargo.toml` as a valid opener
+        if is_id_start(self.first()) {
+            self.bump();
+            self.eat_while(|c| is_id_continue(c) || c == '.');
+        }
+
+        self.eat_while(|ch| ch != '\n' && is_whitespace(ch));
+        let invalid_infostring = self.first() != '\n';
+
+        let mut s = self.as_str();
+        let mut found = false;
+        while let Some(closing) = s.find(&"-".repeat(length_opening as usize)) {
+            let preceding_chars_start = s[..closing].rfind("\n").map_or(0, |i| i + 1);
+            if s[preceding_chars_start..closing].chars().all(is_whitespace) {
+                // candidate found
+                self.bump_bytes(closing);
+                // in case like
+                // ---cargo
+                // --- blahblah
+                // or
+                // ---cargo
+                // ----
+                // combine those stuff into this frontmatter token such that it gets detected later.
+                self.eat_until(b'\n');
+                found = true;
+                break;
+            } else {
+                s = &s[closing + length_opening as usize..];
+            }
+        }
+
+        if !found {
+            // recovery strategy: a closing statement might have precending whitespace/newline
+            // but not have enough dashes to properly close. In this case, we eat until there,
+            // and report a mismatch in the parser.
+            let mut rest = self.as_str();
+            // We can look for a shorter closing (starting with four dashes but closing with three)
+            // and other indications that Rust has started and the infostring has ended.
+            let mut potential_closing = rest
+                .find("\n---")
+                // n.b. only in the case where there are dashes, we move the index to the line where
+                // the dashes start as we eat to include that line. For other cases those are Rust code
+                // and not included in the frontmatter.
+                .map(|x| x + 1)
+                .or_else(|| rest.find("\nuse "))
+                .or_else(|| rest.find("\n//!"))
+                .or_else(|| rest.find("\n#!["));
+
+            if potential_closing.is_none() {
+                // a less fortunate recovery if all else fails which finds any dashes preceded by whitespace
+                // on a standalone line. Might be wrong.
+                while let Some(closing) = rest.find("---") {
+                    let preceding_chars_start = rest[..closing].rfind("\n").map_or(0, |i| i + 1);
+                    if rest[preceding_chars_start..closing].chars().all(is_whitespace) {
+                        // candidate found
+                        potential_closing = Some(closing);
+                        break;
+                    } else {
+                        rest = &rest[closing + 3..];
+                    }
+                }
+            }
+
+            if let Some(potential_closing) = potential_closing {
+                // bump to the potential closing, and eat everything on that line.
+                self.bump_bytes(potential_closing);
+                self.eat_until(b'\n');
+            } else {
+                // eat everything. this will get reported as an unclosed frontmatter.
+                self.eat_while(|_| true);
+            }
+        }
+
+        Frontmatter { has_invalid_preceding_whitespace, invalid_infostring }
+    }
+
     fn line_comment(&mut self) -> TokenKind {
         debug_assert!(self.prev() == '/' && self.first() == '/');
         self.bump();
diff --git a/compiler/rustc_lexer/src/tests.rs b/compiler/rustc_lexer/src/tests.rs
index 8203ae70b07..fc8d9b9d57b 100644
--- a/compiler/rustc_lexer/src/tests.rs
+++ b/compiler/rustc_lexer/src/tests.rs
@@ -4,7 +4,7 @@ use super::*;
 
 fn check_raw_str(s: &str, expected: Result<u8, RawStrError>) {
     let s = &format!("r{}", s);
-    let mut cursor = Cursor::new(s);
+    let mut cursor = Cursor::new(s, FrontmatterAllowed::No);
     cursor.bump();
     let res = cursor.raw_double_quoted_string(0);
     assert_eq!(res, expected);
diff --git a/compiler/rustc_metadata/src/rmeta/encoder.rs b/compiler/rustc_metadata/src/rmeta/encoder.rs
index bbff570d6c6..7ac72ef814a 100644
--- a/compiler/rustc_metadata/src/rmeta/encoder.rs
+++ b/compiler/rustc_metadata/src/rmeta/encoder.rs
@@ -551,8 +551,6 @@ impl<'a, 'tcx> EncodeContext<'a, 'tcx> {
 
             match source_file.name {
                 FileName::Real(ref original_file_name) => {
-                    // FIXME: This should probably to conditionally remapped under
-                    // a RemapPathScopeComponents but which one?
                     let adapted_file_name = source_map
                         .path_mapping()
                         .to_embeddable_absolute_path(original_file_name.clone(), working_directory);
diff --git a/compiler/rustc_parse/messages.ftl b/compiler/rustc_parse/messages.ftl
index ac4f7ed64e2..3e953e6c855 100644
--- a/compiler/rustc_parse/messages.ftl
+++ b/compiler/rustc_parse/messages.ftl
@@ -297,6 +297,19 @@ parse_forgot_paren = perhaps you forgot parentheses?
 parse_found_expr_would_be_stmt = expected expression, found `{$token}`
     .label = expected expression
 
+parse_frontmatter_extra_characters_after_close = extra characters after frontmatter close are not allowed
+parse_frontmatter_invalid_close_preceding_whitespace = invalid preceding whitespace for frontmatter close
+    .note = frontmatter close should not be preceded by whitespace
+parse_frontmatter_invalid_infostring = invalid infostring for frontmatter
+    .note = frontmatter infostrings must be a single identifier immediately following the opening
+parse_frontmatter_invalid_opening_preceding_whitespace = invalid preceding whitespace for frontmatter opening
+    .note = frontmatter opening should not be preceded by whitespace
+parse_frontmatter_length_mismatch = frontmatter close does not match the opening
+    .label_opening = the opening here has {$len_opening} dashes...
+    .label_close = ...while the close has {$len_close} dashes
+parse_frontmatter_unclosed = unclosed frontmatter
+    .note = frontmatter opening here was not closed
+
 parse_function_body_equals_expr = function body cannot be `= expression;`
     .suggestion = surround the expression with `{"{"}` and `{"}"}` instead of `=` and `;`
 
diff --git a/compiler/rustc_parse/src/errors.rs b/compiler/rustc_parse/src/errors.rs
index 6a6fb0eb9b5..9e5c81d44a5 100644
--- a/compiler/rustc_parse/src/errors.rs
+++ b/compiler/rustc_parse/src/errors.rs
@@ -736,6 +736,61 @@ pub(crate) struct FoundExprWouldBeStmt {
 }
 
 #[derive(Diagnostic)]
+#[diag(parse_frontmatter_extra_characters_after_close)]
+pub(crate) struct FrontmatterExtraCharactersAfterClose {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_frontmatter_invalid_infostring)]
+#[note]
+pub(crate) struct FrontmatterInvalidInfostring {
+    #[primary_span]
+    pub span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_frontmatter_invalid_opening_preceding_whitespace)]
+pub(crate) struct FrontmatterInvalidOpeningPrecedingWhitespace {
+    #[primary_span]
+    pub span: Span,
+    #[note]
+    pub note_span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_frontmatter_unclosed)]
+pub(crate) struct FrontmatterUnclosed {
+    #[primary_span]
+    pub span: Span,
+    #[note]
+    pub note_span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_frontmatter_invalid_close_preceding_whitespace)]
+pub(crate) struct FrontmatterInvalidClosingPrecedingWhitespace {
+    #[primary_span]
+    pub span: Span,
+    #[note]
+    pub note_span: Span,
+}
+
+#[derive(Diagnostic)]
+#[diag(parse_frontmatter_length_mismatch)]
+pub(crate) struct FrontmatterLengthMismatch {
+    #[primary_span]
+    pub span: Span,
+    #[label(parse_label_opening)]
+    pub opening: Span,
+    #[label(parse_label_close)]
+    pub close: Span,
+    pub len_opening: usize,
+    pub len_close: usize,
+}
+
+#[derive(Diagnostic)]
 #[diag(parse_leading_plus_not_supported)]
 pub(crate) struct LeadingPlusNotSupported {
     #[primary_span]
diff --git a/compiler/rustc_parse/src/lexer/mod.rs b/compiler/rustc_parse/src/lexer/mod.rs
index e8a5cae54cf..78c5742414b 100644
--- a/compiler/rustc_parse/src/lexer/mod.rs
+++ b/compiler/rustc_parse/src/lexer/mod.rs
@@ -7,7 +7,9 @@ use rustc_ast::tokenstream::TokenStream;
 use rustc_ast::util::unicode::contains_text_flow_control_chars;
 use rustc_errors::codes::*;
 use rustc_errors::{Applicability, Diag, DiagCtxtHandle, StashKey};
-use rustc_lexer::{Base, Cursor, DocStyle, LiteralKind, RawStrError};
+use rustc_lexer::{
+    Base, Cursor, DocStyle, FrontmatterAllowed, LiteralKind, RawStrError, is_whitespace,
+};
 use rustc_literal_escaper::{EscapeError, Mode, unescape_mixed, unescape_unicode};
 use rustc_session::lint::BuiltinLintDiag;
 use rustc_session::lint::builtin::{
@@ -15,7 +17,7 @@ use rustc_session::lint::builtin::{
     TEXT_DIRECTION_CODEPOINT_IN_COMMENT,
 };
 use rustc_session::parse::ParseSess;
-use rustc_span::{BytePos, Pos, Span, Symbol};
+use rustc_span::{BytePos, Pos, Span, Symbol, sym};
 use tracing::debug;
 
 use crate::errors;
@@ -56,7 +58,7 @@ pub(crate) fn lex_token_trees<'psess, 'src>(
         start_pos = start_pos + BytePos::from_usize(shebang_len);
     }
 
-    let cursor = Cursor::new(src);
+    let cursor = Cursor::new(src, FrontmatterAllowed::Yes);
     let mut lexer = Lexer {
         psess,
         start_pos,
@@ -193,6 +195,11 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
                     let content = self.str_from_to(content_start, content_end);
                     self.cook_doc_comment(content_start, content, CommentKind::Block, doc_style)
                 }
+                rustc_lexer::TokenKind::Frontmatter { has_invalid_preceding_whitespace, invalid_infostring } => {
+                    self.validate_frontmatter(start, has_invalid_preceding_whitespace, invalid_infostring);
+                    preceded_by_whitespace = true;
+                    continue;
+                }
                 rustc_lexer::TokenKind::Whitespace => {
                     preceded_by_whitespace = true;
                     continue;
@@ -256,7 +263,7 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
                     // was consumed.
                     let lit_start = start + BytePos(prefix_len);
                     self.pos = lit_start;
-                    self.cursor = Cursor::new(&str_before[prefix_len as usize..]);
+                    self.cursor = Cursor::new(&str_before[prefix_len as usize..], FrontmatterAllowed::No);
                     self.report_unknown_prefix(start);
                     let prefix_span = self.mk_sp(start, lit_start);
                     return (Token::new(self.ident(start), prefix_span), preceded_by_whitespace);
@@ -361,7 +368,7 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
                         // Reset the state so we just lex the `'r`.
                         let lt_start = start + BytePos(2);
                         self.pos = lt_start;
-                        self.cursor = Cursor::new(&str_before[2 as usize..]);
+                        self.cursor = Cursor::new(&str_before[2 as usize..], FrontmatterAllowed::No);
 
                         let lifetime_name = self.str_from(start);
                         let ident = Symbol::intern(lifetime_name);
@@ -474,6 +481,91 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
         }
     }
 
+    fn validate_frontmatter(
+        &self,
+        start: BytePos,
+        has_invalid_preceding_whitespace: bool,
+        invalid_infostring: bool,
+    ) {
+        let s = self.str_from(start);
+        let real_start = s.find("---").unwrap();
+        let frontmatter_opening_pos = BytePos(real_start as u32) + start;
+        let s_new = &s[real_start..];
+        let within = s_new.trim_start_matches('-');
+        let len_opening = s_new.len() - within.len();
+
+        let frontmatter_opening_end_pos = frontmatter_opening_pos + BytePos(len_opening as u32);
+        if has_invalid_preceding_whitespace {
+            let line_start =
+                BytePos(s[..real_start].rfind("\n").map_or(0, |i| i as u32 + 1)) + start;
+            let span = self.mk_sp(line_start, frontmatter_opening_end_pos);
+            let label_span = self.mk_sp(line_start, frontmatter_opening_pos);
+            self.dcx().emit_err(errors::FrontmatterInvalidOpeningPrecedingWhitespace {
+                span,
+                note_span: label_span,
+            });
+        }
+
+        if invalid_infostring {
+            let line_end = s[real_start..].find('\n').unwrap_or(s[real_start..].len());
+            let span = self.mk_sp(
+                frontmatter_opening_end_pos,
+                frontmatter_opening_pos + BytePos(line_end as u32),
+            );
+            self.dcx().emit_err(errors::FrontmatterInvalidInfostring { span });
+        }
+
+        let last_line_start = within.rfind('\n').map_or(0, |i| i + 1);
+        let last_line = &within[last_line_start..];
+        let last_line_trimmed = last_line.trim_start_matches(is_whitespace);
+        let last_line_start_pos = frontmatter_opening_end_pos + BytePos(last_line_start as u32);
+
+        let frontmatter_span = self.mk_sp(frontmatter_opening_pos, self.pos);
+        self.psess.gated_spans.gate(sym::frontmatter, frontmatter_span);
+
+        if !last_line_trimmed.starts_with("---") {
+            let label_span = self.mk_sp(frontmatter_opening_pos, frontmatter_opening_end_pos);
+            self.dcx().emit_err(errors::FrontmatterUnclosed {
+                span: frontmatter_span,
+                note_span: label_span,
+            });
+            return;
+        }
+
+        if last_line_trimmed.len() != last_line.len() {
+            let line_end = last_line_start_pos + BytePos(last_line.len() as u32);
+            let span = self.mk_sp(last_line_start_pos, line_end);
+            let whitespace_end =
+                last_line_start_pos + BytePos((last_line.len() - last_line_trimmed.len()) as u32);
+            let label_span = self.mk_sp(last_line_start_pos, whitespace_end);
+            self.dcx().emit_err(errors::FrontmatterInvalidClosingPrecedingWhitespace {
+                span,
+                note_span: label_span,
+            });
+        }
+
+        let rest = last_line_trimmed.trim_start_matches('-');
+        let len_close = last_line_trimmed.len() - rest.len();
+        if len_close != len_opening {
+            let span = self.mk_sp(frontmatter_opening_pos, self.pos);
+            let opening = self.mk_sp(frontmatter_opening_pos, frontmatter_opening_end_pos);
+            let last_line_close_pos = last_line_start_pos + BytePos(len_close as u32);
+            let close = self.mk_sp(last_line_start_pos, last_line_close_pos);
+            self.dcx().emit_err(errors::FrontmatterLengthMismatch {
+                span,
+                opening,
+                close,
+                len_opening,
+                len_close,
+            });
+        }
+
+        if !rest.trim_matches(is_whitespace).is_empty() {
+            let span = self.mk_sp(last_line_start_pos, self.pos);
+            self.dcx().emit_err(errors::FrontmatterExtraCharactersAfterClose { span });
+        }
+    }
+
     fn cook_doc_comment(
         &self,
         content_start: BytePos,
@@ -839,7 +931,7 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
         let space_pos = start + BytePos(1);
         let space_span = self.mk_sp(space_pos, space_pos);
 
-        let mut cursor = Cursor::new(str_before);
+        let mut cursor = Cursor::new(str_before, FrontmatterAllowed::No);
 
         let (is_string, span, unterminated) = match cursor.guarded_double_quoted_string() {
             Some(rustc_lexer::GuardedStr { n_hashes, terminated, token_len }) => {
@@ -905,7 +997,7 @@ impl<'psess, 'src> Lexer<'psess, 'src> {
             // For backwards compatibility, roll back to after just the first `#`
             // and return the `Pound` token.
             self.pos = start + BytePos(1);
-            self.cursor = Cursor::new(&str_before[1..]);
+            self.cursor = Cursor::new(&str_before[1..], FrontmatterAllowed::No);
             token::Pound
         }
     }
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index a9d9236d318..60e1b465ba9 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -24,7 +24,8 @@ use rustc_macros::{Decodable, Encodable, HashStable_Generic};
 use rustc_span::edition::{DEFAULT_EDITION, EDITION_NAME_LIST, Edition, LATEST_STABLE_EDITION};
 use rustc_span::source_map::FilePathMapping;
 use rustc_span::{
-    FileName, FileNameDisplayPreference, RealFileName, SourceFileHashAlgorithm, Symbol, sym,
+    FileName, FileNameDisplayPreference, FileNameEmbeddablePreference, RealFileName,
+    SourceFileHashAlgorithm, Symbol, sym,
 };
 use rustc_target::spec::{
     FramePointer, LinkSelfContainedComponents, LinkerFeatures, SplitDebuginfo, Target, TargetTuple,
@@ -1320,6 +1321,11 @@ fn file_path_mapping(
         } else {
             FileNameDisplayPreference::Local
         },
+        if unstable_opts.remap_path_scope.is_all() {
+            FileNameEmbeddablePreference::RemappedOnly
+        } else {
+            FileNameEmbeddablePreference::LocalAndRemapped
+        },
     )
 }
 
diff --git a/compiler/rustc_span/src/lib.rs b/compiler/rustc_span/src/lib.rs
index 9722031f209..6fcf77e31a2 100644
--- a/compiler/rustc_span/src/lib.rs
+++ b/compiler/rustc_span/src/lib.rs
@@ -224,7 +224,7 @@ pub fn with_metavar_spans<R>(f: impl FnOnce(&MetavarSpansMap) -> R) -> R {
 
 // FIXME: We should use this enum or something like it to get rid of the
 // use of magic `/rust/1.x/...` paths across the board.
-#[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd, Decodable)]
+#[derive(Debug, Eq, PartialEq, Clone, Ord, PartialOrd, Decodable, Encodable)]
 pub enum RealFileName {
     LocalPath(PathBuf),
     /// For remapped paths (namely paths into libstd that have been mapped
@@ -250,28 +250,6 @@ impl Hash for RealFileName {
     }
 }
 
-// This is functionally identical to #[derive(Encodable)], with the exception of
-// an added assert statement
-impl<S: Encoder> Encodable<S> for RealFileName {
-    fn encode(&self, encoder: &mut S) {
-        match *self {
-            RealFileName::LocalPath(ref local_path) => {
-                encoder.emit_u8(0);
-                local_path.encode(encoder);
-            }
-
-            RealFileName::Remapped { ref local_path, ref virtual_name } => {
-                encoder.emit_u8(1);
-                // For privacy and build reproducibility, we must not embed host-dependant path
-                // in artifacts if they have been remapped by --remap-path-prefix
-                assert!(local_path.is_none());
-                local_path.encode(encoder);
-                virtual_name.encode(encoder);
-            }
-        }
-    }
-}
-
 impl RealFileName {
     /// Returns the path suitable for reading from the file system on the local host,
     /// if this information exists.
@@ -369,6 +347,16 @@ impl From<PathBuf> for FileName {
 }
 
 #[derive(Clone, Copy, Eq, PartialEq, Hash, Debug)]
+pub enum FileNameEmbeddablePreference {
+    /// If a remapped path is available, only embed the `virtual_path` and omit the `local_path`.
+    ///
+    /// Otherwise embed the local-path into the `virtual_path`.
+    RemappedOnly,
+    /// Embed the original path as well as its remapped `virtual_path` component if available.
+    LocalAndRemapped,
+}
+
+#[derive(Clone, Copy, Eq, PartialEq, Hash, Debug)]
 pub enum FileNameDisplayPreference {
     /// Display the path after the application of rewrite rules provided via `--remap-path-prefix`.
     /// This is appropriate for paths that get embedded into files produced by the compiler.
diff --git a/compiler/rustc_span/src/source_map.rs b/compiler/rustc_span/src/source_map.rs
index 0273bb040f4..8a3644163ca 100644
--- a/compiler/rustc_span/src/source_map.rs
+++ b/compiler/rustc_span/src/source_map.rs
@@ -1108,18 +1108,28 @@ pub fn get_source_map() -> Option<Arc<SourceMap>> {
 pub struct FilePathMapping {
     mapping: Vec<(PathBuf, PathBuf)>,
     filename_display_for_diagnostics: FileNameDisplayPreference,
+    filename_embeddable_preference: FileNameEmbeddablePreference,
 }
 
 impl FilePathMapping {
     pub fn empty() -> FilePathMapping {
-        FilePathMapping::new(Vec::new(), FileNameDisplayPreference::Local)
+        FilePathMapping::new(
+            Vec::new(),
+            FileNameDisplayPreference::Local,
+            FileNameEmbeddablePreference::RemappedOnly,
+        )
     }
 
     pub fn new(
         mapping: Vec<(PathBuf, PathBuf)>,
         filename_display_for_diagnostics: FileNameDisplayPreference,
+        filename_embeddable_preference: FileNameEmbeddablePreference,
     ) -> FilePathMapping {
-        FilePathMapping { mapping, filename_display_for_diagnostics }
+        FilePathMapping {
+            mapping,
+            filename_display_for_diagnostics,
+            filename_embeddable_preference,
+        }
     }
 
     /// Applies any path prefix substitution as defined by the mapping.
@@ -1217,11 +1227,13 @@ impl FilePathMapping {
     ) -> RealFileName {
         match file_path {
             // Anything that's already remapped we don't modify, except for erasing
-            // the `local_path` portion.
-            RealFileName::Remapped { local_path: _, virtual_name } => {
+            // the `local_path` portion (if desired).
+            RealFileName::Remapped { local_path, virtual_name } => {
                 RealFileName::Remapped {
-                    // We do not want any local path to be exported into metadata
-                    local_path: None,
+                    local_path: match self.filename_embeddable_preference {
+                        FileNameEmbeddablePreference::RemappedOnly => None,
+                        FileNameEmbeddablePreference::LocalAndRemapped => local_path,
+                    },
                     // We use the remapped name verbatim, even if it looks like a relative
                     // path. The assumption is that the user doesn't want us to further
                     // process paths that have gone through remapping.
@@ -1231,12 +1243,18 @@ impl FilePathMapping {
 
             RealFileName::LocalPath(unmapped_file_path) => {
                 // If no remapping has been applied yet, try to do so
-                let (new_path, was_remapped) = self.map_prefix(unmapped_file_path);
+                let (new_path, was_remapped) = self.map_prefix(&unmapped_file_path);
                 if was_remapped {
                     // It was remapped, so don't modify further
                     return RealFileName::Remapped {
-                        local_path: None,
                         virtual_name: new_path.into_owned(),
+                        // But still provide the local path if desired
+                        local_path: match self.filename_embeddable_preference {
+                            FileNameEmbeddablePreference::RemappedOnly => None,
+                            FileNameEmbeddablePreference::LocalAndRemapped => {
+                                Some(unmapped_file_path)
+                            }
+                        },
                     };
                 }
 
@@ -1252,17 +1270,23 @@ impl FilePathMapping {
 
                 match working_directory {
                     RealFileName::LocalPath(unmapped_working_dir_abs) => {
-                        let file_path_abs = unmapped_working_dir_abs.join(unmapped_file_path_rel);
+                        let unmapped_file_path_abs =
+                            unmapped_working_dir_abs.join(unmapped_file_path_rel);
 
                         // Although neither `working_directory` nor the file name were subject
                         // to path remapping, the concatenation between the two may be. Hence
                         // we need to do a remapping here.
-                        let (file_path_abs, was_remapped) = self.map_prefix(file_path_abs);
+                        let (file_path_abs, was_remapped) =
+                            self.map_prefix(&unmapped_file_path_abs);
                         if was_remapped {
                             RealFileName::Remapped {
-                                // Erase the actual path
-                                local_path: None,
                                 virtual_name: file_path_abs.into_owned(),
+                                local_path: match self.filename_embeddable_preference {
+                                    FileNameEmbeddablePreference::RemappedOnly => None,
+                                    FileNameEmbeddablePreference::LocalAndRemapped => {
+                                        Some(unmapped_file_path_abs)
+                                    }
+                                },
                             }
                         } else {
                             // No kind of remapping applied to this path, so
@@ -1271,15 +1295,20 @@ impl FilePathMapping {
                         }
                     }
                     RealFileName::Remapped {
-                        local_path: _,
+                        local_path,
                         virtual_name: remapped_working_dir_abs,
                     } => {
                         // If working_directory has been remapped, then we emit
                         // Remapped variant as the expanded path won't be valid
                         RealFileName::Remapped {
-                            local_path: None,
                             virtual_name: Path::new(remapped_working_dir_abs)
-                                .join(unmapped_file_path_rel),
+                                .join(&unmapped_file_path_rel),
+                            local_path: match self.filename_embeddable_preference {
+                                FileNameEmbeddablePreference::RemappedOnly => None,
+                                FileNameEmbeddablePreference::LocalAndRemapped => local_path
+                                    .as_ref()
+                                    .map(|local_path| local_path.join(unmapped_file_path_rel)),
+                            },
                         }
                     }
                 }
@@ -1287,27 +1316,6 @@ impl FilePathMapping {
         }
     }
 
-    /// Expand a relative path to an absolute path **without** remapping taken into account.
-    ///
-    /// The resulting `RealFileName` will have its `virtual_path` portion erased if
-    /// possible (i.e. if there's also a remapped path).
-    pub fn to_local_embeddable_absolute_path(
-        &self,
-        file_path: RealFileName,
-        working_directory: &RealFileName,
-    ) -> RealFileName {
-        let file_path = file_path.local_path_if_available();
-        if file_path.is_absolute() {
-            // No remapping has applied to this path and it is absolute,
-            // so the working directory cannot influence it either, so
-            // we are done.
-            return RealFileName::LocalPath(file_path.to_path_buf());
-        }
-        debug_assert!(file_path.is_relative());
-        let working_directory = working_directory.local_path_if_available();
-        RealFileName::LocalPath(Path::new(working_directory).join(file_path))
-    }
-
     /// Attempts to (heuristically) reverse a prefix mapping.
     ///
     /// Returns [`Some`] if there is exactly one mapping where the "to" part is
diff --git a/compiler/rustc_span/src/source_map/tests.rs b/compiler/rustc_span/src/source_map/tests.rs
index 957f55e3913..589c2a36354 100644
--- a/compiler/rustc_span/src/source_map/tests.rs
+++ b/compiler/rustc_span/src/source_map/tests.rs
@@ -305,6 +305,7 @@ fn path_prefix_remapping() {
         let mapping = &FilePathMapping::new(
             vec![(path("abc/def"), path("foo"))],
             FileNameDisplayPreference::Remapped,
+            FileNameEmbeddablePreference::RemappedOnly,
         );
 
         assert_eq!(map_path_prefix(mapping, "abc/def/src/main.rs"), path_str("foo/src/main.rs"));
@@ -316,6 +317,7 @@ fn path_prefix_remapping() {
         let mapping = &FilePathMapping::new(
             vec![(path("abc/def"), path("/foo"))],
             FileNameDisplayPreference::Remapped,
+            FileNameEmbeddablePreference::RemappedOnly,
         );
 
         assert_eq!(map_path_prefix(mapping, "abc/def/src/main.rs"), path_str("/foo/src/main.rs"));
@@ -327,6 +329,7 @@ fn path_prefix_remapping() {
         let mapping = &FilePathMapping::new(
             vec![(path("/abc/def"), path("foo"))],
             FileNameDisplayPreference::Remapped,
+            FileNameEmbeddablePreference::RemappedOnly,
         );
 
         assert_eq!(map_path_prefix(mapping, "/abc/def/src/main.rs"), path_str("foo/src/main.rs"));
@@ -338,6 +341,7 @@ fn path_prefix_remapping() {
         let mapping = &FilePathMapping::new(
             vec![(path("/abc/def"), path("/foo"))],
             FileNameDisplayPreference::Remapped,
+            FileNameEmbeddablePreference::RemappedOnly,
         );
 
         assert_eq!(map_path_prefix(mapping, "/abc/def/src/main.rs"), path_str("/foo/src/main.rs"));
@@ -351,6 +355,7 @@ fn path_prefix_remapping_expand_to_absolute() {
     let mapping = &FilePathMapping::new(
         vec![(path("/foo"), path("FOO")), (path("/bar"), path("BAR"))],
         FileNameDisplayPreference::Remapped,
+        FileNameEmbeddablePreference::RemappedOnly,
     );
     let working_directory = path("/foo");
     let working_directory = RealFileName::Remapped {
@@ -449,12 +454,78 @@ fn path_prefix_remapping_expand_to_absolute() {
 }
 
 #[test]
+fn path_prefix_remapping_expand_to_absolute_and_local() {
+    // "virtual" working directory is relative path
+    let mapping = &FilePathMapping::new(
+        vec![(path("/foo"), path("FOO")), (path("/bar"), path("BAR"))],
+        FileNameDisplayPreference::Remapped,
+        FileNameEmbeddablePreference::LocalAndRemapped,
+    );
+    let working_directory = path("/foo");
+    let working_directory = RealFileName::Remapped {
+        local_path: Some(working_directory.clone()),
+        virtual_name: mapping.map_prefix(working_directory).0.into_owned(),
+    };
+
+    assert_eq!(working_directory.remapped_path_if_available(), path("FOO"));
+
+    // Unmapped absolute path
+    assert_eq!(
+        mapping.to_embeddable_absolute_path(
+            RealFileName::LocalPath(path("/foo/src/main.rs")),
+            &working_directory
+        ),
+        RealFileName::Remapped {
+            local_path: Some(path("/foo/src/main.rs")),
+            virtual_name: path("FOO/src/main.rs")
+        }
+    );
+
+    // Unmapped absolute path with unrelated working directory
+    assert_eq!(
+        mapping.to_embeddable_absolute_path(
+            RealFileName::LocalPath(path("/bar/src/main.rs")),
+            &working_directory
+        ),
+        RealFileName::Remapped {
+            local_path: Some(path("/bar/src/main.rs")),
+            virtual_name: path("BAR/src/main.rs")
+        }
+    );
+
+    // Already remapped absolute path, with unrelated working directory
+    assert_eq!(
+        mapping.to_embeddable_absolute_path(
+            RealFileName::Remapped {
+                local_path: Some(path("/bar/src/main.rs")),
+                virtual_name: path("BAR/src/main.rs"),
+            },
+            &working_directory
+        ),
+        RealFileName::Remapped {
+            local_path: Some(path("/bar/src/main.rs")),
+            virtual_name: path("BAR/src/main.rs")
+        }
+    );
+
+    // Already remapped relative path
+    assert_eq!(
+        mapping.to_embeddable_absolute_path(
+            RealFileName::Remapped { local_path: None, virtual_name: path("XYZ/src/main.rs") },
+            &working_directory
+        ),
+        RealFileName::Remapped { local_path: None, virtual_name: path("XYZ/src/main.rs") }
+    );
+}
+
+#[test]
 fn path_prefix_remapping_reverse() {
     // Ignores options without alphanumeric chars.
     {
         let mapping = &FilePathMapping::new(
             vec![(path("abc"), path("/")), (path("def"), path("."))],
             FileNameDisplayPreference::Remapped,
+            FileNameEmbeddablePreference::RemappedOnly,
         );
 
         assert_eq!(reverse_map_prefix(mapping, "/hello.rs"), None);
@@ -466,6 +537,7 @@ fn path_prefix_remapping_reverse() {
         let mapping = &FilePathMapping::new(
             vec![(path("abc"), path("/redacted")), (path("def"), path("/redacted"))],
             FileNameDisplayPreference::Remapped,
+            FileNameEmbeddablePreference::RemappedOnly,
         );
 
         assert_eq!(reverse_map_prefix(mapping, "/redacted/hello.rs"), None);
@@ -476,6 +548,7 @@ fn path_prefix_remapping_reverse() {
         let mapping = &FilePathMapping::new(
             vec![(path("abc"), path("/redacted")), (path("def/ghi"), path("/fake/dir"))],
             FileNameDisplayPreference::Remapped,
+            FileNameEmbeddablePreference::RemappedOnly,
         );
 
         assert_eq!(
diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs
index 31d129c3465..ea142e3d482 100644
--- a/compiler/rustc_span/src/symbol.rs
+++ b/compiler/rustc_span/src/symbol.rs
@@ -1049,6 +1049,7 @@ symbols! {
         from_u16,
         from_usize,
         from_yeet,
+        frontmatter,
         fs_create_dir,
         fsub_algebraic,
         fsub_fast,
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 37ea0d6e7b5..303be54a6d7 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -3567,7 +3567,19 @@ impl Target {
             "x86" => (Architecture::I386, None),
             "s390x" => (Architecture::S390x, None),
             "mips" | "mips32r6" => (Architecture::Mips, None),
-            "mips64" | "mips64r6" => (Architecture::Mips64, None),
+            "mips64" | "mips64r6" => (
+                // While there are currently no builtin targets
+                // using the N32 ABI, it is possible to specify
+                // it using a custom target specification. N32
+                // is an ILP32 ABI like the Aarch64_Ilp32
+                // and X86_64_X32 cases above and below this one.
+                if self.options.llvm_abiname.as_ref() == "n32" {
+                    Architecture::Mips64_N32
+                } else {
+                    Architecture::Mips64
+                },
+                None,
+            ),
             "x86_64" => (
                 if self.pointer_width == 32 {
                     Architecture::X86_64_X32
diff --git a/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs b/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs
index 71b3fbe00b2..508abc01018 100644
--- a/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs
+++ b/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs
@@ -27,6 +27,7 @@ pub(crate) fn target() -> Target {
             abi: "abi64".into(),
             endian: Endian::Big,
             mcount: "_mcount".into(),
+            llvm_abiname: "n64".into(),
             ..base
         },
     }
diff --git a/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs
index b130ca29c7f..a26350ff225 100644
--- a/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs
+++ b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs
@@ -22,6 +22,7 @@ pub(crate) fn target() -> Target {
             features: "+mips64r2,+xgot".into(),
             max_atomic_width: Some(64),
             mcount: "_mcount".into(),
+            llvm_abiname: "n64".into(),
 
             ..base::linux_gnu::opts()
         },
diff --git a/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs
index 4ea7c7bff44..fd509503053 100644
--- a/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs
+++ b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs
@@ -25,6 +25,7 @@ pub(crate) fn target() -> Target {
             mcount: "_mcount".into(),
             // FIXME(compiler-team#422): musl targets should be dynamically linked by default.
             crt_static_default: true,
+            llvm_abiname: "n64".into(),
             ..base
         },
     }
diff --git a/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs
index a9afea27ef3..19bceadc622 100644
--- a/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs
+++ b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs
@@ -19,6 +19,7 @@ pub(crate) fn target() -> Target {
             features: "+mips64r2,+xgot".into(),
             max_atomic_width: Some(64),
             mcount: "_mcount".into(),
+            llvm_abiname: "n64".into(),
 
             ..base::linux_gnu::opts()
         },
diff --git a/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs
index 7bdd9edda70..aa087b1a35a 100644
--- a/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs
+++ b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs
@@ -19,6 +19,11 @@ pub(crate) fn target() -> Target {
         pointer_width: 64,
         data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
         arch: "mips64".into(),
-        options: TargetOptions { abi: "abi64".into(), mcount: "_mcount".into(), ..base },
+        options: TargetOptions {
+            abi: "abi64".into(),
+            mcount: "_mcount".into(),
+            llvm_abiname: "n64".into(),
+            ..base
+        },
     }
 }
diff --git a/compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs
index 3eefa27ea04..cdd5f6b8436 100644
--- a/compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs
+++ b/compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs
@@ -22,6 +22,7 @@ pub(crate) fn target() -> Target {
             features: "+mips64r6".into(),
             max_atomic_width: Some(64),
             mcount: "_mcount".into(),
+            llvm_abiname: "n64".into(),
 
             ..base::linux_gnu::opts()
         },
diff --git a/compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs
index 0887180791c..88879a25818 100644
--- a/compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs
+++ b/compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs
@@ -19,6 +19,7 @@ pub(crate) fn target() -> Target {
             features: "+mips64r6".into(),
             max_atomic_width: Some(64),
             mcount: "_mcount".into(),
+            llvm_abiname: "n64".into(),
 
             ..base::linux_gnu::opts()
         },
diff --git a/compiler/stable_mir/Cargo.toml b/compiler/stable_mir/Cargo.toml
index 3a01ee5783e..516c8e9c718 100644
--- a/compiler/stable_mir/Cargo.toml
+++ b/compiler/stable_mir/Cargo.toml
@@ -5,3 +5,9 @@ edition = "2024"
 
 [dependencies]
 rustc_smir = { path = "../rustc_smir" }
+
+[features]
+# Provides access to APIs that expose internals of the rust compiler.
+# APIs enabled by this feature are unstable. They can be removed or modified
+# at any point and they are not included in the crate's semantic versioning.
+rustc_internal = []
diff --git a/compiler/stable_mir/src/lib.rs b/compiler/stable_mir/src/lib.rs
index cc0fb52433d..688f3936b26 100644
--- a/compiler/stable_mir/src/lib.rs
+++ b/compiler/stable_mir/src/lib.rs
@@ -4,4 +4,8 @@
 //! This is a transitional measure as described in [PR #139319](https://github.com/rust-lang/rust/pull/139319).
 //! Once the refactoring is complete, the `stable_mir` implementation will be moved back here.
 
+/// Export the rustc_internal APIs. Note that this module has no stability
+/// guarantees and it is not taken into account for semver.
+#[cfg(feature = "rustc_internal")]
+pub use rustc_smir::rustc_internal;
 pub use rustc_smir::stable_mir::*;
diff --git a/library/alloc/src/collections/btree/map.rs b/library/alloc/src/collections/btree/map.rs
index 78b7da9d6b3..5ca32ed741a 100644
--- a/library/alloc/src/collections/btree/map.rs
+++ b/library/alloc/src/collections/btree/map.rs
@@ -1917,14 +1917,13 @@ pub struct ExtractIf<
     V,
     F,
     #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator + Clone = Global,
-> where
-    F: 'a + FnMut(&K, &mut V) -> bool,
-{
+> {
     pred: F,
     inner: ExtractIfInner<'a, K, V>,
     /// The BTreeMap will outlive this IntoIter so we don't care about drop order for `alloc`.
     alloc: A,
 }
+
 /// Most of the implementation of ExtractIf are generic over the type
 /// of the predicate, thus also serving for BTreeSet::ExtractIf.
 pub(super) struct ExtractIfInner<'a, K, V> {
@@ -1940,14 +1939,14 @@ pub(super) struct ExtractIfInner<'a, K, V> {
 }
 
 #[unstable(feature = "btree_extract_if", issue = "70530")]
-impl<K, V, F> fmt::Debug for ExtractIf<'_, K, V, F>
+impl<K, V, F, A> fmt::Debug for ExtractIf<'_, K, V, F, A>
 where
     K: fmt::Debug,
     V: fmt::Debug,
-    F: FnMut(&K, &mut V) -> bool,
+    A: Allocator + Clone,
 {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        f.debug_tuple("ExtractIf").field(&self.inner.peek()).finish()
+        f.debug_struct("ExtractIf").field("peek", &self.inner.peek()).finish_non_exhaustive()
     }
 }
 
diff --git a/library/alloc/src/collections/btree/set.rs b/library/alloc/src/collections/btree/set.rs
index 7ad9e59dfed..343934680b8 100644
--- a/library/alloc/src/collections/btree/set.rs
+++ b/library/alloc/src/collections/btree/set.rs
@@ -1556,10 +1556,7 @@ pub struct ExtractIf<
     T,
     F,
     #[unstable(feature = "allocator_api", issue = "32838")] A: Allocator + Clone = Global,
-> where
-    T: 'a,
-    F: 'a + FnMut(&T) -> bool,
-{
+> {
     pred: F,
     inner: super::map::ExtractIfInner<'a, T, SetValZST>,
     /// The BTreeMap will outlive this IntoIter so we don't care about drop order for `alloc`.
@@ -1567,13 +1564,15 @@ pub struct ExtractIf<
 }
 
 #[unstable(feature = "btree_extract_if", issue = "70530")]
-impl<T, F, A: Allocator + Clone> fmt::Debug for ExtractIf<'_, T, F, A>
+impl<T, F, A> fmt::Debug for ExtractIf<'_, T, F, A>
 where
     T: fmt::Debug,
-    F: FnMut(&T) -> bool,
+    A: Allocator + Clone,
 {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        f.debug_tuple("ExtractIf").field(&self.inner.peek().map(|(k, _)| k)).finish()
+        f.debug_struct("ExtractIf")
+            .field("peek", &self.inner.peek().map(|(k, _)| k))
+            .finish_non_exhaustive()
     }
 }
 
diff --git a/library/alloc/src/collections/linked_list.rs b/library/alloc/src/collections/linked_list.rs
index cc42a120e4f..00e2805d11f 100644
--- a/library/alloc/src/collections/linked_list.rs
+++ b/library/alloc/src/collections/linked_list.rs
@@ -1976,9 +1976,14 @@ where
 }
 
 #[stable(feature = "extract_if", since = "1.87.0")]
-impl<T: fmt::Debug, F> fmt::Debug for ExtractIf<'_, T, F> {
+impl<T, F, A> fmt::Debug for ExtractIf<'_, T, F, A>
+where
+    T: fmt::Debug,
+    A: Allocator,
+{
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
-        f.debug_tuple("ExtractIf").field(&self.list).finish()
+        let peek = self.it.map(|node| unsafe { &node.as_ref().element });
+        f.debug_struct("ExtractIf").field("peek", &peek).finish_non_exhaustive()
     }
 }
 
diff --git a/library/alloc/src/vec/extract_if.rs b/library/alloc/src/vec/extract_if.rs
index 8a591a87796..a456d3d9e60 100644
--- a/library/alloc/src/vec/extract_if.rs
+++ b/library/alloc/src/vec/extract_if.rs
@@ -1,5 +1,5 @@
 use core::ops::{Range, RangeBounds};
-use core::{ptr, slice};
+use core::{fmt, ptr, slice};
 
 use super::Vec;
 use crate::alloc::{Allocator, Global};
@@ -16,7 +16,6 @@ use crate::alloc::{Allocator, Global};
 /// let iter: std::vec::ExtractIf<'_, _, _> = v.extract_if(.., |x| *x % 2 == 0);
 /// ```
 #[stable(feature = "extract_if", since = "1.87.0")]
-#[derive(Debug)]
 #[must_use = "iterators are lazy and do nothing unless consumed"]
 pub struct ExtractIf<
     'a,
@@ -108,3 +107,15 @@ impl<T, F, A: Allocator> Drop for ExtractIf<'_, T, F, A> {
         }
     }
 }
+
+#[stable(feature = "extract_if", since = "1.87.0")]
+impl<T, F, A> fmt::Debug for ExtractIf<'_, T, F, A>
+where
+    T: fmt::Debug,
+    A: Allocator,
+{
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        let peek = if self.idx < self.end { self.vec.get(self.idx) } else { None };
+        f.debug_struct("ExtractIf").field("peek", &peek).finish_non_exhaustive()
+    }
+}
diff --git a/library/alloc/src/vec/into_iter.rs b/library/alloc/src/vec/into_iter.rs
index 1af110691ba..37df928228d 100644
--- a/library/alloc/src/vec/into_iter.rs
+++ b/library/alloc/src/vec/into_iter.rs
@@ -259,6 +259,11 @@ impl<T, A: Allocator> Iterator for IntoIter<T, A> {
     }
 
     #[inline]
+    fn last(mut self) -> Option<T> {
+        self.next_back()
+    }
+
+    #[inline]
     fn next_chunk<const N: usize>(&mut self) -> Result<[T; N], core::array::IntoIter<T, N>> {
         let mut raw_ary = [const { MaybeUninit::uninit() }; N];
 
diff --git a/library/core/src/iter/traits/iterator.rs b/library/core/src/iter/traits/iterator.rs
index c68fd2115d6..0d7d7860b03 100644
--- a/library/core/src/iter/traits/iterator.rs
+++ b/library/core/src/iter/traits/iterator.rs
@@ -1358,6 +1358,7 @@ pub trait Iterator {
     /// ```
     ///
     /// [`by_ref`]: Iterator::by_ref
+    #[doc(alias = "limit")]
     #[inline]
     #[stable(feature = "rust1", since = "1.0.0")]
     fn take(self, n: usize) -> Take<Self>
diff --git a/library/core/src/str/lossy.rs b/library/core/src/str/lossy.rs
index ed2cefc59a5..8d4210c8082 100644
--- a/library/core/src/str/lossy.rs
+++ b/library/core/src/str/lossy.rs
@@ -147,12 +147,14 @@ impl fmt::Debug for Debug<'_> {
 /// An iterator used to decode a slice of mostly UTF-8 bytes to string slices
 /// ([`&str`]) and byte slices ([`&[u8]`][byteslice]).
 ///
+/// This struct is created by the [`utf8_chunks`] method on bytes slices.
 /// If you want a simple conversion from UTF-8 byte slices to string slices,
 /// [`from_utf8`] is easier to use.
 ///
 /// See the [`Utf8Chunk`] type for documentation of the items yielded by this iterator.
 ///
 /// [byteslice]: slice
+/// [`utf8_chunks`]: slice::utf8_chunks
 /// [`from_utf8`]: super::from_utf8
 ///
 /// # Examples
diff --git a/library/std/src/collections/hash/map.rs b/library/std/src/collections/hash/map.rs
index 9ad26e5d28e..961d6ee0665 100644
--- a/library/std/src/collections/hash/map.rs
+++ b/library/std/src/collections/hash/map.rs
@@ -683,7 +683,7 @@ impl<K, V, S> HashMap<K, V, S> {
     /// ```
     #[inline]
     #[rustc_lint_query_instability]
-    #[stable(feature = "hash_extract_if", since = "1.87.0")]
+    #[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
     pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, K, V, F>
     where
         F: FnMut(&K, &mut V) -> bool,
@@ -1680,12 +1680,9 @@ impl<'a, K, V> Drain<'a, K, V> {
 /// ]);
 /// let iter = map.extract_if(|_k, v| *v % 2 == 0);
 /// ```
-#[stable(feature = "hash_extract_if", since = "1.87.0")]
+#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
 #[must_use = "iterators are lazy and do nothing unless consumed"]
-pub struct ExtractIf<'a, K, V, F>
-where
-    F: FnMut(&K, &mut V) -> bool,
-{
+pub struct ExtractIf<'a, K, V, F> {
     base: base::ExtractIf<'a, K, V, F>,
 }
 
@@ -2297,7 +2294,7 @@ where
     }
 }
 
-#[stable(feature = "hash_extract_if", since = "1.87.0")]
+#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
 impl<K, V, F> Iterator for ExtractIf<'_, K, V, F>
 where
     F: FnMut(&K, &mut V) -> bool,
@@ -2314,13 +2311,14 @@ where
     }
 }
 
-#[stable(feature = "hash_extract_if", since = "1.87.0")]
+#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
 impl<K, V, F> FusedIterator for ExtractIf<'_, K, V, F> where F: FnMut(&K, &mut V) -> bool {}
 
-#[stable(feature = "hash_extract_if", since = "1.87.0")]
-impl<'a, K, V, F> fmt::Debug for ExtractIf<'a, K, V, F>
+#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
+impl<K, V, F> fmt::Debug for ExtractIf<'_, K, V, F>
 where
-    F: FnMut(&K, &mut V) -> bool,
+    K: fmt::Debug,
+    V: fmt::Debug,
 {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         f.debug_struct("ExtractIf").finish_non_exhaustive()
diff --git a/library/std/src/collections/hash/set.rs b/library/std/src/collections/hash/set.rs
index 7be000594bc..fa2f4f0a58f 100644
--- a/library/std/src/collections/hash/set.rs
+++ b/library/std/src/collections/hash/set.rs
@@ -308,7 +308,7 @@ impl<T, S> HashSet<T, S> {
     /// ```
     #[inline]
     #[rustc_lint_query_instability]
-    #[stable(feature = "hash_extract_if", since = "1.87.0")]
+    #[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
     pub fn extract_if<F>(&mut self, pred: F) -> ExtractIf<'_, T, F>
     where
         F: FnMut(&T) -> bool,
@@ -1390,11 +1390,8 @@ pub struct Drain<'a, K: 'a> {
 ///
 /// let mut extract_ifed = a.extract_if(|v| v % 2 == 0);
 /// ```
-#[stable(feature = "hash_extract_if", since = "1.87.0")]
-pub struct ExtractIf<'a, K, F>
-where
-    F: FnMut(&K) -> bool,
-{
+#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
+pub struct ExtractIf<'a, K, F> {
     base: base::ExtractIf<'a, K, F>,
 }
 
@@ -1673,7 +1670,7 @@ impl<K: fmt::Debug> fmt::Debug for Drain<'_, K> {
     }
 }
 
-#[stable(feature = "hash_extract_if", since = "1.87.0")]
+#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
 impl<K, F> Iterator for ExtractIf<'_, K, F>
 where
     F: FnMut(&K) -> bool,
@@ -1690,13 +1687,13 @@ where
     }
 }
 
-#[stable(feature = "hash_extract_if", since = "1.87.0")]
+#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
 impl<K, F> FusedIterator for ExtractIf<'_, K, F> where F: FnMut(&K) -> bool {}
 
-#[stable(feature = "hash_extract_if", since = "1.87.0")]
-impl<'a, K, F> fmt::Debug for ExtractIf<'a, K, F>
+#[stable(feature = "hash_extract_if", since = "CURRENT_RUSTC_VERSION")]
+impl<K, F> fmt::Debug for ExtractIf<'_, K, F>
 where
-    F: FnMut(&K) -> bool,
+    K: fmt::Debug,
 {
     fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
         f.debug_struct("ExtractIf").finish_non_exhaustive()
diff --git a/library/std/src/process.rs b/library/std/src/process.rs
index 76ce7bce81b..df6b9a6e563 100644
--- a/library/std/src/process.rs
+++ b/library/std/src/process.rs
@@ -168,8 +168,6 @@ use crate::num::NonZero;
 use crate::path::Path;
 use crate::sys::pipe::{AnonPipe, read2};
 use crate::sys::process as imp;
-#[stable(feature = "command_access", since = "1.57.0")]
-pub use crate::sys_common::process::CommandEnvs;
 use crate::sys_common::{AsInner, AsInnerMut, FromInner, IntoInner};
 use crate::{fmt, fs, str};
 
@@ -1073,7 +1071,7 @@ impl Command {
     /// ```
     #[stable(feature = "process", since = "1.0.0")]
     pub fn output(&mut self) -> io::Result<Output> {
-        let (status, stdout, stderr) = self.inner.output()?;
+        let (status, stdout, stderr) = imp::output(&mut self.inner)?;
         Ok(Output { status: ExitStatus(status), stdout, stderr })
     }
 
@@ -1174,7 +1172,7 @@ impl Command {
     /// ```
     #[stable(feature = "command_access", since = "1.57.0")]
     pub fn get_envs(&self) -> CommandEnvs<'_> {
-        self.inner.get_envs()
+        CommandEnvs { iter: self.inner.get_envs() }
     }
 
     /// Returns the working directory for the child process.
@@ -1264,6 +1262,48 @@ impl<'a> ExactSizeIterator for CommandArgs<'a> {
     }
 }
 
+/// An iterator over the command environment variables.
+///
+/// This struct is created by
+/// [`Command::get_envs`][crate::process::Command::get_envs]. See its
+/// documentation for more.
+#[must_use = "iterators are lazy and do nothing unless consumed"]
+#[stable(feature = "command_access", since = "1.57.0")]
+pub struct CommandEnvs<'a> {
+    iter: imp::CommandEnvs<'a>,
+}
+
+#[stable(feature = "command_access", since = "1.57.0")]
+impl<'a> Iterator for CommandEnvs<'a> {
+    type Item = (&'a OsStr, Option<&'a OsStr>);
+
+    fn next(&mut self) -> Option<Self::Item> {
+        self.iter.next()
+    }
+
+    fn size_hint(&self) -> (usize, Option<usize>) {
+        self.iter.size_hint()
+    }
+}
+
+#[stable(feature = "command_access", since = "1.57.0")]
+impl<'a> ExactSizeIterator for CommandEnvs<'a> {
+    fn len(&self) -> usize {
+        self.iter.len()
+    }
+
+    fn is_empty(&self) -> bool {
+        self.iter.is_empty()
+    }
+}
+
+#[stable(feature = "command_access", since = "1.57.0")]
+impl<'a> fmt::Debug for CommandEnvs<'a> {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        self.iter.fmt(f)
+    }
+}
+
 /// The output of a finished process.
 ///
 /// This is returned in a Result by either the [`output`] method of a
diff --git a/library/std/src/sys/args/common.rs b/library/std/src/sys/args/common.rs
index 303b373ccf9..e787105a05a 100644
--- a/library/std/src/sys/args/common.rs
+++ b/library/std/src/sys/args/common.rs
@@ -49,8 +49,8 @@ impl Iterator for Args {
     }
 
     #[inline]
-    fn last(mut self) -> Option<OsString> {
-        self.iter.next_back()
+    fn last(self) -> Option<OsString> {
+        self.iter.last()
     }
 
     #[inline]
diff --git a/library/std/src/sys_common/process.rs b/library/std/src/sys/process/env.rs
index 9f61d69d858..e08b476540e 100644
--- a/library/std/src/sys_common/process.rs
+++ b/library/std/src/sys/process/env.rs
@@ -1,13 +1,9 @@
-#![allow(dead_code)]
-#![unstable(feature = "process_internals", issue = "none")]
-
 use crate::collections::BTreeMap;
 use crate::ffi::{OsStr, OsString};
-use crate::sys::pipe::read2;
-use crate::sys::process::{EnvKey, ExitStatus, Process, StdioPipes};
-use crate::{env, fmt, io};
+use crate::sys::process::EnvKey;
+use crate::{env, fmt};
 
-// Stores a set of changes to an environment
+/// Stores a set of changes to an environment
 #[derive(Clone, Default)]
 pub struct CommandEnv {
     clear: bool,
@@ -92,30 +88,23 @@ impl CommandEnv {
     }
 }
 
-/// An iterator over the command environment variables.
-///
-/// This struct is created by
-/// [`Command::get_envs`][crate::process::Command::get_envs]. See its
-/// documentation for more.
-#[must_use = "iterators are lazy and do nothing unless consumed"]
-#[stable(feature = "command_access", since = "1.57.0")]
 #[derive(Debug)]
 pub struct CommandEnvs<'a> {
     iter: crate::collections::btree_map::Iter<'a, EnvKey, Option<OsString>>,
 }
 
-#[stable(feature = "command_access", since = "1.57.0")]
 impl<'a> Iterator for CommandEnvs<'a> {
     type Item = (&'a OsStr, Option<&'a OsStr>);
+
     fn next(&mut self) -> Option<Self::Item> {
         self.iter.next().map(|(key, value)| (key.as_ref(), value.as_deref()))
     }
+
     fn size_hint(&self) -> (usize, Option<usize>) {
         self.iter.size_hint()
     }
 }
 
-#[stable(feature = "command_access", since = "1.57.0")]
 impl<'a> ExactSizeIterator for CommandEnvs<'a> {
     fn len(&self) -> usize {
         self.iter.len()
@@ -124,30 +113,3 @@ impl<'a> ExactSizeIterator for CommandEnvs<'a> {
         self.iter.is_empty()
     }
 }
-
-pub fn wait_with_output(
-    mut process: Process,
-    mut pipes: StdioPipes,
-) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-    drop(pipes.stdin.take());
-
-    let (mut stdout, mut stderr) = (Vec::new(), Vec::new());
-    match (pipes.stdout.take(), pipes.stderr.take()) {
-        (None, None) => {}
-        (Some(out), None) => {
-            let res = out.read_to_end(&mut stdout);
-            res.unwrap();
-        }
-        (None, Some(err)) => {
-            let res = err.read_to_end(&mut stderr);
-            res.unwrap();
-        }
-        (Some(out), Some(err)) => {
-            let res = read2(out, &mut stdout, err, &mut stderr);
-            res.unwrap();
-        }
-    }
-
-    let status = process.wait()?;
-    Ok((status, stdout, stderr))
-}
diff --git a/library/std/src/sys/process/mod.rs b/library/std/src/sys/process/mod.rs
index 92cfac7f47c..91c7005a328 100644
--- a/library/std/src/sys/process/mod.rs
+++ b/library/std/src/sys/process/mod.rs
@@ -14,6 +14,65 @@ cfg_if::cfg_if! {
     }
 }
 
+// This module is shared by all platforms, but nearly all platforms except for
+// the "normal" UNIX ones leave some of this code unused.
+#[cfg_attr(not(target_os = "linux"), allow(dead_code))]
+mod env;
+
+pub use env::CommandEnvs;
 pub use imp::{
     Command, CommandArgs, EnvKey, ExitCode, ExitStatus, ExitStatusError, Process, Stdio, StdioPipes,
 };
+
+#[cfg(any(
+    all(
+        target_family = "unix",
+        not(any(
+            target_os = "espidf",
+            target_os = "horizon",
+            target_os = "vita",
+            target_os = "nuttx"
+        ))
+    ),
+    target_os = "windows",
+))]
+pub fn output(cmd: &mut Command) -> crate::io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
+    use crate::sys::pipe::read2;
+
+    let (mut process, mut pipes) = cmd.spawn(Stdio::MakePipe, false)?;
+
+    drop(pipes.stdin.take());
+    let (mut stdout, mut stderr) = (Vec::new(), Vec::new());
+    match (pipes.stdout.take(), pipes.stderr.take()) {
+        (None, None) => {}
+        (Some(out), None) => {
+            let res = out.read_to_end(&mut stdout);
+            res.unwrap();
+        }
+        (None, Some(err)) => {
+            let res = err.read_to_end(&mut stderr);
+            res.unwrap();
+        }
+        (Some(out), Some(err)) => {
+            let res = read2(out, &mut stdout, err, &mut stderr);
+            res.unwrap();
+        }
+    }
+
+    let status = process.wait()?;
+    Ok((status, stdout, stderr))
+}
+
+#[cfg(not(any(
+    all(
+        target_family = "unix",
+        not(any(
+            target_os = "espidf",
+            target_os = "horizon",
+            target_os = "vita",
+            target_os = "nuttx"
+        ))
+    ),
+    target_os = "windows",
+)))]
+pub use imp::output;
diff --git a/library/std/src/sys/process/uefi.rs b/library/std/src/sys/process/uefi.rs
index 5f922292d05..4864c586988 100644
--- a/library/std/src/sys/process/uefi.rs
+++ b/library/std/src/sys/process/uefi.rs
@@ -1,5 +1,6 @@
 use r_efi::protocols::{simple_text_input, simple_text_output};
 
+use super::env::{CommandEnv, CommandEnvs};
 use crate::collections::BTreeMap;
 pub use crate::ffi::OsString as EnvKey;
 use crate::ffi::{OsStr, OsString};
@@ -10,7 +11,6 @@ use crate::sys::pal::helpers;
 use crate::sys::pal::os::error_string;
 use crate::sys::pipe::AnonPipe;
 use crate::sys::unsupported;
-use crate::sys_common::process::{CommandEnv, CommandEnvs};
 use crate::{fmt, io};
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -139,72 +139,72 @@ impl Command {
             Stdio::MakePipe => unsupported(),
         }
     }
+}
 
-    pub fn output(&mut self) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-        let mut cmd = uefi_command_internal::Image::load_image(&self.prog)?;
-
-        // UEFI adds the bin name by default
-        if !self.args.is_empty() {
-            let args = uefi_command_internal::create_args(&self.prog, &self.args);
-            cmd.set_args(args);
-        }
-
-        // Setup Stdout
-        let stdout = self.stdout.unwrap_or(Stdio::MakePipe);
-        let stdout = Self::create_pipe(stdout)?;
-        if let Some(con) = stdout {
-            cmd.stdout_init(con)
-        } else {
-            cmd.stdout_inherit()
-        };
-
-        // Setup Stderr
-        let stderr = self.stderr.unwrap_or(Stdio::MakePipe);
-        let stderr = Self::create_pipe(stderr)?;
-        if let Some(con) = stderr {
-            cmd.stderr_init(con)
-        } else {
-            cmd.stderr_inherit()
-        };
-
-        // Setup Stdin
-        let stdin = self.stdin.unwrap_or(Stdio::Null);
-        let stdin = Self::create_stdin(stdin)?;
-        if let Some(con) = stdin {
-            cmd.stdin_init(con)
-        } else {
-            cmd.stdin_inherit()
-        };
-
-        let env = env_changes(&self.env);
-
-        // Set any new vars
-        if let Some(e) = &env {
-            for (k, (_, v)) in e {
-                match v {
-                    Some(v) => unsafe { crate::env::set_var(k, v) },
-                    None => unsafe { crate::env::remove_var(k) },
-                }
+pub fn output(command: &mut Command) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
+    let mut cmd = uefi_command_internal::Image::load_image(&command.prog)?;
+
+    // UEFI adds the bin name by default
+    if !command.args.is_empty() {
+        let args = uefi_command_internal::create_args(&command.prog, &command.args);
+        cmd.set_args(args);
+    }
+
+    // Setup Stdout
+    let stdout = command.stdout.unwrap_or(Stdio::MakePipe);
+    let stdout = Command::create_pipe(stdout)?;
+    if let Some(con) = stdout {
+        cmd.stdout_init(con)
+    } else {
+        cmd.stdout_inherit()
+    };
+
+    // Setup Stderr
+    let stderr = command.stderr.unwrap_or(Stdio::MakePipe);
+    let stderr = Command::create_pipe(stderr)?;
+    if let Some(con) = stderr {
+        cmd.stderr_init(con)
+    } else {
+        cmd.stderr_inherit()
+    };
+
+    // Setup Stdin
+    let stdin = command.stdin.unwrap_or(Stdio::Null);
+    let stdin = Command::create_stdin(stdin)?;
+    if let Some(con) = stdin {
+        cmd.stdin_init(con)
+    } else {
+        cmd.stdin_inherit()
+    };
+
+    let env = env_changes(&command.env);
+
+    // Set any new vars
+    if let Some(e) = &env {
+        for (k, (_, v)) in e {
+            match v {
+                Some(v) => unsafe { crate::env::set_var(k, v) },
+                None => unsafe { crate::env::remove_var(k) },
             }
         }
+    }
 
-        let stat = cmd.start_image()?;
+    let stat = cmd.start_image()?;
 
-        // Rollback any env changes
-        if let Some(e) = env {
-            for (k, (v, _)) in e {
-                match v {
-                    Some(v) => unsafe { crate::env::set_var(k, v) },
-                    None => unsafe { crate::env::remove_var(k) },
-                }
+    // Rollback any env changes
+    if let Some(e) = env {
+        for (k, (v, _)) in e {
+            match v {
+                Some(v) => unsafe { crate::env::set_var(k, v) },
+                None => unsafe { crate::env::remove_var(k) },
             }
         }
+    }
 
-        let stdout = cmd.stdout()?;
-        let stderr = cmd.stderr()?;
+    let stdout = cmd.stdout()?;
+    let stderr = cmd.stderr()?;
 
-        Ok((ExitStatus(stat), stdout, stderr))
-    }
+    Ok((ExitStatus(stat), stdout, stderr))
 }
 
 impl From<AnonPipe> for Stdio {
diff --git a/library/std/src/sys/process/unix/common.rs b/library/std/src/sys/process/unix/common.rs
index 8bc17f31491..a9c2510e6d4 100644
--- a/library/std/src/sys/process/unix/common.rs
+++ b/library/std/src/sys/process/unix/common.rs
@@ -12,7 +12,7 @@ use crate::sys::fs::File;
 #[cfg(not(target_os = "fuchsia"))]
 use crate::sys::fs::OpenOptions;
 use crate::sys::pipe::{self, AnonPipe};
-use crate::sys_common::process::{CommandEnv, CommandEnvs};
+use crate::sys::process::env::{CommandEnv, CommandEnvs};
 use crate::sys_common::{FromInner, IntoInner};
 use crate::{fmt, io, ptr};
 
diff --git a/library/std/src/sys/process/unix/fuchsia.rs b/library/std/src/sys/process/unix/fuchsia.rs
index 0de32ecffd4..fbe06c4799b 100644
--- a/library/std/src/sys/process/unix/fuchsia.rs
+++ b/library/std/src/sys/process/unix/fuchsia.rs
@@ -31,11 +31,6 @@ impl Command {
         Ok((Process { handle: Handle::new(process_handle) }, ours))
     }
 
-    pub fn output(&mut self) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-        let (proc, pipes) = self.spawn(Stdio::MakePipe, false)?;
-        crate::sys_common::process::wait_with_output(proc, pipes)
-    }
-
     pub fn exec(&mut self, default: Stdio) -> io::Error {
         if self.saw_nul() {
             return io::const_error!(
diff --git a/library/std/src/sys/process/unix/unix.rs b/library/std/src/sys/process/unix/unix.rs
index ae1c9558281..1b3bd2de265 100644
--- a/library/std/src/sys/process/unix/unix.rs
+++ b/library/std/src/sys/process/unix/unix.rs
@@ -162,11 +162,6 @@ impl Command {
         }
     }
 
-    pub fn output(&mut self) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-        let (proc, pipes) = self.spawn(Stdio::MakePipe, false)?;
-        crate::sys_common::process::wait_with_output(proc, pipes)
-    }
-
     // WatchOS and TVOS headers mark the `fork`/`exec*` functions with
     // `__WATCHOS_PROHIBITED __TVOS_PROHIBITED`, and indicate that the
     // `posix_spawn*` functions should be used instead. It isn't entirely clear
diff --git a/library/std/src/sys/process/unix/unsupported.rs b/library/std/src/sys/process/unix/unsupported.rs
index 78d270923cf..e86561a5c5c 100644
--- a/library/std/src/sys/process/unix/unsupported.rs
+++ b/library/std/src/sys/process/unix/unsupported.rs
@@ -18,15 +18,15 @@ impl Command {
         unsupported()
     }
 
-    pub fn output(&mut self) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-        unsupported()
-    }
-
     pub fn exec(&mut self, _default: Stdio) -> io::Error {
         unsupported_err()
     }
 }
 
+pub fn output(_: &mut Command) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
+    unsupported()
+}
+
 ////////////////////////////////////////////////////////////////////////////////
 // Processes
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/library/std/src/sys/process/unix/vxworks.rs b/library/std/src/sys/process/unix/vxworks.rs
index b92446f0cf6..fab3b36ebf3 100644
--- a/library/std/src/sys/process/unix/vxworks.rs
+++ b/library/std/src/sys/process/unix/vxworks.rs
@@ -112,11 +112,6 @@ impl Command {
         }
     }
 
-    pub fn output(&mut self) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-        let (proc, pipes) = self.spawn(Stdio::MakePipe, false)?;
-        crate::sys_common::process::wait_with_output(proc, pipes)
-    }
-
     pub fn exec(&mut self, default: Stdio) -> io::Error {
         let ret = Command::spawn(self, default, false);
         match ret {
diff --git a/library/std/src/sys/process/unsupported.rs b/library/std/src/sys/process/unsupported.rs
index fee81744f09..469922c78ac 100644
--- a/library/std/src/sys/process/unsupported.rs
+++ b/library/std/src/sys/process/unsupported.rs
@@ -1,3 +1,4 @@
+use super::env::{CommandEnv, CommandEnvs};
 pub use crate::ffi::OsString as EnvKey;
 use crate::ffi::{OsStr, OsString};
 use crate::num::NonZero;
@@ -5,7 +6,6 @@ use crate::path::Path;
 use crate::sys::fs::File;
 use crate::sys::pipe::AnonPipe;
 use crate::sys::unsupported;
-use crate::sys_common::process::{CommandEnv, CommandEnvs};
 use crate::{fmt, io};
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -104,10 +104,10 @@ impl Command {
     ) -> io::Result<(Process, StdioPipes)> {
         unsupported()
     }
+}
 
-    pub fn output(&mut self) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-        unsupported()
-    }
+pub fn output(_cmd: &mut Command) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
+    unsupported()
 }
 
 impl From<AnonPipe> for Stdio {
diff --git a/library/std/src/sys/process/windows.rs b/library/std/src/sys/process/windows.rs
index 4cfdf908c58..4acd753eec9 100644
--- a/library/std/src/sys/process/windows.rs
+++ b/library/std/src/sys/process/windows.rs
@@ -5,6 +5,7 @@ mod tests;
 
 use core::ffi::c_void;
 
+use super::env::{CommandEnv, CommandEnvs};
 use crate::collections::BTreeMap;
 use crate::env::consts::{EXE_EXTENSION, EXE_SUFFIX};
 use crate::ffi::{OsStr, OsString};
@@ -24,7 +25,6 @@ use crate::sys::pal::{ensure_no_nuls, fill_utf16_buf};
 use crate::sys::pipe::{self, AnonPipe};
 use crate::sys::{cvt, path, stdio};
 use crate::sys_common::IntoInner;
-use crate::sys_common::process::{CommandEnv, CommandEnvs};
 use crate::{cmp, env, fmt, ptr};
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -389,11 +389,6 @@ impl Command {
             ))
         }
     }
-
-    pub fn output(&mut self) -> io::Result<(ExitStatus, Vec<u8>, Vec<u8>)> {
-        let (proc, pipes) = self.spawn(Stdio::MakePipe, false)?;
-        crate::sys_common::process::wait_with_output(proc, pipes)
-    }
 }
 
 impl fmt::Debug for Command {
diff --git a/library/std/src/sys_common/mod.rs b/library/std/src/sys_common/mod.rs
index 2a5de7f6666..b7f4656fa37 100644
--- a/library/std/src/sys_common/mod.rs
+++ b/library/std/src/sys_common/mod.rs
@@ -20,7 +20,6 @@
 #[cfg(test)]
 mod tests;
 
-pub mod process;
 pub mod wstr;
 pub mod wtf8;
 
diff --git a/src/bootstrap/src/core/build_steps/check.rs b/src/bootstrap/src/core/build_steps/check.rs
index ae9511b7867..fa848c492b4 100644
--- a/src/bootstrap/src/core/build_steps/check.rs
+++ b/src/bootstrap/src/core/build_steps/check.rs
@@ -527,3 +527,70 @@ tool_check_step!(Bootstrap { path: "src/bootstrap", default: false });
 // `run-make-support` will be built as part of suitable run-make compiletest test steps, but support
 // check to make it easier to work on.
 tool_check_step!(RunMakeSupport { path: "src/tools/run-make-support", default: false });
+
+/// Check step for the `coverage-dump` bootstrap tool. The coverage-dump tool
+/// is used internally by coverage tests.
+///
+/// FIXME(Zalathar): This is temporarily separate from the other tool check
+/// steps so that it can use the stage 0 compiler instead of `top_stage`,
+/// without introducing conflicts with the stage 0 redesign (#119899).
+///
+/// After the stage 0 redesign lands, we can look into using the stage 0
+/// compiler to check all bootstrap tools (#139170).
+#[derive(Debug, Clone, PartialEq, Eq, Hash)]
+pub(crate) struct CoverageDump;
+
+impl CoverageDump {
+    const PATH: &str = "src/tools/coverage-dump";
+}
+
+impl Step for CoverageDump {
+    type Output = ();
+
+    /// Most contributors won't care about coverage-dump, so don't make their
+    /// check builds slower unless they opt in and check it explicitly.
+    const DEFAULT: bool = false;
+    const ONLY_HOSTS: bool = true;
+
+    fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
+        run.path(Self::PATH)
+    }
+
+    fn make_run(run: RunConfig<'_>) {
+        run.builder.ensure(Self {});
+    }
+
+    fn run(self, builder: &Builder<'_>) -> Self::Output {
+        // Make sure we haven't forgotten any fields, if there are any.
+        let Self {} = self;
+        let display_name = "coverage-dump";
+        let host = builder.config.build;
+        let target = host;
+        let mode = Mode::ToolBootstrap;
+
+        let compiler = builder.compiler(0, host);
+        let cargo = prepare_tool_cargo(
+            builder,
+            compiler,
+            mode,
+            target,
+            builder.kind,
+            Self::PATH,
+            SourceType::InTree,
+            &[],
+        );
+
+        let stamp = BuildStamp::new(&builder.cargo_out(compiler, mode, target))
+            .with_prefix(&format!("{display_name}-check"));
+
+        let _guard = builder.msg_tool(
+            builder.kind,
+            mode,
+            display_name,
+            compiler.stage,
+            &compiler.host,
+            &target,
+        );
+        run_cargo(builder, cargo, builder.config.free_args.clone(), &stamp, vec![], true, false);
+    }
+}
diff --git a/src/bootstrap/src/core/build_steps/run.rs b/src/bootstrap/src/core/build_steps/run.rs
index 5cacd5b9914..7ff38505294 100644
--- a/src/bootstrap/src/core/build_steps/run.rs
+++ b/src/bootstrap/src/core/build_steps/run.rs
@@ -392,3 +392,31 @@ impl Step for CyclicStep {
         builder.ensure(CyclicStep { n: self.n.saturating_sub(1) })
     }
 }
+
+/// Step to manually run the coverage-dump tool (`./x run coverage-dump`).
+///
+/// The coverage-dump tool is an internal detail of coverage tests, so this run
+/// step is only needed when testing coverage-dump manually.
+#[derive(Debug, PartialOrd, Ord, Clone, Hash, PartialEq, Eq)]
+pub struct CoverageDump;
+
+impl Step for CoverageDump {
+    type Output = ();
+
+    const DEFAULT: bool = false;
+    const ONLY_HOSTS: bool = true;
+
+    fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
+        run.path("src/tools/coverage-dump")
+    }
+
+    fn make_run(run: RunConfig<'_>) {
+        run.builder.ensure(Self {});
+    }
+
+    fn run(self, builder: &Builder<'_>) {
+        let mut cmd = builder.tool_cmd(Tool::CoverageDump);
+        cmd.args(&builder.config.free_args);
+        cmd.run(builder);
+    }
+}
diff --git a/src/bootstrap/src/core/build_steps/test.rs b/src/bootstrap/src/core/build_steps/test.rs
index a7a3b5a878c..29fb576f574 100644
--- a/src/bootstrap/src/core/build_steps/test.rs
+++ b/src/bootstrap/src/core/build_steps/test.rs
@@ -54,6 +54,7 @@ impl Step for CrateBootstrap {
         run.path("src/tools/jsondoclint")
             .path("src/tools/suggest-tests")
             .path("src/tools/replace-version-placeholder")
+            .path("src/tools/coverage-dump")
             // We want `./x test tidy` to _run_ the tidy tool, not its tests.
             // So we need a separate alias to test the tidy tool itself.
             .alias("tidyselftest")
diff --git a/src/bootstrap/src/core/builder/mod.rs b/src/bootstrap/src/core/builder/mod.rs
index 6469bb5f272..15dc3380a39 100644
--- a/src/bootstrap/src/core/builder/mod.rs
+++ b/src/bootstrap/src/core/builder/mod.rs
@@ -961,6 +961,7 @@ impl<'a> Builder<'a> {
                 check::RunMakeSupport,
                 check::Compiletest,
                 check::FeaturesStatusDump,
+                check::CoverageDump,
             ),
             Kind::Test => describe!(
                 crate::core::build_steps::toolstate::ToolStateCheck,
@@ -1114,6 +1115,7 @@ impl<'a> Builder<'a> {
                 run::UnicodeTableGenerator,
                 run::FeaturesStatusDump,
                 run::CyclicStep,
+                run::CoverageDump,
             ),
             Kind::Setup => {
                 describe!(setup::Profile, setup::Hook, setup::Link, setup::Editor)
diff --git a/src/doc/unstable-book/src/language-features/arbitrary-self-types.md b/src/doc/unstable-book/src/language-features/arbitrary-self-types.md
index 2f8b52d4043..d660dd13fe4 100644
--- a/src/doc/unstable-book/src/language-features/arbitrary-self-types.md
+++ b/src/doc/unstable-book/src/language-features/arbitrary-self-types.md
@@ -2,7 +2,7 @@
 
 The tracking issue for this feature is: [#44874]
 
-[#38788]: https://github.com/rust-lang/rust/issues/44874
+[#44874]: https://github.com/rust-lang/rust/issues/44874
 
 ------------------------
 
diff --git a/src/doc/unstable-book/src/language-features/f128.md b/src/doc/unstable-book/src/language-features/f128.md
index 0cc5f677230..b523ffe10f2 100644
--- a/src/doc/unstable-book/src/language-features/f128.md
+++ b/src/doc/unstable-book/src/language-features/f128.md
@@ -6,4 +6,4 @@ The tracking issue for this feature is: [#116909]
 
 ---
 
-Enable the `f128` type for  IEEE 128-bit floating numbers (quad precision).
+Enable the `f128` type for IEEE 128-bit floating numbers (quad precision).
diff --git a/src/doc/unstable-book/src/language-features/f16.md b/src/doc/unstable-book/src/language-features/f16.md
index efb07a5146d..5f31dcbb06c 100644
--- a/src/doc/unstable-book/src/language-features/f16.md
+++ b/src/doc/unstable-book/src/language-features/f16.md
@@ -6,4 +6,4 @@ The tracking issue for this feature is: [#116909]
 
 ---
 
-Enable the `f16` type for  IEEE 16-bit floating numbers (half precision).
+Enable the `f16` type for IEEE 16-bit floating numbers (half precision).
diff --git a/src/doc/unstable-book/src/language-features/frontmatter.md b/src/doc/unstable-book/src/language-features/frontmatter.md
new file mode 100644
index 00000000000..1d5b4feb6ac
--- /dev/null
+++ b/src/doc/unstable-book/src/language-features/frontmatter.md
@@ -0,0 +1,25 @@
+# `frontmatter`
+
+The tracking issue for this feature is: [#136889]
+
+------
+
+The `frontmatter` feature allows an extra metadata block at the top of files for consumption by
+external tools. For example, it can be used by [`cargo-script`] files to specify dependencies.
+
+```rust
+#!/usr/bin/env -S cargo -Zscript
+---
+[dependencies]
+libc = "0.2.172"
+---
+#![feature(frontmatter)]
+# mod libc { pub type c_int = i32; }
+
+fn main() {
+    let x: libc::c_int = 1i32;
+}
+```
+
+[#136889]: https://github.com/rust-lang/rust/issues/136889
+[`cargo-script`]: https://rust-lang.github.io/rfcs/3502-cargo-script.html
diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs
index c943d3ad4d0..2db1ea8450c 100644
--- a/src/librustdoc/html/highlight.rs
+++ b/src/librustdoc/html/highlight.rs
@@ -9,7 +9,7 @@ use std::collections::VecDeque;
 use std::fmt::{Display, Write};
 
 use rustc_data_structures::fx::FxIndexMap;
-use rustc_lexer::{Cursor, LiteralKind, TokenKind};
+use rustc_lexer::{Cursor, FrontmatterAllowed, LiteralKind, TokenKind};
 use rustc_span::edition::Edition;
 use rustc_span::symbol::Symbol;
 use rustc_span::{BytePos, DUMMY_SP, Span};
@@ -638,7 +638,8 @@ impl<'src> Classifier<'src> {
     /// Takes as argument the source code to HTML-ify, the rust edition to use and the source code
     /// file span which will be used later on by the `span_correspondence_map`.
     fn new(src: &'src str, file_span: Span, decoration_info: Option<&DecorationInfo>) -> Self {
-        let tokens = PeekIter::new(TokenIter { src, cursor: Cursor::new(src) });
+        let tokens =
+            PeekIter::new(TokenIter { src, cursor: Cursor::new(src, FrontmatterAllowed::Yes) });
         let decorations = decoration_info.map(Decorations::new);
         Classifier {
             tokens,
@@ -884,6 +885,7 @@ impl<'src> Classifier<'src> {
             | TokenKind::At
             | TokenKind::Tilde
             | TokenKind::Colon
+            | TokenKind::Frontmatter { .. }
             | TokenKind::Unknown => return no_highlight(sink),
 
             TokenKind::Question => Class::QuestionMark,
diff --git a/src/tools/clippy/tests/ui/double_ended_iterator_last.fixed b/src/tools/clippy/tests/ui/double_ended_iterator_last.fixed
index 2ce0c04c301..be31ee5fb48 100644
--- a/src/tools/clippy/tests/ui/double_ended_iterator_last.fixed
+++ b/src/tools/clippy/tests/ui/double_ended_iterator_last.fixed
@@ -84,6 +84,19 @@ fn issue_14139() {
 }
 
 fn drop_order() {
+    struct DropDeIterator(std::vec::IntoIter<S>);
+    impl Iterator for DropDeIterator {
+        type Item = S;
+        fn next(&mut self) -> Option<Self::Item> {
+            self.0.next()
+        }
+    }
+    impl DoubleEndedIterator for DropDeIterator {
+        fn next_back(&mut self) -> Option<Self::Item> {
+            self.0.next_back()
+        }
+    }
+
     struct S(&'static str);
     impl std::ops::Drop for S {
         fn drop(&mut self) {
@@ -92,7 +105,7 @@ fn drop_order() {
     }
 
     let v = vec![S("one"), S("two"), S("three")];
-    let mut v = v.into_iter();
+    let mut v = DropDeIterator(v.into_iter());
     println!("Last element is {}", v.next_back().unwrap().0);
     //~^ ERROR: called `Iterator::last` on a `DoubleEndedIterator`
     println!("Done");
diff --git a/src/tools/clippy/tests/ui/double_ended_iterator_last.rs b/src/tools/clippy/tests/ui/double_ended_iterator_last.rs
index a4eb9b3337b..30864e15bce 100644
--- a/src/tools/clippy/tests/ui/double_ended_iterator_last.rs
+++ b/src/tools/clippy/tests/ui/double_ended_iterator_last.rs
@@ -84,6 +84,19 @@ fn issue_14139() {
 }
 
 fn drop_order() {
+    struct DropDeIterator(std::vec::IntoIter<S>);
+    impl Iterator for DropDeIterator {
+        type Item = S;
+        fn next(&mut self) -> Option<Self::Item> {
+            self.0.next()
+        }
+    }
+    impl DoubleEndedIterator for DropDeIterator {
+        fn next_back(&mut self) -> Option<Self::Item> {
+            self.0.next_back()
+        }
+    }
+
     struct S(&'static str);
     impl std::ops::Drop for S {
         fn drop(&mut self) {
@@ -92,7 +105,7 @@ fn drop_order() {
     }
 
     let v = vec![S("one"), S("two"), S("three")];
-    let v = v.into_iter();
+    let v = DropDeIterator(v.into_iter());
     println!("Last element is {}", v.last().unwrap().0);
     //~^ ERROR: called `Iterator::last` on a `DoubleEndedIterator`
     println!("Done");
diff --git a/src/tools/clippy/tests/ui/double_ended_iterator_last.stderr b/src/tools/clippy/tests/ui/double_ended_iterator_last.stderr
index fe8cf2dcb25..72a6ead47a9 100644
--- a/src/tools/clippy/tests/ui/double_ended_iterator_last.stderr
+++ b/src/tools/clippy/tests/ui/double_ended_iterator_last.stderr
@@ -18,7 +18,7 @@ LL |     let _ = DeIterator.last();
    |                        help: try: `next_back()`
 
 error: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
-  --> tests/ui/double_ended_iterator_last.rs:96:36
+  --> tests/ui/double_ended_iterator_last.rs:109:36
    |
 LL |     println!("Last element is {}", v.last().unwrap().0);
    |                                    ^^^^^^^^
@@ -26,7 +26,7 @@ LL |     println!("Last element is {}", v.last().unwrap().0);
    = note: this change will alter drop order which may be undesirable
 help: try
    |
-LL ~     let mut v = v.into_iter();
+LL ~     let mut v = DropDeIterator(v.into_iter());
 LL ~     println!("Last element is {}", v.next_back().unwrap().0);
    |
 
diff --git a/src/tools/clippy/tests/ui/double_ended_iterator_last_unfixable.rs b/src/tools/clippy/tests/ui/double_ended_iterator_last_unfixable.rs
index 7c5de8832d6..e9218bbb409 100644
--- a/src/tools/clippy/tests/ui/double_ended_iterator_last_unfixable.rs
+++ b/src/tools/clippy/tests/ui/double_ended_iterator_last_unfixable.rs
@@ -11,6 +11,19 @@ fn main() {
 }
 
 fn drop_order() {
+    struct DropDeIterator(std::vec::IntoIter<S>);
+    impl Iterator for DropDeIterator {
+        type Item = S;
+        fn next(&mut self) -> Option<Self::Item> {
+            self.0.next()
+        }
+    }
+    impl DoubleEndedIterator for DropDeIterator {
+        fn next_back(&mut self) -> Option<Self::Item> {
+            self.0.next_back()
+        }
+    }
+
     struct S(&'static str);
     impl std::ops::Drop for S {
         fn drop(&mut self) {
@@ -19,7 +32,7 @@ fn drop_order() {
     }
 
     let v = vec![S("one"), S("two"), S("three")];
-    let v = (v.into_iter(), 42);
+    let v = (DropDeIterator(v.into_iter()), 42);
     println!("Last element is {}", v.0.last().unwrap().0);
     //~^ ERROR: called `Iterator::last` on a `DoubleEndedIterator`
     println!("Done");
diff --git a/src/tools/clippy/tests/ui/double_ended_iterator_last_unfixable.stderr b/src/tools/clippy/tests/ui/double_ended_iterator_last_unfixable.stderr
index 845afc11f04..e330a22a354 100644
--- a/src/tools/clippy/tests/ui/double_ended_iterator_last_unfixable.stderr
+++ b/src/tools/clippy/tests/ui/double_ended_iterator_last_unfixable.stderr
@@ -1,5 +1,5 @@
 error: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator
-  --> tests/ui/double_ended_iterator_last_unfixable.rs:23:36
+  --> tests/ui/double_ended_iterator_last_unfixable.rs:36:36
    |
 LL |     println!("Last element is {}", v.0.last().unwrap().0);
    |                                    ^^^^------
@@ -8,7 +8,7 @@ LL |     println!("Last element is {}", v.0.last().unwrap().0);
    |
    = note: this change will alter drop order which may be undesirable
 note: this must be made mutable to use `.next_back()`
-  --> tests/ui/double_ended_iterator_last_unfixable.rs:23:36
+  --> tests/ui/double_ended_iterator_last_unfixable.rs:36:36
    |
 LL |     println!("Last element is {}", v.0.last().unwrap().0);
    |                                    ^^^
diff --git a/src/tools/coverage-dump/Cargo.toml b/src/tools/coverage-dump/Cargo.toml
index 7f14286b5d0..6f92ac50d96 100644
--- a/src/tools/coverage-dump/Cargo.toml
+++ b/src/tools/coverage-dump/Cargo.toml
@@ -7,6 +7,7 @@ edition = "2021"
 
 [dependencies]
 anyhow = "1.0.71"
+itertools = "0.12"
 leb128 = "0.2.5"
 md5 = { package = "md-5" , version = "0.10.5" }
 miniz_oxide = "0.7.1"
diff --git a/src/tools/coverage-dump/src/covfun.rs b/src/tools/coverage-dump/src/covfun.rs
index 82ebd33d0d1..1cc9f4dc5d6 100644
--- a/src/tools/coverage-dump/src/covfun.rs
+++ b/src/tools/coverage-dump/src/covfun.rs
@@ -1,23 +1,33 @@
 use std::collections::HashMap;
 use std::fmt::{self, Debug, Write as _};
-use std::sync::OnceLock;
+use std::sync::LazyLock;
 
-use anyhow::{Context, anyhow};
+use anyhow::{Context, anyhow, bail, ensure};
+use itertools::Itertools;
 use regex::Regex;
 
-use crate::parser::{Parser, unescape_llvm_string_contents};
+use crate::covmap::FilenameTables;
+use crate::llvm_utils::unescape_llvm_string_contents;
+use crate::parser::Parser;
+
+#[cfg(test)]
+mod tests;
 
 pub(crate) fn dump_covfun_mappings(
     llvm_ir: &str,
+    filename_tables: &FilenameTables,
     function_names: &HashMap<u64, String>,
 ) -> anyhow::Result<()> {
     // Extract function coverage entries from the LLVM IR assembly, and associate
     // each entry with its (demangled) name.
     let mut covfun_entries = llvm_ir
         .lines()
-        .filter_map(covfun_line_data)
-        .map(|line_data| (function_names.get(&line_data.name_hash).map(String::as_str), line_data))
-        .collect::<Vec<_>>();
+        .filter(|line| is_covfun_line(line))
+        .map(parse_covfun_line)
+        .map_ok(|line_data| {
+            (function_names.get(&line_data.name_hash).map(String::as_str), line_data)
+        })
+        .collect::<Result<Vec<_>, _>>()?;
     covfun_entries.sort_by(|a, b| {
         // Sort entries primarily by name, to help make the order consistent
         // across platforms and relatively insensitive to changes.
@@ -41,8 +51,12 @@ pub(crate) fn dump_covfun_mappings(
         println!("Number of files: {num_files}");
 
         for i in 0..num_files {
-            let global_file_id = parser.read_uleb128_u32()?;
-            println!("- file {i} => global file {global_file_id}");
+            let global_file_id = parser.read_uleb128_usize()?;
+            let &CovfunLineData { filenames_hash, .. } = line_data;
+            let Some(filename) = filename_tables.lookup(filenames_hash, global_file_id) else {
+                bail!("couldn't resolve global file: {filenames_hash}, {global_file_id}");
+            };
+            println!("- file {i} => {filename}");
         }
 
         let num_expressions = parser.read_uleb128_u32()?;
@@ -107,36 +121,50 @@ pub(crate) fn dump_covfun_mappings(
     Ok(())
 }
 
+#[derive(Debug, PartialEq, Eq)]
 struct CovfunLineData {
-    name_hash: u64,
     is_used: bool,
+    name_hash: u64,
+    filenames_hash: u64,
     payload: Vec<u8>,
 }
 
-/// Checks a line of LLVM IR assembly to see if it contains an `__llvm_covfun`
-/// entry, and if so extracts relevant data in a `CovfunLineData`.
-fn covfun_line_data(line: &str) -> Option<CovfunLineData> {
-    let re = {
-        // We cheat a little bit and match variable names `@__covrec_[HASH]u`
-        // rather than the section name, because the section name is harder to
-        // extract and differs across Linux/Windows/macOS. We also extract the
-        // symbol name hash from the variable name rather than the data, since
-        // it's easier and both should match.
-        static RE: OnceLock<Regex> = OnceLock::new();
-        RE.get_or_init(|| {
-            Regex::new(
-                r#"^@__covrec_(?<name_hash>[0-9A-Z]+)(?<is_used>u)? = .*\[[0-9]+ x i8\] c"(?<payload>[^"]*)".*$"#,
-            )
-            .unwrap()
-        })
-    };
+fn is_covfun_line(line: &str) -> bool {
+    line.starts_with("@__covrec_")
+}
 
-    let captures = re.captures(line)?;
-    let name_hash = u64::from_str_radix(&captures["name_hash"], 16).unwrap();
+/// Given a line of LLVM IR assembly that should contain an `__llvm_covfun`
+/// entry, parses it to extract relevant data in a `CovfunLineData`.
+fn parse_covfun_line(line: &str) -> anyhow::Result<CovfunLineData> {
+    ensure!(is_covfun_line(line));
+
+    // We cheat a little bit and match variable names `@__covrec_[HASH]u`
+    // rather than the section name, because the section name is harder to
+    // extract and differs across Linux/Windows/macOS.
+    const RE_STRING: &str = r#"(?x)^
+        @__covrec_[0-9A-Z]+(?<is_used>u)?
+        \ = \ # (trailing space)
+        .*
+        <\{
+            \ i64 \ (?<name_hash> -? [0-9]+),
+            \ i32 \ -? [0-9]+, # (length of payload; currently unused)
+            \ i64 \ -? [0-9]+, # (source hash; currently unused)
+            \ i64 \ (?<filenames_hash> -? [0-9]+),
+            \ \[ [0-9]+ \ x \ i8 \] \ c"(?<payload>[^"]*)"
+            \ # (trailing space)
+        }>
+        .*$
+    "#;
+    static RE: LazyLock<Regex> = LazyLock::new(|| Regex::new(RE_STRING).unwrap());
+
+    let captures =
+        RE.captures(line).with_context(|| format!("couldn't parse covfun line: {line:?}"))?;
     let is_used = captures.name("is_used").is_some();
+    let name_hash = i64::from_str_radix(&captures["name_hash"], 10).unwrap() as u64;
+    let filenames_hash = i64::from_str_radix(&captures["filenames_hash"], 10).unwrap() as u64;
     let payload = unescape_llvm_string_contents(&captures["payload"]);
 
-    Some(CovfunLineData { name_hash, is_used, payload })
+    Ok(CovfunLineData { is_used, name_hash, filenames_hash, payload })
 }
 
 // Extra parser methods only needed when parsing `covfun` payloads.
diff --git a/src/tools/coverage-dump/src/covfun/tests.rs b/src/tools/coverage-dump/src/covfun/tests.rs
new file mode 100644
index 00000000000..1ce833784bd
--- /dev/null
+++ b/src/tools/coverage-dump/src/covfun/tests.rs
@@ -0,0 +1,53 @@
+use super::{CovfunLineData, parse_covfun_line};
+
+/// Integers in LLVM IR are not inherently signed/unsigned, and the text format tends
+/// to emit them in signed form, so this helper function converts `i64` to `u64`.
+fn as_u64(x: i64) -> u64 {
+    x as u64
+}
+
+#[test]
+fn parse_covfun_line_data() {
+    struct Case {
+        line: &'static str,
+        expected: CovfunLineData,
+    }
+    let cases = &[
+        // Copied from `trivial.ll`:
+        Case {
+            line: r#"@__covrec_49A9BAAE5F896E81u = linkonce_odr hidden constant <{ i64, i32, i64, i64, [9 x i8] }> <{ i64 5307978893922758273, i32 9, i64 445092354169400020, i64 6343436898695299756, [9 x i8] c"\01\01\00\01\01\03\01\00\0D" }>, section "__LLVM_COV,__llvm_covfun", align 8"#,
+            expected: CovfunLineData {
+                is_used: true,
+                name_hash: as_u64(5307978893922758273),
+                filenames_hash: as_u64(6343436898695299756),
+                payload: b"\x01\x01\x00\x01\x01\x03\x01\x00\x0D".to_vec(),
+            },
+        },
+        // Copied from `on-off-sandwich.ll`:
+        Case {
+            line: r#"@__covrec_D0CE53C5E64F319Au = linkonce_odr hidden constant <{ i64, i32, i64, i64, [14 x i8] }> <{ i64 -3400688559180533350, i32 14, i64 7307957714577672185, i64 892196767019953100, [14 x i8] c"\01\01\00\02\01\10\05\02\10\01\07\05\00\06" }>, section "__LLVM_COV,__llvm_covfun", align 8"#,
+            expected: CovfunLineData {
+                is_used: true,
+                name_hash: as_u64(-3400688559180533350),
+                filenames_hash: as_u64(892196767019953100),
+                payload: b"\x01\x01\x00\x02\x01\x10\x05\x02\x10\x01\x07\x05\x00\x06".to_vec(),
+            },
+        },
+        // Copied from `no-core.ll`:
+        Case {
+            line: r#"@__covrec_F8016FC82D46106u = linkonce_odr hidden constant <{ i64, i32, i64, i64, [9 x i8] }> <{ i64 1116917981370409222, i32 9, i64 -8857254680411629915, i64 -3625186110715410276, [9 x i8] c"\01\01\00\01\01\0C\01\00\0D" }>, section "__LLVM_COV,__llvm_covfun", align 8"#,
+            expected: CovfunLineData {
+                is_used: true,
+                name_hash: as_u64(1116917981370409222),
+                filenames_hash: as_u64(-3625186110715410276),
+                payload: b"\x01\x01\x00\x01\x01\x0C\x01\x00\x0D".to_vec(),
+            },
+        },
+    ];
+
+    for &Case { line, ref expected } in cases {
+        println!("- {line}");
+        let line_data = parse_covfun_line(line).map_err(|e| e.to_string());
+        assert_eq!(line_data.as_ref(), Ok(expected));
+    }
+}
diff --git a/src/tools/coverage-dump/src/covmap.rs b/src/tools/coverage-dump/src/covmap.rs
new file mode 100644
index 00000000000..2246ca2d575
--- /dev/null
+++ b/src/tools/coverage-dump/src/covmap.rs
@@ -0,0 +1,75 @@
+use std::collections::HashMap;
+use std::sync::LazyLock;
+
+use anyhow::{Context, ensure};
+use regex::Regex;
+
+use crate::llvm_utils::{truncated_md5, unescape_llvm_string_contents};
+use crate::parser::Parser;
+
+#[derive(Debug, Default)]
+pub(crate) struct FilenameTables {
+    map: HashMap<u64, Vec<String>>,
+}
+
+impl FilenameTables {
+    pub(crate) fn lookup(&self, filenames_hash: u64, global_file_id: usize) -> Option<&str> {
+        let table = self.map.get(&filenames_hash)?;
+        let filename = table.get(global_file_id)?;
+        Some(filename)
+    }
+}
+
+struct CovmapLineData {
+    payload: Vec<u8>,
+}
+
+pub(crate) fn make_filename_tables(llvm_ir: &str) -> anyhow::Result<FilenameTables> {
+    let mut map = HashMap::default();
+
+    for line in llvm_ir.lines().filter(|line| is_covmap_line(line)) {
+        let CovmapLineData { payload } = parse_covmap_line(line)?;
+
+        let mut parser = Parser::new(&payload);
+        let n_filenames = parser.read_uleb128_usize()?;
+        let uncompressed_bytes = parser.read_chunk_to_uncompressed_bytes()?;
+        parser.ensure_empty()?;
+
+        let mut filenames_table = vec![];
+
+        let mut parser = Parser::new(&uncompressed_bytes);
+        for _ in 0..n_filenames {
+            let len = parser.read_uleb128_usize()?;
+            let bytes = parser.read_n_bytes(len)?;
+            let filename = str::from_utf8(bytes)?;
+            filenames_table.push(filename.to_owned());
+        }
+
+        let filenames_hash = truncated_md5(&payload);
+        map.insert(filenames_hash, filenames_table);
+    }
+
+    Ok(FilenameTables { map })
+}
+
+fn is_covmap_line(line: &str) -> bool {
+    line.starts_with("@__llvm_coverage_mapping ")
+}
+
+fn parse_covmap_line(line: &str) -> anyhow::Result<CovmapLineData> {
+    ensure!(is_covmap_line(line));
+
+    const RE_STRING: &str = r#"(?x)^
+        @__llvm_coverage_mapping \ =
+        .*
+        \[ [0-9]+ \ x \ i8 \] \ c"(?<payload>[^"]*)"
+        .*$
+    "#;
+    static RE: LazyLock<Regex> = LazyLock::new(|| Regex::new(RE_STRING).unwrap());
+
+    let captures =
+        RE.captures(line).with_context(|| format!("couldn't parse covmap line: {line:?}"))?;
+    let payload = unescape_llvm_string_contents(&captures["payload"]);
+
+    Ok(CovmapLineData { payload })
+}
diff --git a/src/tools/coverage-dump/src/llvm_utils.rs b/src/tools/coverage-dump/src/llvm_utils.rs
new file mode 100644
index 00000000000..92322b256a8
--- /dev/null
+++ b/src/tools/coverage-dump/src/llvm_utils.rs
@@ -0,0 +1,85 @@
+use std::borrow::Cow;
+use std::sync::OnceLock;
+
+use anyhow::{anyhow, ensure};
+use regex::bytes;
+
+use crate::parser::Parser;
+
+#[cfg(test)]
+mod tests;
+
+/// Given the raw contents of a string literal in LLVM IR assembly, decodes any
+/// backslash escapes and returns a vector containing the resulting byte string.
+pub(crate) fn unescape_llvm_string_contents(contents: &str) -> Vec<u8> {
+    let escape_re = {
+        static RE: OnceLock<bytes::Regex> = OnceLock::new();
+        // LLVM IR supports two string escapes: `\\` and `\xx`.
+        RE.get_or_init(|| bytes::Regex::new(r"\\\\|\\([0-9A-Za-z]{2})").unwrap())
+    };
+
+    fn u8_from_hex_digits(digits: &[u8]) -> u8 {
+        // We know that the input contains exactly 2 hex digits, so these calls
+        // should never fail.
+        assert_eq!(digits.len(), 2);
+        let digits = std::str::from_utf8(digits).unwrap();
+        u8::from_str_radix(digits, 16).unwrap()
+    }
+
+    escape_re
+        .replace_all(contents.as_bytes(), |captures: &bytes::Captures<'_>| {
+            let byte = match captures.get(1) {
+                None => b'\\',
+                Some(hex_digits) => u8_from_hex_digits(hex_digits.as_bytes()),
+            };
+            [byte]
+        })
+        .into_owned()
+}
+
+/// LLVM's profiler/coverage metadata often uses an MD5 hash truncated to
+/// 64 bits as a way to associate data stored in different tables/sections.
+pub(crate) fn truncated_md5(bytes: &[u8]) -> u64 {
+    use md5::{Digest, Md5};
+    let mut hasher = Md5::new();
+    hasher.update(bytes);
+    let hash: [u8; 8] = hasher.finalize().as_slice()[..8].try_into().unwrap();
+    // The truncated hash is explicitly little-endian, regardless of host
+    // or target platform. (See `MD5Result::low` in LLVM's `MD5.h`.)
+    u64::from_le_bytes(hash)
+}
+
+impl<'a> Parser<'a> {
+    /// Reads a sequence of:
+    /// - Length of uncompressed data in bytes, as ULEB128
+    /// - Length of compressed data in bytes (or 0), as ULEB128
+    /// - The indicated number of compressed or uncompressed bytes
+    ///
+    /// If the number of compressed bytes is 0, the subsequent bytes are
+    /// uncompressed. Otherwise, the subsequent bytes are compressed, and will
+    /// be decompressed.
+    ///
+    /// Returns the uncompressed bytes that were read directly or decompressed.
+    pub(crate) fn read_chunk_to_uncompressed_bytes(&mut self) -> anyhow::Result<Cow<'a, [u8]>> {
+        let uncompressed_len = self.read_uleb128_usize()?;
+        let compressed_len = self.read_uleb128_usize()?;
+
+        if compressed_len == 0 {
+            // The bytes are uncompressed, so read them directly.
+            let uncompressed_bytes = self.read_n_bytes(uncompressed_len)?;
+            Ok(Cow::Borrowed(uncompressed_bytes))
+        } else {
+            // The bytes are compressed, so read and decompress them.
+            let compressed_bytes = self.read_n_bytes(compressed_len)?;
+
+            let uncompressed_bytes = miniz_oxide::inflate::decompress_to_vec_zlib_with_limit(
+                compressed_bytes,
+                uncompressed_len,
+            )
+            .map_err(|e| anyhow!("{e:?}"))?;
+            ensure!(uncompressed_bytes.len() == uncompressed_len);
+
+            Ok(Cow::Owned(uncompressed_bytes))
+        }
+    }
+}
diff --git a/src/tools/coverage-dump/src/parser/tests.rs b/src/tools/coverage-dump/src/llvm_utils/tests.rs
index a673606b9c4..506b0a6200b 100644
--- a/src/tools/coverage-dump/src/parser/tests.rs
+++ b/src/tools/coverage-dump/src/llvm_utils/tests.rs
@@ -1,9 +1,5 @@
 use super::unescape_llvm_string_contents;
 
-// WARNING: These tests don't necessarily run in CI, and were mainly used to
-// help track down problems when originally developing this tool.
-// (The tool is still tested indirectly by snapshot tests that rely on it.)
-
 // Tests for `unescape_llvm_string_contents`:
 
 #[test]
diff --git a/src/tools/coverage-dump/src/main.rs b/src/tools/coverage-dump/src/main.rs
index b21e3e292f2..2c76d2f2460 100644
--- a/src/tools/coverage-dump/src/main.rs
+++ b/src/tools/coverage-dump/src/main.rs
@@ -1,4 +1,6 @@
 mod covfun;
+mod covmap;
+mod llvm_utils;
 mod parser;
 mod prf_names;
 
@@ -17,8 +19,9 @@ fn main() -> anyhow::Result<()> {
     let llvm_ir_path = args.get(1).context("LLVM IR file not specified")?;
     let llvm_ir = std::fs::read_to_string(llvm_ir_path).context("couldn't read LLVM IR file")?;
 
+    let filename_tables = covmap::make_filename_tables(&llvm_ir)?;
     let function_names = crate::prf_names::make_function_names_table(&llvm_ir)?;
-    crate::covfun::dump_covfun_mappings(&llvm_ir, &function_names)?;
+    crate::covfun::dump_covfun_mappings(&llvm_ir, &filename_tables, &function_names)?;
 
     Ok(())
 }
diff --git a/src/tools/coverage-dump/src/parser.rs b/src/tools/coverage-dump/src/parser.rs
index 0bd4abdae3e..f26a57b43b3 100644
--- a/src/tools/coverage-dump/src/parser.rs
+++ b/src/tools/coverage-dump/src/parser.rs
@@ -1,38 +1,4 @@
-#[cfg(test)]
-mod tests;
-
-use std::sync::OnceLock;
-
 use anyhow::ensure;
-use regex::bytes;
-
-/// Given the raw contents of a string literal in LLVM IR assembly, decodes any
-/// backslash escapes and returns a vector containing the resulting byte string.
-pub(crate) fn unescape_llvm_string_contents(contents: &str) -> Vec<u8> {
-    let escape_re = {
-        static RE: OnceLock<bytes::Regex> = OnceLock::new();
-        // LLVM IR supports two string escapes: `\\` and `\xx`.
-        RE.get_or_init(|| bytes::Regex::new(r"\\\\|\\([0-9A-Za-z]{2})").unwrap())
-    };
-
-    fn u8_from_hex_digits(digits: &[u8]) -> u8 {
-        // We know that the input contains exactly 2 hex digits, so these calls
-        // should never fail.
-        assert_eq!(digits.len(), 2);
-        let digits = std::str::from_utf8(digits).unwrap();
-        u8::from_str_radix(digits, 16).unwrap()
-    }
-
-    escape_re
-        .replace_all(contents.as_bytes(), |captures: &bytes::Captures<'_>| {
-            let byte = match captures.get(1) {
-                None => b'\\',
-                Some(hex_digits) => u8_from_hex_digits(hex_digits.as_bytes()),
-            };
-            [byte]
-        })
-        .into_owned()
-}
 
 pub(crate) struct Parser<'a> {
     rest: &'a [u8],
diff --git a/src/tools/coverage-dump/src/prf_names.rs b/src/tools/coverage-dump/src/prf_names.rs
index 96d097c79a3..f9ab35deba5 100644
--- a/src/tools/coverage-dump/src/prf_names.rs
+++ b/src/tools/coverage-dump/src/prf_names.rs
@@ -1,10 +1,10 @@
 use std::collections::HashMap;
 use std::sync::OnceLock;
 
-use anyhow::{anyhow, ensure};
 use regex::Regex;
 
-use crate::parser::{Parser, unescape_llvm_string_contents};
+use crate::llvm_utils::{truncated_md5, unescape_llvm_string_contents};
+use crate::parser::Parser;
 
 /// Scans through the contents of an LLVM IR assembly file to find `__llvm_prf_names`
 /// entries, decodes them, and creates a table that maps name hash values to
@@ -25,18 +25,6 @@ pub(crate) fn make_function_names_table(llvm_ir: &str) -> anyhow::Result<HashMap
         Some(payload)
     }
 
-    /// LLVM's profiler/coverage metadata often uses an MD5 hash truncated to
-    /// 64 bits as a way to associate data stored in different tables/sections.
-    fn truncated_md5(bytes: &[u8]) -> u64 {
-        use md5::{Digest, Md5};
-        let mut hasher = Md5::new();
-        hasher.update(bytes);
-        let hash: [u8; 8] = hasher.finalize().as_slice()[..8].try_into().unwrap();
-        // The truncated hash is explicitly little-endian, regardless of host
-        // or target platform. (See `MD5Result::low` in LLVM's `MD5.h`.)
-        u64::from_le_bytes(hash)
-    }
-
     fn demangle_if_able(symbol_name_bytes: &[u8]) -> anyhow::Result<String> {
         // In practice, raw symbol names should always be ASCII.
         let symbol_name_str = std::str::from_utf8(symbol_name_bytes)?;
@@ -54,26 +42,8 @@ pub(crate) fn make_function_names_table(llvm_ir: &str) -> anyhow::Result<HashMap
     for payload in llvm_ir.lines().filter_map(prf_names_payload).map(unescape_llvm_string_contents)
     {
         let mut parser = Parser::new(&payload);
-        let uncompressed_len = parser.read_uleb128_usize()?;
-        let compressed_len = parser.read_uleb128_usize()?;
-
-        let uncompressed_bytes_vec;
-        let uncompressed_bytes: &[u8] = if compressed_len == 0 {
-            // The symbol name bytes are uncompressed, so read them directly.
-            parser.read_n_bytes(uncompressed_len)?
-        } else {
-            // The symbol name bytes are compressed, so read and decompress them.
-            let compressed_bytes = parser.read_n_bytes(compressed_len)?;
-
-            uncompressed_bytes_vec = miniz_oxide::inflate::decompress_to_vec_zlib_with_limit(
-                compressed_bytes,
-                uncompressed_len,
-            )
-            .map_err(|e| anyhow!("{e:?}"))?;
-            ensure!(uncompressed_bytes_vec.len() == uncompressed_len);
-
-            &uncompressed_bytes_vec
-        };
+        let uncompressed_bytes = parser.read_chunk_to_uncompressed_bytes()?;
+        parser.ensure_empty()?;
 
         // Symbol names in the payload are separated by `0x01` bytes.
         for raw_name in uncompressed_bytes.split(|&b| b == 0x01) {
@@ -81,8 +51,6 @@ pub(crate) fn make_function_names_table(llvm_ir: &str) -> anyhow::Result<HashMap
             let demangled = demangle_if_able(raw_name)?;
             map.insert(hash, demangled);
         }
-
-        parser.ensure_empty()?;
     }
 
     Ok(map)
diff --git a/src/tools/rust-analyzer/crates/parser/src/lexed_str.rs b/src/tools/rust-analyzer/crates/parser/src/lexed_str.rs
index 585e7ffb1ae..0a5c16dc4c4 100644
--- a/src/tools/rust-analyzer/crates/parser/src/lexed_str.rs
+++ b/src/tools/rust-analyzer/crates/parser/src/lexed_str.rs
@@ -179,6 +179,15 @@ impl<'a> Converter<'a> {
                     COMMENT
                 }
 
+                rustc_lexer::TokenKind::Frontmatter  { has_invalid_preceding_whitespace, invalid_infostring } => {
+                    if *has_invalid_preceding_whitespace {
+                        err = "invalid preceding whitespace for frontmatter opening"
+                    } else if *invalid_infostring {
+                        err = "invalid infostring for frontmatter"
+                    }
+                    FRONTMATTER
+                }
+
                 rustc_lexer::TokenKind::Whitespace => WHITESPACE,
 
                 rustc_lexer::TokenKind::Ident if token_text == "_" => UNDERSCORE,
diff --git a/src/tools/rust-analyzer/crates/parser/src/syntax_kind/generated.rs b/src/tools/rust-analyzer/crates/parser/src/syntax_kind/generated.rs
index e6f93a1fbda..b1727509b13 100644
--- a/src/tools/rust-analyzer/crates/parser/src/syntax_kind/generated.rs
+++ b/src/tools/rust-analyzer/crates/parser/src/syntax_kind/generated.rs
@@ -150,6 +150,7 @@ pub enum SyntaxKind {
     STRING,
     COMMENT,
     ERROR,
+    FRONTMATTER,
     IDENT,
     LIFETIME_IDENT,
     NEWLINE,
@@ -483,6 +484,7 @@ impl SyntaxKind {
             | YIELD_EXPR
             | COMMENT
             | ERROR
+            | FRONTMATTER
             | IDENT
             | LIFETIME_IDENT
             | NEWLINE
@@ -994,7 +996,7 @@ impl SyntaxKind {
     }
 }
 #[macro_export]
-macro_rules ! T_ { [$] => { $ crate :: SyntaxKind :: DOLLAR } ; [;] => { $ crate :: SyntaxKind :: SEMICOLON } ; [,] => { $ crate :: SyntaxKind :: COMMA } ; ['('] => { $ crate :: SyntaxKind :: L_PAREN } ; [')'] => { $ crate :: SyntaxKind :: R_PAREN } ; ['{'] => { $ crate :: SyntaxKind :: L_CURLY } ; ['}'] => { $ crate :: SyntaxKind :: R_CURLY } ; ['['] => { $ crate :: SyntaxKind :: L_BRACK } ; [']'] => { $ crate :: SyntaxKind :: R_BRACK } ; [<] => { $ crate :: SyntaxKind :: L_ANGLE } ; [>] => { $ crate :: SyntaxKind :: R_ANGLE } ; [@] => { $ crate :: SyntaxKind :: AT } ; [#] => { $ crate :: SyntaxKind :: POUND } ; [~] => { $ crate :: SyntaxKind :: TILDE } ; [?] => { $ crate :: SyntaxKind :: QUESTION } ; [&] => { $ crate :: SyntaxKind :: AMP } ; [|] => { $ crate :: SyntaxKind :: PIPE } ; [+] => { $ crate :: SyntaxKind :: PLUS } ; [*] => { $ crate :: SyntaxKind :: STAR } ; [/] => { $ crate :: SyntaxKind :: SLASH } ; [^] => { $ crate :: SyntaxKind :: CARET } ; [%] => { $ crate :: SyntaxKind :: PERCENT } ; [_] => { $ crate :: SyntaxKind :: UNDERSCORE } ; [.] => { $ crate :: SyntaxKind :: DOT } ; [..] => { $ crate :: SyntaxKind :: DOT2 } ; [...] => { $ crate :: SyntaxKind :: DOT3 } ; [..=] => { $ crate :: SyntaxKind :: DOT2EQ } ; [:] => { $ crate :: SyntaxKind :: COLON } ; [::] => { $ crate :: SyntaxKind :: COLON2 } ; [=] => { $ crate :: SyntaxKind :: EQ } ; [==] => { $ crate :: SyntaxKind :: EQ2 } ; [=>] => { $ crate :: SyntaxKind :: FAT_ARROW } ; [!] => { $ crate :: SyntaxKind :: BANG } ; [!=] => { $ crate :: SyntaxKind :: NEQ } ; [-] => { $ crate :: SyntaxKind :: MINUS } ; [->] => { $ crate :: SyntaxKind :: THIN_ARROW } ; [<=] => { $ crate :: SyntaxKind :: LTEQ } ; [>=] => { $ crate :: SyntaxKind :: GTEQ } ; [+=] => { $ crate :: SyntaxKind :: PLUSEQ } ; [-=] => { $ crate :: SyntaxKind :: MINUSEQ } ; [|=] => { $ crate :: SyntaxKind :: PIPEEQ } ; [&=] => { $ crate :: SyntaxKind :: AMPEQ } ; [^=] => { $ crate :: SyntaxKind :: CARETEQ } ; [/=] => { $ crate :: SyntaxKind :: SLASHEQ } ; [*=] => { $ crate :: SyntaxKind :: STAREQ } ; [%=] => { $ crate :: SyntaxKind :: PERCENTEQ } ; [&&] => { $ crate :: SyntaxKind :: AMP2 } ; [||] => { $ crate :: SyntaxKind :: PIPE2 } ; [<<] => { $ crate :: SyntaxKind :: SHL } ; [>>] => { $ crate :: SyntaxKind :: SHR } ; [<<=] => { $ crate :: SyntaxKind :: SHLEQ } ; [>>=] => { $ crate :: SyntaxKind :: SHREQ } ; [Self] => { $ crate :: SyntaxKind :: SELF_TYPE_KW } ; [abstract] => { $ crate :: SyntaxKind :: ABSTRACT_KW } ; [as] => { $ crate :: SyntaxKind :: AS_KW } ; [become] => { $ crate :: SyntaxKind :: BECOME_KW } ; [box] => { $ crate :: SyntaxKind :: BOX_KW } ; [break] => { $ crate :: SyntaxKind :: BREAK_KW } ; [const] => { $ crate :: SyntaxKind :: CONST_KW } ; [continue] => { $ crate :: SyntaxKind :: CONTINUE_KW } ; [crate] => { $ crate :: SyntaxKind :: CRATE_KW } ; [do] => { $ crate :: SyntaxKind :: DO_KW } ; [else] => { $ crate :: SyntaxKind :: ELSE_KW } ; [enum] => { $ crate :: SyntaxKind :: ENUM_KW } ; [extern] => { $ crate :: SyntaxKind :: EXTERN_KW } ; [false] => { $ crate :: SyntaxKind :: FALSE_KW } ; [final] => { $ crate :: SyntaxKind :: FINAL_KW } ; [fn] => { $ crate :: SyntaxKind :: FN_KW } ; [for] => { $ crate :: SyntaxKind :: FOR_KW } ; [if] => { $ crate :: SyntaxKind :: IF_KW } ; [impl] => { $ crate :: SyntaxKind :: IMPL_KW } ; [in] => { $ crate :: SyntaxKind :: IN_KW } ; [let] => { $ crate :: SyntaxKind :: LET_KW } ; [loop] => { $ crate :: SyntaxKind :: LOOP_KW } ; [macro] => { $ crate :: SyntaxKind :: MACRO_KW } ; [match] => { $ crate :: SyntaxKind :: MATCH_KW } ; [mod] => { $ crate :: SyntaxKind :: MOD_KW } ; [move] => { $ crate :: SyntaxKind :: MOVE_KW } ; [mut] => { $ crate :: SyntaxKind :: MUT_KW } ; [override] => { $ crate :: SyntaxKind :: OVERRIDE_KW } ; [priv] => { $ crate :: SyntaxKind :: PRIV_KW } ; [pub] => { $ crate :: SyntaxKind :: PUB_KW } ; [ref] => { $ crate :: SyntaxKind :: REF_KW } ; [return] => { $ crate :: SyntaxKind :: RETURN_KW } ; [self] => { $ crate :: SyntaxKind :: SELF_KW } ; [static] => { $ crate :: SyntaxKind :: STATIC_KW } ; [struct] => { $ crate :: SyntaxKind :: STRUCT_KW } ; [super] => { $ crate :: SyntaxKind :: SUPER_KW } ; [trait] => { $ crate :: SyntaxKind :: TRAIT_KW } ; [true] => { $ crate :: SyntaxKind :: TRUE_KW } ; [type] => { $ crate :: SyntaxKind :: TYPE_KW } ; [typeof] => { $ crate :: SyntaxKind :: TYPEOF_KW } ; [unsafe] => { $ crate :: SyntaxKind :: UNSAFE_KW } ; [unsized] => { $ crate :: SyntaxKind :: UNSIZED_KW } ; [use] => { $ crate :: SyntaxKind :: USE_KW } ; [virtual] => { $ crate :: SyntaxKind :: VIRTUAL_KW } ; [where] => { $ crate :: SyntaxKind :: WHERE_KW } ; [while] => { $ crate :: SyntaxKind :: WHILE_KW } ; [yield] => { $ crate :: SyntaxKind :: YIELD_KW } ; [asm] => { $ crate :: SyntaxKind :: ASM_KW } ; [att_syntax] => { $ crate :: SyntaxKind :: ATT_SYNTAX_KW } ; [auto] => { $ crate :: SyntaxKind :: AUTO_KW } ; [builtin] => { $ crate :: SyntaxKind :: BUILTIN_KW } ; [clobber_abi] => { $ crate :: SyntaxKind :: CLOBBER_ABI_KW } ; [default] => { $ crate :: SyntaxKind :: DEFAULT_KW } ; [dyn] => { $ crate :: SyntaxKind :: DYN_KW } ; [format_args] => { $ crate :: SyntaxKind :: FORMAT_ARGS_KW } ; [inlateout] => { $ crate :: SyntaxKind :: INLATEOUT_KW } ; [inout] => { $ crate :: SyntaxKind :: INOUT_KW } ; [label] => { $ crate :: SyntaxKind :: LABEL_KW } ; [lateout] => { $ crate :: SyntaxKind :: LATEOUT_KW } ; [macro_rules] => { $ crate :: SyntaxKind :: MACRO_RULES_KW } ; [may_unwind] => { $ crate :: SyntaxKind :: MAY_UNWIND_KW } ; [nomem] => { $ crate :: SyntaxKind :: NOMEM_KW } ; [noreturn] => { $ crate :: SyntaxKind :: NORETURN_KW } ; [nostack] => { $ crate :: SyntaxKind :: NOSTACK_KW } ; [offset_of] => { $ crate :: SyntaxKind :: OFFSET_OF_KW } ; [options] => { $ crate :: SyntaxKind :: OPTIONS_KW } ; [out] => { $ crate :: SyntaxKind :: OUT_KW } ; [preserves_flags] => { $ crate :: SyntaxKind :: PRESERVES_FLAGS_KW } ; [pure] => { $ crate :: SyntaxKind :: PURE_KW } ; [raw] => { $ crate :: SyntaxKind :: RAW_KW } ; [readonly] => { $ crate :: SyntaxKind :: READONLY_KW } ; [safe] => { $ crate :: SyntaxKind :: SAFE_KW } ; [sym] => { $ crate :: SyntaxKind :: SYM_KW } ; [union] => { $ crate :: SyntaxKind :: UNION_KW } ; [yeet] => { $ crate :: SyntaxKind :: YEET_KW } ; [async] => { $ crate :: SyntaxKind :: ASYNC_KW } ; [await] => { $ crate :: SyntaxKind :: AWAIT_KW } ; [dyn] => { $ crate :: SyntaxKind :: DYN_KW } ; [gen] => { $ crate :: SyntaxKind :: GEN_KW } ; [try] => { $ crate :: SyntaxKind :: TRY_KW } ; [lifetime_ident] => { $ crate :: SyntaxKind :: LIFETIME_IDENT } ; [int_number] => { $ crate :: SyntaxKind :: INT_NUMBER } ; [ident] => { $ crate :: SyntaxKind :: IDENT } ; [string] => { $ crate :: SyntaxKind :: STRING } ; [shebang] => { $ crate :: SyntaxKind :: SHEBANG } ; }
+macro_rules ! T_ { [$] => { $ crate :: SyntaxKind :: DOLLAR } ; [;] => { $ crate :: SyntaxKind :: SEMICOLON } ; [,] => { $ crate :: SyntaxKind :: COMMA } ; ['('] => { $ crate :: SyntaxKind :: L_PAREN } ; [')'] => { $ crate :: SyntaxKind :: R_PAREN } ; ['{'] => { $ crate :: SyntaxKind :: L_CURLY } ; ['}'] => { $ crate :: SyntaxKind :: R_CURLY } ; ['['] => { $ crate :: SyntaxKind :: L_BRACK } ; [']'] => { $ crate :: SyntaxKind :: R_BRACK } ; [<] => { $ crate :: SyntaxKind :: L_ANGLE } ; [>] => { $ crate :: SyntaxKind :: R_ANGLE } ; [@] => { $ crate :: SyntaxKind :: AT } ; [#] => { $ crate :: SyntaxKind :: POUND } ; [~] => { $ crate :: SyntaxKind :: TILDE } ; [?] => { $ crate :: SyntaxKind :: QUESTION } ; [&] => { $ crate :: SyntaxKind :: AMP } ; [|] => { $ crate :: SyntaxKind :: PIPE } ; [+] => { $ crate :: SyntaxKind :: PLUS } ; [*] => { $ crate :: SyntaxKind :: STAR } ; [/] => { $ crate :: SyntaxKind :: SLASH } ; [^] => { $ crate :: SyntaxKind :: CARET } ; [%] => { $ crate :: SyntaxKind :: PERCENT } ; [_] => { $ crate :: SyntaxKind :: UNDERSCORE } ; [.] => { $ crate :: SyntaxKind :: DOT } ; [..] => { $ crate :: SyntaxKind :: DOT2 } ; [...] => { $ crate :: SyntaxKind :: DOT3 } ; [..=] => { $ crate :: SyntaxKind :: DOT2EQ } ; [:] => { $ crate :: SyntaxKind :: COLON } ; [::] => { $ crate :: SyntaxKind :: COLON2 } ; [=] => { $ crate :: SyntaxKind :: EQ } ; [==] => { $ crate :: SyntaxKind :: EQ2 } ; [=>] => { $ crate :: SyntaxKind :: FAT_ARROW } ; [!] => { $ crate :: SyntaxKind :: BANG } ; [!=] => { $ crate :: SyntaxKind :: NEQ } ; [-] => { $ crate :: SyntaxKind :: MINUS } ; [->] => { $ crate :: SyntaxKind :: THIN_ARROW } ; [<=] => { $ crate :: SyntaxKind :: LTEQ } ; [>=] => { $ crate :: SyntaxKind :: GTEQ } ; [+=] => { $ crate :: SyntaxKind :: PLUSEQ } ; [-=] => { $ crate :: SyntaxKind :: MINUSEQ } ; [|=] => { $ crate :: SyntaxKind :: PIPEEQ } ; [&=] => { $ crate :: SyntaxKind :: AMPEQ } ; [^=] => { $ crate :: SyntaxKind :: CARETEQ } ; [/=] => { $ crate :: SyntaxKind :: SLASHEQ } ; [*=] => { $ crate :: SyntaxKind :: STAREQ } ; [%=] => { $ crate :: SyntaxKind :: PERCENTEQ } ; [&&] => { $ crate :: SyntaxKind :: AMP2 } ; [||] => { $ crate :: SyntaxKind :: PIPE2 } ; [<<] => { $ crate :: SyntaxKind :: SHL } ; [>>] => { $ crate :: SyntaxKind :: SHR } ; [<<=] => { $ crate :: SyntaxKind :: SHLEQ } ; [>>=] => { $ crate :: SyntaxKind :: SHREQ } ; [Self] => { $ crate :: SyntaxKind :: SELF_TYPE_KW } ; [abstract] => { $ crate :: SyntaxKind :: ABSTRACT_KW } ; [as] => { $ crate :: SyntaxKind :: AS_KW } ; [become] => { $ crate :: SyntaxKind :: BECOME_KW } ; [box] => { $ crate :: SyntaxKind :: BOX_KW } ; [break] => { $ crate :: SyntaxKind :: BREAK_KW } ; [const] => { $ crate :: SyntaxKind :: CONST_KW } ; [continue] => { $ crate :: SyntaxKind :: CONTINUE_KW } ; [crate] => { $ crate :: SyntaxKind :: CRATE_KW } ; [do] => { $ crate :: SyntaxKind :: DO_KW } ; [else] => { $ crate :: SyntaxKind :: ELSE_KW } ; [enum] => { $ crate :: SyntaxKind :: ENUM_KW } ; [extern] => { $ crate :: SyntaxKind :: EXTERN_KW } ; [false] => { $ crate :: SyntaxKind :: FALSE_KW } ; [final] => { $ crate :: SyntaxKind :: FINAL_KW } ; [fn] => { $ crate :: SyntaxKind :: FN_KW } ; [for] => { $ crate :: SyntaxKind :: FOR_KW } ; [if] => { $ crate :: SyntaxKind :: IF_KW } ; [impl] => { $ crate :: SyntaxKind :: IMPL_KW } ; [in] => { $ crate :: SyntaxKind :: IN_KW } ; [let] => { $ crate :: SyntaxKind :: LET_KW } ; [loop] => { $ crate :: SyntaxKind :: LOOP_KW } ; [macro] => { $ crate :: SyntaxKind :: MACRO_KW } ; [match] => { $ crate :: SyntaxKind :: MATCH_KW } ; [mod] => { $ crate :: SyntaxKind :: MOD_KW } ; [move] => { $ crate :: SyntaxKind :: MOVE_KW } ; [mut] => { $ crate :: SyntaxKind :: MUT_KW } ; [override] => { $ crate :: SyntaxKind :: OVERRIDE_KW } ; [priv] => { $ crate :: SyntaxKind :: PRIV_KW } ; [pub] => { $ crate :: SyntaxKind :: PUB_KW } ; [ref] => { $ crate :: SyntaxKind :: REF_KW } ; [return] => { $ crate :: SyntaxKind :: RETURN_KW } ; [self] => { $ crate :: SyntaxKind :: SELF_KW } ; [static] => { $ crate :: SyntaxKind :: STATIC_KW } ; [struct] => { $ crate :: SyntaxKind :: STRUCT_KW } ; [super] => { $ crate :: SyntaxKind :: SUPER_KW } ; [trait] => { $ crate :: SyntaxKind :: TRAIT_KW } ; [true] => { $ crate :: SyntaxKind :: TRUE_KW } ; [type] => { $ crate :: SyntaxKind :: TYPE_KW } ; [typeof] => { $ crate :: SyntaxKind :: TYPEOF_KW } ; [unsafe] => { $ crate :: SyntaxKind :: UNSAFE_KW } ; [unsized] => { $ crate :: SyntaxKind :: UNSIZED_KW } ; [use] => { $ crate :: SyntaxKind :: USE_KW } ; [virtual] => { $ crate :: SyntaxKind :: VIRTUAL_KW } ; [where] => { $ crate :: SyntaxKind :: WHERE_KW } ; [while] => { $ crate :: SyntaxKind :: WHILE_KW } ; [yield] => { $ crate :: SyntaxKind :: YIELD_KW } ; [asm] => { $ crate :: SyntaxKind :: ASM_KW } ; [att_syntax] => { $ crate :: SyntaxKind :: ATT_SYNTAX_KW } ; [auto] => { $ crate :: SyntaxKind :: AUTO_KW } ; [builtin] => { $ crate :: SyntaxKind :: BUILTIN_KW } ; [clobber_abi] => { $ crate :: SyntaxKind :: CLOBBER_ABI_KW } ; [default] => { $ crate :: SyntaxKind :: DEFAULT_KW } ; [dyn] => { $ crate :: SyntaxKind :: DYN_KW } ; [format_args] => { $ crate :: SyntaxKind :: FORMAT_ARGS_KW } ; [inlateout] => { $ crate :: SyntaxKind :: INLATEOUT_KW } ; [inout] => { $ crate :: SyntaxKind :: INOUT_KW } ; [label] => { $ crate :: SyntaxKind :: LABEL_KW } ; [lateout] => { $ crate :: SyntaxKind :: LATEOUT_KW } ; [macro_rules] => { $ crate :: SyntaxKind :: MACRO_RULES_KW } ; [may_unwind] => { $ crate :: SyntaxKind :: MAY_UNWIND_KW } ; [nomem] => { $ crate :: SyntaxKind :: NOMEM_KW } ; [noreturn] => { $ crate :: SyntaxKind :: NORETURN_KW } ; [nostack] => { $ crate :: SyntaxKind :: NOSTACK_KW } ; [offset_of] => { $ crate :: SyntaxKind :: OFFSET_OF_KW } ; [options] => { $ crate :: SyntaxKind :: OPTIONS_KW } ; [out] => { $ crate :: SyntaxKind :: OUT_KW } ; [preserves_flags] => { $ crate :: SyntaxKind :: PRESERVES_FLAGS_KW } ; [pure] => { $ crate :: SyntaxKind :: PURE_KW } ; [raw] => { $ crate :: SyntaxKind :: RAW_KW } ; [readonly] => { $ crate :: SyntaxKind :: READONLY_KW } ; [safe] => { $ crate :: SyntaxKind :: SAFE_KW } ; [sym] => { $ crate :: SyntaxKind :: SYM_KW } ; [union] => { $ crate :: SyntaxKind :: UNION_KW } ; [yeet] => { $ crate :: SyntaxKind :: YEET_KW } ; [async] => { $ crate :: SyntaxKind :: ASYNC_KW } ; [await] => { $ crate :: SyntaxKind :: AWAIT_KW } ; [dyn] => { $ crate :: SyntaxKind :: DYN_KW } ; [gen] => { $ crate :: SyntaxKind :: GEN_KW } ; [try] => { $ crate :: SyntaxKind :: TRY_KW } ; [lifetime_ident] => { $ crate :: SyntaxKind :: LIFETIME_IDENT } ; [int_number] => { $ crate :: SyntaxKind :: INT_NUMBER } ; [ident] => { $ crate :: SyntaxKind :: IDENT } ; [string] => { $ crate :: SyntaxKind :: STRING } ; [shebang] => { $ crate :: SyntaxKind :: SHEBANG } ; [frontmatter] => { $ crate :: SyntaxKind :: FRONTMATTER } ; }
 impl ::core::marker::Copy for SyntaxKind {}
 impl ::core::clone::Clone for SyntaxKind {
     #[inline]
diff --git a/src/tools/rust-analyzer/crates/syntax/rust.ungram b/src/tools/rust-analyzer/crates/syntax/rust.ungram
index a0ae0d68581..10abca7d35d 100644
--- a/src/tools/rust-analyzer/crates/syntax/rust.ungram
+++ b/src/tools/rust-analyzer/crates/syntax/rust.ungram
@@ -133,6 +133,7 @@ Meta =
 
 SourceFile =
   '#shebang'?
+  '#frontmatter'?
   Attr*
   Item*
 
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 1243f6418fe..cd9f4dba890 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
@@ -1525,6 +1525,10 @@ impl ast::HasDocComments for SourceFile {}
 impl ast::HasModuleItem for SourceFile {}
 impl SourceFile {
     #[inline]
+    pub fn frontmatter_token(&self) -> Option<SyntaxToken> {
+        support::token(&self.syntax, T![frontmatter])
+    }
+    #[inline]
     pub fn shebang_token(&self) -> Option<SyntaxToken> { support::token(&self.syntax, T![shebang]) }
 }
 pub struct Static {
diff --git a/src/tools/rust-analyzer/xtask/src/codegen/grammar.rs b/src/tools/rust-analyzer/xtask/src/codegen/grammar.rs
index 4b9c6edbe30..824b38fc872 100644
--- a/src/tools/rust-analyzer/xtask/src/codegen/grammar.rs
+++ b/src/tools/rust-analyzer/xtask/src/codegen/grammar.rs
@@ -670,6 +670,7 @@ fn generate_syntax_kinds(grammar: KindsSrc) -> String {
             [ident] => { $crate::SyntaxKind::IDENT };
             [string] => { $crate::SyntaxKind::STRING };
             [shebang] => { $crate::SyntaxKind::SHEBANG };
+            [frontmatter] => { $crate::SyntaxKind::FRONTMATTER };
         }
 
         impl ::core::marker::Copy for SyntaxKind {}
diff --git a/src/tools/rustbook/Cargo.lock b/src/tools/rustbook/Cargo.lock
index 81e0f6d572b..3b5b31bed14 100644
--- a/src/tools/rustbook/Cargo.lock
+++ b/src/tools/rustbook/Cargo.lock
@@ -938,9 +938,9 @@ dependencies = [
 
 [[package]]
 name = "mdbook"
-version = "0.4.48"
+version = "0.4.49"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8b6fbb4ac2d9fd7aa987c3510309ea3c80004a968d063c42f0d34fea070817c1"
+checksum = "d1daacee059634081dee4250d2814763a365b92dfe14bfdef964bc27835209d4"
 dependencies = [
  "ammonia",
  "anyhow",
diff --git a/src/tools/rustbook/Cargo.toml b/src/tools/rustbook/Cargo.toml
index a0b220c3557..10fde31306d 100644
--- a/src/tools/rustbook/Cargo.toml
+++ b/src/tools/rustbook/Cargo.toml
@@ -15,6 +15,6 @@ mdbook-i18n-helpers = "0.3.3"
 mdbook-spec = { path = "../../doc/reference/mdbook-spec" }
 
 [dependencies.mdbook]
-version = "0.4.48"
+version = "0.4.49"
 default-features = false
 features = ["search"]
diff --git a/tests/coverage/abort.cov-map b/tests/coverage/abort.cov-map
index 26536caeba5..4021537392b 100644
--- a/tests/coverage/abort.cov-map
+++ b/tests/coverage/abort.cov-map
@@ -1,7 +1,7 @@
 Function name: abort::main
 Raw bytes (83): 0x[01, 01, 07, 05, 01, 05, 0b, 01, 09, 05, 13, 01, 0d, 05, 1b, 01, 11, 0d, 01, 0d, 01, 01, 1b, 05, 02, 0b, 00, 18, 02, 01, 0c, 00, 19, 09, 00, 1a, 02, 0a, 06, 02, 09, 00, 0a, 02, 02, 0c, 00, 19, 0d, 00, 1a, 00, 31, 0e, 00, 30, 00, 31, 02, 04, 0c, 00, 19, 11, 00, 1a, 00, 31, 16, 00, 30, 00, 31, 02, 01, 09, 00, 17, 01, 02, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/abort.rs
 Number of expressions: 7
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 - expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add)
@@ -36,7 +36,7 @@ Highest counter ID seen: c4
 Function name: abort::might_abort
 Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 03, 01, 01, 14, 05, 02, 09, 01, 0f, 02, 02, 0c, 03, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/abort.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 3
diff --git a/tests/coverage/assert-ne.cov-map b/tests/coverage/assert-ne.cov-map
index 27d4b0382de..4bee7d7b97c 100644
--- a/tests/coverage/assert-ne.cov-map
+++ b/tests/coverage/assert-ne.cov-map
@@ -1,7 +1,7 @@
 Function name: assert_ne::main
 Raw bytes (28): 0x[01, 01, 02, 01, 05, 01, 09, 04, 01, 08, 01, 03, 15, 05, 04, 0d, 00, 13, 02, 02, 0d, 00, 13, 06, 03, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/assert-ne.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
diff --git a/tests/coverage/assert.cov-map b/tests/coverage/assert.cov-map
index 903cccfe9cb..e7ee9197971 100644
--- a/tests/coverage/assert.cov-map
+++ b/tests/coverage/assert.cov-map
@@ -1,7 +1,7 @@
 Function name: assert::main
 Raw bytes (61): 0x[01, 01, 06, 05, 01, 05, 17, 01, 09, 05, 13, 17, 0d, 01, 09, 09, 01, 09, 01, 01, 1b, 05, 02, 0b, 00, 18, 02, 01, 0c, 00, 1a, 09, 00, 1b, 02, 0a, 06, 02, 13, 00, 20, 0d, 00, 21, 02, 0a, 0e, 02, 09, 00, 0a, 02, 01, 09, 00, 17, 01, 02, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/assert.rs
 Number of expressions: 6
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 - expression 1 operands: lhs = Counter(1), rhs = Expression(5, Add)
@@ -28,7 +28,7 @@ Highest counter ID seen: c3
 Function name: assert::might_fail_assert
 Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 04, 01, 02, 0f, 02, 02, 25, 00, 3d, 05, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/assert.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 3
diff --git a/tests/coverage/assert_not.cov-map b/tests/coverage/assert_not.cov-map
index 3aef4274edc..d3ef867a8a8 100644
--- a/tests/coverage/assert_not.cov-map
+++ b/tests/coverage/assert_not.cov-map
@@ -1,7 +1,7 @@
 Function name: assert_not::main
 Raw bytes (29): 0x[01, 01, 00, 05, 01, 06, 01, 01, 11, 01, 02, 05, 00, 13, 01, 01, 05, 00, 13, 01, 01, 05, 00, 15, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/assert_not.rs
 Number of expressions: 0
 Number of file 0 mappings: 5
 - Code(Counter(0)) at (prev + 6, 1) to (start + 1, 17)
diff --git a/tests/coverage/async.cov-map b/tests/coverage/async.cov-map
index 521562f6b91..8d8dd243057 100644
--- a/tests/coverage/async.cov-map
+++ b/tests/coverage/async.cov-map
@@ -1,7 +1,7 @@
 Function name: async::c
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 01, 00, 19]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 11, 1) to (start + 0, 25)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: async::c::{closure#0}
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 0b, 19, 01, 0e, 05, 02, 09, 00, 0a, 02, 02, 09, 00, 0a, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -24,7 +24,7 @@ Highest counter ID seen: c1
 Function name: async::d
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 01, 00, 14]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 19, 1) to (start + 0, 20)
@@ -33,7 +33,7 @@ Highest counter ID seen: c0
 Function name: async::d::{closure#0}
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 14, 00, 19]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 19, 20) to (start + 0, 25)
@@ -42,7 +42,7 @@ Highest counter ID seen: c0
 Function name: async::e (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 15, 01, 00, 14]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 21, 1) to (start + 0, 20)
@@ -51,7 +51,7 @@ Highest counter ID seen: (none)
 Function name: async::e::{closure#0} (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 15, 14, 00, 19]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 21, 20) to (start + 0, 25)
@@ -60,7 +60,7 @@ Highest counter ID seen: (none)
 Function name: async::f
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 17, 01, 00, 14]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 23, 1) to (start + 0, 20)
@@ -69,7 +69,7 @@ Highest counter ID seen: c0
 Function name: async::f::{closure#0}
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 17, 14, 00, 19]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 23, 20) to (start + 0, 25)
@@ -78,7 +78,7 @@ Highest counter ID seen: c0
 Function name: async::foo (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 19, 01, 00, 1e]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 25, 1) to (start + 0, 30)
@@ -87,7 +87,7 @@ Highest counter ID seen: (none)
 Function name: async::foo::{closure#0} (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 19, 1e, 00, 2d]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 25, 30) to (start + 0, 45)
@@ -96,7 +96,7 @@ Highest counter ID seen: (none)
 Function name: async::g
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 1b, 01, 00, 17]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 27, 1) to (start + 0, 23)
@@ -105,7 +105,7 @@ Highest counter ID seen: c0
 Function name: async::g::{closure#0} (unused)
 Raw bytes (59): 0x[01, 01, 00, 0b, 00, 1b, 17, 01, 0c, 00, 02, 09, 00, 0a, 00, 00, 0e, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 09, 00, 0a, 00, 00, 0e, 00, 17, 00, 00, 1b, 00, 1c, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 11
 - Code(Zero) at (prev + 27, 23) to (start + 1, 12)
@@ -124,7 +124,7 @@ Highest counter ID seen: (none)
 Function name: async::h
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 23, 01, 00, 16]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 35, 1) to (start + 0, 22)
@@ -133,7 +133,7 @@ Highest counter ID seen: c0
 Function name: async::h::{closure#0} (unused)
 Raw bytes (39): 0x[01, 01, 00, 07, 00, 23, 16, 03, 0c, 00, 04, 09, 00, 0a, 00, 00, 0e, 00, 19, 00, 00, 1a, 00, 1b, 00, 00, 20, 00, 22, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 7
 - Code(Zero) at (prev + 35, 22) to (start + 3, 12)
@@ -148,7 +148,7 @@ Highest counter ID seen: (none)
 Function name: async::i
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 2c, 01, 00, 13]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 44, 1) to (start + 0, 19)
@@ -157,7 +157,7 @@ Highest counter ID seen: c0
 Function name: async::i::{closure#0}
 Raw bytes (65): 0x[01, 01, 03, 05, 09, 11, 15, 0d, 11, 0b, 01, 2c, 13, 04, 0c, 09, 05, 09, 00, 0a, 01, 00, 0e, 00, 18, 05, 00, 1c, 00, 21, 09, 00, 27, 00, 30, 15, 01, 09, 00, 0a, 02, 00, 0e, 00, 17, 11, 00, 1b, 00, 20, 15, 00, 24, 00, 26, 06, 01, 0e, 00, 10, 0b, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 1 operands: lhs = Counter(4), rhs = Counter(5)
@@ -182,7 +182,7 @@ Highest counter ID seen: c5
 Function name: async::j
 Raw bytes (60): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 0a, 01, 37, 01, 00, 0d, 01, 0b, 0b, 00, 0c, 05, 01, 09, 00, 0a, 01, 00, 0e, 00, 1b, 05, 00, 1f, 00, 27, 09, 01, 09, 00, 0a, 02, 00, 0e, 00, 1a, 09, 00, 1e, 00, 20, 06, 01, 0e, 00, 10, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
@@ -205,7 +205,7 @@ Highest counter ID seen: c2
 Function name: async::j::c
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 39, 05, 01, 12, 05, 02, 0d, 00, 0e, 02, 02, 0d, 00, 0e, 01, 02, 05, 00, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -219,7 +219,7 @@ Highest counter ID seen: c1
 Function name: async::j::d
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 40, 05, 00, 17]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 64, 5) to (start + 0, 23)
@@ -228,7 +228,7 @@ Highest counter ID seen: c0
 Function name: async::j::f
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 41, 05, 00, 17]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 65, 5) to (start + 0, 23)
@@ -237,7 +237,7 @@ Highest counter ID seen: c0
 Function name: async::k (unused)
 Raw bytes (29): 0x[01, 01, 00, 05, 00, 49, 01, 01, 0c, 00, 02, 0e, 00, 10, 00, 01, 0e, 00, 10, 00, 01, 0e, 00, 10, 00, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 5
 - Code(Zero) at (prev + 73, 1) to (start + 1, 12)
@@ -250,7 +250,7 @@ Highest counter ID seen: (none)
 Function name: async::l
 Raw bytes (33): 0x[01, 01, 02, 01, 07, 05, 09, 05, 01, 51, 01, 01, 0c, 02, 02, 0e, 00, 10, 09, 01, 0e, 00, 10, 05, 01, 0e, 00, 10, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -266,7 +266,7 @@ Highest counter ID seen: c2
 Function name: async::m
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 59, 01, 00, 19]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 89, 1) to (start + 0, 25)
@@ -275,7 +275,7 @@ Highest counter ID seen: c0
 Function name: async::m::{closure#0} (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 59, 19, 00, 22]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 89, 25) to (start + 0, 34)
@@ -284,7 +284,7 @@ Highest counter ID seen: (none)
 Function name: async::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 5b, 01, 08, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 91, 1) to (start + 8, 2)
diff --git a/tests/coverage/async2.cov-map b/tests/coverage/async2.cov-map
index c2a0645ee9a..43ec9f397bd 100644
--- a/tests/coverage/async2.cov-map
+++ b/tests/coverage/async2.cov-map
@@ -1,7 +1,7 @@
 Function name: async2::async_func
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0f, 01, 00, 17]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async2.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 15, 1) to (start + 0, 23)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: async2::async_func::{closure#0}
 Raw bytes (24): 0x[01, 01, 00, 04, 01, 0f, 17, 03, 09, 01, 03, 0a, 02, 06, 00, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async2.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 15, 23) to (start + 3, 9)
@@ -22,7 +22,7 @@ Highest counter ID seen: c0
 Function name: async2::async_func_just_println
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 17, 01, 00, 24]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async2.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 23, 1) to (start + 0, 36)
@@ -31,7 +31,7 @@ Highest counter ID seen: c0
 Function name: async2::async_func_just_println::{closure#0}
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 17, 24, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async2.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 23, 36) to (start + 2, 2)
@@ -40,7 +40,7 @@ Highest counter ID seen: c0
 Function name: async2::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 1b, 01, 07, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async2.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 27, 1) to (start + 7, 2)
@@ -49,7 +49,7 @@ Highest counter ID seen: c0
 Function name: async2::non_async_func
 Raw bytes (24): 0x[01, 01, 00, 04, 01, 07, 01, 03, 09, 01, 03, 0a, 02, 06, 00, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async2.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 7, 1) to (start + 3, 9)
diff --git a/tests/coverage/async_block.cov-map b/tests/coverage/async_block.cov-map
index d9196f446f1..9e76bb981ff 100644
--- a/tests/coverage/async_block.cov-map
+++ b/tests/coverage/async_block.cov-map
@@ -1,7 +1,7 @@
 Function name: async_block::main
 Raw bytes (36): 0x[01, 01, 01, 05, 01, 06, 01, 07, 01, 00, 0b, 02, 01, 09, 00, 0a, 05, 00, 0e, 00, 13, 02, 01, 0d, 00, 13, 02, 07, 09, 00, 22, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async_block.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 6
@@ -19,7 +19,7 @@ Highest counter ID seen: c1
 Function name: async_block::main::{closure#0}
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 09, 1c, 01, 17, 05, 01, 18, 02, 0e, 02, 02, 14, 02, 0e, 01, 03, 09, 00, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async_block.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
diff --git a/tests/coverage/async_closure.cov-map b/tests/coverage/async_closure.cov-map
index a4ef0ceeb6d..10b6db0fc71 100644
--- a/tests/coverage/async_closure.cov-map
+++ b/tests/coverage/async_closure.cov-map
@@ -1,7 +1,7 @@
 Function name: async_closure::call_once::<async_closure::main::{closure#0}>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 06, 01, 00, 2b]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async_closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 6, 1) to (start + 0, 43)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: async_closure::call_once::<async_closure::main::{closure#0}>::{closure#0}
 Raw bytes (16): 0x[01, 01, 01, 05, 09, 02, 01, 06, 2b, 01, 0e, 02, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async_closure.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 2
@@ -22,7 +22,7 @@ Highest counter ID seen: c0
 Function name: async_closure::main
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 0a, 01, 01, 16, 01, 02, 05, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async_closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 10, 1) to (start + 1, 22)
@@ -32,7 +32,7 @@ Highest counter ID seen: c0
 Function name: async_closure::main::{closure#0}
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 0b, 22, 00, 23, 01, 00, 23, 00, 24]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async_closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 11, 34) to (start + 0, 35)
@@ -42,7 +42,7 @@ Highest counter ID seen: c0
 Function name: async_closure::main::{closure#0}
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 0b, 22, 00, 23, 01, 00, 23, 00, 24]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async_closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 11, 34) to (start + 0, 35)
@@ -52,7 +52,7 @@ Highest counter ID seen: c0
 Function name: async_closure::main::{closure#0}::{closure#0}::<i16>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 22, 00, 24]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/async_closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 11, 34) to (start + 0, 36)
diff --git a/tests/coverage/attr/impl.cov-map b/tests/coverage/attr/impl.cov-map
index 8a23c082082..ad24dfb6322 100644
--- a/tests/coverage/attr/impl.cov-map
+++ b/tests/coverage/attr/impl.cov-map
@@ -1,7 +1,7 @@
 Function name: <impl::MyStruct>::off_on (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 0f, 05, 00, 13]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/impl.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 15, 5) to (start + 0, 19)
@@ -10,7 +10,7 @@ Highest counter ID seen: (none)
 Function name: <impl::MyStruct>::on_inherit (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 17, 05, 00, 17]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/impl.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 23, 5) to (start + 0, 23)
@@ -19,7 +19,7 @@ Highest counter ID seen: (none)
 Function name: <impl::MyStruct>::on_on (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 1a, 05, 00, 12]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/impl.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 26, 5) to (start + 0, 18)
diff --git a/tests/coverage/attr/module.cov-map b/tests/coverage/attr/module.cov-map
index 81e20a2c264..eba24da0dd1 100644
--- a/tests/coverage/attr/module.cov-map
+++ b/tests/coverage/attr/module.cov-map
@@ -1,7 +1,7 @@
 Function name: module::off::on (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 0d, 05, 00, 0f]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/module.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 13, 5) to (start + 0, 15)
@@ -10,7 +10,7 @@ Highest counter ID seen: (none)
 Function name: module::on::inherit (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 15, 05, 00, 14]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/module.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 21, 5) to (start + 0, 20)
@@ -19,7 +19,7 @@ Highest counter ID seen: (none)
 Function name: module::on::on (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 18, 05, 00, 0f]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/module.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 24, 5) to (start + 0, 15)
diff --git a/tests/coverage/attr/nested.cov-map b/tests/coverage/attr/nested.cov-map
index 138b3159ea5..a831340bce5 100644
--- a/tests/coverage/attr/nested.cov-map
+++ b/tests/coverage/attr/nested.cov-map
@@ -1,7 +1,7 @@
 Function name: nested::closure_expr
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 40, 01, 01, 0f, 01, 0b, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/nested.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 64, 1) to (start + 1, 15)
@@ -11,7 +11,7 @@ Highest counter ID seen: c0
 Function name: nested::closure_tail
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 4f, 01, 01, 0f, 01, 11, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/nested.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 79, 1) to (start + 1, 15)
diff --git a/tests/coverage/attr/off-on-sandwich.cov-map b/tests/coverage/attr/off-on-sandwich.cov-map
index c55c5897d8b..d26f06bb81f 100644
--- a/tests/coverage/attr/off-on-sandwich.cov-map
+++ b/tests/coverage/attr/off-on-sandwich.cov-map
@@ -1,7 +1,7 @@
 Function name: off_on_sandwich::dense_a::dense_b
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 10, 05, 02, 10, 01, 07, 05, 00, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/off-on-sandwich.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 16, 5) to (start + 2, 16)
@@ -11,7 +11,7 @@ Highest counter ID seen: c0
 Function name: off_on_sandwich::sparse_a::sparse_b::sparse_c
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 22, 09, 02, 15, 01, 0b, 09, 00, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/off-on-sandwich.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 34, 9) to (start + 2, 21)
@@ -21,7 +21,7 @@ Highest counter ID seen: c0
 Function name: off_on_sandwich::sparse_a::sparse_b::sparse_c::sparse_d
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 25, 0d, 02, 19, 01, 07, 0d, 00, 0e]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/off-on-sandwich.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 37, 13) to (start + 2, 25)
diff --git a/tests/coverage/attr/trait-impl-inherit.cov-map b/tests/coverage/attr/trait-impl-inherit.cov-map
index eab9f926bb7..b3e87578592 100644
--- a/tests/coverage/attr/trait-impl-inherit.cov-map
+++ b/tests/coverage/attr/trait-impl-inherit.cov-map
@@ -1,7 +1,7 @@
 Function name: <trait_impl_inherit::S as trait_impl_inherit::T>::f
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 05, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/trait-impl-inherit.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 17, 5) to (start + 2, 6)
diff --git a/tests/coverage/await_ready.cov-map b/tests/coverage/await_ready.cov-map
index 61fd4c7814d..7bff6a4a774 100644
--- a/tests/coverage/await_ready.cov-map
+++ b/tests/coverage/await_ready.cov-map
@@ -1,7 +1,7 @@
 Function name: await_ready::await_ready
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0e, 01, 00, 1e]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/await_ready.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 14, 1) to (start + 0, 30)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: await_ready::await_ready::{closure#0}
 Raw bytes (16): 0x[01, 01, 01, 05, 09, 02, 01, 0e, 1e, 03, 0f, 02, 04, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/await_ready.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 2
diff --git a/tests/coverage/bad_counter_ids.cov-map b/tests/coverage/bad_counter_ids.cov-map
index f08a70a899d..2ef29930726 100644
--- a/tests/coverage/bad_counter_ids.cov-map
+++ b/tests/coverage/bad_counter_ids.cov-map
@@ -1,7 +1,7 @@
 Function name: bad_counter_ids::eq_bad
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 24, 01, 02, 0f, 00, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/bad_counter_ids.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 36, 1) to (start + 2, 15)
@@ -11,7 +11,7 @@ Highest counter ID seen: c0
 Function name: bad_counter_ids::eq_bad_message
 Raw bytes (19): 0x[01, 01, 00, 03, 01, 29, 01, 02, 0f, 01, 02, 20, 00, 2b, 00, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/bad_counter_ids.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 41, 1) to (start + 2, 15)
@@ -22,7 +22,7 @@ Highest counter ID seen: c0
 Function name: bad_counter_ids::eq_good
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 10, 01, 02, 0f, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/bad_counter_ids.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 16, 1) to (start + 2, 15)
@@ -32,7 +32,7 @@ Highest counter ID seen: c0
 Function name: bad_counter_ids::eq_good_message
 Raw bytes (19): 0x[01, 01, 00, 03, 01, 15, 01, 02, 0f, 00, 02, 20, 00, 2b, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/bad_counter_ids.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 21, 1) to (start + 2, 15)
@@ -43,7 +43,7 @@ Highest counter ID seen: c0
 Function name: bad_counter_ids::ne_bad
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 2e, 01, 02, 0f, 00, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/bad_counter_ids.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 46, 1) to (start + 2, 15)
@@ -53,7 +53,7 @@ Highest counter ID seen: c0
 Function name: bad_counter_ids::ne_bad_message
 Raw bytes (19): 0x[01, 01, 00, 03, 01, 33, 01, 02, 0f, 01, 02, 20, 00, 2b, 00, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/bad_counter_ids.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 51, 1) to (start + 2, 15)
@@ -64,7 +64,7 @@ Highest counter ID seen: c0
 Function name: bad_counter_ids::ne_good
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 1a, 01, 02, 0f, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/bad_counter_ids.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 26, 1) to (start + 2, 15)
@@ -74,7 +74,7 @@ Highest counter ID seen: c0
 Function name: bad_counter_ids::ne_good_message
 Raw bytes (19): 0x[01, 01, 00, 03, 01, 1f, 01, 02, 0f, 00, 02, 20, 00, 2b, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/bad_counter_ids.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 31, 1) to (start + 2, 15)
diff --git a/tests/coverage/bench.cov-map b/tests/coverage/bench.cov-map
index 9ee6510f690..1707957fddc 100644
--- a/tests/coverage/bench.cov-map
+++ b/tests/coverage/bench.cov-map
@@ -1,7 +1,7 @@
 Function name: bench::my_bench
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 08, 01, 00, 27]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/bench.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 8, 1) to (start + 0, 39)
diff --git a/tests/coverage/branch/generics.cov-map b/tests/coverage/branch/generics.cov-map
index 656890634ff..50e6eedb676 100644
--- a/tests/coverage/branch/generics.cov-map
+++ b/tests/coverage/branch/generics.cov-map
@@ -1,7 +1,7 @@
 Function name: generics::print_size::<()>
 Raw bytes (33): 0x[01, 01, 01, 01, 05, 05, 01, 06, 01, 01, 24, 20, 05, 02, 01, 08, 00, 24, 05, 00, 25, 02, 06, 02, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/generics.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 5
@@ -18,7 +18,7 @@ Highest counter ID seen: c1
 Function name: generics::print_size::<u32>
 Raw bytes (33): 0x[01, 01, 01, 01, 05, 05, 01, 06, 01, 01, 24, 20, 05, 02, 01, 08, 00, 24, 05, 00, 25, 02, 06, 02, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/generics.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 5
@@ -35,7 +35,7 @@ Highest counter ID seen: c1
 Function name: generics::print_size::<u64>
 Raw bytes (33): 0x[01, 01, 01, 01, 05, 05, 01, 06, 01, 01, 24, 20, 05, 02, 01, 08, 00, 24, 05, 00, 25, 02, 06, 02, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/generics.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 5
diff --git a/tests/coverage/branch/guard.cov-map b/tests/coverage/branch/guard.cov-map
index 46533df00f7..c1a275b34a3 100644
--- a/tests/coverage/branch/guard.cov-map
+++ b/tests/coverage/branch/guard.cov-map
@@ -1,7 +1,7 @@
 Function name: guard::branch_match_guard
 Raw bytes (89): 0x[01, 01, 08, 05, 0d, 09, 05, 05, 0f, 0d, 11, 17, 1b, 01, 05, 1f, 11, 09, 0d, 0d, 01, 0c, 01, 01, 0e, 02, 03, 0b, 00, 0c, 06, 01, 14, 02, 0a, 0d, 03, 0e, 00, 0f, 05, 00, 14, 00, 19, 20, 0d, 02, 00, 14, 00, 1e, 0d, 00, 1d, 02, 0a, 11, 03, 0e, 00, 0f, 02, 00, 14, 00, 19, 20, 11, 0a, 00, 14, 00, 1e, 11, 00, 1d, 02, 0a, 12, 03, 0e, 02, 0a, 01, 04, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/guard.rs
 Number of expressions: 8
 - expression 0 operands: lhs = Counter(1), rhs = Counter(3)
 - expression 1 operands: lhs = Counter(2), rhs = Counter(1)
diff --git a/tests/coverage/branch/if-let.cov-map b/tests/coverage/branch/if-let.cov-map
index 7f6b174615a..a7923223301 100644
--- a/tests/coverage/branch/if-let.cov-map
+++ b/tests/coverage/branch/if-let.cov-map
@@ -1,7 +1,7 @@
 Function name: if_let::if_let
 Raw bytes (43): 0x[01, 01, 01, 01, 05, 07, 01, 0c, 01, 01, 0e, 20, 02, 05, 03, 0c, 00, 13, 02, 00, 11, 00, 12, 01, 00, 16, 00, 1b, 02, 00, 1c, 02, 06, 05, 02, 0c, 02, 06, 01, 03, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if-let.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 7
@@ -21,7 +21,7 @@ Highest counter ID seen: c1
 Function name: if_let::if_let_chain
 Raw bytes (74): 0x[01, 01, 08, 01, 05, 01, 1f, 05, 09, 01, 1f, 05, 09, 01, 1f, 05, 09, 05, 09, 0a, 01, 17, 01, 00, 33, 20, 02, 05, 01, 0c, 00, 13, 02, 00, 11, 00, 12, 01, 00, 16, 00, 17, 20, 16, 09, 01, 10, 00, 17, 16, 00, 15, 00, 16, 02, 00, 1a, 00, 1b, 16, 01, 05, 03, 06, 1f, 03, 0c, 02, 06, 01, 03, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if-let.rs
 Number of expressions: 8
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(7, Add)
diff --git a/tests/coverage/branch/if.cov-map b/tests/coverage/branch/if.cov-map
index 1d40f032aa8..64b13fcfaa1 100644
--- a/tests/coverage/branch/if.cov-map
+++ b/tests/coverage/branch/if.cov-map
@@ -1,7 +1,7 @@
 Function name: if::branch_and
 Raw bytes (54): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 08, 01, 2b, 01, 01, 0e, 01, 03, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 20, 09, 06, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -25,7 +25,7 @@ Highest counter ID seen: c2
 Function name: if::branch_not
 Raw bytes (116): 0x[01, 01, 07, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 0d, 01, 11, 01, 11, 12, 01, 0c, 01, 01, 0e, 01, 03, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 05, 01, 09, 00, 10, 02, 01, 05, 00, 06, 01, 01, 08, 00, 0a, 20, 0a, 09, 00, 08, 00, 0a, 0a, 00, 0b, 02, 06, 09, 02, 05, 00, 06, 01, 01, 08, 00, 0b, 20, 0d, 12, 00, 08, 00, 0b, 0d, 00, 0c, 02, 06, 12, 02, 05, 00, 06, 01, 01, 08, 00, 0c, 20, 1a, 11, 00, 08, 00, 0c, 1a, 00, 0d, 02, 06, 11, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 7
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
@@ -70,7 +70,7 @@ Highest counter ID seen: c4
 Function name: if::branch_not_as
 Raw bytes (90): 0x[01, 01, 05, 01, 05, 01, 09, 01, 09, 01, 0d, 01, 0d, 0e, 01, 1d, 01, 01, 0e, 01, 03, 08, 00, 14, 20, 02, 05, 00, 08, 00, 14, 02, 00, 15, 02, 06, 05, 02, 05, 00, 06, 01, 01, 08, 00, 15, 20, 09, 0a, 00, 08, 00, 15, 09, 00, 16, 02, 06, 0a, 02, 05, 00, 06, 01, 01, 08, 00, 16, 20, 12, 0d, 00, 08, 00, 16, 12, 00, 17, 02, 06, 0d, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 5
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
@@ -106,7 +106,7 @@ Highest counter ID seen: c3
 Function name: if::branch_or
 Raw bytes (60): 0x[01, 01, 06, 01, 05, 01, 17, 05, 09, 05, 09, 01, 17, 05, 09, 08, 01, 35, 01, 01, 0e, 01, 03, 08, 00, 09, 20, 05, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 20, 09, 12, 00, 0d, 00, 0e, 17, 00, 0f, 02, 06, 12, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 6
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(5, Add)
diff --git a/tests/coverage/branch/lazy-boolean.cov-map b/tests/coverage/branch/lazy-boolean.cov-map
index 5d4fc57eb8f..b01ca5c94df 100644
--- a/tests/coverage/branch/lazy-boolean.cov-map
+++ b/tests/coverage/branch/lazy-boolean.cov-map
@@ -1,7 +1,7 @@
 Function name: lazy_boolean::branch_and
 Raw bytes (38): 0x[01, 01, 01, 01, 05, 06, 01, 13, 01, 01, 0e, 01, 04, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/lazy-boolean.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 6
@@ -18,7 +18,7 @@ Highest counter ID seen: c1
 Function name: lazy_boolean::branch_or
 Raw bytes (38): 0x[01, 01, 01, 01, 05, 06, 01, 1b, 01, 01, 0e, 01, 04, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/lazy-boolean.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 6
@@ -36,7 +36,7 @@ Highest counter ID seen: c1
 Function name: lazy_boolean::chain
 Raw bytes (141): 0x[01, 01, 0f, 01, 05, 05, 09, 09, 0d, 01, 11, 01, 11, 01, 3b, 11, 15, 01, 3b, 11, 15, 01, 37, 3b, 19, 11, 15, 01, 37, 3b, 19, 11, 15, 13, 01, 24, 01, 01, 0e, 01, 04, 09, 00, 0a, 01, 00, 0d, 00, 12, 20, 05, 02, 00, 0d, 00, 12, 05, 00, 16, 00, 1b, 20, 09, 06, 00, 16, 00, 1b, 09, 00, 1f, 00, 24, 20, 0d, 0a, 00, 1f, 00, 24, 0d, 00, 28, 00, 2d, 01, 01, 05, 00, 10, 01, 03, 09, 00, 0a, 01, 00, 0d, 00, 12, 20, 11, 12, 00, 0d, 00, 12, 12, 00, 16, 00, 1b, 20, 15, 1e, 00, 16, 00, 1b, 1e, 00, 1f, 00, 24, 20, 19, 32, 00, 1f, 00, 24, 32, 00, 28, 00, 2d, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/lazy-boolean.rs
 Number of expressions: 15
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -93,7 +93,7 @@ Highest counter ID seen: c6
 Function name: lazy_boolean::nested_mixed
 Raw bytes (137): 0x[01, 01, 0d, 01, 05, 01, 1f, 05, 09, 05, 09, 1f, 0d, 05, 09, 1f, 0d, 05, 09, 01, 11, 11, 15, 01, 15, 01, 33, 15, 19, 13, 01, 31, 01, 01, 0e, 01, 04, 09, 00, 0a, 01, 00, 0e, 00, 13, 20, 05, 02, 00, 0e, 00, 13, 02, 00, 17, 00, 1d, 20, 09, 06, 00, 17, 00, 1d, 1f, 00, 23, 00, 28, 20, 0d, 1a, 00, 23, 00, 28, 1a, 00, 2c, 00, 33, 01, 01, 05, 00, 10, 01, 03, 09, 00, 0a, 01, 00, 0e, 00, 13, 20, 11, 22, 00, 0e, 00, 13, 11, 00, 17, 00, 1c, 20, 15, 26, 00, 17, 00, 1c, 2a, 00, 22, 00, 28, 20, 19, 2e, 00, 22, 00, 28, 19, 00, 2c, 00, 33, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/lazy-boolean.rs
 Number of expressions: 13
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(7, Add)
diff --git a/tests/coverage/branch/let-else.cov-map b/tests/coverage/branch/let-else.cov-map
index 78507a32638..2af5e919f4c 100644
--- a/tests/coverage/branch/let-else.cov-map
+++ b/tests/coverage/branch/let-else.cov-map
@@ -1,7 +1,7 @@
 Function name: let_else::let_else
 Raw bytes (43): 0x[01, 01, 01, 01, 05, 07, 01, 0c, 01, 01, 0e, 20, 02, 05, 03, 09, 00, 10, 02, 00, 0e, 00, 0f, 01, 00, 13, 00, 18, 05, 01, 09, 01, 0f, 02, 04, 05, 00, 0a, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/let-else.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 7
diff --git a/tests/coverage/branch/match-arms.cov-map b/tests/coverage/branch/match-arms.cov-map
index ef71d12c8af..3f753f14eb5 100644
--- a/tests/coverage/branch/match-arms.cov-map
+++ b/tests/coverage/branch/match-arms.cov-map
@@ -1,7 +1,7 @@
 Function name: match_arms::guards
 Raw bytes (88): 0x[01, 01, 08, 15, 05, 19, 09, 1d, 0d, 21, 11, 01, 17, 1b, 11, 1f, 0d, 05, 09, 0c, 01, 30, 01, 01, 0e, 21, 03, 0b, 00, 10, 05, 01, 11, 00, 28, 20, 05, 02, 00, 17, 00, 1b, 09, 01, 11, 00, 28, 20, 09, 06, 00, 17, 00, 1b, 0d, 01, 11, 00, 28, 20, 0d, 0a, 00, 17, 00, 1b, 11, 01, 11, 00, 28, 20, 11, 0e, 00, 17, 00, 1b, 12, 01, 0e, 00, 15, 01, 03, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/match-arms.rs
 Number of expressions: 8
 - expression 0 operands: lhs = Counter(5), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(6), rhs = Counter(2)
@@ -38,7 +38,7 @@ Highest counter ID seen: c8
 Function name: match_arms::match_arms
 Raw bytes (45): 0x[01, 01, 03, 01, 07, 0b, 0d, 05, 09, 07, 01, 18, 01, 01, 0e, 01, 03, 0b, 00, 10, 05, 01, 11, 00, 20, 09, 01, 11, 00, 20, 0d, 01, 11, 00, 20, 02, 01, 11, 00, 20, 01, 03, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/match-arms.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Expression(1, Add)
 - expression 1 operands: lhs = Expression(2, Add), rhs = Counter(3)
@@ -57,7 +57,7 @@ Highest counter ID seen: c3
 Function name: match_arms::or_patterns
 Raw bytes (57): 0x[01, 01, 04, 05, 09, 01, 0b, 03, 0d, 01, 03, 09, 01, 25, 01, 01, 0e, 01, 03, 0b, 00, 10, 05, 01, 11, 00, 12, 09, 00, 1e, 00, 1f, 03, 00, 24, 00, 2d, 0d, 01, 11, 00, 12, 06, 00, 1e, 00, 1f, 0e, 00, 24, 00, 2d, 01, 03, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/match-arms.rs
 Number of expressions: 4
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
diff --git a/tests/coverage/branch/match-trivial.cov-map b/tests/coverage/branch/match-trivial.cov-map
index 1b0c6d12e3d..dd05ae4e345 100644
--- a/tests/coverage/branch/match-trivial.cov-map
+++ b/tests/coverage/branch/match-trivial.cov-map
@@ -1,7 +1,7 @@
 Function name: match_trivial::_uninhabited (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 16, 01, 01, 0e]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/match-trivial.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 22, 1) to (start + 1, 14)
@@ -10,7 +10,7 @@ Highest counter ID seen: (none)
 Function name: match_trivial::trivial
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 1e, 01, 01, 0e, 01, 03, 0b, 05, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/match-trivial.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 30, 1) to (start + 1, 14)
diff --git a/tests/coverage/branch/no-mir-spans.cov-map b/tests/coverage/branch/no-mir-spans.cov-map
index 8fb44ef30fd..d28e6a58008 100644
--- a/tests/coverage/branch/no-mir-spans.cov-map
+++ b/tests/coverage/branch/no-mir-spans.cov-map
@@ -1,7 +1,7 @@
 Function name: no_mir_spans::while_cond
 Raw bytes (18): 0x[01, 01, 01, 05, 01, 02, 01, 10, 01, 00, 11, 20, 02, 01, 04, 0b, 00, 10]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no-mir-spans.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 2
@@ -14,7 +14,7 @@ Highest counter ID seen: c0
 Function name: no_mir_spans::while_cond_not
 Raw bytes (18): 0x[01, 01, 01, 05, 01, 02, 01, 19, 01, 00, 15, 20, 02, 01, 04, 0b, 00, 14]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no-mir-spans.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 2
@@ -27,7 +27,7 @@ Highest counter ID seen: c0
 Function name: no_mir_spans::while_op_and
 Raw bytes (31): 0x[01, 01, 04, 09, 05, 09, 01, 0f, 09, 01, 05, 03, 01, 22, 01, 00, 13, 20, 05, 02, 05, 0b, 00, 10, 20, 06, 0a, 00, 14, 00, 19]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no-mir-spans.rs
 Number of expressions: 4
 - expression 0 operands: lhs = Counter(2), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(2), rhs = Counter(0)
@@ -46,7 +46,7 @@ Highest counter ID seen: c1
 Function name: no_mir_spans::while_op_or
 Raw bytes (29): 0x[01, 01, 03, 09, 05, 09, 0b, 01, 05, 03, 01, 2d, 01, 00, 12, 20, 05, 02, 05, 0b, 00, 10, 20, 06, 01, 00, 14, 00, 19]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no-mir-spans.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(2), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(2), rhs = Expression(2, Add)
diff --git a/tests/coverage/branch/while.cov-map b/tests/coverage/branch/while.cov-map
index 67746af051b..e5fda26822e 100644
--- a/tests/coverage/branch/while.cov-map
+++ b/tests/coverage/branch/while.cov-map
@@ -1,7 +1,7 @@
 Function name: while::while_cond
 Raw bytes (38): 0x[01, 01, 01, 05, 01, 06, 01, 0c, 01, 01, 0e, 01, 03, 09, 00, 12, 05, 01, 0b, 00, 10, 20, 02, 01, 00, 0b, 00, 10, 02, 00, 11, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/while.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 6
@@ -19,7 +19,7 @@ Highest counter ID seen: c1
 Function name: while::while_cond_not
 Raw bytes (38): 0x[01, 01, 01, 05, 01, 06, 01, 15, 01, 01, 0e, 01, 03, 09, 00, 12, 05, 01, 0b, 00, 14, 20, 02, 01, 00, 0b, 00, 14, 02, 00, 15, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/while.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 6
@@ -37,7 +37,7 @@ Highest counter ID seen: c1
 Function name: while::while_op_and
 Raw bytes (58): 0x[01, 01, 05, 05, 09, 05, 01, 0f, 05, 01, 09, 05, 01, 08, 01, 1e, 01, 01, 0e, 01, 03, 09, 01, 12, 05, 02, 0b, 00, 10, 20, 09, 02, 00, 0b, 00, 10, 09, 00, 14, 00, 19, 20, 12, 0a, 00, 14, 00, 19, 12, 00, 1a, 03, 06, 01, 04, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/while.rs
 Number of expressions: 5
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(0)
@@ -63,7 +63,7 @@ Highest counter ID seen: c2
 Function name: while::while_op_or
 Raw bytes (56): 0x[01, 01, 04, 05, 09, 05, 0b, 01, 09, 05, 01, 08, 01, 29, 01, 01, 0e, 01, 03, 09, 01, 12, 05, 02, 0b, 00, 10, 20, 09, 02, 00, 0b, 00, 10, 02, 00, 14, 00, 19, 20, 06, 01, 00, 14, 00, 19, 0e, 00, 1a, 03, 06, 01, 04, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/while.rs
 Number of expressions: 4
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add)
diff --git a/tests/coverage/closure.cov-map b/tests/coverage/closure.cov-map
index 2d784ba09b6..096be9ea78a 100644
--- a/tests/coverage/closure.cov-map
+++ b/tests/coverage/closure.cov-map
@@ -1,7 +1,7 @@
 Function name: closure::main
 Raw bytes (126): 0x[01, 01, 01, 01, 05, 18, 01, 09, 01, 0d, 1b, 01, 1a, 05, 02, 0a, 01, 0c, 05, 11, 1b, 01, 1e, 05, 02, 0a, 01, 0c, 05, 0c, 16, 01, 16, 05, 0d, 18, 01, 19, 09, 01, 1e, 01, 04, 09, 00, 29, 01, 01, 09, 00, 2d, 01, 01, 09, 00, 24, 01, 05, 09, 00, 24, 01, 02, 09, 00, 21, 01, 04, 09, 00, 21, 01, 04, 09, 00, 28, 01, 09, 09, 00, 32, 01, 04, 09, 00, 33, 01, 07, 09, 00, 4b, 01, 08, 09, 00, 48, 01, 0a, 09, 00, 47, 01, 08, 09, 00, 44, 01, 0a, 08, 00, 10, 05, 00, 11, 04, 06, 02, 04, 05, 00, 06, 01, 01, 05, 03, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 24
@@ -35,7 +35,7 @@ Highest counter ID seen: c1
 Function name: closure::main::{closure#0}
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 28, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 09, 00, 0a, 01, 01, 09, 01, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -49,7 +49,7 @@ Highest counter ID seen: c1
 Function name: closure::main::{closure#10} (unused)
 Raw bytes (10): 0x[01, 01, 00, 01, 00, 9b, 01, 07, 00, 21]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 155, 7) to (start + 0, 33)
@@ -58,7 +58,7 @@ Highest counter ID seen: (none)
 Function name: closure::main::{closure#11} (unused)
 Raw bytes (10): 0x[01, 01, 00, 01, 00, 9f, 01, 07, 00, 21]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 159, 7) to (start + 0, 33)
@@ -67,7 +67,7 @@ Highest counter ID seen: (none)
 Function name: closure::main::{closure#12} (unused)
 Raw bytes (10): 0x[01, 01, 00, 01, 00, a7, 01, 01, 00, 17]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 167, 1) to (start + 0, 23)
@@ -76,7 +76,7 @@ Highest counter ID seen: (none)
 Function name: closure::main::{closure#13} (unused)
 Raw bytes (10): 0x[01, 01, 00, 01, 00, ac, 01, 0d, 02, 0e]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 172, 13) to (start + 2, 14)
@@ -85,7 +85,7 @@ Highest counter ID seen: (none)
 Function name: closure::main::{closure#14}
 Raw bytes (22): 0x[01, 01, 01, 01, 05, 03, 01, b3, 01, 0d, 02, 1b, 05, 02, 1e, 00, 25, 02, 00, 2f, 00, 33]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 3
@@ -98,7 +98,7 @@ Highest counter ID seen: c1
 Function name: closure::main::{closure#15}
 Raw bytes (37): 0x[01, 01, 01, 01, 05, 06, 01, bb, 01, 09, 00, 0a, 01, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 02, 00, 2f, 00, 33, 01, 02, 09, 00, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 6
@@ -114,7 +114,7 @@ Highest counter ID seen: c1
 Function name: closure::main::{closure#16}
 Raw bytes (22): 0x[01, 01, 01, 01, 05, 03, 01, c5, 01, 0d, 02, 1b, 05, 02, 1e, 00, 25, 02, 00, 2f, 00, 33]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 3
@@ -127,7 +127,7 @@ Highest counter ID seen: c1
 Function name: closure::main::{closure#17}
 Raw bytes (37): 0x[01, 01, 01, 01, 05, 06, 01, cd, 01, 09, 00, 0a, 01, 01, 0d, 00, 15, 01, 01, 11, 01, 1b, 05, 01, 1e, 00, 25, 02, 00, 2f, 00, 33, 01, 02, 09, 00, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 6
@@ -143,7 +143,7 @@ Highest counter ID seen: c1
 Function name: closure::main::{closure#18}
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 19, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 11, 00, 12, 01, 01, 11, 01, 0e]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -157,7 +157,7 @@ Highest counter ID seen: c1
 Function name: closure::main::{closure#19}
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 43, 0d, 02, 1c, 05, 02, 1d, 02, 12, 02, 02, 11, 00, 12, 01, 01, 11, 01, 0e]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -171,7 +171,7 @@ Highest counter ID seen: c1
 Function name: closure::main::{closure#1}
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 52, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 09, 00, 0a, 01, 01, 09, 01, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -185,7 +185,7 @@ Highest counter ID seen: c1
 Function name: closure::main::{closure#2}
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 68, 05, 02, 14, 05, 02, 15, 02, 0a, 02, 02, 09, 00, 0a, 01, 01, 09, 01, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -199,7 +199,7 @@ Highest counter ID seen: c1
 Function name: closure::main::{closure#3} (unused)
 Raw bytes (25): 0x[01, 01, 00, 04, 00, 81, 01, 05, 01, 14, 00, 01, 15, 02, 0a, 00, 02, 09, 00, 0a, 00, 01, 09, 01, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Zero) at (prev + 129, 5) to (start + 1, 20)
@@ -211,7 +211,7 @@ Highest counter ID seen: (none)
 Function name: closure::main::{closure#4} (unused)
 Raw bytes (10): 0x[01, 01, 00, 01, 00, 89, 01, 35, 00, 43]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 137, 53) to (start + 0, 67)
@@ -220,7 +220,7 @@ Highest counter ID seen: (none)
 Function name: closure::main::{closure#5}
 Raw bytes (10): 0x[01, 01, 00, 01, 01, 8c, 01, 3d, 00, 4f]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 140, 61) to (start + 0, 79)
@@ -229,7 +229,7 @@ Highest counter ID seen: c0
 Function name: closure::main::{closure#6}
 Raw bytes (10): 0x[01, 01, 00, 01, 01, 8d, 01, 41, 00, 57]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 141, 65) to (start + 0, 87)
@@ -238,7 +238,7 @@ Highest counter ID seen: c0
 Function name: closure::main::{closure#7} (unused)
 Raw bytes (10): 0x[01, 01, 00, 01, 00, 8e, 01, 3b, 00, 51]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 142, 59) to (start + 0, 81)
@@ -247,7 +247,7 @@ Highest counter ID seen: (none)
 Function name: closure::main::{closure#8} (unused)
 Raw bytes (10): 0x[01, 01, 00, 01, 00, 93, 01, 3b, 00, 55]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 147, 59) to (start + 0, 85)
@@ -256,7 +256,7 @@ Highest counter ID seen: (none)
 Function name: closure::main::{closure#9} (unused)
 Raw bytes (10): 0x[01, 01, 00, 01, 00, 95, 01, 38, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 149, 56) to (start + 2, 6)
diff --git a/tests/coverage/closure_bug.cov-map b/tests/coverage/closure_bug.cov-map
index 40a8bdf9c1d..8355cbf352b 100644
--- a/tests/coverage/closure_bug.cov-map
+++ b/tests/coverage/closure_bug.cov-map
@@ -1,7 +1,7 @@
 Function name: closure_bug::main
 Raw bytes (97): 0x[01, 01, 04, 01, 05, 01, 09, 01, 0d, 01, 11, 11, 01, 07, 01, 03, 0a, 01, 09, 05, 01, 0e, 05, 01, 0f, 00, 17, 02, 00, 16, 00, 17, 01, 02, 09, 00, 0a, 01, 06, 05, 01, 0e, 09, 01, 0f, 00, 17, 06, 00, 16, 00, 17, 01, 02, 09, 00, 0a, 01, 06, 05, 01, 0e, 0d, 01, 0f, 00, 17, 0a, 00, 16, 00, 17, 01, 02, 09, 00, 0a, 01, 06, 05, 01, 0e, 11, 01, 0f, 00, 17, 0e, 00, 16, 00, 17, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_bug.rs
 Number of expressions: 4
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
@@ -34,7 +34,7 @@ Highest counter ID seen: c4
 Function name: closure_bug::main::{closure#0}
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 0e, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 01, 00, 29, 00, 2a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_bug.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -48,7 +48,7 @@ Highest counter ID seen: c1
 Function name: closure_bug::main::{closure#1}
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 17, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 01, 00, 29, 00, 2a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_bug.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -62,7 +62,7 @@ Highest counter ID seen: c1
 Function name: closure_bug::main::{closure#2}
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 20, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 01, 00, 29, 00, 2a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_bug.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -76,7 +76,7 @@ Highest counter ID seen: c1
 Function name: closure_bug::main::{closure#3}
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 29, 09, 00, 12, 05, 00, 15, 00, 19, 02, 00, 23, 00, 28, 01, 00, 29, 00, 2a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_bug.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
diff --git a/tests/coverage/closure_macro.cov-map b/tests/coverage/closure_macro.cov-map
index 9dd99c8fab3..c624896a720 100644
--- a/tests/coverage/closure_macro.cov-map
+++ b/tests/coverage/closure_macro.cov-map
@@ -1,7 +1,7 @@
 Function name: closure_macro::load_configuration_files
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 1d, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_macro.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 29, 1) to (start + 2, 2)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: closure_macro::main
 Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 21, 01, 01, 20, 02, 02, 09, 00, 0f, 01, 00, 12, 00, 34, 05, 00, 54, 00, 55, 02, 02, 09, 02, 0b, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_macro.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 6
@@ -27,7 +27,7 @@ Highest counter ID seen: c1
 Function name: closure_macro::main::{closure#0}
 Raw bytes (35): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 05, 01, 10, 1c, 03, 21, 05, 04, 11, 01, 27, 02, 03, 11, 00, 16, 06, 00, 17, 00, 1e, 01, 02, 09, 00, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_macro.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
diff --git a/tests/coverage/closure_macro_async.cov-map b/tests/coverage/closure_macro_async.cov-map
index 2548754d754..77bf31de8bd 100644
--- a/tests/coverage/closure_macro_async.cov-map
+++ b/tests/coverage/closure_macro_async.cov-map
@@ -1,7 +1,7 @@
 Function name: closure_macro_async::load_configuration_files
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 21, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_macro_async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 33, 1) to (start + 2, 2)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: closure_macro_async::test
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 25, 01, 00, 2b]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_macro_async.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 37, 1) to (start + 0, 43)
@@ -19,7 +19,7 @@ Highest counter ID seen: c0
 Function name: closure_macro_async::test::{closure#0}
 Raw bytes (36): 0x[01, 01, 01, 01, 05, 06, 01, 25, 2b, 01, 20, 02, 02, 09, 00, 0f, 01, 00, 12, 00, 34, 05, 00, 54, 00, 55, 02, 02, 09, 02, 0b, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_macro_async.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 6
@@ -36,7 +36,7 @@ Highest counter ID seen: c1
 Function name: closure_macro_async::test::{closure#0}::{closure#0}
 Raw bytes (35): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 05, 01, 14, 1c, 03, 21, 05, 04, 11, 01, 27, 02, 03, 11, 00, 16, 06, 00, 17, 00, 1e, 01, 02, 09, 00, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_macro_async.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
diff --git a/tests/coverage/closure_unit_return.cov-map b/tests/coverage/closure_unit_return.cov-map
index 9a66e0b0e77..c75119019fc 100644
--- a/tests/coverage/closure_unit_return.cov-map
+++ b/tests/coverage/closure_unit_return.cov-map
@@ -1,7 +1,7 @@
 Function name: closure_unit_return::explicit_unit
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 07, 01, 01, 10, 01, 05, 05, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_unit_return.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 7, 1) to (start + 1, 16)
@@ -11,7 +11,7 @@ Highest counter ID seen: c0
 Function name: closure_unit_return::explicit_unit::{closure#0} (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 08, 16, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_unit_return.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 8, 22) to (start + 2, 6)
@@ -20,7 +20,7 @@ Highest counter ID seen: (none)
 Function name: closure_unit_return::implicit_unit
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 10, 01, 01, 10, 01, 05, 05, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_unit_return.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 16, 1) to (start + 1, 16)
@@ -30,7 +30,7 @@ Highest counter ID seen: c0
 Function name: closure_unit_return::implicit_unit::{closure#0} (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 11, 16, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/closure_unit_return.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 17, 22) to (start + 2, 6)
diff --git a/tests/coverage/condition/conditions.cov-map b/tests/coverage/condition/conditions.cov-map
index c34075a0bcf..1bcf045b894 100644
--- a/tests/coverage/condition/conditions.cov-map
+++ b/tests/coverage/condition/conditions.cov-map
@@ -1,7 +1,7 @@
 Function name: conditions::assign_3_and_or
 Raw bytes (65): 0x[01, 01, 05, 01, 05, 05, 09, 01, 09, 01, 13, 09, 0d, 09, 01, 1c, 01, 00, 2f, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 0a, 00, 17, 00, 18, 20, 0d, 0e, 00, 17, 00, 18, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/conditions.rs
 Number of expressions: 5
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -30,7 +30,7 @@ Highest counter ID seen: c3
 Function name: conditions::assign_3_or_and
 Raw bytes (63): 0x[01, 01, 04, 01, 05, 01, 0b, 05, 09, 09, 0d, 09, 01, 17, 01, 00, 2f, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 09, 00, 17, 00, 18, 20, 0d, 0e, 00, 17, 00, 18, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/conditions.rs
 Number of expressions: 4
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
@@ -58,7 +58,7 @@ Highest counter ID seen: c3
 Function name: conditions::assign_and
 Raw bytes (47): 0x[01, 01, 02, 01, 05, 05, 09, 07, 01, 0d, 01, 00, 21, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/conditions.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -79,7 +79,7 @@ Highest counter ID seen: c2
 Function name: conditions::assign_or
 Raw bytes (49): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 07, 01, 12, 01, 00, 20, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 20, 05, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 20, 09, 06, 00, 12, 00, 13, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/conditions.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
@@ -102,7 +102,7 @@ Highest counter ID seen: c2
 Function name: conditions::foo
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 21, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/conditions.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 33, 1) to (start + 2, 2)
@@ -111,7 +111,7 @@ Highest counter ID seen: c0
 Function name: conditions::func_call
 Raw bytes (47): 0x[01, 01, 02, 01, 05, 05, 09, 07, 01, 25, 01, 00, 20, 01, 01, 05, 00, 08, 01, 00, 09, 00, 0a, 20, 05, 02, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 20, 09, 06, 00, 0e, 00, 0f, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/conditions.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -132,7 +132,7 @@ Highest counter ID seen: c2
 Function name: conditions::simple_assign
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 08, 01, 03, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/conditions.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 8, 1) to (start + 3, 2)
diff --git a/tests/coverage/conditions.cov-map b/tests/coverage/conditions.cov-map
index 2d12f4bf774..86a31794813 100644
--- a/tests/coverage/conditions.cov-map
+++ b/tests/coverage/conditions.cov-map
@@ -1,7 +1,7 @@
 Function name: conditions::main
 Raw bytes (533): 0x[01, 01, 47, 05, 09, 01, 05, 09, 5d, 09, 27, 5d, 61, 27, 65, 5d, 61, 09, 23, 27, 65, 5d, 61, 01, 03, 03, 0d, 11, 51, 11, 4f, 51, 55, 4f, 59, 51, 55, 11, 4b, 4f, 59, 51, 55, 03, 97, 01, 0d, 11, 0d, 11, 0d, 11, 0d, 11, 0d, 11, 97, 01, 15, 0d, 11, 19, 45, 19, 8f, 01, 45, 49, 8f, 01, 4d, 45, 49, 19, 8b, 01, 8f, 01, 4d, 45, 49, 97, 01, db, 01, 0d, 11, 15, 19, 15, 19, 15, 19, 1d, 21, 15, 19, db, 01, 1d, 15, 19, 21, 39, 21, d3, 01, 39, 3d, d3, 01, 41, 39, 3d, 21, cf, 01, d3, 01, 41, 39, 3d, db, 01, 97, 02, 15, 19, 1d, 21, 25, 29, 1d, 21, 97, 02, 25, 1d, 21, 29, 2d, 29, 8f, 02, 2d, 31, 8f, 02, 35, 2d, 31, 29, 8b, 02, 8f, 02, 35, 2d, 31, 97, 02, 9b, 02, 1d, 21, 25, 29, 44, 01, 03, 01, 02, 0c, 01, 02, 0d, 02, 06, 00, 02, 05, 00, 06, 03, 03, 09, 00, 0a, 01, 00, 10, 00, 1d, 05, 01, 09, 01, 0a, 06, 02, 0f, 00, 1c, 09, 01, 0c, 00, 19, 0a, 00, 1d, 00, 2a, 0e, 00, 2e, 00, 3c, 23, 00, 3d, 02, 0a, 1e, 02, 09, 00, 0a, 09, 01, 09, 01, 12, 2a, 03, 09, 00, 0f, 03, 03, 09, 01, 0c, 03, 01, 0d, 02, 06, 00, 02, 05, 00, 06, 03, 02, 08, 00, 15, 0d, 00, 16, 02, 06, 2e, 02, 0f, 00, 1c, 11, 01, 0c, 00, 19, 32, 00, 1d, 00, 2a, 36, 00, 2e, 00, 3c, 4b, 00, 3d, 02, 0a, 46, 02, 09, 00, 0a, 11, 01, 09, 00, 17, 52, 02, 09, 00, 0f, 97, 01, 03, 08, 00, 0c, 97, 01, 01, 0d, 01, 10, 97, 01, 01, 11, 02, 0a, 00, 02, 09, 00, 0a, 97, 01, 02, 0c, 00, 19, 15, 00, 1a, 02, 0a, 6a, 04, 11, 00, 1e, 19, 01, 10, 00, 1d, 72, 00, 21, 00, 2e, 76, 00, 32, 00, 40, 8b, 01, 00, 41, 02, 0e, 86, 01, 02, 0d, 00, 0e, 19, 01, 0d, 00, 1b, 92, 01, 02, 0d, 00, 13, 00, 02, 05, 00, 06, db, 01, 02, 09, 01, 0c, db, 01, 01, 0d, 02, 06, 00, 02, 05, 00, 06, 97, 02, 02, 09, 00, 0a, db, 01, 00, 10, 00, 1d, 1d, 00, 1e, 02, 06, ae, 01, 02, 0f, 00, 1c, 21, 01, 0c, 00, 19, b6, 01, 00, 1d, 00, 2a, ba, 01, 00, 2e, 00, 3c, cf, 01, 00, 3d, 02, 0a, ca, 01, 02, 09, 00, 0a, 21, 01, 09, 00, 17, d6, 01, 02, 0d, 02, 0f, 9b, 02, 05, 09, 00, 0a, 97, 02, 00, 10, 00, 1d, 25, 00, 1e, 02, 06, ea, 01, 02, 0f, 00, 1c, 29, 01, 0c, 00, 19, f2, 01, 00, 1d, 00, 2a, f6, 01, 00, 2e, 00, 3c, 8b, 02, 00, 3d, 02, 0a, 86, 02, 02, 09, 00, 0a, 29, 01, 09, 00, 17, 92, 02, 02, 09, 00, 0f, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/conditions.rs
 Number of expressions: 71
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(1)
diff --git a/tests/coverage/continue.cov-map b/tests/coverage/continue.cov-map
index d926741cbcb..a8077a32df7 100644
--- a/tests/coverage/continue.cov-map
+++ b/tests/coverage/continue.cov-map
@@ -1,7 +1,7 @@
 Function name: continue::main
 Raw bytes (198): 0x[01, 01, 16, 05, 01, 05, 0b, 01, 09, 0d, 01, 0d, 1f, 01, 11, 0d, 1f, 01, 11, 15, 01, 15, 2b, 01, 19, 1d, 01, 1d, 37, 01, 21, 25, 01, 25, 43, 01, 29, 25, 01, 2d, 01, 53, 2d, 01, 31, 2d, 01, 1e, 01, 03, 01, 03, 12, 05, 04, 0e, 00, 13, 02, 01, 0f, 00, 16, 09, 02, 11, 00, 19, 06, 02, 12, 04, 0e, 0d, 06, 0e, 00, 13, 0e, 01, 0f, 00, 16, 1a, 01, 16, 02, 0e, 11, 04, 11, 00, 19, 1a, 03, 09, 00, 0e, 15, 02, 0e, 00, 13, 22, 01, 0f, 00, 16, 19, 01, 15, 02, 0e, 26, 04, 11, 00, 19, 19, 03, 09, 00, 0e, 1d, 02, 0e, 00, 13, 2e, 01, 0c, 00, 13, 21, 01, 0d, 00, 15, 32, 01, 0a, 01, 0e, 25, 03, 0e, 00, 13, 46, 01, 0f, 00, 16, 3e, 01, 16, 02, 0e, 29, 03, 12, 02, 0e, 46, 04, 09, 00, 0e, 2d, 02, 0e, 00, 13, 31, 01, 0f, 00, 16, 56, 01, 16, 02, 0e, 4e, 04, 11, 00, 16, 56, 03, 09, 00, 0e, 01, 02, 0d, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/continue.rs
 Number of expressions: 22
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 - expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add)
diff --git a/tests/coverage/coroutine.cov-map b/tests/coverage/coroutine.cov-map
index fee32376d83..0ce91553863 100644
--- a/tests/coverage/coroutine.cov-map
+++ b/tests/coverage/coroutine.cov-map
@@ -1,7 +1,7 @@
 Function name: coroutine::get_u32
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 0b, 01, 01, 0b, 05, 02, 09, 00, 0e, 02, 02, 09, 00, 28, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/coroutine.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -15,7 +15,7 @@ Highest counter ID seen: c1
 Function name: coroutine::main
 Raw bytes (53): 0x[01, 01, 02, 01, 05, 05, 09, 09, 01, 13, 01, 02, 16, 01, 08, 0b, 00, 2d, 05, 01, 2b, 00, 2d, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/coroutine.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -36,7 +36,7 @@ Highest counter ID seen: c3
 Function name: coroutine::main::{closure#0}
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 16, 08, 01, 1f, 05, 02, 10, 01, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/coroutine.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 22, 8) to (start + 1, 31)
diff --git a/tests/coverage/coverage_attr_closure.cov-map b/tests/coverage/coverage_attr_closure.cov-map
index fb861996a0d..e029a3b4643 100644
--- a/tests/coverage/coverage_attr_closure.cov-map
+++ b/tests/coverage/coverage_attr_closure.cov-map
@@ -1,7 +1,7 @@
 Function name: coverage_attr_closure::GLOBAL_CLOSURE_ON::{closure#0}
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 06, 0f, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/coverage_attr_closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 6, 15) to (start + 2, 2)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: coverage_attr_closure::contains_closures_off::{closure#0} (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 1d, 13, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/coverage_attr_closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 29, 19) to (start + 2, 6)
@@ -19,7 +19,7 @@ Highest counter ID seen: (none)
 Function name: coverage_attr_closure::contains_closures_on
 Raw bytes (19): 0x[01, 01, 00, 03, 01, 0f, 01, 01, 1a, 01, 05, 09, 00, 1b, 01, 04, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/coverage_attr_closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 15, 1) to (start + 1, 26)
@@ -30,7 +30,7 @@ Highest counter ID seen: c0
 Function name: coverage_attr_closure::contains_closures_on::{closure#0} (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 11, 13, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/coverage_attr_closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 17, 19) to (start + 2, 6)
diff --git a/tests/coverage/dead_code.cov-map b/tests/coverage/dead_code.cov-map
index 897372fe0b5..4cb311428a1 100644
--- a/tests/coverage/dead_code.cov-map
+++ b/tests/coverage/dead_code.cov-map
@@ -1,7 +1,7 @@
 Function name: dead_code::main
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 1b, 01, 07, 0f, 05, 07, 10, 02, 06, 02, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/dead_code.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -15,7 +15,7 @@ Highest counter ID seen: c1
 Function name: dead_code::unused_fn (unused)
 Raw bytes (24): 0x[01, 01, 00, 04, 00, 0f, 01, 07, 0f, 00, 07, 10, 02, 06, 00, 02, 05, 00, 06, 00, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/dead_code.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Zero) at (prev + 15, 1) to (start + 7, 15)
@@ -27,7 +27,7 @@ Highest counter ID seen: (none)
 Function name: dead_code::unused_pub_fn_not_in_library (unused)
 Raw bytes (24): 0x[01, 01, 00, 04, 00, 03, 01, 07, 0f, 00, 07, 10, 02, 06, 00, 02, 05, 00, 06, 00, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/dead_code.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Zero) at (prev + 3, 1) to (start + 7, 15)
diff --git a/tests/coverage/drop_trait.cov-map b/tests/coverage/drop_trait.cov-map
index 16facf2eddf..a52ebd87aa8 100644
--- a/tests/coverage/drop_trait.cov-map
+++ b/tests/coverage/drop_trait.cov-map
@@ -1,7 +1,7 @@
 Function name: <drop_trait::Firework as core::ops::drop::Drop>::drop
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 09, 05, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/drop_trait.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 9, 5) to (start + 2, 6)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: drop_trait::main
 Raw bytes (24): 0x[01, 01, 00, 04, 01, 0e, 01, 05, 0c, 01, 06, 09, 01, 16, 00, 02, 06, 04, 0b, 01, 05, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/drop_trait.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 14, 1) to (start + 5, 12)
diff --git a/tests/coverage/fn_sig_into_try.cov-map b/tests/coverage/fn_sig_into_try.cov-map
index 6d6034928c9..465baa7f7f9 100644
--- a/tests/coverage/fn_sig_into_try.cov-map
+++ b/tests/coverage/fn_sig_into_try.cov-map
@@ -1,7 +1,7 @@
 Function name: fn_sig_into_try::a
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0a, 01, 05, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/fn_sig_into_try.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 10, 1) to (start + 5, 2)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: fn_sig_into_try::b
 Raw bytes (24): 0x[01, 01, 00, 04, 01, 11, 01, 03, 0f, 00, 03, 0f, 00, 10, 01, 01, 05, 00, 0c, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/fn_sig_into_try.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 17, 1) to (start + 3, 15)
@@ -22,7 +22,7 @@ Highest counter ID seen: c0
 Function name: fn_sig_into_try::c
 Raw bytes (24): 0x[01, 01, 00, 04, 01, 18, 01, 03, 17, 00, 03, 17, 00, 18, 01, 01, 05, 00, 0c, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/fn_sig_into_try.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 24, 1) to (start + 3, 23)
@@ -34,7 +34,7 @@ Highest counter ID seen: c0
 Function name: fn_sig_into_try::d
 Raw bytes (24): 0x[01, 01, 00, 04, 01, 1f, 01, 04, 0f, 00, 04, 0f, 00, 10, 01, 01, 05, 00, 0c, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/fn_sig_into_try.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 31, 1) to (start + 4, 15)
diff --git a/tests/coverage/generic-unused-impl.cov-map b/tests/coverage/generic-unused-impl.cov-map
index 5878de231ba..119c426965d 100644
--- a/tests/coverage/generic-unused-impl.cov-map
+++ b/tests/coverage/generic-unused-impl.cov-map
@@ -1,7 +1,7 @@
 Function name: <generic_unused_impl::W<_> as core::convert::From<[<_ as generic_unused_impl::Foo>::Assoc; 1]>>::from (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 0b, 05, 03, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/generic-unused-impl.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 11, 5) to (start + 3, 6)
@@ -10,7 +10,7 @@ Highest counter ID seen: (none)
 Function name: generic_unused_impl::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 01, 00, 0d]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/generic-unused-impl.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 17, 1) to (start + 0, 13)
diff --git a/tests/coverage/generics.cov-map b/tests/coverage/generics.cov-map
index bc5661afdc1..92c6ad01e30 100644
--- a/tests/coverage/generics.cov-map
+++ b/tests/coverage/generics.cov-map
@@ -1,7 +1,7 @@
 Function name: <generics::Firework<f64> as core::ops::drop::Drop>::drop
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 05, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/generics.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 17, 5) to (start + 2, 6)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: <generics::Firework<f64>>::set_strength
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0a, 05, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/generics.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 10, 5) to (start + 2, 6)
@@ -19,7 +19,7 @@ Highest counter ID seen: c0
 Function name: <generics::Firework<i32> as core::ops::drop::Drop>::drop
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 05, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/generics.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 17, 5) to (start + 2, 6)
@@ -28,7 +28,7 @@ Highest counter ID seen: c0
 Function name: <generics::Firework<i32>>::set_strength
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0a, 05, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/generics.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 10, 5) to (start + 2, 6)
@@ -37,7 +37,7 @@ Highest counter ID seen: c0
 Function name: generics::main
 Raw bytes (24): 0x[01, 01, 00, 04, 01, 16, 01, 08, 0c, 01, 09, 09, 01, 16, 00, 02, 06, 04, 0b, 01, 05, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/generics.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 22, 1) to (start + 8, 12)
diff --git a/tests/coverage/holes.cov-map b/tests/coverage/holes.cov-map
index 6e2d243e8dd..5298c2d92d5 100644
--- a/tests/coverage/holes.cov-map
+++ b/tests/coverage/holes.cov-map
@@ -1,7 +1,7 @@
 Function name: <holes::main::MyStruct>::_method (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 2b, 09, 00, 1d]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/holes.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 43, 9) to (start + 0, 29)
@@ -10,7 +10,7 @@ Highest counter ID seen: (none)
 Function name: holes::main
 Raw bytes (69): 0x[01, 01, 00, 0d, 01, 08, 01, 01, 11, 01, 05, 05, 00, 11, 01, 07, 09, 00, 11, 01, 09, 05, 00, 11, 01, 04, 05, 00, 11, 01, 07, 05, 00, 11, 01, 06, 05, 00, 11, 01, 04, 05, 00, 11, 01, 04, 05, 00, 11, 01, 06, 05, 03, 0f, 01, 0a, 05, 03, 0f, 01, 0a, 05, 06, 27, 01, 13, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/holes.rs
 Number of expressions: 0
 Number of file 0 mappings: 13
 - Code(Counter(0)) at (prev + 8, 1) to (start + 1, 17)
@@ -31,7 +31,7 @@ Highest counter ID seen: c0
 Function name: holes::main::_unused_fn (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 1f, 05, 00, 17]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/holes.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 31, 5) to (start + 0, 23)
@@ -40,7 +40,7 @@ Highest counter ID seen: (none)
 Function name: holes::main::{closure#0} (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 18, 09, 02, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/holes.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 24, 9) to (start + 2, 10)
@@ -49,7 +49,7 @@ Highest counter ID seen: (none)
 Function name: holes::main::{closure#1} (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 4b, 09, 02, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/holes.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 75, 9) to (start + 2, 10)
diff --git a/tests/coverage/if.cov-map b/tests/coverage/if.cov-map
index a77ba8194a4..611dd2ef08d 100644
--- a/tests/coverage/if.cov-map
+++ b/tests/coverage/if.cov-map
@@ -1,7 +1,7 @@
 Function name: if::main
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 04, 01, 12, 10, 05, 13, 05, 05, 06, 02, 05, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
diff --git a/tests/coverage/if_else.cov-map b/tests/coverage/if_else.cov-map
index 194ad6ca71f..35096d85950 100644
--- a/tests/coverage/if_else.cov-map
+++ b/tests/coverage/if_else.cov-map
@@ -1,7 +1,7 @@
 Function name: if_else::main
 Raw bytes (43): 0x[01, 01, 02, 01, 05, 01, 09, 07, 01, 04, 01, 08, 10, 05, 09, 05, 05, 06, 02, 08, 09, 02, 10, 01, 06, 09, 00, 10, 09, 01, 05, 05, 06, 06, 07, 05, 05, 06, 01, 06, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if_else.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
diff --git a/tests/coverage/if_not.cov-map b/tests/coverage/if_not.cov-map
index f47139ce5a4..0fd35c55e3e 100644
--- a/tests/coverage/if_not.cov-map
+++ b/tests/coverage/if_not.cov-map
@@ -1,7 +1,7 @@
 Function name: if_not::if_not
 Raw bytes (60): 0x[01, 01, 03, 01, 05, 01, 09, 01, 0d, 0a, 01, 05, 01, 03, 0d, 02, 04, 05, 02, 06, 05, 02, 05, 00, 06, 01, 03, 09, 01, 0d, 06, 02, 05, 02, 06, 09, 02, 05, 00, 06, 01, 03, 09, 01, 0d, 0a, 02, 05, 02, 06, 0d, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if_not.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
diff --git a/tests/coverage/ignore_run.cov-map b/tests/coverage/ignore_run.cov-map
index c8ad3821e16..a93fff71530 100644
--- a/tests/coverage/ignore_run.cov-map
+++ b/tests/coverage/ignore_run.cov-map
@@ -1,7 +1,7 @@
 Function name: ignore_run::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 03, 01, 00, 0d]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/ignore_run.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 13)
diff --git a/tests/coverage/inline-dead.cov-map b/tests/coverage/inline-dead.cov-map
index 65cefe76c29..450fb75b7c8 100644
--- a/tests/coverage/inline-dead.cov-map
+++ b/tests/coverage/inline-dead.cov-map
@@ -1,7 +1,7 @@
 Function name: inline_dead::dead (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 17, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inline-dead.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 23, 1) to (start + 2, 2)
@@ -10,7 +10,7 @@ Highest counter ID seen: (none)
 Function name: inline_dead::live::<false>
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 0e, 01, 01, 09, 05, 02, 09, 00, 0d, 02, 02, 09, 00, 0a, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inline-dead.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -24,7 +24,7 @@ Highest counter ID seen: c1
 Function name: inline_dead::main
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 04, 01, 03, 0a, 01, 06, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inline-dead.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 4, 1) to (start + 3, 10)
@@ -34,7 +34,7 @@ Highest counter ID seen: c0
 Function name: inline_dead::main::{closure#0}
 Raw bytes (19): 0x[01, 01, 00, 03, 01, 07, 17, 01, 16, 00, 01, 17, 00, 18, 01, 01, 05, 00, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inline-dead.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 7, 23) to (start + 1, 22)
diff --git a/tests/coverage/inline.cov-map b/tests/coverage/inline.cov-map
index 7264391baaf..5aa57e15bd5 100644
--- a/tests/coverage/inline.cov-map
+++ b/tests/coverage/inline.cov-map
@@ -1,7 +1,7 @@
 Function name: inline::display::<char>
 Raw bytes (31): 0x[01, 01, 01, 05, 01, 05, 01, 29, 01, 00, 22, 02, 01, 09, 00, 0a, 05, 00, 0e, 00, 10, 02, 00, 11, 02, 06, 01, 03, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inline.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 5
@@ -17,7 +17,7 @@ Highest counter ID seen: c1
 Function name: inline::error
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 31, 01, 01, 0b]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inline.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 49, 1) to (start + 1, 11)
@@ -26,7 +26,7 @@ Highest counter ID seen: c0
 Function name: inline::length::<char>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 1e, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inline.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 30, 1) to (start + 2, 2)
@@ -35,7 +35,7 @@ Highest counter ID seen: c0
 Function name: inline::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 05, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inline.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 5, 1) to (start + 2, 2)
@@ -44,7 +44,7 @@ Highest counter ID seen: c0
 Function name: inline::permutate::<char>
 Raw bytes (54): 0x[01, 01, 05, 01, 05, 0d, 09, 0d, 09, 01, 13, 05, 09, 08, 01, 0f, 01, 02, 0e, 05, 02, 0f, 02, 06, 02, 02, 0f, 00, 14, 0a, 01, 0d, 00, 0e, 09, 00, 12, 00, 16, 0a, 00, 17, 04, 0a, 0e, 05, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inline.rs
 Number of expressions: 5
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(3), rhs = Counter(2)
@@ -69,7 +69,7 @@ Highest counter ID seen: c2
 Function name: inline::permutations::<char>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0a, 01, 03, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inline.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 10, 1) to (start + 3, 2)
@@ -78,7 +78,7 @@ Highest counter ID seen: c0
 Function name: inline::swap::<char>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 23, 01, 04, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inline.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 35, 1) to (start + 4, 2)
diff --git a/tests/coverage/inner_items.cov-map b/tests/coverage/inner_items.cov-map
index a12cce25b64..a9e19fe53a5 100644
--- a/tests/coverage/inner_items.cov-map
+++ b/tests/coverage/inner_items.cov-map
@@ -1,7 +1,7 @@
 Function name: <inner_items::main::InStruct as inner_items::main::InTrait>::default_trait_func
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 21, 09, 03, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inner_items.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 33, 9) to (start + 3, 10)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: <inner_items::main::InStruct as inner_items::main::InTrait>::trait_func
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 28, 09, 03, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inner_items.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 40, 9) to (start + 3, 10)
@@ -19,7 +19,7 @@ Highest counter ID seen: c0
 Function name: inner_items::main
 Raw bytes (43): 0x[01, 01, 02, 01, 05, 01, 09, 07, 01, 03, 01, 07, 0f, 05, 07, 10, 02, 06, 02, 02, 05, 00, 06, 01, 24, 08, 00, 0f, 09, 00, 10, 02, 06, 06, 02, 05, 00, 06, 01, 02, 09, 05, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inner_items.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
@@ -38,7 +38,7 @@ Highest counter ID seen: c2
 Function name: inner_items::main::in_func
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 12, 05, 04, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inner_items.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 18, 5) to (start + 4, 6)
diff --git a/tests/coverage/issue-83601.cov-map b/tests/coverage/issue-83601.cov-map
index f1023109008..4e45db836d6 100644
--- a/tests/coverage/issue-83601.cov-map
+++ b/tests/coverage/issue-83601.cov-map
@@ -1,7 +1,7 @@
 Function name: issue_83601::main
 Raw bytes (21): 0x[01, 01, 01, 05, 09, 03, 01, 06, 01, 02, 0f, 05, 03, 09, 01, 0f, 02, 02, 05, 03, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/issue-83601.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(2)
 Number of file 0 mappings: 3
diff --git a/tests/coverage/issue-84561.cov-map b/tests/coverage/issue-84561.cov-map
index 47e2922a805..1ed5edbb819 100644
--- a/tests/coverage/issue-84561.cov-map
+++ b/tests/coverage/issue-84561.cov-map
@@ -1,7 +1,7 @@
 Function name: <issue_84561::Foo as core::fmt::Debug>::fmt
 Raw bytes (27): 0x[01, 01, 01, 01, 05, 04, 01, 8a, 01, 05, 01, 24, 05, 01, 25, 00, 26, 02, 01, 09, 00, 0f, 01, 01, 05, 00, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/issue-84561.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -15,7 +15,7 @@ Highest counter ID seen: c1
 Function name: issue_84561::main
 Raw bytes (10): 0x[01, 01, 00, 01, 01, b4, 01, 01, 04, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/issue-84561.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 180, 1) to (start + 4, 2)
@@ -24,7 +24,7 @@ Highest counter ID seen: c0
 Function name: issue_84561::test1
 Raw bytes (50): 0x[01, 01, 00, 09, 01, 9a, 01, 01, 01, 0b, 05, 01, 0c, 00, 1e, 01, 01, 05, 00, 0b, 09, 00, 0c, 00, 1e, 01, 01, 0d, 01, 0b, 0d, 01, 0c, 00, 1e, 01, 01, 05, 03, 0b, 11, 03, 0c, 00, 1e, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/issue-84561.rs
 Number of expressions: 0
 Number of file 0 mappings: 9
 - Code(Counter(0)) at (prev + 154, 1) to (start + 1, 11)
@@ -41,7 +41,7 @@ Highest counter ID seen: c4
 Function name: issue_84561::test2
 Raw bytes (20): 0x[01, 01, 00, 03, 01, b0, 01, 01, 01, 10, 05, 01, 11, 00, 23, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/issue-84561.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 176, 1) to (start + 1, 16)
@@ -52,7 +52,7 @@ Highest counter ID seen: c1
 Function name: issue_84561::test2::call_print
 Raw bytes (10): 0x[01, 01, 00, 01, 01, a7, 01, 09, 02, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/issue-84561.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 167, 9) to (start + 2, 10)
@@ -61,7 +61,7 @@ Highest counter ID seen: c0
 Function name: issue_84561::test3
 Raw bytes (279): 0x[01, 01, 0a, 0d, 11, 0d, 15, 0d, 19, 1d, 21, 29, 2d, 25, 29, 25, 29, 25, 29, 27, 31, 29, 2d, 33, 01, 08, 01, 03, 0f, 05, 04, 09, 01, 0f, 09, 02, 05, 04, 0f, 09, 05, 05, 00, 0f, 09, 01, 05, 00, 0f, 09, 01, 09, 01, 0f, 0d, 02, 05, 00, 0f, 0d, 01, 05, 00, 0f, 00, 00, 20, 00, 30, 0d, 01, 05, 03, 0f, 00, 03, 20, 00, 30, 00, 00, 33, 00, 41, 00, 00, 4b, 00, 5a, 0d, 01, 05, 00, 0f, 00, 05, 09, 03, 10, 00, 05, 0d, 00, 1b, 00, 02, 0d, 00, 1c, 0d, 04, 09, 02, 0f, 0d, 06, 05, 00, 0f, 0d, 04, 05, 00, 0f, 0d, 04, 09, 01, 0f, 0d, 05, 08, 00, 0f, 11, 01, 09, 00, 13, 02, 05, 09, 00, 13, 0d, 05, 08, 00, 0f, 15, 01, 09, 00, 13, 00, 03, 0d, 00, 1d, 06, 03, 09, 00, 13, 00, 03, 0d, 00, 1d, 0d, 03, 05, 00, 0f, 0d, 01, 0c, 00, 13, 19, 01, 0d, 00, 13, 0a, 02, 0d, 00, 13, 1d, 04, 05, 02, 13, 21, 03, 0d, 00, 13, 0e, 02, 0d, 00, 13, 27, 03, 05, 00, 0f, 25, 01, 0c, 00, 13, 29, 01, 0d, 00, 17, 29, 04, 0d, 00, 13, 1e, 02, 0d, 00, 17, 1e, 01, 14, 00, 1b, 00, 01, 15, 00, 1b, 1e, 02, 15, 00, 1b, 2d, 04, 0d, 00, 13, 22, 03, 09, 00, 19, 31, 02, 05, 00, 0f, 31, 03, 09, 00, 22, 00, 02, 05, 00, 0f, 00, 03, 09, 00, 2c, 00, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/issue-84561.rs
 Number of expressions: 10
 - expression 0 operands: lhs = Counter(3), rhs = Counter(4)
 - expression 1 operands: lhs = Counter(3), rhs = Counter(5)
diff --git a/tests/coverage/issue-85461.cov-map b/tests/coverage/issue-85461.cov-map
index 349bc2cab80..566206a7539 100644
--- a/tests/coverage/issue-85461.cov-map
+++ b/tests/coverage/issue-85461.cov-map
@@ -1,7 +1,7 @@
 Function name: issue_85461::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 08, 01, 03, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/issue-85461.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 8, 1) to (start + 3, 2)
diff --git a/tests/coverage/issue-93054.cov-map b/tests/coverage/issue-93054.cov-map
index 38cb70a3f97..3cb54d80e7f 100644
--- a/tests/coverage/issue-93054.cov-map
+++ b/tests/coverage/issue-93054.cov-map
@@ -1,7 +1,7 @@
 Function name: issue_93054::foo2 (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 15, 01, 00, 1d]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/issue-93054.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 21, 1) to (start + 0, 29)
@@ -10,7 +10,7 @@ Highest counter ID seen: (none)
 Function name: issue_93054::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 1d, 01, 00, 0d]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/issue-93054.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 29, 1) to (start + 0, 13)
@@ -19,7 +19,7 @@ Highest counter ID seen: c0
 Function name: issue_93054::make (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 19, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/issue-93054.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 25, 1) to (start + 2, 2)
diff --git a/tests/coverage/lazy_boolean.cov-map b/tests/coverage/lazy_boolean.cov-map
index 3f7788da1eb..9722b4c2a32 100644
--- a/tests/coverage/lazy_boolean.cov-map
+++ b/tests/coverage/lazy_boolean.cov-map
@@ -1,7 +1,7 @@
 Function name: lazy_boolean::main
 Raw bytes (158): 0x[01, 01, 07, 01, 05, 01, 25, 01, 21, 01, 11, 01, 15, 01, 19, 01, 1d, 1c, 01, 04, 01, 07, 0f, 05, 07, 10, 04, 06, 02, 04, 05, 00, 06, 01, 02, 09, 00, 11, 01, 02, 0d, 00, 12, 06, 02, 0d, 00, 12, 01, 03, 09, 00, 11, 01, 02, 0d, 00, 12, 0a, 02, 0d, 00, 12, 01, 02, 09, 00, 11, 01, 00, 14, 00, 19, 09, 00, 1d, 00, 22, 01, 01, 09, 00, 11, 01, 00, 14, 00, 19, 0d, 00, 1d, 00, 22, 01, 03, 09, 01, 10, 0e, 02, 05, 03, 06, 11, 03, 05, 00, 06, 01, 03, 09, 00, 10, 15, 01, 05, 03, 06, 12, 05, 05, 03, 06, 01, 05, 08, 00, 10, 16, 00, 11, 02, 06, 19, 02, 05, 00, 06, 01, 02, 08, 00, 0f, 1d, 00, 10, 02, 06, 1a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/lazy_boolean.rs
 Number of expressions: 7
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(9)
diff --git a/tests/coverage/let_else_loop.cov-map b/tests/coverage/let_else_loop.cov-map
index 7789114c239..f55e5a930b4 100644
--- a/tests/coverage/let_else_loop.cov-map
+++ b/tests/coverage/let_else_loop.cov-map
@@ -1,7 +1,7 @@
 Function name: let_else_loop::_if (unused)
 Raw bytes (19): 0x[01, 01, 00, 03, 00, 16, 01, 01, 0c, 00, 01, 0f, 00, 16, 00, 00, 20, 00, 27]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/let_else_loop.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Zero) at (prev + 22, 1) to (start + 1, 12)
@@ -12,7 +12,7 @@ Highest counter ID seen: (none)
 Function name: let_else_loop::_loop_either_way (unused)
 Raw bytes (19): 0x[01, 01, 00, 03, 00, 0f, 01, 01, 14, 00, 01, 1c, 00, 23, 00, 01, 05, 00, 0c]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/let_else_loop.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Zero) at (prev + 15, 1) to (start + 1, 20)
@@ -23,7 +23,7 @@ Highest counter ID seen: (none)
 Function name: let_else_loop::loopy
 Raw bytes (19): 0x[01, 01, 00, 03, 01, 09, 01, 01, 14, 09, 01, 1c, 00, 23, 05, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/let_else_loop.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 9, 1) to (start + 1, 20)
diff --git a/tests/coverage/long_and_wide.cov-map b/tests/coverage/long_and_wide.cov-map
index 032b7fe102e..c8194ccc79b 100644
--- a/tests/coverage/long_and_wide.cov-map
+++ b/tests/coverage/long_and_wide.cov-map
@@ -1,7 +1,7 @@
 Function name: long_and_wide::far_function
 Raw bytes (10): 0x[01, 01, 00, 01, 01, 96, 01, 01, 00, 15]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/long_and_wide.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 150, 1) to (start + 0, 21)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: long_and_wide::long_function
 Raw bytes (10): 0x[01, 01, 00, 01, 01, 10, 01, 84, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/long_and_wide.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 16, 1) to (start + 132, 2)
@@ -19,7 +19,7 @@ Highest counter ID seen: c0
 Function name: long_and_wide::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 07, 01, 04, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/long_and_wide.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 7, 1) to (start + 4, 2)
@@ -28,7 +28,7 @@ Highest counter ID seen: c0
 Function name: long_and_wide::wide_function
 Raw bytes (10): 0x[01, 01, 00, 01, 01, 0e, 01, 00, 8b, 01]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/long_and_wide.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 14, 1) to (start + 0, 139)
diff --git a/tests/coverage/loop-break.cov-map b/tests/coverage/loop-break.cov-map
index fccc4d64395..8edb6d06dd6 100644
--- a/tests/coverage/loop-break.cov-map
+++ b/tests/coverage/loop-break.cov-map
@@ -1,7 +1,7 @@
 Function name: loop_break::main
 Raw bytes (31): 0x[01, 01, 01, 05, 01, 05, 01, 03, 01, 00, 0b, 05, 02, 0c, 00, 21, 01, 01, 0d, 00, 12, 02, 01, 09, 00, 0a, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/loop-break.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 Number of file 0 mappings: 5
diff --git a/tests/coverage/loop_break_value.cov-map b/tests/coverage/loop_break_value.cov-map
index e48d078f672..d16335a0a29 100644
--- a/tests/coverage/loop_break_value.cov-map
+++ b/tests/coverage/loop_break_value.cov-map
@@ -1,7 +1,7 @@
 Function name: loop_break_value::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 04, 01, 0a, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/loop_break_value.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 4, 1) to (start + 10, 2)
diff --git a/tests/coverage/loops_branches.cov-map b/tests/coverage/loops_branches.cov-map
index 2157cd6ee3f..d414710ee9d 100644
--- a/tests/coverage/loops_branches.cov-map
+++ b/tests/coverage/loops_branches.cov-map
@@ -1,7 +1,7 @@
 Function name: <loops_branches::DebugTest as core::fmt::Debug>::fmt
 Raw bytes (112): 0x[01, 01, 04, 07, 0b, 01, 0d, 05, 09, 09, 0d, 14, 01, 09, 05, 01, 10, 01, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 0d, 00, 1d, 05, 00, 1e, 00, 1f, 00, 01, 10, 01, 0a, 0d, 03, 0d, 00, 0e, 09, 00, 12, 00, 17, 0d, 01, 10, 00, 14, 0d, 01, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 0d, 01, 11, 00, 12, 0d, 01, 11, 00, 21, 02, 00, 22, 00, 23, 00, 01, 14, 01, 0e, 0e, 03, 09, 00, 0f, 01, 01, 05, 00, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/loops_branches.rs
 Number of expressions: 4
 - expression 0 operands: lhs = Expression(1, Add), rhs = Expression(2, Add)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(3)
@@ -35,7 +35,7 @@ Highest counter ID seen: c3
 Function name: <loops_branches::DisplayTest as core::fmt::Display>::fmt
 Raw bytes (112): 0x[01, 01, 04, 07, 0b, 01, 09, 05, 0d, 05, 09, 14, 01, 22, 05, 01, 11, 00, 01, 12, 01, 0a, 01, 02, 10, 00, 15, 00, 01, 17, 00, 1b, 00, 00, 1c, 00, 1e, 01, 01, 0d, 00, 0e, 01, 01, 0d, 00, 1d, 0d, 00, 1e, 00, 1f, 09, 02, 0d, 00, 0e, 05, 00, 12, 00, 17, 09, 01, 10, 00, 15, 00, 00, 16, 01, 0e, 09, 02, 14, 00, 19, 00, 01, 1b, 00, 1f, 00, 00, 20, 00, 22, 09, 01, 11, 00, 12, 09, 01, 11, 00, 21, 02, 00, 22, 00, 23, 0e, 03, 09, 00, 0f, 01, 01, 05, 00, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/loops_branches.rs
 Number of expressions: 4
 - expression 0 operands: lhs = Expression(1, Add), rhs = Expression(2, Add)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
@@ -69,7 +69,7 @@ Highest counter ID seen: c3
 Function name: loops_branches::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 37, 01, 05, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/loops_branches.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 55, 1) to (start + 5, 2)
diff --git a/tests/coverage/macro_in_closure.cov-map b/tests/coverage/macro_in_closure.cov-map
index 9614154a366..3e71ed877bf 100644
--- a/tests/coverage/macro_in_closure.cov-map
+++ b/tests/coverage/macro_in_closure.cov-map
@@ -1,7 +1,7 @@
 Function name: macro_in_closure::NO_BLOCK::{closure#0}
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 07, 1c, 00, 2d]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/macro_in_closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 7, 28) to (start + 0, 45)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: macro_in_closure::WITH_BLOCK::{closure#0}
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 09, 1e, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/macro_in_closure.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 9, 30) to (start + 2, 2)
diff --git a/tests/coverage/macro_name_span.cov-map b/tests/coverage/macro_name_span.cov-map
index bd033faa551..18b4e28b7b4 100644
--- a/tests/coverage/macro_name_span.cov-map
+++ b/tests/coverage/macro_name_span.cov-map
@@ -1,7 +1,7 @@
 Function name: macro_name_span::affected_function
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 16, 1c, 01, 3e]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/macro_name_span.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 22, 28) to (start + 1, 62)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: macro_name_span::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/macro_name_span.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 11, 1) to (start + 2, 2)
diff --git a/tests/coverage/match_or_pattern.cov-map b/tests/coverage/match_or_pattern.cov-map
index ae77eedfe72..a29c712998f 100644
--- a/tests/coverage/match_or_pattern.cov-map
+++ b/tests/coverage/match_or_pattern.cov-map
@@ -1,7 +1,7 @@
 Function name: match_or_pattern::main
 Raw bytes (145): 0x[01, 01, 08, 01, 05, 01, 09, 01, 0d, 01, 11, 01, 15, 01, 19, 01, 1d, 01, 21, 19, 01, 01, 01, 08, 0f, 05, 08, 10, 03, 06, 02, 03, 05, 00, 06, 01, 01, 0b, 00, 11, 06, 03, 1b, 00, 1d, 09, 01, 0e, 00, 10, 01, 02, 08, 00, 0f, 0d, 00, 10, 03, 06, 0a, 03, 05, 00, 06, 01, 01, 0b, 00, 11, 0e, 01, 1b, 00, 1d, 11, 01, 0e, 00, 10, 01, 02, 08, 00, 0f, 15, 00, 10, 03, 06, 12, 03, 05, 00, 06, 01, 01, 0b, 00, 11, 16, 01, 1b, 00, 1d, 19, 01, 0e, 00, 10, 01, 02, 08, 00, 0f, 1d, 00, 10, 03, 06, 1a, 03, 05, 00, 06, 01, 01, 0b, 00, 11, 1e, 01, 1b, 00, 1d, 21, 01, 0e, 00, 10, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/match_or_pattern.rs
 Number of expressions: 8
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
diff --git a/tests/coverage/mcdc/condition-limit.cov-map b/tests/coverage/mcdc/condition-limit.cov-map
index befe8866a59..f966d754f54 100644
--- a/tests/coverage/mcdc/condition-limit.cov-map
+++ b/tests/coverage/mcdc/condition-limit.cov-map
@@ -1,7 +1,7 @@
 Function name: condition_limit::accept_7_conditions
 Raw bytes (147): 0x[01, 01, 08, 01, 05, 05, 09, 09, 0d, 0d, 11, 11, 15, 15, 19, 19, 1d, 01, 1d, 12, 01, 06, 01, 02, 09, 28, 08, 07, 02, 08, 00, 27, 30, 05, 02, 01, 07, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 06, 07, 06, 00, 00, 0d, 00, 0e, 09, 00, 12, 00, 13, 30, 0d, 0a, 06, 05, 00, 00, 12, 00, 13, 0d, 00, 17, 00, 18, 30, 11, 0e, 05, 04, 00, 00, 17, 00, 18, 11, 00, 1c, 00, 1d, 30, 15, 12, 04, 03, 00, 00, 1c, 00, 1d, 15, 00, 21, 00, 22, 30, 19, 16, 03, 02, 00, 00, 21, 00, 22, 19, 00, 26, 00, 27, 30, 1d, 1a, 02, 00, 00, 00, 26, 00, 27, 1d, 00, 28, 02, 06, 1e, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/condition-limit.rs
 Number of expressions: 8
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
diff --git a/tests/coverage/mcdc/if.cov-map b/tests/coverage/mcdc/if.cov-map
index 1b038f48429..de4ea7790f7 100644
--- a/tests/coverage/mcdc/if.cov-map
+++ b/tests/coverage/mcdc/if.cov-map
@@ -1,7 +1,7 @@
 Function name: if::mcdc_check_a
 Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 08, 01, 0e, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -25,7 +25,7 @@ Highest counter ID seen: c2
 Function name: if::mcdc_check_b
 Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 08, 01, 16, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -49,7 +49,7 @@ Highest counter ID seen: c2
 Function name: if::mcdc_check_both
 Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 08, 01, 1e, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -73,7 +73,7 @@ Highest counter ID seen: c2
 Function name: if::mcdc_check_neither
 Raw bytes (62): 0x[01, 01, 03, 01, 05, 05, 09, 01, 09, 08, 01, 06, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0d, 00, 0e, 30, 09, 06, 02, 00, 00, 00, 0d, 00, 0e, 09, 00, 0f, 02, 06, 0a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -97,7 +97,7 @@ Highest counter ID seen: c2
 Function name: if::mcdc_check_not_tree_decision
 Raw bytes (85): 0x[01, 01, 07, 01, 05, 01, 17, 05, 09, 05, 09, 17, 0d, 05, 09, 01, 0d, 0a, 01, 30, 01, 03, 0a, 28, 05, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 03, 00, 09, 00, 0a, 02, 00, 0e, 00, 0f, 30, 09, 06, 03, 02, 00, 00, 0e, 00, 0f, 17, 00, 14, 00, 15, 30, 0d, 12, 02, 00, 00, 00, 14, 00, 15, 0d, 00, 16, 02, 06, 1a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 7
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(5, Add)
@@ -131,7 +131,7 @@ Highest counter ID seen: c3
 Function name: if::mcdc_check_tree_decision
 Raw bytes (87): 0x[01, 01, 08, 01, 05, 05, 09, 05, 09, 05, 1f, 09, 0d, 09, 0d, 01, 1f, 09, 0d, 0a, 01, 26, 01, 03, 09, 28, 04, 03, 03, 08, 00, 15, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 05, 00, 0e, 00, 0f, 30, 09, 0a, 02, 00, 03, 00, 0e, 00, 0f, 0a, 00, 13, 00, 14, 30, 0d, 0e, 03, 00, 00, 00, 13, 00, 14, 1f, 00, 16, 02, 06, 1a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 8
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -166,7 +166,7 @@ Highest counter ID seen: c3
 Function name: if::mcdc_nested_if
 Raw bytes (120): 0x[01, 01, 0b, 01, 05, 01, 2b, 05, 09, 05, 09, 2b, 0d, 05, 09, 0d, 11, 2b, 11, 05, 09, 01, 2b, 05, 09, 0e, 01, 3a, 01, 01, 09, 28, 03, 02, 01, 08, 00, 0e, 30, 05, 02, 01, 00, 02, 00, 08, 00, 09, 02, 00, 0d, 00, 0e, 30, 09, 26, 02, 00, 00, 00, 0d, 00, 0e, 2b, 01, 09, 01, 0d, 28, 06, 02, 01, 0c, 00, 12, 30, 0d, 12, 01, 02, 00, 00, 0c, 00, 0d, 0d, 00, 11, 00, 12, 30, 11, 1a, 02, 00, 00, 00, 11, 00, 12, 11, 00, 13, 02, 0a, 1e, 02, 09, 00, 0a, 26, 01, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/if.rs
 Number of expressions: 11
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(10, Add)
diff --git a/tests/coverage/mcdc/inlined_expressions.cov-map b/tests/coverage/mcdc/inlined_expressions.cov-map
index 7d78e572a3b..714d168cf49 100644
--- a/tests/coverage/mcdc/inlined_expressions.cov-map
+++ b/tests/coverage/mcdc/inlined_expressions.cov-map
@@ -1,7 +1,7 @@
 Function name: inlined_expressions::inlined_instance
 Raw bytes (50): 0x[01, 01, 02, 01, 05, 05, 09, 06, 01, 07, 01, 01, 06, 28, 03, 02, 01, 05, 00, 0b, 30, 05, 02, 01, 02, 00, 00, 05, 00, 06, 05, 00, 0a, 00, 0b, 30, 09, 06, 02, 00, 00, 00, 0a, 00, 0b, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/inlined_expressions.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
diff --git a/tests/coverage/mcdc/nested_if.cov-map b/tests/coverage/mcdc/nested_if.cov-map
index 83d0739aaf5..7232e4f89cd 100644
--- a/tests/coverage/mcdc/nested_if.cov-map
+++ b/tests/coverage/mcdc/nested_if.cov-map
@@ -1,7 +1,7 @@
 Function name: nested_if::doubly_nested_if_in_condition
 Raw bytes (170): 0x[01, 01, 0f, 01, 05, 05, 11, 05, 09, 05, 37, 09, 0d, 05, 09, 05, 1f, 09, 15, 15, 19, 05, 2b, 09, 19, 09, 0d, 05, 37, 09, 0d, 01, 11, 14, 01, 0e, 01, 01, 09, 28, 09, 02, 01, 08, 00, 4e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 11, 06, 02, 00, 00, 00, 0d, 00, 4e, 05, 00, 10, 00, 11, 28, 06, 02, 00, 10, 00, 36, 30, 09, 16, 01, 00, 02, 00, 10, 00, 11, 30, 0d, 32, 02, 00, 00, 00, 15, 00, 36, 16, 00, 18, 00, 19, 28, 03, 02, 00, 18, 00, 1e, 30, 15, 1a, 01, 02, 00, 00, 18, 00, 19, 15, 00, 1d, 00, 1e, 30, 19, 22, 02, 00, 00, 00, 1d, 00, 1e, 19, 00, 21, 00, 25, 26, 00, 2f, 00, 34, 37, 00, 39, 00, 3e, 32, 00, 48, 00, 4c, 11, 00, 4f, 02, 06, 3a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/nested_if.rs
 Number of expressions: 15
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(4)
@@ -61,7 +61,7 @@ Highest counter ID seen: c6
 Function name: nested_if::nested_if_in_condition
 Raw bytes (118): 0x[01, 01, 0a, 01, 05, 05, 11, 05, 09, 05, 09, 05, 23, 09, 0d, 09, 0d, 05, 23, 09, 0d, 01, 11, 0e, 01, 06, 01, 01, 09, 28, 06, 02, 01, 08, 00, 2e, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 11, 06, 02, 00, 00, 00, 0d, 00, 2e, 05, 00, 10, 00, 11, 28, 03, 02, 00, 10, 00, 16, 30, 09, 0e, 01, 00, 02, 00, 10, 00, 11, 0e, 00, 15, 00, 16, 30, 0d, 1e, 02, 00, 00, 00, 15, 00, 16, 23, 00, 19, 00, 1d, 1e, 00, 27, 00, 2c, 11, 00, 2f, 02, 06, 26, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/nested_if.rs
 Number of expressions: 10
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(4)
@@ -105,7 +105,7 @@ Highest counter ID seen: c4
 Function name: nested_if::nested_in_then_block_in_condition
 Raw bytes (170): 0x[01, 01, 0f, 01, 05, 05, 19, 05, 09, 05, 09, 05, 37, 09, 0d, 09, 0d, 37, 11, 09, 0d, 11, 15, 37, 15, 09, 0d, 05, 37, 09, 0d, 01, 19, 14, 01, 21, 01, 01, 09, 28, 09, 02, 01, 08, 00, 4b, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 19, 06, 02, 00, 00, 00, 0d, 00, 4b, 05, 00, 10, 00, 11, 28, 03, 02, 00, 10, 00, 16, 30, 09, 0e, 01, 00, 02, 00, 10, 00, 11, 0e, 00, 15, 00, 16, 30, 0d, 32, 02, 00, 00, 00, 15, 00, 16, 37, 00, 1c, 00, 1d, 28, 06, 02, 00, 1c, 00, 22, 30, 11, 1e, 01, 02, 00, 00, 1c, 00, 1d, 11, 00, 21, 00, 22, 30, 15, 26, 02, 00, 00, 00, 21, 00, 22, 15, 00, 25, 00, 29, 2a, 00, 33, 00, 38, 32, 00, 44, 00, 49, 19, 00, 4c, 02, 06, 3a, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/nested_if.rs
 Number of expressions: 15
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(6)
@@ -165,7 +165,7 @@ Highest counter ID seen: c6
 Function name: nested_if::nested_single_condition_decision
 Raw bytes (83): 0x[01, 01, 05, 01, 05, 05, 0d, 05, 09, 05, 09, 01, 0d, 0b, 01, 16, 01, 04, 09, 28, 03, 02, 04, 08, 00, 29, 30, 05, 02, 01, 02, 00, 00, 08, 00, 09, 30, 0d, 06, 02, 00, 00, 00, 0d, 00, 29, 05, 00, 10, 00, 11, 20, 09, 0e, 00, 10, 00, 11, 09, 00, 14, 00, 19, 0e, 00, 23, 00, 27, 0d, 00, 2a, 02, 06, 12, 02, 0c, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/nested_if.rs
 Number of expressions: 5
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(3)
diff --git a/tests/coverage/mcdc/non_control_flow.cov-map b/tests/coverage/mcdc/non_control_flow.cov-map
index 48a103b2c7d..02251e69152 100644
--- a/tests/coverage/mcdc/non_control_flow.cov-map
+++ b/tests/coverage/mcdc/non_control_flow.cov-map
@@ -1,7 +1,7 @@
 Function name: non_control_flow::assign_3
 Raw bytes (79): 0x[01, 01, 04, 01, 05, 01, 0b, 05, 09, 09, 0d, 0a, 01, 15, 01, 00, 28, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 04, 03, 00, 0d, 00, 18, 30, 05, 02, 01, 00, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 30, 09, 06, 02, 03, 00, 00, 12, 00, 13, 09, 00, 17, 00, 18, 30, 0d, 0e, 03, 00, 00, 00, 17, 00, 18, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/non_control_flow.rs
 Number of expressions: 4
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
@@ -30,7 +30,7 @@ Highest counter ID seen: c3
 Function name: non_control_flow::assign_3_bis
 Raw bytes (81): 0x[01, 01, 05, 01, 05, 05, 09, 01, 09, 01, 13, 09, 0d, 0a, 01, 1a, 01, 00, 2c, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 05, 03, 00, 0d, 00, 18, 30, 05, 02, 01, 03, 02, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 06, 03, 00, 02, 00, 12, 00, 13, 0a, 00, 17, 00, 18, 30, 0d, 0e, 02, 00, 00, 00, 17, 00, 18, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/non_control_flow.rs
 Number of expressions: 5
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -60,7 +60,7 @@ Highest counter ID seen: c3
 Function name: non_control_flow::assign_and
 Raw bytes (60): 0x[01, 01, 02, 01, 05, 05, 09, 08, 01, 0b, 01, 00, 21, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 03, 02, 00, 0d, 00, 13, 30, 05, 02, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 12, 00, 13, 30, 09, 06, 02, 00, 00, 00, 12, 00, 13, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/non_control_flow.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -82,7 +82,7 @@ Highest counter ID seen: c2
 Function name: non_control_flow::assign_or
 Raw bytes (62): 0x[01, 01, 03, 01, 05, 01, 0b, 05, 09, 08, 01, 10, 01, 00, 20, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 03, 02, 00, 0d, 00, 13, 30, 05, 02, 01, 00, 02, 00, 0d, 00, 0e, 02, 00, 12, 00, 13, 30, 09, 06, 02, 00, 00, 00, 12, 00, 13, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/non_control_flow.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Expression(2, Add)
@@ -106,7 +106,7 @@ Highest counter ID seen: c2
 Function name: non_control_flow::foo
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 24, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/non_control_flow.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 36, 1) to (start + 2, 2)
@@ -115,7 +115,7 @@ Highest counter ID seen: c0
 Function name: non_control_flow::func_call
 Raw bytes (60): 0x[01, 01, 02, 01, 05, 05, 09, 08, 01, 28, 01, 00, 20, 01, 01, 05, 00, 08, 01, 00, 09, 00, 0a, 28, 03, 02, 00, 09, 00, 0f, 30, 05, 02, 01, 02, 00, 00, 09, 00, 0a, 05, 00, 0e, 00, 0f, 30, 09, 06, 02, 00, 00, 00, 0e, 00, 0f, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/non_control_flow.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -137,7 +137,7 @@ Highest counter ID seen: c2
 Function name: non_control_flow::right_comb_tree
 Raw bytes (111): 0x[01, 01, 05, 01, 05, 05, 09, 09, 0d, 0d, 11, 11, 15, 0e, 01, 1f, 01, 00, 41, 01, 01, 09, 00, 0a, 01, 00, 0d, 00, 0e, 28, 06, 05, 00, 0d, 00, 2a, 30, 05, 02, 01, 02, 00, 00, 0d, 00, 0e, 05, 00, 13, 00, 14, 30, 09, 06, 02, 03, 00, 00, 13, 00, 14, 09, 00, 19, 00, 1a, 30, 0d, 0a, 03, 04, 00, 00, 19, 00, 1a, 0d, 00, 1f, 00, 20, 30, 11, 0e, 04, 05, 00, 00, 1f, 00, 20, 11, 00, 24, 00, 27, 30, 15, 12, 05, 00, 00, 00, 24, 00, 27, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/non_control_flow.rs
 Number of expressions: 5
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
diff --git a/tests/coverage/nested_loops.cov-map b/tests/coverage/nested_loops.cov-map
index e9e41bd53e7..4a35da13a84 100644
--- a/tests/coverage/nested_loops.cov-map
+++ b/tests/coverage/nested_loops.cov-map
@@ -1,7 +1,7 @@
 Function name: nested_loops::main
 Raw bytes (97): 0x[01, 01, 0e, 07, 2f, 05, 11, 01, 0d, 2f, 05, 01, 0d, 27, 05, 01, 09, 33, 27, 05, 15, 01, 09, 2f, 33, 01, 0d, 05, 15, 05, 01, 0d, 01, 01, 01, 02, 1b, 05, 04, 13, 00, 20, 09, 01, 0d, 01, 18, 0d, 02, 12, 00, 17, 11, 01, 10, 00, 16, 02, 01, 11, 00, 16, 0e, 01, 0e, 03, 16, 15, 04, 11, 01, 1b, 16, 02, 15, 00, 21, 1e, 01, 18, 02, 12, 2a, 03, 0d, 00, 0e, 36, 02, 09, 00, 17, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/nested_loops.rs
 Number of expressions: 14
 - expression 0 operands: lhs = Expression(1, Add), rhs = Expression(11, Add)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(4)
diff --git a/tests/coverage/no-core.cov-map b/tests/coverage/no-core.cov-map
index 3a1ca4745c7..89012b0ab91 100644
--- a/tests/coverage/no-core.cov-map
+++ b/tests/coverage/no-core.cov-map
@@ -1,7 +1,7 @@
 Function name: no_core::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 01, 00, 0d]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no-core.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 12, 1) to (start + 0, 13)
diff --git a/tests/coverage/no_cov_crate.cov-map b/tests/coverage/no_cov_crate.cov-map
index 244b0099544..caef09355d2 100644
--- a/tests/coverage/no_cov_crate.cov-map
+++ b/tests/coverage/no_cov_crate.cov-map
@@ -1,7 +1,7 @@
 Function name: no_cov_crate::add_coverage_1
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 16, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no_cov_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 22, 1) to (start + 2, 2)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: no_cov_crate::add_coverage_2
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 1a, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no_cov_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 26, 1) to (start + 2, 2)
@@ -19,7 +19,7 @@ Highest counter ID seen: c0
 Function name: no_cov_crate::add_coverage_not_called (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 1f, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no_cov_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 31, 1) to (start + 2, 2)
@@ -28,7 +28,7 @@ Highest counter ID seen: (none)
 Function name: no_cov_crate::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 4f, 01, 0b, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no_cov_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 79, 1) to (start + 11, 2)
@@ -37,7 +37,7 @@ Highest counter ID seen: c0
 Function name: no_cov_crate::nested_fns::outer
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 33, 05, 02, 22, 01, 0c, 05, 00, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no_cov_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 51, 5) to (start + 2, 34)
@@ -47,7 +47,7 @@ Highest counter ID seen: c0
 Function name: no_cov_crate::nested_fns::outer_both_covered
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 41, 05, 02, 16, 01, 0b, 05, 00, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no_cov_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 65, 5) to (start + 2, 22)
@@ -57,7 +57,7 @@ Highest counter ID seen: c0
 Function name: no_cov_crate::nested_fns::outer_both_covered::inner
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 45, 09, 01, 17, 05, 01, 18, 02, 0e, 02, 02, 14, 02, 0e, 01, 03, 09, 00, 0a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no_cov_crate.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
diff --git a/tests/coverage/no_spans.cov-map b/tests/coverage/no_spans.cov-map
index 7f43b68fa90..992247fd520 100644
--- a/tests/coverage/no_spans.cov-map
+++ b/tests/coverage/no_spans.cov-map
@@ -1,7 +1,7 @@
 Function name: no_spans::affected_function
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 1a, 1c, 00, 1d]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no_spans.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 26, 28) to (start + 0, 29)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: no_spans::affected_function::{closure#0}
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 1b, 0c, 00, 0e]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no_spans.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 27, 12) to (start + 0, 14)
diff --git a/tests/coverage/no_spans_if_not.cov-map b/tests/coverage/no_spans_if_not.cov-map
index 6c389a24317..9d4fc074111 100644
--- a/tests/coverage/no_spans_if_not.cov-map
+++ b/tests/coverage/no_spans_if_not.cov-map
@@ -1,7 +1,7 @@
 Function name: no_spans_if_not::affected_function
 Raw bytes (19): 0x[01, 01, 00, 03, 01, 16, 1c, 01, 12, 01, 02, 0d, 00, 0f, 00, 02, 0d, 00, 0f]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no_spans_if_not.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 22, 28) to (start + 1, 18)
@@ -12,7 +12,7 @@ Highest counter ID seen: c0
 Function name: no_spans_if_not::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0b, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/no_spans_if_not.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 11, 1) to (start + 2, 2)
diff --git a/tests/coverage/overflow.cov-map b/tests/coverage/overflow.cov-map
index 1178d65de10..9bb68ee107d 100644
--- a/tests/coverage/overflow.cov-map
+++ b/tests/coverage/overflow.cov-map
@@ -1,7 +1,7 @@
 Function name: overflow::main
 Raw bytes (61): 0x[01, 01, 06, 05, 01, 05, 17, 01, 09, 05, 13, 17, 0d, 01, 09, 09, 01, 10, 01, 01, 1b, 05, 02, 0b, 00, 18, 02, 01, 0c, 00, 1a, 09, 00, 1b, 03, 0a, 06, 03, 13, 00, 20, 0d, 00, 21, 03, 0a, 0e, 03, 09, 00, 0a, 02, 01, 09, 00, 17, 01, 02, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/overflow.rs
 Number of expressions: 6
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 - expression 1 operands: lhs = Counter(1), rhs = Expression(5, Add)
@@ -28,7 +28,7 @@ Highest counter ID seen: c3
 Function name: overflow::might_overflow
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 05, 01, 01, 12, 05, 01, 13, 02, 06, 02, 02, 05, 00, 06, 01, 01, 09, 05, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/overflow.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
diff --git a/tests/coverage/panic_unwind.cov-map b/tests/coverage/panic_unwind.cov-map
index 18b13919fe5..f6d1fe5b9b4 100644
--- a/tests/coverage/panic_unwind.cov-map
+++ b/tests/coverage/panic_unwind.cov-map
@@ -1,7 +1,7 @@
 Function name: panic_unwind::main
 Raw bytes (61): 0x[01, 01, 06, 05, 01, 05, 17, 01, 09, 05, 13, 17, 0d, 01, 09, 09, 01, 0d, 01, 01, 1b, 05, 02, 0b, 00, 18, 02, 01, 0c, 00, 1a, 09, 00, 1b, 02, 0a, 06, 02, 13, 00, 20, 0d, 00, 21, 02, 0a, 0e, 02, 09, 00, 0a, 02, 01, 09, 00, 17, 01, 02, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/panic_unwind.rs
 Number of expressions: 6
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 - expression 1 operands: lhs = Counter(1), rhs = Expression(5, Add)
@@ -28,7 +28,7 @@ Highest counter ID seen: c3
 Function name: panic_unwind::might_panic
 Raw bytes (21): 0x[01, 01, 01, 01, 05, 03, 01, 04, 01, 01, 14, 05, 02, 09, 01, 0f, 02, 02, 0c, 03, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/panic_unwind.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 3
diff --git a/tests/coverage/partial_eq.cov-map b/tests/coverage/partial_eq.cov-map
index 21c8714ac99..02054aa444a 100644
--- a/tests/coverage/partial_eq.cov-map
+++ b/tests/coverage/partial_eq.cov-map
@@ -1,7 +1,7 @@
 Function name: <partial_eq::Version>::new
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0c, 05, 02, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/partial_eq.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 12, 5) to (start + 2, 6)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: partial_eq::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 11, 01, 0a, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/partial_eq.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 17, 1) to (start + 10, 2)
diff --git a/tests/coverage/simple_loop.cov-map b/tests/coverage/simple_loop.cov-map
index 8e428b267d5..542c93cbfa0 100644
--- a/tests/coverage/simple_loop.cov-map
+++ b/tests/coverage/simple_loop.cov-map
@@ -1,7 +1,7 @@
 Function name: simple_loop::main
 Raw bytes (43): 0x[01, 01, 02, 01, 05, 09, 01, 07, 01, 04, 01, 09, 10, 05, 0a, 05, 05, 06, 02, 05, 05, 00, 06, 09, 05, 0d, 02, 0e, 01, 04, 0d, 00, 12, 06, 02, 0a, 03, 0a, 01, 06, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/simple_loop.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(2), rhs = Counter(0)
diff --git a/tests/coverage/simple_match.cov-map b/tests/coverage/simple_match.cov-map
index 15f114daa7f..a96ddc2bb9a 100644
--- a/tests/coverage/simple_match.cov-map
+++ b/tests/coverage/simple_match.cov-map
@@ -1,7 +1,7 @@
 Function name: simple_match::main
 Raw bytes (64): 0x[01, 01, 05, 01, 05, 09, 01, 09, 01, 09, 13, 01, 0d, 0a, 01, 04, 01, 07, 0f, 05, 07, 10, 02, 06, 02, 02, 05, 00, 06, 09, 05, 09, 00, 0d, 0a, 05, 0d, 00, 16, 0d, 02, 0d, 00, 0e, 0a, 02, 11, 02, 12, 0d, 04, 0d, 07, 0e, 0e, 0a, 0d, 00, 0f, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/simple_match.rs
 Number of expressions: 5
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(2), rhs = Counter(0)
diff --git a/tests/coverage/sort_groups.cov-map b/tests/coverage/sort_groups.cov-map
index 898d68171c5..b0d260efeb9 100644
--- a/tests/coverage/sort_groups.cov-map
+++ b/tests/coverage/sort_groups.cov-map
@@ -1,7 +1,7 @@
 Function name: sort_groups::generic_fn::<&str>
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 11, 01, 01, 0c, 05, 01, 0d, 02, 06, 02, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/sort_groups.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -15,7 +15,7 @@ Highest counter ID seen: c1
 Function name: sort_groups::generic_fn::<()>
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 11, 01, 01, 0c, 05, 01, 0d, 02, 06, 02, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/sort_groups.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -29,7 +29,7 @@ Highest counter ID seen: c1
 Function name: sort_groups::generic_fn::<char>
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 11, 01, 01, 0c, 05, 01, 0d, 02, 06, 02, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/sort_groups.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -43,7 +43,7 @@ Highest counter ID seen: c1
 Function name: sort_groups::generic_fn::<i32>
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 11, 01, 01, 0c, 05, 01, 0d, 02, 06, 02, 02, 05, 00, 06, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/sort_groups.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -57,7 +57,7 @@ Highest counter ID seen: c1
 Function name: sort_groups::main
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 06, 01, 04, 1c, 05, 04, 24, 02, 06, 02, 02, 05, 00, 06, 01, 01, 05, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/sort_groups.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -71,7 +71,7 @@ Highest counter ID seen: c1
 Function name: sort_groups::other_fn
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 17, 01, 00, 11]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/sort_groups.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 23, 1) to (start + 0, 17)
diff --git a/tests/coverage/test_harness.cov-map b/tests/coverage/test_harness.cov-map
index b513b3d0549..50654fb2213 100644
--- a/tests/coverage/test_harness.cov-map
+++ b/tests/coverage/test_harness.cov-map
@@ -1,7 +1,7 @@
 Function name: test_harness::my_test
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 0a, 01, 00, 10]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/test_harness.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 10, 1) to (start + 0, 16)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: test_harness::unused (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 07, 01, 00, 0f]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/test_harness.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 7, 1) to (start + 0, 15)
diff --git a/tests/coverage/tight_inf_loop.cov-map b/tests/coverage/tight_inf_loop.cov-map
index 77a8ffb8358..31581f0872f 100644
--- a/tests/coverage/tight_inf_loop.cov-map
+++ b/tests/coverage/tight_inf_loop.cov-map
@@ -1,7 +1,7 @@
 Function name: tight_inf_loop::main
 Raw bytes (19): 0x[01, 01, 00, 03, 01, 01, 01, 01, 0d, 00, 02, 09, 00, 10, 01, 01, 06, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/tight_inf_loop.rs
 Number of expressions: 0
 Number of file 0 mappings: 3
 - Code(Counter(0)) at (prev + 1, 1) to (start + 1, 13)
diff --git a/tests/coverage/trivial.cov-map b/tests/coverage/trivial.cov-map
index 05f64896d9e..0064b20480f 100644
--- a/tests/coverage/trivial.cov-map
+++ b/tests/coverage/trivial.cov-map
@@ -1,7 +1,7 @@
 Function name: trivial::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 03, 01, 00, 0d]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/trivial.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 3, 1) to (start + 0, 13)
diff --git a/tests/coverage/try_error_result.cov-map b/tests/coverage/try_error_result.cov-map
index e45f3de1081..a6ecc68ab0e 100644
--- a/tests/coverage/try_error_result.cov-map
+++ b/tests/coverage/try_error_result.cov-map
@@ -1,7 +1,7 @@
 Function name: <try_error_result::Thing1>::get_thing_2
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 29, 05, 01, 18, 05, 02, 0d, 00, 14, 02, 02, 0d, 00, 1a, 01, 02, 05, 00, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/try_error_result.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -15,7 +15,7 @@ Highest counter ID seen: c1
 Function name: <try_error_result::Thing2>::call
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 34, 05, 01, 18, 05, 02, 0d, 00, 14, 02, 02, 0d, 00, 13, 01, 02, 05, 00, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/try_error_result.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -29,7 +29,7 @@ Highest counter ID seen: c1
 Function name: try_error_result::call
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 05, 01, 01, 14, 05, 02, 09, 00, 10, 02, 02, 09, 00, 0f, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/try_error_result.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -43,7 +43,7 @@ Highest counter ID seen: c1
 Function name: try_error_result::main
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 71, 01, 02, 0a, 05, 03, 05, 00, 06, 02, 02, 05, 00, 0b, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/try_error_result.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -57,7 +57,7 @@ Highest counter ID seen: c1
 Function name: try_error_result::test1
 Raw bytes (67): 0x[01, 01, 04, 07, 05, 01, 09, 05, 01, 05, 09, 0b, 01, 0d, 01, 02, 17, 05, 07, 09, 00, 0e, 09, 02, 09, 04, 1a, 02, 06, 0d, 00, 11, 02, 00, 29, 00, 2a, 00, 01, 0d, 00, 11, 00, 00, 2a, 00, 2b, 0a, 04, 0d, 00, 11, 00, 00, 2a, 00, 2b, 0e, 03, 05, 00, 0b, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/try_error_result.rs
 Number of expressions: 4
 - expression 0 operands: lhs = Expression(1, Add), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
@@ -84,7 +84,7 @@ Highest counter ID seen: c2
 Function name: try_error_result::test2
 Raw bytes (336): 0x[01, 01, 36, 0d, 11, 0d, 3f, 11, 15, 0d, 37, 3b, 1d, 3f, 19, 11, 15, 0d, 3f, 11, 15, 0d, 3b, 3f, 19, 11, 15, 0d, 37, 3b, 1d, 3f, 19, 11, 15, 41, 53, 21, 25, 41, 21, 41, 53, 21, 25, 09, 73, 77, 2d, 0d, 29, 09, 0d, 09, 77, 0d, 29, 09, 73, 77, 2d, 0d, 29, 45, 8b, 01, 31, 35, 45, 31, 45, 8b, 01, 31, 35, 49, 9f, 01, 39, 3d, 49, 39, 49, 9f, 01, 39, 3d, 05, 09, ab, 01, 09, af, 01, 3d, b3, 01, 39, b7, 01, 35, bb, 01, 31, bf, 01, 2d, c3, 01, 29, c7, 01, 25, cb, 01, 21, cf, 01, 1d, d3, 01, 19, d7, 01, 15, 05, 11, 28, 01, 3d, 01, 03, 17, 05, 08, 09, 00, 0e, 09, 02, 09, 04, 1a, 0d, 06, 0d, 00, 1f, 11, 00, 2f, 00, 30, 02, 00, 31, 03, 1c, 15, 04, 11, 00, 12, 1e, 02, 11, 03, 27, 32, 05, 11, 00, 14, 1e, 00, 17, 00, 29, 19, 00, 41, 00, 42, 26, 00, 43, 00, 47, 1d, 00, 5f, 00, 60, 32, 01, 0d, 00, 17, 4e, 01, 11, 00, 14, 41, 00, 17, 00, 29, 21, 00, 41, 00, 42, 4a, 00, 43, 00, 47, 25, 00, 60, 00, 61, 4e, 01, 0d, 00, 17, 6e, 04, 11, 00, 14, 62, 00, 17, 00, 29, 29, 00, 42, 00, 43, 66, 00, 44, 00, 48, 2d, 00, 61, 00, 62, 6e, 01, 0d, 00, 17, 86, 01, 01, 11, 00, 14, 45, 00, 17, 01, 1d, 31, 01, 36, 00, 37, 82, 01, 01, 12, 00, 16, 35, 00, 2f, 00, 30, 86, 01, 01, 0d, 00, 17, 9a, 01, 01, 11, 00, 14, 49, 00, 17, 01, 1d, 39, 02, 11, 00, 12, 96, 01, 01, 12, 00, 16, 3d, 01, 11, 00, 12, 9a, 01, 02, 0d, 00, 17, a2, 01, 03, 05, 00, 0b, a6, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/try_error_result.rs
 Number of expressions: 54
 - expression 0 operands: lhs = Counter(3), rhs = Counter(4)
 - expression 1 operands: lhs = Counter(3), rhs = Expression(15, Add)
diff --git a/tests/coverage/unicode.cov-map b/tests/coverage/unicode.cov-map
index 29d40a05513..7ad4395491f 100644
--- a/tests/coverage/unicode.cov-map
+++ b/tests/coverage/unicode.cov-map
@@ -1,7 +1,7 @@
 Function name: unicode::main
 Raw bytes (53): 0x[01, 01, 02, 05, 01, 01, 0d, 09, 01, 0e, 01, 00, 0b, 02, 01, 09, 00, 0c, 05, 00, 10, 00, 1b, 02, 00, 1c, 00, 28, 01, 02, 08, 00, 23, 09, 00, 29, 00, 44, 0d, 00, 47, 02, 06, 06, 02, 05, 00, 06, 01, 02, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unicode.rs
 Number of expressions: 2
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(3)
@@ -23,7 +23,7 @@ Highest counter ID seen: c3
 Function name: unicode::他 (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 1e, 19, 00, 25]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unicode.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 30, 25) to (start + 0, 37)
@@ -32,7 +32,7 @@ Highest counter ID seen: (none)
 Function name: unicode::申し訳ございません
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 18, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unicode.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 24, 1) to (start + 2, 2)
diff --git a/tests/coverage/unreachable.cov-map b/tests/coverage/unreachable.cov-map
index 0bc18bfcbd3..fd9a1abc8cb 100644
--- a/tests/coverage/unreachable.cov-map
+++ b/tests/coverage/unreachable.cov-map
@@ -1,7 +1,7 @@
 Function name: unreachable::UNREACHABLE_CLOSURE::{closure#0} (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 0e, 27, 00, 45]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unreachable.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 14, 39) to (start + 0, 69)
@@ -10,7 +10,7 @@ Highest counter ID seen: (none)
 Function name: unreachable::unreachable_function (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 10, 01, 01, 23]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unreachable.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 16, 1) to (start + 1, 35)
@@ -19,7 +19,7 @@ Highest counter ID seen: (none)
 Function name: unreachable::unreachable_intrinsic (unused)
 Raw bytes (9): 0x[01, 01, 00, 01, 00, 15, 01, 01, 2a]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unreachable.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 21, 1) to (start + 1, 42)
diff --git a/tests/coverage/unused.cov-map b/tests/coverage/unused.cov-map
index c18d331ec2e..8946b43a8bb 100644
--- a/tests/coverage/unused.cov-map
+++ b/tests/coverage/unused.cov-map
@@ -1,7 +1,7 @@
 Function name: unused::foo::<f32>
 Raw bytes (40): 0x[01, 01, 03, 05, 01, 05, 0b, 01, 09, 06, 01, 03, 01, 01, 12, 05, 02, 0b, 00, 11, 02, 01, 09, 00, 0f, 06, 00, 13, 00, 19, 02, 01, 09, 00, 0f, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unused.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 - expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add)
@@ -21,7 +21,7 @@ Highest counter ID seen: c1
 Function name: unused::foo::<u32>
 Raw bytes (40): 0x[01, 01, 03, 05, 01, 05, 0b, 01, 09, 06, 01, 03, 01, 01, 12, 05, 02, 0b, 00, 11, 02, 01, 09, 00, 0f, 06, 00, 13, 00, 19, 02, 01, 09, 00, 0f, 01, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unused.rs
 Number of expressions: 3
 - expression 0 operands: lhs = Counter(1), rhs = Counter(0)
 - expression 1 operands: lhs = Counter(1), rhs = Expression(2, Add)
@@ -41,7 +41,7 @@ Highest counter ID seen: c1
 Function name: unused::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 25, 01, 04, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unused.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 37, 1) to (start + 4, 2)
@@ -50,7 +50,7 @@ Highest counter ID seen: c0
 Function name: unused::unused_func (unused)
 Raw bytes (24): 0x[01, 01, 00, 04, 00, 13, 01, 01, 0e, 00, 01, 0f, 02, 06, 00, 02, 05, 00, 06, 00, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unused.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Zero) at (prev + 19, 1) to (start + 1, 14)
@@ -62,7 +62,7 @@ Highest counter ID seen: (none)
 Function name: unused::unused_func2 (unused)
 Raw bytes (24): 0x[01, 01, 00, 04, 00, 19, 01, 01, 0e, 00, 01, 0f, 02, 06, 00, 02, 05, 00, 06, 00, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unused.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Zero) at (prev + 25, 1) to (start + 1, 14)
@@ -74,7 +74,7 @@ Highest counter ID seen: (none)
 Function name: unused::unused_func3 (unused)
 Raw bytes (24): 0x[01, 01, 00, 04, 00, 1f, 01, 01, 0e, 00, 01, 0f, 02, 06, 00, 02, 05, 00, 06, 00, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unused.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Zero) at (prev + 31, 1) to (start + 1, 14)
@@ -86,7 +86,7 @@ Highest counter ID seen: (none)
 Function name: unused::unused_template_func::<_> (unused)
 Raw bytes (34): 0x[01, 01, 00, 06, 00, 0b, 01, 01, 12, 00, 02, 0b, 00, 11, 00, 01, 09, 00, 0f, 00, 00, 13, 00, 19, 00, 01, 09, 00, 0f, 00, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unused.rs
 Number of expressions: 0
 Number of file 0 mappings: 6
 - Code(Zero) at (prev + 11, 1) to (start + 1, 18)
diff --git a/tests/coverage/unused_mod.cov-map b/tests/coverage/unused_mod.cov-map
index 5e8b69fcdba..790cd701dc3 100644
--- a/tests/coverage/unused_mod.cov-map
+++ b/tests/coverage/unused_mod.cov-map
@@ -1,7 +1,7 @@
 Function name: unused_mod::main
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 04, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/unused_mod.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 4, 1) to (start + 2, 2)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: unused_mod::unused_module::never_called_function (unused)
 Raw bytes (9): 0x[01, 02, 00, 01, 00, 02, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 2
+- file 0 => $DIR/auxiliary/unused_mod_helper.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Zero) at (prev + 2, 1) to (start + 2, 2)
diff --git a/tests/coverage/uses_crate.cov-map b/tests/coverage/uses_crate.cov-map
index 5c23f882697..238226f3d68 100644
--- a/tests/coverage/uses_crate.cov-map
+++ b/tests/coverage/uses_crate.cov-map
@@ -1,7 +1,7 @@
 Function name: used_crate::used_from_bin_crate_and_lib_crate_generic_function::<alloc::vec::Vec<i32>>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 1b, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/auxiliary/used_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 27, 1) to (start + 2, 2)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: used_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/auxiliary/used_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 19, 1) to (start + 2, 2)
@@ -19,7 +19,7 @@ Highest counter ID seen: c0
 Function name: used_crate::used_only_from_bin_crate_generic_function::<&str>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 13, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/auxiliary/used_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 19, 1) to (start + 2, 2)
@@ -28,7 +28,7 @@ Highest counter ID seen: c0
 Function name: used_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 1f, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/auxiliary/used_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 31, 1) to (start + 2, 2)
@@ -37,7 +37,7 @@ Highest counter ID seen: c0
 Function name: uses_crate::main
 Raw bytes (9): 0x[01, 02, 00, 01, 01, 0c, 01, 07, 02]
 Number of files: 1
-- file 0 => global file 2
+- file 0 => $DIR/uses_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 12, 1) to (start + 7, 2)
diff --git a/tests/coverage/uses_inline_crate.cov-map b/tests/coverage/uses_inline_crate.cov-map
index a482d20e3b4..fd14ea34120 100644
--- a/tests/coverage/uses_inline_crate.cov-map
+++ b/tests/coverage/uses_inline_crate.cov-map
@@ -1,7 +1,7 @@
 Function name: used_inline_crate::used_from_bin_crate_and_lib_crate_generic_function::<alloc::vec::Vec<i32>>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 2c, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/auxiliary/used_inline_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 44, 1) to (start + 2, 2)
@@ -10,7 +10,7 @@ Highest counter ID seen: c0
 Function name: used_inline_crate::used_inline_function
 Raw bytes (26): 0x[01, 01, 01, 01, 05, 04, 01, 14, 01, 06, 0f, 05, 06, 10, 02, 06, 02, 02, 05, 00, 06, 01, 01, 05, 01, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/auxiliary/used_inline_crate.rs
 Number of expressions: 1
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 Number of file 0 mappings: 4
@@ -24,7 +24,7 @@ Highest counter ID seen: c1
 Function name: used_inline_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 21, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/auxiliary/used_inline_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 33, 1) to (start + 2, 2)
@@ -33,7 +33,7 @@ Highest counter ID seen: c0
 Function name: used_inline_crate::used_only_from_bin_crate_generic_function::<&str>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 21, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/auxiliary/used_inline_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 33, 1) to (start + 2, 2)
@@ -42,7 +42,7 @@ Highest counter ID seen: c0
 Function name: used_inline_crate::used_with_same_type_from_bin_crate_and_lib_crate_generic_function::<&str>
 Raw bytes (9): 0x[01, 01, 00, 01, 01, 31, 01, 02, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/auxiliary/used_inline_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 49, 1) to (start + 2, 2)
@@ -51,7 +51,7 @@ Highest counter ID seen: c0
 Function name: uses_inline_crate::main
 Raw bytes (9): 0x[01, 02, 00, 01, 01, 0c, 01, 0a, 02]
 Number of files: 1
-- file 0 => global file 2
+- file 0 => $DIR/uses_inline_crate.rs
 Number of expressions: 0
 Number of file 0 mappings: 1
 - Code(Counter(0)) at (prev + 12, 1) to (start + 10, 2)
diff --git a/tests/coverage/while.cov-map b/tests/coverage/while.cov-map
index 5a6698128cb..8ad73920629 100644
--- a/tests/coverage/while.cov-map
+++ b/tests/coverage/while.cov-map
@@ -1,7 +1,7 @@
 Function name: while::main
 Raw bytes (24): 0x[01, 01, 00, 04, 01, 01, 01, 01, 10, 01, 02, 0b, 00, 14, 00, 00, 15, 02, 06, 01, 03, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/while.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 1, 1) to (start + 1, 16)
diff --git a/tests/coverage/while_early_ret.cov-map b/tests/coverage/while_early_ret.cov-map
index 69b51bf9ca3..6e3db66f97c 100644
--- a/tests/coverage/while_early_ret.cov-map
+++ b/tests/coverage/while_early_ret.cov-map
@@ -1,7 +1,7 @@
 Function name: while_early_ret::main
 Raw bytes (63): 0x[01, 01, 07, 0f, 05, 01, 09, 0f, 13, 01, 09, 05, 0d, 05, 01, 05, 09, 09, 01, 05, 01, 01, 1b, 05, 03, 09, 02, 0a, 09, 05, 0d, 02, 0e, 02, 06, 15, 02, 16, 0d, 04, 15, 00, 1b, 0a, 04, 15, 00, 1b, 16, 03, 0a, 03, 0a, 1a, 06, 05, 00, 0b, 01, 01, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/while_early_ret.rs
 Number of expressions: 7
 - expression 0 operands: lhs = Expression(3, Add), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(0), rhs = Counter(2)
diff --git a/tests/coverage/yield.cov-map b/tests/coverage/yield.cov-map
index bf0916e5503..db82c9d673d 100644
--- a/tests/coverage/yield.cov-map
+++ b/tests/coverage/yield.cov-map
@@ -1,7 +1,7 @@
 Function name: yield::main
 Raw bytes (94): 0x[01, 01, 05, 01, 05, 05, 09, 09, 11, 11, 15, 11, 15, 10, 01, 07, 01, 01, 16, 01, 07, 0b, 00, 2e, 05, 01, 27, 00, 29, 02, 01, 0e, 00, 14, 05, 02, 0b, 00, 2e, 0d, 01, 22, 00, 27, 09, 00, 2c, 00, 2e, 06, 01, 0e, 00, 14, 09, 03, 09, 00, 16, 09, 08, 0b, 00, 2e, 11, 01, 27, 00, 29, 0a, 01, 0e, 00, 14, 11, 02, 0b, 00, 2e, 12, 01, 27, 00, 29, 15, 01, 0e, 00, 14, 12, 02, 01, 00, 02]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/yield.rs
 Number of expressions: 5
 - expression 0 operands: lhs = Counter(0), rhs = Counter(1)
 - expression 1 operands: lhs = Counter(1), rhs = Counter(2)
@@ -35,7 +35,7 @@ Highest counter ID seen: c5
 Function name: yield::main::{closure#0}
 Raw bytes (14): 0x[01, 01, 00, 02, 01, 09, 08, 01, 10, 05, 02, 10, 01, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/yield.rs
 Number of expressions: 0
 Number of file 0 mappings: 2
 - Code(Counter(0)) at (prev + 9, 8) to (start + 1, 16)
@@ -45,7 +45,7 @@ Highest counter ID seen: c1
 Function name: yield::main::{closure#1}
 Raw bytes (24): 0x[01, 01, 00, 04, 01, 18, 08, 01, 10, 05, 02, 09, 00, 10, 09, 01, 09, 00, 10, 0d, 01, 10, 01, 06]
 Number of files: 1
-- file 0 => global file 1
+- file 0 => $DIR/yield.rs
 Number of expressions: 0
 Number of file 0 mappings: 4
 - Code(Counter(0)) at (prev + 24, 8) to (start + 1, 16)
diff --git a/tests/crashes/131758.rs b/tests/crashes/131758.rs
deleted file mode 100644
index 942c5fd7a50..00000000000
--- a/tests/crashes/131758.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-//@ known-bug: #131758
-#![feature(unboxed_closures)]
-trait Foo {}
-
-impl<T: Fn<(i32,)>> Foo for T {}
-
-fn baz<T: Foo>(_: T) {}
-
-fn main() {
-    baz(|x| ());
-}
diff --git a/tests/run-make/remap-path-prefix-dwarf/rmake.rs b/tests/run-make/remap-path-prefix-dwarf/rmake.rs
index ede1d615742..3d6ca014fc2 100644
--- a/tests/run-make/remap-path-prefix-dwarf/rmake.rs
+++ b/tests/run-make/remap-path-prefix-dwarf/rmake.rs
@@ -91,6 +91,59 @@ fn main() {
         )),
         dwarf_test: DwarfDump::ParentTest,
     });
+
+    check_dwarf_deps("macro", DwarfDump::AvoidSrcPath);
+    check_dwarf_deps("diagnostics", DwarfDump::AvoidSrcPath);
+    check_dwarf_deps("macro,diagnostics", DwarfDump::AvoidSrcPath);
+    check_dwarf_deps("object", DwarfDump::ContainsSrcPath);
+}
+
+#[track_caller]
+fn check_dwarf_deps(scope: &str, dwarf_test: DwarfDump) {
+    // build some_value.rs
+    let mut rustc_sm = rustc();
+    rustc_sm.input(cwd().join("src/some_value.rs"));
+    rustc_sm.arg("-Cdebuginfo=2");
+    rustc_sm.arg(format!("-Zremap-path-scope={}", scope));
+    rustc_sm.arg("--remap-path-prefix");
+    rustc_sm.arg(format!("{}=/REMAPPED", cwd().display()));
+    rustc_sm.arg("-Csplit-debuginfo=off");
+    rustc_sm.run();
+
+    // build print_value.rs
+    let print_value_rlib = rust_lib_name(&format!("print_value.{scope}"));
+    let mut rustc_pv = rustc();
+    rustc_pv.input(cwd().join("src/print_value.rs"));
+    rustc_pv.output(&print_value_rlib);
+    rustc_pv.arg("-Cdebuginfo=2");
+    rustc_pv.arg(format!("-Zremap-path-scope={}", scope));
+    rustc_pv.arg("--remap-path-prefix");
+    rustc_pv.arg(format!("{}=/REMAPPED", cwd().display()));
+    rustc_pv.arg("-Csplit-debuginfo=off");
+    rustc_pv.run();
+
+    match dwarf_test {
+        DwarfDump::AvoidSrcPath => {
+            llvm_dwarfdump()
+                .input(print_value_rlib)
+                .run()
+                .assert_stdout_not_contains("REMAPPED/src/some_value.rs")
+                .assert_stdout_not_contains("REMAPPED/src/print_value.rs")
+                .assert_stdout_not_contains("REMAPPED/REMAPPED")
+                .assert_stdout_contains(cwd().join("src/some_value.rs").display().to_string())
+                .assert_stdout_contains(cwd().join("src/print_value.rs").display().to_string());
+        }
+        DwarfDump::ContainsSrcPath => {
+            llvm_dwarfdump()
+                .input(print_value_rlib)
+                .run()
+                .assert_stdout_contains("REMAPPED/src/some_value.rs")
+                .assert_stdout_contains("REMAPPED/src/print_value.rs")
+                .assert_stdout_not_contains(cwd().join("src/some_value.rs").display().to_string())
+                .assert_stdout_not_contains(cwd().join("src/print_value.rs").display().to_string());
+        }
+        _ => unreachable!(),
+    }
 }
 
 #[track_caller]
diff --git a/tests/run-make/remap-path-prefix-dwarf/src/print_value.rs b/tests/run-make/remap-path-prefix-dwarf/src/print_value.rs
new file mode 100644
index 00000000000..f7653025ba5
--- /dev/null
+++ b/tests/run-make/remap-path-prefix-dwarf/src/print_value.rs
@@ -0,0 +1,7 @@
+#![crate_type = "rlib"]
+
+extern crate some_value;
+
+pub fn print_value() {
+    println!("{}", some_value::get_some_value());
+}
diff --git a/tests/run-make/remap-path-prefix-dwarf/src/some_value.rs b/tests/run-make/remap-path-prefix-dwarf/src/some_value.rs
new file mode 100644
index 00000000000..aa95a1bdf73
--- /dev/null
+++ b/tests/run-make/remap-path-prefix-dwarf/src/some_value.rs
@@ -0,0 +1,6 @@
+#![crate_type = "rlib"]
+
+#[inline]
+pub fn get_some_value() -> i32 {
+    42
+}
diff --git a/tests/run-make/remap-path-prefix/rmake.rs b/tests/run-make/remap-path-prefix/rmake.rs
index aeb30e72d5b..b4f7f4769b5 100644
--- a/tests/run-make/remap-path-prefix/rmake.rs
+++ b/tests/run-make/remap-path-prefix/rmake.rs
@@ -47,10 +47,10 @@ fn main() {
 
     out_object.run();
     rmeta_contains("/the/aux/lib.rs");
-    rmeta_not_contains("auxiliary");
+    rmeta_contains("auxiliary");
     out_macro.run();
     rmeta_contains("/the/aux/lib.rs");
-    rmeta_not_contains("auxiliary");
+    rmeta_contains("auxiliary");
     out_diagobj.run();
     rmeta_contains("/the/aux/lib.rs");
     rmeta_not_contains("auxiliary");
@@ -58,6 +58,7 @@ fn main() {
 
 //FIXME(Oneirical): These could be generalized into run_make_support
 // helper functions.
+#[track_caller]
 fn rmeta_contains(expected: &str) {
     // Normalize to account for path differences in Windows.
     if !bstr::BString::from(rfs::read("liblib.rmeta")).replace(b"\\", b"/").contains_str(expected) {
@@ -69,6 +70,7 @@ fn rmeta_contains(expected: &str) {
     }
 }
 
+#[track_caller]
 fn rmeta_not_contains(expected: &str) {
     // Normalize to account for path differences in Windows.
     if bstr::BString::from(rfs::read("liblib.rmeta")).replace(b"\\", b"/").contains_str(expected) {
diff --git a/tests/rustdoc-js-std/path-maxeditdistance.js b/tests/rustdoc-js-std/path-maxeditdistance.js
index fd12a056496..6989e7d6488 100644
--- a/tests/rustdoc-js-std/path-maxeditdistance.js
+++ b/tests/rustdoc-js-std/path-maxeditdistance.js
@@ -13,9 +13,9 @@ const EXPECTED = [
             { 'path': 'std::vec', 'name': 'IntoIter' },
             { 'path': 'std::vec::Vec', 'name': 'from_iter' },
             { 'path': 'std::vec::Vec', 'name': 'into_iter' },
+            { 'path': 'std::vec::ExtractIf', 'name': 'into_iter' },
             { 'path': 'std::vec::Drain', 'name': 'into_iter' },
             { 'path': 'std::vec::IntoIter', 'name': 'into_iter' },
-            { 'path': 'std::vec::ExtractIf', 'name': 'into_iter' },
             { 'path': 'std::vec::Splice', 'name': 'into_iter' },
             { 'path': 'std::collections::VecDeque', 'name': 'iter' },
             { 'path': 'std::collections::VecDeque', 'name': 'iter_mut' },
diff --git a/tests/rustdoc/anchor-id-duplicate-method-name-25001.rs b/tests/rustdoc/anchors/anchor-id-duplicate-method-name-25001.rs
index d7f4e587d5e..d7f4e587d5e 100644
--- a/tests/rustdoc/anchor-id-duplicate-method-name-25001.rs
+++ b/tests/rustdoc/anchors/anchor-id-duplicate-method-name-25001.rs
diff --git a/tests/rustdoc/anchor-id-trait-method-15169.rs b/tests/rustdoc/anchors/anchor-id-trait-method-15169.rs
index 19eeeaee9d1..19eeeaee9d1 100644
--- a/tests/rustdoc/anchor-id-trait-method-15169.rs
+++ b/tests/rustdoc/anchors/anchor-id-trait-method-15169.rs
diff --git a/tests/rustdoc/anchor-id-trait-tymethod-28478.rs b/tests/rustdoc/anchors/anchor-id-trait-tymethod-28478.rs
index e7adba7d06e..e7adba7d06e 100644
--- a/tests/rustdoc/anchor-id-trait-tymethod-28478.rs
+++ b/tests/rustdoc/anchors/anchor-id-trait-tymethod-28478.rs
diff --git a/tests/rustdoc/anchors.no_const_anchor.html b/tests/rustdoc/anchors/anchors.no_const_anchor.html
index 07a7507fa2e..07a7507fa2e 100644
--- a/tests/rustdoc/anchors.no_const_anchor.html
+++ b/tests/rustdoc/anchors/anchors.no_const_anchor.html
diff --git a/tests/rustdoc/anchors.no_const_anchor2.html b/tests/rustdoc/anchors/anchors.no_const_anchor2.html
index 091dac3e4b2..091dac3e4b2 100644
--- a/tests/rustdoc/anchors.no_const_anchor2.html
+++ b/tests/rustdoc/anchors/anchors.no_const_anchor2.html
diff --git a/tests/rustdoc/anchors.no_method_anchor.html b/tests/rustdoc/anchors/anchors.no_method_anchor.html
index 89f9898624c..89f9898624c 100644
--- a/tests/rustdoc/anchors.no_method_anchor.html
+++ b/tests/rustdoc/anchors/anchors.no_method_anchor.html
diff --git a/tests/rustdoc/anchors.no_trait_method_anchor.html b/tests/rustdoc/anchors/anchors.no_trait_method_anchor.html
index 51656a3e58f..51656a3e58f 100644
--- a/tests/rustdoc/anchors.no_trait_method_anchor.html
+++ b/tests/rustdoc/anchors/anchors.no_trait_method_anchor.html
diff --git a/tests/rustdoc/anchors.no_tymethod_anchor.html b/tests/rustdoc/anchors/anchors.no_tymethod_anchor.html
index 49ee624bdbc..49ee624bdbc 100644
--- a/tests/rustdoc/anchors.no_tymethod_anchor.html
+++ b/tests/rustdoc/anchors/anchors.no_tymethod_anchor.html
diff --git a/tests/rustdoc/anchors.no_type_anchor.html b/tests/rustdoc/anchors/anchors.no_type_anchor.html
index c5ac3c93818..c5ac3c93818 100644
--- a/tests/rustdoc/anchors.no_type_anchor.html
+++ b/tests/rustdoc/anchors/anchors.no_type_anchor.html
diff --git a/tests/rustdoc/anchors.no_type_anchor2.html b/tests/rustdoc/anchors/anchors.no_type_anchor2.html
index 14dd31d87b6..14dd31d87b6 100644
--- a/tests/rustdoc/anchors.no_type_anchor2.html
+++ b/tests/rustdoc/anchors/anchors.no_type_anchor2.html
diff --git a/tests/rustdoc/anchors.rs b/tests/rustdoc/anchors/anchors.rs
index 255ef87351c..255ef87351c 100644
--- a/tests/rustdoc/anchors.rs
+++ b/tests/rustdoc/anchors/anchors.rs
diff --git a/tests/rustdoc/auxiliary/issue-86620-1.rs b/tests/rustdoc/anchors/auxiliary/issue-86620-1.rs
index f6debf6fb4e..f6debf6fb4e 100644
--- a/tests/rustdoc/auxiliary/issue-86620-1.rs
+++ b/tests/rustdoc/anchors/auxiliary/issue-86620-1.rs
diff --git a/tests/rustdoc/disambiguate-anchors-32890.rs b/tests/rustdoc/anchors/disambiguate-anchors-32890.rs
index 0b726d5fba4..0b726d5fba4 100644
--- a/tests/rustdoc/disambiguate-anchors-32890.rs
+++ b/tests/rustdoc/anchors/disambiguate-anchors-32890.rs
diff --git a/tests/rustdoc/disambiguate-anchors-header-29449.rs b/tests/rustdoc/anchors/disambiguate-anchors-header-29449.rs
index feb0632775e..feb0632775e 100644
--- a/tests/rustdoc/disambiguate-anchors-header-29449.rs
+++ b/tests/rustdoc/anchors/disambiguate-anchors-header-29449.rs
diff --git a/tests/rustdoc/method-anchor-in-blanket-impl-86620.rs b/tests/rustdoc/anchors/method-anchor-in-blanket-impl-86620.rs
index 89e8712169a..89e8712169a 100644
--- a/tests/rustdoc/method-anchor-in-blanket-impl-86620.rs
+++ b/tests/rustdoc/anchors/method-anchor-in-blanket-impl-86620.rs
diff --git a/tests/rustdoc/trait-impl-items-links-and-anchors.rs b/tests/rustdoc/anchors/trait-impl-items-links-and-anchors.rs
index c1845a33b9d..c1845a33b9d 100644
--- a/tests/rustdoc/trait-impl-items-links-and-anchors.rs
+++ b/tests/rustdoc/anchors/trait-impl-items-links-and-anchors.rs
diff --git a/tests/rustdoc/assoc-fns.rs b/tests/rustdoc/assoc/assoc-fns.rs
index 6ffbebc3d27..6ffbebc3d27 100644
--- a/tests/rustdoc/assoc-fns.rs
+++ b/tests/rustdoc/assoc/assoc-fns.rs
diff --git a/tests/rustdoc/assoc-item-cast.rs b/tests/rustdoc/assoc/assoc-item-cast.rs
index 17b7cf6f0da..17b7cf6f0da 100644
--- a/tests/rustdoc/assoc-item-cast.rs
+++ b/tests/rustdoc/assoc/assoc-item-cast.rs
diff --git a/tests/rustdoc/assoc-type-bindings-20646.rs b/tests/rustdoc/assoc/assoc-type-bindings-20646.rs
index c79d07ff5bd..c79d07ff5bd 100644
--- a/tests/rustdoc/assoc-type-bindings-20646.rs
+++ b/tests/rustdoc/assoc/assoc-type-bindings-20646.rs
diff --git a/tests/rustdoc/assoc-types.rs b/tests/rustdoc/assoc/assoc-types.rs
index 8247d8b91e8..8247d8b91e8 100644
--- a/tests/rustdoc/assoc-types.rs
+++ b/tests/rustdoc/assoc/assoc-types.rs
diff --git a/tests/rustdoc/auxiliary/cross-crate-hidden-assoc-trait-items.rs b/tests/rustdoc/assoc/auxiliary/cross-crate-hidden-assoc-trait-items.rs
index 3baf8a6c07e..3baf8a6c07e 100644
--- a/tests/rustdoc/auxiliary/cross-crate-hidden-assoc-trait-items.rs
+++ b/tests/rustdoc/assoc/auxiliary/cross-crate-hidden-assoc-trait-items.rs
diff --git a/tests/rustdoc/auxiliary/issue-20646.rs b/tests/rustdoc/assoc/auxiliary/issue-20646.rs
index d1df1defb05..d1df1defb05 100644
--- a/tests/rustdoc/auxiliary/issue-20646.rs
+++ b/tests/rustdoc/assoc/auxiliary/issue-20646.rs
diff --git a/tests/rustdoc/auxiliary/issue-20727.rs b/tests/rustdoc/assoc/auxiliary/issue-20727.rs
index a102d1a4897..a102d1a4897 100644
--- a/tests/rustdoc/auxiliary/issue-20727.rs
+++ b/tests/rustdoc/assoc/auxiliary/issue-20727.rs
diff --git a/tests/rustdoc/auxiliary/normalize-assoc-item.rs b/tests/rustdoc/assoc/auxiliary/normalize-assoc-item.rs
index fbd111c3035..fbd111c3035 100644
--- a/tests/rustdoc/auxiliary/normalize-assoc-item.rs
+++ b/tests/rustdoc/assoc/auxiliary/normalize-assoc-item.rs
diff --git a/tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs b/tests/rustdoc/assoc/cross-crate-hidden-assoc-trait-items.rs
index d3771c2e7a2..d3771c2e7a2 100644
--- a/tests/rustdoc/cross-crate-hidden-assoc-trait-items.rs
+++ b/tests/rustdoc/assoc/cross-crate-hidden-assoc-trait-items.rs
diff --git a/tests/rustdoc/doc-assoc-item.rs b/tests/rustdoc/assoc/doc-assoc-item.rs
index 2eb82abfc0b..2eb82abfc0b 100644
--- a/tests/rustdoc/doc-assoc-item.rs
+++ b/tests/rustdoc/assoc/doc-assoc-item.rs
diff --git a/tests/rustdoc/inline-assoc-type-20727-bindings.rs b/tests/rustdoc/assoc/inline-assoc-type-20727-bindings.rs
index b3447a759df..b3447a759df 100644
--- a/tests/rustdoc/inline-assoc-type-20727-bindings.rs
+++ b/tests/rustdoc/assoc/inline-assoc-type-20727-bindings.rs
diff --git a/tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs b/tests/rustdoc/assoc/inline-assoc-type-20727-bounds-deref.rs
index afb9087cc7a..afb9087cc7a 100644
--- a/tests/rustdoc/inline-assoc-type-20727-bounds-deref.rs
+++ b/tests/rustdoc/assoc/inline-assoc-type-20727-bounds-deref.rs
diff --git a/tests/rustdoc/inline-assoc-type-20727-bounds-index.rs b/tests/rustdoc/assoc/inline-assoc-type-20727-bounds-index.rs
index 9dd234e8202..9dd234e8202 100644
--- a/tests/rustdoc/inline-assoc-type-20727-bounds-index.rs
+++ b/tests/rustdoc/assoc/inline-assoc-type-20727-bounds-index.rs
diff --git a/tests/rustdoc/inline-assoc-type-20727-bounds.rs b/tests/rustdoc/assoc/inline-assoc-type-20727-bounds.rs
index bd8d46f4a56..bd8d46f4a56 100644
--- a/tests/rustdoc/inline-assoc-type-20727-bounds.rs
+++ b/tests/rustdoc/assoc/inline-assoc-type-20727-bounds.rs
diff --git a/tests/rustdoc/normalize-assoc-item.rs b/tests/rustdoc/assoc/normalize-assoc-item.rs
index 7ef9d3067e1..7ef9d3067e1 100644
--- a/tests/rustdoc/normalize-assoc-item.rs
+++ b/tests/rustdoc/assoc/normalize-assoc-item.rs
diff --git a/tests/rustdoc/async-fn-opaque-item.rs b/tests/rustdoc/async/async-fn-opaque-item.rs
index d45183f96dd..d45183f96dd 100644
--- a/tests/rustdoc/async-fn-opaque-item.rs
+++ b/tests/rustdoc/async/async-fn-opaque-item.rs
diff --git a/tests/rustdoc/async-fn.rs b/tests/rustdoc/async/async-fn.rs
index 3d49766c55e..3d49766c55e 100644
--- a/tests/rustdoc/async-fn.rs
+++ b/tests/rustdoc/async/async-fn.rs
diff --git a/tests/rustdoc/async-move-doctest.rs b/tests/rustdoc/async/async-move-doctest.rs
index e18ec353533..e18ec353533 100644
--- a/tests/rustdoc/async-move-doctest.rs
+++ b/tests/rustdoc/async/async-move-doctest.rs
diff --git a/tests/rustdoc/async-trait-sig.rs b/tests/rustdoc/async/async-trait-sig.rs
index be790f6ed7f..be790f6ed7f 100644
--- a/tests/rustdoc/async-trait-sig.rs
+++ b/tests/rustdoc/async/async-trait-sig.rs
diff --git a/tests/rustdoc/async-trait.rs b/tests/rustdoc/async/async-trait.rs
index a6ee340e2dd..a6ee340e2dd 100644
--- a/tests/rustdoc/async-trait.rs
+++ b/tests/rustdoc/async/async-trait.rs
diff --git a/tests/rustdoc/auxiliary/async-trait-dep.rs b/tests/rustdoc/async/auxiliary/async-trait-dep.rs
index d89ec6d2998..d89ec6d2998 100644
--- a/tests/rustdoc/auxiliary/async-trait-dep.rs
+++ b/tests/rustdoc/async/auxiliary/async-trait-dep.rs
diff --git a/tests/rustdoc/auto-impl-for-trait.rs b/tests/rustdoc/auto/auto-impl-for-trait.rs
index bc658fbfc8c..bc658fbfc8c 100644
--- a/tests/rustdoc/auto-impl-for-trait.rs
+++ b/tests/rustdoc/auto/auto-impl-for-trait.rs
diff --git a/tests/rustdoc/auto-impl-primitive.rs b/tests/rustdoc/auto/auto-impl-primitive.rs
index 3dab02506ca..3dab02506ca 100644
--- a/tests/rustdoc/auto-impl-primitive.rs
+++ b/tests/rustdoc/auto/auto-impl-primitive.rs
diff --git a/tests/rustdoc/auto-trait-bounds-by-associated-type-50159.rs b/tests/rustdoc/auto/auto-trait-bounds-by-associated-type-50159.rs
index 2803c4da437..2803c4da437 100644
--- a/tests/rustdoc/auto-trait-bounds-by-associated-type-50159.rs
+++ b/tests/rustdoc/auto/auto-trait-bounds-by-associated-type-50159.rs
diff --git a/tests/rustdoc/auto-trait-bounds-inference-variables-54705.rs b/tests/rustdoc/auto/auto-trait-bounds-inference-variables-54705.rs
index ef159fca872..ef159fca872 100644
--- a/tests/rustdoc/auto-trait-bounds-inference-variables-54705.rs
+++ b/tests/rustdoc/auto/auto-trait-bounds-inference-variables-54705.rs
diff --git a/tests/rustdoc/auto-trait-bounds-where-51236.rs b/tests/rustdoc/auto/auto-trait-bounds-where-51236.rs
index c892b6d0abf..c892b6d0abf 100644
--- a/tests/rustdoc/auto-trait-bounds-where-51236.rs
+++ b/tests/rustdoc/auto/auto-trait-bounds-where-51236.rs
diff --git a/tests/rustdoc/auto-trait-negative-impl-55321.rs b/tests/rustdoc/auto/auto-trait-negative-impl-55321.rs
index 147f44da117..147f44da117 100644
--- a/tests/rustdoc/auto-trait-negative-impl-55321.rs
+++ b/tests/rustdoc/auto/auto-trait-negative-impl-55321.rs
diff --git a/tests/rustdoc/auto-trait-not-send.rs b/tests/rustdoc/auto/auto-trait-not-send.rs
index 0a31952f5e1..0a31952f5e1 100644
--- a/tests/rustdoc/auto-trait-not-send.rs
+++ b/tests/rustdoc/auto/auto-trait-not-send.rs
diff --git a/tests/rustdoc/auto-traits.rs b/tests/rustdoc/auto/auto-traits.rs
index dce406ed3e3..dce406ed3e3 100644
--- a/tests/rustdoc/auto-traits.rs
+++ b/tests/rustdoc/auto/auto-traits.rs
diff --git a/tests/rustdoc/auto_aliases.rs b/tests/rustdoc/auto/auto_aliases.rs
index 920aba805cd..920aba805cd 100644
--- a/tests/rustdoc/auto_aliases.rs
+++ b/tests/rustdoc/auto/auto_aliases.rs
diff --git a/tests/rustdoc/auxiliary/auto-traits.rs b/tests/rustdoc/auto/auxiliary/auto-traits.rs
index 84976c73bee..84976c73bee 100644
--- a/tests/rustdoc/auxiliary/auto-traits.rs
+++ b/tests/rustdoc/auto/auxiliary/auto-traits.rs
diff --git a/tests/rustdoc/assoc-consts-underscore.rs b/tests/rustdoc/constant/assoc-consts-underscore.rs
index f48098094db..f48098094db 100644
--- a/tests/rustdoc/assoc-consts-underscore.rs
+++ b/tests/rustdoc/constant/assoc-consts-underscore.rs
diff --git a/tests/rustdoc/assoc-consts-version.rs b/tests/rustdoc/constant/assoc-consts-version.rs
index db4d759acab..db4d759acab 100644
--- a/tests/rustdoc/assoc-consts-version.rs
+++ b/tests/rustdoc/constant/assoc-consts-version.rs
diff --git a/tests/rustdoc/assoc-consts.rs b/tests/rustdoc/constant/assoc-consts.rs
index 247b5b180a8..247b5b180a8 100644
--- a/tests/rustdoc/assoc-consts.rs
+++ b/tests/rustdoc/constant/assoc-consts.rs
diff --git a/tests/rustdoc/associated-consts.rs b/tests/rustdoc/constant/associated-consts.rs
index 2a7269a89be..2a7269a89be 100644
--- a/tests/rustdoc/associated-consts.rs
+++ b/tests/rustdoc/constant/associated-consts.rs
diff --git a/tests/rustdoc/const-display.rs b/tests/rustdoc/constant/const-display.rs
index bc4270c421d..bc4270c421d 100644
--- a/tests/rustdoc/const-display.rs
+++ b/tests/rustdoc/constant/const-display.rs
diff --git a/tests/rustdoc/const-doc.rs b/tests/rustdoc/constant/const-doc.rs
index f33083a267c..f33083a267c 100644
--- a/tests/rustdoc/const-doc.rs
+++ b/tests/rustdoc/constant/const-doc.rs
diff --git a/tests/rustdoc/const-effect-param.rs b/tests/rustdoc/constant/const-effect-param.rs
index cceb0adac30..cceb0adac30 100644
--- a/tests/rustdoc/const-effect-param.rs
+++ b/tests/rustdoc/constant/const-effect-param.rs
diff --git a/tests/rustdoc/const-underscore.rs b/tests/rustdoc/constant/const-underscore.rs
index fafc4b4e25c..fafc4b4e25c 100644
--- a/tests/rustdoc/const-underscore.rs
+++ b/tests/rustdoc/constant/const-underscore.rs
diff --git a/tests/rustdoc/const-value-display.rs b/tests/rustdoc/constant/const-value-display.rs
index 658978a3490..658978a3490 100644
--- a/tests/rustdoc/const-value-display.rs
+++ b/tests/rustdoc/constant/const-value-display.rs
diff --git a/tests/rustdoc/const.rs b/tests/rustdoc/constant/const.rs
index fe6a828505a..fe6a828505a 100644
--- a/tests/rustdoc/const.rs
+++ b/tests/rustdoc/constant/const.rs
diff --git a/tests/rustdoc/document-item-with-associated-const-in-where-clause.rs b/tests/rustdoc/constant/document-item-with-associated-const-in-where-clause.rs
index c9408ef3360..c9408ef3360 100644
--- a/tests/rustdoc/document-item-with-associated-const-in-where-clause.rs
+++ b/tests/rustdoc/constant/document-item-with-associated-const-in-where-clause.rs
diff --git a/tests/rustdoc/generic-const-items.rs b/tests/rustdoc/constant/generic-const-items.rs
index 31c300f2ff1..31c300f2ff1 100644
--- a/tests/rustdoc/generic-const-items.rs
+++ b/tests/rustdoc/constant/generic-const-items.rs
diff --git a/tests/rustdoc/generic_const_exprs.rs b/tests/rustdoc/constant/generic_const_exprs.rs
index 44f7bf5b24c..44f7bf5b24c 100644
--- a/tests/rustdoc/generic_const_exprs.rs
+++ b/tests/rustdoc/constant/generic_const_exprs.rs
diff --git a/tests/rustdoc/glob-shadowing-const.rs b/tests/rustdoc/constant/glob-shadowing-const.rs
index fbc22dbccaa..fbc22dbccaa 100644
--- a/tests/rustdoc/glob-shadowing-const.rs
+++ b/tests/rustdoc/constant/glob-shadowing-const.rs
diff --git a/tests/rustdoc/hide-complex-unevaluated-const-arguments.rs b/tests/rustdoc/constant/hide-complex-unevaluated-const-arguments.rs
index e94c1ea5c61..e94c1ea5c61 100644
--- a/tests/rustdoc/hide-complex-unevaluated-const-arguments.rs
+++ b/tests/rustdoc/constant/hide-complex-unevaluated-const-arguments.rs
diff --git a/tests/rustdoc/hide-complex-unevaluated-consts.rs b/tests/rustdoc/constant/hide-complex-unevaluated-consts.rs
index 61ae8c801dd..61ae8c801dd 100644
--- a/tests/rustdoc/hide-complex-unevaluated-consts.rs
+++ b/tests/rustdoc/constant/hide-complex-unevaluated-consts.rs
diff --git a/tests/rustdoc/ice-associated-const-equality-105952.rs b/tests/rustdoc/constant/ice-associated-const-equality-105952.rs
index 1bcdfac7342..1bcdfac7342 100644
--- a/tests/rustdoc/ice-associated-const-equality-105952.rs
+++ b/tests/rustdoc/constant/ice-associated-const-equality-105952.rs
diff --git a/tests/rustdoc/legacy-const-generic.rs b/tests/rustdoc/constant/legacy-const-generic.rs
index 41df535f3e0..41df535f3e0 100644
--- a/tests/rustdoc/legacy-const-generic.rs
+++ b/tests/rustdoc/constant/legacy-const-generic.rs
diff --git a/tests/rustdoc/link-assoc-const.rs b/tests/rustdoc/constant/link-assoc-const.rs
index 56b82fb2d39..56b82fb2d39 100644
--- a/tests/rustdoc/link-assoc-const.rs
+++ b/tests/rustdoc/constant/link-assoc-const.rs
diff --git a/tests/rustdoc/redirect-const.rs b/tests/rustdoc/constant/redirect-const.rs
index e636a915f30..e636a915f30 100644
--- a/tests/rustdoc/redirect-const.rs
+++ b/tests/rustdoc/constant/redirect-const.rs
diff --git a/tests/rustdoc/rfc-2632-const-trait-impl.rs b/tests/rustdoc/constant/rfc-2632-const-trait-impl.rs
index 8a86e3e5e97..8a86e3e5e97 100644
--- a/tests/rustdoc/rfc-2632-const-trait-impl.rs
+++ b/tests/rustdoc/constant/rfc-2632-const-trait-impl.rs
diff --git a/tests/rustdoc/show-const-contents.rs b/tests/rustdoc/constant/show-const-contents.rs
index 6d2701693ce..6d2701693ce 100644
--- a/tests/rustdoc/show-const-contents.rs
+++ b/tests/rustdoc/constant/show-const-contents.rs
diff --git a/tests/rustdoc/doc-cfg-hide.rs b/tests/rustdoc/doc-cfg/doc-cfg-hide.rs
index ceb1f99fae0..ceb1f99fae0 100644
--- a/tests/rustdoc/doc-cfg-hide.rs
+++ b/tests/rustdoc/doc-cfg/doc-cfg-hide.rs
diff --git a/tests/rustdoc/doc-cfg-implicit-gate.rs b/tests/rustdoc/doc-cfg/doc-cfg-implicit-gate.rs
index b5b8d0f427b..b5b8d0f427b 100644
--- a/tests/rustdoc/doc-cfg-implicit-gate.rs
+++ b/tests/rustdoc/doc-cfg/doc-cfg-implicit-gate.rs
diff --git a/tests/rustdoc/doc-cfg-implicit.rs b/tests/rustdoc/doc-cfg/doc-cfg-implicit.rs
index 69b10867ee3..69b10867ee3 100644
--- a/tests/rustdoc/doc-cfg-implicit.rs
+++ b/tests/rustdoc/doc-cfg/doc-cfg-implicit.rs
diff --git a/tests/rustdoc/doc-cfg-inherit-from-module-79201.rs b/tests/rustdoc/doc-cfg/doc-cfg-inherit-from-module-79201.rs
index 256e3b0015c..256e3b0015c 100644
--- a/tests/rustdoc/doc-cfg-inherit-from-module-79201.rs
+++ b/tests/rustdoc/doc-cfg/doc-cfg-inherit-from-module-79201.rs
diff --git a/tests/rustdoc/doc-cfg-simplification.rs b/tests/rustdoc/doc-cfg/doc-cfg-simplification.rs
index ce70de289c6..ce70de289c6 100644
--- a/tests/rustdoc/doc-cfg-simplification.rs
+++ b/tests/rustdoc/doc-cfg/doc-cfg-simplification.rs
diff --git a/tests/rustdoc/doc-cfg-target-feature.rs b/tests/rustdoc/doc-cfg/doc-cfg-target-feature.rs
index b66e86e36af..b66e86e36af 100644
--- a/tests/rustdoc/doc-cfg-target-feature.rs
+++ b/tests/rustdoc/doc-cfg/doc-cfg-target-feature.rs
diff --git a/tests/rustdoc/doc-cfg-traits.rs b/tests/rustdoc/doc-cfg/doc-cfg-traits.rs
index 1256a7ae2c1..1256a7ae2c1 100644
--- a/tests/rustdoc/doc-cfg-traits.rs
+++ b/tests/rustdoc/doc-cfg/doc-cfg-traits.rs
diff --git a/tests/rustdoc/doc-cfg.rs b/tests/rustdoc/doc-cfg/doc-cfg.rs
index 652c8419b4f..652c8419b4f 100644
--- a/tests/rustdoc/doc-cfg.rs
+++ b/tests/rustdoc/doc-cfg/doc-cfg.rs
diff --git a/tests/rustdoc/auxiliary/enum-variant.rs b/tests/rustdoc/enum/auxiliary/enum-variant.rs
index a0a7fd894f9..a0a7fd894f9 100644
--- a/tests/rustdoc/auxiliary/enum-variant.rs
+++ b/tests/rustdoc/enum/auxiliary/enum-variant.rs
diff --git a/tests/rustdoc/auxiliary/variant-struct.rs b/tests/rustdoc/enum/auxiliary/variant-struct.rs
index 0f3d2e5f1b7..0f3d2e5f1b7 100644
--- a/tests/rustdoc/auxiliary/variant-struct.rs
+++ b/tests/rustdoc/enum/auxiliary/variant-struct.rs
diff --git a/tests/rustdoc/enum-headings.rs b/tests/rustdoc/enum/enum-headings.rs
index 6deabf1cd9a..6deabf1cd9a 100644
--- a/tests/rustdoc/enum-headings.rs
+++ b/tests/rustdoc/enum/enum-headings.rs
diff --git a/tests/rustdoc/enum-non-exhaustive-108925.rs b/tests/rustdoc/enum/enum-non-exhaustive-108925.rs
index ea2462449d2..ea2462449d2 100644
--- a/tests/rustdoc/enum-non-exhaustive-108925.rs
+++ b/tests/rustdoc/enum/enum-non-exhaustive-108925.rs
diff --git a/tests/rustdoc/enum-variant-doc-hidden-field-88600.rs b/tests/rustdoc/enum/enum-variant-doc-hidden-field-88600.rs
index f1d461c66c3..f1d461c66c3 100644
--- a/tests/rustdoc/enum-variant-doc-hidden-field-88600.rs
+++ b/tests/rustdoc/enum/enum-variant-doc-hidden-field-88600.rs
diff --git a/tests/rustdoc/enum-variant-fields-heading.rs b/tests/rustdoc/enum/enum-variant-fields-heading.rs
index e210667d3c0..e210667d3c0 100644
--- a/tests/rustdoc/enum-variant-fields-heading.rs
+++ b/tests/rustdoc/enum/enum-variant-fields-heading.rs
diff --git a/tests/rustdoc/enum-variant-fields-heading.variants.html b/tests/rustdoc/enum/enum-variant-fields-heading.variants.html
index bcb36f7cf86..bcb36f7cf86 100644
--- a/tests/rustdoc/enum-variant-fields-heading.variants.html
+++ b/tests/rustdoc/enum/enum-variant-fields-heading.variants.html
diff --git a/tests/rustdoc/enum-variant-value.rs b/tests/rustdoc/enum/enum-variant-value.rs
index 1670de8a24f..1670de8a24f 100644
--- a/tests/rustdoc/enum-variant-value.rs
+++ b/tests/rustdoc/enum/enum-variant-value.rs
diff --git a/tests/rustdoc/render-enum-variant-structlike-32395.rs b/tests/rustdoc/enum/render-enum-variant-structlike-32395.rs
index d4cefb2911d..d4cefb2911d 100644
--- a/tests/rustdoc/render-enum-variant-structlike-32395.rs
+++ b/tests/rustdoc/enum/render-enum-variant-structlike-32395.rs
diff --git a/tests/rustdoc/strip-enum-variant.no-not-shown.html b/tests/rustdoc/enum/strip-enum-variant.no-not-shown.html
index d7a36cc631a..d7a36cc631a 100644
--- a/tests/rustdoc/strip-enum-variant.no-not-shown.html
+++ b/tests/rustdoc/enum/strip-enum-variant.no-not-shown.html
diff --git a/tests/rustdoc/strip-enum-variant.rs b/tests/rustdoc/enum/strip-enum-variant.rs
index 9874588ef59..9874588ef59 100644
--- a/tests/rustdoc/strip-enum-variant.rs
+++ b/tests/rustdoc/enum/strip-enum-variant.rs
diff --git a/tests/rustdoc/extern/auxiliary/empty.rs b/tests/rustdoc/extern/auxiliary/empty.rs
new file mode 100644
index 00000000000..d11c69f812a
--- /dev/null
+++ b/tests/rustdoc/extern/auxiliary/empty.rs
@@ -0,0 +1 @@
+// intentionally empty
diff --git a/tests/rustdoc/auxiliary/extern-links.rs b/tests/rustdoc/extern/auxiliary/extern-links.rs
index 4a835673a59..4a835673a59 100644
--- a/tests/rustdoc/auxiliary/extern-links.rs
+++ b/tests/rustdoc/extern/auxiliary/extern-links.rs
diff --git a/tests/rustdoc/auxiliary/external-cross-doc.md b/tests/rustdoc/extern/auxiliary/external-cross-doc.md
index d3c85326559..d3c85326559 100644
--- a/tests/rustdoc/auxiliary/external-cross-doc.md
+++ b/tests/rustdoc/extern/auxiliary/external-cross-doc.md
diff --git a/tests/rustdoc/auxiliary/external-cross.rs b/tests/rustdoc/extern/auxiliary/external-cross.rs
index 5de63cdabc6..5de63cdabc6 100644
--- a/tests/rustdoc/auxiliary/external-cross.rs
+++ b/tests/rustdoc/extern/auxiliary/external-cross.rs
diff --git a/tests/rustdoc/auxiliary/external-doc.md b/tests/rustdoc/extern/auxiliary/external-doc.md
index babde0a05ad..babde0a05ad 100644
--- a/tests/rustdoc/auxiliary/external-doc.md
+++ b/tests/rustdoc/extern/auxiliary/external-doc.md
diff --git a/tests/rustdoc/auxiliary/html_root.rs b/tests/rustdoc/extern/auxiliary/html_root.rs
index 4eb0b700f8f..4eb0b700f8f 100644
--- a/tests/rustdoc/auxiliary/html_root.rs
+++ b/tests/rustdoc/extern/auxiliary/html_root.rs
diff --git a/tests/rustdoc/auxiliary/issue-30109-1.rs b/tests/rustdoc/extern/auxiliary/issue-30109-1.rs
index ca05a6a9076..ca05a6a9076 100644
--- a/tests/rustdoc/auxiliary/issue-30109-1.rs
+++ b/tests/rustdoc/extern/auxiliary/issue-30109-1.rs
diff --git a/tests/rustdoc/auxiliary/no_html_root.rs b/tests/rustdoc/extern/auxiliary/no_html_root.rs
index c5c0bc606cd..c5c0bc606cd 100644
--- a/tests/rustdoc/auxiliary/no_html_root.rs
+++ b/tests/rustdoc/extern/auxiliary/no_html_root.rs
diff --git a/tests/rustdoc/auxiliary/panic-item.rs b/tests/rustdoc/extern/auxiliary/panic-item.rs
index ccf784f7284..ccf784f7284 100644
--- a/tests/rustdoc/auxiliary/panic-item.rs
+++ b/tests/rustdoc/extern/auxiliary/panic-item.rs
diff --git a/tests/rustdoc/auxiliary/pub-extern-crate.rs b/tests/rustdoc/extern/auxiliary/pub-extern-crate.rs
index 8c89c8d6c76..8c89c8d6c76 100644
--- a/tests/rustdoc/auxiliary/pub-extern-crate.rs
+++ b/tests/rustdoc/extern/auxiliary/pub-extern-crate.rs
diff --git a/tests/rustdoc/auxiliary/rustdoc-extern-default-method.rs b/tests/rustdoc/extern/auxiliary/rustdoc-extern-default-method.rs
index 12934238a8e..12934238a8e 100644
--- a/tests/rustdoc/auxiliary/rustdoc-extern-default-method.rs
+++ b/tests/rustdoc/extern/auxiliary/rustdoc-extern-default-method.rs
diff --git a/tests/rustdoc/auxiliary/rustdoc-extern-method.rs b/tests/rustdoc/extern/auxiliary/rustdoc-extern-method.rs
index e493048d9da..e493048d9da 100644
--- a/tests/rustdoc/auxiliary/rustdoc-extern-method.rs
+++ b/tests/rustdoc/extern/auxiliary/rustdoc-extern-method.rs
diff --git a/tests/rustdoc/extern/auxiliary/variant-struct.rs b/tests/rustdoc/extern/auxiliary/variant-struct.rs
new file mode 100644
index 00000000000..0f3d2e5f1b7
--- /dev/null
+++ b/tests/rustdoc/extern/auxiliary/variant-struct.rs
@@ -0,0 +1,5 @@
+pub enum Foo {
+    Bar {
+        qux: (),
+    }
+}
diff --git a/tests/rustdoc/extern-default-method.no_href_on_anchor.html b/tests/rustdoc/extern/extern-default-method.no_href_on_anchor.html
index ef14836ccb8..ef14836ccb8 100644
--- a/tests/rustdoc/extern-default-method.no_href_on_anchor.html
+++ b/tests/rustdoc/extern/extern-default-method.no_href_on_anchor.html
diff --git a/tests/rustdoc/extern-default-method.rs b/tests/rustdoc/extern/extern-default-method.rs
index 1af9fab152e..1af9fab152e 100644
--- a/tests/rustdoc/extern-default-method.rs
+++ b/tests/rustdoc/extern/extern-default-method.rs
diff --git a/tests/rustdoc/extern-fn-22038.rs b/tests/rustdoc/extern/extern-fn-22038.rs
index 206c6e181d1..206c6e181d1 100644
--- a/tests/rustdoc/extern-fn-22038.rs
+++ b/tests/rustdoc/extern/extern-fn-22038.rs
diff --git a/tests/rustdoc/extern-html-root-url-precedence.rs b/tests/rustdoc/extern/extern-html-root-url-precedence.rs
index 93775087997..93775087997 100644
--- a/tests/rustdoc/extern-html-root-url-precedence.rs
+++ b/tests/rustdoc/extern/extern-html-root-url-precedence.rs
diff --git a/tests/rustdoc/extern-html-root-url.rs b/tests/rustdoc/extern/extern-html-root-url.rs
index a503e829de4..a503e829de4 100644
--- a/tests/rustdoc/extern-html-root-url.rs
+++ b/tests/rustdoc/extern/extern-html-root-url.rs
diff --git a/tests/rustdoc/extern-links.rs b/tests/rustdoc/extern/extern-links.rs
index d1fee224755..d1fee224755 100644
--- a/tests/rustdoc/extern-links.rs
+++ b/tests/rustdoc/extern/extern-links.rs
diff --git a/tests/rustdoc/extern-method.rs b/tests/rustdoc/extern/extern-method.rs
index c3e042f2da8..c3e042f2da8 100644
--- a/tests/rustdoc/extern-method.rs
+++ b/tests/rustdoc/extern/extern-method.rs
diff --git a/tests/rustdoc/external-cross.rs b/tests/rustdoc/extern/external-cross.rs
index 13646ec38cf..13646ec38cf 100644
--- a/tests/rustdoc/external-cross.rs
+++ b/tests/rustdoc/extern/external-cross.rs
diff --git a/tests/rustdoc/external-doc.rs b/tests/rustdoc/extern/external-doc.rs
index c81aa17ed5a..c81aa17ed5a 100644
--- a/tests/rustdoc/external-doc.rs
+++ b/tests/rustdoc/extern/external-doc.rs
diff --git a/tests/rustdoc/hidden-extern-34025.rs b/tests/rustdoc/extern/hidden-extern-34025.rs
index 2a7b21a874d..2a7b21a874d 100644
--- a/tests/rustdoc/hidden-extern-34025.rs
+++ b/tests/rustdoc/extern/hidden-extern-34025.rs
diff --git a/tests/rustdoc/link-extern-crate-33178.rs b/tests/rustdoc/extern/link-extern-crate-33178.rs
index 94822798af3..94822798af3 100644
--- a/tests/rustdoc/link-extern-crate-33178.rs
+++ b/tests/rustdoc/extern/link-extern-crate-33178.rs
diff --git a/tests/rustdoc/link-extern-crate-item-30109.rs b/tests/rustdoc/extern/link-extern-crate-item-30109.rs
index 544cfa14971..544cfa14971 100644
--- a/tests/rustdoc/link-extern-crate-item-30109.rs
+++ b/tests/rustdoc/extern/link-extern-crate-item-30109.rs
diff --git a/tests/rustdoc/link-extern-crate-title-33178.rs b/tests/rustdoc/extern/link-extern-crate-title-33178.rs
index 39c4fec1cd9..39c4fec1cd9 100644
--- a/tests/rustdoc/link-extern-crate-title-33178.rs
+++ b/tests/rustdoc/extern/link-extern-crate-title-33178.rs
diff --git a/tests/rustdoc/pub-extern-crate.rs b/tests/rustdoc/extern/pub-extern-crate.rs
index 05f70301e33..05f70301e33 100644
--- a/tests/rustdoc/pub-extern-crate.rs
+++ b/tests/rustdoc/extern/pub-extern-crate.rs
diff --git a/tests/rustdoc/unsafe-extern-blocks.rs b/tests/rustdoc/extern/unsafe-extern-blocks.rs
index 9a4e292dc83..9a4e292dc83 100644
--- a/tests/rustdoc/unsafe-extern-blocks.rs
+++ b/tests/rustdoc/extern/unsafe-extern-blocks.rs
diff --git a/tests/rustdoc/unused-extern-crate.rs b/tests/rustdoc/extern/unused-extern-crate.rs
index cdc00fd313a..cdc00fd313a 100644
--- a/tests/rustdoc/unused-extern-crate.rs
+++ b/tests/rustdoc/extern/unused-extern-crate.rs
diff --git a/tests/rustdoc/auxiliary/cross-crate-hidden-impl-parameter.rs b/tests/rustdoc/impl/auxiliary/cross-crate-hidden-impl-parameter.rs
index 15953122280..15953122280 100644
--- a/tests/rustdoc/auxiliary/cross-crate-hidden-impl-parameter.rs
+++ b/tests/rustdoc/impl/auxiliary/cross-crate-hidden-impl-parameter.rs
diff --git a/tests/rustdoc/auxiliary/extern-impl-trait.rs b/tests/rustdoc/impl/auxiliary/extern-impl-trait.rs
index dbd54393098..dbd54393098 100644
--- a/tests/rustdoc/auxiliary/extern-impl-trait.rs
+++ b/tests/rustdoc/impl/auxiliary/extern-impl-trait.rs
diff --git a/tests/rustdoc/auxiliary/incoherent-impl-types.rs b/tests/rustdoc/impl/auxiliary/incoherent-impl-types.rs
index fc51e42e500..fc51e42e500 100644
--- a/tests/rustdoc/auxiliary/incoherent-impl-types.rs
+++ b/tests/rustdoc/impl/auxiliary/incoherent-impl-types.rs
diff --git a/tests/rustdoc/auxiliary/issue-100204-aux.rs b/tests/rustdoc/impl/auxiliary/issue-100204-aux.rs
index df1b59069be..df1b59069be 100644
--- a/tests/rustdoc/auxiliary/issue-100204-aux.rs
+++ b/tests/rustdoc/impl/auxiliary/issue-100204-aux.rs
diff --git a/tests/rustdoc/auxiliary/issue-17476.rs b/tests/rustdoc/impl/auxiliary/issue-17476.rs
index 0a63b893fff..0a63b893fff 100644
--- a/tests/rustdoc/auxiliary/issue-17476.rs
+++ b/tests/rustdoc/impl/auxiliary/issue-17476.rs
diff --git a/tests/rustdoc/auxiliary/issue-21092.rs b/tests/rustdoc/impl/auxiliary/issue-21092.rs
index 49522e0d4b5..49522e0d4b5 100644
--- a/tests/rustdoc/auxiliary/issue-21092.rs
+++ b/tests/rustdoc/impl/auxiliary/issue-21092.rs
diff --git a/tests/rustdoc/auxiliary/issue-22025.rs b/tests/rustdoc/impl/auxiliary/issue-22025.rs
index 6bc55073283..6bc55073283 100644
--- a/tests/rustdoc/auxiliary/issue-22025.rs
+++ b/tests/rustdoc/impl/auxiliary/issue-22025.rs
diff --git a/tests/rustdoc/auxiliary/issue-53689.rs b/tests/rustdoc/impl/auxiliary/issue-53689.rs
index 5003c2c00f4..5003c2c00f4 100644
--- a/tests/rustdoc/auxiliary/issue-53689.rs
+++ b/tests/rustdoc/impl/auxiliary/issue-53689.rs
diff --git a/tests/rustdoc/auxiliary/precise-capturing.rs b/tests/rustdoc/impl/auxiliary/precise-capturing.rs
index 531d4dfdccc..531d4dfdccc 100644
--- a/tests/rustdoc/auxiliary/precise-capturing.rs
+++ b/tests/rustdoc/impl/auxiliary/precise-capturing.rs
diff --git a/tests/rustdoc/auxiliary/real_gimli.rs b/tests/rustdoc/impl/auxiliary/real_gimli.rs
index 871d9b31be9..871d9b31be9 100644
--- a/tests/rustdoc/auxiliary/real_gimli.rs
+++ b/tests/rustdoc/impl/auxiliary/real_gimli.rs
diff --git a/tests/rustdoc/auxiliary/realcore.rs b/tests/rustdoc/impl/auxiliary/realcore.rs
index e0a906df002..e0a906df002 100644
--- a/tests/rustdoc/auxiliary/realcore.rs
+++ b/tests/rustdoc/impl/auxiliary/realcore.rs
diff --git a/tests/rustdoc/auxiliary/rustdoc-default-impl.rs b/tests/rustdoc/impl/auxiliary/rustdoc-default-impl.rs
index 032db3b25e6..032db3b25e6 100644
--- a/tests/rustdoc/auxiliary/rustdoc-default-impl.rs
+++ b/tests/rustdoc/impl/auxiliary/rustdoc-default-impl.rs
diff --git a/tests/rustdoc/auxiliary/rustdoc-impl-parts-crosscrate.rs b/tests/rustdoc/impl/auxiliary/rustdoc-impl-parts-crosscrate.rs
index 135987fc00d..135987fc00d 100644
--- a/tests/rustdoc/auxiliary/rustdoc-impl-parts-crosscrate.rs
+++ b/tests/rustdoc/impl/auxiliary/rustdoc-impl-parts-crosscrate.rs
diff --git a/tests/rustdoc/blanket-impl-29503.rs b/tests/rustdoc/impl/blanket-impl-29503.rs
index f43fe79ca58..f43fe79ca58 100644
--- a/tests/rustdoc/blanket-impl-29503.rs
+++ b/tests/rustdoc/impl/blanket-impl-29503.rs
diff --git a/tests/rustdoc/blanket-impl-78673.rs b/tests/rustdoc/impl/blanket-impl-78673.rs
index 412d4057406..412d4057406 100644
--- a/tests/rustdoc/blanket-impl-78673.rs
+++ b/tests/rustdoc/impl/blanket-impl-78673.rs
diff --git a/tests/rustdoc/cross-crate-hidden-impl-parameter.rs b/tests/rustdoc/impl/cross-crate-hidden-impl-parameter.rs
index ebfe251134a..ebfe251134a 100644
--- a/tests/rustdoc/cross-crate-hidden-impl-parameter.rs
+++ b/tests/rustdoc/impl/cross-crate-hidden-impl-parameter.rs
diff --git a/tests/rustdoc/deduplicate-glob-import-impl-21474.rs b/tests/rustdoc/impl/deduplicate-glob-import-impl-21474.rs
index 5812d414997..5812d414997 100644
--- a/tests/rustdoc/deduplicate-glob-import-impl-21474.rs
+++ b/tests/rustdoc/impl/deduplicate-glob-import-impl-21474.rs
diff --git a/tests/rustdoc/deduplicate-trait-impl-22025.rs b/tests/rustdoc/impl/deduplicate-trait-impl-22025.rs
index 7b1648a56ac..7b1648a56ac 100644
--- a/tests/rustdoc/deduplicate-trait-impl-22025.rs
+++ b/tests/rustdoc/impl/deduplicate-trait-impl-22025.rs
diff --git a/tests/rustdoc/default-impl.rs b/tests/rustdoc/impl/default-impl.rs
index 2ba9c4ab5ad..2ba9c4ab5ad 100644
--- a/tests/rustdoc/default-impl.rs
+++ b/tests/rustdoc/impl/default-impl.rs
diff --git a/tests/rustdoc/deprecated-impls.rs b/tests/rustdoc/impl/deprecated-impls.rs
index a57f26ec7fd..a57f26ec7fd 100644
--- a/tests/rustdoc/deprecated-impls.rs
+++ b/tests/rustdoc/impl/deprecated-impls.rs
diff --git a/tests/rustdoc/doc-hidden-trait-implementors-33069.rs b/tests/rustdoc/impl/doc-hidden-trait-implementors-33069.rs
index d5ee3d09276..d5ee3d09276 100644
--- a/tests/rustdoc/doc-hidden-trait-implementors-33069.rs
+++ b/tests/rustdoc/impl/doc-hidden-trait-implementors-33069.rs
diff --git a/tests/rustdoc/doc_auto_cfg_nested_impl.rs b/tests/rustdoc/impl/doc_auto_cfg_nested_impl.rs
index f85d7b23637..f85d7b23637 100644
--- a/tests/rustdoc/doc_auto_cfg_nested_impl.rs
+++ b/tests/rustdoc/impl/doc_auto_cfg_nested_impl.rs
diff --git a/tests/rustdoc/duplicated_impl.rs b/tests/rustdoc/impl/duplicated_impl.rs
index e7828885cc1..e7828885cc1 100644
--- a/tests/rustdoc/duplicated_impl.rs
+++ b/tests/rustdoc/impl/duplicated_impl.rs
diff --git a/tests/rustdoc/empty-impl-block.rs b/tests/rustdoc/impl/empty-impl-block.rs
index 91fd4a64ef9..91fd4a64ef9 100644
--- a/tests/rustdoc/empty-impl-block.rs
+++ b/tests/rustdoc/impl/empty-impl-block.rs
diff --git a/tests/rustdoc/empty-impls.rs b/tests/rustdoc/impl/empty-impls.rs
index 912a8d3d913..912a8d3d913 100644
--- a/tests/rustdoc/empty-impls.rs
+++ b/tests/rustdoc/impl/empty-impls.rs
diff --git a/tests/rustdoc/extern-impl-trait.rs b/tests/rustdoc/impl/extern-impl-trait.rs
index 65b7a8cef49..65b7a8cef49 100644
--- a/tests/rustdoc/extern-impl-trait.rs
+++ b/tests/rustdoc/impl/extern-impl-trait.rs
diff --git a/tests/rustdoc/extern-impl.rs b/tests/rustdoc/impl/extern-impl.rs
index 4fc31393988..4fc31393988 100644
--- a/tests/rustdoc/extern-impl.rs
+++ b/tests/rustdoc/impl/extern-impl.rs
diff --git a/tests/rustdoc/foreign-implementors-js-43701.rs b/tests/rustdoc/impl/foreign-implementors-js-43701.rs
index 03147da02c2..03147da02c2 100644
--- a/tests/rustdoc/foreign-implementors-js-43701.rs
+++ b/tests/rustdoc/impl/foreign-implementors-js-43701.rs
diff --git a/tests/rustdoc/generic-impl.rs b/tests/rustdoc/impl/generic-impl.rs
index 9d15d0fff77..9d15d0fff77 100644
--- a/tests/rustdoc/generic-impl.rs
+++ b/tests/rustdoc/impl/generic-impl.rs
diff --git a/tests/rustdoc/hidden-implementors-90781.rs b/tests/rustdoc/impl/hidden-implementors-90781.rs
index 960a85b91f0..960a85b91f0 100644
--- a/tests/rustdoc/hidden-implementors-90781.rs
+++ b/tests/rustdoc/impl/hidden-implementors-90781.rs
diff --git a/tests/rustdoc/hidden-impls.rs b/tests/rustdoc/impl/hidden-impls.rs
index 73deeed9e90..73deeed9e90 100644
--- a/tests/rustdoc/hidden-impls.rs
+++ b/tests/rustdoc/impl/hidden-impls.rs
diff --git a/tests/rustdoc/hidden-trait-struct-impls.rs b/tests/rustdoc/impl/hidden-trait-struct-impls.rs
index 1010cb45960..1010cb45960 100644
--- a/tests/rustdoc/hidden-trait-struct-impls.rs
+++ b/tests/rustdoc/impl/hidden-trait-struct-impls.rs
diff --git a/tests/rustdoc/hide-mut-methods-if-no-derefmut-impl-74083.rs b/tests/rustdoc/impl/hide-mut-methods-if-no-derefmut-impl-74083.rs
index 995121a8455..995121a8455 100644
--- a/tests/rustdoc/hide-mut-methods-if-no-derefmut-impl-74083.rs
+++ b/tests/rustdoc/impl/hide-mut-methods-if-no-derefmut-impl-74083.rs
diff --git a/tests/rustdoc/impl-alias-substituted.rs b/tests/rustdoc/impl/impl-alias-substituted.rs
index 02efcd88df8..02efcd88df8 100644
--- a/tests/rustdoc/impl-alias-substituted.rs
+++ b/tests/rustdoc/impl/impl-alias-substituted.rs
diff --git a/tests/rustdoc/impl-assoc-type-21092.rs b/tests/rustdoc/impl/impl-assoc-type-21092.rs
index c350456195d..c350456195d 100644
--- a/tests/rustdoc/impl-assoc-type-21092.rs
+++ b/tests/rustdoc/impl/impl-assoc-type-21092.rs
diff --git a/tests/rustdoc/impl-associated-items-order.rs b/tests/rustdoc/impl/impl-associated-items-order.rs
index 759e0f0b400..759e0f0b400 100644
--- a/tests/rustdoc/impl-associated-items-order.rs
+++ b/tests/rustdoc/impl/impl-associated-items-order.rs
diff --git a/tests/rustdoc/impl-associated-items-sidebar.rs b/tests/rustdoc/impl/impl-associated-items-sidebar.rs
index d393a577e50..d393a577e50 100644
--- a/tests/rustdoc/impl-associated-items-sidebar.rs
+++ b/tests/rustdoc/impl/impl-associated-items-sidebar.rs
diff --git a/tests/rustdoc/impl-blanket-53689.rs b/tests/rustdoc/impl/impl-blanket-53689.rs
index 4b1697349f2..4b1697349f2 100644
--- a/tests/rustdoc/impl-blanket-53689.rs
+++ b/tests/rustdoc/impl/impl-blanket-53689.rs
diff --git a/tests/rustdoc/impl-box.rs b/tests/rustdoc/impl/impl-box.rs
index 1fb63e21685..1fb63e21685 100644
--- a/tests/rustdoc/impl-box.rs
+++ b/tests/rustdoc/impl/impl-box.rs
diff --git a/tests/rustdoc/impl-disambiguation.rs b/tests/rustdoc/impl/impl-disambiguation.rs
index cfd5013964b..cfd5013964b 100644
--- a/tests/rustdoc/impl-disambiguation.rs
+++ b/tests/rustdoc/impl/impl-disambiguation.rs
diff --git a/tests/rustdoc/impl-everywhere.rs b/tests/rustdoc/impl/impl-everywhere.rs
index d1a4e901bad..d1a4e901bad 100644
--- a/tests/rustdoc/impl-everywhere.rs
+++ b/tests/rustdoc/impl/impl-everywhere.rs
diff --git a/tests/rustdoc/impl-in-const-block.rs b/tests/rustdoc/impl/impl-in-const-block.rs
index 3f757fa9566..3f757fa9566 100644
--- a/tests/rustdoc/impl-in-const-block.rs
+++ b/tests/rustdoc/impl/impl-in-const-block.rs
diff --git a/tests/rustdoc/impl-on-ty-alias-issue-119015.rs b/tests/rustdoc/impl/impl-on-ty-alias-issue-119015.rs
index a514bc35bfc..a514bc35bfc 100644
--- a/tests/rustdoc/impl-on-ty-alias-issue-119015.rs
+++ b/tests/rustdoc/impl/impl-on-ty-alias-issue-119015.rs
diff --git a/tests/rustdoc/impl-parts-crosscrate.rs b/tests/rustdoc/impl/impl-parts-crosscrate.rs
index 631c8bb3eb3..631c8bb3eb3 100644
--- a/tests/rustdoc/impl-parts-crosscrate.rs
+++ b/tests/rustdoc/impl/impl-parts-crosscrate.rs
diff --git a/tests/rustdoc/impl-parts.rs b/tests/rustdoc/impl/impl-parts.rs
index 4f281bfd63c..4f281bfd63c 100644
--- a/tests/rustdoc/impl-parts.rs
+++ b/tests/rustdoc/impl/impl-parts.rs
diff --git a/tests/rustdoc/impl-ref-20175.rs b/tests/rustdoc/impl/impl-ref-20175.rs
index b1a9286fd41..b1a9286fd41 100644
--- a/tests/rustdoc/impl-ref-20175.rs
+++ b/tests/rustdoc/impl/impl-ref-20175.rs
diff --git a/tests/rustdoc/impl-trait-43869.rs b/tests/rustdoc/impl/impl-trait-43869.rs
index 89176f59ca1..89176f59ca1 100644
--- a/tests/rustdoc/impl-trait-43869.rs
+++ b/tests/rustdoc/impl/impl-trait-43869.rs
diff --git a/tests/rustdoc/impl-trait-alias.rs b/tests/rustdoc/impl/impl-trait-alias.rs
index f7ecfffbf46..f7ecfffbf46 100644
--- a/tests/rustdoc/impl-trait-alias.rs
+++ b/tests/rustdoc/impl/impl-trait-alias.rs
diff --git a/tests/rustdoc/impl-trait-precise-capturing.rs b/tests/rustdoc/impl/impl-trait-precise-capturing.rs
index 3ec8c578013..3ec8c578013 100644
--- a/tests/rustdoc/impl-trait-precise-capturing.rs
+++ b/tests/rustdoc/impl/impl-trait-precise-capturing.rs
diff --git a/tests/rustdoc/impl-type-parameter-33592.rs b/tests/rustdoc/impl/impl-type-parameter-33592.rs
index ac5df460925..ac5df460925 100644
--- a/tests/rustdoc/impl-type-parameter-33592.rs
+++ b/tests/rustdoc/impl/impl-type-parameter-33592.rs
diff --git a/tests/rustdoc/implementor-stable-version.rs b/tests/rustdoc/impl/implementor-stable-version.rs
index cd4fa93f803..cd4fa93f803 100644
--- a/tests/rustdoc/implementor-stable-version.rs
+++ b/tests/rustdoc/impl/implementor-stable-version.rs
diff --git a/tests/rustdoc/implementors-unstable-75588.rs b/tests/rustdoc/impl/implementors-unstable-75588.rs
index 44a785c4ad9..44a785c4ad9 100644
--- a/tests/rustdoc/implementors-unstable-75588.rs
+++ b/tests/rustdoc/impl/implementors-unstable-75588.rs
diff --git a/tests/rustdoc/inline-impl-through-glob-import-100204.rs b/tests/rustdoc/impl/inline-impl-through-glob-import-100204.rs
index ba6ed427871..ba6ed427871 100644
--- a/tests/rustdoc/inline-impl-through-glob-import-100204.rs
+++ b/tests/rustdoc/impl/inline-impl-through-glob-import-100204.rs
diff --git a/tests/rustdoc/manual_impl.rs b/tests/rustdoc/impl/manual_impl.rs
index 281262bb40a..281262bb40a 100644
--- a/tests/rustdoc/manual_impl.rs
+++ b/tests/rustdoc/impl/manual_impl.rs
diff --git a/tests/rustdoc/method-link-foreign-trait-impl-17476.rs b/tests/rustdoc/impl/method-link-foreign-trait-impl-17476.rs
index cda828d3967..cda828d3967 100644
--- a/tests/rustdoc/method-link-foreign-trait-impl-17476.rs
+++ b/tests/rustdoc/impl/method-link-foreign-trait-impl-17476.rs
diff --git a/tests/rustdoc/module-impls.rs b/tests/rustdoc/impl/module-impls.rs
index b66721ecb13..b66721ecb13 100644
--- a/tests/rustdoc/module-impls.rs
+++ b/tests/rustdoc/impl/module-impls.rs
diff --git a/tests/rustdoc/must_implement_one_of.rs b/tests/rustdoc/impl/must_implement_one_of.rs
index ab965bab356..ab965bab356 100644
--- a/tests/rustdoc/must_implement_one_of.rs
+++ b/tests/rustdoc/impl/must_implement_one_of.rs
diff --git a/tests/rustdoc/negative-impl-no-items.rs b/tests/rustdoc/impl/negative-impl-no-items.rs
index c628e542033..c628e542033 100644
--- a/tests/rustdoc/negative-impl-no-items.rs
+++ b/tests/rustdoc/impl/negative-impl-no-items.rs
diff --git a/tests/rustdoc/negative-impl-sidebar.rs b/tests/rustdoc/impl/negative-impl-sidebar.rs
index 1742dce1945..1742dce1945 100644
--- a/tests/rustdoc/negative-impl-sidebar.rs
+++ b/tests/rustdoc/impl/negative-impl-sidebar.rs
diff --git a/tests/rustdoc/negative-impl.rs b/tests/rustdoc/impl/negative-impl.rs
index f057a749b72..f057a749b72 100644
--- a/tests/rustdoc/negative-impl.rs
+++ b/tests/rustdoc/impl/negative-impl.rs
diff --git a/tests/rustdoc/return-impl-trait.rs b/tests/rustdoc/impl/return-impl-trait.rs
index 175867d2204..175867d2204 100644
--- a/tests/rustdoc/return-impl-trait.rs
+++ b/tests/rustdoc/impl/return-impl-trait.rs
diff --git a/tests/rustdoc/rustc-incoherent-impls.rs b/tests/rustdoc/impl/rustc-incoherent-impls.rs
index 81a7025906b..81a7025906b 100644
--- a/tests/rustdoc/rustc-incoherent-impls.rs
+++ b/tests/rustdoc/impl/rustc-incoherent-impls.rs
diff --git a/tests/rustdoc/same-crate-hidden-impl-parameter.rs b/tests/rustdoc/impl/same-crate-hidden-impl-parameter.rs
index b0beb1bdfa0..b0beb1bdfa0 100644
--- a/tests/rustdoc/same-crate-hidden-impl-parameter.rs
+++ b/tests/rustdoc/impl/same-crate-hidden-impl-parameter.rs
diff --git a/tests/rustdoc/sidebar-trait-impl-disambiguate-78701.rs b/tests/rustdoc/impl/sidebar-trait-impl-disambiguate-78701.rs
index b1bf029cf84..b1bf029cf84 100644
--- a/tests/rustdoc/sidebar-trait-impl-disambiguate-78701.rs
+++ b/tests/rustdoc/impl/sidebar-trait-impl-disambiguate-78701.rs
diff --git a/tests/rustdoc/struct-implementations-title.rs b/tests/rustdoc/impl/struct-implementations-title.rs
index ca5b5c0ee20..ca5b5c0ee20 100644
--- a/tests/rustdoc/struct-implementations-title.rs
+++ b/tests/rustdoc/impl/struct-implementations-title.rs
diff --git a/tests/rustdoc/trait-impl.rs b/tests/rustdoc/impl/trait-impl.rs
index c65eecc4edf..c65eecc4edf 100644
--- a/tests/rustdoc/trait-impl.rs
+++ b/tests/rustdoc/impl/trait-impl.rs
diff --git a/tests/rustdoc/trait-implementations-duplicate-self-45584.rs b/tests/rustdoc/impl/trait-implementations-duplicate-self-45584.rs
index 8eb6d007525..8eb6d007525 100644
--- a/tests/rustdoc/trait-implementations-duplicate-self-45584.rs
+++ b/tests/rustdoc/impl/trait-implementations-duplicate-self-45584.rs
diff --git a/tests/rustdoc/underscore-type-in-trait-impl-96381.rs b/tests/rustdoc/impl/underscore-type-in-trait-impl-96381.rs
index 6d6e5e0a839..6d6e5e0a839 100644
--- a/tests/rustdoc/underscore-type-in-trait-impl-96381.rs
+++ b/tests/rustdoc/impl/underscore-type-in-trait-impl-96381.rs
diff --git a/tests/rustdoc/universal-impl-trait.rs b/tests/rustdoc/impl/universal-impl-trait.rs
index b78d69c0690..b78d69c0690 100644
--- a/tests/rustdoc/universal-impl-trait.rs
+++ b/tests/rustdoc/impl/universal-impl-trait.rs
diff --git a/tests/rustdoc/unneeded-trait-implementations-title.rs b/tests/rustdoc/impl/unneeded-trait-implementations-title.rs
index f7a97dfaaef..f7a97dfaaef 100644
--- a/tests/rustdoc/unneeded-trait-implementations-title.rs
+++ b/tests/rustdoc/impl/unneeded-trait-implementations-title.rs
diff --git a/tests/rustdoc/ice-intra-doc-links-107995.rs b/tests/rustdoc/intra-doc/ice-intra-doc-links-107995.rs
index 57669909aa1..57669909aa1 100644
--- a/tests/rustdoc/ice-intra-doc-links-107995.rs
+++ b/tests/rustdoc/intra-doc/ice-intra-doc-links-107995.rs
diff --git a/tests/rustdoc/intra-doc-link-method-trait-impl-72340.rs b/tests/rustdoc/intra-doc/intra-doc-link-method-trait-impl-72340.rs
index 0cf46bb3f95..0cf46bb3f95 100644
--- a/tests/rustdoc/intra-doc-link-method-trait-impl-72340.rs
+++ b/tests/rustdoc/intra-doc/intra-doc-link-method-trait-impl-72340.rs
diff --git a/tests/rustdoc/auxiliary/jump-to-def-macro.rs b/tests/rustdoc/jump-to-def/auxiliary/jump-to-def-macro.rs
index f442b9461e8..f442b9461e8 100644
--- a/tests/rustdoc/auxiliary/jump-to-def-macro.rs
+++ b/tests/rustdoc/jump-to-def/auxiliary/jump-to-def-macro.rs
diff --git a/tests/rustdoc/jump-to-def-doc-links-calls.rs b/tests/rustdoc/jump-to-def/jump-to-def-doc-links-calls.rs
index 61856978773..61856978773 100644
--- a/tests/rustdoc/jump-to-def-doc-links-calls.rs
+++ b/tests/rustdoc/jump-to-def/jump-to-def-doc-links-calls.rs
diff --git a/tests/rustdoc/jump-to-def-doc-links.rs b/tests/rustdoc/jump-to-def/jump-to-def-doc-links.rs
index 2abb52e0a00..2abb52e0a00 100644
--- a/tests/rustdoc/jump-to-def-doc-links.rs
+++ b/tests/rustdoc/jump-to-def/jump-to-def-doc-links.rs
diff --git a/tests/rustdoc/jump-to-def-macro.rs b/tests/rustdoc/jump-to-def/jump-to-def-macro.rs
index 680477937c6..680477937c6 100644
--- a/tests/rustdoc/jump-to-def-macro.rs
+++ b/tests/rustdoc/jump-to-def/jump-to-def-macro.rs
diff --git a/tests/rustdoc/jump-to-def-pats.rs b/tests/rustdoc/jump-to-def/jump-to-def-pats.rs
index 147902b44cf..147902b44cf 100644
--- a/tests/rustdoc/jump-to-def-pats.rs
+++ b/tests/rustdoc/jump-to-def/jump-to-def-pats.rs
diff --git a/tests/rustdoc/jump-to-def-prelude-types.rs b/tests/rustdoc/jump-to-def/jump-to-def-prelude-types.rs
index 43617b1bc9d..43617b1bc9d 100644
--- a/tests/rustdoc/jump-to-def-prelude-types.rs
+++ b/tests/rustdoc/jump-to-def/jump-to-def-prelude-types.rs
diff --git a/tests/rustdoc/jump-to-non-local-method.rs b/tests/rustdoc/jump-to-def/jump-to-non-local-method.rs
index e2f530425f0..e2f530425f0 100644
--- a/tests/rustdoc/jump-to-non-local-method.rs
+++ b/tests/rustdoc/jump-to-def/jump-to-non-local-method.rs
diff --git a/tests/rustdoc/auxiliary/external-macro-src.rs b/tests/rustdoc/macro/auxiliary/external-macro-src.rs
index 79df5dc98eb..79df5dc98eb 100644
--- a/tests/rustdoc/auxiliary/external-macro-src.rs
+++ b/tests/rustdoc/macro/auxiliary/external-macro-src.rs
diff --git a/tests/rustdoc/macro/auxiliary/issue-99221-aux.rs b/tests/rustdoc/macro/auxiliary/issue-99221-aux.rs
new file mode 100644
index 00000000000..e061e42b29d
--- /dev/null
+++ b/tests/rustdoc/macro/auxiliary/issue-99221-aux.rs
@@ -0,0 +1,20 @@
+pub struct Option;
+impl Option {
+    pub fn unwrap(self) {}
+}
+
+mod macros {
+    use crate::Option;
+    /// [`Option::unwrap`]
+    #[macro_export]
+    macro_rules! print {
+        () => ()
+    }
+}
+
+mod structs {
+    use crate::Option;
+    /// [`Option::unwrap`]
+    pub struct Print;
+}
+pub use structs::Print;
diff --git a/tests/rustdoc/auxiliary/macro_pub_in_module.rs b/tests/rustdoc/macro/auxiliary/macro_pub_in_module.rs
index 81efa1db536..81efa1db536 100644
--- a/tests/rustdoc/auxiliary/macro_pub_in_module.rs
+++ b/tests/rustdoc/macro/auxiliary/macro_pub_in_module.rs
diff --git a/tests/rustdoc/auxiliary/pub-use-extern-macros.rs b/tests/rustdoc/macro/auxiliary/pub-use-extern-macros.rs
index 7934e07339a..7934e07339a 100644
--- a/tests/rustdoc/auxiliary/pub-use-extern-macros.rs
+++ b/tests/rustdoc/macro/auxiliary/pub-use-extern-macros.rs
diff --git a/tests/rustdoc/compiler-derive-proc-macro.rs b/tests/rustdoc/macro/compiler-derive-proc-macro.rs
index e8dc5d7c6b7..e8dc5d7c6b7 100644
--- a/tests/rustdoc/compiler-derive-proc-macro.rs
+++ b/tests/rustdoc/macro/compiler-derive-proc-macro.rs
diff --git a/tests/rustdoc/const-rendering-macros-33302.rs b/tests/rustdoc/macro/const-rendering-macros-33302.rs
index 9fd45df08be..9fd45df08be 100644
--- a/tests/rustdoc/const-rendering-macros-33302.rs
+++ b/tests/rustdoc/macro/const-rendering-macros-33302.rs
diff --git a/tests/rustdoc/decl_macro.rs b/tests/rustdoc/macro/decl_macro.rs
index 040859baffb..040859baffb 100644
--- a/tests/rustdoc/decl_macro.rs
+++ b/tests/rustdoc/macro/decl_macro.rs
diff --git a/tests/rustdoc/decl_macro_priv.rs b/tests/rustdoc/macro/decl_macro_priv.rs
index d87c8d22f2d..d87c8d22f2d 100644
--- a/tests/rustdoc/decl_macro_priv.rs
+++ b/tests/rustdoc/macro/decl_macro_priv.rs
diff --git a/tests/rustdoc/doc-proc-macro.rs b/tests/rustdoc/macro/doc-proc-macro.rs
index 19172ffa41d..19172ffa41d 100644
--- a/tests/rustdoc/doc-proc-macro.rs
+++ b/tests/rustdoc/macro/doc-proc-macro.rs
diff --git a/tests/rustdoc/external-macro-src.rs b/tests/rustdoc/macro/external-macro-src.rs
index 998687d93bd..998687d93bd 100644
--- a/tests/rustdoc/external-macro-src.rs
+++ b/tests/rustdoc/macro/external-macro-src.rs
diff --git a/tests/rustdoc/macro-const-display-115295.rs b/tests/rustdoc/macro/macro-const-display-115295.rs
index 445b47e0b24..445b47e0b24 100644
--- a/tests/rustdoc/macro-const-display-115295.rs
+++ b/tests/rustdoc/macro/macro-const-display-115295.rs
diff --git a/tests/rustdoc/macro-doc-comment-23812.rs b/tests/rustdoc/macro/macro-doc-comment-23812.rs
index 03fda4a25b9..03fda4a25b9 100644
--- a/tests/rustdoc/macro-doc-comment-23812.rs
+++ b/tests/rustdoc/macro/macro-doc-comment-23812.rs
diff --git a/tests/rustdoc/macro-export-crate-root-108231.rs b/tests/rustdoc/macro/macro-export-crate-root-108231.rs
index 0d3ad1b0571..0d3ad1b0571 100644
--- a/tests/rustdoc/macro-export-crate-root-108231.rs
+++ b/tests/rustdoc/macro/macro-export-crate-root-108231.rs
diff --git a/tests/rustdoc/macro-generated-macro.macro_linebreak_pre.html b/tests/rustdoc/macro/macro-generated-macro.macro_linebreak_pre.html
index ce5d3a8461b..ce5d3a8461b 100644
--- a/tests/rustdoc/macro-generated-macro.macro_linebreak_pre.html
+++ b/tests/rustdoc/macro/macro-generated-macro.macro_linebreak_pre.html
diff --git a/tests/rustdoc/macro-generated-macro.macro_morestuff_pre.html b/tests/rustdoc/macro/macro-generated-macro.macro_morestuff_pre.html
index 28f15522a82..28f15522a82 100644
--- a/tests/rustdoc/macro-generated-macro.macro_morestuff_pre.html
+++ b/tests/rustdoc/macro/macro-generated-macro.macro_morestuff_pre.html
diff --git a/tests/rustdoc/macro-generated-macro.rs b/tests/rustdoc/macro/macro-generated-macro.rs
index e77d0cf89e7..e77d0cf89e7 100644
--- a/tests/rustdoc/macro-generated-macro.rs
+++ b/tests/rustdoc/macro/macro-generated-macro.rs
diff --git a/tests/rustdoc/macro-higher-kinded-function.rs b/tests/rustdoc/macro/macro-higher-kinded-function.rs
index 738ea8fb3f1..738ea8fb3f1 100644
--- a/tests/rustdoc/macro-higher-kinded-function.rs
+++ b/tests/rustdoc/macro/macro-higher-kinded-function.rs
diff --git a/tests/rustdoc/macro-ice-16019.rs b/tests/rustdoc/macro/macro-ice-16019.rs
index d0f82e0a314..d0f82e0a314 100644
--- a/tests/rustdoc/macro-ice-16019.rs
+++ b/tests/rustdoc/macro/macro-ice-16019.rs
diff --git a/tests/rustdoc/macro-in-async-block.rs b/tests/rustdoc/macro/macro-in-async-block.rs
index 43822fb9c52..43822fb9c52 100644
--- a/tests/rustdoc/macro-in-async-block.rs
+++ b/tests/rustdoc/macro/macro-in-async-block.rs
diff --git a/tests/rustdoc/macro-in-closure.rs b/tests/rustdoc/macro/macro-in-closure.rs
index b4411d927e2..b4411d927e2 100644
--- a/tests/rustdoc/macro-in-closure.rs
+++ b/tests/rustdoc/macro/macro-in-closure.rs
diff --git a/tests/rustdoc/macro-indirect-use.rs b/tests/rustdoc/macro/macro-indirect-use.rs
index e410e96ae6a..e410e96ae6a 100644
--- a/tests/rustdoc/macro-indirect-use.rs
+++ b/tests/rustdoc/macro/macro-indirect-use.rs
diff --git a/tests/rustdoc/macro_pub_in_module.rs b/tests/rustdoc/macro/macro_pub_in_module.rs
index 2dce73c2cf2..2dce73c2cf2 100644
--- a/tests/rustdoc/macro_pub_in_module.rs
+++ b/tests/rustdoc/macro/macro_pub_in_module.rs
diff --git a/tests/rustdoc/macro_rules-matchers.rs b/tests/rustdoc/macro/macro_rules-matchers.rs
index 2c9fb50539a..2c9fb50539a 100644
--- a/tests/rustdoc/macro_rules-matchers.rs
+++ b/tests/rustdoc/macro/macro_rules-matchers.rs
diff --git a/tests/rustdoc/macros.rs b/tests/rustdoc/macro/macros.rs
index d08babc25f8..d08babc25f8 100644
--- a/tests/rustdoc/macros.rs
+++ b/tests/rustdoc/macro/macros.rs
diff --git a/tests/rustdoc/multiple-macro-rules-w-same-name-99221.rs b/tests/rustdoc/macro/multiple-macro-rules-w-same-name-99221.rs
index 4a1798a8496..4a1798a8496 100644
--- a/tests/rustdoc/multiple-macro-rules-w-same-name-99221.rs
+++ b/tests/rustdoc/macro/multiple-macro-rules-w-same-name-99221.rs
diff --git a/tests/rustdoc/multiple-macro-rules-w-same-name-submodule-99221.rs b/tests/rustdoc/macro/multiple-macro-rules-w-same-name-submodule-99221.rs
index bf59788073e..bf59788073e 100644
--- a/tests/rustdoc/multiple-macro-rules-w-same-name-submodule-99221.rs
+++ b/tests/rustdoc/macro/multiple-macro-rules-w-same-name-submodule-99221.rs
diff --git a/tests/rustdoc/proc-macro.rs b/tests/rustdoc/macro/proc-macro.rs
index a821f68ab93..a821f68ab93 100644
--- a/tests/rustdoc/proc-macro.rs
+++ b/tests/rustdoc/macro/proc-macro.rs
diff --git a/tests/rustdoc/pub-use-extern-macros.rs b/tests/rustdoc/macro/pub-use-extern-macros.rs
index 2316e620343..2316e620343 100644
--- a/tests/rustdoc/pub-use-extern-macros.rs
+++ b/tests/rustdoc/macro/pub-use-extern-macros.rs
diff --git a/tests/rustdoc/rustc-macro-crate.rs b/tests/rustdoc/macro/rustc-macro-crate.rs
index f0443364bb2..f0443364bb2 100644
--- a/tests/rustdoc/rustc-macro-crate.rs
+++ b/tests/rustdoc/macro/rustc-macro-crate.rs
diff --git a/tests/rustdoc/auxiliary/issue-15318.rs b/tests/rustdoc/primitive/auxiliary/issue-15318.rs
index d3dc89113fc..d3dc89113fc 100644
--- a/tests/rustdoc/auxiliary/issue-15318.rs
+++ b/tests/rustdoc/primitive/auxiliary/issue-15318.rs
diff --git a/tests/rustdoc/auxiliary/primitive-doc.rs b/tests/rustdoc/primitive/auxiliary/primitive-doc.rs
index 859716c38e4..859716c38e4 100644
--- a/tests/rustdoc/auxiliary/primitive-doc.rs
+++ b/tests/rustdoc/primitive/auxiliary/primitive-doc.rs
diff --git a/tests/rustdoc/cross-crate-primitive-doc.rs b/tests/rustdoc/primitive/cross-crate-primitive-doc.rs
index 0ffde5b0f2d..0ffde5b0f2d 100644
--- a/tests/rustdoc/cross-crate-primitive-doc.rs
+++ b/tests/rustdoc/primitive/cross-crate-primitive-doc.rs
diff --git a/tests/rustdoc/no_std-primitive.rs b/tests/rustdoc/primitive/no_std-primitive.rs
index 78076a601de..78076a601de 100644
--- a/tests/rustdoc/no_std-primitive.rs
+++ b/tests/rustdoc/primitive/no_std-primitive.rs
diff --git a/tests/rustdoc/primitive-link.rs b/tests/rustdoc/primitive/primitive-link.rs
index 3fe9cdc3ca7..3fe9cdc3ca7 100644
--- a/tests/rustdoc/primitive-link.rs
+++ b/tests/rustdoc/primitive/primitive-link.rs
diff --git a/tests/rustdoc/primitive-raw-pointer-dox-15318-3.rs b/tests/rustdoc/primitive/primitive-raw-pointer-dox-15318-3.rs
index 5520abf2925..5520abf2925 100644
--- a/tests/rustdoc/primitive-raw-pointer-dox-15318-3.rs
+++ b/tests/rustdoc/primitive/primitive-raw-pointer-dox-15318-3.rs
diff --git a/tests/rustdoc/primitive-raw-pointer-link-15318.rs b/tests/rustdoc/primitive/primitive-raw-pointer-link-15318.rs
index a6f6f67dc84..a6f6f67dc84 100644
--- a/tests/rustdoc/primitive-raw-pointer-link-15318.rs
+++ b/tests/rustdoc/primitive/primitive-raw-pointer-link-15318.rs
diff --git a/tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs b/tests/rustdoc/primitive/primitive-raw-pointer-link-no-inlined-15318-2.rs
index 16b007e8bbd..16b007e8bbd 100644
--- a/tests/rustdoc/primitive-raw-pointer-link-no-inlined-15318-2.rs
+++ b/tests/rustdoc/primitive/primitive-raw-pointer-link-no-inlined-15318-2.rs
diff --git a/tests/rustdoc/primitive-reference.rs b/tests/rustdoc/primitive/primitive-reference.rs
index bd6b2a32f75..bd6b2a32f75 100644
--- a/tests/rustdoc/primitive-reference.rs
+++ b/tests/rustdoc/primitive/primitive-reference.rs
diff --git a/tests/rustdoc/primitive-slice-auto-trait.rs b/tests/rustdoc/primitive/primitive-slice-auto-trait.rs
index 647c1cca948..647c1cca948 100644
--- a/tests/rustdoc/primitive-slice-auto-trait.rs
+++ b/tests/rustdoc/primitive/primitive-slice-auto-trait.rs
diff --git a/tests/rustdoc/primitive-tuple-auto-trait.rs b/tests/rustdoc/primitive/primitive-tuple-auto-trait.rs
index 51300bd6b2f..51300bd6b2f 100644
--- a/tests/rustdoc/primitive-tuple-auto-trait.rs
+++ b/tests/rustdoc/primitive/primitive-tuple-auto-trait.rs
diff --git a/tests/rustdoc/primitive-tuple-variadic.rs b/tests/rustdoc/primitive/primitive-tuple-variadic.rs
index bab5eaae9a2..bab5eaae9a2 100644
--- a/tests/rustdoc/primitive-tuple-variadic.rs
+++ b/tests/rustdoc/primitive/primitive-tuple-variadic.rs
diff --git a/tests/rustdoc/primitive-unit-auto-trait.rs b/tests/rustdoc/primitive/primitive-unit-auto-trait.rs
index 7dada1f9832..7dada1f9832 100644
--- a/tests/rustdoc/primitive-unit-auto-trait.rs
+++ b/tests/rustdoc/primitive/primitive-unit-auto-trait.rs
diff --git a/tests/rustdoc/search-index-primitive-inherent-method-23511.rs b/tests/rustdoc/primitive/search-index-primitive-inherent-method-23511.rs
index 6054d8f12f5..6054d8f12f5 100644
--- a/tests/rustdoc/search-index-primitive-inherent-method-23511.rs
+++ b/tests/rustdoc/primitive/search-index-primitive-inherent-method-23511.rs
diff --git a/tests/rustdoc/doc-hidden-private-67851-both.rs b/tests/rustdoc/private/doc-hidden-private-67851-both.rs
index 2e2190d8755..2e2190d8755 100644
--- a/tests/rustdoc/doc-hidden-private-67851-both.rs
+++ b/tests/rustdoc/private/doc-hidden-private-67851-both.rs
diff --git a/tests/rustdoc/doc-hidden-private-67851-hidden.rs b/tests/rustdoc/private/doc-hidden-private-67851-hidden.rs
index a811a04a668..a811a04a668 100644
--- a/tests/rustdoc/doc-hidden-private-67851-hidden.rs
+++ b/tests/rustdoc/private/doc-hidden-private-67851-hidden.rs
diff --git a/tests/rustdoc/doc-hidden-private-67851-neither.rs b/tests/rustdoc/private/doc-hidden-private-67851-neither.rs
index 1f70ceefe44..1f70ceefe44 100644
--- a/tests/rustdoc/doc-hidden-private-67851-neither.rs
+++ b/tests/rustdoc/private/doc-hidden-private-67851-neither.rs
diff --git a/tests/rustdoc/doc-hidden-private-67851-private.rs b/tests/rustdoc/private/doc-hidden-private-67851-private.rs
index f6f546ad5ea..f6f546ad5ea 100644
--- a/tests/rustdoc/doc-hidden-private-67851-private.rs
+++ b/tests/rustdoc/private/doc-hidden-private-67851-private.rs
diff --git a/tests/rustdoc/empty-impl-block-private-with-doc.rs b/tests/rustdoc/private/empty-impl-block-private-with-doc.rs
index 5dc7e1aed7a..5dc7e1aed7a 100644
--- a/tests/rustdoc/empty-impl-block-private-with-doc.rs
+++ b/tests/rustdoc/private/empty-impl-block-private-with-doc.rs
diff --git a/tests/rustdoc/empty-impl-block-private.rs b/tests/rustdoc/private/empty-impl-block-private.rs
index 2ee65d1a969..2ee65d1a969 100644
--- a/tests/rustdoc/empty-impl-block-private.rs
+++ b/tests/rustdoc/private/empty-impl-block-private.rs
diff --git a/tests/rustdoc/empty-mod-private.rs b/tests/rustdoc/private/empty-mod-private.rs
index 5a8638cd5f5..5a8638cd5f5 100644
--- a/tests/rustdoc/empty-mod-private.rs
+++ b/tests/rustdoc/private/empty-mod-private.rs
diff --git a/tests/rustdoc/enum-variant-private-46767.rs b/tests/rustdoc/private/enum-variant-private-46767.rs
index cc93684e723..cc93684e723 100644
--- a/tests/rustdoc/enum-variant-private-46767.rs
+++ b/tests/rustdoc/private/enum-variant-private-46767.rs
diff --git a/tests/rustdoc/files-creation-private.rs b/tests/rustdoc/private/files-creation-private.rs
index 54579380f0b..54579380f0b 100644
--- a/tests/rustdoc/files-creation-private.rs
+++ b/tests/rustdoc/private/files-creation-private.rs
diff --git a/tests/rustdoc/hidden-private.rs b/tests/rustdoc/private/hidden-private.rs
index 658e093cc23..658e093cc23 100644
--- a/tests/rustdoc/hidden-private.rs
+++ b/tests/rustdoc/private/hidden-private.rs
diff --git a/tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs b/tests/rustdoc/private/inline-private-with-intermediate-doc-hidden.rs
index d27ecbad169..d27ecbad169 100644
--- a/tests/rustdoc/inline-private-with-intermediate-doc-hidden.rs
+++ b/tests/rustdoc/private/inline-private-with-intermediate-doc-hidden.rs
diff --git a/tests/rustdoc/inner-private-110422.rs b/tests/rustdoc/private/inner-private-110422.rs
index 31e28676879..31e28676879 100644
--- a/tests/rustdoc/inner-private-110422.rs
+++ b/tests/rustdoc/private/inner-private-110422.rs
diff --git a/tests/rustdoc/macro-document-private-duplicate.rs b/tests/rustdoc/private/macro-document-private-duplicate.rs
index 35cdc60dfdc..35cdc60dfdc 100644
--- a/tests/rustdoc/macro-document-private-duplicate.rs
+++ b/tests/rustdoc/private/macro-document-private-duplicate.rs
diff --git a/tests/rustdoc/macro-document-private.rs b/tests/rustdoc/private/macro-document-private.rs
index 224e31f8312..224e31f8312 100644
--- a/tests/rustdoc/macro-document-private.rs
+++ b/tests/rustdoc/private/macro-document-private.rs
diff --git a/tests/rustdoc/macro-private-not-documented.rs b/tests/rustdoc/private/macro-private-not-documented.rs
index bd97be5d366..bd97be5d366 100644
--- a/tests/rustdoc/macro-private-not-documented.rs
+++ b/tests/rustdoc/private/macro-private-not-documented.rs
diff --git a/tests/rustdoc/missing-private-inlining-109258.rs b/tests/rustdoc/private/missing-private-inlining-109258.rs
index 7f010f160c4..7f010f160c4 100644
--- a/tests/rustdoc/missing-private-inlining-109258.rs
+++ b/tests/rustdoc/private/missing-private-inlining-109258.rs
diff --git a/tests/rustdoc/private-fields-tuple-struct.rs b/tests/rustdoc/private/private-fields-tuple-struct.rs
index 51141923cd8..51141923cd8 100644
--- a/tests/rustdoc/private-fields-tuple-struct.rs
+++ b/tests/rustdoc/private/private-fields-tuple-struct.rs
diff --git a/tests/rustdoc/private-non-local-fields-2.rs b/tests/rustdoc/private/private-non-local-fields-2.rs
index f2d3530c088..f2d3530c088 100644
--- a/tests/rustdoc/private-non-local-fields-2.rs
+++ b/tests/rustdoc/private/private-non-local-fields-2.rs
diff --git a/tests/rustdoc/private-non-local-fields.rs b/tests/rustdoc/private/private-non-local-fields.rs
index aa7f01a58c6..aa7f01a58c6 100644
--- a/tests/rustdoc/private-non-local-fields.rs
+++ b/tests/rustdoc/private/private-non-local-fields.rs
diff --git a/tests/rustdoc/private-type-alias.rs b/tests/rustdoc/private/private-type-alias.rs
index 5b5f52728a9..5b5f52728a9 100644
--- a/tests/rustdoc/private-type-alias.rs
+++ b/tests/rustdoc/private/private-type-alias.rs
diff --git a/tests/rustdoc/private-type-cycle-110629.rs b/tests/rustdoc/private/private-type-cycle-110629.rs
index e2376809697..e2376809697 100644
--- a/tests/rustdoc/private-type-cycle-110629.rs
+++ b/tests/rustdoc/private/private-type-cycle-110629.rs
diff --git a/tests/rustdoc/private-use-decl-macro-47038.rs b/tests/rustdoc/private/private-use-decl-macro-47038.rs
index b72fca06d3b..b72fca06d3b 100644
--- a/tests/rustdoc/private-use-decl-macro-47038.rs
+++ b/tests/rustdoc/private/private-use-decl-macro-47038.rs
diff --git a/tests/rustdoc/private-use.rs b/tests/rustdoc/private/private-use.rs
index 689ed73140d..689ed73140d 100644
--- a/tests/rustdoc/private-use.rs
+++ b/tests/rustdoc/private/private-use.rs
diff --git a/tests/rustdoc/public-impl-mention-private-generic-46380-2.rs b/tests/rustdoc/private/public-impl-mention-private-generic-46380-2.rs
index 0445ae75e85..0445ae75e85 100644
--- a/tests/rustdoc/public-impl-mention-private-generic-46380-2.rs
+++ b/tests/rustdoc/private/public-impl-mention-private-generic-46380-2.rs
diff --git a/tests/rustdoc/traits-in-bodies-private.rs b/tests/rustdoc/private/traits-in-bodies-private.rs
index a3455b3255b..a3455b3255b 100644
--- a/tests/rustdoc/traits-in-bodies-private.rs
+++ b/tests/rustdoc/private/traits-in-bodies-private.rs
diff --git a/tests/rustdoc/alias-reexport.rs b/tests/rustdoc/reexport/alias-reexport.rs
index 41f1f8df0f6..41f1f8df0f6 100644
--- a/tests/rustdoc/alias-reexport.rs
+++ b/tests/rustdoc/reexport/alias-reexport.rs
diff --git a/tests/rustdoc/alias-reexport2.rs b/tests/rustdoc/reexport/alias-reexport2.rs
index 2fb69b922c8..2fb69b922c8 100644
--- a/tests/rustdoc/alias-reexport2.rs
+++ b/tests/rustdoc/reexport/alias-reexport2.rs
diff --git a/tests/rustdoc/anonymous-reexport-108931.rs b/tests/rustdoc/reexport/anonymous-reexport-108931.rs
index b995c89b614..b995c89b614 100644
--- a/tests/rustdoc/anonymous-reexport-108931.rs
+++ b/tests/rustdoc/reexport/anonymous-reexport-108931.rs
diff --git a/tests/rustdoc/anonymous-reexport.rs b/tests/rustdoc/reexport/anonymous-reexport.rs
index bf5fa93f953..bf5fa93f953 100644
--- a/tests/rustdoc/anonymous-reexport.rs
+++ b/tests/rustdoc/reexport/anonymous-reexport.rs
diff --git a/tests/rustdoc/auxiliary/alias-reexport.rs b/tests/rustdoc/reexport/auxiliary/alias-reexport.rs
index 14fafc02d36..14fafc02d36 100644
--- a/tests/rustdoc/auxiliary/alias-reexport.rs
+++ b/tests/rustdoc/reexport/auxiliary/alias-reexport.rs
diff --git a/tests/rustdoc/auxiliary/alias-reexport2.rs b/tests/rustdoc/reexport/auxiliary/alias-reexport2.rs
index ee1f242c1d4..ee1f242c1d4 100644
--- a/tests/rustdoc/auxiliary/alias-reexport2.rs
+++ b/tests/rustdoc/reexport/auxiliary/alias-reexport2.rs
diff --git a/tests/rustdoc/reexport/auxiliary/all-item-types.rs b/tests/rustdoc/reexport/auxiliary/all-item-types.rs
new file mode 100644
index 00000000000..f94bd998717
--- /dev/null
+++ b/tests/rustdoc/reexport/auxiliary/all-item-types.rs
@@ -0,0 +1,22 @@
+#![feature(extern_types)]
+
+pub mod foo_mod {}
+extern "C" {
+    pub fn foo_ffn();
+    pub static FOO_FSTATIC: FooStruct;
+    pub type FooFType;
+}
+pub fn foo_fn() {}
+pub trait FooTrait {}
+pub struct FooStruct;
+pub enum FooEnum {}
+pub union FooUnion {
+    x: (),
+}
+pub type FooType = FooStruct;
+pub static FOO_STATIC: FooStruct = FooStruct;
+pub const FOO_CONSTANT: FooStruct = FooStruct;
+#[macro_export]
+macro_rules! foo_macro {
+    () => ();
+}
diff --git a/tests/rustdoc/auxiliary/issue-113982-doc_auto_cfg-reexport-foreign.rs b/tests/rustdoc/reexport/auxiliary/issue-113982-doc_auto_cfg-reexport-foreign.rs
index a1a716f5a41..a1a716f5a41 100644
--- a/tests/rustdoc/auxiliary/issue-113982-doc_auto_cfg-reexport-foreign.rs
+++ b/tests/rustdoc/reexport/auxiliary/issue-113982-doc_auto_cfg-reexport-foreign.rs
diff --git a/tests/rustdoc/auxiliary/issue-28927-1.rs b/tests/rustdoc/reexport/auxiliary/issue-28927-1.rs
index 688c73428dd..688c73428dd 100644
--- a/tests/rustdoc/auxiliary/issue-28927-1.rs
+++ b/tests/rustdoc/reexport/auxiliary/issue-28927-1.rs
diff --git a/tests/rustdoc/auxiliary/issue-28927-2.rs b/tests/rustdoc/reexport/auxiliary/issue-28927-2.rs
index 7c0937fce20..7c0937fce20 100644
--- a/tests/rustdoc/auxiliary/issue-28927-2.rs
+++ b/tests/rustdoc/reexport/auxiliary/issue-28927-2.rs
diff --git a/tests/rustdoc/auxiliary/primitive-reexport.rs b/tests/rustdoc/reexport/auxiliary/primitive-reexport.rs
index 7c85038674b..7c85038674b 100644
--- a/tests/rustdoc/auxiliary/primitive-reexport.rs
+++ b/tests/rustdoc/reexport/auxiliary/primitive-reexport.rs
diff --git a/tests/rustdoc/auxiliary/reexport-check.rs b/tests/rustdoc/reexport/auxiliary/reexport-check.rs
index 672ccb1cf0e..672ccb1cf0e 100644
--- a/tests/rustdoc/auxiliary/reexport-check.rs
+++ b/tests/rustdoc/reexport/auxiliary/reexport-check.rs
diff --git a/tests/rustdoc/auxiliary/reexport-doc-aux.rs b/tests/rustdoc/reexport/auxiliary/reexport-doc-aux.rs
index 3400717eba1..3400717eba1 100644
--- a/tests/rustdoc/auxiliary/reexport-doc-aux.rs
+++ b/tests/rustdoc/reexport/auxiliary/reexport-doc-aux.rs
diff --git a/tests/rustdoc/auxiliary/reexports.rs b/tests/rustdoc/reexport/auxiliary/reexports.rs
index 4336993a36e..4336993a36e 100644
--- a/tests/rustdoc/auxiliary/reexports.rs
+++ b/tests/rustdoc/reexport/auxiliary/reexports.rs
diff --git a/tests/rustdoc/blanket-reexport-item.rs b/tests/rustdoc/reexport/blanket-reexport-item.rs
index 199a47019a2..199a47019a2 100644
--- a/tests/rustdoc/blanket-reexport-item.rs
+++ b/tests/rustdoc/reexport/blanket-reexport-item.rs
diff --git a/tests/rustdoc/cfg_doc_reexport.rs b/tests/rustdoc/reexport/cfg_doc_reexport.rs
index 44ec3663284..44ec3663284 100644
--- a/tests/rustdoc/cfg_doc_reexport.rs
+++ b/tests/rustdoc/reexport/cfg_doc_reexport.rs
diff --git a/tests/rustdoc/doc-hidden-reexports-109449.rs b/tests/rustdoc/reexport/doc-hidden-reexports-109449.rs
index 78b9214300a..78b9214300a 100644
--- a/tests/rustdoc/doc-hidden-reexports-109449.rs
+++ b/tests/rustdoc/reexport/doc-hidden-reexports-109449.rs
diff --git a/tests/rustdoc/doc_auto_cfg-reexport-foreign-113982.rs b/tests/rustdoc/reexport/doc_auto_cfg-reexport-foreign-113982.rs
index 76b25127a9c..76b25127a9c 100644
--- a/tests/rustdoc/doc_auto_cfg-reexport-foreign-113982.rs
+++ b/tests/rustdoc/reexport/doc_auto_cfg-reexport-foreign-113982.rs
diff --git a/tests/rustdoc/duplicated-glob-reexport-60522.rs b/tests/rustdoc/reexport/duplicated-glob-reexport-60522.rs
index a75a21c2dac..a75a21c2dac 100644
--- a/tests/rustdoc/duplicated-glob-reexport-60522.rs
+++ b/tests/rustdoc/reexport/duplicated-glob-reexport-60522.rs
diff --git a/tests/rustdoc/enum-variant-reexport-35488.rs b/tests/rustdoc/reexport/enum-variant-reexport-35488.rs
index b8e42ef7a89..b8e42ef7a89 100644
--- a/tests/rustdoc/enum-variant-reexport-35488.rs
+++ b/tests/rustdoc/reexport/enum-variant-reexport-35488.rs
diff --git a/tests/rustdoc/foreigntype-reexport.rs b/tests/rustdoc/reexport/foreigntype-reexport.rs
index 22c1852adf5..22c1852adf5 100644
--- a/tests/rustdoc/foreigntype-reexport.rs
+++ b/tests/rustdoc/reexport/foreigntype-reexport.rs
diff --git a/tests/rustdoc/glob-reexport-attribute-merge-120487.rs b/tests/rustdoc/reexport/glob-reexport-attribute-merge-120487.rs
index 5b918e0ffd9..5b918e0ffd9 100644
--- a/tests/rustdoc/glob-reexport-attribute-merge-120487.rs
+++ b/tests/rustdoc/reexport/glob-reexport-attribute-merge-120487.rs
diff --git a/tests/rustdoc/glob-reexport-attribute-merge-doc-auto-cfg.rs b/tests/rustdoc/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs
index d0a2165ec8a..d0a2165ec8a 100644
--- a/tests/rustdoc/glob-reexport-attribute-merge-doc-auto-cfg.rs
+++ b/tests/rustdoc/reexport/glob-reexport-attribute-merge-doc-auto-cfg.rs
diff --git a/tests/rustdoc/ice-reexport-crate-root-28927.rs b/tests/rustdoc/reexport/ice-reexport-crate-root-28927.rs
index b4215f7d1aa..b4215f7d1aa 100644
--- a/tests/rustdoc/ice-reexport-crate-root-28927.rs
+++ b/tests/rustdoc/reexport/ice-reexport-crate-root-28927.rs
diff --git a/tests/rustdoc/local-reexport-doc.rs b/tests/rustdoc/reexport/local-reexport-doc.rs
index 6db8f999d29..6db8f999d29 100644
--- a/tests/rustdoc/local-reexport-doc.rs
+++ b/tests/rustdoc/reexport/local-reexport-doc.rs
diff --git a/tests/rustdoc/no-compiler-reexport.rs b/tests/rustdoc/reexport/no-compiler-reexport.rs
index 355d47d7ba7..355d47d7ba7 100644
--- a/tests/rustdoc/no-compiler-reexport.rs
+++ b/tests/rustdoc/reexport/no-compiler-reexport.rs
diff --git a/tests/rustdoc/overlapping-reexport-105735-2.rs b/tests/rustdoc/reexport/overlapping-reexport-105735-2.rs
index fa43924ff4e..fa43924ff4e 100644
--- a/tests/rustdoc/overlapping-reexport-105735-2.rs
+++ b/tests/rustdoc/reexport/overlapping-reexport-105735-2.rs
diff --git a/tests/rustdoc/overlapping-reexport-105735.rs b/tests/rustdoc/reexport/overlapping-reexport-105735.rs
index d1b5c0b6749..d1b5c0b6749 100644
--- a/tests/rustdoc/overlapping-reexport-105735.rs
+++ b/tests/rustdoc/reexport/overlapping-reexport-105735.rs
diff --git a/tests/rustdoc/primitive-reexport.rs b/tests/rustdoc/reexport/primitive-reexport.rs
index 9b23b24fc93..9b23b24fc93 100644
--- a/tests/rustdoc/primitive-reexport.rs
+++ b/tests/rustdoc/reexport/primitive-reexport.rs
diff --git a/tests/rustdoc/pub-reexport-of-pub-reexport-46506.rs b/tests/rustdoc/reexport/pub-reexport-of-pub-reexport-46506.rs
index f9569902927..f9569902927 100644
--- a/tests/rustdoc/pub-reexport-of-pub-reexport-46506.rs
+++ b/tests/rustdoc/reexport/pub-reexport-of-pub-reexport-46506.rs
diff --git a/tests/rustdoc/reexport-attr-merge.rs b/tests/rustdoc/reexport/reexport-attr-merge.rs
index aef302eb0b2..aef302eb0b2 100644
--- a/tests/rustdoc/reexport-attr-merge.rs
+++ b/tests/rustdoc/reexport/reexport-attr-merge.rs
diff --git a/tests/rustdoc/reexport-cfg.rs b/tests/rustdoc/reexport/reexport-cfg.rs
index 73b66824316..73b66824316 100644
--- a/tests/rustdoc/reexport-cfg.rs
+++ b/tests/rustdoc/reexport/reexport-cfg.rs
diff --git a/tests/rustdoc/reexport-check.rs b/tests/rustdoc/reexport/reexport-check.rs
index fc10e3aadd0..fc10e3aadd0 100644
--- a/tests/rustdoc/reexport-check.rs
+++ b/tests/rustdoc/reexport/reexport-check.rs
diff --git a/tests/rustdoc/reexport-dep-foreign-fn.rs b/tests/rustdoc/reexport/reexport-dep-foreign-fn.rs
index 1b63fcff017..1b63fcff017 100644
--- a/tests/rustdoc/reexport-dep-foreign-fn.rs
+++ b/tests/rustdoc/reexport/reexport-dep-foreign-fn.rs
diff --git a/tests/rustdoc/reexport-doc-hidden-inside-private.rs b/tests/rustdoc/reexport/reexport-doc-hidden-inside-private.rs
index bae2aa78ec7..bae2aa78ec7 100644
--- a/tests/rustdoc/reexport-doc-hidden-inside-private.rs
+++ b/tests/rustdoc/reexport/reexport-doc-hidden-inside-private.rs
diff --git a/tests/rustdoc/reexport-doc-hidden.rs b/tests/rustdoc/reexport/reexport-doc-hidden.rs
index 1468e9ad957..1468e9ad957 100644
--- a/tests/rustdoc/reexport-doc-hidden.rs
+++ b/tests/rustdoc/reexport/reexport-doc-hidden.rs
diff --git a/tests/rustdoc/reexport-doc.rs b/tests/rustdoc/reexport/reexport-doc.rs
index 0c20de41231..0c20de41231 100644
--- a/tests/rustdoc/reexport-doc.rs
+++ b/tests/rustdoc/reexport/reexport-doc.rs
diff --git a/tests/rustdoc/reexport-hidden-macro.rs b/tests/rustdoc/reexport/reexport-hidden-macro.rs
index 7345149c645..7345149c645 100644
--- a/tests/rustdoc/reexport-hidden-macro.rs
+++ b/tests/rustdoc/reexport/reexport-hidden-macro.rs
diff --git a/tests/rustdoc/reexport-macro.rs b/tests/rustdoc/reexport/reexport-macro.rs
index 7e041eb90ba..7e041eb90ba 100644
--- a/tests/rustdoc/reexport-macro.rs
+++ b/tests/rustdoc/reexport/reexport-macro.rs
diff --git a/tests/rustdoc/reexport-of-doc-hidden.rs b/tests/rustdoc/reexport/reexport-of-doc-hidden.rs
index e901d0ff8a2..e901d0ff8a2 100644
--- a/tests/rustdoc/reexport-of-doc-hidden.rs
+++ b/tests/rustdoc/reexport/reexport-of-doc-hidden.rs
diff --git a/tests/rustdoc/reexport-of-reexport-108679.rs b/tests/rustdoc/reexport/reexport-of-reexport-108679.rs
index 0d2faf71d32..0d2faf71d32 100644
--- a/tests/rustdoc/reexport-of-reexport-108679.rs
+++ b/tests/rustdoc/reexport/reexport-of-reexport-108679.rs
diff --git a/tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs b/tests/rustdoc/reexport/reexport-stability-tags-deprecated-and-portability.rs
index f83f28f458e..f83f28f458e 100644
--- a/tests/rustdoc/reexport-stability-tags-deprecated-and-portability.rs
+++ b/tests/rustdoc/reexport/reexport-stability-tags-deprecated-and-portability.rs
diff --git a/tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs b/tests/rustdoc/reexport/reexport-stability-tags-unstable-and-portability.rs
index adf3eed204a..adf3eed204a 100644
--- a/tests/rustdoc/reexport-stability-tags-unstable-and-portability.rs
+++ b/tests/rustdoc/reexport/reexport-stability-tags-unstable-and-portability.rs
diff --git a/tests/rustdoc/reexport-trait-from-hidden-111064-2.rs b/tests/rustdoc/reexport/reexport-trait-from-hidden-111064-2.rs
index 61060b3ff7c..61060b3ff7c 100644
--- a/tests/rustdoc/reexport-trait-from-hidden-111064-2.rs
+++ b/tests/rustdoc/reexport/reexport-trait-from-hidden-111064-2.rs
diff --git a/tests/rustdoc/reexport-trait-from-hidden-111064.rs b/tests/rustdoc/reexport/reexport-trait-from-hidden-111064.rs
index 8b9ad7616ea..8b9ad7616ea 100644
--- a/tests/rustdoc/reexport-trait-from-hidden-111064.rs
+++ b/tests/rustdoc/reexport/reexport-trait-from-hidden-111064.rs
diff --git a/tests/rustdoc/reexports-of-same-name.rs b/tests/rustdoc/reexport/reexports-of-same-name.rs
index 6e5d328b081..6e5d328b081 100644
--- a/tests/rustdoc/reexports-of-same-name.rs
+++ b/tests/rustdoc/reexport/reexports-of-same-name.rs
diff --git a/tests/rustdoc/reexports-priv.rs b/tests/rustdoc/reexport/reexports-priv.rs
index 4521b4feebc..4521b4feebc 100644
--- a/tests/rustdoc/reexports-priv.rs
+++ b/tests/rustdoc/reexport/reexports-priv.rs
diff --git a/tests/rustdoc/reexports.rs b/tests/rustdoc/reexport/reexports.rs
index b17e9cd719a..b17e9cd719a 100644
--- a/tests/rustdoc/reexports.rs
+++ b/tests/rustdoc/reexport/reexports.rs
diff --git a/tests/rustdoc/assoc-type-source-link.rs b/tests/rustdoc/source-code-pages/assoc-type-source-link.rs
index a955a67a457..a955a67a457 100644
--- a/tests/rustdoc/assoc-type-source-link.rs
+++ b/tests/rustdoc/source-code-pages/assoc-type-source-link.rs
diff --git a/tests/rustdoc/auxiliary/issue-26606-macro.rs b/tests/rustdoc/source-code-pages/auxiliary/issue-26606-macro.rs
index d60d32526aa..d60d32526aa 100644
--- a/tests/rustdoc/auxiliary/issue-26606-macro.rs
+++ b/tests/rustdoc/source-code-pages/auxiliary/issue-26606-macro.rs
diff --git a/tests/rustdoc/auxiliary/issue-34274.rs b/tests/rustdoc/source-code-pages/auxiliary/issue-34274.rs
index c46660579a8..c46660579a8 100644
--- a/tests/rustdoc/auxiliary/issue-34274.rs
+++ b/tests/rustdoc/source-code-pages/auxiliary/issue-34274.rs
diff --git a/tests/rustdoc/auxiliary/source-code-bar.rs b/tests/rustdoc/source-code-pages/auxiliary/source-code-bar.rs
index 8700d688ef7..8700d688ef7 100644
--- a/tests/rustdoc/auxiliary/source-code-bar.rs
+++ b/tests/rustdoc/source-code-pages/auxiliary/source-code-bar.rs
diff --git a/tests/rustdoc/auxiliary/source_code.rs b/tests/rustdoc/source-code-pages/auxiliary/source_code.rs
index 72a5c1a0ae9..72a5c1a0ae9 100644
--- a/tests/rustdoc/auxiliary/source_code.rs
+++ b/tests/rustdoc/source-code-pages/auxiliary/source_code.rs
diff --git a/tests/rustdoc/auxiliary/src-links-external.rs b/tests/rustdoc/source-code-pages/auxiliary/src-links-external.rs
index 4a835673a59..4a835673a59 100644
--- a/tests/rustdoc/auxiliary/src-links-external.rs
+++ b/tests/rustdoc/source-code-pages/auxiliary/src-links-external.rs
diff --git a/tests/rustdoc/check-source-code-urls-to-def-std.rs b/tests/rustdoc/source-code-pages/check-source-code-urls-to-def-std.rs
index 42468f7dde6..42468f7dde6 100644
--- a/tests/rustdoc/check-source-code-urls-to-def-std.rs
+++ b/tests/rustdoc/source-code-pages/check-source-code-urls-to-def-std.rs
diff --git a/tests/rustdoc/check-source-code-urls-to-def.rs b/tests/rustdoc/source-code-pages/check-source-code-urls-to-def.rs
index d701b88bf9f..d701b88bf9f 100644
--- a/tests/rustdoc/check-source-code-urls-to-def.rs
+++ b/tests/rustdoc/source-code-pages/check-source-code-urls-to-def.rs
diff --git a/tests/rustdoc/doc-hidden-source.rs b/tests/rustdoc/source-code-pages/doc-hidden-source.rs
index b6bc622dd58..b6bc622dd58 100644
--- a/tests/rustdoc/doc-hidden-source.rs
+++ b/tests/rustdoc/source-code-pages/doc-hidden-source.rs
diff --git a/tests/rustdoc/html-no-source.rs b/tests/rustdoc/source-code-pages/html-no-source.rs
index 248afbd00ef..248afbd00ef 100644
--- a/tests/rustdoc/html-no-source.rs
+++ b/tests/rustdoc/source-code-pages/html-no-source.rs
diff --git a/tests/rustdoc/source-code-highlight.rs b/tests/rustdoc/source-code-pages/source-code-highlight.rs
index f1c905e64c0..f1c905e64c0 100644
--- a/tests/rustdoc/source-code-highlight.rs
+++ b/tests/rustdoc/source-code-pages/source-code-highlight.rs
diff --git a/tests/rustdoc/source-file.rs b/tests/rustdoc/source-code-pages/source-file.rs
index 6cff5edf146..6cff5edf146 100644
--- a/tests/rustdoc/source-file.rs
+++ b/tests/rustdoc/source-code-pages/source-file.rs
diff --git a/tests/rustdoc/source-line-numbers.rs b/tests/rustdoc/source-code-pages/source-line-numbers.rs
index 0b654b1a004..0b654b1a004 100644
--- a/tests/rustdoc/source-line-numbers.rs
+++ b/tests/rustdoc/source-code-pages/source-line-numbers.rs
diff --git a/tests/rustdoc/source-version-separator.rs b/tests/rustdoc/source-code-pages/source-version-separator.rs
index 78b9d364d21..78b9d364d21 100644
--- a/tests/rustdoc/source-version-separator.rs
+++ b/tests/rustdoc/source-code-pages/source-version-separator.rs
diff --git a/tests/rustdoc/src-link-external-macro-26606.rs b/tests/rustdoc/source-code-pages/src-link-external-macro-26606.rs
index 0ce829f06f5..0ce829f06f5 100644
--- a/tests/rustdoc/src-link-external-macro-26606.rs
+++ b/tests/rustdoc/source-code-pages/src-link-external-macro-26606.rs
diff --git a/tests/rustdoc/src-links-auto-impls.rs b/tests/rustdoc/source-code-pages/src-links-auto-impls.rs
index 5a777f59b7e..5a777f59b7e 100644
--- a/tests/rustdoc/src-links-auto-impls.rs
+++ b/tests/rustdoc/source-code-pages/src-links-auto-impls.rs
diff --git a/tests/rustdoc/src-links-external.rs b/tests/rustdoc/source-code-pages/src-links-external.rs
index e8acbf1b9b4..e8acbf1b9b4 100644
--- a/tests/rustdoc/src-links-external.rs
+++ b/tests/rustdoc/source-code-pages/src-links-external.rs
diff --git a/tests/rustdoc/src-links-implementor-43893.rs b/tests/rustdoc/source-code-pages/src-links-implementor-43893.rs
index d9abdcde08d..d9abdcde08d 100644
--- a/tests/rustdoc/src-links-implementor-43893.rs
+++ b/tests/rustdoc/source-code-pages/src-links-implementor-43893.rs
diff --git a/tests/rustdoc/src-links-inlined-34274.rs b/tests/rustdoc/source-code-pages/src-links-inlined-34274.rs
index 8675ae4736e..8675ae4736e 100644
--- a/tests/rustdoc/src-links-inlined-34274.rs
+++ b/tests/rustdoc/source-code-pages/src-links-inlined-34274.rs
diff --git a/tests/rustdoc/src-links.rs b/tests/rustdoc/source-code-pages/src-links.rs
index 24039a5d84e..24039a5d84e 100644
--- a/tests/rustdoc/src-links.rs
+++ b/tests/rustdoc/source-code-pages/src-links.rs
diff --git a/tests/rustdoc/src-links/compiletest-ignore-dir b/tests/rustdoc/source-code-pages/src-links/compiletest-ignore-dir
index e69de29bb2d..e69de29bb2d 100644
--- a/tests/rustdoc/src-links/compiletest-ignore-dir
+++ b/tests/rustdoc/source-code-pages/src-links/compiletest-ignore-dir
diff --git a/tests/rustdoc/src-links/fizz.rs b/tests/rustdoc/source-code-pages/src-links/fizz.rs
index d2b76b1cec8..d2b76b1cec8 100644
--- a/tests/rustdoc/src-links/fizz.rs
+++ b/tests/rustdoc/source-code-pages/src-links/fizz.rs
diff --git a/tests/rustdoc/src-links/mod.rs b/tests/rustdoc/source-code-pages/src-links/mod.rs
index 27b2396811a..27b2396811a 100644
--- a/tests/rustdoc/src-links/mod.rs
+++ b/tests/rustdoc/source-code-pages/src-links/mod.rs
diff --git a/tests/rustdoc/src-mod-path-absolute-26995.rs b/tests/rustdoc/source-code-pages/src-mod-path-absolute-26995.rs
index f754b64977f..f754b64977f 100644
--- a/tests/rustdoc/src-mod-path-absolute-26995.rs
+++ b/tests/rustdoc/source-code-pages/src-mod-path-absolute-26995.rs
diff --git a/tests/rustdoc/version-separator-without-source.rs b/tests/rustdoc/source-code-pages/version-separator-without-source.rs
index 7cd1780f1d3..7cd1780f1d3 100644
--- a/tests/rustdoc/version-separator-without-source.rs
+++ b/tests/rustdoc/source-code-pages/version-separator-without-source.rs
diff --git a/tests/ui/closures/opaque-upvar.rs b/tests/ui/closures/opaque-upvar.rs
new file mode 100644
index 00000000000..90e7c9ccb46
--- /dev/null
+++ b/tests/ui/closures/opaque-upvar.rs
@@ -0,0 +1,19 @@
+//@ check-pass
+//@ revisions: current next
+//@ ignore-compare-mode-next-solver (explicit revisions)
+//@[next] compile-flags: -Znext-solver
+
+// Regression test for <https://github.com/rust-lang/trait-system-refactor-initiative/issues/197>.
+// This is only an issue in the new solver, but I'm testing it in both solvers for now.
+// This has to do with the fact that the recursive `walk_dir` is a revealing use, which has not
+// yet been constrained from the defining use by the time that closure signature inference is
+// performed. We don't really care, though, since anywhere we structurally match on a type in
+// upvar analysis, we already call `structurally_resolve_type` right before `.kind()`.
+
+fn walk_dir(cb: &()) -> impl Sized {
+    || {
+        let fut = walk_dir(cb);
+    };
+}
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-frontmatter.rs b/tests/ui/feature-gates/feature-gate-frontmatter.rs
new file mode 100644
index 00000000000..58e1f57eec0
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-frontmatter.rs
@@ -0,0 +1,5 @@
+---cargo
+//~^ ERROR: frontmatters are experimental
+---
+
+fn main() {}
diff --git a/tests/ui/feature-gates/feature-gate-frontmatter.stderr b/tests/ui/feature-gates/feature-gate-frontmatter.stderr
new file mode 100644
index 00000000000..57d38db8e76
--- /dev/null
+++ b/tests/ui/feature-gates/feature-gate-frontmatter.stderr
@@ -0,0 +1,15 @@
+error[E0658]: frontmatters are experimental
+  --> $DIR/feature-gate-frontmatter.rs:1:1
+   |
+LL | / ---cargo
+LL | |
+LL | | ---
+   | |___^
+   |
+   = note: see issue #136889 <https://github.com/rust-lang/rust/issues/136889> for more information
+   = help: add `#![feature(frontmatter)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 1 previous error
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/frontmatter/auxiliary/lib.rs b/tests/ui/frontmatter/auxiliary/lib.rs
new file mode 100644
index 00000000000..ff7094f410f
--- /dev/null
+++ b/tests/ui/frontmatter/auxiliary/lib.rs
@@ -0,0 +1,6 @@
+---something
+---
+
+pub fn foo(x: i32) -> i32 {
+    -x
+}
diff --git a/tests/ui/frontmatter/auxiliary/makro.rs b/tests/ui/frontmatter/auxiliary/makro.rs
new file mode 100644
index 00000000000..78e7417afb5
--- /dev/null
+++ b/tests/ui/frontmatter/auxiliary/makro.rs
@@ -0,0 +1,8 @@
+extern crate proc_macro;
+use proc_macro::TokenStream;
+
+#[proc_macro]
+pub fn check(_: TokenStream) -> TokenStream {
+    assert!("---\n---".parse::<TokenStream>().unwrap().is_empty());
+    Default::default()
+}
diff --git a/tests/ui/frontmatter/dot-in-infostring-leading.rs b/tests/ui/frontmatter/dot-in-infostring-leading.rs
new file mode 100644
index 00000000000..0d3d699644e
--- /dev/null
+++ b/tests/ui/frontmatter/dot-in-infostring-leading.rs
@@ -0,0 +1,9 @@
+---.toml
+//~^ ERROR: invalid infostring for frontmatter
+---
+
+// infostrings cannot have leading dots
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/dot-in-infostring-leading.stderr b/tests/ui/frontmatter/dot-in-infostring-leading.stderr
new file mode 100644
index 00000000000..bc86bd80eec
--- /dev/null
+++ b/tests/ui/frontmatter/dot-in-infostring-leading.stderr
@@ -0,0 +1,10 @@
+error: invalid infostring for frontmatter
+  --> $DIR/dot-in-infostring-leading.rs:1:4
+   |
+LL | ---.toml
+   |    ^^^^^
+   |
+   = note: frontmatter infostrings must be a single identifier immediately following the opening
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/frontmatter/dot-in-infostring-non-leading.rs b/tests/ui/frontmatter/dot-in-infostring-non-leading.rs
new file mode 100644
index 00000000000..a4d17bb6e81
--- /dev/null
+++ b/tests/ui/frontmatter/dot-in-infostring-non-leading.rs
@@ -0,0 +1,9 @@
+---Cargo.toml
+---
+
+// infostrings can contain dots as long as a dot isn't the first character.
+//@ check-pass
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/escape.rs b/tests/ui/frontmatter/escape.rs
new file mode 100644
index 00000000000..0e6f064607e
--- /dev/null
+++ b/tests/ui/frontmatter/escape.rs
@@ -0,0 +1,14 @@
+----
+
+---
+
+----
+
+//@ check-pass
+
+// This test checks that longer dashes for opening and closing can be used to
+// escape sequences such as three dashes inside the frontmatter block.
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/extra-after-end.rs b/tests/ui/frontmatter/extra-after-end.rs
new file mode 100644
index 00000000000..de2cf4cc85e
--- /dev/null
+++ b/tests/ui/frontmatter/extra-after-end.rs
@@ -0,0 +1,7 @@
+---
+---cargo
+//~^ ERROR: extra characters after frontmatter close are not allowed
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/extra-after-end.stderr b/tests/ui/frontmatter/extra-after-end.stderr
new file mode 100644
index 00000000000..c2770fdfd41
--- /dev/null
+++ b/tests/ui/frontmatter/extra-after-end.stderr
@@ -0,0 +1,8 @@
+error: extra characters after frontmatter close are not allowed
+  --> $DIR/extra-after-end.rs:2:1
+   |
+LL | ---cargo
+   | ^^^^^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/frontmatter/frontmatter-after-tokens.rs b/tests/ui/frontmatter/frontmatter-after-tokens.rs
new file mode 100644
index 00000000000..6683991dc4a
--- /dev/null
+++ b/tests/ui/frontmatter/frontmatter-after-tokens.rs
@@ -0,0 +1,10 @@
+#![feature(frontmatter)]
+
+---
+//~^ ERROR: expected item, found `-`
+// FIXME(frontmatter): make this diagnostic better
+---
+
+// frontmatters must be at the start of a file. This test ensures that.
+
+fn main() {}
diff --git a/tests/ui/frontmatter/frontmatter-after-tokens.stderr b/tests/ui/frontmatter/frontmatter-after-tokens.stderr
new file mode 100644
index 00000000000..919456924d0
--- /dev/null
+++ b/tests/ui/frontmatter/frontmatter-after-tokens.stderr
@@ -0,0 +1,10 @@
+error: expected item, found `-`
+  --> $DIR/frontmatter-after-tokens.rs:3:1
+   |
+LL | ---
+   | ^ expected item
+   |
+   = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/frontmatter/frontmatter-non-lexible-tokens.rs b/tests/ui/frontmatter/frontmatter-non-lexible-tokens.rs
new file mode 100644
index 00000000000..ea042edef06
--- /dev/null
+++ b/tests/ui/frontmatter/frontmatter-non-lexible-tokens.rs
@@ -0,0 +1,12 @@
+---uwu
+🏳️‍⚧️
+---
+
+//@ check-pass
+
+#![feature(frontmatter)]
+
+// check that frontmatter blocks can have tokens that are otherwise not accepted by
+// the lexer as Rust code.
+
+fn main() {}
diff --git a/tests/ui/frontmatter/frontmatter-whitespace-1.rs b/tests/ui/frontmatter/frontmatter-whitespace-1.rs
new file mode 100644
index 00000000000..8b6e2d1af84
--- /dev/null
+++ b/tests/ui/frontmatter/frontmatter-whitespace-1.rs
@@ -0,0 +1,10 @@
+  ---
+//~^ ERROR: invalid preceding whitespace for frontmatter opening
+  ---
+//~^ ERROR: invalid preceding whitespace for frontmatter close
+
+#![feature(frontmatter)]
+
+// check that whitespaces should not precede the frontmatter opening or close.
+
+fn main() {}
diff --git a/tests/ui/frontmatter/frontmatter-whitespace-1.stderr b/tests/ui/frontmatter/frontmatter-whitespace-1.stderr
new file mode 100644
index 00000000000..37ece27acb2
--- /dev/null
+++ b/tests/ui/frontmatter/frontmatter-whitespace-1.stderr
@@ -0,0 +1,26 @@
+error: invalid preceding whitespace for frontmatter opening
+  --> $DIR/frontmatter-whitespace-1.rs:1:1
+   |
+LL |   ---
+   | ^^^^^
+   |
+note: frontmatter opening should not be preceded by whitespace
+  --> $DIR/frontmatter-whitespace-1.rs:1:1
+   |
+LL |   ---
+   | ^^
+
+error: invalid preceding whitespace for frontmatter close
+  --> $DIR/frontmatter-whitespace-1.rs:3:1
+   |
+LL |   ---
+   | ^^^^^
+   |
+note: frontmatter close should not be preceded by whitespace
+  --> $DIR/frontmatter-whitespace-1.rs:3:1
+   |
+LL |   ---
+   | ^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/frontmatter/frontmatter-whitespace-2.rs b/tests/ui/frontmatter/frontmatter-whitespace-2.rs
new file mode 100644
index 00000000000..e8c100849b4
--- /dev/null
+++ b/tests/ui/frontmatter/frontmatter-whitespace-2.rs
@@ -0,0 +1,15 @@
+---cargo
+
+//@ compile-flags: --crate-type lib
+
+#![feature(frontmatter)]
+
+fn foo(x: i32) -> i32 {
+    ---x
+    //~^ ERROR: invalid preceding whitespace for frontmatter close
+    //~| ERROR: extra characters after frontmatter close are not allowed
+}
+//~^ ERROR: unexpected closing delimiter: `}`
+
+// this test is for the weird case that valid Rust code can have three dashes
+// within them and get treated as a frontmatter close.
diff --git a/tests/ui/frontmatter/frontmatter-whitespace-2.stderr b/tests/ui/frontmatter/frontmatter-whitespace-2.stderr
new file mode 100644
index 00000000000..ada6af0ec04
--- /dev/null
+++ b/tests/ui/frontmatter/frontmatter-whitespace-2.stderr
@@ -0,0 +1,26 @@
+error: invalid preceding whitespace for frontmatter close
+  --> $DIR/frontmatter-whitespace-2.rs:8:1
+   |
+LL |     ---x
+   | ^^^^^^^^
+   |
+note: frontmatter close should not be preceded by whitespace
+  --> $DIR/frontmatter-whitespace-2.rs:8:1
+   |
+LL |     ---x
+   | ^^^^
+
+error: extra characters after frontmatter close are not allowed
+  --> $DIR/frontmatter-whitespace-2.rs:8:1
+   |
+LL |     ---x
+   | ^^^^^^^^
+
+error: unexpected closing delimiter: `}`
+  --> $DIR/frontmatter-whitespace-2.rs:11:1
+   |
+LL | }
+   | ^ unexpected closing delimiter
+
+error: aborting due to 3 previous errors
+
diff --git a/tests/ui/frontmatter/frontmatter-whitespace-3.rs b/tests/ui/frontmatter/frontmatter-whitespace-3.rs
new file mode 100644
index 00000000000..95e0981e2ae
--- /dev/null
+++ b/tests/ui/frontmatter/frontmatter-whitespace-3.rs
@@ -0,0 +1,16 @@
+
+
+---cargo   
+---   
+
+// please note the whitespace characters after the first four lines.
+// This ensures that we accept whitespaces before the frontmatter, after
+// the frontmatter opening and the frontmatter close.
+
+//@ check-pass
+// ignore-tidy-end-whitespace
+// ignore-tidy-leading-newlines
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/frontmatter-whitespace-4.rs b/tests/ui/frontmatter/frontmatter-whitespace-4.rs
new file mode 100644
index 00000000000..3bda3227838
--- /dev/null
+++ b/tests/ui/frontmatter/frontmatter-whitespace-4.rs
@@ -0,0 +1,9 @@
+--- cargo
+---
+
+//@ check-pass
+// A frontmatter infostring can have leading whitespace.
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/included-frontmatter.rs b/tests/ui/frontmatter/included-frontmatter.rs
new file mode 100644
index 00000000000..57616cd1228
--- /dev/null
+++ b/tests/ui/frontmatter/included-frontmatter.rs
@@ -0,0 +1,12 @@
+#![feature(frontmatter)]
+
+//@ check-pass
+
+include!("auxiliary/lib.rs");
+
+// auxiliary/lib.rs contains a frontmatter. Ensure that we can use them in an
+// `include!` macro.
+
+fn main() {
+    foo(1);
+}
diff --git a/tests/ui/frontmatter/infostring-fail.rs b/tests/ui/frontmatter/infostring-fail.rs
new file mode 100644
index 00000000000..91542f62f1a
--- /dev/null
+++ b/tests/ui/frontmatter/infostring-fail.rs
@@ -0,0 +1,9 @@
+---cargo,clippy
+//~^ ERROR: invalid infostring for frontmatter
+---
+
+// infostrings can only be a single identifier.
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/infostring-fail.stderr b/tests/ui/frontmatter/infostring-fail.stderr
new file mode 100644
index 00000000000..6b264abc90f
--- /dev/null
+++ b/tests/ui/frontmatter/infostring-fail.stderr
@@ -0,0 +1,10 @@
+error: invalid infostring for frontmatter
+  --> $DIR/infostring-fail.rs:1:4
+   |
+LL | ---cargo,clippy
+   |    ^^^^^^^^^^^^
+   |
+   = note: frontmatter infostrings must be a single identifier immediately following the opening
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/frontmatter/mismatch-1.rs b/tests/ui/frontmatter/mismatch-1.rs
new file mode 100644
index 00000000000..37e2b0af6b1
--- /dev/null
+++ b/tests/ui/frontmatter/mismatch-1.rs
@@ -0,0 +1,10 @@
+---cargo
+//~^ ERROR: frontmatter close does not match the opening
+----
+
+// there must be the same number of dashes for both the opening and the close
+// of the frontmatter.
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/mismatch-1.stderr b/tests/ui/frontmatter/mismatch-1.stderr
new file mode 100644
index 00000000000..b6e29294d9e
--- /dev/null
+++ b/tests/ui/frontmatter/mismatch-1.stderr
@@ -0,0 +1,16 @@
+error: frontmatter close does not match the opening
+  --> $DIR/mismatch-1.rs:1:1
+   |
+LL |   ---cargo
+   |   ^--
+   |   |
+   |  _the opening here has 3 dashes...
+   | |
+LL | |
+LL | | ----
+   | |_---^
+   |   |
+   |   ...while the close has 4 dashes
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/frontmatter/mismatch-2.rs b/tests/ui/frontmatter/mismatch-2.rs
new file mode 100644
index 00000000000..422abe1d6bc
--- /dev/null
+++ b/tests/ui/frontmatter/mismatch-2.rs
@@ -0,0 +1,8 @@
+----cargo
+//~^ ERROR: frontmatter close does not match the opening
+---cargo
+//~^ ERROR: extra characters after frontmatter close are not allowed
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/mismatch-2.stderr b/tests/ui/frontmatter/mismatch-2.stderr
new file mode 100644
index 00000000000..90bb7b80bce
--- /dev/null
+++ b/tests/ui/frontmatter/mismatch-2.stderr
@@ -0,0 +1,22 @@
+error: frontmatter close does not match the opening
+  --> $DIR/mismatch-2.rs:1:1
+   |
+LL |   ----cargo
+   |   ^---
+   |   |
+   |  _the opening here has 4 dashes...
+   | |
+LL | |
+LL | | ---cargo
+   | |_---____^
+   |   |
+   |   ...while the close has 3 dashes
+
+error: extra characters after frontmatter close are not allowed
+  --> $DIR/mismatch-2.rs:3:1
+   |
+LL | ---cargo
+   | ^^^^^^^^
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/frontmatter/multifrontmatter-2.rs b/tests/ui/frontmatter/multifrontmatter-2.rs
new file mode 100644
index 00000000000..33cc30cb465
--- /dev/null
+++ b/tests/ui/frontmatter/multifrontmatter-2.rs
@@ -0,0 +1,12 @@
+---
+ ---
+//~^ ERROR: invalid preceding whitespace for frontmatter close
+
+ ---
+//~^ ERROR: expected item, found `-`
+// FIXME(frontmatter): make this diagnostic better
+---
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/multifrontmatter-2.stderr b/tests/ui/frontmatter/multifrontmatter-2.stderr
new file mode 100644
index 00000000000..ed9ac4029e2
--- /dev/null
+++ b/tests/ui/frontmatter/multifrontmatter-2.stderr
@@ -0,0 +1,22 @@
+error: invalid preceding whitespace for frontmatter close
+  --> $DIR/multifrontmatter-2.rs:2:1
+   |
+LL |  ---
+   | ^^^^
+   |
+note: frontmatter close should not be preceded by whitespace
+  --> $DIR/multifrontmatter-2.rs:2:1
+   |
+LL |  ---
+   | ^
+
+error: expected item, found `-`
+  --> $DIR/multifrontmatter-2.rs:5:2
+   |
+LL |  ---
+   |  ^ expected item
+   |
+   = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
+
+error: aborting due to 2 previous errors
+
diff --git a/tests/ui/frontmatter/multifrontmatter.rs b/tests/ui/frontmatter/multifrontmatter.rs
new file mode 100644
index 00000000000..f3afa47bd38
--- /dev/null
+++ b/tests/ui/frontmatter/multifrontmatter.rs
@@ -0,0 +1,13 @@
+---
+---
+
+---
+//~^ ERROR: expected item, found `-`
+// FIXME(frontmatter): make this diagnostic better
+---
+
+// test that we do not parse another frontmatter block after the first one.
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/multifrontmatter.stderr b/tests/ui/frontmatter/multifrontmatter.stderr
new file mode 100644
index 00000000000..2e9d1cee9dd
--- /dev/null
+++ b/tests/ui/frontmatter/multifrontmatter.stderr
@@ -0,0 +1,10 @@
+error: expected item, found `-`
+  --> $DIR/multifrontmatter.rs:4:1
+   |
+LL | ---
+   | ^ expected item
+   |
+   = note: for a full list of items that can appear in modules, see <https://doc.rust-lang.org/reference/items.html>
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/frontmatter/proc-macro-observer.rs b/tests/ui/frontmatter/proc-macro-observer.rs
new file mode 100644
index 00000000000..bafbe912032
--- /dev/null
+++ b/tests/ui/frontmatter/proc-macro-observer.rs
@@ -0,0 +1,12 @@
+//@ check-pass
+//@ proc-macro: makro.rs
+//@ edition: 2021
+
+#![feature(frontmatter)]
+
+makro::check!();
+
+// checks that a proc-macro cannot observe frontmatter tokens.
+// see auxiliary/makro.rs for how it is tested.
+
+fn main() {}
diff --git a/tests/ui/frontmatter/shebang.rs b/tests/ui/frontmatter/shebang.rs
new file mode 100644
index 00000000000..abd983f219b
--- /dev/null
+++ b/tests/ui/frontmatter/shebang.rs
@@ -0,0 +1,13 @@
+#!/usr/bin/env -S cargo -Zscript
+---
+[dependencies]
+clap = "4"
+---
+
+//@ check-pass
+
+// Shebangs on a file can precede a frontmatter.
+
+#![feature(frontmatter)]
+
+fn main () {}
diff --git a/tests/ui/frontmatter/unclosed-1.rs b/tests/ui/frontmatter/unclosed-1.rs
new file mode 100644
index 00000000000..d8b52b3e69c
--- /dev/null
+++ b/tests/ui/frontmatter/unclosed-1.rs
@@ -0,0 +1,10 @@
+----cargo
+//~^ ERROR: unclosed frontmatter
+
+// This test checks that the #! characters can help us recover a frontmatter
+// close. There should not be a "missing `main` function" error as the rest
+// are properly parsed.
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/unclosed-1.stderr b/tests/ui/frontmatter/unclosed-1.stderr
new file mode 100644
index 00000000000..04031d12839
--- /dev/null
+++ b/tests/ui/frontmatter/unclosed-1.stderr
@@ -0,0 +1,16 @@
+error: unclosed frontmatter
+  --> $DIR/unclosed-1.rs:1:1
+   |
+LL | / ----cargo
+...  |
+LL | |
+   | |_^
+   |
+note: frontmatter opening here was not closed
+  --> $DIR/unclosed-1.rs:1:1
+   |
+LL | ----cargo
+   | ^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/frontmatter/unclosed-2.rs b/tests/ui/frontmatter/unclosed-2.rs
new file mode 100644
index 00000000000..add266dce5b
--- /dev/null
+++ b/tests/ui/frontmatter/unclosed-2.rs
@@ -0,0 +1,15 @@
+----cargo
+//~^ ERROR: unclosed frontmatter
+//~| ERROR: frontmatters are experimental
+
+//@ compile-flags: --crate-type lib
+
+// Leading whitespace on the feature line prevents recovery. However
+// the dashes quoted will not be used for recovery and the entire file
+// should be treated as within the frontmatter block.
+
+ #![feature(frontmatter)]
+
+fn foo() -> &str {
+    "----"
+}
diff --git a/tests/ui/frontmatter/unclosed-2.stderr b/tests/ui/frontmatter/unclosed-2.stderr
new file mode 100644
index 00000000000..0a4022c1557
--- /dev/null
+++ b/tests/ui/frontmatter/unclosed-2.stderr
@@ -0,0 +1,31 @@
+error: unclosed frontmatter
+  --> $DIR/unclosed-2.rs:1:1
+   |
+LL | / ----cargo
+...  |
+LL | |     "----"
+LL | | }
+   | |__^
+   |
+note: frontmatter opening here was not closed
+  --> $DIR/unclosed-2.rs:1:1
+   |
+LL | ----cargo
+   | ^^^^
+
+error[E0658]: frontmatters are experimental
+  --> $DIR/unclosed-2.rs:1:1
+   |
+LL | / ----cargo
+...  |
+LL | |     "----"
+LL | | }
+   | |__^
+   |
+   = note: see issue #136889 <https://github.com/rust-lang/rust/issues/136889> for more information
+   = help: add `#![feature(frontmatter)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/frontmatter/unclosed-3.rs b/tests/ui/frontmatter/unclosed-3.rs
new file mode 100644
index 00000000000..75f3fbda675
--- /dev/null
+++ b/tests/ui/frontmatter/unclosed-3.rs
@@ -0,0 +1,16 @@
+----cargo
+//~^ ERROR: frontmatter close does not match the opening
+
+//@ compile-flags: --crate-type lib
+
+// Unfortunate recovery situation. Not really preventable with improving the
+// recovery strategy, but this type of code is rare enough already.
+
+ #![feature(frontmatter)]
+
+fn foo(x: i32) -> i32 {
+    ---x
+    //~^ ERROR: invalid preceding whitespace for frontmatter close
+    //~| ERROR: extra characters after frontmatter close are not allowed
+}
+//~^ ERROR: unexpected closing delimiter: `}`
diff --git a/tests/ui/frontmatter/unclosed-3.stderr b/tests/ui/frontmatter/unclosed-3.stderr
new file mode 100644
index 00000000000..cd69cb00040
--- /dev/null
+++ b/tests/ui/frontmatter/unclosed-3.stderr
@@ -0,0 +1,41 @@
+error: invalid preceding whitespace for frontmatter close
+  --> $DIR/unclosed-3.rs:12:1
+   |
+LL |     ---x
+   | ^^^^^^^^
+   |
+note: frontmatter close should not be preceded by whitespace
+  --> $DIR/unclosed-3.rs:12:1
+   |
+LL |     ---x
+   | ^^^^
+
+error: frontmatter close does not match the opening
+  --> $DIR/unclosed-3.rs:1:1
+   |
+LL |   ----cargo
+   |   ^---
+   |   |
+   |  _the opening here has 4 dashes...
+   | |
+...  |
+LL | | fn foo(x: i32) -> i32 {
+LL | |     ---x
+   | |_---____^
+   |   |
+   |   ...while the close has 3 dashes
+
+error: extra characters after frontmatter close are not allowed
+  --> $DIR/unclosed-3.rs:12:1
+   |
+LL |     ---x
+   | ^^^^^^^^
+
+error: unexpected closing delimiter: `}`
+  --> $DIR/unclosed-3.rs:15:1
+   |
+LL | }
+   | ^ unexpected closing delimiter
+
+error: aborting due to 4 previous errors
+
diff --git a/tests/ui/frontmatter/unclosed-4.rs b/tests/ui/frontmatter/unclosed-4.rs
new file mode 100644
index 00000000000..41f6461db63
--- /dev/null
+++ b/tests/ui/frontmatter/unclosed-4.rs
@@ -0,0 +1,9 @@
+----cargo
+//~^ ERROR: unclosed frontmatter
+
+//! Similarly, a module-level content should allow for recovery as well (as
+//! per unclosed-1.rs)
+
+#![feature(frontmatter)]
+
+fn main() {}
diff --git a/tests/ui/frontmatter/unclosed-4.stderr b/tests/ui/frontmatter/unclosed-4.stderr
new file mode 100644
index 00000000000..b3ba56937bb
--- /dev/null
+++ b/tests/ui/frontmatter/unclosed-4.stderr
@@ -0,0 +1,16 @@
+error: unclosed frontmatter
+  --> $DIR/unclosed-4.rs:1:1
+   |
+LL | / ----cargo
+LL | |
+LL | |
+   | |_^
+   |
+note: frontmatter opening here was not closed
+  --> $DIR/unclosed-4.rs:1:1
+   |
+LL | ----cargo
+   | ^^^^
+
+error: aborting due to 1 previous error
+
diff --git a/tests/ui/frontmatter/unclosed-5.rs b/tests/ui/frontmatter/unclosed-5.rs
new file mode 100644
index 00000000000..9abbcfff94c
--- /dev/null
+++ b/tests/ui/frontmatter/unclosed-5.rs
@@ -0,0 +1,10 @@
+----cargo
+//~^ ERROR: unclosed frontmatter
+//~| ERROR: frontmatters are experimental
+
+// Similarly, a use statement should allow for recovery as well (as
+// per unclosed-1.rs)
+
+use std::env;
+
+fn main() {}
diff --git a/tests/ui/frontmatter/unclosed-5.stderr b/tests/ui/frontmatter/unclosed-5.stderr
new file mode 100644
index 00000000000..e904014a175
--- /dev/null
+++ b/tests/ui/frontmatter/unclosed-5.stderr
@@ -0,0 +1,29 @@
+error: unclosed frontmatter
+  --> $DIR/unclosed-5.rs:1:1
+   |
+LL | / ----cargo
+...  |
+LL | |
+   | |_^
+   |
+note: frontmatter opening here was not closed
+  --> $DIR/unclosed-5.rs:1:1
+   |
+LL | ----cargo
+   | ^^^^
+
+error[E0658]: frontmatters are experimental
+  --> $DIR/unclosed-5.rs:1:1
+   |
+LL | / ----cargo
+...  |
+LL | |
+   | |_^
+   |
+   = note: see issue #136889 <https://github.com/rust-lang/rust/issues/136889> for more information
+   = help: add `#![feature(frontmatter)]` to the crate attributes to enable
+   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
+
+error: aborting due to 2 previous errors
+
+For more information about this error, try `rustc --explain E0658`.
diff --git a/tests/ui/unboxed-closures/arg-constrained-after-closure-inference.rs b/tests/ui/unboxed-closures/arg-constrained-after-closure-inference.rs
new file mode 100644
index 00000000000..343a27616d1
--- /dev/null
+++ b/tests/ui/unboxed-closures/arg-constrained-after-closure-inference.rs
@@ -0,0 +1,16 @@
+#![feature(unboxed_closures)]
+
+//@ check-pass
+
+// Regression test for #131758. We only know the type of `x` after closure upvar
+// inference is done, even if we don't need to structurally resolve the type of `x`.
+
+trait Foo {}
+
+impl<T: Fn<(i32,)>> Foo for T {}
+
+fn baz<T: Foo>(_: T) {}
+
+fn main() {
+    baz(|x| ());
+}